@aws-amplify/ui 5.2.0 → 5.3.1

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 (39) hide show
  1. package/dist/esm/helpers/accountSettings/utils.js +1 -0
  2. package/dist/esm/helpers/accountSettings/validator.js +1 -0
  3. package/dist/esm/helpers/utils.js +1 -0
  4. package/dist/esm/i18n/dictionaries/authenticator/fr.js +1 -1
  5. package/dist/esm/i18n/dictionaries/authenticator/he.js +1 -0
  6. package/dist/esm/i18n/dictionaries/index.js +1 -1
  7. package/dist/esm/i18n/translations.js +1 -1
  8. package/dist/esm/index.js +1 -1
  9. package/dist/esm/machines/authenticator/defaultServices.js +1 -1
  10. package/dist/esm/theme/tokens/components/button.js +1 -1
  11. package/dist/index.js +1 -1
  12. package/dist/styles.css +125 -0
  13. package/dist/theme.css +41 -0
  14. package/dist/types/helpers/accountSettings/index.d.ts +2 -0
  15. package/dist/types/helpers/accountSettings/utils.d.ts +9 -0
  16. package/dist/types/helpers/accountSettings/validator.d.ts +21 -0
  17. package/dist/types/helpers/authenticator/textUtil.d.ts +1 -1
  18. package/dist/types/helpers/index.d.ts +2 -0
  19. package/dist/types/helpers/utils.d.ts +4 -0
  20. package/dist/types/i18n/dictionaries/authenticator/he.d.ts +2 -0
  21. package/dist/types/i18n/dictionaries/authenticator/index.d.ts +1 -0
  22. package/dist/types/i18n/dictionaries/index.d.ts +52 -0
  23. package/dist/types/theme/tokens/components/button.d.ts +4 -2
  24. package/dist/types/theme/tokens/components/collection.d.ts +8 -8
  25. package/dist/types/theme/tokens/components/fileUploader.d.ts +13 -13
  26. package/dist/types/theme/tokens/components/heading.d.ts +1 -1
  27. package/dist/types/theme/tokens/components/link.d.ts +1 -1
  28. package/dist/types/theme/tokens/components/rating.d.ts +3 -3
  29. package/dist/types/theme/tokens/components/select.d.ts +5 -5
  30. package/dist/types/theme/tokens/components/stepperField.d.ts +1 -1
  31. package/dist/types/theme/tokens/components/switchField.d.ts +6 -6
  32. package/dist/types/theme/tokens/components/table.d.ts +2 -2
  33. package/dist/types/theme/tokens/components/text.d.ts +1 -1
  34. package/dist/types/theme/tokens/components/textAreaField.d.ts +1 -1
  35. package/dist/types/theme/tokens/components/textField.d.ts +1 -1
  36. package/dist/types/types/accountSettings/index.d.ts +1 -0
  37. package/dist/types/types/accountSettings/validator.d.ts +14 -0
  38. package/dist/types/types/index.d.ts +1 -0
  39. package/package.json +3 -3
package/dist/styles.css CHANGED
@@ -163,6 +163,47 @@
163
163
  --amplify-components-button-link-loading-border-color: transparent;
164
164
  --amplify-components-button-link-loading-background-color: transparent;
165
165
  --amplify-components-button-link-loading-color: var(--amplify-colors-font-disabled);
166
+ --amplify-components-button-warning-background-color: transparent;
167
+ --amplify-components-button-warning-border-color: var(--amplify-colors-red-60);
168
+ --amplify-components-button-warning-border-width: var(--amplify-border-widths-small);
169
+ --amplify-components-button-warning-color: var(--amplify-colors-red-60);
170
+ --amplify-components-button-warning-hover-border-color: var(--amplify-colors-red-80);
171
+ --amplify-components-button-warning-hover-background-color: var(--amplify-colors-red-10);
172
+ --amplify-components-button-warning-hover-color: var(--amplify-colors-font-error);
173
+ --amplify-components-button-warning-focus-border-color: var(--amplify-colors-red-80);
174
+ --amplify-components-button-warning-focus-background-color: var(--amplify-colors-red-10);
175
+ --amplify-components-button-warning-focus-color: var(--amplify-colors-red-80);
176
+ --amplify-components-button-warning-focus-box-shadow: var(--amplify-components-fieldcontrol-error-focus-box-shadow);
177
+ --amplify-components-button-warning-active-border-color: var(--amplify-colors-red-100);
178
+ --amplify-components-button-warning-active-background-color: var(--amplify-colors-red-20);
179
+ --amplify-components-button-warning-active-color: var(--amplify-colors-red-100);
180
+ --amplify-components-button-warning-disabled-border-color: var(--amplify-colors-border-tertiary);
181
+ --amplify-components-button-warning-disabled-background-color: transparent;
182
+ --amplify-components-button-warning-disabled-color: var(--amplify-colors-font-disabled);
183
+ --amplify-components-button-warning-loading-border-color: var(--amplify-colors-border-tertiary);
184
+ --amplify-components-button-warning-loading-background-color: transparent;
185
+ --amplify-components-button-warning-loading-color: var(--amplify-colors-font-disabled);
186
+ --amplify-components-button-destructive-border-color: transparent;
187
+ --amplify-components-button-destructive-border-width: var(--amplify-border-widths-small);
188
+ --amplify-components-button-destructive-border-style: solid;
189
+ --amplify-components-button-destructive-background-color: var(--amplify-colors-red-60);
190
+ --amplify-components-button-destructive-color: var(--amplify-colors-font-inverse);
191
+ --amplify-components-button-destructive-disabled-border-color: transparent;
192
+ --amplify-components-button-destructive-disabled-background-color: var(--amplify-colors-background-disabled);
193
+ --amplify-components-button-destructive-disabled-color: var(--amplify-colors-font-disabled);
194
+ --amplify-components-button-destructive-loading-border-color: transparent;
195
+ --amplify-components-button-destructive-loading-background-color: var(--amplify-colors-background-disabled);
196
+ --amplify-components-button-destructive-loading-color: var(--amplify-colors-font-disabled);
197
+ --amplify-components-button-destructive-hover-border-color: transparent;
198
+ --amplify-components-button-destructive-hover-background-color: var(--amplify-colors-red-80);
199
+ --amplify-components-button-destructive-hover-color: var(--amplify-colors-font-inverse);
200
+ --amplify-components-button-destructive-focus-border-color: transparent;
201
+ --amplify-components-button-destructive-focus-background-color: var(--amplify-colors-red-80);
202
+ --amplify-components-button-destructive-focus-color: var(--amplify-colors-font-inverse);
203
+ --amplify-components-button-destructive-focus-box-shadow: var(--amplify-components-fieldcontrol-error-focus-box-shadow);
204
+ --amplify-components-button-destructive-active-border-color: transparent;
205
+ --amplify-components-button-destructive-active-background-color: var(--amplify-colors-red-100);
206
+ --amplify-components-button-destructive-active-color: var(--amplify-colors-font-inverse);
166
207
  --amplify-components-button-small-font-size: var(--amplify-components-fieldcontrol-small-font-size);
167
208
  --amplify-components-button-small-padding-block-start: var(--amplify-components-fieldcontrol-small-padding-block-start);
168
209
  --amplify-components-button-small-padding-block-end: var(--amplify-components-fieldcontrol-small-padding-block-end);
@@ -1369,6 +1410,88 @@ strong.amplify-text {
1369
1410
  border-color: var(--amplify-components-button-link-active-border-color);
1370
1411
  color: var(--amplify-components-button-link-active-color);
1371
1412
  }
1413
+ .amplify-button--destructive {
1414
+ border-width: var(--amplify-components-button-destructive-border-width);
1415
+ background-color: var(--amplify-components-button-destructive-background-color);
1416
+ border-color: var(--amplify-components-button-destructive-border-color);
1417
+ color: var(--amplify-components-button-destructive-color);
1418
+ --amplify-internal-button-disabled-border-color: var(
1419
+ --amplify-components-button-destructive-disabled-border-color
1420
+ );
1421
+ --amplify-internal-button-disabled-background-color: var(
1422
+ --amplify-components-button-destructive-disabled-background-color
1423
+ );
1424
+ --amplify-internal-button-disabled-color: var(
1425
+ --amplify-components-button-destructive-disabled-color
1426
+ );
1427
+ --amplify-internal-button-loading-background-color: var(
1428
+ --amplify-components-button-destructive-loading-background-color
1429
+ );
1430
+ --amplify-internal-button-loading-border-color: var(
1431
+ --amplify-components-button-destructive-loading-border-color
1432
+ );
1433
+ --amplify-internal-button-loading-color: var(
1434
+ --amplify-components-button-destructive-loading-color
1435
+ );
1436
+ }
1437
+ .amplify-button--destructive:hover {
1438
+ background-color: var(--amplify-components-button-destructive-hover-background-color);
1439
+ border-color: var(--amplify-components-button-destructive-hover-border-color);
1440
+ color: var(--amplify-components-button-destructive-hover-color);
1441
+ }
1442
+ .amplify-button--destructive:focus {
1443
+ background-color: var(--amplify-components-button-destructive-focus-background-color);
1444
+ border-color: var(--amplify-components-button-destructive-focus-border-color);
1445
+ color: var(--amplify-components-button-destructive-focus-color);
1446
+ box-shadow: var(--amplify-components-button-destructive-focus-box-shadow);
1447
+ }
1448
+ .amplify-button--destructive:active {
1449
+ background-color: var(--amplify-components-button-destructive-active-background-color);
1450
+ border-color: var(--amplify-components-button-destructive-active-border-color);
1451
+ color: var(--amplify-components-button-destructive-active-color);
1452
+ }
1453
+ .amplify-button--warning {
1454
+ background-color: var(--amplify-components-button-warning-background-color);
1455
+ border-color: var(--amplify-components-button-warning-border-color);
1456
+ border-width: var(--amplify-components-button-warning-border-width);
1457
+ color: var(--amplify-components-button-warning-color);
1458
+ --amplify-internal-button-disabled-text-decoration: none;
1459
+ --amplify-internal-button-disabled-border-color: var(
1460
+ --amplify-components-button-warning-disabled-border-color
1461
+ );
1462
+ --amplify-internal-button-disabled-background-color: var(
1463
+ --amplify-components-button-warning-disabled-background-color
1464
+ );
1465
+ --amplify-internal-button-disabled-color: var(
1466
+ --amplify-components-button-warning-disabled-color
1467
+ );
1468
+ --amplify-internal-button-loading-background-color: var(
1469
+ --amplify-components-button-warning-loading-background-color
1470
+ );
1471
+ --amplify-internal-button-loading-border-color: var(
1472
+ --amplify-components-button-warning-loading-border-color
1473
+ );
1474
+ --amplify-internal-button-loading-color: var(
1475
+ --amplify-components-button-warning-loading-color
1476
+ );
1477
+ --amplify-internal-button-loading-text-decoration: none;
1478
+ }
1479
+ .amplify-button--warning:hover {
1480
+ background-color: var(--amplify-components-button-warning-hover-background-color);
1481
+ border-color: var(--amplify-components-button-warning-hover-border-color);
1482
+ color: var(--amplify-components-button-warning-hover-color);
1483
+ }
1484
+ .amplify-button--warning:focus {
1485
+ background-color: var(--amplify-components-button-warning-focus-background-color);
1486
+ border-color: var(--amplify-components-button-warning-focus-border-color);
1487
+ color: var(--amplify-components-button-warning-focus-color);
1488
+ box-shadow: var(--amplify-components-button-warning-focus-box-shadow);
1489
+ }
1490
+ .amplify-button--warning:active {
1491
+ background-color: var(--amplify-components-button-warning-active-background-color);
1492
+ border-color: var(--amplify-components-button-warning-active-border-color);
1493
+ color: var(--amplify-components-button-warning-active-color);
1494
+ }
1372
1495
  .amplify-button--small {
1373
1496
  font-size: var(--amplify-components-button-small-font-size);
1374
1497
  -webkit-padding-before: var(--amplify-components-button-small-padding-block-start);
@@ -1908,6 +2031,7 @@ strong.amplify-text {
1908
2031
  .amplify-alert {
1909
2032
  align-items: var(--amplify-components-alert-align-items);
1910
2033
  background-color: var(--amplify-components-alert-background-color);
2034
+ color: var(--amplify-components-alert-color);
1911
2035
  justify-content: var(--amplify-components-alert-justify-content);
1912
2036
  padding-block: var(--amplify-components-alert-padding-block);
1913
2037
  padding-inline: var(--amplify-components-alert-padding-inline);
@@ -1980,6 +2104,7 @@ strong.amplify-text {
1980
2104
  }
1981
2105
  .amplify-autocomplete__menu__options {
1982
2106
  position: relative;
2107
+ overscroll-behavior: contain;
1983
2108
  display: var(--amplify-components-autocomplete-menu-options-display);
1984
2109
  flex-direction: var(--amplify-components-autocomplete-menu-options-flex-direction);
1985
2110
  max-height: var(--amplify-components-autocomplete-menu-options-max-height);
package/dist/theme.css CHANGED
@@ -160,6 +160,47 @@
160
160
  --amplify-components-button-link-loading-border-color: transparent;
161
161
  --amplify-components-button-link-loading-background-color: transparent;
162
162
  --amplify-components-button-link-loading-color: var(--amplify-colors-font-disabled);
163
+ --amplify-components-button-warning-background-color: transparent;
164
+ --amplify-components-button-warning-border-color: var(--amplify-colors-red-60);
165
+ --amplify-components-button-warning-border-width: var(--amplify-border-widths-small);
166
+ --amplify-components-button-warning-color: var(--amplify-colors-red-60);
167
+ --amplify-components-button-warning-hover-border-color: var(--amplify-colors-red-80);
168
+ --amplify-components-button-warning-hover-background-color: var(--amplify-colors-red-10);
169
+ --amplify-components-button-warning-hover-color: var(--amplify-colors-font-error);
170
+ --amplify-components-button-warning-focus-border-color: var(--amplify-colors-red-80);
171
+ --amplify-components-button-warning-focus-background-color: var(--amplify-colors-red-10);
172
+ --amplify-components-button-warning-focus-color: var(--amplify-colors-red-80);
173
+ --amplify-components-button-warning-focus-box-shadow: var(--amplify-components-fieldcontrol-error-focus-box-shadow);
174
+ --amplify-components-button-warning-active-border-color: var(--amplify-colors-red-100);
175
+ --amplify-components-button-warning-active-background-color: var(--amplify-colors-red-20);
176
+ --amplify-components-button-warning-active-color: var(--amplify-colors-red-100);
177
+ --amplify-components-button-warning-disabled-border-color: var(--amplify-colors-border-tertiary);
178
+ --amplify-components-button-warning-disabled-background-color: transparent;
179
+ --amplify-components-button-warning-disabled-color: var(--amplify-colors-font-disabled);
180
+ --amplify-components-button-warning-loading-border-color: var(--amplify-colors-border-tertiary);
181
+ --amplify-components-button-warning-loading-background-color: transparent;
182
+ --amplify-components-button-warning-loading-color: var(--amplify-colors-font-disabled);
183
+ --amplify-components-button-destructive-border-color: transparent;
184
+ --amplify-components-button-destructive-border-width: var(--amplify-border-widths-small);
185
+ --amplify-components-button-destructive-border-style: solid;
186
+ --amplify-components-button-destructive-background-color: var(--amplify-colors-red-60);
187
+ --amplify-components-button-destructive-color: var(--amplify-colors-font-inverse);
188
+ --amplify-components-button-destructive-disabled-border-color: transparent;
189
+ --amplify-components-button-destructive-disabled-background-color: var(--amplify-colors-background-disabled);
190
+ --amplify-components-button-destructive-disabled-color: var(--amplify-colors-font-disabled);
191
+ --amplify-components-button-destructive-loading-border-color: transparent;
192
+ --amplify-components-button-destructive-loading-background-color: var(--amplify-colors-background-disabled);
193
+ --amplify-components-button-destructive-loading-color: var(--amplify-colors-font-disabled);
194
+ --amplify-components-button-destructive-hover-border-color: transparent;
195
+ --amplify-components-button-destructive-hover-background-color: var(--amplify-colors-red-80);
196
+ --amplify-components-button-destructive-hover-color: var(--amplify-colors-font-inverse);
197
+ --amplify-components-button-destructive-focus-border-color: transparent;
198
+ --amplify-components-button-destructive-focus-background-color: var(--amplify-colors-red-80);
199
+ --amplify-components-button-destructive-focus-color: var(--amplify-colors-font-inverse);
200
+ --amplify-components-button-destructive-focus-box-shadow: var(--amplify-components-fieldcontrol-error-focus-box-shadow);
201
+ --amplify-components-button-destructive-active-border-color: transparent;
202
+ --amplify-components-button-destructive-active-background-color: var(--amplify-colors-red-100);
203
+ --amplify-components-button-destructive-active-color: var(--amplify-colors-font-inverse);
163
204
  --amplify-components-button-small-font-size: var(--amplify-components-fieldcontrol-small-font-size);
164
205
  --amplify-components-button-small-padding-block-start: var(--amplify-components-fieldcontrol-small-padding-block-start);
165
206
  --amplify-components-button-small-padding-block-end: var(--amplify-components-fieldcontrol-small-padding-block-end);
@@ -0,0 +1,2 @@
1
+ export * from './utils';
2
+ export { getDefaultConfirmPasswordValidators, getDefaultPasswordValidators, runFieldValidators, } from './validator';
@@ -0,0 +1,9 @@
1
+ import { AmplifyUser } from '../../types';
2
+ declare type ChangePasswordInput = {
3
+ user: AmplifyUser;
4
+ currentPassword: string;
5
+ newPassword: string;
6
+ };
7
+ export declare const changePassword: ({ user, currentPassword, newPassword, }: ChangePasswordInput) => Promise<void>;
8
+ export declare const deleteUser: () => Promise<void>;
9
+ export {};
@@ -0,0 +1,21 @@
1
+ import { ValidatorOptions, PasswordRequirement, ValidationMode, InputEventType } from '../../types';
2
+ export declare const getPasswordRequirement: () => PasswordRequirement;
3
+ export declare const getHasMinLength: (minLength: number) => ValidatorOptions;
4
+ export declare const hasLowerCase: ValidatorOptions;
5
+ export declare const hasUpperCase: ValidatorOptions;
6
+ export declare const hasNumber: ValidatorOptions;
7
+ export declare const hasSpecialChar: ValidatorOptions;
8
+ export declare const getMatchesConfirmPassword: (password: string) => ValidatorOptions;
9
+ export declare const getDefaultPasswordValidators: () => ValidatorOptions[];
10
+ export declare const getDefaultConfirmPasswordValidators: (password: string) => ValidatorOptions[];
11
+ export declare const shouldValidate: ({ validationMode, eventType, hasBlurred, }: {
12
+ validationMode: ValidationMode;
13
+ eventType: InputEventType;
14
+ hasBlurred: boolean;
15
+ }) => boolean;
16
+ export declare const runFieldValidators: ({ value, validators, eventType, hasBlurred, }: {
17
+ value: string;
18
+ validators: ValidatorOptions[];
19
+ eventType: InputEventType;
20
+ hasBlurred: boolean;
21
+ }) => string[];
@@ -30,7 +30,7 @@ export declare const authenticatorTextUtil: {
30
30
  readonly getDeliveryMessageText: (codeDeliveryDetails: CodeDeliveryDetails) => string;
31
31
  readonly getDeliveryMethodText: (codeDeliveryDetails: CodeDeliveryDetails) => string;
32
32
  /** ConfirmSignIn */
33
- readonly getChallengeText: (challengeName: AuthChallengeName) => string;
33
+ readonly getChallengeText: (challengeName?: AuthChallengeName) => string;
34
34
  /** ResetPassword */
35
35
  readonly getResetYourPasswordText: () => string;
36
36
  /** SetupTOTP */
@@ -1,2 +1,4 @@
1
1
  export * from './authenticator';
2
+ export * from './accountSettings';
2
3
  export * from './storage';
4
+ export { getLogger } from './utils';
@@ -0,0 +1,4 @@
1
+ import { Logger } from 'aws-amplify';
2
+ declare type LoggerCategory = 'Auth' | 'Geo' | 'Notifications' | 'Storage';
3
+ export declare const getLogger: (category: LoggerCategory) => Logger;
4
+ export {};
@@ -0,0 +1,2 @@
1
+ import { AuthenticatorDictionary } from './types';
2
+ export declare const heDict: AuthenticatorDictionary;
@@ -13,4 +13,5 @@ export { svDict } from './sv';
13
13
  export { idDict } from './id';
14
14
  export { trDict } from './tr';
15
15
  export { ruDict } from './ru';
16
+ export { heDict } from './he';
16
17
  export { defaultTexts } from './defaultTexts';
@@ -778,6 +778,58 @@ export declare const ruDict: {
778
778
  "Verify Contact": string;
779
779
  Verify: string;
780
780
  };
781
+ export declare const heDict: {
782
+ [x: string]: string;
783
+ Email: string;
784
+ "Phone Number": string;
785
+ "Account recovery requires verified contact information": string;
786
+ "Back to Sign In": string;
787
+ "Change Password": string;
788
+ Changing: string;
789
+ Code: string;
790
+ "Confirm Password": string;
791
+ "Confirm Sign Up": string;
792
+ "Confirm SMS Code": string;
793
+ "Confirm TOTP Code": string;
794
+ Confirm: string;
795
+ "Confirmation Code": string;
796
+ Confirming: string;
797
+ "Create a new account": string;
798
+ "Create Account": string;
799
+ "Creating Account": string;
800
+ "Dismiss alert": string;
801
+ "Enter your code": string;
802
+ "Enter your email": string;
803
+ "Enter your phone number": string;
804
+ "Enter your username": string;
805
+ "Forgot your password?": string;
806
+ "Hide password": string;
807
+ Loading: string;
808
+ "New password": string;
809
+ Password: string;
810
+ "Resend Code": string;
811
+ "Reset your password": string;
812
+ "Reset your Password": string;
813
+ "Send code": string;
814
+ "Send Code": string;
815
+ Sending: string;
816
+ "Setup TOTP": string;
817
+ "Show password": string;
818
+ "Sign in to your account": string;
819
+ "Sign In with Amazon": string;
820
+ "Sign In with Apple": string;
821
+ "Sign In with Facebook": string;
822
+ "Sign In with Google": string;
823
+ "Sign in": string;
824
+ "Sign In": string;
825
+ "Signing in": string;
826
+ Skip: string;
827
+ Submit: string;
828
+ Submitting: string;
829
+ Username: string;
830
+ "Verify Contact": string;
831
+ Verify: string;
832
+ };
781
833
  export declare const defaultTexts: {
782
834
  BACK_SIGN_IN: string;
783
835
  BIRTHDATE: string;
@@ -23,18 +23,20 @@ declare type LinkVariationTokens<Output> = DesignTokenProperties<'backgroundColo
23
23
  _loading?: StateTokens<Output>;
24
24
  };
25
25
  declare type ButtonSizeTokens<Output> = DesignTokenProperties<'fontSize' | 'paddingBlockStart' | 'paddingBlockEnd' | 'paddingInlineStart' | 'paddingInlineEnd', Output>;
26
- export declare type ButtonTokens<Output extends OutputVariantKey> = DesignTokenProperties<'fontWeight' | 'transitionDuration' | 'fontSize' | 'lineHeight' | 'paddingBlockStart' | 'paddingBlockEnd' | 'paddingInlineStart' | 'paddingInlineEnd' | 'borderColor' | 'borderWidth' | 'borderStyle' | 'borderRadius' | 'color'> & {
26
+ export declare type ButtonTokens<Output extends OutputVariantKey> = DesignTokenProperties<'fontWeight' | 'transitionDuration' | 'fontSize' | 'lineHeight' | 'paddingBlockStart' | 'paddingBlockEnd' | 'paddingInlineStart' | 'paddingInlineEnd' | 'borderColor' | 'borderWidth' | 'borderStyle' | 'borderRadius' | 'color', Output> & {
27
27
  _hover?: StateTokens<Output>;
28
28
  _focus?: StateWithShadowTokens<Output>;
29
29
  _active?: StateTokens<Output>;
30
30
  _loading?: StateTokens<Output>;
31
31
  _disabled?: StateTokens<Output>;
32
32
  primary?: PrimaryVariationTokens<Output>;
33
+ warning?: LinkVariationTokens<Output>;
34
+ destructive?: PrimaryVariationTokens<Output>;
33
35
  menu?: MenuVariationTokens<Output>;
34
36
  link?: LinkVariationTokens<Output>;
35
37
  small?: ButtonSizeTokens<Output>;
36
38
  large?: ButtonSizeTokens<Output>;
37
- loaderWrapper: DesignTokenProperties<'alignItems' | 'gap', Output>;
39
+ loaderWrapper?: DesignTokenProperties<'alignItems' | 'gap', Output>;
38
40
  };
39
41
  export declare const button: Required<ButtonTokens<'default'>>;
40
42
  export {};
@@ -8,17 +8,17 @@ declare type PaginationTokens<Output> = {
8
8
  };
9
9
  };
10
10
  declare type SearchTokens<Output> = {
11
- input: DesignTokenProperties<'color', Output>;
12
- button: DesignTokenProperties<'color', Output> & {
13
- _active: StateTokens<Output>;
14
- _disabled: StateTokens<Output>;
15
- _focus: StateTokens<Output>;
16
- _hover: StateTokens<Output>;
11
+ input?: DesignTokenProperties<'color', Output>;
12
+ button?: DesignTokenProperties<'color', Output> & {
13
+ _active?: StateTokens<Output>;
14
+ _disabled?: StateTokens<Output>;
15
+ _focus?: StateTokens<Output>;
16
+ _hover?: StateTokens<Output>;
17
17
  };
18
18
  };
19
19
  export interface CollectionTokens<Output extends OutputVariantKey> {
20
- pagination: PaginationTokens<Output>;
21
- search: SearchTokens<Output>;
20
+ pagination?: PaginationTokens<Output>;
21
+ search?: SearchTokens<Output>;
22
22
  }
23
23
  export declare const collection: Required<CollectionTokens<'default'>>;
24
24
  export {};
@@ -2,21 +2,21 @@ import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
2
  import { TypographyTokens } from '../types/typography';
3
3
  declare type BaseDropZoneTokens<OutputType> = DesignTokenProperties<'backgroundColor' | 'borderWidth' | 'borderStyle' | 'borderColor' | 'borderRadius', OutputType>;
4
4
  export interface FileUploaderTokens<OutputType extends OutputVariantKey> {
5
- dropzone: DesignTokenProperties<'gap' | 'paddingBlock' | 'paddingInline' | 'textAlign'> & BaseDropZoneTokens<OutputType> & {
6
- _active: BaseDropZoneTokens<OutputType>;
7
- icon: DesignTokenProperties<'fontSize' | 'color', OutputType>;
8
- text: TypographyTokens<OutputType>;
5
+ dropzone?: DesignTokenProperties<'gap' | 'paddingBlock' | 'paddingInline' | 'textAlign'> & BaseDropZoneTokens<OutputType> & {
6
+ _active?: BaseDropZoneTokens<OutputType>;
7
+ icon?: DesignTokenProperties<'fontSize' | 'color', OutputType>;
8
+ text?: TypographyTokens<OutputType>;
9
9
  };
10
- file: DesignTokenProperties<'alignItems' | 'backgroundColor' | 'borderColor' | 'borderRadius' | 'borderStyle' | 'borderWidth' | 'gap' | 'paddingBlock' | 'paddingInline', OutputType> & {
11
- name: TypographyTokens<OutputType>;
12
- size: TypographyTokens<OutputType>;
13
- image: DesignTokenProperties<'backgroundColor' | 'borderRadius' | 'color' | 'height' | 'width', OutputType>;
10
+ file?: DesignTokenProperties<'alignItems' | 'backgroundColor' | 'borderColor' | 'borderRadius' | 'borderStyle' | 'borderWidth' | 'gap' | 'paddingBlock' | 'paddingInline', OutputType> & {
11
+ name?: TypographyTokens<OutputType>;
12
+ size?: TypographyTokens<OutputType>;
13
+ image?: DesignTokenProperties<'backgroundColor' | 'borderRadius' | 'color' | 'height' | 'width', OutputType>;
14
14
  };
15
- loader: DesignTokenProperties<'strokeWidth' | 'strokeFilled' | 'strokeEmpty' | 'strokeLinecap', OutputType>;
16
- previewer: DesignTokenProperties<'backgroundColor' | 'borderColor' | 'borderRadius' | 'borderStyle' | 'borderWidth' | 'maxHeight' | 'maxWidth' | 'paddingBlock' | 'paddingInline', OutputType> & {
17
- text: TypographyTokens<OutputType>;
18
- body: DesignTokenProperties<'gap' | 'paddingInline' | 'paddingBlock', OutputType>;
19
- footer: DesignTokenProperties<'borderColor' | 'borderStyle' | 'borderWidth' | 'justifyContent' | 'paddingBlock' | 'paddingInline', OutputType>;
15
+ loader?: DesignTokenProperties<'strokeWidth' | 'strokeFilled' | 'strokeEmpty' | 'strokeLinecap', OutputType>;
16
+ previewer?: DesignTokenProperties<'backgroundColor' | 'borderColor' | 'borderRadius' | 'borderStyle' | 'borderWidth' | 'maxHeight' | 'maxWidth' | 'paddingBlock' | 'paddingInline', OutputType> & {
17
+ text?: TypographyTokens<OutputType>;
18
+ body?: DesignTokenProperties<'gap' | 'paddingInline' | 'paddingBlock', OutputType>;
19
+ footer?: DesignTokenProperties<'borderColor' | 'borderStyle' | 'borderWidth' | 'justifyContent' | 'paddingBlock' | 'paddingInline', OutputType>;
20
20
  };
21
21
  }
22
22
  export declare const fileuploader: Required<FileUploaderTokens<'default'>>;
@@ -1,6 +1,6 @@
1
1
  import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
2
  declare type HeadingLevelTokens<Output> = DesignTokenProperties<'fontSize' | 'fontWeight', Output>;
3
3
  declare type Level = 1 | 2 | 3 | 4 | 5 | 6;
4
- export declare type HeadingTokens<Output extends OutputVariantKey> = DesignTokenProperties<'color' | 'lineHeight'> & Record<Level, HeadingLevelTokens<Output>>;
4
+ export declare type HeadingTokens<Output extends OutputVariantKey> = DesignTokenProperties<'color' | 'lineHeight', Output> & Partial<Record<Level, HeadingLevelTokens<Output>>>;
5
5
  export declare const heading: Required<HeadingTokens<'default'>>;
6
6
  export {};
@@ -1,5 +1,5 @@
1
1
  import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
2
  declare type LinkState = 'active' | 'focus' | 'hover' | 'visited';
3
- export declare type LinkTokens<Output extends OutputVariantKey> = DesignTokenProperties<'color'> & Record<LinkState, DesignTokenProperties<'color', Output>>;
3
+ export declare type LinkTokens<Output extends OutputVariantKey> = DesignTokenProperties<'color', Output> & Partial<Record<LinkState, DesignTokenProperties<'color', Output>>>;
4
4
  export declare const link: Required<LinkTokens<'default'>>;
5
5
  export {};
@@ -1,8 +1,8 @@
1
1
  import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
2
  export declare type RatingTokens<Output extends OutputVariantKey> = {
3
- large: DesignTokenProperties<'size', Output>;
4
- default: DesignTokenProperties<'size', Output>;
5
- small: DesignTokenProperties<'size', Output>;
3
+ large?: DesignTokenProperties<'size', Output>;
4
+ default?: DesignTokenProperties<'size', Output>;
5
+ small?: DesignTokenProperties<'size', Output>;
6
6
  filled?: DesignTokenProperties<'color', Output>;
7
7
  empty?: DesignTokenProperties<'color', Output>;
8
8
  };
@@ -1,10 +1,10 @@
1
1
  import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
2
  declare type SelectSizeTokens<Output> = DesignTokenProperties<'minWidth', Output>;
3
- export declare type SelectTokens<Output extends OutputVariantKey> = DesignTokenProperties<'paddingInlineEnd' | 'whiteSpace' | 'minWidth'> & {
4
- wrapper?: DesignTokenProperties<'cursor' | 'display' | 'flex' | 'position'>;
5
- iconWrapper?: DesignTokenProperties<'alignItems' | 'position' | 'top' | 'right' | 'transform' | 'pointerEvents'>;
6
- option?: DesignTokenProperties<'backgroundColor' | 'color'> & {
7
- _disabled?: DesignTokenProperties<'color'>;
3
+ export declare type SelectTokens<Output extends OutputVariantKey> = DesignTokenProperties<'paddingInlineEnd' | 'whiteSpace' | 'minWidth', Output> & {
4
+ wrapper?: DesignTokenProperties<'cursor' | 'display' | 'flex' | 'position', Output>;
5
+ iconWrapper?: DesignTokenProperties<'alignItems' | 'position' | 'top' | 'right' | 'transform' | 'pointerEvents', Output>;
6
+ option?: DesignTokenProperties<'backgroundColor' | 'color', Output> & {
7
+ _disabled?: DesignTokenProperties<'color', Output>;
8
8
  };
9
9
  small?: SelectSizeTokens<Output>;
10
10
  large?: SelectSizeTokens<Output>;
@@ -1,6 +1,6 @@
1
1
  import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
2
  declare type ButtonStateColorTokens<Output> = DesignTokenProperties<'backgroundColor' | 'color', Output>;
3
- export declare type StepperFieldTokens<Output extends OutputVariantKey> = DesignTokenProperties<'borderColor' | 'flexDirection'> & {
3
+ export declare type StepperFieldTokens<Output extends OutputVariantKey> = DesignTokenProperties<'borderColor' | 'flexDirection', Output> & {
4
4
  input?: DesignTokenProperties<'textAlign' | 'color' | 'fontSize', Output>;
5
5
  button?: DesignTokenProperties<'backgroundColor' | 'color', Output> & {
6
6
  _active?: ButtonStateColorTokens<Output>;
@@ -1,20 +1,20 @@
1
1
  import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
2
  declare type SwitchFieldSizeTokens<OutputType> = DesignTokenProperties<'fontSize', OutputType>;
3
3
  declare type SwitchFieldTrackCheckedTokens<OutputType> = DesignTokenProperties<'backgroundColor', OutputType>;
4
- export declare type SwitchFieldTokens<OutputType extends OutputVariantKey> = DesignTokenProperties<'fontSize'> & {
4
+ export declare type SwitchFieldTokens<OutputType extends OutputVariantKey> = DesignTokenProperties<'fontSize', OutputType> & {
5
5
  _disabled?: DesignTokenProperties<'opacity', OutputType>;
6
6
  _focused?: DesignTokenProperties<'shadow', OutputType>;
7
7
  large?: SwitchFieldSizeTokens<OutputType>;
8
8
  small?: SwitchFieldSizeTokens<OutputType>;
9
9
  label?: DesignTokenProperties<'padding', OutputType>;
10
10
  thumb?: DesignTokenProperties<'backgroundColor' | 'borderColor' | 'borderRadius' | 'width', OutputType> & {
11
- checked: DesignTokenProperties<'transform', OutputType>;
12
- transition: DesignTokenProperties<'duration', OutputType>;
11
+ checked?: DesignTokenProperties<'transform', OutputType>;
12
+ transition?: DesignTokenProperties<'duration', OutputType>;
13
13
  };
14
14
  track?: DesignTokenProperties<'backgroundColor' | 'borderRadius' | 'height' | 'width' | 'padding', OutputType> & {
15
- checked: SwitchFieldTrackCheckedTokens<OutputType>;
16
- transition: DesignTokenProperties<'duration', OutputType>;
17
- _error: SwitchFieldTrackCheckedTokens<OutputType>;
15
+ checked?: SwitchFieldTrackCheckedTokens<OutputType>;
16
+ transition?: DesignTokenProperties<'duration', OutputType>;
17
+ _error?: SwitchFieldTrackCheckedTokens<OutputType>;
18
18
  };
19
19
  };
20
20
  export declare const switchfield: Required<SwitchFieldTokens<'default'>>;
@@ -14,8 +14,8 @@ export declare type TableTokens<Output extends OutputVariantKey> = DesignTokenPr
14
14
  hover?: DesignTokenProperties<'backgroundColor', Output>;
15
15
  striped?: DesignTokenProperties<'backgroundColor', Output>;
16
16
  };
17
- header: TableCellTokens<Output>;
18
- data: TableCellTokens<Output>;
17
+ header?: TableCellTokens<Output>;
18
+ data?: TableCellTokens<Output>;
19
19
  caption?: DesignTokenProperties<'captionSide' | 'color' | 'display' | 'fontSize' | 'textAlign' | 'wordBreak', Output> & {
20
20
  large?: TableCaptionSizeTokens<Output>;
21
21
  small?: TableCaptionSizeTokens<Output>;
@@ -2,6 +2,6 @@ import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
2
  declare type OrderVariantKey = 'primary' | 'secondary' | 'tertiary';
3
3
  declare type InformationVariantKey = 'info' | 'warning' | 'error' | 'success';
4
4
  declare type BaseTextTokens<Output> = DesignTokenProperties<'color', Output>;
5
- export declare type TextTokens<Output extends OutputVariantKey> = BaseTextTokens<Output> & Record<OrderVariantKey | InformationVariantKey, BaseTextTokens<Output>>;
5
+ export declare type TextTokens<Output extends OutputVariantKey> = BaseTextTokens<Output> & Partial<Record<OrderVariantKey | InformationVariantKey, BaseTextTokens<Output>>>;
6
6
  export declare const text: Required<TextTokens<'default'>>;
7
7
  export {};
@@ -1,6 +1,6 @@
1
1
  import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
2
  declare type TokenKey = 'color' | 'borderColor' | 'fontSize';
3
- export declare type TextAreaFieldTokens<Output extends OutputVariantKey> = DesignTokenProperties<Output extends 'default' ? Exclude<TokenKey, 'fontSize'> : TokenKey> & {
3
+ export declare type TextAreaFieldTokens<Output extends OutputVariantKey> = DesignTokenProperties<Output extends 'default' ? Exclude<TokenKey, 'fontSize'> : TokenKey, Output> & {
4
4
  _focus?: DesignTokenProperties<'borderColor', Output>;
5
5
  };
6
6
  export declare const textareafield: Required<TextAreaFieldTokens<'default'>>;
@@ -1,5 +1,5 @@
1
1
  import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
- export declare type TextFieldTokens<Output extends OutputVariantKey> = DesignTokenProperties<'color' | 'borderColor' | 'fontSize'> & {
2
+ export declare type TextFieldTokens<Output extends OutputVariantKey> = DesignTokenProperties<'color' | 'borderColor' | 'fontSize', Output> & {
3
3
  _focus?: DesignTokenProperties<'borderColor', Output>;
4
4
  };
5
5
  export declare const textfield: Required<TextFieldTokens<'default'>>;
@@ -0,0 +1 @@
1
+ export * from './validator';
@@ -0,0 +1,14 @@
1
+ export declare type InputEventType = 'blur' | 'change';
2
+ export declare type ValidationMode = 'onBlur' | 'onChange' | 'onTouched';
3
+ export interface ValidatorOptions {
4
+ validationMode: ValidationMode;
5
+ validator: (value: string) => boolean;
6
+ message: string;
7
+ }
8
+ export interface PasswordRequirement {
9
+ minLength?: number;
10
+ needsLowerCase?: boolean;
11
+ needsUpperCase?: boolean;
12
+ needsSpecialChar?: boolean;
13
+ needsNumber?: boolean;
14
+ }
@@ -1,3 +1,4 @@
1
+ export * from './accountSettings';
1
2
  export * from './authenticator';
2
3
  export * from './primitives';
3
4
  export * from './util';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui",
3
- "version": "5.2.0",
3
+ "version": "5.3.1",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "exports": {
@@ -45,8 +45,8 @@
45
45
  "dependencies": {
46
46
  "csstype": "^3.1.1",
47
47
  "lodash": "4.17.21",
48
- "style-dictionary": "3.7.0",
49
- "tslib": "2.4.0"
48
+ "style-dictionary": "3.7.1",
49
+ "tslib": "2.4.1"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "aws-amplify": ">= 5.0.1",