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