@better-auth-ui/react 1.6.9 → 1.6.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/auth/auth-context.d.ts +2 -2
- package/dist/components/auth/auth-provider.d.ts +4 -4
- package/dist/components/auth/email/email-changed.d.ts +2 -2
- package/dist/components/auth/email/email-verification.d.ts +2 -2
- package/dist/components/auth/email/index.d.ts +10 -10
- package/dist/components/auth/email/magic-link.d.ts +2 -2
- package/dist/components/auth/email/new-device.d.ts +2 -2
- package/dist/components/auth/email/organization-invitation.d.ts +2 -2
- package/dist/components/auth/email/otp-email.d.ts +2 -2
- package/dist/components/auth/email/password-changed.d.ts +2 -2
- package/dist/components/auth/email/reset-password.d.ts +2 -2
- package/dist/components/auth/fetch-options-provider.d.ts +1 -1
- package/dist/components/icons/apple.d.ts +1 -1
- package/dist/components/icons/atlassian.d.ts +1 -1
- package/dist/components/icons/cognito.d.ts +1 -1
- package/dist/components/icons/discord.d.ts +1 -1
- package/dist/components/icons/dropbox.d.ts +1 -1
- package/dist/components/icons/facebook.d.ts +1 -1
- package/dist/components/icons/figma.d.ts +1 -1
- package/dist/components/icons/github.d.ts +1 -1
- package/dist/components/icons/gitlab.d.ts +1 -1
- package/dist/components/icons/google.d.ts +1 -1
- package/dist/components/icons/huggingface.d.ts +1 -1
- package/dist/components/icons/index.d.ts +35 -35
- package/dist/components/icons/kakao.d.ts +1 -1
- package/dist/components/icons/kick.d.ts +1 -1
- package/dist/components/icons/line.d.ts +1 -1
- package/dist/components/icons/linear.d.ts +1 -1
- package/dist/components/icons/linkedin.d.ts +1 -1
- package/dist/components/icons/microsoft.d.ts +1 -1
- package/dist/components/icons/naver.d.ts +1 -1
- package/dist/components/icons/notion.d.ts +1 -1
- package/dist/components/icons/paybin.d.ts +1 -1
- package/dist/components/icons/paypal.d.ts +1 -1
- package/dist/components/icons/polar.d.ts +1 -1
- package/dist/components/icons/railway.d.ts +1 -1
- package/dist/components/icons/reddit.d.ts +1 -1
- package/dist/components/icons/roblox.d.ts +1 -1
- package/dist/components/icons/salesforce.d.ts +1 -1
- package/dist/components/icons/slack.d.ts +1 -1
- package/dist/components/icons/spotify.d.ts +1 -1
- package/dist/components/icons/tiktok.d.ts +1 -1
- package/dist/components/icons/twitch.d.ts +1 -1
- package/dist/components/icons/vercel.d.ts +1 -1
- package/dist/components/icons/vk.d.ts +1 -1
- package/dist/components/icons/wechat.d.ts +1 -1
- package/dist/components/icons/x.d.ts +1 -1
- package/dist/components/icons/zoom.d.ts +1 -1
- package/dist/email.d.ts +1 -1
- package/dist/email.js +1348 -1
- package/dist/hooks/auth/use-authenticate.d.ts +3 -3
- package/dist/hooks/auth/use-user.d.ts +34 -34
- package/dist/hooks/use-auth-mutation.d.ts +4 -4
- package/dist/hooks/use-auth-plugin.d.ts +1 -1
- package/dist/hooks/use-auth-query.d.ts +3 -3
- package/dist/index.d.ts +48 -48
- package/dist/index.js +2469 -47
- package/dist/lib/auth-client.d.ts +4 -4
- package/dist/lib/auth-plugin.d.ts +4 -4
- package/dist/lib/auth-server.d.ts +4 -4
- package/dist/lib/provider-icons.d.ts +2 -2
- package/dist/lib/settings-tab.d.ts +2 -2
- package/dist/lib/utils.d.ts +1 -1
- package/dist/mutations/api-key/create-api-key-mutation.d.ts +5 -5
- package/dist/mutations/api-key/delete-api-key-mutation.d.ts +5 -5
- package/dist/mutations/auth/request-password-reset-mutation.d.ts +4 -4
- package/dist/mutations/auth/reset-password-mutation.d.ts +4 -4
- package/dist/mutations/auth/send-verification-email-mutation.d.ts +4 -4
- package/dist/mutations/auth/sign-in-email-mutation.d.ts +7 -7
- package/dist/mutations/auth/sign-in-social-mutation.d.ts +6 -6
- package/dist/mutations/auth/sign-out-mutation.d.ts +5 -5
- package/dist/mutations/auth/sign-up-email-mutation.d.ts +9 -9
- package/dist/mutations/auth-mutation-options.d.ts +2 -2
- package/dist/mutations/magic-link/sign-in-magic-link-mutation.d.ts +4 -4
- package/dist/mutations/multi-session/revoke-multi-session-mutation.d.ts +5 -5
- package/dist/mutations/multi-session/set-active-session-mutation.d.ts +5 -5
- package/dist/mutations/organization/accept-invitation-mutation.d.ts +7 -7
- package/dist/mutations/organization/cancel-invitation-mutation.d.ts +7 -7
- package/dist/mutations/organization/check-slug-mutation.d.ts +4 -4
- package/dist/mutations/organization/create-organization-mutation.d.ts +5 -5
- package/dist/mutations/organization/delete-organization-mutation.d.ts +5 -5
- package/dist/mutations/organization/index.d.ts +12 -12
- package/dist/mutations/organization/invite-member-mutation.d.ts +9 -9
- package/dist/mutations/organization/leave-organization-mutation.d.ts +5 -5
- package/dist/mutations/organization/reject-invitation-mutation.d.ts +7 -7
- package/dist/mutations/organization/remove-member-mutation.d.ts +5 -5
- package/dist/mutations/organization/set-active-organization-mutation.d.ts +7 -7
- package/dist/mutations/organization/update-member-role-mutation.d.ts +5 -5
- package/dist/mutations/organization/update-organization-mutation.d.ts +5 -5
- package/dist/mutations/passkey/add-passkey-mutation.d.ts +13 -13
- package/dist/mutations/passkey/delete-passkey-mutation.d.ts +5 -5
- package/dist/mutations/passkey/sign-in-passkey-mutation.d.ts +21 -21
- package/dist/mutations/settings/change-email-mutation.d.ts +5 -5
- package/dist/mutations/settings/change-password-mutation.d.ts +6 -6
- package/dist/mutations/settings/delete-user-mutation.d.ts +4 -4
- package/dist/mutations/settings/link-social-mutation.d.ts +4 -4
- package/dist/mutations/settings/revoke-session-mutation.d.ts +5 -5
- package/dist/mutations/settings/unlink-account-mutation.d.ts +5 -5
- package/dist/mutations/settings/update-user-mutation.d.ts +5 -5
- package/dist/mutations/username/is-username-available-mutation.d.ts +4 -4
- package/dist/mutations/username/sign-in-username-mutation.d.ts +7 -7
- package/dist/plugins/captcha-plugin.d.ts +1 -1
- package/dist/plugins.d.ts +1 -1
- package/dist/plugins.js +27 -1
- package/dist/queries/api-key/list-api-keys-query.d.ts +6 -6
- package/dist/queries/auth/session-query.d.ts +6 -6
- package/dist/queries/auth-query-options.d.ts +2 -2
- package/dist/queries/multi-session/list-device-sessions-query.d.ts +6 -6
- package/dist/queries/organization/active-organization-query.d.ts +8 -8
- package/dist/queries/organization/full-organization-query.d.ts +6 -6
- package/dist/queries/organization/has-permission-query.d.ts +6 -6
- package/dist/queries/organization/index.d.ts +7 -7
- package/dist/queries/organization/list-invitations-query.d.ts +6 -6
- package/dist/queries/organization/list-members-query.d.ts +6 -6
- package/dist/queries/organization/list-organizations-query.d.ts +6 -6
- package/dist/queries/organization/list-user-invitations-query.d.ts +6 -6
- package/dist/queries/passkey/list-passkeys-query.d.ts +6 -6
- package/dist/queries/settings/account-info-query.d.ts +6 -6
- package/dist/queries/settings/list-accounts-query.d.ts +6 -6
- package/dist/queries/settings/list-sessions-query.d.ts +6 -6
- package/dist/server/queries/api-key/list-api-keys-query.d.ts +5 -5
- package/dist/server/queries/auth/session-query.d.ts +5 -5
- package/dist/server/queries/multi-session/list-device-sessions-query.d.ts +5 -5
- package/dist/server/queries/organization/active-organization-query.d.ts +7 -7
- package/dist/server/queries/organization/full-organization-query.d.ts +5 -5
- package/dist/server/queries/organization/has-permission-query.d.ts +5 -5
- package/dist/server/queries/organization/list-invitations-query.d.ts +5 -5
- package/dist/server/queries/organization/list-members-query.d.ts +5 -5
- package/dist/server/queries/organization/list-organizations-query.d.ts +5 -5
- package/dist/server/queries/organization/list-user-invitations-query.d.ts +5 -5
- package/dist/server/queries/passkey/list-passkeys-query.d.ts +5 -5
- package/dist/server/queries/settings/account-info-query.d.ts +5 -5
- package/dist/server/queries/settings/list-accounts-query.d.ts +5 -5
- package/dist/server/queries/settings/list-sessions-query.d.ts +5 -5
- package/dist/server.d.ts +15 -15
- package/dist/server.js +131 -14
- package/dist/use-auth-plugin-ClcP84Uz.js +80 -0
- package/package.json +2 -2
- package/dist/components/auth/auth-context.js +0 -4
- package/dist/components/auth/auth-provider.js +0 -68
- package/dist/components/auth/email/email-changed.js +0 -70
- package/dist/components/auth/email/email-localization.js +0 -26
- package/dist/components/auth/email/email-styles.js +0 -129
- package/dist/components/auth/email/email-verification.js +0 -75
- package/dist/components/auth/email/index.js +0 -10
- package/dist/components/auth/email/magic-link.js +0 -72
- package/dist/components/auth/email/new-device.js +0 -90
- package/dist/components/auth/email/organization-invitation.js +0 -110
- package/dist/components/auth/email/otp-email.js +0 -65
- package/dist/components/auth/email/password-changed.js +0 -76
- package/dist/components/auth/email/reset-password.js +0 -68
- package/dist/components/auth/fetch-options-provider.js +0 -31
- package/dist/components/icons/apple.js +0 -10
- package/dist/components/icons/atlassian.js +0 -14
- package/dist/components/icons/cognito.js +0 -10
- package/dist/components/icons/discord.js +0 -10
- package/dist/components/icons/dropbox.js +0 -10
- package/dist/components/icons/facebook.js +0 -12
- package/dist/components/icons/figma.js +0 -13
- package/dist/components/icons/github.js +0 -12
- package/dist/components/icons/gitlab.js +0 -10
- package/dist/components/icons/google.js +0 -10
- package/dist/components/icons/huggingface.js +0 -10
- package/dist/components/icons/index.js +0 -35
- package/dist/components/icons/kakao.js +0 -12
- package/dist/components/icons/kick.js +0 -12
- package/dist/components/icons/line.js +0 -10
- package/dist/components/icons/linear.js +0 -10
- package/dist/components/icons/linkedin.js +0 -10
- package/dist/components/icons/microsoft.js +0 -10
- package/dist/components/icons/naver.js +0 -10
- package/dist/components/icons/notion.js +0 -10
- package/dist/components/icons/paybin.js +0 -9
- package/dist/components/icons/paypal.js +0 -10
- package/dist/components/icons/polar.js +0 -10
- package/dist/components/icons/railway.js +0 -10
- package/dist/components/icons/reddit.js +0 -10
- package/dist/components/icons/roblox.js +0 -13
- package/dist/components/icons/salesforce.js +0 -10
- package/dist/components/icons/slack.js +0 -10
- package/dist/components/icons/spotify.js +0 -10
- package/dist/components/icons/tiktok.js +0 -11
- package/dist/components/icons/twitch.js +0 -13
- package/dist/components/icons/vercel.js +0 -10
- package/dist/components/icons/vk.js +0 -10
- package/dist/components/icons/wechat.js +0 -10
- package/dist/components/icons/x.js +0 -10
- package/dist/components/icons/zoom.js +0 -12
- package/dist/components/mutation-invalidator.js +0 -31
- package/dist/components/settings/account/theme-preview.js +0 -10
- package/dist/hooks/auth/use-authenticate.js +0 -29
- package/dist/hooks/auth/use-user.js +0 -15
- package/dist/hooks/use-auth-mutation.js +0 -19
- package/dist/hooks/use-auth-plugin.js +0 -28
- package/dist/hooks/use-auth-query.js +0 -21
- package/dist/lib/auth-client.js +0 -1
- package/dist/lib/auth-plugin.js +0 -1
- package/dist/lib/auth-server.js +0 -1
- package/dist/lib/provider-icons.js +0 -48
- package/dist/lib/settings-tab.js +0 -1
- package/dist/lib/utils.js +0 -5
- package/dist/mutations/api-key/create-api-key-mutation.js +0 -39
- package/dist/mutations/api-key/delete-api-key-mutation.js +0 -39
- package/dist/mutations/auth/request-password-reset-mutation.js +0 -33
- package/dist/mutations/auth/reset-password-mutation.js +0 -34
- package/dist/mutations/auth/send-verification-email-mutation.js +0 -33
- package/dist/mutations/auth/sign-in-email-mutation.js +0 -40
- package/dist/mutations/auth/sign-in-social-mutation.js +0 -38
- package/dist/mutations/auth/sign-out-mutation.js +0 -41
- package/dist/mutations/auth/sign-up-email-mutation.js +0 -36
- package/dist/mutations/auth-mutation-options.js +0 -23
- package/dist/mutations/magic-link/sign-in-magic-link-mutation.js +0 -33
- package/dist/mutations/multi-session/revoke-multi-session-mutation.js +0 -39
- package/dist/mutations/multi-session/set-active-session-mutation.js +0 -40
- package/dist/mutations/organization/accept-invitation-mutation.js +0 -32
- package/dist/mutations/organization/cancel-invitation-mutation.js +0 -28
- package/dist/mutations/organization/check-slug-mutation.js +0 -30
- package/dist/mutations/organization/create-organization-mutation.js +0 -29
- package/dist/mutations/organization/delete-organization-mutation.js +0 -29
- package/dist/mutations/organization/index.js +0 -12
- package/dist/mutations/organization/invite-member-mutation.js +0 -35
- package/dist/mutations/organization/leave-organization-mutation.js +0 -32
- package/dist/mutations/organization/reject-invitation-mutation.js +0 -25
- package/dist/mutations/organization/remove-member-mutation.js +0 -29
- package/dist/mutations/organization/set-active-organization-mutation.js +0 -72
- package/dist/mutations/organization/update-member-role-mutation.js +0 -36
- package/dist/mutations/organization/update-organization-mutation.js +0 -36
- package/dist/mutations/passkey/add-passkey-mutation.js +0 -40
- package/dist/mutations/passkey/delete-passkey-mutation.js +0 -39
- package/dist/mutations/passkey/sign-in-passkey-mutation.js +0 -38
- package/dist/mutations/settings/change-email-mutation.js +0 -37
- package/dist/mutations/settings/change-password-mutation.js +0 -33
- package/dist/mutations/settings/delete-user-mutation.js +0 -33
- package/dist/mutations/settings/link-social-mutation.js +0 -33
- package/dist/mutations/settings/revoke-session-mutation.js +0 -39
- package/dist/mutations/settings/unlink-account-mutation.js +0 -39
- package/dist/mutations/settings/update-user-mutation.js +0 -36
- package/dist/mutations/username/is-username-available-mutation.js +0 -36
- package/dist/mutations/username/sign-in-username-mutation.js +0 -37
- package/dist/plugins/captcha-plugin.js +0 -34
- package/dist/queries/api-key/list-api-keys-query.js +0 -54
- package/dist/queries/auth/session-query.js +0 -72
- package/dist/queries/auth-query-options.js +0 -21
- package/dist/queries/multi-session/list-device-sessions-query.js +0 -85
- package/dist/queries/organization/active-organization-query.js +0 -37
- package/dist/queries/organization/full-organization-query.js +0 -31
- package/dist/queries/organization/has-permission-query.js +0 -38
- package/dist/queries/organization/index.js +0 -7
- package/dist/queries/organization/list-invitations-query.js +0 -37
- package/dist/queries/organization/list-members-query.js +0 -37
- package/dist/queries/organization/list-organizations-query.js +0 -31
- package/dist/queries/organization/list-user-invitations-query.js +0 -31
- package/dist/queries/passkey/list-passkeys-query.js +0 -83
- package/dist/queries/settings/account-info-query.js +0 -87
- package/dist/queries/settings/list-accounts-query.js +0 -85
- package/dist/queries/settings/list-sessions-query.js +0 -83
- package/dist/server/queries/api-key/list-api-keys-query.js +0 -49
- package/dist/server/queries/auth/session-query.js +0 -51
- package/dist/server/queries/multi-session/list-device-sessions-query.js +0 -54
- package/dist/server/queries/organization/active-organization-query.js +0 -25
- package/dist/server/queries/organization/full-organization-query.js +0 -21
- package/dist/server/queries/organization/has-permission-query.js +0 -23
- package/dist/server/queries/organization/list-invitations-query.js +0 -21
- package/dist/server/queries/organization/list-members-query.js +0 -21
- package/dist/server/queries/organization/list-organizations-query.js +0 -21
- package/dist/server/queries/organization/list-user-invitations-query.js +0 -21
- package/dist/server/queries/passkey/list-passkeys-query.js +0 -54
- package/dist/server/queries/settings/account-info-query.js +0 -54
- package/dist/server/queries/settings/list-accounts-query.js +0 -54
- package/dist/server/queries/settings/list-sessions-query.js +0 -54
package/dist/email.js
CHANGED
|
@@ -1 +1,1348 @@
|
|
|
1
|
-
|
|
1
|
+
import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { Body as r, Button as i, Container as a, Head as o, Heading as s, Hr as c, Html as l, Img as u, Link as d, Preview as f, Section as p, Tailwind as m, Text as h, pixelBasedPreset as g } from "@react-email/components";
|
|
3
|
+
import { clsx as _ } from "clsx";
|
|
4
|
+
import { twMerge as v } from "tailwind-merge";
|
|
5
|
+
//#region src/lib/utils.ts
|
|
6
|
+
function y(...e) {
|
|
7
|
+
return v(_(e));
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/components/auth/email/email-styles.tsx
|
|
11
|
+
var b = {
|
|
12
|
+
light: {
|
|
13
|
+
background: "#F5F5F5",
|
|
14
|
+
border: "#E5E5E5",
|
|
15
|
+
card: "#FFFFFF",
|
|
16
|
+
cardForeground: "#0A0A0A",
|
|
17
|
+
foreground: "#262626",
|
|
18
|
+
muted: "#F5F5F5",
|
|
19
|
+
mutedForeground: "#737373",
|
|
20
|
+
primary: "#171717",
|
|
21
|
+
primaryForeground: "#FAFAFA"
|
|
22
|
+
},
|
|
23
|
+
dark: {
|
|
24
|
+
background: "#0A0A0A",
|
|
25
|
+
border: "#2E2E2E",
|
|
26
|
+
card: "#171717",
|
|
27
|
+
cardForeground: "#FAFAFA",
|
|
28
|
+
foreground: "#D4D4D4",
|
|
29
|
+
muted: "#212121",
|
|
30
|
+
mutedForeground: "#A1A1A1",
|
|
31
|
+
primary: "#E5E5E5",
|
|
32
|
+
primaryForeground: "#171717"
|
|
33
|
+
}
|
|
34
|
+
}, x = ({ colors: e, darkMode: n = !0 }) => /* @__PURE__ */ t("style", {
|
|
35
|
+
type: "text/css",
|
|
36
|
+
children: `
|
|
37
|
+
.bg-background {
|
|
38
|
+
background-color: ${e?.light?.background || b.light.background} !important;
|
|
39
|
+
}
|
|
40
|
+
.bg-card {
|
|
41
|
+
background-color: ${e?.light?.card || b.light.card} !important;
|
|
42
|
+
}
|
|
43
|
+
.bg-primary {
|
|
44
|
+
background-color: ${e?.light?.primary || b.light.primary} !important;
|
|
45
|
+
}
|
|
46
|
+
.bg-muted {
|
|
47
|
+
background-color: ${e?.light?.muted || b.light.muted} !important;
|
|
48
|
+
}
|
|
49
|
+
.border-border {
|
|
50
|
+
border-color: ${e?.light?.border || b.light.border} !important;
|
|
51
|
+
}
|
|
52
|
+
.text-card-foreground {
|
|
53
|
+
color: ${e?.light?.cardForeground || b.light.cardForeground} !important;
|
|
54
|
+
}
|
|
55
|
+
.text-muted-foreground {
|
|
56
|
+
color: ${e?.light?.mutedForeground || b.light.mutedForeground} !important;
|
|
57
|
+
}
|
|
58
|
+
.text-primary {
|
|
59
|
+
color: ${e?.light?.primary || b.light.primary} !important;
|
|
60
|
+
}
|
|
61
|
+
.text-primary-foreground {
|
|
62
|
+
color: ${e?.light?.primaryForeground || b.light.primaryForeground} !important;
|
|
63
|
+
}
|
|
64
|
+
.logo-dark {
|
|
65
|
+
display: none !important;
|
|
66
|
+
}
|
|
67
|
+
.logo-light {
|
|
68
|
+
display: block !important;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
${n ? `@media (prefers-color-scheme: dark) {
|
|
72
|
+
.bg-background {
|
|
73
|
+
background-color: ${e?.dark?.background || b.dark.background} !important;
|
|
74
|
+
}
|
|
75
|
+
.bg-card {
|
|
76
|
+
background-color: ${e?.dark?.card || b.dark.card} !important;
|
|
77
|
+
}
|
|
78
|
+
.bg-primary {
|
|
79
|
+
background-color: ${e?.dark?.primary || b.dark.primary} !important;
|
|
80
|
+
}
|
|
81
|
+
.bg-muted {
|
|
82
|
+
background-color: ${e?.dark?.muted || b.dark.muted} !important;
|
|
83
|
+
}
|
|
84
|
+
.border-border {
|
|
85
|
+
border-color: ${e?.dark?.border || b.dark.border} !important;
|
|
86
|
+
}
|
|
87
|
+
.text-card-foreground {
|
|
88
|
+
color: ${e?.dark?.cardForeground || b.dark.cardForeground} !important;
|
|
89
|
+
}
|
|
90
|
+
.text-muted-foreground {
|
|
91
|
+
color: ${e?.dark?.mutedForeground || b.dark.mutedForeground} !important;
|
|
92
|
+
}
|
|
93
|
+
.text-primary {
|
|
94
|
+
color: ${e?.dark?.primary || b.dark.primary} !important;
|
|
95
|
+
}
|
|
96
|
+
.text-primary-foreground {
|
|
97
|
+
color: ${e?.dark?.primaryForeground || b.dark.primaryForeground} !important;
|
|
98
|
+
}
|
|
99
|
+
.logo-dark {
|
|
100
|
+
display: block !important;
|
|
101
|
+
}
|
|
102
|
+
.logo-light {
|
|
103
|
+
display: none !important;
|
|
104
|
+
}
|
|
105
|
+
* {
|
|
106
|
+
box-shadow: none !important;
|
|
107
|
+
}
|
|
108
|
+
}` : ""}
|
|
109
|
+
`
|
|
110
|
+
}), S = {
|
|
111
|
+
YOUR_EMAIL_ADDRESS_HAS_BEEN_CHANGED: "Your email address has been changed",
|
|
112
|
+
LOGO: "Logo",
|
|
113
|
+
EMAIL_ADDRESS_CHANGED: "Email address changed",
|
|
114
|
+
EMAIL_ADDRESS_FOR_YOUR_ACCOUNT_CHANGED: "The email address for your {appName} account has been changed.",
|
|
115
|
+
PREVIOUS_EMAIL: "Previous email:",
|
|
116
|
+
NEW_EMAIL: "New email:",
|
|
117
|
+
IF_YOU_MADE_THIS_CHANGE: "If you made this change, you can safely ignore this email.",
|
|
118
|
+
I_DIDNT_MAKE_THIS_CHANGE: "I didn't make this change",
|
|
119
|
+
EMAIL_SENT_BY: "Email sent by {appName}.",
|
|
120
|
+
IF_YOU_DIDNT_AUTHORIZE_THIS_CHANGE: "If you didn't authorize this change, please contact support immediately {supportEmail} to secure your account.",
|
|
121
|
+
POWERED_BY_BETTER_AUTH: "Powered by {betterAuth}"
|
|
122
|
+
}, C = ({ oldEmail: _, newEmail: v, revertURL: b, appName: S, supportEmail: w, logoURL: T, colors: E, classNames: D, darkMode: O = !0, poweredBy: k, head: A, ...j }) => {
|
|
123
|
+
let M = {
|
|
124
|
+
...C.localization,
|
|
125
|
+
...j.localization
|
|
126
|
+
}, N = M.YOUR_EMAIL_ADDRESS_HAS_BEEN_CHANGED;
|
|
127
|
+
return /* @__PURE__ */ n(l, { children: [
|
|
128
|
+
/* @__PURE__ */ n(o, { children: [
|
|
129
|
+
/* @__PURE__ */ t("meta", {
|
|
130
|
+
content: "light dark",
|
|
131
|
+
name: "color-scheme"
|
|
132
|
+
}),
|
|
133
|
+
/* @__PURE__ */ t("meta", {
|
|
134
|
+
content: "light dark",
|
|
135
|
+
name: "supported-color-schemes"
|
|
136
|
+
}),
|
|
137
|
+
/* @__PURE__ */ t(x, {
|
|
138
|
+
colors: E,
|
|
139
|
+
darkMode: O
|
|
140
|
+
}),
|
|
141
|
+
A
|
|
142
|
+
] }),
|
|
143
|
+
/* @__PURE__ */ t(f, { children: N }),
|
|
144
|
+
/* @__PURE__ */ t(m, {
|
|
145
|
+
config: { presets: [g] },
|
|
146
|
+
children: /* @__PURE__ */ t(r, {
|
|
147
|
+
className: y("bg-background font-sans", D?.body),
|
|
148
|
+
children: /* @__PURE__ */ t(a, {
|
|
149
|
+
className: y("mx-auto my-auto max-w-xl px-2 py-10", D?.container),
|
|
150
|
+
children: /* @__PURE__ */ n(p, {
|
|
151
|
+
className: y("bg-card text-card-foreground rounded-none border border-border p-8", D?.card),
|
|
152
|
+
children: [
|
|
153
|
+
T && (typeof T == "string" ? /* @__PURE__ */ t(u, {
|
|
154
|
+
src: T,
|
|
155
|
+
width: 48,
|
|
156
|
+
height: 48,
|
|
157
|
+
alt: S || M.LOGO,
|
|
158
|
+
className: y("mx-auto mb-8", D?.logo)
|
|
159
|
+
}) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(u, {
|
|
160
|
+
src: T.light,
|
|
161
|
+
width: 48,
|
|
162
|
+
height: 48,
|
|
163
|
+
alt: S || M.LOGO,
|
|
164
|
+
className: y("mx-auto mb-8 logo-light", D?.logo)
|
|
165
|
+
}), /* @__PURE__ */ t(u, {
|
|
166
|
+
src: T.dark,
|
|
167
|
+
width: 48,
|
|
168
|
+
height: 48,
|
|
169
|
+
alt: S || M.LOGO,
|
|
170
|
+
className: y("hidden mx-auto mb-8 logo-dark", D?.logo)
|
|
171
|
+
})] })),
|
|
172
|
+
/* @__PURE__ */ t(s, {
|
|
173
|
+
className: y("m-0 mb-5 text-2xl font-semibold", D?.title),
|
|
174
|
+
children: M.EMAIL_ADDRESS_CHANGED
|
|
175
|
+
}),
|
|
176
|
+
/* @__PURE__ */ t(h, {
|
|
177
|
+
className: y("text-sm font-normal", D?.content),
|
|
178
|
+
children: M.EMAIL_ADDRESS_FOR_YOUR_ACCOUNT_CHANGED.replace("{appName}", S || "").replace(/\s{2,}/g, " ").replace(" .", ".")
|
|
179
|
+
}),
|
|
180
|
+
(_ || v) && /* @__PURE__ */ n(p, {
|
|
181
|
+
className: y("my-6 border border-border bg-muted p-4", D?.codeBlock),
|
|
182
|
+
children: [_ && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(h, {
|
|
183
|
+
className: y("m-0 mb-2 text-xs text-muted-foreground", D?.description),
|
|
184
|
+
children: M.PREVIOUS_EMAIL
|
|
185
|
+
}), /* @__PURE__ */ t(h, {
|
|
186
|
+
className: y("m-0 mb-4 text-sm font-semibold", D?.content),
|
|
187
|
+
children: _
|
|
188
|
+
})] }), v && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(h, {
|
|
189
|
+
className: y("m-0 mb-2 text-xs text-muted-foreground", D?.description),
|
|
190
|
+
children: M.NEW_EMAIL
|
|
191
|
+
}), /* @__PURE__ */ t(h, {
|
|
192
|
+
className: y("m-0 text-sm font-semibold text-primary", D?.content),
|
|
193
|
+
children: v
|
|
194
|
+
})] })]
|
|
195
|
+
}),
|
|
196
|
+
/* @__PURE__ */ t(h, {
|
|
197
|
+
className: y("text-sm font-normal", D?.content),
|
|
198
|
+
children: M.IF_YOU_MADE_THIS_CHANGE
|
|
199
|
+
}),
|
|
200
|
+
b && /* @__PURE__ */ t(p, {
|
|
201
|
+
className: "my-6",
|
|
202
|
+
children: /* @__PURE__ */ t(i, {
|
|
203
|
+
href: b,
|
|
204
|
+
className: y("inline-block whitespace-nowrap rounded-none text-sm font-medium py-2.5 px-6 bg-primary text-primary-foreground no-underline", D?.button),
|
|
205
|
+
children: M.I_DIDNT_MAKE_THIS_CHANGE
|
|
206
|
+
})
|
|
207
|
+
}),
|
|
208
|
+
/* @__PURE__ */ t(c, { className: y("my-6 w-full border border-solid border-border", D?.separator) }),
|
|
209
|
+
S && /* @__PURE__ */ t(h, {
|
|
210
|
+
className: y("mb-3 text-xs text-muted-foreground", D?.description),
|
|
211
|
+
children: M.EMAIL_SENT_BY.replace("{appName}", S)
|
|
212
|
+
}),
|
|
213
|
+
/* @__PURE__ */ t(h, {
|
|
214
|
+
className: y("mt-3 text-xs text-muted-foreground", D?.description),
|
|
215
|
+
children: (() => {
|
|
216
|
+
let [r, i] = M.IF_YOU_DIDNT_AUTHORIZE_THIS_CHANGE.split("{supportEmail}");
|
|
217
|
+
return w ? /* @__PURE__ */ n(e, { children: [
|
|
218
|
+
r,
|
|
219
|
+
/* @__PURE__ */ t(d, {
|
|
220
|
+
href: `mailto:${w}`,
|
|
221
|
+
className: y("text-primary underline", D?.link),
|
|
222
|
+
children: w
|
|
223
|
+
}),
|
|
224
|
+
i
|
|
225
|
+
] }) : M.IF_YOU_DIDNT_AUTHORIZE_THIS_CHANGE.replace("{supportEmail}", "").replace(/\s{2,}/g, " ").replace(" .", ".");
|
|
226
|
+
})()
|
|
227
|
+
}),
|
|
228
|
+
k && /* @__PURE__ */ t(h, {
|
|
229
|
+
className: y("mt-4 mb-0 text-center text-[11px] text-muted-foreground", D?.poweredBy),
|
|
230
|
+
children: (() => {
|
|
231
|
+
let [r, i] = M.POWERED_BY_BETTER_AUTH.split("{betterAuth}");
|
|
232
|
+
return /* @__PURE__ */ n(e, { children: [
|
|
233
|
+
r,
|
|
234
|
+
/* @__PURE__ */ t(d, {
|
|
235
|
+
href: "https://better-auth.com",
|
|
236
|
+
className: y("text-primary underline", D?.link),
|
|
237
|
+
children: "better-auth"
|
|
238
|
+
}),
|
|
239
|
+
i
|
|
240
|
+
] });
|
|
241
|
+
})()
|
|
242
|
+
})
|
|
243
|
+
]
|
|
244
|
+
})
|
|
245
|
+
})
|
|
246
|
+
})
|
|
247
|
+
})
|
|
248
|
+
] });
|
|
249
|
+
};
|
|
250
|
+
C.localization = S, C.PreviewProps = {
|
|
251
|
+
oldEmail: "old@example.com",
|
|
252
|
+
newEmail: "new@example.com",
|
|
253
|
+
supportEmail: "support@example.com",
|
|
254
|
+
revertURL: "https://better-auth-ui.com/auth/revert-email?token=example-token",
|
|
255
|
+
appName: "Better Auth",
|
|
256
|
+
poweredBy: !0,
|
|
257
|
+
darkMode: !0
|
|
258
|
+
};
|
|
259
|
+
//#endregion
|
|
260
|
+
//#region src/components/auth/email/email-verification.tsx
|
|
261
|
+
var w = {
|
|
262
|
+
VERIFY_YOUR_EMAIL_ADDRESS: "Verify your email address",
|
|
263
|
+
LOGO: "Logo",
|
|
264
|
+
CLICK_BUTTON_TO_VERIFY_EMAIL: "Click the button below to verify your email address {emailAddress} for your {appName} account.",
|
|
265
|
+
VERIFY_EMAIL_ADDRESS: "Verify email address",
|
|
266
|
+
OR_COPY_AND_PASTE_URL: "Or copy and paste this URL into your browser:",
|
|
267
|
+
THIS_LINK_EXPIRES_IN_MINUTES: "This link expires in {expirationMinutes} minutes.",
|
|
268
|
+
EMAIL_SENT_BY: "Email sent by {appName}.",
|
|
269
|
+
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.",
|
|
270
|
+
POWERED_BY_BETTER_AUTH: "Powered by {betterAuth}"
|
|
271
|
+
}, T = ({ url: _, email: v, appName: b, expirationMinutes: S = 60, logoURL: C, colors: w, classNames: E, darkMode: D = !0, poweredBy: O, head: k, ...A }) => {
|
|
272
|
+
let j = {
|
|
273
|
+
...T.localization,
|
|
274
|
+
...A.localization
|
|
275
|
+
}, M = j.VERIFY_YOUR_EMAIL_ADDRESS;
|
|
276
|
+
return /* @__PURE__ */ n(l, { children: [
|
|
277
|
+
/* @__PURE__ */ n(o, { children: [
|
|
278
|
+
/* @__PURE__ */ t("meta", {
|
|
279
|
+
content: "light dark",
|
|
280
|
+
name: "color-scheme"
|
|
281
|
+
}),
|
|
282
|
+
/* @__PURE__ */ t("meta", {
|
|
283
|
+
content: "light dark",
|
|
284
|
+
name: "supported-color-schemes"
|
|
285
|
+
}),
|
|
286
|
+
/* @__PURE__ */ t(x, {
|
|
287
|
+
colors: w,
|
|
288
|
+
darkMode: D
|
|
289
|
+
}),
|
|
290
|
+
k
|
|
291
|
+
] }),
|
|
292
|
+
/* @__PURE__ */ t(f, { children: M }),
|
|
293
|
+
/* @__PURE__ */ t(m, {
|
|
294
|
+
config: { presets: [g] },
|
|
295
|
+
children: /* @__PURE__ */ t(r, {
|
|
296
|
+
className: y("bg-background font-sans", E?.body),
|
|
297
|
+
children: /* @__PURE__ */ t(a, {
|
|
298
|
+
className: y("mx-auto my-auto max-w-xl px-2 py-10", E?.container),
|
|
299
|
+
children: /* @__PURE__ */ n(p, {
|
|
300
|
+
className: y("bg-card text-card-foreground rounded-none border border-border p-8", E?.card),
|
|
301
|
+
children: [
|
|
302
|
+
C && (typeof C == "string" ? /* @__PURE__ */ t(u, {
|
|
303
|
+
src: C,
|
|
304
|
+
width: 48,
|
|
305
|
+
height: 48,
|
|
306
|
+
alt: b || j.LOGO,
|
|
307
|
+
className: y("mx-auto mb-8", E?.logo)
|
|
308
|
+
}) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(u, {
|
|
309
|
+
src: C.light,
|
|
310
|
+
width: 48,
|
|
311
|
+
height: 48,
|
|
312
|
+
alt: b || j.LOGO,
|
|
313
|
+
className: y("mx-auto mb-8 logo-light", E?.logo)
|
|
314
|
+
}), /* @__PURE__ */ t(u, {
|
|
315
|
+
src: C.dark,
|
|
316
|
+
width: 48,
|
|
317
|
+
height: 48,
|
|
318
|
+
alt: b || j.LOGO,
|
|
319
|
+
className: y("hidden mx-auto mb-8 logo-dark", E?.logo)
|
|
320
|
+
})] })),
|
|
321
|
+
/* @__PURE__ */ t(s, {
|
|
322
|
+
className: y("m-0 mb-5 text-2xl font-semibold", E?.title),
|
|
323
|
+
children: j.VERIFY_EMAIL_ADDRESS
|
|
324
|
+
}),
|
|
325
|
+
/* @__PURE__ */ t(h, {
|
|
326
|
+
className: y("text-sm font-normal", E?.content),
|
|
327
|
+
children: (() => {
|
|
328
|
+
let r = j.CLICK_BUTTON_TO_VERIFY_EMAIL.replace("{appName}", b || "").replace(/\s{2,}/g, " ").replace(" .", "."), [i, a] = r.split("{emailAddress}");
|
|
329
|
+
return v ? /* @__PURE__ */ n(e, { children: [
|
|
330
|
+
i,
|
|
331
|
+
/* @__PURE__ */ t(d, {
|
|
332
|
+
href: `mailto:${v}`,
|
|
333
|
+
className: "text-primary font-medium",
|
|
334
|
+
children: v
|
|
335
|
+
}),
|
|
336
|
+
a
|
|
337
|
+
] }) : r.replace("{emailAddress}", "").replace(/\s{2,}/g, " ").replace(" .", ".");
|
|
338
|
+
})()
|
|
339
|
+
}),
|
|
340
|
+
/* @__PURE__ */ t(p, {
|
|
341
|
+
className: "my-6",
|
|
342
|
+
children: /* @__PURE__ */ t(i, {
|
|
343
|
+
href: _,
|
|
344
|
+
className: y("inline-block whitespace-nowrap rounded-none text-sm font-medium py-2.5 px-6 bg-primary text-primary-foreground no-underline", E?.button),
|
|
345
|
+
children: j.VERIFY_EMAIL_ADDRESS
|
|
346
|
+
})
|
|
347
|
+
}),
|
|
348
|
+
/* @__PURE__ */ t(h, {
|
|
349
|
+
className: y("mb-3 text-xs text-muted-foreground", E?.description),
|
|
350
|
+
children: j.OR_COPY_AND_PASTE_URL
|
|
351
|
+
}),
|
|
352
|
+
/* @__PURE__ */ t(d, {
|
|
353
|
+
className: y("break-all text-xs text-primary", E?.link),
|
|
354
|
+
href: _,
|
|
355
|
+
children: _
|
|
356
|
+
}),
|
|
357
|
+
/* @__PURE__ */ t(c, { className: y("my-6 w-full border border-solid border-border", E?.separator) }),
|
|
358
|
+
S || b ? /* @__PURE__ */ n(h, {
|
|
359
|
+
className: y("mb-3 text-xs text-muted-foreground", E?.description),
|
|
360
|
+
children: [S ? j.THIS_LINK_EXPIRES_IN_MINUTES.replace("{expirationMinutes}", S.toString()) : null, b && /* @__PURE__ */ n(e, { children: [S ? " " : "", j.EMAIL_SENT_BY.replace("{appName}", b)] })]
|
|
361
|
+
}) : null,
|
|
362
|
+
/* @__PURE__ */ t(h, {
|
|
363
|
+
className: y("mt-3 text-xs text-muted-foreground", E?.description),
|
|
364
|
+
children: j.IF_YOU_DIDNT_REQUEST_THIS_EMAIL
|
|
365
|
+
}),
|
|
366
|
+
O && /* @__PURE__ */ t(h, {
|
|
367
|
+
className: y("mt-4 mb-0 text-center text-[11px] text-muted-foreground", E?.poweredBy),
|
|
368
|
+
children: (() => {
|
|
369
|
+
let [r, i] = j.POWERED_BY_BETTER_AUTH.split("{betterAuth}");
|
|
370
|
+
return /* @__PURE__ */ n(e, { children: [
|
|
371
|
+
r,
|
|
372
|
+
/* @__PURE__ */ t(d, {
|
|
373
|
+
href: "https://better-auth.com",
|
|
374
|
+
className: y("text-primary underline", E?.link),
|
|
375
|
+
children: "better-auth"
|
|
376
|
+
}),
|
|
377
|
+
i
|
|
378
|
+
] });
|
|
379
|
+
})()
|
|
380
|
+
})
|
|
381
|
+
]
|
|
382
|
+
})
|
|
383
|
+
})
|
|
384
|
+
})
|
|
385
|
+
})
|
|
386
|
+
] });
|
|
387
|
+
};
|
|
388
|
+
T.localization = w, T.PreviewProps = {
|
|
389
|
+
url: "https://better-auth-ui.com/auth/verify-email?token=example-token",
|
|
390
|
+
appName: "Better Auth",
|
|
391
|
+
email: "m@example.com",
|
|
392
|
+
darkMode: !0
|
|
393
|
+
};
|
|
394
|
+
//#endregion
|
|
395
|
+
//#region src/components/auth/email/magic-link.tsx
|
|
396
|
+
var E = {
|
|
397
|
+
SIGN_IN_TO_APP_NAME: "Sign in to {appName}",
|
|
398
|
+
SIGN_IN_TO_YOUR_ACCOUNT: "Sign in to your account",
|
|
399
|
+
YOUR_ACCOUNT: "your account",
|
|
400
|
+
LOGO: "Logo",
|
|
401
|
+
CLICK_BUTTON_TO_SIGN_IN: "Click the button below to sign in to your account {emailAddress}.",
|
|
402
|
+
OR_COPY_AND_PASTE_URL: "Or copy and paste this URL into your browser:",
|
|
403
|
+
THIS_LINK_EXPIRES_IN_MINUTES: "This link expires in {expirationMinutes} minutes.",
|
|
404
|
+
EMAIL_SENT_BY: "Email sent by {appName}.",
|
|
405
|
+
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.",
|
|
406
|
+
POWERED_BY_BETTER_AUTH: "Powered by {betterAuth}"
|
|
407
|
+
}, D = ({ url: _, email: v, appName: b, expirationMinutes: S = 5, logoURL: C, colors: w, classNames: T, darkMode: E = !0, poweredBy: O, head: k, ...A }) => {
|
|
408
|
+
let j = {
|
|
409
|
+
...D.localization,
|
|
410
|
+
...A.localization
|
|
411
|
+
}, M = b ? j.SIGN_IN_TO_APP_NAME.replace("{appName}", b) : j.SIGN_IN_TO_YOUR_ACCOUNT;
|
|
412
|
+
return /* @__PURE__ */ n(l, { children: [
|
|
413
|
+
/* @__PURE__ */ n(o, { children: [
|
|
414
|
+
/* @__PURE__ */ t("meta", {
|
|
415
|
+
content: "light dark",
|
|
416
|
+
name: "color-scheme"
|
|
417
|
+
}),
|
|
418
|
+
/* @__PURE__ */ t("meta", {
|
|
419
|
+
content: "light dark",
|
|
420
|
+
name: "supported-color-schemes"
|
|
421
|
+
}),
|
|
422
|
+
/* @__PURE__ */ t(x, {
|
|
423
|
+
colors: w,
|
|
424
|
+
darkMode: E
|
|
425
|
+
}),
|
|
426
|
+
k
|
|
427
|
+
] }),
|
|
428
|
+
/* @__PURE__ */ t(f, { children: M }),
|
|
429
|
+
/* @__PURE__ */ t(m, {
|
|
430
|
+
config: { presets: [g] },
|
|
431
|
+
children: /* @__PURE__ */ t(r, {
|
|
432
|
+
className: y("bg-background font-sans", T?.body),
|
|
433
|
+
children: /* @__PURE__ */ t(a, {
|
|
434
|
+
className: y("mx-auto my-auto max-w-xl px-2 py-10", T?.container),
|
|
435
|
+
children: /* @__PURE__ */ n(p, {
|
|
436
|
+
className: y("bg-card text-card-foreground rounded-none border border-border p-8", T?.card),
|
|
437
|
+
children: [
|
|
438
|
+
C && (typeof C == "string" ? /* @__PURE__ */ t(u, {
|
|
439
|
+
src: C,
|
|
440
|
+
width: 48,
|
|
441
|
+
height: 48,
|
|
442
|
+
alt: b || j.LOGO,
|
|
443
|
+
className: y("mx-auto mb-8", T?.logo)
|
|
444
|
+
}) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(u, {
|
|
445
|
+
src: C.light,
|
|
446
|
+
width: 48,
|
|
447
|
+
height: 48,
|
|
448
|
+
alt: b || j.LOGO,
|
|
449
|
+
className: y("mx-auto mb-8 logo-light", T?.logo)
|
|
450
|
+
}), /* @__PURE__ */ t(u, {
|
|
451
|
+
src: C.dark,
|
|
452
|
+
width: 48,
|
|
453
|
+
height: 48,
|
|
454
|
+
alt: b || j.LOGO,
|
|
455
|
+
className: y("hidden mx-auto mb-8 logo-dark", T?.logo)
|
|
456
|
+
})] })),
|
|
457
|
+
/* @__PURE__ */ t(s, {
|
|
458
|
+
className: y("m-0 mb-5 text-2xl font-semibold", T?.title),
|
|
459
|
+
children: b ? j.SIGN_IN_TO_APP_NAME.replace("{appName}", b) : j.SIGN_IN_TO_YOUR_ACCOUNT
|
|
460
|
+
}),
|
|
461
|
+
/* @__PURE__ */ t(h, {
|
|
462
|
+
className: y("m-0 text-sm font-normal", T?.content),
|
|
463
|
+
children: (() => {
|
|
464
|
+
let [r, i] = j.CLICK_BUTTON_TO_SIGN_IN.split("{emailAddress}");
|
|
465
|
+
return v ? /* @__PURE__ */ n(e, { children: [
|
|
466
|
+
r,
|
|
467
|
+
/* @__PURE__ */ t(d, {
|
|
468
|
+
href: `mailto:${v}`,
|
|
469
|
+
className: "text-primary font-medium",
|
|
470
|
+
children: v
|
|
471
|
+
}),
|
|
472
|
+
i
|
|
473
|
+
] }) : j.CLICK_BUTTON_TO_SIGN_IN.replace("{emailAddress}", "").replace(/\s{2,}/g, " ").replace(" .", ".");
|
|
474
|
+
})()
|
|
475
|
+
}),
|
|
476
|
+
/* @__PURE__ */ t(p, {
|
|
477
|
+
className: "my-6",
|
|
478
|
+
children: /* @__PURE__ */ t(i, {
|
|
479
|
+
href: _,
|
|
480
|
+
className: y("inline-block whitespace-nowrap rounded-none text-sm font-medium py-2.5 px-6 bg-primary text-primary-foreground no-underline", T?.button),
|
|
481
|
+
children: b ? j.SIGN_IN_TO_APP_NAME.replace("{appName}", b) : j.SIGN_IN_TO_YOUR_ACCOUNT
|
|
482
|
+
})
|
|
483
|
+
}),
|
|
484
|
+
/* @__PURE__ */ t(h, {
|
|
485
|
+
className: y("m-0 mb-3 text-xs text-muted-foreground", T?.description),
|
|
486
|
+
children: j.OR_COPY_AND_PASTE_URL
|
|
487
|
+
}),
|
|
488
|
+
/* @__PURE__ */ t(d, {
|
|
489
|
+
className: y("break-all text-xs text-primary", T?.link),
|
|
490
|
+
href: _,
|
|
491
|
+
children: _
|
|
492
|
+
}),
|
|
493
|
+
/* @__PURE__ */ t(c, { className: y("my-6 w-full border border-solid border-border", T?.separator) }),
|
|
494
|
+
S || b ? /* @__PURE__ */ n(h, {
|
|
495
|
+
className: y("m-0 mb-3 text-xs text-muted-foreground", T?.description),
|
|
496
|
+
children: [S ? j.THIS_LINK_EXPIRES_IN_MINUTES.replace("{expirationMinutes}", S.toString()) : null, b && /* @__PURE__ */ n(e, { children: [S ? " " : "", j.EMAIL_SENT_BY.replace("{appName}", b)] })]
|
|
497
|
+
}) : null,
|
|
498
|
+
/* @__PURE__ */ t(h, {
|
|
499
|
+
className: y("m-0 text-xs text-muted-foreground", T?.description),
|
|
500
|
+
children: j.IF_YOU_DIDNT_REQUEST_THIS_EMAIL
|
|
501
|
+
}),
|
|
502
|
+
O && /* @__PURE__ */ t(h, {
|
|
503
|
+
className: y("m-0 mt-4 text-center text-[11px] text-muted-foreground", T?.poweredBy),
|
|
504
|
+
children: (() => {
|
|
505
|
+
let [r, i] = j.POWERED_BY_BETTER_AUTH.split("{betterAuth}");
|
|
506
|
+
return /* @__PURE__ */ n(e, { children: [
|
|
507
|
+
r,
|
|
508
|
+
/* @__PURE__ */ t(d, {
|
|
509
|
+
href: "https://better-auth.com",
|
|
510
|
+
className: y("text-primary underline", T?.link),
|
|
511
|
+
children: "better-auth"
|
|
512
|
+
}),
|
|
513
|
+
i
|
|
514
|
+
] });
|
|
515
|
+
})()
|
|
516
|
+
})
|
|
517
|
+
]
|
|
518
|
+
})
|
|
519
|
+
})
|
|
520
|
+
})
|
|
521
|
+
})
|
|
522
|
+
] });
|
|
523
|
+
};
|
|
524
|
+
D.localization = E, D.PreviewProps = {
|
|
525
|
+
url: "https://better-auth-ui.com/auth/verify?token=example-token",
|
|
526
|
+
email: "m@example.com",
|
|
527
|
+
appName: "Better Auth",
|
|
528
|
+
darkMode: !0
|
|
529
|
+
};
|
|
530
|
+
//#endregion
|
|
531
|
+
//#region src/components/auth/email/new-device.tsx
|
|
532
|
+
var O = {
|
|
533
|
+
NEW_SIGN_IN_DETECTED: "New sign-in detected",
|
|
534
|
+
LOGO: "Logo",
|
|
535
|
+
NEW_SIGN_IN_TO_YOUR_ACCOUNT: "We detected a new sign-in to your {appName} account {userEmail} from a device we don't recognize.",
|
|
536
|
+
DEVICE_DETAILS: "Device details",
|
|
537
|
+
BROWSER: "Browser",
|
|
538
|
+
OPERATING_SYSTEM: "Operating System",
|
|
539
|
+
LOCATION: "Location",
|
|
540
|
+
IP_ADDRESS: "IP Address",
|
|
541
|
+
TIME: "Time",
|
|
542
|
+
IF_THIS_WAS_YOU: "If this was you, you can safely ignore this email. If you don't recognize this activity, please secure your account immediately.",
|
|
543
|
+
SECURE_MY_ACCOUNT: "Secure my account",
|
|
544
|
+
EMAIL_SENT_BY: "Email sent by {appName}.",
|
|
545
|
+
IF_YOU_DIDNT_SIGN_IN: "If you didn't sign in, please contact support immediately {supportEmail} to secure your account.",
|
|
546
|
+
POWERED_BY_BETTER_AUTH: "Powered by {betterAuth}"
|
|
547
|
+
}, k = ({ userEmail: _, deviceInfo: v, secureAccountLink: b, appName: S, supportEmail: C, logoURL: w, colors: T, classNames: E, darkMode: D = !0, poweredBy: O, head: A, ...j }) => {
|
|
548
|
+
let M = {
|
|
549
|
+
...k.localization,
|
|
550
|
+
...j.localization
|
|
551
|
+
}, N = M.NEW_SIGN_IN_DETECTED;
|
|
552
|
+
return /* @__PURE__ */ n(l, { children: [
|
|
553
|
+
/* @__PURE__ */ n(o, { children: [
|
|
554
|
+
/* @__PURE__ */ t("meta", {
|
|
555
|
+
content: "light dark",
|
|
556
|
+
name: "color-scheme"
|
|
557
|
+
}),
|
|
558
|
+
/* @__PURE__ */ t("meta", {
|
|
559
|
+
content: "light dark",
|
|
560
|
+
name: "supported-color-schemes"
|
|
561
|
+
}),
|
|
562
|
+
/* @__PURE__ */ t(x, {
|
|
563
|
+
colors: T,
|
|
564
|
+
darkMode: D
|
|
565
|
+
}),
|
|
566
|
+
A
|
|
567
|
+
] }),
|
|
568
|
+
/* @__PURE__ */ t(f, { children: N }),
|
|
569
|
+
/* @__PURE__ */ t(m, {
|
|
570
|
+
config: { presets: [g] },
|
|
571
|
+
children: /* @__PURE__ */ t(r, {
|
|
572
|
+
className: y("bg-background font-sans", E?.body),
|
|
573
|
+
children: /* @__PURE__ */ t(a, {
|
|
574
|
+
className: y("mx-auto my-auto max-w-xl px-2 py-10", E?.container),
|
|
575
|
+
children: /* @__PURE__ */ n(p, {
|
|
576
|
+
className: y("bg-card text-card-foreground rounded-none border border-border p-8", E?.card),
|
|
577
|
+
children: [
|
|
578
|
+
w && (typeof w == "string" ? /* @__PURE__ */ t(u, {
|
|
579
|
+
src: w,
|
|
580
|
+
width: 48,
|
|
581
|
+
height: 48,
|
|
582
|
+
alt: S || M.LOGO,
|
|
583
|
+
className: y("mx-auto mb-8", E?.logo)
|
|
584
|
+
}) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(u, {
|
|
585
|
+
src: w.light,
|
|
586
|
+
width: 48,
|
|
587
|
+
height: 48,
|
|
588
|
+
alt: S || M.LOGO,
|
|
589
|
+
className: y("mx-auto mb-8 logo-light", E?.logo)
|
|
590
|
+
}), /* @__PURE__ */ t(u, {
|
|
591
|
+
src: w.dark,
|
|
592
|
+
width: 48,
|
|
593
|
+
height: 48,
|
|
594
|
+
alt: S || M.LOGO,
|
|
595
|
+
className: y("hidden mx-auto mb-8 logo-dark", E?.logo)
|
|
596
|
+
})] })),
|
|
597
|
+
/* @__PURE__ */ t(s, {
|
|
598
|
+
className: y("m-0 mb-5 text-2xl font-semibold", E?.title),
|
|
599
|
+
children: M.NEW_SIGN_IN_DETECTED
|
|
600
|
+
}),
|
|
601
|
+
/* @__PURE__ */ t(h, {
|
|
602
|
+
className: y("text-sm font-normal", E?.content),
|
|
603
|
+
children: (() => {
|
|
604
|
+
let r = M.NEW_SIGN_IN_TO_YOUR_ACCOUNT.replace("{appName}", S || "").replace(/\s{2,}/g, " ").replace(" .", "."), [i, a] = r.split("{userEmail}");
|
|
605
|
+
return _ ? /* @__PURE__ */ n(e, { children: [
|
|
606
|
+
i,
|
|
607
|
+
/* @__PURE__ */ t(d, {
|
|
608
|
+
href: `mailto:${_}`,
|
|
609
|
+
className: "text-primary font-medium",
|
|
610
|
+
children: _
|
|
611
|
+
}),
|
|
612
|
+
a
|
|
613
|
+
] }) : r.replace("{userEmail}", "").replace(/\s{2,}/g, " ").replace(" .", ".");
|
|
614
|
+
})()
|
|
615
|
+
}),
|
|
616
|
+
v && /* @__PURE__ */ n(p, {
|
|
617
|
+
className: y("my-6 border border-border bg-muted p-4", E?.codeBlock),
|
|
618
|
+
children: [
|
|
619
|
+
/* @__PURE__ */ n(h, {
|
|
620
|
+
className: y("m-0 mb-3 text-xs text-muted-foreground", E?.description),
|
|
621
|
+
children: [M.DEVICE_DETAILS, ":"]
|
|
622
|
+
}),
|
|
623
|
+
v.browser && /* @__PURE__ */ n(h, {
|
|
624
|
+
className: y("m-0 mb-2 text-sm", E?.content),
|
|
625
|
+
children: [
|
|
626
|
+
/* @__PURE__ */ n("span", {
|
|
627
|
+
className: "font-semibold",
|
|
628
|
+
children: [M.BROWSER, ":"]
|
|
629
|
+
}),
|
|
630
|
+
" ",
|
|
631
|
+
v.browser
|
|
632
|
+
]
|
|
633
|
+
}),
|
|
634
|
+
v.os && /* @__PURE__ */ n(h, {
|
|
635
|
+
className: y("m-0 mb-2 text-sm", E?.content),
|
|
636
|
+
children: [
|
|
637
|
+
/* @__PURE__ */ n("span", {
|
|
638
|
+
className: "font-semibold",
|
|
639
|
+
children: [M.OPERATING_SYSTEM, ":"]
|
|
640
|
+
}),
|
|
641
|
+
" ",
|
|
642
|
+
v.os
|
|
643
|
+
]
|
|
644
|
+
}),
|
|
645
|
+
v.location && /* @__PURE__ */ n(h, {
|
|
646
|
+
className: y("m-0 mb-2 text-sm", E?.content),
|
|
647
|
+
children: [
|
|
648
|
+
/* @__PURE__ */ n("span", {
|
|
649
|
+
className: "font-semibold",
|
|
650
|
+
children: [M.LOCATION, ":"]
|
|
651
|
+
}),
|
|
652
|
+
" ",
|
|
653
|
+
v.location
|
|
654
|
+
]
|
|
655
|
+
}),
|
|
656
|
+
v.ipAddress && /* @__PURE__ */ n(h, {
|
|
657
|
+
className: y("m-0 mb-2 text-sm", E?.content),
|
|
658
|
+
children: [
|
|
659
|
+
/* @__PURE__ */ n("span", {
|
|
660
|
+
className: "font-semibold",
|
|
661
|
+
children: [M.IP_ADDRESS, ":"]
|
|
662
|
+
}),
|
|
663
|
+
" ",
|
|
664
|
+
v.ipAddress
|
|
665
|
+
]
|
|
666
|
+
}),
|
|
667
|
+
v.timestamp && /* @__PURE__ */ n(h, {
|
|
668
|
+
className: y("m-0 text-sm", E?.content),
|
|
669
|
+
children: [
|
|
670
|
+
/* @__PURE__ */ n("span", {
|
|
671
|
+
className: "font-semibold",
|
|
672
|
+
children: [M.TIME, ":"]
|
|
673
|
+
}),
|
|
674
|
+
" ",
|
|
675
|
+
v.timestamp
|
|
676
|
+
]
|
|
677
|
+
})
|
|
678
|
+
]
|
|
679
|
+
}),
|
|
680
|
+
/* @__PURE__ */ t(h, {
|
|
681
|
+
className: y("text-sm font-normal", E?.content),
|
|
682
|
+
children: M.IF_THIS_WAS_YOU
|
|
683
|
+
}),
|
|
684
|
+
b && /* @__PURE__ */ t(p, {
|
|
685
|
+
className: "mt-6",
|
|
686
|
+
children: /* @__PURE__ */ t(i, {
|
|
687
|
+
href: b,
|
|
688
|
+
className: y("inline-block whitespace-nowrap rounded-none text-sm font-medium py-2.5 px-6 bg-primary text-primary-foreground no-underline", E?.button),
|
|
689
|
+
children: M.SECURE_MY_ACCOUNT
|
|
690
|
+
})
|
|
691
|
+
}),
|
|
692
|
+
/* @__PURE__ */ t(c, { className: y("my-6 w-full border border-solid border-border", E?.separator) }),
|
|
693
|
+
S && /* @__PURE__ */ t(h, {
|
|
694
|
+
className: y("mb-3 text-xs text-muted-foreground", E?.description),
|
|
695
|
+
children: M.EMAIL_SENT_BY.replace("{appName}", S)
|
|
696
|
+
}),
|
|
697
|
+
/* @__PURE__ */ t(h, {
|
|
698
|
+
className: y("mt-3 text-xs text-muted-foreground", E?.description),
|
|
699
|
+
children: (() => {
|
|
700
|
+
let [r, i] = M.IF_YOU_DIDNT_SIGN_IN.split("{supportEmail}");
|
|
701
|
+
return C ? /* @__PURE__ */ n(e, { children: [
|
|
702
|
+
r,
|
|
703
|
+
/* @__PURE__ */ t(d, {
|
|
704
|
+
href: `mailto:${C}`,
|
|
705
|
+
className: y("text-primary underline", E?.link),
|
|
706
|
+
children: C
|
|
707
|
+
}),
|
|
708
|
+
i
|
|
709
|
+
] }) : M.IF_YOU_DIDNT_SIGN_IN.replace("{supportEmail}", "").replace(/\s{2,}/g, " ").replace(" .", ".");
|
|
710
|
+
})()
|
|
711
|
+
}),
|
|
712
|
+
O && /* @__PURE__ */ t(h, {
|
|
713
|
+
className: y("mt-4 mb-0 text-center text-[11px] text-muted-foreground", E?.poweredBy),
|
|
714
|
+
children: (() => {
|
|
715
|
+
let [r, i] = M.POWERED_BY_BETTER_AUTH.split("{betterAuth}");
|
|
716
|
+
return /* @__PURE__ */ n(e, { children: [
|
|
717
|
+
r,
|
|
718
|
+
/* @__PURE__ */ t(d, {
|
|
719
|
+
href: "https://better-auth.com",
|
|
720
|
+
className: y("text-primary underline", E?.link),
|
|
721
|
+
children: "better-auth"
|
|
722
|
+
}),
|
|
723
|
+
i
|
|
724
|
+
] });
|
|
725
|
+
})()
|
|
726
|
+
})
|
|
727
|
+
]
|
|
728
|
+
})
|
|
729
|
+
})
|
|
730
|
+
})
|
|
731
|
+
})
|
|
732
|
+
] });
|
|
733
|
+
};
|
|
734
|
+
k.localization = O, k.PreviewProps = {
|
|
735
|
+
userEmail: "m@example.com",
|
|
736
|
+
deviceInfo: {
|
|
737
|
+
browser: "Chrome on macOS",
|
|
738
|
+
os: "macOS 26.2",
|
|
739
|
+
location: "San Francisco, CA, United States",
|
|
740
|
+
ipAddress: "127.0.0.1",
|
|
741
|
+
timestamp: "February 10, 2025 at 4:20 PM UTC"
|
|
742
|
+
},
|
|
743
|
+
secureAccountLink: "https://better-auth-ui.com/auth/secure-account",
|
|
744
|
+
appName: "Better Auth",
|
|
745
|
+
supportEmail: "support@example.com",
|
|
746
|
+
darkMode: !0
|
|
747
|
+
};
|
|
748
|
+
//#endregion
|
|
749
|
+
//#region src/components/auth/email/organization-invitation.tsx
|
|
750
|
+
var A = {
|
|
751
|
+
YOU_RE_INVITED_TO_ORGANIZATION: "You're invited to {organizationName}",
|
|
752
|
+
YOU_RE_INVITED: "You're invited",
|
|
753
|
+
LOGO: "Logo",
|
|
754
|
+
ORGANIZATION_LOGO: "Organization logo",
|
|
755
|
+
INVITED_TO_JOIN_ORGANIZATION: "{inviterName} ({inviterEmail}) has invited you to join {organizationName} on {appName} as a {role}.",
|
|
756
|
+
ACCEPT_INVITATION: "Accept invitation",
|
|
757
|
+
VIEW_INVITATION: "View invitation",
|
|
758
|
+
OR_COPY_AND_PASTE_URL: "Or copy and paste this URL into your browser:",
|
|
759
|
+
THIS_INVITATION_EXPIRES_IN_HOURS: "This invitation expires in {expirationHours} hours.",
|
|
760
|
+
EMAIL_SENT_BY: "Email sent by {appName}.",
|
|
761
|
+
IF_YOU_DIDNT_EXPECT_THIS_INVITATION: "If you didn't expect this invitation, you can safely ignore this email.",
|
|
762
|
+
POWERED_BY_BETTER_AUTH: "Powered by {betterAuth}"
|
|
763
|
+
}, j = ({ url: _, email: v, inviterName: b, inviterEmail: S, organizationName: C, organizationLogoURL: w, role: T, appName: E, expirationHours: D = 48, logoURL: O, colors: k, classNames: A, darkMode: M = !0, poweredBy: N, head: P, ...F }) => {
|
|
764
|
+
let I = {
|
|
765
|
+
...j.localization,
|
|
766
|
+
...F.localization
|
|
767
|
+
}, L = C ? I.YOU_RE_INVITED_TO_ORGANIZATION.replace("{organizationName}", C) : I.YOU_RE_INVITED;
|
|
768
|
+
return /* @__PURE__ */ n(l, { children: [
|
|
769
|
+
/* @__PURE__ */ n(o, { children: [
|
|
770
|
+
/* @__PURE__ */ t("meta", {
|
|
771
|
+
content: "light dark",
|
|
772
|
+
name: "color-scheme"
|
|
773
|
+
}),
|
|
774
|
+
/* @__PURE__ */ t("meta", {
|
|
775
|
+
content: "light dark",
|
|
776
|
+
name: "supported-color-schemes"
|
|
777
|
+
}),
|
|
778
|
+
/* @__PURE__ */ t(x, {
|
|
779
|
+
colors: k,
|
|
780
|
+
darkMode: M
|
|
781
|
+
}),
|
|
782
|
+
P
|
|
783
|
+
] }),
|
|
784
|
+
/* @__PURE__ */ t(f, { children: L }),
|
|
785
|
+
/* @__PURE__ */ t(m, {
|
|
786
|
+
config: { presets: [g] },
|
|
787
|
+
children: /* @__PURE__ */ t(r, {
|
|
788
|
+
className: y("bg-background font-sans", A?.body),
|
|
789
|
+
children: /* @__PURE__ */ t(a, {
|
|
790
|
+
className: y("mx-auto my-auto max-w-xl px-2 py-10", A?.container),
|
|
791
|
+
children: /* @__PURE__ */ n(p, {
|
|
792
|
+
className: y("bg-card text-card-foreground rounded-none border border-border p-8", A?.card),
|
|
793
|
+
children: [
|
|
794
|
+
O && (typeof O == "string" ? /* @__PURE__ */ t(u, {
|
|
795
|
+
src: O,
|
|
796
|
+
width: 48,
|
|
797
|
+
height: 48,
|
|
798
|
+
alt: E || I.LOGO,
|
|
799
|
+
className: y("mx-auto mb-8", A?.logo)
|
|
800
|
+
}) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(u, {
|
|
801
|
+
src: O.light,
|
|
802
|
+
width: 48,
|
|
803
|
+
height: 48,
|
|
804
|
+
alt: E || I.LOGO,
|
|
805
|
+
className: y("mx-auto mb-8 logo-light", A?.logo)
|
|
806
|
+
}), /* @__PURE__ */ t(u, {
|
|
807
|
+
src: O.dark,
|
|
808
|
+
width: 48,
|
|
809
|
+
height: 48,
|
|
810
|
+
alt: E || I.LOGO,
|
|
811
|
+
className: y("hidden mx-auto mb-8 logo-dark", A?.logo)
|
|
812
|
+
})] })),
|
|
813
|
+
/* @__PURE__ */ t(s, {
|
|
814
|
+
className: y("m-0 mb-5 text-2xl font-semibold", A?.title),
|
|
815
|
+
children: C ? I.YOU_RE_INVITED_TO_ORGANIZATION.replace("{organizationName}", C) : I.YOU_RE_INVITED
|
|
816
|
+
}),
|
|
817
|
+
w && (typeof w == "string" ? /* @__PURE__ */ t(u, {
|
|
818
|
+
src: w,
|
|
819
|
+
width: 56,
|
|
820
|
+
height: 56,
|
|
821
|
+
alt: C || I.ORGANIZATION_LOGO,
|
|
822
|
+
className: y("mb-5 rounded-md", A?.logo)
|
|
823
|
+
}) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(u, {
|
|
824
|
+
src: w.light,
|
|
825
|
+
width: 56,
|
|
826
|
+
height: 56,
|
|
827
|
+
alt: C || I.ORGANIZATION_LOGO,
|
|
828
|
+
className: y("mb-5 rounded-md logo-light", A?.logo)
|
|
829
|
+
}), /* @__PURE__ */ t(u, {
|
|
830
|
+
src: w.dark,
|
|
831
|
+
width: 56,
|
|
832
|
+
height: 56,
|
|
833
|
+
alt: C || I.ORGANIZATION_LOGO,
|
|
834
|
+
className: y("hidden mb-5 rounded-md logo-dark", A?.logo)
|
|
835
|
+
})] })),
|
|
836
|
+
/* @__PURE__ */ t(h, {
|
|
837
|
+
className: y("m-0 text-sm font-normal", A?.content),
|
|
838
|
+
children: (() => {
|
|
839
|
+
let r = I.INVITED_TO_JOIN_ORGANIZATION.replace("{appName}", E || "").replace("{organizationName}", C || "").replace("{role}", T || "");
|
|
840
|
+
!b && !S && (r = r.replace("{inviterName} ({inviterEmail})", "Someone").replace("{inviterName}", "Someone").replace("({inviterEmail})", ""));
|
|
841
|
+
let [i, a] = r.split("{inviterName}"), o = (r) => {
|
|
842
|
+
let [i, a] = r.split("{inviterEmail}");
|
|
843
|
+
return S ? /* @__PURE__ */ n(e, { children: [
|
|
844
|
+
i,
|
|
845
|
+
/* @__PURE__ */ t(d, {
|
|
846
|
+
href: `mailto:${S}`,
|
|
847
|
+
className: "text-primary font-medium",
|
|
848
|
+
children: S
|
|
849
|
+
}),
|
|
850
|
+
a
|
|
851
|
+
] }) : r.replace("({inviterEmail})", "").replace("{inviterEmail}", "").replace(/\s{2,}/g, " ").replace(" .", ".");
|
|
852
|
+
};
|
|
853
|
+
return b ? /* @__PURE__ */ n(e, { children: [
|
|
854
|
+
i,
|
|
855
|
+
/* @__PURE__ */ t("span", {
|
|
856
|
+
className: "font-medium",
|
|
857
|
+
children: b
|
|
858
|
+
}),
|
|
859
|
+
o(a ?? "")
|
|
860
|
+
] }) : o(r.replace("{inviterName}", "").replace(/\s{2,}/g, " ").replace(" .", "."));
|
|
861
|
+
})()
|
|
862
|
+
}),
|
|
863
|
+
/* @__PURE__ */ t(p, {
|
|
864
|
+
className: "my-6",
|
|
865
|
+
children: /* @__PURE__ */ t(i, {
|
|
866
|
+
href: _,
|
|
867
|
+
className: y("inline-block whitespace-nowrap rounded-none text-sm font-medium py-2.5 px-6 bg-primary text-primary-foreground no-underline", A?.button),
|
|
868
|
+
children: I.ACCEPT_INVITATION
|
|
869
|
+
})
|
|
870
|
+
}),
|
|
871
|
+
/* @__PURE__ */ t(h, {
|
|
872
|
+
className: y("m-0 mb-3 text-xs text-muted-foreground", A?.description),
|
|
873
|
+
children: I.OR_COPY_AND_PASTE_URL
|
|
874
|
+
}),
|
|
875
|
+
/* @__PURE__ */ t(d, {
|
|
876
|
+
className: y("break-all text-xs text-primary", A?.link),
|
|
877
|
+
href: _,
|
|
878
|
+
children: _
|
|
879
|
+
}),
|
|
880
|
+
/* @__PURE__ */ t(c, { className: y("my-6 w-full border border-solid border-border", A?.separator) }),
|
|
881
|
+
D || E ? /* @__PURE__ */ n(h, {
|
|
882
|
+
className: y("m-0 mb-3 text-xs text-muted-foreground", A?.description),
|
|
883
|
+
children: [D ? I.THIS_INVITATION_EXPIRES_IN_HOURS.replace("{expirationHours}", D.toString()) : null, E && /* @__PURE__ */ n(e, { children: [D ? " " : "", I.EMAIL_SENT_BY.replace("{appName}", E)] })]
|
|
884
|
+
}) : null,
|
|
885
|
+
/* @__PURE__ */ t(h, {
|
|
886
|
+
className: y("m-0 text-xs text-muted-foreground", A?.description),
|
|
887
|
+
children: I.IF_YOU_DIDNT_EXPECT_THIS_INVITATION
|
|
888
|
+
}),
|
|
889
|
+
N && /* @__PURE__ */ t(h, {
|
|
890
|
+
className: y("m-0 mt-4 text-center text-[11px] text-muted-foreground", A?.poweredBy),
|
|
891
|
+
children: (() => {
|
|
892
|
+
let [r, i] = I.POWERED_BY_BETTER_AUTH.split("{betterAuth}");
|
|
893
|
+
return /* @__PURE__ */ n(e, { children: [
|
|
894
|
+
r,
|
|
895
|
+
/* @__PURE__ */ t(d, {
|
|
896
|
+
href: "https://better-auth.com",
|
|
897
|
+
className: y("text-primary underline", A?.link),
|
|
898
|
+
children: "better-auth"
|
|
899
|
+
}),
|
|
900
|
+
i
|
|
901
|
+
] });
|
|
902
|
+
})()
|
|
903
|
+
})
|
|
904
|
+
]
|
|
905
|
+
})
|
|
906
|
+
})
|
|
907
|
+
})
|
|
908
|
+
})
|
|
909
|
+
] });
|
|
910
|
+
};
|
|
911
|
+
j.localization = A, j.PreviewProps = {
|
|
912
|
+
url: "https://better-auth-ui.com/settings/organizations",
|
|
913
|
+
email: "m@example.com",
|
|
914
|
+
inviterName: "Jane Doe",
|
|
915
|
+
inviterEmail: "jane@example.com",
|
|
916
|
+
organizationName: "Acme Inc.",
|
|
917
|
+
role: "member",
|
|
918
|
+
appName: "Better Auth",
|
|
919
|
+
expirationHours: 48,
|
|
920
|
+
darkMode: !0
|
|
921
|
+
};
|
|
922
|
+
//#endregion
|
|
923
|
+
//#region src/components/auth/email/otp-email.tsx
|
|
924
|
+
var M = {
|
|
925
|
+
YOUR_VERIFICATION_CODE_IS_CODE: "Your verification code is {verificationCode}",
|
|
926
|
+
LOGO: "Logo",
|
|
927
|
+
VERIFY_YOUR_EMAIL: "Verify your email",
|
|
928
|
+
WE_NEED_TO_VERIFY_YOUR_EMAIL_ADDRESS: "We need to verify your email address {email} before you can access your {appName} account. Enter the code below in your open browser window.",
|
|
929
|
+
THIS_CODE_EXPIRES_IN_MINUTES: "This code expires in {expirationMinutes} minutes.",
|
|
930
|
+
EMAIL_SENT_BY: "Email sent by {appName}.",
|
|
931
|
+
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.",
|
|
932
|
+
POWERED_BY_BETTER_AUTH: "Powered by {betterAuth}"
|
|
933
|
+
}, N = ({ verificationCode: i, email: _, appName: v, expirationMinutes: b = 10, logoURL: S, colors: C, classNames: w, darkMode: T = !0, poweredBy: E, head: D, ...O }) => {
|
|
934
|
+
let k = {
|
|
935
|
+
...N.localization,
|
|
936
|
+
...O.localization
|
|
937
|
+
}, A = k.YOUR_VERIFICATION_CODE_IS_CODE.replace("{verificationCode}", i);
|
|
938
|
+
return /* @__PURE__ */ n(l, { children: [
|
|
939
|
+
/* @__PURE__ */ n(o, { children: [
|
|
940
|
+
/* @__PURE__ */ t("meta", {
|
|
941
|
+
content: "light dark",
|
|
942
|
+
name: "color-scheme"
|
|
943
|
+
}),
|
|
944
|
+
/* @__PURE__ */ t("meta", {
|
|
945
|
+
content: "light dark",
|
|
946
|
+
name: "supported-color-schemes"
|
|
947
|
+
}),
|
|
948
|
+
/* @__PURE__ */ t(x, {
|
|
949
|
+
colors: C,
|
|
950
|
+
darkMode: T
|
|
951
|
+
}),
|
|
952
|
+
D
|
|
953
|
+
] }),
|
|
954
|
+
/* @__PURE__ */ t(f, { children: A }),
|
|
955
|
+
/* @__PURE__ */ t(m, {
|
|
956
|
+
config: { presets: [g] },
|
|
957
|
+
children: /* @__PURE__ */ t(r, {
|
|
958
|
+
className: y("bg-background font-sans", w?.body),
|
|
959
|
+
children: /* @__PURE__ */ t(a, {
|
|
960
|
+
className: y("mx-auto my-auto max-w-xl px-2 py-10", w?.container),
|
|
961
|
+
children: /* @__PURE__ */ n(p, {
|
|
962
|
+
className: y("bg-card text-card-foreground rounded-none border border-border p-8", w?.card),
|
|
963
|
+
children: [
|
|
964
|
+
S && (typeof S == "string" ? /* @__PURE__ */ t(u, {
|
|
965
|
+
src: S,
|
|
966
|
+
width: 48,
|
|
967
|
+
height: 48,
|
|
968
|
+
alt: v || k.LOGO,
|
|
969
|
+
className: y("mx-auto mb-8", w?.logo)
|
|
970
|
+
}) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(u, {
|
|
971
|
+
src: S.light,
|
|
972
|
+
width: 48,
|
|
973
|
+
height: 48,
|
|
974
|
+
alt: v || k.LOGO,
|
|
975
|
+
className: y("mx-auto mb-8 logo-light", w?.logo)
|
|
976
|
+
}), /* @__PURE__ */ t(u, {
|
|
977
|
+
src: S.dark,
|
|
978
|
+
width: 48,
|
|
979
|
+
height: 48,
|
|
980
|
+
alt: v || k.LOGO,
|
|
981
|
+
className: y("hidden mx-auto mb-8 logo-dark", w?.logo)
|
|
982
|
+
})] })),
|
|
983
|
+
/* @__PURE__ */ t(s, {
|
|
984
|
+
className: y("mb-5 text-2xl font-semibold", w?.title),
|
|
985
|
+
children: k.VERIFY_YOUR_EMAIL
|
|
986
|
+
}),
|
|
987
|
+
/* @__PURE__ */ t(h, {
|
|
988
|
+
className: y("text-sm font-normal", w?.content),
|
|
989
|
+
children: (() => {
|
|
990
|
+
let r = k.WE_NEED_TO_VERIFY_YOUR_EMAIL_ADDRESS.replace("{appName}", v || "").replace(/\s{2,}/g, " ").replace(" .", "."), [i, a] = r.split("{email}");
|
|
991
|
+
return _ ? /* @__PURE__ */ n(e, { children: [
|
|
992
|
+
i,
|
|
993
|
+
/* @__PURE__ */ t(d, {
|
|
994
|
+
href: `mailto:${_}`,
|
|
995
|
+
className: "text-primary font-medium",
|
|
996
|
+
children: _
|
|
997
|
+
}),
|
|
998
|
+
a
|
|
999
|
+
] }) : r.replace("{email}", "").replace(/\s{2,}/g, " ").replace(" .", ".");
|
|
1000
|
+
})()
|
|
1001
|
+
}),
|
|
1002
|
+
/* @__PURE__ */ t(p, {
|
|
1003
|
+
className: y("my-6 border border-border bg-muted p-6", w?.codeBlock),
|
|
1004
|
+
children: /* @__PURE__ */ t(h, {
|
|
1005
|
+
className: y("m-0 text-center text-4xl font-semibold tracking-widest", w?.title),
|
|
1006
|
+
children: i
|
|
1007
|
+
})
|
|
1008
|
+
}),
|
|
1009
|
+
/* @__PURE__ */ t(c, { className: y("my-6 w-full border border-solid border-border", w?.separator) }),
|
|
1010
|
+
/* @__PURE__ */ n(h, {
|
|
1011
|
+
className: y("mb-3 text-xs text-muted-foreground", w?.description),
|
|
1012
|
+
children: [k.THIS_CODE_EXPIRES_IN_MINUTES.replace("{expirationMinutes}", b.toString()), v && /* @__PURE__ */ n(e, { children: [" ", k.EMAIL_SENT_BY.replace("{appName}", v)] })]
|
|
1013
|
+
}),
|
|
1014
|
+
/* @__PURE__ */ t(h, {
|
|
1015
|
+
className: y("mt-3 text-xs text-muted-foreground", w?.description),
|
|
1016
|
+
children: k.IF_YOU_DIDNT_REQUEST_THIS_EMAIL
|
|
1017
|
+
}),
|
|
1018
|
+
E && /* @__PURE__ */ t(h, {
|
|
1019
|
+
className: y("mt-4 mb-0 text-center text-[11px] text-muted-foreground", w?.poweredBy),
|
|
1020
|
+
children: (() => {
|
|
1021
|
+
let [r, i] = k.POWERED_BY_BETTER_AUTH.split("{betterAuth}");
|
|
1022
|
+
return /* @__PURE__ */ n(e, { children: [
|
|
1023
|
+
r,
|
|
1024
|
+
/* @__PURE__ */ t(d, {
|
|
1025
|
+
href: "https://better-auth.com",
|
|
1026
|
+
className: y("text-primary underline", w?.link),
|
|
1027
|
+
children: "better-auth"
|
|
1028
|
+
}),
|
|
1029
|
+
i
|
|
1030
|
+
] });
|
|
1031
|
+
})()
|
|
1032
|
+
})
|
|
1033
|
+
]
|
|
1034
|
+
})
|
|
1035
|
+
})
|
|
1036
|
+
})
|
|
1037
|
+
})
|
|
1038
|
+
] });
|
|
1039
|
+
};
|
|
1040
|
+
N.localization = M, N.PreviewProps = {
|
|
1041
|
+
verificationCode: "069420",
|
|
1042
|
+
email: "m@example.com",
|
|
1043
|
+
appName: "Better Auth",
|
|
1044
|
+
darkMode: !0
|
|
1045
|
+
};
|
|
1046
|
+
//#endregion
|
|
1047
|
+
//#region src/components/auth/email/password-changed.tsx
|
|
1048
|
+
var P = {
|
|
1049
|
+
YOUR_PASSWORD_HAS_BEEN_CHANGED: "Your password has been changed",
|
|
1050
|
+
LOGO: "Logo",
|
|
1051
|
+
PASSWORD_CHANGED_SUCCESSFULLY: "Password changed successfully",
|
|
1052
|
+
PASSWORD_FOR_YOUR_ACCOUNT_CHANGED: "The password for your {appName} account {userEmail} has been changed successfully.",
|
|
1053
|
+
CHANGED_AT: "Changed at",
|
|
1054
|
+
IF_YOU_MADE_THIS_CHANGE: "If you made this change, you can safely ignore this email. Your account is secure.",
|
|
1055
|
+
I_DIDNT_MAKE_THIS_CHANGE: "I didn't make this change",
|
|
1056
|
+
EMAIL_SENT_BY: "Email sent by {appName}.",
|
|
1057
|
+
IF_YOU_DIDNT_AUTHORIZE_THIS_CHANGE: "If you didn't authorize this change, please contact support immediately {supportEmail} to secure your account.",
|
|
1058
|
+
POWERED_BY_BETTER_AUTH: "Powered by {betterAuth}"
|
|
1059
|
+
}, F = ({ email: _, timestamp: v, secureAccountURL: b, appName: S, supportEmail: C, logoURL: w, colors: T, classNames: E, darkMode: D = !0, poweredBy: O, head: k, ...A }) => {
|
|
1060
|
+
let j = {
|
|
1061
|
+
...F.localization,
|
|
1062
|
+
...A.localization
|
|
1063
|
+
}, M = j.YOUR_PASSWORD_HAS_BEEN_CHANGED;
|
|
1064
|
+
return /* @__PURE__ */ n(l, { children: [
|
|
1065
|
+
/* @__PURE__ */ n(o, { children: [
|
|
1066
|
+
/* @__PURE__ */ t("meta", {
|
|
1067
|
+
content: "light dark",
|
|
1068
|
+
name: "color-scheme"
|
|
1069
|
+
}),
|
|
1070
|
+
/* @__PURE__ */ t("meta", {
|
|
1071
|
+
content: "light dark",
|
|
1072
|
+
name: "supported-color-schemes"
|
|
1073
|
+
}),
|
|
1074
|
+
/* @__PURE__ */ t(x, {
|
|
1075
|
+
colors: T,
|
|
1076
|
+
darkMode: D
|
|
1077
|
+
}),
|
|
1078
|
+
k
|
|
1079
|
+
] }),
|
|
1080
|
+
/* @__PURE__ */ t(f, { children: M }),
|
|
1081
|
+
/* @__PURE__ */ t(m, {
|
|
1082
|
+
config: { presets: [g] },
|
|
1083
|
+
children: /* @__PURE__ */ t(r, {
|
|
1084
|
+
className: y("bg-background font-sans", E?.body),
|
|
1085
|
+
children: /* @__PURE__ */ t(a, {
|
|
1086
|
+
className: y("mx-auto my-auto max-w-xl px-2 py-10", E?.container),
|
|
1087
|
+
children: /* @__PURE__ */ n(p, {
|
|
1088
|
+
className: y("bg-card text-card-foreground rounded-none border border-border p-8", E?.card),
|
|
1089
|
+
children: [
|
|
1090
|
+
w && (typeof w == "string" ? /* @__PURE__ */ t(u, {
|
|
1091
|
+
src: w,
|
|
1092
|
+
width: 48,
|
|
1093
|
+
height: 48,
|
|
1094
|
+
alt: S || j.LOGO,
|
|
1095
|
+
className: y("mx-auto mb-8", E?.logo)
|
|
1096
|
+
}) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(u, {
|
|
1097
|
+
src: w.light,
|
|
1098
|
+
width: 48,
|
|
1099
|
+
height: 48,
|
|
1100
|
+
alt: S || j.LOGO,
|
|
1101
|
+
className: y("mx-auto mb-8 logo-light", E?.logo)
|
|
1102
|
+
}), /* @__PURE__ */ t(u, {
|
|
1103
|
+
src: w.dark,
|
|
1104
|
+
width: 48,
|
|
1105
|
+
height: 48,
|
|
1106
|
+
alt: S || j.LOGO,
|
|
1107
|
+
className: y("hidden mx-auto mb-8 logo-dark", E?.logo)
|
|
1108
|
+
})] })),
|
|
1109
|
+
/* @__PURE__ */ t(s, {
|
|
1110
|
+
className: y("m-0 mb-5 text-2xl font-semibold", E?.title),
|
|
1111
|
+
children: j.PASSWORD_CHANGED_SUCCESSFULLY
|
|
1112
|
+
}),
|
|
1113
|
+
/* @__PURE__ */ t(h, {
|
|
1114
|
+
className: y("text-sm font-normal", E?.content),
|
|
1115
|
+
children: (() => {
|
|
1116
|
+
let r = j.PASSWORD_FOR_YOUR_ACCOUNT_CHANGED.replace("{appName}", S || "").replace(/\s{2,}/g, " ").replace(" .", "."), [i, a] = r.split("{userEmail}");
|
|
1117
|
+
return _ ? /* @__PURE__ */ n(e, { children: [
|
|
1118
|
+
i,
|
|
1119
|
+
/* @__PURE__ */ t(d, {
|
|
1120
|
+
href: `mailto:${_}`,
|
|
1121
|
+
className: "text-primary font-medium",
|
|
1122
|
+
children: _
|
|
1123
|
+
}),
|
|
1124
|
+
a
|
|
1125
|
+
] }) : r.replace("{userEmail}", "").replace(/\s{2,}/g, " ").replace(" .", ".");
|
|
1126
|
+
})()
|
|
1127
|
+
}),
|
|
1128
|
+
v && /* @__PURE__ */ n(p, {
|
|
1129
|
+
className: y("my-6 border border-border bg-muted p-4", E?.codeBlock),
|
|
1130
|
+
children: [/* @__PURE__ */ n(h, {
|
|
1131
|
+
className: y("m-0 mb-2 text-xs text-muted-foreground", E?.description),
|
|
1132
|
+
children: [j.CHANGED_AT, ":"]
|
|
1133
|
+
}), /* @__PURE__ */ t(h, {
|
|
1134
|
+
className: y("m-0 text-sm font-semibold", E?.content),
|
|
1135
|
+
children: v
|
|
1136
|
+
})]
|
|
1137
|
+
}),
|
|
1138
|
+
/* @__PURE__ */ t(h, {
|
|
1139
|
+
className: y("text-sm font-normal", E?.content),
|
|
1140
|
+
children: j.IF_YOU_MADE_THIS_CHANGE
|
|
1141
|
+
}),
|
|
1142
|
+
b && /* @__PURE__ */ t(p, {
|
|
1143
|
+
className: "mt-6",
|
|
1144
|
+
children: /* @__PURE__ */ t(i, {
|
|
1145
|
+
href: b,
|
|
1146
|
+
className: y("inline-block whitespace-nowrap rounded-none text-sm font-medium py-2.5 px-6 bg-primary text-primary-foreground no-underline", E?.button),
|
|
1147
|
+
children: j.I_DIDNT_MAKE_THIS_CHANGE
|
|
1148
|
+
})
|
|
1149
|
+
}),
|
|
1150
|
+
/* @__PURE__ */ t(c, { className: y("my-6 w-full border border-solid border-border", E?.separator) }),
|
|
1151
|
+
S && /* @__PURE__ */ t(h, {
|
|
1152
|
+
className: y("mb-3 text-xs text-muted-foreground", E?.description),
|
|
1153
|
+
children: j.EMAIL_SENT_BY.replace("{appName}", S)
|
|
1154
|
+
}),
|
|
1155
|
+
/* @__PURE__ */ t(h, {
|
|
1156
|
+
className: y("mt-3 text-xs text-muted-foreground", E?.description),
|
|
1157
|
+
children: (() => {
|
|
1158
|
+
let [r, i] = j.IF_YOU_DIDNT_AUTHORIZE_THIS_CHANGE.split("{supportEmail}");
|
|
1159
|
+
return C ? /* @__PURE__ */ n(e, { children: [
|
|
1160
|
+
r,
|
|
1161
|
+
/* @__PURE__ */ t(d, {
|
|
1162
|
+
href: `mailto:${C}`,
|
|
1163
|
+
className: y("text-primary underline", E?.link),
|
|
1164
|
+
children: C
|
|
1165
|
+
}),
|
|
1166
|
+
i
|
|
1167
|
+
] }) : j.IF_YOU_DIDNT_AUTHORIZE_THIS_CHANGE.replace("{supportEmail}", "").replace(/\s{2,}/g, " ").replace(" .", ".");
|
|
1168
|
+
})()
|
|
1169
|
+
}),
|
|
1170
|
+
O && /* @__PURE__ */ t(h, {
|
|
1171
|
+
className: y("mt-4 mb-0 text-center text-[11px] text-muted-foreground", E?.poweredBy),
|
|
1172
|
+
children: (() => {
|
|
1173
|
+
let [r, i] = j.POWERED_BY_BETTER_AUTH.split("{betterAuth}");
|
|
1174
|
+
return /* @__PURE__ */ n(e, { children: [
|
|
1175
|
+
r,
|
|
1176
|
+
/* @__PURE__ */ t(d, {
|
|
1177
|
+
href: "https://better-auth.com",
|
|
1178
|
+
className: y("text-primary underline", E?.link),
|
|
1179
|
+
children: "better-auth"
|
|
1180
|
+
}),
|
|
1181
|
+
i
|
|
1182
|
+
] });
|
|
1183
|
+
})()
|
|
1184
|
+
})
|
|
1185
|
+
]
|
|
1186
|
+
})
|
|
1187
|
+
})
|
|
1188
|
+
})
|
|
1189
|
+
})
|
|
1190
|
+
] });
|
|
1191
|
+
};
|
|
1192
|
+
F.localization = P, F.PreviewProps = {
|
|
1193
|
+
email: "m@example.com",
|
|
1194
|
+
timestamp: "February 10, 2025 at 4:20 PM UTC",
|
|
1195
|
+
secureAccountURL: "https://better-auth-ui.com/settings/security",
|
|
1196
|
+
appName: "Better Auth",
|
|
1197
|
+
supportEmail: "support@example.com",
|
|
1198
|
+
darkMode: !0
|
|
1199
|
+
};
|
|
1200
|
+
//#endregion
|
|
1201
|
+
//#region src/components/auth/email/reset-password.tsx
|
|
1202
|
+
var I = {
|
|
1203
|
+
RESET_YOUR_PASSWORD: "Reset your password",
|
|
1204
|
+
LOGO: "Logo",
|
|
1205
|
+
WE_RECEIVED_REQUEST_TO_RESET_PASSWORD: "We received a request to reset the password for your {appName} account {email}.",
|
|
1206
|
+
RESET_PASSWORD: "Reset password",
|
|
1207
|
+
OR_COPY_AND_PASTE_URL: "Or copy and paste this URL into your browser:",
|
|
1208
|
+
THIS_LINK_EXPIRES_IN_MINUTES: "This link expires in {expirationMinutes} minutes.",
|
|
1209
|
+
EMAIL_SENT_BY: "Email sent by {appName}.",
|
|
1210
|
+
IF_YOU_DIDNT_REQUEST_PASSWORD_RESET: "If you didn't request a password reset, you can safely ignore this email. Your password will remain unchanged.",
|
|
1211
|
+
POWERED_BY_BETTER_AUTH: "Powered by {betterAuth}"
|
|
1212
|
+
}, L = ({ url: _, email: v, appName: b, expirationMinutes: S = 60, logoURL: C, colors: w, classNames: T, darkMode: E = !0, poweredBy: D, head: O, ...k }) => {
|
|
1213
|
+
let A = {
|
|
1214
|
+
...L.localization,
|
|
1215
|
+
...k.localization
|
|
1216
|
+
}, j = A.RESET_YOUR_PASSWORD;
|
|
1217
|
+
return /* @__PURE__ */ n(l, { children: [
|
|
1218
|
+
/* @__PURE__ */ n(o, { children: [
|
|
1219
|
+
/* @__PURE__ */ t("meta", {
|
|
1220
|
+
content: "light dark",
|
|
1221
|
+
name: "color-scheme"
|
|
1222
|
+
}),
|
|
1223
|
+
/* @__PURE__ */ t("meta", {
|
|
1224
|
+
content: "light dark",
|
|
1225
|
+
name: "supported-color-schemes"
|
|
1226
|
+
}),
|
|
1227
|
+
/* @__PURE__ */ t(x, {
|
|
1228
|
+
colors: w,
|
|
1229
|
+
darkMode: E
|
|
1230
|
+
}),
|
|
1231
|
+
O
|
|
1232
|
+
] }),
|
|
1233
|
+
/* @__PURE__ */ t(f, { children: j }),
|
|
1234
|
+
/* @__PURE__ */ t(m, {
|
|
1235
|
+
config: { presets: [g] },
|
|
1236
|
+
children: /* @__PURE__ */ t(r, {
|
|
1237
|
+
className: y("bg-background font-sans", T?.body),
|
|
1238
|
+
children: /* @__PURE__ */ t(a, {
|
|
1239
|
+
className: y("mx-auto my-auto max-w-xl px-2 py-10", T?.container),
|
|
1240
|
+
children: /* @__PURE__ */ n(p, {
|
|
1241
|
+
className: y("bg-card text-card-foreground rounded-none border border-border p-8", T?.card),
|
|
1242
|
+
children: [
|
|
1243
|
+
C && (typeof C == "string" ? /* @__PURE__ */ t(u, {
|
|
1244
|
+
src: C,
|
|
1245
|
+
width: 48,
|
|
1246
|
+
height: 48,
|
|
1247
|
+
alt: b || A.LOGO,
|
|
1248
|
+
className: y("mx-auto mb-8", T?.logo)
|
|
1249
|
+
}) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(u, {
|
|
1250
|
+
src: C.light,
|
|
1251
|
+
width: 48,
|
|
1252
|
+
height: 48,
|
|
1253
|
+
alt: b || A.LOGO,
|
|
1254
|
+
className: y("mx-auto mb-8 logo-light", T?.logo)
|
|
1255
|
+
}), /* @__PURE__ */ t(u, {
|
|
1256
|
+
src: C.dark,
|
|
1257
|
+
width: 48,
|
|
1258
|
+
height: 48,
|
|
1259
|
+
alt: b || A.LOGO,
|
|
1260
|
+
className: y("hidden mx-auto mb-8 logo-dark", T?.logo)
|
|
1261
|
+
})] })),
|
|
1262
|
+
/* @__PURE__ */ t(s, {
|
|
1263
|
+
className: y("m-0 mb-5 text-2xl font-semibold", T?.title),
|
|
1264
|
+
children: A.RESET_YOUR_PASSWORD
|
|
1265
|
+
}),
|
|
1266
|
+
/* @__PURE__ */ t(h, {
|
|
1267
|
+
className: y("text-sm", T?.content),
|
|
1268
|
+
children: (() => {
|
|
1269
|
+
let r = A.WE_RECEIVED_REQUEST_TO_RESET_PASSWORD.replace("{appName}", b || "").replace(/\s{2,}/g, " ").replace(" .", "."), [i, a] = r.split("{email}");
|
|
1270
|
+
return v ? /* @__PURE__ */ n(e, { children: [
|
|
1271
|
+
i,
|
|
1272
|
+
/* @__PURE__ */ t(d, {
|
|
1273
|
+
href: `mailto:${v}`,
|
|
1274
|
+
className: "text-primary font-medium",
|
|
1275
|
+
children: v
|
|
1276
|
+
}),
|
|
1277
|
+
a
|
|
1278
|
+
] }) : r.replace("{email}", "").replace(/\s{2,}/g, " ").replace(" .", ".");
|
|
1279
|
+
})()
|
|
1280
|
+
}),
|
|
1281
|
+
/* @__PURE__ */ t(p, {
|
|
1282
|
+
className: "my-6",
|
|
1283
|
+
children: /* @__PURE__ */ t(i, {
|
|
1284
|
+
href: _,
|
|
1285
|
+
className: y("inline-block whitespace-nowrap rounded-none text-sm font-medium py-2.5 px-6 bg-primary text-primary-foreground no-underline", T?.button),
|
|
1286
|
+
children: A.RESET_PASSWORD
|
|
1287
|
+
})
|
|
1288
|
+
}),
|
|
1289
|
+
/* @__PURE__ */ t(h, {
|
|
1290
|
+
className: y("m-0 mb-3 text-xs text-muted-foreground", T?.description),
|
|
1291
|
+
children: A.OR_COPY_AND_PASTE_URL
|
|
1292
|
+
}),
|
|
1293
|
+
/* @__PURE__ */ t(d, {
|
|
1294
|
+
className: y("break-all text-xs text-primary", T?.link),
|
|
1295
|
+
href: _,
|
|
1296
|
+
children: _
|
|
1297
|
+
}),
|
|
1298
|
+
/* @__PURE__ */ t(c, { className: y("my-6 w-full border border-solid border-border", T?.separator) }),
|
|
1299
|
+
S || b ? /* @__PURE__ */ n(h, {
|
|
1300
|
+
className: y("m-0 mb-3 text-xs text-muted-foreground", T?.description),
|
|
1301
|
+
children: [S ? A.THIS_LINK_EXPIRES_IN_MINUTES.replace("{expirationMinutes}", S.toString()) : null, b && /* @__PURE__ */ n(e, { children: [S ? " " : "", A.EMAIL_SENT_BY.replace("{appName}", b)] })]
|
|
1302
|
+
}) : null,
|
|
1303
|
+
/* @__PURE__ */ t(h, {
|
|
1304
|
+
className: y("m-0 text-xs text-muted-foreground", T?.description),
|
|
1305
|
+
children: A.IF_YOU_DIDNT_REQUEST_PASSWORD_RESET
|
|
1306
|
+
}),
|
|
1307
|
+
D && /* @__PURE__ */ t(h, {
|
|
1308
|
+
className: y("m-0 mt-4 text-center text-[11px] text-muted-foreground", T?.poweredBy),
|
|
1309
|
+
children: (() => {
|
|
1310
|
+
let [r, i] = A.POWERED_BY_BETTER_AUTH.split("{betterAuth}");
|
|
1311
|
+
return /* @__PURE__ */ n(e, { children: [
|
|
1312
|
+
r,
|
|
1313
|
+
/* @__PURE__ */ t(d, {
|
|
1314
|
+
href: "https://better-auth.com",
|
|
1315
|
+
className: y("text-primary underline", T?.link),
|
|
1316
|
+
children: "better-auth"
|
|
1317
|
+
}),
|
|
1318
|
+
i
|
|
1319
|
+
] });
|
|
1320
|
+
})()
|
|
1321
|
+
})
|
|
1322
|
+
]
|
|
1323
|
+
})
|
|
1324
|
+
})
|
|
1325
|
+
})
|
|
1326
|
+
})
|
|
1327
|
+
] });
|
|
1328
|
+
};
|
|
1329
|
+
L.localization = I, L.PreviewProps = {
|
|
1330
|
+
url: "https://better-auth-ui.com/auth/reset-password?token=example-token",
|
|
1331
|
+
email: "m@example.com",
|
|
1332
|
+
appName: "Better Auth",
|
|
1333
|
+
darkMode: !0
|
|
1334
|
+
};
|
|
1335
|
+
//#endregion
|
|
1336
|
+
//#region src/components/auth/email/email-localization.tsx
|
|
1337
|
+
var R = {
|
|
1338
|
+
...C.localization,
|
|
1339
|
+
...T.localization,
|
|
1340
|
+
...D.localization,
|
|
1341
|
+
...k.localization,
|
|
1342
|
+
...j.localization,
|
|
1343
|
+
...N.localization,
|
|
1344
|
+
...F.localization,
|
|
1345
|
+
...L.localization
|
|
1346
|
+
};
|
|
1347
|
+
//#endregion
|
|
1348
|
+
export { C as EmailChangedEmail, x as EmailStyles, T as EmailVerificationEmail, D as MagicLinkEmail, k as NewDeviceEmail, j as OrganizationInvitationEmail, N as OtpEmail, F as PasswordChangedEmail, L as ResetPasswordEmail, b as defaultColors, R as emailLocalization };
|