diff --git a/.changeset/swift-kids-help.md b/.changeset/swift-kids-help.md new file mode 100644 index 00000000000..843669f5a3e --- /dev/null +++ b/.changeset/swift-kids-help.md @@ -0,0 +1,17 @@ +--- +"@aws-amplify/ui-vue": patch +"@aws-amplify/ui-react": minor +"@aws-amplify/ui-angular": patch +--- + +Angular: Add `amplify-dialcodeselect` class which contains the previous countrycodeselect styles +Vue: Add `amplify-dialcodeselect` class which contains the previous countrycodeselect styles +React: Added 'dialCode' versions of all 'countryCode' props so that users can begin migrating away from the deprecated `countryCode`. + +``` +countryCodeLabel => dialCodeLabel +countryCodeName => dialCodeName +onCountryCodeChange => onDialCodeChange +countryCodeRef => dialCodeRef +defaultCountryCode => defaultDialCode +``` diff --git a/amplify.yml b/amplify.yml index 2ee10e5ab4a..e42382b6558 100644 --- a/amplify.yml +++ b/amplify.yml @@ -11,6 +11,9 @@ applications: - export FLUTTER_HOME=${HOME}/sdks/flutter - git clone -b stable --depth 1 https://github.com/flutter/flutter.git ${FLUTTER_HOME} - export PATH="$PATH:${FLUTTER_HOME}/bin" + # Skip cypress binary installation, as it's unneeded for docs and often fails transiently + # https://docs.cypress.io/guides/references/advanced-installation#Skipping-installation + - export CYPRESS_INSTALL_BINARY=0 - (cd .. && yarn install && yarn build) build: commands: diff --git a/canary/package.json b/canary/package.json index 7fa38ecae99..3bc2ea3404b 100644 --- a/canary/package.json +++ b/canary/package.json @@ -5,7 +5,7 @@ "build": "yarn react && yarn vue && yarn angular", "clean": "rimraf ./**/yarn.lock && rimraf ./**/node_modules", "install": "yarn react:install && yarn vue:install && yarn angular:install", - "pull": "chmod +x ./environments/pull-environments.sh && ./environments/pull-environments.sh", + "pull": "./environments/pull-environments.sh", "script:install": "yarn --cwd script", "setup:next": "rm ../postcss.config.js && yarn script:install && yarn updatePackage", "test": "yarn --cwd e2e test", diff --git a/docs/package.json b/docs/package.json index 1dc792446ff..543b22f9c90 100644 --- a/docs/package.json +++ b/docs/package.json @@ -19,7 +19,7 @@ "test": "$_ run build" }, "dependencies": { - "@aws-amplify/ui-react": "3.4.0", + "@aws-amplify/ui-react": "3.4.1", "@cucumber/gherkin": "^19.0.3", "@cucumber/messages": "^16.0.1", "@docsearch/react": "3", diff --git a/docs/src/components/Fragment.tsx b/docs/src/components/Fragment.tsx index 62a1a2efb2c..e2686ecaeb3 100644 --- a/docs/src/components/Fragment.tsx +++ b/docs/src/components/Fragment.tsx @@ -21,7 +21,7 @@ export interface FragmentProps { * Note: if this is true, platforms={['web']} should be used to enable web content instead of platforms={['react', 'vue', 'angular']} */ useCommonWebContent?: boolean; - children: ({ platform: string }) => LoaderComponent; + children: ({ platform }: { platform: string }) => LoaderComponent; } const shouldRenderFragment = ( diff --git a/docs/src/pages/[platform]/components/phonenumberfield/PhoneNumberFieldPropControls.tsx b/docs/src/pages/[platform]/components/phonenumberfield/PhoneNumberFieldPropControls.tsx index 40a6bef28e8..7a57f130465 100644 --- a/docs/src/pages/[platform]/components/phonenumberfield/PhoneNumberFieldPropControls.tsx +++ b/docs/src/pages/[platform]/components/phonenumberfield/PhoneNumberFieldPropControls.tsx @@ -40,8 +40,8 @@ export interface PhoneNumberFieldPropControlsProps setValue: ( value: React.SetStateAction ) => void; - setDefaultCountryCode: ( - value: React.SetStateAction + setDefaultDialCode: ( + value: React.SetStateAction ) => void; } diff --git a/docs/src/pages/[platform]/components/phonenumberfield/demo.tsx b/docs/src/pages/[platform]/components/phonenumberfield/demo.tsx index a175e247e98..dae99e008fd 100644 --- a/docs/src/pages/[platform]/components/phonenumberfield/demo.tsx +++ b/docs/src/pages/[platform]/components/phonenumberfield/demo.tsx @@ -9,7 +9,7 @@ import { getPropString } from '../utils/getPropString'; const propsToCode = (props) => { return ( ` { }; const defaultPhoneNumberFieldProps: PhoneNumberFieldProps = { - defaultCountryCode: '+1', + defaultDialCode: '+1', label: 'Phone number', value: '', descriptiveText: 'Please enter your phone number', @@ -51,9 +51,9 @@ export const PhoneNumberFieldDemo = () => { phoneNumberFieldProps.setValue(event.target.value)} - defaultCountryCode={phoneNumberFieldProps.defaultCountryCode} - onCountryCodeChange={(event) => - phoneNumberFieldProps.setDefaultCountryCode(event.target.value) + defaultDialCode={phoneNumberFieldProps.defaultDialCode} + onDialCodeChange={(event) => + phoneNumberFieldProps.setDefaultDialCode(event.target.value) } label={phoneNumberFieldProps.label} labelHidden={phoneNumberFieldProps.labelHidden} diff --git a/docs/src/pages/[platform]/components/phonenumberfield/examples/AccessibilityExample.tsx b/docs/src/pages/[platform]/components/phonenumberfield/examples/AccessibilityExample.tsx index 4ba9084ddf4..038bf316511 100644 --- a/docs/src/pages/[platform]/components/phonenumberfield/examples/AccessibilityExample.tsx +++ b/docs/src/pages/[platform]/components/phonenumberfield/examples/AccessibilityExample.tsx @@ -4,8 +4,8 @@ export const AccessibilityExample = () => ( ); diff --git a/docs/src/pages/[platform]/components/phonenumberfield/examples/AutoCompleteExample.tsx b/docs/src/pages/[platform]/components/phonenumberfield/examples/AutoCompleteExample.tsx index 61c160c7331..6a4c3039ed0 100644 --- a/docs/src/pages/[platform]/components/phonenumberfield/examples/AutoCompleteExample.tsx +++ b/docs/src/pages/[platform]/components/phonenumberfield/examples/AutoCompleteExample.tsx @@ -14,7 +14,7 @@ export const AutoCompleteExample = () => { autoComplete="username" label="Phone Number" name="phone_number" - defaultCountryCode="+1" + defaultDialCode="+1" /> diff --git a/docs/src/pages/[platform]/components/phonenumberfield/examples/ClassNameExample.tsx b/docs/src/pages/[platform]/components/phonenumberfield/examples/ClassNameExample.tsx index 61d4253d361..d560ffa9079 100644 --- a/docs/src/pages/[platform]/components/phonenumberfield/examples/ClassNameExample.tsx +++ b/docs/src/pages/[platform]/components/phonenumberfield/examples/ClassNameExample.tsx @@ -3,7 +3,7 @@ import { PhoneNumberField } from '@aws-amplify/ui-react'; export const ClassNameExample = () => ( ); diff --git a/docs/src/pages/[platform]/components/phonenumberfield/examples/CountryCodeSelectExample.tsx b/docs/src/pages/[platform]/components/phonenumberfield/examples/CountryCodeSelectExample.tsx deleted file mode 100644 index cb5db8298cf..00000000000 --- a/docs/src/pages/[platform]/components/phonenumberfield/examples/CountryCodeSelectExample.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { PhoneNumberField } from '@aws-amplify/ui-react'; - -export const CountryCodeSelectExample = () => ( - - alert(`Country/Region Code changed to: ${e.target.value}`) - } - /> -); diff --git a/docs/src/pages/[platform]/components/phonenumberfield/examples/DefaultPhoneNumberFieldExample.tsx b/docs/src/pages/[platform]/components/phonenumberfield/examples/DefaultPhoneNumberFieldExample.tsx index 5f7684957a1..dfed3ecb95e 100644 --- a/docs/src/pages/[platform]/components/phonenumberfield/examples/DefaultPhoneNumberFieldExample.tsx +++ b/docs/src/pages/[platform]/components/phonenumberfield/examples/DefaultPhoneNumberFieldExample.tsx @@ -1,5 +1,5 @@ import { PhoneNumberField } from '@aws-amplify/ui-react'; export const DefaultPhoneNumberFieldExample = () => ( - + ); diff --git a/docs/src/pages/[platform]/components/phonenumberfield/examples/DescriptiveTextExample.tsx b/docs/src/pages/[platform]/components/phonenumberfield/examples/DescriptiveTextExample.tsx index b93640dc392..2c2037326fe 100644 --- a/docs/src/pages/[platform]/components/phonenumberfield/examples/DescriptiveTextExample.tsx +++ b/docs/src/pages/[platform]/components/phonenumberfield/examples/DescriptiveTextExample.tsx @@ -3,12 +3,12 @@ import { PhoneNumberField, Text } from '@aws-amplify/ui-react'; export const DescriptiveTextExample = () => ( <> ( + alert(`Dial Code changed to: ${e.target.value}`)} + /> +); diff --git a/docs/src/pages/[platform]/components/phonenumberfield/examples/PhoneNumberFieldThemeExample.tsx b/docs/src/pages/[platform]/components/phonenumberfield/examples/PhoneNumberFieldThemeExample.tsx index 068264a4b5f..e6c5a819286 100644 --- a/docs/src/pages/[platform]/components/phonenumberfield/examples/PhoneNumberFieldThemeExample.tsx +++ b/docs/src/pages/[platform]/components/phonenumberfield/examples/PhoneNumberFieldThemeExample.tsx @@ -21,7 +21,7 @@ export const PhoneNumberFieldThemeExample = () => ( diff --git a/docs/src/pages/[platform]/components/phonenumberfield/examples/RefsExample.tsx b/docs/src/pages/[platform]/components/phonenumberfield/examples/RefsExample.tsx index 4eef6255bb0..253d06aefcb 100644 --- a/docs/src/pages/[platform]/components/phonenumberfield/examples/RefsExample.tsx +++ b/docs/src/pages/[platform]/components/phonenumberfield/examples/RefsExample.tsx @@ -3,12 +3,12 @@ import * as React from 'react'; export const RefsExample = () => { const inputRef = React.useRef(null); - const countryCodeRef = React.useRef(null); + const dialCodeRef = React.useRef(null); const [inputRefValue, setInputRefValue] = React.useState(''); const onBlur = () => { - countryCodeRef.current.focus(); + dialCodeRef.current.focus(); setInputRefValue(inputRef.current.value); }; @@ -16,9 +16,9 @@ export const RefsExample = () => { `inputRef` value: {inputRefValue} diff --git a/docs/src/pages/[platform]/components/phonenumberfield/examples/RequiredFieldExample.tsx b/docs/src/pages/[platform]/components/phonenumberfield/examples/RequiredFieldExample.tsx index 3a61b87e9ee..3566ce21a60 100644 --- a/docs/src/pages/[platform]/components/phonenumberfield/examples/RequiredFieldExample.tsx +++ b/docs/src/pages/[platform]/components/phonenumberfield/examples/RequiredFieldExample.tsx @@ -11,7 +11,7 @@ export const RequiredFieldExample = () => { return ( { return ( { isRequired={true} /> Secondary phone number diff --git a/docs/src/pages/[platform]/components/phonenumberfield/examples/SizeExample.tsx b/docs/src/pages/[platform]/components/phonenumberfield/examples/SizeExample.tsx index f06a5197f13..b2b3cfe58c8 100644 --- a/docs/src/pages/[platform]/components/phonenumberfield/examples/SizeExample.tsx +++ b/docs/src/pages/[platform]/components/phonenumberfield/examples/SizeExample.tsx @@ -4,7 +4,7 @@ export const SizeExample = () => ( ( - + ( { return ( Phone Number: diff --git a/docs/src/pages/[platform]/components/phonenumberfield/examples/ValidationErrorExample.tsx b/docs/src/pages/[platform]/components/phonenumberfield/examples/ValidationErrorExample.tsx index 0606b88bb2b..3bf5904d6f7 100644 --- a/docs/src/pages/[platform]/components/phonenumberfield/examples/ValidationErrorExample.tsx +++ b/docs/src/pages/[platform]/components/phonenumberfield/examples/ValidationErrorExample.tsx @@ -2,7 +2,7 @@ import { PhoneNumberField } from '@aws-amplify/ui-react'; export const ValidationErrorExample = () => ( ( - - + + ); diff --git a/docs/src/pages/[platform]/components/phonenumberfield/examples/index.ts b/docs/src/pages/[platform]/components/phonenumberfield/examples/index.ts index 0b2d16a050f..7163df48572 100644 --- a/docs/src/pages/[platform]/components/phonenumberfield/examples/index.ts +++ b/docs/src/pages/[platform]/components/phonenumberfield/examples/index.ts @@ -1,7 +1,7 @@ export { AccessibilityExample } from './AccessibilityExample'; export { AutoCompleteExample } from './AutoCompleteExample'; export { ClassNameExample } from './ClassNameExample'; -export { CountryCodeSelectExample } from './CountryCodeSelectExample'; +export { DialCodeSelectExample } from './DialCodeSelectExample'; export { DefaultPhoneNumberFieldExample } from './DefaultPhoneNumberFieldExample'; export { DescriptiveTextExample } from './DescriptiveTextExample'; export { RefsExample } from './RefsExample'; diff --git a/docs/src/pages/[platform]/components/phonenumberfield/props-table.mdx b/docs/src/pages/[platform]/components/phonenumberfield/props-table.mdx index 48bf53503ab..5f07717c9cd 100644 --- a/docs/src/pages/[platform]/components/phonenumberfield/props-table.mdx +++ b/docs/src/pages/[platform]/components/phonenumberfield/props-table.mdx @@ -55,7 +55,7 @@ string string ``` - Sets a hidden and accessible label for the dial code selector + Sets a hidden and accessible label for the dial code selector To be removed with next major version release, please use dialCodeLabel @@ -65,7 +65,7 @@ string string ``` - Sets the name used when handling form submission for the dial code selector + Sets the name used when handling form submission for the dial code selector To be removed with next major version release, please use dialCodeName @@ -75,7 +75,7 @@ string React.Ref ``` - Forwarded ref for access to Country Code select DOM element + Forwarded ref for access to Country Code select DOM element To be removed with next major version release, please use dialCodeRef @@ -89,7 +89,17 @@ boolean - defaultCountryCode* + defaultCountryCode + +```jsx +string +``` + + Sets the default dial code that will be selected on initial render To be removed with next major version release, please use defaultDialCode + + + + defaultDialCode ```jsx string @@ -118,6 +128,16 @@ React.ReactNode Provides additional information needed to fill field (e.g. password requirements, etc.) + + dialCodeLabel + +```jsx +string +``` + + Sets a hidden and accessible label for the dial code selector + + dialCodeList @@ -128,6 +148,26 @@ string[] Accepts an array of dial codes (strings) used as options in the dial code selector + + dialCodeName + +```jsx +string +``` + + Sets the name used when handling form submission for the dial code selector + + + + dialCodeRef + +```jsx +React.Ref +``` + + Forwarded ref for access to Dial Code select DOM element + + enterKeyHint @@ -264,6 +304,16 @@ string ```jsx React.ChangeEventHandler ``` + + Handles change events for the dial code selector To be removed with next major version release, please use onDialCodeChange + + + + onDialCodeChange + +```jsx +React.ChangeEventHandler +``` Handles change events for the dial code selector diff --git a/docs/src/pages/[platform]/components/phonenumberfield/react.mdx b/docs/src/pages/[platform]/components/phonenumberfield/react.mdx index 824d8a0dd31..daf2e4a7cca 100644 --- a/docs/src/pages/[platform]/components/phonenumberfield/react.mdx +++ b/docs/src/pages/[platform]/components/phonenumberfield/react.mdx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { PhoneNumberField } from '@aws-amplify/ui-react'; +import { PhoneNumberField, Alert } from '@aws-amplify/ui-react'; import { PhoneNumberFieldDemo } from './demo'; import { Example, ExampleCode } from '@/components/Example'; import { Fragment } from '@/components/Fragment'; @@ -11,7 +11,7 @@ import ThemeExample from '@/components/ThemeExample.mdx'; import { AccessibilityExample, AutoCompleteExample, - CountryCodeSelectExample, + DialCodeSelectExample, ClassNameExample, DefaultPhoneNumberFieldExample, DescriptiveTextExample, @@ -32,8 +32,8 @@ import { ## Usage -Import the `PhoneNumberField` component and provide a `label` for accessibility/usability as well as a `defaultCountryCode` -which will auto-populate the country or region code select field. +Import the `PhoneNumberField` component and provide a `label` for accessibility/usability as well as a `defaultDialCode` +which will auto-populate the dial code select field. @@ -44,21 +44,26 @@ which will auto-populate the country or region code select field. -### Country or Region Code Select Properties +### Dial Code Select Properties -The country or region code selector can be customized by setting several properties when using the `PhoneNumberField` primitive. The custom -properties specific to the country or region code selector are the following: +All `countryCode` fields are being deprecated in favor of the new `dialCode` fields. If you still have instances of `defaultCountryCode`, +`countryCodeList`, `countryCodeName`, `countryCodeLabel`, and `onCountryCodeChange` then please update these to the new `dialCode` props listed below. -- `defaultCountryCode` (_required_): The default country or region code that will be selected upon render -- `dialCodeList`: An array of dial codes (strings) used as options in the country or region code selector -- `countryCodeName`: A name used when handling form submission for the country or region code selector -- `countryCodeLabel`: A hidden accessible label for the country or region code selector -- `onCountryCodeChange`: A custom change handler for the country or region code selector +The dial code selector can be customized by setting several properties when using the `PhoneNumberField` primitive. The custom +properties specific to the dial code selector are the following: + +- `defaultDialCode` (_required_): The default dial code that will be selected upon render +- `dialCodeList`: An array of dial codes (strings) used as options in the dial code selector +- `dialCodeName`: A name used when handling form submission for the dial code selector +- `dialCodeLabel`: A hidden accessible label for the dial code selector +- `onDialCodeChange`: A custom change handler for the dial code selector + +* If both `defaultDialCode`, `dialCodeList`, `dialCodeName`, `dialCodeLabel`, and `onDialCodeChange` and the corresponding `countryCode` prop are provided, then the value in the `dialCode` prop will be preferred. - + -```jsx file=./examples/CountryCodeSelectExample.tsx +```jsx file=./examples/DialCodeSelectExample.tsx ```` @@ -68,7 +73,7 @@ properties specific to the country or region code selector are the following: ### Autocomplete - supporting password managers Use the `autoComplete` prop to tell the browser how to populate the `PhoneNumberField`. By default, the `PhoneNumberField` primitive uses `tel-national` -as the `autoComplete` property for the text field and `tel-country-code` as the `autoComplete` property for the country or region code selector. +as the `autoComplete` property for the text field and `tel-country-code` as the `autoComplete` property for the dial code selector. If the `PhoneNumberField` primitive is intended to be used in a form that is compatible with most password managers, the `autoComplete` property should be set to `username` (see [Password Form Styles that Chromium Understands](https://www.chromium.org/developers/design-documents/form-styles-that-chromium-understands)). @@ -198,9 +203,9 @@ Use the `hasError` and `errorMessage` fields to mark a `PhoneNumberField` as hav {() => import('./../shared/forwardRefAlert.mdx')} -The standard `ref` prop will forward to the underlying `input` element, and the `countryCodeRef` prop forwards to the country or region code `select` element. +The standard `ref` prop will forward to the underlying `input` element, and the `dialCodeRef` prop forwards to the dial code `select` element. -The following is a contrived example demonstrating use of the `ref` and `countryCodeRef` props: +The following is a contrived example demonstrating use of the `ref` and `dialCodeRef` props: @@ -250,19 +255,19 @@ The following is a contrived example demonstrating use of the `ref` and `country ### Global styling To override styling on all `PhoneNumberField` primitives, you can set the Amplify CSS variables with the built-in `.amplify-phonenumberfield` -and `.amplify-countrycodeselect` class. +and `.amplify-dialcodeselect` class. ```css /* styles.css */ .amplify-phonenumberfield, -.amplify-countrycodeselect { +.amplify-dialcodeselect { --amplify-components-fieldcontrol-border-color: rebeccapurple; } ``` diff --git a/docs/src/pages/[platform]/components/phonenumberfield/usePhoneNumberFieldProps.ts b/docs/src/pages/[platform]/components/phonenumberfield/usePhoneNumberFieldProps.ts index 9b242e1a9f9..6447d911253 100644 --- a/docs/src/pages/[platform]/components/phonenumberfield/usePhoneNumberFieldProps.ts +++ b/docs/src/pages/[platform]/components/phonenumberfield/usePhoneNumberFieldProps.ts @@ -44,9 +44,9 @@ export const usePhoneNumberFieldProps: UsePhoneNumberFieldProps = ( const [value, setValue] = React.useState( initialValues.value ); - const [defaultCountryCode, setDefaultCountryCode] = React.useState< - PhoneNumberFieldProps['defaultCountryCode'] - >(initialValues.defaultCountryCode); + const [defaultDialCode, setDefaultDialCode] = React.useState< + PhoneNumberFieldProps['defaultDialCode'] + >(initialValues.defaultDialCode); React.useEffect(() => { demoState.set(PhoneNumberField.displayName, { @@ -61,7 +61,7 @@ export const usePhoneNumberFieldProps: UsePhoneNumberFieldProps = ( isDisabled, isReadOnly, value, - defaultCountryCode, + defaultDialCode, }); }, [ label, @@ -75,7 +75,7 @@ export const usePhoneNumberFieldProps: UsePhoneNumberFieldProps = ( isDisabled, isReadOnly, value, - defaultCountryCode, + defaultDialCode, ]); return React.useMemo( @@ -102,8 +102,8 @@ export const usePhoneNumberFieldProps: UsePhoneNumberFieldProps = ( setIsReadOnly, value, setValue, - defaultCountryCode, - setDefaultCountryCode, + defaultDialCode, + setDefaultDialCode, }), [ label, @@ -128,8 +128,8 @@ export const usePhoneNumberFieldProps: UsePhoneNumberFieldProps = ( setIsReadOnly, value, setValue, - defaultCountryCode, - setDefaultCountryCode, + defaultDialCode, + setDefaultDialCode, ] ); }; diff --git a/docs/src/pages/[platform]/components/rating/examples/RatingEmptyExample.tsx b/docs/src/pages/[platform]/components/rating/examples/RatingEmptyExample.tsx index 74e30d731a2..50cec393e35 100644 --- a/docs/src/pages/[platform]/components/rating/examples/RatingEmptyExample.tsx +++ b/docs/src/pages/[platform]/components/rating/examples/RatingEmptyExample.tsx @@ -2,10 +2,7 @@ import { Rating, Icon } from '@aws-amplify/ui-react'; const IconStarBorder = () => { return ( - + ); }; diff --git a/docs/src/pages/[platform]/components/rating/examples/RatingIconExample.tsx b/docs/src/pages/[platform]/components/rating/examples/RatingIconExample.tsx index 651fefbf0b8..845c113d550 100644 --- a/docs/src/pages/[platform]/components/rating/examples/RatingIconExample.tsx +++ b/docs/src/pages/[platform]/components/rating/examples/RatingIconExample.tsx @@ -1,12 +1,7 @@ import { Rating, Icon } from '@aws-amplify/ui-react'; const IconAdd = () => { - return ( - - ); + return ; }; export const RatingIconExample = () => { diff --git a/docs/src/pages/[platform]/getting-started/troubleshooting/troubleshooting.react.mdx b/docs/src/pages/[platform]/getting-started/troubleshooting/troubleshooting.react.mdx index 683793c9121..2aeb415a37f 100644 --- a/docs/src/pages/[platform]/getting-started/troubleshooting/troubleshooting.react.mdx +++ b/docs/src/pages/[platform]/getting-started/troubleshooting/troubleshooting.react.mdx @@ -89,6 +89,39 @@ export default defineConfig({ ... ``` +## Create React App + +When using [Geo components](../../connected-components/geo) and Create React App v5, users may experience the following error when rendering the `` component in a production build: +```bash +Uncaught ReferenceError: g is not defined +``` +The error is related to this [maplibre-gl issue](https://github.com/maplibre/maplibre-gl-js/issues/1011#issuecomment-1073112585) and surfaces due to the dropped support for Internet Explorer in `maplibre-gl` v2. To correct this error, you'll need to adjust your browser target for production to exclude Internet Explorer: + +**1.** In your `package.json` file of your Create React App, adjust the `browserslist.production` block from: +```json +"browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + ... +} +``` +to the following: +```json +"browserslist": { + "production": [ + "defaults", + "not ie 11" + ], + ... +} +``` +**2.** Rebuild your production application using `npx run build`. + +**3.** Run your production build using a tool like [serve](https://www.npmjs.com/package/serve) (`serve -s build`) and verify the `` component renders without error. + ## Jest As of v2.15.0 of `@aws-amplify/ui-react` which included the release of Geo components, users of the Jest testing framework may run into the following error when attempting to run tests: diff --git a/docs/src/styles/primitives/phoneNumberFieldStyles.css b/docs/src/styles/primitives/phoneNumberFieldStyles.css index 0531609d6a1..49bcab2f583 100644 --- a/docs/src/styles/primitives/phoneNumberFieldStyles.css +++ b/docs/src/styles/primitives/phoneNumberFieldStyles.css @@ -1,5 +1,6 @@ -.globally-styled-textfield.amplify-phonenumberfield { - --amplify-components-field-border-color: rebeccapurple; +.globally-styled-textfield.amplify-phonenumberfield, +.globally-styled-textfield.amplify-dialcodeselect { + --amplify-components-fieldcontrol-border-color: rebeccapurple; } .custom-phonenumberfield-class .amplify-input, .custom-phonenumberfield-class .amplify-select { diff --git a/environments/auth-with-all-attributes/amplify/hooks/README.md b/environments/auth-with-all-attributes/amplify/hooks/README.md deleted file mode 100644 index 8fb601eaebe..00000000000 --- a/environments/auth-with-all-attributes/amplify/hooks/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Command Hooks - -Command hooks can be used to run custom scripts upon Amplify CLI lifecycle events like pre-push, post-add-function, etc. - -To get started, add your script files based on the expected naming convention in this directory. - -Learn more about the script file naming convention, hook parameters, third party dependencies, and advanced configurations at https://docs.amplify.aws/cli/usage/command-hooks diff --git a/environments/auth-with-all-attributes/amplify/hooks/post-push.sh.sample b/environments/auth-with-all-attributes/amplify/hooks/post-push.sh.sample deleted file mode 100644 index 20df3f3ca6a..00000000000 --- a/environments/auth-with-all-attributes/amplify/hooks/post-push.sh.sample +++ /dev/null @@ -1,24 +0,0 @@ -# This is a sample hook script created by Amplify CLI. -# To start using this post-push hook please change the filename: -# post-push.sh.sample -> post-push.sh -# -# learn more: https://docs.amplify.aws/cli/usage/command-hooks - -if [ -z "$(which jq)" ]; then - echo "Please install jq to run the sample script." - exit 0 -fi - -parameters=`cat` -error=$(jq -r '.error // empty' <<< "$parameters") -data=$(jq -r '.data' <<< "$parameters") - -# -# Write code here: -# -if [ ! -z "$error" ]; then - echo "Amplify CLI emitted an error:" $(jq -r '.message' <<< "$error") - exit 0 -fi -echo "project root path:" $(pwd); -echo "Amplify CLI command:" $(jq -r '.amplify | .command' <<< "$data") \ No newline at end of file diff --git a/environments/auth-with-all-attributes/amplify/hooks/pre-push.js.sample b/environments/auth-with-all-attributes/amplify/hooks/pre-push.js.sample deleted file mode 100644 index 402e8f9ce36..00000000000 --- a/environments/auth-with-all-attributes/amplify/hooks/pre-push.js.sample +++ /dev/null @@ -1,27 +0,0 @@ -/** - * This is a sample hook script created by Amplify CLI. - * To start using this pre-push hook please change the filename: - * pre-push.js.sample -> pre-push.js - * - * learn more: https://docs.amplify.aws/cli/usage/command-hooks - */ - -/** - * @param data { { amplify: { environment: string, command: string, subCommand: string, argv: string[] } } } - * @param error { { message: string, stack: string } } - */ -const hookHandler = async (data, error) => { - // TODO write your hook handler here -}; - -const getParameters = async () => { - const fs = require("fs"); - return JSON.parse(fs.readFileSync(0, { encoding: "utf8" })); -}; - -getParameters() - .then((event) => hookHandler(event.data, event.error)) - .catch((err) => { - console.error(err); - process.exitCode = 1; - }); diff --git a/environments/auth-with-username/.gitignore b/environments/auth-with-username/.gitignore deleted file mode 100644 index 905889f72c6..00000000000 --- a/environments/auth-with-username/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ - - -#amplify-do-not-edit-begin -amplify/\#current-cloud-backend -amplify/.config/local-* -amplify/logs -amplify/mock-data -amplify/backend/amplify-meta.json -amplify/backend/awscloudformation -amplify/backend/.temp -build/ -dist/ -node_modules/ -aws-exports.js -awsconfiguration.json -amplifyconfiguration.json -amplifyconfiguration.dart -amplify-build-config.json -amplify-gradle-config.json -amplifytools.xcconfig -.secret-* -#amplify-do-not-edit-end diff --git a/environments/auth-with-username/README.md b/environments/auth-with-username/README.md deleted file mode 100644 index 70f9f4624c9..00000000000 --- a/environments/auth-with-username/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# Auth with Username - -This backend is configured with Amplify Admin UI: - -- Authentication - - - `Username` login mechanism - - ![SCreenshot of Username configuration](screenshot.png) - - - `Preferred Username` attribute - - (This was defaulted by Admin UI, not explicitly set) - - ![Screenshot of Preferred Username attribute](screenshot2.png) - -## Using this Backend - -External contributors can re-create this backend by running: - -```shell -amplify pull -``` - -Internal (Amplify UI team) contributors can use this backend directly by running: - -```shell -amplify pull --appId dbffpda9986dp --envName staging --yes -``` diff --git a/environments/auth-with-username/amplify/.config/project-config.json b/environments/auth-with-username/amplify/.config/project-config.json deleted file mode 100644 index 50864064fa3..00000000000 --- a/environments/auth-with-username/amplify/.config/project-config.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "providers": [ - "awscloudformation" - ], - "projectName": "authwithusername", - "version": "3.1", - "frontend": "javascript", - "javascript": { - "framework": "none", - "config": { - "SourceDir": "src", - "DistributionDir": "dist", - "BuildCommand": "npm run-script build", - "StartCommand": "npm run-script start" - } - } -} \ No newline at end of file diff --git a/environments/auth-with-username/amplify/backend/auth/authwithusername/authwithusername-cloudformation-template.yml b/environments/auth-with-username/amplify/backend/auth/authwithusername/authwithusername-cloudformation-template.yml deleted file mode 100644 index 9229f3eef6a..00000000000 --- a/environments/auth-with-username/amplify/backend/auth/authwithusername/authwithusername-cloudformation-template.yml +++ /dev/null @@ -1,447 +0,0 @@ - -AWSTemplateFormatVersion: 2010-09-09 - -Parameters: - env: - Type: String - authRoleArn: - Type: String - unauthRoleArn: - Type: String - - - - - identityPoolName: - Type: String - - - - allowUnauthenticatedIdentities: - Type: String - - resourceNameTruncated: - Type: String - - - userPoolName: - Type: String - - - - autoVerifiedAttributes: - Type: CommaDelimitedList - - mfaConfiguration: - Type: String - - - - mfaTypes: - Type: CommaDelimitedList - - smsAuthenticationMessage: - Type: String - - - smsVerificationMessage: - Type: String - - - emailVerificationSubject: - Type: String - - - emailVerificationMessage: - Type: String - - - - defaultPasswordPolicy: - Type: String - - - passwordPolicyMinLength: - Type: Number - - - passwordPolicyCharacters: - Type: CommaDelimitedList - - - requiredAttributes: - Type: CommaDelimitedList - - - aliasAttributes: - Type: CommaDelimitedList - - - userpoolClientGenerateSecret: - Type: String - - - userpoolClientRefreshTokenValidity: - Type: Number - - - userpoolClientWriteAttributes: - Type: CommaDelimitedList - - - userpoolClientReadAttributes: - Type: CommaDelimitedList - - userpoolClientLambdaRole: - Type: String - - - - userpoolClientSetAttributes: - Type: String - - sharedId: - Type: String - - - resourceName: - Type: String - - - authSelections: - Type: String - - - - - serviceName: - Type: String - - - useDefault: - Type: String - - - - userPoolGroups: - Type: String - - - userPoolGroupList: - Type: CommaDelimitedList - - - adminQueries: - Type: String - - - thirdPartyAuth: - Type: String - - - authProviders: - Type: CommaDelimitedList - - - usernameCaseSensitive: - Type: String - - - dependsOn: - Type: CommaDelimitedList - - - - hostedUI: - Type: String - -Conditions: - ShouldNotCreateEnvResources: !Equals [ !Ref env, NONE ] - - ShouldOutputAppClientSecrets: !Equals [!Ref userpoolClientGenerateSecret, true ] - - -Resources: - - - # BEGIN SNS ROLE RESOURCE - SNSRole: - # Created to allow the UserPool SMS Config to publish via the Simple Notification Service during MFA Process - Type: AWS::IAM::Role - Properties: - RoleName: !If [ShouldNotCreateEnvResources, 'authwic6e351b6_sns-role', !Join ['',[ 'sns', 'c6e351b6', !Select [3, !Split ['-', !Ref 'AWS::StackName']], '-', !Ref env]]] - AssumeRolePolicyDocument: - Version: "2012-10-17" - Statement: - - Sid: "" - Effect: "Allow" - Principal: - Service: "cognito-idp.amazonaws.com" - Action: - - "sts:AssumeRole" - Condition: - StringEquals: - sts:ExternalId: authwic6e351b6_role_external_id - Policies: - - - PolicyName: authwic6e351b6-sns-policy - PolicyDocument: - Version: "2012-10-17" - Statement: - - - Effect: "Allow" - Action: - - "sns:Publish" - Resource: "*" - # BEGIN USER POOL RESOURCES - UserPool: - # Created upon user selection - # Depends on SNS Role for Arn if MFA is enabled - Type: AWS::Cognito::UserPool - UpdateReplacePolicy: Retain - Properties: - UserPoolName: !If [ShouldNotCreateEnvResources, !Ref userPoolName, !Join ['',[!Ref userPoolName, '-', !Ref env]]] - - - UsernameConfiguration: - CaseSensitive: false - - Schema: - - - - Name: preferred_username - Required: true - Mutable: true - - - - - AutoVerifiedAttributes: - - - email - - - - EmailVerificationMessage: !Ref emailVerificationMessage - EmailVerificationSubject: !Ref emailVerificationSubject - - Policies: - PasswordPolicy: - MinimumLength: !Ref passwordPolicyMinLength - RequireLowercase: true - RequireNumbers: true - RequireSymbols: true - RequireUppercase: true - - - MfaConfiguration: !Ref mfaConfiguration - SmsVerificationMessage: !Ref smsVerificationMessage - SmsAuthenticationMessage: !Ref smsAuthenticationMessage - SmsConfiguration: - SnsCallerArn: !GetAtt SNSRole.Arn - ExternalId: authwic6e351b6_role_external_id - - - UserPoolClientWeb: - # Created provide application access to user pool - # Depends on UserPool for ID reference - Type: "AWS::Cognito::UserPoolClient" - Properties: - ClientName: authwic6e351b6_app_clientWeb - - RefreshTokenValidity: !Ref userpoolClientRefreshTokenValidity - UserPoolId: !Ref UserPool - DependsOn: UserPool - UserPoolClient: - # Created provide application access to user pool - # Depends on UserPool for ID reference - Type: "AWS::Cognito::UserPoolClient" - Properties: - ClientName: authwic6e351b6_app_client - - GenerateSecret: !Ref userpoolClientGenerateSecret - RefreshTokenValidity: !Ref userpoolClientRefreshTokenValidity - UserPoolId: !Ref UserPool - DependsOn: UserPool - # BEGIN USER POOL LAMBDA RESOURCES - UserPoolClientRole: - # Created to execute Lambda which gets userpool app client config values - Type: 'AWS::IAM::Role' - Properties: - RoleName: !If [ShouldNotCreateEnvResources, !Ref userpoolClientLambdaRole, !Join ['',['upClientLambdaRole', 'c6e351b6', !Select [3, !Split ['-', !Ref 'AWS::StackName']], '-', !Ref env]]] - AssumeRolePolicyDocument: - Version: '2012-10-17' - Statement: - - Effect: Allow - Principal: - Service: - - lambda.amazonaws.com - Action: - - 'sts:AssumeRole' - DependsOn: UserPoolClient - UserPoolClientLambda: - # Lambda which gets userpool app client config values - # Depends on UserPool for id - # Depends on UserPoolClientRole for role ARN - Type: 'AWS::Lambda::Function' - Properties: - Code: - ZipFile: !Join - - |+ - - - 'const response = require(''cfn-response'');' - - 'const aws = require(''aws-sdk'');' - - 'const identity = new aws.CognitoIdentityServiceProvider();' - - 'exports.handler = (event, context, callback) => {' - - ' if (event.RequestType == ''Delete'') { ' - - ' response.send(event, context, response.SUCCESS, {})' - - ' }' - - ' if (event.RequestType == ''Update'' || event.RequestType == ''Create'') {' - - ' const params = {' - - ' ClientId: event.ResourceProperties.clientId,' - - ' UserPoolId: event.ResourceProperties.userpoolId' - - ' };' - - ' identity.describeUserPoolClient(params).promise()' - - ' .then((res) => {' - - ' response.send(event, context, response.SUCCESS, {''appSecret'': res.UserPoolClient.ClientSecret});' - - ' })' - - ' .catch((err) => {' - - ' response.send(event, context, response.FAILED, {err});' - - ' });' - - ' }' - - '};' - Handler: index.handler - Runtime: nodejs12.x - Timeout: 300 - Role: !GetAtt - - UserPoolClientRole - - Arn - DependsOn: UserPoolClientRole - UserPoolClientLambdaPolicy: - # Sets userpool policy for the role that executes the Userpool Client Lambda - # Depends on UserPool for Arn - # Marked as depending on UserPoolClientRole for easier to understand CFN sequencing - Type: 'AWS::IAM::Policy' - Properties: - PolicyName: authwic6e351b6_userpoolclient_lambda_iam_policy - Roles: - - !Ref UserPoolClientRole - PolicyDocument: - Version: '2012-10-17' - Statement: - - Effect: Allow - Action: - - 'cognito-idp:DescribeUserPoolClient' - Resource: !GetAtt UserPool.Arn - DependsOn: UserPoolClientLambda - UserPoolClientLogPolicy: - # Sets log policy for the role that executes the Userpool Client Lambda - # Depends on UserPool for Arn - # Marked as depending on UserPoolClientLambdaPolicy for easier to understand CFN sequencing - Type: 'AWS::IAM::Policy' - Properties: - PolicyName: authwic6e351b6_userpoolclient_lambda_log_policy - Roles: - - !Ref UserPoolClientRole - PolicyDocument: - Version: 2012-10-17 - Statement: - - Effect: Allow - Action: - - 'logs:CreateLogGroup' - - 'logs:CreateLogStream' - - 'logs:PutLogEvents' - Resource: !Sub - - arn:aws:logs:${region}:${account}:log-group:/aws/lambda/${lambda}:log-stream:* - - { region: !Ref "AWS::Region", account: !Ref "AWS::AccountId", lambda: !Ref UserPoolClientLambda} - DependsOn: UserPoolClientLambdaPolicy - UserPoolClientInputs: - # Values passed to Userpool client Lambda - # Depends on UserPool for Id - # Depends on UserPoolClient for Id - # Marked as depending on UserPoolClientLambdaPolicy for easier to understand CFN sequencing - Type: 'Custom::LambdaCallout' - Properties: - ServiceToken: !GetAtt UserPoolClientLambda.Arn - clientId: !Ref UserPoolClient - userpoolId: !Ref UserPool - DependsOn: UserPoolClientLogPolicy - - - - - - - - # BEGIN IDENTITY POOL RESOURCES - - - IdentityPool: - # Always created - Type: AWS::Cognito::IdentityPool - Properties: - IdentityPoolName: !If [ShouldNotCreateEnvResources, 'testAuthIdentityPool', !Join ['',['testAuthIdentityPool', '__', !Ref env]]] - - CognitoIdentityProviders: - - ClientId: !Ref UserPoolClient - ProviderName: !Sub - - cognito-idp.${region}.amazonaws.com/${client} - - { region: !Ref "AWS::Region", client: !Ref UserPool} - - ClientId: !Ref UserPoolClientWeb - ProviderName: !Sub - - cognito-idp.${region}.amazonaws.com/${client} - - { region: !Ref "AWS::Region", client: !Ref UserPool} - - AllowUnauthenticatedIdentities: !Ref allowUnauthenticatedIdentities - - - DependsOn: UserPoolClientInputs - - - IdentityPoolRoleMap: - # Created to map Auth and Unauth roles to the identity pool - # Depends on Identity Pool for ID ref - Type: AWS::Cognito::IdentityPoolRoleAttachment - Properties: - IdentityPoolId: !Ref IdentityPool - Roles: - unauthenticated: !Ref unauthRoleArn - authenticated: !Ref authRoleArn - DependsOn: IdentityPool - - -Outputs : - - IdentityPoolId: - Value: !Ref 'IdentityPool' - Description: Id for the identity pool - IdentityPoolName: - Value: !GetAtt IdentityPool.Name - - - - - UserPoolId: - Value: !Ref 'UserPool' - Description: Id for the user pool - UserPoolArn: - Value: !GetAtt UserPool.Arn - Description: Arn for the user pool - UserPoolName: - Value: !Ref userPoolName - AppClientIDWeb: - Value: !Ref 'UserPoolClientWeb' - Description: The user pool app client id for web - AppClientID: - Value: !Ref 'UserPoolClient' - Description: The user pool app client id - AppClientSecret: - Value: !GetAtt UserPoolClientInputs.appSecret - Condition: ShouldOutputAppClientSecrets - - - - - - - - diff --git a/environments/auth-with-username/amplify/backend/auth/authwithusername/parameters.json b/environments/auth-with-username/amplify/backend/auth/authwithusername/parameters.json deleted file mode 100644 index fcaead92952..00000000000 --- a/environments/auth-with-username/amplify/backend/auth/authwithusername/parameters.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "identityPoolName": "testAuthIdentityPool", - "allowUnauthenticatedIdentities": false, - "resourceNameTruncated": "authwic6e351b6", - "userPoolName": "authwithusername", - "autoVerifiedAttributes": [ - "email" - ], - "mfaConfiguration": "OFF", - "mfaTypes": [ - "SMS Text Message" - ], - "smsAuthenticationMessage": "Your authentication code is {####}", - "smsVerificationMessage": "Your verification code is {####}", - "emailVerificationSubject": "Forgot password code: {####}", - "emailVerificationMessage": "Forgot password code: {####}", - "defaultPasswordPolicy": false, - "passwordPolicyMinLength": 8, - "passwordPolicyCharacters": [ - "Requires Lowercase", - "Requires Numbers", - "Requires Symbols", - "Requires Uppercase" - ], - "requiredAttributes": [ - "preferred_username" - ], - "aliasAttributes": [], - "userpoolClientGenerateSecret": false, - "userpoolClientRefreshTokenValidity": 30, - "userpoolClientWriteAttributes": [], - "userpoolClientReadAttributes": [], - "userpoolClientLambdaRole": "authwic6e351b6_userpoolclient_lambda_role", - "userpoolClientSetAttributes": false, - "sharedId": "c6e351b6", - "resourceName": "authwithusername", - "authSelections": "identityPoolAndUserPool", - "authRoleArn": { - "Fn::GetAtt": [ - "AuthRole", - "Arn" - ] - }, - "unauthRoleArn": { - "Fn::GetAtt": [ - "UnauthRole", - "Arn" - ] - }, - "serviceName": "Cognito", - "useDefault": "manual", - "userPoolGroups": false, - "userPoolGroupList": [], - "adminQueries": false, - "thirdPartyAuth": false, - "authProviders": [], - "usernameCaseSensitive": false, - "dependsOn": [], - "hostedUI": false -} \ No newline at end of file diff --git a/environments/auth-with-username/amplify/backend/backend-config.json b/environments/auth-with-username/amplify/backend/backend-config.json deleted file mode 100644 index 540aae9e3ac..00000000000 --- a/environments/auth-with-username/amplify/backend/backend-config.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "auth": { - "authwithusername": { - "service": "Cognito", - "providerPlugin": "awscloudformation", - "dependsOn": [], - "customAuth": false - } - } -} \ No newline at end of file diff --git a/environments/auth-with-username/amplify/backend/types/amplify-dependent-resources-ref.d.ts b/environments/auth-with-username/amplify/backend/types/amplify-dependent-resources-ref.d.ts deleted file mode 100644 index 2f8086defa3..00000000000 --- a/environments/auth-with-username/amplify/backend/types/amplify-dependent-resources-ref.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export type AmplifyDependentResourcesAttributes = { - auth: { - authwithusername: { - IdentityPoolId: 'string'; - IdentityPoolName: 'string'; - UserPoolId: 'string'; - UserPoolArn: 'string'; - UserPoolName: 'string'; - AppClientIDWeb: 'string'; - AppClientID: 'string'; - }; - }; -}; diff --git a/environments/auth-with-username/amplify/cli.json b/environments/auth-with-username/amplify/cli.json deleted file mode 100644 index 21a72743b60..00000000000 --- a/environments/auth-with-username/amplify/cli.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "features": { - "graphqltransformer": { - "addmissingownerfields": true, - "validatetypenamereservedwords": true, - "useexperimentalpipelinedtransformer": false, - "enableiterativegsiupdates": true, - "secondarykeyasgsi": true, - "skipoverridemutationinputtypes": true - }, - "frontend-ios": { - "enablexcodeintegration": true - }, - "auth": { - "enablecaseinsensitivity": true, - "useinclusiveterminology": true, - "breakcirculardependency": true - }, - "codegen": { - "useappsyncmodelgenplugin": true, - "usedocsgeneratorplugin": true, - "usetypesgeneratorplugin": true, - "cleangeneratedmodelsdirectory": true, - "retaincasestyle": true, - "addtimestampfields": true, - "handlelistnullabilitytransparently": true - }, - "appsync": { - "generategraphqlpermissions": true - }, - "project": { - "overrides": true - } - } -} \ No newline at end of file diff --git a/environments/auth-with-username/package.json b/environments/auth-with-username/package.json deleted file mode 100644 index 58ead5a5c37..00000000000 --- a/environments/auth-with-username/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "private": true, - "name": "auth-with-username-environment", - "version": "0.0.1", - "scripts": { - "pull": "amplify pull --appId dbffpda9986dp --envName staging" - } -} diff --git a/environments/auth-with-username/screenshot.png b/environments/auth-with-username/screenshot.png deleted file mode 100644 index ab49502691e..00000000000 Binary files a/environments/auth-with-username/screenshot.png and /dev/null differ diff --git a/environments/auth-with-username/screenshot2.png b/environments/auth-with-username/screenshot2.png deleted file mode 100644 index ce49af345bd..00000000000 Binary files a/environments/auth-with-username/screenshot2.png and /dev/null differ diff --git a/environments/adminui-auth-with-email-and-phone/.gitignore b/environments/auth/adminui-auth-with-email-and-phone/.gitignore similarity index 100% rename from environments/adminui-auth-with-email-and-phone/.gitignore rename to environments/auth/adminui-auth-with-email-and-phone/.gitignore diff --git a/environments/adminui-auth-with-email-and-phone/README.md b/environments/auth/adminui-auth-with-email-and-phone/README.md similarity index 100% rename from environments/adminui-auth-with-email-and-phone/README.md rename to environments/auth/adminui-auth-with-email-and-phone/README.md diff --git a/environments/adminui-auth-with-email-and-phone/amplify/.config/project-config.json b/environments/auth/adminui-auth-with-email-and-phone/amplify/.config/project-config.json similarity index 100% rename from environments/adminui-auth-with-email-and-phone/amplify/.config/project-config.json rename to environments/auth/adminui-auth-with-email-and-phone/amplify/.config/project-config.json diff --git a/environments/adminui-auth-with-email-and-phone/amplify/backend/auth/adminuiauthwithemailandphone/adminuiauthwithemailandphone-cloudformation-template.yml b/environments/auth/adminui-auth-with-email-and-phone/amplify/backend/auth/adminuiauthwithemailandphone/adminuiauthwithemailandphone-cloudformation-template.yml similarity index 100% rename from environments/adminui-auth-with-email-and-phone/amplify/backend/auth/adminuiauthwithemailandphone/adminuiauthwithemailandphone-cloudformation-template.yml rename to environments/auth/adminui-auth-with-email-and-phone/amplify/backend/auth/adminuiauthwithemailandphone/adminuiauthwithemailandphone-cloudformation-template.yml diff --git a/environments/adminui-auth-with-email-and-phone/amplify/backend/auth/adminuiauthwithemailandphone/parameters.json b/environments/auth/adminui-auth-with-email-and-phone/amplify/backend/auth/adminuiauthwithemailandphone/parameters.json similarity index 100% rename from environments/adminui-auth-with-email-and-phone/amplify/backend/auth/adminuiauthwithemailandphone/parameters.json rename to environments/auth/adminui-auth-with-email-and-phone/amplify/backend/auth/adminuiauthwithemailandphone/parameters.json diff --git a/environments/adminui-auth-with-email-and-phone/amplify/backend/backend-config.json b/environments/auth/adminui-auth-with-email-and-phone/amplify/backend/backend-config.json similarity index 100% rename from environments/adminui-auth-with-email-and-phone/amplify/backend/backend-config.json rename to environments/auth/adminui-auth-with-email-and-phone/amplify/backend/backend-config.json diff --git a/environments/action-hooks/amplify/backend/tags.json b/environments/auth/adminui-auth-with-email-and-phone/amplify/backend/tags.json similarity index 100% rename from environments/action-hooks/amplify/backend/tags.json rename to environments/auth/adminui-auth-with-email-and-phone/amplify/backend/tags.json diff --git a/environments/adminui-auth-with-email-and-phone/amplify/backend/types/amplify-dependent-resources-ref.d.ts b/environments/auth/adminui-auth-with-email-and-phone/amplify/backend/types/amplify-dependent-resources-ref.d.ts similarity index 100% rename from environments/adminui-auth-with-email-and-phone/amplify/backend/types/amplify-dependent-resources-ref.d.ts rename to environments/auth/adminui-auth-with-email-and-phone/amplify/backend/types/amplify-dependent-resources-ref.d.ts diff --git a/environments/adminui-auth-with-email-and-phone/amplify/cli.json b/environments/auth/adminui-auth-with-email-and-phone/amplify/cli.json similarity index 100% rename from environments/adminui-auth-with-email-and-phone/amplify/cli.json rename to environments/auth/adminui-auth-with-email-and-phone/amplify/cli.json diff --git a/environments/adminui-auth-with-email-and-phone/package.json b/environments/auth/adminui-auth-with-email-and-phone/package.json similarity index 100% rename from environments/adminui-auth-with-email-and-phone/package.json rename to environments/auth/adminui-auth-with-email-and-phone/package.json diff --git a/environments/adminui-auth-with-email-and-phone/screenshot.png b/environments/auth/adminui-auth-with-email-and-phone/screenshot.png similarity index 100% rename from environments/adminui-auth-with-email-and-phone/screenshot.png rename to environments/auth/adminui-auth-with-email-and-phone/screenshot.png diff --git a/environments/adminui-auth-with-totp-mfa/.gitignore b/environments/auth/adminui-auth-with-totp-mfa/.gitignore similarity index 100% rename from environments/adminui-auth-with-totp-mfa/.gitignore rename to environments/auth/adminui-auth-with-totp-mfa/.gitignore diff --git a/environments/adminui-auth-with-totp-mfa/.vscode/settings.json b/environments/auth/adminui-auth-with-totp-mfa/.vscode/settings.json similarity index 100% rename from environments/adminui-auth-with-totp-mfa/.vscode/settings.json rename to environments/auth/adminui-auth-with-totp-mfa/.vscode/settings.json diff --git a/environments/adminui-auth-with-totp-mfa/README.md b/environments/auth/adminui-auth-with-totp-mfa/README.md similarity index 100% rename from environments/adminui-auth-with-totp-mfa/README.md rename to environments/auth/adminui-auth-with-totp-mfa/README.md diff --git a/environments/adminui-auth-with-totp-mfa/amplify/.config/project-config.json b/environments/auth/adminui-auth-with-totp-mfa/amplify/.config/project-config.json similarity index 100% rename from environments/adminui-auth-with-totp-mfa/amplify/.config/project-config.json rename to environments/auth/adminui-auth-with-totp-mfa/amplify/.config/project-config.json diff --git a/environments/adminui-auth-with-totp-mfa/amplify/backend/auth/adminuiauthwithtotpmfa/adminuiauthwithtotpmfa-cloudformation-template.yml b/environments/auth/adminui-auth-with-totp-mfa/amplify/backend/auth/adminuiauthwithtotpmfa/adminuiauthwithtotpmfa-cloudformation-template.yml similarity index 100% rename from environments/adminui-auth-with-totp-mfa/amplify/backend/auth/adminuiauthwithtotpmfa/adminuiauthwithtotpmfa-cloudformation-template.yml rename to environments/auth/adminui-auth-with-totp-mfa/amplify/backend/auth/adminuiauthwithtotpmfa/adminuiauthwithtotpmfa-cloudformation-template.yml diff --git a/environments/adminui-auth-with-totp-mfa/amplify/backend/auth/adminuiauthwithtotpmfa/parameters.json b/environments/auth/adminui-auth-with-totp-mfa/amplify/backend/auth/adminuiauthwithtotpmfa/parameters.json similarity index 100% rename from environments/adminui-auth-with-totp-mfa/amplify/backend/auth/adminuiauthwithtotpmfa/parameters.json rename to environments/auth/adminui-auth-with-totp-mfa/amplify/backend/auth/adminuiauthwithtotpmfa/parameters.json diff --git a/environments/adminui-auth-with-totp-mfa/amplify/backend/backend-config.json b/environments/auth/adminui-auth-with-totp-mfa/amplify/backend/backend-config.json similarity index 100% rename from environments/adminui-auth-with-totp-mfa/amplify/backend/backend-config.json rename to environments/auth/adminui-auth-with-totp-mfa/amplify/backend/backend-config.json diff --git a/environments/adminui-auth-with-email-and-phone/amplify/backend/tags.json b/environments/auth/adminui-auth-with-totp-mfa/amplify/backend/tags.json similarity index 100% rename from environments/adminui-auth-with-email-and-phone/amplify/backend/tags.json rename to environments/auth/adminui-auth-with-totp-mfa/amplify/backend/tags.json diff --git a/environments/adminui-auth-with-totp-mfa/amplify/backend/types/amplify-dependent-resources-ref.d.ts b/environments/auth/adminui-auth-with-totp-mfa/amplify/backend/types/amplify-dependent-resources-ref.d.ts similarity index 100% rename from environments/adminui-auth-with-totp-mfa/amplify/backend/types/amplify-dependent-resources-ref.d.ts rename to environments/auth/adminui-auth-with-totp-mfa/amplify/backend/types/amplify-dependent-resources-ref.d.ts diff --git a/environments/adminui-auth-with-totp-mfa/amplify/cli.json b/environments/auth/adminui-auth-with-totp-mfa/amplify/cli.json similarity index 100% rename from environments/adminui-auth-with-totp-mfa/amplify/cli.json rename to environments/auth/adminui-auth-with-totp-mfa/amplify/cli.json diff --git a/environments/adminui-auth-with-totp-mfa/package.json b/environments/auth/adminui-auth-with-totp-mfa/package.json similarity index 100% rename from environments/adminui-auth-with-totp-mfa/package.json rename to environments/auth/adminui-auth-with-totp-mfa/package.json diff --git a/environments/adminui-auth-with-totp-mfa/screenshot.png b/environments/auth/adminui-auth-with-totp-mfa/screenshot.png similarity index 100% rename from environments/adminui-auth-with-totp-mfa/screenshot.png rename to environments/auth/adminui-auth-with-totp-mfa/screenshot.png diff --git a/environments/auth-with-all-attributes/.gitignore b/environments/auth/auth-with-all-attributes/.gitignore similarity index 100% rename from environments/auth-with-all-attributes/.gitignore rename to environments/auth/auth-with-all-attributes/.gitignore diff --git a/environments/auth-with-all-attributes/README.md b/environments/auth/auth-with-all-attributes/README.md similarity index 100% rename from environments/auth-with-all-attributes/README.md rename to environments/auth/auth-with-all-attributes/README.md diff --git a/environments/auth-with-all-attributes/amplify/.config/project-config.json b/environments/auth/auth-with-all-attributes/amplify/.config/project-config.json similarity index 100% rename from environments/auth-with-all-attributes/amplify/.config/project-config.json rename to environments/auth/auth-with-all-attributes/amplify/.config/project-config.json diff --git a/environments/auth-with-all-attributes/amplify/README.md b/environments/auth/auth-with-all-attributes/amplify/README.md similarity index 100% rename from environments/auth-with-all-attributes/amplify/README.md rename to environments/auth/auth-with-all-attributes/amplify/README.md diff --git a/environments/auth-with-all-attributes/amplify/backend/auth/authwithallattributeb392cf29/authwithallattributeb392cf29-cloudformation-template.yml b/environments/auth/auth-with-all-attributes/amplify/backend/auth/authwithallattributeb392cf29/authwithallattributeb392cf29-cloudformation-template.yml similarity index 100% rename from environments/auth-with-all-attributes/amplify/backend/auth/authwithallattributeb392cf29/authwithallattributeb392cf29-cloudformation-template.yml rename to environments/auth/auth-with-all-attributes/amplify/backend/auth/authwithallattributeb392cf29/authwithallattributeb392cf29-cloudformation-template.yml diff --git a/environments/auth-with-all-attributes/amplify/backend/auth/authwithallattributeb392cf29/parameters.json b/environments/auth/auth-with-all-attributes/amplify/backend/auth/authwithallattributeb392cf29/parameters.json similarity index 100% rename from environments/auth-with-all-attributes/amplify/backend/auth/authwithallattributeb392cf29/parameters.json rename to environments/auth/auth-with-all-attributes/amplify/backend/auth/authwithallattributeb392cf29/parameters.json diff --git a/environments/auth-with-all-attributes/amplify/backend/backend-config.json b/environments/auth/auth-with-all-attributes/amplify/backend/backend-config.json similarity index 100% rename from environments/auth-with-all-attributes/amplify/backend/backend-config.json rename to environments/auth/auth-with-all-attributes/amplify/backend/backend-config.json diff --git a/environments/adminui-auth-with-totp-mfa/amplify/backend/tags.json b/environments/auth/auth-with-all-attributes/amplify/backend/tags.json similarity index 100% rename from environments/adminui-auth-with-totp-mfa/amplify/backend/tags.json rename to environments/auth/auth-with-all-attributes/amplify/backend/tags.json diff --git a/environments/auth-with-all-attributes/amplify/backend/types/amplify-dependent-resources-ref.d.ts b/environments/auth/auth-with-all-attributes/amplify/backend/types/amplify-dependent-resources-ref.d.ts similarity index 100% rename from environments/auth-with-all-attributes/amplify/backend/types/amplify-dependent-resources-ref.d.ts rename to environments/auth/auth-with-all-attributes/amplify/backend/types/amplify-dependent-resources-ref.d.ts diff --git a/environments/auth-with-all-attributes/amplify/cli.json b/environments/auth/auth-with-all-attributes/amplify/cli.json similarity index 100% rename from environments/auth-with-all-attributes/amplify/cli.json rename to environments/auth/auth-with-all-attributes/amplify/cli.json diff --git a/environments/auth-with-all-attributes/package.json b/environments/auth/auth-with-all-attributes/package.json similarity index 100% rename from environments/auth-with-all-attributes/package.json rename to environments/auth/auth-with-all-attributes/package.json diff --git a/environments/auth-with-email-and-custom-attributes/.gitignore b/environments/auth/auth-with-email-and-custom-attributes/.gitignore similarity index 100% rename from environments/auth-with-email-and-custom-attributes/.gitignore rename to environments/auth/auth-with-email-and-custom-attributes/.gitignore diff --git a/environments/auth-with-email-and-custom-attributes/README.md b/environments/auth/auth-with-email-and-custom-attributes/README.md similarity index 100% rename from environments/auth-with-email-and-custom-attributes/README.md rename to environments/auth/auth-with-email-and-custom-attributes/README.md diff --git a/environments/auth-with-email-and-custom-attributes/amplify/.config/project-config.json b/environments/auth/auth-with-email-and-custom-attributes/amplify/.config/project-config.json similarity index 100% rename from environments/auth-with-email-and-custom-attributes/amplify/.config/project-config.json rename to environments/auth/auth-with-email-and-custom-attributes/amplify/.config/project-config.json diff --git a/environments/auth-with-email-and-custom-attributes/amplify/backend/auth/authwithemailandcustomattributes/authwithemailandcustomattributes-cloudformation-template.yml b/environments/auth/auth-with-email-and-custom-attributes/amplify/backend/auth/authwithemailandcustomattributes/authwithemailandcustomattributes-cloudformation-template.yml similarity index 100% rename from environments/auth-with-email-and-custom-attributes/amplify/backend/auth/authwithemailandcustomattributes/authwithemailandcustomattributes-cloudformation-template.yml rename to environments/auth/auth-with-email-and-custom-attributes/amplify/backend/auth/authwithemailandcustomattributes/authwithemailandcustomattributes-cloudformation-template.yml diff --git a/environments/auth-with-email-and-custom-attributes/amplify/backend/auth/authwithemailandcustomattributes/parameters.json b/environments/auth/auth-with-email-and-custom-attributes/amplify/backend/auth/authwithemailandcustomattributes/parameters.json similarity index 100% rename from environments/auth-with-email-and-custom-attributes/amplify/backend/auth/authwithemailandcustomattributes/parameters.json rename to environments/auth/auth-with-email-and-custom-attributes/amplify/backend/auth/authwithemailandcustomattributes/parameters.json diff --git a/environments/auth-with-email-and-custom-attributes/amplify/backend/backend-config.json b/environments/auth/auth-with-email-and-custom-attributes/amplify/backend/backend-config.json similarity index 100% rename from environments/auth-with-email-and-custom-attributes/amplify/backend/backend-config.json rename to environments/auth/auth-with-email-and-custom-attributes/amplify/backend/backend-config.json diff --git a/environments/auth-with-all-attributes/amplify/backend/tags.json b/environments/auth/auth-with-email-and-custom-attributes/amplify/backend/tags.json similarity index 100% rename from environments/auth-with-all-attributes/amplify/backend/tags.json rename to environments/auth/auth-with-email-and-custom-attributes/amplify/backend/tags.json diff --git a/environments/auth-with-email-and-custom-attributes/amplify/backend/types/amplify-dependent-resources-ref.d.ts b/environments/auth/auth-with-email-and-custom-attributes/amplify/backend/types/amplify-dependent-resources-ref.d.ts similarity index 100% rename from environments/auth-with-email-and-custom-attributes/amplify/backend/types/amplify-dependent-resources-ref.d.ts rename to environments/auth/auth-with-email-and-custom-attributes/amplify/backend/types/amplify-dependent-resources-ref.d.ts diff --git a/environments/auth-with-email-and-custom-attributes/amplify/cli.json b/environments/auth/auth-with-email-and-custom-attributes/amplify/cli.json similarity index 100% rename from environments/auth-with-email-and-custom-attributes/amplify/cli.json rename to environments/auth/auth-with-email-and-custom-attributes/amplify/cli.json diff --git a/environments/auth-with-email-and-custom-attributes/package.json b/environments/auth/auth-with-email-and-custom-attributes/package.json similarity index 100% rename from environments/auth-with-email-and-custom-attributes/package.json rename to environments/auth/auth-with-email-and-custom-attributes/package.json diff --git a/environments/auth-with-email-lambda-signup-trigger/.gitignore b/environments/auth/auth-with-email-lambda-signup-trigger/.gitignore similarity index 100% rename from environments/auth-with-email-lambda-signup-trigger/.gitignore rename to environments/auth/auth-with-email-lambda-signup-trigger/.gitignore diff --git a/environments/auth-with-email-lambda-signup-trigger/.vscode/settings.json b/environments/auth/auth-with-email-lambda-signup-trigger/.vscode/settings.json similarity index 100% rename from environments/auth-with-email-lambda-signup-trigger/.vscode/settings.json rename to environments/auth/auth-with-email-lambda-signup-trigger/.vscode/settings.json diff --git a/environments/auth-with-email-lambda-signup-trigger/README.md b/environments/auth/auth-with-email-lambda-signup-trigger/README.md similarity index 100% rename from environments/auth-with-email-lambda-signup-trigger/README.md rename to environments/auth/auth-with-email-lambda-signup-trigger/README.md diff --git a/environments/auth-with-email-lambda-signup-trigger/amplify/.config/project-config.json b/environments/auth/auth-with-email-lambda-signup-trigger/amplify/.config/project-config.json similarity index 100% rename from environments/auth-with-email-lambda-signup-trigger/amplify/.config/project-config.json rename to environments/auth/auth-with-email-lambda-signup-trigger/amplify/.config/project-config.json diff --git a/environments/auth-with-email-lambda-signup-trigger/amplify/backend/auth/authwithemaillambdasignuptrigger/authwithemaillambdasignuptrigger-cloudformation-template.yml b/environments/auth/auth-with-email-lambda-signup-trigger/amplify/backend/auth/authwithemaillambdasignuptrigger/authwithemaillambdasignuptrigger-cloudformation-template.yml similarity index 100% rename from environments/auth-with-email-lambda-signup-trigger/amplify/backend/auth/authwithemaillambdasignuptrigger/authwithemaillambdasignuptrigger-cloudformation-template.yml rename to environments/auth/auth-with-email-lambda-signup-trigger/amplify/backend/auth/authwithemaillambdasignuptrigger/authwithemaillambdasignuptrigger-cloudformation-template.yml diff --git a/environments/auth-with-email-lambda-signup-trigger/amplify/backend/auth/authwithemaillambdasignuptrigger/parameters.json b/environments/auth/auth-with-email-lambda-signup-trigger/amplify/backend/auth/authwithemaillambdasignuptrigger/parameters.json similarity index 100% rename from environments/auth-with-email-lambda-signup-trigger/amplify/backend/auth/authwithemaillambdasignuptrigger/parameters.json rename to environments/auth/auth-with-email-lambda-signup-trigger/amplify/backend/auth/authwithemaillambdasignuptrigger/parameters.json diff --git a/environments/auth-with-email-lambda-signup-trigger/amplify/backend/backend-config.json b/environments/auth/auth-with-email-lambda-signup-trigger/amplify/backend/backend-config.json similarity index 100% rename from environments/auth-with-email-lambda-signup-trigger/amplify/backend/backend-config.json rename to environments/auth/auth-with-email-lambda-signup-trigger/amplify/backend/backend-config.json diff --git a/environments/auth-with-email-and-custom-attributes/amplify/backend/tags.json b/environments/auth/auth-with-email-lambda-signup-trigger/amplify/backend/tags.json similarity index 100% rename from environments/auth-with-email-and-custom-attributes/amplify/backend/tags.json rename to environments/auth/auth-with-email-lambda-signup-trigger/amplify/backend/tags.json diff --git a/environments/auth-with-email-lambda-signup-trigger/amplify/backend/types/amplify-dependent-resources-ref.d.ts b/environments/auth/auth-with-email-lambda-signup-trigger/amplify/backend/types/amplify-dependent-resources-ref.d.ts similarity index 100% rename from environments/auth-with-email-lambda-signup-trigger/amplify/backend/types/amplify-dependent-resources-ref.d.ts rename to environments/auth/auth-with-email-lambda-signup-trigger/amplify/backend/types/amplify-dependent-resources-ref.d.ts diff --git a/environments/auth-with-email-lambda-signup-trigger/amplify/cli.json b/environments/auth/auth-with-email-lambda-signup-trigger/amplify/cli.json similarity index 100% rename from environments/auth-with-email-lambda-signup-trigger/amplify/cli.json rename to environments/auth/auth-with-email-lambda-signup-trigger/amplify/cli.json diff --git a/environments/auth-with-email-lambda-signup-trigger/package.json b/environments/auth/auth-with-email-lambda-signup-trigger/package.json similarity index 100% rename from environments/auth-with-email-lambda-signup-trigger/package.json rename to environments/auth/auth-with-email-lambda-signup-trigger/package.json diff --git a/environments/auth-with-email-lambda-signup-trigger/screenshot.1.png b/environments/auth/auth-with-email-lambda-signup-trigger/screenshot.1.png similarity index 100% rename from environments/auth-with-email-lambda-signup-trigger/screenshot.1.png rename to environments/auth/auth-with-email-lambda-signup-trigger/screenshot.1.png diff --git a/environments/auth-with-email/.gitignore b/environments/auth/auth-with-email/.gitignore similarity index 100% rename from environments/auth-with-email/.gitignore rename to environments/auth/auth-with-email/.gitignore diff --git a/environments/auth-with-email/.vscode/settings.json b/environments/auth/auth-with-email/.vscode/settings.json similarity index 100% rename from environments/auth-with-email/.vscode/settings.json rename to environments/auth/auth-with-email/.vscode/settings.json diff --git a/environments/auth-with-email/README.md b/environments/auth/auth-with-email/README.md similarity index 100% rename from environments/auth-with-email/README.md rename to environments/auth/auth-with-email/README.md diff --git a/environments/auth-with-email/amplify/.config/project-config.json b/environments/auth/auth-with-email/amplify/.config/project-config.json similarity index 100% rename from environments/auth-with-email/amplify/.config/project-config.json rename to environments/auth/auth-with-email/amplify/.config/project-config.json diff --git a/environments/auth-with-email/amplify/backend/auth/authwithemail/authwithemail-cloudformation-template.yml b/environments/auth/auth-with-email/amplify/backend/auth/authwithemail/authwithemail-cloudformation-template.yml similarity index 100% rename from environments/auth-with-email/amplify/backend/auth/authwithemail/authwithemail-cloudformation-template.yml rename to environments/auth/auth-with-email/amplify/backend/auth/authwithemail/authwithemail-cloudformation-template.yml diff --git a/environments/auth-with-email/amplify/backend/auth/authwithemail/parameters.json b/environments/auth/auth-with-email/amplify/backend/auth/authwithemail/parameters.json similarity index 100% rename from environments/auth-with-email/amplify/backend/auth/authwithemail/parameters.json rename to environments/auth/auth-with-email/amplify/backend/auth/authwithemail/parameters.json diff --git a/environments/auth-with-email/amplify/backend/backend-config.json b/environments/auth/auth-with-email/amplify/backend/backend-config.json similarity index 100% rename from environments/auth-with-email/amplify/backend/backend-config.json rename to environments/auth/auth-with-email/amplify/backend/backend-config.json diff --git a/environments/auth-with-email-lambda-signup-trigger/amplify/backend/tags.json b/environments/auth/auth-with-email/amplify/backend/tags.json similarity index 100% rename from environments/auth-with-email-lambda-signup-trigger/amplify/backend/tags.json rename to environments/auth/auth-with-email/amplify/backend/tags.json diff --git a/environments/auth-with-email/amplify/backend/types/amplify-dependent-resources-ref.d.ts b/environments/auth/auth-with-email/amplify/backend/types/amplify-dependent-resources-ref.d.ts similarity index 100% rename from environments/auth-with-email/amplify/backend/types/amplify-dependent-resources-ref.d.ts rename to environments/auth/auth-with-email/amplify/backend/types/amplify-dependent-resources-ref.d.ts diff --git a/environments/auth-with-email/amplify/cli.json b/environments/auth/auth-with-email/amplify/cli.json similarity index 100% rename from environments/auth-with-email/amplify/cli.json rename to environments/auth/auth-with-email/amplify/cli.json diff --git a/environments/auth-with-email/package.json b/environments/auth/auth-with-email/package.json similarity index 100% rename from environments/auth-with-email/package.json rename to environments/auth/auth-with-email/package.json diff --git a/environments/auth-with-federated/.gitignore b/environments/auth/auth-with-federated/.gitignore similarity index 100% rename from environments/auth-with-federated/.gitignore rename to environments/auth/auth-with-federated/.gitignore diff --git a/environments/auth-with-federated/.vscode/settings.json b/environments/auth/auth-with-federated/.vscode/settings.json similarity index 100% rename from environments/auth-with-federated/.vscode/settings.json rename to environments/auth/auth-with-federated/.vscode/settings.json diff --git a/environments/auth-with-federated/README.md b/environments/auth/auth-with-federated/README.md similarity index 100% rename from environments/auth-with-federated/README.md rename to environments/auth/auth-with-federated/README.md diff --git a/environments/auth-with-federated/amplify/.config/project-config.json b/environments/auth/auth-with-federated/amplify/.config/project-config.json similarity index 100% rename from environments/auth-with-federated/amplify/.config/project-config.json rename to environments/auth/auth-with-federated/amplify/.config/project-config.json diff --git a/environments/auth-with-federated/amplify/backend/auth/authwithfederated/authwithfederated-cloudformation-template.yml b/environments/auth/auth-with-federated/amplify/backend/auth/authwithfederated/authwithfederated-cloudformation-template.yml similarity index 100% rename from environments/auth-with-federated/amplify/backend/auth/authwithfederated/authwithfederated-cloudformation-template.yml rename to environments/auth/auth-with-federated/amplify/backend/auth/authwithfederated/authwithfederated-cloudformation-template.yml diff --git a/environments/auth-with-federated/amplify/backend/auth/authwithfederated/parameters.json b/environments/auth/auth-with-federated/amplify/backend/auth/authwithfederated/parameters.json similarity index 100% rename from environments/auth-with-federated/amplify/backend/auth/authwithfederated/parameters.json rename to environments/auth/auth-with-federated/amplify/backend/auth/authwithfederated/parameters.json diff --git a/environments/auth-with-federated/amplify/backend/backend-config.json b/environments/auth/auth-with-federated/amplify/backend/backend-config.json similarity index 100% rename from environments/auth-with-federated/amplify/backend/backend-config.json rename to environments/auth/auth-with-federated/amplify/backend/backend-config.json diff --git a/environments/auth-with-email/amplify/backend/tags.json b/environments/auth/auth-with-federated/amplify/backend/tags.json similarity index 100% rename from environments/auth-with-email/amplify/backend/tags.json rename to environments/auth/auth-with-federated/amplify/backend/tags.json diff --git a/environments/auth-with-federated/amplify/backend/types/amplify-dependent-resources-ref.d.ts b/environments/auth/auth-with-federated/amplify/backend/types/amplify-dependent-resources-ref.d.ts similarity index 100% rename from environments/auth-with-federated/amplify/backend/types/amplify-dependent-resources-ref.d.ts rename to environments/auth/auth-with-federated/amplify/backend/types/amplify-dependent-resources-ref.d.ts diff --git a/environments/auth-with-federated/amplify/cli.json b/environments/auth/auth-with-federated/amplify/cli.json similarity index 100% rename from environments/auth-with-federated/amplify/cli.json rename to environments/auth/auth-with-federated/amplify/cli.json diff --git a/environments/auth-with-federated/package.json b/environments/auth/auth-with-federated/package.json similarity index 100% rename from environments/auth-with-federated/package.json rename to environments/auth/auth-with-federated/package.json diff --git a/environments/auth-with-multi-alias/.gitignore b/environments/auth/auth-with-multi-alias/.gitignore similarity index 100% rename from environments/auth-with-multi-alias/.gitignore rename to environments/auth/auth-with-multi-alias/.gitignore diff --git a/environments/auth-with-multi-alias/README.md b/environments/auth/auth-with-multi-alias/README.md similarity index 100% rename from environments/auth-with-multi-alias/README.md rename to environments/auth/auth-with-multi-alias/README.md diff --git a/environments/auth-with-multi-alias/amplify/.config/project-config.json b/environments/auth/auth-with-multi-alias/amplify/.config/project-config.json similarity index 100% rename from environments/auth-with-multi-alias/amplify/.config/project-config.json rename to environments/auth/auth-with-multi-alias/amplify/.config/project-config.json diff --git a/environments/auth-with-multi-alias/amplify/backend/auth/authwithmultialiascfa54f77cfa54f77/authwithmultialiascfa54f77cfa54f77-cloudformation-template.yml b/environments/auth/auth-with-multi-alias/amplify/backend/auth/authwithmultialiascfa54f77cfa54f77/authwithmultialiascfa54f77cfa54f77-cloudformation-template.yml similarity index 100% rename from environments/auth-with-multi-alias/amplify/backend/auth/authwithmultialiascfa54f77cfa54f77/authwithmultialiascfa54f77cfa54f77-cloudformation-template.yml rename to environments/auth/auth-with-multi-alias/amplify/backend/auth/authwithmultialiascfa54f77cfa54f77/authwithmultialiascfa54f77cfa54f77-cloudformation-template.yml diff --git a/environments/auth-with-multi-alias/amplify/backend/auth/authwithmultialiascfa54f77cfa54f77/parameters.json b/environments/auth/auth-with-multi-alias/amplify/backend/auth/authwithmultialiascfa54f77cfa54f77/parameters.json similarity index 100% rename from environments/auth-with-multi-alias/amplify/backend/auth/authwithmultialiascfa54f77cfa54f77/parameters.json rename to environments/auth/auth-with-multi-alias/amplify/backend/auth/authwithmultialiascfa54f77cfa54f77/parameters.json diff --git a/environments/auth-with-multi-alias/amplify/backend/backend-config.json b/environments/auth/auth-with-multi-alias/amplify/backend/backend-config.json similarity index 100% rename from environments/auth-with-multi-alias/amplify/backend/backend-config.json rename to environments/auth/auth-with-multi-alias/amplify/backend/backend-config.json diff --git a/environments/auth-with-federated/amplify/backend/tags.json b/environments/auth/auth-with-multi-alias/amplify/backend/tags.json similarity index 100% rename from environments/auth-with-federated/amplify/backend/tags.json rename to environments/auth/auth-with-multi-alias/amplify/backend/tags.json diff --git a/environments/auth-with-multi-alias/amplify/backend/types/amplify-dependent-resources-ref.d.ts b/environments/auth/auth-with-multi-alias/amplify/backend/types/amplify-dependent-resources-ref.d.ts similarity index 100% rename from environments/auth-with-multi-alias/amplify/backend/types/amplify-dependent-resources-ref.d.ts rename to environments/auth/auth-with-multi-alias/amplify/backend/types/amplify-dependent-resources-ref.d.ts diff --git a/environments/auth-with-multi-alias/amplify/cli.json b/environments/auth/auth-with-multi-alias/amplify/cli.json similarity index 100% rename from environments/auth-with-multi-alias/amplify/cli.json rename to environments/auth/auth-with-multi-alias/amplify/cli.json diff --git a/environments/auth-with-multi-alias/multi-alias-config.png b/environments/auth/auth-with-multi-alias/multi-alias-config.png similarity index 100% rename from environments/auth-with-multi-alias/multi-alias-config.png rename to environments/auth/auth-with-multi-alias/multi-alias-config.png diff --git a/environments/auth-with-multi-alias/package.json b/environments/auth/auth-with-multi-alias/package.json similarity index 100% rename from environments/auth-with-multi-alias/package.json rename to environments/auth/auth-with-multi-alias/package.json diff --git a/environments/auth-with-phone-and-sms-mfa/.gitignore b/environments/auth/auth-with-phone-and-sms-mfa/.gitignore similarity index 100% rename from environments/auth-with-phone-and-sms-mfa/.gitignore rename to environments/auth/auth-with-phone-and-sms-mfa/.gitignore diff --git a/environments/auth-with-phone-and-sms-mfa/.vscode/settings.json b/environments/auth/auth-with-phone-and-sms-mfa/.vscode/settings.json similarity index 100% rename from environments/auth-with-phone-and-sms-mfa/.vscode/settings.json rename to environments/auth/auth-with-phone-and-sms-mfa/.vscode/settings.json diff --git a/environments/auth-with-phone-and-sms-mfa/README.md b/environments/auth/auth-with-phone-and-sms-mfa/README.md similarity index 100% rename from environments/auth-with-phone-and-sms-mfa/README.md rename to environments/auth/auth-with-phone-and-sms-mfa/README.md diff --git a/environments/auth-with-phone-and-sms-mfa/amplify/.config/project-config.json b/environments/auth/auth-with-phone-and-sms-mfa/amplify/.config/project-config.json similarity index 100% rename from environments/auth-with-phone-and-sms-mfa/amplify/.config/project-config.json rename to environments/auth/auth-with-phone-and-sms-mfa/amplify/.config/project-config.json diff --git a/environments/auth-with-phone-and-sms-mfa/amplify/backend/auth/authwithphoneandsmsmfa/authwithphoneandsmsmfa-cloudformation-template.yml b/environments/auth/auth-with-phone-and-sms-mfa/amplify/backend/auth/authwithphoneandsmsmfa/authwithphoneandsmsmfa-cloudformation-template.yml similarity index 100% rename from environments/auth-with-phone-and-sms-mfa/amplify/backend/auth/authwithphoneandsmsmfa/authwithphoneandsmsmfa-cloudformation-template.yml rename to environments/auth/auth-with-phone-and-sms-mfa/amplify/backend/auth/authwithphoneandsmsmfa/authwithphoneandsmsmfa-cloudformation-template.yml diff --git a/environments/auth-with-phone-and-sms-mfa/amplify/backend/auth/authwithphoneandsmsmfa/parameters.json b/environments/auth/auth-with-phone-and-sms-mfa/amplify/backend/auth/authwithphoneandsmsmfa/parameters.json similarity index 100% rename from environments/auth-with-phone-and-sms-mfa/amplify/backend/auth/authwithphoneandsmsmfa/parameters.json rename to environments/auth/auth-with-phone-and-sms-mfa/amplify/backend/auth/authwithphoneandsmsmfa/parameters.json diff --git a/environments/auth-with-phone-and-sms-mfa/amplify/backend/backend-config.json b/environments/auth/auth-with-phone-and-sms-mfa/amplify/backend/backend-config.json similarity index 100% rename from environments/auth-with-phone-and-sms-mfa/amplify/backend/backend-config.json rename to environments/auth/auth-with-phone-and-sms-mfa/amplify/backend/backend-config.json diff --git a/environments/auth-with-multi-alias/amplify/backend/tags.json b/environments/auth/auth-with-phone-and-sms-mfa/amplify/backend/tags.json similarity index 100% rename from environments/auth-with-multi-alias/amplify/backend/tags.json rename to environments/auth/auth-with-phone-and-sms-mfa/amplify/backend/tags.json diff --git a/environments/auth-with-phone-and-sms-mfa/amplify/backend/types/amplify-dependent-resources-ref.d.ts b/environments/auth/auth-with-phone-and-sms-mfa/amplify/backend/types/amplify-dependent-resources-ref.d.ts similarity index 100% rename from environments/auth-with-phone-and-sms-mfa/amplify/backend/types/amplify-dependent-resources-ref.d.ts rename to environments/auth/auth-with-phone-and-sms-mfa/amplify/backend/types/amplify-dependent-resources-ref.d.ts diff --git a/environments/auth-with-phone-and-sms-mfa/amplify/cli.json b/environments/auth/auth-with-phone-and-sms-mfa/amplify/cli.json similarity index 100% rename from environments/auth-with-phone-and-sms-mfa/amplify/cli.json rename to environments/auth/auth-with-phone-and-sms-mfa/amplify/cli.json diff --git a/environments/auth-with-phone-and-sms-mfa/package.json b/environments/auth/auth-with-phone-and-sms-mfa/package.json similarity index 100% rename from environments/auth-with-phone-and-sms-mfa/package.json rename to environments/auth/auth-with-phone-and-sms-mfa/package.json diff --git a/environments/auth-with-phone-and-sms-mfa/screenshot-login.png b/environments/auth/auth-with-phone-and-sms-mfa/screenshot-login.png similarity index 100% rename from environments/auth-with-phone-and-sms-mfa/screenshot-login.png rename to environments/auth/auth-with-phone-and-sms-mfa/screenshot-login.png diff --git a/environments/auth-with-phone-and-sms-mfa/screenshot-signup.png b/environments/auth/auth-with-phone-and-sms-mfa/screenshot-signup.png similarity index 100% rename from environments/auth-with-phone-and-sms-mfa/screenshot-signup.png rename to environments/auth/auth-with-phone-and-sms-mfa/screenshot-signup.png diff --git a/environments/auth-with-phone-number/.gitignore b/environments/auth/auth-with-phone-number/.gitignore similarity index 100% rename from environments/auth-with-phone-number/.gitignore rename to environments/auth/auth-with-phone-number/.gitignore diff --git a/environments/auth-with-phone-number/.vscode/settings.json b/environments/auth/auth-with-phone-number/.vscode/settings.json similarity index 100% rename from environments/auth-with-phone-number/.vscode/settings.json rename to environments/auth/auth-with-phone-number/.vscode/settings.json diff --git a/environments/auth-with-phone-number/README.md b/environments/auth/auth-with-phone-number/README.md similarity index 100% rename from environments/auth-with-phone-number/README.md rename to environments/auth/auth-with-phone-number/README.md diff --git a/environments/auth-with-phone-number/amplify/.config/project-config.json b/environments/auth/auth-with-phone-number/amplify/.config/project-config.json similarity index 100% rename from environments/auth-with-phone-number/amplify/.config/project-config.json rename to environments/auth/auth-with-phone-number/amplify/.config/project-config.json diff --git a/environments/auth-with-phone-number/amplify/backend/auth/authwithphonenumber/authwithphonenumber-cloudformation-template.yml b/environments/auth/auth-with-phone-number/amplify/backend/auth/authwithphonenumber/authwithphonenumber-cloudformation-template.yml similarity index 100% rename from environments/auth-with-phone-number/amplify/backend/auth/authwithphonenumber/authwithphonenumber-cloudformation-template.yml rename to environments/auth/auth-with-phone-number/amplify/backend/auth/authwithphonenumber/authwithphonenumber-cloudformation-template.yml diff --git a/environments/auth-with-phone-number/amplify/backend/auth/authwithphonenumber/parameters.json b/environments/auth/auth-with-phone-number/amplify/backend/auth/authwithphonenumber/parameters.json similarity index 100% rename from environments/auth-with-phone-number/amplify/backend/auth/authwithphonenumber/parameters.json rename to environments/auth/auth-with-phone-number/amplify/backend/auth/authwithphonenumber/parameters.json diff --git a/environments/auth-with-phone-number/amplify/backend/backend-config.json b/environments/auth/auth-with-phone-number/amplify/backend/backend-config.json similarity index 100% rename from environments/auth-with-phone-number/amplify/backend/backend-config.json rename to environments/auth/auth-with-phone-number/amplify/backend/backend-config.json diff --git a/environments/auth-with-phone-and-sms-mfa/amplify/backend/tags.json b/environments/auth/auth-with-phone-number/amplify/backend/tags.json similarity index 100% rename from environments/auth-with-phone-and-sms-mfa/amplify/backend/tags.json rename to environments/auth/auth-with-phone-number/amplify/backend/tags.json diff --git a/environments/auth-with-phone-number/amplify/backend/types/amplify-dependent-resources-ref.d.ts b/environments/auth/auth-with-phone-number/amplify/backend/types/amplify-dependent-resources-ref.d.ts similarity index 100% rename from environments/auth-with-phone-number/amplify/backend/types/amplify-dependent-resources-ref.d.ts rename to environments/auth/auth-with-phone-number/amplify/backend/types/amplify-dependent-resources-ref.d.ts diff --git a/environments/auth-with-phone-number/amplify/cli.json b/environments/auth/auth-with-phone-number/amplify/cli.json similarity index 100% rename from environments/auth-with-phone-number/amplify/cli.json rename to environments/auth/auth-with-phone-number/amplify/cli.json diff --git a/environments/auth-with-phone-number/package.json b/environments/auth/auth-with-phone-number/package.json similarity index 100% rename from environments/auth-with-phone-number/package.json rename to environments/auth/auth-with-phone-number/package.json diff --git a/environments/auth-with-phone-number/screenshot-login.png b/environments/auth/auth-with-phone-number/screenshot-login.png similarity index 100% rename from environments/auth-with-phone-number/screenshot-login.png rename to environments/auth/auth-with-phone-number/screenshot-login.png diff --git a/environments/auth-with-phone-number/screenshot-signup.png b/environments/auth/auth-with-phone-number/screenshot-signup.png similarity index 100% rename from environments/auth-with-phone-number/screenshot-signup.png rename to environments/auth/auth-with-phone-number/screenshot-signup.png diff --git a/environments/auth-with-totp-and-sms-mfa/.gitignore b/environments/auth/auth-with-totp-and-sms-mfa/.gitignore similarity index 100% rename from environments/auth-with-totp-and-sms-mfa/.gitignore rename to environments/auth/auth-with-totp-and-sms-mfa/.gitignore diff --git a/environments/auth-with-totp-and-sms-mfa/.vscode/settings.json b/environments/auth/auth-with-totp-and-sms-mfa/.vscode/settings.json similarity index 100% rename from environments/auth-with-totp-and-sms-mfa/.vscode/settings.json rename to environments/auth/auth-with-totp-and-sms-mfa/.vscode/settings.json diff --git a/environments/auth-with-totp-and-sms-mfa/README.md b/environments/auth/auth-with-totp-and-sms-mfa/README.md similarity index 100% rename from environments/auth-with-totp-and-sms-mfa/README.md rename to environments/auth/auth-with-totp-and-sms-mfa/README.md diff --git a/environments/auth-with-totp-and-sms-mfa/amplify/.config/project-config.json b/environments/auth/auth-with-totp-and-sms-mfa/amplify/.config/project-config.json similarity index 100% rename from environments/auth-with-totp-and-sms-mfa/amplify/.config/project-config.json rename to environments/auth/auth-with-totp-and-sms-mfa/amplify/.config/project-config.json diff --git a/environments/auth-with-totp-and-sms-mfa/amplify/backend/auth/authwithtotpandsmsmf/parameters.json b/environments/auth/auth-with-totp-and-sms-mfa/amplify/backend/auth/authwithtotpandsmsmf/parameters.json similarity index 100% rename from environments/auth-with-totp-and-sms-mfa/amplify/backend/auth/authwithtotpandsmsmf/parameters.json rename to environments/auth/auth-with-totp-and-sms-mfa/amplify/backend/auth/authwithtotpandsmsmf/parameters.json diff --git a/environments/auth-with-totp-and-sms-mfa/amplify/backend/backend-config.json b/environments/auth/auth-with-totp-and-sms-mfa/amplify/backend/backend-config.json similarity index 100% rename from environments/auth-with-totp-and-sms-mfa/amplify/backend/backend-config.json rename to environments/auth/auth-with-totp-and-sms-mfa/amplify/backend/backend-config.json diff --git a/environments/auth-with-phone-number/amplify/backend/tags.json b/environments/auth/auth-with-totp-and-sms-mfa/amplify/backend/tags.json similarity index 100% rename from environments/auth-with-phone-number/amplify/backend/tags.json rename to environments/auth/auth-with-totp-and-sms-mfa/amplify/backend/tags.json diff --git a/environments/auth-with-totp-and-sms-mfa/amplify/backend/types/amplify-dependent-resources-ref.d.ts b/environments/auth/auth-with-totp-and-sms-mfa/amplify/backend/types/amplify-dependent-resources-ref.d.ts similarity index 100% rename from environments/auth-with-totp-and-sms-mfa/amplify/backend/types/amplify-dependent-resources-ref.d.ts rename to environments/auth/auth-with-totp-and-sms-mfa/amplify/backend/types/amplify-dependent-resources-ref.d.ts diff --git a/environments/auth-with-totp-and-sms-mfa/amplify/cli.json b/environments/auth/auth-with-totp-and-sms-mfa/amplify/cli.json similarity index 100% rename from environments/auth-with-totp-and-sms-mfa/amplify/cli.json rename to environments/auth/auth-with-totp-and-sms-mfa/amplify/cli.json diff --git a/environments/auth-with-totp-and-sms-mfa/package.json b/environments/auth/auth-with-totp-and-sms-mfa/package.json similarity index 100% rename from environments/auth-with-totp-and-sms-mfa/package.json rename to environments/auth/auth-with-totp-and-sms-mfa/package.json diff --git a/environments/auth-with-totp-and-sms-mfa/screenshot-mfa.png b/environments/auth/auth-with-totp-and-sms-mfa/screenshot-mfa.png similarity index 100% rename from environments/auth-with-totp-and-sms-mfa/screenshot-mfa.png rename to environments/auth/auth-with-totp-and-sms-mfa/screenshot-mfa.png diff --git a/environments/auth-with-totp-mfa/.gitignore b/environments/auth/auth-with-totp-mfa/.gitignore similarity index 100% rename from environments/auth-with-totp-mfa/.gitignore rename to environments/auth/auth-with-totp-mfa/.gitignore diff --git a/environments/auth-with-totp-mfa/.vscode/settings.json b/environments/auth/auth-with-totp-mfa/.vscode/settings.json similarity index 100% rename from environments/auth-with-totp-mfa/.vscode/settings.json rename to environments/auth/auth-with-totp-mfa/.vscode/settings.json diff --git a/environments/auth-with-totp-mfa/README.md b/environments/auth/auth-with-totp-mfa/README.md similarity index 100% rename from environments/auth-with-totp-mfa/README.md rename to environments/auth/auth-with-totp-mfa/README.md diff --git a/environments/auth-with-totp-mfa/amplify/.config/project-config.json b/environments/auth/auth-with-totp-mfa/amplify/.config/project-config.json similarity index 100% rename from environments/auth-with-totp-mfa/amplify/.config/project-config.json rename to environments/auth/auth-with-totp-mfa/amplify/.config/project-config.json diff --git a/environments/auth-with-totp-mfa/amplify/backend/auth/authwithtotpmfa/parameters.json b/environments/auth/auth-with-totp-mfa/amplify/backend/auth/authwithtotpmfa/parameters.json similarity index 100% rename from environments/auth-with-totp-mfa/amplify/backend/auth/authwithtotpmfa/parameters.json rename to environments/auth/auth-with-totp-mfa/amplify/backend/auth/authwithtotpmfa/parameters.json diff --git a/environments/auth-with-totp-mfa/amplify/backend/backend-config.json b/environments/auth/auth-with-totp-mfa/amplify/backend/backend-config.json similarity index 100% rename from environments/auth-with-totp-mfa/amplify/backend/backend-config.json rename to environments/auth/auth-with-totp-mfa/amplify/backend/backend-config.json diff --git a/environments/auth-with-totp-and-sms-mfa/amplify/backend/tags.json b/environments/auth/auth-with-totp-mfa/amplify/backend/tags.json similarity index 100% rename from environments/auth-with-totp-and-sms-mfa/amplify/backend/tags.json rename to environments/auth/auth-with-totp-mfa/amplify/backend/tags.json diff --git a/environments/auth-with-totp-mfa/amplify/backend/types/amplify-dependent-resources-ref.d.ts b/environments/auth/auth-with-totp-mfa/amplify/backend/types/amplify-dependent-resources-ref.d.ts similarity index 100% rename from environments/auth-with-totp-mfa/amplify/backend/types/amplify-dependent-resources-ref.d.ts rename to environments/auth/auth-with-totp-mfa/amplify/backend/types/amplify-dependent-resources-ref.d.ts diff --git a/environments/auth-with-totp-mfa/amplify/cli.json b/environments/auth/auth-with-totp-mfa/amplify/cli.json similarity index 100% rename from environments/auth-with-totp-mfa/amplify/cli.json rename to environments/auth/auth-with-totp-mfa/amplify/cli.json diff --git a/environments/auth-with-totp-mfa/package.json b/environments/auth/auth-with-totp-mfa/package.json similarity index 100% rename from environments/auth-with-totp-mfa/package.json rename to environments/auth/auth-with-totp-mfa/package.json diff --git a/environments/auth-with-totp-mfa/screenshots/app-client-selection.png b/environments/auth/auth-with-totp-mfa/screenshots/app-client-selection.png similarity index 100% rename from environments/auth-with-totp-mfa/screenshots/app-client-selection.png rename to environments/auth/auth-with-totp-mfa/screenshots/app-client-selection.png diff --git a/environments/auth-with-totp-mfa/screenshots/app-client-settings.png b/environments/auth/auth-with-totp-mfa/screenshots/app-client-settings.png similarity index 100% rename from environments/auth-with-totp-mfa/screenshots/app-client-settings.png rename to environments/auth/auth-with-totp-mfa/screenshots/app-client-settings.png diff --git a/environments/auth-with-totp-mfa/screenshots/cli-command.png b/environments/auth/auth-with-totp-mfa/screenshots/cli-command.png similarity index 100% rename from environments/auth-with-totp-mfa/screenshots/cli-command.png rename to environments/auth/auth-with-totp-mfa/screenshots/cli-command.png diff --git a/environments/auth-with-totp-mfa/screenshots/create-backend-dropdown.png b/environments/auth/auth-with-totp-mfa/screenshots/create-backend-dropdown.png similarity index 100% rename from environments/auth-with-totp-mfa/screenshots/create-backend-dropdown.png rename to environments/auth/auth-with-totp-mfa/screenshots/create-backend-dropdown.png diff --git a/environments/auth-with-totp-mfa/screenshots/create-sns-role.png b/environments/auth/auth-with-totp-mfa/screenshots/create-sns-role.png similarity index 100% rename from environments/auth-with-totp-mfa/screenshots/create-sns-role.png rename to environments/auth/auth-with-totp-mfa/screenshots/create-sns-role.png diff --git a/environments/auth-with-totp-mfa/screenshots/edit-mfa-settings.png b/environments/auth/auth-with-totp-mfa/screenshots/edit-mfa-settings.png similarity index 100% rename from environments/auth-with-totp-mfa/screenshots/edit-mfa-settings.png rename to environments/auth/auth-with-totp-mfa/screenshots/edit-mfa-settings.png diff --git a/environments/auth-with-totp-mfa/screenshots/empty-app-clients.png b/environments/auth/auth-with-totp-mfa/screenshots/empty-app-clients.png similarity index 100% rename from environments/auth-with-totp-mfa/screenshots/empty-app-clients.png rename to environments/auth/auth-with-totp-mfa/screenshots/empty-app-clients.png diff --git a/environments/auth-with-totp-mfa/screenshots/next-steps-popup.png b/environments/auth/auth-with-totp-mfa/screenshots/next-steps-popup.png similarity index 100% rename from environments/auth-with-totp-mfa/screenshots/next-steps-popup.png rename to environments/auth/auth-with-totp-mfa/screenshots/next-steps-popup.png diff --git a/environments/auth-with-totp-mfa/screenshots/switched-radio-button.png b/environments/auth/auth-with-totp-mfa/screenshots/switched-radio-button.png similarity index 100% rename from environments/auth-with-totp-mfa/screenshots/switched-radio-button.png rename to environments/auth/auth-with-totp-mfa/screenshots/switched-radio-button.png diff --git a/environments/auth-with-totp-mfa/screenshots/two-app-clients.png b/environments/auth/auth-with-totp-mfa/screenshots/two-app-clients.png similarity index 100% rename from environments/auth-with-totp-mfa/screenshots/two-app-clients.png rename to environments/auth/auth-with-totp-mfa/screenshots/two-app-clients.png diff --git a/environments/auth-with-totp-mfa/screenshots/user-pool-create.png b/environments/auth/auth-with-totp-mfa/screenshots/user-pool-create.png similarity index 100% rename from environments/auth-with-totp-mfa/screenshots/user-pool-create.png rename to environments/auth/auth-with-totp-mfa/screenshots/user-pool-create.png diff --git a/environments/auth-with-username-no-attributes/.gitignore b/environments/auth/auth-with-username-no-attributes/.gitignore similarity index 100% rename from environments/auth-with-username-no-attributes/.gitignore rename to environments/auth/auth-with-username-no-attributes/.gitignore diff --git a/environments/auth-with-username-no-attributes/.vscode/settings.json b/environments/auth/auth-with-username-no-attributes/.vscode/settings.json similarity index 100% rename from environments/auth-with-username-no-attributes/.vscode/settings.json rename to environments/auth/auth-with-username-no-attributes/.vscode/settings.json diff --git a/environments/auth-with-username-no-attributes/README.md b/environments/auth/auth-with-username-no-attributes/README.md similarity index 100% rename from environments/auth-with-username-no-attributes/README.md rename to environments/auth/auth-with-username-no-attributes/README.md diff --git a/environments/auth-with-username-no-attributes/amplify/.config/project-config.json b/environments/auth/auth-with-username-no-attributes/amplify/.config/project-config.json similarity index 100% rename from environments/auth-with-username-no-attributes/amplify/.config/project-config.json rename to environments/auth/auth-with-username-no-attributes/amplify/.config/project-config.json diff --git a/environments/auth-with-username-no-attributes/amplify/backend/auth/authwithusernamenoat3aaa0954/authwithusernamenoat3aaa0954-cloudformation-template.yml b/environments/auth/auth-with-username-no-attributes/amplify/backend/auth/authwithusernamenoat3aaa0954/authwithusernamenoat3aaa0954-cloudformation-template.yml similarity index 100% rename from environments/auth-with-username-no-attributes/amplify/backend/auth/authwithusernamenoat3aaa0954/authwithusernamenoat3aaa0954-cloudformation-template.yml rename to environments/auth/auth-with-username-no-attributes/amplify/backend/auth/authwithusernamenoat3aaa0954/authwithusernamenoat3aaa0954-cloudformation-template.yml diff --git a/environments/auth-with-username-no-attributes/amplify/backend/auth/authwithusernamenoat3aaa0954/parameters.json b/environments/auth/auth-with-username-no-attributes/amplify/backend/auth/authwithusernamenoat3aaa0954/parameters.json similarity index 100% rename from environments/auth-with-username-no-attributes/amplify/backend/auth/authwithusernamenoat3aaa0954/parameters.json rename to environments/auth/auth-with-username-no-attributes/amplify/backend/auth/authwithusernamenoat3aaa0954/parameters.json diff --git a/environments/auth-with-username-no-attributes/amplify/backend/backend-config.json b/environments/auth/auth-with-username-no-attributes/amplify/backend/backend-config.json similarity index 100% rename from environments/auth-with-username-no-attributes/amplify/backend/backend-config.json rename to environments/auth/auth-with-username-no-attributes/amplify/backend/backend-config.json diff --git a/environments/auth-with-totp-mfa/amplify/backend/tags.json b/environments/auth/auth-with-username-no-attributes/amplify/backend/tags.json similarity index 100% rename from environments/auth-with-totp-mfa/amplify/backend/tags.json rename to environments/auth/auth-with-username-no-attributes/amplify/backend/tags.json diff --git a/environments/auth-with-username-no-attributes/amplify/backend/types/amplify-dependent-resources-ref.d.ts b/environments/auth/auth-with-username-no-attributes/amplify/backend/types/amplify-dependent-resources-ref.d.ts similarity index 100% rename from environments/auth-with-username-no-attributes/amplify/backend/types/amplify-dependent-resources-ref.d.ts rename to environments/auth/auth-with-username-no-attributes/amplify/backend/types/amplify-dependent-resources-ref.d.ts diff --git a/environments/auth-with-username-no-attributes/amplify/cli.json b/environments/auth/auth-with-username-no-attributes/amplify/cli.json similarity index 100% rename from environments/auth-with-username-no-attributes/amplify/cli.json rename to environments/auth/auth-with-username-no-attributes/amplify/cli.json diff --git a/environments/auth-with-username-no-attributes/package.json b/environments/auth/auth-with-username-no-attributes/package.json similarity index 100% rename from environments/auth-with-username-no-attributes/package.json rename to environments/auth/auth-with-username-no-attributes/package.json diff --git a/environments/auth/package.json b/environments/auth/package.json new file mode 100644 index 00000000000..3cc0383f642 --- /dev/null +++ b/environments/auth/package.json @@ -0,0 +1,8 @@ +{ + "private": true, + "name": "environments-auth", + "version": "0.0.1", + "scripts": { + "pull": "../pull-environments.sh" + } +} diff --git a/environments/basic-map/.vscode/settings.json b/environments/basic-map/.vscode/settings.json deleted file mode 100644 index c87b85ede78..00000000000 --- a/environments/basic-map/.vscode/settings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "files.exclude": { - "amplify/.config": true, - "amplify/**/*-parameters.json": true, - "amplify/**/amplify.state": true, - "amplify/**/transform.conf.json": true, - "amplify/#current-cloud-backend": true, - "amplify/backend/amplify-meta.json": true, - "amplify/backend/awscloudformation": true - } -} \ No newline at end of file diff --git a/environments/basic-map/amplify/backend/tags.json b/environments/basic-map/amplify/backend/tags.json deleted file mode 100644 index b9321d71b83..00000000000 --- a/environments/basic-map/amplify/backend/tags.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "Key": "user:Stack", - "Value": "{project-env}" - }, - { - "Key": "user:Application", - "Value": "{project-name}" - } -] \ No newline at end of file diff --git a/environments/basic-map/amplify/hooks/README.md b/environments/basic-map/amplify/hooks/README.md deleted file mode 100644 index 8fb601eaebe..00000000000 --- a/environments/basic-map/amplify/hooks/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Command Hooks - -Command hooks can be used to run custom scripts upon Amplify CLI lifecycle events like pre-push, post-add-function, etc. - -To get started, add your script files based on the expected naming convention in this directory. - -Learn more about the script file naming convention, hook parameters, third party dependencies, and advanced configurations at https://docs.amplify.aws/cli/usage/command-hooks diff --git a/environments/action-hooks/.gitignore b/environments/datastore/action-hooks/.gitignore similarity index 100% rename from environments/action-hooks/.gitignore rename to environments/datastore/action-hooks/.gitignore diff --git a/environments/action-hooks/README.md b/environments/datastore/action-hooks/README.md similarity index 100% rename from environments/action-hooks/README.md rename to environments/datastore/action-hooks/README.md diff --git a/environments/action-hooks/amplify/.config/project-config.json b/environments/datastore/action-hooks/amplify/.config/project-config.json similarity index 100% rename from environments/action-hooks/amplify/.config/project-config.json rename to environments/datastore/action-hooks/amplify/.config/project-config.json diff --git a/environments/action-hooks/amplify/backend/auth/actionhooks71568983/cli-inputs.json b/environments/datastore/action-hooks/amplify/backend/auth/actionhooks71568983/cli-inputs.json similarity index 100% rename from environments/action-hooks/amplify/backend/auth/actionhooks71568983/cli-inputs.json rename to environments/datastore/action-hooks/amplify/backend/auth/actionhooks71568983/cli-inputs.json diff --git a/environments/action-hooks/amplify/backend/backend-config.json b/environments/datastore/action-hooks/amplify/backend/backend-config.json similarity index 100% rename from environments/action-hooks/amplify/backend/backend-config.json rename to environments/datastore/action-hooks/amplify/backend/backend-config.json diff --git a/environments/auth-with-username-no-attributes/amplify/backend/tags.json b/environments/datastore/action-hooks/amplify/backend/tags.json similarity index 100% rename from environments/auth-with-username-no-attributes/amplify/backend/tags.json rename to environments/datastore/action-hooks/amplify/backend/tags.json diff --git a/environments/action-hooks/amplify/backend/types/amplify-dependent-resources-ref.d.ts b/environments/datastore/action-hooks/amplify/backend/types/amplify-dependent-resources-ref.d.ts similarity index 100% rename from environments/action-hooks/amplify/backend/types/amplify-dependent-resources-ref.d.ts rename to environments/datastore/action-hooks/amplify/backend/types/amplify-dependent-resources-ref.d.ts diff --git a/environments/action-hooks/amplify/cli.json b/environments/datastore/action-hooks/amplify/cli.json similarity index 100% rename from environments/action-hooks/amplify/cli.json rename to environments/datastore/action-hooks/amplify/cli.json diff --git a/environments/action-hooks/package.json b/environments/datastore/action-hooks/package.json similarity index 100% rename from environments/action-hooks/package.json rename to environments/datastore/action-hooks/package.json diff --git a/environments/datastore/package.json b/environments/datastore/package.json new file mode 100644 index 00000000000..7ec91b67712 --- /dev/null +++ b/environments/datastore/package.json @@ -0,0 +1,8 @@ +{ + "private": true, + "name": "environments-datastore", + "version": "0.0.1", + "scripts": { + "pull": "../pull-environments.sh" + } +} diff --git a/environments/basic-map/.gitignore b/environments/geo/basic-map/.gitignore similarity index 100% rename from environments/basic-map/.gitignore rename to environments/geo/basic-map/.gitignore diff --git a/environments/auth-with-username/.vscode/settings.json b/environments/geo/basic-map/.vscode/settings.json similarity index 100% rename from environments/auth-with-username/.vscode/settings.json rename to environments/geo/basic-map/.vscode/settings.json diff --git a/environments/basic-map/README.md b/environments/geo/basic-map/README.md similarity index 100% rename from environments/basic-map/README.md rename to environments/geo/basic-map/README.md diff --git a/environments/basic-map/amplify/.config/project-config.json b/environments/geo/basic-map/amplify/.config/project-config.json similarity index 100% rename from environments/basic-map/amplify/.config/project-config.json rename to environments/geo/basic-map/amplify/.config/project-config.json diff --git a/environments/basic-map/amplify/README.md b/environments/geo/basic-map/amplify/README.md similarity index 100% rename from environments/basic-map/amplify/README.md rename to environments/geo/basic-map/amplify/README.md diff --git a/environments/basic-map/amplify/backend/auth/basicmapd744ff18/cli-inputs.json b/environments/geo/basic-map/amplify/backend/auth/basicmapd744ff18/cli-inputs.json similarity index 100% rename from environments/basic-map/amplify/backend/auth/basicmapd744ff18/cli-inputs.json rename to environments/geo/basic-map/amplify/backend/auth/basicmapd744ff18/cli-inputs.json diff --git a/environments/basic-map/amplify/backend/backend-config.json b/environments/geo/basic-map/amplify/backend/backend-config.json similarity index 100% rename from environments/basic-map/amplify/backend/backend-config.json rename to environments/geo/basic-map/amplify/backend/backend-config.json diff --git a/environments/basic-map/amplify/backend/geo/map5df169f7/map5df169f7-cloudformation-template.json b/environments/geo/basic-map/amplify/backend/geo/map5df169f7/map5df169f7-cloudformation-template.json similarity index 100% rename from environments/basic-map/amplify/backend/geo/map5df169f7/map5df169f7-cloudformation-template.json rename to environments/geo/basic-map/amplify/backend/geo/map5df169f7/map5df169f7-cloudformation-template.json diff --git a/environments/basic-map/amplify/backend/geo/map5df169f7/parameters.json b/environments/geo/basic-map/amplify/backend/geo/map5df169f7/parameters.json similarity index 100% rename from environments/basic-map/amplify/backend/geo/map5df169f7/parameters.json rename to environments/geo/basic-map/amplify/backend/geo/map5df169f7/parameters.json diff --git a/environments/basic-map/amplify/backend/geo/placeindex5588737e/parameters.json b/environments/geo/basic-map/amplify/backend/geo/placeindex5588737e/parameters.json similarity index 100% rename from environments/basic-map/amplify/backend/geo/placeindex5588737e/parameters.json rename to environments/geo/basic-map/amplify/backend/geo/placeindex5588737e/parameters.json diff --git a/environments/basic-map/amplify/backend/geo/placeindex5588737e/placeindex5588737e-cloudformation-template.json b/environments/geo/basic-map/amplify/backend/geo/placeindex5588737e/placeindex5588737e-cloudformation-template.json similarity index 100% rename from environments/basic-map/amplify/backend/geo/placeindex5588737e/placeindex5588737e-cloudformation-template.json rename to environments/geo/basic-map/amplify/backend/geo/placeindex5588737e/placeindex5588737e-cloudformation-template.json diff --git a/environments/auth-with-username/amplify/backend/tags.json b/environments/geo/basic-map/amplify/backend/tags.json similarity index 100% rename from environments/auth-with-username/amplify/backend/tags.json rename to environments/geo/basic-map/amplify/backend/tags.json diff --git a/environments/basic-map/amplify/backend/types/amplify-dependent-resources-ref.d.ts b/environments/geo/basic-map/amplify/backend/types/amplify-dependent-resources-ref.d.ts similarity index 100% rename from environments/basic-map/amplify/backend/types/amplify-dependent-resources-ref.d.ts rename to environments/geo/basic-map/amplify/backend/types/amplify-dependent-resources-ref.d.ts diff --git a/environments/basic-map/amplify/cli.json b/environments/geo/basic-map/amplify/cli.json similarity index 100% rename from environments/basic-map/amplify/cli.json rename to environments/geo/basic-map/amplify/cli.json diff --git a/environments/basic-map/package.json b/environments/geo/basic-map/package.json similarity index 100% rename from environments/basic-map/package.json rename to environments/geo/basic-map/package.json diff --git a/environments/geo/package.json b/environments/geo/package.json new file mode 100644 index 00000000000..e63c62d23fb --- /dev/null +++ b/environments/geo/package.json @@ -0,0 +1,8 @@ +{ + "private": true, + "name": "environments-geo", + "version": "0.0.1", + "scripts": { + "pull": "../pull-environments.sh" + } +} diff --git a/environments/package.json b/environments/package.json index f55de866c22..59b8be12f8c 100644 --- a/environments/package.json +++ b/environments/package.json @@ -3,6 +3,9 @@ "name": "environments", "version": "0.0.1", "scripts": { - "pull": "chmod +x pull-environments.sh && chmod +x pull-environment.sh && ./pull-environments.sh" + "pull": "yarn auth pull && yarn geo pull && yarn datastore pull", + "auth": "yarn --cwd auth/", + "datastore": "yarn --cwd datastore/", + "geo": "yarn --cwd geo/" } } diff --git a/environments/pull-environment.sh b/environments/pull-environment.sh index 4cfe3370b71..193fc169c89 100755 --- a/environments/pull-environment.sh +++ b/environments/pull-environment.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e IFS='|' diff --git a/environments/pull-environments.sh b/environments/pull-environments.sh index bd34d6f9802..3ff192c70eb 100755 --- a/environments/pull-environments.sh +++ b/environments/pull-environments.sh @@ -1,4 +1,5 @@ -#!/bin/sh +#!/bin/bash +# using bin/bash for macOS and Linux compatibility set -e IFS='|' @@ -21,5 +22,16 @@ if [ "$NODE_ENV" = "test" ]; then numParallelTasks=1; # GitHub actions has trouble handling parallel executions fi -echo $dirs | xargs -P $numParallelTasks -I {} sh -c "./pull-environment.sh {}" +# Get the path to this shell file relative to cwd +# (1) bash_source[0] contains the filename of this shell relative to cwd +# (e.g. `../pull-environments.sh`) +# (2) dirname gets rid of filename and returns the relative path to the +# directory is in (e.g. ..) +# +# source: https://stackoverflow.com/a/24112741 +shell_path="$(dirname "${BASH_SOURCE[0]}")" # under normal use, this points to `../` + +# Pull environments in parallel +# Note that printf is used because echo dosn't handle `\n` by default in bash. +printf $dirs | xargs -P $numParallelTasks -I {} sh -c ""$shell_path"/pull-environment.sh {}"; diff --git a/examples/angular/src/pages/ui/components/authenticator/custom-sign-up-fields/aws-exports.js b/examples/angular/src/pages/ui/components/authenticator/custom-sign-up-fields/aws-exports.js index 31b7f8c22d1..5395b97923f 100644 --- a/examples/angular/src/pages/ui/components/authenticator/custom-sign-up-fields/aws-exports.js +++ b/examples/angular/src/pages/ui/components/authenticator/custom-sign-up-fields/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-email-and-custom-attributes/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-email-and-custom-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/angular/src/pages/ui/components/authenticator/custom-slots/aws-exports.js b/examples/angular/src/pages/ui/components/authenticator/custom-slots/aws-exports.js index 433564f092c..ba613a2e36d 100644 --- a/examples/angular/src/pages/ui/components/authenticator/custom-slots/aws-exports.js +++ b/examples/angular/src/pages/ui/components/authenticator/custom-slots/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/adminui-auth-with-totp-mfa/src/aws-exports'; +import awsExports from '@environments/auth/adminui-auth-with-totp-mfa/src/aws-exports'; export default awsExports; diff --git a/examples/angular/src/pages/ui/components/authenticator/hub-events/aws-exports.js b/examples/angular/src/pages/ui/components/authenticator/hub-events/aws-exports.js index 1c171397cfa..72615b72cc0 100644 --- a/examples/angular/src/pages/ui/components/authenticator/hub-events/aws-exports.js +++ b/examples/angular/src/pages/ui/components/authenticator/hub-events/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-email/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-email/src/aws-exports'; export default awsExports; diff --git a/examples/angular/src/pages/ui/components/authenticator/i18n/aws-exports.js b/examples/angular/src/pages/ui/components/authenticator/i18n/aws-exports.js index 0da80731de0..697ba883031 100644 --- a/examples/angular/src/pages/ui/components/authenticator/i18n/aws-exports.js +++ b/examples/angular/src/pages/ui/components/authenticator/i18n/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-username-no-attributes/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-username-no-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/angular/src/pages/ui/components/authenticator/modal/aws-exports.js b/examples/angular/src/pages/ui/components/authenticator/modal/aws-exports.js index 0da80731de0..697ba883031 100644 --- a/examples/angular/src/pages/ui/components/authenticator/modal/aws-exports.js +++ b/examples/angular/src/pages/ui/components/authenticator/modal/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-username-no-attributes/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-username-no-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/angular/src/pages/ui/components/authenticator/reset-password/aws-exports.js b/examples/angular/src/pages/ui/components/authenticator/reset-password/aws-exports.js index 0da80731de0..697ba883031 100644 --- a/examples/angular/src/pages/ui/components/authenticator/reset-password/aws-exports.js +++ b/examples/angular/src/pages/ui/components/authenticator/reset-password/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-username-no-attributes/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-username-no-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/angular/src/pages/ui/components/authenticator/sign-in-federated/aws-exports.js b/examples/angular/src/pages/ui/components/authenticator/sign-in-federated/aws-exports.js index baad87f87a8..1d34ae15e3c 100644 --- a/examples/angular/src/pages/ui/components/authenticator/sign-in-federated/aws-exports.js +++ b/examples/angular/src/pages/ui/components/authenticator/sign-in-federated/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-federated/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-federated/src/aws-exports'; export default awsExports; diff --git a/examples/angular/src/pages/ui/components/authenticator/sign-in-sms-mfa/aws-exports.js b/examples/angular/src/pages/ui/components/authenticator/sign-in-sms-mfa/aws-exports.js index 6f9e23ca3e4..d79d4b7224a 100644 --- a/examples/angular/src/pages/ui/components/authenticator/sign-in-sms-mfa/aws-exports.js +++ b/examples/angular/src/pages/ui/components/authenticator/sign-in-sms-mfa/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-phone-and-sms-mfa/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-phone-and-sms-mfa/src/aws-exports'; export default awsExports; diff --git a/examples/angular/src/pages/ui/components/authenticator/sign-in-totp-mfa/aws-exports.js b/examples/angular/src/pages/ui/components/authenticator/sign-in-totp-mfa/aws-exports.js index 433564f092c..ba613a2e36d 100644 --- a/examples/angular/src/pages/ui/components/authenticator/sign-in-totp-mfa/aws-exports.js +++ b/examples/angular/src/pages/ui/components/authenticator/sign-in-totp-mfa/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/adminui-auth-with-totp-mfa/src/aws-exports'; +import awsExports from '@environments/auth/adminui-auth-with-totp-mfa/src/aws-exports'; export default awsExports; diff --git a/examples/angular/src/pages/ui/components/authenticator/sign-in-totp-sms/aws-exports.js b/examples/angular/src/pages/ui/components/authenticator/sign-in-totp-sms/aws-exports.js index c0a9a5c9983..c6234037b6c 100644 --- a/examples/angular/src/pages/ui/components/authenticator/sign-in-totp-sms/aws-exports.js +++ b/examples/angular/src/pages/ui/components/authenticator/sign-in-totp-sms/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-totp-and-sms-mfa/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-totp-and-sms-mfa/src/aws-exports'; export default awsExports; diff --git a/examples/angular/src/pages/ui/components/authenticator/sign-in-with-email/aws-exports.js b/examples/angular/src/pages/ui/components/authenticator/sign-in-with-email/aws-exports.js index 1c171397cfa..72615b72cc0 100644 --- a/examples/angular/src/pages/ui/components/authenticator/sign-in-with-email/aws-exports.js +++ b/examples/angular/src/pages/ui/components/authenticator/sign-in-with-email/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-email/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-email/src/aws-exports'; export default awsExports; diff --git a/examples/angular/src/pages/ui/components/authenticator/sign-in-with-phone/aws-exports.js b/examples/angular/src/pages/ui/components/authenticator/sign-in-with-phone/aws-exports.js index 890c17da7e9..03a5e3cd520 100644 --- a/examples/angular/src/pages/ui/components/authenticator/sign-in-with-phone/aws-exports.js +++ b/examples/angular/src/pages/ui/components/authenticator/sign-in-with-phone/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-phone-number/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-phone-number/src/aws-exports'; export default awsExports; diff --git a/examples/angular/src/pages/ui/components/authenticator/sign-in-with-username/aws-exports.js b/examples/angular/src/pages/ui/components/authenticator/sign-in-with-username/aws-exports.js index 0da80731de0..697ba883031 100644 --- a/examples/angular/src/pages/ui/components/authenticator/sign-in-with-username/aws-exports.js +++ b/examples/angular/src/pages/ui/components/authenticator/sign-in-with-username/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-username-no-attributes/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-username-no-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/angular/src/pages/ui/components/authenticator/sign-up-with-attributes/aws-exports.js b/examples/angular/src/pages/ui/components/authenticator/sign-up-with-attributes/aws-exports.js index e1bca2b61d0..cc988866d71 100644 --- a/examples/angular/src/pages/ui/components/authenticator/sign-up-with-attributes/aws-exports.js +++ b/examples/angular/src/pages/ui/components/authenticator/sign-up-with-attributes/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-all-attributes/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-all-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/angular/src/pages/ui/components/authenticator/sign-up-with-email-lambda/aws-exports.js b/examples/angular/src/pages/ui/components/authenticator/sign-up-with-email-lambda/aws-exports.js index 1f5332787c4..3771ab75576 100644 --- a/examples/angular/src/pages/ui/components/authenticator/sign-up-with-email-lambda/aws-exports.js +++ b/examples/angular/src/pages/ui/components/authenticator/sign-up-with-email-lambda/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-email-lambda-signup-trigger/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-email-lambda-signup-trigger/src/aws-exports'; export default awsExports; diff --git a/examples/angular/src/pages/ui/components/authenticator/sign-up-with-email/aws-exports.js b/examples/angular/src/pages/ui/components/authenticator/sign-up-with-email/aws-exports.js index 1c171397cfa..72615b72cc0 100644 --- a/examples/angular/src/pages/ui/components/authenticator/sign-up-with-email/aws-exports.js +++ b/examples/angular/src/pages/ui/components/authenticator/sign-up-with-email/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-email/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-email/src/aws-exports'; export default awsExports; diff --git a/examples/angular/src/pages/ui/components/authenticator/sign-up-with-phone/aws-exports.js b/examples/angular/src/pages/ui/components/authenticator/sign-up-with-phone/aws-exports.js index 890c17da7e9..03a5e3cd520 100644 --- a/examples/angular/src/pages/ui/components/authenticator/sign-up-with-phone/aws-exports.js +++ b/examples/angular/src/pages/ui/components/authenticator/sign-up-with-phone/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-phone-number/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-phone-number/src/aws-exports'; export default awsExports; diff --git a/examples/angular/src/pages/ui/components/authenticator/sign-up-with-username/aws-exports.js b/examples/angular/src/pages/ui/components/authenticator/sign-up-with-username/aws-exports.js index c2c186889d6..697ba883031 100644 --- a/examples/angular/src/pages/ui/components/authenticator/sign-up-with-username/aws-exports.js +++ b/examples/angular/src/pages/ui/components/authenticator/sign-up-with-username/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-username/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-username-no-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/angular/src/pages/ui/components/authenticator/useAuthenticator/aws-exports.js b/examples/angular/src/pages/ui/components/authenticator/useAuthenticator/aws-exports.js index 0da80731de0..697ba883031 100644 --- a/examples/angular/src/pages/ui/components/authenticator/useAuthenticator/aws-exports.js +++ b/examples/angular/src/pages/ui/components/authenticator/useAuthenticator/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-username-no-attributes/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-username-no-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/next/package.json b/examples/next/package.json index 11e3801cef8..2ec2a14f9e4 100644 --- a/examples/next/package.json +++ b/examples/next/package.json @@ -10,7 +10,7 @@ "lint": "next lint" }, "dependencies": { - "@aws-amplify/ui-react": "^3.4.0", + "@aws-amplify/ui-react": "^3.4.1", "next": "^11.1.3", "next-global-css": "^1.1.1", "react": "17", diff --git a/examples/next/pages/ui/components/amplify-authenticator/sign-in-with-email/aws-exports.js b/examples/next/pages/ui/components/amplify-authenticator/sign-in-with-email/aws-exports.js index 1c171397cfa..72615b72cc0 100644 --- a/examples/next/pages/ui/components/amplify-authenticator/sign-in-with-email/aws-exports.js +++ b/examples/next/pages/ui/components/amplify-authenticator/sign-in-with-email/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-email/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-email/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/authenticator/custom-sign-up-fields/aws-exports.js b/examples/next/pages/ui/components/authenticator/custom-sign-up-fields/aws-exports.js index 31b7f8c22d1..5395b97923f 100644 --- a/examples/next/pages/ui/components/authenticator/custom-sign-up-fields/aws-exports.js +++ b/examples/next/pages/ui/components/authenticator/custom-sign-up-fields/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-email-and-custom-attributes/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-email-and-custom-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/authenticator/custom-slots/aws-exports.js b/examples/next/pages/ui/components/authenticator/custom-slots/aws-exports.js index 433564f092c..ba613a2e36d 100644 --- a/examples/next/pages/ui/components/authenticator/custom-slots/aws-exports.js +++ b/examples/next/pages/ui/components/authenticator/custom-slots/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/adminui-auth-with-totp-mfa/src/aws-exports'; +import awsExports from '@environments/auth/adminui-auth-with-totp-mfa/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/authenticator/hub-events/aws-exports.js b/examples/next/pages/ui/components/authenticator/hub-events/aws-exports.js index 1c171397cfa..72615b72cc0 100644 --- a/examples/next/pages/ui/components/authenticator/hub-events/aws-exports.js +++ b/examples/next/pages/ui/components/authenticator/hub-events/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-email/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-email/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/authenticator/i18n/aws-exports.js b/examples/next/pages/ui/components/authenticator/i18n/aws-exports.js index 0da80731de0..697ba883031 100644 --- a/examples/next/pages/ui/components/authenticator/i18n/aws-exports.js +++ b/examples/next/pages/ui/components/authenticator/i18n/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-username-no-attributes/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-username-no-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/authenticator/modal/aws-exports.js b/examples/next/pages/ui/components/authenticator/modal/aws-exports.js index 0da80731de0..697ba883031 100644 --- a/examples/next/pages/ui/components/authenticator/modal/aws-exports.js +++ b/examples/next/pages/ui/components/authenticator/modal/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-username-no-attributes/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-username-no-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/authenticator/reset-password/aws-exports.js b/examples/next/pages/ui/components/authenticator/reset-password/aws-exports.js index 0da80731de0..697ba883031 100644 --- a/examples/next/pages/ui/components/authenticator/reset-password/aws-exports.js +++ b/examples/next/pages/ui/components/authenticator/reset-password/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-username-no-attributes/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-username-no-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/authenticator/sign-in-federated/aws-exports.js b/examples/next/pages/ui/components/authenticator/sign-in-federated/aws-exports.js index baad87f87a8..1d34ae15e3c 100644 --- a/examples/next/pages/ui/components/authenticator/sign-in-federated/aws-exports.js +++ b/examples/next/pages/ui/components/authenticator/sign-in-federated/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-federated/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-federated/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/authenticator/sign-in-sms-mfa/aws-exports.js b/examples/next/pages/ui/components/authenticator/sign-in-sms-mfa/aws-exports.js index 6f9e23ca3e4..d79d4b7224a 100644 --- a/examples/next/pages/ui/components/authenticator/sign-in-sms-mfa/aws-exports.js +++ b/examples/next/pages/ui/components/authenticator/sign-in-sms-mfa/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-phone-and-sms-mfa/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-phone-and-sms-mfa/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/authenticator/sign-in-totp-mfa/aws-exports.js b/examples/next/pages/ui/components/authenticator/sign-in-totp-mfa/aws-exports.js index 433564f092c..ba613a2e36d 100644 --- a/examples/next/pages/ui/components/authenticator/sign-in-totp-mfa/aws-exports.js +++ b/examples/next/pages/ui/components/authenticator/sign-in-totp-mfa/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/adminui-auth-with-totp-mfa/src/aws-exports'; +import awsExports from '@environments/auth/adminui-auth-with-totp-mfa/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/authenticator/sign-in-totp-sms-mfa/aws-exports.js b/examples/next/pages/ui/components/authenticator/sign-in-totp-sms-mfa/aws-exports.js index c0a9a5c9983..c6234037b6c 100644 --- a/examples/next/pages/ui/components/authenticator/sign-in-totp-sms-mfa/aws-exports.js +++ b/examples/next/pages/ui/components/authenticator/sign-in-totp-sms-mfa/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-totp-and-sms-mfa/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-totp-and-sms-mfa/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/authenticator/sign-in-with-email/aws-exports.js b/examples/next/pages/ui/components/authenticator/sign-in-with-email/aws-exports.js index 1c171397cfa..72615b72cc0 100644 --- a/examples/next/pages/ui/components/authenticator/sign-in-with-email/aws-exports.js +++ b/examples/next/pages/ui/components/authenticator/sign-in-with-email/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-email/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-email/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/authenticator/sign-in-with-phone/aws-exports.js b/examples/next/pages/ui/components/authenticator/sign-in-with-phone/aws-exports.js index 890c17da7e9..03a5e3cd520 100644 --- a/examples/next/pages/ui/components/authenticator/sign-in-with-phone/aws-exports.js +++ b/examples/next/pages/ui/components/authenticator/sign-in-with-phone/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-phone-number/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-phone-number/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/authenticator/sign-in-with-username/aws-exports.js b/examples/next/pages/ui/components/authenticator/sign-in-with-username/aws-exports.js index 0da80731de0..697ba883031 100644 --- a/examples/next/pages/ui/components/authenticator/sign-in-with-username/aws-exports.js +++ b/examples/next/pages/ui/components/authenticator/sign-in-with-username/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-username-no-attributes/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-username-no-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/authenticator/sign-up-with-attributes/aws-exports.js b/examples/next/pages/ui/components/authenticator/sign-up-with-attributes/aws-exports.js index e1bca2b61d0..cc988866d71 100644 --- a/examples/next/pages/ui/components/authenticator/sign-up-with-attributes/aws-exports.js +++ b/examples/next/pages/ui/components/authenticator/sign-up-with-attributes/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-all-attributes/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-all-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/authenticator/sign-up-with-email-lambda/aws-exports.js b/examples/next/pages/ui/components/authenticator/sign-up-with-email-lambda/aws-exports.js index 1f5332787c4..3771ab75576 100644 --- a/examples/next/pages/ui/components/authenticator/sign-up-with-email-lambda/aws-exports.js +++ b/examples/next/pages/ui/components/authenticator/sign-up-with-email-lambda/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-email-lambda-signup-trigger/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-email-lambda-signup-trigger/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/authenticator/sign-up-with-email/aws-exports.js b/examples/next/pages/ui/components/authenticator/sign-up-with-email/aws-exports.js index 1c171397cfa..72615b72cc0 100644 --- a/examples/next/pages/ui/components/authenticator/sign-up-with-email/aws-exports.js +++ b/examples/next/pages/ui/components/authenticator/sign-up-with-email/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-email/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-email/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/authenticator/sign-up-with-phone/aws-exports.js b/examples/next/pages/ui/components/authenticator/sign-up-with-phone/aws-exports.js index 890c17da7e9..03a5e3cd520 100644 --- a/examples/next/pages/ui/components/authenticator/sign-up-with-phone/aws-exports.js +++ b/examples/next/pages/ui/components/authenticator/sign-up-with-phone/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-phone-number/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-phone-number/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/authenticator/sign-up-with-username/aws-exports.js b/examples/next/pages/ui/components/authenticator/sign-up-with-username/aws-exports.js index c2c186889d6..697ba883031 100644 --- a/examples/next/pages/ui/components/authenticator/sign-up-with-username/aws-exports.js +++ b/examples/next/pages/ui/components/authenticator/sign-up-with-username/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-username/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-username-no-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/authenticator/useAuthenticator/aws-exports.js b/examples/next/pages/ui/components/authenticator/useAuthenticator/aws-exports.js index 0da80731de0..697ba883031 100644 --- a/examples/next/pages/ui/components/authenticator/useAuthenticator/aws-exports.js +++ b/examples/next/pages/ui/components/authenticator/useAuthenticator/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-username-no-attributes/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-username-no-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/authenticator/withAuthenticator/aws-exports.js b/examples/next/pages/ui/components/authenticator/withAuthenticator/aws-exports.js index 0da80731de0..697ba883031 100644 --- a/examples/next/pages/ui/components/authenticator/withAuthenticator/aws-exports.js +++ b/examples/next/pages/ui/components/authenticator/withAuthenticator/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-username-no-attributes/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-username-no-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/geo/basic-map/aws-exports.js b/examples/next/pages/ui/components/geo/basic-map/aws-exports.js index 5ea359b9b1c..2d6a6022f37 100644 --- a/examples/next/pages/ui/components/geo/basic-map/aws-exports.js +++ b/examples/next/pages/ui/components/geo/basic-map/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/basic-map/src/aws-exports'; +import awsExports from '@environments/geo/basic-map/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/geo/map-with-forward-ref/aws-exports.js b/examples/next/pages/ui/components/geo/map-with-forward-ref/aws-exports.js index 5ea359b9b1c..2d6a6022f37 100644 --- a/examples/next/pages/ui/components/geo/map-with-forward-ref/aws-exports.js +++ b/examples/next/pages/ui/components/geo/map-with-forward-ref/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/basic-map/src/aws-exports'; +import awsExports from '@environments/geo/basic-map/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/geo/map-with-location-search/aws-exports.js b/examples/next/pages/ui/components/geo/map-with-location-search/aws-exports.js index 5ea359b9b1c..2d6a6022f37 100644 --- a/examples/next/pages/ui/components/geo/map-with-location-search/aws-exports.js +++ b/examples/next/pages/ui/components/geo/map-with-location-search/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/basic-map/src/aws-exports'; +import awsExports from '@environments/geo/basic-map/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/geo/map-with-marker-popup/aws-exports.js b/examples/next/pages/ui/components/geo/map-with-marker-popup/aws-exports.js index 5ea359b9b1c..2d6a6022f37 100644 --- a/examples/next/pages/ui/components/geo/map-with-marker-popup/aws-exports.js +++ b/examples/next/pages/ui/components/geo/map-with-marker-popup/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/basic-map/src/aws-exports'; +import awsExports from '@environments/geo/basic-map/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/geo/map-with-moving-marker/aws-exports.js b/examples/next/pages/ui/components/geo/map-with-moving-marker/aws-exports.js index 5ea359b9b1c..2d6a6022f37 100644 --- a/examples/next/pages/ui/components/geo/map-with-moving-marker/aws-exports.js +++ b/examples/next/pages/ui/components/geo/map-with-moving-marker/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/basic-map/src/aws-exports'; +import awsExports from '@environments/geo/basic-map/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/geo/standalone-location-search/aws-exports.js b/examples/next/pages/ui/components/geo/standalone-location-search/aws-exports.js index 5ea359b9b1c..2d6a6022f37 100644 --- a/examples/next/pages/ui/components/geo/standalone-location-search/aws-exports.js +++ b/examples/next/pages/ui/components/geo/standalone-location-search/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/basic-map/src/aws-exports'; +import awsExports from '@environments/geo/basic-map/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/components/geo/use-map-hook/aws-exports.js b/examples/next/pages/ui/components/geo/use-map-hook/aws-exports.js index 5ea359b9b1c..2d6a6022f37 100644 --- a/examples/next/pages/ui/components/geo/use-map-hook/aws-exports.js +++ b/examples/next/pages/ui/components/geo/use-map-hook/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/basic-map/src/aws-exports'; +import awsExports from '@environments/geo/basic-map/src/aws-exports'; export default awsExports; diff --git a/examples/next/pages/ui/hooks/actions/aws-exports.js b/examples/next/pages/ui/hooks/actions/aws-exports.js index 7a32840cb2c..7b45e2862a2 100644 --- a/examples/next/pages/ui/hooks/actions/aws-exports.js +++ b/examples/next/pages/ui/hooks/actions/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/action-hooks/src/aws-exports'; +import awsExports from '@environments/datastore/action-hooks/src/aws-exports'; export default awsExports; diff --git a/examples/vue/src/pages/ui/components/authenticator/custom-sign-up-fields/aws-exports.js b/examples/vue/src/pages/ui/components/authenticator/custom-sign-up-fields/aws-exports.js index 31b7f8c22d1..5395b97923f 100644 --- a/examples/vue/src/pages/ui/components/authenticator/custom-sign-up-fields/aws-exports.js +++ b/examples/vue/src/pages/ui/components/authenticator/custom-sign-up-fields/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-email-and-custom-attributes/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-email-and-custom-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/vue/src/pages/ui/components/authenticator/custom-slots/aws-exports.js b/examples/vue/src/pages/ui/components/authenticator/custom-slots/aws-exports.js index 433564f092c..ba613a2e36d 100644 --- a/examples/vue/src/pages/ui/components/authenticator/custom-slots/aws-exports.js +++ b/examples/vue/src/pages/ui/components/authenticator/custom-slots/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/adminui-auth-with-totp-mfa/src/aws-exports'; +import awsExports from '@environments/auth/adminui-auth-with-totp-mfa/src/aws-exports'; export default awsExports; diff --git a/examples/vue/src/pages/ui/components/authenticator/hub-events/aws-exports.js b/examples/vue/src/pages/ui/components/authenticator/hub-events/aws-exports.js index 1c171397cfa..72615b72cc0 100644 --- a/examples/vue/src/pages/ui/components/authenticator/hub-events/aws-exports.js +++ b/examples/vue/src/pages/ui/components/authenticator/hub-events/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-email/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-email/src/aws-exports'; export default awsExports; diff --git a/examples/vue/src/pages/ui/components/authenticator/i18n/aws-exports.js b/examples/vue/src/pages/ui/components/authenticator/i18n/aws-exports.js index 0da80731de0..697ba883031 100644 --- a/examples/vue/src/pages/ui/components/authenticator/i18n/aws-exports.js +++ b/examples/vue/src/pages/ui/components/authenticator/i18n/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-username-no-attributes/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-username-no-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/vue/src/pages/ui/components/authenticator/modal/aws-exports.js b/examples/vue/src/pages/ui/components/authenticator/modal/aws-exports.js index c2c186889d6..697ba883031 100644 --- a/examples/vue/src/pages/ui/components/authenticator/modal/aws-exports.js +++ b/examples/vue/src/pages/ui/components/authenticator/modal/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-username/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-username-no-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/vue/src/pages/ui/components/authenticator/reset-password/aws-exports.js b/examples/vue/src/pages/ui/components/authenticator/reset-password/aws-exports.js index 0da80731de0..697ba883031 100644 --- a/examples/vue/src/pages/ui/components/authenticator/reset-password/aws-exports.js +++ b/examples/vue/src/pages/ui/components/authenticator/reset-password/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-username-no-attributes/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-username-no-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/vue/src/pages/ui/components/authenticator/sign-in-federated/aws-exports.js b/examples/vue/src/pages/ui/components/authenticator/sign-in-federated/aws-exports.js index baad87f87a8..1d34ae15e3c 100644 --- a/examples/vue/src/pages/ui/components/authenticator/sign-in-federated/aws-exports.js +++ b/examples/vue/src/pages/ui/components/authenticator/sign-in-federated/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-federated/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-federated/src/aws-exports'; export default awsExports; diff --git a/examples/vue/src/pages/ui/components/authenticator/sign-in-sms-mfa/aws-exports.js b/examples/vue/src/pages/ui/components/authenticator/sign-in-sms-mfa/aws-exports.js index 6f9e23ca3e4..d79d4b7224a 100644 --- a/examples/vue/src/pages/ui/components/authenticator/sign-in-sms-mfa/aws-exports.js +++ b/examples/vue/src/pages/ui/components/authenticator/sign-in-sms-mfa/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-phone-and-sms-mfa/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-phone-and-sms-mfa/src/aws-exports'; export default awsExports; diff --git a/examples/vue/src/pages/ui/components/authenticator/sign-in-totp-mfa/aws-exports.js b/examples/vue/src/pages/ui/components/authenticator/sign-in-totp-mfa/aws-exports.js index 433564f092c..ba613a2e36d 100644 --- a/examples/vue/src/pages/ui/components/authenticator/sign-in-totp-mfa/aws-exports.js +++ b/examples/vue/src/pages/ui/components/authenticator/sign-in-totp-mfa/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/adminui-auth-with-totp-mfa/src/aws-exports'; +import awsExports from '@environments/auth/adminui-auth-with-totp-mfa/src/aws-exports'; export default awsExports; diff --git a/examples/vue/src/pages/ui/components/authenticator/sign-in-with-email/aws-exports.js b/examples/vue/src/pages/ui/components/authenticator/sign-in-with-email/aws-exports.js index 1c171397cfa..72615b72cc0 100644 --- a/examples/vue/src/pages/ui/components/authenticator/sign-in-with-email/aws-exports.js +++ b/examples/vue/src/pages/ui/components/authenticator/sign-in-with-email/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-email/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-email/src/aws-exports'; export default awsExports; diff --git a/examples/vue/src/pages/ui/components/authenticator/sign-in-with-phone/aws-exports.js b/examples/vue/src/pages/ui/components/authenticator/sign-in-with-phone/aws-exports.js index 890c17da7e9..03a5e3cd520 100644 --- a/examples/vue/src/pages/ui/components/authenticator/sign-in-with-phone/aws-exports.js +++ b/examples/vue/src/pages/ui/components/authenticator/sign-in-with-phone/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-phone-number/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-phone-number/src/aws-exports'; export default awsExports; diff --git a/examples/vue/src/pages/ui/components/authenticator/sign-in-with-username/aws-exports.js b/examples/vue/src/pages/ui/components/authenticator/sign-in-with-username/aws-exports.js index 0da80731de0..697ba883031 100644 --- a/examples/vue/src/pages/ui/components/authenticator/sign-in-with-username/aws-exports.js +++ b/examples/vue/src/pages/ui/components/authenticator/sign-in-with-username/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-username-no-attributes/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-username-no-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/vue/src/pages/ui/components/authenticator/sign-up-with-attributes/aws-exports.js b/examples/vue/src/pages/ui/components/authenticator/sign-up-with-attributes/aws-exports.js index e1bca2b61d0..cc988866d71 100644 --- a/examples/vue/src/pages/ui/components/authenticator/sign-up-with-attributes/aws-exports.js +++ b/examples/vue/src/pages/ui/components/authenticator/sign-up-with-attributes/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-all-attributes/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-all-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/vue/src/pages/ui/components/authenticator/sign-up-with-email-lambda/aws-exports.js b/examples/vue/src/pages/ui/components/authenticator/sign-up-with-email-lambda/aws-exports.js index 1f5332787c4..3771ab75576 100644 --- a/examples/vue/src/pages/ui/components/authenticator/sign-up-with-email-lambda/aws-exports.js +++ b/examples/vue/src/pages/ui/components/authenticator/sign-up-with-email-lambda/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-email-lambda-signup-trigger/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-email-lambda-signup-trigger/src/aws-exports'; export default awsExports; diff --git a/examples/vue/src/pages/ui/components/authenticator/sign-up-with-email/aws-exports.js b/examples/vue/src/pages/ui/components/authenticator/sign-up-with-email/aws-exports.js index 1c171397cfa..72615b72cc0 100644 --- a/examples/vue/src/pages/ui/components/authenticator/sign-up-with-email/aws-exports.js +++ b/examples/vue/src/pages/ui/components/authenticator/sign-up-with-email/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-email/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-email/src/aws-exports'; export default awsExports; diff --git a/examples/vue/src/pages/ui/components/authenticator/sign-up-with-phone/aws-exports.js b/examples/vue/src/pages/ui/components/authenticator/sign-up-with-phone/aws-exports.js index 890c17da7e9..03a5e3cd520 100644 --- a/examples/vue/src/pages/ui/components/authenticator/sign-up-with-phone/aws-exports.js +++ b/examples/vue/src/pages/ui/components/authenticator/sign-up-with-phone/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-phone-number/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-phone-number/src/aws-exports'; export default awsExports; diff --git a/examples/vue/src/pages/ui/components/authenticator/sign-up-with-username/aws-exports.js b/examples/vue/src/pages/ui/components/authenticator/sign-up-with-username/aws-exports.js index c2c186889d6..697ba883031 100644 --- a/examples/vue/src/pages/ui/components/authenticator/sign-up-with-username/aws-exports.js +++ b/examples/vue/src/pages/ui/components/authenticator/sign-up-with-username/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-username/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-username-no-attributes/src/aws-exports'; export default awsExports; diff --git a/examples/vue/src/pages/ui/components/authenticator/useAuthenticator/aws-exports.js b/examples/vue/src/pages/ui/components/authenticator/useAuthenticator/aws-exports.js index 0da80731de0..697ba883031 100644 --- a/examples/vue/src/pages/ui/components/authenticator/useAuthenticator/aws-exports.js +++ b/examples/vue/src/pages/ui/components/authenticator/useAuthenticator/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@environments/auth-with-username-no-attributes/src/aws-exports'; +import awsExports from '@environments/auth/auth-with-username-no-attributes/src/aws-exports'; export default awsExports; diff --git a/guides/react/protected-routes/src/index.js b/guides/react/protected-routes/src/index.js index 8415bce030d..18354429b66 100644 --- a/guides/react/protected-routes/src/index.js +++ b/guides/react/protected-routes/src/index.js @@ -8,7 +8,7 @@ import { Amplify } from 'aws-amplify'; * Update this import to match the path to your aws-exports.js file: * import aws_exports from "./aws-exports"; */ -import aws_exports from '../../../../environments/auth-with-email/src/aws-exports.js'; +import aws_exports from '../../../../environments/auth/auth-with-email/src/aws-exports'; import './index.css'; diff --git a/package.json b/package.json index fad6eedc3f0..40adb948f59 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ ] }, "resolutions": { + "@types/react": "17.0.47", "ansi-regex": "5.0.1", "ansi-html": "0.0.8", "async": "^3.2.2", diff --git a/packages/angular/projects/ui-angular/src/lib/primitives/phone-number-field/phone-number-field.component.html b/packages/angular/projects/ui-angular/src/lib/primitives/phone-number-field/phone-number-field.component.html index 62b29ed7db9..3eacddbc90e 100644 --- a/packages/angular/projects/ui-angular/src/lib/primitives/phone-number-field/phone-number-field.component.html +++ b/packages/angular/projects/ui-angular/src/lib/primitives/phone-number-field/phone-number-field.component.html @@ -13,7 +13,11 @@
diff --git a/packages/e2e/features/ui/components/authenticator/sign-up-with-username.feature b/packages/e2e/features/ui/components/authenticator/sign-up-with-username.feature index 73e59d3d0f8..93a00702aa3 100644 --- a/packages/e2e/features/ui/components/authenticator/sign-up-with-username.feature +++ b/packages/e2e/features/ui/components/authenticator/sign-up-with-username.feature @@ -9,10 +9,6 @@ Feature: Sign Up with Username Scenario: Login mechanism set to "username" Then I see "Username" as an input field - @angular @react @vue - Scenario: "Preferred Username" is included from `aws_cognito_signup_attributes` - Then I see "Preferred Username" as a "text" field - @angular @react @vue Scenario: "Email" is included from `aws_cognito_verification_mechanisms` Then I see "Email" as an "email" field @@ -28,7 +24,6 @@ Feature: Sign Up with Username And I type my password And I confirm my password And I type my "email" with status "UNCONFIRMED" - And I type a new "preferred username" And I click the "Create Account" button Then I see "Your code is on the way" And I see "Confirmation Code" diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index c4d4e58e558..73d1b11a2e4 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,13 @@ # @aws-amplify/ui-react +## 3.4.1 + +### Patch Changes + +- [#2450](https://github.com/aws-amplify/amplify-ui/pull/2450) [`ed41e28d1`](https://github.com/aws-amplify/amplify-ui/commit/ed41e28d1abb689f7c74d9f13b9da96a21806973) Thanks [@thaddmt](https://github.com/thaddmt)! - Fix location search bug + +* [#2469](https://github.com/aws-amplify/amplify-ui/pull/2469) [`322bc2ce7`](https://github.com/aws-amplify/amplify-ui/commit/322bc2ce7e8edd92b098c8f2dd65af3c99184c35) Thanks [@hbuchel](https://github.com/hbuchel)! - fix(react): hide svg icon images in a11y tree in Rating component so redundant text is not announced + ## 3.4.0 ### Minor Changes diff --git a/packages/react/package.json b/packages/react/package.json index 1e2c859391a..887d7157d4a 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/ui-react", - "version": "3.4.0", + "version": "3.4.1", "main": "dist/index.js", "module": "dist/esm/index.js", "exports": { @@ -68,7 +68,7 @@ "lodash": "4.17.21", "mapbox-gl": "1.13.1", "maplibre-gl": "2.1.9", - "maplibre-gl-js-amplify": "2.0.2", + "maplibre-gl-js-amplify": "2.0.4", "qrcode": "1.5.0", "react-generate-context": "1.0.1", "react-map-gl": "7.0.15", diff --git a/packages/react/src/primitives/PhoneNumberField/CountryCodeSelect.tsx b/packages/react/src/primitives/PhoneNumberField/CountryCodeSelect.tsx index 92037972cc4..1ddacfc645f 100644 --- a/packages/react/src/primitives/PhoneNumberField/CountryCodeSelect.tsx +++ b/packages/react/src/primitives/PhoneNumberField/CountryCodeSelect.tsx @@ -3,41 +3,47 @@ import classNames from 'classnames'; import { countryDialCodes } from '@aws-amplify/ui'; import { ComponentClassNames } from '../shared/constants'; -import { CountryCodeSelectProps, Primitive } from '../types'; +import { DialCodeSelectProps, Primitive } from '../types'; import { SelectField } from '../SelectField'; -const CountryCodeSelectPrimitive: Primitive = - ({ className, dialCodeList, isReadOnly, ...props }, ref) => { - const dialList = dialCodeList ?? countryDialCodes; - const countryCodeOptions = React.useMemo( - () => - dialList.map((dialCode) => ( - // Regarding the `disabled` attribute, see comment in SelectField below - - )), - [dialList, isReadOnly] - ); +const DialCodeSelectPrimitive: Primitive = ( + { className, dialCodeList, isReadOnly, ...props }, + ref +) => { + const dialList = dialCodeList ?? countryDialCodes; + const dialCodeOptions = React.useMemo( + () => + dialList.map((dialCode) => ( + // Regarding the `disabled` attribute, see comment in SelectField below + + )), + [dialList, isReadOnly] + ); - return ( - elements do not support the `readonly` html attribute, it is suggested to use the `disabled` html attribute so that a screen reader will announce something to the user about the interactivity of the options list ( https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly) */ - aria-disabled={isReadOnly} - autoComplete="tel-country-code" - className={classNames(ComponentClassNames.CountryCodeSelect, className)} - labelHidden={true} - ref={ref} - {...props} - > - {countryCodeOptions} - - ); - }; + aria-disabled={isReadOnly} + autoComplete="tel-country-code" + className={classNames( + ComponentClassNames.CountryCodeSelect, + ComponentClassNames.DialCodeSelect, + className + )} + labelHidden={true} + ref={ref} + {...props} + > + {dialCodeOptions} + + ); +}; -export const CountryCodeSelect = React.forwardRef(CountryCodeSelectPrimitive); +export const CountryCodeSelect = React.forwardRef(DialCodeSelectPrimitive); CountryCodeSelect.displayName = 'CountryCodeSelect'; diff --git a/packages/react/src/primitives/PhoneNumberField/PhoneNumberField.tsx b/packages/react/src/primitives/PhoneNumberField/PhoneNumberField.tsx index 3b744575bf8..0d70297dcfe 100644 --- a/packages/react/src/primitives/PhoneNumberField/PhoneNumberField.tsx +++ b/packages/react/src/primitives/PhoneNumberField/PhoneNumberField.tsx @@ -6,6 +6,7 @@ import { CountryCodeSelect } from './CountryCodeSelect'; import { PhoneNumberFieldProps, Primitive } from '../types'; import { ComponentText } from '../shared/constants'; import { TextField } from '../TextField'; +import { useDeprecationWarning } from '../../hooks/useDeprecationWarning'; const PhoneNumberFieldPrimitive: Primitive = ( { @@ -13,35 +14,61 @@ const PhoneNumberFieldPrimitive: Primitive = ( className, countryCodeName, countryCodeLabel = ComponentText.PhoneNumberField.countryCodeLabel, + countryCodeRef, defaultCountryCode, + defaultDialCode, + dialCodeLabel = ComponentText.PhoneNumberField.countryCodeLabel, + dialCodeList, + dialCodeName, + dialCodeRef, hasError, isDisabled, isReadOnly, onCountryCodeChange, + onDialCodeChange, onInput, size, type, variation, - countryCodeRef, - dialCodeList, ...rest }, ref ) => { + // Merge all dial/country code values in preparation of countryCode values being removed preferring dial code values + const codeName = dialCodeName || countryCodeName; + const codeLabel = dialCodeLabel || countryCodeLabel; + const defaultCode = defaultDialCode || defaultCountryCode; + const onCodeChange = onDialCodeChange || onCountryCodeChange; + const codeRef = dialCodeRef || countryCodeRef; + + const deprecationMessage = + 'The PhoneNumberField component props: countryCodeName, countryCodeLabel, defaultCountryCode, onCountryCodeChange, and countryCodeRef props are deprecated and will be removed in the next major release of @aws-amplify/ui-react. Please update to dialCodeName, dialCodeLabel, defaultDialCode, onDialCodeChange, and dialCodeRef respectively.'; + const shouldWarn = + countryCodeName || + countryCodeLabel !== ComponentText.PhoneNumberField.countryCodeLabel || + defaultCountryCode || + onCountryCodeChange || + countryCodeRef; + + useDeprecationWarning({ + shouldWarn: !!shouldWarn, + message: deprecationMessage, + }); + return ( diff --git a/packages/react/src/primitives/PhoneNumberField/__tests__/PhoneNumberField.test.tsx b/packages/react/src/primitives/PhoneNumberField/__tests__/PhoneNumberField.test.tsx index c911b8665a1..019f04bd8d2 100644 --- a/packages/react/src/primitives/PhoneNumberField/__tests__/PhoneNumberField.test.tsx +++ b/packages/react/src/primitives/PhoneNumberField/__tests__/PhoneNumberField.test.tsx @@ -185,7 +185,187 @@ describe('PhoneNumberField primitive', () => { const button = container.getElementsByTagName('button')[0]; userEvent.click(button); expect(console.log).toHaveBeenCalledWith('+40 1234567'); + }); + + describe('Using Dial Code', () => { + const dialCodeSetup = async ({ + defaultDialCode = '+1', + label = 'Phone Number', + dialCodeLabel = 'dial code', + ...rest + }: Partial) => { + render( + + ); + + return { + $phoneInput: await screen.findByRole('textbox', { + name: /phone number/i, + }), + $dialCodeSelector: await screen.findByRole('combobox', { + name: /dial code/i, + }), + }; + }; + + const DialCodeReadOnlyFormTest = () => { + const inputRef = React.useRef(null); + const dialCodeRef = React.useRef(null); + + const handleSubmit = (e) => { + e.preventDefault(); + console.log(`${dialCodeRef.current.value} ${inputRef.current.value}`); + }; + + return ( + + + + + ); + }; + + it('should forward ref and dialCodeRef to DOM elements', async () => { + const ref = React.createRef(); + const dialCodeRef = React.createRef(); + await dialCodeSetup({ ref, dialCodeRef }); + + await screen.findByRole('textbox'); + expect(ref.current.nodeName).toBe('INPUT'); + expect(dialCodeRef.current.nodeName).toBe('SELECT'); + }); + + it('should render a country code selector with an accessible role', async () => { + const { $dialCodeSelector } = await dialCodeSetup({}); + + expect($dialCodeSelector).toBeDefined(); + }); + + it('should render a country code selector with an accessible label', async () => { + const { $dialCodeSelector } = await dialCodeSetup({}); + + expect($dialCodeSelector).toBeDefined(); + }); + + it('should render a phone input field with an accessible role', async () => { + const { $phoneInput } = await dialCodeSetup({}); + + expect($phoneInput).toBeDefined(); + }); + + it('should render a phone input field with an accessible role', async () => { + await dialCodeSetup({}); + const $phoneInput = await screen.findByLabelText(/phone number/i); + + expect($phoneInput).toBeDefined(); + }); + + it('should use a specified defaultDialCode', async () => { + const defaultDialCode = '+7'; + const { $dialCodeSelector } = await dialCodeSetup({ defaultDialCode }); + + expect($dialCodeSelector).toHaveValue(defaultDialCode); + }); + + it('should always use type "tel"', async () => { + const { $phoneInput } = await dialCodeSetup({}); + + expect($phoneInput).toHaveAttribute('type', 'tel'); + }); - console.log = originalLog; + it('should have "tel-national" as the default autocomplete attribute', async () => { + const { $phoneInput } = await dialCodeSetup({}); + + expect($phoneInput).toHaveAttribute('autocomplete', 'tel-national'); + }); + + it('should render classname for PhoneNumberField', async () => { + const className = 'test-class-name'; + const testId = 'PhoneNumberFieldTestId'; + await dialCodeSetup({ className, testId }); + const $phoneInput = await screen.findByTestId(testId); + + expect($phoneInput).toHaveClass(className); + expect($phoneInput).toHaveClass(ComponentClassNames.PhoneNumberField); + }); + + it('should be able to set a size', async () => { + const { $dialCodeSelector, $phoneInput } = await dialCodeSetup({ + size: 'large', + }); + + expect($phoneInput).toHaveAttribute('data-size', 'large'); + expect($dialCodeSelector).toHaveAttribute('data-size', 'large'); + }); + + it('should be able to set a variation', async () => { + const { $dialCodeSelector, $phoneInput } = await dialCodeSetup({ + variation: 'quiet', + }); + + expect($phoneInput).toHaveAttribute('data-variation', 'quiet'); + expect($dialCodeSelector).toHaveAttribute('data-variation', 'quiet'); + }); + + it('should fire onChange handler when phone input field is changed', async () => { + const onChange = jest.fn(); + const { $phoneInput } = await dialCodeSetup({ onChange }); + userEvent.type($phoneInput, '1'); + + expect(onChange).toHaveBeenCalled(); + }); + + it('should fire onInput handler when phone input field is changed', async () => { + const onInput = jest.fn(); + const { $phoneInput } = await dialCodeSetup({ onInput }); + userEvent.type($phoneInput, '1'); + + expect(onInput).toHaveBeenCalled(); + }); + + it('should fire onDialCodeChange handler when phone input field is changed', async () => { + const onDialCodeChange = jest.fn(); + const { $dialCodeSelector } = await dialCodeSetup({ onDialCodeChange }); + userEvent.selectOptions($dialCodeSelector, '+7'); + + expect(onDialCodeChange).toHaveBeenCalled(); + }); + + /* + Since