@burdenoff/microfe-auth 2026.527.1 → 2026.527.3

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