@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
@@ -4,33 +4,35 @@ import { useUserOperations as r } from "../hooks/useUserOperations.js";
4
4
  import { useAuthPermissions as i } from "../hooks/useAuthPermissions.js";
5
5
  import { ConfirmActionDialog as a } from "../components/ConfirmActionDialog.js";
6
6
  import { nativeImpact as o, nativeNotify as s } from "../../utils/nativeBridge.js";
7
- import { useCallback as ee, useEffect as c, useId as l, useState as u } from "react";
8
- import { useNavigate as te } from "react-router-dom";
9
- import { useI18n as ne } from "@burdenoff/fe-libs/shared/providers/shell";
10
- import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
7
+ import { useCallback as ee, useEffect as te, useId as c, useState as l } from "react";
8
+ import { useNavigate as ne } from "react-router-dom";
9
+ import { useI18n as re } from "@burdenoff/fe-libs/shared/providers/shell";
10
+ import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
11
+ import { Button as p } from "@burdenoff/fe-libs/button";
12
+ import { EmphasisPanel as ie, IllustratedEmptyState as m, NextSteps as ae, PagePurpose as oe } from "@burdenoff/fe-libs/ui";
11
13
  //#region src/auth/pages/UsersPage.tsx
12
- var m = [
14
+ var h = [
13
15
  "TENANT_ADMIN",
14
16
  "ORG_ADMIN",
15
17
  "WORKSPACE_ADMIN",
16
18
  "MEMBER",
17
19
  "GUEST"
18
- ], h = [
20
+ ], g = [
19
21
  "ACTIVE",
20
22
  "INACTIVE",
21
23
  "SUSPENDED",
22
24
  "DELETED"
23
25
  ];
24
- function g() {
25
- let g = te(), { t: re } = ne(), _ = (e, t) => {
26
- let n = re(e);
26
+ function _() {
27
+ let _ = ne(), { t: se } = re(), v = (e, t) => {
28
+ let n = se(e);
27
29
  return n === e ? t : n;
28
- }, v = e((e) => e.isAuthenticated), ie = e((e) => e.user), { canViewUsers: ae, canUpdateUsers: oe, canDeleteUsers: y, isLoading: se } = i(), { listUsers: b, updateUser: ce, deleteUser: le, hardDeleteUser: ue, isLoading: x } = r(), S = l(), C = l(), w = l(), T = l(), de = l(), [E, D] = u(!1), fe = async () => {
29
- D(!0);
30
+ }, y = e((e) => e.isAuthenticated), ce = e((e) => e.user), { canViewUsers: le, canUpdateUsers: ue, canDeleteUsers: b, isLoading: de } = i(), { listUsers: x, updateUser: fe, deleteUser: pe, hardDeleteUser: me, isLoading: S } = r(), C = c(), w = c(), T = c(), E = c(), he = c(), [D, O] = l(!1), k = async () => {
31
+ O(!0);
30
32
  try {
31
33
  let e = {};
32
- U && (e.search = U), W && (e.role = W), G && (e.status = G);
33
- let t = (await b(e, {
34
+ W && (e.search = W), G && (e.role = G), K && (e.status = K);
35
+ let t = (await x(e, {
34
36
  offset: 0,
35
37
  limit: 1e4
36
38
  })).users, n = [
@@ -66,11 +68,11 @@ function g() {
66
68
  ].join(","))], a = new Blob([i.join("\n")], { type: "text/csv;charset=utf-8;" }), o = URL.createObjectURL(a), s = document.createElement("a");
67
69
  s.href = o, s.download = `users-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.csv`, s.click(), URL.revokeObjectURL(o);
68
70
  } catch (e) {
69
- L(e instanceof Error ? e.message : "Failed to export users");
71
+ R(e instanceof Error ? e.message : "Failed to export users");
70
72
  } finally {
71
- D(!1);
73
+ O(!1);
72
74
  }
73
- }, [O, pe] = u([]), [k, me] = u(0), [he, ge] = u(!1), [A, j] = u("list"), [M, N] = u(null), [P, F] = u({
75
+ }, [A, ge] = l([]), [j, _e] = l(0), [ve, ye] = l(!1), [be, M] = l("list"), [N, P] = l(null), [F, I] = l({
74
76
  username: "",
75
77
  firstName: "",
76
78
  lastName: "",
@@ -79,34 +81,34 @@ function g() {
79
81
  role: "MEMBER",
80
82
  status: "ACTIVE",
81
83
  emailVerified: !1
82
- }), [I, L] = u(null), [_e, R] = u(!1), [z, B] = u(null), [V, H] = u(null), [U, ve] = u(""), [W, ye] = u(""), [G, be] = u(""), [K, q] = u(0), J = ee(async () => {
83
- if (v) try {
84
- R(!1);
84
+ }), [L, R] = l(null), [xe, z] = l(!1), [B, V] = l(null), [H, U] = l(null), [W, Se] = l(""), [G, Ce] = l(""), [K, we] = l(""), [q, J] = l(0), Y = ee(async () => {
85
+ if (y) try {
86
+ z(!1);
85
87
  let e = {};
86
- U && (e.search = U), W && (e.role = W), G && (e.status = G);
87
- let t = await b(e, {
88
- offset: K * 10,
88
+ W && (e.search = W), G && (e.role = G), K && (e.status = K);
89
+ let t = await x(e, {
90
+ offset: q * 10,
89
91
  limit: 10
90
92
  });
91
- pe(t.users), me(t.totalCount), ge(t.hasMore), L(null);
93
+ ge(t.users), _e(t.totalCount), ye(t.hasMore), R(null);
92
94
  } catch (e) {
93
95
  if (e instanceof Error && (e.name === "AbortError" || e.message.includes("aborted"))) return;
94
96
  let t = e instanceof Error ? e.message : "Failed to fetch users";
95
- t.toLowerCase().includes("not authorized") || t.toLowerCase().includes("forbidden") ? (R(!0), L(null)) : L(t);
97
+ t.toLowerCase().includes("not authorized") || t.toLowerCase().includes("forbidden") ? (z(!0), R(null)) : R(t);
96
98
  }
97
99
  }, [
98
- b,
99
- U,
100
+ x,
100
101
  W,
101
102
  G,
102
103
  K,
103
- v
104
+ q,
105
+ y
104
106
  ]);
105
- c(() => {
106
- J();
107
- }, [J]);
108
- let Y = () => {
109
- F({
107
+ te(() => {
108
+ Y();
109
+ }, [Y]);
110
+ let X = () => {
111
+ I({
110
112
  username: "",
111
113
  firstName: "",
112
114
  lastName: "",
@@ -115,42 +117,42 @@ function g() {
115
117
  role: "MEMBER",
116
118
  status: "ACTIVE",
117
119
  emailVerified: !1
118
- }), N(null), L(null), B(null);
119
- }, xe = async (e) => {
120
- if (e.preventDefault(), M) {
121
- L(null);
120
+ }), P(null), R(null), V(null);
121
+ }, Te = async (e) => {
122
+ if (e.preventDefault(), N) {
123
+ R(null);
122
124
  try {
123
- await ce(M.id, {
124
- username: P.username || void 0,
125
- firstName: P.firstName || void 0,
126
- lastName: P.lastName || void 0,
127
- name: P.name || void 0,
128
- phoneNumber: P.phoneNumber || void 0,
129
- role: P.role,
130
- status: P.status,
131
- emailVerified: P.emailVerified
132
- }), B(_("auth.users.updateSuccess", "User updated successfully!")), j("list"), Y(), J();
125
+ await fe(N.id, {
126
+ username: F.username || void 0,
127
+ firstName: F.firstName || void 0,
128
+ lastName: F.lastName || void 0,
129
+ name: F.name || void 0,
130
+ phoneNumber: F.phoneNumber || void 0,
131
+ role: F.role,
132
+ status: F.status,
133
+ emailVerified: F.emailVerified
134
+ }), V(v("auth.users.updateSuccess", "User updated successfully!")), M("list"), X(), Y();
133
135
  } catch (e) {
134
- L(e instanceof Error ? e.message : "Failed to update user");
136
+ R(e instanceof Error ? e.message : "Failed to update user");
135
137
  }
136
138
  }
137
- }, Se = async (e) => {
139
+ }, Ee = async (e) => {
138
140
  o("medium");
139
141
  try {
140
- let t = await le(e.id);
141
- t.success ? (s("success"), B(_("auth.users.userDeactivated", `User "${e.email}" has been deactivated.`)), H(null), J()) : (s("error"), L(t.message));
142
+ let t = await pe(e.id);
143
+ t.success ? (s("success"), V(v("auth.users.userDeactivated", `User "${e.email}" has been deactivated.`)), U(null), Y()) : (s("error"), R(t.message));
142
144
  } catch (e) {
143
- s("error"), L(e instanceof Error ? e.message : "Failed to delete user");
145
+ s("error"), R(e instanceof Error ? e.message : "Failed to delete user");
144
146
  }
145
- }, Ce = async (e) => {
147
+ }, De = async (e) => {
146
148
  try {
147
- let t = await ue(e.id);
148
- t.success ? (B(_("auth.users.userPermanentlyDeleted", `User "${e.email}" has been permanently deleted.`)), H(null), J()) : L(t.message);
149
+ let t = await me(e.id);
150
+ t.success ? (V(v("auth.users.userPermanentlyDeleted", `User "${e.email}" has been permanently deleted.`)), U(null), Y()) : R(t.message);
149
151
  } catch (e) {
150
- L(e instanceof Error ? e.message : "Failed to hard delete user");
152
+ R(e instanceof Error ? e.message : "Failed to hard delete user");
151
153
  }
152
- }, X = (e) => {
153
- N(e), F({
154
+ }, Z = (e) => {
155
+ P(e), I({
154
156
  username: e.username || "",
155
157
  firstName: e.firstName || "",
156
158
  lastName: e.lastName || "",
@@ -159,26 +161,26 @@ function g() {
159
161
  role: e.role,
160
162
  status: e.status,
161
163
  emailVerified: e.emailVerified
162
- }), j("edit"), L(null);
163
- }, Z = /* @__PURE__ */ f(a, {
164
- open: V !== null,
164
+ }), M("edit"), R(null);
165
+ }, Q = /* @__PURE__ */ d(a, {
166
+ open: H !== null,
165
167
  onOpenChange: (e) => {
166
- e || H(null);
168
+ e || U(null);
167
169
  },
168
- title: V?.type === "hard-delete" ? _("auth.users.hardDeleteTitle", "Permanently delete user?") : _("auth.users.deactivateTitle", "Deactivate user?"),
169
- description: V?.type === "hard-delete" ? V ? _("auth.users.hardDeleteDesc", `This permanently deletes "${V.user.email}" and cannot be undone.`) : "" : V ? _("auth.users.deactivateDesc", `"${V.user.email}" will be prevented from signing in until reactivated.`) : "",
170
- confirmText: V?.type === "hard-delete" ? _("auth.users.hardDeleteConfirm", "Delete permanently") : _("auth.users.deactivateConfirm", "Deactivate user"),
171
- variant: V?.type === "hard-delete" ? "danger" : "warning",
170
+ title: H?.type === "hard-delete" ? v("auth.users.hardDeleteTitle", "Permanently delete user?") : v("auth.users.deactivateTitle", "Deactivate user?"),
171
+ description: H?.type === "hard-delete" ? H ? v("auth.users.hardDeleteDesc", `This permanently deletes "${H.user.email}" and cannot be undone.`) : "" : H ? v("auth.users.deactivateDesc", `"${H.user.email}" will be prevented from signing in until reactivated.`) : "",
172
+ confirmText: H?.type === "hard-delete" ? v("auth.users.hardDeleteConfirm", "Delete permanently") : v("auth.users.deactivateConfirm", "Deactivate user"),
173
+ variant: H?.type === "hard-delete" ? "danger" : "warning",
172
174
  onConfirm: async () => {
173
- if (V) {
174
- if (V.type === "hard-delete") {
175
- await Ce(V.user);
175
+ if (H) {
176
+ if (H.type === "hard-delete") {
177
+ await De(H.user);
176
178
  return;
177
179
  }
178
- await Se(V.user);
180
+ await Ee(H.user);
179
181
  }
180
182
  }
181
- }), Q = (e) => {
183
+ }), Oe = (e) => {
182
184
  switch (e) {
183
185
  case "SUPER_ADMIN": return "bg-accent-purple-subtle text-accent-purple";
184
186
  case "TENANT_ADMIN": return "bg-status-info-bg-subtle text-status-info-text";
@@ -197,195 +199,193 @@ function g() {
197
199
  default: return "bg-bg-sunken text-text-primary";
198
200
  }
199
201
  };
200
- return v ? se ? /* @__PURE__ */ f("div", {
202
+ return y ? de ? /* @__PURE__ */ d("div", {
201
203
  className: "max-w-6xl mx-auto p-6",
202
- children: /* @__PURE__ */ p("div", {
204
+ children: /* @__PURE__ */ f("div", {
203
205
  className: "text-center py-16",
204
- children: [/* @__PURE__ */ f(n, { className: "size-8 mx-auto text-text-secondary animate-spin" }), /* @__PURE__ */ f("p", {
206
+ children: [/* @__PURE__ */ d(n, { className: "size-8 mx-auto text-text-secondary animate-spin" }), /* @__PURE__ */ d("p", {
205
207
  className: "mt-4 text-text-secondary",
206
- children: _("auth.users.loadingPermissions", "Loading permissions...")
208
+ children: v("auth.users.loadingPermissions", "Loading permissions...")
207
209
  })]
208
210
  })
209
- }) : !ae || _e ? /* @__PURE__ */ f("div", {
211
+ }) : !le || xe ? /* @__PURE__ */ d("div", {
210
212
  className: "max-w-6xl mx-auto p-6",
211
- children: /* @__PURE__ */ p("div", {
212
- className: "text-center py-16 border-2 border-dashed border-border-subtle rounded-xl",
213
- children: [
214
- /* @__PURE__ */ f("div", {
215
- className: "size-16 mx-auto mb-4 rounded-full bg-status-error-bg-subtle flex items-center justify-center",
216
- children: /* @__PURE__ */ f("svg", {
217
- className: "size-8 text-status-error-text",
218
- fill: "none",
219
- viewBox: "0 0 24 24",
220
- stroke: "currentColor",
221
- children: /* @__PURE__ */ f("path", {
222
- strokeLinecap: "round",
223
- strokeLinejoin: "round",
224
- strokeWidth: 1.5,
225
- d: "M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"
226
- })
227
- })
228
- }),
229
- /* @__PURE__ */ f("h2", {
230
- className: "text-xl font-semibold text-text-primary mb-2",
231
- children: _("auth.users.adminAccessRequired", "Admin Access Required")
232
- }),
233
- /* @__PURE__ */ f("p", {
234
- className: "text-text-secondary mb-4",
235
- children: _("auth.users.adminAccessDesc", "You need administrator privileges to view and manage users.")
236
- }),
237
- /* @__PURE__ */ f("p", {
238
- className: "text-sm text-text-secondary",
239
- children: _("auth.users.requiredRoles", "Required roles: Super Admin, Tenant Admin, or Org Admin")
240
- })
241
- ]
213
+ children: /* @__PURE__ */ d(m, {
214
+ illustration: "empty-generic",
215
+ title: v("auth.users.adminAccessRequired", "Admin Access Required"),
216
+ description: /* @__PURE__ */ f(u, { children: [
217
+ v("auth.users.adminAccessDesc", "You need administrator privileges to view and manage users."),
218
+ " ",
219
+ v("auth.users.requiredRoles", "Required roles: Super Admin, Tenant Admin, or Org Admin")
220
+ ] })
242
221
  })
243
- }) : A === "list" ? /* @__PURE__ */ p("div", {
222
+ }) : be === "list" ? /* @__PURE__ */ f("div", {
244
223
  className: "max-w-6xl mx-auto p-6",
245
224
  children: [
246
- Z,
247
- /* @__PURE__ */ p("div", {
225
+ Q,
226
+ /* @__PURE__ */ f("div", {
248
227
  className: "flex items-center justify-between mb-8",
249
- children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("h1", {
228
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h1", {
250
229
  className: "text-3xl font-semibold text-text-primary",
251
- children: _("auth.users.title", "Users")
252
- }), /* @__PURE__ */ p("p", {
230
+ children: v("auth.users.title", "Users")
231
+ }), /* @__PURE__ */ f("p", {
253
232
  className: "text-text-secondary mt-2",
254
233
  children: [
255
- _("auth.users.subtitle", "Manage users in your organization"),
234
+ v("auth.users.subtitle", "Manage users in your organization"),
256
235
  " (",
257
- k,
236
+ j,
258
237
  " ",
259
- _("auth.users.paginationUsers", "total"),
238
+ v("auth.users.paginationUsers", "total"),
260
239
  ")"
261
240
  ]
262
- })] }), /* @__PURE__ */ f("button", {
241
+ })] }), /* @__PURE__ */ d("button", {
263
242
  type: "button",
264
- onClick: () => void fe(),
265
- disabled: E,
266
- "aria-label": _("auth.users.exportAriaLabel", "Export user list"),
243
+ onClick: () => void k(),
244
+ disabled: D,
245
+ "aria-label": v("auth.users.exportAriaLabel", "Export user list"),
267
246
  className: "flex items-center gap-2 px-4 py-2.5 rounded-xl border border-border-default text-text-primary bg-bg-surface hover:bg-bg-sunken disabled:opacity-50 disabled:cursor-not-allowed transition-colors font-medium",
268
- children: E ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(n, {
247
+ children: D ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(n, {
269
248
  className: "size-4 animate-spin",
270
249
  "aria-hidden": "true"
271
- }), _("auth.users.exporting", "Exporting...")] }) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("svg", {
250
+ }), v("auth.users.exporting", "Exporting...")] }) : /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("svg", {
272
251
  className: "size-4",
273
252
  fill: "none",
274
253
  viewBox: "0 0 24 24",
275
254
  stroke: "currentColor",
276
255
  "aria-hidden": "true",
277
- children: /* @__PURE__ */ f("path", {
256
+ children: /* @__PURE__ */ d("path", {
278
257
  strokeLinecap: "round",
279
258
  strokeLinejoin: "round",
280
259
  strokeWidth: 2,
281
260
  d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
282
261
  })
283
- }), _("auth.users.export", "Export")] })
262
+ }), v("auth.users.export", "Export")] })
284
263
  })]
285
264
  }),
286
- /* @__PURE__ */ f("div", {
265
+ /* @__PURE__ */ d(oe, {
266
+ className: "mb-6",
267
+ children: v("auth.users.purpose", "Manage everyone with access to your organization. Search and filter accounts, review their role and status, edit details, or deactivate people who should no longer have access.")
268
+ }),
269
+ /* @__PURE__ */ f(ie, {
270
+ className: "mb-6",
271
+ children: [
272
+ /* @__PURE__ */ d("p", {
273
+ className: "text-sm font-medium text-text-secondary",
274
+ children: v("auth.users.summaryLabel", "People in this organization")
275
+ }),
276
+ /* @__PURE__ */ d("p", {
277
+ className: "mt-1 text-3xl font-semibold text-text-primary",
278
+ children: j
279
+ }),
280
+ /* @__PURE__ */ d("p", {
281
+ className: "mt-1 text-sm text-text-secondary",
282
+ children: v("auth.users.summaryHint", "Use the filters below to find a specific person or role.")
283
+ })
284
+ ]
285
+ }),
286
+ /* @__PURE__ */ d("div", {
287
287
  "aria-live": "polite",
288
288
  "aria-atomic": "true",
289
289
  className: "sr-only",
290
- children: z
290
+ children: B
291
291
  }),
292
- /* @__PURE__ */ f("div", {
292
+ /* @__PURE__ */ d("div", {
293
293
  role: "alert",
294
294
  "aria-live": "assertive",
295
295
  "aria-atomic": "true",
296
296
  className: "sr-only",
297
- children: I
297
+ children: L
298
298
  }),
299
- z && /* @__PURE__ */ p("output", {
300
- id: de,
299
+ B && /* @__PURE__ */ f("output", {
300
+ id: he,
301
301
  className: "block mb-6 p-4 rounded-xl bg-status-success-bg-subtle border border-status-success-border",
302
- children: [/* @__PURE__ */ f("p", {
302
+ children: [/* @__PURE__ */ d("p", {
303
303
  className: "text-status-success-text",
304
- children: z
305
- }), /* @__PURE__ */ f("button", {
304
+ children: B
305
+ }), /* @__PURE__ */ d("button", {
306
306
  type: "button",
307
- onClick: () => B(null),
307
+ onClick: () => V(null),
308
308
  className: "mt-2 text-sm text-status-success-text hover:underline",
309
- children: _("auth.users.dismiss", "Dismiss")
309
+ children: v("auth.users.dismiss", "Dismiss")
310
310
  })]
311
311
  }),
312
- I && /* @__PURE__ */ p("div", {
313
- id: T,
312
+ L && /* @__PURE__ */ f("div", {
313
+ id: E,
314
314
  role: "alert",
315
315
  className: "mb-6 flex items-start gap-3 p-4 rounded-xl bg-status-error-bg-subtle border border-status-error-border",
316
- children: [/* @__PURE__ */ f(t, {
316
+ children: [/* @__PURE__ */ d(t, {
317
317
  className: "size-5 text-status-error-text flex-shrink-0 mt-0.5",
318
318
  "aria-hidden": "true"
319
- }), /* @__PURE__ */ p("div", {
319
+ }), /* @__PURE__ */ f("div", {
320
320
  className: "flex-1",
321
- children: [/* @__PURE__ */ f("p", {
321
+ children: [/* @__PURE__ */ d("p", {
322
322
  className: "text-sm text-status-error-text",
323
- children: I
324
- }), /* @__PURE__ */ f("button", {
323
+ children: L
324
+ }), /* @__PURE__ */ d("button", {
325
325
  type: "button",
326
- onClick: () => L(null),
326
+ onClick: () => R(null),
327
327
  className: "mt-2 text-sm text-status-error-text hover:underline",
328
- children: _("auth.users.dismiss", "Dismiss")
328
+ children: v("auth.users.dismiss", "Dismiss")
329
329
  })]
330
330
  })]
331
331
  }),
332
- /* @__PURE__ */ f("div", {
332
+ /* @__PURE__ */ d("div", {
333
333
  className: "mb-6 p-4 rounded-xl border border-border-subtle bg-bg-surface",
334
- children: /* @__PURE__ */ p("div", {
334
+ children: /* @__PURE__ */ f("div", {
335
335
  className: "flex flex-wrap gap-4 items-end",
336
336
  children: [
337
- /* @__PURE__ */ p("div", {
337
+ /* @__PURE__ */ f("div", {
338
338
  className: "flex-1 min-w-[200px]",
339
- children: [/* @__PURE__ */ f("label", {
340
- htmlFor: S,
339
+ children: [/* @__PURE__ */ d("label", {
340
+ htmlFor: C,
341
341
  className: "sr-only",
342
- children: _("auth.users.searchLabel", "Search users")
343
- }), /* @__PURE__ */ f("input", {
344
- id: S,
342
+ children: v("auth.users.searchLabel", "Search users")
343
+ }), /* @__PURE__ */ d("input", {
344
+ id: C,
345
345
  type: "search",
346
- "aria-label": _("auth.users.searchLabel", "Search users"),
347
- placeholder: _("auth.users.searchPlaceholder", "Search by email, username, or name..."),
348
- value: U,
346
+ "aria-label": v("auth.users.searchLabel", "Search users"),
347
+ placeholder: v("auth.users.searchPlaceholder", "Search by email, username, or name..."),
348
+ value: W,
349
349
  onChange: (e) => {
350
- ve(e.target.value), q(0);
350
+ Se(e.target.value), J(0);
351
351
  },
352
352
  className: "w-full px-4 py-2.5 border border-border-default rounded-xl bg-bg-surface text-text-primary placeholder-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all"
353
353
  })]
354
354
  }),
355
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
356
- htmlFor: C,
355
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
356
+ htmlFor: w,
357
357
  className: "sr-only",
358
- children: _("auth.users.filterRoleLabel", "Filter by role")
359
- }), /* @__PURE__ */ p("select", {
360
- id: C,
361
- value: W,
358
+ children: v("auth.users.filterRoleLabel", "Filter by role")
359
+ }), /* @__PURE__ */ f("select", {
360
+ id: w,
361
+ value: G,
362
362
  onChange: (e) => {
363
- ye(e.target.value), q(0);
363
+ Ce(e.target.value), J(0);
364
364
  },
365
365
  className: "px-4 py-2.5 border border-border-default rounded-xl bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
366
- children: [/* @__PURE__ */ f("option", {
366
+ children: [/* @__PURE__ */ d("option", {
367
367
  value: "",
368
- children: _("auth.users.allRoles", "All Roles")
369
- }), m.map((e) => /* @__PURE__ */ f("option", {
368
+ children: v("auth.users.allRoles", "All Roles")
369
+ }), h.map((e) => /* @__PURE__ */ d("option", {
370
370
  value: e,
371
371
  children: e.replace("_", " ")
372
372
  }, e))]
373
373
  })] }),
374
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
375
- htmlFor: w,
374
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
375
+ htmlFor: T,
376
376
  className: "sr-only",
377
- children: _("auth.users.filterStatusLabel", "Filter by status")
378
- }), /* @__PURE__ */ p("select", {
379
- id: w,
380
- value: G,
377
+ children: v("auth.users.filterStatusLabel", "Filter by status")
378
+ }), /* @__PURE__ */ f("select", {
379
+ id: T,
380
+ value: K,
381
381
  onChange: (e) => {
382
- be(e.target.value), q(0);
382
+ we(e.target.value), J(0);
383
383
  },
384
384
  className: "px-4 py-2.5 border border-border-default rounded-xl bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
385
- children: [/* @__PURE__ */ f("option", {
385
+ children: [/* @__PURE__ */ d("option", {
386
386
  value: "",
387
- children: _("auth.users.allStatuses", "All Statuses")
388
- }), h.map((e) => /* @__PURE__ */ f("option", {
387
+ children: v("auth.users.allStatuses", "All Statuses")
388
+ }), g.map((e) => /* @__PURE__ */ d("option", {
389
389
  value: e,
390
390
  children: e
391
391
  }, e))]
@@ -393,613 +393,621 @@ function g() {
393
393
  ]
394
394
  })
395
395
  }),
396
- x ? /* @__PURE__ */ p("div", {
396
+ S ? /* @__PURE__ */ f("div", {
397
397
  "aria-live": "polite",
398
398
  "aria-busy": "true",
399
399
  className: "flex items-center justify-center py-12",
400
- children: [/* @__PURE__ */ f(n, {
400
+ children: [/* @__PURE__ */ d(n, {
401
401
  className: "size-8 text-text-link animate-spin",
402
402
  "aria-hidden": "true"
403
- }), /* @__PURE__ */ f("span", {
403
+ }), /* @__PURE__ */ d("span", {
404
404
  className: "ml-3 text-text-secondary",
405
- children: _("auth.users.loadingUsers", "Loading users...")
406
- })]
407
- }) : O.length === 0 ? /* @__PURE__ */ p("div", {
408
- className: "text-center py-16 border-2 border-dashed border-border-subtle rounded-xl",
409
- children: [/* @__PURE__ */ f("div", {
410
- className: "size-16 mx-auto mb-4 rounded-full bg-bg-sunken flex items-center justify-center",
411
- children: /* @__PURE__ */ f("svg", {
412
- className: "size-8 text-text-tertiary",
413
- fill: "none",
414
- viewBox: "0 0 24 24",
415
- stroke: "currentColor",
416
- children: /* @__PURE__ */ f("path", {
417
- strokeLinecap: "round",
418
- strokeLinejoin: "round",
419
- strokeWidth: 1.5,
420
- d: "M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"
421
- })
422
- })
423
- }), /* @__PURE__ */ f("p", {
424
- className: "text-text-secondary",
425
- children: _("auth.users.noUsersFound", "No users found")
405
+ children: v("auth.users.loadingUsers", "Loading users...")
426
406
  })]
427
- }) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("div", {
428
- className: "rounded-xl border border-border-subtle bg-bg-surface overflow-hidden shadow-sm",
429
- children: /* @__PURE__ */ f("div", {
430
- className: "overflow-x-auto",
431
- children: /* @__PURE__ */ p("table", {
432
- className: "w-full min-w-[800px]",
433
- "aria-label": _("auth.users.tableAriaLabel", "Users table"),
434
- children: [/* @__PURE__ */ f("thead", { children: /* @__PURE__ */ p("tr", {
435
- className: "border-b border-border-subtle bg-bg-canvas",
436
- children: [
437
- /* @__PURE__ */ f("th", {
438
- scope: "col",
439
- className: "text-left p-4 text-sm font-medium text-text-secondary w-[280px]",
440
- children: _("auth.users.columnUser", "User")
441
- }),
442
- /* @__PURE__ */ f("th", {
443
- scope: "col",
444
- className: "text-left p-4 text-sm font-medium text-text-secondary w-[130px]",
445
- children: _("auth.users.columnRole", "Role")
446
- }),
447
- /* @__PURE__ */ f("th", {
448
- scope: "col",
449
- className: "text-left p-4 text-sm font-medium text-text-secondary w-[100px]",
450
- children: _("auth.users.columnStatus", "Status")
451
- }),
452
- /* @__PURE__ */ f("th", {
453
- scope: "col",
454
- className: "text-left p-4 text-sm font-medium text-text-secondary w-[80px]",
455
- children: _("auth.users.columnVerified", "Verified")
456
- }),
457
- /* @__PURE__ */ f("th", {
458
- scope: "col",
459
- className: "text-left p-4 text-sm font-medium text-text-secondary w-[100px]",
460
- children: _("auth.users.columnLastLogin", "Last Login")
461
- }),
462
- /* @__PURE__ */ f("th", {
463
- scope: "col",
464
- className: "text-right p-4 text-sm font-medium text-text-secondary w-[180px]",
465
- children: _("auth.users.columnActions", "Actions")
466
- })
467
- ]
468
- }) }), /* @__PURE__ */ f("tbody", { children: O.map((e) => /* @__PURE__ */ p("tr", {
469
- className: "border-b border-border-subtle last:border-b-0 hover:bg-bg-sunken/50 transition-colors",
470
- children: [
471
- /* @__PURE__ */ f("td", {
472
- className: "p-4",
473
- children: /* @__PURE__ */ p("div", {
474
- className: "flex items-center gap-3 min-w-0",
475
- children: [/* @__PURE__ */ f("div", {
476
- className: "auth-brand-badge flex size-10 shrink-0 items-center justify-center rounded-full font-medium",
477
- children: (e.name || e.username || e.email).charAt(0).toUpperCase()
478
- }), /* @__PURE__ */ p("div", {
479
- className: "min-w-0 flex-1",
480
- children: [/* @__PURE__ */ f("p", {
481
- className: "font-medium text-text-primary truncate",
482
- children: e.name || e.username
483
- }), /* @__PURE__ */ f("p", {
484
- className: "text-sm text-text-secondary truncate",
485
- children: e.email
486
- })]
487
- })]
488
- })
489
- }),
490
- /* @__PURE__ */ f("td", {
491
- className: "p-4",
492
- children: /* @__PURE__ */ f("span", {
493
- className: `inline-block px-2.5 py-1 rounded-full text-xs font-medium whitespace-nowrap ${Q(e.role)}`,
494
- children: e.role.replace("_", " ")
495
- })
496
- }),
497
- /* @__PURE__ */ f("td", {
498
- className: "p-4",
499
- children: /* @__PURE__ */ f("span", {
500
- className: `inline-block px-2.5 py-1 rounded-full text-xs font-medium whitespace-nowrap ${$(e.status)}`,
501
- children: e.status
502
- })
503
- }),
504
- /* @__PURE__ */ f("td", {
505
- className: "p-4",
506
- children: e.emailVerified ? /* @__PURE__ */ p("span", {
507
- className: "inline-flex items-center gap-1 text-status-success-text whitespace-nowrap",
508
- children: [/* @__PURE__ */ f("svg", {
509
- className: "size-4 flex-shrink-0",
510
- fill: "currentColor",
511
- viewBox: "0 0 20 20",
512
- children: /* @__PURE__ */ f("path", {
513
- fillRule: "evenodd",
514
- d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
515
- clipRule: "evenodd"
516
- })
517
- }), /* @__PURE__ */ f("span", {
518
- className: "text-sm",
519
- children: _("auth.users.verifiedYes", "Yes")
520
- })]
521
- }) : /* @__PURE__ */ p("span", {
522
- className: "inline-flex items-center gap-1 text-status-warning-text whitespace-nowrap",
523
- children: [/* @__PURE__ */ f("svg", {
524
- className: "size-4 flex-shrink-0",
525
- fill: "currentColor",
526
- viewBox: "0 0 20 20",
527
- children: /* @__PURE__ */ f("path", {
528
- fillRule: "evenodd",
529
- d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",
530
- clipRule: "evenodd"
531
- })
532
- }), /* @__PURE__ */ f("span", {
533
- className: "text-sm",
534
- children: _("auth.users.verifiedNo", "No")
535
- })]
407
+ }) : A.length === 0 ? /* @__PURE__ */ d(m, {
408
+ illustration: W || G || K ? "empty-search" : "empty-people",
409
+ title: v("auth.users.noUsersFound", "No users found"),
410
+ description: W || G || K ? v("auth.users.noUsersFilteredDesc", "No users match your current search or filters. Try clearing them to see everyone.") : v("auth.users.noUsersDesc", "Once people join your organization they'll show up here for you to manage.")
411
+ }) : /* @__PURE__ */ f(u, { children: [
412
+ /* @__PURE__ */ d("div", {
413
+ className: "rounded-xl border border-border-subtle bg-bg-surface overflow-hidden shadow-sm",
414
+ children: /* @__PURE__ */ d("div", {
415
+ className: "overflow-x-auto",
416
+ children: /* @__PURE__ */ f("table", {
417
+ className: "w-full min-w-[800px]",
418
+ "aria-label": v("auth.users.tableAriaLabel", "Users table"),
419
+ children: [/* @__PURE__ */ d("thead", { children: /* @__PURE__ */ f("tr", {
420
+ className: "border-b border-border-subtle bg-bg-canvas",
421
+ children: [
422
+ /* @__PURE__ */ d("th", {
423
+ scope: "col",
424
+ className: "text-left p-4 text-sm font-medium text-text-secondary w-[280px]",
425
+ children: v("auth.users.columnUser", "User")
426
+ }),
427
+ /* @__PURE__ */ d("th", {
428
+ scope: "col",
429
+ className: "text-left p-4 text-sm font-medium text-text-secondary w-[130px]",
430
+ children: v("auth.users.columnRole", "Role")
431
+ }),
432
+ /* @__PURE__ */ d("th", {
433
+ scope: "col",
434
+ className: "text-left p-4 text-sm font-medium text-text-secondary w-[100px]",
435
+ children: v("auth.users.columnStatus", "Status")
436
+ }),
437
+ /* @__PURE__ */ d("th", {
438
+ scope: "col",
439
+ className: "text-left p-4 text-sm font-medium text-text-secondary w-[80px]",
440
+ children: v("auth.users.columnVerified", "Verified")
441
+ }),
442
+ /* @__PURE__ */ d("th", {
443
+ scope: "col",
444
+ className: "text-left p-4 text-sm font-medium text-text-secondary w-[100px]",
445
+ children: v("auth.users.columnLastLogin", "Last Login")
446
+ }),
447
+ /* @__PURE__ */ d("th", {
448
+ scope: "col",
449
+ className: "text-right p-4 text-sm font-medium text-text-secondary w-[180px]",
450
+ children: v("auth.users.columnActions", "Actions")
536
451
  })
537
- }),
538
- /* @__PURE__ */ f("td", {
539
- className: "p-4 text-sm text-text-secondary whitespace-nowrap",
540
- children: e.lastLoginAt ? new Date(e.lastLoginAt).toLocaleDateString() : _("auth.users.lastLoginNever", "Never")
541
- }),
542
- /* @__PURE__ */ f("td", {
543
- className: "p-4",
544
- children: /* @__PURE__ */ p("div", {
545
- className: "flex justify-end gap-1.5 flex-nowrap",
546
- children: [
547
- /* @__PURE__ */ f("button", {
548
- type: "button",
549
- onClick: () => g(`/auth/users/${e.id}`),
550
- "aria-label": `${_("auth.users.actionView", "View")} ${e.name || e.username || e.email}`,
551
- className: "px-2.5 py-1.5 rounded-lg text-xs font-medium border border-border-default text-text-primary bg-bg-surface hover:bg-bg-sunken transition-colors whitespace-nowrap flex-shrink-0",
552
- children: _("auth.users.actionView", "View")
553
- }),
554
- oe && /* @__PURE__ */ f("button", {
555
- type: "button",
556
- onClick: () => X(e),
557
- "aria-label": `${_("auth.users.actionEdit", "Edit")} ${e.name || e.username || e.email}`,
558
- className: "px-2.5 py-1.5 rounded-lg text-xs font-medium border border-status-info-border text-text-link bg-bg-surface hover:bg-status-info-bg-subtle transition-colors whitespace-nowrap flex-shrink-0",
559
- children: _("auth.users.actionEdit", "Edit")
560
- }),
561
- y && e.status !== "DELETED" && /* @__PURE__ */ f("button", {
562
- type: "button",
563
- onClick: () => H({
564
- type: "deactivate",
565
- user: e
452
+ ]
453
+ }) }), /* @__PURE__ */ d("tbody", { children: A.map((e) => /* @__PURE__ */ f("tr", {
454
+ className: "border-b border-border-subtle last:border-b-0 hover:bg-bg-sunken/50 transition-colors",
455
+ children: [
456
+ /* @__PURE__ */ d("td", {
457
+ className: "p-4",
458
+ children: /* @__PURE__ */ f("div", {
459
+ className: "flex items-center gap-3 min-w-0",
460
+ children: [/* @__PURE__ */ d("div", {
461
+ className: "auth-brand-badge flex size-10 shrink-0 items-center justify-center rounded-full font-medium",
462
+ children: (e.name || e.username || e.email).charAt(0).toUpperCase()
463
+ }), /* @__PURE__ */ f("div", {
464
+ className: "min-w-0 flex-1",
465
+ children: [/* @__PURE__ */ d("p", {
466
+ className: "font-medium text-text-primary truncate",
467
+ children: e.name || e.username
468
+ }), /* @__PURE__ */ d("p", {
469
+ className: "text-sm text-text-secondary truncate",
470
+ children: e.email
471
+ })]
472
+ })]
473
+ })
474
+ }),
475
+ /* @__PURE__ */ d("td", {
476
+ className: "p-4",
477
+ children: /* @__PURE__ */ d("span", {
478
+ className: `inline-block px-2.5 py-1 rounded-full text-xs font-medium whitespace-nowrap ${Oe(e.role)}`,
479
+ children: e.role.replace("_", " ")
480
+ })
481
+ }),
482
+ /* @__PURE__ */ d("td", {
483
+ className: "p-4",
484
+ children: /* @__PURE__ */ d("span", {
485
+ className: `inline-block px-2.5 py-1 rounded-full text-xs font-medium whitespace-nowrap ${$(e.status)}`,
486
+ children: e.status
487
+ })
488
+ }),
489
+ /* @__PURE__ */ d("td", {
490
+ className: "p-4",
491
+ children: e.emailVerified ? /* @__PURE__ */ f("span", {
492
+ className: "inline-flex items-center gap-1 text-status-success-text whitespace-nowrap",
493
+ children: [/* @__PURE__ */ d("svg", {
494
+ className: "size-4 flex-shrink-0",
495
+ fill: "currentColor",
496
+ viewBox: "0 0 20 20",
497
+ children: /* @__PURE__ */ d("path", {
498
+ fillRule: "evenodd",
499
+ d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
500
+ clipRule: "evenodd"
501
+ })
502
+ }), /* @__PURE__ */ d("span", {
503
+ className: "text-sm",
504
+ children: v("auth.users.verifiedYes", "Yes")
505
+ })]
506
+ }) : /* @__PURE__ */ f("span", {
507
+ className: "inline-flex items-center gap-1 text-status-warning-text whitespace-nowrap",
508
+ children: [/* @__PURE__ */ d("svg", {
509
+ className: "size-4 flex-shrink-0",
510
+ fill: "currentColor",
511
+ viewBox: "0 0 20 20",
512
+ children: /* @__PURE__ */ d("path", {
513
+ fillRule: "evenodd",
514
+ d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",
515
+ clipRule: "evenodd"
516
+ })
517
+ }), /* @__PURE__ */ d("span", {
518
+ className: "text-sm",
519
+ children: v("auth.users.verifiedNo", "No")
520
+ })]
521
+ })
522
+ }),
523
+ /* @__PURE__ */ d("td", {
524
+ className: "p-4 text-sm text-text-secondary whitespace-nowrap",
525
+ children: e.lastLoginAt ? new Date(e.lastLoginAt).toLocaleDateString() : v("auth.users.lastLoginNever", "Never")
526
+ }),
527
+ /* @__PURE__ */ d("td", {
528
+ className: "p-4",
529
+ children: /* @__PURE__ */ f("div", {
530
+ className: "flex justify-end gap-1.5 flex-nowrap",
531
+ children: [
532
+ /* @__PURE__ */ d("button", {
533
+ type: "button",
534
+ onClick: () => _(`/auth/users/${e.id}`),
535
+ "aria-label": `${v("auth.users.actionView", "View")} ${e.name || e.username || e.email}`,
536
+ className: "px-2.5 py-1.5 rounded-lg text-xs font-medium border border-border-default text-text-primary bg-bg-surface hover:bg-bg-sunken transition-colors whitespace-nowrap flex-shrink-0",
537
+ children: v("auth.users.actionView", "View")
538
+ }),
539
+ ue && /* @__PURE__ */ d("button", {
540
+ type: "button",
541
+ onClick: () => Z(e),
542
+ "aria-label": `${v("auth.users.actionEdit", "Edit")} ${e.name || e.username || e.email}`,
543
+ className: "px-2.5 py-1.5 rounded-lg text-xs font-medium border border-status-info-border text-text-link bg-bg-surface hover:bg-status-info-bg-subtle transition-colors whitespace-nowrap flex-shrink-0",
544
+ children: v("auth.users.actionEdit", "Edit")
566
545
  }),
567
- "aria-label": `${_("auth.users.actionDelete", "Delete")} ${e.name || e.username || e.email}`,
568
- className: "px-2.5 py-1.5 rounded-lg text-xs font-medium border border-status-error-border text-status-error-text bg-bg-surface hover:bg-status-error-bg-subtle transition-colors whitespace-nowrap flex-shrink-0",
569
- children: _("auth.users.actionDelete", "Delete")
570
- })
571
- ]
546
+ b && e.status !== "DELETED" && /* @__PURE__ */ d("button", {
547
+ type: "button",
548
+ onClick: () => U({
549
+ type: "deactivate",
550
+ user: e
551
+ }),
552
+ "aria-label": `${v("auth.users.actionDelete", "Delete")} ${e.name || e.username || e.email}`,
553
+ className: "px-2.5 py-1.5 rounded-lg text-xs font-medium border border-status-error-border text-status-error-text bg-bg-surface hover:bg-status-error-bg-subtle transition-colors whitespace-nowrap flex-shrink-0",
554
+ children: v("auth.users.actionDelete", "Delete")
555
+ })
556
+ ]
557
+ })
572
558
  })
573
- })
574
- ]
575
- }, e.id)) })]
559
+ ]
560
+ }, e.id)) })]
561
+ })
576
562
  })
563
+ }),
564
+ /* @__PURE__ */ f("div", {
565
+ className: "mt-6 flex items-center justify-between",
566
+ children: [/* @__PURE__ */ f("p", {
567
+ className: "text-sm text-text-secondary",
568
+ children: [
569
+ v("auth.users.showing", "Showing"),
570
+ " ",
571
+ q * 10 + 1,
572
+ " ",
573
+ v("auth.users.to", "to"),
574
+ " ",
575
+ Math.min((q + 1) * 10, j),
576
+ " ",
577
+ v("auth.users.of", "of"),
578
+ " ",
579
+ j,
580
+ " ",
581
+ v("auth.users.paginationUsers", "users")
582
+ ]
583
+ }), /* @__PURE__ */ d("nav", {
584
+ "aria-label": v("auth.users.paginationAriaLabel", "User list pagination"),
585
+ children: /* @__PURE__ */ f("div", {
586
+ className: "flex gap-2",
587
+ children: [/* @__PURE__ */ d("button", {
588
+ type: "button",
589
+ onClick: () => J((e) => Math.max(0, e - 1)),
590
+ disabled: q === 0,
591
+ "aria-label": v("auth.users.previousPageAriaLabel", "Go to previous page"),
592
+ className: "px-4 py-2 rounded-lg border border-border-default text-text-primary bg-bg-surface disabled:opacity-50 disabled:cursor-not-allowed hover:bg-bg-sunken transition-colors",
593
+ children: v("auth.users.previousPage", "Previous")
594
+ }), /* @__PURE__ */ d("button", {
595
+ type: "button",
596
+ onClick: () => J((e) => e + 1),
597
+ disabled: !ve,
598
+ "aria-label": v("auth.users.nextPageAriaLabel", "Go to next page"),
599
+ className: "px-4 py-2 rounded-lg border border-border-default text-text-primary bg-bg-surface disabled:opacity-50 disabled:cursor-not-allowed hover:bg-bg-sunken transition-colors",
600
+ children: v("auth.users.nextPage", "Next")
601
+ })]
602
+ })
603
+ })]
604
+ }),
605
+ /* @__PURE__ */ d(ae, {
606
+ className: "mt-8",
607
+ storageKey: "auth-users",
608
+ steps: [{
609
+ id: "search-user",
610
+ label: v("auth.users.nextSearch", "Find a specific person"),
611
+ description: v("auth.users.nextSearchDesc", "Use the search and role / status filters above to narrow the list."),
612
+ onClick: () => {
613
+ let e = document.getElementById(C);
614
+ e instanceof HTMLInputElement && e.focus();
615
+ }
616
+ }, {
617
+ id: "export-users",
618
+ label: v("auth.users.nextExport", "Export the user list"),
619
+ description: v("auth.users.nextExportDesc", "Download a CSV of users matching your current filters."),
620
+ onClick: () => void k()
621
+ }]
577
622
  })
578
- }), /* @__PURE__ */ p("div", {
579
- className: "mt-6 flex items-center justify-between",
580
- children: [/* @__PURE__ */ p("p", {
581
- className: "text-sm text-text-secondary",
582
- children: [
583
- _("auth.users.showing", "Showing"),
584
- " ",
585
- K * 10 + 1,
586
- " ",
587
- _("auth.users.to", "to"),
588
- " ",
589
- Math.min((K + 1) * 10, k),
590
- " ",
591
- _("auth.users.of", "of"),
592
- " ",
593
- k,
594
- " ",
595
- _("auth.users.paginationUsers", "users")
596
- ]
597
- }), /* @__PURE__ */ f("nav", {
598
- "aria-label": _("auth.users.paginationAriaLabel", "User list pagination"),
599
- children: /* @__PURE__ */ p("div", {
600
- className: "flex gap-2",
601
- children: [/* @__PURE__ */ f("button", {
602
- type: "button",
603
- onClick: () => q((e) => Math.max(0, e - 1)),
604
- disabled: K === 0,
605
- "aria-label": _("auth.users.previousPageAriaLabel", "Go to previous page"),
606
- className: "px-4 py-2 rounded-lg border border-border-default text-text-primary bg-bg-surface disabled:opacity-50 disabled:cursor-not-allowed hover:bg-bg-sunken transition-colors",
607
- children: _("auth.users.previousPage", "Previous")
608
- }), /* @__PURE__ */ f("button", {
609
- type: "button",
610
- onClick: () => q((e) => e + 1),
611
- disabled: !he,
612
- "aria-label": _("auth.users.nextPageAriaLabel", "Go to next page"),
613
- className: "px-4 py-2 rounded-lg border border-border-default text-text-primary bg-bg-surface disabled:opacity-50 disabled:cursor-not-allowed hover:bg-bg-sunken transition-colors",
614
- children: _("auth.users.nextPage", "Next")
615
- })]
616
- })
617
- })]
618
- })] })
623
+ ] })
619
624
  ]
620
- }) : A === "view" && M ? /* @__PURE__ */ p("div", {
625
+ }) : be === "view" && N ? /* @__PURE__ */ f("div", {
621
626
  className: "max-w-4xl mx-auto p-6",
622
627
  children: [
623
- Z,
624
- /* @__PURE__ */ p("button", {
628
+ Q,
629
+ /* @__PURE__ */ f("button", {
625
630
  type: "button",
626
631
  onClick: () => {
627
- j("list"), Y();
632
+ M("list"), X();
628
633
  },
629
634
  className: "mb-6 flex items-center gap-2 text-text-link hover:underline font-medium",
630
- children: [/* @__PURE__ */ f("svg", {
635
+ children: [/* @__PURE__ */ d("svg", {
631
636
  className: "size-4",
632
637
  fill: "none",
633
638
  viewBox: "0 0 24 24",
634
639
  stroke: "currentColor",
635
- children: /* @__PURE__ */ f("path", {
640
+ children: /* @__PURE__ */ d("path", {
636
641
  strokeLinecap: "round",
637
642
  strokeLinejoin: "round",
638
643
  strokeWidth: 2,
639
644
  d: "M10 19l-7-7m0 0l7-7m-7 7h18"
640
645
  })
641
- }), _("auth.users.backToUsers", "Back to Users")]
646
+ }), v("auth.users.backToUsers", "Back to Users")]
642
647
  }),
643
- /* @__PURE__ */ p("div", {
648
+ /* @__PURE__ */ f("div", {
644
649
  className: "p-6 rounded-xl border border-border-subtle bg-bg-surface shadow-sm",
645
650
  children: [
646
- /* @__PURE__ */ p("div", {
651
+ /* @__PURE__ */ f("div", {
647
652
  className: "flex items-center gap-4 mb-8",
648
- children: [/* @__PURE__ */ f("div", {
653
+ children: [/* @__PURE__ */ d("div", {
649
654
  className: "auth-brand-badge flex size-20 items-center justify-center rounded-full text-3xl font-semibold",
650
- children: (M.name || M.username || M.email).charAt(0).toUpperCase()
651
- }), /* @__PURE__ */ p("div", { children: [
652
- /* @__PURE__ */ f("h1", {
655
+ children: (N.name || N.username || N.email).charAt(0).toUpperCase()
656
+ }), /* @__PURE__ */ f("div", { children: [
657
+ /* @__PURE__ */ d("h1", {
653
658
  className: "text-2xl font-semibold text-text-primary",
654
- children: M.name || M.username
659
+ children: N.name || N.username
655
660
  }),
656
- /* @__PURE__ */ f("p", {
661
+ /* @__PURE__ */ d("p", {
657
662
  className: "text-text-secondary",
658
- children: M.email
663
+ children: N.email
659
664
  }),
660
- /* @__PURE__ */ p("div", {
665
+ /* @__PURE__ */ f("div", {
661
666
  className: "flex items-center gap-2 mt-2",
662
- children: [/* @__PURE__ */ f("span", {
663
- className: `px-2.5 py-1 rounded-full text-xs font-medium ${Q(M.role)}`,
664
- children: M.role.replace("_", " ")
665
- }), /* @__PURE__ */ f("span", {
666
- className: `px-2.5 py-1 rounded-full text-xs font-medium ${$(M.status)}`,
667
- children: M.status
667
+ children: [/* @__PURE__ */ d("span", {
668
+ className: `px-2.5 py-1 rounded-full text-xs font-medium ${Oe(N.role)}`,
669
+ children: N.role.replace("_", " ")
670
+ }), /* @__PURE__ */ d("span", {
671
+ className: `px-2.5 py-1 rounded-full text-xs font-medium ${$(N.status)}`,
672
+ children: N.status
668
673
  })]
669
674
  })
670
675
  ] })]
671
676
  }),
672
- /* @__PURE__ */ p("div", {
677
+ /* @__PURE__ */ f("div", {
673
678
  className: "grid grid-cols-2 gap-6",
674
679
  children: [
675
- /* @__PURE__ */ p("div", {
680
+ /* @__PURE__ */ f("div", {
676
681
  className: "p-4 rounded-lg bg-bg-canvas/50",
677
- children: [/* @__PURE__ */ f("label", {
682
+ children: [/* @__PURE__ */ d("label", {
678
683
  className: "block text-sm font-medium text-text-secondary mb-1",
679
- children: _("auth.users.viewDetailsUsername", "Username")
680
- }), /* @__PURE__ */ f("p", {
684
+ children: v("auth.users.viewDetailsUsername", "Username")
685
+ }), /* @__PURE__ */ d("p", {
681
686
  className: "text-text-primary font-medium",
682
- children: M.username
687
+ children: N.username
683
688
  })]
684
689
  }),
685
- /* @__PURE__ */ p("div", {
690
+ /* @__PURE__ */ f("div", {
686
691
  className: "p-4 rounded-lg bg-bg-canvas/50",
687
- children: [/* @__PURE__ */ f("label", {
692
+ children: [/* @__PURE__ */ d("label", {
688
693
  className: "block text-sm font-medium text-text-secondary mb-1",
689
- children: _("auth.users.viewDetailsEmail", "Email")
690
- }), /* @__PURE__ */ f("p", {
694
+ children: v("auth.users.viewDetailsEmail", "Email")
695
+ }), /* @__PURE__ */ d("p", {
691
696
  className: "text-text-primary font-medium",
692
- children: M.email
697
+ children: N.email
693
698
  })]
694
699
  }),
695
- /* @__PURE__ */ p("div", {
700
+ /* @__PURE__ */ f("div", {
696
701
  className: "p-4 rounded-lg bg-bg-canvas/50",
697
- children: [/* @__PURE__ */ f("label", {
702
+ children: [/* @__PURE__ */ d("label", {
698
703
  className: "block text-sm font-medium text-text-secondary mb-1",
699
- children: _("auth.users.viewDetailsEmailVerified", "Email Verified")
700
- }), /* @__PURE__ */ f("p", {
704
+ children: v("auth.users.viewDetailsEmailVerified", "Email Verified")
705
+ }), /* @__PURE__ */ d("p", {
701
706
  className: "text-text-primary font-medium",
702
- children: M.emailVerified ? /* @__PURE__ */ f("span", {
707
+ children: N.emailVerified ? /* @__PURE__ */ d("span", {
703
708
  className: "text-status-success-text",
704
- children: _("auth.users.verifiedYes", "Yes")
705
- }) : /* @__PURE__ */ f("span", {
709
+ children: v("auth.users.verifiedYes", "Yes")
710
+ }) : /* @__PURE__ */ d("span", {
706
711
  className: "text-status-warning-text",
707
- children: _("auth.users.verifiedNo", "No")
712
+ children: v("auth.users.verifiedNo", "No")
708
713
  })
709
714
  })]
710
715
  }),
711
- /* @__PURE__ */ p("div", {
716
+ /* @__PURE__ */ f("div", {
712
717
  className: "p-4 rounded-lg bg-bg-canvas/50",
713
- children: [/* @__PURE__ */ f("label", {
718
+ children: [/* @__PURE__ */ d("label", {
714
719
  className: "block text-sm font-medium text-text-secondary mb-1",
715
- children: _("auth.users.viewDetailsMfaEnabled", "MFA Enabled")
716
- }), /* @__PURE__ */ f("p", {
720
+ children: v("auth.users.viewDetailsMfaEnabled", "MFA Enabled")
721
+ }), /* @__PURE__ */ d("p", {
717
722
  className: "text-text-primary font-medium",
718
- children: M.mfaEnabled ? /* @__PURE__ */ f("span", {
723
+ children: N.mfaEnabled ? /* @__PURE__ */ d("span", {
719
724
  className: "text-status-success-text",
720
- children: _("auth.users.verifiedYes", "Yes")
721
- }) : /* @__PURE__ */ f("span", {
725
+ children: v("auth.users.verifiedYes", "Yes")
726
+ }) : /* @__PURE__ */ d("span", {
722
727
  className: "text-text-secondary",
723
- children: _("auth.users.verifiedNo", "No")
728
+ children: v("auth.users.verifiedNo", "No")
724
729
  })
725
730
  })]
726
731
  }),
727
- M.phoneNumber && /* @__PURE__ */ p("div", {
732
+ N.phoneNumber && /* @__PURE__ */ f("div", {
728
733
  className: "p-4 rounded-lg bg-bg-canvas/50",
729
- children: [/* @__PURE__ */ f("label", {
734
+ children: [/* @__PURE__ */ d("label", {
730
735
  className: "block text-sm font-medium text-text-secondary mb-1",
731
- children: _("auth.users.viewDetailsPhoneNumber", "Phone Number")
732
- }), /* @__PURE__ */ f("p", {
736
+ children: v("auth.users.viewDetailsPhoneNumber", "Phone Number")
737
+ }), /* @__PURE__ */ d("p", {
733
738
  className: "text-text-primary font-medium",
734
- children: M.phoneNumber
739
+ children: N.phoneNumber
735
740
  })]
736
741
  }),
737
- /* @__PURE__ */ p("div", {
742
+ /* @__PURE__ */ f("div", {
738
743
  className: "p-4 rounded-lg bg-bg-canvas/50",
739
- children: [/* @__PURE__ */ f("label", {
744
+ children: [/* @__PURE__ */ d("label", {
740
745
  className: "block text-sm font-medium text-text-secondary mb-1",
741
- children: _("auth.users.viewDetailsLastLogin", "Last Login")
742
- }), /* @__PURE__ */ f("p", {
746
+ children: v("auth.users.viewDetailsLastLogin", "Last Login")
747
+ }), /* @__PURE__ */ d("p", {
743
748
  className: "text-text-primary font-medium",
744
- children: M.lastLoginAt ? new Date(M.lastLoginAt).toLocaleString() : _("auth.users.lastLoginNever", "Never")
749
+ children: N.lastLoginAt ? new Date(N.lastLoginAt).toLocaleString() : v("auth.users.lastLoginNever", "Never")
745
750
  })]
746
751
  }),
747
- /* @__PURE__ */ p("div", {
752
+ /* @__PURE__ */ f("div", {
748
753
  className: "p-4 rounded-lg bg-bg-canvas/50",
749
- children: [/* @__PURE__ */ f("label", {
754
+ children: [/* @__PURE__ */ d("label", {
750
755
  className: "block text-sm font-medium text-text-secondary mb-1",
751
- children: _("auth.users.viewDetailsCreated", "Created")
752
- }), /* @__PURE__ */ f("p", {
756
+ children: v("auth.users.viewDetailsCreated", "Created")
757
+ }), /* @__PURE__ */ d("p", {
753
758
  className: "text-text-primary font-medium",
754
- children: new Date(M.createdAt).toLocaleString()
759
+ children: new Date(N.createdAt).toLocaleString()
755
760
  })]
756
761
  }),
757
- /* @__PURE__ */ p("div", {
762
+ /* @__PURE__ */ f("div", {
758
763
  className: "p-4 rounded-lg bg-bg-canvas/50",
759
- children: [/* @__PURE__ */ f("label", {
764
+ children: [/* @__PURE__ */ d("label", {
760
765
  className: "block text-sm font-medium text-text-secondary mb-1",
761
- children: _("auth.users.viewDetailsLastUpdated", "Last Updated")
762
- }), /* @__PURE__ */ f("p", {
766
+ children: v("auth.users.viewDetailsLastUpdated", "Last Updated")
767
+ }), /* @__PURE__ */ d("p", {
763
768
  className: "text-text-primary font-medium",
764
- children: new Date(M.updatedAt).toLocaleString()
769
+ children: new Date(N.updatedAt).toLocaleString()
765
770
  })]
766
771
  })
767
772
  ]
768
773
  }),
769
- /* @__PURE__ */ p("div", {
774
+ /* @__PURE__ */ f("div", {
770
775
  className: "mt-8 pt-6 border-t border-border-subtle flex gap-3",
771
776
  children: [
772
- /* @__PURE__ */ f("button", {
777
+ /* @__PURE__ */ d(p, {
773
778
  type: "button",
774
- onClick: () => X(M),
775
- className: "auth-primary-button px-4 py-2.5 font-medium",
776
- children: _("auth.users.editUser", "Edit User")
779
+ onClick: () => Z(N),
780
+ variant: "default",
781
+ className: "font-semibold",
782
+ children: v("auth.users.editUser", "Edit User")
777
783
  }),
778
- M.status !== "DELETED" && /* @__PURE__ */ f("button", {
784
+ N.status !== "DELETED" && /* @__PURE__ */ d("button", {
779
785
  type: "button",
780
- onClick: () => H({
786
+ onClick: () => U({
781
787
  type: "deactivate",
782
- user: M
788
+ user: N
783
789
  }),
784
790
  className: "px-4 py-2.5 rounded-xl border border-status-error-border text-status-error-text font-medium hover:bg-status-error-bg-subtle transition-colors",
785
- children: _("auth.users.deleteUser", "Delete User")
791
+ children: v("auth.users.deleteUser", "Delete User")
786
792
  }),
787
- y && M.status === "DELETED" && ie?.role === "SUPER_ADMIN" && /* @__PURE__ */ f("button", {
793
+ b && N.status === "DELETED" && ce?.role === "SUPER_ADMIN" && /* @__PURE__ */ d("button", {
788
794
  type: "button",
789
- onClick: () => H({
795
+ onClick: () => U({
790
796
  type: "hard-delete",
791
- user: M
797
+ user: N
792
798
  }),
793
799
  className: "px-4 py-2.5 rounded-xl bg-status-error-bg text-white font-medium hover:bg-status-error-bg-hover transition-colors",
794
- children: _("auth.users.permanentlyDelete", "Permanently Delete")
800
+ children: v("auth.users.permanentlyDelete", "Permanently Delete")
795
801
  })
796
802
  ]
797
803
  })
798
804
  ]
799
805
  })
800
806
  ]
801
- }) : /* @__PURE__ */ p("div", {
807
+ }) : /* @__PURE__ */ f("div", {
802
808
  className: "max-w-2xl mx-auto p-6",
803
809
  children: [
804
- Z,
805
- /* @__PURE__ */ p("button", {
810
+ Q,
811
+ /* @__PURE__ */ f("button", {
806
812
  type: "button",
807
813
  onClick: () => {
808
- j("list"), Y();
814
+ M("list"), X();
809
815
  },
810
816
  className: "mb-6 flex items-center gap-2 text-text-link hover:underline font-medium",
811
- children: [/* @__PURE__ */ f("svg", {
817
+ children: [/* @__PURE__ */ d("svg", {
812
818
  className: "size-4",
813
819
  fill: "none",
814
820
  viewBox: "0 0 24 24",
815
821
  stroke: "currentColor",
816
- children: /* @__PURE__ */ f("path", {
822
+ children: /* @__PURE__ */ d("path", {
817
823
  strokeLinecap: "round",
818
824
  strokeLinejoin: "round",
819
825
  strokeWidth: 2,
820
826
  d: "M10 19l-7-7m0 0l7-7m-7 7h18"
821
827
  })
822
- }), _("auth.users.backToUsers", "Back to Users")]
828
+ }), v("auth.users.backToUsers", "Back to Users")]
823
829
  }),
824
- /* @__PURE__ */ p("div", {
830
+ /* @__PURE__ */ f("div", {
825
831
  className: "p-6 rounded-xl border border-border-subtle bg-bg-surface shadow-sm",
826
832
  children: [
827
- /* @__PURE__ */ f("h1", {
833
+ /* @__PURE__ */ d("h1", {
828
834
  className: "text-2xl font-semibold text-text-primary mb-2",
829
- children: _("auth.users.editUser", "Edit User")
835
+ children: v("auth.users.editUser", "Edit User")
830
836
  }),
831
- M && /* @__PURE__ */ p("p", {
837
+ N && /* @__PURE__ */ f("p", {
832
838
  className: "text-text-secondary mb-6",
833
839
  children: [
834
- _("auth.users.editingUser", "Editing:"),
840
+ v("auth.users.editingUser", "Editing:"),
835
841
  " ",
836
- /* @__PURE__ */ f("strong", { children: M.email })
842
+ /* @__PURE__ */ d("strong", { children: N.email })
837
843
  ]
838
844
  }),
839
- I && /* @__PURE__ */ p("div", {
845
+ L && /* @__PURE__ */ f("div", {
840
846
  className: "mb-6 flex items-start gap-3 p-4 rounded-xl bg-status-error-bg-subtle border border-status-error-border",
841
- children: [/* @__PURE__ */ f(t, { className: "size-5 text-status-error-text flex-shrink-0 mt-0.5" }), /* @__PURE__ */ f("div", {
847
+ children: [/* @__PURE__ */ d(t, { className: "size-5 text-status-error-text flex-shrink-0 mt-0.5" }), /* @__PURE__ */ d("div", {
842
848
  className: "flex-1",
843
- children: /* @__PURE__ */ f("p", {
849
+ children: /* @__PURE__ */ d("p", {
844
850
  className: "text-sm text-status-error-text",
845
- children: I
851
+ children: L
846
852
  })
847
853
  })]
848
854
  }),
849
- /* @__PURE__ */ p("form", {
850
- onSubmit: xe,
855
+ /* @__PURE__ */ f("form", {
856
+ onSubmit: Te,
851
857
  className: "space-y-6",
852
- "aria-describedby": I ? T : void 0,
858
+ "aria-describedby": L ? E : void 0,
853
859
  noValidate: !0,
854
860
  children: [
855
- /* @__PURE__ */ p("div", {
861
+ /* @__PURE__ */ f("div", {
856
862
  className: "grid grid-cols-2 gap-4",
857
- children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
863
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
858
864
  htmlFor: "edit-username",
859
865
  className: "block text-sm font-medium text-text-primary mb-2",
860
- children: _("auth.users.fieldUsername", "Username")
861
- }), /* @__PURE__ */ f("input", {
866
+ children: v("auth.users.fieldUsername", "Username")
867
+ }), /* @__PURE__ */ d("input", {
862
868
  id: "edit-username",
863
869
  type: "text",
864
- "aria-label": _("auth.users.fieldUsername", "Username"),
865
- value: P.username,
866
- onChange: (e) => F({
867
- ...P,
870
+ "aria-label": v("auth.users.fieldUsername", "Username"),
871
+ value: F.username,
872
+ onChange: (e) => I({
873
+ ...F,
868
874
  username: e.target.value
869
875
  }),
870
876
  className: "block w-full px-4 py-3 border border-border-default rounded-xl bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all"
871
- })] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
877
+ })] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
872
878
  htmlFor: "edit-name",
873
879
  className: "block text-sm font-medium text-text-primary mb-2",
874
- children: _("auth.users.fieldName", "Name")
875
- }), /* @__PURE__ */ f("input", {
880
+ children: v("auth.users.fieldName", "Name")
881
+ }), /* @__PURE__ */ d("input", {
876
882
  id: "edit-name",
877
883
  type: "text",
878
- "aria-label": _("auth.users.fieldName", "Name"),
879
- value: P.name,
880
- onChange: (e) => F({
881
- ...P,
884
+ "aria-label": v("auth.users.fieldName", "Name"),
885
+ value: F.name,
886
+ onChange: (e) => I({
887
+ ...F,
882
888
  name: e.target.value
883
889
  }),
884
890
  className: "block w-full px-4 py-3 border border-border-default rounded-xl bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all"
885
891
  })] })]
886
892
  }),
887
- /* @__PURE__ */ p("div", {
893
+ /* @__PURE__ */ f("div", {
888
894
  className: "grid grid-cols-2 gap-4",
889
- children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
895
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
890
896
  htmlFor: "edit-firstName",
891
897
  className: "block text-sm font-medium text-text-primary mb-2",
892
- children: _("auth.users.fieldFirstName", "First Name")
893
- }), /* @__PURE__ */ f("input", {
898
+ children: v("auth.users.fieldFirstName", "First Name")
899
+ }), /* @__PURE__ */ d("input", {
894
900
  id: "edit-firstName",
895
901
  type: "text",
896
- "aria-label": _("auth.users.fieldFirstName", "First Name"),
897
- value: P.firstName,
898
- onChange: (e) => F({
899
- ...P,
902
+ "aria-label": v("auth.users.fieldFirstName", "First Name"),
903
+ value: F.firstName,
904
+ onChange: (e) => I({
905
+ ...F,
900
906
  firstName: e.target.value
901
907
  }),
902
908
  className: "block w-full px-4 py-3 border border-border-default rounded-xl bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all"
903
- })] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
909
+ })] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
904
910
  htmlFor: "edit-lastName",
905
911
  className: "block text-sm font-medium text-text-primary mb-2",
906
- children: _("auth.users.fieldLastName", "Last Name")
907
- }), /* @__PURE__ */ f("input", {
912
+ children: v("auth.users.fieldLastName", "Last Name")
913
+ }), /* @__PURE__ */ d("input", {
908
914
  id: "edit-lastName",
909
915
  type: "text",
910
- "aria-label": _("auth.users.fieldLastName", "Last Name"),
911
- value: P.lastName,
912
- onChange: (e) => F({
913
- ...P,
916
+ "aria-label": v("auth.users.fieldLastName", "Last Name"),
917
+ value: F.lastName,
918
+ onChange: (e) => I({
919
+ ...F,
914
920
  lastName: e.target.value
915
921
  }),
916
922
  className: "block w-full px-4 py-3 border border-border-default rounded-xl bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all"
917
923
  })] })]
918
924
  }),
919
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
925
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
920
926
  htmlFor: "edit-phoneNumber",
921
927
  className: "block text-sm font-medium text-text-primary mb-2",
922
- children: _("auth.users.fieldPhoneNumber", "Phone Number")
923
- }), /* @__PURE__ */ f("input", {
928
+ children: v("auth.users.fieldPhoneNumber", "Phone Number")
929
+ }), /* @__PURE__ */ d("input", {
924
930
  id: "edit-phoneNumber",
925
931
  type: "tel",
926
- "aria-label": _("auth.users.fieldPhoneNumber", "Phone Number"),
927
- value: P.phoneNumber,
928
- onChange: (e) => F({
929
- ...P,
932
+ "aria-label": v("auth.users.fieldPhoneNumber", "Phone Number"),
933
+ value: F.phoneNumber,
934
+ onChange: (e) => I({
935
+ ...F,
930
936
  phoneNumber: e.target.value
931
937
  }),
932
938
  className: "block w-full px-4 py-3 border border-border-default rounded-xl bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all"
933
939
  })] }),
934
- /* @__PURE__ */ p("div", {
940
+ /* @__PURE__ */ f("div", {
935
941
  className: "grid grid-cols-2 gap-4",
936
- children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
942
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
937
943
  htmlFor: "edit-role",
938
944
  className: "block text-sm font-medium text-text-primary mb-2",
939
- children: _("auth.users.fieldRole", "Role")
940
- }), /* @__PURE__ */ f("select", {
945
+ children: v("auth.users.fieldRole", "Role")
946
+ }), /* @__PURE__ */ d("select", {
941
947
  id: "edit-role",
942
- "aria-label": _("auth.users.fieldRole", "Role"),
943
- value: P.role,
944
- onChange: (e) => F({
945
- ...P,
948
+ "aria-label": v("auth.users.fieldRole", "Role"),
949
+ value: F.role,
950
+ onChange: (e) => I({
951
+ ...F,
946
952
  role: e.target.value
947
953
  }),
948
954
  className: "block w-full px-4 py-3 border border-border-default rounded-xl bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
949
- children: m.map((e) => /* @__PURE__ */ f("option", {
955
+ children: h.map((e) => /* @__PURE__ */ d("option", {
950
956
  value: e,
951
957
  children: e.replace("_", " ")
952
958
  }, e))
953
- })] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
959
+ })] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
954
960
  htmlFor: "edit-status",
955
961
  className: "block text-sm font-medium text-text-primary mb-2",
956
- children: _("auth.users.fieldStatus", "Status")
957
- }), /* @__PURE__ */ f("select", {
962
+ children: v("auth.users.fieldStatus", "Status")
963
+ }), /* @__PURE__ */ d("select", {
958
964
  id: "edit-status",
959
- "aria-label": _("auth.users.fieldStatus", "Status"),
960
- value: P.status,
961
- onChange: (e) => F({
962
- ...P,
965
+ "aria-label": v("auth.users.fieldStatus", "Status"),
966
+ value: F.status,
967
+ onChange: (e) => I({
968
+ ...F,
963
969
  status: e.target.value
964
970
  }),
965
971
  className: "block w-full px-4 py-3 border border-border-default rounded-xl bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
966
- children: h.map((e) => /* @__PURE__ */ f("option", {
972
+ children: g.map((e) => /* @__PURE__ */ d("option", {
967
973
  value: e,
968
974
  children: e
969
975
  }, e))
970
976
  })] })]
971
977
  }),
972
- /* @__PURE__ */ p("div", {
978
+ /* @__PURE__ */ f("div", {
973
979
  className: "flex items-center gap-3 p-4 rounded-xl bg-bg-canvas/50",
974
- children: [/* @__PURE__ */ f("input", {
980
+ children: [/* @__PURE__ */ d("input", {
975
981
  type: "checkbox",
976
982
  id: "emailVerified",
977
- checked: P.emailVerified,
978
- onChange: (e) => F({
979
- ...P,
983
+ checked: F.emailVerified,
984
+ onChange: (e) => I({
985
+ ...F,
980
986
  emailVerified: e.target.checked
981
987
  }),
982
988
  className: "size-5 rounded border-border-default text-text-link focus:ring-action-primary-bg"
983
- }), /* @__PURE__ */ f("label", {
989
+ }), /* @__PURE__ */ d("label", {
984
990
  htmlFor: "emailVerified",
985
991
  className: "text-sm font-medium text-text-primary",
986
- children: _("auth.users.fieldEmailVerified", "Email Verified")
992
+ children: v("auth.users.fieldEmailVerified", "Email Verified")
987
993
  })]
988
994
  }),
989
- /* @__PURE__ */ p("div", {
995
+ /* @__PURE__ */ f("div", {
990
996
  className: "flex gap-3 pt-4",
991
- children: [/* @__PURE__ */ f("button", {
997
+ children: [/* @__PURE__ */ d(p, {
992
998
  type: "submit",
993
- disabled: x,
994
- className: "auth-primary-button flex items-center gap-2 px-6 py-3 font-medium",
995
- children: x ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(n, { className: "size-4 animate-spin" }), _("auth.users.saving", "Saving...")] }) : _("auth.users.saveChanges", "Save Changes")
996
- }), /* @__PURE__ */ f("button", {
999
+ disabled: S,
1000
+ variant: "default",
1001
+ size: "lg",
1002
+ className: "font-semibold",
1003
+ children: S ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(n, { className: "size-4 animate-spin" }), v("auth.users.saving", "Saving...")] }) : v("auth.users.saveChanges", "Save Changes")
1004
+ }), /* @__PURE__ */ d("button", {
997
1005
  type: "button",
998
1006
  onClick: () => {
999
- j("list"), Y();
1007
+ M("list"), X();
1000
1008
  },
1001
1009
  className: "px-6 py-3 rounded-xl border border-border-default text-text-primary font-medium hover:bg-bg-sunken transition-colors",
1002
- children: _("auth.users.cancel", "Cancel")
1010
+ children: v("auth.users.cancel", "Cancel")
1003
1011
  })]
1004
1012
  })
1005
1013
  ]
@@ -1007,28 +1015,16 @@ function g() {
1007
1015
  ]
1008
1016
  })
1009
1017
  ]
1010
- }) : /* @__PURE__ */ f("div", {
1018
+ }) : /* @__PURE__ */ d("div", {
1011
1019
  className: "max-w-6xl mx-auto p-6",
1012
- children: /* @__PURE__ */ p("div", {
1013
- className: "text-center py-16 border-2 border-dashed border-border-subtle rounded-xl",
1014
- children: [
1015
- /* @__PURE__ */ f("div", {
1016
- className: "size-16 mx-auto mb-4 rounded-full bg-status-warning-bg-subtle flex items-center justify-center",
1017
- children: /* @__PURE__ */ f(t, { className: "size-8 text-status-warning-text" })
1018
- }),
1019
- /* @__PURE__ */ f("h2", {
1020
- className: "text-xl font-semibold text-text-primary mb-2",
1021
- children: _("auth.users.authRequired", "Authentication Required")
1022
- }),
1023
- /* @__PURE__ */ f("p", {
1024
- className: "text-text-secondary",
1025
- children: _("auth.users.signInToManage", "Please sign in to manage users")
1026
- })
1027
- ]
1020
+ children: /* @__PURE__ */ d(m, {
1021
+ illustration: "empty-generic",
1022
+ title: v("auth.users.authRequired", "Authentication Required"),
1023
+ description: v("auth.users.signInToManage", "Please sign in to manage users")
1028
1024
  })
1029
1025
  });
1030
1026
  }
1031
1027
  //#endregion
1032
- export { g as UsersPage };
1028
+ export { _ as UsersPage };
1033
1029
 
1034
1030
  //# sourceMappingURL=UsersPage.js.map