From e9de3ef919fa6e6ed22d8262a019294e7e95c20d Mon Sep 17 00:00:00 2001 From: James Jarvis Date: Mon, 27 Jan 2025 17:40:40 -0800 Subject: [PATCH] chore: sync main with feat-email-mfa/main (#6320) * chore(react): remove direct usage of react-test-renderer and types (#6255) * chore(deps): upgrade next deps to point to ^14.2.15 (#6263) * fix(docs): use correct listLocation attribute names in Storage Browser auth example (#6264) * chore(react-native): update allowed peerDep to >=0.70 (#6266) * chore(react): add support for react 19 (#5826) * chore(storage-browser): bump up package size limit (#6267) * chore(changeset): update react 19 changeset from patch to minor bump (#6269) * chore(react): remove radix-ui upgrades (#6268) * fix(docs): remove typo from liveness detector core docs (#6256) * Version Packages (#6261) Co-authored-by: github-actions[bot] * chore: remove temporary pin to react 18 in react@latest build tests (#6274) * chore: remove temporary use of react 18 in react@latest build tests * chore: update workflow for forced test run * chore: adjusting testing strategy, modify publish workflow instead of reusable test * chore: reverting temporary testing changes * Revert support for React 19 (#6278) * Revert "chore: remove temporary pin to react 18 in react@latest build tests (#6274)" This reverts commit d9ee32d0f251df332f030a255956ca4cef5a9b04. * Revert "fix(docs): remove typo from liveness detector core docs (#6256)" This reverts commit 9d71dd8f9559640c46f1a33dd4d8c258712d3f1b. * Revert "chore(react): remove radix-ui upgrades (#6268)" This reverts commit c623990d5fb6af635b1964a51a8ff2c807938235. * Revert "chore(changeset): update react 19 changeset from patch to minor bump (#6269)" This reverts commit 7045aeda8bed911e5f15f0ee13c4867750907204. * Revert "chore(storage-browser): bump up package size limit (#6267)" This reverts commit a79b8e9e9a2ea570fbfc0d81256389c1e212682b. * Revert "chore(react): add support for react 19 (#5826)" This reverts commit 954e9be2d055a57ebddab5b902e3e6b427d09f67. * chore: add changeset * Version Packages (#6281) Co-authored-by: github-actions[bot] * chore(deps): bump nextjs version (#6284) * chore: add v0.76 and latest to React Native build system tests (#6285) * chore: add react native v0.76 build system tests to CI * chore: add react native 'latest' to build system tests * fix(github-actions): bump upload-artifact to v4 (#6289) * feat(i18n): add Chinese translations for password fields in zh.ts (#6125) Co-authored-by: Caleb Pollman * test(e2e): add storage-browser offline tests (#6206) * test(e2e): add storage-browser offline tests * address feedback * fix EOF * fix EOF * Update packages/e2e/cypress/integration/common/shared.ts Co-authored-by: Caleb Pollman * address feedback --------- Co-authored-by: Caleb Pollman * chore(docs): update react web Authenticator hideSignUp example (#6290) * feat(react): reenable react 19 support (#6296) * Revert "Revert support for React 19 (#6278)" This reverts commit 475e4a37a404bd116ec55e95579acb8f2d23c9a4. * update radix deps * remove radix namespace sanitization * migrate/cleanup FileUploader component override example * add ExtendedView component for surfacing ReactNode conflicts * Remove extended and overridden react types * chore(build-system-tests): disable react@latest tests (#6297) * Version Packages (#6292) Co-authored-by: github-actions[bot] * chore(ci): add retry delays to build tests & upgrade actions/cache (#6291) * chore: add delay between install retries, swap RN to use install script * chore: upgrade actions/cache to v4.2.0 * chore(build-system-tests): reenable react@latest tests (#6299) * fix(slider): remounted controlled value not updating (#6301) * fix(ui): fix and add missing sv translations (#6288) Co-authored-by: Jordan Van Ness Co-authored-by: Caleb Pollman * chore(changeset): add changeset for PR #6301 (#6303) * fix(react-storage): enable default checksum algorithm for create folder action (#6305) * fix: include default checksum alg header in createFolder action * test: update createFolder test spec for checksum alg header * chore: adding changeset * Version Packages (#6304) Co-authored-by: github-actions[bot] * chore(docs): Update Android UI component versions (#6311) * chore(deps-dev): bump vite from 5.2.14 to 5.4.12 (#6307) Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.2.14 to 5.4.12. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v5.4.12/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v5.4.12/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(storage-browser): export UseView type (#6314) * chore(ui-react-storage): clean up outdated styles file (#6197) Co-authored-by: ashika112 <155593080+ashika112@users.noreply.github.com> * chore(react-native): add fed sign in example env (#6318) --------- Signed-off-by: dependabot[bot] Co-authored-by: Caleb Pollman Co-authored-by: Tiffany Yeung Co-authored-by: Jordan Van Ness Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] Co-authored-by: BeforeSunset16 <145817984+BeforeSunset16@users.noreply.github.com> Co-authored-by: Caleb Pollman Co-authored-by: Ashwin Kumar Co-authored-by: Danny Banks Co-authored-by: berg-dee Co-authored-by: Vincent Tran Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: AllanZhengYP Co-authored-by: ashika112 <155593080+ashika112@users.noreply.github.com> --- .changeset/tame-rockets-perform.md | 5 + .../install-with-retries.sh | 14 +- .github/workflows/receive-fork-review.yml | 2 +- ...eusable-build-system-test-react-native.yml | 18 +- .../workflows/reusable-build-system-test.yml | 10 +- .github/workflows/reusable-e2e.yml | 26 +- .github/workflows/reusable-setup-cache.yml | 10 +- .github/workflows/reusable-unit.yml | 6 +- .../install-dependencies-with-retries.sh | 9 +- .../scripts/mega-app-install.sh | 2 +- .../components/react-native/cli/App.tsx | 2 +- .../templates/components/react/App.tsx | 13 +- docs/.eslintrc.json | 2 +- .../__snapshots__/props-table.test.ts.snap | 56 +- docs/package.json | 13 +- docs/src/components/CodeHighlight.tsx | 12 +- docs/src/components/ExpoSnack.tsx | 2 +- .../GlobalNav/components/DesktopNav.tsx | 2 +- .../GlobalNav/components/NavMenuLink.tsx | 2 +- .../components/propsTable/PropsTableBody.tsx | 2 +- .../propsTable/PropsTableExpander.tsx | 4 +- docs/src/data/frameworks.ts | 2 +- .../components/alert/AlertPropControls.tsx | 2 +- .../autocomplete/AutocompletePropControls.tsx | 2 +- .../components/avatar/AvatarPropControls.tsx | 2 +- .../components/badge/BadgePropControls.tsx | 2 +- .../CheckboxFieldPropControls.tsx | 2 +- .../collection/CollectionPropControls.tsx | 2 +- .../divider/DividerPropControls.tsx | 2 +- .../fieldset/FieldsetPropControls.tsx | 2 +- .../components/flex/FlexPropControls.tsx | 2 +- .../grid/GridContainerPropControls.tsx | 2 +- .../components/grid/GridItemPropControls.tsx | 2 +- .../heading/HeadingPropControls.tsx | 2 +- .../HighlightMatchPropControls.tsx | 2 +- .../components/icon/IconPropControls.tsx | 2 +- .../components/image/ImagePropControls.tsx | 2 +- .../components/input/InputPropControls.tsx | 2 +- .../components/link/LinkPropControls.tsx | 2 +- .../components/menu/MenuPropControls.tsx | 2 +- .../message/MessagePropControls.tsx | 2 +- .../pagination/PaginationPropControls.tsx | 2 +- .../passwordFieldPropControls.tsx | 2 +- .../PhoneNumberFieldPropControls.tsx | 2 +- .../RadioGroupFieldPropControls.tsx | 2 +- .../components/rating/RatingPropControls.tsx | 2 +- .../searchfield/SearchFieldPropControls.tsx | 2 +- .../selectfield/SelectFieldPropControls.tsx | 2 +- .../components/shared/StylePropControls.tsx | 2 +- .../sliderfield/SliderFieldPropControls.tsx | 2 +- .../switchfield/SwitchPropControls.tsx | 2 +- .../components/table/TablePropControls.tsx | 2 +- .../components/tabs/TabsPropControls.tsx | 2 +- .../components/text/TextPropControls.tsx | 2 +- .../TextAreaFieldPropControls.tsx | 2 +- .../textfield/TextFieldPropControls.tsx | 2 +- .../togglebutton/ToggleButtonPropControls.tsx | 2 +- .../components/view/ViewPropControls.tsx | 2 +- .../configuration/hidesignup.web.mdx | 12 +- .../customization/LabelsAndTextDemo.tsx | 2 +- .../authenticator/quick-start.mdx | 2 +- .../customization/CustomizationComponents.tsx | 2 +- .../liveness/full-api.react.mdx | 2 +- .../liveness/quick-start-add.android.mdx | 4 +- .../liveness/quick-start-pull.android.mdx | 2 +- .../examples/ComponentOverrides.tsx | 120 -- .../storage/fileuploader/examples/index.ts | 1 - .../storage/fileuploader/react.mdx | 4 +- .../storage/storage-browser/react.mdx | 10 +- .../gen2/auth-with-email-mfa/package.json | 8 + .../package.json | 8 + environments/auth/package.json | 2 +- environments/generate-gen2-environments.sh | 5 + examples/angular/package.json | 2 +- examples/next-app-router/package.json | 4 +- examples/next/package.json | 19 +- .../ai/ai-conversation/context.page.tsx | 2 +- .../with-custom-components/index.page.tsx | 4 +- .../component-overrides/amplify_outputs.js | 2 + .../component-overrides/index.page.tsx | 128 ++ .../default-auth/routed/StorageBrowser.ts | 1 + examples/react-native/README.md | 48 + .../android/app/src/main/AndroidManifest.xml | 2 +- examples/react-native/ios/Podfile.lock | 466 ++++---- .../react-native/ios/ReactNative/Info.plist | 2 +- examples/react-native/package.json | 5 +- examples/react-native/src/App/App.tsx | 1 + .../features/InAppMessaging/Demo/Example.tsx | 167 +-- .../social-providers/aws-exports.js | 2 +- examples/vue/package.json | 2 +- package.json | 16 +- .../angular/projects/ui-angular/CHANGELOG.md | 14 + .../angular/projects/ui-angular/package.json | 4 +- .../projects/ui-angular/src/version.ts | 2 +- packages/configs/.eslintrc.js | 2 +- .../configs/typescript/tsconfig.base.json | 20 +- .../e2e/cypress/integration/common/shared.ts | 6 + .../storage-browser/action-menu.feature | 70 +- .../storage/storage-browser/download.feature | 9 +- .../storage-browser/drag-and-drop.feature | 14 +- .../storage-browser/filter-locations.feature | 1 - .../navigate-locations.feature | 12 +- .../storage-browser/search-locations.feature | 9 +- packages/e2e/package.json | 2 +- packages/react-ai/CHANGELOG.md | 35 + packages/react-ai/package.json | 12 +- .../AIConversation/AIConversation.tsx | 2 +- .../context/AIContextContext.tsx | 2 +- .../AIConversation/context/ActionsContext.tsx | 2 +- .../context/AttachmentContext.tsx | 2 +- .../AIConversation/context/AvatarsContext.tsx | 2 +- .../context/ControlsContext.tsx | 2 +- .../context/ConversationInputContext.tsx | 2 +- .../context/FallbackComponentContext.tsx | 2 +- .../AIConversation/context/LoadingContext.tsx | 2 +- .../context/MessageVariantContext.tsx | 2 +- .../context/MessagesContext.tsx | 2 +- .../context/ResponseComponentsContext.tsx | 2 +- .../context/SendMessageContext.tsx | 2 +- .../context/SuggestedPromptsContext.tsx | 2 +- .../context/WelcomeMessageContext.tsx | 2 +- .../AIConversation/createAIConversation.tsx | 2 +- .../src/components/AIConversation/types.ts | 8 +- .../views/Controls/AttachmentListControl.tsx | 8 +- .../views/Controls/DefaultMessageControl.tsx | 2 +- .../views/Controls/MessagesControl.tsx | 8 +- .../views/default/Attachments.tsx | 2 +- .../react-ai/src/hooks/useAIConversation.tsx | 4 +- packages/react-ai/src/version.ts | 2 +- packages/react-auth/CHANGELOG.md | 38 + packages/react-auth/package.json | 14 +- packages/react-auth/src/version.ts | 2 +- packages/react-core-auth/CHANGELOG.md | 30 + packages/react-core-auth/package.json | 8 +- .../ComponentRoute/ComponentRouteContext.tsx | 2 +- .../context/Machine/MachineContext.tsx | 2 +- .../Authenticator/context/Primitives/types.ts | 17 +- .../Authenticator/createProvider/types.ts | 2 +- .../react-core-notifications/CHANGELOG.md | 42 + .../react-core-notifications/package.json | 8 +- .../InAppMessagingContext.ts | 14 - .../InAppMessagingContext.tsx | 49 + .../__tests__/InAppMessagingContext.spec.tsx | 53 + .../__tests__/useInAppMessagingState.ts} | 86 +- .../context/InAppMessagingContext/index.ts | 4 + .../useInAppMessagingState.ts | 24 + .../InAppMessagingProvider.tsx | 47 - .../context/InAppMessagingProvider/index.ts | 4 - .../src/InAppMessaging/context/index.ts | 1 - .../src/InAppMessaging/hooks/index.ts | 1 - .../__tests__/useInAppMessaging.spec.tsx | 25 - .../hooks/useInAppMessaging/index.ts | 4 - .../useInAppMessaging/useInAppMessaging.ts | 23 - .../useMessage/__tests__/useMessage.spec.ts | 5 +- .../hooks/useMessage/useMessage.ts | 6 +- packages/react-core/CHANGELOG.md | 34 + packages/react-core/jest.config.ts | 1 + packages/react-core/jest.setup.ts | 1 + packages/react-core/package.json | 8 +- .../context/AuthenticatorProvider.tsx | 2 +- .../__tests__/AuthenticatorProvider.test.tsx | 2 +- .../__snapshots__/useField.spec.ts.snap | 1 + .../__snapshots__/useForm.spec.ts.snap | 1 + .../FormCore/__tests__/useForm.spec.ts | 4 +- .../components/FormCore/withFormProvider.tsx | 10 +- .../RenderNothing/RenderNothing.tsx | 4 +- .../__tests__/RenderNothing.spec.tsx | 6 +- .../react-core/src/hooks/usePreviousValue.ts | 2 +- packages/react-geo/CHANGELOG.md | 38 + packages/react-geo/package.json | 8 +- .../LocationSearch/LocationSearch.tsx | 4 +- packages/react-geo/src/version.ts | 2 +- packages/react-liveness/CHANGELOG.md | 42 + packages/react-liveness/package.json | 10 +- .../FaceLivenessDetector.tsx | 2 +- .../FaceLivenessDetectorCore.tsx | 2 +- .../LivenessCheck/LivenessCameraModule.tsx | 2 +- .../FaceLivenessDetector/__mocks__/utils.tsx | 2 +- .../FaceLivenessDetectorProvider.tsx | 2 +- .../shared/DefaultStartScreenComponents.tsx | 6 +- .../shared/FaceLivenessErrorModal.tsx | 2 +- .../LivenessIconWithPopover.test.tsx | 3 +- packages/react-liveness/src/version.ts | 2 +- packages/react-liveness/tsconfig.json | 1 + packages/react-native-auth/CHANGELOG.md | 34 + packages/react-native-auth/package.json | 10 +- packages/react-native-auth/src/version.ts | 2 +- packages/react-native/CHANGELOG.md | 48 + packages/react-native/package.json | 12 +- .../src/Authenticator/Authenticator.tsx | 2 +- .../ConfirmResetPassword.tsx | 2 +- .../__tests__/ConfirmResetPassword.spec.tsx | 2 +- .../Defaults/ConfirmSignIn/ConfirmSignIn.tsx | 2 +- .../__tests__/ConfirmSignIn.spec.tsx | 2 +- .../Defaults/ConfirmSignUp/ConfirmSignUp.tsx | 2 +- .../ConfirmVerifyUser/ConfirmVerifyUser.tsx | 2 +- .../ForceNewPassword/ForceNewPassword.tsx | 2 +- .../ForgotPassword/ForgotPassword.tsx | 2 +- .../__tests__/ForgotPassword.spec.tsx | 2 +- .../Defaults/SetupTotp/SetupTotp.tsx | 2 +- .../Authenticator/Defaults/SignIn/SignIn.tsx | 2 +- .../Defaults/SignIn/__tests__/SignIn.spec.tsx | 2 +- .../Authenticator/Defaults/SignUp/SignUp.tsx | 2 +- .../Defaults/SignUp/__tests__/SignUp.spec.tsx | 2 +- .../Defaults/VerifyUser/VerifyUser.tsx | 2 +- .../DefaultContainer/DefaultContainer.tsx | 2 +- .../DefaultContainer/InnerContainer.tsx | 2 +- .../common/DefaultContent/DefaultContent.tsx | 2 +- .../common/DefaultFooter/DefaultFooter.tsx | 2 +- .../DefaultRadioFormFields.tsx | 2 +- .../DefaultTextFormFields.tsx | 2 +- .../common/DefaultFormFields/Field.tsx | 2 +- .../common/DefaultFormFields/FieldErrors.tsx | 2 +- .../common/DefaultHeader/DefaultHeader.tsx | 2 +- .../FederatedProviderButton.tsx | 2 +- .../FederatedProviderButtons.tsx | 2 +- .../src/Authenticator/withAuthenticator.tsx | 4 +- .../BannerMessage/BannerMessage.tsx | 2 +- .../CarouselMessage/CarouselMessage.tsx | 2 +- .../CarouselMessage/CarouselMessageItem.tsx | 2 +- .../__tests__/CarouselMessage.spec.tsx | 5 +- .../FullScreenMessage/FullScreenMessage.tsx | 2 +- .../InAppMessageDisplay.tsx | 2 +- .../MessageLayout/MessageLayout.tsx | 2 +- .../MessageWrapper/MessageWrapper.tsx | 2 +- .../components/ModalMessage/ModalMessage.tsx | 2 +- .../withInAppMessaging/withInAppMessaging.tsx | 4 +- .../src/primitives/Button/Button.tsx | 2 +- .../src/primitives/Carousel/Carousel.tsx | 2 +- .../Carousel/CarouselPageIndicator.tsx | 7 +- .../Carousel/__tests__/Carousel.spec.tsx | 3 +- .../__tests__/CarouselPageIndicator.spec.tsx | 62 +- .../CarouselPageIndicator.spec.tsx.snap | 115 -- .../src/primitives/Carousel/types.ts | 1 + .../src/primitives/Checkbox/Checkbox.tsx | 2 +- .../src/primitives/Divider/Divider.tsx | 2 +- .../primitives/ErrorMessage/ErrorMessage.tsx | 2 +- .../src/primitives/Heading/Heading.tsx | 2 +- .../react-native/src/primitives/Icon/Icon.tsx | 2 +- .../src/primitives/IconButton/IconButton.tsx | 2 +- .../src/primitives/Label/Label.tsx | 2 +- .../PasswordField/PasswordField.tsx | 2 +- .../PhoneNumberField/PhoneNumberField.tsx | 2 +- .../src/primitives/Radio/Radio.tsx | 2 +- .../src/primitives/RadioGroup/RadioGroup.tsx | 2 +- .../react-native/src/primitives/Tabs/Tab.tsx | 2 +- .../react-native/src/primitives/Tabs/Tabs.tsx | 2 +- .../src/primitives/TextField/TextField.tsx | 2 +- .../react-native/src/theme/ThemeProvider.tsx | 2 +- packages/react-native/src/version.ts | 2 +- packages/react-notifications/CHANGELOG.md | 48 + packages/react-notifications/package.json | 14 +- .../InAppMessaging/Backdrop/Backdrop.tsx | 5 +- .../InAppMessaging/Backdrop/withBackdrop.tsx | 6 +- .../BannerMessage/BannerMessage.tsx | 4 +- .../CloseIconButton/CloseIconButton.tsx | 2 +- .../FullScreenMessage/FullScreenMessage.tsx | 2 +- .../InAppMessageDisplay.tsx | 2 +- .../MessageLayout/MessageLayout.tsx | 2 +- .../ModalMessage/ModalMessage.tsx | 4 +- .../withInAppMessaging/withInAppMessaging.tsx | 4 +- packages/react-notifications/src/version.ts | 2 +- packages/react-storage/CHANGELOG.md | 46 + packages/react-storage/package.json | 22 +- packages/react-storage/rollup.config.mjs | 9 - .../components/FileUploader/FileUploader.tsx | 2 +- .../hooks/useFileUploader/useFileUploader.ts | 6 +- .../FileUploader/ui/Container/Container.tsx | 2 +- .../ui/Container/__tests__/Container.spec.tsx | 2 +- .../FileUploader/ui/DropZone/DropZone.tsx | 2 +- .../FileUploader/ui/FileList/FileControl.tsx | 2 +- .../FileUploader/ui/FileList/FileDetails.tsx | 2 +- .../FileUploader/ui/FileList/FileList.tsx | 2 +- .../ui/FileList/FileRemoveButton.tsx | 2 +- .../ui/FileList/FileStatusMessage.tsx | 2 +- .../ui/FileList/FileThumbnail.tsx | 2 +- .../ui/FileListFooter/FileListFooter.tsx | 2 +- .../ui/FileListHeader/FileListHeader.tsx | 2 +- .../FileUploader/ui/FilePicker/FilePicker.tsx | 2 +- .../StorageBrowser/StorageBrowserDefault.tsx | 2 +- .../__tests__/StorageBrowserDefault.spec.tsx | 5 +- .../handlers/__tests__/createFolder.spec.ts | 2 + .../actions/handlers/constants.ts | 1 + .../actions/handlers/createFolder.ts | 2 + .../StorageBrowser/actions/handlers/upload.ts | 3 +- .../context/elements/defaults.tsx | 2 +- .../StorageBrowser/createStorageBrowser.tsx | 32 +- .../src/components/StorageBrowser/index.ts | 3 +- .../src/components/StorageBrowser/types.ts | 5 +- .../__snapshots__/useView.spec.ts.snap | 3 + .../views/__tests__/useView.spec.ts | 26 + .../components/StorageBrowser/views/index.ts | 2 + .../StorageBrowser/views/useView.ts | 20 +- .../components/StorageImage/StorageImage.tsx | 2 +- .../StorageManager/StorageManager.tsx | 2 +- .../StorageManager/ui/Container/Container.tsx | 2 +- .../ui/Container/__tests__/Container.spec.tsx | 2 +- .../StorageManager/ui/DropZone/DropZone.tsx | 2 +- .../ui/FileList/FileControl.tsx | 2 +- .../ui/FileList/FileDetails.tsx | 2 +- .../StorageManager/ui/FileList/FileList.tsx | 2 +- .../ui/FileList/FileRemoveButton.tsx | 2 +- .../ui/FileList/FileStatusMessage.tsx | 2 +- .../ui/FileList/FileThumbnail.tsx | 2 +- .../ui/FileListFooter/FileListFooter.tsx | 2 +- .../ui/FileListHeader/FileListHeader.tsx | 2 +- .../ui/FilePicker/FilePicker.tsx | 2 +- .../src/styles/storage-browser-styles.ts | 1 - .../src/styles/storage-browser.css | 482 -------- packages/react-storage/src/version.ts | 2 +- packages/react/CHANGELOG.md | 44 + .../__tests__/__snapshots__/exports.ts.snap | 15 + packages/react/package.json | 19 +- .../ChangePassword/ChangePassword.tsx | 2 +- .../AccountSettings/DeleteUser/DeleteUser.tsx | 2 +- .../Authenticator/Authenticator.tsx | 9 +- .../ConfirmSignIn/ConfirmSignIn.tsx | 4 +- .../ConfirmSignUp/ConfirmSignUp.tsx | 4 +- .../FederatedSignIn/FederatedSignIn.tsx | 2 +- .../FederatedSignInButton.tsx | 10 +- .../ForceNewPassword/ForceNewPassword.tsx | 8 +- .../ForgotPassword/ConfirmResetPassword.tsx | 6 +- .../ForgotPassword/ForgotPassword.tsx | 6 +- .../RouteContainer/RouteContainer.tsx | 2 +- .../Authenticator/Router/Router.tsx | 8 +- .../Authenticator/SetupTotp/SetupTotp.tsx | 6 +- .../Authenticator/SignIn/SignIn.tsx | 4 +- .../Authenticator/SignUp/SignUp.tsx | 6 +- .../VerifyUser/ConfirmVerifyUser.tsx | 4 +- .../Authenticator/VerifyUser/VerifyUser.tsx | 8 +- .../useCustomComponents/defaultComponents.tsx | 10 +- .../shared/ConfirmSignInFooter.tsx | 2 +- .../shared/ConfirmationCodeInput.tsx | 2 +- .../Authenticator/shared/FormField.tsx | 2 +- .../Authenticator/shared/FormFields.tsx | 2 +- .../shared/RemoteErrorMessage.tsx | 2 +- .../Authenticator/shared/SignInSignUpTabs.tsx | 2 +- .../shared/TwoButtonSubmitFooter.tsx | 4 +- .../Authenticator/withAuthenticator.tsx | 2 +- .../FilterChildren/FilterChildren.tsx | 2 +- .../ThemeProvider/ComponentStyle.tsx | 2 +- .../components/ThemeProvider/GlobalStyle.tsx | 2 +- .../src/components/ThemeProvider/Style.tsx | 5 +- .../ThemeProvider/ThemeProvider.tsx | 15 +- .../components/ThemeProvider/ThemeStyle.tsx | 2 +- .../components/shared/ValidationErrors.tsx | 2 +- .../react/src/primitives/Alert/AlertIcon.tsx | 2 +- .../__tests__/CheckboxField.test.tsx | 2 +- .../src/primitives/Collection/Collection.tsx | 4 +- .../src/primitives/DropZone/DropZone.tsx | 15 +- .../primitives/DropZone/DropZoneChildren.tsx | 24 +- .../primitives/DropZone/DropZoneProvider.tsx | 2 +- .../primitives/Icon/context/IconsProvider.tsx | 2 +- .../react/src/primitives/Icon/icons/types.ts | 2 +- .../primitives/Link/__tests__/Link.test.tsx | 53 +- packages/react/src/primitives/Menu/Menu.tsx | 13 +- .../react/src/primitives/Menu/MenuItem.tsx | 8 +- .../Pagination/usePaginationItems.tsx | 2 +- .../primitives/SliderField/SliderField.tsx | 34 +- .../__tests__/SliderField.test.tsx | 22 +- .../react/src/primitives/Tabs/TabsList.tsx | 2 +- .../src/primitives/types/autocomplete.ts | 2 +- .../react/src/primitives/types/collection.ts | 4 +- packages/react/src/primitives/types/rating.ts | 4 +- packages/react/src/primitives/types/view.ts | 59 +- .../utils/primitiveWithForwardRef.ts | 2 +- packages/react/src/version.ts | 2 +- packages/ui/CHANGELOG.md | 16 + packages/ui/package.json | 2 +- .../src/i18n/dictionaries/authenticator/sv.ts | 9 +- .../src/i18n/dictionaries/authenticator/zh.ts | 2 + packages/ui/src/utils/utils.ts | 2 + packages/vue/CHANGELOG.md | 14 + packages/vue/package.json | 4 +- packages/vue/src/version.ts | 2 +- yarn.lock | 1044 ++++++++--------- 376 files changed, 2597 insertions(+), 2559 deletions(-) create mode 100644 .changeset/tame-rockets-perform.md delete mode 100644 docs/src/pages/[platform]/connected-components/storage/fileuploader/examples/ComponentOverrides.tsx create mode 100644 environments/auth/gen2/auth-with-email-mfa/package.json create mode 100644 environments/auth/gen2/auth-with-federated-sign-in-react-native/package.json create mode 100755 environments/generate-gen2-environments.sh create mode 100644 examples/next/pages/ui/components/storage/file-uploader/component-overrides/amplify_outputs.js create mode 100644 examples/next/pages/ui/components/storage/file-uploader/component-overrides/index.page.tsx delete mode 100644 packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingContext/InAppMessagingContext.ts create mode 100644 packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingContext/InAppMessagingContext.tsx create mode 100644 packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingContext/__tests__/InAppMessagingContext.spec.tsx rename packages/react-core-notifications/src/InAppMessaging/context/{InAppMessagingProvider/__tests__/InAppMessagingProvider.spec.tsx => InAppMessagingContext/__tests__/useInAppMessagingState.ts} (51%) create mode 100644 packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingContext/useInAppMessagingState.ts delete mode 100644 packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingProvider/InAppMessagingProvider.tsx delete mode 100644 packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingProvider/index.ts delete mode 100644 packages/react-core-notifications/src/InAppMessaging/hooks/useInAppMessaging/__tests__/useInAppMessaging.spec.tsx delete mode 100644 packages/react-core-notifications/src/InAppMessaging/hooks/useInAppMessaging/index.ts delete mode 100644 packages/react-core-notifications/src/InAppMessaging/hooks/useInAppMessaging/useInAppMessaging.ts create mode 100644 packages/react-core/jest.setup.ts create mode 100644 packages/react-storage/src/components/StorageBrowser/actions/handlers/constants.ts create mode 100644 packages/react-storage/src/components/StorageBrowser/views/__tests__/__snapshots__/useView.spec.ts.snap create mode 100644 packages/react-storage/src/components/StorageBrowser/views/__tests__/useView.spec.ts delete mode 100644 packages/react-storage/src/styles/storage-browser-styles.ts delete mode 100644 packages/react-storage/src/styles/storage-browser.css diff --git a/.changeset/tame-rockets-perform.md b/.changeset/tame-rockets-perform.md new file mode 100644 index 00000000000..ac84102ab2a --- /dev/null +++ b/.changeset/tame-rockets-perform.md @@ -0,0 +1,5 @@ +--- +"@aws-amplify/ui-react-storage": patch +--- + +fix(storage-browser): export UseView type diff --git a/.github/actions/install-with-retries/install-with-retries.sh b/.github/actions/install-with-retries/install-with-retries.sh index c9b1d0f8a01..945b335fc58 100755 --- a/.github/actions/install-with-retries/install-with-retries.sh +++ b/.github/actions/install-with-retries/install-with-retries.sh @@ -17,9 +17,9 @@ if [ "$SKIP_CYPRESS_BINARY" = "true" ]; then export CYPRESS_INSTALL_BINARY=0 fi -for i in {1..3}; do +for i in {1..4}; do echo "====================" - echo "Attempt $i out of 3:" + echo "Attempt $i out of 4:" echo "====================" if [ "$NO_LOCKFILE" = "true" ]; then @@ -32,10 +32,14 @@ for i in {1..3}; do # Check return value and exit early if successful return_value=$? [ $return_value -eq 0 ] && break - echo "[ERROR]: yarn install failed with exit code $return_value, waiting to retry..." - # Sleep 5 seconds before retrying - sleep 5 + # Don't add delay at end of last attempt if last attempt fails + if [ "$i" -le 3 ]; then + # NPM publish can be flaky causing failed installs + # Add exponential backoff between retries: [4/16/64]s ~= [5/15/60]s + echo "[ERROR]: yarn install failed with exit code $return_value, waiting to retry in $((4 * i)) seconds..." + sleep $((4 ** i)) + fi done # exit 0 if last `yarn install` was successful, non-zero otherwise diff --git a/.github/workflows/receive-fork-review.yml b/.github/workflows/receive-fork-review.yml index 95c01ea4086..e89565b24de 100644 --- a/.github/workflows/receive-fork-review.yml +++ b/.github/workflows/receive-fork-review.yml @@ -26,7 +26,7 @@ jobs: echo ${{ github.event.pull_request.base.sha }} > ./commit/base_sha echo ${{ github.event.review.commit_id }} > ./commit/commit_id echo ${{ github.event.pull_request.number }} > ./commit/pr_number - - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 https://github.com/actions/upload-artifact/commit/0b7f8abb1508181956e8e162db84b466c27e18ce + - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.5.0 https://github.com/actions/upload-artifact/commit/65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 with: name: commit path: commit/ diff --git a/.github/workflows/reusable-build-system-test-react-native.yml b/.github/workflows/reusable-build-system-test-react-native.yml index d402d5ccfc5..b73de493717 100644 --- a/.github/workflows/reusable-build-system-test-react-native.yml +++ b/.github/workflows/reusable-build-system-test-react-native.yml @@ -18,7 +18,8 @@ jobs: framework: [react-native] framework-version: [ # uncomment to enable - # { formatted: latest, value: latest }, + { formatted: latest, value: latest }, + { formatted: 076, value: 0.76 }, { formatted: 075, value: 0.75 }, { formatted: 074, value: 0.74 }, { formatted: 073, value: 0.73 }, @@ -36,6 +37,9 @@ jobs: exclude: - build-tool: expo platform: ios + - build-tool: expo + platform: android + framework-version: { formatted: '076', value: '0.76' } - build-tool: expo platform: android framework-version: { formatted: '075', value: '0.75' } @@ -102,6 +106,14 @@ jobs: pkg-manager: npm node-version: 20 logfile: test.log + - framework: react-native + framework-version: { formatted: 076, value: '0.76' } + build-tool: expo + build-tool-version: 52 + platform: android + pkg-manager: npm + node-version: 20 + logfile: test.log env: MEGA_APP_NAME: rn${{ matrix.framework-version.formatted }}${{ matrix.build-tool }}${{ matrix.build-tool-version }}${{ matrix.platform }}ui${{ inputs.dist-tag }} @@ -122,7 +134,7 @@ jobs: - name: Restore CocoaPods cache if: ${{ matrix.platform == 'ios' }} id: restore-cocoapods-cache - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57 with: path: ./examples/react-native/ios/Pods key: ${{ runner.os }}-cocoapods @@ -131,7 +143,7 @@ jobs: SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1 - name: Restore node_modules cache if: ${{ matrix.platform == 'ios' }} - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57 id: restore-cache with: path: | diff --git a/.github/workflows/reusable-build-system-test.yml b/.github/workflows/reusable-build-system-test.yml index 463fca43d31..8259e341e9c 100644 --- a/.github/workflows/reusable-build-system-test.yml +++ b/.github/workflows/reusable-build-system-test.yml @@ -28,9 +28,7 @@ jobs: fail-fast: false matrix: framework: [react] - # temporarily pointing all react tests to v18 - # framework-version: [latest] - framework-version: [18] + framework-version: [latest] build-tool: [next, vite] build-tool-version: [latest] pkg-manager: [npm] @@ -125,7 +123,7 @@ jobs: - name: Delete AWS Profile run: rm -rf ~/.aws - name: Restore cypress runner from Cache - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57 id: restore-cypress-cache with: path: ~/.cache/Cypress @@ -148,7 +146,7 @@ jobs: # step, so we go ahead and update the cache entry. - name: Cache cypress runner if: steps.restore-cypress-cache.outputs.cache-hit != 'true' - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57 with: path: ~/.cache/Cypress key: ${{ runner.os }}-canary-cypress-${{ hashFiles('build-system-tests/e2e/yarn.lock') }} @@ -168,7 +166,7 @@ jobs: TAGS: '@${{ matrix.framework }}' - name: Upload videos and screenshots - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 https://github.com/actions/upload-artifact/commit/0b7f8abb1508181956e8e162db84b466c27e18ce + uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.5.0 https://github.com/actions/upload-artifact/commit/65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 if: ${{ failure() && steps.e2e.outcome != 'success' }} with: name: canary-cypress-error-${{ env.MEGA_APP_NAME }} diff --git a/.github/workflows/reusable-e2e.yml b/.github/workflows/reusable-e2e.yml index a316cc23111..107ea3aa743 100644 --- a/.github/workflows/reusable-e2e.yml +++ b/.github/workflows/reusable-e2e.yml @@ -91,7 +91,7 @@ jobs: persist-credentials: false - name: Next.js Cache - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57 with: path: ${{ github.workspace }}/.next/cache key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }} @@ -107,7 +107,7 @@ jobs: SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2 - name: Restore cypress runner Cache - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57 id: restore-cypress-cache with: path: ~/.cache/Cypress @@ -116,7 +116,7 @@ jobs: SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1 - name: Restore node_modules cache - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57 id: restore-cache with: path: | @@ -127,7 +127,7 @@ jobs: SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - name: Restore ui/dist cache - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57 id: restore-ui-cache with: path: ./packages/ui/dist @@ -135,7 +135,7 @@ jobs: - name: Restore ${{ matrix.package }}/dist cache id: restore-package-cache - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57 with: path: ./packages/${{ matrix.package }}/dist key: ${{ runner.os }}-${{ matrix.package }}-${{ inputs.commit }} @@ -331,7 +331,7 @@ jobs: VALID_PASSWORD: ${{ secrets.VALID_PASSWORD }} - name: Upload failure screenshots and errors - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 https://github.com/actions/upload-artifact/commit/0b7f8abb1508181956e8e162db84b466c27e18ce + uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.5.0 https://github.com/actions/upload-artifact/commit/65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 if: ${{ failure() && steps.e2e.outcome != 'success' }} with: name: e2e-cypress-error-${{ matrix.package }} @@ -394,7 +394,7 @@ jobs: - name: Restore CocoaPods cache id: restore-cocoapods-cache - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57 with: path: ./examples/react-native/ios/Pods key: ${{ runner.os }}-cocoapods-${{ inputs.commit }} @@ -481,7 +481,7 @@ jobs: VALID_PASSWORD: ${{ secrets.VALID_PASSWORD }} - name: Upload failure screenshots and errors - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 https://github.com/actions/upload-artifact/commit/0b7f8abb1508181956e8e162db84b466c27e18ce + uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.5.0 https://github.com/actions/upload-artifact/commit/65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 if: ${{ failure() && steps.e2e-ios.outcome != 'success' }} with: name: e2e-detox-error-react-native-ios @@ -622,7 +622,7 @@ jobs: adb -s emulator-$EMULATOR2_PORT emu kill - name: Upload failure screenshots and errors - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 https://github.com/actions/upload-artifact/commit/0b7f8abb1508181956e8e162db84b466c27e18ce + uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.5.0 https://github.com/actions/upload-artifact/commit/65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 if: ${{ failure() && steps.e2e-android.outcome != 'success' }} with: name: e2e-detox-error-react-native-android @@ -652,7 +652,7 @@ jobs: SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2 - name: Restore cypress runner Cache - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57 id: restore-cypress-cache with: path: ~/.cache/Cypress @@ -661,7 +661,7 @@ jobs: SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1 - name: Restore Puppeteer runner cache - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57 id: restore-puppeteer-cache with: path: ~/.cache/puppeteer @@ -670,7 +670,7 @@ jobs: SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1 - name: Restore node_modules cache - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57 id: restore-cache with: path: | @@ -736,7 +736,7 @@ jobs: run: yarn docs test:links - name: Upload failure screenshots and errors - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 https://github.com/actions/upload-artifact/commit/0b7f8abb1508181956e8e162db84b466c27e18ce + uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.5.0 https://github.com/actions/upload-artifact/commit/65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 if: ${{ failure() && steps.e2e.outcome != 'success' }} with: name: docs-e2e-cypress-error diff --git a/.github/workflows/reusable-setup-cache.yml b/.github/workflows/reusable-setup-cache.yml index 11e49cf03e8..9cd2969b9be 100644 --- a/.github/workflows/reusable-setup-cache.yml +++ b/.github/workflows/reusable-setup-cache.yml @@ -30,7 +30,7 @@ jobs: env: SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2 - name: Restore cypress runner from Cache - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57 id: restore-cypress-cache with: path: ~/.cache/Cypress @@ -38,7 +38,7 @@ jobs: env: SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1 - name: Restore Puppeteer runner from Cache - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57 id: restore-puppeteer-cache with: path: ~/.cache/puppeteer @@ -55,17 +55,17 @@ jobs: - name: Cache cypress runner # create new cypress cache entry only if cypress cache missed and we installed a new one. if: steps.restore-cypress-cache.outputs.cache-hit != 'true' - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57 with: path: ~/.cache/Cypress key: ${{ runner.os }}-cypress-${{ hashFiles('yarn.lock') }} - name: Cache packages/ui/dist - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57 with: path: ./packages/ui/dist key: ${{ runner.os }}-ui-${{ inputs.commit }} - name: Cache node_modules - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57 with: path: | ./node_modules diff --git a/.github/workflows/reusable-unit.yml b/.github/workflows/reusable-unit.yml index 6d767d6f0e8..241f38808c2 100644 --- a/.github/workflows/reusable-unit.yml +++ b/.github/workflows/reusable-unit.yml @@ -54,7 +54,7 @@ jobs: SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2 - name: Restore node_modules cache - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57 id: restore-cache with: path: | @@ -65,7 +65,7 @@ jobs: SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - name: Restore ui/dist cache - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57 id: restore-ui-cache with: path: ./packages/ui/dist @@ -154,7 +154,7 @@ jobs: run: yarn ${{ matrix.package }} size - name: Cache ${{ matrix.package }}/dist - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 https://github.com/actions/cache/commit/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 https://github.com/actions/cache/commit/1bd1e32a3bdc45362d1e726936510720a7c30a57 with: path: ./packages/${{ matrix.package }}/dist key: ${{ runner.os }}-${{ matrix.package }}-${{ inputs.commit }} diff --git a/build-system-tests/scripts/install-dependencies-with-retries.sh b/build-system-tests/scripts/install-dependencies-with-retries.sh index c80ca718c41..e2a14f30974 100644 --- a/build-system-tests/scripts/install-dependencies-with-retries.sh +++ b/build-system-tests/scripts/install-dependencies-with-retries.sh @@ -4,7 +4,7 @@ # Takes 2 parameters: the package manager and the dependencies to be installed # Usage: install_with_retries npm "$DEPENDENCIES" or install_with_retries yarn "$DEPENDENCIES" install_dependencies_with_retries() { - local retries=3 + local retries=4 local attempt=1 echo "Disable exit-on-error temporarily" echo "set +e" @@ -20,10 +20,13 @@ install_dependencies_with_retries() { set -e break fi + # Add exponential backoff delay between failed attempts + # [4/16/64]s ~= [5/15/60]s + local wait=$((4 ** attempt)) attempt=$((attempt + 1)) if [ $attempt -le $retries ]; then - echo "$1 install failed. Retrying in 5 seconds..." - sleep 5 + echo "$1 install failed. Retrying in $wait seconds..." + sleep $wait else echo "$1 install failed after $retries attempts." echo "Re-enable exit-on-error" diff --git a/build-system-tests/scripts/mega-app-install.sh b/build-system-tests/scripts/mega-app-install.sh index 34e57f5a306..49d4c0318a5 100755 --- a/build-system-tests/scripts/mega-app-install.sh +++ b/build-system-tests/scripts/mega-app-install.sh @@ -108,7 +108,7 @@ else # react-native-safe-area-context v5.0.0+ does not support RN 0.74 and lower DEPENDENCIES="$TAGGED_UI_FRAMEWORK @aws-amplify/react-native aws-amplify react-native-safe-area-context@^4.2.5 @react-native-community/netinfo @react-native-async-storage/async-storage react-native-get-random-values react-native-url-polyfill" echo "npm install $DEPENDENCIES" - npm install $DEPENDENCIES + install_dependencies_with_retries npm "$DEPENDENCIES" if [[ "$BUILD_TOOL" == "expo" ]]; then if [[ "$FRAMEWORK_VERSION" == "0.75" ]]; then # Expo SDK version 51.0.0 supports RN 0.74 and 0.75 but installs 0.74 by default https://expo.dev/changelog/2024/08-14-react-native-0.75#2-install-updated-packages diff --git a/build-system-tests/templates/components/react-native/cli/App.tsx b/build-system-tests/templates/components/react-native/cli/App.tsx index 6142710083f..3fa7f4a72dd 100644 --- a/build-system-tests/templates/components/react-native/cli/App.tsx +++ b/build-system-tests/templates/components/react-native/cli/App.tsx @@ -23,7 +23,7 @@ function SignOutButton() { return - + )} ); diff --git a/docs/.eslintrc.json b/docs/.eslintrc.json index b039f72a9c7..93dc6bd2d60 100644 --- a/docs/.eslintrc.json +++ b/docs/.eslintrc.json @@ -1,5 +1,5 @@ { - "extends": "next/core-web-vitals", + "extends": ["next", "next/core-web-vitals"], "rules": { "react-hooks/exhaustive-deps": "error" // override next eslint default } diff --git a/docs/__tests__/__snapshots__/props-table.test.ts.snap b/docs/__tests__/__snapshots__/props-table.test.ts.snap index ba55feddf0e..d07bed89456 100644 --- a/docs/__tests__/__snapshots__/props-table.test.ts.snap +++ b/docs/__tests__/__snapshots__/props-table.test.ts.snap @@ -2970,7 +2970,7 @@ exports[`Props Table 1`] = ` }, "children": { "name": "children", - "type": "(item: Item, index: number) => JSX.Element", + "type": "(item: Item, index: number) => React.JSX.Element", "description": "The component to be repeated\\nSame interface as Array.prototype.map", "category": "CollectionChildren", "isOptional": false @@ -7712,10 +7712,10 @@ exports[`Props Table 1`] = ` "category": "BaseInputProps", "isOptional": true }, - "placeholder": { - "name": "placeholder", - "type": "string | undefined", - "description": "Placeholder text shown when field is empty Accessibility tip: avoid putting important instructions for filling out the TextField in the placeholder. Use descriptiveText for important instructions.", + "enterKeyHint": { + "name": "enterKeyHint", + "type": "EnterKeyHint | undefined", + "description": "Defines what action label (or icon) to present for the enter key on virtual keyboards. See: [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint)", "category": "BaseInputProps", "isOptional": true }, @@ -7747,6 +7747,13 @@ exports[`Props Table 1`] = ` "category": "BaseInputProps", "isOptional": true }, + "name": { + "name": "name", + "type": "string | undefined", + "description": "Name of the field. Submitted with the form as part of a name/value pair.", + "category": "BaseInputProps", + "isOptional": true + }, "autoComplete": { "name": "autoComplete", "type": "string | undefined", @@ -7768,13 +7775,6 @@ exports[`Props Table 1`] = ` "category": "BaseInputProps", "isOptional": true }, - "enterKeyHint": { - "name": "enterKeyHint", - "type": "EnterKeyHint | undefined", - "description": "Defines what action label (or icon) to present for the enter key on virtual keyboards. See: [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint)", - "category": "BaseInputProps", - "isOptional": true - }, "isReadOnly": { "name": "isReadOnly", "type": "boolean | undefined", @@ -7789,10 +7789,10 @@ exports[`Props Table 1`] = ` "category": "BaseInputProps", "isOptional": true }, - "name": { - "name": "name", + "placeholder": { + "name": "placeholder", "type": "string | undefined", - "description": "Name of the field. Submitted with the form as part of a name/value pair.", + "description": "Placeholder text shown when field is empty Accessibility tip: avoid putting important instructions for filling out the TextField in the placeholder. Use descriptiveText for important instructions.", "category": "BaseInputProps", "isOptional": true }, @@ -8394,10 +8394,10 @@ exports[`Props Table 1`] = ` "category": "BaseInputProps", "isOptional": true }, - "placeholder": { - "name": "placeholder", - "type": "string | undefined", - "description": "Placeholder text shown when field is empty Accessibility tip: avoid putting important instructions for filling out the TextField in the placeholder. Use descriptiveText for important instructions.", + "enterKeyHint": { + "name": "enterKeyHint", + "type": "EnterKeyHint | undefined", + "description": "Defines what action label (or icon) to present for the enter key on virtual keyboards. See: [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint)", "category": "BaseInputProps", "isOptional": true }, @@ -8436,13 +8436,6 @@ exports[`Props Table 1`] = ` "category": "BaseInputProps", "isOptional": true }, - "enterKeyHint": { - "name": "enterKeyHint", - "type": "EnterKeyHint | undefined", - "description": "Defines what action label (or icon) to present for the enter key on virtual keyboards. See: [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint)", - "category": "BaseInputProps", - "isOptional": true - }, "isReadOnly": { "name": "isReadOnly", "type": "boolean | undefined", @@ -8456,6 +8449,13 @@ exports[`Props Table 1`] = ` "description": "Whether field should be marked required.", "category": "BaseInputProps", "isOptional": true + }, + "placeholder": { + "name": "placeholder", + "type": "string | undefined", + "description": "Placeholder text shown when field is empty Accessibility tip: avoid putting important instructions for filling out the TextField in the placeholder. Use descriptiveText for important instructions.", + "category": "BaseInputProps", + "isOptional": true } } }, @@ -8936,7 +8936,7 @@ exports[`Props Table 1`] = ` }, "emptyIcon": { "name": "emptyIcon", - "type": "JSX.Element | undefined", + "type": "React.JSX.Element | undefined", "description": "This will override which icon to use as the empty icon. This will only\\noverride the empty icon an will create a rating component that uses\\ndifferent icons for filled and empty icons.", "category": "RatingOptions", "isOptional": true @@ -8950,7 +8950,7 @@ exports[`Props Table 1`] = ` }, "icon": { "name": "icon", - "type": "JSX.Element | undefined", + "type": "React.JSX.Element | undefined", "description": "This will override which icon to use. This will override both\\nthe filled and empty icon values unless an empty icon is specified\\nwith the emptyIcon prop\\nDefault is ", "category": "RatingOptions", "isOptional": true diff --git a/docs/package.json b/docs/package.json index 28c3a81d73a..555a3c2778c 100644 --- a/docs/package.json +++ b/docs/package.json @@ -20,11 +20,12 @@ "postbuild:sitemap": "node --require esbuild-register ./scripts/generate-sitemap-robotstxt.ts", "start": "next start", "test": "jest", - "test:links": "node --require esbuild-register ./scripts/link-checker-puppeteer.ts" + "test:links": "node --require esbuild-register ./scripts/link-checker-puppeteer.ts", + "typecheck": "tsc --noEmit" }, "dependencies": { - "@aws-amplify/ui-react": "6.7.2", - "@aws-amplify/ui-react-storage": "3.5.1", + "@aws-amplify/ui-react": "6.9.1", + "@aws-amplify/ui-react-storage": "3.7.1", "@docsearch/react": "3", "@mdx-js/loader": "^2.1.0", "@mdx-js/mdx": "^2.1.0", @@ -34,13 +35,13 @@ "gray-matter": "^4.0.3", "lodash": "^4.17.21", "mdx-prism": "^0.3.3", - "next": "^14.2.10", + "next": "^14.2.21", "next-plugin-preval": "^1.2.1", "prism-react-renderer": "1.2.1", "raw-loader": "^4.0.2", - "react": "18.2.0", + "react": "^18.3.0", "react-copy-to-clipboard": "^5.0.4", - "react-dom": "18.2.0", + "react-dom": "^18.3.0", "react-icons": "^4.3.1", "react-live": "^4.1.8", "rehype": "^11.0.0", diff --git a/docs/src/components/CodeHighlight.tsx b/docs/src/components/CodeHighlight.tsx index 0cbf91d0923..761127161c8 100644 --- a/docs/src/components/CodeHighlight.tsx +++ b/docs/src/components/CodeHighlight.tsx @@ -43,17 +43,9 @@ export const CodeHighlight = ({ > {tokens.map((line, i) => ( - + {line.map((token, key) => ( - + ))} ))} diff --git a/docs/src/components/ExpoSnack.tsx b/docs/src/components/ExpoSnack.tsx index 97dea927d67..26f3f892f04 100644 --- a/docs/src/components/ExpoSnack.tsx +++ b/docs/src/components/ExpoSnack.tsx @@ -65,7 +65,7 @@ export const ExpoSnack = (options: SnackOptions) => { // We need a unique ID b/c we need to listen to window events that the iframe // will send and it sends the iframe id const id = React.useRef(Math.random().toString(36).substring(2, 10)); - const ref = React.useRef(); + const ref = React.useRef(undefined); const [theme, setTheme] = React.useState('light'); React.useLayoutEffect(() => { diff --git a/docs/src/components/Layout/GlobalNav/components/DesktopNav.tsx b/docs/src/components/Layout/GlobalNav/components/DesktopNav.tsx index ff7c68c0423..6bc39873ae2 100644 --- a/docs/src/components/Layout/GlobalNav/components/DesktopNav.tsx +++ b/docs/src/components/Layout/GlobalNav/components/DesktopNav.tsx @@ -12,7 +12,7 @@ interface DesktopNavProps { navLinksContainerRef: MutableRefObject; navLinksRightRef: MutableRefObject; hasSecondaryNav: boolean; - secondaryNavDesktop?: JSX.Element; + secondaryNavDesktop?: React.JSX.Element; } export function DesktopNav({ diff --git a/docs/src/components/Layout/GlobalNav/components/NavMenuLink.tsx b/docs/src/components/Layout/GlobalNav/components/NavMenuLink.tsx index a359f9ac93e..33506fbd8e2 100644 --- a/docs/src/components/Layout/GlobalNav/components/NavMenuLink.tsx +++ b/docs/src/components/Layout/GlobalNav/components/NavMenuLink.tsx @@ -15,7 +15,7 @@ export function NavMenuLink({ setShowGlobalNav?: Dispatch>; }) { const label: string = navMenuItem.label; - const linkContent: JSX.Element = + const linkContent: React.JSX.Element = navMenuItem.type === 'EXTERNAL' ? ( {label} ) : ( diff --git a/docs/src/components/propsTable/PropsTableBody.tsx b/docs/src/components/propsTable/PropsTableBody.tsx index 56484286b1d..359a0328d69 100644 --- a/docs/src/components/propsTable/PropsTableBody.tsx +++ b/docs/src/components/propsTable/PropsTableBody.tsx @@ -7,7 +7,7 @@ import { Property } from '../../../scripts/types/catalog'; export const PropsTableBody = ([ propName, { name, type, description, isOptional }, -]: [string, Property]): JSX.Element => { +]: [string, Property]): React.JSX.Element => { return ( diff --git a/docs/src/components/propsTable/PropsTableExpander.tsx b/docs/src/components/propsTable/PropsTableExpander.tsx index 353d0771295..b09aa1cf400 100644 --- a/docs/src/components/propsTable/PropsTableExpander.tsx +++ b/docs/src/components/propsTable/PropsTableExpander.tsx @@ -10,7 +10,9 @@ export function PropsTableExpander({ }: { propsSortedByCategory: SortedPropertiesByCategory; }) { - const expanderItem = (categoryProperty: CategoryProperty): JSX.Element => { + const expanderItem = ( + categoryProperty: CategoryProperty + ): React.JSX.Element => { const title = Object.keys(categoryProperty)[0]; return ( diff --git a/docs/src/data/frameworks.ts b/docs/src/data/frameworks.ts index 39a3c2e85bf..1485966ed05 100644 --- a/docs/src/data/frameworks.ts +++ b/docs/src/data/frameworks.ts @@ -61,6 +61,6 @@ export const FRAMEWORK_INSTALL_SCRIPTS = { vue: 'npm i @aws-amplify/ui-vue aws-amplify', angular: 'npm i @aws-amplify/ui-angular aws-amplify', flutter: 'flutter pub add amplify_authenticator', - android: "implementation 'com.amplifyframework.ui:liveness:1.2.6'", + android: "implementation 'com.amplifyframework.ui:liveness:1.3.0'", 'react-native': `npm i @aws-amplify/ui-react-native aws-amplify ${REACT_NATIVE_DEPENDENCIES}`, }; diff --git a/docs/src/pages/[platform]/components/alert/AlertPropControls.tsx b/docs/src/pages/[platform]/components/alert/AlertPropControls.tsx index 991817f44ac..7ac0766797f 100644 --- a/docs/src/pages/[platform]/components/alert/AlertPropControls.tsx +++ b/docs/src/pages/[platform]/components/alert/AlertPropControls.tsx @@ -19,7 +19,7 @@ export interface AlertPropControlsProps extends AlertProps { } interface AlertPropControlsInterface { - (props: AlertPropControlsProps): JSX.Element; + (props: AlertPropControlsProps): React.JSX.Element; } export const AlertPropControls: AlertPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/autocomplete/AutocompletePropControls.tsx b/docs/src/pages/[platform]/components/autocomplete/AutocompletePropControls.tsx index 6717c5685b5..66eedc75234 100644 --- a/docs/src/pages/[platform]/components/autocomplete/AutocompletePropControls.tsx +++ b/docs/src/pages/[platform]/components/autocomplete/AutocompletePropControls.tsx @@ -28,7 +28,7 @@ export interface AutocompletePropControlsProps extends AutocompleteProps { } interface AutocompletePropControlsInterface { - (props: AutocompletePropControlsProps): JSX.Element; + (props: AutocompletePropControlsProps): React.JSX.Element; } export const AutocompletePropControls: AutocompletePropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/avatar/AvatarPropControls.tsx b/docs/src/pages/[platform]/components/avatar/AvatarPropControls.tsx index 49fc5c749d7..4da13db2af0 100644 --- a/docs/src/pages/[platform]/components/avatar/AvatarPropControls.tsx +++ b/docs/src/pages/[platform]/components/avatar/AvatarPropControls.tsx @@ -16,7 +16,7 @@ export interface AvatarPropControlsProps extends AvatarProps { } interface AvatarPropControlsInterface { - (props: AvatarPropControlsProps): JSX.Element; + (props: AvatarPropControlsProps): React.JSX.Element; } export const AvatarPropControls: AvatarPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/badge/BadgePropControls.tsx b/docs/src/pages/[platform]/components/badge/BadgePropControls.tsx index 5a939d790e1..174355a225b 100644 --- a/docs/src/pages/[platform]/components/badge/BadgePropControls.tsx +++ b/docs/src/pages/[platform]/components/badge/BadgePropControls.tsx @@ -14,7 +14,7 @@ export interface BadgePropControlsProps extends BadgeProps { } interface BadgePropControlsInterface { - (props: BadgePropControlsProps): JSX.Element; + (props: BadgePropControlsProps): React.JSX.Element; } export const BadgePropControls: BadgePropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/checkboxfield/CheckboxFieldPropControls.tsx b/docs/src/pages/[platform]/components/checkboxfield/CheckboxFieldPropControls.tsx index 87e69570d2f..96dd79ae898 100644 --- a/docs/src/pages/[platform]/components/checkboxfield/CheckboxFieldPropControls.tsx +++ b/docs/src/pages/[platform]/components/checkboxfield/CheckboxFieldPropControls.tsx @@ -26,7 +26,7 @@ export interface CheckboxFieldPropControlsProps extends CheckboxFieldProps { } interface CheckboxFieldPropControlsInterface { - (props: CheckboxFieldPropControlsProps): JSX.Element; + (props: CheckboxFieldPropControlsProps): React.JSX.Element; } export const CheckboxFieldPropControls: CheckboxFieldPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/collection/CollectionPropControls.tsx b/docs/src/pages/[platform]/components/collection/CollectionPropControls.tsx index 3d7cc884356..1be0f27d6ff 100644 --- a/docs/src/pages/[platform]/components/collection/CollectionPropControls.tsx +++ b/docs/src/pages/[platform]/components/collection/CollectionPropControls.tsx @@ -18,7 +18,7 @@ export type CollectionPropControlsProps = Omit< }; interface CollectionPropControlsInterface { - (props: CollectionPropControlsProps): JSX.Element; + (props: CollectionPropControlsProps): React.JSX.Element; } export const CollectionPropControls: CollectionPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/divider/DividerPropControls.tsx b/docs/src/pages/[platform]/components/divider/DividerPropControls.tsx index d2fefb2d03d..1c5966590da 100644 --- a/docs/src/pages/[platform]/components/divider/DividerPropControls.tsx +++ b/docs/src/pages/[platform]/components/divider/DividerPropControls.tsx @@ -15,7 +15,7 @@ export interface DividerPropControlsProps extends DividerOptions { } interface DividerPropControlsInterface { - (props: DividerPropControlsProps): JSX.Element; + (props: DividerPropControlsProps): React.JSX.Element; } export const DividerPropControls: DividerPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/fieldset/FieldsetPropControls.tsx b/docs/src/pages/[platform]/components/fieldset/FieldsetPropControls.tsx index a127bfc40ef..746bfce2ba1 100644 --- a/docs/src/pages/[platform]/components/fieldset/FieldsetPropControls.tsx +++ b/docs/src/pages/[platform]/components/fieldset/FieldsetPropControls.tsx @@ -25,7 +25,7 @@ export interface FieldsetPropControlsProps extends FieldsetProps { } interface FieldsetPropControlsInterface { - (props: FieldsetPropControlsProps): JSX.Element; + (props: FieldsetPropControlsProps): React.JSX.Element; } export const FieldsetPropControls: FieldsetPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/flex/FlexPropControls.tsx b/docs/src/pages/[platform]/components/flex/FlexPropControls.tsx index 3ce0d18ca04..7a5e90f918a 100644 --- a/docs/src/pages/[platform]/components/flex/FlexPropControls.tsx +++ b/docs/src/pages/[platform]/components/flex/FlexPropControls.tsx @@ -15,7 +15,7 @@ export interface FlexPropControlsProps extends FlexProps { } interface FlexPropControlsInterface { - (props: FlexPropControlsProps): JSX.Element; + (props: FlexPropControlsProps): React.JSX.Element; } export const FlexPropControls: FlexPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/grid/GridContainerPropControls.tsx b/docs/src/pages/[platform]/components/grid/GridContainerPropControls.tsx index bfa380dc9bb..a2c74b63cda 100644 --- a/docs/src/pages/[platform]/components/grid/GridContainerPropControls.tsx +++ b/docs/src/pages/[platform]/components/grid/GridContainerPropControls.tsx @@ -22,7 +22,7 @@ export interface GridContainerPropControlsProps } interface GridContainerPropControls { - (props: GridContainerPropControlsProps): JSX.Element; + (props: GridContainerPropControlsProps): React.JSX.Element; } export const GridContainerPropControls: GridContainerPropControls = ({ diff --git a/docs/src/pages/[platform]/components/grid/GridItemPropControls.tsx b/docs/src/pages/[platform]/components/grid/GridItemPropControls.tsx index 86858e5a6c0..03be45e60d5 100644 --- a/docs/src/pages/[platform]/components/grid/GridItemPropControls.tsx +++ b/docs/src/pages/[platform]/components/grid/GridItemPropControls.tsx @@ -21,7 +21,7 @@ export interface GridItemPropControlsProps extends GridItemStyleProps { } interface GridItemPropControls { - (props: GridItemPropControlsProps): JSX.Element; + (props: GridItemPropControlsProps): React.JSX.Element; } export const GridItemPropControls: GridItemPropControls = ({ diff --git a/docs/src/pages/[platform]/components/heading/HeadingPropControls.tsx b/docs/src/pages/[platform]/components/heading/HeadingPropControls.tsx index f37402ae1d3..f41dd1d21e4 100644 --- a/docs/src/pages/[platform]/components/heading/HeadingPropControls.tsx +++ b/docs/src/pages/[platform]/components/heading/HeadingPropControls.tsx @@ -16,7 +16,7 @@ interface HeadingPropControlsProps extends HeadingProps { } interface HeadingPropControlsInterface { - (props: HeadingPropControlsProps): JSX.Element; + (props: HeadingPropControlsProps): React.JSX.Element; } export const HeadingPropControls: HeadingPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/highlightmatch/HighlightMatchPropControls.tsx b/docs/src/pages/[platform]/components/highlightmatch/HighlightMatchPropControls.tsx index 612f73b5b1a..02854f82360 100644 --- a/docs/src/pages/[platform]/components/highlightmatch/HighlightMatchPropControls.tsx +++ b/docs/src/pages/[platform]/components/highlightmatch/HighlightMatchPropControls.tsx @@ -9,7 +9,7 @@ export interface HighlightMatchPropControlsProps extends HighlightMatchProps { } interface HighlightMatchPropControlsInterface { - (props: HighlightMatchPropControlsProps): JSX.Element; + (props: HighlightMatchPropControlsProps): React.JSX.Element; } export const HighlightMatchPropControls: HighlightMatchPropControlsInterface = diff --git a/docs/src/pages/[platform]/components/icon/IconPropControls.tsx b/docs/src/pages/[platform]/components/icon/IconPropControls.tsx index f6d6d2b834e..a1097176f64 100644 --- a/docs/src/pages/[platform]/components/icon/IconPropControls.tsx +++ b/docs/src/pages/[platform]/components/icon/IconPropControls.tsx @@ -11,7 +11,7 @@ export interface IconPropControlsProps extends IconProps { } interface IconPropControlsInterface { - (props: IconPropControlsProps): JSX.Element; + (props: IconPropControlsProps): React.JSX.Element; } export const IconPropControls: IconPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/image/ImagePropControls.tsx b/docs/src/pages/[platform]/components/image/ImagePropControls.tsx index 04d5f81fd92..547518f75ea 100644 --- a/docs/src/pages/[platform]/components/image/ImagePropControls.tsx +++ b/docs/src/pages/[platform]/components/image/ImagePropControls.tsx @@ -28,7 +28,7 @@ export interface ImagePropControlsProps extends ImageOptions { } interface ImagePropControlsInterface { - (props: ImagePropControlsProps): JSX.Element; + (props: ImagePropControlsProps): React.JSX.Element; } export const ImagePropControls: ImagePropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/input/InputPropControls.tsx b/docs/src/pages/[platform]/components/input/InputPropControls.tsx index 7f86e6ea8dd..7685a31bcb5 100644 --- a/docs/src/pages/[platform]/components/input/InputPropControls.tsx +++ b/docs/src/pages/[platform]/components/input/InputPropControls.tsx @@ -20,7 +20,7 @@ export interface InputPropControlsProps extends InputProps { } interface InputPropControlsInterface { - (props: InputPropControlsProps): JSX.Element; + (props: InputPropControlsProps): React.JSX.Element; } export const InputPropControls: InputPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/link/LinkPropControls.tsx b/docs/src/pages/[platform]/components/link/LinkPropControls.tsx index 7d90fc69aa6..4e3b705b239 100644 --- a/docs/src/pages/[platform]/components/link/LinkPropControls.tsx +++ b/docs/src/pages/[platform]/components/link/LinkPropControls.tsx @@ -17,7 +17,7 @@ export interface LinkPropControlsProps extends LinkProps { } interface LinkPropControlsInterface { - (props: LinkPropControlsProps): JSX.Element; + (props: LinkPropControlsProps): React.JSX.Element; } export const LinkPropControls: LinkPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/menu/MenuPropControls.tsx b/docs/src/pages/[platform]/components/menu/MenuPropControls.tsx index f1eaa0c5bdd..6cb91df4160 100644 --- a/docs/src/pages/[platform]/components/menu/MenuPropControls.tsx +++ b/docs/src/pages/[platform]/components/menu/MenuPropControls.tsx @@ -7,7 +7,7 @@ export interface MenuPropControlsProps extends MenuProps { } interface MenuPropControlsInterface { - (props: MenuPropControlsProps): JSX.Element; + (props: MenuPropControlsProps): React.JSX.Element; } export const MenuPropControls: MenuPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/message/MessagePropControls.tsx b/docs/src/pages/[platform]/components/message/MessagePropControls.tsx index db02c3cfd25..3bdd701edc7 100644 --- a/docs/src/pages/[platform]/components/message/MessagePropControls.tsx +++ b/docs/src/pages/[platform]/components/message/MessagePropControls.tsx @@ -24,7 +24,7 @@ export interface MessagePropControlsProps extends MessageProps { } interface MessagePropControlsInterface { - (props: MessagePropControlsProps): JSX.Element; + (props: MessagePropControlsProps): React.JSX.Element; } export const MessagePropControls: MessagePropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/pagination/PaginationPropControls.tsx b/docs/src/pages/[platform]/components/pagination/PaginationPropControls.tsx index 7c25252d1a8..e1a0540a76e 100644 --- a/docs/src/pages/[platform]/components/pagination/PaginationPropControls.tsx +++ b/docs/src/pages/[platform]/components/pagination/PaginationPropControls.tsx @@ -24,7 +24,7 @@ export interface PaginationPropControlsProps extends PaginationProps { } interface PaginationPropControlsInterface { - (props: PaginationPropControlsProps): JSX.Element; + (props: PaginationPropControlsProps): React.JSX.Element; } export const PaginationPropControls: PaginationPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/passwordfield/passwordFieldPropControls.tsx b/docs/src/pages/[platform]/components/passwordfield/passwordFieldPropControls.tsx index c372ab619d6..d329f6aa031 100644 --- a/docs/src/pages/[platform]/components/passwordfield/passwordFieldPropControls.tsx +++ b/docs/src/pages/[platform]/components/passwordfield/passwordFieldPropControls.tsx @@ -50,7 +50,7 @@ export interface PasswordFieldControlsProps extends PasswordFieldProps { } interface PasswordFieldPropControlsInterface { - (props: PasswordFieldControlsProps): JSX.Element; + (props: PasswordFieldControlsProps): React.JSX.Element; } export const PasswordFieldPropControls: PasswordFieldPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/phonenumberfield/PhoneNumberFieldPropControls.tsx b/docs/src/pages/[platform]/components/phonenumberfield/PhoneNumberFieldPropControls.tsx index 2dd87fd1764..d5aba54933a 100644 --- a/docs/src/pages/[platform]/components/phonenumberfield/PhoneNumberFieldPropControls.tsx +++ b/docs/src/pages/[platform]/components/phonenumberfield/PhoneNumberFieldPropControls.tsx @@ -45,7 +45,7 @@ export type PhoneNumberFieldPropControlsProps = PhoneNumberFieldProps & { }; interface PhoneNumberFieldPropControlsInterface { - (props: PhoneNumberFieldPropControlsProps): JSX.Element; + (props: PhoneNumberFieldPropControlsProps): React.JSX.Element; } export const PhoneNumberFieldPropControls: PhoneNumberFieldPropControlsInterface = diff --git a/docs/src/pages/[platform]/components/radiogroupfield/RadioGroupFieldPropControls.tsx b/docs/src/pages/[platform]/components/radiogroupfield/RadioGroupFieldPropControls.tsx index e2990560176..02fd364608b 100644 --- a/docs/src/pages/[platform]/components/radiogroupfield/RadioGroupFieldPropControls.tsx +++ b/docs/src/pages/[platform]/components/radiogroupfield/RadioGroupFieldPropControls.tsx @@ -27,7 +27,7 @@ export interface RadioGroupFieldPropControlsProps extends RadioGroupFieldProps { } interface RadioGroupFieldPropControlsInterface { - (props: RadioGroupFieldPropControlsProps): JSX.Element; + (props: RadioGroupFieldPropControlsProps): React.JSX.Element; } export const RadioGroupFieldPropControls: RadioGroupFieldPropControlsInterface = diff --git a/docs/src/pages/[platform]/components/rating/RatingPropControls.tsx b/docs/src/pages/[platform]/components/rating/RatingPropControls.tsx index bb7b6fbbd2f..f375c833d69 100644 --- a/docs/src/pages/[platform]/components/rating/RatingPropControls.tsx +++ b/docs/src/pages/[platform]/components/rating/RatingPropControls.tsx @@ -17,7 +17,7 @@ export interface RatingPropControlsProps extends RatingProps { } interface RatingPropControlsInterface { - (props: RatingPropControlsProps): JSX.Element; + (props: RatingPropControlsProps): React.JSX.Element; } export const RatingPropControls: RatingPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/searchfield/SearchFieldPropControls.tsx b/docs/src/pages/[platform]/components/searchfield/SearchFieldPropControls.tsx index 7e36bb07a59..2dbc2ab119d 100644 --- a/docs/src/pages/[platform]/components/searchfield/SearchFieldPropControls.tsx +++ b/docs/src/pages/[platform]/components/searchfield/SearchFieldPropControls.tsx @@ -31,7 +31,7 @@ export interface SearchFieldPropControlsProps extends SearchFieldProps { } interface SearchFieldPropControlsInterface { - (props: SearchFieldPropControlsProps): JSX.Element; + (props: SearchFieldPropControlsProps): React.JSX.Element; } export const SearchFieldPropControls: SearchFieldPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/selectfield/SelectFieldPropControls.tsx b/docs/src/pages/[platform]/components/selectfield/SelectFieldPropControls.tsx index b86b4f6cd8b..759cc60db02 100644 --- a/docs/src/pages/[platform]/components/selectfield/SelectFieldPropControls.tsx +++ b/docs/src/pages/[platform]/components/selectfield/SelectFieldPropControls.tsx @@ -38,7 +38,7 @@ export interface SelectFieldPropControlsProps extends SelectFieldProps { } interface SelectFieldPropControlsInterface { - (props: SelectFieldPropControlsProps): JSX.Element; + (props: SelectFieldPropControlsProps): React.JSX.Element; } export const SelectFieldPropControls: SelectFieldPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/shared/StylePropControls.tsx b/docs/src/pages/[platform]/components/shared/StylePropControls.tsx index 2b56ca39cb3..78c44f2ab57 100644 --- a/docs/src/pages/[platform]/components/shared/StylePropControls.tsx +++ b/docs/src/pages/[platform]/components/shared/StylePropControls.tsx @@ -33,7 +33,7 @@ export interface StylePropControlsProps extends BaseStyleProps { } interface StylePropControlsInterface { - (props: StylePropControlsProps): JSX.Element; + (props: StylePropControlsProps): React.JSX.Element; } export const StylePropControls: StylePropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/sliderfield/SliderFieldPropControls.tsx b/docs/src/pages/[platform]/components/sliderfield/SliderFieldPropControls.tsx index 40dd171a6d9..3f672a9e02b 100644 --- a/docs/src/pages/[platform]/components/sliderfield/SliderFieldPropControls.tsx +++ b/docs/src/pages/[platform]/components/sliderfield/SliderFieldPropControls.tsx @@ -43,7 +43,7 @@ export interface SliderFieldPropControlsProps extends SliderFieldProps { } interface SliderFieldPropControlsInterface { - (props: SliderFieldPropControlsProps): JSX.Element; + (props: SliderFieldPropControlsProps): React.JSX.Element; } export const SliderFieldPropControls: SliderFieldPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/switchfield/SwitchPropControls.tsx b/docs/src/pages/[platform]/components/switchfield/SwitchPropControls.tsx index 96ff215aadf..f102217f608 100644 --- a/docs/src/pages/[platform]/components/switchfield/SwitchPropControls.tsx +++ b/docs/src/pages/[platform]/components/switchfield/SwitchPropControls.tsx @@ -32,7 +32,7 @@ export interface SwitchPropControlsProps extends SwitchFieldProps { } interface SwitchPropControlsInterface { - (props: SwitchPropControlsProps): JSX.Element; + (props: SwitchPropControlsProps): React.JSX.Element; } export const SwitchPropControls: SwitchPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/table/TablePropControls.tsx b/docs/src/pages/[platform]/components/table/TablePropControls.tsx index 445a5737bd7..c6781ba756e 100644 --- a/docs/src/pages/[platform]/components/table/TablePropControls.tsx +++ b/docs/src/pages/[platform]/components/table/TablePropControls.tsx @@ -18,7 +18,7 @@ export interface TablePropControlsProps extends TableProps { } interface TablePropControlsInterface { - (props: TablePropControlsProps): JSX.Element; + (props: TablePropControlsProps): React.JSX.Element; } export const TablePropControls: TablePropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/tabs/TabsPropControls.tsx b/docs/src/pages/[platform]/components/tabs/TabsPropControls.tsx index 594a27c27a7..bba0c596fcc 100644 --- a/docs/src/pages/[platform]/components/tabs/TabsPropControls.tsx +++ b/docs/src/pages/[platform]/components/tabs/TabsPropControls.tsx @@ -12,7 +12,7 @@ export interface TabsPropControlsProps extends TabsProps { } interface TabsPropControlsInterface { - (props: TabsPropControlsProps): JSX.Element; + (props: TabsPropControlsProps): React.JSX.Element; } export const TabsPropControls: TabsPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/text/TextPropControls.tsx b/docs/src/pages/[platform]/components/text/TextPropControls.tsx index c6318e68f21..a36dc4d287b 100644 --- a/docs/src/pages/[platform]/components/text/TextPropControls.tsx +++ b/docs/src/pages/[platform]/components/text/TextPropControls.tsx @@ -29,7 +29,7 @@ export interface TextPropControlsProps extends TextProps { } interface TextPropControlsInterface { - (props: TextPropControlsProps): JSX.Element; + (props: TextPropControlsProps): React.JSX.Element; } export const TextPropControls: TextPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/textareafield/TextAreaFieldPropControls.tsx b/docs/src/pages/[platform]/components/textareafield/TextAreaFieldPropControls.tsx index 08bff3cab53..115df22f8a2 100644 --- a/docs/src/pages/[platform]/components/textareafield/TextAreaFieldPropControls.tsx +++ b/docs/src/pages/[platform]/components/textareafield/TextAreaFieldPropControls.tsx @@ -47,7 +47,7 @@ export interface TextAreaFieldControlsProps extends BaseTextAreaFieldProps { } interface TextAreaFieldControlsInterface { - (props: TextAreaFieldControlsProps): JSX.Element; + (props: TextAreaFieldControlsProps): React.JSX.Element; } export const TextAreaFieldPropControls: TextAreaFieldControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/textfield/TextFieldPropControls.tsx b/docs/src/pages/[platform]/components/textfield/TextFieldPropControls.tsx index 7f744672cd7..5ee88978a37 100644 --- a/docs/src/pages/[platform]/components/textfield/TextFieldPropControls.tsx +++ b/docs/src/pages/[platform]/components/textfield/TextFieldPropControls.tsx @@ -34,7 +34,7 @@ export interface TextFieldPropControlsProps extends TextFieldProps { } interface TextFieldPropControlsInterface { - (props: TextFieldPropControlsProps): JSX.Element; + (props: TextFieldPropControlsProps): React.JSX.Element; } export const TextFieldPropControls: TextFieldPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/togglebutton/ToggleButtonPropControls.tsx b/docs/src/pages/[platform]/components/togglebutton/ToggleButtonPropControls.tsx index 2be106df680..3fcc9b8fc5a 100644 --- a/docs/src/pages/[platform]/components/togglebutton/ToggleButtonPropControls.tsx +++ b/docs/src/pages/[platform]/components/togglebutton/ToggleButtonPropControls.tsx @@ -17,7 +17,7 @@ export interface ToggleButtonPropControlsProps extends ToggleButtonProps { } export interface ToggleButtonPropControlsInterface { - (props: ToggleButtonPropControlsProps): JSX.Element; + (props: ToggleButtonPropControlsProps): React.JSX.Element; } export const ToggleButtonPropControls: ToggleButtonPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/components/view/ViewPropControls.tsx b/docs/src/pages/[platform]/components/view/ViewPropControls.tsx index d204455a524..10fab253b8f 100644 --- a/docs/src/pages/[platform]/components/view/ViewPropControls.tsx +++ b/docs/src/pages/[platform]/components/view/ViewPropControls.tsx @@ -20,7 +20,7 @@ export interface ViewPropControlsProps extends ViewProps { } export interface ViewPropControlsInterface { - (props: ViewPropControlsProps): JSX.Element; + (props: ViewPropControlsProps): React.JSX.Element; } export const ViewPropControls: ViewPropControlsInterface = ({ diff --git a/docs/src/pages/[platform]/connected-components/authenticator/configuration/hidesignup.web.mdx b/docs/src/pages/[platform]/connected-components/authenticator/configuration/hidesignup.web.mdx index 8fc95acbf23..a2aac04ed44 100644 --- a/docs/src/pages/[platform]/connected-components/authenticator/configuration/hidesignup.web.mdx +++ b/docs/src/pages/[platform]/connected-components/authenticator/configuration/hidesignup.web.mdx @@ -11,8 +11,16 @@ The Authenticator has an option to hide the sign up page including the `Create A ``` - ```tsx{3} - + **`Authenticator` Example:** + ```tsx{3} + + + + ``` + + **`withAuthenticator` Example:** + ```tsx{3} + withAuthenticator(App, { hideSignUp: true }); ``` diff --git a/docs/src/pages/[platform]/connected-components/authenticator/customization/LabelsAndTextDemo.tsx b/docs/src/pages/[platform]/connected-components/authenticator/customization/LabelsAndTextDemo.tsx index b611e9d3e37..c882623a4f4 100644 --- a/docs/src/pages/[platform]/connected-components/authenticator/customization/LabelsAndTextDemo.tsx +++ b/docs/src/pages/[platform]/connected-components/authenticator/customization/LabelsAndTextDemo.tsx @@ -10,7 +10,7 @@ import { I18n } from 'aws-amplify/utils'; import * as React from 'react'; type ScreenProps = { - Component: JSX.Element; + Component: React.JSX.Element; }; function Screen({ Component }: ScreenProps) { diff --git a/docs/src/pages/[platform]/connected-components/authenticator/quick-start.mdx b/docs/src/pages/[platform]/connected-components/authenticator/quick-start.mdx index c731a4cac6a..47f8cd774fe 100644 --- a/docs/src/pages/[platform]/connected-components/authenticator/quick-start.mdx +++ b/docs/src/pages/[platform]/connected-components/authenticator/quick-start.mdx @@ -85,7 +85,7 @@ import AmplifyCLI from './amplify-cli.mdx'; ```groovy dependencies { // Authenticator dependency - implementation 'com.amplifyframework.ui:authenticator:1.2.0' + implementation 'com.amplifyframework.ui:authenticator:1.4.0' // Support for Java 8 features coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' diff --git a/docs/src/pages/[platform]/connected-components/liveness/customization/CustomizationComponents.tsx b/docs/src/pages/[platform]/connected-components/liveness/customization/CustomizationComponents.tsx index ae4b555c492..477831e24da 100644 --- a/docs/src/pages/[platform]/connected-components/liveness/customization/CustomizationComponents.tsx +++ b/docs/src/pages/[platform]/connected-components/liveness/customization/CustomizationComponents.tsx @@ -13,7 +13,7 @@ export function CustomizationComponents() { region={'us-east-1'} onAnalysisComplete={async () => {}} components={{ - PhotosensitiveWarning: (): JSX.Element => { + PhotosensitiveWarning: (): React.JSX.Element => { return ( ` component. +Below is the full list of props that can be used with the `FaceLivenessDetectorCoreConfig`. This config can only be used with the `` component. diff --git a/docs/src/pages/[platform]/connected-components/liveness/quick-start-add.android.mdx b/docs/src/pages/[platform]/connected-components/liveness/quick-start-add.android.mdx index 797f41b8097..9ffb0181a8d 100644 --- a/docs/src/pages/[platform]/connected-components/liveness/quick-start-add.android.mdx +++ b/docs/src/pages/[platform]/connected-components/liveness/quick-start-add.android.mdx @@ -28,10 +28,10 @@ Add the following dependencies to your **app**'s `build.gradle` file and click " ```groovy dependencies { // FaceLivenessDetector dependency - implementation 'com.amplifyframework.ui:liveness:1.2.6' + implementation 'com.amplifyframework.ui:liveness:1.3.0' // Amplify Auth dependency (unnecessary if using your own credentials provider) - implementation 'com.amplifyframework:aws-auth-cognito:2.16.1' + implementation 'com.amplifyframework:aws-auth-cognito:2.26.0' // Material3 dependency for theming FaceLivenessDetector implementation 'androidx.compose.material3:material3:1.1.2' diff --git a/docs/src/pages/[platform]/connected-components/liveness/quick-start-pull.android.mdx b/docs/src/pages/[platform]/connected-components/liveness/quick-start-pull.android.mdx index 012c514cd43..5923fc8606e 100644 --- a/docs/src/pages/[platform]/connected-components/liveness/quick-start-pull.android.mdx +++ b/docs/src/pages/[platform]/connected-components/liveness/quick-start-pull.android.mdx @@ -156,7 +156,7 @@ FaceLivenessDetector( ```groovy dependencies { // FaceLivenessDetector dependency - implementation 'com.amplifyframework.ui:liveness:1.2.6' + implementation 'com.amplifyframework.ui:liveness:1.3.0' // Material3 dependency for theming FaceLivenessDetector implementation 'androidx.compose.material3:material3:1.1.2' diff --git a/docs/src/pages/[platform]/connected-components/storage/fileuploader/examples/ComponentOverrides.tsx b/docs/src/pages/[platform]/connected-components/storage/fileuploader/examples/ComponentOverrides.tsx deleted file mode 100644 index 599462580e7..00000000000 --- a/docs/src/pages/[platform]/connected-components/storage/fileuploader/examples/ComponentOverrides.tsx +++ /dev/null @@ -1,120 +0,0 @@ -import * as React from 'react'; -import { - Card, - Button, - Flex, - Text, - Divider, - Image, - Loader, - Icon, -} from '@aws-amplify/ui-react'; -import { FileUploader } from '@aws-amplify/ui-react-storage'; - -export const App = () => { - return ( - {children}; - }, - DropZone({ children, displayText, inDropZone, ...rest }) { - return ( - - Drop files here - - {children} - - ); - }, - FilePicker({ onClick }) { - return ( - - ); - }, - FileList({ files, onCancelUpload, onDeleteUpload }) { - return ( - - {files.map(({ file, key, progress, id, status, uploadTask }) => ( - - {key} - {progress < 100 ? ( - - ) : null} - - - - ))} - - ); - }, - }} - /> - ); -}; diff --git a/docs/src/pages/[platform]/connected-components/storage/fileuploader/examples/index.ts b/docs/src/pages/[platform]/connected-components/storage/fileuploader/examples/index.ts index 74190f3ca11..d1e404392d6 100644 --- a/docs/src/pages/[platform]/connected-components/storage/fileuploader/examples/index.ts +++ b/docs/src/pages/[platform]/connected-components/storage/fileuploader/examples/index.ts @@ -1,5 +1,4 @@ export { App as DefaultExample } from './Default'; -export { App as ComponentOverridesExample } from './ComponentOverrides'; export { App as DisplayTextExample } from './DisplayText'; export { App as EventExample } from './Event'; export { App as FileTypesExample } from './FileTypes'; diff --git a/docs/src/pages/[platform]/connected-components/storage/fileuploader/react.mdx b/docs/src/pages/[platform]/connected-components/storage/fileuploader/react.mdx index 1d25a6d9700..be91f701767 100644 --- a/docs/src/pages/[platform]/connected-components/storage/fileuploader/react.mdx +++ b/docs/src/pages/[platform]/connected-components/storage/fileuploader/react.mdx @@ -10,7 +10,6 @@ import { InstallScripts } from '@/components/InstallScripts'; import { FILE_UPLOADER, FILE_PICKER, DROPZONE_PROPS, DISPLAY_TEXT } from './props'; import { DefaultExample, - ComponentOverridesExample, DisplayTextExample, EventExample, FileTypesExample, @@ -325,9 +324,8 @@ Don't like how things look? Use your own components inside the FileUploader! You _You can even use a completely different UI kit like MUI, Chakra, or your own design system!_ - - ```jsx file=./examples/ComponentOverrides.tsx + ```jsx file=../../../../../../../examples/next/pages/ui/components/storage/file-uploader/component-overrides/index.page.tsx ``` diff --git a/docs/src/pages/[platform]/connected-components/storage/storage-browser/react.mdx b/docs/src/pages/[platform]/connected-components/storage/storage-browser/react.mdx index 877f985782e..1bc9b0b5ada 100644 --- a/docs/src/pages/[platform]/connected-components/storage/storage-browser/react.mdx +++ b/docs/src/pages/[platform]/connected-components/storage/storage-browser/react.mdx @@ -195,20 +195,20 @@ export const { StorageBrowser } = createStorageBrowser({ listLocations: async (input = {}) => { const { nextToken, pageSize } = input; return { - locations: [ + items: [ { - bucketName: '[bucket name]', + bucket: '[bucket name]', prefix: '', // empty path means bucket root id: 'XXXXXXX', // unique identifier type: 'BUCKET', - permission: ['delete', 'get', 'list', 'write'], + permissions: ['delete', 'get', 'list', 'write'], }, { - bucketName: '[bucket name]', + bucket: '[bucket name]', prefix: 'some/path', id: 'XXXXXXX', // unique identifier type: 'PREFIX', - permission: ['delete', 'get', 'list', 'write'], + permissions: ['delete', 'get', 'list', 'write'], } ] } diff --git a/environments/auth/gen2/auth-with-email-mfa/package.json b/environments/auth/gen2/auth-with-email-mfa/package.json new file mode 100644 index 00000000000..cacb29b8644 --- /dev/null +++ b/environments/auth/gen2/auth-with-email-mfa/package.json @@ -0,0 +1,8 @@ +{ + "private": true, + "name": "@aws-amplify/auth-with-email-mfa", + "version": "0.0.1", + "scripts": { + "generate": "AWS_REGION=us-east-2 npx @aws-amplify/backend-cli@latest generate outputs --branch gen2-auth-with-email-mfa --app-id d3lukld24augjv" + } +} diff --git a/environments/auth/gen2/auth-with-federated-sign-in-react-native/package.json b/environments/auth/gen2/auth-with-federated-sign-in-react-native/package.json new file mode 100644 index 00000000000..73b327c4350 --- /dev/null +++ b/environments/auth/gen2/auth-with-federated-sign-in-react-native/package.json @@ -0,0 +1,8 @@ +{ + "private": true, + "name": "@aws-amplify/ui-gen2-auth-federated-react-native", + "version": "0.0.1", + "scripts": { + "generate": "AWS_REGION=us-east-2 npx @aws-amplify/backend-cli@latest generate outputs --branch gen2-auth-with-federated-react-native --app-id d3lukld24augjv" + } +} diff --git a/environments/auth/package.json b/environments/auth/package.json index 5cd2f175c1f..239596432de 100644 --- a/environments/auth/package.json +++ b/environments/auth/package.json @@ -3,7 +3,7 @@ "name": "@aws-amplify/ui-environments-auth", "version": "0.0.1", "scripts": { - "pull": "../pull-environments.sh -r us-east-2", + "pull": "../pull-environments.sh -r us-east-2 && ../generate-gen2-environments.sh", "pull:email": "yarn pull -i \"\\./auth-with-email\"" } } diff --git a/environments/generate-gen2-environments.sh b/environments/generate-gen2-environments.sh new file mode 100755 index 00000000000..e34cf0a9c76 --- /dev/null +++ b/environments/generate-gen2-environments.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# naive script iterating over the "gen2" subdirs of the dir the script is executed from +# executing the generate command for each +for dir in gen2/*/; do yarn --cwd "$dir" generate; done diff --git a/examples/angular/package.json b/examples/angular/package.json index 31e6f1e89f8..0d35a1f130b 100644 --- a/examples/angular/package.json +++ b/examples/angular/package.json @@ -20,7 +20,7 @@ "@angular/platform-browser": "^14.3.0", "@angular/platform-browser-dynamic": "^14.3.0", "@angular/router": "^14.3.0", - "@aws-amplify/ui-angular": "^5.0.34", + "@aws-amplify/ui-angular": "^5.0.36", "rxjs": "~6.6.0", "tslib": "^2.0.0", "zone.js": "~0.11.4" diff --git a/examples/next-app-router/package.json b/examples/next-app-router/package.json index 2d93c8b7b9b..1a2fb994f7a 100644 --- a/examples/next-app-router/package.json +++ b/examples/next-app-router/package.json @@ -10,8 +10,8 @@ }, "dependencies": { "@aws-amplify/ui-react": "^6.1.0", - "next": "^14.2.10", - "react": "18.2.0", + "react": "^18.3.0", + "next": "^14.2.21", "react-dom": "^18", "react-icons": "^4.3.1" }, diff --git a/examples/next/package.json b/examples/next/package.json index 89bb504f1d8..bee1c3653a6 100644 --- a/examples/next/package.json +++ b/examples/next/package.json @@ -10,25 +10,24 @@ "lint": "next lint" }, "dependencies": { - "@aws-amplify/ui-react": "^6.7.2", - "@aws-amplify/ui-react-ai": "1.1.0", - "@aws-amplify/ui-react-geo": "^2.0.34", - "@aws-amplify/ui-react-liveness": "^3.1.19", - "@aws-amplify/ui-react-notifications": "^2.0.38", - "@aws-amplify/ui-react-storage": "^3.5.1", + "@aws-amplify/ui-react": "^6.9.1", + "@aws-amplify/ui-react-ai": "1.3.0", + "@aws-amplify/ui-react-geo": "^2.2.1", + "@aws-amplify/ui-react-liveness": "^3.3.1", + "@aws-amplify/ui-react-notifications": "^2.2.1", + "@aws-amplify/ui-react-storage": "^3.7.1", "@aws-sdk/credential-providers": "^3.370.0", - "next": "^14.2.10", + "next": "^14.2.21", "next-global-css": "^1.1.1", - "react": "18.2.0", + "react": "^18.3.0", "react-copy-to-clipboard": "^5.1.0", - "react-dom": "18.2.0", + "react-dom": "^18.3.0", "react-icons": "^4.4.0", "react-map-gl": "7.0.23", "swr": "^2.0.0" }, "devDependencies": { "@types/node": "^15.12.4", - "@types/react": "^18.2.22", "eslint": "^8.44.0", "eslint-config-next": "^13.5.5", "rimraf": "^3.0.2" diff --git a/examples/next/pages/ui/components/ai/ai-conversation/context.page.tsx b/examples/next/pages/ui/components/ai/ai-conversation/context.page.tsx index d8a25fb315b..39d59031a22 100644 --- a/examples/next/pages/ui/components/ai/ai-conversation/context.page.tsx +++ b/examples/next/pages/ui/components/ai/ai-conversation/context.page.tsx @@ -60,7 +60,7 @@ const AIContextProvider = ({ children, }: { children?: React.ReactNode; -}): JSX.Element => { +}): React.JSX.Element => { const [data, setData] = React.useState({}); return ( diff --git a/examples/next/pages/ui/components/liveness/with-custom-components/index.page.tsx b/examples/next/pages/ui/components/liveness/with-custom-components/index.page.tsx index a594120fe15..dd1978eba10 100644 --- a/examples/next/pages/ui/components/liveness/with-custom-components/index.page.tsx +++ b/examples/next/pages/ui/components/liveness/with-custom-components/index.page.tsx @@ -30,7 +30,7 @@ const App = () => { ); }, - PhotosensitiveWarning: (): JSX.Element => { + PhotosensitiveWarning: (): React.JSX.Element => { return ( { ); }, - Instructions: (): JSX.Element => { + Instructions: (): React.JSX.Element => { return ( Instructions to follow to use liveness face detector diff --git a/examples/next/pages/ui/components/storage/file-uploader/component-overrides/amplify_outputs.js b/examples/next/pages/ui/components/storage/file-uploader/component-overrides/amplify_outputs.js new file mode 100644 index 00000000000..aa7b2dc0d65 --- /dev/null +++ b/examples/next/pages/ui/components/storage/file-uploader/component-overrides/amplify_outputs.js @@ -0,0 +1,2 @@ +import amplifyOutputs from '@environments/storage/gen2/amplify_outputs'; +export default amplifyOutputs; diff --git a/examples/next/pages/ui/components/storage/file-uploader/component-overrides/index.page.tsx b/examples/next/pages/ui/components/storage/file-uploader/component-overrides/index.page.tsx new file mode 100644 index 00000000000..1efc9877a85 --- /dev/null +++ b/examples/next/pages/ui/components/storage/file-uploader/component-overrides/index.page.tsx @@ -0,0 +1,128 @@ +import * as React from 'react'; + +import { FileUploader } from '@aws-amplify/ui-react-storage'; +import { + Card, + Button, + Flex, + Text, + Divider, + Image, + Loader, + Icon, +} from '@aws-amplify/ui-react'; +import '@aws-amplify/ui-react/styles.css'; +import { Amplify } from 'aws-amplify'; // IGNORE +import amplifyOutputs from './amplify_outputs'; // IGNORE +Amplify.configure(amplifyOutputs); // IGNORE + +export default function App() { + return ( + {children}; + }, + // DropZone({ children, inDropZone, onDragEnter, onDragLeave, onDragStart, onDragOver, onDrop }) { + DropZone({ children, inDropZone, ...rest }) { + return ( + + Drop files here + + {children} + + ); + }, + FilePicker({ onClick }) { + return ( + + ); + }, + FileList({ files, onCancelUpload, onDeleteUpload }) { + return ( + + {files.map(({ file, key, progress, id, status, uploadTask }) => + !file ? null : ( + + {key} + {progress === 100 ? null : ( + + )} + + + + ) + )} + + ); + }, + }} + /> + ); +} diff --git a/examples/next/pages/ui/components/storage/storage-browser/default-auth/routed/StorageBrowser.ts b/examples/next/pages/ui/components/storage/storage-browser/default-auth/routed/StorageBrowser.ts index 30eb2ac6093..8c3cf063f81 100644 --- a/examples/next/pages/ui/components/storage/storage-browser/default-auth/routed/StorageBrowser.ts +++ b/examples/next/pages/ui/components/storage/storage-browser/default-auth/routed/StorageBrowser.ts @@ -4,6 +4,7 @@ import { createAmplifyAuthAdapter, createStorageBrowser, } from '@aws-amplify/ui-react-storage/browser'; +import '@aws-amplify/ui-react-storage/styles.css'; import config from './aws-exports'; diff --git a/examples/react-native/README.md b/examples/react-native/README.md index 0e22967bb73..946ed68f9be 100644 --- a/examples/react-native/README.md +++ b/examples/react-native/README.md @@ -186,6 +186,54 @@ import { MY_ENV_VARIABLE } from '@env'; If the example app is not picking up changes to the values in _.env_ close Metro and reset the cache (see troubleshooting section). +## URI Scheme + +The example app default URI Scheme is set to `fed-auth-example://`. + +To update for local testing run from the example app root: + +```sh +# remove default +npx uri-scheme remove fed-auth-example + +# add new schems +npx uri-scheme add my-scheme +``` + +- delete the app from your iOS simulator/Android emulator +- rebuild the example app by run the respective build command(s) from the example app root: + +```sh +# iOS +yarn run-ios + +# OR +# Android +yarn run-android +``` + +To test the scheme: + +- ensure the example app is installed on an iOS simulator or Android emulator +- start the example app + +```sh +yarn workspace @aws-amplify/ui-react-native-example dev +``` + +- in a seperate terminal window, launch the app with the URI by running: + +```sh +# iOS +npx uri-scheme open -i my-scheme:// + +# OR +# Android +npx uri-scheme open -a my-scheme:// +``` + +> see https://github.com/expo/expo/tree/main/packages/uri-scheme#readme for additional info + ## Troubleshooting ### Cleaning the Metro Cache diff --git a/examples/react-native/android/app/src/main/AndroidManifest.xml b/examples/react-native/android/app/src/main/AndroidManifest.xml index 399cb4286ff..e2945c3efbe 100644 --- a/examples/react-native/android/app/src/main/AndroidManifest.xml +++ b/examples/react-native/android/app/src/main/AndroidManifest.xml @@ -10,7 +10,7 @@ - + diff --git a/examples/react-native/ios/Podfile.lock b/examples/react-native/ios/Podfile.lock index 52299ee9509..9cc732586ea 100644 --- a/examples/react-native/ios/Podfile.lock +++ b/examples/react-native/ios/Podfile.lock @@ -1,23 +1,23 @@ PODS: - - AmplifyRTNCore (1.0.2): + - AmplifyRTNCore (1.1.1): - React-Core - - AmplifyRTNWebBrowser (1.0.2): + - AmplifyRTNWebBrowser (1.0.30): - React-Core - boost (1.76.0) - DoubleConversion (1.1.6) - - FBLazyVector (0.71.14) - - FBReactNativeSpec (0.71.14): + - FBLazyVector (0.71.16) + - FBReactNativeSpec (0.71.16): - RCT-Folly (= 2021.07.22.00) - - RCTRequired (= 0.71.14) - - RCTTypeSafety (= 0.71.14) - - React-Core (= 0.71.14) - - React-jsi (= 0.71.14) - - ReactCommon/turbomodule/core (= 0.71.14) + - RCTRequired (= 0.71.16) + - RCTTypeSafety (= 0.71.16) + - React-Core (= 0.71.16) + - React-jsi (= 0.71.16) + - ReactCommon/turbomodule/core (= 0.71.16) - fmt (6.2.1) - glog (0.3.5) - - hermes-engine (0.71.14): - - hermes-engine/Pre-built (= 0.71.14) - - hermes-engine/Pre-built (0.71.14) + - hermes-engine (0.71.16): + - hermes-engine/Pre-built (= 0.71.16) + - hermes-engine/Pre-built (0.71.16) - libevent (2.1.12) - RCT-Folly (2021.07.22.00): - boost @@ -36,26 +36,26 @@ PODS: - fmt (~> 6.2.1) - glog - libevent - - RCTRequired (0.71.14) - - RCTTypeSafety (0.71.14): - - FBLazyVector (= 0.71.14) - - RCTRequired (= 0.71.14) - - React-Core (= 0.71.14) - - React (0.71.14): - - React-Core (= 0.71.14) - - React-Core/DevSupport (= 0.71.14) - - React-Core/RCTWebSocket (= 0.71.14) - - React-RCTActionSheet (= 0.71.14) - - React-RCTAnimation (= 0.71.14) - - React-RCTBlob (= 0.71.14) - - React-RCTImage (= 0.71.14) - - React-RCTLinking (= 0.71.14) - - React-RCTNetwork (= 0.71.14) - - React-RCTSettings (= 0.71.14) - - React-RCTText (= 0.71.14) - - React-RCTVibration (= 0.71.14) - - React-callinvoker (0.71.14) - - React-Codegen (0.71.14): + - RCTRequired (0.71.16) + - RCTTypeSafety (0.71.16): + - FBLazyVector (= 0.71.16) + - RCTRequired (= 0.71.16) + - React-Core (= 0.71.16) + - React (0.71.16): + - React-Core (= 0.71.16) + - React-Core/DevSupport (= 0.71.16) + - React-Core/RCTWebSocket (= 0.71.16) + - React-RCTActionSheet (= 0.71.16) + - React-RCTAnimation (= 0.71.16) + - React-RCTBlob (= 0.71.16) + - React-RCTImage (= 0.71.16) + - React-RCTLinking (= 0.71.16) + - React-RCTNetwork (= 0.71.16) + - React-RCTSettings (= 0.71.16) + - React-RCTText (= 0.71.16) + - React-RCTVibration (= 0.71.16) + - React-callinvoker (0.71.16) + - React-Codegen (0.71.16): - FBReactNativeSpec - hermes-engine - RCT-Folly @@ -66,209 +66,209 @@ PODS: - React-jsiexecutor - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-Core (0.71.14): + - React-Core (0.71.16): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.71.14) - - React-cxxreact (= 0.71.14) + - React-Core/Default (= 0.71.16) + - React-cxxreact (= 0.71.16) - React-hermes - - React-jsi (= 0.71.14) - - React-jsiexecutor (= 0.71.14) - - React-perflogger (= 0.71.14) + - React-jsi (= 0.71.16) + - React-jsiexecutor (= 0.71.16) + - React-perflogger (= 0.71.16) - Yoga - - React-Core/CoreModulesHeaders (0.71.14): + - React-Core/CoreModulesHeaders (0.71.16): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.14) + - React-cxxreact (= 0.71.16) - React-hermes - - React-jsi (= 0.71.14) - - React-jsiexecutor (= 0.71.14) - - React-perflogger (= 0.71.14) + - React-jsi (= 0.71.16) + - React-jsiexecutor (= 0.71.16) + - React-perflogger (= 0.71.16) - Yoga - - React-Core/Default (0.71.14): + - React-Core/Default (0.71.16): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-cxxreact (= 0.71.14) + - React-cxxreact (= 0.71.16) - React-hermes - - React-jsi (= 0.71.14) - - React-jsiexecutor (= 0.71.14) - - React-perflogger (= 0.71.14) + - React-jsi (= 0.71.16) + - React-jsiexecutor (= 0.71.16) + - React-perflogger (= 0.71.16) - Yoga - - React-Core/DevSupport (0.71.14): + - React-Core/DevSupport (0.71.16): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.71.14) - - React-Core/RCTWebSocket (= 0.71.14) - - React-cxxreact (= 0.71.14) + - React-Core/Default (= 0.71.16) + - React-Core/RCTWebSocket (= 0.71.16) + - React-cxxreact (= 0.71.16) - React-hermes - - React-jsi (= 0.71.14) - - React-jsiexecutor (= 0.71.14) - - React-jsinspector (= 0.71.14) - - React-perflogger (= 0.71.14) + - React-jsi (= 0.71.16) + - React-jsiexecutor (= 0.71.16) + - React-jsinspector (= 0.71.16) + - React-perflogger (= 0.71.16) - Yoga - - React-Core/RCTActionSheetHeaders (0.71.14): + - React-Core/RCTActionSheetHeaders (0.71.16): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.14) + - React-cxxreact (= 0.71.16) - React-hermes - - React-jsi (= 0.71.14) - - React-jsiexecutor (= 0.71.14) - - React-perflogger (= 0.71.14) + - React-jsi (= 0.71.16) + - React-jsiexecutor (= 0.71.16) + - React-perflogger (= 0.71.16) - Yoga - - React-Core/RCTAnimationHeaders (0.71.14): + - React-Core/RCTAnimationHeaders (0.71.16): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.14) + - React-cxxreact (= 0.71.16) - React-hermes - - React-jsi (= 0.71.14) - - React-jsiexecutor (= 0.71.14) - - React-perflogger (= 0.71.14) + - React-jsi (= 0.71.16) + - React-jsiexecutor (= 0.71.16) + - React-perflogger (= 0.71.16) - Yoga - - React-Core/RCTBlobHeaders (0.71.14): + - React-Core/RCTBlobHeaders (0.71.16): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.14) + - React-cxxreact (= 0.71.16) - React-hermes - - React-jsi (= 0.71.14) - - React-jsiexecutor (= 0.71.14) - - React-perflogger (= 0.71.14) + - React-jsi (= 0.71.16) + - React-jsiexecutor (= 0.71.16) + - React-perflogger (= 0.71.16) - Yoga - - React-Core/RCTImageHeaders (0.71.14): + - React-Core/RCTImageHeaders (0.71.16): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.14) + - React-cxxreact (= 0.71.16) - React-hermes - - React-jsi (= 0.71.14) - - React-jsiexecutor (= 0.71.14) - - React-perflogger (= 0.71.14) + - React-jsi (= 0.71.16) + - React-jsiexecutor (= 0.71.16) + - React-perflogger (= 0.71.16) - Yoga - - React-Core/RCTLinkingHeaders (0.71.14): + - React-Core/RCTLinkingHeaders (0.71.16): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.14) + - React-cxxreact (= 0.71.16) - React-hermes - - React-jsi (= 0.71.14) - - React-jsiexecutor (= 0.71.14) - - React-perflogger (= 0.71.14) + - React-jsi (= 0.71.16) + - React-jsiexecutor (= 0.71.16) + - React-perflogger (= 0.71.16) - Yoga - - React-Core/RCTNetworkHeaders (0.71.14): + - React-Core/RCTNetworkHeaders (0.71.16): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.14) + - React-cxxreact (= 0.71.16) - React-hermes - - React-jsi (= 0.71.14) - - React-jsiexecutor (= 0.71.14) - - React-perflogger (= 0.71.14) + - React-jsi (= 0.71.16) + - React-jsiexecutor (= 0.71.16) + - React-perflogger (= 0.71.16) - Yoga - - React-Core/RCTSettingsHeaders (0.71.14): + - React-Core/RCTSettingsHeaders (0.71.16): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.14) + - React-cxxreact (= 0.71.16) - React-hermes - - React-jsi (= 0.71.14) - - React-jsiexecutor (= 0.71.14) - - React-perflogger (= 0.71.14) + - React-jsi (= 0.71.16) + - React-jsiexecutor (= 0.71.16) + - React-perflogger (= 0.71.16) - Yoga - - React-Core/RCTTextHeaders (0.71.14): + - React-Core/RCTTextHeaders (0.71.16): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.14) + - React-cxxreact (= 0.71.16) - React-hermes - - React-jsi (= 0.71.14) - - React-jsiexecutor (= 0.71.14) - - React-perflogger (= 0.71.14) + - React-jsi (= 0.71.16) + - React-jsiexecutor (= 0.71.16) + - React-perflogger (= 0.71.16) - Yoga - - React-Core/RCTVibrationHeaders (0.71.14): + - React-Core/RCTVibrationHeaders (0.71.16): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.14) + - React-cxxreact (= 0.71.16) - React-hermes - - React-jsi (= 0.71.14) - - React-jsiexecutor (= 0.71.14) - - React-perflogger (= 0.71.14) + - React-jsi (= 0.71.16) + - React-jsiexecutor (= 0.71.16) + - React-perflogger (= 0.71.16) - Yoga - - React-Core/RCTWebSocket (0.71.14): + - React-Core/RCTWebSocket (0.71.16): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.71.14) - - React-cxxreact (= 0.71.14) + - React-Core/Default (= 0.71.16) + - React-cxxreact (= 0.71.16) - React-hermes - - React-jsi (= 0.71.14) - - React-jsiexecutor (= 0.71.14) - - React-perflogger (= 0.71.14) + - React-jsi (= 0.71.16) + - React-jsiexecutor (= 0.71.16) + - React-perflogger (= 0.71.16) - Yoga - - React-CoreModules (0.71.14): + - React-CoreModules (0.71.16): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.71.14) - - React-Codegen (= 0.71.14) - - React-Core/CoreModulesHeaders (= 0.71.14) - - React-jsi (= 0.71.14) + - RCTTypeSafety (= 0.71.16) + - React-Codegen (= 0.71.16) + - React-Core/CoreModulesHeaders (= 0.71.16) + - React-jsi (= 0.71.16) - React-RCTBlob - - React-RCTImage (= 0.71.14) - - ReactCommon/turbomodule/core (= 0.71.14) - - React-cxxreact (0.71.14): + - React-RCTImage (= 0.71.16) + - ReactCommon/turbomodule/core (= 0.71.16) + - React-cxxreact (0.71.16): - boost (= 1.76.0) - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 0.71.14) - - React-jsi (= 0.71.14) - - React-jsinspector (= 0.71.14) - - React-logger (= 0.71.14) - - React-perflogger (= 0.71.14) - - React-runtimeexecutor (= 0.71.14) - - React-hermes (0.71.14): + - React-callinvoker (= 0.71.16) + - React-jsi (= 0.71.16) + - React-jsinspector (= 0.71.16) + - React-logger (= 0.71.16) + - React-perflogger (= 0.71.16) + - React-runtimeexecutor (= 0.71.16) + - React-hermes (0.71.16): - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - RCT-Folly/Futures (= 2021.07.22.00) - - React-cxxreact (= 0.71.14) + - React-cxxreact (= 0.71.16) - React-jsi - - React-jsiexecutor (= 0.71.14) - - React-jsinspector (= 0.71.14) - - React-perflogger (= 0.71.14) - - React-jsi (0.71.14): + - React-jsiexecutor (= 0.71.16) + - React-jsinspector (= 0.71.16) + - React-perflogger (= 0.71.16) + - React-jsi (0.71.16): - boost (= 1.76.0) - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-jsiexecutor (0.71.14): + - React-jsiexecutor (0.71.16): - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-cxxreact (= 0.71.14) - - React-jsi (= 0.71.14) - - React-perflogger (= 0.71.14) - - React-jsinspector (0.71.14) - - React-logger (0.71.14): + - React-cxxreact (= 0.71.16) + - React-jsi (= 0.71.16) + - React-perflogger (= 0.71.16) + - React-jsinspector (0.71.16) + - React-logger (0.71.16): - glog - react-native-get-random-values (1.9.0): - React-Core @@ -278,90 +278,90 @@ PODS: - React-Core - react-native-safe-area-context (4.7.3): - React-Core - - React-perflogger (0.71.14) - - React-RCTActionSheet (0.71.14): - - React-Core/RCTActionSheetHeaders (= 0.71.14) - - React-RCTAnimation (0.71.14): + - React-perflogger (0.71.16) + - React-RCTActionSheet (0.71.16): + - React-Core/RCTActionSheetHeaders (= 0.71.16) + - React-RCTAnimation (0.71.16): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.71.14) - - React-Codegen (= 0.71.14) - - React-Core/RCTAnimationHeaders (= 0.71.14) - - React-jsi (= 0.71.14) - - ReactCommon/turbomodule/core (= 0.71.14) - - React-RCTAppDelegate (0.71.14): + - RCTTypeSafety (= 0.71.16) + - React-Codegen (= 0.71.16) + - React-Core/RCTAnimationHeaders (= 0.71.16) + - React-jsi (= 0.71.16) + - ReactCommon/turbomodule/core (= 0.71.16) + - React-RCTAppDelegate (0.71.16): - RCT-Folly - RCTRequired - RCTTypeSafety - React-Core - ReactCommon/turbomodule/core - - React-RCTBlob (0.71.14): + - React-RCTBlob (0.71.16): - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-Codegen (= 0.71.14) - - React-Core/RCTBlobHeaders (= 0.71.14) - - React-Core/RCTWebSocket (= 0.71.14) - - React-jsi (= 0.71.14) - - React-RCTNetwork (= 0.71.14) - - ReactCommon/turbomodule/core (= 0.71.14) - - React-RCTImage (0.71.14): + - React-Codegen (= 0.71.16) + - React-Core/RCTBlobHeaders (= 0.71.16) + - React-Core/RCTWebSocket (= 0.71.16) + - React-jsi (= 0.71.16) + - React-RCTNetwork (= 0.71.16) + - ReactCommon/turbomodule/core (= 0.71.16) + - React-RCTImage (0.71.16): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.71.14) - - React-Codegen (= 0.71.14) - - React-Core/RCTImageHeaders (= 0.71.14) - - React-jsi (= 0.71.14) - - React-RCTNetwork (= 0.71.14) - - ReactCommon/turbomodule/core (= 0.71.14) - - React-RCTLinking (0.71.14): - - React-Codegen (= 0.71.14) - - React-Core/RCTLinkingHeaders (= 0.71.14) - - React-jsi (= 0.71.14) - - ReactCommon/turbomodule/core (= 0.71.14) - - React-RCTNetwork (0.71.14): + - RCTTypeSafety (= 0.71.16) + - React-Codegen (= 0.71.16) + - React-Core/RCTImageHeaders (= 0.71.16) + - React-jsi (= 0.71.16) + - React-RCTNetwork (= 0.71.16) + - ReactCommon/turbomodule/core (= 0.71.16) + - React-RCTLinking (0.71.16): + - React-Codegen (= 0.71.16) + - React-Core/RCTLinkingHeaders (= 0.71.16) + - React-jsi (= 0.71.16) + - ReactCommon/turbomodule/core (= 0.71.16) + - React-RCTNetwork (0.71.16): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.71.14) - - React-Codegen (= 0.71.14) - - React-Core/RCTNetworkHeaders (= 0.71.14) - - React-jsi (= 0.71.14) - - ReactCommon/turbomodule/core (= 0.71.14) - - React-RCTSettings (0.71.14): + - RCTTypeSafety (= 0.71.16) + - React-Codegen (= 0.71.16) + - React-Core/RCTNetworkHeaders (= 0.71.16) + - React-jsi (= 0.71.16) + - ReactCommon/turbomodule/core (= 0.71.16) + - React-RCTSettings (0.71.16): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.71.14) - - React-Codegen (= 0.71.14) - - React-Core/RCTSettingsHeaders (= 0.71.14) - - React-jsi (= 0.71.14) - - ReactCommon/turbomodule/core (= 0.71.14) - - React-RCTText (0.71.14): - - React-Core/RCTTextHeaders (= 0.71.14) - - React-RCTVibration (0.71.14): + - RCTTypeSafety (= 0.71.16) + - React-Codegen (= 0.71.16) + - React-Core/RCTSettingsHeaders (= 0.71.16) + - React-jsi (= 0.71.16) + - ReactCommon/turbomodule/core (= 0.71.16) + - React-RCTText (0.71.16): + - React-Core/RCTTextHeaders (= 0.71.16) + - React-RCTVibration (0.71.16): - RCT-Folly (= 2021.07.22.00) - - React-Codegen (= 0.71.14) - - React-Core/RCTVibrationHeaders (= 0.71.14) - - React-jsi (= 0.71.14) - - ReactCommon/turbomodule/core (= 0.71.14) - - React-runtimeexecutor (0.71.14): - - React-jsi (= 0.71.14) - - ReactCommon/turbomodule/bridging (0.71.14): + - React-Codegen (= 0.71.16) + - React-Core/RCTVibrationHeaders (= 0.71.16) + - React-jsi (= 0.71.16) + - ReactCommon/turbomodule/core (= 0.71.16) + - React-runtimeexecutor (0.71.16): + - React-jsi (= 0.71.16) + - ReactCommon/turbomodule/bridging (0.71.16): - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 0.71.14) - - React-Core (= 0.71.14) - - React-cxxreact (= 0.71.14) - - React-jsi (= 0.71.14) - - React-logger (= 0.71.14) - - React-perflogger (= 0.71.14) - - ReactCommon/turbomodule/core (0.71.14): + - React-callinvoker (= 0.71.16) + - React-Core (= 0.71.16) + - React-cxxreact (= 0.71.16) + - React-jsi (= 0.71.16) + - React-logger (= 0.71.16) + - React-perflogger (= 0.71.16) + - ReactCommon/turbomodule/core (0.71.16): - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 0.71.14) - - React-Core (= 0.71.14) - - React-cxxreact (= 0.71.14) - - React-jsi (= 0.71.14) - - React-logger (= 0.71.14) - - React-perflogger (= 0.71.14) + - React-callinvoker (= 0.71.16) + - React-Core (= 0.71.16) + - React-cxxreact (= 0.71.16) + - React-jsi (= 0.71.16) + - React-logger (= 0.71.16) + - React-perflogger (= 0.71.16) - RNCAsyncStorage (1.18.1): - React-Core - Yoga (1.14.0) @@ -408,7 +408,7 @@ DEPENDENCIES: - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) - - "RNCAsyncStorage (from `../../../node_modules/@react-native-async-storage/async-storage`)" + - "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)" - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) SPEC REPOS: @@ -496,55 +496,55 @@ EXTERNAL SOURCES: ReactCommon: :path: "../node_modules/react-native/ReactCommon" RNCAsyncStorage: - :path: "../../../node_modules/@react-native-async-storage/async-storage" + :path: "../node_modules/@react-native-async-storage/async-storage" Yoga: :path: "../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: - AmplifyRTNCore: b7c34aac2f570f195a76d081f00ace499230cb62 - AmplifyRTNWebBrowser: c2d7fe98140226eb8f56ce974c600018f3f4534c - boost: 57d2868c099736d80fcd648bf211b4431e51a558 + AmplifyRTNCore: 7aabcf40316c2f5c853c1ef73139af3b24a5406b + AmplifyRTNWebBrowser: c80e90e76b89ed768370e1a2d2400fe2fd672bfc + boost: 7dcd2de282d72e344012f7d6564d024930a6a440 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 - FBLazyVector: 12ea01e587c9594e7b144e1bfc86ac4d9ac28fde - FBReactNativeSpec: b6ae48e67aaba46442f84d6f9ba598ccfbe2ee66 + FBLazyVector: 9840513ec2766e31fb9e34c2dabb2c4671400fcd + FBReactNativeSpec: 76141e46f67b395d7d4e94925dfeba0dbd680ba1 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b - hermes-engine: d7cc127932c89c53374452d6f93473f1970d8e88 + hermes-engine: 2382506846564caf4152c45390dc24f08fce7057 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 - RCTRequired: e9df143e880d0e879e7a498dc06923d728809c79 - RCTTypeSafety: c2d89c8308829c12c038ec1f431191eaa0d8c15c - React: 52b89a818f4b2579c98567f3aa8bde880d9e843b - React-callinvoker: 56e399c88c05e037fe99c31978f30e75fad5c286 - React-Codegen: 7ece62f4d4896ad1933f834a7dad697676636318 - React-Core: f06b7b00e0d49433a316760ae61a0f8f5dee6629 - React-CoreModules: bd520e5688b5aa4666965a1b3b8e6d4a2e19df20 - React-cxxreact: ba6a1663685837fa4c2ac97daa95dd2e47f1acdc - React-hermes: c862e573ca0228070936b5ec4f475c3e19e900e0 - React-jsi: 533030c161bcfcbc3a4ad0b357ced8f7b2be457e - React-jsiexecutor: 94cfc1788637ceaf8841ef1f69b10cc0d62baadc - React-jsinspector: 7bf923954b4e035f494b01ac16633963412660d7 - React-logger: 655ff5db8bd922acfbe76a4983ffab048916343e + RCTRequired: 44a3cda52ccac0be738fbf43fef90f3546a48c52 + RCTTypeSafety: da7fbf9826fc898ca8b10dc840f2685562039a64 + React: defd955b6d6ffb9791bb66dee08d90b87a8e2c0c + React-callinvoker: 39ea57213d56ec9c527d51bd0dfb45cbb12ef447 + React-Codegen: 71cbc1bc384f9d19a41e4d00dfd0e7762ec5ef4a + React-Core: 898cb2f7785640e21d381b23fc64a2904628b368 + React-CoreModules: 7f71e7054395d61585048061a66d67b58d3d27b7 + React-cxxreact: 57fca29dd6995de0ee360980709c4be82d40cda1 + React-hermes: 33229fc1867df496665b36b222a82a0f850bcae1 + React-jsi: 3a55652789df6ddd777cce9601bf000e18d6b9df + React-jsiexecutor: 9b2a87f674f30da4706af52520e4860974cec149 + React-jsinspector: b3b341764ccda14f3659c00a9bc5b098b334db2b + React-logger: dc96fadd2f7f6bc38efc3cfb5fef876d4e6290a2 react-native-get-random-values: dee677497c6a740b71e5612e8dbd83e7539ed5bb react-native-launch-arguments: 8e21f656fb7ade515fd974209b06be1b9279c91e react-native-netinfo: 1a6035d3b9780221d407c277ebfb5722ace00658 react-native-safe-area-context: 238cd8b619e05cb904ccad97ef42e84d1b5ae6ec - React-perflogger: 4987ad83731c23d11813c84263963b0d3028c966 - React-RCTActionSheet: 5ad952b2a9740d87a5bd77280c4bc23f6f89ea0c - React-RCTAnimation: d2de22af3f536cc80bb5b3918e1a455114d1b985 - React-RCTAppDelegate: 27f7d735cad3d522c13008ea80020d350017c422 - React-RCTBlob: b697e0e2e38ec85bd726176851a3b476a490ad33 - React-RCTImage: a07e8c7d4768f62ebc6277e4680f6b979c619967 - React-RCTLinking: d00ae55db37b2c12ebab91135f06f75391c0708d - React-RCTNetwork: b3a401276e5c08487d8a14fdec1720e78b5888db - React-RCTSettings: d606cbac31403604c5d5746e6dab53bb332f9301 - React-RCTText: b3bd40bc71bca0c3e2cc5ce2c40870a438f303b1 - React-RCTVibration: 64e412b9ac684c4edc938fa1187135ada9af7faf - React-runtimeexecutor: ffe826b7b1cfbc32a35ed5b64d5886c0ff75f501 - ReactCommon: 7f3dd5e98a9ec627c6b03d26c062bf37ea9fc888 + React-perflogger: c944b06edad34f5ecded0f29a6e66290a005d365 + React-RCTActionSheet: fa467f37777dacba2c72da4be7ae065da4482d7d + React-RCTAnimation: 0591ee5f9e3d8c864a0937edea2165fe968e7099 + React-RCTAppDelegate: 8b7f60103a83ad1670bda690571e73efddba29a0 + React-RCTBlob: 082e8612f48b0ec12ca6dc949fb7c310593eff83 + React-RCTImage: 6300660ef04d0e8a710ad9ea5d2fb4d9521c200d + React-RCTLinking: 7703ee1b10d3568c143a489ae74adc419c3f3ef3 + React-RCTNetwork: 5748c647e09c66b918f81ae15ed7474327f653be + React-RCTSettings: 8c8a84ee363db9cbc287c8b8f2fb782acf7ba414 + React-RCTText: d5e53c0741e3e2df91317781e993b5e42bd70448 + React-RCTVibration: 052dd488ba95f461a37c992b9e01bd4bcc59a7b6 + React-runtimeexecutor: b5abe02558421897cd9f73d4f4b6adb4bc297083 + ReactCommon: a1a263d94f02a0dc8442f341d5a11b3d7a9cd44d RNCAsyncStorage: b90b71f45b8b97be43bc4284e71a6af48ac9f547 - Yoga: e71803b4c1fff832ccf9b92541e00f9b873119b9 + Yoga: e29645ec5a66fb00934fad85338742d1c247d4cb PODFILE CHECKSUM: 86255707601fa0f502375c1c40775dbd535ed624 -COCOAPODS: 1.14.3 +COCOAPODS: 1.16.2 diff --git a/examples/react-native/ios/ReactNative/Info.plist b/examples/react-native/ios/ReactNative/Info.plist index e5af1990bab..e3caf2f41d0 100644 --- a/examples/react-native/ios/ReactNative/Info.plist +++ b/examples/react-native/ios/ReactNative/Info.plist @@ -56,7 +56,7 @@ CFBundleURLSchemes - myapp + fed-auth-example diff --git a/examples/react-native/package.json b/examples/react-native/package.json index fea604f6fac..8c4e974b927 100644 --- a/examples/react-native/package.json +++ b/examples/react-native/package.json @@ -21,7 +21,7 @@ "@react-native-async-storage/async-storage": "^1.17.5", "@react-native-community/netinfo": "^8.3.0", "@xstate/react": "^3.2.2", - "react": "18.2.0", + "react": "^18.3.0", "react-native": "0.71.16", "react-native-get-random-values": "^1.9.0", "react-native-safe-area-context": "^4.7.3", @@ -33,10 +33,7 @@ "@babel/runtime": "^7.20.0", "@react-native-community/eslint-config": "^3.2.0", "@tsconfig/react-native": "^3.0.2", - "@types/jest": "^29.2.1", - "@types/react": "^18.2.22", "@types/react-native-dotenv": "^0.2.0", - "@types/react-test-renderer": "^18.0.2", "@typescript-eslint/eslint-plugin": "^6.9.0", "@typescript-eslint/parser": "^6.9.0", "babel-jest": "^29.2.1", diff --git a/examples/react-native/src/App/App.tsx b/examples/react-native/src/App/App.tsx index a273f6a936a..dd718a7a6a6 100644 --- a/examples/react-native/src/App/App.tsx +++ b/examples/react-native/src/App/App.tsx @@ -139,6 +139,7 @@ export const ExampleComponent = () => { return ; case 'ui/components/authenticator/sign-up-with-attributes': return ; + case 'SocialProviders': case '/ui/components/authenticator/social-providers': return ; case 'ui/components/authenticator/forgot-password': diff --git a/examples/react-native/src/features/InAppMessaging/Demo/Example.tsx b/examples/react-native/src/features/InAppMessaging/Demo/Example.tsx index ed9876dbd80..7c4c2c92acd 100644 --- a/examples/react-native/src/features/InAppMessaging/Demo/Example.tsx +++ b/examples/react-native/src/features/InAppMessaging/Demo/Example.tsx @@ -1,9 +1,11 @@ import React from 'react'; +import { ScrollView, StyleSheet, Text, View } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; + import { Amplify } from 'aws-amplify'; import { initializeInAppMessaging } from 'aws-amplify/in-app-messaging'; -import { SafeAreaView, StyleSheet, Text, View } from 'react-native'; - import { withInAppMessaging } from '@aws-amplify/ui-react-native'; + import { Button, Checkbox, Radio, RadioGroup } from '../../../ui'; import { useInAppDemo, ACTIONS, LAYOUTS, ORIENTATIONS } from './utils'; import config from './aws-exports'; @@ -55,83 +57,85 @@ function Demo() { return ( - - Configure Demo Message - - - - - - - - - - - - - - - - - - - + + + Configure Demo Message + + + + + + + + + + + + + + + + + + + + ); } @@ -152,7 +156,7 @@ const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', - paddingHorizontal: 24, + paddingHorizontal: 16, }, divider: { backgroundColor: 'black', @@ -164,7 +168,8 @@ const styles = StyleSheet.create({ justifyContent: 'center', fontSize: 24, fontWeight: '700', - marginVertical: 8, + marginBottom: 8, + marginTop: 24, }, label: { fontSize: 18, diff --git a/examples/react-native/src/ui/components/authenticator/social-providers/aws-exports.js b/examples/react-native/src/ui/components/authenticator/social-providers/aws-exports.js index 6cdd98f3848..223fdf58e6a 100644 --- a/examples/react-native/src/ui/components/authenticator/social-providers/aws-exports.js +++ b/examples/react-native/src/ui/components/authenticator/social-providers/aws-exports.js @@ -1,2 +1,2 @@ -import awsExports from '@aws-amplify/ui-environments/auth/auth-with-federated/src/aws-exports'; +import awsExports from '@aws-amplify/ui-environments/auth/gen2/auth-with-federated-sign-in-react-native/amplify_outputs.json'; export default awsExports; diff --git a/examples/vue/package.json b/examples/vue/package.json index 21191424035..80fd7806897 100644 --- a/examples/vue/package.json +++ b/examples/vue/package.json @@ -11,7 +11,7 @@ "start": "vite preview --port 3000" }, "dependencies": { - "@aws-amplify/ui-vue": "^4.2.26", + "@aws-amplify/ui-vue": "^4.2.28", "vue": "^3.0.5", "vue-router": "4" }, diff --git a/package.json b/package.json index 27223a0259f..1a8e5502d63 100644 --- a/package.json +++ b/package.json @@ -81,8 +81,8 @@ "@babel/traverse": "7.23.2", "@cypress/request": "^3.0.0", "@sideway/formula": "^3.0.1", - "@types/react": "^18.2.22", - "@types/react-dom": "^18.2.7", + "@types/react": "^18.3.0", + "@types/react-dom": "^18.3.0", "body-parser": "1.20.3", "browserslist": "^4.16.15", "cookie": "^0.7.0", @@ -97,8 +97,8 @@ "path-to-regexp": "0.1.10", "postcss": "^8.4.31", "prismjs": "^1.25.0", - "react": "18.2.0", - "react-dom": "18.2.0", + "react": "^18.3.0", + "react-dom": "^18.3.0", "react-native": "0.71.16", "react-devtools-core": "^4.28.4", "rollup": "^4.22.4", @@ -126,7 +126,9 @@ "@testing-library/user-event": "^14.5.1", "@types/fs-extra": "11.0.3", "@types/jest": "^29.5.5", - "@types/react-test-renderer": "^18.0.2", + "@types/react": "^18.3.0", + "@types/react-dom": "^18.3.0", + "@types/react-test-renderer": "^18.3.0", "@vitejs/plugin-vue": "^2.3.4", "aws-amplify": "^6.9.0", "esbuild-register": "^3.5.0", @@ -137,7 +139,7 @@ "jest-environment-jsdom": "^29.7.0", "lint-staged": ">=10", "prettier": "^3.0.3", - "react-test-renderer": "^18.2.0", + "react-test-renderer": "^18.3.0", "rimraf": "^3.0.2", "rollup": "^4.22.4", "rollup-plugin-node-externals": "^7.1.3", @@ -146,7 +148,7 @@ "ts-morph": "^17.0.0", "turbo": "^2.0.11", "typescript": "^5.2.2", - "vite": "^5.2.14", + "vite": "^5.4.12", "vue-tsc": "^2.0.7" } } diff --git a/packages/angular/projects/ui-angular/CHANGELOG.md b/packages/angular/projects/ui-angular/CHANGELOG.md index 9376743ff72..848e9163911 100644 --- a/packages/angular/projects/ui-angular/CHANGELOG.md +++ b/packages/angular/projects/ui-angular/CHANGELOG.md @@ -1,5 +1,19 @@ # @aws-amplify/ui-angular +## 5.0.36 + +### Patch Changes + +- Updated dependencies [[`272ec8e575718ea990dcb9f51d1baaf522f45fb6`](https://github.com/aws-amplify/amplify-ui/commit/272ec8e575718ea990dcb9f51d1baaf522f45fb6)]: + - @aws-amplify/ui@6.8.1 + +## 5.0.35 + +### Patch Changes + +- Updated dependencies [[`8757f03b7b1d761d9a13cfe29382a2208d4f3999`](https://github.com/aws-amplify/amplify-ui/commit/8757f03b7b1d761d9a13cfe29382a2208d4f3999), [`8d2aa79b174d4e48aaca913bd568898b8c8975a2`](https://github.com/aws-amplify/amplify-ui/commit/8d2aa79b174d4e48aaca913bd568898b8c8975a2)]: + - @aws-amplify/ui@6.8.0 + ## 5.0.34 ### Patch Changes diff --git a/packages/angular/projects/ui-angular/package.json b/packages/angular/projects/ui-angular/package.json index 099c421ce10..8bb8884a76f 100644 --- a/packages/angular/projects/ui-angular/package.json +++ b/packages/angular/projects/ui-angular/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/ui-angular", - "version": "5.0.34", + "version": "5.0.36", "scripts": { "build": "yarn --cwd ../../ build", "dev": "yarn --cwd ../../ dev", @@ -20,7 +20,7 @@ "rxjs": "^6.5.3 || ^7.4.0" }, "dependencies": { - "@aws-amplify/ui": "6.7.2", + "@aws-amplify/ui": "6.8.1", "nanoid": "3.3.8", "qrcode": "1.5.0", "tslib": "^2.5.2", diff --git a/packages/angular/projects/ui-angular/src/version.ts b/packages/angular/projects/ui-angular/src/version.ts index 2cb825fd680..ae1a6285abf 100644 --- a/packages/angular/projects/ui-angular/src/version.ts +++ b/packages/angular/projects/ui-angular/src/version.ts @@ -1 +1 @@ -export const VERSION = '5.0.34'; +export const VERSION = '5.0.36'; diff --git a/packages/configs/.eslintrc.js b/packages/configs/.eslintrc.js index 284e37fc452..8b9417a09d9 100644 --- a/packages/configs/.eslintrc.js +++ b/packages/configs/.eslintrc.js @@ -1,5 +1,5 @@ module.exports = { - extends: ['eslint:recommended', 'plugin:eslint-plugin/recommended'], + extends: ['eslint:recommended'], env: { jest: true, node: true }, parserOptions: { ecmaVersion: 12 }, }; diff --git a/packages/configs/typescript/tsconfig.base.json b/packages/configs/typescript/tsconfig.base.json index a2c8a7daf7c..a4a00b10613 100644 --- a/packages/configs/typescript/tsconfig.base.json +++ b/packages/configs/typescript/tsconfig.base.json @@ -1,30 +1,14 @@ { "compilerOptions": { - // https://www.typescriptlang.org/tsconfig#allowSyntheticDefaultImports "allowSyntheticDefaultImports": true, - - // https://www.typescriptlang.org/tsconfig#baseUrl "baseUrl": ".", - - // https://www.typescriptlang.org/tsconfig#declaration "declaration": true, - - // https://www.typescriptlang.org/tsconfig#esModuleInterop "esModuleInterop": true, - - // https://www.typescriptlang.org/tsconfig#importHelpers "importHelpers": true, - - // https://www.typescriptlang.org/tsconfig#module "module": "esnext", - - // https://www.typescriptlang.org/tsconfig#moduleResolution "moduleResolution": "node", - - // https://www.typescriptlang.org/tsconfig#strict "strict": true, - - // https://www.typescriptlang.org/tsconfig#target - "target": "ES2020" + "target": "ES2020", + "types": ["jest", "@testing-library/jest-dom"] } } diff --git a/packages/e2e/cypress/integration/common/shared.ts b/packages/e2e/cypress/integration/common/shared.ts index cb7fe2ba46a..6b1f22b963d 100644 --- a/packages/e2e/cypress/integration/common/shared.ts +++ b/packages/e2e/cypress/integration/common/shared.ts @@ -655,3 +655,9 @@ When( (folderName: string, count: string) => cy.fileInputUpload(`${folderName}/${randomFileName}`, parseInt(count)) ); + +When('A network failure occurs', () => { + cy.intercept('', (req) => { + req.destroy(); + }); +}); diff --git a/packages/e2e/features/ui/components/storage/storage-browser/action-menu.feature b/packages/e2e/features/ui/components/storage/storage-browser/action-menu.feature index 66db29817e1..e2e4f2dcd32 100644 --- a/packages/e2e/features/ui/components/storage/storage-browser/action-menu.feature +++ b/packages/e2e/features/ui/components/storage/storage-browser/action-menu.feature @@ -2,12 +2,12 @@ Feature: Create folder with Storage Browser Background: Given I'm running the example "ui/components/storage/storage-browser/default-auth" + And I type my "email" with status "CONFIRMED" + And I type my password + And I click the "Sign in" button @react Scenario: Create folder successfully creates a new empty folder - When I type my "email" with status "CONFIRMED" - Then I type my password - Then I click the "Sign in" button When I click the first button containing "public" When I click the first button containing "DoNotDeleteThisFolder_CanDeleteAllChildren" Then I see the "Menu Toggle" button @@ -29,9 +29,6 @@ Feature: Create folder with Storage Browser @react Scenario: Create folder fails on overwrite of existing folder name - When I type my "email" with status "CONFIRMED" - Then I type my password - Then I click the "Sign in" button When I click the first button containing "public" Then I see the "Menu Toggle" button When I click the "Menu Toggle" button @@ -47,9 +44,6 @@ Feature: Create folder with Storage Browser @react Scenario: Create folder input shows error message when folder name contains "/" - When I type my "email" with status "CONFIRMED" - Then I type my password - Then I click the "Sign in" button When I click the first button containing "public" Then I see the "Menu Toggle" button When I click the "Menu Toggle" button @@ -64,9 +58,6 @@ Feature: Create folder with Storage Browser @react Scenario: upload, list, copy and delete a file using toggle menu - When I type my "email" with status "CONFIRMED" - Then I type my password - Then I click the "Sign in" button When I click the first button containing "public" Then I see the "Menu Toggle" button When I click the "Menu Toggle" button @@ -109,9 +100,6 @@ Feature: Create folder with Storage Browser @react Scenario: upload a folder - When I type my "email" with status "CONFIRMED" - Then I type my password - Then I click the "Sign in" button When I click the first button containing "public" Then I see the "Menu Toggle" button When I click the "Menu Toggle" button @@ -134,3 +122,55 @@ Feature: Create folder with Storage Browser Then I click the "Delete" button Then I see "All files deleted" + @react + Scenario: Upload file shows a Network error if offline + When I click the first button containing "public" + Then I see the "Menu Toggle" button + When I click the "Menu Toggle" button + Then I see the "Upload" menuitem + When I click the "Upload" menuitem + Then I upload "1" files with random names + When A network failure occurs + Then I click the "Upload" button + Then I see "All files failed to upload" + + @react + Scenario: List location items shows a Network error if offline + When I see the first button containing "public" + When A network failure occurs + Then I click the first button containing "public" + Then I see "Network Error" + + @react + Scenario: Create folder shows a Network error if offline + When I click the first button containing "public" + Then I see the "Menu Toggle" button + When I click the "Menu Toggle" button + Then I see the "Create Folder" menuitem + When I click the "Create Folder" menuitem + Then I see "Folder name" + Then I type a new "Folder name" with random value + When A network failure occurs + Then I click the "Create Folder" button + Then I see "There was an issue creating the folder" + + @react + Scenario: Copy file shows a Network error if offline + When I click the first button containing "public" + Then I click checkbox for file "001_dont_delete_file.txt" + When I click the "Menu Toggle" button + When I click the "Copy" menuitem + Then I click the "DoNotDeleteThisFolder_CanDeleteAllChildren/" button + When A network failure occurs + Then I click the "Copy" button + Then I see "All files failed to copy" + + @react + Scenario: Delete file shows a Network error if offline + When I click the first button containing "public" + Then I click checkbox for file "001_dont_delete_file.txt" + When I click the "Menu Toggle" button + Then I click the "Delete" menuitem + When A network failure occurs + Then I click the "Delete" button + Then I see "All files failed to delete" diff --git a/packages/e2e/features/ui/components/storage/storage-browser/download.feature b/packages/e2e/features/ui/components/storage/storage-browser/download.feature index 74d7c34673e..3859c60a79a 100644 --- a/packages/e2e/features/ui/components/storage/storage-browser/download.feature +++ b/packages/e2e/features/ui/components/storage/storage-browser/download.feature @@ -2,20 +2,17 @@ Feature: Download on Storage Browser Background: Given I'm running the example "ui/components/storage/storage-browser/default-auth" + And I type my "email" with status "CONFIRMED" + And I type my password + And I click the "Sign in" button @react Scenario: Download is available for files - When I type my "email" with status "CONFIRMED" - Then I type my password - Then I click the "Sign in" button When I click the first button containing "public" Then I see download for file "001_dont_delete_file.txt" Then I click and see download succeed for "001_dont_delete_file.txt" @react Scenario: Download is not available for folder - When I type my "email" with status "CONFIRMED" - Then I type my password - Then I click the "Sign in" button When I click the first button containing "public" Then I see no download for folder "DO_NOT_DELETE/" diff --git a/packages/e2e/features/ui/components/storage/storage-browser/drag-and-drop.feature b/packages/e2e/features/ui/components/storage/storage-browser/drag-and-drop.feature index 616dd8c9a20..39eb86884c5 100644 --- a/packages/e2e/features/ui/components/storage/storage-browser/drag-and-drop.feature +++ b/packages/e2e/features/ui/components/storage/storage-browser/drag-and-drop.feature @@ -2,12 +2,12 @@ Feature: Drag and drop files within Storage Browser Background: Given I'm running the example "ui/components/storage/storage-browser/default-auth" + And I type my "email" with status "CONFIRMED" + And I type my password + And I click the "Sign in" button @react Scenario: Drag and drop file into Location Detail view - When I type my "email" with status "CONFIRMED" - Then I type my password - Then I click the "Sign in" button When I click the first button containing "public" When I drag and drop a file into the storage browser with file name "test.txt" Then I see "Upload" @@ -15,20 +15,13 @@ Feature: Drag and drop files within Storage Browser @react Scenario: Drag and drop folder into Location Detail view - When I type my "email" with status "CONFIRMED" - Then I type my password - Then I click the "Sign in" button When I click the first button containing "public" When I drag and drop a folder into the storage browser with name "test" Then I see "Upload" Then I see "test" - @react Scenario: Drag and drop file into Upload Action view - When I type my "email" with status "CONFIRMED" - Then I type my password - Then I click the "Sign in" button When I click the first button containing "public" Then I see the "Menu Toggle" button When I click the "Menu Toggle" button @@ -38,4 +31,3 @@ Feature: Drag and drop files within Storage Browser Then I press the "{esc}" key When I drag and drop a file into the storage browser with file name "test.txt" Then I see "test.txt" - \ No newline at end of file diff --git a/packages/e2e/features/ui/components/storage/storage-browser/filter-locations.feature b/packages/e2e/features/ui/components/storage/storage-browser/filter-locations.feature index 60a7a44fc40..7f32e9b9764 100644 --- a/packages/e2e/features/ui/components/storage/storage-browser/filter-locations.feature +++ b/packages/e2e/features/ui/components/storage/storage-browser/filter-locations.feature @@ -15,4 +15,3 @@ Feature: StorageBrowser Filter Locations Then I do not see the button containing "private" When I click the button containing "Clear search" Then I see the first button containing "private" - diff --git a/packages/e2e/features/ui/components/storage/storage-browser/navigate-locations.feature b/packages/e2e/features/ui/components/storage/storage-browser/navigate-locations.feature index 03f0566cfe7..e6aca9ac0fe 100644 --- a/packages/e2e/features/ui/components/storage/storage-browser/navigate-locations.feature +++ b/packages/e2e/features/ui/components/storage/storage-browser/navigate-locations.feature @@ -2,12 +2,12 @@ Feature: Storage Browser navigate breadcrumbs Background: Given I'm running the example "ui/components/storage/storage-browser/default-auth" + And I type my "email" with status "CONFIRMED" + And I type my password + And I click the "Sign in" button @react Scenario: Navigate back to Home - When I type my "email" with status "CONFIRMED" - Then I type my password - Then I click the "Sign in" button When I click the first button containing "public" Then I see the "Home" button When I click the "Home" button @@ -16,9 +16,6 @@ Feature: Storage Browser navigate breadcrumbs @react Scenario: Navigate back up to prefix - When I type my "email" with status "CONFIRMED" - Then I type my password - Then I click the "Sign in" button When I click the first button containing "public" Then I see the "DO_NOT_DELETE/" button When I click the "DO_NOT_DELETE/" button @@ -29,9 +26,6 @@ Feature: Storage Browser navigate breadcrumbs @react Scenario: Navigate to parent folder from nested child folder - When I type my "email" with status "CONFIRMED" - Then I type my password - Then I click the "Sign in" button When I click the first button containing "public" Then I see the "DO_NOT_DELETE/" button When I click the "DO_NOT_DELETE/" button diff --git a/packages/e2e/features/ui/components/storage/storage-browser/search-locations.feature b/packages/e2e/features/ui/components/storage/storage-browser/search-locations.feature index 0858699da8c..cd4289967ef 100644 --- a/packages/e2e/features/ui/components/storage/storage-browser/search-locations.feature +++ b/packages/e2e/features/ui/components/storage/storage-browser/search-locations.feature @@ -2,12 +2,12 @@ Feature: Search with Storage Browser Background: Given I'm running the example "ui/components/storage/storage-browser/default-auth" + And I type my "email" with status "CONFIRMED" + And I type my password + And I click the "Sign in" button @react Scenario: Search folders and subfolders with matching results - When I type my "email" with status "CONFIRMED" - Then I type my password - Then I click the "Sign in" button When I click the first button containing "public" Then I see the button containing "DoNotDeleteThisFolder_CanDeleteAllChildren" When I see input with placeholder "Search current folder" and type "DO_NOT" @@ -26,9 +26,6 @@ Feature: Search with Storage Browser @react Scenario: Search with no matching results - When I type my "email" with status "CONFIRMED" - Then I type my password - Then I click the "Sign in" button When I click the first button containing "public" When I see input with placeholder "Search current folder" and type "XXXXXXXX" Then I click the "Search" button diff --git a/packages/e2e/package.json b/packages/e2e/package.json index 5c6a5e2b063..6703e0855c4 100644 --- a/packages/e2e/package.json +++ b/packages/e2e/package.json @@ -29,7 +29,7 @@ ] }, "devDependencies": { - "@aws-amplify/ui": "^6.7.2", + "@aws-amplify/ui": "^6.8.1", "@badeball/cypress-cucumber-preprocessor": "^18.0.6", "@bahmutov/cypress-esbuild-preprocessor": "~2.2.0", "@cucumber/cucumber": "^10.0.1", diff --git a/packages/react-ai/CHANGELOG.md b/packages/react-ai/CHANGELOG.md index eab33b3ed77..162371d6905 100644 --- a/packages/react-ai/CHANGELOG.md +++ b/packages/react-ai/CHANGELOG.md @@ -1,5 +1,40 @@ # @aws-amplify/ui-react-ai +## 1.3.0 + +### Minor Changes + +- [#6296](https://github.com/aws-amplify/amplify-ui/pull/6296) [`8d2aa79b174d4e48aaca913bd568898b8c8975a2`](https://github.com/aws-amplify/amplify-ui/commit/8d2aa79b174d4e48aaca913bd568898b8c8975a2) Thanks [@calebpollman](https://github.com/calebpollman)! - feat(react): reenable react 19 support + +### Patch Changes + +- Updated dependencies [[`8757f03b7b1d761d9a13cfe29382a2208d4f3999`](https://github.com/aws-amplify/amplify-ui/commit/8757f03b7b1d761d9a13cfe29382a2208d4f3999), [`8d2aa79b174d4e48aaca913bd568898b8c8975a2`](https://github.com/aws-amplify/amplify-ui/commit/8d2aa79b174d4e48aaca913bd568898b8c8975a2)]: + - @aws-amplify/ui@6.8.0 + - @aws-amplify/ui-react@6.9.0 + - @aws-amplify/ui-react-core@3.3.0 + +## 1.2.1 + +### Patch Changes + +- [#6278](https://github.com/aws-amplify/amplify-ui/pull/6278) [`475e4a37a404bd116ec55e95579acb8f2d23c9a4`](https://github.com/aws-amplify/amplify-ui/commit/475e4a37a404bd116ec55e95579acb8f2d23c9a4) Thanks [@jordanvn](https://github.com/jordanvn)! - revert changes introduced for React 19 support + +- Updated dependencies [[`475e4a37a404bd116ec55e95579acb8f2d23c9a4`](https://github.com/aws-amplify/amplify-ui/commit/475e4a37a404bd116ec55e95579acb8f2d23c9a4)]: + - @aws-amplify/ui-react-core@3.2.1 + - @aws-amplify/ui-react@6.8.1 + +## 1.2.0 + +### Minor Changes + +- [#5826](https://github.com/aws-amplify/amplify-ui/pull/5826) [`954e9be2d055a57ebddab5b902e3e6b427d09f67`](https://github.com/aws-amplify/amplify-ui/commit/954e9be2d055a57ebddab5b902e3e6b427d09f67) Thanks [@calebpollman](https://github.com/calebpollman)! - chore(react): add support for React 19 + +### Patch Changes + +- Updated dependencies [[`c623990d5fb6af635b1964a51a8ff2c807938235`](https://github.com/aws-amplify/amplify-ui/commit/c623990d5fb6af635b1964a51a8ff2c807938235), [`825cccc92f5c326f0f110c8439a1c2c6553ff00a`](https://github.com/aws-amplify/amplify-ui/commit/825cccc92f5c326f0f110c8439a1c2c6553ff00a), [`954e9be2d055a57ebddab5b902e3e6b427d09f67`](https://github.com/aws-amplify/amplify-ui/commit/954e9be2d055a57ebddab5b902e3e6b427d09f67)]: + - @aws-amplify/ui-react@6.8.0 + - @aws-amplify/ui-react-core@3.2.0 + ## 1.1.0 ### Minor Changes diff --git a/packages/react-ai/package.json b/packages/react-ai/package.json index df77b493082..9c93afcfce1 100644 --- a/packages/react-ai/package.json +++ b/packages/react-ai/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/ui-react-ai", - "version": "1.1.0", + "version": "1.3.0", "main": "dist/index.js", "module": "dist/esm/index.mjs", "exports": { @@ -44,13 +44,13 @@ "peerDependencies": { "@aws-amplify/api-graphql": "unstable", "aws-amplify": "^6.9.0", - "react": "^16.14.0 || ^17.0 || ^18.0", - "react-dom": "^16.14.0 || ^17.0 || ^18.0" + "react": "^16.14 || ^17 || ^18 || ^19", + "react-dom": "^16.14 || ^17 || ^18 || ^19" }, "dependencies": { - "@aws-amplify/ui": "^6.7.1", - "@aws-amplify/ui-react": "^6.7.1", - "@aws-amplify/ui-react-core": "^3.1.1" + "@aws-amplify/ui": "^6.8.0", + "@aws-amplify/ui-react": "^6.9.0", + "@aws-amplify/ui-react-core": "^3.3.0" }, "devDependencies": { "@types/jest-when": "^3.5.0", diff --git a/packages/react-ai/src/components/AIConversation/AIConversation.tsx b/packages/react-ai/src/components/AIConversation/AIConversation.tsx index b65d9a9ba74..be1e4904512 100644 --- a/packages/react-ai/src/components/AIConversation/AIConversation.tsx +++ b/packages/react-ai/src/components/AIConversation/AIConversation.tsx @@ -30,7 +30,7 @@ function AIConversationBase({ avatars, controls, ...rest -}: AIConversationBaseProps): JSX.Element { +}: AIConversationBaseProps): React.JSX.Element { useSetUserAgent({ componentName: 'AIConversation', packageName: 'react-ai', diff --git a/packages/react-ai/src/components/AIConversation/context/AIContextContext.tsx b/packages/react-ai/src/components/AIConversation/context/AIContextContext.tsx index 45cca799f98..707eb81402f 100644 --- a/packages/react-ai/src/components/AIConversation/context/AIContextContext.tsx +++ b/packages/react-ai/src/components/AIConversation/context/AIContextContext.tsx @@ -10,7 +10,7 @@ export const AIContextProvider = ({ }: { children?: React.ReactNode; aiContext?: () => object; -}): JSX.Element => { +}): React.JSX.Element => { return ( {children} diff --git a/packages/react-ai/src/components/AIConversation/context/ActionsContext.tsx b/packages/react-ai/src/components/AIConversation/context/ActionsContext.tsx index 46cec893a9f..79dedf9e9ed 100644 --- a/packages/react-ai/src/components/AIConversation/context/ActionsContext.tsx +++ b/packages/react-ai/src/components/AIConversation/context/ActionsContext.tsx @@ -11,7 +11,7 @@ export const ActionsProvider = ({ }: { children?: React.ReactNode; actions?: CustomAction[]; -}): JSX.Element => { +}): React.JSX.Element => { return ( {children} diff --git a/packages/react-ai/src/components/AIConversation/context/AttachmentContext.tsx b/packages/react-ai/src/components/AIConversation/context/AttachmentContext.tsx index 3195ad6c3c8..6b32b00beb8 100644 --- a/packages/react-ai/src/components/AIConversation/context/AttachmentContext.tsx +++ b/packages/react-ai/src/components/AIConversation/context/AttachmentContext.tsx @@ -24,7 +24,7 @@ export const AttachmentProvider = ({ allowAttachments = false, maxAttachmentSize = 400_000, maxAttachments = 20, -}: React.PropsWithChildren): JSX.Element => { +}: React.PropsWithChildren): React.JSX.Element => { const providerValue = React.useMemo( () => ({ maxAttachmentSize, maxAttachments, allowAttachments }), [maxAttachmentSize, maxAttachments, allowAttachments] diff --git a/packages/react-ai/src/components/AIConversation/context/AvatarsContext.tsx b/packages/react-ai/src/components/AIConversation/context/AvatarsContext.tsx index 332168b4dbf..6eb550c8d70 100644 --- a/packages/react-ai/src/components/AIConversation/context/AvatarsContext.tsx +++ b/packages/react-ai/src/components/AIConversation/context/AvatarsContext.tsx @@ -11,7 +11,7 @@ export const AvatarsProvider = ({ }: { children?: React.ReactNode; avatars?: Avatars; -}): JSX.Element => { +}): React.JSX.Element => { return ( {children} diff --git a/packages/react-ai/src/components/AIConversation/context/ControlsContext.tsx b/packages/react-ai/src/components/AIConversation/context/ControlsContext.tsx index 717dd38d5d7..829c4f0c792 100644 --- a/packages/react-ai/src/components/AIConversation/context/ControlsContext.tsx +++ b/packages/react-ai/src/components/AIConversation/context/ControlsContext.tsx @@ -29,7 +29,7 @@ export const ControlsProvider = ({ }: { children?: React.ReactNode; controls?: ControlsContextProps; -}): JSX.Element => { +}): React.JSX.Element => { return ( {children} diff --git a/packages/react-ai/src/components/AIConversation/context/ConversationInputContext.tsx b/packages/react-ai/src/components/AIConversation/context/ConversationInputContext.tsx index dd56f6350b2..a530575d879 100644 --- a/packages/react-ai/src/components/AIConversation/context/ConversationInputContext.tsx +++ b/packages/react-ai/src/components/AIConversation/context/ConversationInputContext.tsx @@ -21,7 +21,7 @@ export const ConversationInputContextProvider = ({ children, }: { children?: React.ReactNode; -}): JSX.Element => { +}): React.JSX.Element => { const [input, setInput] = React.useState(); const [error, setError] = React.useState(); diff --git a/packages/react-ai/src/components/AIConversation/context/FallbackComponentContext.tsx b/packages/react-ai/src/components/AIConversation/context/FallbackComponentContext.tsx index a5f4655a4f1..17d6c180a8f 100644 --- a/packages/react-ai/src/components/AIConversation/context/FallbackComponentContext.tsx +++ b/packages/react-ai/src/components/AIConversation/context/FallbackComponentContext.tsx @@ -11,7 +11,7 @@ export const FallbackComponentProvider = ({ }: { children?: React.ReactNode; FallbackComponent?: AIConversationInput['FallbackResponseComponent']; -}): JSX.Element => { +}): React.JSX.Element => { return ( {children} diff --git a/packages/react-ai/src/components/AIConversation/context/LoadingContext.tsx b/packages/react-ai/src/components/AIConversation/context/LoadingContext.tsx index 8246a3f30eb..9f93e53e16c 100644 --- a/packages/react-ai/src/components/AIConversation/context/LoadingContext.tsx +++ b/packages/react-ai/src/components/AIConversation/context/LoadingContext.tsx @@ -10,7 +10,7 @@ export const LoadingContextProvider = ({ }: { children?: React.ReactNode; isLoading?: boolean; -}): JSX.Element => { +}): React.JSX.Element => { return ( {children} diff --git a/packages/react-ai/src/components/AIConversation/context/MessageVariantContext.tsx b/packages/react-ai/src/components/AIConversation/context/MessageVariantContext.tsx index 908d3657e23..2f5f1af6ddf 100644 --- a/packages/react-ai/src/components/AIConversation/context/MessageVariantContext.tsx +++ b/packages/react-ai/src/components/AIConversation/context/MessageVariantContext.tsx @@ -11,7 +11,7 @@ export const MessageVariantProvider = ({ }: { children?: React.ReactNode; variant?: MessageVariant; -}): JSX.Element => { +}): React.JSX.Element => { return ( {children} diff --git a/packages/react-ai/src/components/AIConversation/context/MessagesContext.tsx b/packages/react-ai/src/components/AIConversation/context/MessagesContext.tsx index b2251bdbbf3..d93b8ad74df 100644 --- a/packages/react-ai/src/components/AIConversation/context/MessagesContext.tsx +++ b/packages/react-ai/src/components/AIConversation/context/MessagesContext.tsx @@ -17,7 +17,7 @@ export const MessagesProvider = ({ }: { children?: React.ReactNode; messages: ConversationMessage[]; -}): JSX.Element => { +}): React.JSX.Element => { return ( {children} diff --git a/packages/react-ai/src/components/AIConversation/context/ResponseComponentsContext.tsx b/packages/react-ai/src/components/AIConversation/context/ResponseComponentsContext.tsx index fc71250db77..985b5737627 100644 --- a/packages/react-ai/src/components/AIConversation/context/ResponseComponentsContext.tsx +++ b/packages/react-ai/src/components/AIConversation/context/ResponseComponentsContext.tsx @@ -27,7 +27,7 @@ export const ResponseComponentsProvider = ({ }: { children?: React.ReactNode; responseComponents?: ResponseComponents; -}): JSX.Element => { +}): React.JSX.Element => { const _responseComponents = React.useMemo( () => prependResponseComponents(responseComponents), [responseComponents] diff --git a/packages/react-ai/src/components/AIConversation/context/SendMessageContext.tsx b/packages/react-ai/src/components/AIConversation/context/SendMessageContext.tsx index 2171ca27944..070953370c4 100644 --- a/packages/react-ai/src/components/AIConversation/context/SendMessageContext.tsx +++ b/packages/react-ai/src/components/AIConversation/context/SendMessageContext.tsx @@ -11,7 +11,7 @@ export const SendMessageContextProvider = ({ }: { children?: React.ReactNode; handleSendMessage: SendMessage; -}): JSX.Element => { +}): React.JSX.Element => { return ( {children} diff --git a/packages/react-ai/src/components/AIConversation/context/SuggestedPromptsContext.tsx b/packages/react-ai/src/components/AIConversation/context/SuggestedPromptsContext.tsx index 1e3541c386d..b38307c0e70 100644 --- a/packages/react-ai/src/components/AIConversation/context/SuggestedPromptsContext.tsx +++ b/packages/react-ai/src/components/AIConversation/context/SuggestedPromptsContext.tsx @@ -12,7 +12,7 @@ export const SuggestedPromptProvider = ({ }: { children?: React.ReactNode; suggestedPrompts?: SuggestedPrompt[]; -}): JSX.Element => { +}): React.JSX.Element => { return ( {children} diff --git a/packages/react-ai/src/components/AIConversation/context/WelcomeMessageContext.tsx b/packages/react-ai/src/components/AIConversation/context/WelcomeMessageContext.tsx index fe116d97bcf..65d33c22adb 100644 --- a/packages/react-ai/src/components/AIConversation/context/WelcomeMessageContext.tsx +++ b/packages/react-ai/src/components/AIConversation/context/WelcomeMessageContext.tsx @@ -11,7 +11,7 @@ export const WelcomeMessageProvider = ({ }: { children?: React.ReactNode; welcomeMessage?: React.ReactNode; -}): JSX.Element => { +}): React.JSX.Element => { return ( {children} diff --git a/packages/react-ai/src/components/AIConversation/createAIConversation.tsx b/packages/react-ai/src/components/AIConversation/createAIConversation.tsx index e6541c38db5..aaf0446159e 100644 --- a/packages/react-ai/src/components/AIConversation/createAIConversation.tsx +++ b/packages/react-ai/src/components/AIConversation/createAIConversation.tsx @@ -24,7 +24,7 @@ export function createAIConversation(input: AIConversationInput = {}): { FallbackResponseComponent, } = input; - function AIConversation(props: AIConversationProps): JSX.Element { + function AIConversation(props: AIConversationProps): React.JSX.Element { const { messages, avatars, handleSendMessage, isLoading } = props; const providerProps = { actions, diff --git a/packages/react-ai/src/components/AIConversation/types.ts b/packages/react-ai/src/components/AIConversation/types.ts index 69aef506b39..dfebc8c657b 100644 --- a/packages/react-ai/src/components/AIConversation/types.ts +++ b/packages/react-ai/src/components/AIConversation/types.ts @@ -53,10 +53,10 @@ export interface AIConversationProps { export interface AIConversation< PropsType extends AIConversationProps = AIConversationProps, > { - (props: PropsType): JSX.Element; - DefaultMessage: () => JSX.Element | undefined; - Messages: () => JSX.Element; - Form: () => JSX.Element; + (props: PropsType): React.JSX.Element; + DefaultMessage: () => React.JSX.Element | undefined; + Messages: () => React.JSX.Element; + Form: () => React.JSX.Element; Provider: (props: AIConversationProviderProps) => React.JSX.Element; } diff --git a/packages/react-ai/src/components/AIConversation/views/Controls/AttachmentListControl.tsx b/packages/react-ai/src/components/AIConversation/views/Controls/AttachmentListControl.tsx index 5b01fd88839..d8bcdcefe58 100644 --- a/packages/react-ai/src/components/AIConversation/views/Controls/AttachmentListControl.tsx +++ b/packages/react-ai/src/components/AIConversation/views/Controls/AttachmentListControl.tsx @@ -45,7 +45,7 @@ RemoveButtonControl.Button = RemoveButton; interface RemoveButtonControl< T extends Partial = AIConversationElements, > { - (props: { onRemove: () => void }): JSX.Element; + (props: { onRemove: () => void }): React.JSX.Element; Button: T['Button']; Icon: T['Icon']; } @@ -91,7 +91,7 @@ TextControl.Separator = Separator; interface TextControl< T extends Partial = AIConversationElements, > { - (props: { fileName: string; fileSize: number }): JSX.Element; + (props: { fileName: string; fileSize: number }): React.JSX.Element; Container: T['View']; FileName: T['Text']; FileSize: T['Text']; @@ -120,7 +120,7 @@ AttachmentControl.Text = TextControl; interface AttachmentControl< T extends Partial = AIConversationElements, > { - (props: { image: File; onRemove: () => void }): JSX.Element; + (props: { image: File; onRemove: () => void }): React.JSX.Element; Container: T['ListItem']; ImageIcon: T['Icon']; RemoveButton: RemoveButtonControl; @@ -158,7 +158,7 @@ AttachmentListControl.Item = AttachmentControl; export interface AttachmentListControl< T extends Partial = AIConversationElements, > { - (): JSX.Element; + (): React.JSX.Element; List: T['UnorderedList']; Item: AttachmentControl; } diff --git a/packages/react-ai/src/components/AIConversation/views/Controls/DefaultMessageControl.tsx b/packages/react-ai/src/components/AIConversation/views/Controls/DefaultMessageControl.tsx index be2e769fbf9..39ba4cfde01 100644 --- a/packages/react-ai/src/components/AIConversation/views/Controls/DefaultMessageControl.tsx +++ b/packages/react-ai/src/components/AIConversation/views/Controls/DefaultMessageControl.tsx @@ -3,7 +3,7 @@ import { MessagesContext } from '../../context'; import { PromptControl } from './PromptControl'; import { WelcomeMessageContext } from '../../context/WelcomeMessageContext'; -export const DefaultMessageControl = (): JSX.Element | undefined => { +export const DefaultMessageControl = (): React.JSX.Element | undefined => { const messages = React.useContext(MessagesContext); const welcomeMessage = React.useContext(WelcomeMessageContext); diff --git a/packages/react-ai/src/components/AIConversation/views/Controls/MessagesControl.tsx b/packages/react-ai/src/components/AIConversation/views/Controls/MessagesControl.tsx index feb2ee53d23..372ae305300 100644 --- a/packages/react-ai/src/components/AIConversation/views/Controls/MessagesControl.tsx +++ b/packages/react-ai/src/components/AIConversation/views/Controls/MessagesControl.tsx @@ -116,7 +116,7 @@ export const MessageControl: MessageControl = ({ message }) => { ); }; interface MessageControl { - (props: { message: ConversationMessage }): JSX.Element; + (props: { message: ConversationMessage }): React.JSX.Element; } const Timestamp = withBaseElementProps(Text, { @@ -232,7 +232,9 @@ export const MessagesControl: MessagesControl = () => { tabIndex={focusedItemIndex === index ? 0 : -1} onFocus={() => handleFocus(index)} onKeyDown={(event) => onKeyDown(index, event)} - ref={(el) => (messagesRef.current[index] = el)} + ref={(el) => { + messagesRef.current[index] = el; + }} > @@ -263,7 +265,7 @@ MessagesControl.Layout = Layout; MessagesControl.Message = MessageControl; export interface MessagesControl { - (): JSX.Element; + (): React.JSX.Element; ActionsBar: ActionsBarControl; Avatar: AvatarControl; Container: AIConversationElements['View']; diff --git a/packages/react-ai/src/components/AIConversation/views/default/Attachments.tsx b/packages/react-ai/src/components/AIConversation/views/default/Attachments.tsx index 764702cbd7e..9c040a471fe 100644 --- a/packages/react-ai/src/components/AIConversation/views/default/Attachments.tsx +++ b/packages/react-ai/src/components/AIConversation/views/default/Attachments.tsx @@ -48,7 +48,7 @@ export const Attachments = ({ }: { files?: File[]; setInput: ConversationInputContextProps['setInput']; -}): JSX.Element | null => { +}): React.JSX.Element | null => { if (!files || files.length < 1) { return null; } diff --git a/packages/react-ai/src/hooks/useAIConversation.tsx b/packages/react-ai/src/hooks/useAIConversation.tsx index f3ece989f09..c150f491dd6 100644 --- a/packages/react-ai/src/hooks/useAIConversation.tsx +++ b/packages/react-ai/src/hooks/useAIConversation.tsx @@ -69,7 +69,9 @@ export function createUseAIConversation< // We need to keep track of the stream events as the come in // for an assistant message, but don't need to keep them in state - const contentBlocksRef = React.useRef(); + const contentBlocksRef = React.useRef< + ConversationStreamEvent[][] | undefined + >(undefined); // Using this hook without an existing conversation id means // it will create a new conversation when it is executed // we don't want to create 2 conversations diff --git a/packages/react-ai/src/version.ts b/packages/react-ai/src/version.ts index 8b9189525eb..2b682bb4dec 100644 --- a/packages/react-ai/src/version.ts +++ b/packages/react-ai/src/version.ts @@ -1 +1 @@ -export const VERSION = '1.1.0'; +export const VERSION = '1.3.0'; diff --git a/packages/react-auth/CHANGELOG.md b/packages/react-auth/CHANGELOG.md index e84d6fbb77c..c51482ca1fa 100644 --- a/packages/react-auth/CHANGELOG.md +++ b/packages/react-auth/CHANGELOG.md @@ -1,5 +1,43 @@ # @aws-amplify/ui-react-auth +## 0.0.44 + +### Patch Changes + +- Updated dependencies [[`272ec8e575718ea990dcb9f51d1baaf522f45fb6`](https://github.com/aws-amplify/amplify-ui/commit/272ec8e575718ea990dcb9f51d1baaf522f45fb6), [`6e51c1750f8f3e01cf8827f4c5c2e5ef02240ca6`](https://github.com/aws-amplify/amplify-ui/commit/6e51c1750f8f3e01cf8827f4c5c2e5ef02240ca6)]: + - @aws-amplify/ui@6.8.1 + - @aws-amplify/ui-react@6.9.1 + - @aws-amplify/ui-react-core@3.3.1 + - @aws-amplify/ui-react-core-auth@0.0.39 + +## 0.0.43 + +### Patch Changes + +- Updated dependencies [[`8757f03b7b1d761d9a13cfe29382a2208d4f3999`](https://github.com/aws-amplify/amplify-ui/commit/8757f03b7b1d761d9a13cfe29382a2208d4f3999), [`8d2aa79b174d4e48aaca913bd568898b8c8975a2`](https://github.com/aws-amplify/amplify-ui/commit/8d2aa79b174d4e48aaca913bd568898b8c8975a2)]: + - @aws-amplify/ui@6.8.0 + - @aws-amplify/ui-react@6.9.0 + - @aws-amplify/ui-react-core@3.3.0 + - @aws-amplify/ui-react-core-auth@0.0.38 + +## 0.0.42 + +### Patch Changes + +- Updated dependencies [[`475e4a37a404bd116ec55e95579acb8f2d23c9a4`](https://github.com/aws-amplify/amplify-ui/commit/475e4a37a404bd116ec55e95579acb8f2d23c9a4)]: + - @aws-amplify/ui-react-core@3.2.1 + - @aws-amplify/ui-react@6.8.1 + - @aws-amplify/ui-react-core-auth@0.0.37 + +## 0.0.41 + +### Patch Changes + +- Updated dependencies [[`c623990d5fb6af635b1964a51a8ff2c807938235`](https://github.com/aws-amplify/amplify-ui/commit/c623990d5fb6af635b1964a51a8ff2c807938235), [`825cccc92f5c326f0f110c8439a1c2c6553ff00a`](https://github.com/aws-amplify/amplify-ui/commit/825cccc92f5c326f0f110c8439a1c2c6553ff00a), [`954e9be2d055a57ebddab5b902e3e6b427d09f67`](https://github.com/aws-amplify/amplify-ui/commit/954e9be2d055a57ebddab5b902e3e6b427d09f67)]: + - @aws-amplify/ui-react@6.8.0 + - @aws-amplify/ui-react-core@3.2.0 + - @aws-amplify/ui-react-core-auth@0.0.36 + ## 0.0.40 ### Patch Changes diff --git a/packages/react-auth/package.json b/packages/react-auth/package.json index 1b766cb153c..02dc6589987 100644 --- a/packages/react-auth/package.json +++ b/packages/react-auth/package.json @@ -1,7 +1,7 @@ { "name": "@aws-amplify/ui-react-auth", "private": true, - "version": "0.0.40", + "version": "0.0.44", "main": "dist/index.js", "module": "dist/esm/index.mjs", "exports": { @@ -40,18 +40,18 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@aws-amplify/ui": "6.7.2", - "@aws-amplify/ui-react": "6.7.2", - "@aws-amplify/ui-react-core": "3.1.2", - "@aws-amplify/ui-react-core-auth": "0.0.35", + "@aws-amplify/ui": "6.8.1", + "@aws-amplify/ui-react": "6.9.1", + "@aws-amplify/ui-react-core": "3.3.1", + "@aws-amplify/ui-react-core-auth": "0.0.39", "@xstate/react": "3.2.2", "lodash": "4.17.21", "tslib": "^2.5.2" }, "peerDependencies": { "aws-amplify": "^6.9.0", - "react": "^16.14.0 || ^17.0 || ^18.0", - "react-dom": "^16.14.0 || ^17.0 || ^18.0" + "react": "^16.14 || ^17 || ^18 || ^19", + "react-dom": "^16.14 || ^17 || ^18 || ^19" }, "sideEffects": [ "dist/**/*.css" diff --git a/packages/react-auth/src/version.ts b/packages/react-auth/src/version.ts index fbe71d44f6d..65024974708 100644 --- a/packages/react-auth/src/version.ts +++ b/packages/react-auth/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.0.40'; +export const VERSION = '0.0.44'; diff --git a/packages/react-core-auth/CHANGELOG.md b/packages/react-core-auth/CHANGELOG.md index 4b7c44ce22b..c57fc0acd34 100644 --- a/packages/react-core-auth/CHANGELOG.md +++ b/packages/react-core-auth/CHANGELOG.md @@ -1,5 +1,35 @@ # @aws-amplify/ui-react-core-auth +## 0.0.39 + +### Patch Changes + +- Updated dependencies [[`272ec8e575718ea990dcb9f51d1baaf522f45fb6`](https://github.com/aws-amplify/amplify-ui/commit/272ec8e575718ea990dcb9f51d1baaf522f45fb6)]: + - @aws-amplify/ui@6.8.1 + - @aws-amplify/ui-react-core@3.3.1 + +## 0.0.38 + +### Patch Changes + +- Updated dependencies [[`8757f03b7b1d761d9a13cfe29382a2208d4f3999`](https://github.com/aws-amplify/amplify-ui/commit/8757f03b7b1d761d9a13cfe29382a2208d4f3999), [`8d2aa79b174d4e48aaca913bd568898b8c8975a2`](https://github.com/aws-amplify/amplify-ui/commit/8d2aa79b174d4e48aaca913bd568898b8c8975a2)]: + - @aws-amplify/ui@6.8.0 + - @aws-amplify/ui-react-core@3.3.0 + +## 0.0.37 + +### Patch Changes + +- Updated dependencies [[`475e4a37a404bd116ec55e95579acb8f2d23c9a4`](https://github.com/aws-amplify/amplify-ui/commit/475e4a37a404bd116ec55e95579acb8f2d23c9a4)]: + - @aws-amplify/ui-react-core@3.2.1 + +## 0.0.36 + +### Patch Changes + +- Updated dependencies [[`825cccc92f5c326f0f110c8439a1c2c6553ff00a`](https://github.com/aws-amplify/amplify-ui/commit/825cccc92f5c326f0f110c8439a1c2c6553ff00a), [`954e9be2d055a57ebddab5b902e3e6b427d09f67`](https://github.com/aws-amplify/amplify-ui/commit/954e9be2d055a57ebddab5b902e3e6b427d09f67)]: + - @aws-amplify/ui-react-core@3.2.0 + ## 0.0.35 ### Patch Changes diff --git a/packages/react-core-auth/package.json b/packages/react-core-auth/package.json index 53d5ffae5d2..9fd2e5e20b0 100644 --- a/packages/react-core-auth/package.json +++ b/packages/react-core-auth/package.json @@ -1,7 +1,7 @@ { "name": "@aws-amplify/ui-react-core-auth", "private": true, - "version": "0.0.35", + "version": "0.0.39", "main": "dist/index.js", "module": "dist/esm/index.mjs", "react-native": "src/index.ts", @@ -33,8 +33,8 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@aws-amplify/ui": "6.7.2", - "@aws-amplify/ui-react-core": "3.1.2", + "@aws-amplify/ui": "6.8.1", + "@aws-amplify/ui-react-core": "3.3.1", "@xstate/react": "3.2.2", "lodash": "4.17.21", "qrcode": "1.5.0", @@ -43,7 +43,7 @@ "peerDependencies": { "@aws-amplify/core": "*", "aws-amplify": "^6.9.0", - "react": "^16.14.0 || ^17.0 || ^18.0" + "react": "^16.14 || ^17 || ^18 || ^19" }, "sideEffects": false } diff --git a/packages/react-core-auth/src/components/Authenticator/context/ComponentRoute/ComponentRouteContext.tsx b/packages/react-core-auth/src/components/Authenticator/context/ComponentRoute/ComponentRouteContext.tsx index 6286555c0a6..29b3e7d19bf 100644 --- a/packages/react-core-auth/src/components/Authenticator/context/ComponentRoute/ComponentRouteContext.tsx +++ b/packages/react-core-auth/src/components/Authenticator/context/ComponentRoute/ComponentRouteContext.tsx @@ -35,7 +35,7 @@ export const routeSelector: UseMachineSelector = ({ route }) => [route]; function ComponentRouteProvider({ children, hideSignUp = false, -}: ComponentRouteProviderProps): JSX.Element { +}: ComponentRouteProviderProps): React.JSX.Element { const { route: _route, setRoute: setRouteBase } = useMachine(routeSelector); const route = isRoute(_route, ...COMPONENT_ROUTE) ? _route : undefined; diff --git a/packages/react-core-auth/src/components/Authenticator/context/Machine/MachineContext.tsx b/packages/react-core-auth/src/components/Authenticator/context/Machine/MachineContext.tsx index 8e1490a867d..a3a56f281a0 100644 --- a/packages/react-core-auth/src/components/Authenticator/context/Machine/MachineContext.tsx +++ b/packages/react-core-auth/src/components/Authenticator/context/Machine/MachineContext.tsx @@ -47,7 +47,7 @@ export function MachineProvider({ children, initialRoute: initialState, ...data -}: MachineProviderProps): JSX.Element { +}: MachineProviderProps): React.JSX.Element { const service = useInterpret(() => createAuthenticatorMachine({ ...data, diff --git a/packages/react-core-auth/src/components/Authenticator/context/Primitives/types.ts b/packages/react-core-auth/src/components/Authenticator/context/Primitives/types.ts index 04e63e2a163..2fe03a30488 100644 --- a/packages/react-core-auth/src/components/Authenticator/context/Primitives/types.ts +++ b/packages/react-core-auth/src/components/Authenticator/context/Primitives/types.ts @@ -144,7 +144,7 @@ interface ActionsPrimitives

{ SecondaryButton: React.ComponentType>; } -export type ActionsControlType = (() => JSX.Element) & +export type ActionsControlType = (() => React.JSX.Element) & ActionsPrimitives; interface LinksPrimitives

{ @@ -152,7 +152,7 @@ interface LinksPrimitives

{ ButtonGroup: React.ComponentType; } -export type LinksControlType = (() => JSX.Element) & +export type LinksControlType = (() => React.JSX.Element) & LinksPrimitives & NonPrimitiveControls['Links']; @@ -162,9 +162,10 @@ interface FederatedProvidersPrimitives

{ Divider: React.ComponentType; } -export type FederatedProvidersControlType = (() => JSX.Element) & - FederatedProvidersPrimitives & - NonPrimitiveControls['FederatedProviders']; +export type FederatedProvidersControlType = + (() => React.JSX.Element) & + FederatedProvidersPrimitives & + NonPrimitiveControls['FederatedProviders']; export interface SetupTotpPrimitives

{ Container: React.ComponentType; @@ -176,15 +177,15 @@ export interface SetupTotpPrimitives

{ Loader: React.ComponentType; } -export type SetupTotpControlType = (() => JSX.Element) & +export type SetupTotpControlType = (() => React.JSX.Element) & SetupTotpPrimitives; interface VerifyContactMethodPrimitives { RadioGroup: React.ComponentType>; } -export type VerifyContactMethodControlType = (() => JSX.Element) & - VerifyContactMethodPrimitives; +export type VerifyContactMethodControlType = + (() => React.JSX.Element) & VerifyContactMethodPrimitives; /** * Compound Control values contain primitives diff --git a/packages/react-core-auth/src/components/Authenticator/createProvider/types.ts b/packages/react-core-auth/src/components/Authenticator/createProvider/types.ts index 7ebbfed56dc..36c58eb1c2f 100644 --- a/packages/react-core-auth/src/components/Authenticator/createProvider/types.ts +++ b/packages/react-core-auth/src/components/Authenticator/createProvider/types.ts @@ -27,4 +27,4 @@ export interface ProviderProps { export type ProviderComponent = ( params: ProviderProps -) => JSX.Element; +) => React.JSX.Element; diff --git a/packages/react-core-notifications/CHANGELOG.md b/packages/react-core-notifications/CHANGELOG.md index 9669d15e525..d452b35fc2f 100644 --- a/packages/react-core-notifications/CHANGELOG.md +++ b/packages/react-core-notifications/CHANGELOG.md @@ -1,5 +1,47 @@ # @aws-amplify/ui-react-core-notifications +## 2.2.1 + +### Patch Changes + +- Updated dependencies [[`272ec8e575718ea990dcb9f51d1baaf522f45fb6`](https://github.com/aws-amplify/amplify-ui/commit/272ec8e575718ea990dcb9f51d1baaf522f45fb6)]: + - @aws-amplify/ui@6.8.1 + - @aws-amplify/ui-react-core@3.3.1 + +## 2.2.0 + +### Minor Changes + +- [#6296](https://github.com/aws-amplify/amplify-ui/pull/6296) [`8d2aa79b174d4e48aaca913bd568898b8c8975a2`](https://github.com/aws-amplify/amplify-ui/commit/8d2aa79b174d4e48aaca913bd568898b8c8975a2) Thanks [@calebpollman](https://github.com/calebpollman)! - feat(react): reenable react 19 support + +### Patch Changes + +- Updated dependencies [[`8757f03b7b1d761d9a13cfe29382a2208d4f3999`](https://github.com/aws-amplify/amplify-ui/commit/8757f03b7b1d761d9a13cfe29382a2208d4f3999), [`8d2aa79b174d4e48aaca913bd568898b8c8975a2`](https://github.com/aws-amplify/amplify-ui/commit/8d2aa79b174d4e48aaca913bd568898b8c8975a2)]: + - @aws-amplify/ui@6.8.0 + - @aws-amplify/ui-react-core@3.3.0 + +## 2.1.1 + +### Patch Changes + +- [#6278](https://github.com/aws-amplify/amplify-ui/pull/6278) [`475e4a37a404bd116ec55e95579acb8f2d23c9a4`](https://github.com/aws-amplify/amplify-ui/commit/475e4a37a404bd116ec55e95579acb8f2d23c9a4) Thanks [@jordanvn](https://github.com/jordanvn)! - revert changes introduced for React 19 support + +- Updated dependencies [[`475e4a37a404bd116ec55e95579acb8f2d23c9a4`](https://github.com/aws-amplify/amplify-ui/commit/475e4a37a404bd116ec55e95579acb8f2d23c9a4)]: + - @aws-amplify/ui-react-core@3.2.1 + +## 2.1.0 + +### Minor Changes + +- [#5826](https://github.com/aws-amplify/amplify-ui/pull/5826) [`954e9be2d055a57ebddab5b902e3e6b427d09f67`](https://github.com/aws-amplify/amplify-ui/commit/954e9be2d055a57ebddab5b902e3e6b427d09f67) Thanks [@calebpollman](https://github.com/calebpollman)! - chore(react): add support for React 19 + +### Patch Changes + +- [#6255](https://github.com/aws-amplify/amplify-ui/pull/6255) [`825cccc92f5c326f0f110c8439a1c2c6553ff00a`](https://github.com/aws-amplify/amplify-ui/commit/825cccc92f5c326f0f110c8439a1c2c6553ff00a) Thanks [@calebpollman](https://github.com/calebpollman)! - chore(react): remove direct usage of react-test-renderer and types + +- Updated dependencies [[`825cccc92f5c326f0f110c8439a1c2c6553ff00a`](https://github.com/aws-amplify/amplify-ui/commit/825cccc92f5c326f0f110c8439a1c2c6553ff00a), [`954e9be2d055a57ebddab5b902e3e6b427d09f67`](https://github.com/aws-amplify/amplify-ui/commit/954e9be2d055a57ebddab5b902e3e6b427d09f67)]: + - @aws-amplify/ui-react-core@3.2.0 + ## 2.0.33 ### Patch Changes diff --git a/packages/react-core-notifications/package.json b/packages/react-core-notifications/package.json index e6ad2d8dd16..03d3bbe04c8 100644 --- a/packages/react-core-notifications/package.json +++ b/packages/react-core-notifications/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/ui-react-core-notifications", - "version": "2.0.33", + "version": "2.2.1", "main": "dist/index.js", "module": "dist/esm/index.mjs", "exports": { @@ -35,12 +35,12 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@aws-amplify/ui": "6.7.2", - "@aws-amplify/ui-react-core": "3.1.2" + "@aws-amplify/ui": "6.8.1", + "@aws-amplify/ui-react-core": "3.3.1" }, "peerDependencies": { "aws-amplify": "^6.9.0", - "react": "^16.14.0 || ^17.0 || ^18.0" + "react": "^16.14 || ^17 || ^18 || ^19" }, "sideEffects": false } diff --git a/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingContext/InAppMessagingContext.ts b/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingContext/InAppMessagingContext.ts deleted file mode 100644 index 5fd4203421b..00000000000 --- a/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingContext/InAppMessagingContext.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { createContext } from 'react'; -import { InAppMessage } from '../../types'; - -export interface InAppMessagingContextType { - clearMessage: () => void; - displayMessage: (message: InAppMessage) => void; - message: InAppMessage | null; -} - -const InAppMessagingContext = createContext( - null -); - -export default InAppMessagingContext; diff --git a/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingContext/InAppMessagingContext.tsx b/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingContext/InAppMessagingContext.tsx new file mode 100644 index 00000000000..423c3224939 --- /dev/null +++ b/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingContext/InAppMessagingContext.tsx @@ -0,0 +1,49 @@ +import React from 'react'; +import { InAppMessage } from '../../types'; +import { useInAppMessagingState } from './useInAppMessagingState'; + +export interface InAppMessagingContextType { + clearMessage: () => void; + displayMessage: (message: InAppMessage) => void; + message: InAppMessage | null; +} + +const InAppMessagingContext = + React.createContext(null); + +export default InAppMessagingContext; + +export interface InAppMessagingProviderProps { + children: React.ReactNode; +} + +export interface UseInAppMessaging extends InAppMessagingContextType {} + +export const ERROR_MESSAGE = + '`useInAppMessaging` must be called from within `InAppMessagingProvider`'; + +/** + * Utility hook used to access the InAppMessagingContext values + * + * @returns {InAppMessagingContextType} InAppMessaging context values + */ +export function useInAppMessaging(): UseInAppMessaging { + const context = React.useContext(InAppMessagingContext); + + if (!context) { + throw new Error(ERROR_MESSAGE); + } + return context; +} + +export function InAppMessagingProvider({ + children, +}: InAppMessagingProviderProps): React.JSX.Element { + const value = useInAppMessagingState(); + + return ( + + {children} + + ); +} diff --git a/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingContext/__tests__/InAppMessagingContext.spec.tsx b/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingContext/__tests__/InAppMessagingContext.spec.tsx new file mode 100644 index 00000000000..b0dd56f0dec --- /dev/null +++ b/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingContext/__tests__/InAppMessagingContext.spec.tsx @@ -0,0 +1,53 @@ +import React from 'react'; +import { renderHook } from '@testing-library/react'; + +import { InAppMessagingContextType } from '..'; + +import { + ERROR_MESSAGE, + InAppMessagingProvider, + useInAppMessaging, +} from '../InAppMessagingContext'; + +const clearMessage = jest.fn(); +const displayMessage = jest.fn(); +const message = null; + +jest.mock('../useInAppMessagingState', () => ({ + useInAppMessagingState: (): InAppMessagingContextType => ({ + clearMessage, + displayMessage, + message, + }), +})); + +jest.mock('aws-amplify/in-app-messaging'); + +describe('useInAppMessaging', () => { + it('provides the values of InAppMessagingContext to consumers wrapped in InAppMessagingProvider', () => { + const { result } = renderHook(() => useInAppMessaging(), { + wrapper: ({ children }) => ( + {children} + ), + }); + + expect(result.current).toStrictEqual({ + clearMessage, + displayMessage, + message, + }); + }); + + it('throws an error when called outside an InAppMessagingProvider', () => { + /* eslint-disable no-console */ + // monkeypatch console.error into a no-op temporarily to supress React printed error regarding lack of + // ErrorBoundary component + const original = console.error; + console.error = () => {}; + + expect(() => renderHook(() => useInAppMessaging())).toThrow(ERROR_MESSAGE); + + console.error = original; + /* eslint-enable no-console */ + }); +}); diff --git a/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingProvider/__tests__/InAppMessagingProvider.spec.tsx b/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingContext/__tests__/useInAppMessagingState.ts similarity index 51% rename from packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingProvider/__tests__/InAppMessagingProvider.spec.tsx rename to packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingContext/__tests__/useInAppMessagingState.ts index 0d32d3f7771..61cf426b5b5 100644 --- a/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingProvider/__tests__/InAppMessagingProvider.spec.tsx +++ b/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingContext/__tests__/useInAppMessagingState.ts @@ -1,11 +1,9 @@ -import React from 'react'; -import TestRenderer, { ReactTestRenderer } from 'react-test-renderer'; +import { renderHook, act } from '@testing-library/react'; + import * as InAppModule from 'aws-amplify/in-app-messaging'; -import { RenderNothing } from '@aws-amplify/ui-react-core'; -import { useInAppMessaging } from '../../../hooks/useInAppMessaging'; -import { InAppMessagingContextType } from '../..'; -import { InAppMessagingProvider } from '..'; +import { InAppMessagingContextType } from '../InAppMessagingContext'; +import { useInAppMessagingState } from '../useInAppMessagingState'; const onMessageReceivedSpy = jest.spyOn(InAppModule, 'onMessageReceived'); @@ -24,32 +22,17 @@ const mockOnMessageReceived = ( return { remove: mockRemove }; }; -const TestComponent = () => { - const props = useInAppMessaging(); - return ; -}; - const message = { layout: 'TOP_BANNER' as const, id: '0', content: [] }; -describe('InAppMessagingProvider', () => { - let renderer: ReactTestRenderer; - +describe('useInAppMessagingState', () => { beforeEach(() => { - jest.resetAllMocks(); + jest.clearAllMocks(); onMessageReceivedSpy.mockImplementation(mockOnMessageReceived); - - TestRenderer.act(() => { - renderer = TestRenderer.create( - - - - ); - }); }); it('vends the expected initial context values', () => { - const expectedProps = { + const expected = { clearMessage: expect.any( Function ) as InAppMessagingContextType['clearMessage'], @@ -60,12 +43,14 @@ describe('InAppMessagingProvider', () => { style: undefined, }; - expect(renderer.root.findByType(RenderNothing).props).toEqual( - expectedProps - ); + const { result } = renderHook(() => useInAppMessagingState()); + + expect(result.current).toEqual(expected); }); it('registers a listener to InAppMessaging.onMessageReceived as expected', () => { + renderHook(() => useInAppMessagingState()); + expect(onMessageReceivedSpy).toHaveBeenCalledTimes(1); expect(onMessageReceivedSpy).toHaveBeenCalledWith( expect.any(Function) as InAppMessagingContextType['displayMessage'] @@ -73,53 +58,52 @@ describe('InAppMessagingProvider', () => { }); it('updates the value of message when the listener registered to InAppMessaging.onMessageReceived is called', () => { - TestRenderer.act(() => { + const { result } = renderHook(() => useInAppMessagingState()); + + expect(result.current.message).toBeNull(); + + act(() => { onMessageReceivedCallback(message); }); - const consumer = renderer.root.findByType(RenderNothing); - - expect((consumer.props as InAppMessagingContextType).message).toStrictEqual( - message - ); + expect(result.current.message).toStrictEqual(message); }); it('removes the listener registered to InAppMessaging.onMessageReceived as expected', () => { - TestRenderer.act(() => { - renderer.unmount(); + const { unmount } = renderHook(() => useInAppMessagingState()); + + act(() => { + unmount(); }); expect(mockRemove).toHaveBeenCalledTimes(1); }); it('updates the value of message when displayMessage is called', () => { - const consumer = renderer.root.findByType(RenderNothing); + const { result } = renderHook(() => useInAppMessagingState()); - TestRenderer.act(() => { - ( - consumer.props - .displayMessage as InAppMessagingContextType['displayMessage'] - )(message); + act(() => { + result.current.displayMessage(message); }); - expect((consumer.props as InAppMessagingContextType).message).toStrictEqual( - message - ); + expect(result.current.message).toStrictEqual(message); }); it('updates the value of message when clearMessage is called', () => { - const consumer = renderer.root.findByType(RenderNothing); + const { result } = renderHook(() => useInAppMessagingState()); + + expect(result.current.message).toBeNull(); - TestRenderer.act(() => { - (consumer.props as InAppMessagingContextType).displayMessage(message); + act(() => { + result.current.displayMessage(message); }); - expect(consumer.props.message).not.toBeNull(); + expect(result.current.message).toStrictEqual(message); - TestRenderer.act(() => { - (consumer.props as InAppMessagingContextType).clearMessage(); + act(() => { + result.current.clearMessage(); }); - expect(consumer.props.message).toBeNull(); + expect(result.current.message).toBeNull(); }); }); diff --git a/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingContext/index.ts b/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingContext/index.ts index 77a9fc71854..68619b49135 100644 --- a/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingContext/index.ts +++ b/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingContext/index.ts @@ -1,4 +1,8 @@ export { default as InAppMessagingContext, InAppMessagingContextType, + InAppMessagingProviderProps, + InAppMessagingProvider, + useInAppMessaging, + UseInAppMessaging, } from './InAppMessagingContext'; diff --git a/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingContext/useInAppMessagingState.ts b/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingContext/useInAppMessagingState.ts new file mode 100644 index 00000000000..c8ba44d245a --- /dev/null +++ b/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingContext/useInAppMessagingState.ts @@ -0,0 +1,24 @@ +import { useEffect, useMemo, useState } from 'react'; +import { onMessageReceived } from 'aws-amplify/in-app-messaging'; +import { InAppMessagingContextType } from '../InAppMessagingContext'; + +export function useInAppMessagingState(): InAppMessagingContextType { + const [message, setMessage] = + useState(null); + + useEffect(() => { + const listener = onMessageReceived(setMessage); + return listener.remove; + }, []); + + return useMemo( + () => ({ + clearMessage: () => { + setMessage(null); + }, + displayMessage: setMessage, + message, + }), + [message] + ); +} diff --git a/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingProvider/InAppMessagingProvider.tsx b/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingProvider/InAppMessagingProvider.tsx deleted file mode 100644 index 4ce621341f3..00000000000 --- a/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingProvider/InAppMessagingProvider.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import React, { - ReactNode, - useCallback, - useEffect, - useMemo, - useState, -} from 'react'; -import { onMessageReceived } from 'aws-amplify/in-app-messaging'; -import { - InAppMessagingContext, - InAppMessagingContextType, -} from '../InAppMessagingContext'; - -export interface InAppMessagingProviderProps { - children: ReactNode; -} - -export default function InAppMessagingProvider({ - children, -}: InAppMessagingProviderProps): JSX.Element { - const [message, setMessage] = - useState(null); - - useEffect(() => { - const listener = onMessageReceived(setMessage); - return listener.remove; - }, []); - - const clearMessage = useCallback(() => { - setMessage(null); - }, []); - - const value = useMemo( - () => ({ - clearMessage, - displayMessage: setMessage, - message, - }), - [clearMessage, message] - ); - - return ( - - {children} - - ); -} diff --git a/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingProvider/index.ts b/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingProvider/index.ts deleted file mode 100644 index daa7c8b894b..00000000000 --- a/packages/react-core-notifications/src/InAppMessaging/context/InAppMessagingProvider/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { - InAppMessagingProviderProps, - default as InAppMessagingProvider, -} from './InAppMessagingProvider'; diff --git a/packages/react-core-notifications/src/InAppMessaging/context/index.ts b/packages/react-core-notifications/src/InAppMessaging/context/index.ts index 768ae70225e..3637954bda2 100644 --- a/packages/react-core-notifications/src/InAppMessaging/context/index.ts +++ b/packages/react-core-notifications/src/InAppMessaging/context/index.ts @@ -1,2 +1 @@ export * from './InAppMessagingContext'; -export * from './InAppMessagingProvider'; diff --git a/packages/react-core-notifications/src/InAppMessaging/hooks/index.ts b/packages/react-core-notifications/src/InAppMessaging/hooks/index.ts index 70a74838495..107ba71afce 100644 --- a/packages/react-core-notifications/src/InAppMessaging/hooks/index.ts +++ b/packages/react-core-notifications/src/InAppMessaging/hooks/index.ts @@ -1,2 +1 @@ -export * from './useInAppMessaging'; export * from './useMessage'; diff --git a/packages/react-core-notifications/src/InAppMessaging/hooks/useInAppMessaging/__tests__/useInAppMessaging.spec.tsx b/packages/react-core-notifications/src/InAppMessaging/hooks/useInAppMessaging/__tests__/useInAppMessaging.spec.tsx deleted file mode 100644 index 8b7875b674e..00000000000 --- a/packages/react-core-notifications/src/InAppMessaging/hooks/useInAppMessaging/__tests__/useInAppMessaging.spec.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from 'react'; -import TestRenderer from 'react-test-renderer'; -import { RenderNothing } from '@aws-amplify/ui-react-core'; - -import { useInAppMessaging } from '..'; - -const TestComponent = () => { - const props = useInAppMessaging(); - return ; -}; - -describe('useInAppMessaging', () => { - /* eslint-disable no-console */ - it('throws an error when called outside an InAppMessagingProvider', () => { - // monkeypatch console.error into a no-op temporarily to supress React printed error regarding lack of - // ErrorBoundary component - const original = console.error; - console.error = () => {}; - - expect(() => TestRenderer.create()).toThrow(); - - console.error = original; - }); - /* eslint-enable no-console */ -}); diff --git a/packages/react-core-notifications/src/InAppMessaging/hooks/useInAppMessaging/index.ts b/packages/react-core-notifications/src/InAppMessaging/hooks/useInAppMessaging/index.ts deleted file mode 100644 index 0fec701dc06..00000000000 --- a/packages/react-core-notifications/src/InAppMessaging/hooks/useInAppMessaging/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { - UseInAppMessaging, - default as useInAppMessaging, -} from './useInAppMessaging'; diff --git a/packages/react-core-notifications/src/InAppMessaging/hooks/useInAppMessaging/useInAppMessaging.ts b/packages/react-core-notifications/src/InAppMessaging/hooks/useInAppMessaging/useInAppMessaging.ts deleted file mode 100644 index 88ed29e37cf..00000000000 --- a/packages/react-core-notifications/src/InAppMessaging/hooks/useInAppMessaging/useInAppMessaging.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { useContext } from 'react'; -import { - InAppMessagingContext, - InAppMessagingContextType, -} from '../../context'; - -export type UseInAppMessaging = InAppMessagingContextType; - -/** - * Utility hook used to access the InAppMessagingContext values - * - * @returns {InAppMessagingContextType} InAppMessaging context values - */ - -export default function useInAppMessaging(): UseInAppMessaging { - const inAppMessagingContext = useContext(InAppMessagingContext); - if (!inAppMessagingContext) { - throw new Error( - 'InAppMessagingContext is empty, did you forget the InAppMessagingProvider?' - ); - } - return inAppMessagingContext; -} diff --git a/packages/react-core-notifications/src/InAppMessaging/hooks/useMessage/__tests__/useMessage.spec.ts b/packages/react-core-notifications/src/InAppMessaging/hooks/useMessage/__tests__/useMessage.spec.ts index bea60ed2450..df311e174b9 100644 --- a/packages/react-core-notifications/src/InAppMessaging/hooks/useMessage/__tests__/useMessage.spec.ts +++ b/packages/react-core-notifications/src/InAppMessaging/hooks/useMessage/__tests__/useMessage.spec.ts @@ -1,7 +1,8 @@ import * as InAppModule from 'aws-amplify/in-app-messaging'; import { ConsoleLogger as Logger } from 'aws-amplify/utils'; import { RenderNothing } from '@aws-amplify/ui-react-core'; -import { useInAppMessaging } from '../../useInAppMessaging'; + +import { useInAppMessaging } from '../../../context'; import { BannerMessageCommonProps, InAppMessage, @@ -11,7 +12,7 @@ import { UseMessageParams } from '../types'; import { EMPTY_PROPS } from '../useMessage'; import { useMessage } from '..'; -jest.mock('../../useInAppMessaging'); +jest.mock('../../../context'); jest.useFakeTimers(); type TestStyle = { backgroundColor: string }; diff --git a/packages/react-core-notifications/src/InAppMessaging/hooks/useMessage/useMessage.ts b/packages/react-core-notifications/src/InAppMessaging/hooks/useMessage/useMessage.ts index 1999d681336..5cea529376a 100644 --- a/packages/react-core-notifications/src/InAppMessaging/hooks/useMessage/useMessage.ts +++ b/packages/react-core-notifications/src/InAppMessaging/hooks/useMessage/useMessage.ts @@ -1,11 +1,11 @@ import { ConsoleLogger as Logger } from 'aws-amplify/utils'; +import { notifyMessageInteraction } from 'aws-amplify/in-app-messaging'; import { isNil } from '@aws-amplify/ui'; - import { RenderNothing } from '@aws-amplify/ui-react-core'; -import { useInAppMessaging } from '../useInAppMessaging'; + +import { useInAppMessaging } from '../../context'; import { UseMessage, UseMessageParams } from './types'; import { getContentProps, getPositionProp } from './utils'; -import { notifyMessageInteraction } from 'aws-amplify/in-app-messaging'; export const EMPTY_PROPS = Object.freeze({}); diff --git a/packages/react-core/CHANGELOG.md b/packages/react-core/CHANGELOG.md index 7460a7e5dc6..3b80d8e32f2 100644 --- a/packages/react-core/CHANGELOG.md +++ b/packages/react-core/CHANGELOG.md @@ -1,5 +1,39 @@ # @aws-amplify/ui-react-core +## 3.3.1 + +### Patch Changes + +- Updated dependencies [[`272ec8e575718ea990dcb9f51d1baaf522f45fb6`](https://github.com/aws-amplify/amplify-ui/commit/272ec8e575718ea990dcb9f51d1baaf522f45fb6)]: + - @aws-amplify/ui@6.8.1 + +## 3.3.0 + +### Minor Changes + +- [#6296](https://github.com/aws-amplify/amplify-ui/pull/6296) [`8d2aa79b174d4e48aaca913bd568898b8c8975a2`](https://github.com/aws-amplify/amplify-ui/commit/8d2aa79b174d4e48aaca913bd568898b8c8975a2) Thanks [@calebpollman](https://github.com/calebpollman)! - feat(react): reenable react 19 support + +### Patch Changes + +- Updated dependencies [[`8757f03b7b1d761d9a13cfe29382a2208d4f3999`](https://github.com/aws-amplify/amplify-ui/commit/8757f03b7b1d761d9a13cfe29382a2208d4f3999), [`8d2aa79b174d4e48aaca913bd568898b8c8975a2`](https://github.com/aws-amplify/amplify-ui/commit/8d2aa79b174d4e48aaca913bd568898b8c8975a2)]: + - @aws-amplify/ui@6.8.0 + +## 3.2.1 + +### Patch Changes + +- [#6278](https://github.com/aws-amplify/amplify-ui/pull/6278) [`475e4a37a404bd116ec55e95579acb8f2d23c9a4`](https://github.com/aws-amplify/amplify-ui/commit/475e4a37a404bd116ec55e95579acb8f2d23c9a4) Thanks [@jordanvn](https://github.com/jordanvn)! - revert changes introduced for React 19 support + +## 3.2.0 + +### Minor Changes + +- [#5826](https://github.com/aws-amplify/amplify-ui/pull/5826) [`954e9be2d055a57ebddab5b902e3e6b427d09f67`](https://github.com/aws-amplify/amplify-ui/commit/954e9be2d055a57ebddab5b902e3e6b427d09f67) Thanks [@calebpollman](https://github.com/calebpollman)! - chore(react): add support for React 19 + +### Patch Changes + +- [#6255](https://github.com/aws-amplify/amplify-ui/pull/6255) [`825cccc92f5c326f0f110c8439a1c2c6553ff00a`](https://github.com/aws-amplify/amplify-ui/commit/825cccc92f5c326f0f110c8439a1c2c6553ff00a) Thanks [@calebpollman](https://github.com/calebpollman)! - chore(react): remove direct usage of react-test-renderer and types + ## 3.1.2 ### Patch Changes diff --git a/packages/react-core/jest.config.ts b/packages/react-core/jest.config.ts index 51924732fea..4e332128ae1 100644 --- a/packages/react-core/jest.config.ts +++ b/packages/react-core/jest.config.ts @@ -23,6 +23,7 @@ const config: Config = { moduleNameMapper: { '^uuid$': '/../../node_modules/uuid' }, modulePathIgnorePatterns: ['/dist/'], preset: 'ts-jest', + setupFilesAfterEnv: ['./jest.setup.ts'], testEnvironment: 'jsdom', }; diff --git a/packages/react-core/jest.setup.ts b/packages/react-core/jest.setup.ts new file mode 100644 index 00000000000..7b0828bfa80 --- /dev/null +++ b/packages/react-core/jest.setup.ts @@ -0,0 +1 @@ +import '@testing-library/jest-dom'; diff --git a/packages/react-core/package.json b/packages/react-core/package.json index c855d18f240..02445d0e0c7 100644 --- a/packages/react-core/package.json +++ b/packages/react-core/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/ui-react-core", - "version": "3.1.2", + "version": "3.3.1", "main": "dist/index.js", "module": "dist/esm/index.mjs", "react-native": "src/index.ts", @@ -40,15 +40,15 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@aws-amplify/ui": "6.7.2", + "@aws-amplify/ui": "6.8.1", "@xstate/react": "^3.2.2", "lodash": "4.17.21", - "react-hook-form": "^7.43.5", + "react-hook-form": "^7.53.2", "xstate": "^4.33.6" }, "peerDependencies": { "aws-amplify": "^6.9.0", - "react": "^16.14.0 || ^17.0 || ^18.0" + "react": "^16.14 || ^17 || ^18 || ^19" }, "sideEffects": false } diff --git a/packages/react-core/src/Authenticator/context/AuthenticatorProvider.tsx b/packages/react-core/src/Authenticator/context/AuthenticatorProvider.tsx index 011bc9979c3..4ea300de9bf 100644 --- a/packages/react-core/src/Authenticator/context/AuthenticatorProvider.tsx +++ b/packages/react-core/src/Authenticator/context/AuthenticatorProvider.tsx @@ -24,7 +24,7 @@ export default function AuthenticatorProvider({ children, }: { children: ReactNode; -}): JSX.Element { +}): React.JSX.Element { // `authStatus` is exposed by `useAuthenticator` but should not be derived directly from the // state machine as the machine only updates on `Authenticator` initiated events, which // leads to scenarios where the state machine `authStatus` gets "stuck". For exmample, diff --git a/packages/react-core/src/Authenticator/context/__tests__/AuthenticatorProvider.test.tsx b/packages/react-core/src/Authenticator/context/__tests__/AuthenticatorProvider.test.tsx index 1736a916100..a4d8fdf650d 100644 --- a/packages/react-core/src/Authenticator/context/__tests__/AuthenticatorProvider.test.tsx +++ b/packages/react-core/src/Authenticator/context/__tests__/AuthenticatorProvider.test.tsx @@ -16,7 +16,7 @@ const getCurrentUserSpy = jest .spyOn(Auth, 'getCurrentUser') .mockResolvedValue({ userId: '1234', username: 'test' }); -function TestComponent(): JSX.Element | null { +function TestComponent(): React.JSX.Element | null { const { authStatus } = useAuthenticator(); return <>{authStatus}; } diff --git a/packages/react-core/src/components/FormCore/__tests__/__snapshots__/useField.spec.ts.snap b/packages/react-core/src/components/FormCore/__tests__/__snapshots__/useField.spec.ts.snap index ebd5557b34f..092aa722ee5 100644 --- a/packages/react-core/src/components/FormCore/__tests__/__snapshots__/useField.spec.ts.snap +++ b/packages/react-core/src/components/FormCore/__tests__/__snapshots__/useField.spec.ts.snap @@ -7,6 +7,7 @@ exports[`useField returns the expected values in the happy path 1`] = ` "invalid": false, "isDirty": false, "isTouched": false, + "isValidating": false, "name": "test-field", "onBlur": [Function], "onChange": [Function], diff --git a/packages/react-core/src/components/FormCore/__tests__/__snapshots__/useForm.spec.ts.snap b/packages/react-core/src/components/FormCore/__tests__/__snapshots__/useForm.spec.ts.snap index 250bcc448ba..1cc48bf0bf3 100644 --- a/packages/react-core/src/components/FormCore/__tests__/__snapshots__/useForm.spec.ts.snap +++ b/packages/react-core/src/components/FormCore/__tests__/__snapshots__/useForm.spec.ts.snap @@ -7,6 +7,7 @@ exports[`useForm returns the expected values from getFieldState in the happy pat "invalid": false, "isDirty": false, "isTouched": false, + "isValidating": false, } `; diff --git a/packages/react-core/src/components/FormCore/__tests__/useForm.spec.ts b/packages/react-core/src/components/FormCore/__tests__/useForm.spec.ts index 45542354156..01052370714 100644 --- a/packages/react-core/src/components/FormCore/__tests__/useForm.spec.ts +++ b/packages/react-core/src/components/FormCore/__tests__/useForm.spec.ts @@ -1,5 +1,5 @@ import { renderHook } from '@testing-library/react-hooks'; -import * as ReactHookForm from 'react-hook-form'; +import ReactHookForm from 'react-hook-form'; import { useForm } from '..'; import FormProvider from '../FormProvider'; @@ -9,6 +9,7 @@ import { DEFAULT_ERROR_MESSAGE } from '../useForm'; // mock 'react-hook-form` context const mockFormContext: ReactHookForm.UseFormReturn = { formState: { + disabled: false, isDirty: false, isLoading: false, isSubmitSuccessful: false, @@ -20,6 +21,7 @@ const mockFormContext: ReactHookForm.UseFormReturn = { dirtyFields: [], touchedFields: [], errors: {}, + validatingFields: {}, }, getFieldState: jest.fn(), getValues: jest.fn(), diff --git a/packages/react-core/src/components/FormCore/withFormProvider.tsx b/packages/react-core/src/components/FormCore/withFormProvider.tsx index 71f159d957d..dd814261bcd 100644 --- a/packages/react-core/src/components/FormCore/withFormProvider.tsx +++ b/packages/react-core/src/components/FormCore/withFormProvider.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { AnyComponent, MergeProps } from '../../types'; +import { AnyComponent } from '../../types'; import FormProvider from './FormProvider'; import { FormHandle, FormProviderProps } from './types'; @@ -12,7 +12,7 @@ import { FormHandle, FormProviderProps } from './types'; export default function withFormProvider< ChildComp extends AnyComponent, ChildProps extends React.ComponentPropsWithRef, - Props extends MergeProps + Props extends ChildProps & FormProviderProps, >( Child: ChildComp ): React.ForwardRefExoticComponent< @@ -23,7 +23,11 @@ export default function withFormProvider< ref ) { return ( - + ); diff --git a/packages/react-core/src/components/RenderNothing/RenderNothing.tsx b/packages/react-core/src/components/RenderNothing/RenderNothing.tsx index b8b35a490c8..bddff9c0092 100644 --- a/packages/react-core/src/components/RenderNothing/RenderNothing.tsx +++ b/packages/react-core/src/components/RenderNothing/RenderNothing.tsx @@ -1,6 +1,8 @@ /** * Utility component for rendering nothing. */ -export default function RenderNothing(_: Props): JSX.Element | null { +export default function RenderNothing( + _: Props +): React.JSX.Element | null { return null; } diff --git a/packages/react-core/src/components/RenderNothing/__tests__/RenderNothing.spec.tsx b/packages/react-core/src/components/RenderNothing/__tests__/RenderNothing.spec.tsx index 11aeb580b2b..250a86714f8 100644 --- a/packages/react-core/src/components/RenderNothing/__tests__/RenderNothing.spec.tsx +++ b/packages/react-core/src/components/RenderNothing/__tests__/RenderNothing.spec.tsx @@ -1,12 +1,12 @@ import React from 'react'; -import TestRenderer from 'react-test-renderer'; +import { render } from '@testing-library/react'; import RenderNothing from '../RenderNothing'; describe('RenderNothing', () => { it('renders nothing', () => { - const renderer = TestRenderer.create(); + const { container } = render(); - expect(renderer.toJSON()).toBeNull(); + expect(container).toBeEmptyDOMElement(); }); }); diff --git a/packages/react-core/src/hooks/usePreviousValue.ts b/packages/react-core/src/hooks/usePreviousValue.ts index 7824e2fdd6c..2623db6040f 100644 --- a/packages/react-core/src/hooks/usePreviousValue.ts +++ b/packages/react-core/src/hooks/usePreviousValue.ts @@ -3,7 +3,7 @@ import { useEffect, useRef } from 'react'; export default function usePreviousValue( value: Value ): Value | undefined { - const previous = useRef(); + const previous = useRef(undefined); // update ref post render useEffect(() => { diff --git a/packages/react-geo/CHANGELOG.md b/packages/react-geo/CHANGELOG.md index cd2750c4c25..94008803f5e 100644 --- a/packages/react-geo/CHANGELOG.md +++ b/packages/react-geo/CHANGELOG.md @@ -1,5 +1,43 @@ # @aws-amplify/ui-react-geo +## 2.2.1 + +### Patch Changes + +- Updated dependencies []: + - @aws-amplify/ui-react-core@3.3.1 + +## 2.2.0 + +### Minor Changes + +- [#6296](https://github.com/aws-amplify/amplify-ui/pull/6296) [`8d2aa79b174d4e48aaca913bd568898b8c8975a2`](https://github.com/aws-amplify/amplify-ui/commit/8d2aa79b174d4e48aaca913bd568898b8c8975a2) Thanks [@calebpollman](https://github.com/calebpollman)! - feat(react): reenable react 19 support + +### Patch Changes + +- Updated dependencies [[`8d2aa79b174d4e48aaca913bd568898b8c8975a2`](https://github.com/aws-amplify/amplify-ui/commit/8d2aa79b174d4e48aaca913bd568898b8c8975a2)]: + - @aws-amplify/ui-react-core@3.3.0 + +## 2.1.1 + +### Patch Changes + +- [#6278](https://github.com/aws-amplify/amplify-ui/pull/6278) [`475e4a37a404bd116ec55e95579acb8f2d23c9a4`](https://github.com/aws-amplify/amplify-ui/commit/475e4a37a404bd116ec55e95579acb8f2d23c9a4) Thanks [@jordanvn](https://github.com/jordanvn)! - revert changes introduced for React 19 support + +- Updated dependencies [[`475e4a37a404bd116ec55e95579acb8f2d23c9a4`](https://github.com/aws-amplify/amplify-ui/commit/475e4a37a404bd116ec55e95579acb8f2d23c9a4)]: + - @aws-amplify/ui-react-core@3.2.1 + +## 2.1.0 + +### Minor Changes + +- [#5826](https://github.com/aws-amplify/amplify-ui/pull/5826) [`954e9be2d055a57ebddab5b902e3e6b427d09f67`](https://github.com/aws-amplify/amplify-ui/commit/954e9be2d055a57ebddab5b902e3e6b427d09f67) Thanks [@calebpollman](https://github.com/calebpollman)! - chore(react): add support for React 19 + +### Patch Changes + +- Updated dependencies [[`825cccc92f5c326f0f110c8439a1c2c6553ff00a`](https://github.com/aws-amplify/amplify-ui/commit/825cccc92f5c326f0f110c8439a1c2c6553ff00a), [`954e9be2d055a57ebddab5b902e3e6b427d09f67`](https://github.com/aws-amplify/amplify-ui/commit/954e9be2d055a57ebddab5b902e3e6b427d09f67)]: + - @aws-amplify/ui-react-core@3.2.0 + ## 2.0.34 ### Patch Changes diff --git a/packages/react-geo/package.json b/packages/react-geo/package.json index 0fb8514fd1c..3a1d4112edc 100644 --- a/packages/react-geo/package.json +++ b/packages/react-geo/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/ui-react-geo", - "version": "2.0.34", + "version": "2.2.1", "main": "dist/index.js", "module": "dist/esm/index.mjs", "exports": { @@ -39,7 +39,7 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@aws-amplify/ui-react-core": "3.1.2", + "@aws-amplify/ui-react-core": "3.3.1", "mapbox-gl": "1.13.1", "maplibre-gl": "2.1.9", "maplibre-gl-js-amplify": "^4.0.2", @@ -49,8 +49,8 @@ "peerDependencies": { "@aws-amplify/geo": "^3.0.59", "aws-amplify": "^6.9.0", - "react": "^16.14.0 || ^17.0 || ^18.0", - "react-dom": "^16.14.0 || ^17.0 || ^18.0" + "react": "^16.14 || ^17 || ^18 || ^19", + "react-dom": "^16.14 || ^17 || ^18 || ^19" }, "devDependencies": { "@aws-amplify/geo": "^3.0.59", diff --git a/packages/react-geo/src/components/LocationSearch/LocationSearch.tsx b/packages/react-geo/src/components/LocationSearch/LocationSearch.tsx index 6eff1540666..fae42c6b49e 100644 --- a/packages/react-geo/src/components/LocationSearch/LocationSearch.tsx +++ b/packages/react-geo/src/components/LocationSearch/LocationSearch.tsx @@ -74,7 +74,9 @@ const LocationSearchStandalone = (props: LocationSearchProps) => { * return ; * } */ -export const LocationSearch = (props: LocationSearchProps): JSX.Element => { +export const LocationSearch = ( + props: LocationSearchProps +): React.JSX.Element => { const { current: map } = useMap(); useSetUserAgent({ diff --git a/packages/react-geo/src/version.ts b/packages/react-geo/src/version.ts index e527a2c3319..12dd5aa8479 100644 --- a/packages/react-geo/src/version.ts +++ b/packages/react-geo/src/version.ts @@ -1 +1 @@ -export const VERSION = '2.0.34'; +export const VERSION = '2.2.1'; diff --git a/packages/react-liveness/CHANGELOG.md b/packages/react-liveness/CHANGELOG.md index 62879b435c0..37f65c328a8 100644 --- a/packages/react-liveness/CHANGELOG.md +++ b/packages/react-liveness/CHANGELOG.md @@ -1,5 +1,47 @@ # @aws-amplify/ui-react-liveness +## 3.3.1 + +### Patch Changes + +- Updated dependencies [[`272ec8e575718ea990dcb9f51d1baaf522f45fb6`](https://github.com/aws-amplify/amplify-ui/commit/272ec8e575718ea990dcb9f51d1baaf522f45fb6), [`6e51c1750f8f3e01cf8827f4c5c2e5ef02240ca6`](https://github.com/aws-amplify/amplify-ui/commit/6e51c1750f8f3e01cf8827f4c5c2e5ef02240ca6)]: + - @aws-amplify/ui@6.8.1 + - @aws-amplify/ui-react@6.9.1 + +## 3.3.0 + +### Minor Changes + +- [#6296](https://github.com/aws-amplify/amplify-ui/pull/6296) [`8d2aa79b174d4e48aaca913bd568898b8c8975a2`](https://github.com/aws-amplify/amplify-ui/commit/8d2aa79b174d4e48aaca913bd568898b8c8975a2) Thanks [@calebpollman](https://github.com/calebpollman)! - feat(react): reenable react 19 support + +### Patch Changes + +- Updated dependencies [[`8757f03b7b1d761d9a13cfe29382a2208d4f3999`](https://github.com/aws-amplify/amplify-ui/commit/8757f03b7b1d761d9a13cfe29382a2208d4f3999), [`8d2aa79b174d4e48aaca913bd568898b8c8975a2`](https://github.com/aws-amplify/amplify-ui/commit/8d2aa79b174d4e48aaca913bd568898b8c8975a2)]: + - @aws-amplify/ui@6.8.0 + - @aws-amplify/ui-react@6.9.0 + +## 3.2.1 + +### Patch Changes + +- [#6278](https://github.com/aws-amplify/amplify-ui/pull/6278) [`475e4a37a404bd116ec55e95579acb8f2d23c9a4`](https://github.com/aws-amplify/amplify-ui/commit/475e4a37a404bd116ec55e95579acb8f2d23c9a4) Thanks [@jordanvn](https://github.com/jordanvn)! - revert changes introduced for React 19 support + +- Updated dependencies [[`475e4a37a404bd116ec55e95579acb8f2d23c9a4`](https://github.com/aws-amplify/amplify-ui/commit/475e4a37a404bd116ec55e95579acb8f2d23c9a4)]: + - @aws-amplify/ui-react@6.8.1 + +## 3.2.0 + +### Minor Changes + +- [#5826](https://github.com/aws-amplify/amplify-ui/pull/5826) [`954e9be2d055a57ebddab5b902e3e6b427d09f67`](https://github.com/aws-amplify/amplify-ui/commit/954e9be2d055a57ebddab5b902e3e6b427d09f67) Thanks [@calebpollman](https://github.com/calebpollman)! - chore(react): add support for React 19 + +### Patch Changes + +- [#6255](https://github.com/aws-amplify/amplify-ui/pull/6255) [`825cccc92f5c326f0f110c8439a1c2c6553ff00a`](https://github.com/aws-amplify/amplify-ui/commit/825cccc92f5c326f0f110c8439a1c2c6553ff00a) Thanks [@calebpollman](https://github.com/calebpollman)! - chore(react): remove direct usage of react-test-renderer and types + +- Updated dependencies [[`c623990d5fb6af635b1964a51a8ff2c807938235`](https://github.com/aws-amplify/amplify-ui/commit/c623990d5fb6af635b1964a51a8ff2c807938235), [`954e9be2d055a57ebddab5b902e3e6b427d09f67`](https://github.com/aws-amplify/amplify-ui/commit/954e9be2d055a57ebddab5b902e3e6b427d09f67)]: + - @aws-amplify/ui-react@6.8.0 + ## 3.1.19 ### Patch Changes diff --git a/packages/react-liveness/package.json b/packages/react-liveness/package.json index 34d9d9c3014..ea9109e17b1 100644 --- a/packages/react-liveness/package.json +++ b/packages/react-liveness/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/ui-react-liveness", - "version": "3.1.19", + "version": "3.3.1", "main": "dist/index.js", "module": "dist/esm/index.mjs", "exports": { @@ -44,12 +44,12 @@ "peerDependencies": { "@aws-amplify/core": "*", "aws-amplify": "^6.9.0", - "react": "^16.14.0 || ^17.0 || ^18.0", - "react-dom": "^16.14.0 || ^17.0 || ^18.0" + "react": "^16.14 || ^17 || ^18 || ^19", + "react-dom": "^16.14 || ^17 || ^18 || ^19" }, "dependencies": { - "@aws-amplify/ui": "6.7.2", - "@aws-amplify/ui-react": "6.7.2", + "@aws-amplify/ui": "6.8.1", + "@aws-amplify/ui-react": "6.9.1", "@aws-sdk/client-rekognitionstreaming": "3.621.0", "@aws-sdk/util-format-url": "3.609.0", "@smithy/eventstream-serde-browser": "^2.0.4", diff --git a/packages/react-liveness/src/components/FaceLivenessDetector/FaceLivenessDetector.tsx b/packages/react-liveness/src/components/FaceLivenessDetector/FaceLivenessDetector.tsx index 397747fe2b9..5665341706a 100644 --- a/packages/react-liveness/src/components/FaceLivenessDetector/FaceLivenessDetector.tsx +++ b/packages/react-liveness/src/components/FaceLivenessDetector/FaceLivenessDetector.tsx @@ -21,7 +21,7 @@ const credentialProvider = async () => { export default function FaceLivenessDetector( props: FaceLivenessDetectorProps -): JSX.Element { +): React.JSX.Element { const { config, ...rest } = props; return ( (null); const { diff --git a/packages/react-liveness/src/components/FaceLivenessDetector/LivenessCheck/LivenessCameraModule.tsx b/packages/react-liveness/src/components/FaceLivenessDetector/LivenessCheck/LivenessCameraModule.tsx index d3be78737bd..d9be3d3f811 100644 --- a/packages/react-liveness/src/components/FaceLivenessDetector/LivenessCheck/LivenessCameraModule.tsx +++ b/packages/react-liveness/src/components/FaceLivenessDetector/LivenessCheck/LivenessCameraModule.tsx @@ -95,7 +95,7 @@ const MemoizedMatchIndicator = React.memo(MatchIndicator); export const LivenessCameraModule = ( props: LivenessCameraModuleProps -): JSX.Element => { +): React.JSX.Element => { const { isMobileScreen, isRecordingStopped, diff --git a/packages/react-liveness/src/components/FaceLivenessDetector/__mocks__/utils.tsx b/packages/react-liveness/src/components/FaceLivenessDetector/__mocks__/utils.tsx index 2fc51349784..9dc5fc4fca1 100644 --- a/packages/react-liveness/src/components/FaceLivenessDetector/__mocks__/utils.tsx +++ b/packages/react-liveness/src/components/FaceLivenessDetector/__mocks__/utils.tsx @@ -11,7 +11,7 @@ type RenderWithLivenessLivenessProviderResult = RenderResult & { }; export function renderWithLivenessProvider( - ui: JSX.Element + ui: React.JSX.Element ): RenderWithLivenessLivenessProviderResult { const mockComponentProps: FaceLivenessDetectorProps = { region: 'us-east-1', diff --git a/packages/react-liveness/src/components/FaceLivenessDetector/providers/FaceLivenessDetectorProvider.tsx b/packages/react-liveness/src/components/FaceLivenessDetector/providers/FaceLivenessDetectorProvider.tsx index 8a97d8a3c6b..dba293d6c13 100644 --- a/packages/react-liveness/src/components/FaceLivenessDetector/providers/FaceLivenessDetectorProvider.tsx +++ b/packages/react-liveness/src/components/FaceLivenessDetector/providers/FaceLivenessDetectorProvider.tsx @@ -16,7 +16,7 @@ export interface FaceLivenessDetectorProviderProps export function FaceLivenessDetectorProvider({ children, ...props -}: FaceLivenessDetectorProviderProps): JSX.Element { +}: FaceLivenessDetectorProviderProps): React.JSX.Element { return ( {children} diff --git a/packages/react-liveness/src/components/FaceLivenessDetector/shared/DefaultStartScreenComponents.tsx b/packages/react-liveness/src/components/FaceLivenessDetector/shared/DefaultStartScreenComponents.tsx index 55c91b1e12e..554bc13d73e 100644 --- a/packages/react-liveness/src/components/FaceLivenessDetector/shared/DefaultStartScreenComponents.tsx +++ b/packages/react-liveness/src/components/FaceLivenessDetector/shared/DefaultStartScreenComponents.tsx @@ -26,7 +26,7 @@ export const DefaultPhotosensitiveWarning = ({ headingText, infoText, labelText, -}: DefaultPhotosensitiveWarningProps): JSX.Element => { +}: DefaultPhotosensitiveWarningProps): React.JSX.Element => { return ( { +}: DefaultRecordingIconProps): React.JSX.Element => { return ( {recordingIndicatorText} @@ -63,7 +63,7 @@ interface CancelButtonProps { export const DefaultCancelButton = ({ cancelLivenessCheckText, -}: CancelButtonProps): JSX.Element => { +}: CancelButtonProps): React.JSX.Element => { return ( { +}): React.JSX.Element | null => { const displayText: Required = { ...defaultErrorDisplayText, ...overrideErrorDisplayText, diff --git a/packages/react-liveness/src/components/FaceLivenessDetector/shared/__tests__/LivenessIconWithPopover.test.tsx b/packages/react-liveness/src/components/FaceLivenessDetector/shared/__tests__/LivenessIconWithPopover.test.tsx index ed8d7fcde12..1838bfbcf61 100644 --- a/packages/react-liveness/src/components/FaceLivenessDetector/shared/__tests__/LivenessIconWithPopover.test.tsx +++ b/packages/react-liveness/src/components/FaceLivenessDetector/shared/__tests__/LivenessIconWithPopover.test.tsx @@ -1,8 +1,7 @@ import * as React from 'react'; -import { render, screen } from '@testing-library/react'; +import { act, render, screen } from '@testing-library/react'; import { LivenessIconWithPopover } from '../LivenessIconWithPopover'; -import { act } from 'react-test-renderer'; describe('LivenessIconWithPopover', () => { it('should render the component content appropriately', () => { diff --git a/packages/react-liveness/src/version.ts b/packages/react-liveness/src/version.ts index 266bc7ba077..d7562a488eb 100644 --- a/packages/react-liveness/src/version.ts +++ b/packages/react-liveness/src/version.ts @@ -1 +1 @@ -export const VERSION = '3.1.19'; +export const VERSION = '3.3.1'; diff --git a/packages/react-liveness/tsconfig.json b/packages/react-liveness/tsconfig.json index 5be1de00eac..9fa9a542d53 100644 --- a/packages/react-liveness/tsconfig.json +++ b/packages/react-liveness/tsconfig.json @@ -1,5 +1,6 @@ { "extends": "@aws-amplify/typescript-config/tsconfig.react.json", + "compilerOptions": { "types": ["@types/emscripten", "@types/long"] }, "include": ["*.mjs", "*.ts", "src/**/*.ts", "src/**/*.tsx"], "exclude": ["node_modules"] } diff --git a/packages/react-native-auth/CHANGELOG.md b/packages/react-native-auth/CHANGELOG.md index 5463690f1cd..a68be4b2d3b 100644 --- a/packages/react-native-auth/CHANGELOG.md +++ b/packages/react-native-auth/CHANGELOG.md @@ -1,5 +1,39 @@ # @aws-amplify/ui-react-native-auth +## 0.0.42 + +### Patch Changes + +- Updated dependencies [[`272ec8e575718ea990dcb9f51d1baaf522f45fb6`](https://github.com/aws-amplify/amplify-ui/commit/272ec8e575718ea990dcb9f51d1baaf522f45fb6)]: + - @aws-amplify/ui@6.8.1 + - @aws-amplify/ui-react-core-auth@0.0.39 + - @aws-amplify/ui-react-native@2.4.1 + +## 0.0.41 + +### Patch Changes + +- Updated dependencies [[`8757f03b7b1d761d9a13cfe29382a2208d4f3999`](https://github.com/aws-amplify/amplify-ui/commit/8757f03b7b1d761d9a13cfe29382a2208d4f3999), [`8d2aa79b174d4e48aaca913bd568898b8c8975a2`](https://github.com/aws-amplify/amplify-ui/commit/8d2aa79b174d4e48aaca913bd568898b8c8975a2)]: + - @aws-amplify/ui@6.8.0 + - @aws-amplify/ui-react-native@2.4.0 + - @aws-amplify/ui-react-core-auth@0.0.38 + +## 0.0.40 + +### Patch Changes + +- Updated dependencies [[`475e4a37a404bd116ec55e95579acb8f2d23c9a4`](https://github.com/aws-amplify/amplify-ui/commit/475e4a37a404bd116ec55e95579acb8f2d23c9a4)]: + - @aws-amplify/ui-react-native@2.3.1 + - @aws-amplify/ui-react-core-auth@0.0.37 + +## 0.0.39 + +### Patch Changes + +- Updated dependencies [[`825cccc92f5c326f0f110c8439a1c2c6553ff00a`](https://github.com/aws-amplify/amplify-ui/commit/825cccc92f5c326f0f110c8439a1c2c6553ff00a), [`50cde53145bfffc97f17b6da5c650c25d992fd97`](https://github.com/aws-amplify/amplify-ui/commit/50cde53145bfffc97f17b6da5c650c25d992fd97), [`954e9be2d055a57ebddab5b902e3e6b427d09f67`](https://github.com/aws-amplify/amplify-ui/commit/954e9be2d055a57ebddab5b902e3e6b427d09f67)]: + - @aws-amplify/ui-react-native@2.3.0 + - @aws-amplify/ui-react-core-auth@0.0.36 + ## 0.0.38 ### Patch Changes diff --git a/packages/react-native-auth/package.json b/packages/react-native-auth/package.json index a42df86c76b..1040e0a0db3 100644 --- a/packages/react-native-auth/package.json +++ b/packages/react-native-auth/package.json @@ -1,7 +1,7 @@ { "name": "@aws-amplify/ui-react-native-auth", "private": true, - "version": "0.0.38", + "version": "0.0.42", "main": "lib/index.js", "module": "dist/index.js", "react-native": "src/index.ts", @@ -24,13 +24,13 @@ "@babel/cli": "^7.23.0", "@babel/core": "^7.23.2", "@babel/preset-env": "^7.23.2", - "@testing-library/react-native": "^12.3.0", + "@testing-library/react-native": "^12.9.0", "metro-react-native-babel-preset": "^0.77.0" }, "dependencies": { - "@aws-amplify/ui": "6.7.2", - "@aws-amplify/ui-react-core-auth": "0.0.35", - "@aws-amplify/ui-react-native": "2.2.20", + "@aws-amplify/ui": "6.8.1", + "@aws-amplify/ui-react-core-auth": "0.0.39", + "@aws-amplify/ui-react-native": "2.4.1", "qrcode": "1.5.0" }, "peerDependencies": { diff --git a/packages/react-native-auth/src/version.ts b/packages/react-native-auth/src/version.ts index 2826f9b6d35..2ea0879ceb3 100644 --- a/packages/react-native-auth/src/version.ts +++ b/packages/react-native-auth/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.0.38'; +export const VERSION = '0.0.42'; diff --git a/packages/react-native/CHANGELOG.md b/packages/react-native/CHANGELOG.md index 01233ac1b49..b63b87887df 100644 --- a/packages/react-native/CHANGELOG.md +++ b/packages/react-native/CHANGELOG.md @@ -1,5 +1,53 @@ # @aws-amplify/ui-react-native +## 2.4.1 + +### Patch Changes + +- Updated dependencies [[`272ec8e575718ea990dcb9f51d1baaf522f45fb6`](https://github.com/aws-amplify/amplify-ui/commit/272ec8e575718ea990dcb9f51d1baaf522f45fb6)]: + - @aws-amplify/ui@6.8.1 + - @aws-amplify/ui-react-core@3.3.1 + - @aws-amplify/ui-react-core-notifications@2.2.1 + +## 2.4.0 + +### Minor Changes + +- [#6296](https://github.com/aws-amplify/amplify-ui/pull/6296) [`8d2aa79b174d4e48aaca913bd568898b8c8975a2`](https://github.com/aws-amplify/amplify-ui/commit/8d2aa79b174d4e48aaca913bd568898b8c8975a2) Thanks [@calebpollman](https://github.com/calebpollman)! - feat(react): reenable react 19 support + +### Patch Changes + +- Updated dependencies [[`8757f03b7b1d761d9a13cfe29382a2208d4f3999`](https://github.com/aws-amplify/amplify-ui/commit/8757f03b7b1d761d9a13cfe29382a2208d4f3999), [`8d2aa79b174d4e48aaca913bd568898b8c8975a2`](https://github.com/aws-amplify/amplify-ui/commit/8d2aa79b174d4e48aaca913bd568898b8c8975a2)]: + - @aws-amplify/ui@6.8.0 + - @aws-amplify/ui-react-core@3.3.0 + - @aws-amplify/ui-react-core-notifications@2.2.0 + +## 2.3.1 + +### Patch Changes + +- [#6278](https://github.com/aws-amplify/amplify-ui/pull/6278) [`475e4a37a404bd116ec55e95579acb8f2d23c9a4`](https://github.com/aws-amplify/amplify-ui/commit/475e4a37a404bd116ec55e95579acb8f2d23c9a4) Thanks [@jordanvn](https://github.com/jordanvn)! - revert changes introduced for React 19 support + +- Updated dependencies [[`475e4a37a404bd116ec55e95579acb8f2d23c9a4`](https://github.com/aws-amplify/amplify-ui/commit/475e4a37a404bd116ec55e95579acb8f2d23c9a4)]: + - @aws-amplify/ui-react-core-notifications@2.1.1 + - @aws-amplify/ui-react-core@3.2.1 + +## 2.3.0 + +### Minor Changes + +- [#6266](https://github.com/aws-amplify/amplify-ui/pull/6266) [`50cde53145bfffc97f17b6da5c650c25d992fd97`](https://github.com/aws-amplify/amplify-ui/commit/50cde53145bfffc97f17b6da5c650c25d992fd97) Thanks [@calebpollman](https://github.com/calebpollman)! - chore(react-native): update allowed peerDep to >=0.70 + +- [#5826](https://github.com/aws-amplify/amplify-ui/pull/5826) [`954e9be2d055a57ebddab5b902e3e6b427d09f67`](https://github.com/aws-amplify/amplify-ui/commit/954e9be2d055a57ebddab5b902e3e6b427d09f67) Thanks [@calebpollman](https://github.com/calebpollman)! - chore(react): add support for React 19 + +### Patch Changes + +- [#6255](https://github.com/aws-amplify/amplify-ui/pull/6255) [`825cccc92f5c326f0f110c8439a1c2c6553ff00a`](https://github.com/aws-amplify/amplify-ui/commit/825cccc92f5c326f0f110c8439a1c2c6553ff00a) Thanks [@calebpollman](https://github.com/calebpollman)! - chore(react): remove direct usage of react-test-renderer and types + +- Updated dependencies [[`825cccc92f5c326f0f110c8439a1c2c6553ff00a`](https://github.com/aws-amplify/amplify-ui/commit/825cccc92f5c326f0f110c8439a1c2c6553ff00a), [`954e9be2d055a57ebddab5b902e3e6b427d09f67`](https://github.com/aws-amplify/amplify-ui/commit/954e9be2d055a57ebddab5b902e3e6b427d09f67)]: + - @aws-amplify/ui-react-core-notifications@2.1.0 + - @aws-amplify/ui-react-core@3.2.0 + ## 2.2.20 ### Patch Changes diff --git a/packages/react-native/package.json b/packages/react-native/package.json index ef5b35720e6..7e0328bdc52 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/ui-react-native", - "version": "2.2.20", + "version": "2.4.1", "main": "lib/index.js", "module": "dist/index.js", "react-native": "src/index.ts", @@ -25,19 +25,19 @@ "@babel/preset-env": "^7.23.2", "@babel/preset-typescript": "^7.23.2", "@react-native-async-storage/async-storage": "*", - "@testing-library/react-native": "^12.3.0", + "@testing-library/react-native": "^12.9.0", "metro-react-native-babel-preset": "^0.77.0", "react-native-safe-area-context": "^4.7.3" }, "dependencies": { - "@aws-amplify/ui": "6.7.2", - "@aws-amplify/ui-react-core": "3.1.2", - "@aws-amplify/ui-react-core-notifications": "2.0.33" + "@aws-amplify/ui": "6.8.1", + "@aws-amplify/ui-react-core": "3.3.1", + "@aws-amplify/ui-react-core-notifications": "2.2.1" }, "peerDependencies": { "aws-amplify": "^6.9.0", "react": "*", - "react-native": "^0.70 || ^0.71 || ^0.72 || ^0.73 || ^0.74 || ^0.75", + "react-native": ">=0.70", "react-native-safe-area-context": "^4.2.5" }, "files": [ diff --git a/packages/react-native/src/Authenticator/Authenticator.tsx b/packages/react-native/src/Authenticator/Authenticator.tsx index 4b5a443d568..bd074852337 100644 --- a/packages/react-native/src/Authenticator/Authenticator.tsx +++ b/packages/react-native/src/Authenticator/Authenticator.tsx @@ -56,7 +56,7 @@ function Authenticator({ Footer, Header, ...options -}: AuthenticatorProps): JSX.Element | null { +}: AuthenticatorProps): React.JSX.Element | null { useDeprecationWarning({ message: 'The `passwordSettings` prop has been deprecated and will be removed in a future major version of Amplify UI.', diff --git a/packages/react-native/src/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.tsx b/packages/react-native/src/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.tsx index 3b4d1b2b5bb..73c6be323ca 100644 --- a/packages/react-native/src/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.tsx +++ b/packages/react-native/src/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.tsx @@ -30,7 +30,7 @@ const ConfirmResetPassword = ({ resendCode, validationErrors, ...rest -}: DefaultConfirmResetPasswordProps): JSX.Element => { +}: DefaultConfirmResetPasswordProps): React.JSX.Element => { const { disableFormSubmit, fields: fieldsWithHandlers, diff --git a/packages/react-native/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/ConfirmResetPassword.spec.tsx b/packages/react-native/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/ConfirmResetPassword.spec.tsx index 3f686a74808..32e86838085 100644 --- a/packages/react-native/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/ConfirmResetPassword.spec.tsx +++ b/packages/react-native/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/ConfirmResetPassword.spec.tsx @@ -53,7 +53,7 @@ describe('ConfirmResetPassword', () => { expect(getAllByRole('header')).toBeDefined(); expect(getByText(getSubmitText())).toBeDefined(); expect(getByText(getResendCodeText())).toBeDefined(); - expect(getAllByRole('text')).toHaveLength(fields.length); + expect(getAllByRole('text')).toHaveLength(5); }); it('renders an error message', () => { diff --git a/packages/react-native/src/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.tsx b/packages/react-native/src/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.tsx index c63a4e8b0fe..9a5e578c220 100644 --- a/packages/react-native/src/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.tsx +++ b/packages/react-native/src/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.tsx @@ -30,7 +30,7 @@ const ConfirmSignIn = ({ toSignIn, validationErrors, ...rest -}: DefaultConfirmSignInProps): JSX.Element => { +}: DefaultConfirmSignInProps): React.JSX.Element => { const { disableFormSubmit: disabled, fields: fieldsWithHandlers, diff --git a/packages/react-native/src/Authenticator/Defaults/ConfirmSignIn/__tests__/ConfirmSignIn.spec.tsx b/packages/react-native/src/Authenticator/Defaults/ConfirmSignIn/__tests__/ConfirmSignIn.spec.tsx index 393adc6845d..ead0e3dbf1e 100644 --- a/packages/react-native/src/Authenticator/Defaults/ConfirmSignIn/__tests__/ConfirmSignIn.spec.tsx +++ b/packages/react-native/src/Authenticator/Defaults/ConfirmSignIn/__tests__/ConfirmSignIn.spec.tsx @@ -44,7 +44,7 @@ describe('ConfirmSignIn', () => { expect(getAllByRole('header')).toBeDefined(); expect(getByText(getChallengeText('SMS_MFA'))).toBeDefined(); expect(getByText(getConfirmText())).toBeDefined(); - expect(getAllByRole('text')).toHaveLength(fields.length); + expect(getAllByRole('text')).toHaveLength(3); }); it('renders an error message', () => { diff --git a/packages/react-native/src/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.tsx b/packages/react-native/src/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.tsx index 150a8adbf2d..f18d36c3514 100644 --- a/packages/react-native/src/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.tsx +++ b/packages/react-native/src/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.tsx @@ -31,7 +31,7 @@ const ConfirmSignUp = ({ resendCode, validationErrors, ...rest -}: DefaultConfirmSignUpProps): JSX.Element => { +}: DefaultConfirmSignUpProps): React.JSX.Element => { const { disableFormSubmit: disabled, fields: fieldsWithHandlers, diff --git a/packages/react-native/src/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.tsx b/packages/react-native/src/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.tsx index a3b100d7d96..e3cc30693a0 100644 --- a/packages/react-native/src/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.tsx +++ b/packages/react-native/src/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.tsx @@ -29,7 +29,7 @@ const ConfirmVerifyUser = ({ skipVerification, validationErrors, ...rest -}: DefaultConfirmVerifyUserProps): JSX.Element => { +}: DefaultConfirmVerifyUserProps): React.JSX.Element => { const { disableFormSubmit: disabled, fields: fieldsWithHandlers, diff --git a/packages/react-native/src/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.tsx b/packages/react-native/src/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.tsx index 4943d3137b6..d90e692a776 100644 --- a/packages/react-native/src/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.tsx +++ b/packages/react-native/src/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.tsx @@ -26,7 +26,7 @@ const ForceNewPassword = ({ toSignIn, validationErrors, ...rest -}: DefaultForceNewPasswordProps): JSX.Element => { +}: DefaultForceNewPasswordProps): React.JSX.Element => { const { disableFormSubmit, fields: fieldsWithHandlers, diff --git a/packages/react-native/src/Authenticator/Defaults/ForgotPassword/ForgotPassword.tsx b/packages/react-native/src/Authenticator/Defaults/ForgotPassword/ForgotPassword.tsx index 77dd70ea4d6..c734a21ee64 100644 --- a/packages/react-native/src/Authenticator/Defaults/ForgotPassword/ForgotPassword.tsx +++ b/packages/react-native/src/Authenticator/Defaults/ForgotPassword/ForgotPassword.tsx @@ -28,7 +28,7 @@ const ForgotPassword = ({ toSignIn, validationErrors, ...rest -}: DefaultForgotPasswordProps): JSX.Element => { +}: DefaultForgotPasswordProps): React.JSX.Element => { const { disableFormSubmit: disabled, fields: fieldsWithHandlers, diff --git a/packages/react-native/src/Authenticator/Defaults/ForgotPassword/__tests__/ForgotPassword.spec.tsx b/packages/react-native/src/Authenticator/Defaults/ForgotPassword/__tests__/ForgotPassword.spec.tsx index e1a58c75888..316d827ce7e 100644 --- a/packages/react-native/src/Authenticator/Defaults/ForgotPassword/__tests__/ForgotPassword.spec.tsx +++ b/packages/react-native/src/Authenticator/Defaults/ForgotPassword/__tests__/ForgotPassword.spec.tsx @@ -44,7 +44,7 @@ describe('ForgotPassword', () => { expect(getAllByRole('header')).toBeDefined(); expect(getByText(getResetYourPasswordText())).toBeDefined(); expect(getByText(getSendCodeText())).toBeDefined(); - expect(getAllByRole('text')).toHaveLength(fields.length); + expect(getAllByRole('text')).toHaveLength(3); }); it('renders an error message', () => { diff --git a/packages/react-native/src/Authenticator/Defaults/SetupTotp/SetupTotp.tsx b/packages/react-native/src/Authenticator/Defaults/SetupTotp/SetupTotp.tsx index 4712876dacf..ee27c1a0abd 100644 --- a/packages/react-native/src/Authenticator/Defaults/SetupTotp/SetupTotp.tsx +++ b/packages/react-native/src/Authenticator/Defaults/SetupTotp/SetupTotp.tsx @@ -35,7 +35,7 @@ const SetupTotp = ({ totpSecretCode, validationErrors, ...rest -}: DefaultSetupTotpProps): JSX.Element => { +}: DefaultSetupTotpProps): React.JSX.Element => { const { disableFormSubmit: disabled, fields: fieldsWithHandlers, diff --git a/packages/react-native/src/Authenticator/Defaults/SignIn/SignIn.tsx b/packages/react-native/src/Authenticator/Defaults/SignIn/SignIn.tsx index 4a22619e651..08cf3a3d73b 100644 --- a/packages/react-native/src/Authenticator/Defaults/SignIn/SignIn.tsx +++ b/packages/react-native/src/Authenticator/Defaults/SignIn/SignIn.tsx @@ -26,7 +26,7 @@ const SignIn = ({ toSignUp, validationErrors, ...rest -}: DefaultSignInProps): JSX.Element => { +}: DefaultSignInProps): React.JSX.Element => { const { getSignInTabText, getSignInText, diff --git a/packages/react-native/src/Authenticator/Defaults/SignIn/__tests__/SignIn.spec.tsx b/packages/react-native/src/Authenticator/Defaults/SignIn/__tests__/SignIn.spec.tsx index e370099b6e6..e4685bedb1e 100644 --- a/packages/react-native/src/Authenticator/Defaults/SignIn/__tests__/SignIn.spec.tsx +++ b/packages/react-native/src/Authenticator/Defaults/SignIn/__tests__/SignIn.spec.tsx @@ -49,7 +49,7 @@ describe('SignIn', () => { const { toJSON, getAllByRole, getByText } = render(); expect(toJSON()).toMatchSnapshot(); - expect(getAllByRole('text')).toHaveLength(fields.length); + expect(getAllByRole('text')).toHaveLength(5); expect(getByText(getSignInText())).toBeDefined(); expect(getByText(getForgotPasswordText(true))).toBeDefined(); }); diff --git a/packages/react-native/src/Authenticator/Defaults/SignUp/SignUp.tsx b/packages/react-native/src/Authenticator/Defaults/SignUp/SignUp.tsx index b94e01de114..631c63549f5 100644 --- a/packages/react-native/src/Authenticator/Defaults/SignUp/SignUp.tsx +++ b/packages/react-native/src/Authenticator/Defaults/SignUp/SignUp.tsx @@ -34,7 +34,7 @@ const SignUp = ({ toSignIn, validationErrors, ...rest -}: DefaultSignUpProps): JSX.Element => { +}: DefaultSignUpProps): React.JSX.Element => { const { disableFormSubmit, fields: fieldsWithHandlers, diff --git a/packages/react-native/src/Authenticator/Defaults/SignUp/__tests__/SignUp.spec.tsx b/packages/react-native/src/Authenticator/Defaults/SignUp/__tests__/SignUp.spec.tsx index f7ad231d87c..08dd5cd7aaa 100644 --- a/packages/react-native/src/Authenticator/Defaults/SignUp/__tests__/SignUp.spec.tsx +++ b/packages/react-native/src/Authenticator/Defaults/SignUp/__tests__/SignUp.spec.tsx @@ -59,7 +59,7 @@ describe('SignUp', () => { expect(toJSON()).toMatchSnapshot(); expect(queryByText(getCreatingAccountText())).toBe(null); - expect(getAllByRole('text')).toHaveLength(fields.length); + expect(getAllByRole('text')).toHaveLength(6); }); it('renders as expected with errors', () => { diff --git a/packages/react-native/src/Authenticator/Defaults/VerifyUser/VerifyUser.tsx b/packages/react-native/src/Authenticator/Defaults/VerifyUser/VerifyUser.tsx index 0047d5f85b9..9a6cb18afbe 100644 --- a/packages/react-native/src/Authenticator/Defaults/VerifyUser/VerifyUser.tsx +++ b/packages/react-native/src/Authenticator/Defaults/VerifyUser/VerifyUser.tsx @@ -27,7 +27,7 @@ const VerifyUser = ({ skipVerification, validationErrors, ...rest -}: DefaultVerifyUserProps): JSX.Element => { +}: DefaultVerifyUserProps): React.JSX.Element => { const { disableFormSubmit: disabled, fields: fieldsWithHandlers, diff --git a/packages/react-native/src/Authenticator/common/DefaultContainer/DefaultContainer.tsx b/packages/react-native/src/Authenticator/common/DefaultContainer/DefaultContainer.tsx index e826b25c024..01f4fc7fa52 100644 --- a/packages/react-native/src/Authenticator/common/DefaultContainer/DefaultContainer.tsx +++ b/packages/react-native/src/Authenticator/common/DefaultContainer/DefaultContainer.tsx @@ -26,7 +26,7 @@ export default function DefaultContainer({ scrollViewContentContainerStyle, style, ...rest -}: ContainerProps): JSX.Element | null { +}: ContainerProps): React.JSX.Element | null { const theme = useTheme(); const insets = useSafeAreaInsets(); diff --git a/packages/react-native/src/Authenticator/common/DefaultContainer/InnerContainer.tsx b/packages/react-native/src/Authenticator/common/DefaultContainer/InnerContainer.tsx index 0ca446c9942..35d42b85609 100644 --- a/packages/react-native/src/Authenticator/common/DefaultContainer/InnerContainer.tsx +++ b/packages/react-native/src/Authenticator/common/DefaultContainer/InnerContainer.tsx @@ -8,7 +8,7 @@ import { ContainerProps } from './types'; export default function InnerContainer({ children, ...rest -}: ContainerProps): JSX.Element | null { +}: ContainerProps): React.JSX.Element | null { const theme = useTheme(); const themedStyle = getInnerContainerStyles(theme); diff --git a/packages/react-native/src/Authenticator/common/DefaultContent/DefaultContent.tsx b/packages/react-native/src/Authenticator/common/DefaultContent/DefaultContent.tsx index 6ed12ad08d9..dac1cd48788 100644 --- a/packages/react-native/src/Authenticator/common/DefaultContent/DefaultContent.tsx +++ b/packages/react-native/src/Authenticator/common/DefaultContent/DefaultContent.tsx @@ -26,7 +26,7 @@ export default function DefaultContent< Header, headerText, validationErrors, -}: DefaultContentProps): JSX.Element { +}: DefaultContentProps): React.JSX.Element { const themedStyles = useThemedStyles(getDefaultStyle); const linkButtons = useMemo( diff --git a/packages/react-native/src/Authenticator/common/DefaultFooter/DefaultFooter.tsx b/packages/react-native/src/Authenticator/common/DefaultFooter/DefaultFooter.tsx index 057a8cef95b..fc73223bd8b 100644 --- a/packages/react-native/src/Authenticator/common/DefaultFooter/DefaultFooter.tsx +++ b/packages/react-native/src/Authenticator/common/DefaultFooter/DefaultFooter.tsx @@ -6,6 +6,6 @@ import { DefaultFooterProps } from './types'; export default function DefaultFooter({ children, ...rest -}: DefaultFooterProps): JSX.Element | null { +}: DefaultFooterProps): React.JSX.Element | null { return children ? {children} : null; } diff --git a/packages/react-native/src/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.tsx b/packages/react-native/src/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.tsx index aaf246d1d55..c0473ef9c4a 100644 --- a/packages/react-native/src/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.tsx +++ b/packages/react-native/src/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.tsx @@ -20,7 +20,7 @@ const DefaultRadioFormFields = ({ fieldLabelStyle, isPending, style, -}: DefaultRadioFormFieldsProps): JSX.Element => { +}: DefaultRadioFormFieldsProps): React.JSX.Element => { return ( {(fields ?? []).map(({ name, value, ...props }) => { diff --git a/packages/react-native/src/Authenticator/common/DefaultFormFields/DefaultTextFormFields.tsx b/packages/react-native/src/Authenticator/common/DefaultFormFields/DefaultTextFormFields.tsx index 98a1638eb59..ba86fe8a828 100644 --- a/packages/react-native/src/Authenticator/common/DefaultFormFields/DefaultTextFormFields.tsx +++ b/packages/react-native/src/Authenticator/common/DefaultFormFields/DefaultTextFormFields.tsx @@ -19,7 +19,7 @@ const DefaultTextFormFields = ({ isPending = false, style, validationErrors, -}: DefaultTextFormFieldsProps): JSX.Element => { +}: DefaultTextFormFieldsProps): React.JSX.Element => { const formFields = (fields ?? []).map(({ name, type, ...field }) => { const errors = validationErrors ? getErrors(validationErrors?.[name]) : []; diff --git a/packages/react-native/src/Authenticator/common/DefaultFormFields/Field.tsx b/packages/react-native/src/Authenticator/common/DefaultFormFields/Field.tsx index b879b6e1ffe..a60c3647da6 100644 --- a/packages/react-native/src/Authenticator/common/DefaultFormFields/Field.tsx +++ b/packages/react-native/src/Authenticator/common/DefaultFormFields/Field.tsx @@ -28,7 +28,7 @@ const HIDDEN_INPUT_PROPS: TextInputProps = { const HiddenInput = () => ; -const Field = ({ type, ...rest }: FieldProps): JSX.Element => { +const Field = ({ type, ...rest }: FieldProps): React.JSX.Element => { const isPassword = type === 'password'; const Field = isPassword ? PasswordField diff --git a/packages/react-native/src/Authenticator/common/DefaultFormFields/FieldErrors.tsx b/packages/react-native/src/Authenticator/common/DefaultFormFields/FieldErrors.tsx index 206a2bd3d37..73fdd560312 100644 --- a/packages/react-native/src/Authenticator/common/DefaultFormFields/FieldErrors.tsx +++ b/packages/react-native/src/Authenticator/common/DefaultFormFields/FieldErrors.tsx @@ -7,7 +7,7 @@ export const FieldErrors = ({ errors, errorStyle, style, -}: FieldErrorsProps): JSX.Element | null => { +}: FieldErrorsProps): React.JSX.Element | null => { if (!errors || !errors.length) { return null; } diff --git a/packages/react-native/src/Authenticator/common/DefaultHeader/DefaultHeader.tsx b/packages/react-native/src/Authenticator/common/DefaultHeader/DefaultHeader.tsx index fb58da67941..014781e871d 100644 --- a/packages/react-native/src/Authenticator/common/DefaultHeader/DefaultHeader.tsx +++ b/packages/react-native/src/Authenticator/common/DefaultHeader/DefaultHeader.tsx @@ -7,7 +7,7 @@ export default function DefaultHeader({ children, level = 3, ...rest -}: DefaultHeaderProps): JSX.Element | null { +}: DefaultHeaderProps): React.JSX.Element | null { return children ? ( {children} diff --git a/packages/react-native/src/Authenticator/common/FederatedProviderButton/FederatedProviderButton.tsx b/packages/react-native/src/Authenticator/common/FederatedProviderButton/FederatedProviderButton.tsx index 15ade7884e7..66f848b80fc 100644 --- a/packages/react-native/src/Authenticator/common/FederatedProviderButton/FederatedProviderButton.tsx +++ b/packages/react-native/src/Authenticator/common/FederatedProviderButton/FederatedProviderButton.tsx @@ -11,7 +11,7 @@ export default function FederatedProviderButton({ style, textStyle, ...rest -}: FederatedProviderButtonProps): JSX.Element { +}: FederatedProviderButtonProps): React.JSX.Element { const pressableStyle = usePressableContainerStyles({ overrideStyle: style, }); diff --git a/packages/react-native/src/Authenticator/common/FederatedProviderButtons/FederatedProviderButtons.tsx b/packages/react-native/src/Authenticator/common/FederatedProviderButtons/FederatedProviderButtons.tsx index 3c6b9e6b66d..484b5540997 100644 --- a/packages/react-native/src/Authenticator/common/FederatedProviderButtons/FederatedProviderButtons.tsx +++ b/packages/react-native/src/Authenticator/common/FederatedProviderButtons/FederatedProviderButtons.tsx @@ -23,7 +23,7 @@ export default function FederatedProviderButtons({ socialProviders, style, toFederatedSignIn, -}: FederatedProviderButtonsProps): JSX.Element | null { +}: FederatedProviderButtonsProps): React.JSX.Element | null { const theme = useTheme(); const themedStyle = getThemedStyles(theme); diff --git a/packages/react-native/src/Authenticator/withAuthenticator.tsx b/packages/react-native/src/Authenticator/withAuthenticator.tsx index 79331b5f5be..6d0f0b7c322 100644 --- a/packages/react-native/src/Authenticator/withAuthenticator.tsx +++ b/packages/react-native/src/Authenticator/withAuthenticator.tsx @@ -5,12 +5,12 @@ import { WithAuthenticatorOptions } from './types'; export default function withAuthenticator( Component: React.ComponentType, options: WithAuthenticatorOptions = {} -): (props: Props) => JSX.Element { +): (props: Props) => React.JSX.Element { return function WrappedWithAuthenticator(props: Props) { return ( - + ); diff --git a/packages/react-native/src/InAppMessaging/components/BannerMessage/BannerMessage.tsx b/packages/react-native/src/InAppMessaging/components/BannerMessage/BannerMessage.tsx index ca537203094..f8ee7266ca6 100644 --- a/packages/react-native/src/InAppMessaging/components/BannerMessage/BannerMessage.tsx +++ b/packages/react-native/src/InAppMessaging/components/BannerMessage/BannerMessage.tsx @@ -10,7 +10,7 @@ import { BannerMessageProps } from './types'; export default function BannerMessage({ position = 'top', ...props -}: BannerMessageProps): JSX.Element | null { +}: BannerMessageProps): React.JSX.Element | null { const messageProps = useMessageProps( props, (imageDimensions: ImageDimensions) => diff --git a/packages/react-native/src/InAppMessaging/components/CarouselMessage/CarouselMessage.tsx b/packages/react-native/src/InAppMessaging/components/CarouselMessage/CarouselMessage.tsx index 47ee927c033..b54289d1395 100644 --- a/packages/react-native/src/InAppMessaging/components/CarouselMessage/CarouselMessage.tsx +++ b/packages/react-native/src/InAppMessaging/components/CarouselMessage/CarouselMessage.tsx @@ -11,7 +11,7 @@ import { CarouselMessageProps } from './types'; export default function CarouselMessage( props: CarouselMessageProps -): JSX.Element { +): React.JSX.Element { const { data, ...rest } = props; const { style } = rest; diff --git a/packages/react-native/src/InAppMessaging/components/CarouselMessage/CarouselMessageItem.tsx b/packages/react-native/src/InAppMessaging/components/CarouselMessage/CarouselMessageItem.tsx index 07d21a1accd..d47ade24290 100644 --- a/packages/react-native/src/InAppMessaging/components/CarouselMessage/CarouselMessageItem.tsx +++ b/packages/react-native/src/InAppMessaging/components/CarouselMessage/CarouselMessageItem.tsx @@ -10,7 +10,7 @@ import { CarouselMessageItemProps } from './types'; export default function CarouselMessageItem( props: CarouselMessageItemProps -): JSX.Element | null { +): React.JSX.Element | null { const { deviceOrientation, isPortraitMode } = useDeviceOrientation(); const messageProps = useMessageProps( props, diff --git a/packages/react-native/src/InAppMessaging/components/CarouselMessage/__tests__/CarouselMessage.spec.tsx b/packages/react-native/src/InAppMessaging/components/CarouselMessage/__tests__/CarouselMessage.spec.tsx index 2c11cbc4f05..0692d92a9e7 100644 --- a/packages/react-native/src/InAppMessaging/components/CarouselMessage/__tests__/CarouselMessage.spec.tsx +++ b/packages/react-native/src/InAppMessaging/components/CarouselMessage/__tests__/CarouselMessage.spec.tsx @@ -4,7 +4,6 @@ import { render } from '@testing-library/react-native'; import { IN_APP_MESSAGING_TEST_ID } from '../../../constants'; import CarouselMessage from '../CarouselMessage'; import { defaultStyle } from '../styles'; -import { ReactTestRendererJSON } from 'react-test-renderer'; jest.mock('../../../../primitives', () => ({ Carousel: 'Carousel' })); jest.mock('../../MessageWrapper', () => ({ MessageWrapper: 'MessageWrapper' })); @@ -85,7 +84,9 @@ describe('CarouselMessage', () => { const carouselMessageItem = toJSON(); expect(carouselMessageItem).toMatchSnapshot(); - const { props } = toJSON() as ReactTestRendererJSON; + const { props } = toJSON() as unknown as { + props: { layout: string; image: { src: string } }; + }; expect(props.layout).toEqual(baseProps.layout); expect(props.image).toEqual({ src: 'image-src' }); }); diff --git a/packages/react-native/src/InAppMessaging/components/FullScreenMessage/FullScreenMessage.tsx b/packages/react-native/src/InAppMessaging/components/FullScreenMessage/FullScreenMessage.tsx index 9d6da819885..7c38ccb3b98 100644 --- a/packages/react-native/src/InAppMessaging/components/FullScreenMessage/FullScreenMessage.tsx +++ b/packages/react-native/src/InAppMessaging/components/FullScreenMessage/FullScreenMessage.tsx @@ -11,7 +11,7 @@ import { FullScreenMessageProps } from './types'; export default function FullScreenMessage( props: FullScreenMessageProps -): JSX.Element | null { +): React.JSX.Element | null { const { deviceOrientation, isPortraitMode } = useDeviceOrientation(); const messageProps = useMessageProps( props, diff --git a/packages/react-native/src/InAppMessaging/components/InAppMessageDisplay/InAppMessageDisplay.tsx b/packages/react-native/src/InAppMessaging/components/InAppMessageDisplay/InAppMessageDisplay.tsx index fb5e77f6454..da669ea257f 100644 --- a/packages/react-native/src/InAppMessaging/components/InAppMessageDisplay/InAppMessageDisplay.tsx +++ b/packages/react-native/src/InAppMessaging/components/InAppMessageDisplay/InAppMessageDisplay.tsx @@ -27,7 +27,7 @@ const onMessageAction: OnMessageAction = ({ action, url }) => { function InAppMessageDisplay({ components: overrideComponents, -}: InAppMessageDisplayProps): JSX.Element | null { +}: InAppMessageDisplayProps): React.JSX.Element | null { const components = React.useMemo( () => ({ ...platformComponents, ...overrideComponents }), [overrideComponents] diff --git a/packages/react-native/src/InAppMessaging/components/MessageLayout/MessageLayout.tsx b/packages/react-native/src/InAppMessaging/components/MessageLayout/MessageLayout.tsx index c2d37b7c102..72baab59c97 100644 --- a/packages/react-native/src/InAppMessaging/components/MessageLayout/MessageLayout.tsx +++ b/packages/react-native/src/InAppMessaging/components/MessageLayout/MessageLayout.tsx @@ -16,7 +16,7 @@ import { LayoutProps } from './types'; export default function MessageLayout({ orientation, ...props -}: LayoutProps): JSX.Element { +}: LayoutProps): React.JSX.Element { const { body, hasButtons, diff --git a/packages/react-native/src/InAppMessaging/components/MessageWrapper/MessageWrapper.tsx b/packages/react-native/src/InAppMessaging/components/MessageWrapper/MessageWrapper.tsx index b37bb4d8f61..55c3a7658e5 100644 --- a/packages/react-native/src/InAppMessaging/components/MessageWrapper/MessageWrapper.tsx +++ b/packages/react-native/src/InAppMessaging/components/MessageWrapper/MessageWrapper.tsx @@ -17,7 +17,7 @@ export default function MessageWrapper({ children, disableSafeAreaView, style, -}: MessageWrapperProps): JSX.Element { +}: MessageWrapperProps): React.JSX.Element { return ( diff --git a/packages/react-native/src/InAppMessaging/components/ModalMessage/ModalMessage.tsx b/packages/react-native/src/InAppMessaging/components/ModalMessage/ModalMessage.tsx index 2267e1de9e2..3aa01096118 100644 --- a/packages/react-native/src/InAppMessaging/components/ModalMessage/ModalMessage.tsx +++ b/packages/react-native/src/InAppMessaging/components/ModalMessage/ModalMessage.tsx @@ -10,7 +10,7 @@ import { ModalMessageProps } from './types'; export default function ModalMessage( props: ModalMessageProps -): JSX.Element | null { +): React.JSX.Element | null { const { deviceOrientation, isPortraitMode } = useDeviceOrientation(); const messageProps = useMessageProps( props, diff --git a/packages/react-native/src/InAppMessaging/components/withInAppMessaging/withInAppMessaging.tsx b/packages/react-native/src/InAppMessaging/components/withInAppMessaging/withInAppMessaging.tsx index 9501989fb10..693c3aedc5b 100644 --- a/packages/react-native/src/InAppMessaging/components/withInAppMessaging/withInAppMessaging.tsx +++ b/packages/react-native/src/InAppMessaging/components/withInAppMessaging/withInAppMessaging.tsx @@ -6,12 +6,12 @@ import { InAppMessageDisplay, MessageComponents } from '../InAppMessageDisplay'; export default function withInAppMessaging( Component: React.ComponentType, options?: { components?: MessageComponents } -): (props: Props) => JSX.Element { +): (props: Props) => React.JSX.Element { return function WrappedWithInAppMessaging(props: Props) { return ( - + ); }; diff --git a/packages/react-native/src/primitives/Button/Button.tsx b/packages/react-native/src/primitives/Button/Button.tsx index b14770fa319..8dbfe6ebb22 100644 --- a/packages/react-native/src/primitives/Button/Button.tsx +++ b/packages/react-native/src/primitives/Button/Button.tsx @@ -15,7 +15,7 @@ export default function Button({ textStyle, variant = 'default', ...rest -}: ButtonProps): JSX.Element { +}: ButtonProps): React.JSX.Element { const theme = useTheme(); const themedStyle = getThemedStyles(theme); diff --git a/packages/react-native/src/primitives/Carousel/Carousel.tsx b/packages/react-native/src/primitives/Carousel/Carousel.tsx index 9ae45204ff2..495012b7d2e 100644 --- a/packages/react-native/src/primitives/Carousel/Carousel.tsx +++ b/packages/react-native/src/primitives/Carousel/Carousel.tsx @@ -15,7 +15,7 @@ import { CarouselProps } from './types'; export default function Carousel( props: CarouselProps -): JSX.Element | null { +): React.JSX.Element | null { const { data, indicatorActiveStyle, diff --git a/packages/react-native/src/primitives/Carousel/CarouselPageIndicator.tsx b/packages/react-native/src/primitives/Carousel/CarouselPageIndicator.tsx index 542761b7f40..563b6353f10 100644 --- a/packages/react-native/src/primitives/Carousel/CarouselPageIndicator.tsx +++ b/packages/react-native/src/primitives/Carousel/CarouselPageIndicator.tsx @@ -12,9 +12,10 @@ export default function CarouselPageIndicator({ activeStyle, currentIndex, inactiveStyle, + indicatorTestId, numberOfItems, style, -}: CarouselPageIndicatorProps): JSX.Element { +}: CarouselPageIndicatorProps): React.JSX.Element { const items = useMemo( () => new Array(numberOfItems ?? 0) @@ -24,15 +25,17 @@ export default function CarouselPageIndicator({ ) : ( ) ), - [activeStyle, currentIndex, inactiveStyle, numberOfItems] + [activeStyle, currentIndex, inactiveStyle, indicatorTestId, numberOfItems] ); return {items}; diff --git a/packages/react-native/src/primitives/Carousel/__tests__/Carousel.spec.tsx b/packages/react-native/src/primitives/Carousel/__tests__/Carousel.spec.tsx index 90f903acb0a..c13e80cde75 100644 --- a/packages/react-native/src/primitives/Carousel/__tests__/Carousel.spec.tsx +++ b/packages/react-native/src/primitives/Carousel/__tests__/Carousel.spec.tsx @@ -10,10 +10,11 @@ import { import { act, render } from '@testing-library/react-native'; import Carousel from '../Carousel'; -import { ReactTestInstance } from 'react-test-renderer'; jest.mock('../CarouselPageIndicator', () => 'CarouselPageIndicator'); +type ReactTestInstance = ReturnType['UNSAFE_root']; + type ItemProps = { str?: string }; const Item = ({ str }: ItemProps) => {str}; diff --git a/packages/react-native/src/primitives/Carousel/__tests__/CarouselPageIndicator.spec.tsx b/packages/react-native/src/primitives/Carousel/__tests__/CarouselPageIndicator.spec.tsx index 2c6e144d5f9..4102840a781 100644 --- a/packages/react-native/src/primitives/Carousel/__tests__/CarouselPageIndicator.spec.tsx +++ b/packages/react-native/src/primitives/Carousel/__tests__/CarouselPageIndicator.spec.tsx @@ -1,62 +1,78 @@ import React from 'react'; -import { render } from '@testing-library/react-native'; +import { render, screen } from '@testing-library/react-native'; import CarouselPageIndicator from '../CarouselPageIndicator'; -import { ReactTestRendererJSON } from 'react-test-renderer'; + import { DEFAULT_CAROUSEL_INDICATOR_ACTIVE_STYLE, DEFAULT_CAROUSEL_INDICATOR_INACTIVE_STYLE, } from '../constants'; +const INDICATOR_TEST_ID = 'indicator-test-id'; + describe('CarouselPageIndicator', () => { it('renders with multiple items', () => { - const { toJSON } = render( - + render( + ); - expect(toJSON()).toMatchSnapshot(); + const items = screen.queryAllByTestId(INDICATOR_TEST_ID); - const { children } = toJSON() as ReactTestRendererJSON; - expect(children).toHaveLength(3); + expect(items).toHaveLength(3); }); it('renders with just one item', () => { - const { toJSON } = render( - + render( + ); - expect(toJSON()).toMatchSnapshot(); - const { children } = toJSON() as ReactTestRendererJSON; - expect(children).toHaveLength(1); + const items = screen.queryAllByTestId(INDICATOR_TEST_ID); + expect(items).toHaveLength(1); }); it('handles null numberOfItems value', () => { // Ideally, this should not happen but, if it does, we should be able to handle gracefully - const { toJSON } = render( - + render( + ); - expect(toJSON()).toMatchSnapshot(); + const items = screen.queryByTestId(INDICATOR_TEST_ID); + + expect(items).toBeNull(); }); it('renders indicator styles based on current index', () => { - const { toJSON } = render( - + render( + ); - const { children } = toJSON() as ReactTestRendererJSON; - - expect(toJSON()).toMatchSnapshot(); + const items = screen.queryAllByTestId(INDICATOR_TEST_ID); - expect((children?.[0] as ReactTestRendererJSON).props.style).toStrictEqual([ + expect(items[0].props.style).toStrictEqual([ DEFAULT_CAROUSEL_INDICATOR_INACTIVE_STYLE, undefined, ]); - expect((children?.[1] as ReactTestRendererJSON).props.style).toStrictEqual([ + expect(items[1].props.style).toStrictEqual([ DEFAULT_CAROUSEL_INDICATOR_ACTIVE_STYLE, undefined, ]); - expect((children?.[2] as ReactTestRendererJSON).props.style).toStrictEqual([ + expect(items[2].props.style).toStrictEqual([ DEFAULT_CAROUSEL_INDICATOR_INACTIVE_STYLE, undefined, ]); diff --git a/packages/react-native/src/primitives/Carousel/__tests__/__snapshots__/CarouselPageIndicator.spec.tsx.snap b/packages/react-native/src/primitives/Carousel/__tests__/__snapshots__/CarouselPageIndicator.spec.tsx.snap index 35c6a022213..5b8c43e3f46 100644 --- a/packages/react-native/src/primitives/Carousel/__tests__/__snapshots__/CarouselPageIndicator.spec.tsx.snap +++ b/packages/react-native/src/primitives/Carousel/__tests__/__snapshots__/CarouselPageIndicator.spec.tsx.snap @@ -74,118 +74,3 @@ exports[`CarouselPageIndicator handles null index value 1`] = ` /> `; - -exports[`CarouselPageIndicator handles null numberOfItems value 1`] = ``; - -exports[`CarouselPageIndicator renders indicator styles based on current index 1`] = ` - - - - - -`; - -exports[`CarouselPageIndicator renders with just one item 1`] = ` - - - -`; - -exports[`CarouselPageIndicator renders with multiple items 1`] = ` - - - - - -`; diff --git a/packages/react-native/src/primitives/Carousel/types.ts b/packages/react-native/src/primitives/Carousel/types.ts index a6f098095b3..37795a78394 100644 --- a/packages/react-native/src/primitives/Carousel/types.ts +++ b/packages/react-native/src/primitives/Carousel/types.ts @@ -14,6 +14,7 @@ export interface CarouselPageIndicatorProps { activeStyle?: StyleProp; currentIndex: number | null; inactiveStyle?: StyleProp; + indicatorTestId?: string; numberOfItems: number; style?: StyleProp; } diff --git a/packages/react-native/src/primitives/Checkbox/Checkbox.tsx b/packages/react-native/src/primitives/Checkbox/Checkbox.tsx index 689003a651a..854f4a750c7 100644 --- a/packages/react-native/src/primitives/Checkbox/Checkbox.tsx +++ b/packages/react-native/src/primitives/Checkbox/Checkbox.tsx @@ -21,7 +21,7 @@ export default function Checkbox({ style, value, ...rest -}: CheckboxProps): JSX.Element { +}: CheckboxProps): React.JSX.Element { const [checked, setChecked] = useState(selected ?? false); const theme = useTheme(); const themedStyle = getThemedStyles(theme, labelPosition); diff --git a/packages/react-native/src/primitives/Divider/Divider.tsx b/packages/react-native/src/primitives/Divider/Divider.tsx index 125845295bd..ca3ecf7b5ac 100644 --- a/packages/react-native/src/primitives/Divider/Divider.tsx +++ b/packages/react-native/src/primitives/Divider/Divider.tsx @@ -13,7 +13,7 @@ export default function Divider({ labelStyle, lineStyle, style, -}: DividerProps): JSX.Element { +}: DividerProps): React.JSX.Element { const theme = useTheme(); const themedStyle = getThemedStyles(theme); diff --git a/packages/react-native/src/primitives/ErrorMessage/ErrorMessage.tsx b/packages/react-native/src/primitives/ErrorMessage/ErrorMessage.tsx index 1f6cb1d84dc..de7a9c4560a 100644 --- a/packages/react-native/src/primitives/ErrorMessage/ErrorMessage.tsx +++ b/packages/react-native/src/primitives/ErrorMessage/ErrorMessage.tsx @@ -21,7 +21,7 @@ export default function ErrorMessage({ onDismiss, style, ...rest -}: ErrorMessageProps): JSX.Element { +}: ErrorMessageProps): React.JSX.Element { const theme = useTheme(); const themedStyle = getThemedStyles(theme); diff --git a/packages/react-native/src/primitives/Heading/Heading.tsx b/packages/react-native/src/primitives/Heading/Heading.tsx index 4ca0ac419e0..5f9f7688433 100644 --- a/packages/react-native/src/primitives/Heading/Heading.tsx +++ b/packages/react-native/src/primitives/Heading/Heading.tsx @@ -11,7 +11,7 @@ export default function Heading({ level = 6, style, ...rest -}: HeadingProps): JSX.Element { +}: HeadingProps): React.JSX.Element { const theme = useTheme(); const themedStyle = getThemedStyles(theme); diff --git a/packages/react-native/src/primitives/Icon/Icon.tsx b/packages/react-native/src/primitives/Icon/Icon.tsx index f3d49d18e21..59a690fdd4d 100644 --- a/packages/react-native/src/primitives/Icon/Icon.tsx +++ b/packages/react-native/src/primitives/Icon/Icon.tsx @@ -13,7 +13,7 @@ export default function Icon({ size, style, ...rest -}: IconProps): JSX.Element { +}: IconProps): React.JSX.Element { const theme = useTheme(); const themedStyle = useMemo( () => getThemedStyles(theme, color, size), diff --git a/packages/react-native/src/primitives/IconButton/IconButton.tsx b/packages/react-native/src/primitives/IconButton/IconButton.tsx index 94f776a94b7..21a099c207a 100644 --- a/packages/react-native/src/primitives/IconButton/IconButton.tsx +++ b/packages/react-native/src/primitives/IconButton/IconButton.tsx @@ -17,7 +17,7 @@ export default function IconButton({ source, style, ...rest -}: IconButtonProps): JSX.Element { +}: IconButtonProps): React.JSX.Element { const theme = useTheme(); const themedStyle = getThemedStyles(theme); diff --git a/packages/react-native/src/primitives/Label/Label.tsx b/packages/react-native/src/primitives/Label/Label.tsx index 6d1e65900bd..05a54fe4fd9 100644 --- a/packages/react-native/src/primitives/Label/Label.tsx +++ b/packages/react-native/src/primitives/Label/Label.tsx @@ -11,7 +11,7 @@ export default function Label({ style, variant = 'primary', ...rest -}: LabelProps): JSX.Element { +}: LabelProps): React.JSX.Element { const theme = useTheme(); const themedStyle = getThemedStyles(theme); const textStyle = [themedStyle.text, themedStyle[variant], style]; diff --git a/packages/react-native/src/primitives/PasswordField/PasswordField.tsx b/packages/react-native/src/primitives/PasswordField/PasswordField.tsx index 2af94288d7a..29c2537a431 100644 --- a/packages/react-native/src/primitives/PasswordField/PasswordField.tsx +++ b/packages/react-native/src/primitives/PasswordField/PasswordField.tsx @@ -19,7 +19,7 @@ export default function PasswordField({ showPasswordButton = true, style, ...rest -}: PasswordFieldProps): JSX.Element { +}: PasswordFieldProps): React.JSX.Element { const theme = useTheme(); const themedStyle = getThemedStyles(theme); diff --git a/packages/react-native/src/primitives/PhoneNumberField/PhoneNumberField.tsx b/packages/react-native/src/primitives/PhoneNumberField/PhoneNumberField.tsx index 08bc85f271b..d406f9e4db9 100644 --- a/packages/react-native/src/primitives/PhoneNumberField/PhoneNumberField.tsx +++ b/packages/react-native/src/primitives/PhoneNumberField/PhoneNumberField.tsx @@ -11,7 +11,7 @@ export default function PhoneNumberField({ labelStyle, style, ...rest -}: PhoneNumberFieldProps): JSX.Element { +}: PhoneNumberFieldProps): React.JSX.Element { const theme = useTheme(); const themedStyle = getThemedStyles(theme); diff --git a/packages/react-native/src/primitives/Radio/Radio.tsx b/packages/react-native/src/primitives/Radio/Radio.tsx index 5d2dfa79d06..e6c25e7f165 100644 --- a/packages/react-native/src/primitives/Radio/Radio.tsx +++ b/packages/react-native/src/primitives/Radio/Radio.tsx @@ -33,7 +33,7 @@ export default function Radio({ style, value, ...rest -}: RadioProps): JSX.Element { +}: RadioProps): React.JSX.Element { const theme = useTheme(); const themedStyle = getThemedStyles(theme); diff --git a/packages/react-native/src/primitives/RadioGroup/RadioGroup.tsx b/packages/react-native/src/primitives/RadioGroup/RadioGroup.tsx index 157ace888c0..6ca9c9065de 100644 --- a/packages/react-native/src/primitives/RadioGroup/RadioGroup.tsx +++ b/packages/react-native/src/primitives/RadioGroup/RadioGroup.tsx @@ -34,7 +34,7 @@ export default function RadioGroup({ size, style, ...rest -}: RadioGroupProps): JSX.Element { +}: RadioGroupProps): React.JSX.Element { const theme = useTheme(); const themedStyle = getThemedStyles(theme); diff --git a/packages/react-native/src/primitives/Tabs/Tab.tsx b/packages/react-native/src/primitives/Tabs/Tab.tsx index 232ebbf8b5a..17778b54b14 100644 --- a/packages/react-native/src/primitives/Tabs/Tab.tsx +++ b/packages/react-native/src/primitives/Tabs/Tab.tsx @@ -14,7 +14,7 @@ export default function Tab({ textStyle, indicatorPosition, ...rest -}: TabProps): JSX.Element { +}: TabProps): React.JSX.Element { const theme = useTheme(); const themedStyle = getThemedStyles(theme, indicatorPosition); diff --git a/packages/react-native/src/primitives/Tabs/Tabs.tsx b/packages/react-native/src/primitives/Tabs/Tabs.tsx index 72af1b2cc73..52e11619fe5 100644 --- a/packages/react-native/src/primitives/Tabs/Tabs.tsx +++ b/packages/react-native/src/primitives/Tabs/Tabs.tsx @@ -14,7 +14,7 @@ export default function Tabs({ selectedIndex = 0, style, ...rest -}: TabsProps): JSX.Element { +}: TabsProps): React.JSX.Element { const theme = useTheme(); const themedStyle = getThemedStyles(theme, indicatorPosition); diff --git a/packages/react-native/src/primitives/TextField/TextField.tsx b/packages/react-native/src/primitives/TextField/TextField.tsx index 09b7a6ff83b..d7f5157a886 100644 --- a/packages/react-native/src/primitives/TextField/TextField.tsx +++ b/packages/react-native/src/primitives/TextField/TextField.tsx @@ -25,7 +25,7 @@ export default function TextField({ labelStyle, style, ...rest -}: TextFieldProps): JSX.Element { +}: TextFieldProps): React.JSX.Element { const theme = useTheme(); const themedStyle = useMemo(() => getThemedStyles(theme), [theme]); diff --git a/packages/react-native/src/theme/ThemeProvider.tsx b/packages/react-native/src/theme/ThemeProvider.tsx index 258447c5d4c..4c020fa9586 100644 --- a/packages/react-native/src/theme/ThemeProvider.tsx +++ b/packages/react-native/src/theme/ThemeProvider.tsx @@ -14,7 +14,7 @@ export const ThemeProvider = ({ children, theme, colorMode, -}: ThemeProviderProps): JSX.Element => { +}: ThemeProviderProps): React.JSX.Element => { const value = React.useMemo( () => ({ theme: createTheme(theme, colorMode) }), [theme, colorMode] diff --git a/packages/react-native/src/version.ts b/packages/react-native/src/version.ts index 4783b795658..46e78e07a05 100644 --- a/packages/react-native/src/version.ts +++ b/packages/react-native/src/version.ts @@ -1 +1 @@ -export const VERSION = '2.2.20'; +export const VERSION = '2.4.1'; diff --git a/packages/react-notifications/CHANGELOG.md b/packages/react-notifications/CHANGELOG.md index bd0da5bed28..d485c6d018c 100644 --- a/packages/react-notifications/CHANGELOG.md +++ b/packages/react-notifications/CHANGELOG.md @@ -1,5 +1,53 @@ # @aws-amplify/ui-react-notifications +## 2.2.1 + +### Patch Changes + +- Updated dependencies [[`272ec8e575718ea990dcb9f51d1baaf522f45fb6`](https://github.com/aws-amplify/amplify-ui/commit/272ec8e575718ea990dcb9f51d1baaf522f45fb6), [`6e51c1750f8f3e01cf8827f4c5c2e5ef02240ca6`](https://github.com/aws-amplify/amplify-ui/commit/6e51c1750f8f3e01cf8827f4c5c2e5ef02240ca6)]: + - @aws-amplify/ui@6.8.1 + - @aws-amplify/ui-react@6.9.1 + - @aws-amplify/ui-react-core@3.3.1 + - @aws-amplify/ui-react-core-notifications@2.2.1 + +## 2.2.0 + +### Minor Changes + +- [#6296](https://github.com/aws-amplify/amplify-ui/pull/6296) [`8d2aa79b174d4e48aaca913bd568898b8c8975a2`](https://github.com/aws-amplify/amplify-ui/commit/8d2aa79b174d4e48aaca913bd568898b8c8975a2) Thanks [@calebpollman](https://github.com/calebpollman)! - feat(react): reenable react 19 support + +### Patch Changes + +- Updated dependencies [[`8757f03b7b1d761d9a13cfe29382a2208d4f3999`](https://github.com/aws-amplify/amplify-ui/commit/8757f03b7b1d761d9a13cfe29382a2208d4f3999), [`8d2aa79b174d4e48aaca913bd568898b8c8975a2`](https://github.com/aws-amplify/amplify-ui/commit/8d2aa79b174d4e48aaca913bd568898b8c8975a2)]: + - @aws-amplify/ui@6.8.0 + - @aws-amplify/ui-react@6.9.0 + - @aws-amplify/ui-react-core@3.3.0 + - @aws-amplify/ui-react-core-notifications@2.2.0 + +## 2.1.1 + +### Patch Changes + +- [#6278](https://github.com/aws-amplify/amplify-ui/pull/6278) [`475e4a37a404bd116ec55e95579acb8f2d23c9a4`](https://github.com/aws-amplify/amplify-ui/commit/475e4a37a404bd116ec55e95579acb8f2d23c9a4) Thanks [@jordanvn](https://github.com/jordanvn)! - revert changes introduced for React 19 support + +- Updated dependencies [[`475e4a37a404bd116ec55e95579acb8f2d23c9a4`](https://github.com/aws-amplify/amplify-ui/commit/475e4a37a404bd116ec55e95579acb8f2d23c9a4)]: + - @aws-amplify/ui-react-core-notifications@2.1.1 + - @aws-amplify/ui-react-core@3.2.1 + - @aws-amplify/ui-react@6.8.1 + +## 2.1.0 + +### Minor Changes + +- [#5826](https://github.com/aws-amplify/amplify-ui/pull/5826) [`954e9be2d055a57ebddab5b902e3e6b427d09f67`](https://github.com/aws-amplify/amplify-ui/commit/954e9be2d055a57ebddab5b902e3e6b427d09f67) Thanks [@calebpollman](https://github.com/calebpollman)! - chore(react): add support for React 19 + +### Patch Changes + +- Updated dependencies [[`c623990d5fb6af635b1964a51a8ff2c807938235`](https://github.com/aws-amplify/amplify-ui/commit/c623990d5fb6af635b1964a51a8ff2c807938235), [`825cccc92f5c326f0f110c8439a1c2c6553ff00a`](https://github.com/aws-amplify/amplify-ui/commit/825cccc92f5c326f0f110c8439a1c2c6553ff00a), [`954e9be2d055a57ebddab5b902e3e6b427d09f67`](https://github.com/aws-amplify/amplify-ui/commit/954e9be2d055a57ebddab5b902e3e6b427d09f67)]: + - @aws-amplify/ui-react@6.8.0 + - @aws-amplify/ui-react-core-notifications@2.1.0 + - @aws-amplify/ui-react-core@3.2.0 + ## 2.0.38 ### Patch Changes diff --git a/packages/react-notifications/package.json b/packages/react-notifications/package.json index 3ffe003f64c..e40c4f62b56 100644 --- a/packages/react-notifications/package.json +++ b/packages/react-notifications/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/ui-react-notifications", - "version": "2.0.38", + "version": "2.2.1", "main": "dist/index.js", "module": "dist/esm/index.mjs", "exports": { @@ -39,16 +39,16 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@aws-amplify/ui": "6.7.2", - "@aws-amplify/ui-react": "6.7.2", - "@aws-amplify/ui-react-core": "3.1.2", - "@aws-amplify/ui-react-core-notifications": "2.0.33", + "@aws-amplify/ui": "6.8.1", + "@aws-amplify/ui-react": "6.9.1", + "@aws-amplify/ui-react-core": "3.3.1", + "@aws-amplify/ui-react-core-notifications": "2.2.1", "tinycolor2": "1.4.2" }, "peerDependencies": { "aws-amplify": "^6.9.0", - "react": "^16.14.0 || ^17.0 || ^18.0", - "react-dom": "^16.14.0 || ^17.0 || ^18.0" + "react": "^16.14 || ^17 || ^18 || ^19", + "react-dom": "^16.14 || ^17 || ^18 || ^19" }, "devDependencies": { "@types/tinycolor2": "^1.4.3" diff --git a/packages/react-notifications/src/components/InAppMessaging/Backdrop/Backdrop.tsx b/packages/react-notifications/src/components/InAppMessaging/Backdrop/Backdrop.tsx index 8bdbdff1671..4e40c05bc3d 100644 --- a/packages/react-notifications/src/components/InAppMessaging/Backdrop/Backdrop.tsx +++ b/packages/react-notifications/src/components/InAppMessaging/Backdrop/Backdrop.tsx @@ -6,7 +6,10 @@ import { BackdropProps } from './types'; export const BACKDROP_TEST_ID = 'inappmessaging-backdrop'; -export function Backdrop({ onClick, ...rest }: BackdropProps): JSX.Element { +export function Backdrop({ + onClick, + ...rest +}: BackdropProps): React.JSX.Element { return ( ( - Content: (props: Props) => JSX.Element, + Content: (props: Props) => React.JSX.Element, options: BackdropProps = {} -): (props: Props) => JSX.Element { +): (props: Props) => React.JSX.Element { return function ContentWithBackdrop(props: Props) { return ( <> - + diff --git a/packages/react-notifications/src/components/InAppMessaging/BannerMessage/BannerMessage.tsx b/packages/react-notifications/src/components/InAppMessaging/BannerMessage/BannerMessage.tsx index 5a0b8d1d348..b5d94855a62 100644 --- a/packages/react-notifications/src/components/InAppMessaging/BannerMessage/BannerMessage.tsx +++ b/packages/react-notifications/src/components/InAppMessaging/BannerMessage/BannerMessage.tsx @@ -9,7 +9,9 @@ import { MessageLayout } from '../MessageLayout'; import { BLOCK_CLASS } from './constants'; import { BannerMessageProps } from './types'; -export function BannerMessage(props: BannerMessageProps): JSX.Element | null { +export function BannerMessage( + props: BannerMessageProps +): React.JSX.Element | null { const messageProps = useMessageProps(props); const shouldBeFullWidth = useBreakpointValue([true, true, false]); const { shouldRenderMessage, styles } = messageProps; diff --git a/packages/react-notifications/src/components/InAppMessaging/CloseIconButton/CloseIconButton.tsx b/packages/react-notifications/src/components/InAppMessaging/CloseIconButton/CloseIconButton.tsx index 96da2266ed7..5eae1c5ac47 100644 --- a/packages/react-notifications/src/components/InAppMessaging/CloseIconButton/CloseIconButton.tsx +++ b/packages/react-notifications/src/components/InAppMessaging/CloseIconButton/CloseIconButton.tsx @@ -11,7 +11,7 @@ export function CloseIconButton({ onClick, style, ...rest -}: CloseIconButtonProps): JSX.Element { +}: CloseIconButtonProps): React.JSX.Element { return (