@better-auth-ui/heroui 1.6.3 → 1.6.4
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/additional-field.d.ts +4 -0
- package/dist/components/auth/additional-field.js +270 -0
- package/dist/components/auth/auth-provider.d.ts +4 -6
- package/dist/components/auth/auth.d.ts +1 -1
- package/dist/components/auth/auth.js +54 -28
- package/dist/components/{settings/security → auth/delete-user}/danger-zone.d.ts +3 -4
- package/dist/components/{settings/security → auth/delete-user}/danger-zone.js +1 -1
- package/dist/components/auth/delete-user/delete-user.js +95 -0
- package/dist/components/{email → auth/email}/email-changed-email.d.ts +2 -2
- package/dist/components/{email → auth/email}/email-changed-email.js +7 -7
- package/dist/components/{email → auth/email}/email-verification-email.d.ts +2 -2
- package/dist/components/{email → auth/email}/email-verification-email.js +7 -7
- package/dist/components/auth/email/magic-link-email.d.ts +3 -0
- package/dist/components/{email → auth/email}/magic-link-email.js +7 -7
- package/dist/components/auth/email/new-device-email.d.ts +3 -0
- package/dist/components/{email → auth/email}/new-device-email.js +7 -7
- package/dist/components/auth/email/otp-email.d.ts +3 -0
- package/dist/components/{email → auth/email}/otp-email.js +6 -6
- package/dist/components/{email → auth/email}/password-changed-email.d.ts +2 -2
- package/dist/components/{email → auth/email}/password-changed-email.js +7 -7
- package/dist/components/{email → auth/email}/reset-password-email.d.ts +2 -2
- package/dist/components/{email → auth/email}/reset-password-email.js +7 -7
- package/dist/components/auth/forgot-password.d.ts +1 -1
- package/dist/components/auth/forgot-password.js +41 -38
- package/dist/components/auth/magic-link/magic-link-button.d.ts +11 -0
- package/dist/components/auth/magic-link/magic-link-button.js +20 -0
- package/dist/components/auth/magic-link/magic-link.d.ts +16 -0
- package/dist/components/auth/magic-link/magic-link.js +87 -0
- package/dist/components/{settings/account → auth/multi-session}/manage-account.d.ts +2 -6
- package/dist/components/auth/multi-session/manage-account.js +49 -0
- package/dist/components/auth/multi-session/manage-accounts.js +34 -0
- package/dist/components/{user/switch-account-menu.d.ts → auth/multi-session/switch-account-submenu-content.d.ts} +3 -3
- package/dist/components/auth/multi-session/switch-account-submenu-content.js +29 -0
- package/dist/components/{user/switch-account-item.d.ts → auth/multi-session/switch-account-submenu-item.d.ts} +2 -2
- package/dist/components/auth/multi-session/switch-account-submenu-item.js +20 -0
- package/dist/components/auth/multi-session/switch-account-submenu.d.ts +13 -0
- package/dist/components/auth/multi-session/switch-account-submenu.js +24 -0
- package/dist/components/auth/passkey/passkey-button.d.ts +6 -0
- package/dist/components/auth/passkey/passkey-button.js +24 -0
- package/dist/components/auth/passkey/passkey.js +45 -0
- package/dist/components/auth/passkey/passkeys.js +106 -0
- package/dist/components/auth/provider-button.d.ts +6 -8
- package/dist/components/auth/provider-button.js +16 -20
- package/dist/components/auth/provider-buttons.d.ts +3 -4
- package/dist/components/auth/provider-buttons.js +9 -10
- package/dist/components/auth/reset-password.js +110 -107
- package/dist/components/{settings → auth/settings}/account/account-settings.d.ts +5 -2
- package/dist/components/auth/settings/account/account-settings.js +20 -0
- package/dist/components/auth/settings/account/change-avatar.js +89 -0
- package/dist/components/{settings → auth/settings}/account/change-email.js +17 -17
- package/dist/components/{settings → auth/settings}/account/user-profile.d.ts +2 -3
- package/dist/components/auth/settings/account/user-profile.js +86 -0
- package/dist/components/auth/settings/security/active-session.js +59 -0
- package/dist/components/{settings → auth/settings}/security/active-sessions.js +4 -4
- package/dist/components/auth/settings/security/change-password.js +189 -0
- package/dist/components/auth/settings/security/linked-account.js +56 -0
- package/dist/components/{settings → auth/settings}/security/linked-accounts.js +5 -5
- package/dist/components/{settings → auth/settings}/security/security-settings.d.ts +1 -1
- package/dist/components/auth/settings/security/security-settings.js +22 -0
- package/dist/components/auth/settings/settings.js +45 -0
- package/dist/components/auth/sign-in.js +75 -99
- package/dist/components/auth/sign-out.js +11 -11
- package/dist/components/auth/sign-up.js +123 -148
- package/dist/components/{settings/account → auth/theme}/appearance.d.ts +3 -6
- package/dist/components/auth/theme/appearance.js +72 -0
- package/dist/components/auth/theme/theme-toggle-item.d.ts +5 -0
- package/dist/components/auth/theme/theme-toggle-item.js +58 -0
- package/dist/components/auth/user/user-avatar.js +29 -0
- package/dist/components/{user → auth/user}/user-button.d.ts +2 -6
- package/dist/components/auth/user/user-button.js +55 -0
- package/dist/components/auth/user/user-view.js +37 -0
- package/dist/components/auth/username/sign-in-username.d.ts +14 -0
- package/dist/components/auth/username/sign-in-username.js +142 -0
- package/dist/components/auth/username/username-field.d.ts +8 -0
- package/dist/components/auth/username/username-field.js +51 -0
- package/dist/email.d.ts +7 -0
- package/dist/email.js +9 -0
- package/dist/index.d.ts +12 -27
- package/dist/index.js +20 -35
- package/dist/lib/auth/auth-plugin.d.ts +44 -0
- package/dist/lib/auth/delete-user-plugin.d.ts +17 -0
- package/dist/lib/auth/delete-user-plugin.js +10 -0
- package/dist/lib/auth/magic-link-plugin.d.ts +31 -0
- package/dist/lib/auth/magic-link-plugin.js +13 -0
- package/dist/lib/auth/multi-session-plugin.d.ts +18 -0
- package/dist/lib/auth/multi-session-plugin.js +12 -0
- package/dist/lib/auth/passkey-plugin.d.ts +20 -0
- package/dist/lib/auth/passkey-plugin.js +12 -0
- package/dist/lib/auth/theme-plugin.d.ts +68 -0
- package/dist/lib/auth/theme-plugin.js +23 -0
- package/dist/lib/auth/username-plugin.d.ts +63 -0
- package/dist/lib/auth/username-plugin.js +18 -0
- package/dist/plugins.d.ts +20 -0
- package/dist/plugins.js +21 -0
- package/package.json +19 -21
- package/src/components/auth/additional-field.tsx +554 -0
- package/src/components/auth/auth-provider.tsx +5 -6
- package/src/components/auth/auth.tsx +99 -35
- package/src/components/{settings/security → auth/delete-user}/danger-zone.tsx +3 -10
- package/src/components/{settings/security → auth/delete-user}/delete-user.tsx +30 -20
- package/src/components/{email → auth/email}/email-changed-email.tsx +2 -2
- package/src/components/{email → auth/email}/email-verification-email.tsx +2 -2
- package/src/components/{email → auth/email}/magic-link-email.tsx +2 -2
- package/src/components/{email → auth/email}/new-device-email.tsx +2 -2
- package/src/components/{email → auth/email}/otp-email.tsx +2 -2
- package/src/components/{email → auth/email}/password-changed-email.tsx +2 -2
- package/src/components/{email → auth/email}/reset-password-email.tsx +2 -2
- package/src/components/auth/forgot-password.tsx +14 -11
- package/src/components/auth/magic-link/magic-link-button.tsx +61 -0
- package/src/components/auth/{magic-link.tsx → magic-link/magic-link.tsx} +55 -40
- package/src/components/{settings/account → auth/multi-session}/manage-account.tsx +16 -13
- package/src/components/{settings/account → auth/multi-session}/manage-accounts.tsx +14 -5
- package/src/components/{user/switch-account-menu.tsx → auth/multi-session/switch-account-submenu-content.tsx} +18 -11
- package/src/components/{user/switch-account-item.tsx → auth/multi-session/switch-account-submenu-item.tsx} +17 -5
- package/src/components/auth/multi-session/switch-account-submenu.tsx +50 -0
- package/src/components/auth/passkey/passkey-button.tsx +56 -0
- package/src/components/{settings/security → auth/passkey}/passkey.tsx +20 -6
- package/src/components/auth/passkey/passkeys.tsx +196 -0
- package/src/components/auth/provider-button.tsx +27 -29
- package/src/components/auth/provider-buttons.tsx +6 -11
- package/src/components/auth/reset-password.tsx +13 -7
- package/src/components/{settings → auth/settings}/account/account-settings.tsx +15 -13
- package/src/components/{settings → auth/settings}/account/change-avatar.tsx +4 -3
- package/src/components/{settings → auth/settings}/account/change-email.tsx +3 -3
- package/src/components/auth/settings/account/user-profile.tsx +171 -0
- package/src/components/{settings → auth/settings}/security/active-session.tsx +8 -5
- package/src/components/{settings → auth/settings}/security/active-sessions.tsx +3 -3
- package/src/components/{settings → auth/settings}/security/change-password.tsx +14 -9
- package/src/components/{settings → auth/settings}/security/linked-account.tsx +12 -8
- package/src/components/{settings → auth/settings}/security/linked-accounts.tsx +2 -2
- package/src/components/{settings → auth/settings}/security/security-settings.tsx +7 -6
- package/src/components/{settings → auth/settings}/settings.tsx +2 -2
- package/src/components/auth/sign-in.tsx +38 -61
- package/src/components/auth/sign-out.tsx +2 -2
- package/src/components/auth/sign-up.tsx +109 -131
- package/src/components/{settings/account → auth/theme}/appearance.tsx +17 -24
- package/src/components/auth/theme/theme-toggle-item.tsx +110 -0
- package/src/components/{user → auth/user}/user-avatar.tsx +12 -4
- package/src/components/{user → auth/user}/user-button.tsx +15 -88
- package/src/components/{user → auth/user}/user-view.tsx +12 -4
- package/src/components/auth/username/sign-in-username.tsx +283 -0
- package/src/components/auth/username/username-field.tsx +122 -0
- package/src/email.ts +9 -0
- package/src/index.tsx +12 -27
- package/src/lib/auth/auth-plugin.ts +67 -0
- package/src/lib/auth/delete-user-plugin.ts +15 -0
- package/src/lib/auth/magic-link-plugin.ts +26 -0
- package/src/lib/auth/multi-session-plugin.ts +17 -0
- package/src/lib/auth/passkey-plugin.ts +17 -0
- package/src/lib/auth/theme-plugin.ts +86 -0
- package/src/lib/auth/username-plugin.tsx +30 -0
- package/src/plugins.ts +23 -0
- package/dist/components/auth/magic-link-button.d.ts +0 -13
- package/dist/components/auth/magic-link-button.js +0 -16
- package/dist/components/auth/magic-link.d.ts +0 -17
- package/dist/components/auth/magic-link.js +0 -99
- package/dist/components/auth/passkey-button.d.ts +0 -4
- package/dist/components/auth/passkey-button.js +0 -21
- package/dist/components/email/magic-link-email.d.ts +0 -3
- package/dist/components/email/new-device-email.d.ts +0 -3
- package/dist/components/email/otp-email.d.ts +0 -3
- package/dist/components/settings/account/account-settings.js +0 -23
- package/dist/components/settings/account/appearance.js +0 -71
- package/dist/components/settings/account/change-avatar.js +0 -89
- package/dist/components/settings/account/manage-account.js +0 -48
- package/dist/components/settings/account/manage-accounts.js +0 -33
- package/dist/components/settings/account/user-profile.js +0 -103
- package/dist/components/settings/security/active-session.js +0 -59
- package/dist/components/settings/security/change-password.js +0 -189
- package/dist/components/settings/security/delete-user.js +0 -92
- package/dist/components/settings/security/linked-account.js +0 -56
- package/dist/components/settings/security/passkey.js +0 -43
- package/dist/components/settings/security/passkeys.js +0 -53
- package/dist/components/settings/security/security-settings.js +0 -25
- package/dist/components/settings/settings.js +0 -45
- package/dist/components/user/switch-account-item.js +0 -20
- package/dist/components/user/switch-account-menu.js +0 -28
- package/dist/components/user/user-avatar.js +0 -29
- package/dist/components/user/user-button.js +0 -91
- package/dist/components/user/user-view.js +0 -37
- package/dist/core.d.ts +0 -1
- package/dist/core.js +0 -1
- package/dist/react-exports.d.ts +0 -1
- package/dist/react-exports.js +0 -1
- package/src/components/auth/magic-link-button.tsx +0 -43
- package/src/components/auth/passkey-button.tsx +0 -35
- package/src/components/settings/account/user-profile.tsx +0 -217
- package/src/components/settings/security/passkeys.tsx +0 -96
- package/src/core.ts +0 -1
- package/src/react-exports.ts +0 -1
- /package/dist/components/{settings/security → auth/delete-user}/delete-user.d.ts +0 -0
- /package/dist/components/{settings/account → auth/multi-session}/manage-accounts.d.ts +0 -0
- /package/dist/components/{settings/security → auth/passkey}/passkey.d.ts +0 -0
- /package/dist/components/{settings/security → auth/passkey}/passkeys.d.ts +0 -0
- /package/dist/components/{settings → auth/settings}/account/change-avatar.d.ts +0 -0
- /package/dist/components/{settings → auth/settings}/account/change-email.d.ts +0 -0
- /package/dist/components/{settings → auth/settings}/security/active-session.d.ts +0 -0
- /package/dist/components/{settings → auth/settings}/security/active-sessions.d.ts +0 -0
- /package/dist/components/{settings → auth/settings}/security/change-password.d.ts +0 -0
- /package/dist/components/{settings → auth/settings}/security/linked-account.d.ts +0 -0
- /package/dist/components/{settings → auth/settings}/security/linked-accounts.d.ts +0 -0
- /package/dist/components/{settings → auth/settings}/settings.d.ts +0 -0
- /package/dist/components/{user → auth/user}/user-avatar.d.ts +0 -0
- /package/dist/components/{user → auth/user}/user-view.d.ts +0 -0
|
@@ -1,146 +1,122 @@
|
|
|
1
1
|
import { FieldSeparator as e } from "./field-separator.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { Fragment as
|
|
8
|
-
import {
|
|
2
|
+
import { ProviderButtons as t } from "./provider-buttons.js";
|
|
3
|
+
import { authMutationKeys as n } from "@better-auth-ui/core";
|
|
4
|
+
import { useAuth as r, useSendVerificationEmail as i, useSignInEmail as a } from "@better-auth-ui/react";
|
|
5
|
+
import { Button as o, Card as s, Checkbox as c, Description as l, FieldError as u, Form as d, Input as f, Label as p, Link as m, Spinner as h, TextField as g, cn as _, toast as v } from "@heroui/react";
|
|
6
|
+
import { useState as y } from "react";
|
|
7
|
+
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
8
|
+
import { useIsMutating as C } from "@tanstack/react-query";
|
|
9
9
|
//#region src/components/auth/sign-in.tsx
|
|
10
|
-
function T
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
function E({ className: E, socialLayout: D, socialPosition: O = "bottom", variant: k, ...A }) {
|
|
14
|
-
let { basePaths: j, baseURL: M, emailAndPassword: N, localization: P, magicLink: F, passkey: I, redirectTo: L, socialProviders: R, username: z, viewPaths: B, navigate: V } = i(), [H, U] = w(""), { mutate: W } = a({ onSuccess: () => b.success(P.auth.verificationEmailSent) }), { mutate: G, isPending: K } = o({
|
|
10
|
+
function w({ className: w, socialLayout: T, socialPosition: E = "bottom", variant: D, ...O }) {
|
|
11
|
+
let { authClient: k, basePaths: A, baseURL: j, emailAndPassword: M, localization: N, plugins: P, redirectTo: F, socialProviders: I, viewPaths: L, navigate: R } = r(), [z, B] = y(""), { mutate: V } = i(k, { onSuccess: () => v.success(N.auth.verificationEmailSent) }), { mutate: H, isPending: U } = a(k, {
|
|
15
12
|
onError: (e, { email: t }) => {
|
|
16
|
-
|
|
17
|
-
children:
|
|
18
|
-
onClick: () =>
|
|
13
|
+
B(""), e.error?.code === "EMAIL_NOT_VERIFIED" ? v.danger(e.error?.message || e.message, { actionProps: {
|
|
14
|
+
children: N.auth.resend,
|
|
15
|
+
onClick: () => V({
|
|
19
16
|
email: t,
|
|
20
|
-
callbackURL: `${
|
|
17
|
+
callbackURL: `${j}${F}`
|
|
21
18
|
})
|
|
22
|
-
} }) :
|
|
23
|
-
},
|
|
24
|
-
onSuccess: () => V({ to: L })
|
|
25
|
-
}), { mutate: q, isPending: J } = s({
|
|
26
|
-
onError: (e) => {
|
|
27
|
-
U(""), b.danger(e.error?.message || e.message);
|
|
19
|
+
} }) : v.danger(e.error?.message || e.message);
|
|
28
20
|
},
|
|
29
|
-
onSuccess: () =>
|
|
30
|
-
}),
|
|
21
|
+
onSuccess: () => R({ to: F })
|
|
22
|
+
}), W = (e) => {
|
|
31
23
|
e.preventDefault();
|
|
32
24
|
let t = new FormData(e.currentTarget), n = t.get("email"), r = t.get("rememberMe") === "on";
|
|
33
|
-
|
|
34
|
-
username: n,
|
|
35
|
-
password: H
|
|
36
|
-
}) : G({
|
|
25
|
+
H({
|
|
37
26
|
email: n,
|
|
38
|
-
password:
|
|
39
|
-
...
|
|
27
|
+
password: z,
|
|
28
|
+
...M?.rememberMe ? { rememberMe: r } : {}
|
|
40
29
|
});
|
|
41
|
-
},
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
-
className:
|
|
44
|
-
variant:
|
|
45
|
-
...
|
|
30
|
+
}, G = C({ mutationKey: n.signIn.all }) + C({ mutationKey: n.signUp.all }) > 0, K = M?.enabled && !!I?.length;
|
|
31
|
+
return /* @__PURE__ */ S(s, {
|
|
32
|
+
className: _("w-full max-w-sm gap-4 md:p-6", w),
|
|
33
|
+
variant: D,
|
|
34
|
+
...O,
|
|
46
35
|
children: [
|
|
47
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ x(s.Header, { children: /* @__PURE__ */ x(s.Title, {
|
|
48
37
|
className: "text-xl font-semibold mb-1",
|
|
49
|
-
children:
|
|
38
|
+
children: N.auth.signIn
|
|
50
39
|
}) }),
|
|
51
|
-
/* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ S(s.Content, {
|
|
52
41
|
className: "gap-4",
|
|
53
42
|
children: [
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}), Z && /* @__PURE__ */ S(e, { children: P.auth.or })] }),
|
|
58
|
-
N?.enabled && /* @__PURE__ */ C(p, {
|
|
59
|
-
onSubmit: Y,
|
|
43
|
+
E === "top" && /* @__PURE__ */ S(b, { children: [!!I?.length && /* @__PURE__ */ x(t, { socialLayout: T }), K && /* @__PURE__ */ x(e, { children: N.auth.or })] }),
|
|
44
|
+
M?.enabled && /* @__PURE__ */ S(d, {
|
|
45
|
+
onSubmit: W,
|
|
60
46
|
className: "flex flex-col gap-4",
|
|
61
47
|
children: [
|
|
62
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ S(g, {
|
|
63
49
|
name: "email",
|
|
64
|
-
type:
|
|
65
|
-
autoComplete:
|
|
66
|
-
isDisabled:
|
|
50
|
+
type: "email",
|
|
51
|
+
autoComplete: "email",
|
|
52
|
+
isDisabled: G,
|
|
67
53
|
children: [
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
placeholder:
|
|
71
|
-
variant:
|
|
54
|
+
/* @__PURE__ */ x(p, { children: N.auth.email }),
|
|
55
|
+
/* @__PURE__ */ x(f, {
|
|
56
|
+
placeholder: N.auth.emailPlaceholder,
|
|
57
|
+
variant: D === "transparent" ? "primary" : "secondary",
|
|
72
58
|
required: !0
|
|
73
59
|
}),
|
|
74
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ x(u, {})
|
|
75
61
|
]
|
|
76
62
|
}),
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
minLength:
|
|
79
|
-
maxLength:
|
|
63
|
+
/* @__PURE__ */ S(g, {
|
|
64
|
+
minLength: M?.minPasswordLength,
|
|
65
|
+
maxLength: M?.maxPasswordLength,
|
|
80
66
|
name: "password",
|
|
81
67
|
type: "password",
|
|
82
68
|
autoComplete: "current-password",
|
|
83
|
-
isDisabled:
|
|
84
|
-
value:
|
|
85
|
-
onChange:
|
|
69
|
+
isDisabled: G,
|
|
70
|
+
value: z,
|
|
71
|
+
onChange: B,
|
|
86
72
|
children: [
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
placeholder:
|
|
90
|
-
variant:
|
|
73
|
+
/* @__PURE__ */ x(p, { children: N.auth.password }),
|
|
74
|
+
/* @__PURE__ */ x(f, {
|
|
75
|
+
placeholder: N.auth.passwordPlaceholder,
|
|
76
|
+
variant: D === "transparent" ? "primary" : "secondary",
|
|
91
77
|
required: !0
|
|
92
78
|
}),
|
|
93
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ x(u, {})
|
|
94
80
|
]
|
|
95
81
|
}),
|
|
96
|
-
|
|
82
|
+
M?.rememberMe && /* @__PURE__ */ S(c, {
|
|
97
83
|
name: "rememberMe",
|
|
98
|
-
isDisabled:
|
|
99
|
-
variant:
|
|
100
|
-
children: [/* @__PURE__ */
|
|
84
|
+
isDisabled: G,
|
|
85
|
+
variant: D === "transparent" ? "primary" : "secondary",
|
|
86
|
+
children: [/* @__PURE__ */ x(c.Control, { children: /* @__PURE__ */ x(c.Indicator, {}) }), /* @__PURE__ */ x(c.Content, { children: /* @__PURE__ */ x(p, { children: N.auth.rememberMe }) })]
|
|
101
87
|
}),
|
|
102
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ S("div", {
|
|
103
89
|
className: "flex flex-col gap-3",
|
|
104
|
-
children: [
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}),
|
|
114
|
-
F && /* @__PURE__ */ S(t, {
|
|
115
|
-
view: "signIn",
|
|
116
|
-
isPending: X
|
|
117
|
-
}),
|
|
118
|
-
I && /* @__PURE__ */ S(n, { isPending: X })
|
|
119
|
-
]
|
|
90
|
+
children: [/* @__PURE__ */ S(o, {
|
|
91
|
+
type: "submit",
|
|
92
|
+
className: "w-full",
|
|
93
|
+
isPending: G,
|
|
94
|
+
children: [U && /* @__PURE__ */ x(h, {
|
|
95
|
+
color: "current",
|
|
96
|
+
size: "sm"
|
|
97
|
+
}), N.auth.signIn]
|
|
98
|
+
}), P.flatMap((e) => e.authButtons?.map((t, n) => /* @__PURE__ */ x(t, { view: "signIn" }, `${e.id}-${n.toString()}`)))]
|
|
120
99
|
})
|
|
121
100
|
]
|
|
122
101
|
}),
|
|
123
|
-
|
|
124
|
-
socialLayout: D,
|
|
125
|
-
isPending: X
|
|
126
|
-
})] })
|
|
102
|
+
E === "bottom" && /* @__PURE__ */ S(b, { children: [K && /* @__PURE__ */ x(e, { children: N.auth.or }), !!I?.length && /* @__PURE__ */ x(t, { socialLayout: T })] })
|
|
127
103
|
]
|
|
128
104
|
}),
|
|
129
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ S(s.Footer, {
|
|
130
106
|
className: "flex-col gap-3",
|
|
131
|
-
children: [
|
|
132
|
-
href: `${
|
|
107
|
+
children: [M?.forgotPassword && /* @__PURE__ */ x(m, {
|
|
108
|
+
href: `${A.auth}/${L.auth.forgotPassword}`,
|
|
133
109
|
className: "no-underline hover:underline",
|
|
134
|
-
children:
|
|
135
|
-
}),
|
|
110
|
+
children: N.auth.forgotPasswordLink
|
|
111
|
+
}), M?.enabled && /* @__PURE__ */ S(l, {
|
|
136
112
|
className: "text-sm",
|
|
137
113
|
children: [
|
|
138
|
-
|
|
114
|
+
N.auth.needToCreateAnAccount,
|
|
139
115
|
" ",
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
-
href: `${
|
|
116
|
+
/* @__PURE__ */ x(m, {
|
|
117
|
+
href: `${A.auth}/${L.auth.signUp}`,
|
|
142
118
|
className: "text-accent no-underline hover:underline decoration-accent-hover",
|
|
143
|
-
children:
|
|
119
|
+
children: N.auth.signUp
|
|
144
120
|
})
|
|
145
121
|
]
|
|
146
122
|
})]
|
|
@@ -149,4 +125,4 @@ function E({ className: E, socialLayout: D, socialPosition: O = "bottom", varian
|
|
|
149
125
|
});
|
|
150
126
|
}
|
|
151
127
|
//#endregion
|
|
152
|
-
export {
|
|
128
|
+
export { w as SignIn };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { useAuth as e, useSignOut as t } from "@better-auth-ui/react";
|
|
2
2
|
import { Spinner as n, cn as r, toast as i } from "@heroui/react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useEffect as a, useRef as o } from "react";
|
|
4
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/auth/sign-out.tsx
|
|
6
6
|
function c({ className: c }) {
|
|
7
|
-
let {
|
|
7
|
+
let { authClient: l, basePaths: u, navigate: d, viewPaths: f } = e(), { mutate: p } = t(l, {
|
|
8
8
|
onError: (e) => {
|
|
9
|
-
i.danger(e.error?.message || e.message),
|
|
10
|
-
to: `${
|
|
9
|
+
i.danger(e.error?.message || e.message), d({
|
|
10
|
+
to: `${u.auth}/${f.auth.signIn}`,
|
|
11
11
|
replace: !0
|
|
12
12
|
});
|
|
13
13
|
},
|
|
14
|
-
onSuccess: () =>
|
|
15
|
-
to: `${
|
|
14
|
+
onSuccess: () => d({
|
|
15
|
+
to: `${u.auth}/${f.auth.signIn}`,
|
|
16
16
|
replace: !0
|
|
17
17
|
})
|
|
18
|
-
}),
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
}, [
|
|
18
|
+
}), m = o(!1);
|
|
19
|
+
return a(() => {
|
|
20
|
+
m.current || (m.current = !0, p());
|
|
21
|
+
}, [p]), /* @__PURE__ */ s(n, {
|
|
22
22
|
className: r("mx-auto my-auto", c),
|
|
23
23
|
color: "current"
|
|
24
24
|
});
|
|
@@ -1,226 +1,201 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { AdditionalField as e } from "./additional-field.js";
|
|
2
|
+
import { FieldSeparator as t } from "./field-separator.js";
|
|
3
3
|
import { ProviderButtons as n } from "./provider-buttons.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { authMutationKeys as r, parseAdditionalFieldValue as i } from "@better-auth-ui/core";
|
|
5
|
+
import { useAuth as a, useSignUpEmail as o } from "@better-auth-ui/react";
|
|
6
|
+
import { Eye as s, EyeSlash as c } from "@gravity-ui/icons";
|
|
7
|
+
import { Button as l, Card as u, Description as d, FieldError as f, Form as p, Input as m, InputGroup as h, Label as g, Link as _, Spinner as v, TextField as y, cn as b, toast as x } from "@heroui/react";
|
|
8
|
+
import { useState as S } from "react";
|
|
9
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
10
|
+
import { useIsMutating as E } from "@tanstack/react-query";
|
|
10
11
|
//#region src/components/auth/sign-up.tsx
|
|
11
|
-
function
|
|
12
|
-
let { basePaths:
|
|
13
|
-
if (!e.trim()) {
|
|
14
|
-
q();
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
W({ username: e.trim() });
|
|
18
|
-
}, { wait: 500 });
|
|
19
|
-
function Y(e) {
|
|
20
|
-
U(e), q(), F?.isUsernameAvailable && J.maybeExecute(e);
|
|
21
|
-
}
|
|
22
|
-
let { mutate: ie, isPending: ae } = ee({
|
|
12
|
+
function D({ className: D, socialLayout: O, socialPosition: k = "bottom", variant: A, ...j }) {
|
|
13
|
+
let { additionalFields: M, authClient: ee, basePaths: N, emailAndPassword: P, localization: F, plugins: I, redirectTo: L, socialProviders: R, viewPaths: z, navigate: B } = a(), [V, H] = S(""), [U, W] = S(""), { mutate: G, isPending: K } = o(ee, {
|
|
23
14
|
onError: (e) => {
|
|
24
|
-
|
|
15
|
+
H(""), W(""), x.danger(e.error?.message || e.message);
|
|
25
16
|
},
|
|
26
17
|
onSuccess: () => {
|
|
27
|
-
|
|
18
|
+
P?.requireEmailVerification ? (x.success(F.auth.verifyYourEmail), B({ to: `${N.auth}/${z.auth.signIn}` })) : B({ to: L });
|
|
28
19
|
}
|
|
29
|
-
}), [
|
|
20
|
+
}), [q, J] = S(!1), [Y, X] = S(!1), Z = E({ mutationKey: r.signIn.all }) + E({ mutationKey: r.signUp.all }) > 0, Q = async (e) => {
|
|
30
21
|
e.preventDefault();
|
|
31
|
-
let t = new FormData(e.currentTarget), n = t.get("name"), r = t.get("email");
|
|
32
|
-
if (
|
|
33
|
-
|
|
22
|
+
let t = new FormData(e.currentTarget), n = t.get("name") ?? "", r = t.get("email");
|
|
23
|
+
if (P?.confirmPassword && V !== U) {
|
|
24
|
+
x.danger(F.auth.passwordsDoNotMatch), H(""), W("");
|
|
34
25
|
return;
|
|
35
26
|
}
|
|
36
|
-
|
|
27
|
+
let a = {};
|
|
28
|
+
for (let e of M ?? []) {
|
|
29
|
+
if (!e.signUp || e.readOnly) continue;
|
|
30
|
+
let n = i(e, t.get(e.name));
|
|
31
|
+
if (e.validate) try {
|
|
32
|
+
await e.validate(n);
|
|
33
|
+
} catch (e) {
|
|
34
|
+
x.danger(e instanceof Error ? e.message : String(e));
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
n !== void 0 && (a[e.name] = n);
|
|
38
|
+
}
|
|
39
|
+
G({
|
|
37
40
|
name: n,
|
|
38
41
|
email: r,
|
|
39
|
-
password:
|
|
40
|
-
...
|
|
41
|
-
username: H.trim(),
|
|
42
|
-
...F.displayUsername ? { displayUsername: H.trim() } : {}
|
|
43
|
-
} : {}
|
|
42
|
+
password: V,
|
|
43
|
+
...a
|
|
44
44
|
});
|
|
45
|
-
}, $ =
|
|
46
|
-
return /* @__PURE__ */
|
|
47
|
-
className:
|
|
48
|
-
variant:
|
|
49
|
-
...
|
|
45
|
+
}, $ = P?.enabled && !!R?.length;
|
|
46
|
+
return /* @__PURE__ */ T(u, {
|
|
47
|
+
className: b("w-full max-w-sm gap-4 md:p-6", D),
|
|
48
|
+
variant: A,
|
|
49
|
+
...j,
|
|
50
50
|
children: [
|
|
51
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ w(u.Header, { children: /* @__PURE__ */ w(u.Title, {
|
|
52
52
|
className: "text-xl font-semibold mb-1",
|
|
53
|
-
children:
|
|
53
|
+
children: F.auth.signUp
|
|
54
54
|
}) }),
|
|
55
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ T(u.Content, {
|
|
56
56
|
className: "gap-4",
|
|
57
57
|
children: [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}), $ && /* @__PURE__ */ g(e, { children: j.auth.or })] }),
|
|
62
|
-
A?.enabled && /* @__PURE__ */ _(ne, {
|
|
63
|
-
onSubmit: ce,
|
|
58
|
+
k === "top" && /* @__PURE__ */ T(C, { children: [!!R?.length && /* @__PURE__ */ w(n, { socialLayout: O }), $ && /* @__PURE__ */ w(t, { children: F.auth.or })] }),
|
|
59
|
+
P?.enabled && /* @__PURE__ */ T(p, {
|
|
60
|
+
onSubmit: Q,
|
|
64
61
|
className: "flex flex-col gap-4",
|
|
65
62
|
children: [
|
|
66
|
-
/* @__PURE__ */
|
|
63
|
+
P.name !== !1 && /* @__PURE__ */ T(y, {
|
|
67
64
|
name: "name",
|
|
68
65
|
type: "text",
|
|
69
66
|
autoComplete: "name",
|
|
70
|
-
isDisabled:
|
|
67
|
+
isDisabled: Z,
|
|
71
68
|
children: [
|
|
72
|
-
/* @__PURE__ */ g
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
placeholder:
|
|
69
|
+
/* @__PURE__ */ w(g, { children: F.auth.name }),
|
|
70
|
+
/* @__PURE__ */ w(m, {
|
|
71
|
+
placeholder: F.auth.namePlaceholder,
|
|
75
72
|
required: !0,
|
|
76
|
-
variant:
|
|
77
|
-
}),
|
|
78
|
-
/* @__PURE__ */ g(s, {})
|
|
79
|
-
]
|
|
80
|
-
}),
|
|
81
|
-
F?.enabled && /* @__PURE__ */ _(f, {
|
|
82
|
-
name: "username",
|
|
83
|
-
type: "text",
|
|
84
|
-
autoComplete: "username",
|
|
85
|
-
minLength: F.minUsernameLength,
|
|
86
|
-
maxLength: F.maxUsernameLength,
|
|
87
|
-
isDisabled: Q,
|
|
88
|
-
value: H,
|
|
89
|
-
onChange: Y,
|
|
90
|
-
isInvalid: !!K || G && !G.available,
|
|
91
|
-
children: [
|
|
92
|
-
/* @__PURE__ */ g(u, { children: j.auth.username }),
|
|
93
|
-
/* @__PURE__ */ _(l, {
|
|
94
|
-
variant: D === "transparent" ? "primary" : "secondary",
|
|
95
|
-
children: [/* @__PURE__ */ g(l.Input, {
|
|
96
|
-
placeholder: j.auth.usernamePlaceholder,
|
|
97
|
-
required: !0
|
|
98
|
-
}), F.isUsernameAvailable && H.trim() && /* @__PURE__ */ g(l.Suffix, {
|
|
99
|
-
className: "px-2",
|
|
100
|
-
children: G?.available ? /* @__PURE__ */ g(y, { className: "text-success" }) : K || G?.available === !1 ? /* @__PURE__ */ g(S, { className: "text-danger" }) : /* @__PURE__ */ g(d, {
|
|
101
|
-
size: "sm",
|
|
102
|
-
color: "current"
|
|
103
|
-
})
|
|
104
|
-
})]
|
|
73
|
+
variant: A === "transparent" ? "primary" : "secondary"
|
|
105
74
|
}),
|
|
106
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ w(f, {})
|
|
107
76
|
]
|
|
108
77
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ T(y, {
|
|
110
79
|
name: "email",
|
|
111
80
|
type: "email",
|
|
112
81
|
autoComplete: "email",
|
|
113
|
-
isDisabled:
|
|
82
|
+
isDisabled: Z,
|
|
114
83
|
children: [
|
|
115
|
-
/* @__PURE__ */ g
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
-
placeholder:
|
|
84
|
+
/* @__PURE__ */ w(g, { children: F.auth.email }),
|
|
85
|
+
/* @__PURE__ */ w(m, {
|
|
86
|
+
placeholder: F.auth.emailPlaceholder,
|
|
118
87
|
required: !0,
|
|
119
|
-
variant:
|
|
88
|
+
variant: A === "transparent" ? "primary" : "secondary"
|
|
120
89
|
}),
|
|
121
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ w(f, {})
|
|
122
91
|
]
|
|
123
92
|
}),
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
|
|
126
|
-
|
|
93
|
+
M?.map((t) => t.signUp === "above" && /* @__PURE__ */ w(e, {
|
|
94
|
+
name: t.name,
|
|
95
|
+
field: t,
|
|
96
|
+
isPending: Z,
|
|
97
|
+
variant: A
|
|
98
|
+
}, t.name)),
|
|
99
|
+
/* @__PURE__ */ T(y, {
|
|
100
|
+
minLength: P?.minPasswordLength,
|
|
101
|
+
maxLength: P?.maxPasswordLength,
|
|
127
102
|
name: "password",
|
|
128
103
|
autoComplete: "new-password",
|
|
129
|
-
isDisabled:
|
|
130
|
-
value:
|
|
131
|
-
onChange:
|
|
104
|
+
isDisabled: Z,
|
|
105
|
+
value: V,
|
|
106
|
+
onChange: H,
|
|
132
107
|
children: [
|
|
133
|
-
/* @__PURE__ */ g
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
variant:
|
|
136
|
-
children: [/* @__PURE__ */
|
|
137
|
-
placeholder:
|
|
138
|
-
type:
|
|
108
|
+
/* @__PURE__ */ w(g, { children: F.auth.password }),
|
|
109
|
+
/* @__PURE__ */ T(h, {
|
|
110
|
+
variant: A === "transparent" ? "primary" : "secondary",
|
|
111
|
+
children: [/* @__PURE__ */ w(h.Input, {
|
|
112
|
+
placeholder: F.auth.passwordPlaceholder,
|
|
113
|
+
type: q ? "text" : "password",
|
|
139
114
|
name: "password",
|
|
140
115
|
required: !0
|
|
141
|
-
}), /* @__PURE__ */
|
|
116
|
+
}), /* @__PURE__ */ w(h.Suffix, {
|
|
142
117
|
className: "px-0",
|
|
143
|
-
children: /* @__PURE__ */
|
|
118
|
+
children: /* @__PURE__ */ w(l, {
|
|
144
119
|
isIconOnly: !0,
|
|
145
|
-
"aria-label":
|
|
120
|
+
"aria-label": q ? F.auth.hidePassword : F.auth.showPassword,
|
|
146
121
|
size: "sm",
|
|
147
122
|
variant: "ghost",
|
|
148
|
-
onPress: () =>
|
|
149
|
-
isDisabled:
|
|
150
|
-
children:
|
|
123
|
+
onPress: () => J(!q),
|
|
124
|
+
isDisabled: Z,
|
|
125
|
+
children: w(q ? c : s, {})
|
|
151
126
|
})
|
|
152
127
|
})]
|
|
153
128
|
}),
|
|
154
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ w(f, {})
|
|
155
130
|
]
|
|
156
131
|
}),
|
|
157
|
-
|
|
158
|
-
minLength:
|
|
159
|
-
maxLength:
|
|
132
|
+
P?.confirmPassword && /* @__PURE__ */ T(y, {
|
|
133
|
+
minLength: P?.minPasswordLength,
|
|
134
|
+
maxLength: P?.maxPasswordLength,
|
|
160
135
|
name: "confirmPassword",
|
|
161
136
|
autoComplete: "new-password",
|
|
162
|
-
isDisabled:
|
|
163
|
-
value:
|
|
164
|
-
onChange:
|
|
137
|
+
isDisabled: Z,
|
|
138
|
+
value: U,
|
|
139
|
+
onChange: W,
|
|
165
140
|
children: [
|
|
166
|
-
/* @__PURE__ */ g
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
variant:
|
|
169
|
-
children: [/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ w(g, { children: F.auth.confirmPassword }),
|
|
142
|
+
/* @__PURE__ */ T(h, {
|
|
143
|
+
variant: A === "transparent" ? "primary" : "secondary",
|
|
144
|
+
children: [/* @__PURE__ */ w(h.Input, {
|
|
170
145
|
name: "confirmPassword",
|
|
171
|
-
placeholder:
|
|
172
|
-
type:
|
|
146
|
+
placeholder: F.auth.confirmPasswordPlaceholder,
|
|
147
|
+
type: Y ? "text" : "password",
|
|
173
148
|
required: !0
|
|
174
|
-
}), /* @__PURE__ */
|
|
149
|
+
}), /* @__PURE__ */ w(h.Suffix, {
|
|
175
150
|
className: "px-0",
|
|
176
|
-
children: /* @__PURE__ */
|
|
151
|
+
children: /* @__PURE__ */ w(l, {
|
|
177
152
|
isIconOnly: !0,
|
|
178
|
-
"aria-label":
|
|
153
|
+
"aria-label": Y ? F.auth.hidePassword : F.auth.showPassword,
|
|
179
154
|
size: "sm",
|
|
180
155
|
variant: "ghost",
|
|
181
|
-
onPress: () =>
|
|
182
|
-
isDisabled:
|
|
183
|
-
children:
|
|
156
|
+
onPress: () => X(!Y),
|
|
157
|
+
isDisabled: Z,
|
|
158
|
+
children: w(Y ? c : s, {})
|
|
184
159
|
})
|
|
185
160
|
})]
|
|
186
161
|
}),
|
|
187
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ w(f, {})
|
|
188
163
|
]
|
|
189
164
|
}),
|
|
190
|
-
/* @__PURE__ */
|
|
165
|
+
M?.map((t) => t.signUp && t.signUp !== "above" && /* @__PURE__ */ w(e, {
|
|
166
|
+
name: t.name,
|
|
167
|
+
field: t,
|
|
168
|
+
isPending: Z,
|
|
169
|
+
variant: A
|
|
170
|
+
}, t.name)),
|
|
171
|
+
/* @__PURE__ */ T("div", {
|
|
191
172
|
className: "flex flex-col gap-3",
|
|
192
|
-
children: [/* @__PURE__ */
|
|
173
|
+
children: [/* @__PURE__ */ T(l, {
|
|
193
174
|
type: "submit",
|
|
194
175
|
className: "w-full",
|
|
195
|
-
isPending:
|
|
196
|
-
children: [
|
|
176
|
+
isPending: Z,
|
|
177
|
+
children: [K && /* @__PURE__ */ w(v, {
|
|
197
178
|
color: "current",
|
|
198
179
|
size: "sm"
|
|
199
|
-
}),
|
|
200
|
-
}),
|
|
201
|
-
view: "signUp",
|
|
202
|
-
isPending: Q
|
|
203
|
-
})]
|
|
180
|
+
}), F.auth.signUp]
|
|
181
|
+
}), I.flatMap((e) => e.authButtons?.map((t, n) => /* @__PURE__ */ w(t, { view: "signUp" }, `${e.id}-${n.toString()}`)))]
|
|
204
182
|
})
|
|
205
183
|
]
|
|
206
184
|
}),
|
|
207
|
-
|
|
208
|
-
socialLayout: T,
|
|
209
|
-
isPending: Q
|
|
210
|
-
})] })
|
|
185
|
+
k === "bottom" && /* @__PURE__ */ T(C, { children: [$ && /* @__PURE__ */ w(t, { children: F.auth.or }), !!R?.length && /* @__PURE__ */ w(n, { socialLayout: O })] })
|
|
211
186
|
]
|
|
212
187
|
}),
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
-
className: "flex-col",
|
|
215
|
-
children: /* @__PURE__ */
|
|
188
|
+
/* @__PURE__ */ w(u.Footer, {
|
|
189
|
+
className: "flex-col gap-3",
|
|
190
|
+
children: /* @__PURE__ */ T(d, {
|
|
216
191
|
className: "text-sm",
|
|
217
192
|
children: [
|
|
218
|
-
|
|
193
|
+
F.auth.alreadyHaveAnAccount,
|
|
219
194
|
" ",
|
|
220
|
-
/* @__PURE__ */
|
|
221
|
-
href: `${
|
|
222
|
-
className: "text-accent
|
|
223
|
-
children:
|
|
195
|
+
/* @__PURE__ */ w(_, {
|
|
196
|
+
href: `${N.auth}/${z.auth.signIn}`,
|
|
197
|
+
className: "text-accent no-underline hover:underline decoration-accent-hover",
|
|
198
|
+
children: F.auth.signIn
|
|
224
199
|
})
|
|
225
200
|
]
|
|
226
201
|
})
|
|
@@ -229,4 +204,4 @@ function w({ className: w, socialLayout: T, socialPosition: E = "bottom", varian
|
|
|
229
204
|
});
|
|
230
205
|
}
|
|
231
206
|
//#endregion
|
|
232
|
-
export {
|
|
207
|
+
export { D as SignUp };
|
|
@@ -7,10 +7,7 @@ export type AppearanceProps = {
|
|
|
7
7
|
* Renders a theme selector card with visual theme previews.
|
|
8
8
|
*
|
|
9
9
|
* Displays a card containing radio buttons for selecting between system, light,
|
|
10
|
-
* and dark themes. Each option shows a visual preview of the theme.
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* @param className - Optional additional CSS class names for the card container.
|
|
14
|
-
* @returns A JSX element containing the theme selector card, or null if theme settings are not configured.
|
|
10
|
+
* and dark themes. Each option shows a visual preview of the theme. Theme options
|
|
11
|
+
* are conditionally shown based on the `themes` array provided via the theme plugin.
|
|
15
12
|
*/
|
|
16
|
-
export declare function Appearance({ className, variant, ...props }: AppearanceProps & Omit<CardProps, "children">): import("react/jsx-runtime").JSX.Element
|
|
13
|
+
export declare function Appearance({ className, variant, ...props }: AppearanceProps & Omit<CardProps, "children">): import("react/jsx-runtime").JSX.Element;
|