@aws-amplify/ui-react-native 1.2.22 → 1.2.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/lib/Authenticator/Authenticator.js +72 -0
- package/lib/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.js +43 -0
- package/lib/Authenticator/Defaults/ConfirmResetPassword/index.js +8 -0
- package/lib/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.js +42 -0
- package/lib/Authenticator/Defaults/ConfirmSignIn/index.js +8 -0
- package/lib/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.js +43 -0
- package/lib/Authenticator/Defaults/ConfirmSignUp/index.js +8 -0
- package/lib/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.js +42 -0
- package/lib/Authenticator/Defaults/ConfirmVerifyUser/index.js +8 -0
- package/lib/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.js +45 -0
- package/lib/Authenticator/Defaults/ForceNewPassword/index.js +8 -0
- package/lib/Authenticator/Defaults/ResetPassword/ResetPassword.js +42 -0
- package/lib/Authenticator/Defaults/ResetPassword/index.js +8 -0
- package/lib/Authenticator/Defaults/SetupTOTP/SetupTOTP.js +52 -0
- package/lib/Authenticator/Defaults/SetupTOTP/index.js +8 -0
- package/lib/Authenticator/Defaults/SetupTOTP/styles.js +8 -0
- package/lib/Authenticator/Defaults/SignIn/SignIn.js +50 -0
- package/lib/Authenticator/Defaults/SignIn/index.js +8 -0
- package/lib/Authenticator/Defaults/SignUp/SignUp.js +48 -0
- package/lib/Authenticator/Defaults/SignUp/index.js +8 -0
- package/lib/Authenticator/Defaults/VerifyUser/VerifyUser.js +33 -0
- package/lib/Authenticator/Defaults/VerifyUser/index.js +8 -0
- package/lib/Authenticator/Defaults/index.js +23 -0
- package/lib/Authenticator/Defaults/types.js +2 -0
- package/lib/Authenticator/common/DefaultContainer/DefaultContainer.js +37 -0
- package/lib/Authenticator/common/DefaultContainer/InnerContainer.js +15 -0
- package/lib/Authenticator/common/DefaultContainer/index.js +10 -0
- package/lib/Authenticator/common/DefaultContainer/styles.js +31 -0
- package/lib/Authenticator/common/DefaultContainer/types.js +2 -0
- package/lib/Authenticator/common/DefaultContent/DefaultContent.js +33 -0
- package/lib/Authenticator/common/DefaultContent/index.js +8 -0
- package/lib/Authenticator/common/DefaultContent/styles.js +54 -0
- package/lib/Authenticator/common/DefaultContent/types.js +2 -0
- package/lib/Authenticator/common/DefaultFooter/DefaultFooter.js +9 -0
- package/lib/Authenticator/common/DefaultFooter/index.js +8 -0
- package/lib/Authenticator/common/DefaultFooter/types.js +2 -0
- package/lib/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.js +28 -0
- package/lib/Authenticator/common/DefaultFormFields/DefaultTextFormFields.js +21 -0
- package/lib/Authenticator/common/DefaultFormFields/Field.js +37 -0
- package/lib/Authenticator/common/DefaultFormFields/FieldErrors.js +17 -0
- package/lib/Authenticator/common/DefaultFormFields/index.js +10 -0
- package/lib/Authenticator/common/DefaultFormFields/types.js +2 -0
- package/lib/Authenticator/common/DefaultHeader/DefaultHeader.js +11 -0
- package/lib/Authenticator/common/DefaultHeader/index.js +8 -0
- package/lib/Authenticator/common/DefaultHeader/types.js +2 -0
- package/lib/Authenticator/common/FederatedProviderButton/FederatedProviderButton.js +18 -0
- package/lib/Authenticator/common/FederatedProviderButton/index.js +8 -0
- package/lib/Authenticator/common/FederatedProviderButton/styles.js +21 -0
- package/lib/Authenticator/common/FederatedProviderButton/types.js +2 -0
- package/lib/Authenticator/common/FederatedProviderButtons/FederatedProviderButtons.js +26 -0
- package/lib/Authenticator/common/FederatedProviderButtons/index.js +8 -0
- package/lib/Authenticator/common/FederatedProviderButtons/styles.js +8 -0
- package/lib/Authenticator/common/FederatedProviderButtons/types.js +2 -0
- package/lib/Authenticator/common/index.js +10 -0
- package/lib/Authenticator/hooks/index.js +5 -0
- package/lib/Authenticator/hooks/types.js +2 -0
- package/lib/Authenticator/hooks/useFieldValues/constants.js +11 -0
- package/lib/Authenticator/hooks/useFieldValues/index.js +10 -0
- package/lib/Authenticator/hooks/useFieldValues/types.js +2 -0
- package/lib/Authenticator/hooks/useFieldValues/useFieldValues.js +101 -0
- package/lib/Authenticator/hooks/useFieldValues/utils.js +139 -0
- package/lib/Authenticator/index.js +13 -0
- package/lib/Authenticator/types.js +2 -0
- package/lib/Authenticator/withAuthenticator.js +15 -0
- package/lib/InAppMessaging/components/BannerMessage/BannerMessage.js +20 -0
- package/lib/InAppMessaging/components/BannerMessage/index.js +8 -0
- package/lib/InAppMessaging/components/BannerMessage/styles.js +81 -0
- package/lib/InAppMessaging/components/BannerMessage/types.js +2 -0
- package/lib/InAppMessaging/components/CarouselMessage/CarouselMessage.js +25 -0
- package/lib/InAppMessaging/components/CarouselMessage/CarouselMessageItem.js +22 -0
- package/lib/InAppMessaging/components/CarouselMessage/index.js +8 -0
- package/lib/InAppMessaging/components/CarouselMessage/styles.js +103 -0
- package/lib/InAppMessaging/components/CarouselMessage/types.js +2 -0
- package/lib/InAppMessaging/components/FullScreenMessage/FullScreenMessage.js +22 -0
- package/lib/InAppMessaging/components/FullScreenMessage/index.js +8 -0
- package/lib/InAppMessaging/components/FullScreenMessage/styles.js +91 -0
- package/lib/InAppMessaging/components/FullScreenMessage/types.js +2 -0
- package/lib/InAppMessaging/components/InAppMessageDisplay/InAppMessageDisplay.js +32 -0
- package/lib/InAppMessaging/components/InAppMessageDisplay/handleMessageLinkAction.js +26 -0
- package/lib/InAppMessaging/components/InAppMessageDisplay/index.js +8 -0
- package/lib/InAppMessaging/components/InAppMessageDisplay/types.js +2 -0
- package/lib/InAppMessaging/components/MessageLayout/MessageLayout.js +38 -0
- package/lib/InAppMessaging/components/MessageLayout/index.js +8 -0
- package/lib/InAppMessaging/components/MessageLayout/types.js +2 -0
- package/lib/InAppMessaging/components/MessageWrapper/MessageWrapper.js +24 -0
- package/lib/InAppMessaging/components/MessageWrapper/index.js +8 -0
- package/lib/InAppMessaging/components/MessageWrapper/styles.js +8 -0
- package/lib/InAppMessaging/components/MessageWrapper/types.js +2 -0
- package/lib/InAppMessaging/components/ModalMessage/ModalMessage.js +22 -0
- package/lib/InAppMessaging/components/ModalMessage/index.js +8 -0
- package/lib/InAppMessaging/components/ModalMessage/styles.js +104 -0
- package/lib/InAppMessaging/components/ModalMessage/types.js +2 -0
- package/lib/InAppMessaging/components/index.js +7 -0
- package/lib/InAppMessaging/components/withInAppMessaging/index.js +8 -0
- package/lib/InAppMessaging/components/withInAppMessaging/withInAppMessaging.js +15 -0
- package/lib/InAppMessaging/constants.js +48 -0
- package/lib/InAppMessaging/hooks/index.js +7 -0
- package/lib/InAppMessaging/hooks/useMessageImage/constants.js +21 -0
- package/lib/InAppMessaging/hooks/useMessageImage/index.js +8 -0
- package/lib/InAppMessaging/hooks/useMessageImage/types.js +9 -0
- package/lib/InAppMessaging/hooks/useMessageImage/useMessageImage.js +53 -0
- package/lib/InAppMessaging/hooks/useMessageImage/utils.js +61 -0
- package/lib/InAppMessaging/hooks/useMessageProps/index.js +8 -0
- package/lib/InAppMessaging/hooks/useMessageProps/types.js +2 -0
- package/lib/InAppMessaging/hooks/useMessageProps/useMessageProps.js +52 -0
- package/lib/InAppMessaging/hooks/useMessageProps/utils.js +201 -0
- package/lib/InAppMessaging/index.js +9 -0
- package/lib/assets/icons/amazonLogo.png +0 -0
- package/lib/assets/icons/amazonLogo@2x.png +0 -0
- package/lib/assets/icons/amazonLogo@3x.png +0 -0
- package/lib/assets/icons/appleLogo.png +0 -0
- package/lib/assets/icons/appleLogo@2x.png +0 -0
- package/lib/assets/icons/appleLogo@3x.png +0 -0
- package/lib/assets/icons/checkboxFilled.png +0 -0
- package/lib/assets/icons/checkboxFilled@2x.png +0 -0
- package/lib/assets/icons/checkboxFilled@3x.png +0 -0
- package/lib/assets/icons/checkboxOutline.png +0 -0
- package/lib/assets/icons/checkboxOutline@2x.png +0 -0
- package/lib/assets/icons/checkboxOutline@3x.png +0 -0
- package/lib/assets/icons/close.png +0 -0
- package/lib/assets/icons/close@2x.png +0 -0
- package/lib/assets/icons/close@3x.png +0 -0
- package/lib/assets/icons/copy.png +0 -0
- package/lib/assets/icons/copy@2x.png +0 -0
- package/lib/assets/icons/copy@3x.png +0 -0
- package/lib/assets/icons/error.png +0 -0
- package/lib/assets/icons/error@2x.png +0 -0
- package/lib/assets/icons/error@3x.png +0 -0
- package/lib/assets/icons/facebookLogo.png +0 -0
- package/lib/assets/icons/facebookLogo@2x.png +0 -0
- package/lib/assets/icons/facebookLogo@3x.png +0 -0
- package/lib/assets/icons/googleLogo.png +0 -0
- package/lib/assets/icons/googleLogo@2x.png +0 -0
- package/lib/assets/icons/googleLogo@3x.png +0 -0
- package/lib/assets/icons/index.js +16 -0
- package/lib/assets/icons/index.ts +17 -0
- package/lib/assets/icons/visibilityOff.png +0 -0
- package/lib/assets/icons/visibilityOff@2x.png +0 -0
- package/lib/assets/icons/visibilityOff@3x.png +0 -0
- package/lib/assets/icons/visibilityOn.png +0 -0
- package/lib/assets/icons/visibilityOn@2x.png +0 -0
- package/lib/assets/icons/visibilityOn@3x.png +0 -0
- package/lib/assets/index.js +8 -0
- package/lib/hooks/index.js +9 -0
- package/lib/hooks/useDeprecationWarning/index.js +8 -0
- package/lib/hooks/useDeprecationWarning/useDeprecationWarning.js +13 -0
- package/lib/hooks/useDeviceOrientation/index.js +8 -0
- package/lib/hooks/useDeviceOrientation/useDeviceOrientation.js +37 -0
- package/lib/hooks/usePressableContainerStyles/index.js +5 -0
- package/lib/hooks/usePressableContainerStyles/usePressableContainerStyles.js +19 -0
- package/lib/index.js +14 -0
- package/lib/primitives/Button/Button.js +31 -0
- package/lib/primitives/Button/index.js +8 -0
- package/lib/primitives/Button/styles.js +55 -0
- package/lib/primitives/Button/types.js +2 -0
- package/lib/primitives/Carousel/Carousel.js +63 -0
- package/lib/primitives/Carousel/CarouselPageIndicator.js +14 -0
- package/lib/primitives/Carousel/constants.js +21 -0
- package/lib/primitives/Carousel/index.js +10 -0
- package/lib/primitives/Carousel/styles.js +14 -0
- package/lib/primitives/Carousel/types.js +2 -0
- package/lib/primitives/Checkbox/Checkbox.js +28 -0
- package/lib/primitives/Checkbox/index.js +8 -0
- package/lib/primitives/Checkbox/styles.js +28 -0
- package/lib/primitives/Checkbox/types.js +2 -0
- package/lib/primitives/Divider/Divider.js +22 -0
- package/lib/primitives/Divider/index.js +8 -0
- package/lib/primitives/Divider/styles.js +28 -0
- package/lib/primitives/Divider/types.js +2 -0
- package/lib/primitives/ErrorMessage/ErrorMessage.js +22 -0
- package/lib/primitives/ErrorMessage/index.js +8 -0
- package/lib/primitives/ErrorMessage/styles.js +30 -0
- package/lib/primitives/ErrorMessage/types.js +2 -0
- package/lib/primitives/Heading/Heading.js +15 -0
- package/lib/primitives/Heading/index.js +8 -0
- package/lib/primitives/Heading/styles.js +51 -0
- package/lib/primitives/Heading/types.js +2 -0
- package/lib/primitives/Icon/Icon.js +21 -0
- package/lib/primitives/Icon/constants.js +10 -0
- package/lib/primitives/Icon/index.js +10 -0
- package/lib/primitives/Icon/styles.js +34 -0
- package/lib/primitives/Icon/types.js +2 -0
- package/lib/primitives/IconButton/IconButton.js +26 -0
- package/lib/primitives/IconButton/index.js +8 -0
- package/lib/primitives/IconButton/styles.js +21 -0
- package/lib/primitives/IconButton/types.js +2 -0
- package/lib/primitives/Label/Label.js +16 -0
- package/lib/primitives/Label/index.js +8 -0
- package/lib/primitives/Label/styles.js +45 -0
- package/lib/primitives/Label/types.js +2 -0
- package/lib/primitives/Label/utils.js +25 -0
- package/lib/primitives/PasswordField/PasswordField.js +24 -0
- package/lib/primitives/PasswordField/index.js +8 -0
- package/lib/primitives/PasswordField/styles.js +17 -0
- package/lib/primitives/PasswordField/types.js +2 -0
- package/lib/primitives/PhoneNumberField/PhoneNumberField.js +13 -0
- package/lib/primitives/PhoneNumberField/index.js +8 -0
- package/lib/primitives/PhoneNumberField/styles.js +22 -0
- package/lib/primitives/PhoneNumberField/types.js +2 -0
- package/lib/primitives/Radio/Radio.js +46 -0
- package/lib/primitives/Radio/getRadioDimensions.js +43 -0
- package/lib/primitives/Radio/index.js +8 -0
- package/lib/primitives/Radio/styles.js +68 -0
- package/lib/primitives/Radio/types.js +2 -0
- package/lib/primitives/RadioGroup/RadioGroup.js +55 -0
- package/lib/primitives/RadioGroup/index.js +8 -0
- package/lib/primitives/RadioGroup/styles.js +20 -0
- package/lib/primitives/RadioGroup/types.js +2 -0
- package/lib/primitives/Tabs/Tab.js +27 -0
- package/lib/primitives/Tabs/Tabs.js +29 -0
- package/lib/primitives/Tabs/index.js +10 -0
- package/lib/primitives/Tabs/styles.js +58 -0
- package/lib/primitives/Tabs/types.js +2 -0
- package/lib/primitives/TextField/TextField.js +31 -0
- package/lib/primitives/TextField/index.js +8 -0
- package/lib/primitives/TextField/styles.js +46 -0
- package/lib/primitives/TextField/types.js +2 -0
- package/lib/primitives/index.js +18 -0
- package/lib/theme/ThemeContext.js +9 -0
- package/lib/theme/ThemeProvider.js +12 -0
- package/lib/theme/createTheme.js +113 -0
- package/lib/theme/defaultTheme.js +11 -0
- package/lib/theme/index.js +12 -0
- package/lib/theme/types.js +2 -0
- package/lib/theme/useTheme.js +11 -0
- package/lib/utils/font.js +8 -0
- package/lib/utils/index.js +10 -0
- package/lib/utils/platform.js +21 -0
- package/lib/version.js +4 -0
- package/package.json +20 -11
- package/src/version.ts +1 -1
- package/.eslintrc.js +0 -12
- package/.lintstagedrc.js +0 -6
- package/.turbo/turbo-build.log +0 -3
- package/CHANGELOG.md +0 -332
- package/babel.config.js +0 -3
- package/dist/assets/index.ts +0 -1
- package/jest.config.js +0 -22
- package/jest.setup.js +0 -3
- package/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/ConfirmResetPassword.spec.tsx +0 -89
- package/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/__snapshots__/ConfirmResetPassword.spec.tsx.snap +0 -1090
- package/src/Authenticator/Defaults/ConfirmSignIn/__tests__/ConfirmSignIn.spec.tsx +0 -78
- package/src/Authenticator/Defaults/ConfirmSignIn/__tests__/__snapshots__/ConfirmSignIn.spec.tsx.snap +0 -512
- package/src/Authenticator/Defaults/ConfirmSignUp/__tests__/ConfirmSignUp.spec.tsx +0 -64
- package/src/Authenticator/Defaults/ConfirmSignUp/__tests__/__snapshots__/ConfirmSignUp.spec.tsx.snap +0 -528
- package/src/Authenticator/Defaults/ConfirmVerifyUser/__tests__/ConfirmVerifyUser.spec.tsx +0 -71
- package/src/Authenticator/Defaults/ConfirmVerifyUser/__tests__/__snapshots__/ConfirmVerifyUser.spec.tsx.snap +0 -492
- package/src/Authenticator/Defaults/ForceNewPassword/__tests__/ForceNewPassword.spec.tsx +0 -79
- package/src/Authenticator/Defaults/ForceNewPassword/__tests__/__snapshots__/ForceNewPassword.spec.tsx.snap +0 -896
- package/src/Authenticator/Defaults/ResetPassword/__tests__/ResetPassword.spec.tsx +0 -78
- package/src/Authenticator/Defaults/ResetPassword/__tests__/__snapshots__/ResetPassword.spec.tsx.snap +0 -512
- package/src/Authenticator/Defaults/SetupTOTP/__tests__/SetupTOTP.spec.tsx +0 -85
- package/src/Authenticator/Defaults/SetupTOTP/__tests__/__snapshots__/SetupTOTP.spec.tsx.snap +0 -602
- package/src/Authenticator/Defaults/SignIn/__tests__/SignIn.spec.tsx +0 -67
- package/src/Authenticator/Defaults/SignIn/__tests__/__snapshots__/SignIn.spec.tsx.snap +0 -1281
- package/src/Authenticator/Defaults/SignUp/__tests__/SignUp.spec.tsx +0 -102
- package/src/Authenticator/Defaults/SignUp/__tests__/__snapshots__/SignUp.spec.tsx.snap +0 -3122
- package/src/Authenticator/Defaults/VerifyUser/__tests__/VerifyUser.spec.tsx +0 -107
- package/src/Authenticator/Defaults/VerifyUser/__tests__/__snapshots__/VerifyUser.spec.tsx.snap +0 -692
- package/src/Authenticator/__tests__/Authenticator.spec.tsx +0 -131
- package/src/Authenticator/__tests__/__snapshots__/Authenticator.spec.tsx.snap +0 -90
- package/src/Authenticator/__tests__/__snapshots__/withAuthenticator.spec.tsx.snap +0 -68
- package/src/Authenticator/__tests__/withAuthenticator.spec.tsx +0 -73
- package/src/Authenticator/common/DefaultContainer/__tests__/DefaultContainer.spec.tsx +0 -19
- package/src/Authenticator/common/DefaultContainer/__tests__/__snapshots__/DefaultContainer.spec.tsx.snap +0 -83
- package/src/Authenticator/common/DefaultFooter/__tests__/DefaultFooter.spec.tsx +0 -26
- package/src/Authenticator/common/DefaultFooter/__tests__/__snapshots__/DefaultFooter.spec.tsx.snap +0 -40
- package/src/Authenticator/common/DefaultFormFields/__tests__/DefaultFormFields.spec.tsx +0 -15
- package/src/Authenticator/common/DefaultFormFields/__tests__/FieldErrors.spec.tsx +0 -29
- package/src/Authenticator/common/DefaultFormFields/__tests__/__snapshots__/DefaultFormFields.spec.tsx.snap +0 -3
- package/src/Authenticator/common/DefaultFormFields/__tests__/__snapshots__/FieldErrors.spec.tsx.snap +0 -32
- package/src/Authenticator/common/DefaultHeader/__tests__/DefaultHeader.spec.tsx +0 -23
- package/src/Authenticator/common/DefaultHeader/__tests__/__snapshots__/DefaultHeader.spec.tsx.snap +0 -24
- package/src/Authenticator/common/FederatedProviderButton/__tests__/FederatedProviderButton.spec.tsx +0 -67
- package/src/Authenticator/common/FederatedProviderButton/__tests__/__snapshots__/FederatedProviderButton.spec.tsx.snap +0 -185
- package/src/Authenticator/common/FederatedProviderButtons/__tests__/FederatedProviderButtons.spec.tsx +0 -55
- package/src/Authenticator/common/FederatedProviderButtons/__tests__/__snapshots__/FederatedProviderButtons.spec.tsx.snap +0 -167
- package/src/Authenticator/hooks/useFieldValues/__tests__/useFieldValues.spec.ts +0 -399
- package/src/Authenticator/hooks/useFieldValues/__tests__/utils.spec.ts +0 -282
- package/src/InAppMessaging/components/BannerMessage/__tests__/BannerMessage.spec.tsx +0 -151
- package/src/InAppMessaging/components/BannerMessage/__tests__/__snapshots__/BannerMessage.spec.tsx.snap +0 -618
- package/src/InAppMessaging/components/CarouselMessage/__tests__/CarouselMessage.spec.tsx +0 -92
- package/src/InAppMessaging/components/CarouselMessage/__tests__/CarouselMessageItem.spec.tsx +0 -50
- package/src/InAppMessaging/components/CarouselMessage/__tests__/__snapshots__/CarouselMessage.spec.tsx.snap +0 -124
- package/src/InAppMessaging/components/CarouselMessage/__tests__/__snapshots__/CarouselMessageItem.spec.tsx.snap +0 -248
- package/src/InAppMessaging/components/FullScreenMessage/__tests__/FullScreenMessage.spec.tsx +0 -53
- package/src/InAppMessaging/components/FullScreenMessage/__tests__/__snapshots__/FullScreenMessage.spec.tsx.snap +0 -238
- package/src/InAppMessaging/components/InAppMessageDisplay/__tests__/InAppMessageDisplay.spec.tsx +0 -34
- package/src/InAppMessaging/components/InAppMessageDisplay/__tests__/__snapshots__/InAppMessageDisplay.spec.tsx.snap +0 -9
- package/src/InAppMessaging/components/InAppMessageDisplay/__tests__/handleMessageLinkAction.spec.ts +0 -51
- package/src/InAppMessaging/components/MessageWrapper/__tests__/MessageWrapper.spec.tsx +0 -19
- package/src/InAppMessaging/components/MessageWrapper/__tests__/__snapshots__/MessageWrapper.spec.tsx.snap +0 -35
- package/src/InAppMessaging/components/ModalMessage/__tests__/ModalMessage.spec.tsx +0 -169
- package/src/InAppMessaging/components/ModalMessage/__tests__/__snapshots__/ModalMessage.spec.tsx.snap +0 -727
- package/src/InAppMessaging/components/withInAppMessaging/__tests__/__snapshots__/withInAppMessaging.spec.tsx.snap +0 -3
- package/src/InAppMessaging/components/withInAppMessaging/__tests__/withInAppMessaging.spec.tsx +0 -15
- package/src/InAppMessaging/hooks/useMessageImage/__tests__/useMessageImage.spec.ts +0 -141
- package/src/InAppMessaging/hooks/useMessageImage/__tests__/utils.spec.ts +0 -107
- package/src/InAppMessaging/hooks/useMessageProps/__tests__/__snapshots__/utils.spec.ts.snap +0 -223
- package/src/InAppMessaging/hooks/useMessageProps/__tests__/useMessageProps.spec.ts +0 -162
- package/src/InAppMessaging/hooks/useMessageProps/__tests__/utils.spec.ts +0 -355
- package/src/__mocks__/@react-native-async-storage/async-storage.ts +0 -2
- package/src/__mocks__/@react-native-community/netinfo.ts +0 -3
- package/src/__mocks__/react-native-safe-area-context.ts +0 -9
- package/src/__tests__/__snapshots__/index.spec.ts.snap +0 -26
- package/src/__tests__/index.spec.ts +0 -8
- package/src/hooks/useDeprecationWarning/__tests__/useDeprecationWarning.spec.ts +0 -42
- package/src/hooks/useDeviceOrientation/__tests__/useDeviceOrientation.spec.ts +0 -89
- package/src/hooks/usePressableContainerStyles/__tests__/usePressableContainerStyles.spec.ts +0 -68
- package/src/primitives/Button/__tests__/Button.spec.tsx +0 -92
- package/src/primitives/Button/__tests__/__snapshots__/Button.spec.tsx.snap +0 -143
- package/src/primitives/Carousel/__tests__/Carousel.spec.tsx +0 -174
- package/src/primitives/Carousel/__tests__/CarouselPageIndicator.spec.tsx +0 -73
- package/src/primitives/Carousel/__tests__/__snapshots__/Carousel.spec.tsx.snap +0 -310
- package/src/primitives/Carousel/__tests__/__snapshots__/CarouselPageIndicator.spec.tsx.snap +0 -191
- package/src/primitives/Checkbox/__tests__/Checkbox.spec.tsx +0 -150
- package/src/primitives/Checkbox/__tests__/__snapshots__/Checkbox.spec.tsx.snap +0 -527
- package/src/primitives/Divider/__tests__/Divider.spec.tsx +0 -50
- package/src/primitives/Divider/__tests__/__snapshots__/Divider.spec.tsx.snap +0 -165
- package/src/primitives/ErrorMessage/__tests__/ErrorMessage.spec.tsx +0 -60
- package/src/primitives/ErrorMessage/__tests__/__snapshots__/ErrorMessage.spec.tsx.snap +0 -123
- package/src/primitives/Heading/__tests__/Heading.spec.tsx +0 -73
- package/src/primitives/Heading/__tests__/__snapshots__/Heading.spec.tsx.snap +0 -171
- package/src/primitives/Icon/__tests__/Icon.spec.tsx +0 -100
- package/src/primitives/Icon/__tests__/__snapshots__/Icon.spec.tsx.snap +0 -139
- package/src/primitives/IconButton/__tests__/IconButton.spec.tsx +0 -71
- package/src/primitives/IconButton/__tests__/__snapshots__/IconButton.spec.tsx.snap +0 -192
- package/src/primitives/Label/__tests__/Label.spec.tsx +0 -75
- package/src/primitives/Label/__tests__/__snapshots__/Label.spec.tsx.snap +0 -91
- package/src/primitives/PasswordField/__tests__/PasswordField.spec.tsx +0 -110
- package/src/primitives/PasswordField/__tests__/__snapshots__/PasswordField.spec.tsx.snap +0 -625
- package/src/primitives/PhoneNumberField/__tests__/PhoneNumberField.spec.tsx +0 -53
- package/src/primitives/PhoneNumberField/__tests__/__snapshots__/PhoneNumberField.spec.tsx.snap +0 -188
- package/src/primitives/Radio/__tests__/Radio.spec.tsx +0 -166
- package/src/primitives/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +0 -678
- package/src/primitives/RadioGroup/__tests__/RadioGroup.spec.tsx +0 -183
- package/src/primitives/RadioGroup/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +0 -1789
- package/src/primitives/Tabs/__tests__/Tab.spec.tsx +0 -75
- package/src/primitives/Tabs/__tests__/Tabs.spec.tsx +0 -81
- package/src/primitives/Tabs/__tests__/__snapshots__/Tab.spec.tsx.snap +0 -278
- package/src/primitives/Tabs/__tests__/__snapshots__/Tabs.spec.tsx.snap +0 -163
- package/src/primitives/TextField/__tests__/TextField.spec.tsx +0 -202
- package/src/primitives/TextField/__tests__/__snapshots__/TextField.spec.tsx.snap +0 -507
- package/src/theme/__tests__/ThemeProvider.spec.tsx +0 -23
- package/src/theme/__tests__/__snapshots__/useTheme.spec.tsx.snap +0 -226
- package/src/theme/__tests__/createTheme.spec.ts +0 -244
- package/src/theme/__tests__/useTheme.spec.tsx +0 -51
- package/tsconfig.dist.json +0 -4
- package/tsconfig.json +0 -9
|
@@ -1,527 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`Checkbox applies label position prop 1`] = `
|
|
4
|
-
<View
|
|
5
|
-
accessibilityRole="checkbox"
|
|
6
|
-
accessible={true}
|
|
7
|
-
collapsable={false}
|
|
8
|
-
focusable={true}
|
|
9
|
-
onBlur={[Function]}
|
|
10
|
-
onClick={[Function]}
|
|
11
|
-
onFocus={[Function]}
|
|
12
|
-
onResponderGrant={[Function]}
|
|
13
|
-
onResponderMove={[Function]}
|
|
14
|
-
onResponderRelease={[Function]}
|
|
15
|
-
onResponderTerminate={[Function]}
|
|
16
|
-
onResponderTerminationRequest={[Function]}
|
|
17
|
-
onStartShouldSetResponder={[Function]}
|
|
18
|
-
style={
|
|
19
|
-
Array [
|
|
20
|
-
Object {
|
|
21
|
-
"alignItems": "center",
|
|
22
|
-
"flexDirection": "column",
|
|
23
|
-
"padding": 8,
|
|
24
|
-
},
|
|
25
|
-
undefined,
|
|
26
|
-
]
|
|
27
|
-
}
|
|
28
|
-
testID="checkboxTestID"
|
|
29
|
-
>
|
|
30
|
-
<Image
|
|
31
|
-
accessibilityRole="image"
|
|
32
|
-
source={
|
|
33
|
-
Object {
|
|
34
|
-
"testUri": "../../../src/assets/icons/checkboxOutline.png",
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
style={
|
|
38
|
-
Array [
|
|
39
|
-
Object {
|
|
40
|
-
"height": 24,
|
|
41
|
-
"resizeMode": "contain",
|
|
42
|
-
"tintColor": undefined,
|
|
43
|
-
"width": 24,
|
|
44
|
-
},
|
|
45
|
-
undefined,
|
|
46
|
-
]
|
|
47
|
-
}
|
|
48
|
-
/>
|
|
49
|
-
<Text
|
|
50
|
-
accessibilityRole="text"
|
|
51
|
-
style={
|
|
52
|
-
Array [
|
|
53
|
-
Object {
|
|
54
|
-
"fontSize": 16,
|
|
55
|
-
"fontWeight": "400",
|
|
56
|
-
"lineHeight": 24,
|
|
57
|
-
},
|
|
58
|
-
Object {
|
|
59
|
-
"color": "hsl(210, 50%, 10%)",
|
|
60
|
-
},
|
|
61
|
-
undefined,
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
>
|
|
65
|
-
test
|
|
66
|
-
</Text>
|
|
67
|
-
</View>
|
|
68
|
-
`;
|
|
69
|
-
|
|
70
|
-
exports[`Checkbox applies theme and style props 1`] = `
|
|
71
|
-
<View
|
|
72
|
-
accessibilityRole="checkbox"
|
|
73
|
-
accessible={true}
|
|
74
|
-
collapsable={false}
|
|
75
|
-
focusable={true}
|
|
76
|
-
onBlur={[Function]}
|
|
77
|
-
onClick={[Function]}
|
|
78
|
-
onFocus={[Function]}
|
|
79
|
-
onResponderGrant={[Function]}
|
|
80
|
-
onResponderMove={[Function]}
|
|
81
|
-
onResponderRelease={[Function]}
|
|
82
|
-
onResponderTerminate={[Function]}
|
|
83
|
-
onResponderTerminationRequest={[Function]}
|
|
84
|
-
onStartShouldSetResponder={[Function]}
|
|
85
|
-
style={
|
|
86
|
-
Array [
|
|
87
|
-
Object {
|
|
88
|
-
"alignItems": "center",
|
|
89
|
-
"flexDirection": "row",
|
|
90
|
-
"padding": 8,
|
|
91
|
-
},
|
|
92
|
-
Object {
|
|
93
|
-
"padding": 10,
|
|
94
|
-
},
|
|
95
|
-
]
|
|
96
|
-
}
|
|
97
|
-
testID="checkboxTestID"
|
|
98
|
-
>
|
|
99
|
-
<Image
|
|
100
|
-
accessibilityRole="image"
|
|
101
|
-
source={
|
|
102
|
-
Object {
|
|
103
|
-
"testUri": "../../../src/assets/icons/checkboxOutline.png",
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
style={
|
|
107
|
-
Array [
|
|
108
|
-
Object {
|
|
109
|
-
"height": 24,
|
|
110
|
-
"resizeMode": "contain",
|
|
111
|
-
"tintColor": undefined,
|
|
112
|
-
"width": 24,
|
|
113
|
-
},
|
|
114
|
-
Object {},
|
|
115
|
-
]
|
|
116
|
-
}
|
|
117
|
-
/>
|
|
118
|
-
<Text
|
|
119
|
-
accessibilityRole="text"
|
|
120
|
-
style={
|
|
121
|
-
Array [
|
|
122
|
-
Object {
|
|
123
|
-
"fontSize": 16,
|
|
124
|
-
"fontWeight": "400",
|
|
125
|
-
"lineHeight": 24,
|
|
126
|
-
},
|
|
127
|
-
Object {
|
|
128
|
-
"color": "hsl(210, 50%, 10%)",
|
|
129
|
-
},
|
|
130
|
-
Object {},
|
|
131
|
-
]
|
|
132
|
-
}
|
|
133
|
-
>
|
|
134
|
-
test
|
|
135
|
-
</Text>
|
|
136
|
-
</View>
|
|
137
|
-
`;
|
|
138
|
-
|
|
139
|
-
exports[`Checkbox renders as expected when disabled 1`] = `
|
|
140
|
-
<View
|
|
141
|
-
accessibilityRole="checkbox"
|
|
142
|
-
accessibilityState={
|
|
143
|
-
Object {
|
|
144
|
-
"disabled": true,
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
accessible={true}
|
|
148
|
-
collapsable={false}
|
|
149
|
-
focusable={true}
|
|
150
|
-
onBlur={[Function]}
|
|
151
|
-
onClick={[Function]}
|
|
152
|
-
onFocus={[Function]}
|
|
153
|
-
onResponderGrant={[Function]}
|
|
154
|
-
onResponderMove={[Function]}
|
|
155
|
-
onResponderRelease={[Function]}
|
|
156
|
-
onResponderTerminate={[Function]}
|
|
157
|
-
onResponderTerminationRequest={[Function]}
|
|
158
|
-
onStartShouldSetResponder={[Function]}
|
|
159
|
-
style={
|
|
160
|
-
Array [
|
|
161
|
-
Object {
|
|
162
|
-
"alignItems": "center",
|
|
163
|
-
"flexDirection": "row",
|
|
164
|
-
"opacity": 0.6,
|
|
165
|
-
"padding": 8,
|
|
166
|
-
},
|
|
167
|
-
undefined,
|
|
168
|
-
]
|
|
169
|
-
}
|
|
170
|
-
testID="checkboxTestID"
|
|
171
|
-
>
|
|
172
|
-
<Image
|
|
173
|
-
accessibilityRole="image"
|
|
174
|
-
source={
|
|
175
|
-
Object {
|
|
176
|
-
"testUri": "../../../src/assets/icons/checkboxOutline.png",
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
style={
|
|
180
|
-
Array [
|
|
181
|
-
Object {
|
|
182
|
-
"height": 24,
|
|
183
|
-
"resizeMode": "contain",
|
|
184
|
-
"tintColor": undefined,
|
|
185
|
-
"width": 24,
|
|
186
|
-
},
|
|
187
|
-
undefined,
|
|
188
|
-
]
|
|
189
|
-
}
|
|
190
|
-
/>
|
|
191
|
-
<Text
|
|
192
|
-
accessibilityRole="text"
|
|
193
|
-
style={
|
|
194
|
-
Array [
|
|
195
|
-
Object {
|
|
196
|
-
"fontSize": 16,
|
|
197
|
-
"fontWeight": "400",
|
|
198
|
-
"lineHeight": 24,
|
|
199
|
-
},
|
|
200
|
-
Object {
|
|
201
|
-
"color": "hsl(210, 50%, 10%)",
|
|
202
|
-
},
|
|
203
|
-
undefined,
|
|
204
|
-
]
|
|
205
|
-
}
|
|
206
|
-
>
|
|
207
|
-
test
|
|
208
|
-
</Text>
|
|
209
|
-
</View>
|
|
210
|
-
`;
|
|
211
|
-
|
|
212
|
-
exports[`Checkbox renders as expected when passing a number to the size prop 1`] = `
|
|
213
|
-
<View
|
|
214
|
-
accessibilityRole="checkbox"
|
|
215
|
-
accessible={true}
|
|
216
|
-
collapsable={false}
|
|
217
|
-
focusable={true}
|
|
218
|
-
onBlur={[Function]}
|
|
219
|
-
onClick={[Function]}
|
|
220
|
-
onFocus={[Function]}
|
|
221
|
-
onResponderGrant={[Function]}
|
|
222
|
-
onResponderMove={[Function]}
|
|
223
|
-
onResponderRelease={[Function]}
|
|
224
|
-
onResponderTerminate={[Function]}
|
|
225
|
-
onResponderTerminationRequest={[Function]}
|
|
226
|
-
onStartShouldSetResponder={[Function]}
|
|
227
|
-
style={
|
|
228
|
-
Array [
|
|
229
|
-
Object {
|
|
230
|
-
"alignItems": "center",
|
|
231
|
-
"flexDirection": "row",
|
|
232
|
-
"padding": 8,
|
|
233
|
-
},
|
|
234
|
-
undefined,
|
|
235
|
-
]
|
|
236
|
-
}
|
|
237
|
-
testID="checkboxTestID"
|
|
238
|
-
>
|
|
239
|
-
<Image
|
|
240
|
-
accessibilityRole="image"
|
|
241
|
-
source={
|
|
242
|
-
Object {
|
|
243
|
-
"testUri": "../../../src/assets/icons/checkboxOutline.png",
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
style={
|
|
247
|
-
Array [
|
|
248
|
-
Object {
|
|
249
|
-
"height": 42,
|
|
250
|
-
"resizeMode": "contain",
|
|
251
|
-
"tintColor": undefined,
|
|
252
|
-
"width": 42,
|
|
253
|
-
},
|
|
254
|
-
undefined,
|
|
255
|
-
]
|
|
256
|
-
}
|
|
257
|
-
/>
|
|
258
|
-
<Text
|
|
259
|
-
accessibilityRole="text"
|
|
260
|
-
style={
|
|
261
|
-
Array [
|
|
262
|
-
Object {
|
|
263
|
-
"fontSize": 16,
|
|
264
|
-
"fontWeight": "400",
|
|
265
|
-
"lineHeight": 24,
|
|
266
|
-
},
|
|
267
|
-
Object {
|
|
268
|
-
"color": "hsl(210, 50%, 10%)",
|
|
269
|
-
},
|
|
270
|
-
undefined,
|
|
271
|
-
]
|
|
272
|
-
}
|
|
273
|
-
>
|
|
274
|
-
test
|
|
275
|
-
</Text>
|
|
276
|
-
</View>
|
|
277
|
-
`;
|
|
278
|
-
|
|
279
|
-
exports[`Checkbox renders as expected when selected is false 1`] = `
|
|
280
|
-
<View
|
|
281
|
-
accessibilityRole="checkbox"
|
|
282
|
-
accessible={true}
|
|
283
|
-
collapsable={false}
|
|
284
|
-
focusable={true}
|
|
285
|
-
onBlur={[Function]}
|
|
286
|
-
onClick={[Function]}
|
|
287
|
-
onFocus={[Function]}
|
|
288
|
-
onResponderGrant={[Function]}
|
|
289
|
-
onResponderMove={[Function]}
|
|
290
|
-
onResponderRelease={[Function]}
|
|
291
|
-
onResponderTerminate={[Function]}
|
|
292
|
-
onResponderTerminationRequest={[Function]}
|
|
293
|
-
onStartShouldSetResponder={[Function]}
|
|
294
|
-
style={
|
|
295
|
-
Array [
|
|
296
|
-
Object {
|
|
297
|
-
"alignItems": "center",
|
|
298
|
-
"flexDirection": "row",
|
|
299
|
-
"padding": 8,
|
|
300
|
-
},
|
|
301
|
-
undefined,
|
|
302
|
-
]
|
|
303
|
-
}
|
|
304
|
-
testID="checkboxTestID"
|
|
305
|
-
>
|
|
306
|
-
<Image
|
|
307
|
-
accessibilityRole="image"
|
|
308
|
-
source={
|
|
309
|
-
Object {
|
|
310
|
-
"testUri": "../../../src/assets/icons/checkboxOutline.png",
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
style={
|
|
314
|
-
Array [
|
|
315
|
-
Object {
|
|
316
|
-
"height": 24,
|
|
317
|
-
"resizeMode": "contain",
|
|
318
|
-
"tintColor": undefined,
|
|
319
|
-
"width": 24,
|
|
320
|
-
},
|
|
321
|
-
undefined,
|
|
322
|
-
]
|
|
323
|
-
}
|
|
324
|
-
/>
|
|
325
|
-
<Text
|
|
326
|
-
accessibilityRole="text"
|
|
327
|
-
style={
|
|
328
|
-
Array [
|
|
329
|
-
Object {
|
|
330
|
-
"fontSize": 16,
|
|
331
|
-
"fontWeight": "400",
|
|
332
|
-
"lineHeight": 24,
|
|
333
|
-
},
|
|
334
|
-
Object {
|
|
335
|
-
"color": "hsl(210, 50%, 10%)",
|
|
336
|
-
},
|
|
337
|
-
undefined,
|
|
338
|
-
]
|
|
339
|
-
}
|
|
340
|
-
>
|
|
341
|
-
test
|
|
342
|
-
</Text>
|
|
343
|
-
</View>
|
|
344
|
-
`;
|
|
345
|
-
|
|
346
|
-
exports[`Checkbox renders as expected when selected is true 1`] = `
|
|
347
|
-
<View
|
|
348
|
-
accessibilityRole="checkbox"
|
|
349
|
-
accessible={true}
|
|
350
|
-
collapsable={false}
|
|
351
|
-
focusable={true}
|
|
352
|
-
onBlur={[Function]}
|
|
353
|
-
onClick={[Function]}
|
|
354
|
-
onFocus={[Function]}
|
|
355
|
-
onResponderGrant={[Function]}
|
|
356
|
-
onResponderMove={[Function]}
|
|
357
|
-
onResponderRelease={[Function]}
|
|
358
|
-
onResponderTerminate={[Function]}
|
|
359
|
-
onResponderTerminationRequest={[Function]}
|
|
360
|
-
onStartShouldSetResponder={[Function]}
|
|
361
|
-
style={
|
|
362
|
-
Array [
|
|
363
|
-
Object {
|
|
364
|
-
"alignItems": "center",
|
|
365
|
-
"flexDirection": "row",
|
|
366
|
-
"padding": 8,
|
|
367
|
-
},
|
|
368
|
-
undefined,
|
|
369
|
-
]
|
|
370
|
-
}
|
|
371
|
-
testID="checkboxTestID"
|
|
372
|
-
>
|
|
373
|
-
<Image
|
|
374
|
-
accessibilityRole="image"
|
|
375
|
-
source={
|
|
376
|
-
Object {
|
|
377
|
-
"testUri": "../../../src/assets/icons/checkboxFilled.png",
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
style={
|
|
381
|
-
Array [
|
|
382
|
-
Object {
|
|
383
|
-
"height": 24,
|
|
384
|
-
"resizeMode": "contain",
|
|
385
|
-
"tintColor": undefined,
|
|
386
|
-
"width": 24,
|
|
387
|
-
},
|
|
388
|
-
undefined,
|
|
389
|
-
]
|
|
390
|
-
}
|
|
391
|
-
/>
|
|
392
|
-
<Text
|
|
393
|
-
accessibilityRole="text"
|
|
394
|
-
style={
|
|
395
|
-
Array [
|
|
396
|
-
Object {
|
|
397
|
-
"fontSize": 16,
|
|
398
|
-
"fontWeight": "400",
|
|
399
|
-
"lineHeight": 24,
|
|
400
|
-
},
|
|
401
|
-
Object {
|
|
402
|
-
"color": "hsl(210, 50%, 10%)",
|
|
403
|
-
},
|
|
404
|
-
undefined,
|
|
405
|
-
]
|
|
406
|
-
}
|
|
407
|
-
>
|
|
408
|
-
test
|
|
409
|
-
</Text>
|
|
410
|
-
</View>
|
|
411
|
-
`;
|
|
412
|
-
|
|
413
|
-
exports[`Checkbox renders as expected with custom accessibilityRole 1`] = `
|
|
414
|
-
<View
|
|
415
|
-
accessibilityRole="none"
|
|
416
|
-
accessible={true}
|
|
417
|
-
collapsable={false}
|
|
418
|
-
focusable={true}
|
|
419
|
-
onBlur={[Function]}
|
|
420
|
-
onClick={[Function]}
|
|
421
|
-
onFocus={[Function]}
|
|
422
|
-
onResponderGrant={[Function]}
|
|
423
|
-
onResponderMove={[Function]}
|
|
424
|
-
onResponderRelease={[Function]}
|
|
425
|
-
onResponderTerminate={[Function]}
|
|
426
|
-
onResponderTerminationRequest={[Function]}
|
|
427
|
-
onStartShouldSetResponder={[Function]}
|
|
428
|
-
style={
|
|
429
|
-
Array [
|
|
430
|
-
Object {
|
|
431
|
-
"alignItems": "center",
|
|
432
|
-
"flexDirection": "row",
|
|
433
|
-
"padding": 8,
|
|
434
|
-
},
|
|
435
|
-
undefined,
|
|
436
|
-
]
|
|
437
|
-
}
|
|
438
|
-
testID="checkboxTestID"
|
|
439
|
-
>
|
|
440
|
-
<Image
|
|
441
|
-
accessibilityRole="image"
|
|
442
|
-
source={
|
|
443
|
-
Object {
|
|
444
|
-
"testUri": "../../../src/assets/icons/checkboxOutline.png",
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
style={
|
|
448
|
-
Array [
|
|
449
|
-
Object {
|
|
450
|
-
"height": 24,
|
|
451
|
-
"resizeMode": "contain",
|
|
452
|
-
"tintColor": undefined,
|
|
453
|
-
"width": 24,
|
|
454
|
-
},
|
|
455
|
-
undefined,
|
|
456
|
-
]
|
|
457
|
-
}
|
|
458
|
-
/>
|
|
459
|
-
<Text
|
|
460
|
-
accessibilityRole="text"
|
|
461
|
-
style={
|
|
462
|
-
Array [
|
|
463
|
-
Object {
|
|
464
|
-
"fontSize": 16,
|
|
465
|
-
"fontWeight": "400",
|
|
466
|
-
"lineHeight": 24,
|
|
467
|
-
},
|
|
468
|
-
Object {
|
|
469
|
-
"color": "hsl(210, 50%, 10%)",
|
|
470
|
-
},
|
|
471
|
-
undefined,
|
|
472
|
-
]
|
|
473
|
-
}
|
|
474
|
-
>
|
|
475
|
-
test
|
|
476
|
-
</Text>
|
|
477
|
-
</View>
|
|
478
|
-
`;
|
|
479
|
-
|
|
480
|
-
exports[`Checkbox renders as expected without a label 1`] = `
|
|
481
|
-
<View
|
|
482
|
-
accessibilityRole="checkbox"
|
|
483
|
-
accessible={true}
|
|
484
|
-
collapsable={false}
|
|
485
|
-
focusable={true}
|
|
486
|
-
onBlur={[Function]}
|
|
487
|
-
onClick={[Function]}
|
|
488
|
-
onFocus={[Function]}
|
|
489
|
-
onResponderGrant={[Function]}
|
|
490
|
-
onResponderMove={[Function]}
|
|
491
|
-
onResponderRelease={[Function]}
|
|
492
|
-
onResponderTerminate={[Function]}
|
|
493
|
-
onResponderTerminationRequest={[Function]}
|
|
494
|
-
onStartShouldSetResponder={[Function]}
|
|
495
|
-
style={
|
|
496
|
-
Array [
|
|
497
|
-
Object {
|
|
498
|
-
"alignItems": "center",
|
|
499
|
-
"flexDirection": "row",
|
|
500
|
-
"padding": 8,
|
|
501
|
-
},
|
|
502
|
-
undefined,
|
|
503
|
-
]
|
|
504
|
-
}
|
|
505
|
-
testID="checkboxTestID"
|
|
506
|
-
>
|
|
507
|
-
<Image
|
|
508
|
-
accessibilityRole="image"
|
|
509
|
-
source={
|
|
510
|
-
Object {
|
|
511
|
-
"testUri": "../../../src/assets/icons/checkboxOutline.png",
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
style={
|
|
515
|
-
Array [
|
|
516
|
-
Object {
|
|
517
|
-
"height": 24,
|
|
518
|
-
"resizeMode": "contain",
|
|
519
|
-
"tintColor": undefined,
|
|
520
|
-
"width": 24,
|
|
521
|
-
},
|
|
522
|
-
undefined,
|
|
523
|
-
]
|
|
524
|
-
}
|
|
525
|
-
/>
|
|
526
|
-
</View>
|
|
527
|
-
`;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render, renderHook } from '@testing-library/react-native';
|
|
3
|
-
|
|
4
|
-
import { useTheme } from '../../../theme';
|
|
5
|
-
import Divider, { DIVIDER_LINE_TEST_ID } from '../Divider';
|
|
6
|
-
import { getThemedStyles } from '../styles';
|
|
7
|
-
import { getThemedStyles as getThemedLabelStyles } from '../../Label/styles';
|
|
8
|
-
|
|
9
|
-
const labelText = 'Divider label';
|
|
10
|
-
|
|
11
|
-
describe('Divider', () => {
|
|
12
|
-
it('renders as expected with label', () => {
|
|
13
|
-
const { toJSON, queryByText } = render(<Divider>{labelText}</Divider>);
|
|
14
|
-
expect(toJSON()).toMatchSnapshot();
|
|
15
|
-
|
|
16
|
-
expect(queryByText(labelText)).toBeDefined();
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it('renders as expected without label', () => {
|
|
20
|
-
const { toJSON } = render(<Divider />);
|
|
21
|
-
expect(toJSON()).toMatchSnapshot();
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it('applies theme and style props', () => {
|
|
25
|
-
const customLabelStyle = { color: 'red' };
|
|
26
|
-
const customLineStyle = { backgroundColor: 'blue' };
|
|
27
|
-
|
|
28
|
-
const { toJSON, getByText, getByTestId } = render(
|
|
29
|
-
<Divider labelStyle={customLabelStyle} lineStyle={customLineStyle}>
|
|
30
|
-
{labelText}
|
|
31
|
-
</Divider>
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
const { result } = renderHook(() => useTheme());
|
|
35
|
-
const themedStyle = getThemedStyles(result.current);
|
|
36
|
-
const themedLabelStyle = getThemedLabelStyles(result.current);
|
|
37
|
-
|
|
38
|
-
const label = getByText(labelText);
|
|
39
|
-
const line = getByTestId(DIVIDER_LINE_TEST_ID);
|
|
40
|
-
|
|
41
|
-
expect(label.props.style).toStrictEqual([
|
|
42
|
-
themedLabelStyle.text,
|
|
43
|
-
themedLabelStyle.primary,
|
|
44
|
-
[themedStyle.label, customLabelStyle],
|
|
45
|
-
]);
|
|
46
|
-
|
|
47
|
-
expect(line.props.style).toStrictEqual([themedStyle.line, customLineStyle]);
|
|
48
|
-
expect(toJSON()).toMatchSnapshot();
|
|
49
|
-
});
|
|
50
|
-
});
|