@burdenoff/microfe-auth 2026.624.3 → 2026.625.1

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