@aws-amplify/ui 6.0.11 → 6.0.12

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.
@@ -10,7 +10,7 @@ const getChallengeText = (challengeName) => {
10
10
  case 'SOFTWARE_TOKEN_MFA':
11
11
  return translate(DefaultTexts.CONFIRM_TOTP);
12
12
  default:
13
- throw new Error(`${translate('Unexpected challengeName encountered in ConfirmSignIn:')} ${challengeName}`);
13
+ return translate(DefaultTexts.CONFIRM_MFA_DEFAULT);
14
14
  }
15
15
  };
16
16
  /**
@@ -15,6 +15,8 @@ const defaultTexts = {
15
15
  CONFIRM_RESET_PASSWORD_HEADING: 'Reset your Password',
16
16
  CONFIRM_SIGNUP_HEADING: 'Confirm Sign Up',
17
17
  CONFIRM_SMS: 'Confirm SMS Code',
18
+ // If challenge name is not returned
19
+ CONFIRM_MFA_DEFAULT: 'Confirm MFA Code',
18
20
  CONFIRM_TOTP: 'Confirm TOTP Code',
19
21
  CONFIRM: 'Confirm',
20
22
  CONFIRMATION_CODE: 'Confirmation Code',
@@ -9,6 +9,7 @@ const enDict = {
9
9
  'Confirm Password': 'Confirm Password',
10
10
  'Confirm Sign Up': 'Confirm Sign Up',
11
11
  'Confirm SMS Code': 'Confirm SMS Code',
12
+ 'Confirm MFA Code': 'Confirm MFA Code',
12
13
  'Confirm TOTP Code': 'Confirm TOTP Code',
13
14
  Confirm: 'Confirm',
14
15
  'Confirmation Code': 'Confirmation Code',
@@ -276,6 +276,7 @@ function createAuthenticatorMachine(options) {
276
276
  ]),
277
277
  setActorDoneData: assign({
278
278
  actorDoneData: (context, event) => ({
279
+ challengeName: event.data.challengeName,
279
280
  codeDeliveryDetails: event.data.codeDeliveryDetails,
280
281
  missingAttributes: event.data.missingAttributes,
281
282
  remoteError: event.data.remoteError,
package/dist/index.js CHANGED
@@ -752,6 +752,7 @@ const enDict$1 = {
752
752
  'Confirm Password': 'Confirm Password',
753
753
  'Confirm Sign Up': 'Confirm Sign Up',
754
754
  'Confirm SMS Code': 'Confirm SMS Code',
755
+ 'Confirm MFA Code': 'Confirm MFA Code',
755
756
  'Confirm TOTP Code': 'Confirm TOTP Code',
756
757
  Confirm: 'Confirm',
757
758
  'Confirmation Code': 'Confirmation Code',
@@ -2050,6 +2051,8 @@ const defaultTexts$1 = {
2050
2051
  CONFIRM_RESET_PASSWORD_HEADING: 'Reset your Password',
2051
2052
  CONFIRM_SIGNUP_HEADING: 'Confirm Sign Up',
2052
2053
  CONFIRM_SMS: 'Confirm SMS Code',
2054
+ // If challenge name is not returned
2055
+ CONFIRM_MFA_DEFAULT: 'Confirm MFA Code',
2053
2056
  CONFIRM_TOTP: 'Confirm TOTP Code',
2054
2057
  CONFIRM: 'Confirm',
2055
2058
  CONFIRMATION_CODE: 'Confirmation Code',
@@ -3063,7 +3066,7 @@ const getChallengeText = (challengeName) => {
3063
3066
  case 'SOFTWARE_TOKEN_MFA':
3064
3067
  return translate(DefaultTexts.CONFIRM_TOTP);
3065
3068
  default:
3066
- throw new Error(`${translate('Unexpected challengeName encountered in ConfirmSignIn:')} ${challengeName}`);
3069
+ return translate(DefaultTexts.CONFIRM_MFA_DEFAULT);
3067
3070
  }
3068
3071
  };
3069
3072
  /**
@@ -4900,6 +4903,7 @@ function createAuthenticatorMachine(options) {
4900
4903
  ]),
4901
4904
  setActorDoneData: xstate.assign({
4902
4905
  actorDoneData: (context, event) => ({
4906
+ challengeName: event.data.challengeName,
4903
4907
  codeDeliveryDetails: event.data.codeDeliveryDetails,
4904
4908
  missingAttributes: event.data.missingAttributes,
4905
4909
  remoteError: event.data.remoteError,
@@ -282,7 +282,7 @@
282
282
 
283
283
  .amplify-liveness-landscape-error-modal {
284
284
  background-color: var(--amplify-colors-background-primary);
285
- direction: column;
285
+ flex-direction: column;
286
286
  text-align: center;
287
287
  align-items: center;
288
288
  justify-content: center;
@@ -283,7 +283,7 @@
283
283
 
284
284
  .amplify-liveness-landscape-error-modal {
285
285
  background-color: var(--amplify-colors-background-primary);
286
- direction: column;
286
+ flex-direction: column;
287
287
  text-align: center;
288
288
  align-items: center;
289
289
  justify-content: center;
package/dist/styles.css CHANGED
@@ -4205,7 +4205,7 @@ html[dir=rtl] .amplify-field-group__inner-start {
4205
4205
 
4206
4206
  .amplify-liveness-landscape-error-modal {
4207
4207
  background-color: var(--amplify-colors-background-primary);
4208
- direction: column;
4208
+ flex-direction: column;
4209
4209
  text-align: center;
4210
4210
  align-items: center;
4211
4211
  justify-content: center;
@@ -4206,7 +4206,7 @@ html[dir=rtl] .amplify-field-group__inner-start {
4206
4206
 
4207
4207
  .amplify-liveness-landscape-error-modal {
4208
4208
  background-color: var(--amplify-colors-background-primary);
4209
- direction: column;
4209
+ flex-direction: column;
4210
4210
  text-align: center;
4211
4211
  align-items: center;
4212
4212
  justify-content: center;
@@ -15,6 +15,7 @@ export declare const defaultTexts: {
15
15
  CONFIRM_RESET_PASSWORD_HEADING: string;
16
16
  CONFIRM_SIGNUP_HEADING: string;
17
17
  CONFIRM_SMS: string;
18
+ CONFIRM_MFA_DEFAULT: string;
18
19
  CONFIRM_TOTP: string;
19
20
  CONFIRM: string;
20
21
  CONFIRMATION_CODE: string;
@@ -951,6 +951,7 @@ export declare const defaultTexts: {
951
951
  CONFIRM_RESET_PASSWORD_HEADING: string;
952
952
  CONFIRM_SIGNUP_HEADING: string;
953
953
  CONFIRM_SMS: string;
954
+ CONFIRM_MFA_DEFAULT: string;
954
955
  CONFIRM_TOTP: string;
955
956
  CONFIRM: string;
956
957
  CONFIRMATION_CODE: string;
@@ -26,6 +26,7 @@ export declare const DefaultTexts: {
26
26
  readonly CONFIRM_RESET_PASSWORD_HEADING: string;
27
27
  readonly CONFIRM_SIGNUP_HEADING: string;
28
28
  readonly CONFIRM_SMS: string;
29
+ readonly CONFIRM_MFA_DEFAULT: string;
29
30
  readonly CONFIRM_TOTP: string;
30
31
  readonly CONFIRM: string;
31
32
  readonly CONFIRMATION_CODE: string;
@@ -50,6 +50,7 @@ export interface AuthEvent {
50
50
  * Data that actor returns when they are done and reach the final state
51
51
  */
52
52
  export interface ActorDoneData {
53
+ challengeName?: ChallengeName;
53
54
  codeDeliveryDetails?: V5CodeDeliveryDetails;
54
55
  missingAttributes?: string[];
55
56
  remoteError?: string;
@@ -51,6 +51,8 @@ export interface FormFieldOptions {
51
51
  type?: string;
52
52
  /** Desired autocomplete HTML attribute */
53
53
  autocomplete?: string;
54
+ /** Whether the first character is auto-capitalized */
55
+ autocapitalize?: string;
54
56
  }
55
57
  export interface LegacyFormFieldOptions extends FormFieldOptions {
56
58
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui",
3
- "version": "6.0.11",
3
+ "version": "6.0.12",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.mjs",
6
6
  "exports": {