Skip to content

Commit

Permalink
Merge pull request #1684 from aws-amplify/main
Browse files Browse the repository at this point in the history
Docs Release Update
  • Loading branch information
jacoblogan authored Apr 13, 2022
2 parents 6945f5c + 1b78ac7 commit eff5e83
Show file tree
Hide file tree
Showing 87 changed files with 2,254 additions and 660 deletions.
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"test": "$_ run build"
},
"dependencies": {
"@aws-amplify/ui-react": "2.15.2",
"@aws-amplify/ui-react": "2.15.3",
"@codesandbox/sandpack-react": "0.1.9",
"@cucumber/gherkin": "^19.0.3",
"@cucumber/messages": "^16.0.1",
Expand Down
14 changes: 9 additions & 5 deletions docs/src/components/ComponentClassTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import {
ComponentClassObject,
View,
TableRow,
TableBody,
TableHead,
TableCell,
} from '@aws-amplify/ui-react';

Expand All @@ -30,11 +32,13 @@ export const ComponentClassTable = ({ componentName }) => {
return (
<View className="docs-css-classes">
<Table variation="bordered">
<TableRow>
<TableCell as="th">Class</TableCell>
<TableCell as="th">Description</TableCell>
</TableRow>
{targetClasses}
<TableHead>
<TableRow>
<TableCell as="th">Class</TableCell>
<TableCell as="th">Description</TableCell>
</TableRow>
</TableHead>
<TableBody>{targetClasses}</TableBody>
</Table>
</View>
);
Expand Down
5 changes: 4 additions & 1 deletion docs/src/components/ComponentVariableTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
View,
TableRow,
TableCell,
TableBody,
useTheme,
} from '@aws-amplify/ui-react';

Expand Down Expand Up @@ -51,7 +52,9 @@ export const ComponentVariableTable = ({ componentName }) => {

return (
<View className="docs-css-variables">
<Table variation="bordered">{variableNames}</Table>
<Table variation="bordered">
<TableBody>{variableNames}</TableBody>
</Table>
</View>
);
};
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import { Authenticator, Button } from '@aws-amplify/ui-react';

import { Example } from '@/components/Example';
import { Tabs, TabItem } from '@aws-amplify/ui-react';
import { Expander, ExpanderItem, Text } from '@aws-amplify/ui-react';

import { LabelsAndTextDemo } from './LabelsAndTextDemo';

Using the same techniques as [Internationalization (I18n)](#internationalization-i18n), you can customize the labels and text of the components:

<Tabs>
<TabItem title="Default Values">
Compare the default labels below to those in the customized screens via the tabs above.
<Expander type="single" defaultValue="default-values" isCollapsible>
<ExpanderItem title={<Text fontWeight="bold">Default Values</Text>} value="default-values">
Compare the default labels here to those in the customized screens below.

Because `I18n` manages global translations, customizing these will affect all translations of these strings (including those on this page!).

<Example>
<Authenticator />
</Example>

</TabItem>
<TabItem title="Sign In">
</ExpanderItem>

<ExpanderItem title={<Text fontWeight="bold">Sign In</Text>} value="sign-in">
```js
I18n.putVocabulariesForLanguage('en', {
'Sign In': 'Login', // Tab header
Expand All @@ -35,10 +35,9 @@ Using the same techniques as [Internationalization (I18n)](#internationalization
<LabelsAndTextDemo Component={Authenticator.SignIn} />
</Example>

</TabItem>

<TabItem title="Sign Up">
</ExpanderItem>

<ExpanderItem title={<Text fontWeight="bold">Sign Up</Text>} value="sign-up">
```js
I18n.putVocabulariesForLanguage('en', {
'Create Account': 'Register', // Tab header
Expand All @@ -53,10 +52,9 @@ Using the same techniques as [Internationalization (I18n)](#internationalization
<LabelsAndTextDemo Component={Authenticator.SignUp} />
</Example>

</TabItem>

<TabItem title="Reset Password">
</ExpanderItem>

<ExpanderItem title={<Text fontWeight="bold">Reset Password</Text>} value="reset-password">
```js
I18n.putVocabulariesForLanguage('en', {
'Reset your password': 'Forgot your password?',
Expand All @@ -70,10 +68,9 @@ Using the same techniques as [Internationalization (I18n)](#internationalization
<LabelsAndTextDemo Component={Authenticator.ResetPassword} />
</Example>

</TabItem>

<TabItem title="Setup TOTP">
</ExpanderItem>

<ExpanderItem title={<Text fontWeight="bold">Setup TOTP</Text>} value="setup-totp">
```js
I18n.putVocabulariesForLanguage('en', {
Loading: 'QR code would show here',
Expand All @@ -87,5 +84,5 @@ Using the same techniques as [Internationalization (I18n)](#internationalization
<LabelsAndTextDemo Component={Authenticator.SetupTOTP} />
</Example>

</TabItem>
</Tabs>
</ExpanderItem>
</Expander>
2 changes: 1 addition & 1 deletion docs/src/pages/components/card/react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,6 @@ _Using style props:_

### Default theme

```js file=../../../../../packages/ui/src/theme/tokens/components/card.ts
```ts file=../../../../../packages/ui/src/theme/tokens/components/card.ts

```
2 changes: 1 addition & 1 deletion docs/src/pages/components/divider/react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,6 @@ _Using style props:_

### Default theme

```js file=../../../../../packages/ui/src/theme/tokens/components/divider.ts
```ts file=../../../../../packages/ui/src/theme/tokens/components/divider.ts

```
7 changes: 0 additions & 7 deletions docs/src/pages/components/geo/react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ while using [maplibre-gl-js](https://maplibre.org/maplibre-gl-js-docs/api/) as t
used as a replacement to `react-map-gl`'s [default map](https://visgl.github.io/react-map-gl/docs/api-reference/map)
and supports the same functionality.

Install the required peer dependencies using your preferred package manager. Below, we use [Yarn](https://yarnpkg.com/)
as an example:

```shell
yarn add maplibre-gl-js@1 react-map-gl
```

You can import the `MapView` component with related styles and use it in your Amplify application without any
additional configuration.

Expand Down
2 changes: 1 addition & 1 deletion examples/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@angular/platform-browser": "~11.2.14",
"@angular/platform-browser-dynamic": "~11.2.14",
"@angular/router": "~11.2.14",
"@aws-amplify/ui-angular": "^2.3.9",
"@aws-amplify/ui-angular": "^2.3.10",
"rxjs": "~6.6.0",
"tslib": "^2.0.0",
"zone.js": "~0.11.3"
Expand Down
2 changes: 1 addition & 1 deletion examples/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"lint": "next lint"
},
"dependencies": {
"@aws-amplify/ui-react": "^2.15.2",
"@aws-amplify/ui-react": "^2.15.3",
"@types/node": "^15.12.4",
"@types/react": "^17.0.11",
"next": "^11.1.3",
Expand Down
2 changes: 1 addition & 1 deletion examples/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"start": "vite preview --port 3000"
},
"dependencies": {
"@aws-amplify/ui-vue": "^2.3.9",
"@aws-amplify/ui-vue": "^2.3.10",
"aws-amplify": "latest",
"vue": "^3.0.5",
"vue-router": "4"
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"resolutions": {
"ansi-regex": "5.0.1",
"ansi-html": "0.0.8",
"async": "^3.2.2",
"cssnano-preset-simple": "3.0.0",
"fs-extra": "^10.0.0",
"glob-parent": "^6.0.2",
Expand Down
7 changes: 7 additions & 0 deletions packages/angular/projects/ui-angular/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @aws-amplify/ui-angular

## 2.3.10

### Patch Changes

- Updated dependencies [[`34a19a541`](https://github.com/aws-amplify/amplify-ui/commit/34a19a541b4b733a6688a38a435423e9c607e918), [`16dced7de`](https://github.com/aws-amplify/amplify-ui/commit/16dced7de5edc73c064b7ec4bddbefe586e98393)]:
- @aws-amplify/ui@3.6.3

## 2.3.9

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/angular/projects/ui-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-amplify/ui-angular",
"version": "2.3.9",
"version": "2.3.10",
"scripts": {
"build": "yarn --cwd ../../ build",
"dev": "yarn --cwd ../../ dev",
Expand All @@ -19,7 +19,7 @@
},
"dependencies": {
"@aws-amplify/ui-components": "^1.7.0",
"@aws-amplify/ui": "3.6.2",
"@aws-amplify/ui": "3.6.3",
"@stencil/core": "2.8.0",
"nanoid": "3.1.31",
"qrcode": "1.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Feature: Sign In with Username
Then I see "Sign out"

@angular @react @vue
Scenario: Sign in with confirmed credentials then sign out
Scenario: Sign in with confirmed credentials, reload, sign out, then sign in again
When I type my "username" with status "CONFIRMED"
And I type my password
And I click the "Sign in" button
Expand All @@ -43,6 +43,23 @@ Feature: Sign In with Username
Then I see "Sign out"
And I click the "Sign out" button
Then I see "Sign in"
And I type my "username" with status "CONFIRMED"
And I type my password
And I click the "Sign in" button
Then I see "Sign out"

@angular @react @vue
Scenario: Sign in with confirmed credentials, sign out, then sign in again
When I type my "username" with status "CONFIRMED"
And I type my password
And I click the "Sign in" button
Then I see "Sign out"
And I click the "Sign out" button
Then I see "Sign in"
And I type my "username" with status "CONFIRMED"
And I type my password
And I click the "Sign in" button
Then I see "Sign out"

# FORCE_CHANGE_PASSWORD tests are skipped as the temporary passwords used for these
# test accounts will expire in Cognito.
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"stepDefinitions": "features"
},
"devDependencies": {
"@aws-amplify/ui": "^3.6.2",
"@aws-amplify/ui": "^3.6.3",
"aws-crt": "^1.10.6",
"@testing-library/cypress": "^7.0.6",
"@types/cypress-cucumber-preprocessor": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"extends": ["plugin:react-hooks/recommended"],
"rules": {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn"
"react-hooks/exhaustive-deps": "error"
},
"parserOptions": {
"ecmaVersion": "latest",
Expand Down
17 changes: 17 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# @aws-amplify/ui-react

## 2.15.3

### Patch Changes

- [#1681](https://github.com/aws-amplify/amplify-ui/pull/1681) [`7beda1ea2`](https://github.com/aws-amplify/amplify-ui/commit/7beda1ea2e28f5de4beefa50f2032cef3e4870e1) Thanks [@jacoblogan](https://github.com/jacoblogan)! - Remove hygen

* [#1666](https://github.com/aws-amplify/amplify-ui/pull/1666) [`ef5a70817`](https://github.com/aws-amplify/amplify-ui/commit/ef5a708170ff2b177e79a5e2d8c6ea2645ee453a) Thanks [@calebpollman](https://github.com/calebpollman)! - chore(ui-react): updates to allow eslint react-hooks/rules-of-hooks set to error
- update eslint 'rules-of-hooks/exhaustive-deps' from 'warning' to 'error'
- turn linting on for entire ui-react package
- add missing or update dep arrays as needed to satisfy 'rules-of-hooks/exhaustive-deps'
- add DefaultFooter component in SignIn
- add DefaultHeader component in ConfirmSignUp
- add DefaultComponents interface and remove PartialDeep and related files
- add useAuthenticatorService and error throw in useAuthenticator to prevent conditional hook calls
* Updated dependencies [[`34a19a541`](https://github.com/aws-amplify/amplify-ui/commit/34a19a541b4b733a6688a38a435423e9c607e918), [`16dced7de`](https://github.com/aws-amplify/amplify-ui/commit/16dced7de5edc73c064b7ec4bddbefe586e98393)]:
- @aws-amplify/ui@3.6.3

## 2.15.2

### Patch Changes
Expand Down
11 changes: 0 additions & 11 deletions packages/react/_templates/primitives/new/component.t

This file was deleted.

15 changes: 0 additions & 15 deletions packages/react/_templates/primitives/new/docs.t

This file was deleted.

4 changes: 0 additions & 4 deletions packages/react/_templates/primitives/new/exports.t

This file was deleted.

4 changes: 0 additions & 4 deletions packages/react/_templates/primitives/new/readme.t

This file was deleted.

8 changes: 0 additions & 8 deletions packages/react/_templates/primitives/new/tests.t

This file was deleted.

8 changes: 0 additions & 8 deletions packages/react/_templates/primitives/new/types.t

This file was deleted.

Loading

0 comments on commit eff5e83

Please sign in to comment.