@better-auth-ui/heroui 1.6.1 → 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.
Files changed (89) hide show
  1. package/dist/components/auth/auth-provider.d.ts +1 -1
  2. package/dist/components/auth/auth-provider.js +15 -11
  3. package/dist/components/auth/auth.d.ts +3 -3
  4. package/dist/components/auth/auth.js +36 -41
  5. package/dist/components/auth/field-separator.d.ts +1 -1
  6. package/dist/components/auth/field-separator.js +17 -4
  7. package/dist/components/auth/forgot-password.d.ts +1 -1
  8. package/dist/components/auth/forgot-password.js +69 -27
  9. package/dist/components/auth/magic-link-button.d.ts +1 -1
  10. package/dist/components/auth/magic-link-button.js +15 -18
  11. package/dist/components/auth/magic-link.d.ts +2 -2
  12. package/dist/components/auth/magic-link.js +110 -43
  13. package/dist/components/auth/passkey-button.js +23 -12
  14. package/dist/components/auth/provider-buttons.d.ts +1 -1
  15. package/dist/components/auth/provider-buttons.js +26 -33
  16. package/dist/components/auth/reset-password.d.ts +1 -1
  17. package/dist/components/auth/reset-password.js +146 -57
  18. package/dist/components/auth/sign-in.d.ts +2 -2
  19. package/dist/components/auth/sign-in.js +163 -64
  20. package/dist/components/auth/sign-out.js +26 -32
  21. package/dist/components/auth/sign-up.d.ts +2 -2
  22. package/dist/components/auth/sign-up.js +240 -70
  23. package/dist/components/email/email-changed-email.d.ts +2 -2
  24. package/dist/components/email/email-changed-email.js +29 -22
  25. package/dist/components/email/email-verification-email.d.ts +2 -2
  26. package/dist/components/email/email-verification-email.js +29 -22
  27. package/dist/components/email/magic-link-email.d.ts +2 -2
  28. package/dist/components/email/magic-link-email.js +29 -22
  29. package/dist/components/email/new-device-email.d.ts +2 -2
  30. package/dist/components/email/new-device-email.js +29 -22
  31. package/dist/components/email/otp-email.d.ts +2 -2
  32. package/dist/components/email/otp-email.js +28 -21
  33. package/dist/components/email/password-changed-email.d.ts +2 -2
  34. package/dist/components/email/password-changed-email.js +29 -22
  35. package/dist/components/email/reset-password-email.d.ts +2 -2
  36. package/dist/components/email/reset-password-email.js +29 -22
  37. package/dist/components/settings/account/account-settings.d.ts +2 -2
  38. package/dist/components/settings/account/account-settings.js +22 -19
  39. package/dist/components/settings/account/appearance.d.ts +1 -1
  40. package/dist/components/settings/account/appearance.js +70 -27
  41. package/dist/components/settings/account/change-avatar.js +88 -55
  42. package/dist/components/settings/account/change-email.d.ts +1 -1
  43. package/dist/components/settings/account/change-email.js +56 -28
  44. package/dist/components/settings/account/manage-account.d.ts +1 -1
  45. package/dist/components/settings/account/manage-account.js +50 -31
  46. package/dist/components/settings/account/manage-accounts.d.ts +1 -1
  47. package/dist/components/settings/account/manage-accounts.js +32 -36
  48. package/dist/components/settings/account/user-profile.d.ts +3 -3
  49. package/dist/components/settings/account/user-profile.js +105 -22
  50. package/dist/components/settings/security/active-session.d.ts +1 -1
  51. package/dist/components/settings/security/active-session.js +60 -51
  52. package/dist/components/settings/security/active-sessions.d.ts +1 -1
  53. package/dist/components/settings/security/active-sessions.js +32 -26
  54. package/dist/components/settings/security/change-password.d.ts +1 -1
  55. package/dist/components/settings/security/change-password.js +189 -76
  56. package/dist/components/settings/security/danger-zone.d.ts +2 -2
  57. package/dist/components/settings/security/danger-zone.js +17 -11
  58. package/dist/components/settings/security/delete-user.d.ts +1 -1
  59. package/dist/components/settings/security/delete-user.js +96 -46
  60. package/dist/components/settings/security/linked-account.d.ts +1 -1
  61. package/dist/components/settings/security/linked-account.js +61 -47
  62. package/dist/components/settings/security/linked-accounts.d.ts +1 -1
  63. package/dist/components/settings/security/linked-accounts.js +43 -40
  64. package/dist/components/settings/security/passkey.js +42 -13
  65. package/dist/components/settings/security/passkeys.d.ts +1 -1
  66. package/dist/components/settings/security/passkeys.js +51 -19
  67. package/dist/components/settings/security/security-settings.d.ts +2 -2
  68. package/dist/components/settings/security/security-settings.js +24 -21
  69. package/dist/components/settings/settings.d.ts +3 -3
  70. package/dist/components/settings/settings.js +44 -27
  71. package/dist/components/user/switch-account-item.d.ts +1 -1
  72. package/dist/components/user/switch-account-item.js +19 -15
  73. package/dist/components/user/switch-account-menu.js +27 -28
  74. package/dist/components/user/user-avatar.d.ts +3 -3
  75. package/dist/components/user/user-avatar.js +28 -30
  76. package/dist/components/user/user-button.d.ts +1 -1
  77. package/dist/components/user/user-button.js +90 -23
  78. package/dist/components/user/user-view.d.ts +3 -3
  79. package/dist/components/user/user-view.js +36 -23
  80. package/dist/core.d.ts +1 -1
  81. package/dist/index.d.ts +35 -35
  82. package/dist/index.js +36 -35
  83. package/dist/react-exports.d.ts +1 -1
  84. package/package.json +12 -10
  85. package/src/components/auth/auth.tsx +1 -1
  86. package/src/components/auth/sign-in.tsx +63 -30
  87. package/src/components/auth/sign-up.tsx +97 -3
  88. package/src/components/settings/account/user-profile.tsx +121 -6
  89. package/src/components/settings/settings.tsx +1 -1
@@ -1,71 +1,241 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useAuth, useSignInSocial, useSignUpEmail } from "@better-auth-ui/react";
3
- import { Eye, EyeSlash } from "@gravity-ui/icons";
4
- import { Button, Card, cn, Description, FieldError, Form, Input, InputGroup, Label, Link, Spinner, TextField, toast } from "@heroui/react";
5
- import { useState } from "react";
6
- import { FieldSeparator } from "./field-separator";
7
- import { MagicLinkButton } from "./magic-link-button";
8
- import { ProviderButtons } from "./provider-buttons";
9
- /**
10
- * Render a sign-up form with name, email, password (and optional confirm password) fields, optional social provider buttons, and password visibility controls.
11
- *
12
- * The component reflects request state by disabling inputs and showing a pending indicator during sign-up or social sign-in.
13
- *
14
- * @param className - Additional CSS classes applied to the outer card container
15
- * @param socialLayout - Social layout to apply to the provider buttons component
16
- * @param socialPosition - Position of social provider buttons relative to the form; `"top"` or `"bottom"` (default `"bottom"`)
17
- * @returns The sign-up form React element
18
- */
19
- export function SignUp({ className, socialLayout, socialPosition = "bottom", variant, ...props }) {
20
- const { basePaths, emailAndPassword, localization, magicLink, redirectTo, socialProviders, viewPaths, navigate } = useAuth();
21
- const [password, setPassword] = useState("");
22
- const [confirmPassword, setConfirmPassword] = useState("");
23
- const { mutate: signUpEmail, isPending: signUpPending } = useSignUpEmail({
24
- onError: (error) => {
25
- setPassword("");
26
- setConfirmPassword("");
27
- toast.danger(error.error?.message || error.message);
28
- },
29
- onSuccess: () => {
30
- if (emailAndPassword?.requireEmailVerification) {
31
- toast.success(localization.auth.verifyYourEmail);
32
- navigate({ to: `${basePaths.auth}/${viewPaths.auth.signIn}` });
33
- }
34
- else {
35
- navigate({ to: redirectTo });
36
- }
37
- }
38
- });
39
- const [socialRedirecting, setSocialRedirecting] = useState(false);
40
- const { mutate: signInSocial, isPending: socialPending } = useSignInSocial({
41
- onError: (error) => toast.danger(error.error?.message || error.message),
42
- onSuccess: () => {
43
- setSocialRedirecting(true);
44
- setTimeout(() => {
45
- setSocialRedirecting(false);
46
- }, 5000);
47
- }
48
- });
49
- const [isPasswordVisible, setIsPasswordVisible] = useState(false);
50
- const [isConfirmPasswordVisible, setIsConfirmPasswordVisible] = useState(false);
51
- const isPending = signUpPending || socialPending || socialRedirecting;
52
- const handleSubmit = (e) => {
53
- e.preventDefault();
54
- const formData = new FormData(e.currentTarget);
55
- const name = formData.get("name");
56
- const email = formData.get("email");
57
- if (emailAndPassword?.confirmPassword && password !== confirmPassword) {
58
- toast.danger(localization.auth.passwordsDoNotMatch);
59
- setPassword("");
60
- setConfirmPassword("");
61
- return;
62
- }
63
- signUpEmail({ name, email, password });
64
- };
65
- const showSeparator = emailAndPassword?.enabled && !!socialProviders?.length;
66
- return (_jsxs(Card, { className: cn("w-full max-w-sm p-4 md:p-6", className), variant: variant, ...props, children: [_jsx(Card.Header, { children: _jsx(Card.Title, { className: "text-xl font-semibold mb-1", children: localization.auth.signUp }) }), _jsxs(Card.Content, { className: "gap-4", children: [socialPosition === "top" && (_jsxs(_Fragment, { children: [!!socialProviders?.length && (_jsx(ProviderButtons, { isPending: isPending, socialLayout: socialLayout, signInSocial: signInSocial })), showSeparator && (_jsx(FieldSeparator, { children: localization.auth.or }))] })), emailAndPassword?.enabled && (_jsxs(Form, { onSubmit: handleSubmit, className: "flex flex-col gap-4", children: [_jsxs(TextField, { name: "name", type: "text", autoComplete: "name", isDisabled: isPending, children: [_jsx(Label, { children: localization.auth.name }), _jsx(Input, { placeholder: localization.auth.namePlaceholder, required: true, variant: variant === "transparent" ? "primary" : "secondary" }), _jsx(FieldError, {})] }), _jsxs(TextField, { name: "email", type: "email", autoComplete: "email", isDisabled: isPending, children: [_jsx(Label, { children: localization.auth.email }), _jsx(Input, { placeholder: localization.auth.emailPlaceholder, required: true, variant: variant === "transparent" ? "primary" : "secondary" }), _jsx(FieldError, {})] }), _jsxs(TextField, { minLength: emailAndPassword?.minPasswordLength, maxLength: emailAndPassword?.maxPasswordLength, name: "password", autoComplete: "new-password", isDisabled: isPending, value: password, onChange: setPassword, children: [_jsx(Label, { children: localization.auth.password }), _jsxs(InputGroup, { variant: variant === "transparent" ? "primary" : "secondary", children: [_jsx(InputGroup.Input, { placeholder: localization.auth.passwordPlaceholder, type: isPasswordVisible ? "text" : "password", name: "password", required: true }), _jsx(InputGroup.Suffix, { className: "px-0", children: _jsx(Button, { isIconOnly: true, "aria-label": isPasswordVisible
67
- ? localization.auth.hidePassword
68
- : localization.auth.showPassword, size: "sm", variant: "ghost", onPress: () => setIsPasswordVisible(!isPasswordVisible), isDisabled: isPending, children: isPasswordVisible ? _jsx(EyeSlash, {}) : _jsx(Eye, {}) }) })] }), _jsx(FieldError, {})] }), emailAndPassword?.confirmPassword && (_jsxs(TextField, { minLength: emailAndPassword?.minPasswordLength, maxLength: emailAndPassword?.maxPasswordLength, name: "confirmPassword", autoComplete: "new-password", isDisabled: isPending, value: confirmPassword, onChange: setConfirmPassword, children: [_jsx(Label, { children: localization.auth.confirmPassword }), _jsxs(InputGroup, { variant: variant === "transparent" ? "primary" : "secondary", children: [_jsx(InputGroup.Input, { name: "confirmPassword", placeholder: localization.auth.confirmPasswordPlaceholder, type: isConfirmPasswordVisible ? "text" : "password", required: true }), _jsx(InputGroup.Suffix, { className: "px-0", children: _jsx(Button, { isIconOnly: true, "aria-label": isConfirmPasswordVisible
69
- ? localization.auth.hidePassword
70
- : localization.auth.showPassword, size: "sm", variant: "ghost", onPress: () => setIsConfirmPasswordVisible(!isConfirmPasswordVisible), isDisabled: isPending, children: isConfirmPasswordVisible ? _jsx(EyeSlash, {}) : _jsx(Eye, {}) }) })] }), _jsx(FieldError, {})] })), _jsxs("div", { className: "flex flex-col gap-3", children: [_jsxs(Button, { type: "submit", className: "w-full", isPending: isPending, children: [isPending && _jsx(Spinner, { color: "current", size: "sm" }), localization.auth.signUp] }), magicLink && (_jsx(MagicLinkButton, { view: "signUp", isPending: isPending }))] })] })), socialPosition === "bottom" && (_jsxs(_Fragment, { children: [showSeparator && (_jsx(FieldSeparator, { children: localization.auth.or })), !!socialProviders?.length && (_jsx(ProviderButtons, { socialLayout: socialLayout, signInSocial: signInSocial, isPending: isPending }))] }))] }), _jsx(Card.Footer, { className: "flex-col", children: _jsxs(Description, { className: "text-sm", children: [localization.auth.alreadyHaveAnAccount, " ", _jsx(Link, { href: `${basePaths.auth}/${viewPaths.auth.signIn}`, className: "text-accent decoration-accent no-underline hover:underline", children: localization.auth.signIn })] }) })] }));
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 { type EmailChangedEmailProps } from "@better-auth-ui/react";
2
- export type { EmailChangedEmailProps } from "@better-auth-ui/react";
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 { jsx as _jsx } from "react/jsx-runtime";
2
- import { EmailChangedEmail as EmailChangedEmailPrimitive } from "@better-auth-ui/react";
3
- import { cn } from "@heroui/react";
4
- export function EmailChangedEmail({ colors, classNames, ...props }) {
5
- return (_jsx(EmailChangedEmailPrimitive, { colors: {
6
- light: {
7
- background: "#F5F5F5",
8
- primary: "#0285F7",
9
- primaryForeground: "#FCFCFC",
10
- ...colors?.light
11
- },
12
- dark: {
13
- background: "#060607",
14
- primary: "#0584F6",
15
- primaryForeground: "#FCFCFC",
16
- ...colors?.dark
17
- }
18
- }, classNames: {
19
- ...classNames,
20
- card: cn("border-none rounded-3xl", classNames?.card),
21
- button: cn("rounded-full", classNames?.button)
22
- }, ...props }));
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 { type EmailVerificationEmailProps } from "@better-auth-ui/react";
2
- export type { EmailVerificationEmailProps } from "@better-auth-ui/react";
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 { jsx as _jsx } from "react/jsx-runtime";
2
- import { EmailVerificationEmail as EmailVerificationEmailPrimitive } from "@better-auth-ui/react";
3
- import { cn } from "@heroui/react";
4
- export function EmailVerificationEmail({ colors, classNames, ...props }) {
5
- return (_jsx(EmailVerificationEmailPrimitive, { colors: {
6
- light: {
7
- background: "#F5F5F5",
8
- primary: "#0285F7",
9
- primaryForeground: "#FCFCFC",
10
- ...colors?.light
11
- },
12
- dark: {
13
- background: "#060607",
14
- primary: "#0584F6",
15
- primaryForeground: "#FCFCFC",
16
- ...colors?.dark
17
- }
18
- }, classNames: {
19
- ...classNames,
20
- card: cn("border-none rounded-3xl", classNames?.card),
21
- button: cn("rounded-full", classNames?.button)
22
- }, ...props }));
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 { type MagicLinkEmailProps } from "@better-auth-ui/react";
2
- export type { MagicLinkEmailProps } from "@better-auth-ui/react";
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 { jsx as _jsx } from "react/jsx-runtime";
2
- import { MagicLinkEmail as MagicLinkEmailPrimitive } from "@better-auth-ui/react";
3
- import { cn } from "@heroui/react";
4
- export function MagicLinkEmail({ colors, classNames, ...props }) {
5
- return (_jsx(MagicLinkEmailPrimitive, { colors: {
6
- light: {
7
- background: "#F5F5F5",
8
- primary: "#0285F7",
9
- primaryForeground: "#FCFCFC",
10
- ...colors?.light
11
- },
12
- dark: {
13
- background: "#060607",
14
- primary: "#0584F6",
15
- primaryForeground: "#FCFCFC",
16
- ...colors?.dark
17
- }
18
- }, classNames: {
19
- ...classNames,
20
- card: cn("border-none rounded-3xl", classNames?.card),
21
- button: cn("rounded-full", classNames?.button)
22
- }, ...props }));
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 { type NewDeviceEmailProps } from "@better-auth-ui/react";
2
- export type { NewDeviceEmailProps } from "@better-auth-ui/react";
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 { jsx as _jsx } from "react/jsx-runtime";
2
- import { NewDeviceEmail as NewDeviceEmailPrimitive } from "@better-auth-ui/react";
3
- import { cn } from "@heroui/react";
4
- export function NewDeviceEmail({ colors, classNames, ...props }) {
5
- return (_jsx(NewDeviceEmailPrimitive, { colors: {
6
- light: {
7
- background: "#F5F5F5",
8
- primary: "#0285F7",
9
- primaryForeground: "#FCFCFC",
10
- ...colors?.light
11
- },
12
- dark: {
13
- background: "#060607",
14
- primary: "#0584F6",
15
- primaryForeground: "#FCFCFC",
16
- ...colors?.dark
17
- }
18
- }, classNames: {
19
- ...classNames,
20
- card: cn("border-none rounded-3xl", classNames?.card),
21
- button: cn("rounded-full", classNames?.button)
22
- }, ...props }));
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 { type OtpEmailProps } from "@better-auth-ui/react";
2
- export type { OtpEmailProps } from "@better-auth-ui/react";
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 { jsx as _jsx } from "react/jsx-runtime";
2
- import { OtpEmail as OtpEmailPrimitive } from "@better-auth-ui/react";
3
- import { cn } from "@heroui/react";
4
- export function OtpEmail({ colors, classNames, ...props }) {
5
- return (_jsx(OtpEmailPrimitive, { colors: {
6
- light: {
7
- background: "#F5F5F5",
8
- primary: "#0285F7",
9
- primaryForeground: "#FCFCFC",
10
- ...colors?.light
11
- },
12
- dark: {
13
- background: "#060607",
14
- primary: "#0584F6",
15
- primaryForeground: "#FCFCFC",
16
- ...colors?.dark
17
- }
18
- }, classNames: {
19
- ...classNames,
20
- card: cn("border-none rounded-3xl", classNames?.card)
21
- }, ...props }));
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 { type PasswordChangedEmailProps } from "@better-auth-ui/react";
2
- export type { PasswordChangedEmailProps } from "@better-auth-ui/react";
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;