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

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 (113) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/dist/Authenticator/Authenticator.d.ts +101 -148
  3. package/dist/Authenticator/Authenticator.js +2 -3
  4. package/dist/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.d.ts +13 -2
  5. package/dist/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.js +4 -3
  6. package/dist/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.d.ts +13 -2
  7. package/dist/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.js +4 -3
  8. package/dist/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.d.ts +13 -2
  9. package/dist/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.js +4 -3
  10. package/dist/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.d.ts +13 -2
  11. package/dist/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.js +4 -3
  12. package/dist/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.d.ts +13 -2
  13. package/dist/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.js +4 -3
  14. package/dist/Authenticator/Defaults/ResetPassword/ResetPassword.d.ts +13 -2
  15. package/dist/Authenticator/Defaults/ResetPassword/ResetPassword.js +4 -3
  16. package/dist/Authenticator/Defaults/SetupTOTP/SetupTOTP.d.ts +13 -2
  17. package/dist/Authenticator/Defaults/SetupTOTP/SetupTOTP.js +4 -3
  18. package/dist/Authenticator/Defaults/SignIn/SignIn.d.ts +13 -2
  19. package/dist/Authenticator/Defaults/SignIn/SignIn.js +4 -3
  20. package/dist/Authenticator/Defaults/SignUp/SignUp.d.ts +13 -2
  21. package/dist/Authenticator/Defaults/SignUp/SignUp.js +4 -3
  22. package/dist/Authenticator/Defaults/VerifyUser/VerifyUser.d.ts +13 -2
  23. package/dist/Authenticator/Defaults/VerifyUser/VerifyUser.js +4 -3
  24. package/dist/Authenticator/Defaults/types.d.ts +21 -20
  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/hooks/types.d.ts +3 -2
  33. package/dist/Authenticator/hooks/useFieldValues/types.d.ts +4 -1
  34. package/dist/Authenticator/hooks/useFieldValues/useFieldValues.d.ts +1 -1
  35. package/dist/Authenticator/hooks/useFieldValues/useFieldValues.js +21 -3
  36. package/dist/Authenticator/hooks/useFieldValues/utils.d.ts +10 -1
  37. package/dist/Authenticator/hooks/useFieldValues/utils.js +32 -2
  38. package/dist/primitives/Heading/styles.js +5 -5
  39. package/dist/primitives/Label/styles.js +2 -2
  40. package/dist/primitives/TextField/TextField.js +2 -1
  41. package/dist/primitives/TextField/styles.js +6 -3
  42. package/dist/primitives/TextField/types.d.ts +1 -0
  43. package/dist/theme/createTheme.js +24 -18
  44. package/dist/theme/types.d.ts +1 -1
  45. package/dist/version.d.ts +1 -1
  46. package/dist/version.js +1 -1
  47. package/jest.config.js +1 -0
  48. package/package.json +5 -5
  49. package/src/Authenticator/Authenticator.tsx +2 -6
  50. package/src/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.tsx +7 -3
  51. package/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/__snapshots__/ConfirmResetPassword.spec.tsx.snap +34 -30
  52. package/src/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.tsx +7 -3
  53. package/src/Authenticator/Defaults/ConfirmSignIn/__tests__/ConfirmSignIn.spec.tsx +1 -0
  54. package/src/Authenticator/Defaults/ConfirmSignIn/__tests__/__snapshots__/ConfirmSignIn.spec.tsx.snap +14 -14
  55. package/src/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.tsx +7 -3
  56. package/src/Authenticator/Defaults/ConfirmSignUp/__tests__/ConfirmSignUp.spec.tsx +1 -0
  57. package/src/Authenticator/Defaults/ConfirmSignUp/__tests__/__snapshots__/ConfirmSignUp.spec.tsx.snap +12 -15
  58. package/src/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.tsx +7 -3
  59. package/src/Authenticator/Defaults/ConfirmVerifyUser/__tests__/ConfirmVerifyUser.spec.tsx +1 -0
  60. package/src/Authenticator/Defaults/ConfirmVerifyUser/__tests__/__snapshots__/ConfirmVerifyUser.spec.tsx.snap +6 -9
  61. package/src/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.tsx +7 -3
  62. package/src/Authenticator/Defaults/ForceNewPassword/__tests__/__snapshots__/ForceNewPassword.spec.tsx.snap +13 -10
  63. package/src/Authenticator/Defaults/ResetPassword/ResetPassword.tsx +7 -3
  64. package/src/Authenticator/Defaults/ResetPassword/__tests__/ResetPassword.spec.tsx +1 -0
  65. package/src/Authenticator/Defaults/ResetPassword/__tests__/__snapshots__/ResetPassword.spec.tsx.snap +14 -14
  66. package/src/Authenticator/Defaults/SetupTOTP/SetupTOTP.tsx +7 -3
  67. package/src/Authenticator/Defaults/SetupTOTP/__tests__/SetupTOTP.spec.tsx +1 -0
  68. package/src/Authenticator/Defaults/SetupTOTP/__tests__/__snapshots__/SetupTOTP.spec.tsx.snap +22 -22
  69. package/src/Authenticator/Defaults/SignIn/SignIn.tsx +7 -3
  70. package/src/Authenticator/Defaults/SignIn/__tests__/SignIn.spec.tsx +1 -0
  71. package/src/Authenticator/Defaults/SignIn/__tests__/__snapshots__/SignIn.spec.tsx.snap +36 -33
  72. package/src/Authenticator/Defaults/SignUp/SignUp.tsx +7 -3
  73. package/src/Authenticator/Defaults/SignUp/__tests__/__snapshots__/SignUp.spec.tsx.snap +111 -96
  74. package/src/Authenticator/Defaults/VerifyUser/VerifyUser.tsx +7 -3
  75. package/src/Authenticator/Defaults/VerifyUser/__tests__/VerifyUser.spec.tsx +1 -0
  76. package/src/Authenticator/Defaults/VerifyUser/__tests__/__snapshots__/VerifyUser.spec.tsx.snap +16 -18
  77. package/src/Authenticator/Defaults/types.ts +63 -49
  78. package/src/Authenticator/__tests__/Authenticator.spec.tsx +16 -19
  79. package/src/Authenticator/__tests__/__snapshots__/Authenticator.spec.tsx.snap +1 -9
  80. package/src/Authenticator/__tests__/withAuthenticator.spec.tsx +1 -1
  81. package/src/Authenticator/common/DefaultContent/styles.ts +1 -2
  82. package/src/Authenticator/common/DefaultContent/types.ts +1 -4
  83. package/src/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.tsx +8 -6
  84. package/src/Authenticator/common/DefaultFormFields/DefaultTextFormFields.tsx +10 -7
  85. package/src/Authenticator/common/DefaultFormFields/types.ts +15 -5
  86. package/src/Authenticator/common/DefaultHeader/__tests__/__snapshots__/DefaultHeader.spec.tsx.snap +1 -1
  87. package/src/Authenticator/common/FederatedProviderButton/__tests__/__snapshots__/FederatedProviderButton.spec.tsx.snap +4 -4
  88. package/src/Authenticator/common/FederatedProviderButtons/__tests__/__snapshots__/FederatedProviderButtons.spec.tsx.snap +4 -4
  89. package/src/Authenticator/hooks/types.ts +3 -0
  90. package/src/Authenticator/hooks/useFieldValues/__tests__/useFieldValues.spec.ts +75 -2
  91. package/src/Authenticator/hooks/useFieldValues/__tests__/utils.spec.ts +67 -1
  92. package/src/Authenticator/hooks/useFieldValues/types.ts +5 -0
  93. package/src/Authenticator/hooks/useFieldValues/useFieldValues.ts +26 -1
  94. package/src/Authenticator/hooks/useFieldValues/utils.ts +44 -1
  95. package/src/primitives/Checkbox/__tests__/__snapshots__/Checkbox.spec.tsx.snap +14 -14
  96. package/src/primitives/Divider/__tests__/__snapshots__/Divider.spec.tsx.snap +4 -4
  97. package/src/primitives/Heading/__tests__/__snapshots__/Heading.spec.tsx.snap +7 -7
  98. package/src/primitives/Heading/styles.ts +5 -5
  99. package/src/primitives/Label/__tests__/__snapshots__/Label.spec.tsx.snap +8 -8
  100. package/src/primitives/Label/styles.ts +2 -2
  101. package/src/primitives/PasswordField/__tests__/__snapshots__/PasswordField.spec.tsx.snap +25 -20
  102. package/src/primitives/PhoneNumberField/__tests__/__snapshots__/PhoneNumberField.spec.tsx.snap +6 -0
  103. package/src/primitives/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +14 -14
  104. package/src/primitives/RadioGroup/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +48 -48
  105. package/src/primitives/TextField/TextField.tsx +2 -1
  106. package/src/primitives/TextField/__tests__/TextField.spec.tsx +57 -8
  107. package/src/primitives/TextField/__tests__/__snapshots__/TextField.spec.tsx.snap +61 -55
  108. package/src/primitives/TextField/styles.ts +6 -3
  109. package/src/primitives/TextField/types.ts +1 -0
  110. package/src/theme/__tests__/createTheme.spec.ts +48 -0
  111. package/src/theme/createTheme.ts +44 -21
  112. package/src/theme/types.ts +17 -16
  113. package/src/version.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,62 @@
1
1
  # @aws-amplify/ui-react-native
2
2
 
3
+ ## 1.2.22
4
+
5
+ ### Patch Changes
6
+
7
+ - [#4276](https://github.com/aws-amplify/amplify-ui/pull/4276) [`9a491c767`](https://github.com/aws-amplify/amplify-ui/commit/9a491c767f2b440d75b8e4b3ddf53711d0fa5e8b) Thanks [@dbanksdesign](https://github.com/dbanksdesign)! - fix(react-native): small tweaks to authenticator styling to space out text fields a bit
8
+
9
+ - Updated dependencies [[`6b71ec46c`](https://github.com/aws-amplify/amplify-ui/commit/6b71ec46ccbf63c4605c9a57d3ecff098a42938a)]:
10
+ - @aws-amplify/ui@5.6.8
11
+ - @aws-amplify/ui-react-core@2.1.27
12
+ - @aws-amplify/ui-react-core-notifications@1.0.4
13
+
14
+ ## 1.2.21
15
+
16
+ ### Patch Changes
17
+
18
+ - [#4227](https://github.com/aws-amplify/amplify-ui/pull/4227) [`d3ee05415`](https://github.com/aws-amplify/amplify-ui/commit/d3ee054159e1de81861bcd9273be9b1c87924cf4) Thanks [@dbanksdesign](https://github.com/dbanksdesign)! - fix(react-native): border widths, spacing, font sizes, opacities in the theme don't throw runtime errors.
19
+
20
+ These are all valid in a theme now:
21
+
22
+ ```typescript
23
+ const theme: Theme = {
24
+ tokens: {
25
+ borderWidths: {
26
+ small: '4',
27
+ medium: '1rem',
28
+ large: 6,
29
+ },
30
+ opacities: {
31
+ '10': '0.2',
32
+ },
33
+ space: {
34
+ small: 4,
35
+ medium: '6',
36
+ large: '{space.small.value}',
37
+ },
38
+ fontSizes: {
39
+ small: '1rem',
40
+ },
41
+ },
42
+ };
43
+ ```
44
+
45
+ - [#4215](https://github.com/aws-amplify/amplify-ui/pull/4215) [`279b3852c`](https://github.com/aws-amplify/amplify-ui/commit/279b3852cf579e10fab225536aa54850ab3a9424) Thanks [@calebpollman](https://github.com/calebpollman)! - fix(rna): expose TS types of RNA static components
46
+
47
+ - [#4225](https://github.com/aws-amplify/amplify-ui/pull/4225) [`d87fb4beb`](https://github.com/aws-amplify/amplify-ui/commit/d87fb4beb4fa6e76ee09221a1a361553884ac42b) Thanks [@dbanksdesign](https://github.com/dbanksdesign)! - feat(react-native): adding error styles to text field
48
+
49
+ - [#4107](https://github.com/aws-amplify/amplify-ui/pull/4107) [`6d14bf3f3`](https://github.com/aws-amplify/amplify-ui/commit/6d14bf3f386523bacd6832e56cc5903f644da88e) Thanks [@ioanabrooks](https://github.com/ioanabrooks)! - chore(ui-react-native): Add Authenticator fields validations
50
+
51
+ - [#4247](https://github.com/aws-amplify/amplify-ui/pull/4247) [`41b9055c8`](https://github.com/aws-amplify/amplify-ui/commit/41b9055c821b44e9347146a9588755eeef588f13) Thanks [@calebpollman](https://github.com/calebpollman)! - feature(rna): update is signed in logic to read from Auth
52
+
53
+ - [#4239](https://github.com/aws-amplify/amplify-ui/pull/4239) [`30e0fce43`](https://github.com/aws-amplify/amplify-ui/commit/30e0fce430cbab200f572205b5c5ce6ff618972c) Thanks [@dbanksdesign](https://github.com/dbanksdesign)! - fix(react-native): fix the theme components type
54
+
55
+ - Updated dependencies [[`78fdfd6c8`](https://github.com/aws-amplify/amplify-ui/commit/78fdfd6c8268c56204f905402162ad8cb40a0c8e), [`d3ee05415`](https://github.com/aws-amplify/amplify-ui/commit/d3ee054159e1de81861bcd9273be9b1c87924cf4), [`165a8abbd`](https://github.com/aws-amplify/amplify-ui/commit/165a8abbda8aa3e95fb9466fc60f8694c646d5bc), [`13098b36a`](https://github.com/aws-amplify/amplify-ui/commit/13098b36a75452d839955d141bd25f57538b1a22), [`37e490d39`](https://github.com/aws-amplify/amplify-ui/commit/37e490d3997a1dc55e2998c277790945921e6dc3), [`6d14bf3f3`](https://github.com/aws-amplify/amplify-ui/commit/6d14bf3f386523bacd6832e56cc5903f644da88e), [`aea82ff1b`](https://github.com/aws-amplify/amplify-ui/commit/aea82ff1bb6e066ed8b70433f4d72cd34bf0ccae)]:
56
+ - @aws-amplify/ui@5.6.7
57
+ - @aws-amplify/ui-react-core@2.1.26
58
+ - @aws-amplify/ui-react-core-notifications@1.0.3
59
+
3
60
  ## 1.2.20
4
61
 
5
62
  ### Patch Changes
@@ -1,156 +1,109 @@
1
- /// <reference types="amazon-cognito-identity-js" />
2
- import React from 'react';
1
+ /// <reference types="react" />
3
2
  import { DefaultContainer } from './common';
4
3
  import { AuthenticatorProps } from './types';
5
4
  declare function Authenticator({ children, components: overrides, Container, Footer, Header, ...options }: AuthenticatorProps): JSX.Element | null;
6
5
  declare namespace Authenticator {
7
6
  var Container: typeof DefaultContainer;
8
7
  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
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ValidationProps & {
12
- fields: import("./hooks").TextFieldOptionsType[];
13
- } & {
14
- style?: import("./Defaults/types").ConfirmResetPasswordStyle | undefined;
15
- }, any> | React.FunctionComponent<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
16
- resendCode: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
17
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ValidationProps & {
18
- fields: import("./hooks").TextFieldOptionsType[];
19
- } & {
20
- style?: import("./Defaults/types").ConfirmResetPasswordStyle | undefined;
21
- }>) & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType>;
22
- var ConfirmSignIn: (React.ComponentClass<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
23
- challengeName: import("amazon-cognito-identity-js").ChallengeName;
24
- toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
25
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
26
- fields: import("./hooks").TextFieldOptionsType[];
27
- } & {
28
- style?: import("./Defaults/types").ConfirmSignInStyle | undefined;
29
- }, any> | React.FunctionComponent<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
30
- challengeName: import("amazon-cognito-identity-js").ChallengeName;
31
- toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
32
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
33
- fields: import("./hooks").TextFieldOptionsType[];
34
- } & {
35
- style?: import("./Defaults/types").ConfirmSignInStyle | undefined;
36
- }>) & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType>;
37
- var ConfirmSignUp: (React.ComponentClass<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
38
- codeDeliveryDetails: import("@aws-amplify/ui").CodeDeliveryDetails;
39
- resendCode: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
40
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
41
- fields: import("./hooks").TextFieldOptionsType[];
42
- } & {
43
- style?: import("./Defaults/types").ConfirmSignUpStyle | undefined;
44
- }, any> | React.FunctionComponent<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
45
- codeDeliveryDetails: import("@aws-amplify/ui").CodeDeliveryDetails;
46
- resendCode: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
47
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
48
- fields: import("./hooks").TextFieldOptionsType[];
49
- } & {
50
- style?: import("./Defaults/types").ConfirmSignUpStyle | undefined;
51
- }>) & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType>;
52
- var ConfirmVerifyUser: (React.ComponentClass<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
53
- skipVerification: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
54
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
55
- fields: import("./hooks").TextFieldOptionsType[];
56
- } & {
57
- style?: import("./Defaults/types").ConfirmVerifyUserStyle | undefined;
58
- }, any> | React.FunctionComponent<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
59
- skipVerification: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
60
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
61
- fields: import("./hooks").TextFieldOptionsType[];
62
- } & {
63
- style?: import("./Defaults/types").ConfirmVerifyUserStyle | undefined;
64
- }>) & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType>;
65
- var ForceNewPassword: (React.ComponentClass<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
66
- toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
67
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ValidationProps & {
68
- fields: import("./hooks").TextFieldOptionsType[];
69
- } & {
70
- style?: import("./Defaults/types").ForceNewPasswordStyle | undefined;
71
- }, any> | React.FunctionComponent<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
72
- toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
73
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ValidationProps & {
74
- fields: import("./hooks").TextFieldOptionsType[];
75
- } & {
76
- style?: import("./Defaults/types").ForceNewPasswordStyle | undefined;
77
- }>) & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType>;
78
- var ResetPassword: (React.ComponentClass<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
79
- toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
80
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
81
- fields: import("./hooks").TextFieldOptionsType[];
82
- } & {
83
- style?: import("./Defaults/types").ResetPasswordStyle | undefined;
84
- }, any> | React.FunctionComponent<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
85
- toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
86
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
87
- fields: import("./hooks").TextFieldOptionsType[];
88
- } & {
89
- style?: import("./Defaults/types").ResetPasswordStyle | undefined;
90
- }>) & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType>;
91
- var SetupTOTP: (React.ComponentClass<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
92
- toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
93
- totpSecretCode: string | null;
94
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
95
- fields: import("./hooks").TextFieldOptionsType[];
96
- } & {
97
- style?: import("./Defaults/types").SetupTOTPStyle | undefined;
98
- }, any> | React.FunctionComponent<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
99
- toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
100
- totpSecretCode: string | null;
101
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
102
- fields: import("./hooks").TextFieldOptionsType[];
103
- } & {
104
- style?: import("./Defaults/types").SetupTOTPStyle | undefined;
105
- }>) & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType>;
106
- var SignIn: (React.ComponentClass<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
107
- hideSignUp?: boolean | undefined;
108
- toFederatedSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
109
- toResetPassword: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
110
- toSignUp: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
111
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
112
- fields: import("./hooks").TextFieldOptionsType[];
113
- } & {
114
- style?: import("./Defaults/types").SignInStyle | undefined;
115
- }, any> | React.FunctionComponent<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
116
- hideSignUp?: boolean | undefined;
117
- toFederatedSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
118
- toResetPassword: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
119
- toSignUp: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
120
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
121
- fields: import("./hooks").TextFieldOptionsType[];
122
- } & {
123
- style?: import("./Defaults/types").SignInStyle | undefined;
124
- }>) & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType>;
125
- var SignUp: (React.ComponentClass<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
126
- hideSignIn?: boolean | undefined;
127
- toFederatedSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
128
- toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
129
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ValidationProps & {
130
- fields: import("./hooks").TextFieldOptionsType[];
131
- } & {
132
- style?: import("./Defaults/types").SignUpStyle | undefined;
133
- }, any> | React.FunctionComponent<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType> & {
134
- hideSignIn?: boolean | undefined;
135
- toFederatedSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
136
- toSignIn: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
137
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ValidationProps & {
138
- fields: import("./hooks").TextFieldOptionsType[];
139
- } & {
140
- style?: import("./Defaults/types").SignUpStyle | undefined;
141
- }>) & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").TextFieldOptionsType>;
142
- var VerifyUser: (React.ComponentClass<import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").RadioFieldOptions> & {
143
- skipVerification: (data?: import("@aws-amplify/ui").AuthEventData | undefined) => void;
144
- } & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").CommonRouteProps & {
145
- fields: import("./hooks").RadioFieldOptions[];
146
- } & {
147
- style?: import("./Defaults/types").VerifyUserStyle | undefined;
148
- }, any> | React.FunctionComponent<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
- }>) & import("@aws-amplify/ui-react-core/dist/types/Authenticator/hooks").ComponentSlots<import("./hooks").RadioFieldOptions>;
8
+ var ConfirmResetPassword: {
9
+ ({ fields, handleBlur, handleChange, handleSubmit, hasValidationErrors, isPending, resendCode, validationErrors, ...rest }: import("./Defaults/types").DefaultConfirmResetPasswordProps): JSX.Element;
10
+ Footer: typeof import("./common").DefaultFooter;
11
+ FormFields: {
12
+ ({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
13
+ displayName: string;
14
+ };
15
+ Header: typeof import("./common").DefaultHeader;
16
+ displayName: string;
17
+ };
18
+ var ConfirmSignIn: {
19
+ ({ challengeName, fields, handleBlur, handleChange, handleSubmit, isPending, toSignIn, validationErrors, ...rest }: import("./Defaults/types").DefaultConfirmSignInProps): JSX.Element;
20
+ Footer: typeof import("./common").DefaultFooter;
21
+ FormFields: {
22
+ ({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
23
+ displayName: string;
24
+ };
25
+ Header: typeof import("./common").DefaultHeader;
26
+ displayName: string;
27
+ };
28
+ var ConfirmSignUp: {
29
+ ({ codeDeliveryDetails, fields, handleBlur, handleChange, handleSubmit, isPending, resendCode, validationErrors, ...rest }: import("./Defaults/types").DefaultConfirmSignUpProps): JSX.Element;
30
+ FormFields: {
31
+ ({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
32
+ displayName: string;
33
+ };
34
+ Footer: typeof import("./common").DefaultFooter;
35
+ Header: typeof import("./common").DefaultHeader;
36
+ displayName: string;
37
+ };
38
+ var ConfirmVerifyUser: {
39
+ ({ fields, handleBlur, handleChange, handleSubmit, isPending, skipVerification, validationErrors, ...rest }: import("./Defaults/types").DefaultConfirmVerifyUserProps): JSX.Element;
40
+ Footer: typeof import("./common").DefaultFooter;
41
+ FormFields: {
42
+ ({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
43
+ displayName: string;
44
+ };
45
+ Header: typeof import("./common").DefaultHeader;
46
+ displayName: string;
47
+ };
48
+ var ForceNewPassword: {
49
+ ({ fields, handleBlur, handleChange, handleSubmit, hasValidationErrors, isPending, toSignIn, validationErrors, ...rest }: import("./Defaults/types").DefaultForceNewPasswordProps): JSX.Element;
50
+ Footer: typeof import("./common").DefaultFooter;
51
+ FormFields: {
52
+ ({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
53
+ displayName: string;
54
+ };
55
+ Header: typeof import("./common").DefaultHeader;
56
+ displayName: string;
57
+ };
58
+ var ResetPassword: {
59
+ ({ fields, handleBlur, handleChange, handleSubmit, isPending, toSignIn, validationErrors, ...rest }: import("./Defaults/types").DefaultResetPasswordProps): JSX.Element;
60
+ Footer: typeof import("./common").DefaultFooter;
61
+ FormFields: {
62
+ ({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
63
+ displayName: string;
64
+ };
65
+ Header: typeof import("./common").DefaultHeader;
66
+ displayName: string;
67
+ };
68
+ var SetupTOTP: {
69
+ ({ fields, handleBlur, handleChange, handleSubmit, isPending, toSignIn, totpSecretCode, validationErrors, ...rest }: import("./Defaults/types").DefaultSetupTOTPProps): JSX.Element;
70
+ Footer: typeof import("./common").DefaultFooter;
71
+ FormFields: {
72
+ ({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
73
+ displayName: string;
74
+ };
75
+ Header: typeof import("./common").DefaultHeader;
76
+ displayName: string;
77
+ };
78
+ var SignIn: {
79
+ ({ fields, handleBlur, handleChange, handleSubmit, hideSignUp, toResetPassword, toSignUp, validationErrors, ...rest }: import("./Defaults/types").DefaultSignInProps): JSX.Element;
80
+ Footer: typeof import("./common").DefaultFooter;
81
+ FormFields: {
82
+ ({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
83
+ displayName: string;
84
+ };
85
+ Header: typeof import("./common").DefaultHeader;
86
+ displayName: string;
87
+ };
88
+ var SignUp: {
89
+ ({ fields, handleBlur, handleChange, handleSubmit, hasValidationErrors, hideSignIn, isPending, toSignIn, validationErrors, ...rest }: import("./Defaults/types").DefaultSignUpProps): JSX.Element;
90
+ Footer: typeof import("./common").DefaultFooter;
91
+ FormFields: {
92
+ ({ fieldContainerStyle, fieldErrorsContainer, fieldErrorStyle, fieldStyle, fields, isPending, style, validationErrors, }: import("./common/DefaultFormFields/types").DefaultTextFormFieldsProps): JSX.Element;
93
+ displayName: string;
94
+ };
95
+ Header: typeof import("./common").DefaultHeader;
96
+ displayName: string;
97
+ };
98
+ var VerifyUser: {
99
+ ({ fields, handleBlur, handleChange, handleSubmit, skipVerification, validationErrors, ...rest }: import("./Defaults/types").DefaultVerifyUserProps): JSX.Element;
100
+ Footer: typeof import("./common").DefaultFooter;
101
+ FormFields: {
102
+ ({ fields, fieldContainerStyle, fieldLabelStyle, isPending, style, }: import("./common/DefaultFormFields/types").DefaultRadioFormFieldsProps): JSX.Element;
103
+ displayName: string;
104
+ };
105
+ Header: typeof import("./common").DefaultHeader;
106
+ displayName: string;
107
+ };
155
108
  }
156
109
  export default Authenticator;
@@ -19,7 +19,6 @@ const DEFAULTS = {
19
19
  SignUp,
20
20
  VerifyUser,
21
21
  };
22
- const isAuthenticatedRoute = (route) => route === 'authenticated' || route === 'signOut';
23
22
  const routePropSelector = ({ route, }) => [
24
23
  route,
25
24
  ];
@@ -35,13 +34,13 @@ function Authenticator({ children, components: overrides, Container = DefaultCon
35
34
  });
36
35
  }, []);
37
36
  useAuthenticatorInitMachine(options);
38
- const { fields, route } = useAuthenticator(routePropSelector);
37
+ const { authStatus, fields, route } = useAuthenticator(routePropSelector);
39
38
  const components = useMemo(
40
39
  // allow any to prevent TS from assuming that all fields are of type `TextFieldOptions`
41
40
  () => resolveAuthenticatorComponents(DEFAULTS, overrides), [overrides]);
42
41
  const { Component, props } = useAuthenticatorRoute({ components });
43
42
  const typedFields = getRouteTypedFields({ fields, route });
44
- if (isAuthenticatedRoute(route)) {
43
+ if (authStatus === 'authenticated') {
45
44
  return children ? <>{children}</> : null;
46
45
  }
47
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,13 +4,14 @@ 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, hasValidationErrors, isPending, resendCode, ...rest }) => {
8
- const { disableFormSubmit, 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
  });
15
16
  const disabled = hasValidationErrors || disableFormSubmit;
16
17
  const headerText = getResetYourPasswordText();
@@ -30,7 +31,7 @@ const ConfirmResetPassword = ({ fields, handleBlur, handleChange, handleSubmit,
30
31
  resendCode,
31
32
  secondaryButtonText,
32
33
  ]);
33
- return (<DefaultContent {...rest} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending}/>);
34
+ return (<DefaultContent {...rest} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending} validationErrors={fieldValidationErrors}/>);
34
35
  };
35
36
  ConfirmResetPassword.Footer = DefaultFooter;
36
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,13 +4,14 @@ 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 { disableFormSubmit: disabled, 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();
@@ -29,7 +30,7 @@ const ConfirmSignIn = ({ challengeName, fields, handleBlur, handleChange, handle
29
30
  secondaryButtonText,
30
31
  toSignIn,
31
32
  ]);
32
- return (<DefaultContent {...rest} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending}/>);
33
+ return (<DefaultContent {...rest} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending} validationErrors={fieldValidationErrors}/>);
33
34
  };
34
35
  ConfirmSignIn.Footer = DefaultFooter;
35
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,13 +4,14 @@ 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 { disableFormSubmit: disabled, 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);
@@ -30,7 +31,7 @@ const ConfirmSignUp = ({ codeDeliveryDetails, fields, handleBlur, handleChange,
30
31
  resendCode,
31
32
  secondaryButtonText,
32
33
  ]);
33
- return (<DefaultContent {...rest} body={bodyText} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending}/>);
34
+ return (<DefaultContent {...rest} body={bodyText} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending} validationErrors={fieldValidationErrors}/>);
34
35
  };
35
36
  ConfirmSignUp.FormFields = DefaultTextFormFields;
36
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;
@@ -4,13 +4,14 @@ import { DefaultContent, DefaultFooter, DefaultTextFormFields, DefaultHeader, }
4
4
  import { useFieldValues } from '../../hooks';
5
5
  const COMPONENT_NAME = 'ConfirmVerifyUser';
6
6
  const { getAccountRecoveryInfoText, getSkipText, getSubmitText, getSubmittingText, } = authenticatorTextUtil;
7
- const ConfirmVerifyUser = ({ fields, handleBlur, handleChange, handleSubmit, isPending, skipVerification, ...rest }) => {
8
- const { disableFormSubmit: disabled, fields: fieldsWithHandlers, handleFormSubmit, } = useFieldValues({
7
+ const ConfirmVerifyUser = ({ fields, handleBlur, handleChange, handleSubmit, isPending, skipVerification, 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 = getAccountRecoveryInfoText();
16
17
  const primaryButtonText = isPending ? getSubmittingText() : getSubmitText();
@@ -29,7 +30,7 @@ const ConfirmVerifyUser = ({ fields, handleBlur, handleChange, handleSubmit, isP
29
30
  skipVerification,
30
31
  secondaryButtonText,
31
32
  ]);
32
- return (<DefaultContent {...rest} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending}/>);
33
+ return (<DefaultContent {...rest} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending} validationErrors={fieldValidationErrors}/>);
33
34
  };
34
35
  ConfirmVerifyUser.Footer = DefaultFooter;
35
36
  ConfirmVerifyUser.FormFields = DefaultTextFormFields;
@@ -1,3 +1,14 @@
1
- import { DefaultForceNewPasswordComponent } from '../types';
2
- declare const ForceNewPassword: DefaultForceNewPasswordComponent;
1
+ /// <reference types="react" />
2
+ import { DefaultFooter, DefaultHeader } from '../../common';
3
+ import { DefaultForceNewPasswordProps } from '../types';
4
+ declare const ForceNewPassword: {
5
+ ({ fields, handleBlur, handleChange, handleSubmit, hasValidationErrors, isPending, toSignIn, validationErrors, ...rest }: DefaultForceNewPasswordProps): 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 ForceNewPassword;
@@ -4,13 +4,14 @@ import { DefaultContent, DefaultFooter, DefaultTextFormFields, DefaultHeader, }
4
4
  import { useFieldValues } from '../../hooks';
5
5
  const COMPONENT_NAME = 'ForceNewPassword';
6
6
  const { getChangePasswordText, getChangingText, getBackToSignInText } = authenticatorTextUtil;
7
- const ForceNewPassword = ({ fields, handleBlur, handleChange, handleSubmit, hasValidationErrors, isPending, toSignIn, ...rest }) => {
8
- const { disableFormSubmit, fields: fieldsWithHandlers, handleFormSubmit, } = useFieldValues({
7
+ const ForceNewPassword = ({ fields, handleBlur, handleChange, handleSubmit, hasValidationErrors, isPending, toSignIn, 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
  });
15
16
  const disabled = hasValidationErrors || disableFormSubmit;
16
17
  const headerText = getChangePasswordText();
@@ -32,7 +33,7 @@ const ForceNewPassword = ({ fields, handleBlur, handleChange, handleSubmit, hasV
32
33
  secondaryButtonText,
33
34
  toSignIn,
34
35
  ]);
35
- return (<DefaultContent {...rest} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending}/>);
36
+ return (<DefaultContent {...rest} buttons={buttons} headerText={headerText} fields={fieldsWithHandlers} isPending={isPending} validationErrors={fieldValidationErrors}/>);
36
37
  };
37
38
  ForceNewPassword.Footer = DefaultFooter;
38
39
  ForceNewPassword.FormFields = DefaultTextFormFields;
@@ -1,3 +1,14 @@
1
- import { DefaultResetPasswordComponent } from '../types';
2
- declare const ResetPassword: DefaultResetPasswordComponent;
1
+ /// <reference types="react" />
2
+ import { DefaultFooter, DefaultHeader } from '../../common';
3
+ import { DefaultResetPasswordProps } from '../types';
4
+ declare const ResetPassword: {
5
+ ({ fields, handleBlur, handleChange, handleSubmit, isPending, toSignIn, validationErrors, ...rest }: DefaultResetPasswordProps): 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 ResetPassword;