@better-auth-ui/heroui 1.6.2 → 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.
Files changed (213) hide show
  1. package/dist/components/auth/additional-field.d.ts +4 -0
  2. package/dist/components/auth/additional-field.js +270 -0
  3. package/dist/components/auth/auth-provider.d.ts +4 -6
  4. package/dist/components/auth/auth-provider.js +12 -11
  5. package/dist/components/auth/auth.d.ts +1 -1
  6. package/dist/components/auth/auth.js +54 -28
  7. package/dist/components/{settings/security → auth/delete-user}/danger-zone.d.ts +3 -4
  8. package/dist/components/{settings/security → auth/delete-user}/danger-zone.js +1 -1
  9. package/dist/components/{settings/security → auth/delete-user}/delete-user.d.ts +1 -1
  10. package/dist/components/auth/delete-user/delete-user.js +95 -0
  11. package/dist/components/{email → auth/email}/email-changed-email.d.ts +2 -2
  12. package/dist/components/{email → auth/email}/email-changed-email.js +7 -7
  13. package/dist/components/{email → auth/email}/email-verification-email.d.ts +2 -2
  14. package/dist/components/{email → auth/email}/email-verification-email.js +7 -7
  15. package/dist/components/auth/email/magic-link-email.d.ts +3 -0
  16. package/dist/components/{email → auth/email}/magic-link-email.js +7 -7
  17. package/dist/components/auth/email/new-device-email.d.ts +3 -0
  18. package/dist/components/{email → auth/email}/new-device-email.js +7 -7
  19. package/dist/components/auth/email/otp-email.d.ts +3 -0
  20. package/dist/components/{email → auth/email}/otp-email.js +6 -6
  21. package/dist/components/{email → auth/email}/password-changed-email.d.ts +2 -2
  22. package/dist/components/{email → auth/email}/password-changed-email.js +7 -7
  23. package/dist/components/{email → auth/email}/reset-password-email.d.ts +2 -2
  24. package/dist/components/{email → auth/email}/reset-password-email.js +7 -7
  25. package/dist/components/auth/error-toaster.d.ts +1 -0
  26. package/dist/components/auth/error-toaster.js +17 -0
  27. package/dist/components/auth/forgot-password.d.ts +2 -2
  28. package/dist/components/auth/forgot-password.js +42 -42
  29. package/dist/components/auth/magic-link/magic-link-button.d.ts +11 -0
  30. package/dist/components/auth/magic-link/magic-link-button.js +20 -0
  31. package/dist/components/auth/magic-link/magic-link.d.ts +16 -0
  32. package/dist/components/auth/magic-link/magic-link.js +87 -0
  33. package/dist/components/{settings/account → auth/multi-session}/manage-account.d.ts +2 -6
  34. package/dist/components/auth/multi-session/manage-account.js +49 -0
  35. package/dist/components/{settings/account → auth/multi-session}/manage-accounts.d.ts +1 -1
  36. package/dist/components/auth/multi-session/manage-accounts.js +34 -0
  37. package/dist/components/{user/switch-account-menu.d.ts → auth/multi-session/switch-account-submenu-content.d.ts} +3 -3
  38. package/dist/components/auth/multi-session/switch-account-submenu-content.js +29 -0
  39. package/dist/components/{user/switch-account-item.d.ts → auth/multi-session/switch-account-submenu-item.d.ts} +2 -2
  40. package/dist/components/auth/multi-session/switch-account-submenu-item.js +20 -0
  41. package/dist/components/auth/multi-session/switch-account-submenu.d.ts +13 -0
  42. package/dist/components/auth/multi-session/switch-account-submenu.js +24 -0
  43. package/dist/components/auth/passkey/passkey-button.d.ts +6 -0
  44. package/dist/components/auth/passkey/passkey-button.js +24 -0
  45. package/dist/components/auth/passkey/passkey.js +45 -0
  46. package/dist/components/{settings/security → auth/passkey}/passkeys.d.ts +1 -1
  47. package/dist/components/auth/passkey/passkeys.js +106 -0
  48. package/dist/components/auth/provider-button.d.ts +13 -0
  49. package/dist/components/auth/provider-button.js +25 -0
  50. package/dist/components/auth/provider-buttons.d.ts +3 -10
  51. package/dist/components/auth/provider-buttons.js +14 -22
  52. package/dist/components/auth/reset-password.d.ts +1 -1
  53. package/dist/components/auth/reset-password.js +110 -110
  54. package/dist/components/{settings → auth/settings}/account/account-settings.d.ts +5 -2
  55. package/dist/components/auth/settings/account/account-settings.js +20 -0
  56. package/dist/components/auth/settings/account/change-avatar.js +89 -0
  57. package/dist/components/{settings → auth/settings}/account/change-email.d.ts +1 -1
  58. package/dist/components/{settings → auth/settings}/account/change-email.js +17 -20
  59. package/dist/components/{settings → auth/settings}/account/user-profile.d.ts +3 -4
  60. package/dist/components/auth/settings/account/user-profile.js +86 -0
  61. package/dist/components/auth/settings/security/active-session.js +59 -0
  62. package/dist/components/{settings → auth/settings}/security/active-sessions.d.ts +1 -1
  63. package/dist/components/auth/settings/security/active-sessions.js +34 -0
  64. package/dist/components/{settings → auth/settings}/security/change-password.d.ts +1 -1
  65. package/dist/components/auth/settings/security/change-password.js +189 -0
  66. package/dist/components/auth/settings/security/linked-account.js +56 -0
  67. package/dist/components/{settings → auth/settings}/security/linked-accounts.d.ts +1 -1
  68. package/dist/components/auth/settings/security/linked-accounts.js +45 -0
  69. package/dist/components/{settings → auth/settings}/security/security-settings.d.ts +1 -1
  70. package/dist/components/auth/settings/security/security-settings.js +22 -0
  71. package/dist/components/auth/settings/settings.js +45 -0
  72. package/dist/components/auth/sign-in.d.ts +1 -1
  73. package/dist/components/auth/sign-in.js +64 -100
  74. package/dist/components/auth/sign-out.js +11 -11
  75. package/dist/components/auth/sign-up.d.ts +1 -1
  76. package/dist/components/auth/sign-up.js +123 -157
  77. package/dist/components/{settings/account → auth/theme}/appearance.d.ts +3 -6
  78. package/dist/components/auth/theme/appearance.js +72 -0
  79. package/dist/components/auth/theme/theme-toggle-item.d.ts +5 -0
  80. package/dist/components/auth/theme/theme-toggle-item.js +58 -0
  81. package/dist/components/auth/user/user-avatar.js +29 -0
  82. package/dist/components/{user → auth/user}/user-button.d.ts +2 -6
  83. package/dist/components/auth/user/user-button.js +55 -0
  84. package/dist/components/auth/user/user-view.js +37 -0
  85. package/dist/components/auth/username/sign-in-username.d.ts +14 -0
  86. package/dist/components/auth/username/sign-in-username.js +142 -0
  87. package/dist/components/auth/username/username-field.d.ts +8 -0
  88. package/dist/components/auth/username/username-field.js +51 -0
  89. package/dist/email.d.ts +7 -0
  90. package/dist/email.js +9 -0
  91. package/dist/index.d.ts +13 -27
  92. package/dist/index.js +22 -36
  93. package/dist/lib/auth/auth-plugin.d.ts +44 -0
  94. package/dist/lib/auth/delete-user-plugin.d.ts +17 -0
  95. package/dist/lib/auth/delete-user-plugin.js +10 -0
  96. package/dist/lib/auth/magic-link-plugin.d.ts +31 -0
  97. package/dist/lib/auth/magic-link-plugin.js +13 -0
  98. package/dist/lib/auth/multi-session-plugin.d.ts +18 -0
  99. package/dist/lib/auth/multi-session-plugin.js +12 -0
  100. package/dist/lib/auth/passkey-plugin.d.ts +20 -0
  101. package/dist/lib/auth/passkey-plugin.js +12 -0
  102. package/dist/lib/auth/theme-plugin.d.ts +68 -0
  103. package/dist/lib/auth/theme-plugin.js +23 -0
  104. package/dist/lib/auth/username-plugin.d.ts +63 -0
  105. package/dist/lib/auth/username-plugin.js +18 -0
  106. package/dist/plugins.d.ts +20 -0
  107. package/dist/plugins.js +21 -0
  108. package/package.json +22 -22
  109. package/src/components/auth/additional-field.tsx +554 -0
  110. package/src/components/auth/auth-provider.tsx +8 -5
  111. package/src/components/auth/auth.tsx +100 -36
  112. package/src/components/{settings/security → auth/delete-user}/danger-zone.tsx +3 -10
  113. package/src/components/{settings/security → auth/delete-user}/delete-user.tsx +31 -24
  114. package/src/components/{email → auth/email}/email-changed-email.tsx +2 -2
  115. package/src/components/{email → auth/email}/email-verification-email.tsx +2 -2
  116. package/src/components/{email → auth/email}/magic-link-email.tsx +2 -2
  117. package/src/components/{email → auth/email}/new-device-email.tsx +2 -2
  118. package/src/components/{email → auth/email}/otp-email.tsx +2 -2
  119. package/src/components/{email → auth/email}/password-changed-email.tsx +2 -2
  120. package/src/components/{email → auth/email}/reset-password-email.tsx +2 -2
  121. package/src/components/auth/error-toaster.tsx +25 -0
  122. package/src/components/auth/forgot-password.tsx +15 -13
  123. package/src/components/auth/magic-link/magic-link-button.tsx +61 -0
  124. package/src/components/auth/{magic-link.tsx → magic-link/magic-link.tsx} +52 -57
  125. package/src/components/{settings/account → auth/multi-session}/manage-account.tsx +15 -15
  126. package/src/components/{settings/account → auth/multi-session}/manage-accounts.tsx +16 -12
  127. package/src/components/{user/switch-account-menu.tsx → auth/multi-session/switch-account-submenu-content.tsx} +19 -17
  128. package/src/components/{user/switch-account-item.tsx → auth/multi-session/switch-account-submenu-item.tsx} +18 -8
  129. package/src/components/auth/multi-session/switch-account-submenu.tsx +50 -0
  130. package/src/components/auth/passkey/passkey-button.tsx +56 -0
  131. package/src/components/{settings/security → auth/passkey}/passkey.tsx +21 -9
  132. package/src/components/auth/passkey/passkeys.tsx +196 -0
  133. package/src/components/auth/provider-button.tsx +65 -0
  134. package/src/components/auth/provider-buttons.tsx +23 -45
  135. package/src/components/auth/reset-password.tsx +14 -9
  136. package/src/components/{settings → auth/settings}/account/account-settings.tsx +15 -13
  137. package/src/components/{settings → auth/settings}/account/change-avatar.tsx +4 -5
  138. package/src/components/{settings → auth/settings}/account/change-email.tsx +5 -6
  139. package/src/components/auth/settings/account/user-profile.tsx +171 -0
  140. package/src/components/{settings → auth/settings}/security/active-session.tsx +8 -6
  141. package/src/components/{settings → auth/settings}/security/active-sessions.tsx +5 -10
  142. package/src/components/{settings → auth/settings}/security/change-password.tsx +22 -14
  143. package/src/components/{settings → auth/settings}/security/linked-account.tsx +10 -16
  144. package/src/components/{settings → auth/settings}/security/linked-accounts.tsx +4 -9
  145. package/src/components/{settings → auth/settings}/security/security-settings.tsx +7 -6
  146. package/src/components/{settings → auth/settings}/settings.tsx +2 -2
  147. package/src/components/auth/sign-in.tsx +39 -80
  148. package/src/components/auth/sign-out.tsx +2 -2
  149. package/src/components/auth/sign-up.tsx +110 -147
  150. package/src/components/{settings/account → auth/theme}/appearance.tsx +18 -25
  151. package/src/components/auth/theme/theme-toggle-item.tsx +110 -0
  152. package/src/components/{user → auth/user}/user-avatar.tsx +12 -4
  153. package/src/components/{user → auth/user}/user-button.tsx +15 -88
  154. package/src/components/{user → auth/user}/user-view.tsx +12 -4
  155. package/src/components/auth/username/sign-in-username.tsx +283 -0
  156. package/src/components/auth/username/username-field.tsx +122 -0
  157. package/src/email.ts +9 -0
  158. package/src/index.tsx +13 -27
  159. package/src/lib/auth/auth-plugin.ts +67 -0
  160. package/src/lib/auth/delete-user-plugin.ts +15 -0
  161. package/src/lib/auth/magic-link-plugin.ts +26 -0
  162. package/src/lib/auth/multi-session-plugin.ts +17 -0
  163. package/src/lib/auth/passkey-plugin.ts +17 -0
  164. package/src/lib/auth/theme-plugin.ts +86 -0
  165. package/src/lib/auth/username-plugin.tsx +30 -0
  166. package/src/plugins.ts +23 -0
  167. package/dist/components/auth/magic-link-button.d.ts +0 -13
  168. package/dist/components/auth/magic-link-button.js +0 -16
  169. package/dist/components/auth/magic-link.d.ts +0 -17
  170. package/dist/components/auth/magic-link.js +0 -111
  171. package/dist/components/auth/passkey-button.d.ts +0 -4
  172. package/dist/components/auth/passkey-button.js +0 -24
  173. package/dist/components/email/magic-link-email.d.ts +0 -3
  174. package/dist/components/email/new-device-email.d.ts +0 -3
  175. package/dist/components/email/otp-email.d.ts +0 -3
  176. package/dist/components/settings/account/account-settings.js +0 -23
  177. package/dist/components/settings/account/appearance.js +0 -71
  178. package/dist/components/settings/account/change-avatar.js +0 -89
  179. package/dist/components/settings/account/manage-account.js +0 -51
  180. package/dist/components/settings/account/manage-accounts.js +0 -33
  181. package/dist/components/settings/account/user-profile.js +0 -106
  182. package/dist/components/settings/security/active-session.js +0 -62
  183. package/dist/components/settings/security/active-sessions.js +0 -34
  184. package/dist/components/settings/security/change-password.js +0 -192
  185. package/dist/components/settings/security/delete-user.js +0 -97
  186. package/dist/components/settings/security/linked-account.js +0 -62
  187. package/dist/components/settings/security/linked-accounts.js +0 -45
  188. package/dist/components/settings/security/passkey.js +0 -43
  189. package/dist/components/settings/security/passkeys.js +0 -53
  190. package/dist/components/settings/security/security-settings.js +0 -25
  191. package/dist/components/settings/settings.js +0 -45
  192. package/dist/components/user/switch-account-item.js +0 -20
  193. package/dist/components/user/switch-account-menu.js +0 -28
  194. package/dist/components/user/user-avatar.js +0 -29
  195. package/dist/components/user/user-button.js +0 -91
  196. package/dist/components/user/user-view.js +0 -37
  197. package/dist/core.d.ts +0 -1
  198. package/dist/core.js +0 -1
  199. package/dist/react-exports.d.ts +0 -1
  200. package/dist/react-exports.js +0 -1
  201. package/src/components/auth/magic-link-button.tsx +0 -43
  202. package/src/components/auth/passkey-button.tsx +0 -36
  203. package/src/components/settings/account/user-profile.tsx +0 -218
  204. package/src/components/settings/security/passkeys.tsx +0 -104
  205. package/src/core.ts +0 -1
  206. package/src/react-exports.ts +0 -1
  207. /package/dist/components/{settings/security → auth/passkey}/passkey.d.ts +0 -0
  208. /package/dist/components/{settings → auth/settings}/account/change-avatar.d.ts +0 -0
  209. /package/dist/components/{settings → auth/settings}/security/active-session.d.ts +0 -0
  210. /package/dist/components/{settings → auth/settings}/security/linked-account.d.ts +0 -0
  211. /package/dist/components/{settings → auth/settings}/settings.d.ts +0 -0
  212. /package/dist/components/{user → auth/user}/user-avatar.d.ts +0 -0
  213. /package/dist/components/{user → auth/user}/user-view.d.ts +0 -0
@@ -0,0 +1,4 @@
1
+ import { AdditionalFieldProps } from '../../lib/auth/auth-plugin';
2
+ export type { AdditionalFieldProps } from '../../lib/auth/auth-plugin';
3
+ /** Renders a single additional user field via HeroUI v3 components. */
4
+ export declare function AdditionalField({ name, field, isPending, variant }: AdditionalFieldProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,270 @@
1
+ import { resolveInputType as e } from "@better-auth-ui/core";
2
+ import { useAuth as t } from "@better-auth-ui/react";
3
+ import { Check as n, Copy as r } from "@gravity-ui/icons";
4
+ import { Button as i, Calendar as a, Checkbox as o, ComboBox as s, DateField as c, DatePicker as l, FieldError as u, Input as d, InputGroup as f, Label as p, ListBox as m, NumberField as h, Select as g, Slider as _, Switch as v, TextArea as y, TextField as b, TimeField as x, toast as S } from "@heroui/react";
5
+ import { fromDate as C, getLocalTimeZone as w, parseDate as T, parseDateTime as E, toCalendarDate as D, toCalendarDateTime as O } from "@internationalized/date";
6
+ import { useRef as k, useState as A } from "react";
7
+ import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
8
+ //#region src/components/auth/additional-field.tsx
9
+ function P(e) {
10
+ if (e instanceof Date) return D(C(e, w()));
11
+ if (typeof e == "string") try {
12
+ return T(e.slice(0, 10));
13
+ } catch {
14
+ return;
15
+ }
16
+ }
17
+ function F(e) {
18
+ if (e instanceof Date) return O(C(e, w()));
19
+ if (typeof e == "string") try {
20
+ return E(e.replace(/(Z|[+-]\d{2}:?\d{2})$/, ""));
21
+ } catch {
22
+ return;
23
+ }
24
+ }
25
+ function I({ getValue: e, isDisabled: a }) {
26
+ let { localization: o } = t(), [s, c] = A(!1);
27
+ async function l() {
28
+ let t = e();
29
+ if (t) try {
30
+ await navigator.clipboard.writeText(t), c(!0), setTimeout(() => c(!1), 1500);
31
+ } catch (e) {
32
+ S.danger(e instanceof Error ? e.message : String(e));
33
+ }
34
+ }
35
+ return /* @__PURE__ */ M(i, {
36
+ isIconOnly: !0,
37
+ "aria-label": o.settings.copyToClipboard,
38
+ size: "sm",
39
+ variant: "ghost",
40
+ isDisabled: a,
41
+ onPress: l,
42
+ children: M(s ? n : r, { className: "size-4" })
43
+ });
44
+ }
45
+ function L({ name: n, field: r, isPending: i, variant: S }) {
46
+ let { localization: C } = t(), w = e(r), T = S === "transparent" ? "primary" : "secondary", E = k(null);
47
+ if (r.render) return /* @__PURE__ */ M(j, { children: r.render({
48
+ name: n,
49
+ field: r,
50
+ isPending: i,
51
+ variant: S
52
+ }) });
53
+ if (w === "hidden") return /* @__PURE__ */ M("input", {
54
+ type: "hidden",
55
+ name: n,
56
+ value: r.defaultValue == null ? "" : r.defaultValue instanceof Date ? r.defaultValue.toISOString() : String(r.defaultValue)
57
+ });
58
+ if (w === "textarea") return /* @__PURE__ */ N(b, {
59
+ name: n,
60
+ defaultValue: r.defaultValue == null ? void 0 : String(r.defaultValue),
61
+ isDisabled: i,
62
+ isReadOnly: r.readOnly,
63
+ children: [
64
+ /* @__PURE__ */ M(p, { children: r.label }),
65
+ /* @__PURE__ */ M(y, {
66
+ placeholder: r.placeholder,
67
+ required: r.required,
68
+ variant: T
69
+ }),
70
+ /* @__PURE__ */ M(u, {})
71
+ ]
72
+ });
73
+ if (w === "number") {
74
+ let e = r.formatOptions?.maximumFractionDigits;
75
+ return /* @__PURE__ */ N(h, {
76
+ name: n,
77
+ defaultValue: typeof r.defaultValue == "number" ? r.defaultValue : r.defaultValue != null && r.defaultValue !== "" ? Number(r.defaultValue) : void 0,
78
+ minValue: r.min,
79
+ maxValue: r.max,
80
+ step: r.step ?? (e ? 1 / 10 ** e : 1),
81
+ formatOptions: r.formatOptions,
82
+ isDisabled: i,
83
+ isReadOnly: r.readOnly,
84
+ variant: T,
85
+ children: [
86
+ /* @__PURE__ */ M(p, { children: r.label }),
87
+ /* @__PURE__ */ N(h.Group, { children: [
88
+ /* @__PURE__ */ M(h.DecrementButton, {}),
89
+ /* @__PURE__ */ M(h.Input, {
90
+ placeholder: r.placeholder,
91
+ required: r.required
92
+ }),
93
+ /* @__PURE__ */ M(h.IncrementButton, {})
94
+ ] }),
95
+ /* @__PURE__ */ M(u, {})
96
+ ]
97
+ });
98
+ }
99
+ if (w === "slider") {
100
+ let e = r.formatOptions?.maximumFractionDigits;
101
+ return /* @__PURE__ */ N(_, {
102
+ defaultValue: typeof r.defaultValue == "number" ? r.defaultValue : r.defaultValue == null ? void 0 : Number(r.defaultValue),
103
+ minValue: r.min ?? 0,
104
+ maxValue: r.max ?? 100,
105
+ step: r.step ?? (e ? 1 / 10 ** e : 1),
106
+ formatOptions: r.formatOptions,
107
+ isDisabled: i || r.readOnly,
108
+ className: "flex flex-col gap-2",
109
+ children: [/* @__PURE__ */ N("div", {
110
+ className: "flex items-center justify-between gap-2",
111
+ children: [/* @__PURE__ */ M(p, { children: r.label }), /* @__PURE__ */ M(_.Output, { className: "text-sm text-muted" })]
112
+ }), /* @__PURE__ */ N(_.Track, { children: [/* @__PURE__ */ M(_.Fill, {}), /* @__PURE__ */ M(_.Thumb, { name: n })] })]
113
+ });
114
+ }
115
+ if (w === "switch") return /* @__PURE__ */ N(v, {
116
+ name: n,
117
+ defaultSelected: r.defaultValue === !0 || r.defaultValue === "true",
118
+ isDisabled: i,
119
+ isReadOnly: r.readOnly,
120
+ children: [/* @__PURE__ */ M(v.Control, { children: /* @__PURE__ */ M(v.Thumb, {}) }), /* @__PURE__ */ M(p, { children: r.label })]
121
+ });
122
+ if (w === "checkbox") return /* @__PURE__ */ N(o, {
123
+ name: n,
124
+ defaultSelected: r.defaultValue === !0 || r.defaultValue === "true",
125
+ isDisabled: i,
126
+ isReadOnly: r.readOnly,
127
+ isRequired: r.required,
128
+ variant: T,
129
+ children: [/* @__PURE__ */ M(o.Control, { children: /* @__PURE__ */ M(o.Indicator, {}) }), /* @__PURE__ */ M(o.Content, { children: /* @__PURE__ */ M(p, { children: r.label }) })]
130
+ });
131
+ if (w === "select") return /* @__PURE__ */ N(g, {
132
+ className: "[&[data-required=true]>.label]:after:content-none",
133
+ name: n,
134
+ defaultValue: r.defaultValue == null ? void 0 : String(r.defaultValue),
135
+ placeholder: r.placeholder,
136
+ isDisabled: i || r.readOnly,
137
+ isRequired: r.required,
138
+ variant: T,
139
+ fullWidth: !0,
140
+ children: [
141
+ /* @__PURE__ */ M(p, { children: r.label }),
142
+ /* @__PURE__ */ N(g.Trigger, { children: [/* @__PURE__ */ M(g.Value, {}), /* @__PURE__ */ M(g.Indicator, {})] }),
143
+ /* @__PURE__ */ M(g.Popover, { children: /* @__PURE__ */ M(m, { children: r.options?.map((e) => /* @__PURE__ */ N(m.Item, {
144
+ id: e.value,
145
+ textValue: typeof e.label == "string" ? e.label : e.value,
146
+ children: [e.label, /* @__PURE__ */ M(m.ItemIndicator, {})]
147
+ }, e.value)) }) }),
148
+ /* @__PURE__ */ M(u, {})
149
+ ]
150
+ });
151
+ if (w === "combobox") return /* @__PURE__ */ N(s, {
152
+ className: "[&[data-required=true]>.label]:after:content-none",
153
+ name: n,
154
+ defaultSelectedKey: r.defaultValue == null ? void 0 : String(r.defaultValue),
155
+ isDisabled: i,
156
+ isReadOnly: r.readOnly,
157
+ isRequired: r.required,
158
+ variant: T,
159
+ fullWidth: !0,
160
+ children: [
161
+ /* @__PURE__ */ M(p, { children: r.label }),
162
+ /* @__PURE__ */ N(s.InputGroup, { children: [/* @__PURE__ */ M(d, { placeholder: r.placeholder }), /* @__PURE__ */ M(s.Trigger, {})] }),
163
+ /* @__PURE__ */ M(s.Popover, { children: /* @__PURE__ */ M(m, { children: r.options?.map((e) => /* @__PURE__ */ N(m.Item, {
164
+ id: e.value,
165
+ textValue: typeof e.label == "string" ? e.label : e.value,
166
+ children: [e.label, /* @__PURE__ */ M(m.ItemIndicator, {})]
167
+ }, e.value)) }) }),
168
+ /* @__PURE__ */ M(u, {})
169
+ ]
170
+ });
171
+ if (w === "date" || w === "datetime") {
172
+ let e = w === "datetime";
173
+ return /* @__PURE__ */ M(l, {
174
+ className: "w-full [&[data-required=true]>.label]:after:content-none",
175
+ name: n,
176
+ defaultValue: e ? F(r.defaultValue) : P(r.defaultValue),
177
+ granularity: e ? "minute" : "day",
178
+ isDisabled: i,
179
+ isReadOnly: r.readOnly,
180
+ isRequired: r.required,
181
+ children: ({ state: t }) => /* @__PURE__ */ N(j, { children: [
182
+ /* @__PURE__ */ M(p, { children: r.label }),
183
+ /* @__PURE__ */ N(c.Group, {
184
+ variant: T,
185
+ fullWidth: !0,
186
+ children: [/* @__PURE__ */ M(c.Input, { children: (e) => /* @__PURE__ */ M(c.Segment, { segment: e }) }), /* @__PURE__ */ M(c.Suffix, { children: /* @__PURE__ */ M(l.Trigger, { children: /* @__PURE__ */ M(l.TriggerIndicator, {}) }) })]
187
+ }),
188
+ /* @__PURE__ */ M(u, {}),
189
+ /* @__PURE__ */ N(l.Popover, {
190
+ className: "flex flex-col gap-3",
191
+ children: [/* @__PURE__ */ N(a, {
192
+ "aria-label": typeof r.label == "string" ? r.label : n,
193
+ children: [
194
+ /* @__PURE__ */ N(a.Header, { children: [
195
+ /* @__PURE__ */ N(a.YearPickerTrigger, { children: [/* @__PURE__ */ M(a.YearPickerTriggerHeading, {}), /* @__PURE__ */ M(a.YearPickerTriggerIndicator, {})] }),
196
+ /* @__PURE__ */ M(a.NavButton, { slot: "previous" }),
197
+ /* @__PURE__ */ M(a.NavButton, { slot: "next" })
198
+ ] }),
199
+ /* @__PURE__ */ N(a.Grid, { children: [/* @__PURE__ */ M(a.GridHeader, { children: (e) => /* @__PURE__ */ M(a.HeaderCell, { children: e }) }), /* @__PURE__ */ M(a.GridBody, { children: (e) => /* @__PURE__ */ M(a.Cell, { date: e }) })] }),
200
+ /* @__PURE__ */ M(a.YearPickerGrid, { children: /* @__PURE__ */ M(a.YearPickerGridBody, { children: ({ year: e }) => /* @__PURE__ */ M(a.YearPickerCell, { year: e }) }) })
201
+ ]
202
+ }), e && /* @__PURE__ */ N("div", {
203
+ className: "flex items-center justify-between",
204
+ children: [/* @__PURE__ */ M(p, { children: C.settings.time }), /* @__PURE__ */ M(x, {
205
+ "aria-label": C.settings.time,
206
+ granularity: "minute",
207
+ value: t.timeValue,
208
+ onChange: (e) => t.setTimeValue(e),
209
+ children: /* @__PURE__ */ M(x.Group, {
210
+ variant: "secondary",
211
+ children: /* @__PURE__ */ M(x.Input, { children: (e) => /* @__PURE__ */ M(x.Segment, { segment: e }) })
212
+ })
213
+ })]
214
+ })]
215
+ })
216
+ ] })
217
+ });
218
+ }
219
+ let D = r.prefix != null, O = r.suffix != null || r.copyable, A = r.type === "number", L = r.formatOptions?.maximumFractionDigits, R = A ? "number" : void 0, z = A ? L ? "decimal" : "numeric" : void 0, B = L ? 1 / 10 ** L : void 0;
220
+ return D || O ? /* @__PURE__ */ N(b, {
221
+ name: n,
222
+ defaultValue: r.defaultValue == null ? void 0 : String(r.defaultValue),
223
+ isDisabled: i,
224
+ isReadOnly: r.readOnly,
225
+ children: [
226
+ /* @__PURE__ */ M(p, { children: r.label }),
227
+ /* @__PURE__ */ N(f, {
228
+ variant: T,
229
+ children: [
230
+ D && /* @__PURE__ */ M(f.Prefix, { children: r.prefix }),
231
+ /* @__PURE__ */ M(f.Input, {
232
+ ref: E,
233
+ placeholder: r.placeholder,
234
+ required: r.required,
235
+ type: R,
236
+ inputMode: z,
237
+ step: B
238
+ }),
239
+ r.copyable ? /* @__PURE__ */ M(f.Suffix, {
240
+ className: "px-0",
241
+ children: /* @__PURE__ */ M(I, {
242
+ getValue: () => E.current?.value,
243
+ isDisabled: i
244
+ })
245
+ }) : r.suffix != null && /* @__PURE__ */ M(f.Suffix, { children: r.suffix })
246
+ ]
247
+ }),
248
+ /* @__PURE__ */ M(u, {})
249
+ ]
250
+ }) : /* @__PURE__ */ N(b, {
251
+ name: n,
252
+ defaultValue: r.defaultValue == null ? void 0 : String(r.defaultValue),
253
+ isDisabled: i,
254
+ isReadOnly: r.readOnly,
255
+ children: [
256
+ /* @__PURE__ */ M(p, { children: r.label }),
257
+ /* @__PURE__ */ M(d, {
258
+ placeholder: r.placeholder,
259
+ required: r.required,
260
+ variant: T,
261
+ type: R,
262
+ inputMode: z,
263
+ step: B
264
+ }),
265
+ /* @__PURE__ */ M(u, {})
266
+ ]
267
+ });
268
+ }
269
+ //#endregion
270
+ export { L as AdditionalField };
@@ -1,9 +1,7 @@
1
- import { AuthProviderProps as AuthProviderPropsPrimitive } from '@better-auth-ui/react';
2
- export type AuthProviderProps = Omit<AuthProviderPropsPrimitive, "Link">;
1
+ import { AuthClient, AuthProviderProps as AuthProviderPropsPrimitive } from '@better-auth-ui/react';
2
+ export type AuthProviderProps<TAuthClient = AuthClient> = AuthProviderPropsPrimitive<TAuthClient>;
3
3
  /**
4
- * Provides an authentication context by rendering an auth provider with the sonner toast handler injected, forwarding remaining configuration and rendering `children` inside it.
5
- *
6
- * @param children - React nodes to render inside the authentication provider
7
- * @returns A React element that renders an authentication provider configured with the provided props and toast handler
4
+ * Heroui-flavored `AuthProvider`. Wraps the primitive provider with a
5
+ * heroui `RouterProvider` and the heroui `ErrorToaster`.
8
6
  */
9
7
  export declare function AuthProvider({ children, navigate, ...config }: AuthProviderProps): import("react/jsx-runtime").JSX.Element;
@@ -1,16 +1,17 @@
1
- import { AuthProvider as e } from "@better-auth-ui/react";
2
- import { RouterProvider as t } from "@heroui/react";
3
- import { jsx as n } from "react/jsx-runtime";
1
+ import { ErrorToaster as e } from "./error-toaster.js";
2
+ import { AuthProvider as t } from "@better-auth-ui/react";
3
+ import { RouterProvider as n } from "@heroui/react";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
4
5
  //#region src/components/auth/auth-provider.tsx
5
- function r({ children: r, navigate: i, ...a }) {
6
- return /* @__PURE__ */ n(e, {
7
- navigate: i,
8
- ...a,
9
- children: /* @__PURE__ */ n(t, {
10
- navigate: (e) => i({ to: e }),
11
- children: r
6
+ function a({ children: a, navigate: o, ...s }) {
7
+ return /* @__PURE__ */ r(t, {
8
+ navigate: o,
9
+ ...s,
10
+ children: /* @__PURE__ */ i(n, {
11
+ navigate: (e) => o({ to: e }),
12
+ children: [a, /* @__PURE__ */ r(e, {})]
12
13
  })
13
14
  });
14
15
  }
15
16
  //#endregion
16
- export { r as AuthProvider };
17
+ export { a as AuthProvider };
@@ -20,4 +20,4 @@ export type AuthProps = {
20
20
  * @param view - Explicit auth view to render (e.g., "signIn", "signUp")
21
21
  * @returns The React element for the resolved authentication view
22
22
  */
23
- export declare function Auth({ path, socialLayout, socialPosition, view, ...props }: AuthProps & CardProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function Auth({ path, socialLayout, socialPosition, view, ...props }: AuthProps & Omit<CardProps, "children">): import("react/jsx-runtime").JSX.Element | null;
@@ -1,37 +1,63 @@
1
1
  import { ForgotPassword as e } from "./forgot-password.js";
2
- import { MagicLink as t } from "./magic-link.js";
3
- import { ResetPassword as n } from "./reset-password.js";
4
- import { SignIn as r } from "./sign-in.js";
5
- import { SignOut as i } from "./sign-out.js";
6
- import { SignUp as a } from "./sign-up.js";
7
- import { useAuth as o } from "@better-auth-ui/react";
2
+ import { ResetPassword as t } from "./reset-password.js";
3
+ import { SignIn as n } from "./sign-in.js";
4
+ import { SignOut as r } from "./sign-out.js";
5
+ import { SignUp as i } from "./sign-up.js";
6
+ import { useAuth as a } from "@better-auth-ui/react";
7
+ import { useEffect as o } from "react";
8
8
  import { jsx as s } from "react/jsx-runtime";
9
9
  //#region src/components/auth/auth.tsx
10
- function c({ path: c, socialLayout: l, socialPosition: u, view: d, ...f }) {
11
- let { viewPaths: p } = o();
12
- if (!d && !c) throw Error("[Better Auth UI] Either `view` or `path` must be provided");
13
- let m = Object.fromEntries(Object.entries(p.auth).map(([e, t]) => [t, e]));
14
- switch (d || (c ? m[c] : void 0)) {
15
- case "signIn": return /* @__PURE__ */ s(r, {
16
- socialLayout: l,
17
- socialPosition: u,
18
- ...f
10
+ var c = [
11
+ "signUp",
12
+ "forgotPassword",
13
+ "resetPassword"
14
+ ], l = {
15
+ signIn: n,
16
+ signOut: r,
17
+ signUp: i,
18
+ forgotPassword: e,
19
+ resetPassword: t
20
+ };
21
+ function u({ path: e, socialLayout: t, socialPosition: n, view: r, ...i }) {
22
+ let { basePaths: u, emailAndPassword: d, plugins: f, viewPaths: p, navigate: m } = a();
23
+ if (!r && !e) throw Error("[Better Auth UI] Either `view` or `path` must be provided");
24
+ let h = r || Object.keys(p.auth).find((t) => p.auth[t] === e), g = !d?.enabled && h && c.includes(h);
25
+ if (o(() => {
26
+ g && m({
27
+ to: `${u.auth}/${p.auth.signIn}`,
28
+ replace: !0
19
29
  });
20
- case "signUp": return /* @__PURE__ */ s(a, {
21
- socialLayout: l,
22
- socialPosition: u,
23
- ...f
30
+ }, [
31
+ g,
32
+ m,
33
+ u.auth,
34
+ p.auth.signIn
35
+ ]), g) return null;
36
+ for (let a of f) {
37
+ let o = a.viewPaths?.auth, c = r ?? h ?? (o && Object.keys(o).find((t) => o[t] === e));
38
+ if (!c) continue;
39
+ let l = a.views?.auth?.[c];
40
+ if (l) return /* @__PURE__ */ s(l, {
41
+ socialLayout: t,
42
+ socialPosition: n,
43
+ ...i
24
44
  });
25
- case "magicLink": return /* @__PURE__ */ s(t, {
26
- socialLayout: l,
27
- socialPosition: u,
28
- ...f
45
+ }
46
+ if (h === "signIn" && !d?.enabled) {
47
+ let e = f.find((e) => e.fallbackViews?.auth?.signIn)?.fallbackViews?.auth?.signIn;
48
+ if (e) return /* @__PURE__ */ s(e, {
49
+ socialLayout: t,
50
+ socialPosition: n,
51
+ ...i
29
52
  });
30
- case "forgotPassword": return /* @__PURE__ */ s(e, { ...f });
31
- case "resetPassword": return /* @__PURE__ */ s(n, { ...f });
32
- case "signOut": return /* @__PURE__ */ s(i, { ...f });
33
- default: throw Error(`[Better Auth UI] Valid views are: ${Object.keys(p.auth).join(", ")}`);
34
53
  }
54
+ let _ = h ? l[h] : void 0;
55
+ if (!_) throw Error(`[Better Auth UI] Unknown view "${h}". Valid views are: ${Object.keys(l).join(", ")}`);
56
+ return /* @__PURE__ */ s(_, {
57
+ socialLayout: t,
58
+ socialPosition: n,
59
+ ...i
60
+ });
35
61
  }
36
62
  //#endregion
37
- export { c as Auth };
63
+ export { u as Auth };
@@ -1,11 +1,10 @@
1
1
  import { CardProps } from '@heroui/react';
2
2
  import { ComponentProps } from 'react';
3
- export type DangerZoneProps = {
4
- className?: string;
3
+ export type DangerZoneProps = Omit<ComponentProps<"div">, "children"> & {
5
4
  variant?: CardProps["variant"];
6
5
  };
7
6
  /**
8
7
  * Renders the danger zone heading and {@link DeleteUser}.
9
- * Gate with `deleteUser.enabled` at the call site (e.g. {@link SecuritySettings}).
8
+ * Registered as a `securityCard` by `deleteUserPlugin()`; gate by registering the plugin.
10
9
  */
11
- export declare function DangerZone({ className, variant, ...props }: DangerZoneProps & ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
10
+ export declare function DangerZone({ className, variant, ...props }: DangerZoneProps): import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import { DeleteUser as e } from "./delete-user.js";
2
2
  import { useAuth as t } from "@better-auth-ui/react";
3
3
  import { cn as n } from "@heroui/react";
4
4
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
- //#region src/components/settings/security/danger-zone.tsx
5
+ //#region src/components/auth/delete-user/danger-zone.tsx
6
6
  function a({ className: a, variant: o, ...s }) {
7
7
  let { localization: c } = t();
8
8
  return /* @__PURE__ */ i("div", {
@@ -6,4 +6,4 @@ export type DeleteUserProps = {
6
6
  /**
7
7
  * Danger-zone card to delete the authenticated account, with a confirmation dialog and toasts.
8
8
  */
9
- export declare function DeleteUser({ className, variant, ...props }: DeleteUserProps & CardProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function DeleteUser({ className, variant, ...props }: DeleteUserProps & Omit<CardProps, "children">): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,95 @@
1
+ import { deleteUserPlugin as e } from "../../../lib/auth/delete-user-plugin.js";
2
+ import { authQueryKeys as t } from "@better-auth-ui/core";
3
+ import { useAuth as n, useAuthPlugin as r, useDeleteUser as i, useListAccounts as a } from "@better-auth-ui/react";
4
+ import { TriangleExclamation as o } from "@gravity-ui/icons";
5
+ import { AlertDialog as s, Button as c, Card as l, FieldError as u, Form as d, Input as f, Label as p, Spinner as m, TextField as h, cn as g, toast as _ } from "@heroui/react";
6
+ import { useState as v } from "react";
7
+ import { jsx as y, jsxs as b } from "react/jsx-runtime";
8
+ import { useQueryClient as x } from "@tanstack/react-query";
9
+ //#region src/components/auth/delete-user/delete-user.tsx
10
+ function S({ className: S, variant: C, ...w }) {
11
+ let { authClient: T, basePaths: E, localization: D, navigate: O, viewPaths: k } = n(), { localization: A, sendDeleteAccountVerification: j } = r(e), { data: M } = a(T), N = x(), [P, F] = v(!1), [I, L] = v(""), R = M?.some((e) => e.providerId === "credential"), z = !j && R, { mutate: B, isPending: V } = i(T), H = (e) => {
12
+ F(e), L("");
13
+ }, U = async (e) => {
14
+ e.preventDefault(), B({ ...z ? { password: I } : {} }, { onSuccess: () => {
15
+ F(!1), L(""), j ? _.success(A.deleteUserVerificationSent) : (_.success(A.deleteUserSuccess), N.removeQueries({ queryKey: t.all }), O({
16
+ to: `${E.auth}/${k.auth.signIn}`,
17
+ replace: !0
18
+ }));
19
+ } });
20
+ };
21
+ return /* @__PURE__ */ y(l, {
22
+ className: g("border border-danger", S),
23
+ variant: C,
24
+ ...w,
25
+ children: /* @__PURE__ */ b(l.Content, {
26
+ className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
27
+ children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
28
+ className: "text-sm font-medium leading-tight",
29
+ children: A.deleteUser
30
+ }), /* @__PURE__ */ y("p", {
31
+ className: "text-muted text-xs mt-0.5",
32
+ children: A.deleteUserDescription
33
+ })] }), /* @__PURE__ */ b(s, { children: [/* @__PURE__ */ y(c, {
34
+ isDisabled: !M,
35
+ size: "sm",
36
+ variant: "danger",
37
+ onPress: () => F(!0),
38
+ children: A.deleteUser
39
+ }), /* @__PURE__ */ y(s.Backdrop, {
40
+ isOpen: P,
41
+ onOpenChange: H,
42
+ children: /* @__PURE__ */ y(s.Container, { children: /* @__PURE__ */ y(s.Dialog, { children: /* @__PURE__ */ b(d, {
43
+ onSubmit: U,
44
+ children: [
45
+ /* @__PURE__ */ y(s.CloseTrigger, {}),
46
+ /* @__PURE__ */ b(s.Header, { children: [/* @__PURE__ */ y(s.Icon, {
47
+ status: "danger",
48
+ children: /* @__PURE__ */ y(o, {})
49
+ }), /* @__PURE__ */ y(s.Heading, { children: A.deleteUser })] }),
50
+ /* @__PURE__ */ b(s.Body, {
51
+ className: "overflow-visible",
52
+ children: [/* @__PURE__ */ y("p", {
53
+ className: "text-muted text-sm",
54
+ children: A.deleteUserDescription
55
+ }), z && /* @__PURE__ */ b(h, {
56
+ className: "mt-4",
57
+ name: "password",
58
+ type: "password",
59
+ isDisabled: V,
60
+ value: I,
61
+ onChange: L,
62
+ children: [
63
+ /* @__PURE__ */ y(p, { children: D.auth.password }),
64
+ /* @__PURE__ */ y(f, {
65
+ autoComplete: "current-password",
66
+ placeholder: D.auth.passwordPlaceholder,
67
+ required: !0,
68
+ variant: "secondary"
69
+ }),
70
+ /* @__PURE__ */ y(u, {})
71
+ ]
72
+ })]
73
+ }),
74
+ /* @__PURE__ */ b(s.Footer, { children: [/* @__PURE__ */ y(c, {
75
+ slot: "close",
76
+ variant: "tertiary",
77
+ isDisabled: V,
78
+ children: D.settings.cancel
79
+ }), /* @__PURE__ */ b(c, {
80
+ type: "submit",
81
+ variant: "danger",
82
+ isPending: V,
83
+ children: [V && /* @__PURE__ */ y(m, {
84
+ color: "current",
85
+ size: "sm"
86
+ }), A.deleteUser]
87
+ })] })
88
+ ]
89
+ }) }) })
90
+ })] })]
91
+ })
92
+ });
93
+ }
94
+ //#endregion
95
+ export { S as DeleteUser };
@@ -1,3 +1,3 @@
1
- import { EmailChangedEmailProps } from '@better-auth-ui/react';
2
- export type { EmailChangedEmailProps } from '@better-auth-ui/react';
1
+ import { EmailChangedEmailProps } from '@better-auth-ui/react/email';
2
+ export type { EmailChangedEmailProps } from '@better-auth-ui/react/email';
3
3
  export declare function EmailChangedEmail({ colors, classNames, ...props }: EmailChangedEmailProps): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,9 @@
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
1
+ import { cn as e } from "@heroui/react";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import { EmailChangedEmail as n } from "@better-auth-ui/react/email";
4
+ //#region src/components/auth/email/email-changed-email.tsx
5
5
  function r({ colors: r, classNames: i, ...a }) {
6
- return /* @__PURE__ */ n(e, {
6
+ return /* @__PURE__ */ t(n, {
7
7
  colors: {
8
8
  light: {
9
9
  background: "#F5F5F5",
@@ -20,8 +20,8 @@ function r({ colors: r, classNames: i, ...a }) {
20
20
  },
21
21
  classNames: {
22
22
  ...i,
23
- card: t("border-none rounded-3xl", i?.card),
24
- button: t("rounded-full", i?.button)
23
+ card: e("border-none rounded-3xl", i?.card),
24
+ button: e("rounded-full", i?.button)
25
25
  },
26
26
  ...a
27
27
  });
@@ -1,3 +1,3 @@
1
- import { EmailVerificationEmailProps } from '@better-auth-ui/react';
2
- export type { EmailVerificationEmailProps } from '@better-auth-ui/react';
1
+ import { EmailVerificationEmailProps } from '@better-auth-ui/react/email';
2
+ export type { EmailVerificationEmailProps } from '@better-auth-ui/react/email';
3
3
  export declare function EmailVerificationEmail({ colors, classNames, ...props }: EmailVerificationEmailProps): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,9 @@
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
1
+ import { cn as e } from "@heroui/react";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import { EmailVerificationEmail as n } from "@better-auth-ui/react/email";
4
+ //#region src/components/auth/email/email-verification-email.tsx
5
5
  function r({ colors: r, classNames: i, ...a }) {
6
- return /* @__PURE__ */ n(e, {
6
+ return /* @__PURE__ */ t(n, {
7
7
  colors: {
8
8
  light: {
9
9
  background: "#F5F5F5",
@@ -20,8 +20,8 @@ function r({ colors: r, classNames: i, ...a }) {
20
20
  },
21
21
  classNames: {
22
22
  ...i,
23
- card: t("border-none rounded-3xl", i?.card),
24
- button: t("rounded-full", i?.button)
23
+ card: e("border-none rounded-3xl", i?.card),
24
+ button: e("rounded-full", i?.button)
25
25
  },
26
26
  ...a
27
27
  });
@@ -0,0 +1,3 @@
1
+ import { MagicLinkEmailProps } from '@better-auth-ui/react/email';
2
+ export type { MagicLinkEmailProps } from '@better-auth-ui/react/email';
3
+ export declare function MagicLinkEmail({ colors, classNames, ...props }: MagicLinkEmailProps): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,9 @@
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
1
+ import { cn as e } from "@heroui/react";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import { MagicLinkEmail as n } from "@better-auth-ui/react/email";
4
+ //#region src/components/auth/email/magic-link-email.tsx
5
5
  function r({ colors: r, classNames: i, ...a }) {
6
- return /* @__PURE__ */ n(e, {
6
+ return /* @__PURE__ */ t(n, {
7
7
  colors: {
8
8
  light: {
9
9
  background: "#F5F5F5",
@@ -20,8 +20,8 @@ function r({ colors: r, classNames: i, ...a }) {
20
20
  },
21
21
  classNames: {
22
22
  ...i,
23
- card: t("border-none rounded-3xl", i?.card),
24
- button: t("rounded-full", i?.button)
23
+ card: e("border-none rounded-3xl", i?.card),
24
+ button: e("rounded-full", i?.button)
25
25
  },
26
26
  ...a
27
27
  });
@@ -0,0 +1,3 @@
1
+ import { NewDeviceEmailProps } from '@better-auth-ui/react/email';
2
+ export type { NewDeviceEmailProps } from '@better-auth-ui/react/email';
3
+ export declare function NewDeviceEmail({ colors, classNames, ...props }: NewDeviceEmailProps): import("react/jsx-runtime").JSX.Element;