@burdenoff/microfe-auth 2026.830.1 → 2026.904.1
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/auth/AuthRoot.js +43 -41
- package/dist/auth/AuthRoot.js.map +1 -1
- package/dist/auth/AuthRoutes.js +7 -0
- package/dist/auth/AuthRoutes.js.map +1 -1
- package/dist/auth/components/AuthLayout.js +65 -67
- package/dist/auth/components/AuthLayout.js.map +1 -1
- package/dist/auth/components/CaptchaV2.js +21 -24
- package/dist/auth/components/CaptchaV2.js.map +1 -1
- package/dist/auth/components/ConfirmActionDialog.js +33 -32
- package/dist/auth/components/ConfirmActionDialog.js.map +1 -1
- package/dist/auth/components/profile/UserProfileMenu.js +44 -46
- package/dist/auth/components/profile/UserProfileMenu.js.map +1 -1
- package/dist/auth/components/workspace/WorkspaceSelector.js +62 -68
- package/dist/auth/components/workspace/WorkspaceSelector.js.map +1 -1
- package/dist/auth/pages/AuditLogPage.js +65 -68
- package/dist/auth/pages/AuditLogPage.js.map +1 -1
- package/dist/auth/pages/EmailVerifyPage.js +51 -54
- package/dist/auth/pages/EmailVerifyPage.js.map +1 -1
- package/dist/auth/pages/LoginPage.js +223 -225
- package/dist/auth/pages/LoginPage.js.map +1 -1
- package/dist/auth/pages/MagicLinkPage.js +67 -69
- package/dist/auth/pages/MagicLinkPage.js.map +1 -1
- package/dist/auth/pages/MfaSetupPage.js +85 -88
- package/dist/auth/pages/MfaSetupPage.js.map +1 -1
- package/dist/auth/pages/MfaVerifyPage.js +60 -63
- package/dist/auth/pages/MfaVerifyPage.js.map +1 -1
- package/dist/auth/pages/OAuthCallbackPage.js +37 -40
- package/dist/auth/pages/OAuthCallbackPage.js.map +1 -1
- package/dist/auth/pages/PasswordResetPage.js +102 -105
- package/dist/auth/pages/PasswordResetPage.js.map +1 -1
- package/dist/auth/pages/ReactivatePage.js +54 -57
- package/dist/auth/pages/ReactivatePage.js.map +1 -1
- package/dist/auth/pages/RegisterPage.js +171 -174
- package/dist/auth/pages/RegisterPage.js.map +1 -1
- package/dist/auth/pages/SSOClearPage.js +21 -20
- package/dist/auth/pages/SSOClearPage.js.map +1 -1
- package/dist/auth/pages/SSODepositPage.js +27 -26
- package/dist/auth/pages/SSODepositPage.js.map +1 -1
- package/dist/auth/pages/SSORelayCallbackPage.js +19 -18
- package/dist/auth/pages/SSORelayCallbackPage.js.map +1 -1
- package/dist/auth/pages/SecurityPage.js +247 -250
- package/dist/auth/pages/SecurityPage.js.map +1 -1
- package/dist/auth/pages/SessionsPage.js +95 -98
- package/dist/auth/pages/SessionsPage.js.map +1 -1
- package/dist/auth/pages/SsoCallbackPage.js +53 -56
- package/dist/auth/pages/SsoCallbackPage.js.map +1 -1
- package/dist/auth/pages/SsoConfigPage.js +296 -299
- package/dist/auth/pages/SsoConfigPage.js.map +1 -1
- package/dist/auth/pages/SsoLoginPage.js +65 -68
- package/dist/auth/pages/SsoLoginPage.js.map +1 -1
- package/dist/auth/pages/UserDetailsPage.js +124 -127
- package/dist/auth/pages/UserDetailsPage.js.map +1 -1
- package/dist/auth/pages/UserProfilePage.js +171 -174
- package/dist/auth/pages/UserProfilePage.js.map +1 -1
- package/dist/auth/pages/UsersPage.js +322 -325
- package/dist/auth/pages/UsersPage.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/shared/hooks/index.d.ts +1 -6
- package/dist/shared/hooks/useTr.d.ts +16 -0
- package/dist/shared/hooks/useTr.js +14 -0
- package/dist/shared/hooks/useTr.js.map +1 -0
- package/dist/translations/en.d.ts +806 -248
- package/dist/translations/en.js +870 -0
- package/dist/translations/en.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,77 +1,74 @@
|
|
|
1
1
|
import { useAuth as e } from "../providers/AuthProvider.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useTr as t } from "../../shared/hooks/useTr.js";
|
|
3
|
+
import { useAuthOperations as n } from "../hooks/useAuthOperations.js";
|
|
4
|
+
import { useOAuthOperations as ee } from "../hooks/useOAuthOperations.js";
|
|
4
5
|
import { AuthLayout as r } from "../components/AuthLayout.js";
|
|
5
|
-
import { AlertIcon as i, CheckIcon as
|
|
6
|
-
import { validateEmail as
|
|
6
|
+
import { AlertIcon as i, CheckIcon as te, EmailIcon as a, EyeIcon as ne, EyeOffIcon as o, GitHubIcon as re, GoogleIcon as ie, LockIcon as s, MicrosoftIcon as c, SpinnerIcon as l, UserIcon as u, XIcon as d } from "../components/AuthIcons.js";
|
|
7
|
+
import { validateEmail as f, validatePassword as p } from "../utils/validation.js";
|
|
7
8
|
import { CaptchaV2 as ae } from "../components/CaptchaV2.js";
|
|
8
9
|
import { useSignupCaptcha as oe } from "../hooks/useSignupCaptcha.js";
|
|
9
|
-
import { useState as
|
|
10
|
+
import { useState as m } from "react";
|
|
10
11
|
import { useNavigate as se } from "react-router";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { PagePurpose as ue } from "@burdenoff/fe-libs/ui";
|
|
12
|
+
import { Fragment as ce, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
13
|
+
import { Button as _ } from "@burdenoff/fe-libs/button";
|
|
14
|
+
import { PagePurpose as le } from "@burdenoff/fe-libs/ui";
|
|
15
15
|
//#region src/auth/pages/RegisterPage.tsx
|
|
16
|
-
function
|
|
17
|
-
let { productName:
|
|
18
|
-
let n = y(e);
|
|
19
|
-
return n === e ? t : n;
|
|
20
|
-
}, { signUp: x, resendVerification: de, isLoading: S, errorCode: C } = t(), { initiateGoogleOAuth: fe, initiateMicrosoftOAuth: pe, isProviderConfigured: w } = n(), [T, E] = p(!1), [D, O] = p({
|
|
16
|
+
function v() {
|
|
17
|
+
let v = t(), { productName: y } = e(), b = se(), { signUp: x, resendVerification: S, isLoading: C, errorCode: w } = n(), { initiateGoogleOAuth: ue, initiateMicrosoftOAuth: de, isProviderConfigured: T } = ee(), [E, fe] = m(!1), [D, O] = m({
|
|
21
18
|
email: "",
|
|
22
19
|
username: "",
|
|
23
20
|
password: "",
|
|
24
21
|
firstName: "",
|
|
25
22
|
lastName: ""
|
|
26
|
-
}), [k, A] =
|
|
23
|
+
}), [k, A] = m([]), [j, M] = m(!1), [N, P] = m(null), [F, I] = m(null), [L, R] = m(null), [z, B] = m(0), { enabled: V, siteKey: pe } = oe(), [H, U] = m(!1), [W, G] = m(null), K = !!N && w === "ACCOUNT_DEACTIVATED", q = !!N && w === "ACCOUNT_REMOVED", J = !!N && w === "ACCOUNT_SUSPENDED", Y = (() => {
|
|
27
24
|
let e = D.password;
|
|
28
25
|
return [
|
|
29
26
|
{
|
|
30
|
-
label:
|
|
27
|
+
label: v("auth.register.pwMin8", "At least 12 characters"),
|
|
31
28
|
met: e.length >= 12
|
|
32
29
|
},
|
|
33
30
|
{
|
|
34
|
-
label:
|
|
31
|
+
label: v("auth.register.pwUppercase", "One uppercase letter"),
|
|
35
32
|
met: /[A-Z]/.test(e)
|
|
36
33
|
},
|
|
37
34
|
{
|
|
38
|
-
label:
|
|
35
|
+
label: v("auth.register.pwLowercase", "One lowercase letter"),
|
|
39
36
|
met: /[a-z]/.test(e)
|
|
40
37
|
},
|
|
41
38
|
{
|
|
42
|
-
label:
|
|
39
|
+
label: v("auth.register.pwNumber", "One number"),
|
|
43
40
|
met: /\d/.test(e)
|
|
44
41
|
},
|
|
45
42
|
{
|
|
46
|
-
label:
|
|
43
|
+
label: v("auth.register.pwSpecial", "One special character"),
|
|
47
44
|
met: /[!@#$%^&*(),.?":{}|<>]/.test(e)
|
|
48
45
|
}
|
|
49
46
|
];
|
|
50
47
|
})(), X = (() => {
|
|
51
48
|
let e = Y.filter((e) => e.met).length;
|
|
52
49
|
return e <= 2 ? {
|
|
53
|
-
level:
|
|
50
|
+
level: v("auth.register.passwordStrengthWeak", "weak"),
|
|
54
51
|
color: "bg-status-error-bg-subtle0",
|
|
55
52
|
width: "w-1/4"
|
|
56
53
|
} : e <= 3 ? {
|
|
57
|
-
level:
|
|
54
|
+
level: v("auth.register.passwordStrengthFair", "fair"),
|
|
58
55
|
color: "bg-status-warning-text",
|
|
59
56
|
width: "w-2/4"
|
|
60
57
|
} : e <= 4 ? {
|
|
61
|
-
level:
|
|
58
|
+
level: v("auth.register.passwordStrengthGood", "good"),
|
|
62
59
|
color: "bg-status-warning-bg-subtle0",
|
|
63
60
|
width: "w-3/4"
|
|
64
61
|
} : {
|
|
65
|
-
level:
|
|
62
|
+
level: v("auth.register.passwordStrengthStrong", "strong"),
|
|
66
63
|
color: "bg-status-success-text",
|
|
67
64
|
width: "w-full"
|
|
68
65
|
};
|
|
69
66
|
})(), Z = async (e) => {
|
|
70
67
|
e.preventDefault();
|
|
71
68
|
let t = [];
|
|
72
|
-
|
|
73
|
-
let n =
|
|
74
|
-
if (n.valid || t.push(...n.errors), V && !L && t.push(
|
|
69
|
+
f(D.email) || t.push(v("auth.register.invalidEmail", "Please enter a valid email address")), (!D.username || D.username.length < 3) && t.push(v("auth.register.usernameMin3", "Username must be at least 3 characters")), /^[a-zA-Z0-9_-]+$/.test(D.username) || t.push(v("auth.register.usernameChars", "Username can only contain letters, numbers, underscores, and hyphens"));
|
|
70
|
+
let n = p(D.password);
|
|
71
|
+
if (n.valid || t.push(...n.errors), V && !L && t.push(v("auth.register.completeCaptcha", "Please complete the reCAPTCHA verification")), t.length > 0) {
|
|
75
72
|
A(t);
|
|
76
73
|
return;
|
|
77
74
|
}
|
|
@@ -82,59 +79,59 @@ function _() {
|
|
|
82
79
|
...L ? { recaptchaToken: L } : {}
|
|
83
80
|
}), M(!0);
|
|
84
81
|
} catch (e) {
|
|
85
|
-
P(e instanceof Error ? e.message :
|
|
82
|
+
P(e instanceof Error ? e.message : v("auth.register.signUpFailed", "Sign up failed")), console.error("Sign up failed:", e), V && (R(null), B((e) => e + 1));
|
|
86
83
|
}
|
|
87
|
-
},
|
|
84
|
+
}, me = () => {
|
|
88
85
|
I(null);
|
|
89
86
|
try {
|
|
90
|
-
|
|
87
|
+
ue();
|
|
91
88
|
} catch (e) {
|
|
92
|
-
I(e instanceof Error ? e.message :
|
|
89
|
+
I(e instanceof Error ? e.message : v("auth.register.googleSignUpFailed", "Failed to initiate Google sign up"));
|
|
93
90
|
}
|
|
94
|
-
},
|
|
91
|
+
}, he = () => {
|
|
95
92
|
I(null);
|
|
96
93
|
try {
|
|
97
|
-
|
|
94
|
+
de();
|
|
98
95
|
} catch (e) {
|
|
99
|
-
I(e instanceof Error ? e.message :
|
|
96
|
+
I(e instanceof Error ? e.message : v("auth.register.microsoftSignUpFailed", "Failed to initiate Microsoft sign up"));
|
|
100
97
|
}
|
|
101
|
-
}, Q =
|
|
98
|
+
}, Q = T("google"), $ = T("microsoft"), ge = [
|
|
102
99
|
{
|
|
103
100
|
name: "Google",
|
|
104
|
-
icon:
|
|
105
|
-
onClick:
|
|
101
|
+
icon: ie,
|
|
102
|
+
onClick: me,
|
|
106
103
|
disabled: !Q,
|
|
107
|
-
tooltip: Q ? void 0 :
|
|
104
|
+
tooltip: Q ? void 0 : v("auth.register.googleNotConfigured", "Google sign up is not configured")
|
|
108
105
|
},
|
|
109
106
|
{
|
|
110
107
|
name: "GitHub",
|
|
111
|
-
icon:
|
|
108
|
+
icon: re,
|
|
112
109
|
onClick: () => {},
|
|
113
110
|
disabled: !0,
|
|
114
|
-
tooltip:
|
|
111
|
+
tooltip: v("auth.register.githubNotConfigured", "GitHub sign up is not configured")
|
|
115
112
|
},
|
|
116
113
|
{
|
|
117
114
|
name: "Microsoft",
|
|
118
|
-
icon:
|
|
119
|
-
onClick:
|
|
115
|
+
icon: c,
|
|
116
|
+
onClick: he,
|
|
120
117
|
disabled: !$,
|
|
121
|
-
tooltip: $ ? void 0 :
|
|
118
|
+
tooltip: $ ? void 0 : v("auth.register.microsoftNotConfigured", "Microsoft sign up is not configured")
|
|
122
119
|
}
|
|
123
|
-
], [
|
|
124
|
-
return j ? /* @__PURE__ */
|
|
125
|
-
title:
|
|
126
|
-
subtitle:
|
|
127
|
-
children: /* @__PURE__ */
|
|
120
|
+
], [_e, ve = ""] = v("auth.register.verificationEmailSentTo", "We've sent a verification email to {{email}}. Please check your inbox and click the verification link to activate your account.").split("{{email}}");
|
|
121
|
+
return j ? /* @__PURE__ */ h(r, {
|
|
122
|
+
title: v("auth.register.checkEmail", "Check your email"),
|
|
123
|
+
subtitle: v("auth.register.verificationLinkSent", "We've sent you a verification link"),
|
|
124
|
+
children: /* @__PURE__ */ g("div", {
|
|
128
125
|
className: "flex flex-col items-center justify-center py-6",
|
|
129
126
|
children: [
|
|
130
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ h("div", {
|
|
131
128
|
className: "size-20 rounded-full bg-status-success-bg-subtle flex items-center justify-center mb-6",
|
|
132
|
-
children: /* @__PURE__ */
|
|
129
|
+
children: /* @__PURE__ */ h("svg", {
|
|
133
130
|
className: "size-10 text-status-success-text",
|
|
134
131
|
fill: "none",
|
|
135
132
|
viewBox: "0 0 24 24",
|
|
136
133
|
stroke: "currentColor",
|
|
137
|
-
children: /* @__PURE__ */
|
|
134
|
+
children: /* @__PURE__ */ h("path", {
|
|
138
135
|
strokeLinecap: "round",
|
|
139
136
|
strokeLinejoin: "round",
|
|
140
137
|
strokeWidth: 2,
|
|
@@ -142,56 +139,56 @@ function _() {
|
|
|
142
139
|
})
|
|
143
140
|
})
|
|
144
141
|
}),
|
|
145
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ h("h3", {
|
|
146
143
|
className: "text-lg font-semibold text-[var(--color-text-primary)] mb-2",
|
|
147
|
-
children:
|
|
144
|
+
children: v("auth.register.accountCreated", "Account created successfully!")
|
|
148
145
|
}),
|
|
149
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ g("p", {
|
|
150
147
|
className: "text-center text-[var(--color-text-secondary)] mb-8 max-w-sm",
|
|
151
148
|
children: [
|
|
152
|
-
|
|
153
|
-
/* @__PURE__ */
|
|
149
|
+
_e,
|
|
150
|
+
/* @__PURE__ */ h("span", {
|
|
154
151
|
className: "font-medium text-[var(--color-text-primary)]",
|
|
155
152
|
children: D.email
|
|
156
153
|
}),
|
|
157
|
-
|
|
154
|
+
ve
|
|
158
155
|
]
|
|
159
156
|
}),
|
|
160
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ g("div", {
|
|
161
158
|
className: "space-y-3 w-full",
|
|
162
159
|
children: [
|
|
163
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ h(_, {
|
|
164
161
|
type: "button",
|
|
165
|
-
onClick: () =>
|
|
162
|
+
onClick: () => b("/auth/login"),
|
|
166
163
|
variant: "default",
|
|
167
164
|
size: "lg",
|
|
168
165
|
className: "w-full font-semibold",
|
|
169
|
-
children:
|
|
166
|
+
children: v("auth.register.continueToSignIn", "Continue to sign in")
|
|
170
167
|
}),
|
|
171
|
-
W && /* @__PURE__ */
|
|
168
|
+
W && /* @__PURE__ */ h("p", {
|
|
172
169
|
className: "text-center text-sm text-status-error-text",
|
|
173
170
|
children: W
|
|
174
171
|
}),
|
|
175
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ g("p", {
|
|
176
173
|
className: "text-center text-sm text-[var(--color-text-tertiary)]",
|
|
177
174
|
children: [
|
|
178
|
-
|
|
175
|
+
v("auth.register.didntReceiveEmail", "Didn't receive the email? Check your spam folder or"),
|
|
179
176
|
" ",
|
|
180
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ h("button", {
|
|
181
178
|
type: "button",
|
|
182
179
|
disabled: H,
|
|
183
180
|
onClick: async () => {
|
|
184
181
|
G(null), U(!0);
|
|
185
182
|
try {
|
|
186
|
-
await
|
|
183
|
+
await S(D.email);
|
|
187
184
|
} catch (e) {
|
|
188
|
-
G(e instanceof Error ? e.message :
|
|
185
|
+
G(e instanceof Error ? e.message : v("auth.register.resendFailed", "Failed to resend verification email"));
|
|
189
186
|
} finally {
|
|
190
187
|
U(!1);
|
|
191
188
|
}
|
|
192
189
|
},
|
|
193
190
|
className: "text-text-link hover:text-text-linkHover font-medium disabled:opacity-50 disabled:cursor-not-allowed",
|
|
194
|
-
children: H ?
|
|
191
|
+
children: H ? v("auth.register.resending", "resending...") : v("auth.register.tryAgain", "try again")
|
|
195
192
|
})
|
|
196
193
|
]
|
|
197
194
|
})
|
|
@@ -199,122 +196,122 @@ function _() {
|
|
|
199
196
|
})
|
|
200
197
|
]
|
|
201
198
|
})
|
|
202
|
-
}) : /* @__PURE__ */
|
|
203
|
-
title:
|
|
204
|
-
subtitle:
|
|
205
|
-
productName:
|
|
199
|
+
}) : /* @__PURE__ */ g(r, {
|
|
200
|
+
title: v("auth.register.createAccount", "Create your account"),
|
|
201
|
+
subtitle: v("auth.register.startJourney", "Start your journey with {{productName}}").replace("{{productName}}", y || "Burdenoff Workspaces"),
|
|
202
|
+
productName: y,
|
|
206
203
|
children: [
|
|
207
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ h(le, {
|
|
208
205
|
className: "mb-5",
|
|
209
|
-
children:
|
|
206
|
+
children: v("auth.register.purpose", "Create your account to get a personal workspace and start collaborating. You'll verify your email, then you can sign in and invite your team.")
|
|
210
207
|
}),
|
|
211
|
-
/* @__PURE__ */
|
|
208
|
+
/* @__PURE__ */ g("form", {
|
|
212
209
|
onSubmit: Z,
|
|
213
210
|
className: "space-y-5",
|
|
214
211
|
children: [
|
|
215
|
-
K && /* @__PURE__ */
|
|
212
|
+
K && /* @__PURE__ */ g("div", {
|
|
216
213
|
className: "flex items-start gap-3 p-4 rounded-xl bg-status-warning-bg-subtle border border-status-warning-border",
|
|
217
|
-
children: [/* @__PURE__ */
|
|
214
|
+
children: [/* @__PURE__ */ h(i, { className: "size-5 text-status-warning-text flex-shrink-0 mt-0.5" }), /* @__PURE__ */ g("div", {
|
|
218
215
|
className: "space-y-2",
|
|
219
216
|
children: [
|
|
220
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ h("p", {
|
|
221
218
|
className: "text-sm font-medium text-status-warning-text",
|
|
222
|
-
children:
|
|
219
|
+
children: v("auth.register.accountDeactivated", "This email belongs to a deactivated account.")
|
|
223
220
|
}),
|
|
224
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ h("p", {
|
|
225
222
|
className: "text-xs text-status-warning-text/80",
|
|
226
|
-
children:
|
|
223
|
+
children: v("auth.register.accountDeactivatedHelp", "If this is your account, you can reactivate it instead of creating a new one.")
|
|
227
224
|
}),
|
|
228
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ h("button", {
|
|
229
226
|
type: "button",
|
|
230
|
-
onClick: () =>
|
|
227
|
+
onClick: () => b("/auth/reactivate", { state: { email: D.email } }),
|
|
231
228
|
className: "text-sm font-semibold text-status-warning-text underline underline-offset-2",
|
|
232
|
-
children:
|
|
229
|
+
children: v("auth.register.reactivateCta", "Reactivate my account")
|
|
233
230
|
})
|
|
234
231
|
]
|
|
235
232
|
})]
|
|
236
233
|
}),
|
|
237
|
-
(q || J) && /* @__PURE__ */
|
|
234
|
+
(q || J) && /* @__PURE__ */ g("div", {
|
|
238
235
|
className: "flex items-start gap-3 p-4 rounded-xl bg-status-warning-bg-subtle border border-status-warning-border",
|
|
239
|
-
children: [/* @__PURE__ */
|
|
236
|
+
children: [/* @__PURE__ */ h(i, { className: "size-5 text-status-warning-text flex-shrink-0 mt-0.5" }), /* @__PURE__ */ h("p", {
|
|
240
237
|
className: "text-sm text-status-warning-text",
|
|
241
238
|
children: N
|
|
242
239
|
})]
|
|
243
240
|
}),
|
|
244
|
-
(N && !K && !q && !J || k.length > 0) && /* @__PURE__ */
|
|
241
|
+
(N && !K && !q && !J || k.length > 0) && /* @__PURE__ */ g("div", {
|
|
245
242
|
className: "flex items-start gap-3 p-4 rounded-xl bg-status-error-bg-subtle border border-status-error-border",
|
|
246
|
-
children: [/* @__PURE__ */
|
|
243
|
+
children: [/* @__PURE__ */ h(i, { className: "size-5 text-status-error-text flex-shrink-0 mt-0.5" }), /* @__PURE__ */ g("div", {
|
|
247
244
|
className: "space-y-1",
|
|
248
|
-
children: [N && !K && !q && !J && /* @__PURE__ */
|
|
245
|
+
children: [N && !K && !q && !J && /* @__PURE__ */ h("p", {
|
|
249
246
|
className: "text-sm text-status-error-text",
|
|
250
247
|
children: N
|
|
251
|
-
}), k.map((e) => /* @__PURE__ */
|
|
248
|
+
}), k.map((e) => /* @__PURE__ */ h("p", {
|
|
252
249
|
className: "text-sm text-status-error-text",
|
|
253
250
|
children: e
|
|
254
251
|
}, e))]
|
|
255
252
|
})]
|
|
256
253
|
}),
|
|
257
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ g("div", {
|
|
258
255
|
className: "grid grid-cols-2 gap-4",
|
|
259
|
-
children: [/* @__PURE__ */
|
|
256
|
+
children: [/* @__PURE__ */ g("div", {
|
|
260
257
|
className: "space-y-2",
|
|
261
|
-
children: [/* @__PURE__ */
|
|
258
|
+
children: [/* @__PURE__ */ h("label", {
|
|
262
259
|
htmlFor: "firstName",
|
|
263
260
|
className: "block text-sm font-medium text-[var(--color-text-primary)]",
|
|
264
|
-
children:
|
|
265
|
-
}), /* @__PURE__ */
|
|
261
|
+
children: v("auth.register.firstName", "First Name")
|
|
262
|
+
}), /* @__PURE__ */ h("input", {
|
|
266
263
|
id: "firstName",
|
|
267
264
|
type: "text",
|
|
268
265
|
required: !0,
|
|
269
266
|
"aria-required": "true",
|
|
270
|
-
"aria-label":
|
|
267
|
+
"aria-label": v("auth.register.firstName", "First Name"),
|
|
271
268
|
value: D.firstName,
|
|
272
269
|
onChange: (e) => O({
|
|
273
270
|
...D,
|
|
274
271
|
firstName: e.target.value
|
|
275
272
|
}),
|
|
276
273
|
className: "block w-full px-4 py-3 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] placeholder:text-[var(--color-text-tertiary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
|
|
277
|
-
placeholder:
|
|
274
|
+
placeholder: v("auth.register.firstNamePlaceholder", "Enter first name")
|
|
278
275
|
})]
|
|
279
|
-
}), /* @__PURE__ */
|
|
276
|
+
}), /* @__PURE__ */ g("div", {
|
|
280
277
|
className: "space-y-2",
|
|
281
|
-
children: [/* @__PURE__ */
|
|
278
|
+
children: [/* @__PURE__ */ h("label", {
|
|
282
279
|
htmlFor: "lastName",
|
|
283
280
|
className: "block text-sm font-medium text-[var(--color-text-primary)]",
|
|
284
|
-
children:
|
|
285
|
-
}), /* @__PURE__ */
|
|
281
|
+
children: v("auth.register.lastName", "Last Name")
|
|
282
|
+
}), /* @__PURE__ */ h("input", {
|
|
286
283
|
id: "lastName",
|
|
287
284
|
type: "text",
|
|
288
285
|
required: !0,
|
|
289
286
|
"aria-required": "true",
|
|
290
|
-
"aria-label":
|
|
287
|
+
"aria-label": v("auth.register.lastName", "Last Name"),
|
|
291
288
|
value: D.lastName,
|
|
292
289
|
onChange: (e) => O({
|
|
293
290
|
...D,
|
|
294
291
|
lastName: e.target.value
|
|
295
292
|
}),
|
|
296
293
|
className: "block w-full px-4 py-3 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] placeholder:text-[var(--color-text-tertiary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
|
|
297
|
-
placeholder:
|
|
294
|
+
placeholder: v("auth.register.lastNamePlaceholder", "Enter last name")
|
|
298
295
|
})]
|
|
299
296
|
})]
|
|
300
297
|
}),
|
|
301
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ g("div", {
|
|
302
299
|
className: "space-y-2",
|
|
303
|
-
children: [/* @__PURE__ */
|
|
300
|
+
children: [/* @__PURE__ */ h("label", {
|
|
304
301
|
htmlFor: "username",
|
|
305
302
|
className: "block text-sm font-medium text-[var(--color-text-primary)]",
|
|
306
|
-
children:
|
|
307
|
-
}), /* @__PURE__ */
|
|
303
|
+
children: v("auth.register.username", "Username")
|
|
304
|
+
}), /* @__PURE__ */ g("div", {
|
|
308
305
|
className: "relative",
|
|
309
|
-
children: [/* @__PURE__ */
|
|
306
|
+
children: [/* @__PURE__ */ h("div", {
|
|
310
307
|
className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
|
|
311
|
-
children: /* @__PURE__ */
|
|
312
|
-
}), /* @__PURE__ */
|
|
308
|
+
children: /* @__PURE__ */ h(u, { className: "size-5 text-[var(--color-text-tertiary)]" })
|
|
309
|
+
}), /* @__PURE__ */ h("input", {
|
|
313
310
|
id: "username",
|
|
314
311
|
type: "text",
|
|
315
312
|
required: !0,
|
|
316
313
|
"aria-required": "true",
|
|
317
|
-
"aria-label":
|
|
314
|
+
"aria-label": v("auth.register.username", "Username"),
|
|
318
315
|
autoComplete: "username",
|
|
319
316
|
value: D.username,
|
|
320
317
|
onChange: (e) => O({
|
|
@@ -322,27 +319,27 @@ function _() {
|
|
|
322
319
|
username: e.target.value
|
|
323
320
|
}),
|
|
324
321
|
className: "block w-full pl-[3.5rem] pr-4 py-3 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] placeholder:text-[var(--color-text-tertiary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
|
|
325
|
-
placeholder:
|
|
322
|
+
placeholder: v("auth.register.usernamePlaceholder", "Choose a username")
|
|
326
323
|
})]
|
|
327
324
|
})]
|
|
328
325
|
}),
|
|
329
|
-
/* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ g("div", {
|
|
330
327
|
className: "space-y-2",
|
|
331
|
-
children: [/* @__PURE__ */
|
|
328
|
+
children: [/* @__PURE__ */ h("label", {
|
|
332
329
|
htmlFor: "email",
|
|
333
330
|
className: "block text-sm font-medium text-[var(--color-text-primary)]",
|
|
334
|
-
children:
|
|
335
|
-
}), /* @__PURE__ */
|
|
331
|
+
children: v("auth.register.email", "Email")
|
|
332
|
+
}), /* @__PURE__ */ g("div", {
|
|
336
333
|
className: "relative",
|
|
337
|
-
children: [/* @__PURE__ */
|
|
334
|
+
children: [/* @__PURE__ */ h("div", {
|
|
338
335
|
className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
|
|
339
|
-
children: /* @__PURE__ */
|
|
340
|
-
}), /* @__PURE__ */
|
|
336
|
+
children: /* @__PURE__ */ h(a, { className: "size-5 text-[var(--color-text-tertiary)]" })
|
|
337
|
+
}), /* @__PURE__ */ h("input", {
|
|
341
338
|
id: "email",
|
|
342
339
|
type: "email",
|
|
343
340
|
required: !0,
|
|
344
341
|
"aria-required": "true",
|
|
345
|
-
"aria-label":
|
|
342
|
+
"aria-label": v("auth.register.email", "Email"),
|
|
346
343
|
autoComplete: "email",
|
|
347
344
|
value: D.email,
|
|
348
345
|
onChange: (e) => O({
|
|
@@ -350,31 +347,31 @@ function _() {
|
|
|
350
347
|
email: e.target.value
|
|
351
348
|
}),
|
|
352
349
|
className: "block w-full pl-[3.5rem] pr-4 py-3 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] placeholder:text-[var(--color-text-tertiary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
|
|
353
|
-
placeholder:
|
|
350
|
+
placeholder: v("auth.register.emailPlaceholder", "you@example.com")
|
|
354
351
|
})]
|
|
355
352
|
})]
|
|
356
353
|
}),
|
|
357
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ g("div", {
|
|
358
355
|
className: "space-y-2",
|
|
359
356
|
children: [
|
|
360
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ h("label", {
|
|
361
358
|
htmlFor: "password",
|
|
362
359
|
className: "block text-sm font-medium text-[var(--color-text-primary)]",
|
|
363
|
-
children:
|
|
360
|
+
children: v("auth.register.password", "Password")
|
|
364
361
|
}),
|
|
365
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ g("div", {
|
|
366
363
|
className: "relative",
|
|
367
364
|
children: [
|
|
368
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ h("div", {
|
|
369
366
|
className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
|
|
370
|
-
children: /* @__PURE__ */
|
|
367
|
+
children: /* @__PURE__ */ h(s, { className: "size-5 text-[var(--color-text-tertiary)]" })
|
|
371
368
|
}),
|
|
372
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ h("input", {
|
|
373
370
|
id: "password",
|
|
374
|
-
type:
|
|
371
|
+
type: E ? "text" : "password",
|
|
375
372
|
required: !0,
|
|
376
373
|
"aria-required": "true",
|
|
377
|
-
"aria-label":
|
|
374
|
+
"aria-label": v("auth.register.password", "Password"),
|
|
378
375
|
autoComplete: "new-password",
|
|
379
376
|
value: D.password,
|
|
380
377
|
onChange: (e) => O({
|
|
@@ -382,40 +379,40 @@ function _() {
|
|
|
382
379
|
password: e.target.value
|
|
383
380
|
}),
|
|
384
381
|
className: "block w-full pl-[3.5rem] pr-12 py-3 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] placeholder:text-[var(--color-text-tertiary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
|
|
385
|
-
placeholder:
|
|
382
|
+
placeholder: v("auth.register.passwordPlaceholder", "Create a strong password")
|
|
386
383
|
}),
|
|
387
|
-
/* @__PURE__ */
|
|
384
|
+
/* @__PURE__ */ h("button", {
|
|
388
385
|
type: "button",
|
|
389
|
-
onClick: () =>
|
|
390
|
-
"aria-label":
|
|
386
|
+
onClick: () => fe(!E),
|
|
387
|
+
"aria-label": E ? v("auth.register.hidePassword", "Hide password") : v("auth.register.showPassword", "Show password"),
|
|
391
388
|
className: "absolute inset-y-0 right-0 pr-3.5 flex items-center text-[var(--color-text-tertiary)] hover:text-[var(--color-text-secondary)] transition-colors",
|
|
392
|
-
children:
|
|
389
|
+
children: h(E ? o : ne, { className: "size-5" })
|
|
393
390
|
})
|
|
394
391
|
]
|
|
395
392
|
}),
|
|
396
|
-
D.password && /* @__PURE__ */
|
|
393
|
+
D.password && /* @__PURE__ */ g("div", {
|
|
397
394
|
className: "space-y-3 pt-2",
|
|
398
|
-
children: [/* @__PURE__ */
|
|
395
|
+
children: [/* @__PURE__ */ g("div", {
|
|
399
396
|
className: "space-y-1",
|
|
400
|
-
children: [/* @__PURE__ */
|
|
397
|
+
children: [/* @__PURE__ */ h("div", {
|
|
401
398
|
className: "h-1.5 bg-[var(--color-bg-sunken)] rounded-full overflow-hidden",
|
|
402
|
-
children: /* @__PURE__ */
|
|
403
|
-
}), /* @__PURE__ */
|
|
399
|
+
children: /* @__PURE__ */ h("div", { className: `h-full ${X.color} ${X.width} transition-all duration-300` })
|
|
400
|
+
}), /* @__PURE__ */ g("p", {
|
|
404
401
|
className: "text-xs text-[var(--color-text-tertiary)] capitalize",
|
|
405
402
|
children: [
|
|
406
|
-
|
|
403
|
+
v("auth.register.passwordStrength", "Password strength:"),
|
|
407
404
|
" ",
|
|
408
|
-
/* @__PURE__ */
|
|
405
|
+
/* @__PURE__ */ h("span", {
|
|
409
406
|
className: "font-medium",
|
|
410
407
|
children: X.level
|
|
411
408
|
})
|
|
412
409
|
]
|
|
413
410
|
})]
|
|
414
|
-
}), /* @__PURE__ */
|
|
411
|
+
}), /* @__PURE__ */ h("div", {
|
|
415
412
|
className: "grid grid-cols-2 gap-2",
|
|
416
|
-
children: Y.map((e) => /* @__PURE__ */
|
|
413
|
+
children: Y.map((e) => /* @__PURE__ */ g("div", {
|
|
417
414
|
className: "flex items-center gap-2",
|
|
418
|
-
children: [e.met ? /* @__PURE__ */
|
|
415
|
+
children: [e.met ? /* @__PURE__ */ h(te, { className: "size-4 text-status-success-text" }) : /* @__PURE__ */ h(d, { className: "size-4 text-[var(--color-text-tertiary)]" }), /* @__PURE__ */ h("span", {
|
|
419
416
|
className: `text-xs ${e.met ? "text-status-success-text" : "text-[var(--color-text-tertiary)]"}`,
|
|
420
417
|
children: e.label
|
|
421
418
|
})]
|
|
@@ -424,87 +421,87 @@ function _() {
|
|
|
424
421
|
})
|
|
425
422
|
]
|
|
426
423
|
}),
|
|
427
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ g("p", {
|
|
428
425
|
className: "text-xs text-[var(--color-text-tertiary)] leading-relaxed",
|
|
429
426
|
children: [
|
|
430
|
-
|
|
427
|
+
v("auth.register.agreeToTerms", "By creating an account, you agree to our"),
|
|
431
428
|
" ",
|
|
432
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ h("a", {
|
|
433
430
|
href: "/legal/terms",
|
|
434
431
|
className: "text-text-link underline underline-offset-2",
|
|
435
|
-
children:
|
|
432
|
+
children: v("auth.register.termsOfService", "Terms of Service")
|
|
436
433
|
}),
|
|
437
434
|
" ",
|
|
438
|
-
|
|
435
|
+
v("auth.register.and", "and"),
|
|
439
436
|
" ",
|
|
440
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ h("a", {
|
|
441
438
|
href: "/legal/privacy",
|
|
442
439
|
className: "text-text-link underline underline-offset-2",
|
|
443
|
-
children:
|
|
440
|
+
children: v("auth.register.privacyPolicy", "Privacy Policy")
|
|
444
441
|
}),
|
|
445
442
|
"."
|
|
446
443
|
]
|
|
447
444
|
}),
|
|
448
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ h(ae, {
|
|
449
446
|
enabled: V,
|
|
450
|
-
siteKey:
|
|
447
|
+
siteKey: pe,
|
|
451
448
|
onVerify: R,
|
|
452
449
|
onExpired: () => R(null)
|
|
453
450
|
}, z),
|
|
454
|
-
/* @__PURE__ */
|
|
451
|
+
/* @__PURE__ */ h(_, {
|
|
455
452
|
type: "submit",
|
|
456
|
-
disabled:
|
|
453
|
+
disabled: C,
|
|
457
454
|
variant: "default",
|
|
458
455
|
size: "lg",
|
|
459
456
|
className: "w-full font-semibold",
|
|
460
|
-
children:
|
|
457
|
+
children: C ? /* @__PURE__ */ g(ce, { children: [/* @__PURE__ */ h(l, { className: "size-5 animate-spin" }), /* @__PURE__ */ h("span", { children: v("auth.register.creatingAccount", "Creating account...") })] }) : v("auth.register.createAccountBtn", "Create account")
|
|
461
458
|
})
|
|
462
459
|
]
|
|
463
460
|
}),
|
|
464
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ g("div", {
|
|
465
462
|
className: "relative my-8",
|
|
466
|
-
children: [/* @__PURE__ */
|
|
463
|
+
children: [/* @__PURE__ */ h("div", {
|
|
467
464
|
className: "absolute inset-0 flex items-center",
|
|
468
|
-
children: /* @__PURE__ */
|
|
469
|
-
}), /* @__PURE__ */
|
|
465
|
+
children: /* @__PURE__ */ h("div", { className: "w-full border-t border-[var(--color-border-default)]" })
|
|
466
|
+
}), /* @__PURE__ */ h("div", {
|
|
470
467
|
className: "relative flex justify-center",
|
|
471
|
-
children: /* @__PURE__ */
|
|
468
|
+
children: /* @__PURE__ */ h("span", {
|
|
472
469
|
className: "px-4 bg-[var(--color-bg-canvas)] text-sm text-[var(--color-text-tertiary)]",
|
|
473
|
-
children:
|
|
470
|
+
children: v("auth.register.orSignUpWith", "or sign up with")
|
|
474
471
|
})
|
|
475
472
|
})]
|
|
476
473
|
}),
|
|
477
|
-
F && /* @__PURE__ */
|
|
474
|
+
F && /* @__PURE__ */ g("div", {
|
|
478
475
|
className: "flex items-start gap-3 p-4 rounded-xl border bg-status-error-bg-subtle border-status-error-border",
|
|
479
|
-
children: [/* @__PURE__ */
|
|
476
|
+
children: [/* @__PURE__ */ h(i, { className: "size-5 flex-shrink-0 mt-0.5 text-status-error-text" }), /* @__PURE__ */ h("p", {
|
|
480
477
|
className: "text-sm text-status-error-text",
|
|
481
478
|
children: F
|
|
482
479
|
})]
|
|
483
480
|
}),
|
|
484
|
-
/* @__PURE__ */
|
|
481
|
+
/* @__PURE__ */ h("div", {
|
|
485
482
|
className: "grid grid-cols-3 gap-3",
|
|
486
|
-
children:
|
|
483
|
+
children: ge.map((e) => /* @__PURE__ */ g("button", {
|
|
487
484
|
type: "button",
|
|
488
485
|
onClick: e.onClick,
|
|
489
486
|
disabled: e.disabled,
|
|
490
487
|
title: e.tooltip,
|
|
491
488
|
className: `flex items-center justify-center gap-2 px-4 py-3 rounded-xl border transition-all duration-200 group ${e.disabled ? "border-[var(--color-border-subtle)] bg-[var(--color-bg-disabled)] cursor-not-allowed opacity-50" : "border-[var(--color-border-default)] bg-[var(--color-bg-surface)] hover:bg-[var(--color-bg-sunken)] hover:border-[var(--color-border-strong)]"}`,
|
|
492
|
-
children: [/* @__PURE__ */
|
|
489
|
+
children: [/* @__PURE__ */ h(e.icon, { className: `size-5 ${e.disabled ? "opacity-50" : ""}` }), /* @__PURE__ */ h("span", {
|
|
493
490
|
className: `sr-only sm:not-sr-only text-sm font-medium transition-colors ${e.disabled ? "text-[var(--color-text-disabled)]" : "text-[var(--color-text-secondary)] group-hover:text-[var(--color-text-primary)]"}`,
|
|
494
491
|
children: e.name
|
|
495
492
|
})]
|
|
496
493
|
}, e.name))
|
|
497
494
|
}),
|
|
498
|
-
/* @__PURE__ */
|
|
495
|
+
/* @__PURE__ */ g("p", {
|
|
499
496
|
className: "mt-8 text-center text-sm text-[var(--color-text-secondary)]",
|
|
500
497
|
children: [
|
|
501
|
-
|
|
498
|
+
v("auth.register.alreadyHaveAccount", "Already have an account?"),
|
|
502
499
|
" ",
|
|
503
|
-
/* @__PURE__ */
|
|
500
|
+
/* @__PURE__ */ h("button", {
|
|
504
501
|
type: "button",
|
|
505
|
-
onClick: () =>
|
|
502
|
+
onClick: () => b("/auth/login"),
|
|
506
503
|
className: "font-semibold text-text-link hover:text-text-linkHover transition-colors",
|
|
507
|
-
children:
|
|
504
|
+
children: v("auth.register.signIn", "Sign in")
|
|
508
505
|
})
|
|
509
506
|
]
|
|
510
507
|
})
|
|
@@ -512,6 +509,6 @@ function _() {
|
|
|
512
509
|
});
|
|
513
510
|
}
|
|
514
511
|
//#endregion
|
|
515
|
-
export {
|
|
512
|
+
export { v as RegisterPage };
|
|
516
513
|
|
|
517
514
|
//# sourceMappingURL=RegisterPage.js.map
|