@burdenoff/microfe-auth 2026.527.1 → 2026.527.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/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 +108 -98
- package/dist/auth/components/workspace/WorkspaceSelector.js.map +1 -1
- package/dist/auth/hooks/index.js +2 -2
- package/dist/auth/hooks/useContextSwitcherData.js +1 -1
- package/dist/auth/hooks/useContextSwitcherData.js.map +1 -1
- package/dist/auth/hooks/useMyWorkspaces.js +1 -1
- package/dist/auth/hooks/useMyWorkspaces.js.map +1 -1
- package/dist/auth/hooks/useWorkspaceToken.js +24 -24
- package/dist/auth/hooks/useWorkspaceToken.js.map +1 -1
- package/dist/auth/index.js +4 -4
- package/dist/auth/pages/AuditLogPage.js +10 -12
- package/dist/auth/pages/AuditLogPage.js.map +1 -1
- package/dist/auth/pages/EmailVerifyPage.js +30 -28
- package/dist/auth/pages/EmailVerifyPage.js.map +1 -1
- package/dist/auth/pages/LoginPage.js +23 -19
- package/dist/auth/pages/LoginPage.js.map +1 -1
- package/dist/auth/pages/MagicLinkPage.js +97 -98
- 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 +22 -21
- package/dist/auth/pages/MfaVerifyPage.js.map +1 -1
- package/dist/auth/pages/OAuthCallbackPage.js +13 -7
- package/dist/auth/pages/OAuthCallbackPage.js.map +1 -1
- package/dist/auth/pages/PasswordResetPage.js +28 -22
- package/dist/auth/pages/PasswordResetPage.js.map +1 -1
- package/dist/auth/pages/ReactivatePage.js +19 -15
- package/dist/auth/pages/ReactivatePage.js.map +1 -1
- package/dist/auth/pages/RegisterPage.js +203 -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 +40 -34
- package/dist/auth/pages/SSORelayPage.js.map +1 -1
- package/dist/auth/pages/SecurityPage.js +22 -22
- package/dist/auth/pages/SecurityPage.js.map +1 -1
- package/dist/auth/pages/SessionsPage.js +24 -28
- package/dist/auth/pages/SessionsPage.js.map +1 -1
- package/dist/auth/pages/SsoCallbackPage.js +27 -20
- package/dist/auth/pages/SsoCallbackPage.js.map +1 -1
- package/dist/auth/pages/SsoConfigPage.js +51 -28
- package/dist/auth/pages/SsoConfigPage.js.map +1 -1
- package/dist/auth/pages/SsoLoginPage.js +17 -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 +38 -26
- package/dist/auth/pages/UserProfilePage.js.map +1 -1
- package/dist/auth/pages/UsersPage.js +56 -45
- 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,272 @@ 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
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
+
"aria-label": D("auth.register.firstName", "First Name"),
|
|
234
|
+
value: P.firstName,
|
|
235
|
+
onChange: (e) => F({
|
|
236
|
+
...P,
|
|
233
237
|
firstName: e.target.value
|
|
234
238
|
}),
|
|
235
239
|
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:
|
|
240
|
+
placeholder: D("auth.register.firstNamePlaceholder", "Enter first name")
|
|
237
241
|
})]
|
|
238
|
-
}), /* @__PURE__ */
|
|
242
|
+
}), /* @__PURE__ */ C("div", {
|
|
239
243
|
className: "space-y-2",
|
|
240
|
-
children: [/* @__PURE__ */
|
|
244
|
+
children: [/* @__PURE__ */ S("label", {
|
|
241
245
|
htmlFor: "lastName",
|
|
242
246
|
className: "block text-sm font-medium text-[var(--color-text-primary)]",
|
|
243
|
-
children:
|
|
244
|
-
}), /* @__PURE__ */
|
|
247
|
+
children: D("auth.register.lastName", "Last Name")
|
|
248
|
+
}), /* @__PURE__ */ S("input", {
|
|
245
249
|
id: "lastName",
|
|
246
250
|
type: "text",
|
|
247
251
|
required: !0,
|
|
248
252
|
"aria-required": "true",
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
253
|
+
"aria-label": D("auth.register.lastName", "Last Name"),
|
|
254
|
+
value: P.lastName,
|
|
255
|
+
onChange: (e) => F({
|
|
256
|
+
...P,
|
|
252
257
|
lastName: e.target.value
|
|
253
258
|
}),
|
|
254
259
|
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:
|
|
260
|
+
placeholder: D("auth.register.lastNamePlaceholder", "Enter last name")
|
|
256
261
|
})]
|
|
257
262
|
})]
|
|
258
263
|
}),
|
|
259
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ C("div", {
|
|
260
265
|
className: "space-y-2",
|
|
261
|
-
children: [/* @__PURE__ */
|
|
266
|
+
children: [/* @__PURE__ */ S("label", {
|
|
262
267
|
htmlFor: "username",
|
|
263
268
|
className: "block text-sm font-medium text-[var(--color-text-primary)]",
|
|
264
|
-
children:
|
|
265
|
-
}), /* @__PURE__ */
|
|
269
|
+
children: D("auth.register.username", "Username")
|
|
270
|
+
}), /* @__PURE__ */ C("div", {
|
|
266
271
|
className: "relative",
|
|
267
|
-
children: [/* @__PURE__ */
|
|
272
|
+
children: [/* @__PURE__ */ S("div", {
|
|
268
273
|
className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
|
|
269
|
-
children: /* @__PURE__ */
|
|
270
|
-
}), /* @__PURE__ */
|
|
274
|
+
children: /* @__PURE__ */ S(h, { className: "size-5 text-[var(--color-text-tertiary)]" })
|
|
275
|
+
}), /* @__PURE__ */ S("input", {
|
|
271
276
|
id: "username",
|
|
272
277
|
type: "text",
|
|
273
278
|
required: !0,
|
|
274
279
|
"aria-required": "true",
|
|
280
|
+
"aria-label": D("auth.register.username", "Username"),
|
|
275
281
|
autoComplete: "username",
|
|
276
|
-
value:
|
|
277
|
-
onChange: (e) =>
|
|
278
|
-
...
|
|
282
|
+
value: P.username,
|
|
283
|
+
onChange: (e) => F({
|
|
284
|
+
...P,
|
|
279
285
|
username: e.target.value
|
|
280
286
|
}),
|
|
281
287
|
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:
|
|
288
|
+
placeholder: D("auth.register.usernamePlaceholder", "Choose a username")
|
|
283
289
|
})]
|
|
284
290
|
})]
|
|
285
291
|
}),
|
|
286
|
-
/* @__PURE__ */
|
|
292
|
+
/* @__PURE__ */ C("div", {
|
|
287
293
|
className: "space-y-2",
|
|
288
|
-
children: [/* @__PURE__ */
|
|
294
|
+
children: [/* @__PURE__ */ S("label", {
|
|
289
295
|
htmlFor: "email",
|
|
290
296
|
className: "block text-sm font-medium text-[var(--color-text-primary)]",
|
|
291
|
-
children:
|
|
292
|
-
}), /* @__PURE__ */
|
|
297
|
+
children: D("auth.register.email", "Email")
|
|
298
|
+
}), /* @__PURE__ */ C("div", {
|
|
293
299
|
className: "relative",
|
|
294
|
-
children: [/* @__PURE__ */
|
|
300
|
+
children: [/* @__PURE__ */ S("div", {
|
|
295
301
|
className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
|
|
296
|
-
children: /* @__PURE__ */
|
|
297
|
-
}), /* @__PURE__ */
|
|
302
|
+
children: /* @__PURE__ */ S(s, { className: "size-5 text-[var(--color-text-tertiary)]" })
|
|
303
|
+
}), /* @__PURE__ */ S("input", {
|
|
298
304
|
id: "email",
|
|
299
305
|
type: "email",
|
|
300
306
|
required: !0,
|
|
301
307
|
"aria-required": "true",
|
|
308
|
+
"aria-label": D("auth.register.email", "Email"),
|
|
302
309
|
autoComplete: "email",
|
|
303
|
-
value:
|
|
304
|
-
onChange: (e) =>
|
|
305
|
-
...
|
|
310
|
+
value: P.email,
|
|
311
|
+
onChange: (e) => F({
|
|
312
|
+
...P,
|
|
306
313
|
email: e.target.value
|
|
307
314
|
}),
|
|
308
315
|
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:
|
|
316
|
+
placeholder: D("auth.register.emailPlaceholder", "you@example.com")
|
|
310
317
|
})]
|
|
311
318
|
})]
|
|
312
319
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ C("div", {
|
|
314
321
|
className: "space-y-2",
|
|
315
322
|
children: [
|
|
316
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ S("label", {
|
|
317
324
|
htmlFor: "password",
|
|
318
325
|
className: "block text-sm font-medium text-[var(--color-text-primary)]",
|
|
319
|
-
children:
|
|
326
|
+
children: D("auth.register.password", "Password")
|
|
320
327
|
}),
|
|
321
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ C("div", {
|
|
322
329
|
className: "relative",
|
|
323
330
|
children: [
|
|
324
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ S("div", {
|
|
325
332
|
className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
|
|
326
|
-
children: /* @__PURE__ */
|
|
333
|
+
children: /* @__PURE__ */ S(f, { className: "size-5 text-[var(--color-text-tertiary)]" })
|
|
327
334
|
}),
|
|
328
|
-
/* @__PURE__ */
|
|
335
|
+
/* @__PURE__ */ S("input", {
|
|
329
336
|
id: "password",
|
|
330
|
-
type:
|
|
337
|
+
type: M ? "text" : "password",
|
|
331
338
|
required: !0,
|
|
332
339
|
"aria-required": "true",
|
|
340
|
+
"aria-label": D("auth.register.password", "Password"),
|
|
333
341
|
autoComplete: "new-password",
|
|
334
|
-
value:
|
|
335
|
-
onChange: (e) =>
|
|
336
|
-
...
|
|
342
|
+
value: P.password,
|
|
343
|
+
onChange: (e) => F({
|
|
344
|
+
...P,
|
|
337
345
|
password: e.target.value
|
|
338
346
|
}),
|
|
339
347
|
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:
|
|
348
|
+
placeholder: D("auth.register.passwordPlaceholder", "Create a strong password")
|
|
341
349
|
}),
|
|
342
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ S("button", {
|
|
343
351
|
type: "button",
|
|
344
|
-
onClick: () =>
|
|
345
|
-
"aria-label":
|
|
352
|
+
onClick: () => N(!M),
|
|
353
|
+
"aria-label": M ? "Hide password" : "Show password",
|
|
346
354
|
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:
|
|
355
|
+
children: S(M ? l : c, { className: "size-5" })
|
|
348
356
|
})
|
|
349
357
|
]
|
|
350
358
|
}),
|
|
351
|
-
|
|
359
|
+
P.password && /* @__PURE__ */ C("div", {
|
|
352
360
|
className: "space-y-3 pt-2",
|
|
353
|
-
children: [/* @__PURE__ */
|
|
361
|
+
children: [/* @__PURE__ */ C("div", {
|
|
354
362
|
className: "space-y-1",
|
|
355
|
-
children: [/* @__PURE__ */
|
|
363
|
+
children: [/* @__PURE__ */ S("div", {
|
|
356
364
|
className: "h-1.5 bg-[var(--color-bg-sunken)] rounded-full overflow-hidden",
|
|
357
|
-
children: /* @__PURE__ */
|
|
358
|
-
}), /* @__PURE__ */
|
|
365
|
+
children: /* @__PURE__ */ S("div", { className: `h-full ${Z.color} ${Z.width} transition-all duration-300` })
|
|
366
|
+
}), /* @__PURE__ */ C("p", {
|
|
359
367
|
className: "text-xs text-[var(--color-text-tertiary)] capitalize",
|
|
360
368
|
children: [
|
|
361
|
-
|
|
369
|
+
D("auth.register.passwordStrength", "Password strength:"),
|
|
362
370
|
" ",
|
|
363
|
-
/* @__PURE__ */
|
|
371
|
+
/* @__PURE__ */ S("span", {
|
|
364
372
|
className: "font-medium",
|
|
365
|
-
children:
|
|
373
|
+
children: Z.level
|
|
366
374
|
})
|
|
367
375
|
]
|
|
368
376
|
})]
|
|
369
|
-
}), /* @__PURE__ */
|
|
377
|
+
}), /* @__PURE__ */ S("div", {
|
|
370
378
|
className: "grid grid-cols-2 gap-2",
|
|
371
|
-
children:
|
|
379
|
+
children: X.map((e) => /* @__PURE__ */ C("div", {
|
|
372
380
|
className: "flex items-center gap-2",
|
|
373
|
-
children: [e.met ? /* @__PURE__ */
|
|
381
|
+
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
382
|
className: `text-xs ${e.met ? "text-status-success-text" : "text-[var(--color-text-tertiary)]"}`,
|
|
375
383
|
children: e.label
|
|
376
384
|
})]
|
|
377
|
-
},
|
|
385
|
+
}, e.label))
|
|
378
386
|
})]
|
|
379
387
|
})
|
|
380
388
|
]
|
|
381
389
|
}),
|
|
382
|
-
/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ C("p", {
|
|
383
391
|
className: "text-xs text-[var(--color-text-tertiary)] leading-relaxed",
|
|
384
392
|
children: [
|
|
385
|
-
|
|
393
|
+
D("auth.register.agreeToTerms", "By creating an account, you agree to our"),
|
|
386
394
|
" ",
|
|
387
|
-
/* @__PURE__ */
|
|
395
|
+
/* @__PURE__ */ S("a", {
|
|
388
396
|
href: "/legal/terms",
|
|
389
397
|
className: "text-text-link hover:underline",
|
|
390
|
-
children:
|
|
398
|
+
children: D("auth.register.termsOfService", "Terms of Service")
|
|
391
399
|
}),
|
|
392
400
|
" ",
|
|
393
|
-
|
|
401
|
+
D("auth.register.and", "and"),
|
|
394
402
|
" ",
|
|
395
|
-
/* @__PURE__ */
|
|
403
|
+
/* @__PURE__ */ S("a", {
|
|
396
404
|
href: "/legal/privacy",
|
|
397
405
|
className: "text-text-link hover:underline",
|
|
398
|
-
children:
|
|
406
|
+
children: D("auth.register.privacyPolicy", "Privacy Policy")
|
|
399
407
|
}),
|
|
400
408
|
"."
|
|
401
409
|
]
|
|
402
410
|
}),
|
|
403
|
-
/* @__PURE__ */
|
|
404
|
-
/* @__PURE__ */
|
|
411
|
+
/* @__PURE__ */ S(_, { onVerify: G }),
|
|
412
|
+
/* @__PURE__ */ S("button", {
|
|
405
413
|
type: "submit",
|
|
406
|
-
disabled:
|
|
414
|
+
disabled: O,
|
|
407
415
|
className: "auth-primary-button flex w-full items-center justify-center gap-2 px-4 py-3 font-semibold",
|
|
408
|
-
children:
|
|
416
|
+
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
417
|
})
|
|
410
418
|
]
|
|
411
419
|
}),
|
|
412
|
-
/* @__PURE__ */
|
|
420
|
+
/* @__PURE__ */ C("div", {
|
|
413
421
|
className: "relative my-8",
|
|
414
|
-
children: [/* @__PURE__ */
|
|
422
|
+
children: [/* @__PURE__ */ S("div", {
|
|
415
423
|
className: "absolute inset-0 flex items-center",
|
|
416
|
-
children: /* @__PURE__ */
|
|
417
|
-
}), /* @__PURE__ */
|
|
424
|
+
children: /* @__PURE__ */ S("div", { className: "w-full border-t border-[var(--color-border-default)]" })
|
|
425
|
+
}), /* @__PURE__ */ S("div", {
|
|
418
426
|
className: "relative flex justify-center",
|
|
419
|
-
children: /* @__PURE__ */
|
|
427
|
+
children: /* @__PURE__ */ S("span", {
|
|
420
428
|
className: "px-4 bg-[var(--color-bg-canvas)] text-sm text-[var(--color-text-tertiary)]",
|
|
421
|
-
children:
|
|
429
|
+
children: D("auth.register.orSignUpWith", "or sign up with")
|
|
422
430
|
})
|
|
423
431
|
})]
|
|
424
432
|
}),
|
|
425
|
-
|
|
433
|
+
H && /* @__PURE__ */ C("div", {
|
|
426
434
|
className: "flex items-start gap-3 p-4 rounded-xl border bg-status-error-bg-subtle border-status-error-border",
|
|
427
|
-
children: [/* @__PURE__ */
|
|
435
|
+
children: [/* @__PURE__ */ S(a, { className: "size-5 flex-shrink-0 mt-0.5 text-status-error-text" }), /* @__PURE__ */ S("p", {
|
|
428
436
|
className: "text-sm text-status-error-text",
|
|
429
|
-
children:
|
|
437
|
+
children: H
|
|
430
438
|
})]
|
|
431
439
|
}),
|
|
432
|
-
/* @__PURE__ */
|
|
440
|
+
/* @__PURE__ */ S("div", {
|
|
433
441
|
className: "grid grid-cols-3 gap-3",
|
|
434
|
-
children: se.map((e) => /* @__PURE__ */
|
|
442
|
+
children: se.map((e) => /* @__PURE__ */ C("button", {
|
|
435
443
|
type: "button",
|
|
436
444
|
onClick: e.onClick,
|
|
437
445
|
disabled: e.disabled,
|
|
438
446
|
title: e.tooltip,
|
|
439
447
|
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__ */
|
|
448
|
+
children: [/* @__PURE__ */ S(e.icon, { className: `size-5 ${e.disabled ? "opacity-50" : ""}` }), /* @__PURE__ */ S("span", {
|
|
441
449
|
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
450
|
children: e.name
|
|
443
451
|
})]
|
|
444
452
|
}, e.name))
|
|
445
453
|
}),
|
|
446
|
-
/* @__PURE__ */
|
|
454
|
+
/* @__PURE__ */ C("p", {
|
|
447
455
|
className: "mt-8 text-center text-sm text-[var(--color-text-secondary)]",
|
|
448
456
|
children: [
|
|
449
|
-
|
|
457
|
+
D("auth.register.alreadyHaveAccount", "Already have an account?"),
|
|
450
458
|
" ",
|
|
451
|
-
/* @__PURE__ */
|
|
452
|
-
|
|
459
|
+
/* @__PURE__ */ S("button", {
|
|
460
|
+
type: "button",
|
|
461
|
+
onClick: () => T("/auth/login"),
|
|
453
462
|
className: "font-semibold text-text-link hover:text-text-linkHover transition-colors",
|
|
454
|
-
children:
|
|
463
|
+
children: D("auth.register.signIn", "Sign in")
|
|
455
464
|
})
|
|
456
465
|
]
|
|
457
466
|
})
|
|
@@ -459,6 +468,6 @@ function C() {
|
|
|
459
468
|
});
|
|
460
469
|
}
|
|
461
470
|
//#endregion
|
|
462
|
-
export {
|
|
471
|
+
export { w as RegisterPage };
|
|
463
472
|
|
|
464
473
|
//# sourceMappingURL=RegisterPage.js.map
|