@aws-amplify/ui 5.6.6 → 5.6.8

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;
@@ -806,7 +807,9 @@
806
807
  --amplify-components-switchfield-small-font-size: var(--amplify-font-sizes-small);
807
808
  --amplify-components-switchfield-label-padding: var(--amplify-space-xs);
808
809
  --amplify-components-switchfield-thumb-background-color: var(--amplify-colors-background-primary);
809
- --amplify-components-switchfield-thumb-border-color: var(--amplify-colors-border-tertiary);
810
+ --amplify-components-switchfield-thumb-border-color: transparent;
811
+ --amplify-components-switchfield-thumb-border-width: var(--amplify-border-widths-small);
812
+ --amplify-components-switchfield-thumb-border-style: solid;
810
813
  --amplify-components-switchfield-thumb-border-radius: var(--amplify-radii-xxxl);
811
814
  --amplify-components-switchfield-thumb-checked-transform: var(--amplify-transforms-slide-x-medium);
812
815
  --amplify-components-switchfield-thumb-transition-duration: var(--amplify-time-medium);
@@ -1221,14 +1224,6 @@ select {
1221
1224
  display: block;
1222
1225
  overflow: auto;
1223
1226
  }
1224
- .amplify-scrollview--horizontal {
1225
- overflow-x: scroll;
1226
- overflow-y: initial;
1227
- }
1228
- .amplify-scrollview--vertical {
1229
- overflow-x: initial;
1230
- overflow-y: scroll;
1231
- }
1232
1227
 
1233
1228
  .amplify-text {
1234
1229
  display: block;
@@ -2893,10 +2888,14 @@ html[dir=rtl] .amplify-field-group__inner-start {
2893
2888
 
2894
2889
  .amplify-liveness-toast {
2895
2890
  background-color: var(--amplify-colors-background-primary);
2891
+ padding: var(--amplify-space-small);
2892
+ border-radius: var(--amplify-radii-medium);
2896
2893
  }
2897
2894
 
2898
2895
  .amplify-liveness-toast__message {
2899
2896
  color: var(--amplify-colors-font-primary);
2897
+ text-align: center;
2898
+ flex-direction: column;
2900
2899
  }
2901
2900
 
2902
2901
  .amplify-liveness-toast--large {
@@ -2908,6 +2907,14 @@ html[dir=rtl] .amplify-field-group__inner-start {
2908
2907
  }
2909
2908
  .amplify-liveness-toast--primary .amplify-liveness-toast__message {
2910
2909
  color: var(--amplify-colors-font-inverse);
2910
+ text-align: center;
2911
+ flex-direction: column;
2912
+ }
2913
+
2914
+ .amplify-liveness-toast__container {
2915
+ gap: var(--amplify-space-xs);
2916
+ flex-direction: column;
2917
+ align-items: center;
2911
2918
  }
2912
2919
 
2913
2920
  .amplify-liveness-toast--error {
@@ -3023,6 +3030,117 @@ html[dir=rtl] .amplify-field-group__inner-start {
3023
3030
  top: 0;
3024
3031
  }
3025
3032
 
3033
+ .amplify-liveness-landscape-error-modal {
3034
+ background-color: var(--amplify-colors-background-primary);
3035
+ direction: column;
3036
+ text-align: center;
3037
+ align-items: center;
3038
+ justify-content: center;
3039
+ width: 100%;
3040
+ }
3041
+
3042
+ .amplify-liveness-landscape-error-modal__header {
3043
+ font-size: large;
3044
+ font-weight: var(--amplify-font-weights-bold);
3045
+ }
3046
+
3047
+ .amplify-liveness-landscape-error-modal__button {
3048
+ justify-content: center;
3049
+ }
3050
+
3051
+ .amplify-liveness-start-screen-header {
3052
+ display: flex;
3053
+ flex-direction: column;
3054
+ }
3055
+
3056
+ .amplify-liveness-start-screen-header__heading {
3057
+ color: var(--amplify-colors-font-primary);
3058
+ font-weight: var(--amplify-font-weights-bold);
3059
+ }
3060
+
3061
+ .amplify-liveness-start-screen-header__body {
3062
+ color: var(--amplify-colors-font-primary);
3063
+ }
3064
+
3065
+ .amplify-liveness-start-screen-warning {
3066
+ color: var(--amplify-colors-orange-80);
3067
+ background-color: var(--amplify-colors-orange-20);
3068
+ align-items: center;
3069
+ }
3070
+
3071
+ .amplify-liveness-start-screen-instructions__heading {
3072
+ color: var(--amplify-colors-font-primary);
3073
+ font-weight: var(--amplify-font-weights-bold);
3074
+ }
3075
+
3076
+ .amplify-liveness-overlay-opaque {
3077
+ background-color: var(--amplify-colors-overlay-40);
3078
+ }
3079
+
3080
+ .amplify-liveness-overlay {
3081
+ flex-direction: column;
3082
+ position: absolute;
3083
+ left: 0;
3084
+ top: 0;
3085
+ width: 100%;
3086
+ height: 100%;
3087
+ padding: var(--amplify-space-xl);
3088
+ }
3089
+
3090
+ .amplify-liveness-error-modal {
3091
+ gap: var(--amplify-space-xs);
3092
+ align-items: center;
3093
+ justify-content: center;
3094
+ color: var(--amplify-colors-font-error);
3095
+ }
3096
+
3097
+ .amplify-liveness-error-modal__heading {
3098
+ font-weight: var(--amplify-font-weights-bold);
3099
+ }
3100
+
3101
+ .amplify-liveness-hint__text {
3102
+ align-items: center;
3103
+ gap: var(--amplify-space-xs);
3104
+ }
3105
+
3106
+ .amplify-liveness-popover {
3107
+ position: relative;
3108
+ cursor: pointer;
3109
+ }
3110
+
3111
+ .amplify-liveness-popover__anchor {
3112
+ position: absolute;
3113
+ top: 26px;
3114
+ left: 3px;
3115
+ z-index: 3;
3116
+ border-style: solid;
3117
+ border-width: 0 9px 9px 9px;
3118
+ border-color: transparent transparent var(--amplify-colors-background-primary) transparent;
3119
+ }
3120
+
3121
+ .amplify-liveness-popover__anchor-secondary {
3122
+ position: absolute;
3123
+ top: 24px;
3124
+ left: 2px;
3125
+ z-index: 2;
3126
+ border-style: solid;
3127
+ border-width: 0 10px 10px 10px;
3128
+ border-color: transparent transparent var(--amplify-colors-border-secondary) transparent;
3129
+ }
3130
+
3131
+ .amplify-liveness-popover__container {
3132
+ position: absolute;
3133
+ background-color: var(--amplify-colors-background-primary);
3134
+ color: var(--amplify-colors-font-primary);
3135
+ flex-direction: row;
3136
+ font-size: var(--amplify-font-sizes-xs);
3137
+ padding: var(--amplify-space-small);
3138
+ top: 33px;
3139
+ width: 240px;
3140
+ border: 1px solid var(--amplify-colors-border-secondary);
3141
+ border-radius: 2px;
3142
+ }
3143
+
3026
3144
  .amplify-fileuploader__dropzone {
3027
3145
  background-color: var(--amplify-components-fileuploader-dropzone-background-color);
3028
3146
  border-color: var(--amplify-components-fileuploader-dropzone-border-color);
@@ -3323,6 +3441,11 @@ html[dir=rtl] .amplify-field-group__inner-start {
3323
3441
  );
3324
3442
  }
3325
3443
 
3444
+ .amplify-field__show-password--error {
3445
+ color: var(--amplify-components-fieldcontrol-error-color);
3446
+ border-color: var(--amplify-components-fieldcontrol-error-border-color);
3447
+ }
3448
+
3326
3449
  .amplify-phonenumberfield select:not(:focus) {
3327
3450
  border-right: none;
3328
3451
  }
@@ -3920,6 +4043,7 @@ html[dir=rtl] .amplify-field-group__inner-start {
3920
4043
  .amplify-switchfield {
3921
4044
  display: inline-block;
3922
4045
  font-size: var(--amplify-components-switchfield-font-size);
4046
+ cursor: pointer;
3923
4047
  }
3924
4048
  .amplify-switchfield--small {
3925
4049
  font-size: var(--amplify-components-switchfield-small-font-size);
@@ -3976,6 +4100,8 @@ html[dir=rtl] .amplify-field-group__inner-start {
3976
4100
  border-radius: var(--amplify-components-switchfield-thumb-border-radius);
3977
4101
  width: var(--amplify-components-switchfield-thumb-width);
3978
4102
  height: var(--amplify-components-switchfield-thumb-width);
4103
+ border-width: var(--amplify-components-switchfield-thumb-border-width);
4104
+ border-style: var(--amplify-components-switchfield-thumb-border-style);
3979
4105
  border-color: var(--amplify-components-switchfield-thumb-border-color);
3980
4106
  overflow-wrap: break-word;
3981
4107
  }
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;
@@ -803,7 +804,9 @@
803
804
  --amplify-components-switchfield-small-font-size: var(--amplify-font-sizes-small);
804
805
  --amplify-components-switchfield-label-padding: var(--amplify-space-xs);
805
806
  --amplify-components-switchfield-thumb-background-color: var(--amplify-colors-background-primary);
806
- --amplify-components-switchfield-thumb-border-color: var(--amplify-colors-border-tertiary);
807
+ --amplify-components-switchfield-thumb-border-color: transparent;
808
+ --amplify-components-switchfield-thumb-border-width: var(--amplify-border-widths-small);
809
+ --amplify-components-switchfield-thumb-border-style: solid;
807
810
  --amplify-components-switchfield-thumb-border-radius: var(--amplify-radii-xxxl);
808
811
  --amplify-components-switchfield-thumb-checked-transform: var(--amplify-transforms-slide-x-medium);
809
812
  --amplify-components-switchfield-thumb-transition-duration: var(--amplify-time-medium);
@@ -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> & {
@@ -7,7 +7,7 @@ export type SwitchFieldTokens<OutputType extends OutputVariantKey> = DesignToken
7
7
  large?: SwitchFieldSizeTokens<OutputType>;
8
8
  small?: SwitchFieldSizeTokens<OutputType>;
9
9
  label?: DesignTokenProperties<'padding', OutputType>;
10
- thumb?: DesignTokenProperties<'backgroundColor' | 'borderColor' | 'borderRadius' | 'width', OutputType> & {
10
+ thumb?: DesignTokenProperties<'backgroundColor' | 'borderColor' | 'borderStyle' | 'borderWidth' | 'borderRadius' | 'width', OutputType> & {
11
11
  checked?: DesignTokenProperties<'transform', OutputType>;
12
12
  transition?: DesignTokenProperties<'duration', OutputType>;
13
13
  };
@@ -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;
@@ -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.6",
3
+ "version": "5.6.8",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.mjs",
6
6
  "exports": {