@aws-amplify/ui 6.9.0 → 6.10.0

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 (57) hide show
  1. package/dist/esm/helpers/authenticator/facade.mjs +4 -2
  2. package/dist/esm/helpers/authenticator/formFields/defaults.mjs +4 -0
  3. package/dist/esm/helpers/authenticator/getRoute.mjs +4 -0
  4. package/dist/esm/helpers/authenticator/textUtil.mjs +30 -0
  5. package/dist/esm/i18n/dictionaries/authenticator/de.mjs +8 -0
  6. package/dist/esm/i18n/dictionaries/authenticator/defaultTexts.mjs +8 -0
  7. package/dist/esm/i18n/dictionaries/authenticator/en.mjs +8 -0
  8. package/dist/esm/i18n/dictionaries/authenticator/es.mjs +8 -0
  9. package/dist/esm/i18n/dictionaries/authenticator/fr.mjs +8 -0
  10. package/dist/esm/i18n/dictionaries/authenticator/he.mjs +8 -0
  11. package/dist/esm/i18n/dictionaries/authenticator/id.mjs +8 -0
  12. package/dist/esm/i18n/dictionaries/authenticator/it.mjs +8 -0
  13. package/dist/esm/i18n/dictionaries/authenticator/ja.mjs +8 -0
  14. package/dist/esm/i18n/dictionaries/authenticator/kr.mjs +8 -0
  15. package/dist/esm/i18n/dictionaries/authenticator/nb.mjs +8 -0
  16. package/dist/esm/i18n/dictionaries/authenticator/nl.mjs +8 -0
  17. package/dist/esm/i18n/dictionaries/authenticator/pl.mjs +8 -0
  18. package/dist/esm/i18n/dictionaries/authenticator/pt.mjs +8 -0
  19. package/dist/esm/i18n/dictionaries/authenticator/ru.mjs +8 -0
  20. package/dist/esm/i18n/dictionaries/authenticator/sv.mjs +8 -0
  21. package/dist/esm/i18n/dictionaries/authenticator/th.mjs +8 -0
  22. package/dist/esm/i18n/dictionaries/authenticator/tr.mjs +9 -1
  23. package/dist/esm/i18n/dictionaries/authenticator/ua.mjs +8 -0
  24. package/dist/esm/i18n/dictionaries/authenticator/zh.mjs +8 -0
  25. package/dist/esm/machines/authenticator/actions.mjs +22 -5
  26. package/dist/esm/machines/authenticator/actors/signIn.mjs +53 -49
  27. package/dist/esm/machines/authenticator/actors/signUp.mjs +2 -0
  28. package/dist/esm/machines/authenticator/actors/utils.mjs +13 -1
  29. package/dist/esm/machines/authenticator/guards.mjs +8 -0
  30. package/dist/esm/machines/authenticator/index.mjs +2 -1
  31. package/dist/esm/theme/tokens/components/aiConversation.mjs +2 -1
  32. package/dist/esm/types/primitives/componentClassName.mjs +1 -0
  33. package/dist/index.js +303 -58
  34. package/dist/styles/AIConversation.css +10 -1
  35. package/dist/styles/AIConversation.layer.css +10 -1
  36. package/dist/styles/base.css +2 -1
  37. package/dist/styles/base.layer.css +2 -1
  38. package/dist/styles/textArea.css +1 -0
  39. package/dist/styles/textArea.layer.css +1 -0
  40. package/dist/styles/textAreaField.css +1 -0
  41. package/dist/styles/textAreaField.layer.css +1 -0
  42. package/dist/styles.css +14 -2
  43. package/dist/styles.layer.css +14 -2
  44. package/dist/theme.css +2 -1
  45. package/dist/types/helpers/authenticator/facade.d.ts +4 -2
  46. package/dist/types/helpers/authenticator/textUtil.d.ts +7 -1
  47. package/dist/types/i18n/dictionaries/authenticator/defaultTexts.d.ts +8 -0
  48. package/dist/types/i18n/dictionaries/index.d.ts +8 -0
  49. package/dist/types/i18n/translations.d.ts +8 -0
  50. package/dist/types/machines/authenticator/actors/signIn.d.ts +2 -3
  51. package/dist/types/machines/authenticator/actors/signUp.d.ts +2 -3
  52. package/dist/types/machines/authenticator/actors/utils.d.ts +2 -0
  53. package/dist/types/machines/authenticator/types.d.ts +6 -3
  54. package/dist/types/theme/tokens/components/aiConversation.d.ts +1 -1
  55. package/dist/types/types/authenticator/form.d.ts +1 -1
  56. package/dist/types/types/primitives/componentClassName.d.ts +1 -0
  57. package/package.json +2 -2
@@ -84,16 +84,24 @@
84
84
  --internal-flex-direction: row;
85
85
  --internal-body-align-items: flex-start;
86
86
  }
87
+ .amplify-ai-conversation__scrollview {
88
+ flex: 1 0 50%;
89
+ }
87
90
  .amplify-ai-conversation__form {
88
91
  display: flex;
89
92
  flex-direction: row;
90
93
  align-items: flex-start;
94
+ padding: var(--amplify-components-ai-conversation-form-padding);
91
95
  gap: var(--amplify-components-ai-conversation-form-gap);
96
+ max-height: 100%;
97
+ overflow: hidden;
92
98
  }
93
99
  .amplify-ai-conversation__form__dropzone {
94
100
  text-align: initial;
95
101
  border: none;
96
- padding: var(--amplify-components-ai-conversation-form-padding);
102
+ padding: 0;
103
+ display: grid;
104
+ overflow: hidden;
97
105
  }
98
106
  .amplify-ai-conversation__form__error {
99
107
  padding: 0;
@@ -118,6 +126,7 @@
118
126
  flex-direction: row;
119
127
  flex-wrap: wrap;
120
128
  gap: var(--amplify-components-ai-conversation-attachment-list-gap);
129
+ padding: var(--amplify-components-ai-conversation-attachment-list-padding);
121
130
  padding-block-start: var(--amplify-components-ai-conversation-attachment-list-padding-block-start);
122
131
  }
123
132
  .amplify-ai-conversation__attachment__image {
@@ -85,16 +85,24 @@
85
85
  --internal-flex-direction: row;
86
86
  --internal-body-align-items: flex-start;
87
87
  }
88
+ .amplify-ai-conversation__scrollview {
89
+ flex: 1 0 50%;
90
+ }
88
91
  .amplify-ai-conversation__form {
89
92
  display: flex;
90
93
  flex-direction: row;
91
94
  align-items: flex-start;
95
+ padding: var(--amplify-components-ai-conversation-form-padding);
92
96
  gap: var(--amplify-components-ai-conversation-form-gap);
97
+ max-height: 100%;
98
+ overflow: hidden;
93
99
  }
94
100
  .amplify-ai-conversation__form__dropzone {
95
101
  text-align: initial;
96
102
  border: none;
97
- padding: var(--amplify-components-ai-conversation-form-padding);
103
+ padding: 0;
104
+ display: grid;
105
+ overflow: hidden;
98
106
  }
99
107
  .amplify-ai-conversation__form__error {
100
108
  padding: 0;
@@ -119,6 +127,7 @@
119
127
  flex-direction: row;
120
128
  flex-wrap: wrap;
121
129
  gap: var(--amplify-components-ai-conversation-attachment-list-gap);
130
+ padding: var(--amplify-components-ai-conversation-attachment-list-padding);
122
131
  padding-block-start: var(--amplify-components-ai-conversation-attachment-list-padding-block-start);
123
132
  }
124
133
  .amplify-ai-conversation__attachment__image {
@@ -50,7 +50,8 @@
50
50
  --amplify-components-ai-conversation-attachment-padding-block: var(--amplify-space-xxxs);
51
51
  --amplify-components-ai-conversation-attachment-padding-inline: var(--amplify-space-xs);
52
52
  --amplify-components-ai-conversation-attachment-gap: var(--amplify-space-xs);
53
- --amplify-components-ai-conversation-attachment-list-padding-block-start: var(--amplify-space-xs);
53
+ --amplify-components-ai-conversation-attachment-list-padding: var(--amplify-space-xs);
54
+ --amplify-components-ai-conversation-attachment-list-padding-block-start: 0;
54
55
  --amplify-components-ai-conversation-attachment-list-gap: var(--amplify-space-xxs);
55
56
  --amplify-components-ai-conversation-attachment-name-color: var(--amplify-colors-font-primary);
56
57
  --amplify-components-ai-conversation-attachment-name-font-size: var(--amplify-font-sizes-small);
@@ -51,7 +51,8 @@
51
51
  --amplify-components-ai-conversation-attachment-padding-block: var(--amplify-space-xxxs);
52
52
  --amplify-components-ai-conversation-attachment-padding-inline: var(--amplify-space-xs);
53
53
  --amplify-components-ai-conversation-attachment-gap: var(--amplify-space-xs);
54
- --amplify-components-ai-conversation-attachment-list-padding-block-start: var(--amplify-space-xs);
54
+ --amplify-components-ai-conversation-attachment-list-padding: var(--amplify-space-xs);
55
+ --amplify-components-ai-conversation-attachment-list-padding-block-start: 0;
55
56
  --amplify-components-ai-conversation-attachment-list-gap: var(--amplify-space-xxs);
56
57
  --amplify-components-ai-conversation-attachment-name-color: var(--amplify-colors-font-primary);
57
58
  --amplify-components-ai-conversation-attachment-name-font-size: var(--amplify-font-sizes-small);
@@ -21,6 +21,7 @@
21
21
  -moz-user-select: text;
22
22
  user-select: text;
23
23
  white-space: pre-wrap;
24
+ max-height: 100%;
24
25
  }
25
26
  .amplify-textarea:focus {
26
27
  border-color: var(--amplify-components-fieldcontrol-focus-border-color);
@@ -22,6 +22,7 @@
22
22
  -moz-user-select: text;
23
23
  user-select: text;
24
24
  white-space: pre-wrap;
25
+ max-height: 100%;
25
26
  }
26
27
  .amplify-textarea:focus {
27
28
  border-color: var(--amplify-components-fieldcontrol-focus-border-color);
@@ -1,4 +1,5 @@
1
1
  .amplify-textareafield {
2
+ max-height: 100%;
2
3
  flex-direction: column;
3
4
  --amplify-components-fieldcontrol-color: var(
4
5
  --amplify-components-textareafield-color
@@ -1,5 +1,6 @@
1
1
  @layer amplify.components {
2
2
  .amplify-textareafield {
3
+ max-height: 100%;
3
4
  flex-direction: column;
4
5
  --amplify-components-fieldcontrol-color: var(
5
6
  --amplify-components-textareafield-color
package/dist/styles.css CHANGED
@@ -50,7 +50,8 @@
50
50
  --amplify-components-ai-conversation-attachment-padding-block: var(--amplify-space-xxxs);
51
51
  --amplify-components-ai-conversation-attachment-padding-inline: var(--amplify-space-xs);
52
52
  --amplify-components-ai-conversation-attachment-gap: var(--amplify-space-xs);
53
- --amplify-components-ai-conversation-attachment-list-padding-block-start: var(--amplify-space-xs);
53
+ --amplify-components-ai-conversation-attachment-list-padding: var(--amplify-space-xs);
54
+ --amplify-components-ai-conversation-attachment-list-padding-block-start: 0;
54
55
  --amplify-components-ai-conversation-attachment-list-gap: var(--amplify-space-xxs);
55
56
  --amplify-components-ai-conversation-attachment-name-color: var(--amplify-colors-font-primary);
56
57
  --amplify-components-ai-conversation-attachment-name-font-size: var(--amplify-font-sizes-small);
@@ -3077,6 +3078,7 @@ strong.amplify-text {
3077
3078
  -moz-user-select: text;
3078
3079
  user-select: text;
3079
3080
  white-space: pre-wrap;
3081
+ max-height: 100%;
3080
3082
  }
3081
3083
  .amplify-textarea:focus {
3082
3084
  border-color: var(--amplify-components-fieldcontrol-focus-border-color);
@@ -5802,6 +5804,7 @@ html[dir=rtl] .amplify-field-group__inner-start {
5802
5804
  }
5803
5805
 
5804
5806
  .amplify-textareafield {
5807
+ max-height: 100%;
5805
5808
  flex-direction: column;
5806
5809
  --amplify-components-fieldcontrol-color: var(
5807
5810
  --amplify-components-textareafield-color
@@ -6837,16 +6840,24 @@ html[dir=rtl] .amplify-field-group__inner-start {
6837
6840
  --internal-flex-direction: row;
6838
6841
  --internal-body-align-items: flex-start;
6839
6842
  }
6843
+ .amplify-ai-conversation__scrollview {
6844
+ flex: 1 0 50%;
6845
+ }
6840
6846
  .amplify-ai-conversation__form {
6841
6847
  display: flex;
6842
6848
  flex-direction: row;
6843
6849
  align-items: flex-start;
6850
+ padding: var(--amplify-components-ai-conversation-form-padding);
6844
6851
  gap: var(--amplify-components-ai-conversation-form-gap);
6852
+ max-height: 100%;
6853
+ overflow: hidden;
6845
6854
  }
6846
6855
  .amplify-ai-conversation__form__dropzone {
6847
6856
  text-align: initial;
6848
6857
  border: none;
6849
- padding: var(--amplify-components-ai-conversation-form-padding);
6858
+ padding: 0;
6859
+ display: grid;
6860
+ overflow: hidden;
6850
6861
  }
6851
6862
  .amplify-ai-conversation__form__error {
6852
6863
  padding: 0;
@@ -6871,6 +6882,7 @@ html[dir=rtl] .amplify-field-group__inner-start {
6871
6882
  flex-direction: row;
6872
6883
  flex-wrap: wrap;
6873
6884
  gap: var(--amplify-components-ai-conversation-attachment-list-gap);
6885
+ padding: var(--amplify-components-ai-conversation-attachment-list-padding);
6874
6886
  padding-block-start: var(--amplify-components-ai-conversation-attachment-list-padding-block-start);
6875
6887
  }
6876
6888
  .amplify-ai-conversation__attachment__image {
@@ -51,7 +51,8 @@
51
51
  --amplify-components-ai-conversation-attachment-padding-block: var(--amplify-space-xxxs);
52
52
  --amplify-components-ai-conversation-attachment-padding-inline: var(--amplify-space-xs);
53
53
  --amplify-components-ai-conversation-attachment-gap: var(--amplify-space-xs);
54
- --amplify-components-ai-conversation-attachment-list-padding-block-start: var(--amplify-space-xs);
54
+ --amplify-components-ai-conversation-attachment-list-padding: var(--amplify-space-xs);
55
+ --amplify-components-ai-conversation-attachment-list-padding-block-start: 0;
55
56
  --amplify-components-ai-conversation-attachment-list-gap: var(--amplify-space-xxs);
56
57
  --amplify-components-ai-conversation-attachment-name-color: var(--amplify-colors-font-primary);
57
58
  --amplify-components-ai-conversation-attachment-name-font-size: var(--amplify-font-sizes-small);
@@ -3078,6 +3079,7 @@ strong.amplify-text {
3078
3079
  -moz-user-select: text;
3079
3080
  user-select: text;
3080
3081
  white-space: pre-wrap;
3082
+ max-height: 100%;
3081
3083
  }
3082
3084
  .amplify-textarea:focus {
3083
3085
  border-color: var(--amplify-components-fieldcontrol-focus-border-color);
@@ -5803,6 +5805,7 @@ html[dir=rtl] .amplify-field-group__inner-start {
5803
5805
  }
5804
5806
 
5805
5807
  .amplify-textareafield {
5808
+ max-height: 100%;
5806
5809
  flex-direction: column;
5807
5810
  --amplify-components-fieldcontrol-color: var(
5808
5811
  --amplify-components-textareafield-color
@@ -6838,16 +6841,24 @@ html[dir=rtl] .amplify-field-group__inner-start {
6838
6841
  --internal-flex-direction: row;
6839
6842
  --internal-body-align-items: flex-start;
6840
6843
  }
6844
+ .amplify-ai-conversation__scrollview {
6845
+ flex: 1 0 50%;
6846
+ }
6841
6847
  .amplify-ai-conversation__form {
6842
6848
  display: flex;
6843
6849
  flex-direction: row;
6844
6850
  align-items: flex-start;
6851
+ padding: var(--amplify-components-ai-conversation-form-padding);
6845
6852
  gap: var(--amplify-components-ai-conversation-form-gap);
6853
+ max-height: 100%;
6854
+ overflow: hidden;
6846
6855
  }
6847
6856
  .amplify-ai-conversation__form__dropzone {
6848
6857
  text-align: initial;
6849
6858
  border: none;
6850
- padding: var(--amplify-components-ai-conversation-form-padding);
6859
+ padding: 0;
6860
+ display: grid;
6861
+ overflow: hidden;
6851
6862
  }
6852
6863
  .amplify-ai-conversation__form__error {
6853
6864
  padding: 0;
@@ -6872,6 +6883,7 @@ html[dir=rtl] .amplify-field-group__inner-start {
6872
6883
  flex-direction: row;
6873
6884
  flex-wrap: wrap;
6874
6885
  gap: var(--amplify-components-ai-conversation-attachment-list-gap);
6886
+ padding: var(--amplify-components-ai-conversation-attachment-list-padding);
6875
6887
  padding-block-start: var(--amplify-components-ai-conversation-attachment-list-padding-block-start);
6876
6888
  }
6877
6889
  .amplify-ai-conversation__attachment__image {
package/dist/theme.css CHANGED
@@ -47,7 +47,8 @@
47
47
  --amplify-components-ai-conversation-attachment-padding-block: var(--amplify-space-xxxs);
48
48
  --amplify-components-ai-conversation-attachment-padding-inline: var(--amplify-space-xs);
49
49
  --amplify-components-ai-conversation-attachment-gap: var(--amplify-space-xs);
50
- --amplify-components-ai-conversation-attachment-list-padding-block-start: var(--amplify-space-xs);
50
+ --amplify-components-ai-conversation-attachment-list-padding: var(--amplify-space-xs);
51
+ --amplify-components-ai-conversation-attachment-list-padding-block-start: 0;
51
52
  --amplify-components-ai-conversation-attachment-list-gap: var(--amplify-space-xxs);
52
53
  --amplify-components-ai-conversation-attachment-name-color: var(--amplify-colors-font-primary);
53
54
  --amplify-components-ai-conversation-attachment-name-font-size: var(--amplify-font-sizes-small);
@@ -6,11 +6,12 @@
6
6
  import { Sender } from 'xstate';
7
7
  import { AuthUser } from 'aws-amplify/auth';
8
8
  import { FederatedProvider, LoginMechanism, SocialProvider, UnverifiedUserAttributes, ValidationError } from '../../types';
9
- import { AuthEvent, AuthEventData, AuthMachineState, ChallengeName, NavigableRoute, V5CodeDeliveryDetails } from '../../machines/authenticator/types';
10
- export type AuthenticatorRoute = 'authenticated' | 'confirmResetPassword' | 'confirmSignIn' | 'confirmSignUp' | 'confirmVerifyUser' | 'forceNewPassword' | 'idle' | 'forgotPassword' | 'setup' | 'signOut' | 'setupTotp' | 'signIn' | 'signUp' | 'transition' | 'verifyUser';
9
+ import { AuthEvent, AuthEventData, AuthMachineState, AuthMFAType, ChallengeName, NavigableRoute, V5CodeDeliveryDetails } from '../../machines/authenticator/types';
10
+ export type AuthenticatorRoute = 'authenticated' | 'confirmResetPassword' | 'confirmSignIn' | 'confirmSignUp' | 'confirmVerifyUser' | 'forceNewPassword' | 'idle' | 'forgotPassword' | 'setup' | 'signOut' | 'selectMfaType' | 'setupEmail' | 'setupTotp' | 'signIn' | 'signUp' | 'transition' | 'verifyUser';
11
11
  type AuthenticatorValidationErrors = ValidationError;
12
12
  export type AuthStatus = 'configuring' | 'authenticated' | 'unauthenticated';
13
13
  interface AuthenticatorServiceContextFacade {
14
+ allowedMfaTypes: AuthMFAType[] | undefined;
14
15
  authStatus: AuthStatus;
15
16
  challengeName: ChallengeName | undefined;
16
17
  codeDeliveryDetails: V5CodeDeliveryDetails;
@@ -30,6 +31,7 @@ type AuthenticatorSendEventAliases = Record<SendEventAlias, (data?: AuthEventDat
30
31
  export interface AuthenticatorServiceFacade extends AuthenticatorSendEventAliases, AuthenticatorServiceContextFacade {
31
32
  }
32
33
  interface NextAuthenticatorServiceContextFacade {
34
+ allowedMfaTypes: AuthMFAType[] | undefined;
33
35
  challengeName: ChallengeName | undefined;
34
36
  codeDeliveryDetails: V5CodeDeliveryDetails | undefined;
35
37
  errorMessage: string | undefined;
@@ -1,5 +1,5 @@
1
1
  import { SocialProvider } from '../../types';
2
- import { ChallengeName, V5CodeDeliveryDetails } from '../../machines/authenticator/types';
2
+ import { AuthMFAType, ChallengeName, V5CodeDeliveryDetails } from '../../machines/authenticator/types';
3
3
  import { AuthenticatorRoute } from './facade';
4
4
  export declare const authenticatorTextUtil: {
5
5
  /** Shared */
@@ -35,12 +35,18 @@ export declare const authenticatorTextUtil: {
35
35
  readonly getChallengeText: (challengeName?: ChallengeName) => string;
36
36
  /** ForgotPassword */
37
37
  readonly getResetYourPasswordText: () => string;
38
+ /** SetupEmail */
39
+ readonly getSetupEmailText: () => string;
38
40
  /** SetupTotp */
39
41
  readonly getSetupTotpText: () => string;
40
42
  readonly getSetupTotpInstructionsText: () => string;
41
43
  readonly getCopiedText: () => string;
42
44
  /** FederatedSignIn */
43
45
  readonly getSignInWithFederationText: (route: AuthenticatorRoute, provider: SocialProvider) => string;
46
+ /** SelectMfaType */
47
+ readonly getMfaTypeLabelByValue: (mfaType: AuthMFAType) => string;
48
+ readonly getSelectMfaTypeByChallengeName: (challengeName?: ChallengeName) => string;
49
+ readonly getSelectMfaTypeText: () => string;
44
50
  /** VerifyUser */
45
51
  readonly getSkipText: () => string;
46
52
  readonly getVerifyText: () => string;
@@ -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_EMAIL: string;
18
19
  CONFIRM_MFA_DEFAULT: string;
19
20
  CONFIRM_TOTP: string;
20
21
  CONFIRM: string;
@@ -23,6 +24,7 @@ export declare const defaultTexts: {
23
24
  CREATE_ACCOUNT: string;
24
25
  CREATING_ACCOUNT: string;
25
26
  EMAIL_ADDRESS: string;
27
+ EMAIL_OTP: string;
26
28
  ENTER_BIRTHDATE: string;
27
29
  ENTER_CODE: string;
28
30
  ENTER_CONFIRMATION_CODE: string;
@@ -44,6 +46,8 @@ export declare const defaultTexts: {
44
46
  LOADING: string;
45
47
  LOGIN_NAME: string;
46
48
  MIDDLE_NAME: string;
49
+ MFA_SETUP_SELECTION: string;
50
+ MFA_SELECTION: string;
47
51
  NAME: string;
48
52
  NICKNAME: string;
49
53
  NEW_PASSWORD: string;
@@ -57,6 +61,8 @@ export declare const defaultTexts: {
57
61
  RESET_PASSWORD: string;
58
62
  SEND_CODE: string;
59
63
  SENDING: string;
64
+ SELECT_MFA_TYPE: string;
65
+ SETUP_EMAIL: string;
60
66
  SETUP_TOTP: string;
61
67
  SHOW_PASSWORD: string;
62
68
  SIGN_IN_BUTTON: string;
@@ -69,8 +75,10 @@ export declare const defaultTexts: {
69
75
  SIGN_UP_BUTTON: string;
70
76
  SIGNING_IN_BUTTON: string;
71
77
  SKIP: string;
78
+ SMS_MFA: string;
72
79
  SUBMIT: string;
73
80
  SUBMITTING: string;
81
+ SOFTWARE_TOKEN_MFA: string;
74
82
  UPPERCASE_COPY: string;
75
83
  VERIFY_CONTACT: string;
76
84
  VERIFY_HEADING: string;
@@ -1003,6 +1003,7 @@ export declare const defaultTexts: {
1003
1003
  CONFIRM_RESET_PASSWORD_HEADING: string;
1004
1004
  CONFIRM_SIGNUP_HEADING: string;
1005
1005
  CONFIRM_SMS: string;
1006
+ CONFIRM_EMAIL: string;
1006
1007
  CONFIRM_MFA_DEFAULT: string;
1007
1008
  CONFIRM_TOTP: string;
1008
1009
  CONFIRM: string;
@@ -1011,6 +1012,7 @@ export declare const defaultTexts: {
1011
1012
  CREATE_ACCOUNT: string;
1012
1013
  CREATING_ACCOUNT: string;
1013
1014
  EMAIL_ADDRESS: string;
1015
+ EMAIL_OTP: string;
1014
1016
  ENTER_BIRTHDATE: string;
1015
1017
  ENTER_CODE: string;
1016
1018
  ENTER_CONFIRMATION_CODE: string;
@@ -1032,6 +1034,8 @@ export declare const defaultTexts: {
1032
1034
  LOADING: string;
1033
1035
  LOGIN_NAME: string;
1034
1036
  MIDDLE_NAME: string;
1037
+ MFA_SETUP_SELECTION: string;
1038
+ MFA_SELECTION: string;
1035
1039
  NAME: string;
1036
1040
  NICKNAME: string;
1037
1041
  NEW_PASSWORD: string;
@@ -1045,6 +1049,8 @@ export declare const defaultTexts: {
1045
1049
  RESET_PASSWORD: string;
1046
1050
  SEND_CODE: string;
1047
1051
  SENDING: string;
1052
+ SELECT_MFA_TYPE: string;
1053
+ SETUP_EMAIL: string;
1048
1054
  SETUP_TOTP: string;
1049
1055
  SHOW_PASSWORD: string;
1050
1056
  SIGN_IN_BUTTON: string;
@@ -1057,8 +1063,10 @@ export declare const defaultTexts: {
1057
1063
  SIGN_UP_BUTTON: string;
1058
1064
  SIGNING_IN_BUTTON: string;
1059
1065
  SKIP: string;
1066
+ SMS_MFA: string;
1060
1067
  SUBMIT: string;
1061
1068
  SUBMITTING: string;
1069
+ SOFTWARE_TOKEN_MFA: string;
1062
1070
  UPPERCASE_COPY: string;
1063
1071
  VERIFY_CONTACT: string;
1064
1072
  VERIFY_HEADING: 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_EMAIL: string;
29
30
  readonly CONFIRM_MFA_DEFAULT: string;
30
31
  readonly CONFIRM_TOTP: string;
31
32
  readonly CONFIRM: string;
@@ -34,6 +35,7 @@ export declare const DefaultTexts: {
34
35
  readonly CREATE_ACCOUNT: string;
35
36
  readonly CREATING_ACCOUNT: string;
36
37
  readonly EMAIL_ADDRESS: string;
38
+ readonly EMAIL_OTP: string;
37
39
  readonly ENTER_BIRTHDATE: string;
38
40
  readonly ENTER_CODE: string;
39
41
  readonly ENTER_CONFIRMATION_CODE: string;
@@ -55,6 +57,8 @@ export declare const DefaultTexts: {
55
57
  readonly LOADING: string;
56
58
  readonly LOGIN_NAME: string;
57
59
  readonly MIDDLE_NAME: string;
60
+ readonly MFA_SETUP_SELECTION: string;
61
+ readonly MFA_SELECTION: string;
58
62
  readonly NAME: string;
59
63
  readonly NICKNAME: string;
60
64
  readonly NEW_PASSWORD: string;
@@ -68,6 +72,8 @@ export declare const DefaultTexts: {
68
72
  readonly RESET_PASSWORD: string;
69
73
  readonly SEND_CODE: string;
70
74
  readonly SENDING: string;
75
+ readonly SELECT_MFA_TYPE: string;
76
+ readonly SETUP_EMAIL: string;
71
77
  readonly SETUP_TOTP: string;
72
78
  readonly SHOW_PASSWORD: string;
73
79
  readonly SIGN_IN_BUTTON: string;
@@ -80,8 +86,10 @@ export declare const DefaultTexts: {
80
86
  readonly SIGN_UP_BUTTON: string;
81
87
  readonly SIGNING_IN_BUTTON: string;
82
88
  readonly SKIP: string;
89
+ readonly SMS_MFA: string;
83
90
  readonly SUBMIT: string;
84
91
  readonly SUBMITTING: string;
92
+ readonly SOFTWARE_TOKEN_MFA: string;
85
93
  readonly UPPERCASE_COPY: string;
86
94
  readonly VERIFY_CONTACT: string;
87
95
  readonly VERIFY_HEADING: string;
@@ -1,7 +1,6 @@
1
- import { defaultServices } from '../defaultServices';
2
- import { AuthEvent, SignInContext } from '../types';
1
+ import { AuthEvent, SignInContext, AuthContext } from '../types';
3
2
  export interface SignInMachineOptions {
4
- services?: Partial<typeof defaultServices>;
3
+ services?: AuthContext['services'];
5
4
  }
6
5
  export declare function signInActor({ services }: SignInMachineOptions): import("xstate").StateMachine<SignInContext, any, AuthEvent, {
7
6
  value: any;
@@ -1,7 +1,6 @@
1
- import { AuthEvent, SignUpContext } from '../types';
2
- import { defaultServices } from '../defaultServices';
1
+ import { AuthContext, AuthEvent, SignUpContext } from '../types';
3
2
  export type SignUpMachineOptions = {
4
- services?: Partial<typeof defaultServices>;
3
+ services?: AuthContext['services'];
5
4
  };
6
5
  export declare function signUpActor({ services }: SignUpMachineOptions): import("xstate").StateMachine<SignUpContext, any, AuthEvent, {
7
6
  value: any;
@@ -1,3 +1,4 @@
1
+ import { Step } from '../types';
1
2
  export declare const getFederatedSignInState: (target: 'signIn' | 'signUp') => {
2
3
  entry: string[];
3
4
  invoke: {
@@ -11,3 +12,4 @@ export declare const getFederatedSignInState: (target: 'signIn' | 'signUp') => {
11
12
  };
12
13
  };
13
14
  };
15
+ export declare const getConfirmSignInFormValuesKey: (signInStep: Step) => 'confirmation_code' | 'mfa_type' | 'email';
@@ -2,7 +2,8 @@ import { State } from 'xstate';
2
2
  import { AuthUser } from 'aws-amplify/auth';
3
3
  import { LoginMechanism, SignUpAttribute, SocialProvider, UnverifiedUserAttributes, AuthFormData, AuthFormFields, AuthTouchData, ValidationError, PasswordSettings } from '../../types';
4
4
  import { defaultServices } from './defaultServices';
5
- export type ChallengeName = 'SMS_MFA' | 'SOFTWARE_TOKEN_MFA' | 'SELECT_MFA_TYPE' | 'MFA_SETUP' | 'PASSWORD_VERIFIER' | 'CUSTOM_CHALLENGE' | 'DEVICE_SRP_AUTH' | 'DEVICE_PASSWORD_VERIFIER' | 'ADMIN_NO_SRP_AUTH' | 'NEW_PASSWORD_REQUIRED';
5
+ export type ChallengeName = 'SMS_MFA' | 'SOFTWARE_TOKEN_MFA' | 'EMAIL_OTP' | 'SELECT_MFA_TYPE' | 'MFA_SETUP' | 'PASSWORD_VERIFIER' | 'CUSTOM_CHALLENGE' | 'DEVICE_SRP_AUTH' | 'DEVICE_PASSWORD_VERIFIER' | 'ADMIN_NO_SRP_AUTH' | 'NEW_PASSWORD_REQUIRED';
6
+ export type AuthMFAType = 'SMS' | 'TOTP' | 'EMAIL';
6
7
  /**
7
8
  * `AuthDeliveryMedium` is deeply nested in the v6 types, added this as utility
8
9
  */
@@ -58,6 +59,7 @@ export interface ActorDoneData {
58
59
  totpSecretCode?: string;
59
60
  username?: string;
60
61
  unverifiedUserAttributes?: UnverifiedUserAttributes;
62
+ allowedMfaTypes?: AuthMFAType[];
61
63
  }
62
64
  /**
63
65
  * Context interface for the top-level machine
@@ -79,11 +81,11 @@ export interface AuthContext {
79
81
  hasSetup?: boolean;
80
82
  }
81
83
  export type InitialStep = 'FORGOT_PASSWORD' | 'SIGN_IN' | 'SIGN_UP';
82
- export type SignInStep = 'CONFIRM_SIGN_IN_WITH_SMS_CODE' | 'CONFIRM_SIGN_IN_WITH_TOTP_CODE' | 'CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED' | 'CONFIRM_SIGN_UP' | 'CONTINUE_SIGN_IN_WITH_TOTP_SETUP' | 'RESET_PASSWORD' | 'SIGN_IN_COMPLETE';
84
+ export type SignInStep = 'CONFIRM_SIGN_IN_WITH_EMAIL_CODE' | 'CONFIRM_SIGN_IN_WITH_SMS_CODE' | 'CONFIRM_SIGN_IN_WITH_TOTP_CODE' | 'CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED' | 'CONFIRM_SIGN_UP' | 'CONTINUE_SIGN_IN_WITH_TOTP_SETUP' | 'CONTINUE_SIGN_IN_WITH_EMAIL_SETUP' | 'CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION' | 'CONTINUE_SIGN_IN_WITH_MFA_SELECTION' | 'RESET_PASSWORD' | 'SIGN_IN_COMPLETE';
83
85
  export type ResetPasswordStep = 'CONFIRM_RESET_PASSWORD_WITH_CODE' | 'RESET_PASSWORD_COMPLETE';
84
86
  export type SignUpStep = 'CONFIRM_SIGN_UP' | 'COMPLETE_AUTO_SIGN_IN' | 'SIGN_UP_COMPLETE';
85
87
  export type UserAttributeStep = 'SHOULD_CONFIRM_USER_ATTRIBUTE' | 'CONFIRM_ATTRIBUTE_WITH_CODE' | 'CONFIRM_ATTRIBUTE_COMPLETE';
86
- type Step = InitialStep | SignInStep | SignUpStep | ResetPasswordStep | UserAttributeStep;
88
+ export type Step = InitialStep | SignInStep | SignUpStep | ResetPasswordStep | UserAttributeStep;
87
89
  /**
88
90
  * Base context for all actors that have auth forms associated
89
91
  */
@@ -94,6 +96,7 @@ interface BaseFormContext {
94
96
  step: Step;
95
97
  totpSecretCode?: string;
96
98
  unverifiedUserAttributes?: UnverifiedUserAttributes;
99
+ allowedMfaTypes?: AuthMFAType[];
97
100
  username?: string;
98
101
  selectedUserAttribute?: string;
99
102
  user?: AuthUser;
@@ -12,7 +12,7 @@ export interface AIConversationTokens<OutputType extends OutputVariantKey> {
12
12
  };
13
13
  form?: DesignTokenProperties<'gap' | 'padding', OutputType>;
14
14
  attachment?: DesignTokenProperties<'borderColor' | 'borderWidth' | 'borderRadius' | 'fontSize' | 'paddingBlock' | 'paddingInline' | 'gap', OutputType> & {
15
- list?: DesignTokenProperties<'paddingBlockStart' | 'gap', OutputType>;
15
+ list?: DesignTokenProperties<'paddingBlockStart' | 'padding' | 'gap', OutputType>;
16
16
  image?: DesignTokenProperties<'width' | 'height', OutputType>;
17
17
  size?: DesignTokenProperties<'color' | 'fontSize' | 'fontWeight', OutputType>;
18
18
  name?: DesignTokenProperties<'color' | 'fontSize' | 'fontWeight', OutputType>;
@@ -8,7 +8,7 @@ export type AuthTouchData = Record<string, boolean>;
8
8
  /**
9
9
  * List of routes that support custom formFields
10
10
  */
11
- export type FormFieldComponents = 'signIn' | 'signUp' | 'forceNewPassword' | 'confirmResetPassword' | 'confirmSignIn' | 'confirmSignUp' | 'confirmVerifyUser' | 'forgotPassword' | 'setupTotp';
11
+ export type FormFieldComponents = 'signIn' | 'signUp' | 'forceNewPassword' | 'confirmResetPassword' | 'confirmSignIn' | 'confirmSignUp' | 'confirmVerifyUser' | 'forgotPassword' | 'setupEmail' | 'setupTotp';
12
12
  /**
13
13
  * Used to customize form field attributes for each authenticator screen.
14
14
  */
@@ -22,6 +22,7 @@ export declare const ComponentClassName: {
22
22
  readonly AvatarImage: "amplify-avatar__image";
23
23
  readonly AvatarLoader: "amplify-avatar__loader";
24
24
  readonly AIConversation: "amplify-ai-conversation";
25
+ readonly AIConversationScrollView: "amplify-ai-conversation__scrollview";
25
26
  readonly AIConversationAttachment: "amplify-ai-conversation__attachment";
26
27
  readonly AIConversationAttachmentList: "amplify-ai-conversation__attachment__list";
27
28
  readonly AIConversationAttachmentImage: "amplify-ai-conversation__attachment__image";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui",
3
- "version": "6.9.0",
3
+ "version": "6.10.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.mjs",
6
6
  "exports": {
@@ -70,4 +70,4 @@
70
70
  "sideEffects": [
71
71
  "dist/**/*.css"
72
72
  ]
73
- }
73
+ }