@burdenoff/microfe-auth 2026.519.2 → 2026.520.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) 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 +1 -1
  4. package/dist/auth/components/AuthLayout.js.map +1 -1
  5. package/dist/auth/hooks/useContextSwitcherData.d.ts.map +1 -1
  6. package/dist/auth/hooks/useContextSwitcherData.js +25 -22
  7. package/dist/auth/hooks/useContextSwitcherData.js.map +1 -1
  8. package/dist/auth/hooks/useSessionOperations.d.ts.map +1 -1
  9. package/dist/auth/hooks/useSessionOperations.js +4 -1
  10. package/dist/auth/hooks/useSessionOperations.js.map +1 -1
  11. package/dist/auth/hooks/useUserOperations.d.ts.map +1 -1
  12. package/dist/auth/hooks/useUserOperations.js +26 -11
  13. package/dist/auth/hooks/useUserOperations.js.map +1 -1
  14. package/dist/auth/pages/LoginPage.d.ts.map +1 -1
  15. package/dist/auth/pages/LoginPage.js +3 -2
  16. package/dist/auth/pages/LoginPage.js.map +1 -1
  17. package/dist/auth/pages/PasswordResetPage.js +1 -1
  18. package/dist/auth/pages/PasswordResetPage.js.map +1 -1
  19. package/dist/auth/pages/ReactivatePage.js +1 -1
  20. package/dist/auth/pages/ReactivatePage.js.map +1 -1
  21. package/dist/auth/pages/RegisterPage.js +1 -1
  22. package/dist/auth/pages/RegisterPage.js.map +1 -1
  23. package/dist/auth/pages/SessionsPage.d.ts.map +1 -1
  24. package/dist/auth/pages/SessionsPage.js +185 -130
  25. package/dist/auth/pages/SessionsPage.js.map +1 -1
  26. package/dist/auth/pages/SsoCallbackPage.js +1 -1
  27. package/dist/auth/pages/SsoCallbackPage.js.map +1 -1
  28. package/dist/auth/pages/SsoConfigPage.d.ts.map +1 -1
  29. package/dist/auth/pages/SsoConfigPage.js +214 -190
  30. package/dist/auth/pages/SsoConfigPage.js.map +1 -1
  31. package/dist/auth/pages/SsoLoginPage.js +1 -1
  32. package/dist/auth/pages/SsoLoginPage.js.map +1 -1
  33. package/dist/auth/pages/UserProfilePage.d.ts.map +1 -1
  34. package/dist/auth/pages/UserProfilePage.js +246 -233
  35. package/dist/auth/pages/UserProfilePage.js.map +1 -1
  36. package/dist/auth/pages/UsersPage.d.ts.map +1 -1
  37. package/dist/auth/pages/UsersPage.js +0 -1
  38. package/dist/auth/pages/UsersPage.js.map +1 -1
  39. package/dist/auth/store/authStore.d.ts +20 -0
  40. package/dist/auth/store/authStore.d.ts.map +1 -1
  41. package/dist/auth/store/authStore.js.map +1 -1
  42. package/dist/microfe-auth.css +1 -1
  43. package/dist/translations/en.d.ts +12 -0
  44. package/dist/translations/en.d.ts.map +1 -1
  45. package/package.json +1 -1
  46. package/dist/auth/pages/AppsPage.d.ts +0 -5
  47. package/dist/auth/pages/AppsPage.d.ts.map +0 -1
@@ -4,25 +4,25 @@ import "../hooks/index.js";
4
4
  import { AuthLayout as n } from "../components/AuthLayout.js";
5
5
  import { AlertIcon as r, CheckIcon as i, EmailIcon as a, SpinnerIcon as o, UserIcon as s } from "../components/AuthIcons.js";
6
6
  import { useCompleteAvatarUploadMutation as c, useInitiateAvatarUploadMutation as l } from "../../generated/wspace-operations.js";
7
- import { useEffect as u, useRef as d, useState as f } from "react";
8
- import { useNavigate as p } from "react-router-dom";
9
- import { useI18n as m } from "@burdenoff/fe-libs/shared/providers/shell";
10
- import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
7
+ import { useEffect as u, useId as d, useRef as f, useState as p } from "react";
8
+ import { useNavigate as m } from "react-router-dom";
9
+ import { useI18n as h } from "@burdenoff/fe-libs/shared/providers/shell";
10
+ import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
11
11
  //#region src/auth/pages/UserProfilePage.tsx
12
- function v() {
13
- let { t: v } = m(), y = (e, t) => {
14
- let n = v(e);
12
+ function y() {
13
+ let { t: y } = h(), b = (e, t) => {
14
+ let n = y(e);
15
15
  return n === e ? t : n;
16
- }, b = p(), x = e((e) => e.isAuthenticated), S = e((e) => e.user), { updateCurrentUserProfile: C, isLoading: w } = t(), [T] = l(), [E] = c(), D = d(null), [O, k] = f(!1), A = async (e) => {
16
+ }, x = m(), S = e((e) => e.isAuthenticated), C = e((e) => e.user), { updateCurrentUserProfile: w, isLoading: T } = t(), E = d(), D = d(), O = d(), k = d(), A = d(), [j] = l(), [M] = c(), N = f(null), [P, F] = p(!1), I = async (e) => {
17
17
  let t = e.target.files?.[0];
18
18
  if (t) {
19
19
  if (!t.type.startsWith("image/")) {
20
- I(y("auth.profile.invalidImageType", "Please select an image file"));
20
+ H(b("auth.profile.invalidImageType", "Please select an image file"));
21
21
  return;
22
22
  }
23
- k(!0), I(null);
23
+ F(!0), H(null);
24
24
  try {
25
- let e = await T({ variables: { input: {
25
+ let e = await j({ variables: { input: {
26
26
  fileName: t.name,
27
27
  fileSize: t.size.toString(),
28
28
  mimeType: t.type
@@ -33,135 +33,135 @@ function v() {
33
33
  headers: { "Content-Type": t.type },
34
34
  body: t
35
35
  })).ok) throw Error("Failed to upload file");
36
- let i = (await E({ variables: { input: { sessionId: n.id } } })).data?.completeUpload.file?.downloadUrl;
36
+ let i = (await M({ variables: { input: { sessionId: n.id } } })).data?.completeUpload.file?.downloadUrl;
37
37
  if (!i) throw Error("Upload succeeded but no URL returned");
38
- await C({ avatar: i }), R(y("auth.profile.avatarUpdated", "Profile picture updated!"));
38
+ await w({ avatar: i }), W(b("auth.profile.avatarUpdated", "Profile picture updated!"));
39
39
  } catch (e) {
40
- I(e instanceof Error ? e.message : y("auth.profile.avatarFailed", "Failed to upload picture"));
40
+ H(e instanceof Error ? e.message : b("auth.profile.avatarFailed", "Failed to upload picture"));
41
41
  } finally {
42
- k(!1), D.current && (D.current.value = "");
42
+ F(!1), N.current && (N.current.value = "");
43
43
  }
44
44
  }
45
- }, [j, M] = f(!1), [N, P] = f({
45
+ }, [L, R] = p(!1), [z, B] = p({
46
46
  username: "",
47
47
  firstName: "",
48
48
  lastName: "",
49
49
  name: "",
50
50
  phoneNumber: ""
51
- }), [F, I] = f(null), [L, R] = f(null);
51
+ }), [V, H] = p(null), [U, W] = p(null);
52
52
  return u(() => {
53
- S && P({
54
- username: S.username || "",
55
- firstName: S.firstName || "",
56
- lastName: S.lastName || "",
57
- name: S.name || "",
58
- phoneNumber: S.phoneNumber || ""
53
+ C && B({
54
+ username: C.username || "",
55
+ firstName: C.firstName || "",
56
+ lastName: C.lastName || "",
57
+ name: C.name || "",
58
+ phoneNumber: C.phoneNumber || ""
59
59
  });
60
- }, [S]), !x || !S ? /* @__PURE__ */ g(n, {
61
- title: y("auth.profile.title", "Profile"),
62
- subtitle: y("auth.profile.subtitle", "View and manage your profile"),
63
- children: /* @__PURE__ */ _("div", {
60
+ }, [C]), !S || !C ? /* @__PURE__ */ _(n, {
61
+ title: b("auth.profile.title", "Profile"),
62
+ subtitle: b("auth.profile.subtitle", "View and manage your profile"),
63
+ children: /* @__PURE__ */ v("div", {
64
64
  className: "text-center py-12",
65
65
  children: [
66
- /* @__PURE__ */ g("div", {
66
+ /* @__PURE__ */ _("div", {
67
67
  className: "w-16 h-16 mx-auto mb-4 rounded-full bg-[var(--color-status-warning-bg-subtle)] flex items-center justify-center",
68
- children: /* @__PURE__ */ g(r, { className: "w-8 h-8 text-[var(--color-status-warning-text)]" })
68
+ children: /* @__PURE__ */ _(r, { className: "w-8 h-8 text-[var(--color-status-warning-text)]" })
69
69
  }),
70
- /* @__PURE__ */ g("h2", {
70
+ /* @__PURE__ */ _("h2", {
71
71
  className: "text-xl font-semibold text-[var(--color-text-primary)] mb-2",
72
- children: y("auth.profile.authRequired", "Authentication Required")
72
+ children: b("auth.profile.authRequired", "Authentication Required")
73
73
  }),
74
- /* @__PURE__ */ g("p", {
74
+ /* @__PURE__ */ _("p", {
75
75
  className: "text-[var(--color-text-secondary)] mb-6",
76
- children: y("auth.profile.signInToView", "Please sign in to view your profile")
76
+ children: b("auth.profile.signInToView", "Please sign in to view your profile")
77
77
  }),
78
- /* @__PURE__ */ g("button", {
79
- onClick: () => b("/auth/login"),
78
+ /* @__PURE__ */ _("button", {
79
+ onClick: () => x("/auth/login"),
80
80
  className: "auth-primary-button px-6 py-3 font-semibold",
81
- children: y("auth.profile.signIn", "Sign In")
81
+ children: b("auth.profile.signIn", "Sign In")
82
82
  })
83
83
  ]
84
84
  })
85
- }) : /* @__PURE__ */ _("div", {
85
+ }) : /* @__PURE__ */ v("div", {
86
86
  className: "max-w-4xl mx-auto p-6",
87
87
  children: [
88
- /* @__PURE__ */ _("div", {
88
+ /* @__PURE__ */ v("div", {
89
89
  className: "mb-8",
90
- children: [/* @__PURE__ */ g("h1", {
90
+ children: [/* @__PURE__ */ _("h1", {
91
91
  className: "text-3xl font-semibold text-[var(--color-text-primary)]",
92
- children: y("auth.profile.myProfile", "My Profile")
93
- }), /* @__PURE__ */ g("p", {
92
+ children: b("auth.profile.myProfile", "My Profile")
93
+ }), /* @__PURE__ */ _("p", {
94
94
  className: "text-[var(--color-text-secondary)] mt-2",
95
- children: y("auth.profile.viewAndManage", "View and manage your account information")
95
+ children: b("auth.profile.viewAndManage", "View and manage your account information")
96
96
  })]
97
97
  }),
98
- L && /* @__PURE__ */ _("div", {
98
+ U && /* @__PURE__ */ v("div", {
99
99
  className: "mb-6 flex items-center gap-3 p-4 rounded-xl bg-[var(--color-status-success-bg-subtle)] border border-[var(--color-status-success-border)]",
100
100
  children: [
101
- /* @__PURE__ */ g(i, { className: "w-5 h-5 text-[var(--color-status-success-text)] flex-shrink-0" }),
102
- /* @__PURE__ */ g("p", {
101
+ /* @__PURE__ */ _(i, { className: "w-5 h-5 text-[var(--color-status-success-text)] flex-shrink-0" }),
102
+ /* @__PURE__ */ _("p", {
103
103
  className: "text-[var(--color-status-success-text)]",
104
- children: L
104
+ children: U
105
105
  }),
106
- /* @__PURE__ */ g("button", {
107
- onClick: () => R(null),
106
+ /* @__PURE__ */ _("button", {
107
+ onClick: () => W(null),
108
108
  className: "ml-auto text-sm text-[var(--color-status-success-text)] hover:underline transition-colors duration-200",
109
- children: y("auth.profile.dismiss", "Dismiss")
109
+ children: b("auth.profile.dismiss", "Dismiss")
110
110
  })
111
111
  ]
112
112
  }),
113
- F && /* @__PURE__ */ _("div", {
113
+ V && /* @__PURE__ */ v("div", {
114
114
  className: "mb-6 flex items-start gap-3 p-4 rounded-xl bg-[var(--color-status-error-bg-subtle)] border border-[var(--color-status-error-border)]",
115
115
  children: [
116
- /* @__PURE__ */ g(r, { className: "w-5 h-5 text-[var(--color-status-error-text)] flex-shrink-0 mt-0.5" }),
117
- /* @__PURE__ */ g("div", {
116
+ /* @__PURE__ */ _(r, { className: "w-5 h-5 text-[var(--color-status-error-text)] flex-shrink-0 mt-0.5" }),
117
+ /* @__PURE__ */ _("div", {
118
118
  className: "flex-1",
119
- children: /* @__PURE__ */ g("p", {
119
+ children: /* @__PURE__ */ _("p", {
120
120
  className: "text-sm text-[var(--color-status-error-text)]",
121
- children: F
121
+ children: V
122
122
  })
123
123
  }),
124
- /* @__PURE__ */ g("button", {
125
- onClick: () => I(null),
124
+ /* @__PURE__ */ _("button", {
125
+ onClick: () => H(null),
126
126
  className: "text-sm text-[var(--color-status-error-text)] hover:underline transition-colors duration-200",
127
- children: y("auth.profile.dismiss", "Dismiss")
127
+ children: b("auth.profile.dismiss", "Dismiss")
128
128
  })
129
129
  ]
130
130
  }),
131
- /* @__PURE__ */ _("div", {
131
+ /* @__PURE__ */ v("div", {
132
132
  className: "rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] shadow-sm overflow-hidden",
133
- children: [/* @__PURE__ */ g("div", {
133
+ children: [/* @__PURE__ */ _("div", {
134
134
  className: "auth-hero-card p-6",
135
- children: /* @__PURE__ */ _("div", {
135
+ children: /* @__PURE__ */ v("div", {
136
136
  className: "flex items-center gap-4",
137
- children: [/* @__PURE__ */ _("div", {
137
+ children: [/* @__PURE__ */ v("div", {
138
138
  className: "relative group",
139
139
  children: [
140
- S.avatar ? /* @__PURE__ */ g("img", {
141
- src: S.avatar,
142
- alt: y("auth.profile.avatarAlt", "Profile picture"),
140
+ C.avatar ? /* @__PURE__ */ _("img", {
141
+ src: C.avatar,
142
+ alt: b("auth.profile.avatarAlt", "Profile picture"),
143
143
  className: "w-20 h-20 rounded-full object-cover shadow-lg"
144
- }) : /* @__PURE__ */ g("div", {
144
+ }) : /* @__PURE__ */ _("div", {
145
145
  className: "w-20 h-20 rounded-full bg-bg-surface/20 backdrop-blur-sm flex items-center justify-center text-white text-3xl font-semibold shadow-lg",
146
- children: (S.name || S.username || S.email).charAt(0).toUpperCase()
146
+ children: (C.name || C.username || C.email).charAt(0).toUpperCase()
147
147
  }),
148
- /* @__PURE__ */ g("button", {
148
+ /* @__PURE__ */ _("button", {
149
149
  type: "button",
150
- onClick: () => D.current?.click(),
151
- disabled: O,
152
- "aria-label": y("auth.profile.changeAvatar", "Change profile picture"),
150
+ onClick: () => N.current?.click(),
151
+ disabled: P,
152
+ "aria-label": b("auth.profile.changeAvatar", "Change profile picture"),
153
153
  className: "absolute inset-0 rounded-full flex items-center justify-center bg-black/40 opacity-0 group-hover:opacity-100 transition-opacity duration-200 cursor-pointer",
154
- children: O ? /* @__PURE__ */ g(o, { className: "w-6 h-6 text-white animate-spin" }) : /* @__PURE__ */ _("svg", {
154
+ children: P ? /* @__PURE__ */ _(o, { className: "w-6 h-6 text-white animate-spin" }) : /* @__PURE__ */ v("svg", {
155
155
  className: "w-6 h-6 text-white",
156
156
  fill: "none",
157
157
  viewBox: "0 0 24 24",
158
158
  stroke: "currentColor",
159
- children: [/* @__PURE__ */ g("path", {
159
+ children: [/* @__PURE__ */ _("path", {
160
160
  strokeLinecap: "round",
161
161
  strokeLinejoin: "round",
162
162
  strokeWidth: 2,
163
163
  d: "M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"
164
- }), /* @__PURE__ */ g("path", {
164
+ }), /* @__PURE__ */ _("path", {
165
165
  strokeLinecap: "round",
166
166
  strokeLinejoin: "round",
167
167
  strokeWidth: 2,
@@ -169,298 +169,311 @@ function v() {
169
169
  })]
170
170
  })
171
171
  }),
172
- /* @__PURE__ */ g("input", {
173
- ref: D,
172
+ /* @__PURE__ */ _("input", {
173
+ ref: N,
174
174
  type: "file",
175
175
  accept: "image/*",
176
176
  className: "hidden",
177
- onChange: (e) => void A(e),
177
+ onChange: (e) => void I(e),
178
178
  "aria-hidden": "true"
179
179
  })
180
180
  ]
181
- }), /* @__PURE__ */ _("div", {
181
+ }), /* @__PURE__ */ v("div", {
182
182
  className: "text-white",
183
183
  children: [
184
- /* @__PURE__ */ g("h2", {
184
+ /* @__PURE__ */ _("h2", {
185
185
  className: "text-2xl font-semibold",
186
- children: S.name || `${S.firstName || ""} ${S.lastName || ""}`.trim() || S.username
186
+ children: C.name || `${C.firstName || ""} ${C.lastName || ""}`.trim() || C.username
187
187
  }),
188
- /* @__PURE__ */ _("p", {
189
- className: "text-blue-100 flex items-center gap-2",
190
- children: [/* @__PURE__ */ g(a, { className: "w-4 h-4" }), S.email]
188
+ /* @__PURE__ */ v("p", {
189
+ className: "text-white/80 flex items-center gap-2",
190
+ children: [/* @__PURE__ */ _(a, { className: "w-4 h-4" }), C.email]
191
191
  }),
192
- /* @__PURE__ */ _("div", {
192
+ /* @__PURE__ */ v("div", {
193
193
  className: "flex items-center gap-2 mt-2",
194
- children: [/* @__PURE__ */ g("span", {
194
+ children: [/* @__PURE__ */ _("span", {
195
195
  className: "px-2.5 py-1 rounded-full text-xs font-medium bg-bg-surface/20 backdrop-blur-sm",
196
- children: S.role?.replace("_", " ") || y("auth.profile.member", "Member")
197
- }), S.emailVerified && /* @__PURE__ */ _("span", {
196
+ children: C.role?.replace("_", " ") || b("auth.profile.member", "Member")
197
+ }), C.emailVerified && /* @__PURE__ */ v("span", {
198
198
  className: "px-2.5 py-1 rounded-full text-xs font-medium bg-status-success-text/30 flex items-center gap-1",
199
- children: [/* @__PURE__ */ g(i, { className: "w-3 h-3" }), y("auth.profile.verified", "Verified")]
199
+ children: [/* @__PURE__ */ _(i, { className: "w-3 h-3" }), b("auth.profile.verified", "Verified")]
200
200
  })]
201
201
  })
202
202
  ]
203
203
  })]
204
204
  })
205
- }), /* @__PURE__ */ g("div", {
205
+ }), /* @__PURE__ */ _("div", {
206
206
  className: "p-6",
207
- children: j ? /* @__PURE__ */ _("form", {
207
+ children: L ? /* @__PURE__ */ v("form", {
208
208
  onSubmit: async (e) => {
209
- e.preventDefault(), I(null), R(null);
209
+ e.preventDefault(), H(null), W(null);
210
210
  try {
211
- await C({
212
- username: N.username || void 0,
213
- firstName: N.firstName || void 0,
214
- lastName: N.lastName || void 0,
215
- name: N.name || void 0,
216
- phoneNumber: N.phoneNumber || void 0
217
- }), R(y("auth.profile.updateSuccess", "Profile updated successfully!")), M(!1);
211
+ await w({
212
+ username: z.username || void 0,
213
+ firstName: z.firstName || void 0,
214
+ lastName: z.lastName || void 0,
215
+ name: z.name || void 0,
216
+ phoneNumber: z.phoneNumber || void 0
217
+ }), W(b("auth.profile.updateSuccess", "Profile updated successfully!")), R(!1);
218
218
  } catch (e) {
219
- I(e instanceof Error ? e.message : y("auth.profile.updateFailed", "Failed to update profile"));
219
+ H(e instanceof Error ? e.message : b("auth.profile.updateFailed", "Failed to update profile"));
220
220
  }
221
221
  },
222
222
  className: "space-y-6",
223
- children: [/* @__PURE__ */ _("div", {
223
+ children: [/* @__PURE__ */ v("div", {
224
224
  className: "grid grid-cols-1 md:grid-cols-2 gap-6",
225
225
  children: [
226
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
226
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
227
+ htmlFor: E,
227
228
  className: "block text-sm font-medium text-[var(--color-text-primary)] mb-2",
228
- children: y("auth.profile.username", "Username")
229
- }), /* @__PURE__ */ _("div", {
229
+ children: b("auth.profile.username", "Username")
230
+ }), /* @__PURE__ */ v("div", {
230
231
  className: "relative",
231
- children: [/* @__PURE__ */ g("div", {
232
+ children: [/* @__PURE__ */ _("div", {
232
233
  className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
233
- children: /* @__PURE__ */ g(s, { className: "w-5 h-5 text-[var(--color-text-tertiary)]" })
234
- }), /* @__PURE__ */ g("input", {
234
+ children: /* @__PURE__ */ _(s, {
235
+ className: "w-5 h-5 text-[var(--color-text-tertiary)]",
236
+ "aria-hidden": "true"
237
+ })
238
+ }), /* @__PURE__ */ _("input", {
239
+ id: E,
235
240
  type: "text",
236
- value: N.username,
237
- onChange: (e) => P({
238
- ...N,
241
+ value: z.username,
242
+ onChange: (e) => B({
243
+ ...z,
239
244
  username: e.target.value
240
245
  }),
241
246
  className: "block w-full pl-[3.5rem] pr-4 py-3 border border-[var(--color-border-default)] rounded-xl bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all duration-300",
242
- placeholder: y("auth.profile.usernamePlaceholder", "Enter username")
247
+ placeholder: b("auth.profile.usernamePlaceholder", "Enter username")
243
248
  })]
244
249
  })] }),
245
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
250
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
251
+ htmlFor: D,
246
252
  className: "block text-sm font-medium text-[var(--color-text-primary)] mb-2",
247
- children: y("auth.profile.displayName", "Display Name")
248
- }), /* @__PURE__ */ g("input", {
253
+ children: b("auth.profile.displayName", "Display Name")
254
+ }), /* @__PURE__ */ _("input", {
255
+ id: D,
249
256
  type: "text",
250
- value: N.name,
251
- onChange: (e) => P({
252
- ...N,
257
+ value: z.name,
258
+ onChange: (e) => B({
259
+ ...z,
253
260
  name: e.target.value
254
261
  }),
255
262
  className: "block w-full px-4 py-3 border border-[var(--color-border-default)] rounded-xl bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all duration-300",
256
- placeholder: y("auth.profile.displayNamePlaceholder", "Enter display name")
263
+ placeholder: b("auth.profile.displayNamePlaceholder", "Enter display name")
257
264
  })] }),
258
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
265
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
266
+ htmlFor: O,
259
267
  className: "block text-sm font-medium text-[var(--color-text-primary)] mb-2",
260
- children: y("auth.profile.firstName", "First Name")
261
- }), /* @__PURE__ */ g("input", {
268
+ children: b("auth.profile.firstName", "First Name")
269
+ }), /* @__PURE__ */ _("input", {
270
+ id: O,
262
271
  type: "text",
263
- value: N.firstName,
264
- onChange: (e) => P({
265
- ...N,
272
+ value: z.firstName,
273
+ onChange: (e) => B({
274
+ ...z,
266
275
  firstName: e.target.value
267
276
  }),
268
277
  className: "block w-full px-4 py-3 border border-[var(--color-border-default)] rounded-xl bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all duration-300",
269
- placeholder: y("auth.profile.firstNamePlaceholder", "Enter first name")
278
+ placeholder: b("auth.profile.firstNamePlaceholder", "Enter first name")
270
279
  })] }),
271
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
280
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
281
+ htmlFor: k,
272
282
  className: "block text-sm font-medium text-[var(--color-text-primary)] mb-2",
273
- children: y("auth.profile.lastName", "Last Name")
274
- }), /* @__PURE__ */ g("input", {
283
+ children: b("auth.profile.lastName", "Last Name")
284
+ }), /* @__PURE__ */ _("input", {
285
+ id: k,
275
286
  type: "text",
276
- value: N.lastName,
277
- onChange: (e) => P({
278
- ...N,
287
+ value: z.lastName,
288
+ onChange: (e) => B({
289
+ ...z,
279
290
  lastName: e.target.value
280
291
  }),
281
292
  className: "block w-full px-4 py-3 border border-[var(--color-border-default)] rounded-xl bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all duration-300",
282
- placeholder: y("auth.profile.lastNamePlaceholder", "Enter last name")
293
+ placeholder: b("auth.profile.lastNamePlaceholder", "Enter last name")
283
294
  })] }),
284
- /* @__PURE__ */ _("div", {
295
+ /* @__PURE__ */ v("div", {
285
296
  className: "md:col-span-2",
286
- children: [/* @__PURE__ */ g("label", {
297
+ children: [/* @__PURE__ */ _("label", {
298
+ htmlFor: A,
287
299
  className: "block text-sm font-medium text-[var(--color-text-primary)] mb-2",
288
- children: y("auth.profile.phoneNumber", "Phone Number")
289
- }), /* @__PURE__ */ g("input", {
300
+ children: b("auth.profile.phoneNumber", "Phone Number")
301
+ }), /* @__PURE__ */ _("input", {
302
+ id: A,
290
303
  type: "tel",
291
- value: N.phoneNumber,
292
- onChange: (e) => P({
293
- ...N,
304
+ value: z.phoneNumber,
305
+ onChange: (e) => B({
306
+ ...z,
294
307
  phoneNumber: e.target.value
295
308
  }),
296
309
  className: "block w-full px-4 py-3 border border-[var(--color-border-default)] rounded-xl bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all duration-300",
297
- placeholder: y("auth.profile.phonePlaceholder", "Enter phone number")
310
+ placeholder: b("auth.profile.phonePlaceholder", "Enter phone number")
298
311
  })]
299
312
  })
300
313
  ]
301
- }), /* @__PURE__ */ _("div", {
314
+ }), /* @__PURE__ */ v("div", {
302
315
  className: "flex gap-3 pt-4 border-t border-[var(--color-border-default)]",
303
- children: [/* @__PURE__ */ g("button", {
316
+ children: [/* @__PURE__ */ _("button", {
304
317
  type: "submit",
305
- disabled: w,
318
+ disabled: T,
306
319
  className: "auth-primary-button flex items-center gap-2 px-6 py-3 font-medium",
307
- children: w ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(o, { className: "w-4 h-4 animate-spin" }), y("auth.profile.saving", "Saving...")] }) : y("auth.profile.saveChanges", "Save Changes")
308
- }), /* @__PURE__ */ g("button", {
320
+ children: T ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(o, { className: "w-4 h-4 animate-spin" }), b("auth.profile.saving", "Saving...")] }) : b("auth.profile.saveChanges", "Save Changes")
321
+ }), /* @__PURE__ */ _("button", {
309
322
  type: "button",
310
323
  onClick: () => {
311
- S && P({
312
- username: S.username || "",
313
- firstName: S.firstName || "",
314
- lastName: S.lastName || "",
315
- name: S.name || "",
316
- phoneNumber: S.phoneNumber || ""
317
- }), M(!1), I(null);
324
+ C && B({
325
+ username: C.username || "",
326
+ firstName: C.firstName || "",
327
+ lastName: C.lastName || "",
328
+ name: C.name || "",
329
+ phoneNumber: C.phoneNumber || ""
330
+ }), R(!1), H(null);
318
331
  },
319
332
  className: "px-6 py-3 rounded-xl border border-[var(--color-border-default)] text-[var(--color-text-secondary)] font-medium hover:bg-[var(--color-bg-muted)] transition-colors duration-200",
320
- children: y("auth.profile.cancel", "Cancel")
333
+ children: b("auth.profile.cancel", "Cancel")
321
334
  })]
322
335
  })]
323
- }) : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ _("div", {
336
+ }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("div", {
324
337
  className: "grid grid-cols-1 md:grid-cols-2 gap-6",
325
338
  children: [
326
- /* @__PURE__ */ _("div", {
339
+ /* @__PURE__ */ v("div", {
327
340
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
328
- children: [/* @__PURE__ */ g("label", {
341
+ children: [/* @__PURE__ */ _("label", {
329
342
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
330
- children: y("auth.profile.username", "Username")
331
- }), /* @__PURE__ */ g("p", {
343
+ children: b("auth.profile.username", "Username")
344
+ }), /* @__PURE__ */ _("p", {
332
345
  className: "text-[var(--color-text-primary)] font-medium",
333
- children: S.username || "-"
346
+ children: C.username || "-"
334
347
  })]
335
348
  }),
336
- /* @__PURE__ */ _("div", {
349
+ /* @__PURE__ */ v("div", {
337
350
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
338
- children: [/* @__PURE__ */ g("label", {
351
+ children: [/* @__PURE__ */ _("label", {
339
352
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
340
- children: y("auth.profile.displayName", "Display Name")
341
- }), /* @__PURE__ */ g("p", {
353
+ children: b("auth.profile.displayName", "Display Name")
354
+ }), /* @__PURE__ */ _("p", {
342
355
  className: "text-[var(--color-text-primary)] font-medium",
343
- children: S.name || "-"
356
+ children: C.name || "-"
344
357
  })]
345
358
  }),
346
- /* @__PURE__ */ _("div", {
359
+ /* @__PURE__ */ v("div", {
347
360
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
348
- children: [/* @__PURE__ */ g("label", {
361
+ children: [/* @__PURE__ */ _("label", {
349
362
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
350
- children: y("auth.profile.firstName", "First Name")
351
- }), /* @__PURE__ */ g("p", {
363
+ children: b("auth.profile.firstName", "First Name")
364
+ }), /* @__PURE__ */ _("p", {
352
365
  className: "text-[var(--color-text-primary)] font-medium",
353
- children: S.firstName || "-"
366
+ children: C.firstName || "-"
354
367
  })]
355
368
  }),
356
- /* @__PURE__ */ _("div", {
369
+ /* @__PURE__ */ v("div", {
357
370
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
358
- children: [/* @__PURE__ */ g("label", {
371
+ children: [/* @__PURE__ */ _("label", {
359
372
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
360
- children: y("auth.profile.lastName", "Last Name")
361
- }), /* @__PURE__ */ g("p", {
373
+ children: b("auth.profile.lastName", "Last Name")
374
+ }), /* @__PURE__ */ _("p", {
362
375
  className: "text-[var(--color-text-primary)] font-medium",
363
- children: S.lastName || "-"
376
+ children: C.lastName || "-"
364
377
  })]
365
378
  }),
366
- /* @__PURE__ */ _("div", {
379
+ /* @__PURE__ */ v("div", {
367
380
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
368
- children: [/* @__PURE__ */ g("label", {
381
+ children: [/* @__PURE__ */ _("label", {
369
382
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
370
- children: y("auth.profile.email", "Email")
371
- }), /* @__PURE__ */ _("p", {
383
+ children: b("auth.profile.email", "Email")
384
+ }), /* @__PURE__ */ v("p", {
372
385
  className: "text-[var(--color-text-primary)] font-medium flex items-center gap-2",
373
- children: [S.email, S.emailVerified && /* @__PURE__ */ _("span", {
386
+ children: [C.email, C.emailVerified && /* @__PURE__ */ v("span", {
374
387
  className: "inline-flex items-center gap-1 text-[var(--color-status-success-text)] text-xs",
375
- children: [/* @__PURE__ */ g(i, { className: "w-3 h-3" }), y("auth.profile.verified", "Verified")]
388
+ children: [/* @__PURE__ */ _(i, { className: "w-3 h-3" }), b("auth.profile.verified", "Verified")]
376
389
  })]
377
390
  })]
378
391
  }),
379
- /* @__PURE__ */ _("div", {
392
+ /* @__PURE__ */ v("div", {
380
393
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
381
- children: [/* @__PURE__ */ g("label", {
394
+ children: [/* @__PURE__ */ _("label", {
382
395
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
383
- children: y("auth.profile.phoneNumber", "Phone Number")
384
- }), /* @__PURE__ */ g("p", {
396
+ children: b("auth.profile.phoneNumber", "Phone Number")
397
+ }), /* @__PURE__ */ _("p", {
385
398
  className: "text-[var(--color-text-primary)] font-medium",
386
- children: S.phoneNumber || "-"
399
+ children: C.phoneNumber || "-"
387
400
  })]
388
401
  }),
389
- /* @__PURE__ */ _("div", {
402
+ /* @__PURE__ */ v("div", {
390
403
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
391
- children: [/* @__PURE__ */ g("label", {
404
+ children: [/* @__PURE__ */ _("label", {
392
405
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
393
- children: y("auth.profile.role", "Role")
394
- }), /* @__PURE__ */ g("p", {
406
+ children: b("auth.profile.role", "Role")
407
+ }), /* @__PURE__ */ _("p", {
395
408
  className: "text-[var(--color-text-primary)] font-medium",
396
- children: S.role?.replace("_", " ") || y("auth.profile.member", "Member")
409
+ children: C.role?.replace("_", " ") || b("auth.profile.member", "Member")
397
410
  })]
398
411
  }),
399
- /* @__PURE__ */ _("div", {
412
+ /* @__PURE__ */ v("div", {
400
413
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
401
- children: [/* @__PURE__ */ g("label", {
414
+ children: [/* @__PURE__ */ _("label", {
402
415
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
403
- children: y("auth.profile.mfaStatus", "MFA Status")
404
- }), /* @__PURE__ */ g("p", {
416
+ children: b("auth.profile.mfaStatus", "MFA Status")
417
+ }), /* @__PURE__ */ _("p", {
405
418
  className: "text-[var(--color-text-primary)] font-medium",
406
- children: S.mfaEnabled ? /* @__PURE__ */ _("span", {
419
+ children: C.mfaEnabled ? /* @__PURE__ */ v("span", {
407
420
  className: "text-[var(--color-status-success-text)] flex items-center gap-1",
408
- children: [/* @__PURE__ */ g(i, { className: "w-4 h-4" }), y("auth.profile.enabled", "Enabled")]
409
- }) : /* @__PURE__ */ g("span", {
421
+ children: [/* @__PURE__ */ _(i, { className: "w-4 h-4" }), b("auth.profile.enabled", "Enabled")]
422
+ }) : /* @__PURE__ */ _("span", {
410
423
  className: "text-[var(--color-status-warning-text)]",
411
- children: y("auth.profile.notEnabled", "Not Enabled")
424
+ children: b("auth.profile.notEnabled", "Not Enabled")
412
425
  })
413
426
  })]
414
427
  }),
415
- /* @__PURE__ */ _("div", {
428
+ /* @__PURE__ */ v("div", {
416
429
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
417
- children: [/* @__PURE__ */ g("label", {
430
+ children: [/* @__PURE__ */ _("label", {
418
431
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
419
- children: y("auth.profile.lastLogin", "Last Login")
420
- }), /* @__PURE__ */ g("p", {
432
+ children: b("auth.profile.lastLogin", "Last Login")
433
+ }), /* @__PURE__ */ _("p", {
421
434
  className: "text-[var(--color-text-primary)] font-medium",
422
- children: S.lastLoginAt ? new Date(S.lastLoginAt).toLocaleString() : y("auth.profile.never", "Never")
435
+ children: C.lastLoginAt ? new Date(C.lastLoginAt).toLocaleString() : b("auth.profile.never", "Never")
423
436
  })]
424
437
  }),
425
- /* @__PURE__ */ _("div", {
438
+ /* @__PURE__ */ v("div", {
426
439
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
427
- children: [/* @__PURE__ */ g("label", {
440
+ children: [/* @__PURE__ */ _("label", {
428
441
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
429
- children: y("auth.profile.accountCreated", "Account Created")
430
- }), /* @__PURE__ */ g("p", {
442
+ children: b("auth.profile.accountCreated", "Account Created")
443
+ }), /* @__PURE__ */ _("p", {
431
444
  className: "text-[var(--color-text-primary)] font-medium",
432
- children: S.createdAt ? new Date(S.createdAt).toLocaleString() : "-"
445
+ children: C.createdAt ? new Date(C.createdAt).toLocaleString() : "-"
433
446
  })]
434
447
  })
435
448
  ]
436
- }), /* @__PURE__ */ _("div", {
449
+ }), /* @__PURE__ */ v("div", {
437
450
  className: "flex gap-3 pt-6 mt-6 border-t border-[var(--color-border-default)]",
438
- children: [/* @__PURE__ */ g("button", {
439
- onClick: () => M(!0),
451
+ children: [/* @__PURE__ */ _("button", {
452
+ onClick: () => R(!0),
440
453
  className: "auth-primary-button px-6 py-3 font-medium",
441
- children: y("auth.profile.editProfile", "Edit Profile")
442
- }), /* @__PURE__ */ g("button", {
443
- onClick: () => b("/auth/security"),
454
+ children: b("auth.profile.editProfile", "Edit Profile")
455
+ }), /* @__PURE__ */ _("button", {
456
+ onClick: () => x("/auth/security"),
444
457
  className: "px-6 py-3 rounded-xl border border-[var(--color-border-default)] text-[var(--color-text-secondary)] font-medium hover:bg-[var(--color-bg-muted)] transition-colors duration-200",
445
- children: y("auth.profile.securitySettings", "Security Settings")
458
+ children: b("auth.profile.securitySettings", "Security Settings")
446
459
  })]
447
460
  })] })
448
461
  })]
449
462
  }),
450
- /* @__PURE__ */ _("div", {
463
+ /* @__PURE__ */ v("div", {
451
464
  className: "mt-8 grid grid-cols-1 md:grid-cols-3 gap-4",
452
- children: [/* @__PURE__ */ _("button", {
453
- onClick: () => b("/auth/mfa"),
465
+ children: [/* @__PURE__ */ v("button", {
466
+ onClick: () => x("/auth/mfa"),
454
467
  className: "p-4 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] hover:border-[var(--color-action-primary-border)] transition-colors duration-200 text-left group",
455
468
  children: [
456
- /* @__PURE__ */ g("div", {
469
+ /* @__PURE__ */ _("div", {
457
470
  className: "w-10 h-10 rounded-lg bg-[var(--color-bg-accent)] flex items-center justify-center mb-3 group-hover:bg-[var(--color-action-primary-bg-subtle)] transition-colors duration-200",
458
- children: /* @__PURE__ */ g("svg", {
471
+ children: /* @__PURE__ */ _("svg", {
459
472
  className: "w-5 h-5 text-[var(--color-text-link)]",
460
473
  fill: "none",
461
474
  viewBox: "0 0 24 24",
462
475
  stroke: "currentColor",
463
- children: /* @__PURE__ */ g("path", {
476
+ children: /* @__PURE__ */ _("path", {
464
477
  strokeLinecap: "round",
465
478
  strokeLinejoin: "round",
466
479
  strokeWidth: 2,
@@ -468,27 +481,27 @@ function v() {
468
481
  })
469
482
  })
470
483
  }),
471
- /* @__PURE__ */ g("h3", {
484
+ /* @__PURE__ */ _("h3", {
472
485
  className: "font-medium text-[var(--color-text-primary)]",
473
- children: y("auth.profile.twoFactorAuth", "Two-Factor Auth")
486
+ children: b("auth.profile.twoFactorAuth", "Two-Factor Auth")
474
487
  }),
475
- /* @__PURE__ */ g("p", {
488
+ /* @__PURE__ */ _("p", {
476
489
  className: "text-sm text-[var(--color-text-tertiary)] mt-1",
477
- children: S.mfaEnabled ? y("auth.profile.manageMfa", "Manage MFA settings") : y("auth.profile.enableMfa", "Enable MFA for extra security")
490
+ children: C.mfaEnabled ? b("auth.profile.manageMfa", "Manage MFA settings") : b("auth.profile.enableMfa", "Enable MFA for extra security")
478
491
  })
479
492
  ]
480
- }), /* @__PURE__ */ _("button", {
481
- onClick: () => b("/auth/api-keys"),
493
+ }), /* @__PURE__ */ v("button", {
494
+ onClick: () => x("/auth/api-keys"),
482
495
  className: "p-4 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] hover:border-[var(--color-action-secondary-border)] transition-colors duration-200 text-left group",
483
496
  children: [
484
- /* @__PURE__ */ g("div", {
497
+ /* @__PURE__ */ _("div", {
485
498
  className: "w-10 h-10 rounded-lg bg-[var(--color-action-secondary-bg-subtle)] flex items-center justify-center mb-3 group-hover:bg-[var(--color-action-secondary-bg-subtle)] transition-colors duration-200",
486
- children: /* @__PURE__ */ g("svg", {
499
+ children: /* @__PURE__ */ _("svg", {
487
500
  className: "w-5 h-5 text-[var(--color-action-secondary-text)]",
488
501
  fill: "none",
489
502
  viewBox: "0 0 24 24",
490
503
  stroke: "currentColor",
491
- children: /* @__PURE__ */ g("path", {
504
+ children: /* @__PURE__ */ _("path", {
492
505
  strokeLinecap: "round",
493
506
  strokeLinejoin: "round",
494
507
  strokeWidth: 2,
@@ -496,13 +509,13 @@ function v() {
496
509
  })
497
510
  })
498
511
  }),
499
- /* @__PURE__ */ g("h3", {
512
+ /* @__PURE__ */ _("h3", {
500
513
  className: "font-medium text-[var(--color-text-primary)]",
501
- children: y("auth.profile.apiKeys", "API Keys")
514
+ children: b("auth.profile.apiKeys", "API Keys")
502
515
  }),
503
- /* @__PURE__ */ g("p", {
516
+ /* @__PURE__ */ _("p", {
504
517
  className: "text-sm text-[var(--color-text-tertiary)] mt-1",
505
- children: y("auth.profile.manageApiKeys", "Manage your API access credentials")
518
+ children: b("auth.profile.manageApiKeys", "Manage your API access credentials")
506
519
  })
507
520
  ]
508
521
  })]
@@ -511,6 +524,6 @@ function v() {
511
524
  });
512
525
  }
513
526
  //#endregion
514
- export { v as UserProfilePage };
527
+ export { y as UserProfilePage };
515
528
 
516
529
  //# sourceMappingURL=UserProfilePage.js.map