@better-auth-ui/heroui 1.6.28 → 1.6.29
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/last-login-method/last-used-badge.d.ts +13 -0
- package/dist/components/auth/provider-button.d.ts +3 -1
- package/dist/components/auth/provider-buttons.d.ts +3 -1
- package/dist/index.js +310 -291
- package/dist/lib/auth/last-login-method-plugin.d.ts +12 -0
- package/dist/plugins.d.ts +2 -0
- package/dist/plugins.js +1003 -981
- package/dist/user-view-D9ial2fQ.js +150 -0
- package/package.json +1 -1
- package/src/components/auth/last-login-method/last-used-badge.tsx +40 -0
- package/src/components/auth/magic-link/magic-link.tsx +2 -2
- package/src/components/auth/provider-button.tsx +17 -3
- package/src/components/auth/provider-buttons.tsx +5 -1
- package/src/components/auth/sign-in.tsx +10 -3
- package/src/components/auth/sign-up.tsx +2 -2
- package/src/components/auth/username/sign-in-username.tsx +6 -3
- package/src/lib/auth/last-login-method-plugin.ts +12 -0
- package/src/plugins.ts +2 -0
- package/dist/user-view-CxSDufx_.js +0 -126
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type LastUsedBadgeProps = {
|
|
2
|
+
/** Login method IDs that should display the indicator. */
|
|
3
|
+
method: string | string[];
|
|
4
|
+
/** Use the shorter label in constrained layouts. */
|
|
5
|
+
compact?: boolean;
|
|
6
|
+
/** Float the compact indicator over the top-right edge of its container. */
|
|
7
|
+
floating?: boolean;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Displays an indicator when one of the supplied method IDs matches Better
|
|
11
|
+
* Auth's stored last login method.
|
|
12
|
+
*/
|
|
13
|
+
export declare function LastUsedBadge({ method, compact, floating }: LastUsedBadgeProps): import("react").JSX.Element | null;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { AuthView } from '@better-auth-ui/core';
|
|
1
2
|
import { ButtonProps } from '@heroui/react';
|
|
2
3
|
import { SocialProvider } from 'better-auth/social-providers';
|
|
3
4
|
export type ProviderButtonProps = {
|
|
4
5
|
provider: SocialProvider;
|
|
5
6
|
display?: "full" | "name" | "icon";
|
|
7
|
+
view?: AuthView;
|
|
6
8
|
} & Omit<ButtonProps, "children" | "onPress" | "isPending" | "isDisabled">;
|
|
7
9
|
/**
|
|
8
10
|
* Social provider sign-in button.
|
|
@@ -10,4 +12,4 @@ export type ProviderButtonProps = {
|
|
|
10
12
|
* @param provider - Provider to sign in with.
|
|
11
13
|
* @param display - `"full"` (e.g. "Continue with Google"), `"name"` (just the provider name), or `"icon"` (icon only).
|
|
12
14
|
*/
|
|
13
|
-
export declare function ProviderButton({ provider, display, variant, ...props }: ProviderButtonProps): import("react").JSX.Element;
|
|
15
|
+
export declare function ProviderButton({ provider, display, view, variant, className, ...props }: ProviderButtonProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { AuthView } from '@better-auth-ui/core';
|
|
1
2
|
export type ProviderButtonsProps = {
|
|
2
3
|
socialLayout?: SocialLayout;
|
|
4
|
+
view?: AuthView;
|
|
3
5
|
};
|
|
4
6
|
export type SocialLayout = "auto" | "horizontal" | "vertical" | "grid";
|
|
5
7
|
/**
|
|
@@ -9,4 +11,4 @@ export type SocialLayout = "auto" | "horizontal" | "vertical" | "grid";
|
|
|
9
11
|
* @param socialLayout - Preferred layout for the buttons; `"auto"` picks `"horizontal"` when there are four or more providers, otherwise `"vertical"`.
|
|
10
12
|
* @returns The JSX element that renders the configured social provider buttons.
|
|
11
13
|
*/
|
|
12
|
-
export declare function ProviderButtons({ socialLayout }: ProviderButtonsProps): import("react").JSX.Element;
|
|
14
|
+
export declare function ProviderButtons({ socialLayout, view }: ProviderButtonsProps): import("react").JSX.Element;
|