@burdenoff/microfe-auth 2026.520.1 → 2026.521.1

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