@burdenoff/microfe-auth 2026.624.2 → 2026.625.1

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