@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
@@ -11,7 +11,7 @@ Array [
11
11
  },
12
12
  Object {
13
13
  "fontSize": 24,
14
- "fontWeight": "300",
14
+ "fontWeight": "500",
15
15
  "lineHeight": 36,
16
16
  },
17
17
  Object {
@@ -28,9 +28,9 @@ Array [
28
28
  style={
29
29
  Array [
30
30
  Object {
31
- "fontSize": 14,
31
+ "fontSize": 16,
32
32
  "fontWeight": "400",
33
- "lineHeight": 21,
33
+ "lineHeight": 24,
34
34
  },
35
35
  Object {
36
36
  "color": "hsl(210, 50%, 10%)",
@@ -51,9 +51,9 @@ Array [
51
51
  style={
52
52
  Array [
53
53
  Object {
54
- "fontSize": 14,
54
+ "fontSize": 16,
55
55
  "fontWeight": "400",
56
- "lineHeight": 21,
56
+ "lineHeight": 24,
57
57
  },
58
58
  Object {
59
59
  "color": "hsl(210, 50%, 10%)",
@@ -80,6 +80,7 @@ Array [
80
80
  Array [
81
81
  Object {
82
82
  "alignItems": "flex-start",
83
+ "marginBottom": 8,
83
84
  },
84
85
  Object {
85
86
  "paddingHorizontal": 12,
@@ -94,9 +95,9 @@ Array [
94
95
  style={
95
96
  Array [
96
97
  Object {
97
- "fontSize": 14,
98
+ "fontSize": 16,
98
99
  "fontWeight": "400",
99
- "lineHeight": 21,
100
+ "lineHeight": 24,
100
101
  },
101
102
  Object {
102
103
  "color": "hsl(210, 50%, 10%)",
@@ -104,8 +105,7 @@ Array [
104
105
  Array [
105
106
  Object {
106
107
  "color": "hsl(210, 25%, 25%)",
107
- "lineHeight": 21,
108
- "padding": 4,
108
+ "paddingVertical": 8,
109
109
  },
110
110
  undefined,
111
111
  ],
@@ -147,6 +147,7 @@ Array [
147
147
  "color": "hsl(210, 50%, 10%)",
148
148
  "flexGrow": 1,
149
149
  "fontSize": 16,
150
+ "paddingHorizontal": 4,
150
151
  "paddingVertical": 12,
151
152
  },
152
153
  Object {},
@@ -246,8 +247,7 @@ Array [
246
247
  },
247
248
  undefined,
248
249
  Object {
249
- "marginHorizontal": 16,
250
- "marginVertical": 12,
250
+ "margin": 12,
251
251
  },
252
252
  ]
253
253
  }
@@ -341,7 +341,7 @@ Array [
341
341
  },
342
342
  Object {
343
343
  "fontSize": 24,
344
- "fontWeight": "300",
344
+ "fontWeight": "500",
345
345
  "lineHeight": 36,
346
346
  },
347
347
  Object {
@@ -358,9 +358,9 @@ Array [
358
358
  style={
359
359
  Array [
360
360
  Object {
361
- "fontSize": 14,
361
+ "fontSize": 16,
362
362
  "fontWeight": "400",
363
- "lineHeight": 21,
363
+ "lineHeight": 24,
364
364
  },
365
365
  Object {
366
366
  "color": "hsl(210, 50%, 10%)",
@@ -381,9 +381,9 @@ Array [
381
381
  style={
382
382
  Array [
383
383
  Object {
384
- "fontSize": 14,
384
+ "fontSize": 16,
385
385
  "fontWeight": "400",
386
- "lineHeight": 21,
386
+ "lineHeight": 24,
387
387
  },
388
388
  Object {
389
389
  "color": "hsl(210, 50%, 10%)",
@@ -410,6 +410,7 @@ Array [
410
410
  Array [
411
411
  Object {
412
412
  "alignItems": "flex-start",
413
+ "marginBottom": 8,
413
414
  },
414
415
  Object {
415
416
  "paddingHorizontal": 12,
@@ -424,9 +425,9 @@ Array [
424
425
  style={
425
426
  Array [
426
427
  Object {
427
- "fontSize": 14,
428
+ "fontSize": 16,
428
429
  "fontWeight": "400",
429
- "lineHeight": 21,
430
+ "lineHeight": 24,
430
431
  },
431
432
  Object {
432
433
  "color": "hsl(210, 50%, 10%)",
@@ -434,8 +435,7 @@ Array [
434
435
  Array [
435
436
  Object {
436
437
  "color": "hsl(210, 25%, 25%)",
437
- "lineHeight": 21,
438
- "padding": 4,
438
+ "paddingVertical": 8,
439
439
  },
440
440
  undefined,
441
441
  ],
@@ -477,6 +477,7 @@ Array [
477
477
  "color": "hsl(210, 50%, 10%)",
478
478
  "flexGrow": 1,
479
479
  "fontSize": 16,
480
+ "paddingHorizontal": 4,
480
481
  "paddingVertical": 12,
481
482
  },
482
483
  Object {},
@@ -517,8 +518,7 @@ Array [
517
518
  },
518
519
  undefined,
519
520
  Object {
520
- "marginHorizontal": 16,
521
- "marginVertical": 12,
521
+ "margin": 12,
522
522
  },
523
523
  ]
524
524
  }
@@ -9,11 +9,11 @@ import {
9
9
  } from '../../common';
10
10
  import { useFieldValues } from '../../hooks';
11
11
 
12
- import { DefaultSignInComponent } from '../types';
12
+ import { DefaultSignInProps } from '../types';
13
13
 
14
14
  const COMPONENT_NAME = 'SignIn';
15
15
 
16
- const SignIn: DefaultSignInComponent = ({
16
+ const SignIn = ({
17
17
  fields,
18
18
  handleBlur,
19
19
  handleChange,
@@ -21,8 +21,9 @@ const SignIn: DefaultSignInComponent = ({
21
21
  hideSignUp,
22
22
  toResetPassword,
23
23
  toSignUp,
24
+ validationErrors,
24
25
  ...rest
25
- }) => {
26
+ }: DefaultSignInProps): JSX.Element => {
26
27
  const {
27
28
  getSignInTabText,
28
29
  getSignInText,
@@ -33,6 +34,7 @@ const SignIn: DefaultSignInComponent = ({
33
34
  const {
34
35
  disableFormSubmit: disabled,
35
36
  fields: fieldsWithHandlers,
37
+ fieldValidationErrors,
36
38
  handleFormSubmit,
37
39
  } = useFieldValues({
38
40
  componentName: COMPONENT_NAME,
@@ -40,6 +42,7 @@ const SignIn: DefaultSignInComponent = ({
40
42
  handleBlur,
41
43
  handleChange,
42
44
  handleSubmit,
45
+ validationErrors,
43
46
  });
44
47
 
45
48
  const headerText = getSignInTabText();
@@ -75,6 +78,7 @@ const SignIn: DefaultSignInComponent = ({
75
78
  buttons={buttons}
76
79
  fields={fieldsWithHandlers}
77
80
  headerText={headerText}
81
+ validationErrors={fieldValidationErrors}
78
82
  />
79
83
  );
80
84
  };
@@ -29,6 +29,7 @@ const props = {
29
29
  handleBlur: jest.fn(),
30
30
  handleChange: jest.fn(),
31
31
  handleSubmit: jest.fn(),
32
+ hasValidationErrors: false,
32
33
  Header: SignIn.Header,
33
34
  isPending: false,
34
35
  socialProviders: undefined,
@@ -11,7 +11,7 @@ Array [
11
11
  },
12
12
  Object {
13
13
  "fontSize": 24,
14
- "fontWeight": "300",
14
+ "fontWeight": "500",
15
15
  "lineHeight": 36,
16
16
  },
17
17
  Object {
@@ -35,6 +35,7 @@ Array [
35
35
  Array [
36
36
  Object {
37
37
  "alignItems": "flex-start",
38
+ "marginBottom": 8,
38
39
  },
39
40
  Object {
40
41
  "paddingHorizontal": 12,
@@ -49,9 +50,9 @@ Array [
49
50
  style={
50
51
  Array [
51
52
  Object {
52
- "fontSize": 14,
53
+ "fontSize": 16,
53
54
  "fontWeight": "400",
54
- "lineHeight": 21,
55
+ "lineHeight": 24,
55
56
  },
56
57
  Object {
57
58
  "color": "hsl(210, 50%, 10%)",
@@ -59,8 +60,7 @@ Array [
59
60
  Array [
60
61
  Object {
61
62
  "color": "hsl(210, 25%, 25%)",
62
- "lineHeight": 21,
63
- "padding": 4,
63
+ "paddingVertical": 8,
64
64
  },
65
65
  undefined,
66
66
  ],
@@ -102,6 +102,7 @@ Array [
102
102
  "color": "hsl(210, 50%, 10%)",
103
103
  "flexGrow": 1,
104
104
  "fontSize": 16,
105
+ "paddingHorizontal": 4,
105
106
  "paddingVertical": 12,
106
107
  },
107
108
  Object {},
@@ -115,6 +116,7 @@ Array [
115
116
  Array [
116
117
  Object {
117
118
  "alignItems": "flex-start",
119
+ "marginBottom": 8,
118
120
  },
119
121
  Array [
120
122
  Object {},
@@ -132,9 +134,9 @@ Array [
132
134
  style={
133
135
  Array [
134
136
  Object {
135
- "fontSize": 14,
137
+ "fontSize": 16,
136
138
  "fontWeight": "400",
137
- "lineHeight": 21,
139
+ "lineHeight": 24,
138
140
  },
139
141
  Object {
140
142
  "color": "hsl(210, 50%, 10%)",
@@ -142,8 +144,7 @@ Array [
142
144
  Array [
143
145
  Object {
144
146
  "color": "hsl(210, 25%, 25%)",
145
- "lineHeight": 21,
146
- "padding": 4,
147
+ "paddingVertical": 8,
147
148
  },
148
149
  undefined,
149
150
  ],
@@ -186,6 +187,7 @@ Array [
186
187
  "color": "hsl(210, 50%, 10%)",
187
188
  "flexGrow": 1,
188
189
  "fontSize": 16,
190
+ "paddingHorizontal": 4,
189
191
  "paddingVertical": 12,
190
192
  },
191
193
  Object {},
@@ -290,8 +292,7 @@ Array [
290
292
  },
291
293
  undefined,
292
294
  Object {
293
- "marginHorizontal": 16,
294
- "marginVertical": 12,
295
+ "margin": 12,
295
296
  },
296
297
  ]
297
298
  }
@@ -433,7 +434,7 @@ Array [
433
434
  },
434
435
  Object {
435
436
  "fontSize": 24,
436
- "fontWeight": "300",
437
+ "fontWeight": "500",
437
438
  "lineHeight": 36,
438
439
  },
439
440
  Object {
@@ -457,6 +458,7 @@ Array [
457
458
  Array [
458
459
  Object {
459
460
  "alignItems": "flex-start",
461
+ "marginBottom": 8,
460
462
  },
461
463
  Object {
462
464
  "paddingHorizontal": 12,
@@ -471,9 +473,9 @@ Array [
471
473
  style={
472
474
  Array [
473
475
  Object {
474
- "fontSize": 14,
476
+ "fontSize": 16,
475
477
  "fontWeight": "400",
476
- "lineHeight": 21,
478
+ "lineHeight": 24,
477
479
  },
478
480
  Object {
479
481
  "color": "hsl(210, 50%, 10%)",
@@ -481,8 +483,7 @@ Array [
481
483
  Array [
482
484
  Object {
483
485
  "color": "hsl(210, 25%, 25%)",
484
- "lineHeight": 21,
485
- "padding": 4,
486
+ "paddingVertical": 8,
486
487
  },
487
488
  undefined,
488
489
  ],
@@ -524,6 +525,7 @@ Array [
524
525
  "color": "hsl(210, 50%, 10%)",
525
526
  "flexGrow": 1,
526
527
  "fontSize": 16,
528
+ "paddingHorizontal": 4,
527
529
  "paddingVertical": 12,
528
530
  },
529
531
  Object {},
@@ -537,6 +539,7 @@ Array [
537
539
  Array [
538
540
  Object {
539
541
  "alignItems": "flex-start",
542
+ "marginBottom": 8,
540
543
  },
541
544
  Array [
542
545
  Object {},
@@ -554,9 +557,9 @@ Array [
554
557
  style={
555
558
  Array [
556
559
  Object {
557
- "fontSize": 14,
560
+ "fontSize": 16,
558
561
  "fontWeight": "400",
559
- "lineHeight": 21,
562
+ "lineHeight": 24,
560
563
  },
561
564
  Object {
562
565
  "color": "hsl(210, 50%, 10%)",
@@ -564,8 +567,7 @@ Array [
564
567
  Array [
565
568
  Object {
566
569
  "color": "hsl(210, 25%, 25%)",
567
- "lineHeight": 21,
568
- "padding": 4,
570
+ "paddingVertical": 8,
569
571
  },
570
572
  undefined,
571
573
  ],
@@ -608,6 +610,7 @@ Array [
608
610
  "color": "hsl(210, 50%, 10%)",
609
611
  "flexGrow": 1,
610
612
  "fontSize": 16,
613
+ "paddingHorizontal": 4,
611
614
  "paddingVertical": 12,
612
615
  },
613
616
  Object {},
@@ -712,8 +715,7 @@ Array [
712
715
  },
713
716
  undefined,
714
717
  Object {
715
- "marginHorizontal": 16,
716
- "marginVertical": 12,
718
+ "margin": 12,
717
719
  },
718
720
  ]
719
721
  }
@@ -807,7 +809,7 @@ Array [
807
809
  },
808
810
  Object {
809
811
  "fontSize": 24,
810
- "fontWeight": "300",
812
+ "fontWeight": "500",
811
813
  "lineHeight": 36,
812
814
  },
813
815
  Object {
@@ -831,6 +833,7 @@ Array [
831
833
  Array [
832
834
  Object {
833
835
  "alignItems": "flex-start",
836
+ "marginBottom": 8,
834
837
  },
835
838
  Object {
836
839
  "paddingHorizontal": 12,
@@ -845,9 +848,9 @@ Array [
845
848
  style={
846
849
  Array [
847
850
  Object {
848
- "fontSize": 14,
851
+ "fontSize": 16,
849
852
  "fontWeight": "400",
850
- "lineHeight": 21,
853
+ "lineHeight": 24,
851
854
  },
852
855
  Object {
853
856
  "color": "hsl(210, 50%, 10%)",
@@ -855,8 +858,7 @@ Array [
855
858
  Array [
856
859
  Object {
857
860
  "color": "hsl(210, 25%, 25%)",
858
- "lineHeight": 21,
859
- "padding": 4,
861
+ "paddingVertical": 8,
860
862
  },
861
863
  undefined,
862
864
  ],
@@ -898,6 +900,7 @@ Array [
898
900
  "color": "hsl(210, 50%, 10%)",
899
901
  "flexGrow": 1,
900
902
  "fontSize": 16,
903
+ "paddingHorizontal": 4,
901
904
  "paddingVertical": 12,
902
905
  },
903
906
  Object {},
@@ -911,6 +914,7 @@ Array [
911
914
  Array [
912
915
  Object {
913
916
  "alignItems": "flex-start",
917
+ "marginBottom": 8,
914
918
  },
915
919
  Array [
916
920
  Object {},
@@ -928,9 +932,9 @@ Array [
928
932
  style={
929
933
  Array [
930
934
  Object {
931
- "fontSize": 14,
935
+ "fontSize": 16,
932
936
  "fontWeight": "400",
933
- "lineHeight": 21,
937
+ "lineHeight": 24,
934
938
  },
935
939
  Object {
936
940
  "color": "hsl(210, 50%, 10%)",
@@ -938,8 +942,7 @@ Array [
938
942
  Array [
939
943
  Object {
940
944
  "color": "hsl(210, 25%, 25%)",
941
- "lineHeight": 21,
942
- "padding": 4,
945
+ "paddingVertical": 8,
943
946
  },
944
947
  undefined,
945
948
  ],
@@ -982,6 +985,7 @@ Array [
982
985
  "color": "hsl(210, 50%, 10%)",
983
986
  "flexGrow": 1,
984
987
  "fontSize": 16,
988
+ "paddingHorizontal": 4,
985
989
  "paddingVertical": 12,
986
990
  },
987
991
  Object {},
@@ -1145,8 +1149,7 @@ Array [
1145
1149
  },
1146
1150
  undefined,
1147
1151
  Object {
1148
- "marginHorizontal": 16,
1149
- "marginVertical": 12,
1152
+ "margin": 12,
1150
1153
  },
1151
1154
  ]
1152
1155
  }
@@ -9,7 +9,7 @@ import {
9
9
  } from '../../common';
10
10
  import { useFieldValues } from '../../hooks';
11
11
 
12
- import { DefaultSignUpComponent } from '../types';
12
+ import { DefaultSignUpProps } from '../types';
13
13
 
14
14
  const COMPONENT_NAME = 'SignUp';
15
15
 
@@ -20,7 +20,7 @@ const {
20
20
  getSignUpTabText,
21
21
  } = authenticatorTextUtil;
22
22
 
23
- const SignUp: DefaultSignUpComponent = ({
23
+ const SignUp = ({
24
24
  fields,
25
25
  handleBlur,
26
26
  handleChange,
@@ -29,11 +29,13 @@ const SignUp: DefaultSignUpComponent = ({
29
29
  hideSignIn,
30
30
  isPending,
31
31
  toSignIn,
32
+ validationErrors,
32
33
  ...rest
33
- }) => {
34
+ }: DefaultSignUpProps): JSX.Element => {
34
35
  const {
35
36
  disableFormSubmit,
36
37
  fields: fieldsWithHandlers,
38
+ fieldValidationErrors,
37
39
  handleFormSubmit,
38
40
  } = useFieldValues({
39
41
  componentName: COMPONENT_NAME,
@@ -41,6 +43,7 @@ const SignUp: DefaultSignUpComponent = ({
41
43
  handleBlur,
42
44
  handleChange,
43
45
  handleSubmit,
46
+ validationErrors,
44
47
  });
45
48
 
46
49
  const disabled = hasValidationErrors || disableFormSubmit;
@@ -78,6 +81,7 @@ const SignUp: DefaultSignUpComponent = ({
78
81
  fields={fieldsWithHandlers}
79
82
  headerText={headerText}
80
83
  isPending={isPending}
84
+ validationErrors={fieldValidationErrors}
81
85
  />
82
86
  );
83
87
  };