@better-auth-ui/heroui 1.6.0 → 1.6.2
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/auth-provider.d.ts +1 -1
- package/dist/components/auth/auth-provider.js +15 -11
- package/dist/components/auth/auth.d.ts +3 -3
- package/dist/components/auth/auth.js +36 -41
- package/dist/components/auth/field-separator.d.ts +1 -1
- package/dist/components/auth/field-separator.js +17 -4
- package/dist/components/auth/forgot-password.d.ts +1 -1
- package/dist/components/auth/forgot-password.js +69 -27
- package/dist/components/auth/magic-link-button.d.ts +1 -1
- package/dist/components/auth/magic-link-button.js +15 -18
- package/dist/components/auth/magic-link.d.ts +2 -2
- package/dist/components/auth/magic-link.js +110 -42
- package/dist/components/auth/passkey-button.d.ts +4 -0
- package/dist/components/auth/passkey-button.js +24 -0
- package/dist/components/auth/provider-buttons.d.ts +1 -1
- package/dist/components/auth/provider-buttons.js +26 -33
- package/dist/components/auth/reset-password.d.ts +1 -1
- package/dist/components/auth/reset-password.js +146 -57
- package/dist/components/auth/sign-in.d.ts +2 -2
- package/dist/components/auth/sign-in.js +163 -63
- package/dist/components/auth/sign-out.js +26 -32
- package/dist/components/auth/sign-up.d.ts +2 -2
- package/dist/components/auth/sign-up.js +240 -70
- package/dist/components/email/email-changed-email.d.ts +2 -2
- package/dist/components/email/email-changed-email.js +29 -22
- package/dist/components/email/email-verification-email.d.ts +2 -2
- package/dist/components/email/email-verification-email.js +29 -22
- package/dist/components/email/magic-link-email.d.ts +2 -2
- package/dist/components/email/magic-link-email.js +29 -22
- package/dist/components/email/new-device-email.d.ts +2 -2
- package/dist/components/email/new-device-email.js +29 -22
- package/dist/components/email/otp-email.d.ts +2 -2
- package/dist/components/email/otp-email.js +28 -21
- package/dist/components/email/password-changed-email.d.ts +2 -2
- package/dist/components/email/password-changed-email.js +29 -22
- package/dist/components/email/reset-password-email.d.ts +2 -2
- package/dist/components/email/reset-password-email.js +29 -22
- package/dist/components/settings/account/account-settings.d.ts +2 -2
- package/dist/components/settings/account/account-settings.js +22 -19
- package/dist/components/settings/account/appearance.d.ts +1 -1
- package/dist/components/settings/account/appearance.js +70 -27
- package/dist/components/settings/account/change-avatar.js +88 -55
- package/dist/components/settings/account/change-email.d.ts +1 -1
- package/dist/components/settings/account/change-email.js +56 -28
- package/dist/components/settings/account/manage-account.d.ts +1 -1
- package/dist/components/settings/account/manage-account.js +50 -31
- package/dist/components/settings/account/manage-accounts.d.ts +1 -1
- package/dist/components/settings/account/manage-accounts.js +32 -36
- package/dist/components/settings/account/user-profile.d.ts +3 -3
- package/dist/components/settings/account/user-profile.js +105 -22
- package/dist/components/settings/security/active-session.d.ts +1 -1
- package/dist/components/settings/security/active-session.js +60 -51
- package/dist/components/settings/security/active-sessions.d.ts +1 -1
- package/dist/components/settings/security/active-sessions.js +32 -26
- package/dist/components/settings/security/change-password.d.ts +1 -1
- package/dist/components/settings/security/change-password.js +189 -76
- package/dist/components/settings/security/danger-zone.d.ts +2 -2
- package/dist/components/settings/security/danger-zone.js +17 -11
- package/dist/components/settings/security/delete-user.d.ts +1 -1
- package/dist/components/settings/security/delete-user.js +96 -46
- package/dist/components/settings/security/linked-account.d.ts +1 -1
- package/dist/components/settings/security/linked-account.js +61 -47
- package/dist/components/settings/security/linked-accounts.d.ts +1 -1
- package/dist/components/settings/security/linked-accounts.js +43 -40
- package/dist/components/settings/security/passkey.d.ts +8 -0
- package/dist/components/settings/security/passkey.js +43 -0
- package/dist/components/settings/security/passkeys.d.ts +6 -0
- package/dist/components/settings/security/passkeys.js +53 -0
- package/dist/components/settings/security/security-settings.d.ts +2 -2
- package/dist/components/settings/security/security-settings.js +24 -20
- package/dist/components/settings/settings.d.ts +3 -3
- package/dist/components/settings/settings.js +44 -27
- package/dist/components/user/switch-account-item.d.ts +1 -1
- package/dist/components/user/switch-account-item.js +19 -15
- package/dist/components/user/switch-account-menu.js +27 -28
- package/dist/components/user/user-avatar.d.ts +3 -3
- package/dist/components/user/user-avatar.js +28 -30
- package/dist/components/user/user-button.d.ts +1 -1
- package/dist/components/user/user-button.js +90 -23
- package/dist/components/user/user-view.d.ts +3 -3
- package/dist/components/user/user-view.js +36 -23
- package/dist/core.d.ts +1 -1
- package/dist/index.d.ts +35 -33
- package/dist/index.js +36 -33
- package/dist/react-exports.d.ts +1 -1
- package/package.json +17 -10
- package/src/components/auth/auth.tsx +1 -1
- package/src/components/auth/magic-link.tsx +4 -0
- package/src/components/auth/passkey-button.tsx +36 -0
- package/src/components/auth/sign-in.tsx +67 -30
- package/src/components/auth/sign-up.tsx +97 -3
- package/src/components/settings/account/user-profile.tsx +121 -6
- package/src/components/settings/security/passkey.tsx +51 -0
- package/src/components/settings/security/passkeys.tsx +104 -0
- package/src/components/settings/security/security-settings.tsx +3 -1
- package/src/components/settings/settings.tsx +1 -1
- package/src/index.tsx +2 -0
- package/dist/components/account/account.d.ts +0 -18
- package/dist/components/account/account.js +0 -24
- package/dist/components/account/settings/account-settings.d.ts +0 -5
- package/dist/components/account/settings/account-settings.js +0 -6
- package/dist/components/account/settings/settings.d.ts +0 -5
- package/dist/components/account/settings/settings.js +0 -5
- package/dist/components/account/settings/user-profile.d.ts +0 -5
- package/dist/components/account/settings/user-profile.js +0 -20
- package/dist/components/settings/account/accounts.d.ts +0 -14
- package/dist/components/settings/account/accounts.js +0 -26
- package/dist/components/settings/account/theme-selector.d.ts +0 -16
- package/dist/components/settings/account/theme-selector.js +0 -33
- package/dist/components/settings/account/theme-settings.d.ts +0 -16
- package/dist/components/settings/account/theme-settings.js +0 -31
- package/dist/components/settings/account-settings.d.ts +0 -5
- package/dist/components/settings/account-settings.js +0 -6
- package/dist/components/settings/account.d.ts +0 -18
- package/dist/components/settings/account.js +0 -24
- package/dist/components/settings/security/connected-account.d.ts +0 -16
- package/dist/components/settings/security/connected-account.js +0 -46
- package/dist/components/settings/security/connected-accounts.d.ts +0 -15
- package/dist/components/settings/security/connected-accounts.js +0 -31
- package/dist/components/settings/security/sessions.d.ts +0 -14
- package/dist/components/settings/security/sessions.js +0 -40
- package/dist/components/settings/settings/account-settings.d.ts +0 -5
- package/dist/components/settings/settings/account-settings.js +0 -6
- package/dist/components/settings/settings/user-profile.d.ts +0 -5
- package/dist/components/settings/settings/user-profile.js +0 -20
- package/dist/components/settings/user-profile.d.ts +0 -5
- package/dist/components/settings/user-profile.js +0 -20
- package/dist/components/user/switch-account-popover.d.ts +0 -10
- package/dist/components/user/switch-account-popover.js +0 -25
- package/dist/components/user/switch-account-submenu.d.ts +0 -10
- package/dist/components/user/switch-account-submenu.js +0 -25
- package/dist/hooks/use-auth.d.ts +0 -2
- package/dist/hooks/use-auth.js +0 -8
- package/dist/hooks/use-redirect-to.d.ts +0 -8
- package/dist/hooks/use-redirect-to.js +0 -19
- package/dist/hooks/use-sign-in.d.ts +0 -8
- package/dist/hooks/use-sign-in.js +0 -53
- package/dist/lib/utils.d.ts +0 -2
- package/dist/lib/utils.js +0 -5
- package/dist/server.d.ts +0 -1
- package/dist/server.js +0 -1
- package/dist/src/components/auth/auth-provider.d.ts +0 -8
- package/dist/src/components/auth/auth-provider.js +0 -13
- package/dist/src/components/auth/auth.d.ts +0 -22
- package/dist/src/components/auth/auth.js +0 -42
- package/dist/src/components/auth/field-separator.d.ts +0 -4
- package/dist/src/components/auth/field-separator.js +0 -5
- package/dist/src/components/auth/forgot-password.d.ts +0 -15
- package/dist/src/components/auth/forgot-password.js +0 -29
- package/dist/src/components/auth/magic-link-button.d.ts +0 -13
- package/dist/src/components/auth/magic-link-button.js +0 -20
- package/dist/src/components/auth/magic-link.d.ts +0 -17
- package/dist/src/components/auth/magic-link.js +0 -37
- package/dist/src/components/auth/provider-buttons.d.ts +0 -19
- package/dist/src/components/auth/provider-buttons.js +0 -35
- package/dist/src/components/auth/reset-password.d.ts +0 -11
- package/dist/src/components/auth/reset-password.js +0 -59
- package/dist/src/components/auth/sign-in.d.ts +0 -14
- package/dist/src/components/auth/sign-in.js +0 -58
- package/dist/src/components/auth/sign-out.d.ts +0 -11
- package/dist/src/components/auth/sign-out.js +0 -34
- package/dist/src/components/auth/sign-up.d.ts +0 -19
- package/dist/src/components/auth/sign-up.js +0 -65
- package/dist/src/components/email/email-changed-email.d.ts +0 -3
- package/dist/src/components/email/email-changed-email.js +0 -23
- package/dist/src/components/email/email-verification-email.d.ts +0 -3
- package/dist/src/components/email/email-verification-email.js +0 -23
- package/dist/src/components/email/magic-link-email.d.ts +0 -3
- package/dist/src/components/email/magic-link-email.js +0 -23
- package/dist/src/components/email/new-device-email.d.ts +0 -3
- package/dist/src/components/email/new-device-email.js +0 -23
- package/dist/src/components/email/otp-email.d.ts +0 -3
- package/dist/src/components/email/otp-email.js +0 -22
- package/dist/src/components/email/password-changed-email.d.ts +0 -3
- package/dist/src/components/email/password-changed-email.js +0 -23
- package/dist/src/components/email/reset-password-email.d.ts +0 -3
- package/dist/src/components/email/reset-password-email.js +0 -23
- package/dist/src/components/settings/account/account-settings.d.ts +0 -13
- package/dist/src/components/settings/account/account-settings.js +0 -19
- package/dist/src/components/settings/account/appearance.d.ts +0 -16
- package/dist/src/components/settings/account/appearance.js +0 -28
- package/dist/src/components/settings/account/change-email.d.ts +0 -15
- package/dist/src/components/settings/account/change-email.js +0 -35
- package/dist/src/components/settings/account/manage-account.d.ts +0 -19
- package/dist/src/components/settings/account/manage-account.js +0 -27
- package/dist/src/components/settings/account/manage-accounts.d.ts +0 -14
- package/dist/src/components/settings/account/manage-accounts.js +0 -27
- package/dist/src/components/settings/account/user-profile.d.ts +0 -13
- package/dist/src/components/settings/account/user-profile.js +0 -29
- package/dist/src/components/settings/security/active-session.d.ts +0 -14
- package/dist/src/components/settings/security/active-session.js +0 -35
- package/dist/src/components/settings/security/active-sessions.d.ts +0 -14
- package/dist/src/components/settings/security/active-sessions.js +0 -29
- package/dist/src/components/settings/security/change-password.d.ts +0 -15
- package/dist/src/components/settings/security/change-password.js +0 -57
- package/dist/src/components/settings/security/linked-account.d.ts +0 -16
- package/dist/src/components/settings/security/linked-account.js +0 -46
- package/dist/src/components/settings/security/linked-accounts.d.ts +0 -15
- package/dist/src/components/settings/security/linked-accounts.js +0 -31
- package/dist/src/components/settings/security/security-settings.d.ts +0 -15
- package/dist/src/components/settings/security/security-settings.js +0 -18
- package/dist/src/components/settings/settings.d.ts +0 -29
- package/dist/src/components/settings/settings.js +0 -39
- package/dist/src/components/user/switch-account-item.d.ts +0 -16
- package/dist/src/components/user/switch-account-item.js +0 -14
- package/dist/src/components/user/switch-account-menu.d.ts +0 -10
- package/dist/src/components/user/switch-account-menu.js +0 -23
- package/dist/src/components/user/user-avatar.d.ts +0 -24
- package/dist/src/components/user/user-avatar.js +0 -31
- package/dist/src/components/user/user-button.d.ts +0 -21
- package/dist/src/components/user/user-button.js +0 -24
- package/dist/src/components/user/user-view.d.ts +0 -21
- package/dist/src/components/user/user-view.js +0 -24
- package/dist/src/core.d.ts +0 -1
- package/dist/src/core.js +0 -1
- package/dist/src/index.d.ts +0 -31
- package/dist/src/index.js +0 -32
- package/dist/src/lib/utils.d.ts +0 -2
- package/dist/src/lib/utils.js +0 -5
- package/dist/src/react-exports.d.ts +0 -1
- package/dist/src/react-exports.js +0 -1
|
@@ -1,71 +1,241 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
1
|
+
import { FieldSeparator as e } from "./field-separator.js";
|
|
2
|
+
import { MagicLinkButton as t } from "./magic-link-button.js";
|
|
3
|
+
import { ProviderButtons as n } from "./provider-buttons.js";
|
|
4
|
+
import { useAuth as r, useIsUsernameAvailable as i, useSignInSocial as ee, useSignUpEmail as te } from "@better-auth-ui/react";
|
|
5
|
+
import { Button as a, Card as o, Description as ne, FieldError as s, Form as c, Input as l, InputGroup as u, Label as d, Link as re, Spinner as f, TextField as p, cn as m, toast as h } from "@heroui/react";
|
|
6
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
7
|
+
import { useState as y } from "react";
|
|
8
|
+
import { Check as ie, Eye as b, EyeSlash as x, Xmark as S } from "@gravity-ui/icons";
|
|
9
|
+
import { useDebouncer as C } from "@tanstack/react-pacer";
|
|
10
|
+
//#region src/components/auth/sign-up.tsx
|
|
11
|
+
function w({ className: w, socialLayout: T, socialPosition: E = "bottom", variant: D, ...ae }) {
|
|
12
|
+
let { basePaths: O, emailAndPassword: k, localization: A, magicLink: j, redirectTo: M, socialProviders: N, username: P, viewPaths: F, navigate: I } = r(), [L, R] = y(""), [z, B] = y(""), [V, H] = y(""), { mutate: U, data: W, error: G, reset: K } = i(), q = C((e) => {
|
|
13
|
+
if (!e.trim()) {
|
|
14
|
+
K();
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
U({ username: e.trim() });
|
|
18
|
+
}, { wait: 500 });
|
|
19
|
+
function oe(e) {
|
|
20
|
+
H(e), K(), P?.isUsernameAvailable && q.maybeExecute(e);
|
|
21
|
+
}
|
|
22
|
+
let { mutate: se, isPending: ce } = te({
|
|
23
|
+
onError: (e) => {
|
|
24
|
+
R(""), B(""), h.danger(e.error?.message || e.message);
|
|
25
|
+
},
|
|
26
|
+
onSuccess: () => {
|
|
27
|
+
k?.requireEmailVerification ? (h.success(A.auth.verifyYourEmail), I({ to: `${O.auth}/${F.auth.signIn}` })) : I({ to: M });
|
|
28
|
+
}
|
|
29
|
+
}), [le, J] = y(!1), { mutate: Y, isPending: ue } = ee({
|
|
30
|
+
onError: (e) => h.danger(e.error?.message || e.message),
|
|
31
|
+
onSuccess: () => {
|
|
32
|
+
J(!0), setTimeout(() => {
|
|
33
|
+
J(!1);
|
|
34
|
+
}, 5e3);
|
|
35
|
+
}
|
|
36
|
+
}), [X, de] = y(!1), [Z, fe] = y(!1), Q = ce || ue || le, pe = (e) => {
|
|
37
|
+
e.preventDefault();
|
|
38
|
+
let t = new FormData(e.currentTarget), n = t.get("name"), r = t.get("email");
|
|
39
|
+
if (k?.confirmPassword && L !== z) {
|
|
40
|
+
h.danger(A.auth.passwordsDoNotMatch), R(""), B("");
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
se({
|
|
44
|
+
name: n,
|
|
45
|
+
email: r,
|
|
46
|
+
password: L,
|
|
47
|
+
...P?.enabled ? {
|
|
48
|
+
username: V.trim(),
|
|
49
|
+
...P.displayUsername ? { displayUsername: V.trim() } : {}
|
|
50
|
+
} : {}
|
|
51
|
+
});
|
|
52
|
+
}, $ = k?.enabled && !!N?.length;
|
|
53
|
+
return /* @__PURE__ */ v(o, {
|
|
54
|
+
className: m("w-full max-w-sm p-4 md:p-6", w),
|
|
55
|
+
variant: D,
|
|
56
|
+
...ae,
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ _(o.Header, { children: /* @__PURE__ */ _(o.Title, {
|
|
59
|
+
className: "text-xl font-semibold mb-1",
|
|
60
|
+
children: A.auth.signUp
|
|
61
|
+
}) }),
|
|
62
|
+
/* @__PURE__ */ v(o.Content, {
|
|
63
|
+
className: "gap-4",
|
|
64
|
+
children: [
|
|
65
|
+
E === "top" && /* @__PURE__ */ v(g, { children: [!!N?.length && /* @__PURE__ */ _(n, {
|
|
66
|
+
isPending: Q,
|
|
67
|
+
socialLayout: T,
|
|
68
|
+
signInSocial: Y
|
|
69
|
+
}), $ && /* @__PURE__ */ _(e, { children: A.auth.or })] }),
|
|
70
|
+
k?.enabled && /* @__PURE__ */ v(c, {
|
|
71
|
+
onSubmit: pe,
|
|
72
|
+
className: "flex flex-col gap-4",
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ v(p, {
|
|
75
|
+
name: "name",
|
|
76
|
+
type: "text",
|
|
77
|
+
autoComplete: "name",
|
|
78
|
+
isDisabled: Q,
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ _(d, { children: A.auth.name }),
|
|
81
|
+
/* @__PURE__ */ _(l, {
|
|
82
|
+
placeholder: A.auth.namePlaceholder,
|
|
83
|
+
required: !0,
|
|
84
|
+
variant: D === "transparent" ? "primary" : "secondary"
|
|
85
|
+
}),
|
|
86
|
+
/* @__PURE__ */ _(s, {})
|
|
87
|
+
]
|
|
88
|
+
}),
|
|
89
|
+
P?.enabled && /* @__PURE__ */ v(p, {
|
|
90
|
+
name: "username",
|
|
91
|
+
type: "text",
|
|
92
|
+
autoComplete: "username",
|
|
93
|
+
minLength: P.minUsernameLength,
|
|
94
|
+
maxLength: P.maxUsernameLength,
|
|
95
|
+
isDisabled: Q,
|
|
96
|
+
value: V,
|
|
97
|
+
onChange: oe,
|
|
98
|
+
isInvalid: !!G || W && !W.available,
|
|
99
|
+
children: [
|
|
100
|
+
/* @__PURE__ */ _(d, { children: A.auth.username }),
|
|
101
|
+
/* @__PURE__ */ v(u, {
|
|
102
|
+
variant: D === "transparent" ? "primary" : "secondary",
|
|
103
|
+
children: [/* @__PURE__ */ _(u.Input, {
|
|
104
|
+
placeholder: A.auth.usernamePlaceholder,
|
|
105
|
+
required: !0
|
|
106
|
+
}), P.isUsernameAvailable && V.trim() && /* @__PURE__ */ _(u.Suffix, {
|
|
107
|
+
className: "px-2",
|
|
108
|
+
children: W?.available ? /* @__PURE__ */ _(ie, { className: "text-success" }) : G || W?.available === !1 ? /* @__PURE__ */ _(S, { className: "text-danger" }) : /* @__PURE__ */ _(f, {
|
|
109
|
+
size: "sm",
|
|
110
|
+
color: "current"
|
|
111
|
+
})
|
|
112
|
+
})]
|
|
113
|
+
}),
|
|
114
|
+
/* @__PURE__ */ _(s, { children: G?.error?.message || G?.message || W?.available === !1 && A.auth.usernameTaken })
|
|
115
|
+
]
|
|
116
|
+
}),
|
|
117
|
+
/* @__PURE__ */ v(p, {
|
|
118
|
+
name: "email",
|
|
119
|
+
type: "email",
|
|
120
|
+
autoComplete: "email",
|
|
121
|
+
isDisabled: Q,
|
|
122
|
+
children: [
|
|
123
|
+
/* @__PURE__ */ _(d, { children: A.auth.email }),
|
|
124
|
+
/* @__PURE__ */ _(l, {
|
|
125
|
+
placeholder: A.auth.emailPlaceholder,
|
|
126
|
+
required: !0,
|
|
127
|
+
variant: D === "transparent" ? "primary" : "secondary"
|
|
128
|
+
}),
|
|
129
|
+
/* @__PURE__ */ _(s, {})
|
|
130
|
+
]
|
|
131
|
+
}),
|
|
132
|
+
/* @__PURE__ */ v(p, {
|
|
133
|
+
minLength: k?.minPasswordLength,
|
|
134
|
+
maxLength: k?.maxPasswordLength,
|
|
135
|
+
name: "password",
|
|
136
|
+
autoComplete: "new-password",
|
|
137
|
+
isDisabled: Q,
|
|
138
|
+
value: L,
|
|
139
|
+
onChange: R,
|
|
140
|
+
children: [
|
|
141
|
+
/* @__PURE__ */ _(d, { children: A.auth.password }),
|
|
142
|
+
/* @__PURE__ */ v(u, {
|
|
143
|
+
variant: D === "transparent" ? "primary" : "secondary",
|
|
144
|
+
children: [/* @__PURE__ */ _(u.Input, {
|
|
145
|
+
placeholder: A.auth.passwordPlaceholder,
|
|
146
|
+
type: X ? "text" : "password",
|
|
147
|
+
name: "password",
|
|
148
|
+
required: !0
|
|
149
|
+
}), /* @__PURE__ */ _(u.Suffix, {
|
|
150
|
+
className: "px-0",
|
|
151
|
+
children: /* @__PURE__ */ _(a, {
|
|
152
|
+
isIconOnly: !0,
|
|
153
|
+
"aria-label": X ? A.auth.hidePassword : A.auth.showPassword,
|
|
154
|
+
size: "sm",
|
|
155
|
+
variant: "ghost",
|
|
156
|
+
onPress: () => de(!X),
|
|
157
|
+
isDisabled: Q,
|
|
158
|
+
children: _(X ? x : b, {})
|
|
159
|
+
})
|
|
160
|
+
})]
|
|
161
|
+
}),
|
|
162
|
+
/* @__PURE__ */ _(s, {})
|
|
163
|
+
]
|
|
164
|
+
}),
|
|
165
|
+
k?.confirmPassword && /* @__PURE__ */ v(p, {
|
|
166
|
+
minLength: k?.minPasswordLength,
|
|
167
|
+
maxLength: k?.maxPasswordLength,
|
|
168
|
+
name: "confirmPassword",
|
|
169
|
+
autoComplete: "new-password",
|
|
170
|
+
isDisabled: Q,
|
|
171
|
+
value: z,
|
|
172
|
+
onChange: B,
|
|
173
|
+
children: [
|
|
174
|
+
/* @__PURE__ */ _(d, { children: A.auth.confirmPassword }),
|
|
175
|
+
/* @__PURE__ */ v(u, {
|
|
176
|
+
variant: D === "transparent" ? "primary" : "secondary",
|
|
177
|
+
children: [/* @__PURE__ */ _(u.Input, {
|
|
178
|
+
name: "confirmPassword",
|
|
179
|
+
placeholder: A.auth.confirmPasswordPlaceholder,
|
|
180
|
+
type: Z ? "text" : "password",
|
|
181
|
+
required: !0
|
|
182
|
+
}), /* @__PURE__ */ _(u.Suffix, {
|
|
183
|
+
className: "px-0",
|
|
184
|
+
children: /* @__PURE__ */ _(a, {
|
|
185
|
+
isIconOnly: !0,
|
|
186
|
+
"aria-label": Z ? A.auth.hidePassword : A.auth.showPassword,
|
|
187
|
+
size: "sm",
|
|
188
|
+
variant: "ghost",
|
|
189
|
+
onPress: () => fe(!Z),
|
|
190
|
+
isDisabled: Q,
|
|
191
|
+
children: _(Z ? x : b, {})
|
|
192
|
+
})
|
|
193
|
+
})]
|
|
194
|
+
}),
|
|
195
|
+
/* @__PURE__ */ _(s, {})
|
|
196
|
+
]
|
|
197
|
+
}),
|
|
198
|
+
/* @__PURE__ */ v("div", {
|
|
199
|
+
className: "flex flex-col gap-3",
|
|
200
|
+
children: [/* @__PURE__ */ v(a, {
|
|
201
|
+
type: "submit",
|
|
202
|
+
className: "w-full",
|
|
203
|
+
isPending: Q,
|
|
204
|
+
children: [Q && /* @__PURE__ */ _(f, {
|
|
205
|
+
color: "current",
|
|
206
|
+
size: "sm"
|
|
207
|
+
}), A.auth.signUp]
|
|
208
|
+
}), j && /* @__PURE__ */ _(t, {
|
|
209
|
+
view: "signUp",
|
|
210
|
+
isPending: Q
|
|
211
|
+
})]
|
|
212
|
+
})
|
|
213
|
+
]
|
|
214
|
+
}),
|
|
215
|
+
E === "bottom" && /* @__PURE__ */ v(g, { children: [$ && /* @__PURE__ */ _(e, { children: A.auth.or }), !!N?.length && /* @__PURE__ */ _(n, {
|
|
216
|
+
socialLayout: T,
|
|
217
|
+
signInSocial: Y,
|
|
218
|
+
isPending: Q
|
|
219
|
+
})] })
|
|
220
|
+
]
|
|
221
|
+
}),
|
|
222
|
+
/* @__PURE__ */ _(o.Footer, {
|
|
223
|
+
className: "flex-col",
|
|
224
|
+
children: /* @__PURE__ */ v(ne, {
|
|
225
|
+
className: "text-sm",
|
|
226
|
+
children: [
|
|
227
|
+
A.auth.alreadyHaveAnAccount,
|
|
228
|
+
" ",
|
|
229
|
+
/* @__PURE__ */ _(re, {
|
|
230
|
+
href: `${O.auth}/${F.auth.signIn}`,
|
|
231
|
+
className: "text-accent decoration-accent no-underline hover:underline",
|
|
232
|
+
children: A.auth.signIn
|
|
233
|
+
})
|
|
234
|
+
]
|
|
235
|
+
})
|
|
236
|
+
})
|
|
237
|
+
]
|
|
238
|
+
});
|
|
71
239
|
}
|
|
240
|
+
//#endregion
|
|
241
|
+
export { w as SignUp };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type { EmailChangedEmailProps } from
|
|
1
|
+
import { EmailChangedEmailProps } from '@better-auth-ui/react';
|
|
2
|
+
export type { EmailChangedEmailProps } from '@better-auth-ui/react';
|
|
3
3
|
export declare function EmailChangedEmail({ colors, classNames, ...props }: EmailChangedEmailProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,23 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { EmailChangedEmail as e } from "@better-auth-ui/react";
|
|
2
|
+
import { cn as t } from "@heroui/react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/email/email-changed-email.tsx
|
|
5
|
+
function r({ colors: r, classNames: i, ...a }) {
|
|
6
|
+
return /* @__PURE__ */ n(e, {
|
|
7
|
+
colors: {
|
|
8
|
+
light: {
|
|
9
|
+
background: "#F5F5F5",
|
|
10
|
+
primary: "#0285F7",
|
|
11
|
+
primaryForeground: "#FCFCFC",
|
|
12
|
+
...r?.light
|
|
13
|
+
},
|
|
14
|
+
dark: {
|
|
15
|
+
background: "#060607",
|
|
16
|
+
primary: "#0584F6",
|
|
17
|
+
primaryForeground: "#FCFCFC",
|
|
18
|
+
...r?.dark
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
classNames: {
|
|
22
|
+
...i,
|
|
23
|
+
card: t("border-none rounded-3xl", i?.card),
|
|
24
|
+
button: t("rounded-full", i?.button)
|
|
25
|
+
},
|
|
26
|
+
...a
|
|
27
|
+
});
|
|
23
28
|
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { r as EmailChangedEmail };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type { EmailVerificationEmailProps } from
|
|
1
|
+
import { EmailVerificationEmailProps } from '@better-auth-ui/react';
|
|
2
|
+
export type { EmailVerificationEmailProps } from '@better-auth-ui/react';
|
|
3
3
|
export declare function EmailVerificationEmail({ colors, classNames, ...props }: EmailVerificationEmailProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,23 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { EmailVerificationEmail as e } from "@better-auth-ui/react";
|
|
2
|
+
import { cn as t } from "@heroui/react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/email/email-verification-email.tsx
|
|
5
|
+
function r({ colors: r, classNames: i, ...a }) {
|
|
6
|
+
return /* @__PURE__ */ n(e, {
|
|
7
|
+
colors: {
|
|
8
|
+
light: {
|
|
9
|
+
background: "#F5F5F5",
|
|
10
|
+
primary: "#0285F7",
|
|
11
|
+
primaryForeground: "#FCFCFC",
|
|
12
|
+
...r?.light
|
|
13
|
+
},
|
|
14
|
+
dark: {
|
|
15
|
+
background: "#060607",
|
|
16
|
+
primary: "#0584F6",
|
|
17
|
+
primaryForeground: "#FCFCFC",
|
|
18
|
+
...r?.dark
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
classNames: {
|
|
22
|
+
...i,
|
|
23
|
+
card: t("border-none rounded-3xl", i?.card),
|
|
24
|
+
button: t("rounded-full", i?.button)
|
|
25
|
+
},
|
|
26
|
+
...a
|
|
27
|
+
});
|
|
23
28
|
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { r as EmailVerificationEmail };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type { MagicLinkEmailProps } from
|
|
1
|
+
import { MagicLinkEmailProps } from '@better-auth-ui/react';
|
|
2
|
+
export type { MagicLinkEmailProps } from '@better-auth-ui/react';
|
|
3
3
|
export declare function MagicLinkEmail({ colors, classNames, ...props }: MagicLinkEmailProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,23 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { MagicLinkEmail as e } from "@better-auth-ui/react";
|
|
2
|
+
import { cn as t } from "@heroui/react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/email/magic-link-email.tsx
|
|
5
|
+
function r({ colors: r, classNames: i, ...a }) {
|
|
6
|
+
return /* @__PURE__ */ n(e, {
|
|
7
|
+
colors: {
|
|
8
|
+
light: {
|
|
9
|
+
background: "#F5F5F5",
|
|
10
|
+
primary: "#0285F7",
|
|
11
|
+
primaryForeground: "#FCFCFC",
|
|
12
|
+
...r?.light
|
|
13
|
+
},
|
|
14
|
+
dark: {
|
|
15
|
+
background: "#060607",
|
|
16
|
+
primary: "#0584F6",
|
|
17
|
+
primaryForeground: "#FCFCFC",
|
|
18
|
+
...r?.dark
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
classNames: {
|
|
22
|
+
...i,
|
|
23
|
+
card: t("border-none rounded-3xl", i?.card),
|
|
24
|
+
button: t("rounded-full", i?.button)
|
|
25
|
+
},
|
|
26
|
+
...a
|
|
27
|
+
});
|
|
23
28
|
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { r as MagicLinkEmail };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type { NewDeviceEmailProps } from
|
|
1
|
+
import { NewDeviceEmailProps } from '@better-auth-ui/react';
|
|
2
|
+
export type { NewDeviceEmailProps } from '@better-auth-ui/react';
|
|
3
3
|
export declare function NewDeviceEmail({ colors, classNames, ...props }: NewDeviceEmailProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,23 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { NewDeviceEmail as e } from "@better-auth-ui/react";
|
|
2
|
+
import { cn as t } from "@heroui/react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/email/new-device-email.tsx
|
|
5
|
+
function r({ colors: r, classNames: i, ...a }) {
|
|
6
|
+
return /* @__PURE__ */ n(e, {
|
|
7
|
+
colors: {
|
|
8
|
+
light: {
|
|
9
|
+
background: "#F5F5F5",
|
|
10
|
+
primary: "#0285F7",
|
|
11
|
+
primaryForeground: "#FCFCFC",
|
|
12
|
+
...r?.light
|
|
13
|
+
},
|
|
14
|
+
dark: {
|
|
15
|
+
background: "#060607",
|
|
16
|
+
primary: "#0584F6",
|
|
17
|
+
primaryForeground: "#FCFCFC",
|
|
18
|
+
...r?.dark
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
classNames: {
|
|
22
|
+
...i,
|
|
23
|
+
card: t("border-none rounded-3xl", i?.card),
|
|
24
|
+
button: t("rounded-full", i?.button)
|
|
25
|
+
},
|
|
26
|
+
...a
|
|
27
|
+
});
|
|
23
28
|
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { r as NewDeviceEmail };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type { OtpEmailProps } from
|
|
1
|
+
import { OtpEmailProps } from '@better-auth-ui/react';
|
|
2
|
+
export type { OtpEmailProps } from '@better-auth-ui/react';
|
|
3
3
|
export declare function OtpEmail({ colors, classNames, ...props }: OtpEmailProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,22 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { OtpEmail as e } from "@better-auth-ui/react";
|
|
2
|
+
import { cn as t } from "@heroui/react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/email/otp-email.tsx
|
|
5
|
+
function r({ colors: r, classNames: i, ...a }) {
|
|
6
|
+
return /* @__PURE__ */ n(e, {
|
|
7
|
+
colors: {
|
|
8
|
+
light: {
|
|
9
|
+
background: "#F5F5F5",
|
|
10
|
+
primary: "#0285F7",
|
|
11
|
+
primaryForeground: "#FCFCFC",
|
|
12
|
+
...r?.light
|
|
13
|
+
},
|
|
14
|
+
dark: {
|
|
15
|
+
background: "#060607",
|
|
16
|
+
primary: "#0584F6",
|
|
17
|
+
primaryForeground: "#FCFCFC",
|
|
18
|
+
...r?.dark
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
classNames: {
|
|
22
|
+
...i,
|
|
23
|
+
card: t("border-none rounded-3xl", i?.card)
|
|
24
|
+
},
|
|
25
|
+
...a
|
|
26
|
+
});
|
|
22
27
|
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { r as OtpEmail };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type { PasswordChangedEmailProps } from
|
|
1
|
+
import { PasswordChangedEmailProps } from '@better-auth-ui/react';
|
|
2
|
+
export type { PasswordChangedEmailProps } from '@better-auth-ui/react';
|
|
3
3
|
export declare function PasswordChangedEmail({ colors, classNames, ...props }: PasswordChangedEmailProps): import("react/jsx-runtime").JSX.Element;
|