@aws-amplify/ui-react 6.0.0 → 6.0.1

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.
@@ -11,7 +11,7 @@ import { SignIn } from './SignIn/SignIn.mjs';
11
11
  import { SignUp } from './SignUp/SignUp.mjs';
12
12
  import { ForceNewPassword } from './ForceNewPassword/ForceNewPassword.mjs';
13
13
  import './ForgotPassword/ConfirmResetPassword.mjs';
14
- import { ResetPassword } from './ForgotPassword/ForgotPassword.mjs';
14
+ import { ForgotPassword } from './ForgotPassword/ForgotPassword.mjs';
15
15
  import { defaultComponents } from './hooks/useCustomComponents/defaultComponents.mjs';
16
16
 
17
17
  // `AuthenticatorInternal` exists to give access to the context returned via `useAuthenticator`,
@@ -65,7 +65,7 @@ function Authenticator(props) {
65
65
  React.createElement(AuthenticatorInternal, { ...props })));
66
66
  }
67
67
  Authenticator.Provider = AuthenticatorProvider;
68
- Authenticator.ResetPassword = ResetPassword;
68
+ Authenticator.ForgotPassword = ForgotPassword;
69
69
  Authenticator.SetupTotp = SetupTotp;
70
70
  Authenticator.SignIn = SignIn;
71
71
  Authenticator.SignUp = SignUp;
@@ -11,14 +11,14 @@ import { FormFields } from '../shared/FormFields.mjs';
11
11
  import { RouteContainer } from '../RouteContainer/RouteContainer.mjs';
12
12
 
13
13
  const { getBackToSignInText, getSendingText, getSendCodeText, getResetYourPasswordText, } = authenticatorTextUtil;
14
- const ResetPassword = ({ className, variation, }) => {
14
+ const ForgotPassword = ({ className, variation, }) => {
15
15
  const { isPending } = useAuthenticator((context) => [context.isPending]);
16
16
  const { handleChange, handleSubmit } = useFormHandlers();
17
17
  const { components: {
18
18
  // @ts-ignore
19
- ResetPassword: { Header = ResetPassword.Header, Footer = ResetPassword.Footer, }, }, } = useCustomComponents();
19
+ ForgotPassword: { Header = ForgotPassword.Header, Footer = ForgotPassword.Footer, }, }, } = useCustomComponents();
20
20
  return (React__default.createElement(RouteContainer, { className: className, variation: variation },
21
- React__default.createElement("form", { "data-amplify-form": "", "data-amplify-authenticator-resetpassword": "", method: "post", onChange: handleChange, onSubmit: handleSubmit },
21
+ React__default.createElement("form", { "data-amplify-form": "", "data-amplify-authenticator-Forgotpassword": "", method: "post", onChange: handleChange, onSubmit: handleSubmit },
22
22
  React__default.createElement(Flex, { as: "fieldset", direction: "column", isDisabled: isPending },
23
23
  React__default.createElement(Header, null),
24
24
  React__default.createElement(Flex, { direction: "column" },
@@ -29,12 +29,12 @@ const ResetPassword = ({ className, variation, }) => {
29
29
  "\u2026")) : (React__default.createElement(React__default.Fragment, null, getSendCodeText())) }),
30
30
  React__default.createElement(Footer, null)))));
31
31
  };
32
- ResetPassword.Header = function Header() {
32
+ ForgotPassword.Header = function Header() {
33
33
  return React__default.createElement(Heading, { level: 3 }, getResetYourPasswordText());
34
34
  };
35
- ResetPassword.Footer = function Footer() {
35
+ ForgotPassword.Footer = function Footer() {
36
36
  // @ts-ignore
37
37
  return null;
38
38
  };
39
39
 
40
- export { ResetPassword };
40
+ export { ForgotPassword };
@@ -13,7 +13,7 @@ import { ConfirmVerifyUser } from '../VerifyUser/ConfirmVerifyUser.mjs';
13
13
  import { VerifyUser } from '../VerifyUser/VerifyUser.mjs';
14
14
  import { ConfirmSignIn } from '../ConfirmSignIn/ConfirmSignIn.mjs';
15
15
  import { ConfirmResetPassword } from '../ForgotPassword/ConfirmResetPassword.mjs';
16
- import { ResetPassword } from '../ForgotPassword/ForgotPassword.mjs';
16
+ import { ForgotPassword } from '../ForgotPassword/ForgotPassword.mjs';
17
17
  import { isSignInOrSignUpRoute } from '../utils.mjs';
18
18
 
19
19
  function RenderNothing() {
@@ -39,7 +39,7 @@ const getRouteComponent = (route) => {
39
39
  case 'forceNewPassword':
40
40
  return ForceNewPassword;
41
41
  case 'forgotPassword':
42
- return ResetPassword;
42
+ return ForgotPassword;
43
43
  case 'confirmResetPassword':
44
44
  return ConfirmResetPassword;
45
45
  case 'verifyUser':
@@ -7,7 +7,7 @@ import { ConfirmSignIn } from '../../ConfirmSignIn/ConfirmSignIn.mjs';
7
7
  import { ConfirmVerifyUser } from '../../VerifyUser/ConfirmVerifyUser.mjs';
8
8
  import { VerifyUser } from '../../VerifyUser/VerifyUser.mjs';
9
9
  import { ConfirmResetPassword } from '../../ForgotPassword/ConfirmResetPassword.mjs';
10
- import { ResetPassword } from '../../ForgotPassword/ForgotPassword.mjs';
10
+ import { ForgotPassword } from '../../ForgotPassword/ForgotPassword.mjs';
11
11
 
12
12
  const defaultComponents = {
13
13
  // @ts-ignore
@@ -51,9 +51,9 @@ const defaultComponents = {
51
51
  Footer: ForceNewPassword.Footer,
52
52
  FormFields: ForceNewPassword.FormFields,
53
53
  },
54
- ResetPassword: {
55
- Header: ResetPassword.Header,
56
- Footer: ResetPassword.Footer,
54
+ ForgotPassword: {
55
+ Header: ForgotPassword.Header,
56
+ Footer: ForgotPassword.Footer,
57
57
  },
58
58
  // @ts-ignore
59
59
  Footer: () => null,
@@ -1,3 +1,3 @@
1
- const VERSION = '5.3.2';
1
+ const VERSION = '6.0.1';
2
2
 
3
3
  export { VERSION };
package/dist/index.js CHANGED
@@ -2383,7 +2383,7 @@ const defaultDeleteUserDisplayText = {
2383
2383
  warningText: 'Deleting your account is not reversible. You will lose access to your account and all data associated with it.',
2384
2384
  };
2385
2385
 
2386
- const VERSION = '5.3.2';
2386
+ const VERSION = '6.0.1';
2387
2387
 
2388
2388
  const logger$2 = ui.getLogger('AccountSettings');
2389
2389
  const getIsDisabled = (formValues, validationError) => {
@@ -3180,14 +3180,14 @@ ConfirmResetPassword.Footer = function Footer() {
3180
3180
  };
3181
3181
 
3182
3182
  const { getBackToSignInText, getSendingText, getSendCodeText, getResetYourPasswordText, } = ui.authenticatorTextUtil;
3183
- const ResetPassword = ({ className, variation, }) => {
3183
+ const ForgotPassword = ({ className, variation, }) => {
3184
3184
  const { isPending } = uiReactCore.useAuthenticator((context) => [context.isPending]);
3185
3185
  const { handleChange, handleSubmit } = useFormHandlers();
3186
3186
  const { components: {
3187
3187
  // @ts-ignore
3188
- ResetPassword: { Header = ResetPassword.Header, Footer = ResetPassword.Footer, }, }, } = useCustomComponents();
3188
+ ForgotPassword: { Header = ForgotPassword.Header, Footer = ForgotPassword.Footer, }, }, } = useCustomComponents();
3189
3189
  return (React__default["default"].createElement(RouteContainer, { className: className, variation: variation },
3190
- React__default["default"].createElement("form", { "data-amplify-form": "", "data-amplify-authenticator-resetpassword": "", method: "post", onChange: handleChange, onSubmit: handleSubmit },
3190
+ React__default["default"].createElement("form", { "data-amplify-form": "", "data-amplify-authenticator-Forgotpassword": "", method: "post", onChange: handleChange, onSubmit: handleSubmit },
3191
3191
  React__default["default"].createElement(Field.Flex, { as: "fieldset", direction: "column", isDisabled: isPending },
3192
3192
  React__default["default"].createElement(Header, null),
3193
3193
  React__default["default"].createElement(Field.Flex, { direction: "column" },
@@ -3198,10 +3198,10 @@ const ResetPassword = ({ className, variation, }) => {
3198
3198
  "\u2026")) : (React__default["default"].createElement(React__default["default"].Fragment, null, getSendCodeText())) }),
3199
3199
  React__default["default"].createElement(Footer, null)))));
3200
3200
  };
3201
- ResetPassword.Header = function Header() {
3201
+ ForgotPassword.Header = function Header() {
3202
3202
  return React__default["default"].createElement(Heading, { level: 3 }, getResetYourPasswordText());
3203
3203
  };
3204
- ResetPassword.Footer = function Footer() {
3204
+ ForgotPassword.Footer = function Footer() {
3205
3205
  // @ts-ignore
3206
3206
  return null;
3207
3207
  };
@@ -3231,7 +3231,7 @@ const getRouteComponent = (route) => {
3231
3231
  case 'forceNewPassword':
3232
3232
  return ForceNewPassword;
3233
3233
  case 'forgotPassword':
3234
- return ResetPassword;
3234
+ return ForgotPassword;
3235
3235
  case 'confirmResetPassword':
3236
3236
  return ConfirmResetPassword;
3237
3237
  case 'verifyUser':
@@ -3294,9 +3294,9 @@ const defaultComponents = {
3294
3294
  Footer: ForceNewPassword.Footer,
3295
3295
  FormFields: ForceNewPassword.FormFields,
3296
3296
  },
3297
- ResetPassword: {
3298
- Header: ResetPassword.Header,
3299
- Footer: ResetPassword.Footer,
3297
+ ForgotPassword: {
3298
+ Header: ForgotPassword.Header,
3299
+ Footer: ForgotPassword.Footer,
3300
3300
  },
3301
3301
  // @ts-ignore
3302
3302
  Footer: () => null,
@@ -3353,7 +3353,7 @@ function Authenticator(props) {
3353
3353
  React__namespace.createElement(AuthenticatorInternal, { ...props })));
3354
3354
  }
3355
3355
  Authenticator.Provider = uiReactCore.AuthenticatorProvider;
3356
- Authenticator.ResetPassword = ResetPassword;
3356
+ Authenticator.ForgotPassword = ForgotPassword;
3357
3357
  Authenticator.SetupTotp = SetupTotp;
3358
3358
  Authenticator.SignIn = SignIn;
3359
3359
  Authenticator.SignUp = SignUp;
@@ -35,7 +35,7 @@ export declare function AuthenticatorInternal({ children, className, components:
35
35
  export declare function Authenticator(props: AuthenticatorProps): JSX.Element;
36
36
  export declare namespace Authenticator {
37
37
  var Provider: typeof import("@aws-amplify/ui-react-core").AuthenticatorProvider;
38
- var ResetPassword: {
38
+ var ForgotPassword: {
39
39
  ({ className, variation, }: import("./RouteContainer").RouteProps): JSX.Element;
40
40
  Header(): JSX.Element;
41
41
  Footer(): JSX.Element;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { RouteProps } from '../RouteContainer';
3
- export declare const ResetPassword: {
3
+ export declare const ForgotPassword: {
4
4
  ({ className, variation, }: RouteProps): JSX.Element;
5
5
  Header(): JSX.Element;
6
6
  Footer(): JSX.Element;
@@ -10,7 +10,7 @@ export interface DefaultComponents extends Omit<Components, 'FormFields'> {
10
10
  ConfirmResetPassword?: Omit<Components, 'FormFields'>;
11
11
  ConfirmVerifyUser?: Omit<Components, 'FormFields'>;
12
12
  ForceNewPassword?: Components;
13
- ResetPassword?: Omit<Components, 'FormFields'>;
13
+ ForgotPassword?: Omit<Components, 'FormFields'>;
14
14
  SetupTotp?: Omit<Components, 'FormFields'>;
15
15
  SignIn?: Omit<Components, 'FormFields'>;
16
16
  SignUp?: Components;
@@ -1 +1 @@
1
- export declare const VERSION = "5.3.2";
1
+ export declare const VERSION = "6.0.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui-react",
3
- "version": "6.0.0",
3
+ "version": "6.0.1",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.mjs",
6
6
  "exports": {