@aws-amplify/ui 5.6.5 → 5.6.7

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.
package/dist/styles.css CHANGED
@@ -397,6 +397,7 @@
397
397
  --amplify-components-fieldcontrol-disabled-border-color: var(--amplify-colors-transparent);
398
398
  --amplify-components-fieldcontrol-disabled-background-color: var(--amplify-colors-background-disabled);
399
399
  --amplify-components-fieldcontrol-error-border-color: var(--amplify-colors-border-error);
400
+ --amplify-components-fieldcontrol-error-color: var(--amplify-colors-font-error);
400
401
  --amplify-components-fieldcontrol-error-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-border-error);
401
402
  --amplify-components-fieldgroup-gap: var(--amplify-space-zero);
402
403
  --amplify-components-fieldgroup-vertical-align-items: center;
@@ -2893,10 +2894,14 @@ html[dir=rtl] .amplify-field-group__inner-start {
2893
2894
 
2894
2895
  .amplify-liveness-toast {
2895
2896
  background-color: var(--amplify-colors-background-primary);
2897
+ padding: var(--amplify-space-small);
2898
+ border-radius: var(--amplify-radii-medium);
2896
2899
  }
2897
2900
 
2898
2901
  .amplify-liveness-toast__message {
2899
2902
  color: var(--amplify-colors-font-primary);
2903
+ text-align: center;
2904
+ flex-direction: column;
2900
2905
  }
2901
2906
 
2902
2907
  .amplify-liveness-toast--large {
@@ -2908,6 +2913,14 @@ html[dir=rtl] .amplify-field-group__inner-start {
2908
2913
  }
2909
2914
  .amplify-liveness-toast--primary .amplify-liveness-toast__message {
2910
2915
  color: var(--amplify-colors-font-inverse);
2916
+ text-align: center;
2917
+ flex-direction: column;
2918
+ }
2919
+
2920
+ .amplify-liveness-toast__container {
2921
+ gap: var(--amplify-space-xs);
2922
+ flex-direction: column;
2923
+ align-items: center;
2911
2924
  }
2912
2925
 
2913
2926
  .amplify-liveness-toast--error {
@@ -3023,6 +3036,117 @@ html[dir=rtl] .amplify-field-group__inner-start {
3023
3036
  top: 0;
3024
3037
  }
3025
3038
 
3039
+ .amplify-liveness-landscape-error-modal {
3040
+ background-color: var(--amplify-colors-background-primary);
3041
+ direction: column;
3042
+ text-align: center;
3043
+ align-items: center;
3044
+ justify-content: center;
3045
+ width: 100%;
3046
+ }
3047
+
3048
+ .amplify-liveness-landscape-error-modal__header {
3049
+ font-size: large;
3050
+ font-weight: var(--amplify-font-weights-bold);
3051
+ }
3052
+
3053
+ .amplify-liveness-landscape-error-modal__button {
3054
+ justify-content: center;
3055
+ }
3056
+
3057
+ .amplify-liveness-start-screen-header {
3058
+ display: flex;
3059
+ flex-direction: column;
3060
+ }
3061
+
3062
+ .amplify-liveness-start-screen-header__heading {
3063
+ color: var(--amplify-colors-font-primary);
3064
+ font-weight: var(--amplify-font-weights-bold);
3065
+ }
3066
+
3067
+ .amplify-liveness-start-screen-header__body {
3068
+ color: var(--amplify-colors-font-primary);
3069
+ }
3070
+
3071
+ .amplify-liveness-start-screen-warning {
3072
+ color: var(--amplify-colors-orange-80);
3073
+ background-color: var(--amplify-colors-orange-20);
3074
+ align-items: center;
3075
+ }
3076
+
3077
+ .amplify-liveness-start-screen-instructions__heading {
3078
+ color: var(--amplify-colors-font-primary);
3079
+ font-weight: var(--amplify-font-weights-bold);
3080
+ }
3081
+
3082
+ .amplify-liveness-overlay-opaque {
3083
+ background-color: var(--amplify-colors-overlay-40);
3084
+ }
3085
+
3086
+ .amplify-liveness-overlay {
3087
+ flex-direction: column;
3088
+ position: absolute;
3089
+ left: 0;
3090
+ top: 0;
3091
+ width: 100%;
3092
+ height: 100%;
3093
+ padding: var(--amplify-space-xl);
3094
+ }
3095
+
3096
+ .amplify-liveness-error-modal {
3097
+ gap: var(--amplify-space-xs);
3098
+ align-items: center;
3099
+ justify-content: center;
3100
+ color: var(--amplify-colors-font-error);
3101
+ }
3102
+
3103
+ .amplify-liveness-error-modal__heading {
3104
+ font-weight: var(--amplify-font-weights-bold);
3105
+ }
3106
+
3107
+ .amplify-liveness-hint__text {
3108
+ align-items: center;
3109
+ gap: var(--amplify-space-xs);
3110
+ }
3111
+
3112
+ .amplify-liveness-popover {
3113
+ position: relative;
3114
+ cursor: pointer;
3115
+ }
3116
+
3117
+ .amplify-liveness-popover__anchor {
3118
+ position: absolute;
3119
+ top: 26px;
3120
+ left: 3px;
3121
+ z-index: 3;
3122
+ border-style: solid;
3123
+ border-width: 0 9px 9px 9px;
3124
+ border-color: transparent transparent var(--amplify-colors-background-primary) transparent;
3125
+ }
3126
+
3127
+ .amplify-liveness-popover__anchor-secondary {
3128
+ position: absolute;
3129
+ top: 24px;
3130
+ left: 2px;
3131
+ z-index: 2;
3132
+ border-style: solid;
3133
+ border-width: 0 10px 10px 10px;
3134
+ border-color: transparent transparent var(--amplify-colors-border-secondary) transparent;
3135
+ }
3136
+
3137
+ .amplify-liveness-popover__container {
3138
+ position: absolute;
3139
+ background-color: var(--amplify-colors-background-primary);
3140
+ color: var(--amplify-colors-font-primary);
3141
+ flex-direction: row;
3142
+ font-size: var(--amplify-font-sizes-xs);
3143
+ padding: var(--amplify-space-small);
3144
+ top: 33px;
3145
+ width: 240px;
3146
+ border: 1px solid var(--amplify-colors-border-secondary);
3147
+ border-radius: 2px;
3148
+ }
3149
+
3026
3150
  .amplify-fileuploader__dropzone {
3027
3151
  background-color: var(--amplify-components-fileuploader-dropzone-background-color);
3028
3152
  border-color: var(--amplify-components-fileuploader-dropzone-border-color);
@@ -3323,6 +3447,11 @@ html[dir=rtl] .amplify-field-group__inner-start {
3323
3447
  );
3324
3448
  }
3325
3449
 
3450
+ .amplify-field__show-password--error {
3451
+ color: var(--amplify-components-fieldcontrol-error-color);
3452
+ border-color: var(--amplify-components-fieldcontrol-error-border-color);
3453
+ }
3454
+
3326
3455
  .amplify-phonenumberfield select:not(:focus) {
3327
3456
  border-right: none;
3328
3457
  }
package/dist/theme.css CHANGED
@@ -394,6 +394,7 @@
394
394
  --amplify-components-fieldcontrol-disabled-border-color: var(--amplify-colors-transparent);
395
395
  --amplify-components-fieldcontrol-disabled-background-color: var(--amplify-colors-background-disabled);
396
396
  --amplify-components-fieldcontrol-error-border-color: var(--amplify-colors-border-error);
397
+ --amplify-components-fieldcontrol-error-color: var(--amplify-colors-font-error);
397
398
  --amplify-components-fieldcontrol-error-focus-box-shadow: 0px 0px 0px 1px var(--amplify-colors-border-error);
398
399
  --amplify-components-fieldgroup-gap: var(--amplify-space-zero);
399
400
  --amplify-components-fieldgroup-vertical-align-items: center;
@@ -9,3 +9,9 @@ export declare const defaultFormFieldOptions: DefaultFormFieldOptions;
9
9
  * Adapted from https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-policies.html
10
10
  */
11
11
  export declare const ALLOWED_SPECIAL_CHARACTERS: string[];
12
+ /**
13
+ * Email validation regex
14
+ *
15
+ * source: HTML5 spec https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address
16
+ */
17
+ export declare const emailRegex: RegExp;
@@ -45,4 +45,7 @@ export declare const authenticatorTextUtil: {
45
45
  readonly getVerifyText: () => string;
46
46
  readonly getVerifyContactText: () => string;
47
47
  readonly getAccountRecoveryInfoText: () => string;
48
+ /** Validations */
49
+ readonly getInvalidEmailText: () => string;
50
+ readonly getRequiredFieldText: () => string;
48
51
  };
@@ -27,4 +27,5 @@ export declare const listenToAuthHub: (service: AuthInterpreter, handler?: AuthM
27
27
  export declare const hasSpecialChars: (password: string) => boolean;
28
28
  export declare const getTotpCodeURL: (issuer: string, username: string, secret: string) => string;
29
29
  export declare function trimValues<T extends Record<string, string>>(values: T, ...ignored: string[]): T;
30
+ export declare const isValidEmail: (value: string | undefined) => boolean;
30
31
  export {};
@@ -9,7 +9,7 @@ type ButtonToken<Output> = DesignTokenProperties<'position' | 'alignItems' | 'ju
9
9
  _focus?: DesignTokenProperties<'borderColor' | 'boxShadow', Output>;
10
10
  };
11
11
  };
12
- type IconCheckedStateToken<Output> = DesignTokenProperties<'opacity' | 'transform'> & {
12
+ type IconCheckedStateToken<Output> = DesignTokenProperties<'opacity' | 'transform', Output> & {
13
13
  _disabled?: DesignTokenProperties<'backgroundColor', Output>;
14
14
  };
15
15
  type IconToken<Output> = DesignTokenProperties<'backgroundColor' | 'borderRadius' | 'opacity' | 'transform' | 'transitionProperty' | 'transitionDuration' | 'transitionTimingFunction', Output> & {
@@ -2,7 +2,7 @@ import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
2
2
  type FieldControlSizeTokens<Output> = DesignTokenProperties<'fontSize' | 'paddingBlockStart' | 'paddingBlockEnd' | 'paddingInlineStart' | 'paddingInlineEnd', Output>;
3
3
  type FieldControlFocusTokens<Output> = DesignTokenProperties<'borderColor' | 'boxShadow', Output>;
4
4
  type FieldControlDisabledTokens<Output> = DesignTokenProperties<'color' | 'cursor' | 'borderColor' | 'backgroundColor', Output>;
5
- type FieldControlErrorTokens<Output> = DesignTokenProperties<'borderColor', Output> & {
5
+ type FieldControlErrorTokens<Output> = DesignTokenProperties<'borderColor' | 'color', Output> & {
6
6
  _focus?: DesignTokenProperties<'boxShadow', Output>;
7
7
  };
8
8
  type FieldControlQuietTokens<Output> = DesignTokenProperties<'borderStyle' | 'borderInlineStart' | 'borderInlineEnd' | 'borderBlockStart' | 'borderRadius', Output> & {
@@ -40,7 +40,7 @@ export type BorderColorValue = ColorValue;
40
40
  export type BorderCollapseValue = string;
41
41
  export type BorderRadiusValue = RadiusValue;
42
42
  export type BorderStyleValue = string;
43
- export type BorderWidthValue<Platform extends PlatformKey = unknown, Output extends OutputVariantKey = unknown> = Output extends 'required' ? Platform extends 'react-native' ? number : SpaceValue : SpaceValue;
43
+ export type BorderWidthValue<Platform extends PlatformKey = unknown, Output extends OutputVariantKey = unknown> = Output extends 'required' ? Platform extends 'react-native' ? number : SpaceValue<Platform> : SpaceValue<Platform>;
44
44
  export type BorderValue = string;
45
45
  export type BoxSizingValue = string;
46
46
  export type BoxShadowValue = ShadowValue;
@@ -2,6 +2,7 @@ import { PartialDeep } from '../types';
2
2
  import { DefaultTokens, Tokens, WebTokens } from './tokens';
3
3
  import { Breakpoints } from './breakpoints';
4
4
  export * from './tokens/types/designToken';
5
+ export type { BorderWidths } from './tokens/borderWidths';
5
6
  export type { FontSizes } from './tokens/fontSizes';
6
7
  export type { FontWeights } from './tokens/fontWeights';
7
8
  export type { LineHeights } from './tokens/lineHeights';
@@ -28,6 +28,9 @@ export interface AuthContext {
28
28
  socialProviders?: SocialProvider[];
29
29
  formFields?: AuthFormFields;
30
30
  initialState?: 'signIn' | 'signUp' | 'resetPassword';
31
+ /**
32
+ * @deprecated The `passwordSettings` property has been deprecated and will be removed in a future major version of Amplify UI.
33
+ */
31
34
  passwordSettings?: PasswordSettings;
32
35
  };
33
36
  services?: Partial<typeof defaultServices>;
@@ -121,6 +121,7 @@ export declare enum ComponentClassName {
121
121
  StepperFieldButtonDecrease = "amplify-stepperfield__button--decrease",
122
122
  StepperFieldButtonIncrease = "amplify-stepperfield__button--increase",
123
123
  StepperFieldInput = "amplify-stepperfield__input",
124
+ StorageImage = "amplify-storageimage",
124
125
  StorageManager = "amplify-storagemanager",
125
126
  StorageManagerDropZone = "amplify-storagemanager__dropzone",
126
127
  StorageManagerDropZoneIcon = "amplify-storagemanager__dropzone__icon",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui",
3
- "version": "5.6.5",
3
+ "version": "5.6.7",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.mjs",
6
6
  "exports": {