@better-auth-ui/react 1.6.1 → 1.6.3

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 (302) hide show
  1. package/dist/components/auth/auth-provider.d.ts +4 -3
  2. package/dist/components/auth/auth-provider.js +24 -40
  3. package/dist/components/email/email-changed.d.ts +2 -2
  4. package/dist/components/email/email-changed.js +154 -68
  5. package/dist/components/email/email-localization.js +18 -23
  6. package/dist/components/email/email-styles.js +52 -77
  7. package/dist/components/email/email-verification.d.ts +2 -2
  8. package/dist/components/email/email-verification.js +138 -73
  9. package/dist/components/email/index.d.ts +9 -9
  10. package/dist/components/email/index.js +9 -9
  11. package/dist/components/email/magic-link.d.ts +2 -2
  12. package/dist/components/email/magic-link.js +139 -70
  13. package/dist/components/email/new-device.d.ts +2 -2
  14. package/dist/components/email/new-device.js +221 -88
  15. package/dist/components/email/otp-email.d.ts +2 -2
  16. package/dist/components/email/otp-email.js +127 -63
  17. package/dist/components/email/password-changed.d.ts +2 -2
  18. package/dist/components/email/password-changed.js +157 -74
  19. package/dist/components/email/reset-password.d.ts +2 -2
  20. package/dist/components/email/reset-password.js +138 -66
  21. package/dist/components/icons/apple.d.ts +1 -1
  22. package/dist/components/icons/apple.js +16 -9
  23. package/dist/components/icons/atlassian.d.ts +1 -1
  24. package/dist/components/icons/atlassian.js +38 -13
  25. package/dist/components/icons/cognito.d.ts +1 -1
  26. package/dist/components/icons/cognito.js +19 -9
  27. package/dist/components/icons/discord.d.ts +1 -1
  28. package/dist/components/icons/discord.js +16 -9
  29. package/dist/components/icons/dropbox.d.ts +1 -1
  30. package/dist/components/icons/dropbox.js +16 -9
  31. package/dist/components/icons/facebook.d.ts +1 -1
  32. package/dist/components/icons/facebook.js +19 -11
  33. package/dist/components/icons/figma.d.ts +1 -1
  34. package/dist/components/icons/figma.js +34 -12
  35. package/dist/components/icons/github.d.ts +1 -1
  36. package/dist/components/icons/github.js +16 -11
  37. package/dist/components/icons/gitlab.d.ts +1 -1
  38. package/dist/components/icons/gitlab.js +30 -9
  39. package/dist/components/icons/google.d.ts +1 -1
  40. package/dist/components/icons/google.js +39 -9
  41. package/dist/components/icons/huggingface.d.ts +1 -1
  42. package/dist/components/icons/huggingface.js +38 -9
  43. package/dist/components/icons/index.d.ts +35 -35
  44. package/dist/components/icons/index.js +35 -35
  45. package/dist/components/icons/kakao.d.ts +1 -1
  46. package/dist/components/icons/kakao.js +16 -11
  47. package/dist/components/icons/kick.d.ts +1 -1
  48. package/dist/components/icons/kick.js +20 -11
  49. package/dist/components/icons/line.d.ts +1 -1
  50. package/dist/components/icons/line.js +16 -9
  51. package/dist/components/icons/linear.d.ts +1 -1
  52. package/dist/components/icons/linear.js +16 -9
  53. package/dist/components/icons/linkedin.d.ts +1 -1
  54. package/dist/components/icons/linkedin.js +33 -9
  55. package/dist/components/icons/microsoft.d.ts +1 -1
  56. package/dist/components/icons/microsoft.js +30 -9
  57. package/dist/components/icons/naver.d.ts +1 -1
  58. package/dist/components/icons/naver.js +16 -9
  59. package/dist/components/icons/notion.d.ts +1 -1
  60. package/dist/components/icons/notion.js +16 -9
  61. package/dist/components/icons/paybin.d.ts +1 -1
  62. package/dist/components/icons/paybin.js +32 -8
  63. package/dist/components/icons/paypal.d.ts +1 -1
  64. package/dist/components/icons/paypal.js +30 -9
  65. package/dist/components/icons/polar.d.ts +1 -1
  66. package/dist/components/icons/polar.js +24 -9
  67. package/dist/components/icons/railway.d.ts +1 -1
  68. package/dist/components/icons/railway.js +16 -9
  69. package/dist/components/icons/reddit.d.ts +1 -1
  70. package/dist/components/icons/reddit.js +21 -9
  71. package/dist/components/icons/roblox.d.ts +1 -1
  72. package/dist/components/icons/roblox.js +17 -12
  73. package/dist/components/icons/salesforce.d.ts +1 -1
  74. package/dist/components/icons/salesforce.js +16 -9
  75. package/dist/components/icons/slack.d.ts +1 -1
  76. package/dist/components/icons/slack.js +30 -9
  77. package/dist/components/icons/spotify.d.ts +1 -1
  78. package/dist/components/icons/spotify.js +16 -9
  79. package/dist/components/icons/tiktok.d.ts +1 -1
  80. package/dist/components/icons/tiktok.js +23 -10
  81. package/dist/components/icons/twitch.d.ts +1 -1
  82. package/dist/components/icons/twitch.js +43 -12
  83. package/dist/components/icons/vercel.d.ts +1 -1
  84. package/dist/components/icons/vercel.js +16 -9
  85. package/dist/components/icons/vk.d.ts +1 -1
  86. package/dist/components/icons/vk.js +16 -9
  87. package/dist/components/icons/wechat.d.ts +1 -1
  88. package/dist/components/icons/wechat.js +16 -9
  89. package/dist/components/icons/x.d.ts +1 -1
  90. package/dist/components/icons/x.js +16 -9
  91. package/dist/components/icons/zoom.d.ts +1 -1
  92. package/dist/components/icons/zoom.js +69 -11
  93. package/dist/components/settings/account/theme-preview.js +286 -7
  94. package/dist/core.d.ts +1 -1
  95. package/dist/hooks/auth/use-authenticate.d.ts +30 -6
  96. package/dist/hooks/auth/use-authenticate.js +22 -27
  97. package/dist/hooks/auth/use-is-username-available.d.ts +20 -0
  98. package/dist/hooks/auth/use-is-username-available.js +13 -0
  99. package/dist/hooks/auth/use-request-password-reset.d.ts +12 -17
  100. package/dist/hooks/auth/use-request-password-reset.js +12 -13
  101. package/dist/hooks/auth/use-reset-password.d.ts +14 -31
  102. package/dist/hooks/auth/use-reset-password.js +12 -12
  103. package/dist/hooks/auth/use-send-verification-email.d.ts +11 -16
  104. package/dist/hooks/auth/use-send-verification-email.js +12 -12
  105. package/dist/hooks/auth/use-session.d.ts +31 -5
  106. package/dist/hooks/auth/use-session.js +15 -17
  107. package/dist/hooks/auth/use-sign-in-email.d.ts +12 -39
  108. package/dist/hooks/auth/use-sign-in-email.js +16 -24
  109. package/dist/hooks/auth/use-sign-in-magic-link.d.ts +15 -20
  110. package/dist/hooks/auth/use-sign-in-magic-link.js +12 -12
  111. package/dist/hooks/auth/use-sign-in-passkey.d.ts +13 -50
  112. package/dist/hooks/auth/use-sign-in-passkey.js +16 -24
  113. package/dist/hooks/auth/use-sign-in-social.d.ts +32 -62
  114. package/dist/hooks/auth/use-sign-in-social.js +12 -12
  115. package/dist/hooks/auth/use-sign-in-username.d.ts +25 -0
  116. package/dist/hooks/auth/use-sign-in-username.js +17 -0
  117. package/dist/hooks/auth/use-sign-out.d.ts +11 -12
  118. package/dist/hooks/auth/use-sign-out.js +15 -23
  119. package/dist/hooks/auth/use-sign-up-email.d.ts +178 -262
  120. package/dist/hooks/auth/use-sign-up-email.js +16 -24
  121. package/dist/hooks/auth/use-user.d.ts +63 -61
  122. package/dist/hooks/auth/use-user.js +10 -13
  123. package/dist/hooks/settings/use-account-info.d.ts +12 -12
  124. package/dist/hooks/settings/use-account-info.js +17 -24
  125. package/dist/hooks/settings/use-add-passkey.d.ts +11 -33
  126. package/dist/hooks/settings/use-add-passkey.js +16 -23
  127. package/dist/hooks/settings/use-change-email.d.ts +12 -15
  128. package/dist/hooks/settings/use-change-email.js +16 -22
  129. package/dist/hooks/settings/use-change-password.d.ts +12 -45
  130. package/dist/hooks/settings/use-change-password.js +12 -10
  131. package/dist/hooks/settings/use-delete-passkey.d.ts +11 -13
  132. package/dist/hooks/settings/use-delete-passkey.js +16 -23
  133. package/dist/hooks/settings/use-delete-user.d.ts +14 -32
  134. package/dist/hooks/settings/use-delete-user.js +12 -10
  135. package/dist/hooks/settings/use-link-social.d.ts +23 -26
  136. package/dist/hooks/settings/use-link-social.js +12 -9
  137. package/dist/hooks/settings/use-list-accounts.d.ts +10 -8
  138. package/dist/hooks/settings/use-list-accounts.js +14 -22
  139. package/dist/hooks/settings/use-list-device-sessions.d.ts +30 -7
  140. package/dist/hooks/settings/use-list-device-sessions.js +14 -21
  141. package/dist/hooks/settings/use-list-sessions.d.ts +10 -7
  142. package/dist/hooks/settings/use-list-sessions.js +14 -21
  143. package/dist/hooks/settings/use-list-user-passkeys.d.ts +9 -6
  144. package/dist/hooks/settings/use-list-user-passkeys.js +14 -21
  145. package/dist/hooks/settings/use-revoke-multi-session.d.ts +12 -12
  146. package/dist/hooks/settings/use-revoke-multi-session.js +16 -19
  147. package/dist/hooks/settings/use-revoke-session.d.ts +12 -12
  148. package/dist/hooks/settings/use-revoke-session.js +16 -20
  149. package/dist/hooks/settings/use-set-active-session.d.ts +13 -30
  150. package/dist/hooks/settings/use-set-active-session.js +19 -27
  151. package/dist/hooks/settings/use-unlink-account.d.ts +13 -13
  152. package/dist/hooks/settings/use-unlink-account.js +16 -20
  153. package/dist/hooks/settings/use-update-user.d.ts +1179 -5
  154. package/dist/hooks/settings/use-update-user.js +23 -28
  155. package/dist/hooks/use-auth-mutation.d.ts +12 -0
  156. package/dist/hooks/use-auth-mutation.js +11 -0
  157. package/dist/hooks/use-auth-query.d.ts +14 -0
  158. package/dist/hooks/use-auth-query.js +15 -0
  159. package/dist/index.d.ts +40 -36
  160. package/dist/index.js +84 -36
  161. package/dist/lib/auth-client.d.ts +1254 -1254
  162. package/dist/lib/auth-client.js +11 -11
  163. package/dist/lib/auth-config.d.ts +3 -3
  164. package/dist/lib/auth-context.d.ts +2 -2
  165. package/dist/lib/auth-context.js +5 -2
  166. package/dist/lib/provider-icons.d.ts +2 -2
  167. package/dist/lib/provider-icons.js +75 -47
  168. package/dist/lib/utils.d.ts +1 -1
  169. package/dist/lib/utils.js +7 -4
  170. package/dist/mutations/auth/is-username-available-options.d.ts +19 -0
  171. package/dist/mutations/auth/is-username-available-options.js +7 -0
  172. package/dist/mutations/auth/request-password-reset-options.d.ts +15 -0
  173. package/dist/mutations/auth/request-password-reset-options.js +7 -0
  174. package/dist/mutations/auth/reset-password-options.d.ts +17 -0
  175. package/dist/mutations/auth/reset-password-options.js +7 -0
  176. package/dist/mutations/auth/send-verification-email-options.d.ts +15 -0
  177. package/dist/mutations/auth/send-verification-email-options.js +7 -0
  178. package/dist/mutations/auth/sign-in-email-options.d.ts +23 -0
  179. package/dist/mutations/auth/sign-in-email-options.js +11 -0
  180. package/dist/mutations/auth/sign-in-magic-link-options.d.ts +23 -0
  181. package/dist/mutations/auth/sign-in-magic-link-options.js +11 -0
  182. package/dist/mutations/auth/sign-in-passkey-options.d.ts +15 -0
  183. package/dist/mutations/auth/sign-in-passkey-options.js +11 -0
  184. package/dist/mutations/auth/sign-in-social-options.d.ts +61 -0
  185. package/dist/mutations/auth/sign-in-social-options.js +11 -0
  186. package/dist/mutations/auth/sign-in-username-options.d.ts +19 -0
  187. package/dist/mutations/auth/sign-in-username-options.js +11 -0
  188. package/dist/mutations/auth/sign-out-options.d.ts +12 -0
  189. package/dist/mutations/auth/sign-out-options.js +7 -0
  190. package/dist/mutations/auth/sign-up-email-options.d.ts +1180 -0
  191. package/dist/mutations/auth/sign-up-email-options.js +11 -0
  192. package/dist/mutations/auth-mutation-options.d.ts +25 -0
  193. package/dist/mutations/auth-mutation-options.js +19 -0
  194. package/dist/mutations/settings/add-passkey-options.d.ts +15 -0
  195. package/dist/mutations/settings/add-passkey-options.js +11 -0
  196. package/dist/mutations/settings/change-email-options.d.ts +15 -0
  197. package/dist/mutations/settings/change-email-options.js +7 -0
  198. package/dist/mutations/settings/change-password-options.d.ts +17 -0
  199. package/dist/mutations/settings/change-password-options.js +7 -0
  200. package/dist/mutations/settings/delete-passkey-options.d.ts +13 -0
  201. package/dist/mutations/settings/delete-passkey-options.js +11 -0
  202. package/dist/mutations/settings/delete-user-options.d.ts +20 -0
  203. package/dist/mutations/settings/delete-user-options.js +7 -0
  204. package/dist/mutations/settings/link-social-options.d.ts +39 -0
  205. package/dist/mutations/settings/link-social-options.js +7 -0
  206. package/dist/mutations/settings/revoke-multi-session-options.d.ts +13 -0
  207. package/dist/mutations/settings/revoke-multi-session-options.js +11 -0
  208. package/dist/mutations/settings/revoke-session-options.d.ts +13 -0
  209. package/dist/mutations/settings/revoke-session-options.js +7 -0
  210. package/dist/mutations/settings/set-active-session-options.d.ts +13 -0
  211. package/dist/mutations/settings/set-active-session-options.js +11 -0
  212. package/dist/mutations/settings/unlink-account-options.d.ts +15 -0
  213. package/dist/mutations/settings/unlink-account-options.js +7 -0
  214. package/dist/mutations/settings/update-user-options.d.ts +1182 -0
  215. package/dist/mutations/settings/update-user-options.js +7 -0
  216. package/dist/queries/auth/session-options.d.ts +110 -0
  217. package/dist/queries/auth/session-options.js +7 -0
  218. package/dist/queries/auth-query-options.d.ts +29 -0
  219. package/dist/queries/auth-query-options.js +17 -0
  220. package/dist/queries/settings/account-info-options.d.ts +32 -0
  221. package/dist/queries/settings/account-info-options.js +12 -0
  222. package/dist/queries/settings/list-accounts-options.d.ts +53 -0
  223. package/dist/queries/settings/list-accounts-options.js +12 -0
  224. package/dist/queries/settings/list-device-sessions-options.d.ts +99 -0
  225. package/dist/queries/settings/list-device-sessions-options.js +12 -0
  226. package/dist/queries/settings/list-sessions-options.d.ts +54 -0
  227. package/dist/queries/settings/list-sessions-options.js +12 -0
  228. package/dist/queries/settings/list-user-passkeys-options.d.ts +18 -0
  229. package/dist/queries/settings/list-user-passkeys-options.js +12 -0
  230. package/package.json +11 -11
  231. package/src/components/auth/auth-provider.tsx +4 -6
  232. package/src/hooks/auth/use-authenticate.ts +8 -9
  233. package/src/hooks/auth/use-is-username-available.ts +31 -0
  234. package/src/hooks/auth/use-request-password-reset.ts +20 -11
  235. package/src/hooks/auth/use-reset-password.ts +20 -12
  236. package/src/hooks/auth/use-send-verification-email.ts +19 -11
  237. package/src/hooks/auth/use-session.ts +22 -17
  238. package/src/hooks/auth/use-sign-in-email.ts +24 -19
  239. package/src/hooks/auth/use-sign-in-magic-link.ts +19 -13
  240. package/src/hooks/auth/use-sign-in-passkey.ts +24 -18
  241. package/src/hooks/auth/use-sign-in-social.ts +19 -11
  242. package/src/hooks/auth/use-sign-in-username.ts +40 -0
  243. package/src/hooks/auth/use-sign-out.ts +20 -20
  244. package/src/hooks/auth/use-sign-up-email.ts +25 -21
  245. package/src/hooks/auth/use-user.ts +7 -9
  246. package/src/hooks/settings/use-account-info.ts +31 -21
  247. package/src/hooks/settings/use-add-passkey.ts +22 -17
  248. package/src/hooks/settings/use-change-email.ts +24 -20
  249. package/src/hooks/settings/use-change-password.ts +19 -11
  250. package/src/hooks/settings/use-delete-passkey.ts +21 -16
  251. package/src/hooks/settings/use-delete-user.ts +19 -11
  252. package/src/hooks/settings/use-link-social.ts +20 -10
  253. package/src/hooks/settings/use-list-accounts.ts +28 -16
  254. package/src/hooks/settings/use-list-device-sessions.ts +29 -22
  255. package/src/hooks/settings/use-list-sessions.ts +28 -15
  256. package/src/hooks/settings/use-list-user-passkeys.ts +28 -17
  257. package/src/hooks/settings/use-revoke-multi-session.ts +28 -19
  258. package/src/hooks/settings/use-revoke-session.ts +26 -18
  259. package/src/hooks/settings/use-set-active-session.ts +40 -28
  260. package/src/hooks/settings/use-unlink-account.ts +23 -17
  261. package/src/hooks/settings/use-update-user.ts +33 -27
  262. package/src/hooks/use-auth-mutation.ts +29 -0
  263. package/src/hooks/use-auth-query.ts +36 -0
  264. package/src/index.ts +4 -0
  265. package/src/lib/auth-config.ts +1 -1
  266. package/src/mutations/auth/is-username-available-options.ts +18 -0
  267. package/src/mutations/auth/request-password-reset-options.ts +14 -0
  268. package/src/mutations/auth/reset-password-options.ts +14 -0
  269. package/src/mutations/auth/send-verification-email-options.ts +14 -0
  270. package/src/mutations/auth/sign-in-email-options.ts +19 -0
  271. package/src/mutations/auth/sign-in-magic-link-options.ts +15 -0
  272. package/src/mutations/auth/sign-in-passkey-options.ts +15 -0
  273. package/src/mutations/auth/sign-in-social-options.ts +19 -0
  274. package/src/mutations/auth/sign-in-username-options.ts +15 -0
  275. package/src/mutations/auth/sign-out-options.ts +11 -0
  276. package/src/mutations/auth/sign-up-email-options.ts +15 -0
  277. package/src/mutations/auth-mutation-options.ts +49 -0
  278. package/src/mutations/settings/add-passkey-options.ts +15 -0
  279. package/src/mutations/settings/change-email-options.ts +11 -0
  280. package/src/mutations/settings/change-password-options.ts +14 -0
  281. package/src/mutations/settings/delete-passkey-options.ts +15 -0
  282. package/src/mutations/settings/delete-user-options.ts +11 -0
  283. package/src/mutations/settings/link-social-options.ts +11 -0
  284. package/src/mutations/settings/revoke-multi-session-options.ts +15 -0
  285. package/src/mutations/settings/revoke-session-options.ts +14 -0
  286. package/src/mutations/settings/set-active-session-options.ts +15 -0
  287. package/src/mutations/settings/unlink-account-options.ts +14 -0
  288. package/src/mutations/settings/update-user-options.ts +15 -0
  289. package/src/queries/auth/session-options.ts +18 -0
  290. package/src/queries/auth-query-options.ts +34 -0
  291. package/src/queries/settings/account-info-options.ts +25 -0
  292. package/src/queries/settings/list-accounts-options.ts +26 -0
  293. package/src/queries/settings/list-device-sessions-options.ts +24 -0
  294. package/src/queries/settings/list-sessions-options.ts +23 -0
  295. package/src/queries/settings/list-user-passkeys-options.ts +23 -0
  296. package/dist/hooks/auth/use-auth-mutation.d.ts +0 -18
  297. package/dist/hooks/auth/use-auth-mutation.js +0 -10
  298. package/dist/hooks/auth/use-auth-query.d.ts +0 -24
  299. package/dist/hooks/auth/use-auth-query.js +0 -10
  300. package/dist/lib/auth-config.js +0 -1
  301. package/src/hooks/auth/use-auth-mutation.ts +0 -56
  302. package/src/hooks/auth/use-auth-query.ts +0 -50
@@ -1,75 +1,140 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Body, Button, Container, Head, Heading, Hr, Html, Img, Link, Preview, pixelBasedPreset, Section, Tailwind, Text } from "@react-email/components";
3
- import { cn } from "../../lib/utils";
4
- import { EmailStyles } from "./email-styles";
5
- const emailVerificationEmailLocalization = {
6
- VERIFY_YOUR_EMAIL_ADDRESS: "Verify your email address",
7
- LOGO: "Logo",
8
- CLICK_BUTTON_TO_VERIFY_EMAIL: "Click the button below to verify your email address {emailAddress} for your {appName} account.",
9
- VERIFY_EMAIL_ADDRESS: "Verify email address",
10
- OR_COPY_AND_PASTE_URL: "Or copy and paste this URL into your browser:",
11
- THIS_LINK_EXPIRES_IN_MINUTES: "This link expires in {expirationMinutes} minutes.",
12
- EMAIL_SENT_BY: "Email sent by {appName}.",
13
- IF_YOU_DIDNT_REQUEST_THIS_EMAIL: "If you didn't request this email, you can safely ignore it. Someone else might have typed your email address by mistake.",
14
- POWERED_BY_BETTER_AUTH: "Powered by {betterAuth}"
1
+ import { cn as e } from "../../lib/utils.js";
2
+ import t from "./email-styles.js";
3
+ import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
4
+ import { Body as a, Button as o, Container as s, Head as c, Heading as l, Hr as u, Html as d, Img as f, Link as p, Preview as m, Section as h, Tailwind as g, Text as _, pixelBasedPreset as v } from "@react-email/components";
5
+ //#region src/components/email/email-verification.tsx
6
+ var y = {
7
+ VERIFY_YOUR_EMAIL_ADDRESS: "Verify your email address",
8
+ LOGO: "Logo",
9
+ CLICK_BUTTON_TO_VERIFY_EMAIL: "Click the button below to verify your email address {emailAddress} for your {appName} account.",
10
+ VERIFY_EMAIL_ADDRESS: "Verify email address",
11
+ OR_COPY_AND_PASTE_URL: "Or copy and paste this URL into your browser:",
12
+ THIS_LINK_EXPIRES_IN_MINUTES: "This link expires in {expirationMinutes} minutes.",
13
+ EMAIL_SENT_BY: "Email sent by {appName}.",
14
+ IF_YOU_DIDNT_REQUEST_THIS_EMAIL: "If you didn't request this email, you can safely ignore it. Someone else might have typed your email address by mistake.",
15
+ POWERED_BY_BETTER_AUTH: "Powered by {betterAuth}"
16
+ }, b = ({ url: y, email: x, appName: S, expirationMinutes: C = 60, logoURL: w, colors: T, classNames: E, darkMode: D = !0, poweredBy: O, head: k, ...A }) => {
17
+ let j = {
18
+ ...b.localization,
19
+ ...A.localization
20
+ }, M = j.VERIFY_YOUR_EMAIL_ADDRESS;
21
+ return /* @__PURE__ */ i(d, { children: [
22
+ /* @__PURE__ */ i(c, { children: [
23
+ /* @__PURE__ */ r("meta", {
24
+ content: "light dark",
25
+ name: "color-scheme"
26
+ }),
27
+ /* @__PURE__ */ r("meta", {
28
+ content: "light dark",
29
+ name: "supported-color-schemes"
30
+ }),
31
+ /* @__PURE__ */ r(t, {
32
+ colors: T,
33
+ darkMode: D
34
+ }),
35
+ k
36
+ ] }),
37
+ /* @__PURE__ */ r(m, { children: M }),
38
+ /* @__PURE__ */ r(g, {
39
+ config: { presets: [v] },
40
+ children: /* @__PURE__ */ r(a, {
41
+ className: e("bg-background font-sans", E?.body),
42
+ children: /* @__PURE__ */ r(s, {
43
+ className: e("mx-auto my-auto max-w-xl px-2 py-10", E?.container),
44
+ children: /* @__PURE__ */ i(h, {
45
+ className: e("bg-card text-card-foreground rounded-none border border-border p-8", E?.card),
46
+ children: [
47
+ w && (typeof w == "string" ? /* @__PURE__ */ r(f, {
48
+ src: w,
49
+ width: 48,
50
+ height: 48,
51
+ alt: S || j.LOGO,
52
+ className: e("mx-auto mb-8", E?.logo)
53
+ }) : /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r(f, {
54
+ src: w.light,
55
+ width: 48,
56
+ height: 48,
57
+ alt: S || j.LOGO,
58
+ className: e("mx-auto mb-8 logo-light", E?.logo)
59
+ }), /* @__PURE__ */ r(f, {
60
+ src: w.dark,
61
+ width: 48,
62
+ height: 48,
63
+ alt: S || j.LOGO,
64
+ className: e("hidden mx-auto mb-8 logo-dark", E?.logo)
65
+ })] })),
66
+ /* @__PURE__ */ r(l, {
67
+ className: e("m-0 mb-5 text-2xl font-semibold", E?.title),
68
+ children: j.VERIFY_EMAIL_ADDRESS
69
+ }),
70
+ /* @__PURE__ */ r(_, {
71
+ className: e("text-sm font-normal", E?.content),
72
+ children: (() => {
73
+ let e = j.CLICK_BUTTON_TO_VERIFY_EMAIL.replace("{appName}", S || "").replace(/\s{2,}/g, " ").replace(" .", "."), [t, a] = e.split("{emailAddress}");
74
+ return x ? /* @__PURE__ */ i(n, { children: [
75
+ t,
76
+ /* @__PURE__ */ r(p, {
77
+ href: `mailto:${x}`,
78
+ className: "text-primary font-medium",
79
+ children: x
80
+ }),
81
+ a
82
+ ] }) : e.replace("{emailAddress}", "").replace(/\s{2,}/g, " ").replace(" .", ".");
83
+ })()
84
+ }),
85
+ /* @__PURE__ */ r(h, {
86
+ className: "my-6",
87
+ children: /* @__PURE__ */ r(o, {
88
+ href: y,
89
+ className: e("inline-block whitespace-nowrap rounded-none text-sm font-medium py-2.5 px-6 bg-primary text-primary-foreground no-underline", E?.button),
90
+ children: j.VERIFY_EMAIL_ADDRESS
91
+ })
92
+ }),
93
+ /* @__PURE__ */ r(_, {
94
+ className: e("mb-3 text-xs text-muted-foreground", E?.description),
95
+ children: j.OR_COPY_AND_PASTE_URL
96
+ }),
97
+ /* @__PURE__ */ r(p, {
98
+ className: e("break-all text-xs text-primary", E?.link),
99
+ href: y,
100
+ children: y
101
+ }),
102
+ /* @__PURE__ */ r(u, { className: e("my-6 w-full border border-solid border-border", E?.separator) }),
103
+ C || S ? /* @__PURE__ */ i(_, {
104
+ className: e("mb-3 text-xs text-muted-foreground", E?.description),
105
+ children: [C ? j.THIS_LINK_EXPIRES_IN_MINUTES.replace("{expirationMinutes}", C.toString()) : null, S && /* @__PURE__ */ i(n, { children: [C ? " " : "", j.EMAIL_SENT_BY.replace("{appName}", S)] })]
106
+ }) : null,
107
+ /* @__PURE__ */ r(_, {
108
+ className: e("mt-3 text-xs text-muted-foreground", E?.description),
109
+ children: j.IF_YOU_DIDNT_REQUEST_THIS_EMAIL
110
+ }),
111
+ O && /* @__PURE__ */ r(_, {
112
+ className: e("mt-4 mb-0 text-center text-[11px] text-muted-foreground", E?.poweredBy),
113
+ children: (() => {
114
+ let [t, a] = j.POWERED_BY_BETTER_AUTH.split("{betterAuth}");
115
+ return /* @__PURE__ */ i(n, { children: [
116
+ t,
117
+ /* @__PURE__ */ r(p, {
118
+ href: "https://better-auth.com",
119
+ className: e("text-primary underline", E?.link),
120
+ children: "better-auth"
121
+ }),
122
+ a
123
+ ] });
124
+ })()
125
+ })
126
+ ]
127
+ })
128
+ })
129
+ })
130
+ })
131
+ ] });
15
132
  };
16
- /**
17
- * Email template component that sends email verification links to users.
18
- *
19
- * This email includes:
20
- * - Verification button and fallback URL
21
- * - Expiration time information
22
- * - Security notice for unauthorized requests
23
- * - Customizable branding and styling
24
- * - Support for light/dark mode themes
25
- *
26
- * @example
27
- * ```tsx
28
- * <EmailVerificationEmail
29
- * url="https://example.com/verify?token=abc123"
30
- * email="user@example.com"
31
- * appName="My App"
32
- * expirationMinutes={60}
33
- * logoURL="https://example.com/logo.png"
34
- * darkMode={true}
35
- * />
36
- * ```
37
- */
38
- export const EmailVerificationEmail = ({ url, email, appName, expirationMinutes = 60, logoURL, colors, classNames, darkMode = true, poweredBy, head, ...props }) => {
39
- const localization = {
40
- ...EmailVerificationEmail.localization,
41
- ...props.localization
42
- };
43
- const previewText = localization.VERIFY_YOUR_EMAIL_ADDRESS;
44
- return (_jsxs(Html, { children: [_jsxs(Head, { children: [_jsx("meta", { content: "light dark", name: "color-scheme" }), _jsx("meta", { content: "light dark", name: "supported-color-schemes" }), _jsx(EmailStyles, { colors: colors, darkMode: darkMode }), head] }), _jsx(Preview, { children: previewText }), _jsx(Tailwind, { config: { presets: [pixelBasedPreset] }, children: _jsx(Body, { className: cn("bg-background font-sans", classNames?.body), children: _jsx(Container, { className: cn("mx-auto my-auto max-w-xl px-2 py-10", classNames?.container), children: _jsxs(Section, { className: cn("bg-card text-card-foreground rounded-none border border-border p-8", classNames?.card), children: [logoURL &&
45
- (typeof logoURL === "string" ? (_jsx(Img, { src: logoURL, width: 48, height: 48, alt: appName || localization.LOGO, className: cn("mx-auto mb-8", classNames?.logo) })) : (_jsxs(_Fragment, { children: [_jsx(Img, { src: logoURL.light, width: 48, height: 48, alt: appName || localization.LOGO, className: cn("mx-auto mb-8 logo-light", classNames?.logo) }), _jsx(Img, { src: logoURL.dark, width: 48, height: 48, alt: appName || localization.LOGO, className: cn("hidden mx-auto mb-8 logo-dark", classNames?.logo) })] }))), _jsx(Heading, { className: cn("m-0 mb-5 text-2xl font-semibold", classNames?.title), children: localization.VERIFY_EMAIL_ADDRESS }), _jsx(Text, { className: cn("text-sm font-normal", classNames?.content), children: (() => {
46
- const textWithAppName = localization.CLICK_BUTTON_TO_VERIFY_EMAIL.replace("{appName}", appName || "")
47
- .replace(/\s{2,}/g, " ")
48
- .replace(" .", ".");
49
- const [beforeEmailAddress, afterEmailAddress] = textWithAppName.split("{emailAddress}");
50
- return email ? (_jsxs(_Fragment, { children: [beforeEmailAddress, _jsx(Link, { href: `mailto:${email}`, className: "text-primary font-medium", children: email }), afterEmailAddress] })) : (textWithAppName
51
- .replace("{emailAddress}", "")
52
- .replace(/\s{2,}/g, " ")
53
- .replace(" .", "."));
54
- })() }), _jsx(Section, { className: "my-6", children: _jsx(Button, { href: url, className: cn("inline-block whitespace-nowrap rounded-none text-sm font-medium py-2.5 px-6 bg-primary text-primary-foreground no-underline", classNames?.button), children: localization.VERIFY_EMAIL_ADDRESS }) }), _jsx(Text, { className: cn("mb-3 text-xs text-muted-foreground", classNames?.description), children: localization.OR_COPY_AND_PASTE_URL }), _jsx(Link, { className: cn("break-all text-xs text-primary", classNames?.link), href: url, children: url }), _jsx(Hr, { className: cn("my-6 w-full border border-solid border-border", classNames?.separator) }), expirationMinutes || appName ? (_jsxs(Text, { className: cn("mb-3 text-xs text-muted-foreground", classNames?.description), children: [expirationMinutes
55
- ? localization.THIS_LINK_EXPIRES_IN_MINUTES.replace("{expirationMinutes}", expirationMinutes.toString())
56
- : null, appName && (_jsxs(_Fragment, { children: [expirationMinutes ? " " : "", localization.EMAIL_SENT_BY.replace("{appName}", appName)] }))] })) : null, _jsx(Text, { className: cn("mt-3 text-xs text-muted-foreground", classNames?.description), children: localization.IF_YOU_DIDNT_REQUEST_THIS_EMAIL }), poweredBy && (_jsx(Text, { className: cn("mt-4 mb-0 text-center text-[11px] text-muted-foreground", classNames?.poweredBy), children: (() => {
57
- const [beforeBetterAuth, afterBetterAuth] = localization.POWERED_BY_BETTER_AUTH.split("{betterAuth}");
58
- return (_jsxs(_Fragment, { children: [beforeBetterAuth, _jsx(Link, { href: "https://better-auth.com", className: cn("text-primary underline", classNames?.link), children: "better-auth" }), afterBetterAuth] }));
59
- })() }))] }) }) }) })] }));
133
+ b.localization = y, b.PreviewProps = {
134
+ url: "https://better-auth-ui.com/auth/verify-email?token=example-token",
135
+ appName: "Better Auth",
136
+ email: "m@example.com",
137
+ darkMode: !0
60
138
  };
61
- /**
62
- * Default localization strings for the email verification template.
63
- * Can be overridden via the `localization` prop.
64
- */
65
- EmailVerificationEmail.localization = emailVerificationEmailLocalization;
66
- /**
67
- * Example props for previewing the email template in development.
68
- */
69
- EmailVerificationEmail.PreviewProps = {
70
- url: "https://better-auth-ui.com/auth/verify-email?token=example-token",
71
- appName: "Better Auth",
72
- email: "m@example.com",
73
- darkMode: true
74
- };
75
- export default EmailVerificationEmail;
139
+ //#endregion
140
+ export { b as default };
@@ -1,9 +1,9 @@
1
- export * from "./email-changed";
2
- export * from "./email-localization";
3
- export * from "./email-styles";
4
- export * from "./email-verification";
5
- export * from "./magic-link";
6
- export * from "./new-device";
7
- export * from "./otp-email";
8
- export * from "./password-changed";
9
- export * from "./reset-password";
1
+ export * from './email-changed';
2
+ export * from './email-localization';
3
+ export * from './email-styles';
4
+ export * from './email-verification';
5
+ export * from './magic-link';
6
+ export * from './new-device';
7
+ export * from './otp-email';
8
+ export * from './password-changed';
9
+ export * from './reset-password';
@@ -1,9 +1,9 @@
1
- export * from "./email-changed";
2
- export * from "./email-localization";
3
- export * from "./email-styles";
4
- export * from "./email-verification";
5
- export * from "./magic-link";
6
- export * from "./new-device";
7
- export * from "./otp-email";
8
- export * from "./password-changed";
9
- export * from "./reset-password";
1
+ import "./email-styles.js";
2
+ import "./email-changed.js";
3
+ import "./email-verification.js";
4
+ import "./magic-link.js";
5
+ import "./new-device.js";
6
+ import "./otp-email.js";
7
+ import "./password-changed.js";
8
+ import "./reset-password.js";
9
+ import "./email-localization.js";
@@ -1,5 +1,5 @@
1
- import type { ReactNode } from "react";
2
- import { type EmailClassNames, type EmailColors } from "./email-styles";
1
+ import { ReactNode } from 'react';
2
+ import { EmailClassNames, EmailColors } from './email-styles';
3
3
  declare const magicLinkEmailLocalization: {
4
4
  SIGN_IN_TO_APP_NAME: string;
5
5
  SIGN_IN_TO_YOUR_ACCOUNT: string;
@@ -1,72 +1,141 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Body, Button, Container, Head, Heading, Hr, Html, Img, Link, Preview, pixelBasedPreset, Section, Tailwind, Text } from "@react-email/components";
3
- import { cn } from "../../lib/utils";
4
- import { EmailStyles } from "./email-styles";
5
- const magicLinkEmailLocalization = {
6
- SIGN_IN_TO_APP_NAME: "Sign in to {appName}",
7
- SIGN_IN_TO_YOUR_ACCOUNT: "Sign in to your account",
8
- YOUR_ACCOUNT: "your account",
9
- LOGO: "Logo",
10
- CLICK_BUTTON_TO_SIGN_IN: "Click the button below to sign in to your account {emailAddress}.",
11
- OR_COPY_AND_PASTE_URL: "Or copy and paste this URL into your browser:",
12
- THIS_LINK_EXPIRES_IN_MINUTES: "This link expires in {expirationMinutes} minutes.",
13
- EMAIL_SENT_BY: "Email sent by {appName}.",
14
- IF_YOU_DIDNT_REQUEST_THIS_EMAIL: "If you didn't request this email, you can safely ignore it. Someone else might have typed your email address by mistake.",
15
- POWERED_BY_BETTER_AUTH: "Powered by {betterAuth}"
1
+ import { cn as e } from "../../lib/utils.js";
2
+ import t from "./email-styles.js";
3
+ import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
4
+ import { Body as a, Button as o, Container as s, Head as c, Heading as l, Hr as u, Html as d, Img as f, Link as p, Preview as m, Section as h, Tailwind as g, Text as _, pixelBasedPreset as v } from "@react-email/components";
5
+ //#region src/components/email/magic-link.tsx
6
+ var y = {
7
+ SIGN_IN_TO_APP_NAME: "Sign in to {appName}",
8
+ SIGN_IN_TO_YOUR_ACCOUNT: "Sign in to your account",
9
+ YOUR_ACCOUNT: "your account",
10
+ LOGO: "Logo",
11
+ CLICK_BUTTON_TO_SIGN_IN: "Click the button below to sign in to your account {emailAddress}.",
12
+ OR_COPY_AND_PASTE_URL: "Or copy and paste this URL into your browser:",
13
+ THIS_LINK_EXPIRES_IN_MINUTES: "This link expires in {expirationMinutes} minutes.",
14
+ EMAIL_SENT_BY: "Email sent by {appName}.",
15
+ IF_YOU_DIDNT_REQUEST_THIS_EMAIL: "If you didn't request this email, you can safely ignore it. Someone else might have typed your email address by mistake.",
16
+ POWERED_BY_BETTER_AUTH: "Powered by {betterAuth}"
17
+ }, b = ({ url: y, email: x, appName: S, expirationMinutes: C = 5, logoURL: w, colors: T, classNames: E, darkMode: D = !0, poweredBy: O, head: k, ...A }) => {
18
+ let j = {
19
+ ...b.localization,
20
+ ...A.localization
21
+ }, M = S ? j.SIGN_IN_TO_APP_NAME.replace("{appName}", S) : j.SIGN_IN_TO_YOUR_ACCOUNT;
22
+ return /* @__PURE__ */ i(d, { children: [
23
+ /* @__PURE__ */ i(c, { children: [
24
+ /* @__PURE__ */ r("meta", {
25
+ content: "light dark",
26
+ name: "color-scheme"
27
+ }),
28
+ /* @__PURE__ */ r("meta", {
29
+ content: "light dark",
30
+ name: "supported-color-schemes"
31
+ }),
32
+ /* @__PURE__ */ r(t, {
33
+ colors: T,
34
+ darkMode: D
35
+ }),
36
+ k
37
+ ] }),
38
+ /* @__PURE__ */ r(m, { children: M }),
39
+ /* @__PURE__ */ r(g, {
40
+ config: { presets: [v] },
41
+ children: /* @__PURE__ */ r(a, {
42
+ className: e("bg-background font-sans", E?.body),
43
+ children: /* @__PURE__ */ r(s, {
44
+ className: e("mx-auto my-auto max-w-xl px-2 py-10", E?.container),
45
+ children: /* @__PURE__ */ i(h, {
46
+ className: e("bg-card text-card-foreground rounded-none border border-border p-8", E?.card),
47
+ children: [
48
+ w && (typeof w == "string" ? /* @__PURE__ */ r(f, {
49
+ src: w,
50
+ width: 48,
51
+ height: 48,
52
+ alt: S || j.LOGO,
53
+ className: e("mx-auto mb-8", E?.logo)
54
+ }) : /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r(f, {
55
+ src: w.light,
56
+ width: 48,
57
+ height: 48,
58
+ alt: S || j.LOGO,
59
+ className: e("mx-auto mb-8 logo-light", E?.logo)
60
+ }), /* @__PURE__ */ r(f, {
61
+ src: w.dark,
62
+ width: 48,
63
+ height: 48,
64
+ alt: S || j.LOGO,
65
+ className: e("hidden mx-auto mb-8 logo-dark", E?.logo)
66
+ })] })),
67
+ /* @__PURE__ */ r(l, {
68
+ className: e("m-0 mb-5 text-2xl font-semibold", E?.title),
69
+ children: S ? j.SIGN_IN_TO_APP_NAME.replace("{appName}", S) : j.SIGN_IN_TO_YOUR_ACCOUNT
70
+ }),
71
+ /* @__PURE__ */ r(_, {
72
+ className: e("m-0 text-sm font-normal", E?.content),
73
+ children: (() => {
74
+ let [e, t] = j.CLICK_BUTTON_TO_SIGN_IN.split("{emailAddress}");
75
+ return x ? /* @__PURE__ */ i(n, { children: [
76
+ e,
77
+ /* @__PURE__ */ r(p, {
78
+ href: `mailto:${x}`,
79
+ className: "text-primary font-medium",
80
+ children: x
81
+ }),
82
+ t
83
+ ] }) : j.CLICK_BUTTON_TO_SIGN_IN.replace("{emailAddress}", "").replace(/\s{2,}/g, " ").replace(" .", ".");
84
+ })()
85
+ }),
86
+ /* @__PURE__ */ r(h, {
87
+ className: "my-6",
88
+ children: /* @__PURE__ */ r(o, {
89
+ href: y,
90
+ className: e("inline-block whitespace-nowrap rounded-none text-sm font-medium py-2.5 px-6 bg-primary text-primary-foreground no-underline", E?.button),
91
+ children: S ? j.SIGN_IN_TO_APP_NAME.replace("{appName}", S) : j.SIGN_IN_TO_YOUR_ACCOUNT
92
+ })
93
+ }),
94
+ /* @__PURE__ */ r(_, {
95
+ className: e("m-0 mb-3 text-xs text-muted-foreground", E?.description),
96
+ children: j.OR_COPY_AND_PASTE_URL
97
+ }),
98
+ /* @__PURE__ */ r(p, {
99
+ className: e("break-all text-xs text-primary", E?.link),
100
+ href: y,
101
+ children: y
102
+ }),
103
+ /* @__PURE__ */ r(u, { className: e("my-6 w-full border border-solid border-border", E?.separator) }),
104
+ C || S ? /* @__PURE__ */ i(_, {
105
+ className: e("m-0 mb-3 text-xs text-muted-foreground", E?.description),
106
+ children: [C ? j.THIS_LINK_EXPIRES_IN_MINUTES.replace("{expirationMinutes}", C.toString()) : null, S && /* @__PURE__ */ i(n, { children: [C ? " " : "", j.EMAIL_SENT_BY.replace("{appName}", S)] })]
107
+ }) : null,
108
+ /* @__PURE__ */ r(_, {
109
+ className: e("m-0 text-xs text-muted-foreground", E?.description),
110
+ children: j.IF_YOU_DIDNT_REQUEST_THIS_EMAIL
111
+ }),
112
+ O && /* @__PURE__ */ r(_, {
113
+ className: e("m-0 mt-4 text-center text-[11px] text-muted-foreground", E?.poweredBy),
114
+ children: (() => {
115
+ let [t, a] = j.POWERED_BY_BETTER_AUTH.split("{betterAuth}");
116
+ return /* @__PURE__ */ i(n, { children: [
117
+ t,
118
+ /* @__PURE__ */ r(p, {
119
+ href: "https://better-auth.com",
120
+ className: e("text-primary underline", E?.link),
121
+ children: "better-auth"
122
+ }),
123
+ a
124
+ ] });
125
+ })()
126
+ })
127
+ ]
128
+ })
129
+ })
130
+ })
131
+ })
132
+ ] });
16
133
  };
17
- /**
18
- * Email template component that sends magic link authentication emails for passwordless sign-in.
19
- *
20
- * This email includes:
21
- * - Sign-in button with magic link
22
- * - Fallback URL for manual copy/paste
23
- * - Expiration time information
24
- * - Security notice for unauthorized requests
25
- * - Customizable branding and styling
26
- * - Support for light/dark mode themes
27
- *
28
- * @example
29
- * ```tsx
30
- * <MagicLinkEmail
31
- * url="https://example.com/auth/verify?token=abc123"
32
- * email="user@example.com"
33
- * appName="My App"
34
- * expirationMinutes={5}
35
- * logoURL="https://example.com/logo.png"
36
- * darkMode={true}
37
- * />
38
- * ```
39
- */
40
- export const MagicLinkEmail = ({ url, email, appName, expirationMinutes = 5, logoURL, colors, classNames, darkMode = true, poweredBy, head, ...props }) => {
41
- const localization = {
42
- ...MagicLinkEmail.localization,
43
- ...props.localization
44
- };
45
- const previewText = appName
46
- ? localization.SIGN_IN_TO_APP_NAME.replace("{appName}", appName)
47
- : localization.SIGN_IN_TO_YOUR_ACCOUNT;
48
- return (_jsxs(Html, { children: [_jsxs(Head, { children: [_jsx("meta", { content: "light dark", name: "color-scheme" }), _jsx("meta", { content: "light dark", name: "supported-color-schemes" }), _jsx(EmailStyles, { colors: colors, darkMode: darkMode }), head] }), _jsx(Preview, { children: previewText }), _jsx(Tailwind, { config: { presets: [pixelBasedPreset] }, children: _jsx(Body, { className: cn("bg-background font-sans", classNames?.body), children: _jsx(Container, { className: cn("mx-auto my-auto max-w-xl px-2 py-10", classNames?.container), children: _jsxs(Section, { className: cn("bg-card text-card-foreground rounded-none border border-border p-8", classNames?.card), children: [logoURL &&
49
- (typeof logoURL === "string" ? (_jsx(Img, { src: logoURL, width: 48, height: 48, alt: appName || localization.LOGO, className: cn("mx-auto mb-8", classNames?.logo) })) : (_jsxs(_Fragment, { children: [_jsx(Img, { src: logoURL.light, width: 48, height: 48, alt: appName || localization.LOGO, className: cn("mx-auto mb-8 logo-light", classNames?.logo) }), _jsx(Img, { src: logoURL.dark, width: 48, height: 48, alt: appName || localization.LOGO, className: cn("hidden mx-auto mb-8 logo-dark", classNames?.logo) })] }))), _jsx(Heading, { className: cn("m-0 mb-5 text-2xl font-semibold", classNames?.title), children: appName
50
- ? localization.SIGN_IN_TO_APP_NAME.replace("{appName}", appName)
51
- : localization.SIGN_IN_TO_YOUR_ACCOUNT }), _jsx(Text, { className: cn("m-0 text-sm font-normal", classNames?.content), children: (() => {
52
- const [beforeEmailAddress, afterEmailAddress] = localization.CLICK_BUTTON_TO_SIGN_IN.split("{emailAddress}");
53
- return email ? (_jsxs(_Fragment, { children: [beforeEmailAddress, _jsx(Link, { href: `mailto:${email}`, className: "text-primary font-medium", children: email }), afterEmailAddress] })) : (localization.CLICK_BUTTON_TO_SIGN_IN.replace("{emailAddress}", "")
54
- .replace(/\s{2,}/g, " ")
55
- .replace(" .", "."));
56
- })() }), _jsx(Section, { className: "my-6", children: _jsx(Button, { href: url, className: cn("inline-block whitespace-nowrap rounded-none text-sm font-medium py-2.5 px-6 bg-primary text-primary-foreground no-underline", classNames?.button), children: appName
57
- ? localization.SIGN_IN_TO_APP_NAME.replace("{appName}", appName)
58
- : localization.SIGN_IN_TO_YOUR_ACCOUNT }) }), _jsx(Text, { className: cn("m-0 mb-3 text-xs text-muted-foreground", classNames?.description), children: localization.OR_COPY_AND_PASTE_URL }), _jsx(Link, { className: cn("break-all text-xs text-primary", classNames?.link), href: url, children: url }), _jsx(Hr, { className: cn("my-6 w-full border border-solid border-border", classNames?.separator) }), expirationMinutes || appName ? (_jsxs(Text, { className: cn("m-0 mb-3 text-xs text-muted-foreground", classNames?.description), children: [expirationMinutes
59
- ? localization.THIS_LINK_EXPIRES_IN_MINUTES.replace("{expirationMinutes}", expirationMinutes.toString())
60
- : null, appName && (_jsxs(_Fragment, { children: [expirationMinutes ? " " : "", localization.EMAIL_SENT_BY.replace("{appName}", appName)] }))] })) : null, _jsx(Text, { className: cn("m-0 text-xs text-muted-foreground", classNames?.description), children: localization.IF_YOU_DIDNT_REQUEST_THIS_EMAIL }), poweredBy && (_jsx(Text, { className: cn("m-0 mt-4 text-center text-[11px] text-muted-foreground", classNames?.poweredBy), children: (() => {
61
- const [beforeBetterAuth, afterBetterAuth] = localization.POWERED_BY_BETTER_AUTH.split("{betterAuth}");
62
- return (_jsxs(_Fragment, { children: [beforeBetterAuth, _jsx(Link, { href: "https://better-auth.com", className: cn("text-primary underline", classNames?.link), children: "better-auth" }), afterBetterAuth] }));
63
- })() }))] }) }) }) })] }));
134
+ b.localization = y, b.PreviewProps = {
135
+ url: "https://better-auth-ui.com/auth/verify?token=example-token",
136
+ email: "m@example.com",
137
+ appName: "Better Auth",
138
+ darkMode: !0
64
139
  };
65
- MagicLinkEmail.localization = magicLinkEmailLocalization;
66
- MagicLinkEmail.PreviewProps = {
67
- url: "https://better-auth-ui.com/auth/verify?token=example-token",
68
- email: "m@example.com",
69
- appName: "Better Auth",
70
- darkMode: true
71
- };
72
- export default MagicLinkEmail;
140
+ //#endregion
141
+ export { b as default };
@@ -1,5 +1,5 @@
1
- import type { ReactNode } from "react";
2
- import { type EmailClassNames, type EmailColors } from "./email-styles";
1
+ import { ReactNode } from 'react';
2
+ import { EmailClassNames, EmailColors } from './email-styles';
3
3
  /**
4
4
  * Device information displayed in the new device email notification.
5
5
  */