@better-auth-ui/heroui 1.6.27 → 1.6.28
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/components/auth/forgot-password.d.ts +3 -1
- package/dist/components/auth/magic-link/magic-link-sent.d.ts +20 -0
- package/dist/components/auth/reset-link-sent.d.ts +20 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +271 -230
- package/dist/lib/auth/magic-link-plugin.d.ts +4 -0
- package/dist/plugins.d.ts +1 -0
- package/dist/plugins.js +423 -380
- package/dist/user-view-CxSDufx_.js +126 -0
- package/package.json +1 -1
- package/src/components/auth/auth.tsx +8 -1
- package/src/components/auth/forgot-password.tsx +9 -6
- package/src/components/auth/magic-link/magic-link-sent.tsx +84 -0
- package/src/components/auth/magic-link/magic-link.tsx +10 -6
- package/src/components/auth/reset-link-sent.tsx +80 -0
- package/src/components/auth/settings/security/change-password.tsx +32 -14
- package/src/index.tsx +1 -0
- package/src/lib/auth/magic-link-plugin.ts +2 -1
- package/src/plugins.ts +1 -0
- package/dist/user-view--47tVtJ3.js +0 -113
|
@@ -7,7 +7,9 @@ export type ForgotPasswordProps = {
|
|
|
7
7
|
* Render a card-based "Forgot Password" form that sends a password-reset email.
|
|
8
8
|
*
|
|
9
9
|
* The form displays an email input, submit button, and a link back to sign-in.
|
|
10
|
-
*
|
|
10
|
+
* After a successful request the submitted email is stored in `sessionStorage`
|
|
11
|
+
* and the user is redirected to the reset-link-sent view, which offers to open
|
|
12
|
+
* their email provider. Errors are handled globally by `ErrorToaster`.
|
|
11
13
|
*
|
|
12
14
|
* @param className - Optional additional CSS class names applied to the card
|
|
13
15
|
* @returns The forgot-password form UI as a JSX element
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CardProps } from '@heroui/react';
|
|
2
|
+
/** `sessionStorage` key the magic-link form stores the submitted email under. */
|
|
3
|
+
export declare const MAGIC_LINK_SENT_STORAGE_KEY = "better-auth-ui.magic-link-sent";
|
|
4
|
+
export type MagicLinkSentProps = {
|
|
5
|
+
className?: string;
|
|
6
|
+
variant?: CardProps["variant"];
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Render a card confirming that a magic-link email was sent, with a button
|
|
10
|
+
* to open the user's email provider.
|
|
11
|
+
*
|
|
12
|
+
* The target email is read from `sessionStorage` (set when the magic-link
|
|
13
|
+
* form redirects here); the OpenEmail button is only shown when an email is
|
|
14
|
+
* stored and resolves to a known provider.
|
|
15
|
+
*
|
|
16
|
+
* @param className - Additional CSS classes applied to the outer card container
|
|
17
|
+
* @param variant - Variant to apply to the card
|
|
18
|
+
* @returns The magic-link-sent card React element
|
|
19
|
+
*/
|
|
20
|
+
export declare function MagicLinkSent({ className, variant }: MagicLinkSentProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CardProps } from '@heroui/react';
|
|
2
|
+
/** `sessionStorage` key the forgot-password form stores the submitted email under. */
|
|
3
|
+
export declare const RESET_LINK_SENT_STORAGE_KEY = "better-auth-ui.reset-link-sent";
|
|
4
|
+
export type ResetLinkSentProps = {
|
|
5
|
+
className?: string;
|
|
6
|
+
variant?: CardProps["variant"];
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Render a card confirming that a password-reset email was sent, with a
|
|
10
|
+
* button to open the user's email provider.
|
|
11
|
+
*
|
|
12
|
+
* The target email is read from `sessionStorage` (set when the forgot-password
|
|
13
|
+
* form redirects here); the OpenEmail button is only shown when an email is
|
|
14
|
+
* stored and resolves to a known provider.
|
|
15
|
+
*
|
|
16
|
+
* @param className - Additional CSS classes applied to the outer card container
|
|
17
|
+
* @param variant - Variant to apply to the card
|
|
18
|
+
* @returns The reset-link-sent card React element
|
|
19
|
+
*/
|
|
20
|
+
export declare function ResetLinkSent({ className, variant }: ResetLinkSentProps): import("react").JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './components/auth/forgot-password';
|
|
|
5
5
|
export * from './components/auth/open-email-button';
|
|
6
6
|
export * from './components/auth/provider-button';
|
|
7
7
|
export * from './components/auth/provider-buttons';
|
|
8
|
+
export * from './components/auth/reset-link-sent';
|
|
8
9
|
export * from './components/auth/reset-password';
|
|
9
10
|
export * from './components/auth/settings/account/account-settings';
|
|
10
11
|
export * from './components/auth/settings/account/change-email';
|