@aws-amplify/ui-react-native 1.2.22 → 1.2.23

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.
Files changed (351) hide show
  1. package/dist/version.d.ts +1 -1
  2. package/dist/version.js +1 -1
  3. package/lib/Authenticator/Authenticator.js +72 -0
  4. package/lib/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.js +43 -0
  5. package/lib/Authenticator/Defaults/ConfirmResetPassword/index.js +8 -0
  6. package/lib/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.js +42 -0
  7. package/lib/Authenticator/Defaults/ConfirmSignIn/index.js +8 -0
  8. package/lib/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.js +43 -0
  9. package/lib/Authenticator/Defaults/ConfirmSignUp/index.js +8 -0
  10. package/lib/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.js +42 -0
  11. package/lib/Authenticator/Defaults/ConfirmVerifyUser/index.js +8 -0
  12. package/lib/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.js +45 -0
  13. package/lib/Authenticator/Defaults/ForceNewPassword/index.js +8 -0
  14. package/lib/Authenticator/Defaults/ResetPassword/ResetPassword.js +42 -0
  15. package/lib/Authenticator/Defaults/ResetPassword/index.js +8 -0
  16. package/lib/Authenticator/Defaults/SetupTOTP/SetupTOTP.js +52 -0
  17. package/lib/Authenticator/Defaults/SetupTOTP/index.js +8 -0
  18. package/lib/Authenticator/Defaults/SetupTOTP/styles.js +8 -0
  19. package/lib/Authenticator/Defaults/SignIn/SignIn.js +50 -0
  20. package/lib/Authenticator/Defaults/SignIn/index.js +8 -0
  21. package/lib/Authenticator/Defaults/SignUp/SignUp.js +48 -0
  22. package/lib/Authenticator/Defaults/SignUp/index.js +8 -0
  23. package/lib/Authenticator/Defaults/VerifyUser/VerifyUser.js +33 -0
  24. package/lib/Authenticator/Defaults/VerifyUser/index.js +8 -0
  25. package/lib/Authenticator/Defaults/index.js +23 -0
  26. package/lib/Authenticator/Defaults/types.js +2 -0
  27. package/lib/Authenticator/common/DefaultContainer/DefaultContainer.js +37 -0
  28. package/lib/Authenticator/common/DefaultContainer/InnerContainer.js +15 -0
  29. package/lib/Authenticator/common/DefaultContainer/index.js +10 -0
  30. package/lib/Authenticator/common/DefaultContainer/styles.js +31 -0
  31. package/lib/Authenticator/common/DefaultContainer/types.js +2 -0
  32. package/lib/Authenticator/common/DefaultContent/DefaultContent.js +33 -0
  33. package/lib/Authenticator/common/DefaultContent/index.js +8 -0
  34. package/lib/Authenticator/common/DefaultContent/styles.js +54 -0
  35. package/lib/Authenticator/common/DefaultContent/types.js +2 -0
  36. package/lib/Authenticator/common/DefaultFooter/DefaultFooter.js +9 -0
  37. package/lib/Authenticator/common/DefaultFooter/index.js +8 -0
  38. package/lib/Authenticator/common/DefaultFooter/types.js +2 -0
  39. package/lib/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.js +28 -0
  40. package/lib/Authenticator/common/DefaultFormFields/DefaultTextFormFields.js +21 -0
  41. package/lib/Authenticator/common/DefaultFormFields/Field.js +37 -0
  42. package/lib/Authenticator/common/DefaultFormFields/FieldErrors.js +17 -0
  43. package/lib/Authenticator/common/DefaultFormFields/index.js +10 -0
  44. package/lib/Authenticator/common/DefaultFormFields/types.js +2 -0
  45. package/lib/Authenticator/common/DefaultHeader/DefaultHeader.js +11 -0
  46. package/lib/Authenticator/common/DefaultHeader/index.js +8 -0
  47. package/lib/Authenticator/common/DefaultHeader/types.js +2 -0
  48. package/lib/Authenticator/common/FederatedProviderButton/FederatedProviderButton.js +18 -0
  49. package/lib/Authenticator/common/FederatedProviderButton/index.js +8 -0
  50. package/lib/Authenticator/common/FederatedProviderButton/styles.js +21 -0
  51. package/lib/Authenticator/common/FederatedProviderButton/types.js +2 -0
  52. package/lib/Authenticator/common/FederatedProviderButtons/FederatedProviderButtons.js +26 -0
  53. package/lib/Authenticator/common/FederatedProviderButtons/index.js +8 -0
  54. package/lib/Authenticator/common/FederatedProviderButtons/styles.js +8 -0
  55. package/lib/Authenticator/common/FederatedProviderButtons/types.js +2 -0
  56. package/lib/Authenticator/common/index.js +10 -0
  57. package/lib/Authenticator/hooks/index.js +5 -0
  58. package/lib/Authenticator/hooks/types.js +2 -0
  59. package/lib/Authenticator/hooks/useFieldValues/constants.js +11 -0
  60. package/lib/Authenticator/hooks/useFieldValues/index.js +10 -0
  61. package/lib/Authenticator/hooks/useFieldValues/types.js +2 -0
  62. package/lib/Authenticator/hooks/useFieldValues/useFieldValues.js +101 -0
  63. package/lib/Authenticator/hooks/useFieldValues/utils.js +139 -0
  64. package/lib/Authenticator/index.js +13 -0
  65. package/lib/Authenticator/types.js +2 -0
  66. package/lib/Authenticator/withAuthenticator.js +15 -0
  67. package/lib/InAppMessaging/components/BannerMessage/BannerMessage.js +20 -0
  68. package/lib/InAppMessaging/components/BannerMessage/index.js +8 -0
  69. package/lib/InAppMessaging/components/BannerMessage/styles.js +81 -0
  70. package/lib/InAppMessaging/components/BannerMessage/types.js +2 -0
  71. package/lib/InAppMessaging/components/CarouselMessage/CarouselMessage.js +25 -0
  72. package/lib/InAppMessaging/components/CarouselMessage/CarouselMessageItem.js +22 -0
  73. package/lib/InAppMessaging/components/CarouselMessage/index.js +8 -0
  74. package/lib/InAppMessaging/components/CarouselMessage/styles.js +103 -0
  75. package/lib/InAppMessaging/components/CarouselMessage/types.js +2 -0
  76. package/lib/InAppMessaging/components/FullScreenMessage/FullScreenMessage.js +22 -0
  77. package/lib/InAppMessaging/components/FullScreenMessage/index.js +8 -0
  78. package/lib/InAppMessaging/components/FullScreenMessage/styles.js +91 -0
  79. package/lib/InAppMessaging/components/FullScreenMessage/types.js +2 -0
  80. package/lib/InAppMessaging/components/InAppMessageDisplay/InAppMessageDisplay.js +32 -0
  81. package/lib/InAppMessaging/components/InAppMessageDisplay/handleMessageLinkAction.js +26 -0
  82. package/lib/InAppMessaging/components/InAppMessageDisplay/index.js +8 -0
  83. package/lib/InAppMessaging/components/InAppMessageDisplay/types.js +2 -0
  84. package/lib/InAppMessaging/components/MessageLayout/MessageLayout.js +38 -0
  85. package/lib/InAppMessaging/components/MessageLayout/index.js +8 -0
  86. package/lib/InAppMessaging/components/MessageLayout/types.js +2 -0
  87. package/lib/InAppMessaging/components/MessageWrapper/MessageWrapper.js +24 -0
  88. package/lib/InAppMessaging/components/MessageWrapper/index.js +8 -0
  89. package/lib/InAppMessaging/components/MessageWrapper/styles.js +8 -0
  90. package/lib/InAppMessaging/components/MessageWrapper/types.js +2 -0
  91. package/lib/InAppMessaging/components/ModalMessage/ModalMessage.js +22 -0
  92. package/lib/InAppMessaging/components/ModalMessage/index.js +8 -0
  93. package/lib/InAppMessaging/components/ModalMessage/styles.js +104 -0
  94. package/lib/InAppMessaging/components/ModalMessage/types.js +2 -0
  95. package/lib/InAppMessaging/components/index.js +7 -0
  96. package/lib/InAppMessaging/components/withInAppMessaging/index.js +8 -0
  97. package/lib/InAppMessaging/components/withInAppMessaging/withInAppMessaging.js +15 -0
  98. package/lib/InAppMessaging/constants.js +48 -0
  99. package/lib/InAppMessaging/hooks/index.js +7 -0
  100. package/lib/InAppMessaging/hooks/useMessageImage/constants.js +21 -0
  101. package/lib/InAppMessaging/hooks/useMessageImage/index.js +8 -0
  102. package/lib/InAppMessaging/hooks/useMessageImage/types.js +9 -0
  103. package/lib/InAppMessaging/hooks/useMessageImage/useMessageImage.js +53 -0
  104. package/lib/InAppMessaging/hooks/useMessageImage/utils.js +61 -0
  105. package/lib/InAppMessaging/hooks/useMessageProps/index.js +8 -0
  106. package/lib/InAppMessaging/hooks/useMessageProps/types.js +2 -0
  107. package/lib/InAppMessaging/hooks/useMessageProps/useMessageProps.js +52 -0
  108. package/lib/InAppMessaging/hooks/useMessageProps/utils.js +201 -0
  109. package/lib/InAppMessaging/index.js +9 -0
  110. package/lib/assets/icons/amazonLogo.png +0 -0
  111. package/lib/assets/icons/amazonLogo@2x.png +0 -0
  112. package/lib/assets/icons/amazonLogo@3x.png +0 -0
  113. package/lib/assets/icons/appleLogo.png +0 -0
  114. package/lib/assets/icons/appleLogo@2x.png +0 -0
  115. package/lib/assets/icons/appleLogo@3x.png +0 -0
  116. package/lib/assets/icons/checkboxFilled.png +0 -0
  117. package/lib/assets/icons/checkboxFilled@2x.png +0 -0
  118. package/lib/assets/icons/checkboxFilled@3x.png +0 -0
  119. package/lib/assets/icons/checkboxOutline.png +0 -0
  120. package/lib/assets/icons/checkboxOutline@2x.png +0 -0
  121. package/lib/assets/icons/checkboxOutline@3x.png +0 -0
  122. package/lib/assets/icons/close.png +0 -0
  123. package/lib/assets/icons/close@2x.png +0 -0
  124. package/lib/assets/icons/close@3x.png +0 -0
  125. package/lib/assets/icons/copy.png +0 -0
  126. package/lib/assets/icons/copy@2x.png +0 -0
  127. package/lib/assets/icons/copy@3x.png +0 -0
  128. package/lib/assets/icons/error.png +0 -0
  129. package/lib/assets/icons/error@2x.png +0 -0
  130. package/lib/assets/icons/error@3x.png +0 -0
  131. package/lib/assets/icons/facebookLogo.png +0 -0
  132. package/lib/assets/icons/facebookLogo@2x.png +0 -0
  133. package/lib/assets/icons/facebookLogo@3x.png +0 -0
  134. package/lib/assets/icons/googleLogo.png +0 -0
  135. package/lib/assets/icons/googleLogo@2x.png +0 -0
  136. package/lib/assets/icons/googleLogo@3x.png +0 -0
  137. package/lib/assets/icons/index.js +16 -0
  138. package/lib/assets/icons/index.ts +17 -0
  139. package/lib/assets/icons/visibilityOff.png +0 -0
  140. package/lib/assets/icons/visibilityOff@2x.png +0 -0
  141. package/lib/assets/icons/visibilityOff@3x.png +0 -0
  142. package/lib/assets/icons/visibilityOn.png +0 -0
  143. package/lib/assets/icons/visibilityOn@2x.png +0 -0
  144. package/lib/assets/icons/visibilityOn@3x.png +0 -0
  145. package/lib/assets/index.js +8 -0
  146. package/lib/hooks/index.js +9 -0
  147. package/lib/hooks/useDeprecationWarning/index.js +8 -0
  148. package/lib/hooks/useDeprecationWarning/useDeprecationWarning.js +13 -0
  149. package/lib/hooks/useDeviceOrientation/index.js +8 -0
  150. package/lib/hooks/useDeviceOrientation/useDeviceOrientation.js +37 -0
  151. package/lib/hooks/usePressableContainerStyles/index.js +5 -0
  152. package/lib/hooks/usePressableContainerStyles/usePressableContainerStyles.js +19 -0
  153. package/lib/index.js +14 -0
  154. package/lib/primitives/Button/Button.js +31 -0
  155. package/lib/primitives/Button/index.js +8 -0
  156. package/lib/primitives/Button/styles.js +55 -0
  157. package/lib/primitives/Button/types.js +2 -0
  158. package/lib/primitives/Carousel/Carousel.js +63 -0
  159. package/lib/primitives/Carousel/CarouselPageIndicator.js +14 -0
  160. package/lib/primitives/Carousel/constants.js +21 -0
  161. package/lib/primitives/Carousel/index.js +10 -0
  162. package/lib/primitives/Carousel/styles.js +14 -0
  163. package/lib/primitives/Carousel/types.js +2 -0
  164. package/lib/primitives/Checkbox/Checkbox.js +28 -0
  165. package/lib/primitives/Checkbox/index.js +8 -0
  166. package/lib/primitives/Checkbox/styles.js +28 -0
  167. package/lib/primitives/Checkbox/types.js +2 -0
  168. package/lib/primitives/Divider/Divider.js +22 -0
  169. package/lib/primitives/Divider/index.js +8 -0
  170. package/lib/primitives/Divider/styles.js +28 -0
  171. package/lib/primitives/Divider/types.js +2 -0
  172. package/lib/primitives/ErrorMessage/ErrorMessage.js +22 -0
  173. package/lib/primitives/ErrorMessage/index.js +8 -0
  174. package/lib/primitives/ErrorMessage/styles.js +30 -0
  175. package/lib/primitives/ErrorMessage/types.js +2 -0
  176. package/lib/primitives/Heading/Heading.js +15 -0
  177. package/lib/primitives/Heading/index.js +8 -0
  178. package/lib/primitives/Heading/styles.js +51 -0
  179. package/lib/primitives/Heading/types.js +2 -0
  180. package/lib/primitives/Icon/Icon.js +21 -0
  181. package/lib/primitives/Icon/constants.js +10 -0
  182. package/lib/primitives/Icon/index.js +10 -0
  183. package/lib/primitives/Icon/styles.js +34 -0
  184. package/lib/primitives/Icon/types.js +2 -0
  185. package/lib/primitives/IconButton/IconButton.js +26 -0
  186. package/lib/primitives/IconButton/index.js +8 -0
  187. package/lib/primitives/IconButton/styles.js +21 -0
  188. package/lib/primitives/IconButton/types.js +2 -0
  189. package/lib/primitives/Label/Label.js +16 -0
  190. package/lib/primitives/Label/index.js +8 -0
  191. package/lib/primitives/Label/styles.js +45 -0
  192. package/lib/primitives/Label/types.js +2 -0
  193. package/lib/primitives/Label/utils.js +25 -0
  194. package/lib/primitives/PasswordField/PasswordField.js +24 -0
  195. package/lib/primitives/PasswordField/index.js +8 -0
  196. package/lib/primitives/PasswordField/styles.js +17 -0
  197. package/lib/primitives/PasswordField/types.js +2 -0
  198. package/lib/primitives/PhoneNumberField/PhoneNumberField.js +13 -0
  199. package/lib/primitives/PhoneNumberField/index.js +8 -0
  200. package/lib/primitives/PhoneNumberField/styles.js +22 -0
  201. package/lib/primitives/PhoneNumberField/types.js +2 -0
  202. package/lib/primitives/Radio/Radio.js +46 -0
  203. package/lib/primitives/Radio/getRadioDimensions.js +43 -0
  204. package/lib/primitives/Radio/index.js +8 -0
  205. package/lib/primitives/Radio/styles.js +68 -0
  206. package/lib/primitives/Radio/types.js +2 -0
  207. package/lib/primitives/RadioGroup/RadioGroup.js +55 -0
  208. package/lib/primitives/RadioGroup/index.js +8 -0
  209. package/lib/primitives/RadioGroup/styles.js +20 -0
  210. package/lib/primitives/RadioGroup/types.js +2 -0
  211. package/lib/primitives/Tabs/Tab.js +27 -0
  212. package/lib/primitives/Tabs/Tabs.js +29 -0
  213. package/lib/primitives/Tabs/index.js +10 -0
  214. package/lib/primitives/Tabs/styles.js +58 -0
  215. package/lib/primitives/Tabs/types.js +2 -0
  216. package/lib/primitives/TextField/TextField.js +31 -0
  217. package/lib/primitives/TextField/index.js +8 -0
  218. package/lib/primitives/TextField/styles.js +46 -0
  219. package/lib/primitives/TextField/types.js +2 -0
  220. package/lib/primitives/index.js +18 -0
  221. package/lib/theme/ThemeContext.js +9 -0
  222. package/lib/theme/ThemeProvider.js +12 -0
  223. package/lib/theme/createTheme.js +113 -0
  224. package/lib/theme/defaultTheme.js +11 -0
  225. package/lib/theme/index.js +12 -0
  226. package/lib/theme/types.js +2 -0
  227. package/lib/theme/useTheme.js +11 -0
  228. package/lib/utils/font.js +8 -0
  229. package/lib/utils/index.js +10 -0
  230. package/lib/utils/platform.js +21 -0
  231. package/lib/version.js +4 -0
  232. package/package.json +19 -10
  233. package/src/version.ts +1 -1
  234. package/.eslintrc.js +0 -12
  235. package/.lintstagedrc.js +0 -6
  236. package/.turbo/turbo-build.log +0 -3
  237. package/CHANGELOG.md +0 -332
  238. package/babel.config.js +0 -3
  239. package/dist/assets/index.ts +0 -1
  240. package/jest.config.js +0 -22
  241. package/jest.setup.js +0 -3
  242. package/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/ConfirmResetPassword.spec.tsx +0 -89
  243. package/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/__snapshots__/ConfirmResetPassword.spec.tsx.snap +0 -1090
  244. package/src/Authenticator/Defaults/ConfirmSignIn/__tests__/ConfirmSignIn.spec.tsx +0 -78
  245. package/src/Authenticator/Defaults/ConfirmSignIn/__tests__/__snapshots__/ConfirmSignIn.spec.tsx.snap +0 -512
  246. package/src/Authenticator/Defaults/ConfirmSignUp/__tests__/ConfirmSignUp.spec.tsx +0 -64
  247. package/src/Authenticator/Defaults/ConfirmSignUp/__tests__/__snapshots__/ConfirmSignUp.spec.tsx.snap +0 -528
  248. package/src/Authenticator/Defaults/ConfirmVerifyUser/__tests__/ConfirmVerifyUser.spec.tsx +0 -71
  249. package/src/Authenticator/Defaults/ConfirmVerifyUser/__tests__/__snapshots__/ConfirmVerifyUser.spec.tsx.snap +0 -492
  250. package/src/Authenticator/Defaults/ForceNewPassword/__tests__/ForceNewPassword.spec.tsx +0 -79
  251. package/src/Authenticator/Defaults/ForceNewPassword/__tests__/__snapshots__/ForceNewPassword.spec.tsx.snap +0 -896
  252. package/src/Authenticator/Defaults/ResetPassword/__tests__/ResetPassword.spec.tsx +0 -78
  253. package/src/Authenticator/Defaults/ResetPassword/__tests__/__snapshots__/ResetPassword.spec.tsx.snap +0 -512
  254. package/src/Authenticator/Defaults/SetupTOTP/__tests__/SetupTOTP.spec.tsx +0 -85
  255. package/src/Authenticator/Defaults/SetupTOTP/__tests__/__snapshots__/SetupTOTP.spec.tsx.snap +0 -602
  256. package/src/Authenticator/Defaults/SignIn/__tests__/SignIn.spec.tsx +0 -67
  257. package/src/Authenticator/Defaults/SignIn/__tests__/__snapshots__/SignIn.spec.tsx.snap +0 -1281
  258. package/src/Authenticator/Defaults/SignUp/__tests__/SignUp.spec.tsx +0 -102
  259. package/src/Authenticator/Defaults/SignUp/__tests__/__snapshots__/SignUp.spec.tsx.snap +0 -3122
  260. package/src/Authenticator/Defaults/VerifyUser/__tests__/VerifyUser.spec.tsx +0 -107
  261. package/src/Authenticator/Defaults/VerifyUser/__tests__/__snapshots__/VerifyUser.spec.tsx.snap +0 -692
  262. package/src/Authenticator/__tests__/Authenticator.spec.tsx +0 -131
  263. package/src/Authenticator/__tests__/__snapshots__/Authenticator.spec.tsx.snap +0 -90
  264. package/src/Authenticator/__tests__/__snapshots__/withAuthenticator.spec.tsx.snap +0 -68
  265. package/src/Authenticator/__tests__/withAuthenticator.spec.tsx +0 -73
  266. package/src/Authenticator/common/DefaultContainer/__tests__/DefaultContainer.spec.tsx +0 -19
  267. package/src/Authenticator/common/DefaultContainer/__tests__/__snapshots__/DefaultContainer.spec.tsx.snap +0 -83
  268. package/src/Authenticator/common/DefaultFooter/__tests__/DefaultFooter.spec.tsx +0 -26
  269. package/src/Authenticator/common/DefaultFooter/__tests__/__snapshots__/DefaultFooter.spec.tsx.snap +0 -40
  270. package/src/Authenticator/common/DefaultFormFields/__tests__/DefaultFormFields.spec.tsx +0 -15
  271. package/src/Authenticator/common/DefaultFormFields/__tests__/FieldErrors.spec.tsx +0 -29
  272. package/src/Authenticator/common/DefaultFormFields/__tests__/__snapshots__/DefaultFormFields.spec.tsx.snap +0 -3
  273. package/src/Authenticator/common/DefaultFormFields/__tests__/__snapshots__/FieldErrors.spec.tsx.snap +0 -32
  274. package/src/Authenticator/common/DefaultHeader/__tests__/DefaultHeader.spec.tsx +0 -23
  275. package/src/Authenticator/common/DefaultHeader/__tests__/__snapshots__/DefaultHeader.spec.tsx.snap +0 -24
  276. package/src/Authenticator/common/FederatedProviderButton/__tests__/FederatedProviderButton.spec.tsx +0 -67
  277. package/src/Authenticator/common/FederatedProviderButton/__tests__/__snapshots__/FederatedProviderButton.spec.tsx.snap +0 -185
  278. package/src/Authenticator/common/FederatedProviderButtons/__tests__/FederatedProviderButtons.spec.tsx +0 -55
  279. package/src/Authenticator/common/FederatedProviderButtons/__tests__/__snapshots__/FederatedProviderButtons.spec.tsx.snap +0 -167
  280. package/src/Authenticator/hooks/useFieldValues/__tests__/useFieldValues.spec.ts +0 -399
  281. package/src/Authenticator/hooks/useFieldValues/__tests__/utils.spec.ts +0 -282
  282. package/src/InAppMessaging/components/BannerMessage/__tests__/BannerMessage.spec.tsx +0 -151
  283. package/src/InAppMessaging/components/BannerMessage/__tests__/__snapshots__/BannerMessage.spec.tsx.snap +0 -618
  284. package/src/InAppMessaging/components/CarouselMessage/__tests__/CarouselMessage.spec.tsx +0 -92
  285. package/src/InAppMessaging/components/CarouselMessage/__tests__/CarouselMessageItem.spec.tsx +0 -50
  286. package/src/InAppMessaging/components/CarouselMessage/__tests__/__snapshots__/CarouselMessage.spec.tsx.snap +0 -124
  287. package/src/InAppMessaging/components/CarouselMessage/__tests__/__snapshots__/CarouselMessageItem.spec.tsx.snap +0 -248
  288. package/src/InAppMessaging/components/FullScreenMessage/__tests__/FullScreenMessage.spec.tsx +0 -53
  289. package/src/InAppMessaging/components/FullScreenMessage/__tests__/__snapshots__/FullScreenMessage.spec.tsx.snap +0 -238
  290. package/src/InAppMessaging/components/InAppMessageDisplay/__tests__/InAppMessageDisplay.spec.tsx +0 -34
  291. package/src/InAppMessaging/components/InAppMessageDisplay/__tests__/__snapshots__/InAppMessageDisplay.spec.tsx.snap +0 -9
  292. package/src/InAppMessaging/components/InAppMessageDisplay/__tests__/handleMessageLinkAction.spec.ts +0 -51
  293. package/src/InAppMessaging/components/MessageWrapper/__tests__/MessageWrapper.spec.tsx +0 -19
  294. package/src/InAppMessaging/components/MessageWrapper/__tests__/__snapshots__/MessageWrapper.spec.tsx.snap +0 -35
  295. package/src/InAppMessaging/components/ModalMessage/__tests__/ModalMessage.spec.tsx +0 -169
  296. package/src/InAppMessaging/components/ModalMessage/__tests__/__snapshots__/ModalMessage.spec.tsx.snap +0 -727
  297. package/src/InAppMessaging/components/withInAppMessaging/__tests__/__snapshots__/withInAppMessaging.spec.tsx.snap +0 -3
  298. package/src/InAppMessaging/components/withInAppMessaging/__tests__/withInAppMessaging.spec.tsx +0 -15
  299. package/src/InAppMessaging/hooks/useMessageImage/__tests__/useMessageImage.spec.ts +0 -141
  300. package/src/InAppMessaging/hooks/useMessageImage/__tests__/utils.spec.ts +0 -107
  301. package/src/InAppMessaging/hooks/useMessageProps/__tests__/__snapshots__/utils.spec.ts.snap +0 -223
  302. package/src/InAppMessaging/hooks/useMessageProps/__tests__/useMessageProps.spec.ts +0 -162
  303. package/src/InAppMessaging/hooks/useMessageProps/__tests__/utils.spec.ts +0 -355
  304. package/src/__mocks__/@react-native-async-storage/async-storage.ts +0 -2
  305. package/src/__mocks__/@react-native-community/netinfo.ts +0 -3
  306. package/src/__mocks__/react-native-safe-area-context.ts +0 -9
  307. package/src/__tests__/__snapshots__/index.spec.ts.snap +0 -26
  308. package/src/__tests__/index.spec.ts +0 -8
  309. package/src/hooks/useDeprecationWarning/__tests__/useDeprecationWarning.spec.ts +0 -42
  310. package/src/hooks/useDeviceOrientation/__tests__/useDeviceOrientation.spec.ts +0 -89
  311. package/src/hooks/usePressableContainerStyles/__tests__/usePressableContainerStyles.spec.ts +0 -68
  312. package/src/primitives/Button/__tests__/Button.spec.tsx +0 -92
  313. package/src/primitives/Button/__tests__/__snapshots__/Button.spec.tsx.snap +0 -143
  314. package/src/primitives/Carousel/__tests__/Carousel.spec.tsx +0 -174
  315. package/src/primitives/Carousel/__tests__/CarouselPageIndicator.spec.tsx +0 -73
  316. package/src/primitives/Carousel/__tests__/__snapshots__/Carousel.spec.tsx.snap +0 -310
  317. package/src/primitives/Carousel/__tests__/__snapshots__/CarouselPageIndicator.spec.tsx.snap +0 -191
  318. package/src/primitives/Checkbox/__tests__/Checkbox.spec.tsx +0 -150
  319. package/src/primitives/Checkbox/__tests__/__snapshots__/Checkbox.spec.tsx.snap +0 -527
  320. package/src/primitives/Divider/__tests__/Divider.spec.tsx +0 -50
  321. package/src/primitives/Divider/__tests__/__snapshots__/Divider.spec.tsx.snap +0 -165
  322. package/src/primitives/ErrorMessage/__tests__/ErrorMessage.spec.tsx +0 -60
  323. package/src/primitives/ErrorMessage/__tests__/__snapshots__/ErrorMessage.spec.tsx.snap +0 -123
  324. package/src/primitives/Heading/__tests__/Heading.spec.tsx +0 -73
  325. package/src/primitives/Heading/__tests__/__snapshots__/Heading.spec.tsx.snap +0 -171
  326. package/src/primitives/Icon/__tests__/Icon.spec.tsx +0 -100
  327. package/src/primitives/Icon/__tests__/__snapshots__/Icon.spec.tsx.snap +0 -139
  328. package/src/primitives/IconButton/__tests__/IconButton.spec.tsx +0 -71
  329. package/src/primitives/IconButton/__tests__/__snapshots__/IconButton.spec.tsx.snap +0 -192
  330. package/src/primitives/Label/__tests__/Label.spec.tsx +0 -75
  331. package/src/primitives/Label/__tests__/__snapshots__/Label.spec.tsx.snap +0 -91
  332. package/src/primitives/PasswordField/__tests__/PasswordField.spec.tsx +0 -110
  333. package/src/primitives/PasswordField/__tests__/__snapshots__/PasswordField.spec.tsx.snap +0 -625
  334. package/src/primitives/PhoneNumberField/__tests__/PhoneNumberField.spec.tsx +0 -53
  335. package/src/primitives/PhoneNumberField/__tests__/__snapshots__/PhoneNumberField.spec.tsx.snap +0 -188
  336. package/src/primitives/Radio/__tests__/Radio.spec.tsx +0 -166
  337. package/src/primitives/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +0 -678
  338. package/src/primitives/RadioGroup/__tests__/RadioGroup.spec.tsx +0 -183
  339. package/src/primitives/RadioGroup/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +0 -1789
  340. package/src/primitives/Tabs/__tests__/Tab.spec.tsx +0 -75
  341. package/src/primitives/Tabs/__tests__/Tabs.spec.tsx +0 -81
  342. package/src/primitives/Tabs/__tests__/__snapshots__/Tab.spec.tsx.snap +0 -278
  343. package/src/primitives/Tabs/__tests__/__snapshots__/Tabs.spec.tsx.snap +0 -163
  344. package/src/primitives/TextField/__tests__/TextField.spec.tsx +0 -202
  345. package/src/primitives/TextField/__tests__/__snapshots__/TextField.spec.tsx.snap +0 -507
  346. package/src/theme/__tests__/ThemeProvider.spec.tsx +0 -23
  347. package/src/theme/__tests__/__snapshots__/useTheme.spec.tsx.snap +0 -226
  348. package/src/theme/__tests__/createTheme.spec.ts +0 -244
  349. package/src/theme/__tests__/useTheme.spec.tsx +0 -51
  350. package/tsconfig.dist.json +0 -4
  351. package/tsconfig.json +0 -9
@@ -1,75 +0,0 @@
1
- import React from 'react';
2
- import { StyleSheet, Text } from 'react-native';
3
- import { render, renderHook } from '@testing-library/react-native';
4
-
5
- import { useTheme } from '../../../theme';
6
- import { Tab } from '..';
7
- import { getThemedStyles } from '../styles';
8
- import { getThemedStyles as getButtonThemedStyles } from '../../Button/styles';
9
-
10
- const customStyles = StyleSheet.create({
11
- tabStyle: {
12
- backgroundColor: 'lavender',
13
- borderTopColor: 'rebeccapurple',
14
- },
15
- });
16
-
17
- describe('Tab', () => {
18
- it('renders default Tab as expected', () => {
19
- const { toJSON } = render(<Tab>Default Tab</Tab>);
20
- expect(toJSON()).toMatchSnapshot();
21
- });
22
-
23
- it('renders as expected with a component passed as children', () => {
24
- const { toJSON } = render(
25
- <Tab>
26
- <Text>Text component</Text>
27
- </Tab>
28
- );
29
- expect(toJSON()).toMatchSnapshot();
30
- });
31
-
32
- it('renders as expected when Tab is selected', () => {
33
- const { getByRole, toJSON } = render(<Tab selected>Selected Tab</Tab>);
34
-
35
- expect(toJSON()).toMatchSnapshot();
36
-
37
- const { result } = renderHook(() => useTheme());
38
- const themedStyle = getThemedStyles(result.current);
39
- const buttonThemedStyle = getButtonThemedStyles(result.current);
40
-
41
- const tab = getByRole('tab');
42
- expect(tab.props.style).toStrictEqual([
43
- { ...buttonThemedStyle.container, ...buttonThemedStyle.containerDefault },
44
- undefined,
45
- [
46
- {
47
- ...themedStyle.tab,
48
- ...themedStyle.readonly,
49
- ...themedStyle.selected,
50
- },
51
- undefined,
52
- undefined,
53
- ],
54
- ]);
55
- });
56
-
57
- it('can apply custom styling', () => {
58
- const { getByRole, toJSON } = render(
59
- <Tab style={customStyles.tabStyle}>Styled Tab</Tab>
60
- );
61
-
62
- expect(toJSON()).toMatchSnapshot();
63
-
64
- const { result } = renderHook(() => useTheme());
65
- const themedStyle = getThemedStyles(result.current);
66
- const buttonThemedStyle = getButtonThemedStyles(result.current);
67
-
68
- const tab = getByRole('tab');
69
- expect(tab.props.style).toStrictEqual([
70
- { ...buttonThemedStyle.container, ...buttonThemedStyle.containerDefault },
71
- undefined,
72
- [{ ...themedStyle.tab }, undefined, customStyles.tabStyle],
73
- ]);
74
- });
75
- });
@@ -1,81 +0,0 @@
1
- import React, { useState } from 'react';
2
- import { fireEvent, render, renderHook } from '@testing-library/react-native';
3
-
4
- import { useTheme } from '../../../theme';
5
- import { Tab, Tabs } from '..';
6
- import { getThemedStyles } from '../styles';
7
-
8
- const onChangeMock = jest.fn();
9
-
10
- const ControlledTabs = ({
11
- onChangeCallback,
12
- selectedIndex,
13
- }: {
14
- onChangeCallback?: jest.Mock<any, any>;
15
- selectedIndex?: number;
16
- }) => {
17
- const [index, setIndex] = useState(selectedIndex);
18
- const onChangeHandler = (nextIndex: number) => {
19
- setIndex(nextIndex);
20
- onChangeCallback?.(nextIndex);
21
- };
22
-
23
- return (
24
- <Tabs onChange={onChangeHandler} selectedIndex={index}>
25
- <Tab>Sign In</Tab>
26
- <Tab>Create Account</Tab>
27
- <Tab disabled>Disabled Tab</Tab>
28
- </Tabs>
29
- );
30
- };
31
-
32
- describe('Tabs', () => {
33
- beforeEach(() => {
34
- onChangeMock.mockClear();
35
- });
36
-
37
- it('can be used as a controlled component', () => {
38
- const { queryAllByRole } = render(
39
- <ControlledTabs onChangeCallback={onChangeMock} />
40
- );
41
-
42
- const tabs = queryAllByRole('tab');
43
- fireEvent.press(tabs[1]);
44
- expect(onChangeMock).toBeCalledWith(1);
45
- fireEvent.press(tabs[0]);
46
- expect(onChangeMock).toBeCalledWith(0);
47
- });
48
-
49
- it('does not allow disabled Tabs to be selected', () => {
50
- const { queryAllByRole } = render(
51
- <ControlledTabs onChangeCallback={onChangeMock} />
52
- );
53
-
54
- const tabs = queryAllByRole('tab');
55
- fireEvent.press(tabs[2]);
56
- expect(onChangeMock).not.toHaveBeenCalled();
57
- expect(tabs[2].props.accessibilityState).toHaveProperty('disabled', true);
58
- });
59
-
60
- it('applies theme and custom styling', () => {
61
- const customStyles = { backgroundColor: 'blue' };
62
- const { getByRole, toJSON } = render(
63
- <Tabs style={customStyles}>
64
- <Tab>Sign In</Tab>
65
- <Tab>Create Account</Tab>
66
- </Tabs>
67
- );
68
-
69
- expect(toJSON()).toMatchSnapshot();
70
-
71
- const { result } = renderHook(() => useTheme());
72
- const themedStyle = getThemedStyles(result.current);
73
-
74
- const tablist = getByRole('tablist');
75
-
76
- expect(tablist.props.style).toStrictEqual([
77
- themedStyle.tabList,
78
- customStyles,
79
- ]);
80
- });
81
- });
@@ -1,278 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Tab can apply custom styling 1`] = `
4
- <View
5
- accessibilityRole="tab"
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
- "backgroundColor": "transparent",
23
- "borderColor": "hsl(210, 10%, 58%)",
24
- "borderRadius": 4,
25
- "borderWidth": 1,
26
- "justifyContent": "center",
27
- "paddingHorizontal": 16,
28
- "paddingVertical": 12,
29
- },
30
- undefined,
31
- Array [
32
- Object {
33
- "backgroundColor": "transparent",
34
- "borderBottomColor": "hsl(210, 5%, 87%)",
35
- "borderBottomWidth": 2,
36
- "borderRadius": 0,
37
- "borderWidth": 0,
38
- "flexBasis": 0,
39
- "flexGrow": 1,
40
- "paddingHorizontal": 16,
41
- "paddingVertical": 12,
42
- },
43
- undefined,
44
- Object {
45
- "backgroundColor": "lavender",
46
- "borderTopColor": "rebeccapurple",
47
- },
48
- ],
49
- ]
50
- }
51
- >
52
- <Text
53
- style={
54
- Array [
55
- Object {
56
- "color": "hsl(210, 50%, 10%)",
57
- "fontSize": 16,
58
- "fontWeight": "700",
59
- "textAlign": "center",
60
- },
61
- Array [
62
- Object {
63
- "color": "hsl(210, 25%, 25%)",
64
- "fontSize": 16,
65
- "fontWeight": "700",
66
- },
67
- undefined,
68
- null,
69
- ],
70
- ]
71
- }
72
- >
73
- Styled Tab
74
- </Text>
75
- </View>
76
- `;
77
-
78
- exports[`Tab renders as expected when Tab is selected 1`] = `
79
- <View
80
- accessibilityRole="tab"
81
- accessible={true}
82
- collapsable={false}
83
- focusable={true}
84
- onBlur={[Function]}
85
- onClick={[Function]}
86
- onFocus={[Function]}
87
- onResponderGrant={[Function]}
88
- onResponderMove={[Function]}
89
- onResponderRelease={[Function]}
90
- onResponderTerminate={[Function]}
91
- onResponderTerminationRequest={[Function]}
92
- onStartShouldSetResponder={[Function]}
93
- style={
94
- Array [
95
- Object {
96
- "alignItems": "center",
97
- "backgroundColor": "transparent",
98
- "borderColor": "hsl(210, 10%, 58%)",
99
- "borderRadius": 4,
100
- "borderWidth": 1,
101
- "justifyContent": "center",
102
- "paddingHorizontal": 16,
103
- "paddingVertical": 12,
104
- },
105
- undefined,
106
- Array [
107
- Object {
108
- "backgroundColor": "hsl(0, 0%, 100%)",
109
- "borderBottomColor": "hsl(190, 95%, 30%)",
110
- "borderBottomWidth": 2,
111
- "borderRadius": 0,
112
- "borderWidth": 0,
113
- "color": "hsl(190, 95%, 30%)",
114
- "flexBasis": 0,
115
- "flexGrow": 1,
116
- "opacity": 1,
117
- "paddingHorizontal": 16,
118
- "paddingVertical": 12,
119
- },
120
- undefined,
121
- undefined,
122
- ],
123
- ]
124
- }
125
- >
126
- <Text
127
- style={
128
- Array [
129
- Object {
130
- "color": "hsl(210, 50%, 10%)",
131
- "fontSize": 16,
132
- "fontWeight": "700",
133
- "textAlign": "center",
134
- },
135
- Array [
136
- Object {
137
- "color": "hsl(210, 25%, 25%)",
138
- "fontSize": 16,
139
- "fontWeight": "700",
140
- },
141
- undefined,
142
- Object {
143
- "backgroundColor": "hsl(0, 0%, 100%)",
144
- "borderBottomColor": "hsl(190, 95%, 30%)",
145
- "color": "hsl(190, 95%, 30%)",
146
- },
147
- ],
148
- ]
149
- }
150
- >
151
- Selected Tab
152
- </Text>
153
- </View>
154
- `;
155
-
156
- exports[`Tab renders as expected with a component passed as children 1`] = `
157
- <View
158
- accessibilityRole="tab"
159
- accessible={true}
160
- collapsable={false}
161
- focusable={true}
162
- onBlur={[Function]}
163
- onClick={[Function]}
164
- onFocus={[Function]}
165
- onResponderGrant={[Function]}
166
- onResponderMove={[Function]}
167
- onResponderRelease={[Function]}
168
- onResponderTerminate={[Function]}
169
- onResponderTerminationRequest={[Function]}
170
- onStartShouldSetResponder={[Function]}
171
- style={
172
- Array [
173
- Object {
174
- "alignItems": "center",
175
- "backgroundColor": "transparent",
176
- "borderColor": "hsl(210, 10%, 58%)",
177
- "borderRadius": 4,
178
- "borderWidth": 1,
179
- "justifyContent": "center",
180
- "paddingHorizontal": 16,
181
- "paddingVertical": 12,
182
- },
183
- undefined,
184
- Array [
185
- Object {
186
- "backgroundColor": "transparent",
187
- "borderBottomColor": "hsl(210, 5%, 87%)",
188
- "borderBottomWidth": 2,
189
- "borderRadius": 0,
190
- "borderWidth": 0,
191
- "flexBasis": 0,
192
- "flexGrow": 1,
193
- "paddingHorizontal": 16,
194
- "paddingVertical": 12,
195
- },
196
- undefined,
197
- undefined,
198
- ],
199
- ]
200
- }
201
- >
202
- <Text>
203
- Text component
204
- </Text>
205
- </View>
206
- `;
207
-
208
- exports[`Tab renders default Tab as expected 1`] = `
209
- <View
210
- accessibilityRole="tab"
211
- accessible={true}
212
- collapsable={false}
213
- focusable={true}
214
- onBlur={[Function]}
215
- onClick={[Function]}
216
- onFocus={[Function]}
217
- onResponderGrant={[Function]}
218
- onResponderMove={[Function]}
219
- onResponderRelease={[Function]}
220
- onResponderTerminate={[Function]}
221
- onResponderTerminationRequest={[Function]}
222
- onStartShouldSetResponder={[Function]}
223
- style={
224
- Array [
225
- Object {
226
- "alignItems": "center",
227
- "backgroundColor": "transparent",
228
- "borderColor": "hsl(210, 10%, 58%)",
229
- "borderRadius": 4,
230
- "borderWidth": 1,
231
- "justifyContent": "center",
232
- "paddingHorizontal": 16,
233
- "paddingVertical": 12,
234
- },
235
- undefined,
236
- Array [
237
- Object {
238
- "backgroundColor": "transparent",
239
- "borderBottomColor": "hsl(210, 5%, 87%)",
240
- "borderBottomWidth": 2,
241
- "borderRadius": 0,
242
- "borderWidth": 0,
243
- "flexBasis": 0,
244
- "flexGrow": 1,
245
- "paddingHorizontal": 16,
246
- "paddingVertical": 12,
247
- },
248
- undefined,
249
- undefined,
250
- ],
251
- ]
252
- }
253
- >
254
- <Text
255
- style={
256
- Array [
257
- Object {
258
- "color": "hsl(210, 50%, 10%)",
259
- "fontSize": 16,
260
- "fontWeight": "700",
261
- "textAlign": "center",
262
- },
263
- Array [
264
- Object {
265
- "color": "hsl(210, 25%, 25%)",
266
- "fontSize": 16,
267
- "fontWeight": "700",
268
- },
269
- undefined,
270
- null,
271
- ],
272
- ]
273
- }
274
- >
275
- Default Tab
276
- </Text>
277
- </View>
278
- `;
@@ -1,163 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Tabs applies theme and custom styling 1`] = `
4
- <View
5
- accessibilityRole="tablist"
6
- style={
7
- Array [
8
- Object {
9
- "flexDirection": "row",
10
- "width": "100%",
11
- },
12
- Object {
13
- "backgroundColor": "blue",
14
- },
15
- ]
16
- }
17
- >
18
- <View
19
- accessibilityRole="tab"
20
- accessible={true}
21
- collapsable={false}
22
- focusable={true}
23
- onBlur={[Function]}
24
- onClick={[Function]}
25
- onFocus={[Function]}
26
- onResponderGrant={[Function]}
27
- onResponderMove={[Function]}
28
- onResponderRelease={[Function]}
29
- onResponderTerminate={[Function]}
30
- onResponderTerminationRequest={[Function]}
31
- onStartShouldSetResponder={[Function]}
32
- style={
33
- Array [
34
- Object {
35
- "alignItems": "center",
36
- "backgroundColor": "transparent",
37
- "borderColor": "hsl(210, 10%, 58%)",
38
- "borderRadius": 4,
39
- "borderWidth": 1,
40
- "justifyContent": "center",
41
- "paddingHorizontal": 16,
42
- "paddingVertical": 12,
43
- },
44
- undefined,
45
- Array [
46
- Object {
47
- "backgroundColor": "hsl(0, 0%, 100%)",
48
- "borderBottomColor": "hsl(190, 95%, 30%)",
49
- "borderBottomWidth": 2,
50
- "borderRadius": 0,
51
- "borderWidth": 0,
52
- "color": "hsl(190, 95%, 30%)",
53
- "flexBasis": 0,
54
- "flexGrow": 1,
55
- "opacity": 1,
56
- "paddingHorizontal": 16,
57
- "paddingVertical": 12,
58
- },
59
- undefined,
60
- undefined,
61
- ],
62
- ]
63
- }
64
- >
65
- <Text
66
- style={
67
- Array [
68
- Object {
69
- "color": "hsl(210, 50%, 10%)",
70
- "fontSize": 16,
71
- "fontWeight": "700",
72
- "textAlign": "center",
73
- },
74
- Array [
75
- Object {
76
- "color": "hsl(210, 25%, 25%)",
77
- "fontSize": 16,
78
- "fontWeight": "700",
79
- },
80
- undefined,
81
- Object {
82
- "backgroundColor": "hsl(0, 0%, 100%)",
83
- "borderBottomColor": "hsl(190, 95%, 30%)",
84
- "color": "hsl(190, 95%, 30%)",
85
- },
86
- ],
87
- ]
88
- }
89
- >
90
- Sign In
91
- </Text>
92
- </View>
93
- <View
94
- accessibilityRole="tab"
95
- accessible={true}
96
- collapsable={false}
97
- focusable={true}
98
- onBlur={[Function]}
99
- onClick={[Function]}
100
- onFocus={[Function]}
101
- onResponderGrant={[Function]}
102
- onResponderMove={[Function]}
103
- onResponderRelease={[Function]}
104
- onResponderTerminate={[Function]}
105
- onResponderTerminationRequest={[Function]}
106
- onStartShouldSetResponder={[Function]}
107
- style={
108
- Array [
109
- Object {
110
- "alignItems": "center",
111
- "backgroundColor": "transparent",
112
- "borderColor": "hsl(210, 10%, 58%)",
113
- "borderRadius": 4,
114
- "borderWidth": 1,
115
- "justifyContent": "center",
116
- "paddingHorizontal": 16,
117
- "paddingVertical": 12,
118
- },
119
- undefined,
120
- Array [
121
- Object {
122
- "backgroundColor": "transparent",
123
- "borderBottomColor": "hsl(210, 5%, 87%)",
124
- "borderBottomWidth": 2,
125
- "borderRadius": 0,
126
- "borderWidth": 0,
127
- "flexBasis": 0,
128
- "flexGrow": 1,
129
- "paddingHorizontal": 16,
130
- "paddingVertical": 12,
131
- },
132
- undefined,
133
- undefined,
134
- ],
135
- ]
136
- }
137
- >
138
- <Text
139
- style={
140
- Array [
141
- Object {
142
- "color": "hsl(210, 50%, 10%)",
143
- "fontSize": 16,
144
- "fontWeight": "700",
145
- "textAlign": "center",
146
- },
147
- Array [
148
- Object {
149
- "color": "hsl(210, 25%, 25%)",
150
- "fontSize": 16,
151
- "fontWeight": "700",
152
- },
153
- undefined,
154
- null,
155
- ],
156
- ]
157
- }
158
- >
159
- Create Account
160
- </Text>
161
- </View>
162
- </View>
163
- `;