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