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