@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.
- package/dist/components/auth/auth-provider.d.ts +4 -3
- package/dist/components/auth/auth-provider.js +24 -40
- package/dist/components/email/email-changed.d.ts +2 -2
- package/dist/components/email/email-changed.js +154 -68
- package/dist/components/email/email-localization.js +18 -23
- package/dist/components/email/email-styles.js +52 -77
- package/dist/components/email/email-verification.d.ts +2 -2
- package/dist/components/email/email-verification.js +138 -73
- package/dist/components/email/index.d.ts +9 -9
- package/dist/components/email/index.js +9 -9
- package/dist/components/email/magic-link.d.ts +2 -2
- package/dist/components/email/magic-link.js +139 -70
- package/dist/components/email/new-device.d.ts +2 -2
- package/dist/components/email/new-device.js +221 -88
- package/dist/components/email/otp-email.d.ts +2 -2
- package/dist/components/email/otp-email.js +127 -63
- package/dist/components/email/password-changed.d.ts +2 -2
- package/dist/components/email/password-changed.js +157 -74
- package/dist/components/email/reset-password.d.ts +2 -2
- package/dist/components/email/reset-password.js +138 -66
- package/dist/components/icons/apple.d.ts +1 -1
- package/dist/components/icons/apple.js +16 -9
- package/dist/components/icons/atlassian.d.ts +1 -1
- package/dist/components/icons/atlassian.js +38 -13
- package/dist/components/icons/cognito.d.ts +1 -1
- package/dist/components/icons/cognito.js +19 -9
- package/dist/components/icons/discord.d.ts +1 -1
- package/dist/components/icons/discord.js +16 -9
- package/dist/components/icons/dropbox.d.ts +1 -1
- package/dist/components/icons/dropbox.js +16 -9
- package/dist/components/icons/facebook.d.ts +1 -1
- package/dist/components/icons/facebook.js +19 -11
- package/dist/components/icons/figma.d.ts +1 -1
- package/dist/components/icons/figma.js +34 -12
- package/dist/components/icons/github.d.ts +1 -1
- package/dist/components/icons/github.js +16 -11
- package/dist/components/icons/gitlab.d.ts +1 -1
- package/dist/components/icons/gitlab.js +30 -9
- package/dist/components/icons/google.d.ts +1 -1
- package/dist/components/icons/google.js +39 -9
- package/dist/components/icons/huggingface.d.ts +1 -1
- package/dist/components/icons/huggingface.js +38 -9
- package/dist/components/icons/index.d.ts +35 -35
- package/dist/components/icons/index.js +35 -35
- package/dist/components/icons/kakao.d.ts +1 -1
- package/dist/components/icons/kakao.js +16 -11
- package/dist/components/icons/kick.d.ts +1 -1
- package/dist/components/icons/kick.js +20 -11
- package/dist/components/icons/line.d.ts +1 -1
- package/dist/components/icons/line.js +16 -9
- package/dist/components/icons/linear.d.ts +1 -1
- package/dist/components/icons/linear.js +16 -9
- package/dist/components/icons/linkedin.d.ts +1 -1
- package/dist/components/icons/linkedin.js +33 -9
- package/dist/components/icons/microsoft.d.ts +1 -1
- package/dist/components/icons/microsoft.js +30 -9
- package/dist/components/icons/naver.d.ts +1 -1
- package/dist/components/icons/naver.js +16 -9
- package/dist/components/icons/notion.d.ts +1 -1
- package/dist/components/icons/notion.js +16 -9
- package/dist/components/icons/paybin.d.ts +1 -1
- package/dist/components/icons/paybin.js +32 -8
- package/dist/components/icons/paypal.d.ts +1 -1
- package/dist/components/icons/paypal.js +30 -9
- package/dist/components/icons/polar.d.ts +1 -1
- package/dist/components/icons/polar.js +24 -9
- package/dist/components/icons/railway.d.ts +1 -1
- package/dist/components/icons/railway.js +16 -9
- package/dist/components/icons/reddit.d.ts +1 -1
- package/dist/components/icons/reddit.js +21 -9
- package/dist/components/icons/roblox.d.ts +1 -1
- package/dist/components/icons/roblox.js +17 -12
- package/dist/components/icons/salesforce.d.ts +1 -1
- package/dist/components/icons/salesforce.js +16 -9
- package/dist/components/icons/slack.d.ts +1 -1
- package/dist/components/icons/slack.js +30 -9
- package/dist/components/icons/spotify.d.ts +1 -1
- package/dist/components/icons/spotify.js +16 -9
- package/dist/components/icons/tiktok.d.ts +1 -1
- package/dist/components/icons/tiktok.js +23 -10
- package/dist/components/icons/twitch.d.ts +1 -1
- package/dist/components/icons/twitch.js +43 -12
- package/dist/components/icons/vercel.d.ts +1 -1
- package/dist/components/icons/vercel.js +16 -9
- package/dist/components/icons/vk.d.ts +1 -1
- package/dist/components/icons/vk.js +16 -9
- package/dist/components/icons/wechat.d.ts +1 -1
- package/dist/components/icons/wechat.js +16 -9
- package/dist/components/icons/x.d.ts +1 -1
- package/dist/components/icons/x.js +16 -9
- package/dist/components/icons/zoom.d.ts +1 -1
- package/dist/components/icons/zoom.js +69 -11
- package/dist/components/settings/account/theme-preview.js +286 -7
- package/dist/core.d.ts +1 -1
- package/dist/hooks/auth/use-authenticate.d.ts +30 -6
- package/dist/hooks/auth/use-authenticate.js +22 -27
- package/dist/hooks/auth/use-is-username-available.d.ts +20 -0
- package/dist/hooks/auth/use-is-username-available.js +13 -0
- package/dist/hooks/auth/use-request-password-reset.d.ts +12 -17
- package/dist/hooks/auth/use-request-password-reset.js +12 -13
- package/dist/hooks/auth/use-reset-password.d.ts +14 -31
- package/dist/hooks/auth/use-reset-password.js +12 -12
- package/dist/hooks/auth/use-send-verification-email.d.ts +11 -16
- package/dist/hooks/auth/use-send-verification-email.js +12 -12
- package/dist/hooks/auth/use-session.d.ts +31 -5
- package/dist/hooks/auth/use-session.js +15 -17
- package/dist/hooks/auth/use-sign-in-email.d.ts +12 -39
- package/dist/hooks/auth/use-sign-in-email.js +16 -24
- package/dist/hooks/auth/use-sign-in-magic-link.d.ts +15 -20
- package/dist/hooks/auth/use-sign-in-magic-link.js +12 -12
- package/dist/hooks/auth/use-sign-in-passkey.d.ts +13 -50
- package/dist/hooks/auth/use-sign-in-passkey.js +16 -24
- package/dist/hooks/auth/use-sign-in-social.d.ts +32 -62
- package/dist/hooks/auth/use-sign-in-social.js +12 -12
- package/dist/hooks/auth/use-sign-in-username.d.ts +25 -0
- package/dist/hooks/auth/use-sign-in-username.js +17 -0
- package/dist/hooks/auth/use-sign-out.d.ts +11 -12
- package/dist/hooks/auth/use-sign-out.js +15 -23
- package/dist/hooks/auth/use-sign-up-email.d.ts +178 -262
- package/dist/hooks/auth/use-sign-up-email.js +16 -24
- package/dist/hooks/auth/use-user.d.ts +63 -61
- package/dist/hooks/auth/use-user.js +10 -13
- package/dist/hooks/settings/use-account-info.d.ts +12 -12
- package/dist/hooks/settings/use-account-info.js +17 -24
- package/dist/hooks/settings/use-add-passkey.d.ts +11 -33
- package/dist/hooks/settings/use-add-passkey.js +16 -23
- package/dist/hooks/settings/use-change-email.d.ts +12 -15
- package/dist/hooks/settings/use-change-email.js +16 -22
- package/dist/hooks/settings/use-change-password.d.ts +12 -45
- package/dist/hooks/settings/use-change-password.js +12 -10
- package/dist/hooks/settings/use-delete-passkey.d.ts +11 -13
- package/dist/hooks/settings/use-delete-passkey.js +16 -23
- package/dist/hooks/settings/use-delete-user.d.ts +14 -32
- package/dist/hooks/settings/use-delete-user.js +12 -10
- package/dist/hooks/settings/use-link-social.d.ts +23 -26
- package/dist/hooks/settings/use-link-social.js +12 -9
- package/dist/hooks/settings/use-list-accounts.d.ts +10 -8
- package/dist/hooks/settings/use-list-accounts.js +14 -22
- package/dist/hooks/settings/use-list-device-sessions.d.ts +30 -7
- package/dist/hooks/settings/use-list-device-sessions.js +14 -21
- package/dist/hooks/settings/use-list-sessions.d.ts +10 -7
- package/dist/hooks/settings/use-list-sessions.js +14 -21
- package/dist/hooks/settings/use-list-user-passkeys.d.ts +9 -6
- package/dist/hooks/settings/use-list-user-passkeys.js +14 -21
- package/dist/hooks/settings/use-revoke-multi-session.d.ts +12 -12
- package/dist/hooks/settings/use-revoke-multi-session.js +16 -19
- package/dist/hooks/settings/use-revoke-session.d.ts +12 -12
- package/dist/hooks/settings/use-revoke-session.js +16 -20
- package/dist/hooks/settings/use-set-active-session.d.ts +13 -30
- package/dist/hooks/settings/use-set-active-session.js +19 -27
- package/dist/hooks/settings/use-unlink-account.d.ts +13 -13
- package/dist/hooks/settings/use-unlink-account.js +16 -20
- package/dist/hooks/settings/use-update-user.d.ts +1179 -5
- package/dist/hooks/settings/use-update-user.js +23 -28
- package/dist/hooks/use-auth-mutation.d.ts +12 -0
- package/dist/hooks/use-auth-mutation.js +11 -0
- package/dist/hooks/use-auth-query.d.ts +14 -0
- package/dist/hooks/use-auth-query.js +15 -0
- package/dist/index.d.ts +40 -36
- package/dist/index.js +84 -36
- package/dist/lib/auth-client.d.ts +1254 -1254
- package/dist/lib/auth-client.js +11 -11
- package/dist/lib/auth-config.d.ts +3 -3
- package/dist/lib/auth-context.d.ts +2 -2
- package/dist/lib/auth-context.js +5 -2
- package/dist/lib/provider-icons.d.ts +2 -2
- package/dist/lib/provider-icons.js +75 -47
- package/dist/lib/utils.d.ts +1 -1
- package/dist/lib/utils.js +7 -4
- package/dist/mutations/auth/is-username-available-options.d.ts +19 -0
- package/dist/mutations/auth/is-username-available-options.js +7 -0
- package/dist/mutations/auth/request-password-reset-options.d.ts +15 -0
- package/dist/mutations/auth/request-password-reset-options.js +7 -0
- package/dist/mutations/auth/reset-password-options.d.ts +17 -0
- package/dist/mutations/auth/reset-password-options.js +7 -0
- package/dist/mutations/auth/send-verification-email-options.d.ts +15 -0
- package/dist/mutations/auth/send-verification-email-options.js +7 -0
- package/dist/mutations/auth/sign-in-email-options.d.ts +23 -0
- package/dist/mutations/auth/sign-in-email-options.js +11 -0
- package/dist/mutations/auth/sign-in-magic-link-options.d.ts +23 -0
- package/dist/mutations/auth/sign-in-magic-link-options.js +11 -0
- package/dist/mutations/auth/sign-in-passkey-options.d.ts +15 -0
- package/dist/mutations/auth/sign-in-passkey-options.js +11 -0
- package/dist/mutations/auth/sign-in-social-options.d.ts +61 -0
- package/dist/mutations/auth/sign-in-social-options.js +11 -0
- package/dist/mutations/auth/sign-in-username-options.d.ts +19 -0
- package/dist/mutations/auth/sign-in-username-options.js +11 -0
- package/dist/mutations/auth/sign-out-options.d.ts +12 -0
- package/dist/mutations/auth/sign-out-options.js +7 -0
- package/dist/mutations/auth/sign-up-email-options.d.ts +1180 -0
- package/dist/mutations/auth/sign-up-email-options.js +11 -0
- package/dist/mutations/auth-mutation-options.d.ts +25 -0
- package/dist/mutations/auth-mutation-options.js +19 -0
- package/dist/mutations/settings/add-passkey-options.d.ts +15 -0
- package/dist/mutations/settings/add-passkey-options.js +11 -0
- package/dist/mutations/settings/change-email-options.d.ts +15 -0
- package/dist/mutations/settings/change-email-options.js +7 -0
- package/dist/mutations/settings/change-password-options.d.ts +17 -0
- package/dist/mutations/settings/change-password-options.js +7 -0
- package/dist/mutations/settings/delete-passkey-options.d.ts +13 -0
- package/dist/mutations/settings/delete-passkey-options.js +11 -0
- package/dist/mutations/settings/delete-user-options.d.ts +20 -0
- package/dist/mutations/settings/delete-user-options.js +7 -0
- package/dist/mutations/settings/link-social-options.d.ts +39 -0
- package/dist/mutations/settings/link-social-options.js +7 -0
- package/dist/mutations/settings/revoke-multi-session-options.d.ts +13 -0
- package/dist/mutations/settings/revoke-multi-session-options.js +11 -0
- package/dist/mutations/settings/revoke-session-options.d.ts +13 -0
- package/dist/mutations/settings/revoke-session-options.js +7 -0
- package/dist/mutations/settings/set-active-session-options.d.ts +13 -0
- package/dist/mutations/settings/set-active-session-options.js +11 -0
- package/dist/mutations/settings/unlink-account-options.d.ts +15 -0
- package/dist/mutations/settings/unlink-account-options.js +7 -0
- package/dist/mutations/settings/update-user-options.d.ts +1182 -0
- package/dist/mutations/settings/update-user-options.js +7 -0
- package/dist/queries/auth/session-options.d.ts +110 -0
- package/dist/queries/auth/session-options.js +7 -0
- package/dist/queries/auth-query-options.d.ts +29 -0
- package/dist/queries/auth-query-options.js +17 -0
- package/dist/queries/settings/account-info-options.d.ts +32 -0
- package/dist/queries/settings/account-info-options.js +12 -0
- package/dist/queries/settings/list-accounts-options.d.ts +53 -0
- package/dist/queries/settings/list-accounts-options.js +12 -0
- package/dist/queries/settings/list-device-sessions-options.d.ts +99 -0
- package/dist/queries/settings/list-device-sessions-options.js +12 -0
- package/dist/queries/settings/list-sessions-options.d.ts +54 -0
- package/dist/queries/settings/list-sessions-options.js +12 -0
- package/dist/queries/settings/list-user-passkeys-options.d.ts +18 -0
- package/dist/queries/settings/list-user-passkeys-options.js +12 -0
- package/package.json +11 -11
- package/src/components/auth/auth-provider.tsx +4 -6
- package/src/hooks/auth/use-authenticate.ts +8 -9
- package/src/hooks/auth/use-is-username-available.ts +31 -0
- package/src/hooks/auth/use-request-password-reset.ts +20 -11
- package/src/hooks/auth/use-reset-password.ts +20 -12
- package/src/hooks/auth/use-send-verification-email.ts +19 -11
- package/src/hooks/auth/use-session.ts +22 -17
- package/src/hooks/auth/use-sign-in-email.ts +24 -19
- package/src/hooks/auth/use-sign-in-magic-link.ts +19 -13
- package/src/hooks/auth/use-sign-in-passkey.ts +24 -18
- package/src/hooks/auth/use-sign-in-social.ts +19 -11
- package/src/hooks/auth/use-sign-in-username.ts +40 -0
- package/src/hooks/auth/use-sign-out.ts +20 -20
- package/src/hooks/auth/use-sign-up-email.ts +25 -21
- package/src/hooks/auth/use-user.ts +7 -9
- package/src/hooks/settings/use-account-info.ts +31 -21
- package/src/hooks/settings/use-add-passkey.ts +22 -17
- package/src/hooks/settings/use-change-email.ts +24 -20
- package/src/hooks/settings/use-change-password.ts +19 -11
- package/src/hooks/settings/use-delete-passkey.ts +21 -16
- package/src/hooks/settings/use-delete-user.ts +19 -11
- package/src/hooks/settings/use-link-social.ts +20 -10
- package/src/hooks/settings/use-list-accounts.ts +28 -16
- package/src/hooks/settings/use-list-device-sessions.ts +29 -22
- package/src/hooks/settings/use-list-sessions.ts +28 -15
- package/src/hooks/settings/use-list-user-passkeys.ts +28 -17
- package/src/hooks/settings/use-revoke-multi-session.ts +28 -19
- package/src/hooks/settings/use-revoke-session.ts +26 -18
- package/src/hooks/settings/use-set-active-session.ts +40 -28
- package/src/hooks/settings/use-unlink-account.ts +23 -17
- package/src/hooks/settings/use-update-user.ts +33 -27
- package/src/hooks/use-auth-mutation.ts +29 -0
- package/src/hooks/use-auth-query.ts +36 -0
- package/src/index.ts +4 -0
- package/src/lib/auth-config.ts +1 -1
- package/src/mutations/auth/is-username-available-options.ts +18 -0
- package/src/mutations/auth/request-password-reset-options.ts +14 -0
- package/src/mutations/auth/reset-password-options.ts +14 -0
- package/src/mutations/auth/send-verification-email-options.ts +14 -0
- package/src/mutations/auth/sign-in-email-options.ts +19 -0
- package/src/mutations/auth/sign-in-magic-link-options.ts +15 -0
- package/src/mutations/auth/sign-in-passkey-options.ts +15 -0
- package/src/mutations/auth/sign-in-social-options.ts +19 -0
- package/src/mutations/auth/sign-in-username-options.ts +15 -0
- package/src/mutations/auth/sign-out-options.ts +11 -0
- package/src/mutations/auth/sign-up-email-options.ts +15 -0
- package/src/mutations/auth-mutation-options.ts +49 -0
- package/src/mutations/settings/add-passkey-options.ts +15 -0
- package/src/mutations/settings/change-email-options.ts +11 -0
- package/src/mutations/settings/change-password-options.ts +14 -0
- package/src/mutations/settings/delete-passkey-options.ts +15 -0
- package/src/mutations/settings/delete-user-options.ts +11 -0
- package/src/mutations/settings/link-social-options.ts +11 -0
- package/src/mutations/settings/revoke-multi-session-options.ts +15 -0
- package/src/mutations/settings/revoke-session-options.ts +14 -0
- package/src/mutations/settings/set-active-session-options.ts +15 -0
- package/src/mutations/settings/unlink-account-options.ts +14 -0
- package/src/mutations/settings/update-user-options.ts +15 -0
- package/src/queries/auth/session-options.ts +18 -0
- package/src/queries/auth-query-options.ts +34 -0
- package/src/queries/settings/account-info-options.ts +25 -0
- package/src/queries/settings/list-accounts-options.ts +26 -0
- package/src/queries/settings/list-device-sessions-options.ts +24 -0
- package/src/queries/settings/list-sessions-options.ts +23 -0
- package/src/queries/settings/list-user-passkeys-options.ts +23 -0
- package/dist/hooks/auth/use-auth-mutation.d.ts +0 -18
- package/dist/hooks/auth/use-auth-mutation.js +0 -10
- package/dist/hooks/auth/use-auth-query.d.ts +0 -24
- package/dist/hooks/auth/use-auth-query.js +0 -10
- package/dist/lib/auth-config.js +0 -1
- package/src/hooks/auth/use-auth-mutation.ts +0 -56
- package/src/hooks/auth/use-auth-query.ts +0 -50
|
@@ -1,76 +1,159 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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/password-changed.tsx
|
|
6
|
+
var y = {
|
|
7
|
+
YOUR_PASSWORD_HAS_BEEN_CHANGED: "Your password has been changed",
|
|
8
|
+
LOGO: "Logo",
|
|
9
|
+
PASSWORD_CHANGED_SUCCESSFULLY: "Password changed successfully",
|
|
10
|
+
PASSWORD_FOR_YOUR_ACCOUNT_CHANGED: "The password for your {appName} account {userEmail} has been changed successfully.",
|
|
11
|
+
CHANGED_AT: "Changed at",
|
|
12
|
+
IF_YOU_MADE_THIS_CHANGE: "If you made this change, you can safely ignore this email. Your account is secure.",
|
|
13
|
+
I_DIDNT_MAKE_THIS_CHANGE: "I didn't make this change",
|
|
14
|
+
EMAIL_SENT_BY: "Email sent by {appName}.",
|
|
15
|
+
IF_YOU_DIDNT_AUTHORIZE_THIS_CHANGE: "If you didn't authorize this change, please contact support immediately {supportEmail} to secure your account.",
|
|
16
|
+
POWERED_BY_BETTER_AUTH: "Powered by {betterAuth}"
|
|
17
|
+
}, b = ({ email: y, timestamp: x, secureAccountURL: S, appName: C, supportEmail: w, logoURL: T, colors: E, classNames: D, darkMode: O = !0, poweredBy: k, head: A, ...j }) => {
|
|
18
|
+
let M = {
|
|
19
|
+
...b.localization,
|
|
20
|
+
...j.localization
|
|
21
|
+
}, N = M.YOUR_PASSWORD_HAS_BEEN_CHANGED;
|
|
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: E,
|
|
34
|
+
darkMode: O
|
|
35
|
+
}),
|
|
36
|
+
A
|
|
37
|
+
] }),
|
|
38
|
+
/* @__PURE__ */ r(m, { children: N }),
|
|
39
|
+
/* @__PURE__ */ r(g, {
|
|
40
|
+
config: { presets: [v] },
|
|
41
|
+
children: /* @__PURE__ */ r(a, {
|
|
42
|
+
className: e("bg-background font-sans", D?.body),
|
|
43
|
+
children: /* @__PURE__ */ r(s, {
|
|
44
|
+
className: e("mx-auto my-auto max-w-xl px-2 py-10", D?.container),
|
|
45
|
+
children: /* @__PURE__ */ i(h, {
|
|
46
|
+
className: e("bg-card text-card-foreground rounded-none border border-border p-8", D?.card),
|
|
47
|
+
children: [
|
|
48
|
+
T && (typeof T == "string" ? /* @__PURE__ */ r(f, {
|
|
49
|
+
src: T,
|
|
50
|
+
width: 48,
|
|
51
|
+
height: 48,
|
|
52
|
+
alt: C || M.LOGO,
|
|
53
|
+
className: e("mx-auto mb-8", D?.logo)
|
|
54
|
+
}) : /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r(f, {
|
|
55
|
+
src: T.light,
|
|
56
|
+
width: 48,
|
|
57
|
+
height: 48,
|
|
58
|
+
alt: C || M.LOGO,
|
|
59
|
+
className: e("mx-auto mb-8 logo-light", D?.logo)
|
|
60
|
+
}), /* @__PURE__ */ r(f, {
|
|
61
|
+
src: T.dark,
|
|
62
|
+
width: 48,
|
|
63
|
+
height: 48,
|
|
64
|
+
alt: C || M.LOGO,
|
|
65
|
+
className: e("hidden mx-auto mb-8 logo-dark", D?.logo)
|
|
66
|
+
})] })),
|
|
67
|
+
/* @__PURE__ */ r(l, {
|
|
68
|
+
className: e("m-0 mb-5 text-2xl font-semibold", D?.title),
|
|
69
|
+
children: M.PASSWORD_CHANGED_SUCCESSFULLY
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ r(_, {
|
|
72
|
+
className: e("text-sm font-normal", D?.content),
|
|
73
|
+
children: (() => {
|
|
74
|
+
let e = M.PASSWORD_FOR_YOUR_ACCOUNT_CHANGED.replace("{appName}", C || "").replace(/\s{2,}/g, " ").replace(" .", "."), [t, a] = e.split("{userEmail}");
|
|
75
|
+
return y ? /* @__PURE__ */ i(n, { children: [
|
|
76
|
+
t,
|
|
77
|
+
/* @__PURE__ */ r(p, {
|
|
78
|
+
href: `mailto:${y}`,
|
|
79
|
+
className: "text-primary font-medium",
|
|
80
|
+
children: y
|
|
81
|
+
}),
|
|
82
|
+
a
|
|
83
|
+
] }) : e.replace("{userEmail}", "").replace(/\s{2,}/g, " ").replace(" .", ".");
|
|
84
|
+
})()
|
|
85
|
+
}),
|
|
86
|
+
x && /* @__PURE__ */ i(h, {
|
|
87
|
+
className: e("my-6 border border-border bg-muted p-4", D?.codeBlock),
|
|
88
|
+
children: [/* @__PURE__ */ i(_, {
|
|
89
|
+
className: e("m-0 mb-2 text-xs text-muted-foreground", D?.description),
|
|
90
|
+
children: [M.CHANGED_AT, ":"]
|
|
91
|
+
}), /* @__PURE__ */ r(_, {
|
|
92
|
+
className: e("m-0 text-sm font-semibold", D?.content),
|
|
93
|
+
children: x
|
|
94
|
+
})]
|
|
95
|
+
}),
|
|
96
|
+
/* @__PURE__ */ r(_, {
|
|
97
|
+
className: e("text-sm font-normal", D?.content),
|
|
98
|
+
children: M.IF_YOU_MADE_THIS_CHANGE
|
|
99
|
+
}),
|
|
100
|
+
S && /* @__PURE__ */ r(h, {
|
|
101
|
+
className: "mt-6",
|
|
102
|
+
children: /* @__PURE__ */ r(o, {
|
|
103
|
+
href: S,
|
|
104
|
+
className: e("inline-block whitespace-nowrap rounded-none text-sm font-medium py-2.5 px-6 bg-primary text-primary-foreground no-underline", D?.button),
|
|
105
|
+
children: M.I_DIDNT_MAKE_THIS_CHANGE
|
|
106
|
+
})
|
|
107
|
+
}),
|
|
108
|
+
/* @__PURE__ */ r(u, { className: e("my-6 w-full border border-solid border-border", D?.separator) }),
|
|
109
|
+
C && /* @__PURE__ */ r(_, {
|
|
110
|
+
className: e("mb-3 text-xs text-muted-foreground", D?.description),
|
|
111
|
+
children: M.EMAIL_SENT_BY.replace("{appName}", C)
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ r(_, {
|
|
114
|
+
className: e("mt-3 text-xs text-muted-foreground", D?.description),
|
|
115
|
+
children: (() => {
|
|
116
|
+
let [t, a] = M.IF_YOU_DIDNT_AUTHORIZE_THIS_CHANGE.split("{supportEmail}");
|
|
117
|
+
return w ? /* @__PURE__ */ i(n, { children: [
|
|
118
|
+
t,
|
|
119
|
+
/* @__PURE__ */ r(p, {
|
|
120
|
+
href: `mailto:${w}`,
|
|
121
|
+
className: e("text-primary underline", D?.link),
|
|
122
|
+
children: w
|
|
123
|
+
}),
|
|
124
|
+
a
|
|
125
|
+
] }) : M.IF_YOU_DIDNT_AUTHORIZE_THIS_CHANGE.replace("{supportEmail}", "").replace(/\s{2,}/g, " ").replace(" .", ".");
|
|
126
|
+
})()
|
|
127
|
+
}),
|
|
128
|
+
k && /* @__PURE__ */ r(_, {
|
|
129
|
+
className: e("mt-4 mb-0 text-center text-[11px] text-muted-foreground", D?.poweredBy),
|
|
130
|
+
children: (() => {
|
|
131
|
+
let [t, a] = M.POWERED_BY_BETTER_AUTH.split("{betterAuth}");
|
|
132
|
+
return /* @__PURE__ */ i(n, { children: [
|
|
133
|
+
t,
|
|
134
|
+
/* @__PURE__ */ r(p, {
|
|
135
|
+
href: "https://better-auth.com",
|
|
136
|
+
className: e("text-primary underline", D?.link),
|
|
137
|
+
children: "better-auth"
|
|
138
|
+
}),
|
|
139
|
+
a
|
|
140
|
+
] });
|
|
141
|
+
})()
|
|
142
|
+
})
|
|
143
|
+
]
|
|
144
|
+
})
|
|
145
|
+
})
|
|
146
|
+
})
|
|
147
|
+
})
|
|
148
|
+
] });
|
|
16
149
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* - Security warnings and support contact information
|
|
25
|
-
* - Customizable branding and styling
|
|
26
|
-
* - Support for light/dark mode themes
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```tsx
|
|
30
|
-
* <PasswordChangedEmail
|
|
31
|
-
* email="user@example.com"
|
|
32
|
-
* timestamp="February 10, 2025 at 4:20 PM UTC"
|
|
33
|
-
* secureAccountURL="https://example.com/settings/security"
|
|
34
|
-
* appName="My App"
|
|
35
|
-
* supportEmail="support@example.com"
|
|
36
|
-
* logoURL="https://example.com/logo.png"
|
|
37
|
-
* darkMode={true}
|
|
38
|
-
* />
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
export const PasswordChangedEmail = ({ email, timestamp, secureAccountURL, appName, supportEmail, logoURL, colors, classNames, darkMode = true, poweredBy, head, ...props }) => {
|
|
42
|
-
const localization = {
|
|
43
|
-
...PasswordChangedEmail.localization,
|
|
44
|
-
...props.localization
|
|
45
|
-
};
|
|
46
|
-
const previewText = localization.YOUR_PASSWORD_HAS_BEEN_CHANGED;
|
|
47
|
-
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 &&
|
|
48
|
-
(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.PASSWORD_CHANGED_SUCCESSFULLY }), _jsx(Text, { className: cn("text-sm font-normal", classNames?.content), children: (() => {
|
|
49
|
-
const textWithAppName = localization.PASSWORD_FOR_YOUR_ACCOUNT_CHANGED.replace("{appName}", appName || "")
|
|
50
|
-
.replace(/\s{2,}/g, " ")
|
|
51
|
-
.replace(" .", ".");
|
|
52
|
-
const [beforeUserEmail, afterUserEmail] = textWithAppName.split("{userEmail}");
|
|
53
|
-
return email ? (_jsxs(_Fragment, { children: [beforeUserEmail, _jsx(Link, { href: `mailto:${email}`, className: "text-primary font-medium", children: email }), afterUserEmail] })) : (textWithAppName
|
|
54
|
-
.replace("{userEmail}", "")
|
|
55
|
-
.replace(/\s{2,}/g, " ")
|
|
56
|
-
.replace(" .", "."));
|
|
57
|
-
})() }), timestamp && (_jsxs(Section, { className: cn("my-6 border border-border bg-muted p-4", classNames?.codeBlock), children: [_jsxs(Text, { className: cn("m-0 mb-2 text-xs text-muted-foreground", classNames?.description), children: [localization.CHANGED_AT, ":"] }), _jsx(Text, { className: cn("m-0 text-sm font-semibold", classNames?.content), children: timestamp })] })), _jsx(Text, { className: cn("text-sm font-normal", classNames?.content), children: localization.IF_YOU_MADE_THIS_CHANGE }), secureAccountURL && (_jsx(Section, { className: "mt-6", children: _jsx(Button, { href: secureAccountURL, 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.I_DIDNT_MAKE_THIS_CHANGE }) })), _jsx(Hr, { className: cn("my-6 w-full border border-solid border-border", classNames?.separator) }), appName && (_jsx(Text, { className: cn("mb-3 text-xs text-muted-foreground", classNames?.description), children: localization.EMAIL_SENT_BY.replace("{appName}", appName) })), _jsx(Text, { className: cn("mt-3 text-xs text-muted-foreground", classNames?.description), children: (() => {
|
|
58
|
-
const [beforeSupportEmail, afterSupportEmail] = localization.IF_YOU_DIDNT_AUTHORIZE_THIS_CHANGE.split("{supportEmail}");
|
|
59
|
-
return supportEmail ? (_jsxs(_Fragment, { children: [beforeSupportEmail, _jsx(Link, { href: `mailto:${supportEmail}`, className: cn("text-primary underline", classNames?.link), children: supportEmail }), afterSupportEmail] })) : (localization.IF_YOU_DIDNT_AUTHORIZE_THIS_CHANGE.replace("{supportEmail}", "")
|
|
60
|
-
.replace(/\s{2,}/g, " ")
|
|
61
|
-
.replace(" .", "."));
|
|
62
|
-
})() }), poweredBy && (_jsx(Text, { className: cn("mt-4 mb-0 text-center text-[11px] text-muted-foreground", classNames?.poweredBy), children: (() => {
|
|
63
|
-
const [beforeBetterAuth, afterBetterAuth] = localization.POWERED_BY_BETTER_AUTH.split("{betterAuth}");
|
|
64
|
-
return (_jsxs(_Fragment, { children: [beforeBetterAuth, _jsx(Link, { href: "https://better-auth.com", className: cn("text-primary underline", classNames?.link), children: "better-auth" }), afterBetterAuth] }));
|
|
65
|
-
})() }))] }) }) }) })] }));
|
|
150
|
+
b.localization = y, b.PreviewProps = {
|
|
151
|
+
email: "m@example.com",
|
|
152
|
+
timestamp: "February 10, 2025 at 4:20 PM UTC",
|
|
153
|
+
secureAccountURL: "https://better-auth-ui.com/settings/security",
|
|
154
|
+
appName: "Better Auth",
|
|
155
|
+
supportEmail: "support@example.com",
|
|
156
|
+
darkMode: !0
|
|
66
157
|
};
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
email: "m@example.com",
|
|
70
|
-
timestamp: "February 10, 2025 at 4:20 PM UTC",
|
|
71
|
-
secureAccountURL: "https://better-auth-ui.com/settings/security",
|
|
72
|
-
appName: "Better Auth",
|
|
73
|
-
supportEmail: "support@example.com",
|
|
74
|
-
darkMode: true
|
|
75
|
-
};
|
|
76
|
-
export default PasswordChangedEmail;
|
|
158
|
+
//#endregion
|
|
159
|
+
export { b as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { EmailClassNames, EmailColors } from './email-styles';
|
|
3
3
|
declare const resetPasswordEmailLocalization: {
|
|
4
4
|
RESET_YOUR_PASSWORD: string;
|
|
5
5
|
LOGO: string;
|
|
@@ -1,68 +1,140 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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/reset-password.tsx
|
|
6
|
+
var y = {
|
|
7
|
+
RESET_YOUR_PASSWORD: "Reset your password",
|
|
8
|
+
LOGO: "Logo",
|
|
9
|
+
WE_RECEIVED_REQUEST_TO_RESET_PASSWORD: "We received a request to reset the password for your {appName} account {email}.",
|
|
10
|
+
RESET_PASSWORD: "Reset password",
|
|
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_PASSWORD_RESET: "If you didn't request a password reset, you can safely ignore this email. Your password will remain unchanged.",
|
|
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.RESET_YOUR_PASSWORD;
|
|
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.RESET_YOUR_PASSWORD
|
|
69
|
+
}),
|
|
70
|
+
/* @__PURE__ */ r(_, {
|
|
71
|
+
className: e("text-sm", E?.content),
|
|
72
|
+
children: (() => {
|
|
73
|
+
let e = j.WE_RECEIVED_REQUEST_TO_RESET_PASSWORD.replace("{appName}", S || "").replace(/\s{2,}/g, " ").replace(" .", "."), [t, a] = e.split("{email}");
|
|
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("{email}", "").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.RESET_PASSWORD
|
|
91
|
+
})
|
|
92
|
+
}),
|
|
93
|
+
/* @__PURE__ */ r(_, {
|
|
94
|
+
className: e("m-0 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("m-0 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("m-0 text-xs text-muted-foreground", E?.description),
|
|
109
|
+
children: j.IF_YOU_DIDNT_REQUEST_PASSWORD_RESET
|
|
110
|
+
}),
|
|
111
|
+
O && /* @__PURE__ */ r(_, {
|
|
112
|
+
className: e("m-0 mt-4 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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
* <ResetPasswordEmail
|
|
29
|
-
* url="https://example.com/auth/reset-password?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 ResetPasswordEmail = ({ url, email, appName, expirationMinutes = 60, logoURL, colors, classNames, darkMode = true, poweredBy, head, ...props }) => {
|
|
39
|
-
const localization = {
|
|
40
|
-
...ResetPasswordEmail.localization,
|
|
41
|
-
...props.localization
|
|
42
|
-
};
|
|
43
|
-
const previewText = localization.RESET_YOUR_PASSWORD;
|
|
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.RESET_YOUR_PASSWORD }), _jsx(Text, { className: cn("text-sm", classNames?.content), children: (() => {
|
|
46
|
-
const textWithAppName = localization.WE_RECEIVED_REQUEST_TO_RESET_PASSWORD.replace("{appName}", appName || "")
|
|
47
|
-
.replace(/\s{2,}/g, " ")
|
|
48
|
-
.replace(" .", ".");
|
|
49
|
-
const [beforeEmail, afterEmail] = textWithAppName.split("{email}");
|
|
50
|
-
return email ? (_jsxs(_Fragment, { children: [beforeEmail, _jsx(Link, { href: `mailto:${email}`, className: "text-primary font-medium", children: email }), afterEmail] })) : (textWithAppName
|
|
51
|
-
.replace("{email}", "")
|
|
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.RESET_PASSWORD }) }), _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
|
|
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("m-0 text-xs text-muted-foreground", classNames?.description), children: localization.IF_YOU_DIDNT_REQUEST_PASSWORD_RESET }), poweredBy && (_jsx(Text, { className: cn("m-0 mt-4 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/reset-password?token=example-token",
|
|
135
|
+
email: "m@example.com",
|
|
136
|
+
appName: "Better Auth",
|
|
137
|
+
darkMode: !0
|
|
60
138
|
};
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
url: "https://better-auth-ui.com/auth/reset-password?token=example-token",
|
|
64
|
-
email: "m@example.com",
|
|
65
|
-
appName: "Better Auth",
|
|
66
|
-
darkMode: true
|
|
67
|
-
};
|
|
68
|
-
export default ResetPasswordEmail;
|
|
139
|
+
//#endregion
|
|
140
|
+
export { b as default };
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
//#region src/components/icons/apple.tsx
|
|
3
|
+
function t(t) {
|
|
4
|
+
return /* @__PURE__ */ e("svg", {
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
viewBox: "0 0 24 24",
|
|
7
|
+
role: "img",
|
|
8
|
+
"aria-label": "Apple",
|
|
9
|
+
...t,
|
|
10
|
+
children: /* @__PURE__ */ e("path", {
|
|
11
|
+
fill: "currentColor",
|
|
12
|
+
d: "M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04c-2.04.027-3.91 1.183-4.961 3.014c-2.117 3.675-.546 9.103 1.519 12.09c1.013 1.454 2.208 3.09 3.792 3.039c1.52-.065 2.09-.987 3.935-.987c1.831 0 2.35.987 3.96.948c1.637-.026 2.676-1.48 3.676-2.948c1.156-1.688 1.636-3.325 1.662-3.415c-.039-.013-3.182-1.221-3.22-4.857c-.026-3.04 2.48-4.494 2.597-4.559c-1.429-2.09-3.623-2.324-4.39-2.376c-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83c-1.207.052-2.662.805-3.532 1.818c-.78.896-1.454 2.338-1.273 3.714c1.338.104 2.715-.688 3.559-1.701"
|
|
13
|
+
})
|
|
14
|
+
});
|
|
10
15
|
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { t as Apple };
|
|
@@ -1,14 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { useId as e } from "react";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/icons/atlassian.tsx
|
|
4
|
+
function r(r) {
|
|
5
|
+
let i = e();
|
|
6
|
+
return /* @__PURE__ */ n("svg", {
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
viewBox: "0 0 256 256",
|
|
9
|
+
role: "img",
|
|
10
|
+
"aria-label": "Atlassian",
|
|
11
|
+
...r,
|
|
12
|
+
children: [
|
|
13
|
+
/* @__PURE__ */ t("defs", { children: /* @__PURE__ */ n("linearGradient", {
|
|
14
|
+
id: i,
|
|
15
|
+
x1: "99.687%",
|
|
16
|
+
x2: "39.836%",
|
|
17
|
+
y1: "15.801%",
|
|
18
|
+
y2: "97.438%",
|
|
19
|
+
children: [/* @__PURE__ */ t("stop", {
|
|
20
|
+
offset: "0%",
|
|
21
|
+
stopColor: "#0052cc"
|
|
22
|
+
}), /* @__PURE__ */ t("stop", {
|
|
23
|
+
offset: "92.3%",
|
|
24
|
+
stopColor: "#2684ff"
|
|
25
|
+
})]
|
|
26
|
+
}) }),
|
|
27
|
+
/* @__PURE__ */ t("path", {
|
|
28
|
+
fill: `url(#${i})`,
|
|
29
|
+
d: "M75.793 117.95c-3.82-4.08-9.77-3.85-12.367 1.342L.791 244.565a7.488 7.488 0 0 0 6.697 10.838h87.228a7.22 7.22 0 0 0 6.699-4.14c18.808-38.89 7.413-98.018-25.622-133.314"
|
|
30
|
+
}),
|
|
31
|
+
/* @__PURE__ */ t("path", {
|
|
32
|
+
fill: "#2681ff",
|
|
33
|
+
d: "M121.756 4.011c-35.033 55.505-32.721 116.979-9.646 163.13l42.06 84.121a7.49 7.49 0 0 0 6.697 4.14h87.227a7.488 7.488 0 0 0 6.697-10.838S137.445 9.837 134.493 3.964c-2.64-5.258-9.344-5.33-12.737.047"
|
|
34
|
+
})
|
|
35
|
+
]
|
|
36
|
+
});
|
|
14
37
|
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { r as Atlassian };
|
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
//#region src/components/icons/cognito.tsx
|
|
3
|
+
function n(n) {
|
|
4
|
+
return /* @__PURE__ */ t("svg", {
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
viewBox: "0 0 48 48",
|
|
7
|
+
role: "img",
|
|
8
|
+
"aria-label": "Cognito",
|
|
9
|
+
...n,
|
|
10
|
+
children: [/* @__PURE__ */ e("path", {
|
|
11
|
+
fill: "currentColor",
|
|
12
|
+
d: "M24 4L6 14v20l18 10 18-10V14L24 4zm0 4.62l13.6 7.86v15.04L24 39.38 10.4 31.52V16.48L24 8.62z"
|
|
13
|
+
}), /* @__PURE__ */ e("path", {
|
|
14
|
+
fill: "currentColor",
|
|
15
|
+
d: "M22 14h4v20h-4zM14 22h20v4H14z"
|
|
16
|
+
})]
|
|
17
|
+
});
|
|
10
18
|
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { n as Cognito };
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
//#region src/components/icons/discord.tsx
|
|
3
|
+
function t(t) {
|
|
4
|
+
return /* @__PURE__ */ e("svg", {
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
viewBox: "0 0 256 199",
|
|
7
|
+
role: "img",
|
|
8
|
+
"aria-label": "Discord",
|
|
9
|
+
...t,
|
|
10
|
+
children: /* @__PURE__ */ e("path", {
|
|
11
|
+
fill: "#5865f2",
|
|
12
|
+
d: "M216.856 16.597A208.5 208.5 0 0 0 164.042 0c-2.275 4.113-4.933 9.645-6.766 14.046q-29.538-4.442-58.533 0c-1.832-4.4-4.55-9.933-6.846-14.046a207.8 207.8 0 0 0-52.855 16.638C5.618 67.147-3.443 116.4 1.087 164.956c22.169 16.555 43.653 26.612 64.775 33.193A161 161 0 0 0 79.735 175.3a136.4 136.4 0 0 1-21.846-10.632a109 109 0 0 0 5.356-4.237c42.122 19.702 87.89 19.702 129.51 0a132 132 0 0 0 5.355 4.237a136 136 0 0 1-21.886 10.653c4.006 8.02 8.638 15.67 13.873 22.848c21.142-6.58 42.646-16.637 64.815-33.213c5.316-56.288-9.08-105.09-38.056-148.36M85.474 135.095c-12.645 0-23.015-11.805-23.015-26.18s10.149-26.2 23.015-26.2s23.236 11.804 23.015 26.2c.02 14.375-10.148 26.18-23.015 26.18m85.051 0c-12.645 0-23.014-11.805-23.014-26.18s10.148-26.2 23.014-26.2c12.867 0 23.236 11.804 23.015 26.2c0 14.375-10.148 26.18-23.015 26.18"
|
|
13
|
+
})
|
|
14
|
+
});
|
|
10
15
|
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { t as Discord };
|