@aws-amplify/ui 4.1.0 → 5.0.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 (30) hide show
  1. package/dist/esm/helpers/authenticator/constants.js +1 -1
  2. package/dist/esm/helpers/authenticator/facade.js +1 -1
  3. package/dist/esm/helpers/authenticator/textUtil.js +1 -0
  4. package/dist/esm/helpers/authenticator/utils.js +1 -1
  5. package/dist/esm/i18n/dictionaries/authenticator/defaultTexts.js +1 -1
  6. package/dist/esm/index.js +1 -1
  7. package/dist/esm/machines/authenticator/actors/signIn.js +1 -1
  8. package/dist/esm/machines/authenticator/defaultServices.js +1 -1
  9. package/dist/esm/machines/authenticator/index.js +1 -1
  10. package/dist/esm/machines/authenticator/signUp.js +1 -1
  11. package/dist/esm/theme/tokens/components/inAppMessaging.js +1 -0
  12. package/dist/esm/theme/tokens/components/index.js +1 -1
  13. package/dist/esm/types/primitives/componentClassName.js +1 -1
  14. package/dist/index.js +1 -1
  15. package/dist/styles.css +194 -3
  16. package/dist/theme.css +12 -1
  17. package/dist/types/helpers/authenticator/facade.d.ts +1 -1
  18. package/dist/types/helpers/authenticator/index.d.ts +1 -0
  19. package/dist/types/helpers/authenticator/textUtil.d.ts +44 -0
  20. package/dist/types/helpers/authenticator/utils.d.ts +7 -3
  21. package/dist/types/i18n/dictionaries/authenticator/defaultTexts.d.ts +0 -1
  22. package/dist/types/i18n/dictionaries/index.d.ts +0 -1
  23. package/dist/types/i18n/translations.d.ts +0 -1
  24. package/dist/types/machines/authenticator/defaultServices.d.ts +2 -1
  25. package/dist/types/theme/tokens/components/inAppMessaging.d.ts +28 -0
  26. package/dist/types/theme/tokens/components/index.d.ts +2 -0
  27. package/dist/types/types/authenticator/stateMachine/authMachine.d.ts +5 -1
  28. package/dist/types/types/authenticator/stateMachine/event.d.ts +1 -1
  29. package/dist/types/types/primitives/componentClassName.d.ts +1 -0
  30. package/package.json +3 -2
package/dist/styles.css CHANGED
@@ -3,7 +3,7 @@
3
3
  */
4
4
  /**
5
5
  * Do not edit directly
6
- * Generated on Tue, 08 Nov 2022 23:57:24 GMT
6
+ * Generated on Mon, 14 Nov 2022 16:53:03 GMT
7
7
  */
8
8
  :root, [data-amplify-theme] {
9
9
  --amplify-transforms-slide-x-large: translateX(2em);
@@ -255,6 +255,15 @@
255
255
  --amplify-components-loader-linear-width: 100%;
256
256
  --amplify-components-loader-animation-duration: 1s;
257
257
  --amplify-components-loader-stroke-linecap: round;
258
+ --amplify-components-inappmessaging-dialog-width: 30vw;
259
+ --amplify-components-inappmessaging-dialog-min-width: 400px;
260
+ --amplify-components-inappmessaging-dialog-min-height: 400px;
261
+ --amplify-components-inappmessaging-dialog-height: 50vh;
262
+ --amplify-components-inappmessaging-button-color: black;
263
+ --amplify-components-inappmessaging-button-border-radius: 5px;
264
+ --amplify-components-inappmessaging-button-background-color: #e8e8e8;
265
+ --amplify-components-inappmessaging-banner-width: 400px ;
266
+ --amplify-components-inappmessaging-banner-height: 150px ;
258
267
  --amplify-components-image-object-position: initial;
259
268
  --amplify-components-image-object-fit: initial;
260
269
  --amplify-components-image-height: auto;
@@ -521,6 +530,8 @@
521
530
  --amplify-components-loader-font-size: var(--amplify-font-sizes-xs);
522
531
  --amplify-components-loader-height: var(--amplify-font-sizes-medium);
523
532
  --amplify-components-loader-width: var(--amplify-font-sizes-medium);
533
+ --amplify-components-inappmessaging-header-font-weight: 800;
534
+ --amplify-components-inappmessaging-header-font-size: var(--amplify-font-sizes-medium);
524
535
  --amplify-components-highlightmatch-highlighted-font-weight: 700;
525
536
  --amplify-components-heading-line-height: var(--amplify-line-heights-small);
526
537
  --amplify-components-heading-6-font-weight: 800;
@@ -990,7 +1001,7 @@ html,
990
1001
 
991
1002
  @supports (font-variation-settings: normal) {
992
1003
  html,
993
- [data-amplify-theme] {
1004
+ [data-amplify-theme] {
994
1005
  font-family: var(--amplify-fonts-default-variable);
995
1006
  }
996
1007
  }
@@ -2503,7 +2514,7 @@ html[dir=rtl] .amplify-field-group__inner-start {
2503
2514
  height: 100%;
2504
2515
  }
2505
2516
 
2506
- [data-radix-popper-content-wrapper] {
2517
+ .amplify-menu-content-wrapper {
2507
2518
  z-index: 999999;
2508
2519
  }
2509
2520
 
@@ -3873,6 +3884,186 @@ html[dir=rtl] .amplify-field-group__inner-start {
3873
3884
  }
3874
3885
  }
3875
3886
 
3887
+ .amplify-inappmessaging-backdrop {
3888
+ background-color: var(--amplify-colors-overlay-50);
3889
+ inset: 0;
3890
+ position: fixed;
3891
+ z-index: 1000;
3892
+ }
3893
+
3894
+ .amplify-inappmessaging-backdrop-content-container {
3895
+ align-items: center;
3896
+ inset: 0;
3897
+ justify-content: center;
3898
+ pointer-events: none;
3899
+ position: fixed;
3900
+ z-index: 1001;
3901
+ }
3902
+
3903
+ .amplify-inappmessaging-backdrop-content {
3904
+ pointer-events: auto;
3905
+ }
3906
+
3907
+ .amplify-inappmessaging-bannermessage {
3908
+ box-shadow: var(--amplify-shadows-medium);
3909
+ height: var(--amplify-components-inappmessaging-banner-height);
3910
+ margin: var(--amplify-space-small);
3911
+ max-width: 50%;
3912
+ position: fixed;
3913
+ width: var(--amplify-components-inappmessaging-banner-width);
3914
+ }
3915
+ .amplify-inappmessaging-bannermessage--top {
3916
+ top: 0;
3917
+ }
3918
+ .amplify-inappmessaging-bannermessage--middle {
3919
+ bottom: 0;
3920
+ margin: auto var(--amplify-space-small);
3921
+ top: 0;
3922
+ }
3923
+ .amplify-inappmessaging-bannermessage--bottom {
3924
+ bottom: 0;
3925
+ }
3926
+ .amplify-inappmessaging-bannermessage--left {
3927
+ left: 0;
3928
+ }
3929
+ .amplify-inappmessaging-bannermessage--center {
3930
+ left: 0;
3931
+ margin: var(--amplify-space-small) auto;
3932
+ right: 0;
3933
+ }
3934
+ .amplify-inappmessaging-bannermessage--right {
3935
+ right: 0;
3936
+ }
3937
+ .amplify-inappmessaging-bannermessage--center-middle {
3938
+ inset: 0;
3939
+ margin: auto;
3940
+ }
3941
+ .amplify-inappmessaging-bannermessage--full-width {
3942
+ max-width: initial;
3943
+ width: calc(100% - 2 * var(--amplify-space-small));
3944
+ }
3945
+
3946
+ .amplify-inappmessaging-fullscreenmessage {
3947
+ height: var(--amplify-components-inappmessaging-dialog-height);
3948
+ min-height: var(--amplify-components-inappmessaging-dialog-min-height);
3949
+ min-width: var(--amplify-components-inappmessaging-dialog-min-width);
3950
+ width: var(--amplify-components-inappmessaging-dialog-width);
3951
+ }
3952
+ .amplify-inappmessaging-fullscreenmessage--fullscreen {
3953
+ height: auto;
3954
+ inset: 0;
3955
+ position: fixed;
3956
+ width: auto;
3957
+ z-index: 1000;
3958
+ }
3959
+
3960
+ .amplify-inappmessaging-messagelayout {
3961
+ background-color: var(--amplify-colors-background-primary);
3962
+ flex-direction: column;
3963
+ flex-grow: 1;
3964
+ gap: var(--amplify-space-xxxs);
3965
+ max-width: 100%;
3966
+ padding: var(--amplify-space-medium);
3967
+ }
3968
+ .amplify-inappmessaging-messagelayout__button {
3969
+ border-width: 0;
3970
+ width: 100%;
3971
+ }
3972
+ .amplify-inappmessaging-messagelayout__button, .amplify-inappmessaging-messagelayout__button:active, .amplify-inappmessaging-messagelayout__button:visited, .amplify-inappmessaging-messagelayout__button:hover, .amplify-inappmessaging-messagelayout__button:focus {
3973
+ background-color: var(--amplify-components-inappmessaging-button-background-color);
3974
+ border-radius: var(--amplify-components-inappmessaging-button-border-radius);
3975
+ color: var(--amplify-components-inappmessaging-button-color);
3976
+ }
3977
+ .amplify-inappmessaging-messagelayout__button--dark:active, .amplify-inappmessaging-messagelayout__button--dark:visited, .amplify-inappmessaging-messagelayout__button--light:active, .amplify-inappmessaging-messagelayout__button--light:visited {
3978
+ filter: brightness(100%);
3979
+ }
3980
+ .amplify-inappmessaging-messagelayout__button--dark:hover, .amplify-inappmessaging-messagelayout__button--dark:focus {
3981
+ filter: brightness(120%);
3982
+ }
3983
+ .amplify-inappmessaging-messagelayout__button--light:hover, .amplify-inappmessaging-messagelayout__button--light:focus {
3984
+ filter: brightness(80%);
3985
+ }
3986
+ .amplify-inappmessaging-messagelayout__close-button {
3987
+ color: var(--amplify-colors-neutral-80);
3988
+ }
3989
+ .amplify-inappmessaging-messagelayout__close-button:active, .amplify-inappmessaging-messagelayout__close-button:visited {
3990
+ color: var(--amplify-colors-neutral-80);
3991
+ }
3992
+ .amplify-inappmessaging-messagelayout__close-button:hover, .amplify-inappmessaging-messagelayout__close-button:focus {
3993
+ color: var(--amplify-colors-neutral-100);
3994
+ }
3995
+ .amplify-inappmessaging-messagelayout__content {
3996
+ flex-grow: 1;
3997
+ overflow: hidden;
3998
+ }
3999
+ .amplify-inappmessaging-messagelayout__content--horizontal {
4000
+ flex-direction: row;
4001
+ }
4002
+ .amplify-inappmessaging-messagelayout__content--vertical {
4003
+ flex-direction: column;
4004
+ justify-content: center;
4005
+ }
4006
+ .amplify-inappmessaging-messagelayout__header {
4007
+ flex-shrink: 0;
4008
+ font-size: var(--amplify-components-inappmessaging-header-font-size);
4009
+ font-weight: var(--amplify-components-inappmessaging-header-font-weight);
4010
+ }
4011
+ .amplify-inappmessaging-messagelayout__image-container {
4012
+ align-items: center;
4013
+ display: flex;
4014
+ justify-content: center;
4015
+ position: relative;
4016
+ }
4017
+ .amplify-inappmessaging-messagelayout__image-container img {
4018
+ max-height: 100%;
4019
+ max-width: 100%;
4020
+ -o-object-fit: contain;
4021
+ object-fit: contain;
4022
+ position: absolute;
4023
+ }
4024
+ .amplify-inappmessaging-messagelayout__image-container--horizontal {
4025
+ max-width: 15%;
4026
+ min-width: 15%;
4027
+ }
4028
+ .amplify-inappmessaging-messagelayout__image-container--vertical {
4029
+ max-height: 40%;
4030
+ min-height: 40%;
4031
+ }
4032
+ .amplify-inappmessaging-messagelayout__text-container {
4033
+ flex-direction: column;
4034
+ overflow-y: auto;
4035
+ gap: var(--amplify-space-xxxs);
4036
+ }
4037
+ .amplify-inappmessaging-messagelayout__text-container--horizontal {
4038
+ flex-grow: 1;
4039
+ }
4040
+ .amplify-inappmessaging-messagelayout__text-container--vertical {
4041
+ flex-grow: 0;
4042
+ }
4043
+
4044
+ .amplify-inappmessaging-modalmessage {
4045
+ align-items: center;
4046
+ height: initial;
4047
+ inset: 0;
4048
+ justify-content: center;
4049
+ pointer-events: none;
4050
+ position: fixed;
4051
+ width: initial;
4052
+ z-index: 1000;
4053
+ }
4054
+ .amplify-inappmessaging-modalmessage__dialog {
4055
+ box-shadow: var(--amplify-shadows-medium);
4056
+ height: var(--amplify-components-inappmessaging-dialog-height);
4057
+ min-height: var(--amplify-components-inappmessaging-dialog-min-height);
4058
+ min-width: var(--amplify-components-inappmessaging-dialog-min-width);
4059
+ pointer-events: auto;
4060
+ width: var(--amplify-components-inappmessaging-dialog-width);
4061
+ }
4062
+ .amplify-inappmessaging-modalmessage__dialog--full-width {
4063
+ width: 100%;
4064
+ margin: var(--amplify-space-small);
4065
+ }
4066
+
3876
4067
  [data-label-position=start] {
3877
4068
  flex-direction: row;
3878
4069
  }
package/dist/theme.css CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 08 Nov 2022 23:57:24 GMT
3
+ * Generated on Mon, 14 Nov 2022 16:53:03 GMT
4
4
  */
5
5
 
6
6
  :root, [data-amplify-theme] {
@@ -253,6 +253,15 @@
253
253
  --amplify-components-loader-linear-width: 100%;
254
254
  --amplify-components-loader-animation-duration: 1s;
255
255
  --amplify-components-loader-stroke-linecap: round;
256
+ --amplify-components-inappmessaging-dialog-width: 30vw;
257
+ --amplify-components-inappmessaging-dialog-min-width: 400px;
258
+ --amplify-components-inappmessaging-dialog-min-height: 400px;
259
+ --amplify-components-inappmessaging-dialog-height: 50vh;
260
+ --amplify-components-inappmessaging-button-color: black;
261
+ --amplify-components-inappmessaging-button-border-radius: 5px;
262
+ --amplify-components-inappmessaging-button-background-color: #e8e8e8;
263
+ --amplify-components-inappmessaging-banner-width: 400px ;
264
+ --amplify-components-inappmessaging-banner-height: 150px ;
256
265
  --amplify-components-image-object-position: initial;
257
266
  --amplify-components-image-object-fit: initial;
258
267
  --amplify-components-image-height: auto;
@@ -519,6 +528,8 @@
519
528
  --amplify-components-loader-font-size: var(--amplify-font-sizes-xs);
520
529
  --amplify-components-loader-height: var(--amplify-font-sizes-medium);
521
530
  --amplify-components-loader-width: var(--amplify-font-sizes-medium);
531
+ --amplify-components-inappmessaging-header-font-weight: 800;
532
+ --amplify-components-inappmessaging-header-font-size: var(--amplify-font-sizes-medium);
522
533
  --amplify-components-highlightmatch-highlighted-font-weight: 700;
523
534
  --amplify-components-heading-line-height: var(--amplify-line-heights-small);
524
535
  --amplify-components-heading-6-font-weight: 800;
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { Sender } from 'xstate';
7
7
  import { AuthEvent, AuthEventData, AuthMachineState, CodeDeliveryDetails, AmplifyUser, ValidationError, SocialProvider, UnverifiedContactMethods } from '../../types';
8
- export declare type AuthenticatorRoute = 'authenticated' | 'autoSignIn' | 'confirmResetPassword' | 'confirmSignIn' | 'confirmSignUp' | 'confirmVerifyUser' | 'forceNewPassword' | 'idle' | 'resetPassword' | 'setup' | 'signOut' | 'setupTOTP' | 'signIn' | 'signUp' | 'verifyUser';
8
+ export declare type AuthenticatorRoute = 'authenticated' | 'confirmResetPassword' | 'confirmSignIn' | 'confirmSignUp' | 'confirmVerifyUser' | 'forceNewPassword' | 'idle' | 'resetPassword' | 'setup' | 'signOut' | 'setupTOTP' | 'signIn' | 'signUp' | 'transition' | 'verifyUser';
9
9
  declare type AuthenticatorValidationErrors = ValidationError;
10
10
  declare type AuthStatus = 'configuring' | 'authenticated' | 'unauthenticated';
11
11
  interface AuthenticatorServiceContextFacade {
@@ -5,3 +5,4 @@ export * from './constants';
5
5
  export * from './form';
6
6
  export * from './utils';
7
7
  export * from './formFields';
8
+ export * from './textUtil';
@@ -0,0 +1,44 @@
1
+ import { AuthChallengeName, CodeDeliveryDetails, SocialProvider } from '../../types';
2
+ import { AuthenticatorRoute } from './facade';
3
+ export declare const authenticatorTextUtil: {
4
+ /** Shared */
5
+ readonly getBackToSignInText: () => string;
6
+ readonly getChangePasswordText: () => string;
7
+ readonly getChangingText: () => string;
8
+ readonly getConfirmText: () => string;
9
+ readonly getConfirmingText: () => string;
10
+ readonly getCopyText: () => string;
11
+ readonly getResendCodeText: () => string;
12
+ readonly getSendCodeText: () => string;
13
+ readonly getSendingText: () => string;
14
+ readonly getSubmitText: () => string;
15
+ readonly getSubmittingText: () => string;
16
+ readonly getLoadingText: () => string;
17
+ /** SignInSignUpTabs */
18
+ readonly getSignInTabText: () => string;
19
+ readonly getSignUpTabText: () => string;
20
+ /** SignIn */
21
+ readonly getForgotPasswordText: () => string;
22
+ readonly getSigningInText: () => string;
23
+ readonly getSignInText: () => string;
24
+ /** SignUp */
25
+ readonly getCreatingAccountText: () => string;
26
+ readonly getCreateAccountText: () => string;
27
+ /** ConfirmSignUp */
28
+ readonly getDeliveryMessageText: (codeDeliveryDetails: CodeDeliveryDetails) => string;
29
+ readonly getDeliveryMethodText: (codeDeliveryDetails: CodeDeliveryDetails) => string;
30
+ /** ConfirmSignIn */
31
+ readonly getChallengeText: (challengeName: AuthChallengeName) => string;
32
+ /** ResetPassword */
33
+ readonly getResetYourPasswordText: () => string;
34
+ /** SetupTOTP */
35
+ readonly getSetupTOTPText: () => string;
36
+ readonly getCopiedText: () => string;
37
+ /** FederatedSignIn */
38
+ readonly getSignInWithFederationText: (route: AuthenticatorRoute, provider: SocialProvider) => string;
39
+ /** VerifyUser */
40
+ readonly getSkipText: () => string;
41
+ readonly getVerifyText: () => string;
42
+ readonly getVerifyContactText: () => string;
43
+ readonly getAccountRecoveryInfoText: () => string;
44
+ };
@@ -2,10 +2,14 @@
2
2
  * This file contains general helpers that state machine or authenticator
3
3
  * implementations can use.
4
4
  */
5
- import { AuthInterpreter, HubHandler } from '../../types';
5
+ import { AuthInterpreter, AuthMachineHubHandler } from '../../types';
6
6
  export declare const censorAllButFirstAndLast: (value: string) => string;
7
7
  export declare const censorPhoneNumber: (val: string) => string;
8
- export declare const defaultAuthHubHandler: HubHandler;
8
+ /**
9
+ * Handles Amplify JS Auth hub events, by forwarding hub events as appropriate
10
+ * xstate events.
11
+ */
12
+ export declare const defaultAuthHubHandler: AuthMachineHubHandler;
9
13
  /**
10
14
  * Listens to external auth Hub events and sends corresponding event to
11
15
  * the `authService` of interest
@@ -14,6 +18,6 @@ export declare const defaultAuthHubHandler: HubHandler;
14
18
  *
15
19
  * @returns function that unsubscribes to the hub evenmt
16
20
  */
17
- export declare const listenToAuthHub: (service: AuthInterpreter, handler?: HubHandler) => () => void;
21
+ export declare const listenToAuthHub: (service: AuthInterpreter, handler?: AuthMachineHubHandler) => () => void;
18
22
  export declare const hasSpecialChars: (password: string) => boolean;
19
23
  export declare const getTotpCodeURL: (issuer: string, username: string, secret: string) => string;
@@ -20,7 +20,6 @@ export declare const defaultTexts: {
20
20
  FAMILY_NAME: string;
21
21
  GIVEN_NAME: string;
22
22
  FORGOT_YOUR_PASSWORD: string;
23
- FORGOT_YOUR_PASSWORD_LEGACY: string;
24
23
  HIDE_PASSWORD: string;
25
24
  LOADING: string;
26
25
  LOGIN_NAME: string;
@@ -800,7 +800,6 @@ export declare const defaultTexts: {
800
800
  FAMILY_NAME: string;
801
801
  GIVEN_NAME: string;
802
802
  FORGOT_YOUR_PASSWORD: string;
803
- FORGOT_YOUR_PASSWORD_LEGACY: string;
804
803
  HIDE_PASSWORD: string;
805
804
  LOADING: string;
806
805
  LOGIN_NAME: string;
@@ -32,7 +32,6 @@ export declare const DefaultTexts: {
32
32
  readonly FAMILY_NAME: string;
33
33
  readonly GIVEN_NAME: string;
34
34
  readonly FORGOT_YOUR_PASSWORD: string;
35
- readonly FORGOT_YOUR_PASSWORD_LEGACY: string;
36
35
  readonly HIDE_PASSWORD: string;
37
36
  readonly LOADING: string;
38
37
  readonly LOGIN_NAME: string;
@@ -1,8 +1,9 @@
1
+ /// <reference types="amazon-cognito-identity-js" />
1
2
  import { AuthChallengeName, PasswordSettings, SignInResult, ValidatorResult } from '../../types';
2
3
  export declare const defaultServices: {
3
4
  getAmplifyConfig(): Promise<{}>;
4
5
  getCurrentUser(): Promise<any>;
5
- handleSignUp(formData: any): Promise<any>;
6
+ handleSignUp(formData: any): Promise<import("amazon-cognito-identity-js").ISignUpResult>;
6
7
  handleSignIn({ username, password, }: {
7
8
  username: string;
8
9
  password: string;
@@ -0,0 +1,28 @@
1
+ import { BorderRadiusValue, ColorValue, DesignToken, FontSizeValue, FontWeightValue, SpaceValue } from '../types/designToken';
2
+ interface BannerTokens {
3
+ height: DesignToken<SpaceValue>;
4
+ width: DesignToken<SpaceValue>;
5
+ }
6
+ interface ButtonTokens {
7
+ backgroundColor: DesignToken<ColorValue>;
8
+ borderRadius: DesignToken<BorderRadiusValue>;
9
+ color: DesignToken<ColorValue>;
10
+ }
11
+ interface DialogTokens {
12
+ height: DesignToken<SpaceValue>;
13
+ minHeight: DesignToken<SpaceValue>;
14
+ minWidth: DesignToken<SpaceValue>;
15
+ width: DesignToken<SpaceValue>;
16
+ }
17
+ interface HeaderTokens {
18
+ fontSize: DesignToken<FontSizeValue>;
19
+ fontWeight: DesignToken<FontWeightValue>;
20
+ }
21
+ export interface InAppMessagingTokens {
22
+ banner: BannerTokens;
23
+ button: ButtonTokens;
24
+ dialog: DialogTokens;
25
+ header: HeaderTokens;
26
+ }
27
+ export declare const inappmessaging: InAppMessagingTokens;
28
+ export {};
@@ -20,6 +20,7 @@ import { HeadingTokens } from './heading';
20
20
  import { HighlightMatchTokens } from './highlightMatch';
21
21
  import { IconTokens } from './icon';
22
22
  import { ImageTokens } from './image';
23
+ import { InAppMessagingTokens } from './inAppMessaging';
23
24
  import { LinkTokens } from './link';
24
25
  import { LoaderTokens } from './loader';
25
26
  import { MenuTokens } from './menu';
@@ -66,6 +67,7 @@ export interface ComponentTokens {
66
67
  icon: IconTokens;
67
68
  highlightmatch: HighlightMatchTokens;
68
69
  image: ImageTokens;
70
+ inappmessaging: InAppMessagingTokens;
69
71
  link: LinkTokens;
70
72
  loader: LoaderTokens;
71
73
  menu: MenuTokens;
@@ -16,4 +16,8 @@ export declare type AuthInterpreter = Interpreter<AuthContext, any, AuthEvent, a
16
16
  * Function type for `send` in `authMachine`
17
17
  */
18
18
  export declare type AuthMachineSend = AuthInterpreter['send'];
19
- export declare type HubHandler = (data: HubCapsule, service: AuthInterpreter) => void;
19
+ /**
20
+ * Handles Amplify JS Auth hub events, by forwarding hub events as appropriate
21
+ * xstate events.
22
+ */
23
+ export declare type AuthMachineHubHandler = (data: HubCapsule, service: AuthInterpreter) => Promise<void>;
@@ -5,7 +5,7 @@ export declare type InvokeActorEventTypes = 'done.invoke.signInActor' | 'done.in
5
5
  /**
6
6
  * All known explicit events for xstate
7
7
  */
8
- export declare type AuthEventTypes = 'CHANGE' | 'BLUR' | 'FEDERATED_SIGN_IN' | 'RESEND' | 'RESET_PASSWORD' | 'SIGN_IN' | 'SIGN_OUT' | 'SIGN_UP' | 'SKIP' | 'SUBMIT' | 'INIT' | 'TOKEN_REFRESH' | InvokeActorEventTypes;
8
+ export declare type AuthEventTypes = 'CHANGE' | 'BLUR' | 'FEDERATED_SIGN_IN' | 'RESEND' | 'RESET_PASSWORD' | 'AUTO_SIGN_IN' | 'AUTO_SIGN_IN_FAILURE' | 'SIGN_IN' | 'SIGN_OUT' | 'SIGN_UP' | 'SKIP' | 'SUBMIT' | 'INIT' | 'TOKEN_REFRESH' | InvokeActorEventTypes;
9
9
  /**
10
10
  * Data payload for auth events
11
11
  */
@@ -67,6 +67,7 @@ export declare enum ComponentClassName {
67
67
  LoaderDeterminate = "amplify-loader--determinate",
68
68
  LoaderPercentageText = "amplify-loader__percentage-text",
69
69
  MenuContent = "amplify-menu-content",
70
+ MenuContentWrapper = "amplify-menu-content-wrapper",
70
71
  MenuItem = "amplify-menu-content__item",
71
72
  MenuTrigger = "amplify-menu-trigger",
72
73
  Pagination = "amplify-pagination",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui",
3
- "version": "4.1.0",
3
+ "version": "5.0.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "exports": {
@@ -8,6 +8,7 @@
8
8
  "import": "./dist/esm/index.js",
9
9
  "require": "./dist/index.js"
10
10
  },
11
+ "./package.json": "./package.json",
11
12
  "./styles.css": "./dist/styles.css",
12
13
  "./theme.css": "./dist/theme.css"
13
14
  },
@@ -45,7 +46,7 @@
45
46
  "tslib": "2.4.0"
46
47
  },
47
48
  "peerDependencies": {
48
- "aws-amplify": "3.x.x || 4.x.x",
49
+ "aws-amplify": "5.x.x",
49
50
  "xstate": "^4.33.6"
50
51
  },
51
52
  "peerDependenciesMeta": {