@aws-amplify/ui-react-native 0.0.0-react-v4-next-e3ffde5-20230811190323 → 0.0.0-react-18-c03bcb0-20231023181427

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 (466) hide show
  1. package/dist/Authenticator/Authenticator.d.ts +169 -153
  2. package/dist/Authenticator/Authenticator.js +7 -3
  3. package/dist/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.d.ts +13 -2
  4. package/dist/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.js +17 -5
  5. package/dist/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.d.ts +13 -2
  6. package/dist/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.js +16 -5
  7. package/dist/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.d.ts +13 -2
  8. package/dist/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.js +16 -5
  9. package/dist/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.d.ts +13 -2
  10. package/dist/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.js +16 -5
  11. package/dist/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.d.ts +13 -2
  12. package/dist/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.js +17 -5
  13. package/dist/Authenticator/Defaults/ResetPassword/ResetPassword.d.ts +13 -2
  14. package/dist/Authenticator/Defaults/ResetPassword/ResetPassword.js +16 -5
  15. package/dist/Authenticator/Defaults/SetupTOTP/SetupTOTP.d.ts +13 -2
  16. package/dist/Authenticator/Defaults/SetupTOTP/SetupTOTP.js +16 -5
  17. package/dist/Authenticator/Defaults/SignIn/SignIn.d.ts +13 -2
  18. package/dist/Authenticator/Defaults/SignIn/SignIn.js +6 -4
  19. package/dist/Authenticator/Defaults/SignUp/SignUp.d.ts +13 -2
  20. package/dist/Authenticator/Defaults/SignUp/SignUp.js +11 -4
  21. package/dist/Authenticator/Defaults/VerifyUser/VerifyUser.d.ts +13 -2
  22. package/dist/Authenticator/Defaults/VerifyUser/VerifyUser.js +6 -5
  23. package/dist/Authenticator/Defaults/types.d.ts +21 -20
  24. package/dist/Authenticator/common/DefaultContent/DefaultContent.js +2 -2
  25. package/dist/Authenticator/common/DefaultContent/styles.js +1 -2
  26. package/dist/Authenticator/common/DefaultContent/types.d.ts +1 -1
  27. package/dist/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.d.ts +7 -3
  28. package/dist/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.js +4 -3
  29. package/dist/Authenticator/common/DefaultFormFields/DefaultTextFormFields.d.ts +6 -2
  30. package/dist/Authenticator/common/DefaultFormFields/DefaultTextFormFields.js +3 -3
  31. package/dist/Authenticator/common/DefaultFormFields/types.d.ts +12 -3
  32. package/dist/Authenticator/common/FederatedProviderButton/types.d.ts +3 -1
  33. package/dist/Authenticator/hooks/types.d.ts +3 -2
  34. package/dist/Authenticator/hooks/useFieldValues/types.d.ts +4 -1
  35. package/dist/Authenticator/hooks/useFieldValues/useFieldValues.d.ts +1 -1
  36. package/dist/Authenticator/hooks/useFieldValues/useFieldValues.js +21 -3
  37. package/dist/Authenticator/hooks/useFieldValues/utils.d.ts +10 -1
  38. package/dist/Authenticator/hooks/useFieldValues/utils.js +32 -2
  39. package/dist/assets/icons/icons.d.ts +15 -0
  40. package/dist/assets/icons/icons.js +14 -0
  41. package/dist/assets/icons/icons.ts +20 -0
  42. package/dist/assets/icons/index.d.ts +1 -15
  43. package/dist/assets/icons/index.js +1 -14
  44. package/dist/assets/icons/index.ts +1 -17
  45. package/dist/assets/index.d.ts +1 -1
  46. package/dist/assets/index.js +1 -1
  47. package/dist/hooks/index.d.ts +1 -0
  48. package/dist/hooks/index.js +1 -0
  49. package/dist/hooks/useDeprecationWarning/index.d.ts +1 -0
  50. package/dist/hooks/useDeprecationWarning/index.js +1 -0
  51. package/dist/hooks/useDeprecationWarning/useDeprecationWarning.d.ts +6 -0
  52. package/dist/hooks/useDeprecationWarning/useDeprecationWarning.js +11 -0
  53. package/dist/primitives/Carousel/Carousel.js +1 -11
  54. package/dist/primitives/ErrorMessage/ErrorMessage.d.ts +1 -1
  55. package/dist/primitives/ErrorMessage/ErrorMessage.js +2 -2
  56. package/dist/primitives/Heading/styles.js +5 -5
  57. package/dist/primitives/Icon/Icon.d.ts +1 -1
  58. package/dist/primitives/Icon/Icon.js +2 -1
  59. package/dist/primitives/Label/styles.js +2 -2
  60. package/dist/primitives/Radio/styles.js +2 -1
  61. package/dist/primitives/RadioGroup/RadioGroup.d.ts +1 -1
  62. package/dist/primitives/RadioGroup/RadioGroup.js +2 -2
  63. package/dist/primitives/Tabs/Tabs.d.ts +1 -1
  64. package/dist/primitives/Tabs/Tabs.js +2 -2
  65. package/dist/primitives/TextField/TextField.js +2 -1
  66. package/dist/primitives/TextField/styles.js +6 -3
  67. package/dist/primitives/TextField/types.d.ts +1 -0
  68. package/dist/theme/createTheme.js +24 -18
  69. package/dist/theme/types.d.ts +1 -1
  70. package/dist/utils/platform.d.ts +6 -2
  71. package/dist/utils/platform.js +2 -0
  72. package/dist/version.d.ts +1 -1
  73. package/dist/version.js +1 -1
  74. package/lib/Authenticator/Authenticator.js +72 -0
  75. package/lib/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.js +43 -0
  76. package/lib/Authenticator/Defaults/ConfirmResetPassword/index.js +8 -0
  77. package/lib/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.js +42 -0
  78. package/lib/Authenticator/Defaults/ConfirmSignIn/index.js +8 -0
  79. package/lib/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.js +43 -0
  80. package/lib/Authenticator/Defaults/ConfirmSignUp/index.js +8 -0
  81. package/lib/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.js +42 -0
  82. package/lib/Authenticator/Defaults/ConfirmVerifyUser/index.js +8 -0
  83. package/lib/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.js +45 -0
  84. package/lib/Authenticator/Defaults/ForceNewPassword/index.js +8 -0
  85. package/lib/Authenticator/Defaults/ResetPassword/ResetPassword.js +42 -0
  86. package/lib/Authenticator/Defaults/ResetPassword/index.js +8 -0
  87. package/lib/Authenticator/Defaults/SetupTOTP/SetupTOTP.js +52 -0
  88. package/lib/Authenticator/Defaults/SetupTOTP/index.js +8 -0
  89. package/lib/Authenticator/Defaults/SetupTOTP/styles.js +8 -0
  90. package/lib/Authenticator/Defaults/SignIn/SignIn.js +50 -0
  91. package/lib/Authenticator/Defaults/SignIn/index.js +8 -0
  92. package/lib/Authenticator/Defaults/SignUp/SignUp.js +48 -0
  93. package/lib/Authenticator/Defaults/SignUp/index.js +8 -0
  94. package/lib/Authenticator/Defaults/VerifyUser/VerifyUser.js +33 -0
  95. package/lib/Authenticator/Defaults/VerifyUser/index.js +8 -0
  96. package/lib/Authenticator/Defaults/index.js +23 -0
  97. package/lib/Authenticator/Defaults/types.js +2 -0
  98. package/lib/Authenticator/common/DefaultContainer/DefaultContainer.js +37 -0
  99. package/lib/Authenticator/common/DefaultContainer/InnerContainer.js +15 -0
  100. package/lib/Authenticator/common/DefaultContainer/index.js +10 -0
  101. package/lib/Authenticator/common/DefaultContainer/styles.js +31 -0
  102. package/lib/Authenticator/common/DefaultContainer/types.js +2 -0
  103. package/lib/Authenticator/common/DefaultContent/DefaultContent.js +33 -0
  104. package/lib/Authenticator/common/DefaultContent/index.js +8 -0
  105. package/lib/Authenticator/common/DefaultContent/styles.js +54 -0
  106. package/lib/Authenticator/common/DefaultContent/types.js +2 -0
  107. package/lib/Authenticator/common/DefaultFooter/DefaultFooter.js +9 -0
  108. package/lib/Authenticator/common/DefaultFooter/index.js +8 -0
  109. package/lib/Authenticator/common/DefaultFooter/types.js +2 -0
  110. package/lib/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.js +28 -0
  111. package/lib/Authenticator/common/DefaultFormFields/DefaultTextFormFields.js +21 -0
  112. package/lib/Authenticator/common/DefaultFormFields/Field.js +37 -0
  113. package/lib/Authenticator/common/DefaultFormFields/FieldErrors.js +17 -0
  114. package/lib/Authenticator/common/DefaultFormFields/index.js +10 -0
  115. package/lib/Authenticator/common/DefaultFormFields/types.js +2 -0
  116. package/lib/Authenticator/common/DefaultHeader/DefaultHeader.js +11 -0
  117. package/lib/Authenticator/common/DefaultHeader/index.js +8 -0
  118. package/lib/Authenticator/common/DefaultHeader/types.js +2 -0
  119. package/lib/Authenticator/common/FederatedProviderButton/FederatedProviderButton.js +18 -0
  120. package/lib/Authenticator/common/FederatedProviderButton/index.js +8 -0
  121. package/lib/Authenticator/common/FederatedProviderButton/styles.js +21 -0
  122. package/lib/Authenticator/common/FederatedProviderButton/types.js +2 -0
  123. package/lib/Authenticator/common/FederatedProviderButtons/FederatedProviderButtons.js +26 -0
  124. package/lib/Authenticator/common/FederatedProviderButtons/index.js +8 -0
  125. package/lib/Authenticator/common/FederatedProviderButtons/styles.js +8 -0
  126. package/lib/Authenticator/common/FederatedProviderButtons/types.js +2 -0
  127. package/lib/Authenticator/common/index.js +10 -0
  128. package/lib/Authenticator/hooks/index.js +5 -0
  129. package/lib/Authenticator/hooks/types.js +2 -0
  130. package/lib/Authenticator/hooks/useFieldValues/constants.js +11 -0
  131. package/lib/Authenticator/hooks/useFieldValues/index.js +10 -0
  132. package/lib/Authenticator/hooks/useFieldValues/types.js +2 -0
  133. package/lib/Authenticator/hooks/useFieldValues/useFieldValues.js +101 -0
  134. package/lib/Authenticator/hooks/useFieldValues/utils.js +139 -0
  135. package/lib/Authenticator/index.js +13 -0
  136. package/lib/Authenticator/types.js +2 -0
  137. package/lib/Authenticator/withAuthenticator.js +15 -0
  138. package/lib/InAppMessaging/components/BannerMessage/BannerMessage.js +20 -0
  139. package/lib/InAppMessaging/components/BannerMessage/index.js +8 -0
  140. package/lib/InAppMessaging/components/BannerMessage/styles.js +81 -0
  141. package/lib/InAppMessaging/components/BannerMessage/types.js +2 -0
  142. package/lib/InAppMessaging/components/CarouselMessage/CarouselMessage.js +25 -0
  143. package/lib/InAppMessaging/components/CarouselMessage/CarouselMessageItem.js +22 -0
  144. package/lib/InAppMessaging/components/CarouselMessage/index.js +8 -0
  145. package/lib/InAppMessaging/components/CarouselMessage/styles.js +103 -0
  146. package/lib/InAppMessaging/components/CarouselMessage/types.js +2 -0
  147. package/lib/InAppMessaging/components/FullScreenMessage/FullScreenMessage.js +22 -0
  148. package/lib/InAppMessaging/components/FullScreenMessage/index.js +8 -0
  149. package/lib/InAppMessaging/components/FullScreenMessage/styles.js +91 -0
  150. package/lib/InAppMessaging/components/FullScreenMessage/types.js +2 -0
  151. package/lib/InAppMessaging/components/InAppMessageDisplay/InAppMessageDisplay.js +32 -0
  152. package/lib/InAppMessaging/components/InAppMessageDisplay/handleMessageLinkAction.js +26 -0
  153. package/lib/InAppMessaging/components/InAppMessageDisplay/index.js +8 -0
  154. package/lib/InAppMessaging/components/InAppMessageDisplay/types.js +2 -0
  155. package/lib/InAppMessaging/components/MessageLayout/MessageLayout.js +38 -0
  156. package/lib/InAppMessaging/components/MessageLayout/index.js +8 -0
  157. package/lib/InAppMessaging/components/MessageLayout/types.js +2 -0
  158. package/lib/InAppMessaging/components/MessageWrapper/MessageWrapper.js +24 -0
  159. package/lib/InAppMessaging/components/MessageWrapper/index.js +8 -0
  160. package/lib/InAppMessaging/components/MessageWrapper/styles.js +8 -0
  161. package/lib/InAppMessaging/components/MessageWrapper/types.js +2 -0
  162. package/lib/InAppMessaging/components/ModalMessage/ModalMessage.js +22 -0
  163. package/lib/InAppMessaging/components/ModalMessage/index.js +8 -0
  164. package/lib/InAppMessaging/components/ModalMessage/styles.js +104 -0
  165. package/lib/InAppMessaging/components/ModalMessage/types.js +2 -0
  166. package/lib/InAppMessaging/components/index.js +7 -0
  167. package/lib/InAppMessaging/components/withInAppMessaging/index.js +8 -0
  168. package/lib/InAppMessaging/components/withInAppMessaging/withInAppMessaging.js +15 -0
  169. package/lib/InAppMessaging/constants.js +48 -0
  170. package/lib/InAppMessaging/hooks/index.js +7 -0
  171. package/lib/InAppMessaging/hooks/useMessageImage/constants.js +21 -0
  172. package/lib/InAppMessaging/hooks/useMessageImage/index.js +8 -0
  173. package/lib/InAppMessaging/hooks/useMessageImage/types.js +9 -0
  174. package/lib/InAppMessaging/hooks/useMessageImage/useMessageImage.js +53 -0
  175. package/lib/InAppMessaging/hooks/useMessageImage/utils.js +61 -0
  176. package/lib/InAppMessaging/hooks/useMessageProps/index.js +8 -0
  177. package/lib/InAppMessaging/hooks/useMessageProps/types.js +2 -0
  178. package/lib/InAppMessaging/hooks/useMessageProps/useMessageProps.js +52 -0
  179. package/lib/InAppMessaging/hooks/useMessageProps/utils.js +201 -0
  180. package/lib/InAppMessaging/index.js +9 -0
  181. package/lib/assets/icons/amazonLogo.png +0 -0
  182. package/lib/assets/icons/amazonLogo@2x.png +0 -0
  183. package/lib/assets/icons/amazonLogo@3x.png +0 -0
  184. package/lib/assets/icons/appleLogo.png +0 -0
  185. package/lib/assets/icons/appleLogo@2x.png +0 -0
  186. package/lib/assets/icons/appleLogo@3x.png +0 -0
  187. package/lib/assets/icons/checkboxFilled.png +0 -0
  188. package/lib/assets/icons/checkboxFilled@2x.png +0 -0
  189. package/lib/assets/icons/checkboxFilled@3x.png +0 -0
  190. package/lib/assets/icons/checkboxOutline.png +0 -0
  191. package/lib/assets/icons/checkboxOutline@2x.png +0 -0
  192. package/lib/assets/icons/checkboxOutline@3x.png +0 -0
  193. package/lib/assets/icons/close.png +0 -0
  194. package/lib/assets/icons/close@2x.png +0 -0
  195. package/lib/assets/icons/close@3x.png +0 -0
  196. package/lib/assets/icons/copy.png +0 -0
  197. package/lib/assets/icons/copy@2x.png +0 -0
  198. package/lib/assets/icons/copy@3x.png +0 -0
  199. package/lib/assets/icons/error.png +0 -0
  200. package/lib/assets/icons/error@2x.png +0 -0
  201. package/lib/assets/icons/error@3x.png +0 -0
  202. package/lib/assets/icons/facebookLogo.png +0 -0
  203. package/lib/assets/icons/facebookLogo@2x.png +0 -0
  204. package/lib/assets/icons/facebookLogo@3x.png +0 -0
  205. package/lib/assets/icons/googleLogo.png +0 -0
  206. package/lib/assets/icons/googleLogo@2x.png +0 -0
  207. package/lib/assets/icons/googleLogo@3x.png +0 -0
  208. package/lib/assets/icons/icons.js +16 -0
  209. package/lib/assets/icons/icons.ts +20 -0
  210. package/lib/assets/icons/index.js +8 -0
  211. package/lib/assets/icons/visibilityOff.png +0 -0
  212. package/lib/assets/icons/visibilityOff@2x.png +0 -0
  213. package/lib/assets/icons/visibilityOff@3x.png +0 -0
  214. package/lib/assets/icons/visibilityOn.png +0 -0
  215. package/lib/assets/icons/visibilityOn@2x.png +0 -0
  216. package/lib/assets/icons/visibilityOn@3x.png +0 -0
  217. package/lib/assets/index.js +5 -0
  218. package/lib/hooks/index.js +9 -0
  219. package/lib/hooks/useDeprecationWarning/index.js +8 -0
  220. package/lib/hooks/useDeprecationWarning/useDeprecationWarning.js +13 -0
  221. package/lib/hooks/useDeviceOrientation/index.js +8 -0
  222. package/lib/hooks/useDeviceOrientation/useDeviceOrientation.js +37 -0
  223. package/lib/hooks/usePressableContainerStyles/index.js +5 -0
  224. package/lib/hooks/usePressableContainerStyles/usePressableContainerStyles.js +19 -0
  225. package/lib/index.js +14 -0
  226. package/lib/primitives/Button/Button.js +31 -0
  227. package/lib/primitives/Button/index.js +8 -0
  228. package/lib/primitives/Button/styles.js +55 -0
  229. package/lib/primitives/Button/types.js +2 -0
  230. package/lib/primitives/Carousel/Carousel.js +53 -0
  231. package/lib/primitives/Carousel/CarouselPageIndicator.js +14 -0
  232. package/lib/primitives/Carousel/constants.js +21 -0
  233. package/lib/primitives/Carousel/index.js +10 -0
  234. package/lib/primitives/Carousel/styles.js +14 -0
  235. package/lib/primitives/Carousel/types.js +2 -0
  236. package/lib/primitives/Checkbox/Checkbox.js +28 -0
  237. package/lib/primitives/Checkbox/index.js +8 -0
  238. package/lib/primitives/Checkbox/styles.js +28 -0
  239. package/lib/primitives/Checkbox/types.js +2 -0
  240. package/lib/primitives/Divider/Divider.js +22 -0
  241. package/lib/primitives/Divider/index.js +8 -0
  242. package/lib/primitives/Divider/styles.js +28 -0
  243. package/lib/primitives/Divider/types.js +2 -0
  244. package/lib/primitives/ErrorMessage/ErrorMessage.js +22 -0
  245. package/lib/primitives/ErrorMessage/index.js +8 -0
  246. package/lib/primitives/ErrorMessage/styles.js +30 -0
  247. package/lib/primitives/ErrorMessage/types.js +2 -0
  248. package/lib/primitives/Heading/Heading.js +15 -0
  249. package/lib/primitives/Heading/index.js +8 -0
  250. package/lib/primitives/Heading/styles.js +51 -0
  251. package/lib/primitives/Heading/types.js +2 -0
  252. package/lib/primitives/Icon/Icon.js +22 -0
  253. package/lib/primitives/Icon/constants.js +10 -0
  254. package/lib/primitives/Icon/index.js +10 -0
  255. package/lib/primitives/Icon/styles.js +34 -0
  256. package/lib/primitives/Icon/types.js +2 -0
  257. package/lib/primitives/IconButton/IconButton.js +26 -0
  258. package/lib/primitives/IconButton/index.js +8 -0
  259. package/lib/primitives/IconButton/styles.js +21 -0
  260. package/lib/primitives/IconButton/types.js +2 -0
  261. package/lib/primitives/Label/Label.js +16 -0
  262. package/lib/primitives/Label/index.js +8 -0
  263. package/lib/primitives/Label/styles.js +45 -0
  264. package/lib/primitives/Label/types.js +2 -0
  265. package/lib/primitives/Label/utils.js +25 -0
  266. package/lib/primitives/PasswordField/PasswordField.js +24 -0
  267. package/lib/primitives/PasswordField/index.js +8 -0
  268. package/lib/primitives/PasswordField/styles.js +17 -0
  269. package/lib/primitives/PasswordField/types.js +2 -0
  270. package/lib/primitives/PhoneNumberField/PhoneNumberField.js +13 -0
  271. package/lib/primitives/PhoneNumberField/index.js +8 -0
  272. package/lib/primitives/PhoneNumberField/styles.js +22 -0
  273. package/lib/primitives/PhoneNumberField/types.js +2 -0
  274. package/lib/primitives/Radio/Radio.js +46 -0
  275. package/lib/primitives/Radio/getRadioDimensions.js +43 -0
  276. package/lib/primitives/Radio/index.js +8 -0
  277. package/lib/primitives/Radio/styles.js +68 -0
  278. package/lib/primitives/Radio/types.js +2 -0
  279. package/lib/primitives/RadioGroup/RadioGroup.js +55 -0
  280. package/lib/primitives/RadioGroup/index.js +8 -0
  281. package/lib/primitives/RadioGroup/styles.js +20 -0
  282. package/lib/primitives/RadioGroup/types.js +2 -0
  283. package/lib/primitives/Tabs/Tab.js +27 -0
  284. package/lib/primitives/Tabs/Tabs.js +29 -0
  285. package/lib/primitives/Tabs/index.js +10 -0
  286. package/lib/primitives/Tabs/styles.js +58 -0
  287. package/lib/primitives/Tabs/types.js +2 -0
  288. package/lib/primitives/TextField/TextField.js +31 -0
  289. package/lib/primitives/TextField/index.js +8 -0
  290. package/lib/primitives/TextField/styles.js +46 -0
  291. package/lib/primitives/TextField/types.js +2 -0
  292. package/lib/primitives/index.js +18 -0
  293. package/lib/theme/ThemeContext.js +9 -0
  294. package/lib/theme/ThemeProvider.js +12 -0
  295. package/lib/theme/createTheme.js +113 -0
  296. package/lib/theme/defaultTheme.js +11 -0
  297. package/lib/theme/index.js +12 -0
  298. package/lib/theme/types.js +2 -0
  299. package/lib/theme/useTheme.js +11 -0
  300. package/lib/utils/font.js +8 -0
  301. package/lib/utils/index.js +10 -0
  302. package/lib/utils/platform.js +21 -0
  303. package/lib/version.js +4 -0
  304. package/package.json +29 -33
  305. package/src/Authenticator/Authenticator.tsx +9 -6
  306. package/src/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.tsx +26 -6
  307. package/src/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.tsx +24 -6
  308. package/src/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.tsx +24 -6
  309. package/src/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.tsx +24 -6
  310. package/src/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.tsx +26 -6
  311. package/src/Authenticator/Defaults/ResetPassword/ResetPassword.tsx +24 -6
  312. package/src/Authenticator/Defaults/SetupTOTP/SetupTOTP.tsx +24 -6
  313. package/src/Authenticator/Defaults/SignIn/SignIn.tsx +14 -5
  314. package/src/Authenticator/Defaults/SignUp/SignUp.tsx +20 -5
  315. package/src/Authenticator/Defaults/VerifyUser/VerifyUser.tsx +14 -6
  316. package/src/Authenticator/Defaults/types.ts +63 -49
  317. package/src/Authenticator/common/DefaultContent/DefaultContent.tsx +2 -0
  318. package/src/Authenticator/common/DefaultContent/styles.ts +1 -2
  319. package/src/Authenticator/common/DefaultContent/types.ts +1 -4
  320. package/src/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.tsx +8 -6
  321. package/src/Authenticator/common/DefaultFormFields/DefaultTextFormFields.tsx +10 -7
  322. package/src/Authenticator/common/DefaultFormFields/types.ts +15 -5
  323. package/src/Authenticator/common/FederatedProviderButton/types.ts +3 -1
  324. package/src/Authenticator/hooks/types.ts +3 -0
  325. package/src/Authenticator/hooks/useFieldValues/types.ts +5 -0
  326. package/src/Authenticator/hooks/useFieldValues/useFieldValues.ts +26 -1
  327. package/src/Authenticator/hooks/useFieldValues/utils.ts +44 -1
  328. package/src/assets/icons/icons.ts +20 -0
  329. package/src/assets/icons/index.ts +1 -17
  330. package/src/assets/index.ts +1 -1
  331. package/src/hooks/index.ts +1 -0
  332. package/src/hooks/useDeprecationWarning/index.ts +1 -0
  333. package/src/hooks/useDeprecationWarning/useDeprecationWarning.ts +21 -0
  334. package/src/hooks/useDeviceOrientation/useDeviceOrientation.ts +5 -1
  335. package/src/primitives/Carousel/Carousel.tsx +1 -10
  336. package/src/primitives/ErrorMessage/ErrorMessage.tsx +4 -1
  337. package/src/primitives/Heading/styles.ts +5 -5
  338. package/src/primitives/Icon/Icon.tsx +2 -0
  339. package/src/primitives/Label/styles.ts +2 -2
  340. package/src/primitives/Radio/styles.ts +2 -1
  341. package/src/primitives/RadioGroup/RadioGroup.tsx +6 -1
  342. package/src/primitives/Tabs/Tabs.tsx +4 -1
  343. package/src/primitives/TextField/TextField.tsx +2 -1
  344. package/src/primitives/TextField/styles.ts +6 -3
  345. package/src/primitives/TextField/types.ts +1 -0
  346. package/src/theme/createTheme.ts +44 -21
  347. package/src/theme/types.ts +17 -16
  348. package/src/utils/platform.ts +2 -0
  349. package/src/version.ts +1 -1
  350. package/.eslintrc.js +0 -12
  351. package/.lintstagedrc.js +0 -6
  352. package/.turbo/turbo-build.log +0 -3
  353. package/CHANGELOG.md +0 -262
  354. package/babel.config.js +0 -3
  355. package/jest.config.js +0 -21
  356. package/jest.setup.js +0 -3
  357. package/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/ConfirmResetPassword.spec.tsx +0 -88
  358. package/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/__snapshots__/ConfirmResetPassword.spec.tsx.snap +0 -1073
  359. package/src/Authenticator/Defaults/ConfirmSignIn/__tests__/ConfirmSignIn.spec.tsx +0 -77
  360. package/src/Authenticator/Defaults/ConfirmSignIn/__tests__/__snapshots__/ConfirmSignIn.spec.tsx.snap +0 -499
  361. package/src/Authenticator/Defaults/ConfirmSignUp/__tests__/ConfirmSignUp.spec.tsx +0 -63
  362. package/src/Authenticator/Defaults/ConfirmSignUp/__tests__/__snapshots__/ConfirmSignUp.spec.tsx.snap +0 -512
  363. package/src/Authenticator/Defaults/ConfirmVerifyUser/__tests__/ConfirmVerifyUser.spec.tsx +0 -70
  364. package/src/Authenticator/Defaults/ConfirmVerifyUser/__tests__/__snapshots__/ConfirmVerifyUser.spec.tsx.snap +0 -476
  365. package/src/Authenticator/Defaults/ForceNewPassword/__tests__/ForceNewPassword.spec.tsx +0 -78
  366. package/src/Authenticator/Defaults/ForceNewPassword/__tests__/__snapshots__/ForceNewPassword.spec.tsx.snap +0 -874
  367. package/src/Authenticator/Defaults/ResetPassword/__tests__/ResetPassword.spec.tsx +0 -77
  368. package/src/Authenticator/Defaults/ResetPassword/__tests__/__snapshots__/ResetPassword.spec.tsx.snap +0 -499
  369. package/src/Authenticator/Defaults/SetupTOTP/__tests__/SetupTOTP.spec.tsx +0 -84
  370. package/src/Authenticator/Defaults/SetupTOTP/__tests__/__snapshots__/SetupTOTP.spec.tsx.snap +0 -589
  371. package/src/Authenticator/Defaults/SignIn/__tests__/SignIn.spec.tsx +0 -66
  372. package/src/Authenticator/Defaults/SignIn/__tests__/__snapshots__/SignIn.spec.tsx.snap +0 -1259
  373. package/src/Authenticator/Defaults/SignUp/__tests__/SignUp.spec.tsx +0 -101
  374. package/src/Authenticator/Defaults/SignUp/__tests__/__snapshots__/SignUp.spec.tsx.snap +0 -3076
  375. package/src/Authenticator/Defaults/VerifyUser/__tests__/VerifyUser.spec.tsx +0 -106
  376. package/src/Authenticator/Defaults/VerifyUser/__tests__/__snapshots__/VerifyUser.spec.tsx.snap +0 -675
  377. package/src/Authenticator/__tests__/Authenticator.spec.tsx +0 -134
  378. package/src/Authenticator/__tests__/__snapshots__/Authenticator.spec.tsx.snap +0 -98
  379. package/src/Authenticator/__tests__/__snapshots__/withAuthenticator.spec.tsx.snap +0 -68
  380. package/src/Authenticator/__tests__/withAuthenticator.spec.tsx +0 -73
  381. package/src/Authenticator/common/DefaultContainer/__tests__/DefaultContainer.spec.tsx +0 -19
  382. package/src/Authenticator/common/DefaultContainer/__tests__/__snapshots__/DefaultContainer.spec.tsx.snap +0 -83
  383. package/src/Authenticator/common/DefaultFooter/__tests__/DefaultFooter.spec.tsx +0 -26
  384. package/src/Authenticator/common/DefaultFooter/__tests__/__snapshots__/DefaultFooter.spec.tsx.snap +0 -40
  385. package/src/Authenticator/common/DefaultFormFields/__tests__/DefaultFormFields.spec.tsx +0 -15
  386. package/src/Authenticator/common/DefaultFormFields/__tests__/FieldErrors.spec.tsx +0 -29
  387. package/src/Authenticator/common/DefaultFormFields/__tests__/__snapshots__/DefaultFormFields.spec.tsx.snap +0 -3
  388. package/src/Authenticator/common/DefaultFormFields/__tests__/__snapshots__/FieldErrors.spec.tsx.snap +0 -32
  389. package/src/Authenticator/common/DefaultHeader/__tests__/DefaultHeader.spec.tsx +0 -23
  390. package/src/Authenticator/common/DefaultHeader/__tests__/__snapshots__/DefaultHeader.spec.tsx.snap +0 -24
  391. package/src/Authenticator/common/FederatedProviderButton/__tests__/FederatedProviderButton.spec.tsx +0 -67
  392. package/src/Authenticator/common/FederatedProviderButton/__tests__/__snapshots__/FederatedProviderButton.spec.tsx.snap +0 -185
  393. package/src/Authenticator/common/FederatedProviderButtons/__tests__/FederatedProviderButtons.spec.tsx +0 -55
  394. package/src/Authenticator/common/FederatedProviderButtons/__tests__/__snapshots__/FederatedProviderButtons.spec.tsx.snap +0 -167
  395. package/src/Authenticator/hooks/useFieldValues/__tests__/useFieldValues.spec.ts +0 -326
  396. package/src/Authenticator/hooks/useFieldValues/__tests__/utils.spec.ts +0 -216
  397. package/src/InAppMessaging/components/BannerMessage/__tests__/BannerMessage.spec.tsx +0 -151
  398. package/src/InAppMessaging/components/BannerMessage/__tests__/__snapshots__/BannerMessage.spec.tsx.snap +0 -618
  399. package/src/InAppMessaging/components/CarouselMessage/__tests__/CarouselMessage.spec.tsx +0 -92
  400. package/src/InAppMessaging/components/CarouselMessage/__tests__/CarouselMessageItem.spec.tsx +0 -50
  401. package/src/InAppMessaging/components/CarouselMessage/__tests__/__snapshots__/CarouselMessage.spec.tsx.snap +0 -124
  402. package/src/InAppMessaging/components/CarouselMessage/__tests__/__snapshots__/CarouselMessageItem.spec.tsx.snap +0 -248
  403. package/src/InAppMessaging/components/FullScreenMessage/__tests__/FullScreenMessage.spec.tsx +0 -53
  404. package/src/InAppMessaging/components/FullScreenMessage/__tests__/__snapshots__/FullScreenMessage.spec.tsx.snap +0 -238
  405. package/src/InAppMessaging/components/InAppMessageDisplay/__tests__/InAppMessageDisplay.spec.tsx +0 -34
  406. package/src/InAppMessaging/components/InAppMessageDisplay/__tests__/__snapshots__/InAppMessageDisplay.spec.tsx.snap +0 -9
  407. package/src/InAppMessaging/components/InAppMessageDisplay/__tests__/handleMessageLinkAction.spec.ts +0 -51
  408. package/src/InAppMessaging/components/MessageWrapper/__tests__/MessageWrapper.spec.tsx +0 -19
  409. package/src/InAppMessaging/components/MessageWrapper/__tests__/__snapshots__/MessageWrapper.spec.tsx.snap +0 -35
  410. package/src/InAppMessaging/components/ModalMessage/__tests__/ModalMessage.spec.tsx +0 -169
  411. package/src/InAppMessaging/components/ModalMessage/__tests__/__snapshots__/ModalMessage.spec.tsx.snap +0 -727
  412. package/src/InAppMessaging/components/withInAppMessaging/__tests__/__snapshots__/withInAppMessaging.spec.tsx.snap +0 -3
  413. package/src/InAppMessaging/components/withInAppMessaging/__tests__/withInAppMessaging.spec.tsx +0 -15
  414. package/src/InAppMessaging/hooks/useMessageImage/__tests__/useMessageImage.spec.ts +0 -141
  415. package/src/InAppMessaging/hooks/useMessageImage/__tests__/utils.spec.ts +0 -107
  416. package/src/InAppMessaging/hooks/useMessageProps/__tests__/__snapshots__/utils.spec.ts.snap +0 -223
  417. package/src/InAppMessaging/hooks/useMessageProps/__tests__/useMessageProps.spec.ts +0 -162
  418. package/src/InAppMessaging/hooks/useMessageProps/__tests__/utils.spec.ts +0 -355
  419. package/src/__mocks__/@react-native-async-storage/async-storage.ts +0 -2
  420. package/src/__mocks__/@react-native-community/netinfo.ts +0 -3
  421. package/src/__mocks__/react-native-safe-area-context.ts +0 -9
  422. package/src/__tests__/__snapshots__/index.spec.ts.snap +0 -26
  423. package/src/__tests__/index.spec.ts +0 -8
  424. package/src/hooks/useDeviceOrientation/__tests__/useDeviceOrientation.spec.ts +0 -89
  425. package/src/hooks/usePressableContainerStyles/__tests__/usePressableContainerStyles.spec.ts +0 -68
  426. package/src/primitives/Button/__tests__/Button.spec.tsx +0 -92
  427. package/src/primitives/Button/__tests__/__snapshots__/Button.spec.tsx.snap +0 -143
  428. package/src/primitives/Carousel/__tests__/Carousel.spec.tsx +0 -174
  429. package/src/primitives/Carousel/__tests__/CarouselPageIndicator.spec.tsx +0 -73
  430. package/src/primitives/Carousel/__tests__/__snapshots__/Carousel.spec.tsx.snap +0 -310
  431. package/src/primitives/Carousel/__tests__/__snapshots__/CarouselPageIndicator.spec.tsx.snap +0 -191
  432. package/src/primitives/Checkbox/__tests__/Checkbox.spec.tsx +0 -150
  433. package/src/primitives/Checkbox/__tests__/__snapshots__/Checkbox.spec.tsx.snap +0 -527
  434. package/src/primitives/Divider/__tests__/Divider.spec.tsx +0 -50
  435. package/src/primitives/Divider/__tests__/__snapshots__/Divider.spec.tsx.snap +0 -165
  436. package/src/primitives/ErrorMessage/__tests__/ErrorMessage.spec.tsx +0 -60
  437. package/src/primitives/ErrorMessage/__tests__/__snapshots__/ErrorMessage.spec.tsx.snap +0 -123
  438. package/src/primitives/Heading/__tests__/Heading.spec.tsx +0 -73
  439. package/src/primitives/Heading/__tests__/__snapshots__/Heading.spec.tsx.snap +0 -171
  440. package/src/primitives/Icon/__tests__/Icon.spec.tsx +0 -100
  441. package/src/primitives/Icon/__tests__/__snapshots__/Icon.spec.tsx.snap +0 -139
  442. package/src/primitives/IconButton/__tests__/IconButton.spec.tsx +0 -71
  443. package/src/primitives/IconButton/__tests__/__snapshots__/IconButton.spec.tsx.snap +0 -192
  444. package/src/primitives/Label/__tests__/Label.spec.tsx +0 -75
  445. package/src/primitives/Label/__tests__/__snapshots__/Label.spec.tsx.snap +0 -91
  446. package/src/primitives/PasswordField/__tests__/PasswordField.spec.tsx +0 -110
  447. package/src/primitives/PasswordField/__tests__/__snapshots__/PasswordField.spec.tsx.snap +0 -620
  448. package/src/primitives/PhoneNumberField/__tests__/PhoneNumberField.spec.tsx +0 -53
  449. package/src/primitives/PhoneNumberField/__tests__/__snapshots__/PhoneNumberField.spec.tsx.snap +0 -182
  450. package/src/primitives/Radio/__tests__/Radio.spec.tsx +0 -166
  451. package/src/primitives/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +0 -669
  452. package/src/primitives/RadioGroup/__tests__/RadioGroup.spec.tsx +0 -183
  453. package/src/primitives/RadioGroup/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +0 -1765
  454. package/src/primitives/Tabs/__tests__/Tab.spec.tsx +0 -75
  455. package/src/primitives/Tabs/__tests__/Tabs.spec.tsx +0 -81
  456. package/src/primitives/Tabs/__tests__/__snapshots__/Tab.spec.tsx.snap +0 -278
  457. package/src/primitives/Tabs/__tests__/__snapshots__/Tabs.spec.tsx.snap +0 -163
  458. package/src/primitives/TextField/__tests__/TextField.spec.tsx +0 -153
  459. package/src/primitives/TextField/__tests__/__snapshots__/TextField.spec.tsx.snap +0 -501
  460. package/src/theme/__tests__/ThemeProvider.spec.tsx +0 -23
  461. package/src/theme/__tests__/__snapshots__/useTheme.spec.tsx.snap +0 -226
  462. package/src/theme/__tests__/createTheme.spec.ts +0 -196
  463. package/src/theme/__tests__/useTheme.spec.tsx +0 -51
  464. package/tsconfig.dist.json +0 -4
  465. package/tsconfig.json +0 -9
  466. /package/{dist/assets → lib/assets/icons}/index.ts +0 -0
@@ -1,162 +1,178 @@
1
+ /// <reference types="react" />
1
2
  /// <reference types="amazon-cognito-identity-js" />
2
- import React from 'react';
3
3
  import { DefaultContainer } from './common';
4
4
  import { AuthenticatorProps } from './types';
5
5
  declare function Authenticator({ children, components: overrides, Container, Footer, Header, ...options }: AuthenticatorProps): JSX.Element | null;
6
6
  declare namespace Authenticator {
7
7
  var Container: typeof DefaultContainer;
8
8
  var Provider: typeof import("@aws-amplify/ui-react-core").AuthenticatorProvider;
9
- var ConfirmResetPassword: (React.ComponentClass<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
10
- resendCode: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
11
- validationErrors?: import("@aws-amplify/ui").ValidationError | undefined;
12
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
13
- fields: import("./hooks").TextFieldOptionsType[];
14
- } & {
15
- style?: import("./Defaults/types").ConfirmResetPasswordStyle | undefined;
16
- }, any> | React.FunctionComponent<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
17
- resendCode: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
18
- validationErrors?: import("@aws-amplify/ui").ValidationError | undefined;
19
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
20
- fields: import("./hooks").TextFieldOptionsType[];
21
- } & {
22
- style?: import("./Defaults/types").ConfirmResetPasswordStyle | undefined;
23
- }>) & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType>;
24
- var ConfirmSignIn: (React.ComponentClass<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
25
- challengeName: import("amazon-cognito-identity-js").ChallengeName;
26
- toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
27
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
28
- fields: import("./hooks").TextFieldOptionsType[];
29
- } & {
30
- style?: import("./Defaults/types").ConfirmSignInStyle | undefined;
31
- }, any> | React.FunctionComponent<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
32
- challengeName: import("amazon-cognito-identity-js").ChallengeName;
33
- toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
34
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
35
- fields: import("./hooks").TextFieldOptionsType[];
36
- } & {
37
- style?: import("./Defaults/types").ConfirmSignInStyle | undefined;
38
- }>) & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType>;
39
- var ConfirmSignUp: (React.ComponentClass<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
40
- codeDeliveryDetails: import("@aws-amplify/ui").CodeDeliveryDetails;
41
- resendCode: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
42
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
43
- fields: import("./hooks").TextFieldOptionsType[];
44
- } & {
45
- style?: import("./Defaults/types").ConfirmSignUpStyle | undefined;
46
- }, any> | React.FunctionComponent<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
47
- codeDeliveryDetails: import("@aws-amplify/ui").CodeDeliveryDetails;
48
- resendCode: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
49
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
50
- fields: import("./hooks").TextFieldOptionsType[];
51
- } & {
52
- style?: import("./Defaults/types").ConfirmSignUpStyle | undefined;
53
- }>) & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType>;
54
- var ConfirmVerifyUser: (React.ComponentClass<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
55
- skipVerification: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
56
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
57
- fields: import("./hooks").TextFieldOptionsType[];
58
- } & {
59
- style?: import("./Defaults/types").ConfirmVerifyUserStyle | undefined;
60
- }, any> | React.FunctionComponent<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
61
- skipVerification: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
62
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
63
- fields: import("./hooks").TextFieldOptionsType[];
64
- } & {
65
- style?: import("./Defaults/types").ConfirmVerifyUserStyle | undefined;
66
- }>) & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType>;
67
- var ForceNewPassword: (React.ComponentClass<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
68
- toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
69
- validationErrors?: import("@aws-amplify/ui").ValidationError | undefined;
70
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
71
- fields: import("./hooks").TextFieldOptionsType[];
72
- } & {
73
- style?: import("./Defaults/types").ForceNewPasswordStyle | undefined;
74
- }, any> | React.FunctionComponent<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
75
- toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
76
- validationErrors?: import("@aws-amplify/ui").ValidationError | undefined;
77
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
78
- fields: import("./hooks").TextFieldOptionsType[];
79
- } & {
80
- style?: import("./Defaults/types").ForceNewPasswordStyle | undefined;
81
- }>) & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType>;
82
- var ResetPassword: (React.ComponentClass<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
83
- toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
84
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
85
- fields: import("./hooks").TextFieldOptionsType[];
86
- } & {
87
- style?: import("./Defaults/types").ResetPasswordStyle | undefined;
88
- }, any> | React.FunctionComponent<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
89
- toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
90
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
91
- fields: import("./hooks").TextFieldOptionsType[];
92
- } & {
93
- style?: import("./Defaults/types").ResetPasswordStyle | undefined;
94
- }>) & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType>;
95
- var SetupTOTP: (React.ComponentClass<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
96
- toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
97
- totpSecretCode: string | null;
98
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
99
- fields: import("./hooks").TextFieldOptionsType[];
100
- } & {
101
- style?: import("./Defaults/types").SetupTOTPStyle | undefined;
102
- }, any> | React.FunctionComponent<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
103
- toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
104
- totpSecretCode: string | null;
105
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
106
- fields: import("./hooks").TextFieldOptionsType[];
107
- } & {
108
- style?: import("./Defaults/types").SetupTOTPStyle | undefined;
109
- }>) & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType>;
110
- var SignIn: (React.ComponentClass<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
111
- hideSignUp?: boolean | undefined;
112
- toFederatedSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
113
- toResetPassword: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
114
- toSignUp: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
115
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
116
- fields: import("./hooks").TextFieldOptionsType[];
117
- } & {
118
- style?: import("./Defaults/types").SignInStyle | undefined;
119
- }, any> | React.FunctionComponent<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
120
- hideSignUp?: boolean | undefined;
121
- toFederatedSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
122
- toResetPassword: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
123
- toSignUp: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
124
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
125
- fields: import("./hooks").TextFieldOptionsType[];
126
- } & {
127
- style?: import("./Defaults/types").SignInStyle | undefined;
128
- }>) & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType>;
129
- var SignUp: (React.ComponentClass<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
130
- hideSignIn?: boolean | undefined;
131
- toFederatedSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
132
- toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
133
- validationErrors?: import("@aws-amplify/ui").ValidationError | undefined;
134
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
135
- fields: import("./hooks").TextFieldOptionsType[];
136
- } & {
137
- style?: import("./Defaults/types").SignUpStyle | undefined;
138
- }, any> | React.FunctionComponent<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
139
- hideSignIn?: boolean | undefined;
140
- toFederatedSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
141
- toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
142
- validationErrors?: import("@aws-amplify/ui").ValidationError | undefined;
143
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
144
- fields: import("./hooks").TextFieldOptionsType[];
145
- } & {
146
- style?: import("./Defaults/types").SignUpStyle | undefined;
147
- }>) & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType>;
148
- var VerifyUser: (React.ComponentClass<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").RadioFieldOptions> & {
149
- skipVerification: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
150
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
151
- fields: import("./hooks").RadioFieldOptions[];
152
- } & {
153
- style?: import("./Defaults/types").VerifyUserStyle | undefined;
154
- }, any> | React.FunctionComponent<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").RadioFieldOptions> & {
155
- skipVerification: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
156
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
157
- fields: import("./hooks").RadioFieldOptions[];
158
- } & {
159
- style?: import("./Defaults/types").VerifyUserStyle | undefined;
160
- }>) & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").RadioFieldOptions>;
9
+ var ConfirmResetPassword: {
10
+ ({ fields, handleBlur, handleChange, handleSubmit, hasValidationErrors, isPending, resendCode, validationErrors, ...rest }: import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
11
+ resendCode: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
12
+ } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ValidationProps & {
13
+ fields: import("./hooks").TextFieldOptionsType[];
14
+ } & {
15
+ style?: import("./Defaults/types").ConfirmResetPasswordStyle | undefined;
16
+ }): JSX.Element;
17
+ Footer: typeof import("./common").DefaultFooter;
18
+ FormFields: {
19
+ ({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
20
+ displayName: string;
21
+ };
22
+ Header: typeof import("./common").DefaultHeader;
23
+ displayName: string;
24
+ };
25
+ var ConfirmSignIn: {
26
+ ({ challengeName, fields, handleBlur, handleChange, handleSubmit, isPending, toSignIn, validationErrors, ...rest }: import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
27
+ challengeName: import("amazon-cognito-identity-js").ChallengeName;
28
+ toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
29
+ } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ValidationProps & {
30
+ fields: import("./hooks").TextFieldOptionsType[];
31
+ } & {
32
+ style?: import("./Defaults/types").ConfirmSignInStyle | undefined;
33
+ }): JSX.Element;
34
+ Footer: typeof import("./common").DefaultFooter;
35
+ FormFields: {
36
+ ({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
37
+ displayName: string;
38
+ };
39
+ Header: typeof import("./common").DefaultHeader;
40
+ displayName: string;
41
+ };
42
+ var ConfirmSignUp: {
43
+ ({ codeDeliveryDetails, fields, handleBlur, handleChange, handleSubmit, isPending, resendCode, validationErrors, ...rest }: import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
44
+ codeDeliveryDetails: import("@aws-amplify/ui").CodeDeliveryDetails;
45
+ resendCode: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
46
+ } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ValidationProps & {
47
+ fields: import("./hooks").TextFieldOptionsType[];
48
+ } & {
49
+ style?: import("./Defaults/types").ConfirmSignUpStyle | undefined;
50
+ }): JSX.Element;
51
+ FormFields: {
52
+ ({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
53
+ displayName: string;
54
+ };
55
+ Footer: typeof import("./common").DefaultFooter;
56
+ Header: typeof import("./common").DefaultHeader;
57
+ displayName: string;
58
+ };
59
+ var ConfirmVerifyUser: {
60
+ ({ fields, handleBlur, handleChange, handleSubmit, isPending, skipVerification, validationErrors, ...rest }: import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
61
+ skipVerification: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
62
+ } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ValidationProps & {
63
+ fields: import("./hooks").TextFieldOptionsType[];
64
+ } & {
65
+ style?: import("./Defaults/types").ConfirmVerifyUserStyle | undefined;
66
+ }): JSX.Element;
67
+ Footer: typeof import("./common").DefaultFooter;
68
+ FormFields: {
69
+ ({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
70
+ displayName: string;
71
+ };
72
+ Header: typeof import("./common").DefaultHeader;
73
+ displayName: string;
74
+ };
75
+ var ForceNewPassword: {
76
+ ({ fields, handleBlur, handleChange, handleSubmit, hasValidationErrors, isPending, toSignIn, validationErrors, ...rest }: import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
77
+ toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
78
+ } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ValidationProps & {
79
+ fields: import("./hooks").TextFieldOptionsType[];
80
+ } & {
81
+ style?: import("./Defaults/types").ForceNewPasswordStyle | undefined;
82
+ }): JSX.Element;
83
+ Footer: typeof import("./common").DefaultFooter;
84
+ FormFields: {
85
+ ({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
86
+ displayName: string;
87
+ };
88
+ Header: typeof import("./common").DefaultHeader;
89
+ displayName: string;
90
+ };
91
+ var ResetPassword: {
92
+ ({ fields, handleBlur, handleChange, handleSubmit, isPending, toSignIn, validationErrors, ...rest }: import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
93
+ toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
94
+ } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ValidationProps & {
95
+ fields: import("./hooks").TextFieldOptionsType[];
96
+ } & {
97
+ style?: import("./Defaults/types").ResetPasswordStyle | undefined;
98
+ }): JSX.Element;
99
+ Footer: typeof import("./common").DefaultFooter;
100
+ FormFields: {
101
+ ({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
102
+ displayName: string;
103
+ };
104
+ Header: typeof import("./common").DefaultHeader;
105
+ displayName: string;
106
+ };
107
+ var SetupTOTP: {
108
+ ({ fields, handleBlur, handleChange, handleSubmit, isPending, toSignIn, totpSecretCode, validationErrors, ...rest }: import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
109
+ toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
110
+ totpSecretCode: string | null;
111
+ } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ValidationProps & {
112
+ fields: import("./hooks").TextFieldOptionsType[];
113
+ } & {
114
+ style?: import("./Defaults/types").SetupTOTPStyle | undefined;
115
+ }): JSX.Element;
116
+ Footer: typeof import("./common").DefaultFooter;
117
+ FormFields: {
118
+ ({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
119
+ displayName: string;
120
+ };
121
+ Header: typeof import("./common").DefaultHeader;
122
+ displayName: string;
123
+ };
124
+ var SignIn: {
125
+ ({ fields, handleBlur, handleChange, handleSubmit, hideSignUp, toResetPassword, toSignUp, validationErrors, ...rest }: import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
126
+ hideSignUp?: boolean | undefined;
127
+ toFederatedSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
128
+ toResetPassword: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
129
+ toSignUp: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
130
+ } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ValidationProps & {
131
+ fields: import("./hooks").TextFieldOptionsType[];
132
+ } & {
133
+ style?: import("./Defaults/types").SignInStyle | undefined;
134
+ }): JSX.Element;
135
+ Footer: typeof import("./common").DefaultFooter;
136
+ FormFields: {
137
+ ({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
138
+ displayName: string;
139
+ };
140
+ Header: typeof import("./common").DefaultHeader;
141
+ displayName: string;
142
+ };
143
+ var SignUp: {
144
+ ({ fields, handleBlur, handleChange, handleSubmit, hasValidationErrors, hideSignIn, isPending, toSignIn, validationErrors, ...rest }: import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
145
+ hideSignIn?: boolean | undefined;
146
+ toFederatedSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
147
+ toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
148
+ } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ValidationProps & {
149
+ fields: import("./hooks").TextFieldOptionsType[];
150
+ } & {
151
+ style?: import("./Defaults/types").SignUpStyle | undefined;
152
+ }): JSX.Element;
153
+ Footer: typeof import("./common").DefaultFooter;
154
+ FormFields: {
155
+ ({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
156
+ displayName: string;
157
+ };
158
+ Header: typeof import("./common").DefaultHeader;
159
+ displayName: string;
160
+ };
161
+ var VerifyUser: {
162
+ ({ fields, handleBlur, handleChange, handleSubmit, skipVerification, validationErrors, ...rest }: import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").RadioFieldOptions> & {
163
+ skipVerification: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
164
+ } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ValidationProps & {
165
+ fields: import("./hooks").RadioFieldOptions[];
166
+ } & {
167
+ style?: import("./Defaults/types").VerifyUserStyle | undefined;
168
+ }): JSX.Element;
169
+ Footer: typeof import("./common").DefaultFooter;
170
+ FormFields: {
171
+ ({ fields, fieldContainerStyle, fieldLabelStyle, isPending, style, }: import("./common/DefaultFormFields/types").DefaultRadioFormFieldsProps): JSX.Element;
172
+ displayName: string;
173
+ };
174
+ Header: typeof import("./common").DefaultHeader;
175
+ displayName: string;
176
+ };
161
177
  }
162
178
  export default Authenticator;
@@ -2,6 +2,7 @@ import React, { useMemo } from 'react';
2
2
  import { SafeAreaProvider } from 'react-native-safe-area-context';
3
3
  import { AuthenticatorProvider as Provider, resolveAuthenticatorComponents, useAuthenticator, useAuthenticatorRoute, useAuthenticatorInitMachine, } from '@aws-amplify/ui-react-core';
4
4
  import { configureComponent } from '@aws-amplify/ui';
5
+ import { useDeprecationWarning } from '../hooks';
5
6
  import { DefaultContainer, InnerContainer } from './common';
6
7
  import { getRouteTypedFields } from './hooks';
7
8
  import { VERSION } from '../version';
@@ -18,11 +19,14 @@ const DEFAULTS = {
18
19
  SignUp,
19
20
  VerifyUser,
20
21
  };
21
- const isAuthenticatedRoute = (route) => route === 'authenticated' || route === 'signOut';
22
22
  const routePropSelector = ({ route, }) => [
23
23
  route,
24
24
  ];
25
25
  function Authenticator({ children, components: overrides, Container = DefaultContainer, Footer, Header, ...options }) {
26
+ useDeprecationWarning({
27
+ message: 'The `passwordSettings` prop has been deprecated and will be removed in a future major version of Amplify UI.',
28
+ shouldWarn: !!options?.passwordSettings,
29
+ });
26
30
  React.useEffect(() => {
27
31
  configureComponent({
28
32
  packageName: '@aws-amplify/ui-react-native',
@@ -30,13 +34,13 @@ function Authenticator({ children, components: overrides, Container = DefaultCon
30
34
  });
31
35
  }, []);
32
36
  useAuthenticatorInitMachine(options);
33
- const { fields, route } = useAuthenticator(routePropSelector);
37
+ const { authStatus, fields, route } = useAuthenticator(routePropSelector);
34
38
  const components = useMemo(
35
39
  // allow any to prevent TS from assuming that all fields are of type `TextFieldOptions`
36
40
  () => resolveAuthenticatorComponents(DEFAULTS, overrides), [overrides]);
37
41
  const { Component, props } = useAuthenticatorRoute({ components });
38
42
  const typedFields = getRouteTypedFields({ fields, route });
39
- if (isAuthenticatedRoute(route)) {
43
+ if (authStatus === 'authenticated') {
40
44
  return children ? <>{children}</> : null;
41
45
  }
42
46
  return (<SafeAreaProvider>
@@ -1,3 +1,14 @@
1
- import { DefaultConfirmResetPasswordComponent } from '../types';
2
- declare const ConfirmResetPassword: DefaultConfirmResetPasswordComponent;
1
+ /// <reference types="react" />
2
+ import { DefaultFooter, DefaultHeader } from '../../common';
3
+ import { DefaultConfirmResetPasswordProps } from '../types';
4
+ declare const ConfirmResetPassword: {
5
+ ({ fields, handleBlur, handleChange, handleSubmit, hasValidationErrors, isPending, resendCode, validationErrors, ...rest }: DefaultConfirmResetPasswordProps): JSX.Element;
6
+ Footer: typeof DefaultFooter;
7
+ FormFields: {
8
+ ({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("../../common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
9
+ displayName: string;
10
+ };
11
+ Header: typeof DefaultHeader;
12
+ displayName: string;
13
+ };
3
14
  export default ConfirmResetPassword;
@@ -4,22 +4,34 @@ import { DefaultContent, DefaultFooter, DefaultTextFormFields, DefaultHeader, }
4
4
  import { useFieldValues } from '../../hooks';
5
5
  const COMPONENT_NAME = 'ConfirmResetPassword';
6
6
  const { getResetYourPasswordText, getSubmitText, getSubmittingText, getResendCodeText, } = authenticatorTextUtil;
7
- const ConfirmResetPassword = ({ fields, handleBlur, handleChange, handleSubmit, isPending, resendCode, ...rest }) => {
8
- const { fields: fieldsWithHandlers, handleFormSubmit } = useFieldValues({
7
+ const ConfirmResetPassword = ({ fields, handleBlur, handleChange, handleSubmit, hasValidationErrors, isPending, resendCode, validationErrors, ...rest }) => {
8
+ const { disableFormSubmit, fields: fieldsWithHandlers, fieldValidationErrors, handleFormSubmit, } = useFieldValues({
9
9
  componentName: COMPONENT_NAME,
10
10
  fields,
11
11
  handleBlur,
12
12
  handleChange,
13
13
  handleSubmit,
14
+ validationErrors,
14
15
  });
16
+ const disabled = hasValidationErrors || disableFormSubmit;
15
17
  const headerText = getResetYourPasswordText();
16
18
  const primaryButtonText = isPending ? getSubmittingText() : getSubmitText();
17
19
  const secondaryButtonText = getResendCodeText();
18
20
  const buttons = useMemo(() => ({
19
- primary: { children: primaryButtonText, onPress: handleFormSubmit },
21
+ primary: {
22
+ children: primaryButtonText,
23
+ disabled,
24
+ onPress: handleFormSubmit,
25
+ },
20
26
  secondary: { children: secondaryButtonText, onPress: resendCode },
21
- }), [handleFormSubmit, primaryButtonText, resendCode, secondaryButtonText]);
22
- return (<DefaultContent {...rest} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending}/>);
27
+ }), [
28
+ disabled,
29
+ handleFormSubmit,
30
+ primaryButtonText,
31
+ resendCode,
32
+ secondaryButtonText,
33
+ ]);
34
+ return (<DefaultContent {...rest} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending} validationErrors={fieldValidationErrors}/>);
23
35
  };
24
36
  ConfirmResetPassword.Footer = DefaultFooter;
25
37
  ConfirmResetPassword.FormFields = DefaultTextFormFields;
@@ -1,3 +1,14 @@
1
- import { DefaultConfirmSignInComponent } from '../types';
2
- declare const ConfirmSignIn: DefaultConfirmSignInComponent;
1
+ /// <reference types="react" />
2
+ import { DefaultFooter, DefaultHeader } from '../../common';
3
+ import { DefaultConfirmSignInProps } from '../types';
4
+ declare const ConfirmSignIn: {
5
+ ({ challengeName, fields, handleBlur, handleChange, handleSubmit, isPending, toSignIn, validationErrors, ...rest }: DefaultConfirmSignInProps): JSX.Element;
6
+ Footer: typeof DefaultFooter;
7
+ FormFields: {
8
+ ({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("../../common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
9
+ displayName: string;
10
+ };
11
+ Header: typeof DefaultHeader;
12
+ displayName: string;
13
+ };
3
14
  export default ConfirmSignIn;
@@ -4,22 +4,33 @@ import { DefaultContent, DefaultFooter, DefaultTextFormFields, DefaultHeader, }
4
4
  import { useFieldValues } from '../../hooks';
5
5
  const COMPONENT_NAME = 'ConfirmSignIn';
6
6
  const { getBackToSignInText, getChallengeText, getConfirmText, getConfirmingText, } = authenticatorTextUtil;
7
- const ConfirmSignIn = ({ challengeName, fields, handleBlur, handleChange, handleSubmit, isPending, toSignIn, ...rest }) => {
8
- const { fields: fieldsWithHandlers, handleFormSubmit } = useFieldValues({
7
+ const ConfirmSignIn = ({ challengeName, fields, handleBlur, handleChange, handleSubmit, isPending, toSignIn, validationErrors, ...rest }) => {
8
+ const { disableFormSubmit: disabled, fields: fieldsWithHandlers, fieldValidationErrors, handleFormSubmit, } = useFieldValues({
9
9
  componentName: COMPONENT_NAME,
10
10
  fields,
11
11
  handleBlur,
12
12
  handleChange,
13
13
  handleSubmit,
14
+ validationErrors,
14
15
  });
15
16
  const headerText = getChallengeText(challengeName);
16
17
  const primaryButtonText = isPending ? getConfirmingText() : getConfirmText();
17
18
  const secondaryButtonText = getBackToSignInText();
18
19
  const buttons = useMemo(() => ({
19
- primary: { children: primaryButtonText, onPress: handleFormSubmit },
20
+ primary: {
21
+ children: primaryButtonText,
22
+ disabled,
23
+ onPress: handleFormSubmit,
24
+ },
20
25
  links: [{ children: secondaryButtonText, onPress: toSignIn }],
21
- }), [handleFormSubmit, primaryButtonText, secondaryButtonText, toSignIn]);
22
- return (<DefaultContent {...rest} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending}/>);
26
+ }), [
27
+ disabled,
28
+ handleFormSubmit,
29
+ primaryButtonText,
30
+ secondaryButtonText,
31
+ toSignIn,
32
+ ]);
33
+ return (<DefaultContent {...rest} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending} validationErrors={fieldValidationErrors}/>);
23
34
  };
24
35
  ConfirmSignIn.Footer = DefaultFooter;
25
36
  ConfirmSignIn.FormFields = DefaultTextFormFields;
@@ -1,3 +1,14 @@
1
- import { DefaultConfirmSignUpComponent } from '../types';
2
- declare const ConfirmSignUp: DefaultConfirmSignUpComponent;
1
+ /// <reference types="react" />
2
+ import { DefaultFooter, DefaultHeader } from '../../common';
3
+ import { DefaultConfirmSignUpProps } from '../types';
4
+ declare const ConfirmSignUp: {
5
+ ({ codeDeliveryDetails, fields, handleBlur, handleChange, handleSubmit, isPending, resendCode, validationErrors, ...rest }: DefaultConfirmSignUpProps): JSX.Element;
6
+ FormFields: {
7
+ ({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("../../common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
8
+ displayName: string;
9
+ };
10
+ Footer: typeof DefaultFooter;
11
+ Header: typeof DefaultHeader;
12
+ displayName: string;
13
+ };
3
14
  export default ConfirmSignUp;
@@ -4,23 +4,34 @@ import { DefaultContent, DefaultFooter, DefaultTextFormFields, DefaultHeader, }
4
4
  import { useFieldValues } from '../../hooks';
5
5
  const COMPONENT_NAME = 'ConfirmSignUp';
6
6
  const { getDeliveryMethodText, getDeliveryMessageText, getConfirmingText, getConfirmText, getResendCodeText, } = authenticatorTextUtil;
7
- const ConfirmSignUp = ({ codeDeliveryDetails, fields, handleBlur, handleChange, handleSubmit, isPending, resendCode, ...rest }) => {
8
- const { fields: fieldsWithHandlers, handleFormSubmit } = useFieldValues({
7
+ const ConfirmSignUp = ({ codeDeliveryDetails, fields, handleBlur, handleChange, handleSubmit, isPending, resendCode, validationErrors, ...rest }) => {
8
+ const { disableFormSubmit: disabled, fields: fieldsWithHandlers, fieldValidationErrors, handleFormSubmit, } = useFieldValues({
9
9
  componentName: COMPONENT_NAME,
10
10
  fields,
11
11
  handleBlur,
12
12
  handleChange,
13
13
  handleSubmit,
14
+ validationErrors,
14
15
  });
15
16
  const headerText = getDeliveryMethodText(codeDeliveryDetails);
16
17
  const bodyText = getDeliveryMessageText(codeDeliveryDetails);
17
18
  const primaryButtonText = isPending ? getConfirmingText() : getConfirmText();
18
19
  const secondaryButtonText = getResendCodeText();
19
20
  const buttons = useMemo(() => ({
20
- primary: { children: primaryButtonText, onPress: handleFormSubmit },
21
+ primary: {
22
+ children: primaryButtonText,
23
+ disabled,
24
+ onPress: handleFormSubmit,
25
+ },
21
26
  secondary: { children: secondaryButtonText, onPress: resendCode },
22
- }), [handleFormSubmit, primaryButtonText, resendCode, secondaryButtonText]);
23
- return (<DefaultContent {...rest} body={bodyText} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending}/>);
27
+ }), [
28
+ disabled,
29
+ handleFormSubmit,
30
+ primaryButtonText,
31
+ resendCode,
32
+ secondaryButtonText,
33
+ ]);
34
+ return (<DefaultContent {...rest} body={bodyText} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending} validationErrors={fieldValidationErrors}/>);
24
35
  };
25
36
  ConfirmSignUp.FormFields = DefaultTextFormFields;
26
37
  ConfirmSignUp.Footer = DefaultFooter;
@@ -1,3 +1,14 @@
1
- import { DefaultConfirmVerifyUserComponent } from '../types';
2
- declare const ConfirmVerifyUser: DefaultConfirmVerifyUserComponent;
1
+ /// <reference types="react" />
2
+ import { DefaultFooter, DefaultHeader } from '../../common';
3
+ import { DefaultConfirmVerifyUserProps } from '../types';
4
+ declare const ConfirmVerifyUser: {
5
+ ({ fields, handleBlur, handleChange, handleSubmit, isPending, skipVerification, validationErrors, ...rest }: DefaultConfirmVerifyUserProps): JSX.Element;
6
+ Footer: typeof DefaultFooter;
7
+ FormFields: {
8
+ ({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("../../common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
9
+ displayName: string;
10
+ };
11
+ Header: typeof DefaultHeader;
12
+ displayName: string;
13
+ };
3
14
  export default ConfirmVerifyUser;