sls-ui-library 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sls-ui.es.js CHANGED
@@ -1,6 +1,6 @@
1
- import { jsx as e, jsxs as s, Fragment as B } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as s, Fragment as $ } from "react/jsx-runtime";
2
2
  import * as b from "react";
3
- import { forwardRef as Y, createElement as T } from "react";
3
+ import { forwardRef as Y, createElement as O } from "react";
4
4
  import { createPortal as H } from "react-dom";
5
5
  function V(t) {
6
6
  var r, n, a = "";
@@ -11,14 +11,14 @@ function V(t) {
11
11
  } else for (n in t) t[n] && (a && (a += " "), a += n);
12
12
  return a;
13
13
  }
14
- function te() {
14
+ function ae() {
15
15
  for (var t, r, n = 0, a = "", i = arguments.length; n < i; n++) (t = arguments[n]) && (r = V(t)) && (a && (a += " "), a += r);
16
16
  return a;
17
17
  }
18
18
  function h(...t) {
19
- return te(t);
19
+ return ae(t);
20
20
  }
21
- const re = {
21
+ const ie = {
22
22
  neutral: "bg-tag text-tag border border-tag-border",
23
23
  online: "bg-status-online-bg text-status-online",
24
24
  warn: "bg-status-warn-bg text-status-warn",
@@ -26,13 +26,13 @@ const re = {
26
26
  live: "bg-live-bg text-live-text",
27
27
  accent: "bg-accent-muted text-accent"
28
28
  };
29
- function Ye({ tone: t = "neutral", className: r, children: n, ...a }) {
29
+ function _e({ tone: t = "neutral", className: r, children: n, ...a }) {
30
30
  return /* @__PURE__ */ e(
31
31
  "span",
32
32
  {
33
33
  className: h(
34
34
  "inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-xs font-medium",
35
- re[t],
35
+ ie[t],
36
36
  r
37
37
  ),
38
38
  ...a,
@@ -40,7 +40,7 @@ function Ye({ tone: t = "neutral", className: r, children: n, ...a }) {
40
40
  }
41
41
  );
42
42
  }
43
- const ne = {
43
+ const se = {
44
44
  primary: "bg-accent text-white hover:brightness-110 focus-visible:ring-accent/50",
45
45
  secondary: "bg-accent-muted text-accent hover:brightness-105 focus-visible:ring-accent/40",
46
46
  outline: "border border-card-border text-ink-primary bg-transparent hover:bg-accent-muted focus-visible:ring-accent/30",
@@ -48,36 +48,36 @@ const ne = {
48
48
  danger: "bg-status-offline text-white hover:brightness-110 focus-visible:ring-status-offline/50",
49
49
  add: "bg-status-online text-white hover:brightness-110 focus-visible:ring-status-online/50",
50
50
  cancel: "border border-card-border text-ink-secondary bg-transparent hover:bg-card focus-visible:ring-ink-muted/30"
51
- }, ae = {
51
+ }, ce = {
52
52
  sm: "h-8 px-3 text-sm gap-1.5",
53
53
  md: "h-10 px-4 text-sm gap-2",
54
54
  lg: "h-12 px-6 text-base gap-2"
55
- }, M = b.forwardRef(
56
- ({ variant: t = "primary", size: r = "md", icon: n, trailingIcon: a, loading: i, fullWidth: l, disabled: c, className: f, children: d, ...u }, o) => /* @__PURE__ */ s(
55
+ }, B = b.forwardRef(
56
+ ({ variant: t = "primary", size: r = "md", icon: n, trailingIcon: a, loading: i, fullWidth: c, disabled: l, className: f, children: o, ...d }, u) => /* @__PURE__ */ s(
57
57
  "button",
58
58
  {
59
- ref: o,
60
- disabled: c || i,
59
+ ref: u,
60
+ disabled: l || i,
61
61
  className: h(
62
62
  "inline-flex items-center justify-center rounded-md font-primary font-medium",
63
63
  "transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2",
64
64
  "disabled:opacity-50 disabled:cursor-not-allowed",
65
- ne[t],
66
- ae[r],
67
- l && "w-full",
65
+ se[t],
66
+ ce[r],
67
+ c && "w-full",
68
68
  f
69
69
  ),
70
- ...u,
70
+ ...d,
71
71
  children: [
72
72
  i ? /* @__PURE__ */ e("span", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }) : n && /* @__PURE__ */ e("span", { className: "inline-flex shrink-0", children: n }),
73
- d,
73
+ o,
74
74
  !i && a && /* @__PURE__ */ e("span", { className: "inline-flex shrink-0", children: a })
75
75
  ]
76
76
  }
77
77
  )
78
78
  );
79
- M.displayName = "Button";
80
- const ie = b.forwardRef(
79
+ B.displayName = "Button";
80
+ const le = b.forwardRef(
81
81
  ({ padded: t = !0, className: r, children: n, ...a }, i) => /* @__PURE__ */ e(
82
82
  "div",
83
83
  {
@@ -92,21 +92,21 @@ const ie = b.forwardRef(
92
92
  }
93
93
  )
94
94
  );
95
- ie.displayName = "Card";
95
+ le.displayName = "Card";
96
96
  /**
97
97
  * @license lucide-react v0.400.0 - ISC
98
98
  *
99
99
  * This source code is licensed under the ISC license.
100
100
  * See the LICENSE file in the root directory of this source tree.
101
101
  */
102
- const se = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), W = (...t) => t.filter((r, n, a) => !!r && a.indexOf(r) === n).join(" ");
102
+ const oe = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), U = (...t) => t.filter((r, n, a) => !!r && a.indexOf(r) === n).join(" ");
103
103
  /**
104
104
  * @license lucide-react v0.400.0 - ISC
105
105
  *
106
106
  * This source code is licensed under the ISC license.
107
107
  * See the LICENSE file in the root directory of this source tree.
108
108
  */
109
- var le = {
109
+ var de = {
110
110
  xmlns: "http://www.w3.org/2000/svg",
111
111
  width: 24,
112
112
  height: 24,
@@ -123,31 +123,31 @@ var le = {
123
123
  * This source code is licensed under the ISC license.
124
124
  * See the LICENSE file in the root directory of this source tree.
125
125
  */
126
- const ce = Y(
126
+ const ue = Y(
127
127
  ({
128
128
  color: t = "currentColor",
129
129
  size: r = 24,
130
130
  strokeWidth: n = 2,
131
131
  absoluteStrokeWidth: a,
132
132
  className: i = "",
133
- children: l,
134
- iconNode: c,
133
+ children: c,
134
+ iconNode: l,
135
135
  ...f
136
- }, d) => T(
136
+ }, o) => O(
137
137
  "svg",
138
138
  {
139
- ref: d,
140
- ...le,
139
+ ref: o,
140
+ ...de,
141
141
  width: r,
142
142
  height: r,
143
143
  stroke: t,
144
144
  strokeWidth: a ? Number(n) * 24 / Number(r) : n,
145
- className: W("lucide", i),
145
+ className: U("lucide", i),
146
146
  ...f
147
147
  },
148
148
  [
149
- ...c.map(([u, o]) => T(u, o)),
150
- ...Array.isArray(l) ? l : [l]
149
+ ...l.map(([d, u]) => O(d, u)),
150
+ ...Array.isArray(c) ? c : [c]
151
151
  ]
152
152
  )
153
153
  );
@@ -159,10 +159,10 @@ const ce = Y(
159
159
  */
160
160
  const k = (t, r) => {
161
161
  const n = Y(
162
- ({ className: a, ...i }, l) => T(ce, {
163
- ref: l,
162
+ ({ className: a, ...i }, c) => O(ue, {
163
+ ref: c,
164
164
  iconNode: r,
165
- className: W(`lucide-${se(t)}`, a),
165
+ className: U(`lucide-${oe(t)}`, a),
166
166
  ...i
167
167
  })
168
168
  );
@@ -174,7 +174,7 @@ const k = (t, r) => {
174
174
  * This source code is licensed under the ISC license.
175
175
  * See the LICENSE file in the root directory of this source tree.
176
176
  */
177
- const oe = k("ArrowDown", [
177
+ const fe = k("ArrowDown", [
178
178
  ["path", { d: "M12 5v14", key: "s699le" }],
179
179
  ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
180
180
  ]);
@@ -184,7 +184,7 @@ const oe = k("ArrowDown", [
184
184
  * This source code is licensed under the ISC license.
185
185
  * See the LICENSE file in the root directory of this source tree.
186
186
  */
187
- const O = k("ArrowUpDown", [
187
+ const F = k("ArrowUpDown", [
188
188
  ["path", { d: "m21 16-4 4-4-4", key: "f6ql7i" }],
189
189
  ["path", { d: "M17 20V4", key: "1ejh1v" }],
190
190
  ["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
@@ -196,7 +196,7 @@ const O = k("ArrowUpDown", [
196
196
  * This source code is licensed under the ISC license.
197
197
  * See the LICENSE file in the root directory of this source tree.
198
198
  */
199
- const de = k("ArrowUp", [
199
+ const me = k("ArrowUp", [
200
200
  ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
201
201
  ["path", { d: "M12 19V5", key: "x0mq9r" }]
202
202
  ]);
@@ -206,7 +206,7 @@ const de = k("ArrowUp", [
206
206
  * This source code is licensed under the ISC license.
207
207
  * See the LICENSE file in the root directory of this source tree.
208
208
  */
209
- const ue = k("Bot", [
209
+ const he = k("Bot", [
210
210
  ["path", { d: "M12 8V4H8", key: "hb8ula" }],
211
211
  ["rect", { width: "16", height: "12", x: "4", y: "8", rx: "2", key: "enze0r" }],
212
212
  ["path", { d: "M2 14h2", key: "vft8re" }],
@@ -232,7 +232,7 @@ const G = k("Calendar", [
232
232
  * This source code is licensed under the ISC license.
233
233
  * See the LICENSE file in the root directory of this source tree.
234
234
  */
235
- const U = k("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
235
+ const _ = k("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
236
236
  /**
237
237
  * @license lucide-react v0.400.0 - ISC
238
238
  *
@@ -248,7 +248,7 @@ const Q = k("ChevronDown", [
248
248
  * This source code is licensed under the ISC license.
249
249
  * See the LICENSE file in the root directory of this source tree.
250
250
  */
251
- const me = k("ChevronLeft", [
251
+ const be = k("ChevronLeft", [
252
252
  ["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]
253
253
  ]);
254
254
  /**
@@ -257,7 +257,7 @@ const me = k("ChevronLeft", [
257
257
  * This source code is licensed under the ISC license.
258
258
  * See the LICENSE file in the root directory of this source tree.
259
259
  */
260
- const fe = k("ChevronRight", [
260
+ const xe = k("ChevronRight", [
261
261
  ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
262
262
  ]);
263
263
  /**
@@ -286,7 +286,7 @@ const J = k("ChevronsRight", [
286
286
  * This source code is licensed under the ISC license.
287
287
  * See the LICENSE file in the root directory of this source tree.
288
288
  */
289
- const he = k("CircleAlert", [
289
+ const pe = k("CircleAlert", [
290
290
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
291
291
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
292
292
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
@@ -297,7 +297,7 @@ const he = k("CircleAlert", [
297
297
  * This source code is licensed under the ISC license.
298
298
  * See the LICENSE file in the root directory of this source tree.
299
299
  */
300
- const be = k("Download", [
300
+ const ge = k("Download", [
301
301
  ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
302
302
  ["polyline", { points: "7 10 12 15 17 10", key: "2ggqvy" }],
303
303
  ["line", { x1: "12", x2: "12", y1: "15", y2: "3", key: "1vk2je" }]
@@ -308,7 +308,7 @@ const be = k("Download", [
308
308
  * This source code is licensed under the ISC license.
309
309
  * See the LICENSE file in the root directory of this source tree.
310
310
  */
311
- const xe = k("EyeOff", [
311
+ const ve = k("EyeOff", [
312
312
  ["path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24", key: "1jxqfv" }],
313
313
  [
314
314
  "path",
@@ -329,7 +329,7 @@ const xe = k("EyeOff", [
329
329
  * This source code is licensed under the ISC license.
330
330
  * See the LICENSE file in the root directory of this source tree.
331
331
  */
332
- const pe = k("Eye", [
332
+ const ye = k("Eye", [
333
333
  ["path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z", key: "rwhkz3" }],
334
334
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
335
335
  ]);
@@ -339,7 +339,7 @@ const pe = k("Eye", [
339
339
  * This source code is licensed under the ISC license.
340
340
  * See the LICENSE file in the root directory of this source tree.
341
341
  */
342
- const ge = k("Grid3x3", [
342
+ const ke = k("Grid3x3", [
343
343
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
344
344
  ["path", { d: "M3 9h18", key: "1pudct" }],
345
345
  ["path", { d: "M3 15h18", key: "5xshup" }],
@@ -352,7 +352,7 @@ const ge = k("Grid3x3", [
352
352
  * This source code is licensed under the ISC license.
353
353
  * See the LICENSE file in the root directory of this source tree.
354
354
  */
355
- const ye = k("LogOut", [
355
+ const we = k("LogOut", [
356
356
  ["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4", key: "1uf3rs" }],
357
357
  ["polyline", { points: "16 17 21 12 16 7", key: "1gabdz" }],
358
358
  ["line", { x1: "21", x2: "9", y1: "12", y2: "12", key: "1uyos4" }]
@@ -363,7 +363,7 @@ const ye = k("LogOut", [
363
363
  * This source code is licensed under the ISC license.
364
364
  * See the LICENSE file in the root directory of this source tree.
365
365
  */
366
- const ve = k("Mail", [
366
+ const Ne = k("Mail", [
367
367
  ["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2", key: "18n3k1" }],
368
368
  ["path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7", key: "1ocrg3" }]
369
369
  ]);
@@ -383,7 +383,7 @@ const X = k("Plus", [
383
383
  * This source code is licensed under the ISC license.
384
384
  * See the LICENSE file in the root directory of this source tree.
385
385
  */
386
- const ke = k("RefreshCw", [
386
+ const Ce = k("RefreshCw", [
387
387
  ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
388
388
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
389
389
  ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
@@ -395,7 +395,7 @@ const ke = k("RefreshCw", [
395
395
  * This source code is licensed under the ISC license.
396
396
  * See the LICENSE file in the root directory of this source tree.
397
397
  */
398
- const F = k("Search", [
398
+ const P = k("Search", [
399
399
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
400
400
  ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
401
401
  ]);
@@ -405,7 +405,7 @@ const F = k("Search", [
405
405
  * This source code is licensed under the ISC license.
406
406
  * See the LICENSE file in the root directory of this source tree.
407
407
  */
408
- const _ = k("SlidersHorizontal", [
408
+ const K = k("SlidersHorizontal", [
409
409
  ["line", { x1: "21", x2: "14", y1: "4", y2: "4", key: "obuewd" }],
410
410
  ["line", { x1: "10", x2: "3", y1: "4", y2: "4", key: "1q6298" }],
411
411
  ["line", { x1: "21", x2: "12", y1: "12", y2: "12", key: "1iu8h1" }],
@@ -422,7 +422,7 @@ const _ = k("SlidersHorizontal", [
422
422
  * This source code is licensed under the ISC license.
423
423
  * See the LICENSE file in the root directory of this source tree.
424
424
  */
425
- const we = k("Trash2", [
425
+ const Be = k("Trash2", [
426
426
  ["path", { d: "M3 6h18", key: "d0wm0j" }],
427
427
  ["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
428
428
  ["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
@@ -435,7 +435,7 @@ const we = k("Trash2", [
435
435
  * This source code is licensed under the ISC license.
436
436
  * See the LICENSE file in the root directory of this source tree.
437
437
  */
438
- const Ne = k("User", [
438
+ const Me = k("User", [
439
439
  ["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
440
440
  ["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
441
441
  ]);
@@ -445,15 +445,15 @@ const Ne = k("User", [
445
445
  * This source code is licensed under the ISC license.
446
446
  * See the LICENSE file in the root directory of this source tree.
447
447
  */
448
- const R = k("X", [
448
+ const D = k("X", [
449
449
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
450
450
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
451
- ]), P = b.forwardRef(
452
- ({ label: t, id: r, className: n, checked: a, ...i }, l) => {
453
- const c = r ?? b.useId();
454
- return /* @__PURE__ */ s("label", { htmlFor: c, className: "inline-flex cursor-pointer items-center gap-2 select-none", children: [
451
+ ]), E = b.forwardRef(
452
+ ({ label: t, id: r, className: n, checked: a, ...i }, c) => {
453
+ const l = r ?? b.useId();
454
+ return /* @__PURE__ */ s("label", { htmlFor: l, className: "inline-flex cursor-pointer items-center gap-2 select-none", children: [
455
455
  /* @__PURE__ */ s("span", { className: "relative inline-flex h-4 w-4 shrink-0 items-center justify-center", children: [
456
- /* @__PURE__ */ e("input", { ref: l, id: c, type: "checkbox", checked: a, className: "peer sr-only", ...i }),
456
+ /* @__PURE__ */ e("input", { ref: c, id: l, type: "checkbox", checked: a, className: "peer sr-only", ...i }),
457
457
  /* @__PURE__ */ e(
458
458
  "span",
459
459
  {
@@ -465,68 +465,68 @@ const R = k("X", [
465
465
  )
466
466
  }
467
467
  ),
468
- a && /* @__PURE__ */ e(U, { size: 12, strokeWidth: 3, className: "pointer-events-none absolute text-white" })
468
+ a && /* @__PURE__ */ e(_, { size: 12, strokeWidth: 3, className: "pointer-events-none absolute text-white" })
469
469
  ] }),
470
470
  t && /* @__PURE__ */ e("span", { className: "text-sm text-ink-primary", children: t })
471
471
  ] });
472
472
  }
473
473
  );
474
- P.displayName = "Checkbox";
475
- const Ce = {
474
+ E.displayName = "Checkbox";
475
+ const ze = {
476
476
  idle: "text-icon-idle hover:text-icon-active hover:bg-accent-muted",
477
477
  active: "text-icon-active bg-accent-muted",
478
478
  danger: "text-status-offline hover:bg-status-offline-bg"
479
- }, Me = { sm: "h-8 w-8", md: "h-10 w-10" }, L = b.forwardRef(
480
- ({ icon: t, label: r, variant: n = "idle", size: a = "md", className: i, ...l }, c) => /* @__PURE__ */ e(
479
+ }, Se = { sm: "h-8 w-8", md: "h-10 w-10" }, S = b.forwardRef(
480
+ ({ icon: t, label: r, variant: n = "idle", size: a = "md", className: i, ...c }, l) => /* @__PURE__ */ e(
481
481
  "button",
482
482
  {
483
- ref: c,
483
+ ref: l,
484
484
  "aria-label": r,
485
485
  title: r,
486
486
  className: h(
487
487
  "inline-flex items-center justify-center rounded-full transition-colors duration-150",
488
488
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40",
489
489
  "disabled:opacity-40 disabled:cursor-not-allowed",
490
- Ce[n],
491
- Me[a],
490
+ ze[n],
491
+ Se[a],
492
492
  i
493
493
  ),
494
- ...l,
494
+ ...c,
495
495
  children: t
496
496
  }
497
497
  )
498
498
  );
499
- L.displayName = "IconButton";
500
- function He({ columns: t, visible: r, onChange: n, className: a }) {
501
- const [i, l] = b.useState(!1), c = b.useRef(null);
499
+ S.displayName = "IconButton";
500
+ function Qe({ columns: t, visible: r, onChange: n, className: a }) {
501
+ const [i, c] = b.useState(!1), l = b.useRef(null);
502
502
  b.useEffect(() => {
503
- function d(u) {
504
- c.current && !c.current.contains(u.target) && l(!1);
503
+ function o(d) {
504
+ l.current && !l.current.contains(d.target) && c(!1);
505
505
  }
506
- return document.addEventListener("mousedown", d), () => document.removeEventListener("mousedown", d);
506
+ return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
507
507
  }, []);
508
- function f(d) {
509
- n(r.includes(d) ? r.filter((u) => u !== d) : [...r, d]);
508
+ function f(o) {
509
+ n(r.includes(o) ? r.filter((d) => d !== o) : [...r, o]);
510
510
  }
511
- return /* @__PURE__ */ s("div", { ref: c, className: h("relative", a), children: [
512
- /* @__PURE__ */ e(L, { icon: /* @__PURE__ */ e(ge, { size: 16 }), label: "Choose columns", onClick: () => l((d) => !d), variant: i ? "active" : "idle" }),
513
- i && /* @__PURE__ */ e("div", { className: "absolute right-0 z-20 mt-1 w-52 rounded-md border border-card-border bg-card p-2 shadow-lg", children: t.map((d) => /* @__PURE__ */ s("label", { className: "flex items-center gap-2 rounded px-2 py-1.5 text-sm hover:bg-accent-muted", children: [
514
- /* @__PURE__ */ e(P, { checked: r.includes(d.key), onChange: () => f(d.key) }),
515
- /* @__PURE__ */ e("span", { className: "text-ink-primary", children: d.label })
516
- ] }, d.key)) })
511
+ return /* @__PURE__ */ s("div", { ref: l, className: h("relative", a), children: [
512
+ /* @__PURE__ */ e(S, { icon: /* @__PURE__ */ e(ke, { size: 16 }), label: "Choose columns", onClick: () => c((o) => !o), variant: i ? "active" : "idle" }),
513
+ i && /* @__PURE__ */ e("div", { className: "absolute right-0 z-20 mt-1 w-52 rounded-md border border-card-border bg-card p-2 shadow-lg", children: t.map((o) => /* @__PURE__ */ s("label", { className: "flex items-center gap-2 rounded px-2 py-1.5 text-sm hover:bg-accent-muted", children: [
514
+ /* @__PURE__ */ e(E, { checked: r.includes(o.key), onChange: () => f(o.key) }),
515
+ /* @__PURE__ */ e("span", { className: "text-ink-primary", children: o.label })
516
+ ] }, o.key)) })
517
517
  ] });
518
518
  }
519
- const ze = {
519
+ const Le = {
520
520
  sm: "max-w-sm",
521
521
  md: "max-w-lg",
522
522
  lg: "max-w-2xl",
523
523
  xl: "max-w-4xl"
524
524
  };
525
- function I({ open: t, onClose: r, title: n, footer: a, size: i = "md", children: l, className: c }) {
525
+ function R({ open: t, onClose: r, title: n, footer: a, size: i = "md", children: c, className: l }) {
526
526
  return b.useEffect(() => {
527
527
  if (!t) return;
528
- function f(d) {
529
- d.key === "Escape" && r();
528
+ function f(o) {
529
+ o.key === "Escape" && r();
530
530
  }
531
531
  return document.addEventListener("keydown", f), () => document.removeEventListener("keydown", f);
532
532
  }, [t, r]), t ? H(
@@ -539,15 +539,15 @@ function I({ open: t, onClose: r, title: n, footer: a, size: i = "md", children:
539
539
  "aria-modal": "true",
540
540
  className: h(
541
541
  "relative z-10 flex max-h-[90vh] w-full flex-col rounded-lg border border-card-border bg-card shadow-xl",
542
- ze[i],
543
- c
542
+ Le[i],
543
+ l
544
544
  ),
545
545
  children: [
546
546
  n && /* @__PURE__ */ s("div", { className: "flex items-center justify-between border-b border-card-border px-5 py-4", children: [
547
547
  /* @__PURE__ */ e("h2", { className: "font-secondary text-base font-semibold text-ink-primary", children: n }),
548
- /* @__PURE__ */ e("button", { onClick: r, "aria-label": "Close", className: "text-ink-muted hover:text-ink-primary", children: /* @__PURE__ */ e(R, { size: 18 }) })
548
+ /* @__PURE__ */ e("button", { onClick: r, "aria-label": "Close", className: "text-ink-muted hover:text-ink-primary", children: /* @__PURE__ */ e(D, { size: 18 }) })
549
549
  ] }),
550
- /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto px-5 py-4", children: l }),
550
+ /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto px-5 py-4", children: c }),
551
551
  a && /* @__PURE__ */ e("div", { className: "flex items-center justify-end gap-2 border-t border-card-border px-5 py-4", children: a })
552
552
  ]
553
553
  }
@@ -556,78 +556,78 @@ function I({ open: t, onClose: r, title: n, footer: a, size: i = "md", children:
556
556
  document.body
557
557
  ) : null;
558
558
  }
559
- function Ve({
559
+ function Ze({
560
560
  open: t,
561
561
  title: r,
562
562
  message: n,
563
563
  confirmLabel: a = "Ok",
564
564
  cancelLabel: i = "Close",
565
- tone: l = "default",
566
- onConfirm: c,
565
+ tone: c = "default",
566
+ onConfirm: l,
567
567
  onClose: f,
568
- loading: d
568
+ loading: o
569
569
  }) {
570
570
  return /* @__PURE__ */ e(
571
- I,
571
+ R,
572
572
  {
573
573
  open: t,
574
574
  onClose: f,
575
575
  title: r,
576
576
  size: "sm",
577
- footer: /* @__PURE__ */ s(B, { children: [
578
- /* @__PURE__ */ e(M, { variant: "cancel", onClick: f, children: i }),
579
- /* @__PURE__ */ e(M, { variant: l === "danger" ? "danger" : "primary", onClick: c, loading: d, children: a })
577
+ footer: /* @__PURE__ */ s($, { children: [
578
+ /* @__PURE__ */ e(B, { variant: "cancel", onClick: f, children: i }),
579
+ /* @__PURE__ */ e(B, { variant: c === "danger" ? "danger" : "primary", onClick: l, loading: o, children: a })
580
580
  ] }),
581
581
  children: /* @__PURE__ */ e("p", { className: "text-sm text-ink-secondary", children: n })
582
582
  }
583
583
  );
584
584
  }
585
- function K({ fullPage: t, label: r = "Loading...", className: n }) {
585
+ function ee({ fullPage: t, label: r = "Loading...", className: n }) {
586
586
  const a = /* @__PURE__ */ s("div", { className: h("flex flex-col items-center justify-center gap-3", n), children: [
587
587
  /* @__PURE__ */ e("span", { className: "h-10 w-10 animate-spin rounded-full border-4 border-accent-muted border-t-accent" }),
588
588
  r && /* @__PURE__ */ e("span", { className: "text-sm text-ink-secondary", children: r })
589
589
  ] });
590
590
  return t ? /* @__PURE__ */ e("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-canvas/70 backdrop-blur-sm", children: a }) : a;
591
591
  }
592
- function q({ checked: t, indeterminate: r, onChange: n, label: a = "Select row" }) {
592
+ function I({ checked: t, indeterminate: r, onChange: n, label: a = "Select row" }) {
593
593
  const i = b.useRef(null);
594
594
  return b.useEffect(() => {
595
595
  i.current && (i.current.indeterminate = !!r);
596
- }, [r]), /* @__PURE__ */ e(P, { ref: i, checked: t, onChange: (l) => n(l.target.checked), "aria-label": a });
596
+ }, [r]), /* @__PURE__ */ e(E, { ref: i, checked: t, onChange: (c) => n(c.target.checked), "aria-label": a });
597
597
  }
598
- function We({
598
+ function Je({
599
599
  columns: t,
600
600
  data: r,
601
601
  rowKey: n,
602
602
  loading: a,
603
603
  emptyMessage: i = "No records found.",
604
- visibleColumns: l,
605
- sortKey: c,
604
+ visibleColumns: c,
605
+ sortKey: l,
606
606
  sortDirection: f,
607
- onSortChange: d,
608
- selectable: u,
609
- selectedKeys: o = [],
607
+ onSortChange: o,
608
+ selectable: d,
609
+ selectedKeys: u = [],
610
610
  onSelectedKeysChange: m,
611
- onRowClick: y,
611
+ onRowClick: v,
612
612
  className: C
613
613
  }) {
614
- const N = l ? t.filter((g) => l.includes(g.key)) : t, x = r.map(n), w = u && r.length > 0 && x.every((g) => o.includes(g)), v = u && x.some((g) => o.includes(g));
615
- function S(g) {
616
- if (!(!g.sortable || !d)) {
617
- if (c !== g.key) return d(g.key, "asc");
618
- if (f === "asc") return d(g.key, "desc");
619
- d(g.key, null);
614
+ const N = c ? t.filter((g) => c.includes(g.key)) : t, x = r.map(n), w = d && r.length > 0 && x.every((g) => u.includes(g)), y = d && x.some((g) => u.includes(g));
615
+ function z(g) {
616
+ if (!(!g.sortable || !o)) {
617
+ if (l !== g.key) return o(g.key, "asc");
618
+ if (f === "asc") return o(g.key, "desc");
619
+ o(g.key, null);
620
620
  }
621
621
  }
622
- function A() {
622
+ function T() {
623
623
  m && m(w ? [] : x);
624
624
  }
625
- function E(g) {
626
- m && m(o.includes(g) ? o.filter((p) => p !== g) : [...o, g]);
625
+ function j(g) {
626
+ m && m(u.includes(g) ? u.filter((p) => p !== g) : [...u, g]);
627
627
  }
628
628
  return /* @__PURE__ */ e("div", { className: h("overflow-x-auto rounded-lg border border-card-border bg-card", C), children: /* @__PURE__ */ s("table", { className: "w-full text-left text-sm", children: [
629
629
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ s("tr", { className: "border-b border-card-border bg-canvas", children: [
630
- u && /* @__PURE__ */ e("th", { className: "w-10 px-4 py-3", children: /* @__PURE__ */ e(q, { checked: !!w, indeterminate: !w && v, onChange: A, label: "Select all rows" }) }),
630
+ d && /* @__PURE__ */ e("th", { className: "w-10 px-4 py-3", children: /* @__PURE__ */ e(I, { checked: !!w, indeterminate: !w && y, onChange: T, label: "Select all rows" }) }),
631
631
  N.map((g) => /* @__PURE__ */ e(
632
632
  "th",
633
633
  {
@@ -637,37 +637,37 @@ function We({
637
637
  g.align === "right" && "text-right",
638
638
  g.align === "center" && "text-center"
639
639
  ),
640
- children: g.sortable ? /* @__PURE__ */ s("button", { onClick: () => S(g), className: "inline-flex items-center gap-1 hover:text-ink-primary", children: [
640
+ children: g.sortable ? /* @__PURE__ */ s("button", { onClick: () => z(g), className: "inline-flex items-center gap-1 hover:text-ink-primary", children: [
641
641
  g.header,
642
- c === g.key ? f === "asc" ? /* @__PURE__ */ e(de, { size: 12 }) : f === "desc" ? /* @__PURE__ */ e(oe, { size: 12 }) : /* @__PURE__ */ e(O, { size: 12, className: "opacity-40" }) : /* @__PURE__ */ e(O, { size: 12, className: "opacity-40" })
642
+ l === g.key ? f === "asc" ? /* @__PURE__ */ e(me, { size: 12 }) : f === "desc" ? /* @__PURE__ */ e(fe, { size: 12 }) : /* @__PURE__ */ e(F, { size: 12, className: "opacity-40" }) : /* @__PURE__ */ e(F, { size: 12, className: "opacity-40" })
643
643
  ] }) : g.header
644
644
  },
645
645
  g.key
646
646
  ))
647
647
  ] }) }),
648
- /* @__PURE__ */ e("tbody", { children: a ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: N.length + (u ? 1 : 0), className: "py-10", children: /* @__PURE__ */ e(K, { label: "Loading records..." }) }) }) : r.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: N.length + (u ? 1 : 0), className: "py-10 text-center text-ink-muted", children: i }) }) : r.map((g) => {
648
+ /* @__PURE__ */ e("tbody", { children: a ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: N.length + (d ? 1 : 0), className: "py-10", children: /* @__PURE__ */ e(ee, { label: "Loading records..." }) }) }) : r.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: N.length + (d ? 1 : 0), className: "py-10 text-center text-ink-muted", children: i }) }) : r.map((g) => {
649
649
  const p = n(g);
650
650
  return /* @__PURE__ */ s(
651
651
  "tr",
652
652
  {
653
- onClick: () => y == null ? void 0 : y(g),
653
+ onClick: () => v == null ? void 0 : v(g),
654
654
  className: h(
655
655
  "border-b border-card-border last:border-0 hover:bg-accent-muted/60",
656
- y && "cursor-pointer"
656
+ v && "cursor-pointer"
657
657
  ),
658
658
  children: [
659
- u && /* @__PURE__ */ e("td", { className: "px-4 py-3", onClick: (z) => z.stopPropagation(), children: /* @__PURE__ */ e(q, { checked: o.includes(p), onChange: () => E(p) }) }),
660
- N.map((z) => /* @__PURE__ */ e(
659
+ d && /* @__PURE__ */ e("td", { className: "px-4 py-3", onClick: (M) => M.stopPropagation(), children: /* @__PURE__ */ e(I, { checked: u.includes(p), onChange: () => j(p) }) }),
660
+ N.map((M) => /* @__PURE__ */ e(
661
661
  "td",
662
662
  {
663
663
  className: h(
664
664
  "px-4 py-3 text-ink-primary",
665
- z.align === "right" && "text-right",
666
- z.align === "center" && "text-center"
665
+ M.align === "right" && "text-right",
666
+ M.align === "center" && "text-center"
667
667
  ),
668
- children: z.render(g)
668
+ children: M.render(g)
669
669
  },
670
- z.key
670
+ M.key
671
671
  ))
672
672
  ]
673
673
  },
@@ -676,37 +676,37 @@ function We({
676
676
  }) })
677
677
  ] }) });
678
678
  }
679
- function Se({ children: t, className: r, ...n }) {
679
+ function Ae({ children: t, className: r, ...n }) {
680
680
  return t ? /* @__PURE__ */ s("p", { className: h("mt-1 flex items-center gap-1 text-xs text-status-offline", r), ...n, children: [
681
- /* @__PURE__ */ e(he, { size: 12, className: "shrink-0" }),
681
+ /* @__PURE__ */ e(pe, { size: 12, className: "shrink-0" }),
682
682
  t
683
683
  ] }) : null;
684
684
  }
685
- function D({ label: t, htmlFor: r, required: n, error: a, hint: i, className: l, children: c, ...f }) {
686
- return /* @__PURE__ */ s("div", { className: h("flex flex-col", l), ...f, children: [
685
+ function L({ label: t, htmlFor: r, required: n, error: a, hint: i, className: c, children: l, ...f }) {
686
+ return /* @__PURE__ */ s("div", { className: h("flex flex-col", c), ...f, children: [
687
687
  t && /* @__PURE__ */ s("label", { htmlFor: r, className: "mb-1.5 text-sm font-medium text-ink-primary", children: [
688
688
  t,
689
689
  n && /* @__PURE__ */ e("span", { className: "ml-0.5 text-status-offline", children: "*" })
690
690
  ] }),
691
- c,
691
+ l,
692
692
  i && !a && /* @__PURE__ */ e("p", { className: "mt-1 text-xs text-ink-muted", children: i }),
693
- /* @__PURE__ */ e(Se, { children: a })
693
+ /* @__PURE__ */ e(Ae, { children: a })
694
694
  ] });
695
695
  }
696
- function Ge({ label: t, required: r, error: n, value: a, onChange: i, min: l, max: c, disabled: f, className: d }) {
697
- const u = b.useId();
698
- return /* @__PURE__ */ e(D, { label: t, htmlFor: u, required: r, error: n, className: d, children: /* @__PURE__ */ s("div", { className: "relative", children: [
696
+ function Xe({ label: t, required: r, error: n, value: a, onChange: i, min: c, max: l, disabled: f, className: o }) {
697
+ const d = b.useId();
698
+ return /* @__PURE__ */ e(L, { label: t, htmlFor: d, required: r, error: n, className: o, children: /* @__PURE__ */ s("div", { className: "relative", children: [
699
699
  /* @__PURE__ */ e(G, { size: 16, className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-ink-muted" }),
700
700
  /* @__PURE__ */ e(
701
701
  "input",
702
702
  {
703
- id: u,
703
+ id: d,
704
704
  type: "date",
705
705
  value: a ?? "",
706
- min: l,
707
- max: c,
706
+ min: c,
707
+ max: l,
708
708
  disabled: f,
709
- onChange: (o) => i(o.target.value),
709
+ onChange: (u) => i(u.target.value),
710
710
  className: h(
711
711
  "h-10 w-full rounded-md border bg-input pl-9 pr-3 text-sm text-ink-primary",
712
712
  "focus:outline-none focus:ring-2 focus:ring-accent/40 disabled:opacity-50",
@@ -716,9 +716,9 @@ function Ge({ label: t, required: r, error: n, value: a, onChange: i, min: l, ma
716
716
  )
717
717
  ] }) });
718
718
  }
719
- const ee = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], Le = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], De = ["This Financial Year", "This Month", "Last Month", "Next Month", "This Quarter", "This Year", "Last Year", "Custom Range"];
720
- function j(t) {
721
- return t ? `${String(t.getDate()).padStart(2, "0")}-${ee[t.getMonth()]}-${t.getFullYear()}` : "";
719
+ const te = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], De = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], Te = ["This Financial Year", "This Month", "Last Month", "Next Month", "This Quarter", "This Year", "Last Year", "Custom Range"];
720
+ function A(t) {
721
+ return t ? `${String(t.getDate()).padStart(2, "0")}-${te[t.getMonth()]}-${t.getFullYear()}` : "";
722
722
  }
723
723
  function je(t, r = /* @__PURE__ */ new Date()) {
724
724
  const n = r.getFullYear(), a = r.getMonth();
@@ -745,29 +745,29 @@ function je(t, r = /* @__PURE__ */ new Date()) {
745
745
  return { from: null, to: null };
746
746
  }
747
747
  }
748
- function $({ year: t, month: r, from: n, to: a, onPick: i }) {
749
- const c = new Date(t, r, 1).getDay(), f = new Date(t, r + 1, 0).getDate(), d = [];
750
- for (let m = 0; m < c; m++) d.push(null);
751
- for (let m = 1; m <= f; m++) d.push(m);
752
- function u(m) {
748
+ function q({ year: t, month: r, from: n, to: a, onPick: i }) {
749
+ const l = new Date(t, r, 1).getDay(), f = new Date(t, r + 1, 0).getDate(), o = [];
750
+ for (let m = 0; m < l; m++) o.push(null);
751
+ for (let m = 1; m <= f; m++) o.push(m);
752
+ function d(m) {
753
753
  if (!m || !n || !a) return !1;
754
- const y = new Date(t, r, m).getTime();
755
- return y >= n.getTime() && y <= a.getTime();
754
+ const v = new Date(t, r, m).getTime();
755
+ return v >= n.getTime() && v <= a.getTime();
756
756
  }
757
- function o(m) {
757
+ function u(m) {
758
758
  if (!m) return !1;
759
- const y = new Date(t, r, m).getTime();
760
- return n && y === n.getTime() || a && y === a.getTime();
759
+ const v = new Date(t, r, m).getTime();
760
+ return n && v === n.getTime() || a && v === a.getTime();
761
761
  }
762
762
  return /* @__PURE__ */ s("div", { children: [
763
763
  /* @__PURE__ */ s("p", { className: "mb-2 text-center text-sm font-semibold text-ink-primary", children: [
764
- ee[r],
764
+ te[r],
765
765
  " ",
766
766
  t
767
767
  ] }),
768
768
  /* @__PURE__ */ s("div", { className: "grid grid-cols-7 gap-y-1 text-center text-xs", children: [
769
- Le.map((m) => /* @__PURE__ */ e("span", { className: "text-ink-muted", children: m }, m)),
770
- d.map((m, y) => /* @__PURE__ */ e(
769
+ De.map((m) => /* @__PURE__ */ e("span", { className: "text-ink-muted", children: m }, m)),
770
+ o.map((m, v) => /* @__PURE__ */ e(
771
771
  "button",
772
772
  {
773
773
  type: "button",
@@ -776,40 +776,40 @@ function $({ year: t, month: r, from: n, to: a, onPick: i }) {
776
776
  className: h(
777
777
  "h-7 w-7 rounded text-ink-primary",
778
778
  !m && "invisible",
779
- m && u(m) && "bg-accent-muted",
780
- m && o(m) && "bg-accent text-white"
779
+ m && d(m) && "bg-accent-muted",
780
+ m && u(m) && "bg-accent text-white"
781
781
  ),
782
782
  children: m
783
783
  },
784
- y
784
+ v
785
785
  ))
786
786
  ] })
787
787
  ] });
788
788
  }
789
- function Ue({ label: t, required: r, error: n, value: a, onChange: i, className: l }) {
790
- const [c, f] = b.useState(!1), [d, u] = b.useState("Custom Range"), [o, m] = b.useState(a), [y, C] = b.useState(() => (a.from ?? /* @__PURE__ */ new Date()).getMonth()), [N, x] = b.useState(() => (a.from ?? /* @__PURE__ */ new Date()).getFullYear()), w = b.useRef(null);
789
+ function Ke({ label: t, required: r, error: n, value: a, onChange: i, className: c }) {
790
+ const [l, f] = b.useState(!1), [o, d] = b.useState("Custom Range"), [u, m] = b.useState(a), [v, C] = b.useState(() => (a.from ?? /* @__PURE__ */ new Date()).getMonth()), [N, x] = b.useState(() => (a.from ?? /* @__PURE__ */ new Date()).getFullYear()), w = b.useRef(null);
791
791
  b.useEffect(() => {
792
- function p(z) {
793
- w.current && !w.current.contains(z.target) && f(!1);
792
+ function p(M) {
793
+ w.current && !w.current.contains(M.target) && f(!1);
794
794
  }
795
795
  return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
796
796
  }, []);
797
- function v(p) {
798
- u(p), p !== "Custom Range" && m(je(p));
797
+ function y(p) {
798
+ d(p), p !== "Custom Range" && m(je(p));
799
799
  }
800
- function S(p) {
801
- u("Custom Range"), !o.from || o.from && o.to ? m({ from: p, to: null }) : p.getTime() < o.from.getTime() ? m({ from: p, to: o.from }) : m({ ...o, to: p });
800
+ function z(p) {
801
+ d("Custom Range"), !u.from || u.from && u.to ? m({ from: p, to: null }) : p.getTime() < u.from.getTime() ? m({ from: p, to: u.from }) : m({ ...u, to: p });
802
802
  }
803
- function A() {
804
- y === 0 ? (C(11), x((p) => p - 1)) : C((p) => p - 1);
803
+ function T() {
804
+ v === 0 ? (C(11), x((p) => p - 1)) : C((p) => p - 1);
805
805
  }
806
- function E() {
807
- y === 11 ? (C(0), x((p) => p + 1)) : C((p) => p + 1);
806
+ function j() {
807
+ v === 11 ? (C(0), x((p) => p + 1)) : C((p) => p + 1);
808
808
  }
809
809
  function g() {
810
- i(o), f(!1);
810
+ i(u), f(!1);
811
811
  }
812
- return /* @__PURE__ */ e(D, { label: t, required: r, error: n, className: l, children: /* @__PURE__ */ s("div", { ref: w, className: "relative", children: [
812
+ return /* @__PURE__ */ e(L, { label: t, required: r, error: n, className: c, children: /* @__PURE__ */ s("div", { ref: w, className: "relative", children: [
813
813
  /* @__PURE__ */ s(
814
814
  "button",
815
815
  {
@@ -822,19 +822,19 @@ function Ue({ label: t, required: r, error: n, value: a, onChange: i, className:
822
822
  ),
823
823
  children: [
824
824
  /* @__PURE__ */ e(G, { size: 16, className: "shrink-0 text-ink-muted" }),
825
- /* @__PURE__ */ e("span", { className: a.from ? "text-ink-primary" : "text-ink-muted", children: a.from && a.to ? `${j(a.from)} - ${j(a.to)}` : "Select date range" })
825
+ /* @__PURE__ */ e("span", { className: a.from ? "text-ink-primary" : "text-ink-muted", children: a.from && a.to ? `${A(a.from)} - ${A(a.to)}` : "Select date range" })
826
826
  ]
827
827
  }
828
828
  ),
829
- c && /* @__PURE__ */ s("div", { className: "absolute z-20 mt-1 flex w-[560px] max-w-[90vw] overflow-hidden rounded-md border border-card-border bg-card shadow-xl", children: [
830
- /* @__PURE__ */ e("div", { className: "w-40 shrink-0 border-r border-card-border py-2", children: De.map((p) => /* @__PURE__ */ e(
829
+ l && /* @__PURE__ */ s("div", { className: "absolute z-20 mt-1 flex w-[560px] max-w-[90vw] overflow-hidden rounded-md border border-card-border bg-card shadow-xl", children: [
830
+ /* @__PURE__ */ e("div", { className: "w-40 shrink-0 border-r border-card-border py-2", children: Te.map((p) => /* @__PURE__ */ e(
831
831
  "button",
832
832
  {
833
833
  type: "button",
834
- onClick: () => v(p),
834
+ onClick: () => y(p),
835
835
  className: h(
836
836
  "block w-full px-3 py-2 text-left text-sm",
837
- d === p ? "bg-accent text-white" : "text-ink-primary hover:bg-accent-muted"
837
+ o === p ? "bg-accent text-white" : "text-ink-primary hover:bg-accent-muted"
838
838
  ),
839
839
  children: p
840
840
  },
@@ -842,60 +842,60 @@ function Ue({ label: t, required: r, error: n, value: a, onChange: i, className:
842
842
  )) }),
843
843
  /* @__PURE__ */ s("div", { className: "flex-1 p-3", children: [
844
844
  /* @__PURE__ */ s("div", { className: "mb-2 flex items-center justify-between", children: [
845
- /* @__PURE__ */ e("button", { type: "button", onClick: A, className: "text-ink-muted hover:text-ink-primary", children: /* @__PURE__ */ e(me, { size: 16 }) }),
846
- /* @__PURE__ */ e("button", { type: "button", onClick: E, className: "text-ink-muted hover:text-ink-primary", children: /* @__PURE__ */ e(fe, { size: 16 }) })
845
+ /* @__PURE__ */ e("button", { type: "button", onClick: T, className: "text-ink-muted hover:text-ink-primary", children: /* @__PURE__ */ e(be, { size: 16 }) }),
846
+ /* @__PURE__ */ e("button", { type: "button", onClick: j, className: "text-ink-muted hover:text-ink-primary", children: /* @__PURE__ */ e(xe, { size: 16 }) })
847
847
  ] }),
848
848
  /* @__PURE__ */ s("div", { className: "grid grid-cols-2 gap-4", children: [
849
- /* @__PURE__ */ e($, { year: N, month: y, from: o.from, to: o.to, onPick: S }),
849
+ /* @__PURE__ */ e(q, { year: N, month: v, from: u.from, to: u.to, onPick: z }),
850
850
  /* @__PURE__ */ e(
851
- $,
851
+ q,
852
852
  {
853
- year: y === 11 ? N + 1 : N,
854
- month: y === 11 ? 0 : y + 1,
855
- from: o.from,
856
- to: o.to,
857
- onPick: S
853
+ year: v === 11 ? N + 1 : N,
854
+ month: v === 11 ? 0 : v + 1,
855
+ from: u.from,
856
+ to: u.to,
857
+ onPick: z
858
858
  }
859
859
  )
860
860
  ] }),
861
861
  /* @__PURE__ */ s("div", { className: "mt-3 flex items-center justify-between border-t border-card-border pt-3", children: [
862
- /* @__PURE__ */ e("span", { className: "text-sm text-ink-secondary", children: o.from && o.to ? `${j(o.from)} - ${j(o.to)}` : "Select a range" }),
862
+ /* @__PURE__ */ e("span", { className: "text-sm text-ink-secondary", children: u.from && u.to ? `${A(u.from)} - ${A(u.to)}` : "Select a range" }),
863
863
  /* @__PURE__ */ s("div", { className: "flex gap-2", children: [
864
- /* @__PURE__ */ e(M, { variant: "cancel", size: "sm", onClick: () => f(!1), children: "Cancel" }),
865
- /* @__PURE__ */ e(M, { variant: "primary", size: "sm", onClick: g, disabled: !o.from || !o.to, children: "Apply" })
864
+ /* @__PURE__ */ e(B, { variant: "cancel", size: "sm", onClick: () => f(!1), children: "Cancel" }),
865
+ /* @__PURE__ */ e(B, { variant: "primary", size: "sm", onClick: g, disabled: !u.from || !u.to, children: "Apply" })
866
866
  ] })
867
867
  ] })
868
868
  ] })
869
869
  ] })
870
870
  ] }) });
871
871
  }
872
- function Qe({
872
+ function et({
873
873
  label: t,
874
874
  required: r,
875
875
  error: n,
876
876
  options: a,
877
877
  value: i,
878
- onChange: l,
879
- placeholder: c = "Select...",
878
+ onChange: c,
879
+ placeholder: l = "Select...",
880
880
  searchable: f = !0,
881
- disabled: d,
882
- className: u
881
+ disabled: o,
882
+ className: d
883
883
  }) {
884
- const [o, m] = b.useState(!1), [y, C] = b.useState(""), N = b.useRef(null);
884
+ const [u, m] = b.useState(!1), [v, C] = b.useState(""), N = b.useRef(null);
885
885
  b.useEffect(() => {
886
- function v(S) {
887
- N.current && !N.current.contains(S.target) && m(!1);
886
+ function y(z) {
887
+ N.current && !N.current.contains(z.target) && m(!1);
888
888
  }
889
- return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
889
+ return document.addEventListener("mousedown", y), () => document.removeEventListener("mousedown", y);
890
890
  }, []);
891
- const x = f && y ? a.filter((v) => v.label.toLowerCase().includes(y.toLowerCase())) : a, w = a.find((v) => v.value === i);
892
- return /* @__PURE__ */ e(D, { label: t, required: r, error: n, className: u, children: /* @__PURE__ */ s("div", { ref: N, className: "relative", children: [
891
+ const x = f && v ? a.filter((y) => y.label.toLowerCase().includes(v.toLowerCase())) : a, w = a.find((y) => y.value === i);
892
+ return /* @__PURE__ */ e(L, { label: t, required: r, error: n, className: d, children: /* @__PURE__ */ s("div", { ref: N, className: "relative", children: [
893
893
  /* @__PURE__ */ s(
894
894
  "button",
895
895
  {
896
896
  type: "button",
897
- disabled: d,
898
- onClick: () => m((v) => !v),
897
+ disabled: o,
898
+ onClick: () => m((y) => !y),
899
899
  className: h(
900
900
  "flex h-10 w-full items-center justify-between rounded-md border bg-input px-3 text-sm text-left",
901
901
  "focus:outline-none focus:ring-2 focus:ring-accent/40 disabled:opacity-50",
@@ -903,20 +903,20 @@ function Qe({
903
903
  w ? "text-ink-primary" : "text-ink-muted"
904
904
  ),
905
905
  children: [
906
- /* @__PURE__ */ e("span", { className: "truncate", children: (w == null ? void 0 : w.label) ?? c }),
907
- /* @__PURE__ */ e(Q, { size: 16, className: h("shrink-0 text-ink-muted transition-transform", o && "rotate-180") })
906
+ /* @__PURE__ */ e("span", { className: "truncate", children: (w == null ? void 0 : w.label) ?? l }),
907
+ /* @__PURE__ */ e(Q, { size: 16, className: h("shrink-0 text-ink-muted transition-transform", u && "rotate-180") })
908
908
  ]
909
909
  }
910
910
  ),
911
- o && /* @__PURE__ */ s("div", { className: "absolute z-20 mt-1 w-full overflow-hidden rounded-md border border-card-border bg-card shadow-lg", children: [
911
+ u && /* @__PURE__ */ s("div", { className: "absolute z-20 mt-1 w-full overflow-hidden rounded-md border border-card-border bg-card shadow-lg", children: [
912
912
  f && /* @__PURE__ */ s("div", { className: "flex items-center gap-2 border-b border-card-border px-3 py-2", children: [
913
- /* @__PURE__ */ e(F, { size: 14, className: "text-ink-muted" }),
913
+ /* @__PURE__ */ e(P, { size: 14, className: "text-ink-muted" }),
914
914
  /* @__PURE__ */ e(
915
915
  "input",
916
916
  {
917
917
  autoFocus: !0,
918
- value: y,
919
- onChange: (v) => C(v.target.value),
918
+ value: v,
919
+ onChange: (y) => C(y.target.value),
920
920
  placeholder: "Search...",
921
921
  className: "w-full bg-transparent text-sm text-ink-primary placeholder:text-ink-muted focus:outline-none"
922
922
  }
@@ -924,63 +924,63 @@ function Qe({
924
924
  ] }),
925
925
  /* @__PURE__ */ s("ul", { className: "max-h-56 overflow-y-auto py-1", role: "listbox", children: [
926
926
  x.length === 0 && /* @__PURE__ */ e("li", { className: "px-3 py-2 text-sm text-ink-muted", children: "No options" }),
927
- x.map((v) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ s(
927
+ x.map((y) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ s(
928
928
  "button",
929
929
  {
930
930
  type: "button",
931
- disabled: v.disabled,
931
+ disabled: y.disabled,
932
932
  onClick: () => {
933
- l(v.value), m(!1), C("");
933
+ c(y.value), m(!1), C("");
934
934
  },
935
935
  className: h(
936
936
  "flex w-full items-center justify-between px-3 py-2 text-left text-sm hover:bg-accent-muted disabled:opacity-40",
937
- v.value === i ? "text-accent" : "text-ink-primary"
937
+ y.value === i ? "text-accent" : "text-ink-primary"
938
938
  ),
939
939
  children: [
940
- v.label,
941
- v.value === i && /* @__PURE__ */ e(U, { size: 14 })
940
+ y.label,
941
+ y.value === i && /* @__PURE__ */ e(_, { size: 14 })
942
942
  ]
943
943
  }
944
- ) }, v.value))
944
+ ) }, y.value))
945
945
  ] })
946
946
  ] })
947
947
  ] }) });
948
948
  }
949
- function Ze({
949
+ function tt({
950
950
  items: t,
951
951
  onChange: r,
952
952
  createItem: n,
953
953
  renderRow: a,
954
954
  addLabel: i = "Add row",
955
- minRows: l = 0,
956
- className: c
955
+ minRows: c = 0,
956
+ className: l
957
957
  }) {
958
- function f(u, o) {
958
+ function f(d, u) {
959
959
  const m = t.slice();
960
- m[u] = { ...m[u], ...o }, r(m);
960
+ m[d] = { ...m[d], ...u }, r(m);
961
961
  }
962
- function d(u) {
963
- r(t.filter((o, m) => m !== u));
962
+ function o(d) {
963
+ r(t.filter((u, m) => m !== d));
964
964
  }
965
- return /* @__PURE__ */ s("div", { className: h("flex flex-col gap-2", c), children: [
966
- t.map((u, o) => /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
967
- /* @__PURE__ */ e("div", { className: "flex-1", children: a(u, o, (m) => f(o, m)) }),
965
+ return /* @__PURE__ */ s("div", { className: h("flex flex-col gap-2", l), children: [
966
+ t.map((d, u) => /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
967
+ /* @__PURE__ */ e("div", { className: "flex-1", children: a(d, u, (m) => f(u, m)) }),
968
968
  /* @__PURE__ */ e(
969
- L,
969
+ S,
970
970
  {
971
- icon: /* @__PURE__ */ e(we, { size: 16 }),
971
+ icon: /* @__PURE__ */ e(Be, { size: 16 }),
972
972
  label: "Remove row",
973
973
  variant: "danger",
974
974
  size: "sm",
975
- disabled: t.length <= l,
976
- onClick: () => d(o)
975
+ disabled: t.length <= c,
976
+ onClick: () => o(u)
977
977
  }
978
978
  )
979
- ] }, o)),
980
- /* @__PURE__ */ e(M, { variant: "ghost", size: "sm", icon: /* @__PURE__ */ e(X, { size: 14 }), onClick: () => r([...t, n()]), className: "self-start", children: i })
979
+ ] }, u)),
980
+ /* @__PURE__ */ e(B, { variant: "ghost", size: "sm", icon: /* @__PURE__ */ e(X, { size: 14 }), onClick: () => r([...t, n()]), className: "self-start", children: i })
981
981
  ] });
982
982
  }
983
- function Je({ open: t, onSearch: r, onClear: n, children: a, className: i }) {
983
+ function rt({ open: t, onSearch: r, onClear: n, children: a, className: i }) {
984
984
  return t ? /* @__PURE__ */ s(
985
985
  "div",
986
986
  {
@@ -991,14 +991,14 @@ function Je({ open: t, onSearch: r, onClear: n, children: a, className: i }) {
991
991
  children: [
992
992
  /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: a }),
993
993
  /* @__PURE__ */ s("div", { className: "mt-4 flex items-center justify-end gap-2 border-t border-card-border pt-3", children: [
994
- /* @__PURE__ */ e(M, { variant: "cancel", size: "sm", onClick: n, children: "Clear filters" }),
995
- /* @__PURE__ */ e(M, { variant: "primary", size: "sm", onClick: r, children: "Search" })
994
+ /* @__PURE__ */ e(B, { variant: "cancel", size: "sm", onClick: n, children: "Clear filters" }),
995
+ /* @__PURE__ */ e(B, { variant: "primary", size: "sm", onClick: r, children: "Search" })
996
996
  ] })
997
997
  ]
998
998
  }
999
999
  ) : null;
1000
1000
  }
1001
- const Re = b.forwardRef(
1001
+ const Oe = b.forwardRef(
1002
1002
  ({ label: t = "Add", className: r, ...n }, a) => /* @__PURE__ */ e(
1003
1003
  "button",
1004
1004
  {
@@ -1016,59 +1016,59 @@ const Re = b.forwardRef(
1016
1016
  }
1017
1017
  )
1018
1018
  );
1019
- Re.displayName = "FloatingAddButton";
1020
- function Xe({
1019
+ Oe.displayName = "FloatingAddButton";
1020
+ function nt({
1021
1021
  open: t,
1022
1022
  onClose: r,
1023
1023
  onSubmit: n,
1024
1024
  title: a,
1025
1025
  size: i = "md",
1026
- submitLabel: l = "Ok",
1027
- cancelLabel: c = "Close",
1026
+ submitLabel: c = "Ok",
1027
+ cancelLabel: l = "Close",
1028
1028
  submitting: f,
1029
- submitDisabled: d,
1030
- children: u
1029
+ submitDisabled: o,
1030
+ children: d
1031
1031
  }) {
1032
1032
  return /* @__PURE__ */ e(
1033
- I,
1033
+ R,
1034
1034
  {
1035
1035
  open: t,
1036
1036
  onClose: r,
1037
1037
  title: a,
1038
1038
  size: i,
1039
- footer: /* @__PURE__ */ s(B, { children: [
1040
- /* @__PURE__ */ e(M, { variant: "cancel", onClick: r, disabled: f, children: c }),
1041
- /* @__PURE__ */ e(M, { variant: "primary", onClick: n, loading: f, disabled: d, children: l })
1039
+ footer: /* @__PURE__ */ s($, { children: [
1040
+ /* @__PURE__ */ e(B, { variant: "cancel", onClick: r, disabled: f, children: l }),
1041
+ /* @__PURE__ */ e(B, { variant: "primary", onClick: n, loading: f, disabled: o, children: c })
1042
1042
  ] }),
1043
1043
  children: /* @__PURE__ */ e(
1044
1044
  "form",
1045
1045
  {
1046
- onSubmit: (o) => {
1047
- o.preventDefault(), n();
1046
+ onSubmit: (u) => {
1047
+ u.preventDefault(), n();
1048
1048
  },
1049
1049
  className: "flex flex-col gap-4",
1050
- children: u
1050
+ children: d
1051
1051
  }
1052
1052
  )
1053
1053
  }
1054
1054
  );
1055
1055
  }
1056
- const Ae = b.forwardRef(
1057
- ({ label: t, required: r, error: n, hint: a, icon: i, id: l, className: c, ...f }, d) => {
1058
- const u = l ?? b.useId();
1059
- return /* @__PURE__ */ e(D, { label: t, htmlFor: u, required: r, error: n, hint: a, children: /* @__PURE__ */ s("div", { className: "relative", children: [
1056
+ const Pe = b.forwardRef(
1057
+ ({ label: t, required: r, error: n, hint: a, icon: i, id: c, className: l, ...f }, o) => {
1058
+ const d = c ?? b.useId();
1059
+ return /* @__PURE__ */ e(L, { label: t, htmlFor: d, required: r, error: n, hint: a, children: /* @__PURE__ */ s("div", { className: "relative", children: [
1060
1060
  i && /* @__PURE__ */ e("span", { className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-ink-muted", children: i }),
1061
1061
  /* @__PURE__ */ e(
1062
1062
  "input",
1063
1063
  {
1064
- ref: d,
1065
- id: u,
1064
+ ref: o,
1065
+ id: d,
1066
1066
  className: h(
1067
1067
  "h-10 w-full rounded-md border bg-input px-3 text-sm text-ink-primary placeholder:text-ink-muted",
1068
1068
  "focus:outline-none focus:ring-2 focus:ring-accent/40",
1069
1069
  n ? "border-status-offline" : "border-card-border",
1070
1070
  i && "pl-9",
1071
- c
1071
+ l
1072
1072
  ),
1073
1073
  "aria-invalid": !!n,
1074
1074
  ...f
@@ -1077,43 +1077,43 @@ const Ae = b.forwardRef(
1077
1077
  ] }) });
1078
1078
  }
1079
1079
  );
1080
- Ae.displayName = "InputField";
1081
- function _e({
1080
+ Pe.displayName = "InputField";
1081
+ function at({
1082
1082
  label: t,
1083
1083
  required: r,
1084
1084
  error: n,
1085
1085
  options: a,
1086
1086
  value: i,
1087
- onChange: l,
1088
- placeholder: c = "Select...",
1087
+ onChange: c,
1088
+ placeholder: l = "Select...",
1089
1089
  className: f
1090
1090
  }) {
1091
- const [d, u] = b.useState(!1), [o, m] = b.useState(""), y = b.useRef(null);
1091
+ const [o, d] = b.useState(!1), [u, m] = b.useState(""), v = b.useRef(null);
1092
1092
  b.useEffect(() => {
1093
1093
  function x(w) {
1094
- y.current && !y.current.contains(w.target) && u(!1);
1094
+ v.current && !v.current.contains(w.target) && d(!1);
1095
1095
  }
1096
1096
  return document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
1097
1097
  }, []);
1098
- const C = o ? a.filter((x) => x.label.toLowerCase().includes(o.toLowerCase())) : a;
1098
+ const C = u ? a.filter((x) => x.label.toLowerCase().includes(u.toLowerCase())) : a;
1099
1099
  function N(x) {
1100
- l(i.includes(x) ? i.filter((w) => w !== x) : [...i, x]);
1100
+ c(i.includes(x) ? i.filter((w) => w !== x) : [...i, x]);
1101
1101
  }
1102
- return /* @__PURE__ */ e(D, { label: t, required: r, error: n, className: f, children: /* @__PURE__ */ s("div", { ref: y, className: "relative", children: [
1102
+ return /* @__PURE__ */ e(L, { label: t, required: r, error: n, className: f, children: /* @__PURE__ */ s("div", { ref: v, className: "relative", children: [
1103
1103
  /* @__PURE__ */ s(
1104
1104
  "button",
1105
1105
  {
1106
1106
  type: "button",
1107
- onClick: () => u((x) => !x),
1107
+ onClick: () => d((x) => !x),
1108
1108
  className: h(
1109
1109
  "flex min-h-10 w-full flex-wrap items-center gap-1.5 rounded-md border bg-input px-2 py-1.5 text-left",
1110
1110
  "focus:outline-none focus:ring-2 focus:ring-accent/40",
1111
1111
  n ? "border-status-offline" : "border-card-border"
1112
1112
  ),
1113
1113
  children: [
1114
- i.length === 0 && /* @__PURE__ */ e("span", { className: "px-1 text-sm text-ink-muted", children: c }),
1114
+ i.length === 0 && /* @__PURE__ */ e("span", { className: "px-1 text-sm text-ink-muted", children: l }),
1115
1115
  i.map((x) => {
1116
- const w = a.find((v) => v.value === x);
1116
+ const w = a.find((y) => y.value === x);
1117
1117
  return /* @__PURE__ */ s(
1118
1118
  "span",
1119
1119
  {
@@ -1121,12 +1121,12 @@ function _e({
1121
1121
  children: [
1122
1122
  (w == null ? void 0 : w.label) ?? x,
1123
1123
  /* @__PURE__ */ e(
1124
- R,
1124
+ D,
1125
1125
  {
1126
1126
  size: 12,
1127
1127
  className: "cursor-pointer hover:text-status-offline",
1128
- onClick: (v) => {
1129
- v.stopPropagation(), N(x);
1128
+ onClick: (y) => {
1129
+ y.stopPropagation(), N(x);
1130
1130
  }
1131
1131
  }
1132
1132
  )
@@ -1135,18 +1135,18 @@ function _e({
1135
1135
  x
1136
1136
  );
1137
1137
  }),
1138
- /* @__PURE__ */ e(Q, { size: 16, className: h("ml-auto shrink-0 text-ink-muted transition-transform", d && "rotate-180") })
1138
+ /* @__PURE__ */ e(Q, { size: 16, className: h("ml-auto shrink-0 text-ink-muted transition-transform", o && "rotate-180") })
1139
1139
  ]
1140
1140
  }
1141
1141
  ),
1142
- d && /* @__PURE__ */ s("div", { className: "absolute z-20 mt-1 w-full overflow-hidden rounded-md border border-card-border bg-card shadow-lg", children: [
1142
+ o && /* @__PURE__ */ s("div", { className: "absolute z-20 mt-1 w-full overflow-hidden rounded-md border border-card-border bg-card shadow-lg", children: [
1143
1143
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2 border-b border-card-border px-3 py-2", children: [
1144
- /* @__PURE__ */ e(F, { size: 14, className: "text-ink-muted" }),
1144
+ /* @__PURE__ */ e(P, { size: 14, className: "text-ink-muted" }),
1145
1145
  /* @__PURE__ */ e(
1146
1146
  "input",
1147
1147
  {
1148
1148
  autoFocus: !0,
1149
- value: o,
1149
+ value: u,
1150
1150
  onChange: (x) => m(x.target.value),
1151
1151
  placeholder: "Search...",
1152
1152
  className: "w-full bg-transparent text-sm text-ink-primary placeholder:text-ink-muted focus:outline-none"
@@ -1171,8 +1171,8 @@ function _e({
1171
1171
  ] })
1172
1172
  ] }) });
1173
1173
  }
1174
- function Ke({ page: t, pageSize: r, total: n, onPageChange: a, className: i }) {
1175
- const l = Math.max(1, Math.ceil(n / r)), c = n === 0 ? 0 : (t - 1) * r + 1, f = Math.min(n, t * r);
1174
+ function it({ page: t, pageSize: r, total: n, onPageChange: a, className: i }) {
1175
+ const c = Math.max(1, Math.ceil(n / r)), l = n === 0 ? 0 : (t - 1) * r + 1, f = Math.min(n, t * r);
1176
1176
  return /* @__PURE__ */ s("nav", { className: h("flex items-center gap-2 text-sm text-ink-secondary", i), "aria-label": "Pagination", children: [
1177
1177
  /* @__PURE__ */ e(
1178
1178
  "button",
@@ -1185,7 +1185,7 @@ function Ke({ page: t, pageSize: r, total: n, onPageChange: a, className: i }) {
1185
1185
  }
1186
1186
  ),
1187
1187
  /* @__PURE__ */ s("span", { children: [
1188
- c,
1188
+ l,
1189
1189
  "-",
1190
1190
  f,
1191
1191
  " of ",
@@ -1194,8 +1194,8 @@ function Ke({ page: t, pageSize: r, total: n, onPageChange: a, className: i }) {
1194
1194
  /* @__PURE__ */ e(
1195
1195
  "button",
1196
1196
  {
1197
- onClick: () => a(Math.min(l, t + 1)),
1198
- disabled: t >= l,
1197
+ onClick: () => a(Math.min(c, t + 1)),
1198
+ disabled: t >= c,
1199
1199
  "aria-label": "Next page",
1200
1200
  className: "flex h-7 w-7 items-center justify-center rounded text-ink-secondary hover:bg-accent-muted disabled:opacity-40",
1201
1201
  children: /* @__PURE__ */ e(J, { size: 16 })
@@ -1203,7 +1203,7 @@ function Ke({ page: t, pageSize: r, total: n, onPageChange: a, className: i }) {
1203
1203
  )
1204
1204
  ] });
1205
1205
  }
1206
- function et({ title: t, actions: r, className: n, children: a, ...i }) {
1206
+ function st({ title: t, actions: r, className: n, children: a, ...i }) {
1207
1207
  return /* @__PURE__ */ s("div", { className: h("rounded-lg border border-card-border bg-card", n), ...i, children: [
1208
1208
  /* @__PURE__ */ s("div", { className: "flex items-center justify-between border-b border-card-border px-4 py-3", children: [
1209
1209
  /* @__PURE__ */ e("h3", { className: "font-secondary text-sm font-semibold text-ink-primary", children: t }),
@@ -1213,47 +1213,47 @@ function et({ title: t, actions: r, className: n, children: a, ...i }) {
1213
1213
  ] });
1214
1214
  }
1215
1215
  const Ee = b.forwardRef(
1216
- ({ label: t, required: r, error: n, hint: a, id: i, className: l, ...c }, f) => {
1217
- const [d, u] = b.useState(!1), o = i ?? b.useId();
1218
- return /* @__PURE__ */ e(D, { label: t, htmlFor: o, required: r, error: n, hint: a, children: /* @__PURE__ */ s("div", { className: "relative", children: [
1216
+ ({ label: t, required: r, error: n, hint: a, id: i, className: c, ...l }, f) => {
1217
+ const [o, d] = b.useState(!1), u = i ?? b.useId();
1218
+ return /* @__PURE__ */ e(L, { label: t, htmlFor: u, required: r, error: n, hint: a, children: /* @__PURE__ */ s("div", { className: "relative", children: [
1219
1219
  /* @__PURE__ */ e(
1220
1220
  "input",
1221
1221
  {
1222
1222
  ref: f,
1223
- id: o,
1224
- type: d ? "text" : "password",
1223
+ id: u,
1224
+ type: o ? "text" : "password",
1225
1225
  className: h(
1226
1226
  "h-10 w-full rounded-md border bg-input pl-3 pr-10 text-sm text-ink-primary placeholder:text-ink-muted",
1227
1227
  "focus:outline-none focus:ring-2 focus:ring-accent/40",
1228
1228
  n ? "border-status-offline" : "border-card-border",
1229
- l
1229
+ c
1230
1230
  ),
1231
1231
  "aria-invalid": !!n,
1232
- ...c
1232
+ ...l
1233
1233
  }
1234
1234
  ),
1235
1235
  /* @__PURE__ */ e(
1236
1236
  "button",
1237
1237
  {
1238
1238
  type: "button",
1239
- onClick: () => u((m) => !m),
1240
- "aria-label": d ? "Hide password" : "Show password",
1239
+ onClick: () => d((m) => !m),
1240
+ "aria-label": o ? "Hide password" : "Show password",
1241
1241
  className: "absolute right-3 top-1/2 -translate-y-1/2 text-ink-muted hover:text-ink-primary",
1242
- children: d ? /* @__PURE__ */ e(xe, { size: 16 }) : /* @__PURE__ */ e(pe, { size: 16 })
1242
+ children: o ? /* @__PURE__ */ e(ve, { size: 16 }) : /* @__PURE__ */ e(ye, { size: 16 })
1243
1243
  }
1244
1244
  )
1245
1245
  ] }) });
1246
1246
  }
1247
1247
  );
1248
1248
  Ee.displayName = "PasswordInput";
1249
- function Te(t) {
1249
+ function Re(t) {
1250
1250
  let r = 0;
1251
1251
  return t.length >= 8 && r++, t.length >= 12 && r++, /[A-Z]/.test(t) && /[a-z]/.test(t) && r++, /\d/.test(t) && r++, /[^A-Za-z0-9]/.test(t) && r++, r <= 1 ? { score: r, label: "Weak", tone: "bg-status-offline" } : r <= 3 ? { score: r, label: "Medium", tone: "bg-status-warn" } : { score: r, label: "Strong", tone: "bg-status-online" };
1252
1252
  }
1253
- function tt({ password: t, className: r }) {
1254
- const { score: n, label: a, tone: i } = Te(t), l = Math.min(n / 5 * 100, 100);
1253
+ function ct({ password: t, className: r }) {
1254
+ const { score: n, label: a, tone: i } = Re(t), c = Math.min(n / 5 * 100, 100);
1255
1255
  return t ? /* @__PURE__ */ s("div", { className: h("mt-2", r), children: [
1256
- /* @__PURE__ */ e("div", { className: "h-1.5 w-full overflow-hidden rounded-full bg-card-border", children: /* @__PURE__ */ e("div", { className: h("h-full rounded-full transition-all duration-200", i), style: { width: `${l}%` } }) }),
1256
+ /* @__PURE__ */ e("div", { className: "h-1.5 w-full overflow-hidden rounded-full bg-card-border", children: /* @__PURE__ */ e("div", { className: h("h-full rounded-full transition-all duration-200", i), style: { width: `${c}%` } }) }),
1257
1257
  /* @__PURE__ */ s("p", { className: "mt-1 text-xs text-ink-secondary", children: [
1258
1258
  "Strength: ",
1259
1259
  a
@@ -1261,7 +1261,7 @@ function tt({ password: t, className: r }) {
1261
1261
  ] }) : null;
1262
1262
  }
1263
1263
  const Fe = b.forwardRef(
1264
- ({ value: t, onChange: r, onFilterClick: n, placeholder: a = "Search Data", className: i, ...l }, c) => /* @__PURE__ */ s(
1264
+ ({ value: t, onChange: r, onFilterClick: n, placeholder: a = "Search Data", className: i, ...c }, l) => /* @__PURE__ */ s(
1265
1265
  "div",
1266
1266
  {
1267
1267
  className: h(
@@ -1270,32 +1270,32 @@ const Fe = b.forwardRef(
1270
1270
  i
1271
1271
  ),
1272
1272
  children: [
1273
- /* @__PURE__ */ e(F, { size: 16, className: "shrink-0 text-ink-muted" }),
1273
+ /* @__PURE__ */ e(P, { size: 16, className: "shrink-0 text-ink-muted" }),
1274
1274
  /* @__PURE__ */ e(
1275
1275
  "input",
1276
1276
  {
1277
- ref: c,
1277
+ ref: l,
1278
1278
  value: t,
1279
1279
  onChange: (f) => r(f.target.value),
1280
1280
  placeholder: a,
1281
1281
  className: "w-full bg-transparent text-sm text-ink-primary placeholder:text-ink-muted focus:outline-none",
1282
- ...l
1282
+ ...c
1283
1283
  }
1284
1284
  ),
1285
- t && /* @__PURE__ */ e("button", { type: "button", "aria-label": "Clear search", onClick: () => r(""), className: "text-ink-muted hover:text-ink-primary", children: /* @__PURE__ */ e(R, { size: 14 }) }),
1286
- n && /* @__PURE__ */ e("button", { type: "button", "aria-label": "Filters", onClick: n, className: "text-ink-muted hover:text-accent", children: /* @__PURE__ */ e(_, { size: 16 }) })
1285
+ t && /* @__PURE__ */ e("button", { type: "button", "aria-label": "Clear search", onClick: () => r(""), className: "text-ink-muted hover:text-ink-primary", children: /* @__PURE__ */ e(D, { size: 14 }) }),
1286
+ n && /* @__PURE__ */ e("button", { type: "button", "aria-label": "Filters", onClick: n, className: "text-ink-muted hover:text-accent", children: /* @__PURE__ */ e(K, { size: 16 }) })
1287
1287
  ]
1288
1288
  }
1289
1289
  )
1290
1290
  );
1291
1291
  Fe.displayName = "SearchBox";
1292
- function Pe({ open: t, onClose: r, title: n, width: a = "480px", children: i, className: l }) {
1292
+ function Ie({ open: t, onClose: r, title: n, width: a = "480px", children: i, className: c }) {
1293
1293
  return b.useEffect(() => {
1294
1294
  if (!t) return;
1295
- function c(f) {
1295
+ function l(f) {
1296
1296
  f.key === "Escape" && r();
1297
1297
  }
1298
- return document.addEventListener("keydown", c), () => document.removeEventListener("keydown", c);
1298
+ return document.addEventListener("keydown", l), () => document.removeEventListener("keydown", l);
1299
1299
  }, [t, r]), t ? H(
1300
1300
  /* @__PURE__ */ s("div", { className: "fixed inset-0 z-50", children: [
1301
1301
  /* @__PURE__ */ e("div", { className: "absolute inset-0 bg-black/50", onClick: r, "aria-hidden": !0 }),
@@ -1307,12 +1307,12 @@ function Pe({ open: t, onClose: r, title: n, width: a = "480px", children: i, cl
1307
1307
  style: { width: a },
1308
1308
  className: h(
1309
1309
  "absolute right-0 top-0 flex h-full max-w-full flex-col border-l border-card-border bg-card shadow-xl",
1310
- l
1310
+ c
1311
1311
  ),
1312
1312
  children: [
1313
1313
  n && /* @__PURE__ */ s("div", { className: "flex items-center justify-between border-b border-card-border px-5 py-4", children: [
1314
1314
  /* @__PURE__ */ e("h2", { className: "font-secondary text-base font-semibold text-ink-primary", children: n }),
1315
- /* @__PURE__ */ e("button", { onClick: r, "aria-label": "Close", className: "text-ink-muted hover:text-ink-primary", children: /* @__PURE__ */ e(R, { size: 18 }) })
1315
+ /* @__PURE__ */ e("button", { onClick: r, "aria-label": "Close", className: "text-ink-muted hover:text-ink-primary", children: /* @__PURE__ */ e(D, { size: 18 }) })
1316
1316
  ] }),
1317
1317
  /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto px-5 py-4", children: i })
1318
1318
  ]
@@ -1322,24 +1322,24 @@ function Pe({ open: t, onClose: r, title: n, width: a = "480px", children: i, cl
1322
1322
  document.body
1323
1323
  ) : null;
1324
1324
  }
1325
- function rt({ start: t, end: r, className: n, ...a }) {
1325
+ function lt({ start: t, end: r, className: n, ...a }) {
1326
1326
  return /* @__PURE__ */ s("div", { className: h("flex flex-wrap items-center justify-between gap-3 py-2", n), ...a, children: [
1327
1327
  /* @__PURE__ */ e("div", { className: "flex flex-1 items-center gap-2", children: t }),
1328
1328
  /* @__PURE__ */ e("div", { className: "flex items-center gap-1.5", children: r })
1329
1329
  ] });
1330
1330
  }
1331
- function Ie({ items: t, value: r, onChange: n, className: a }) {
1331
+ function qe({ items: t, value: r, onChange: n, className: a }) {
1332
1332
  return /* @__PURE__ */ e("div", { role: "tablist", className: h("flex items-center gap-1 border-b border-card-border", a), children: t.map((i) => {
1333
- const l = i.value === r;
1333
+ const c = i.value === r;
1334
1334
  return /* @__PURE__ */ s(
1335
1335
  "button",
1336
1336
  {
1337
1337
  role: "tab",
1338
- "aria-selected": l,
1338
+ "aria-selected": c,
1339
1339
  onClick: () => n(i.value),
1340
1340
  className: h(
1341
1341
  "flex items-center gap-1.5 border-b-2 px-4 py-2 text-sm font-medium transition-colors",
1342
- l ? "border-accent text-accent" : "border-transparent text-ink-secondary hover:text-ink-primary"
1342
+ c ? "border-accent text-accent" : "border-transparent text-ink-secondary hover:text-ink-primary"
1343
1343
  ),
1344
1344
  children: [
1345
1345
  i.icon,
@@ -1350,20 +1350,20 @@ function Ie({ items: t, value: r, onChange: n, className: a }) {
1350
1350
  );
1351
1351
  }) });
1352
1352
  }
1353
- function nt({ options: t, value: r, onChange: n, className: a }) {
1354
- return /* @__PURE__ */ e("div", { className: h("inline-flex overflow-hidden rounded-md border border-card-border", a), role: "tablist", children: t.map((i, l) => {
1355
- const c = i.value === r;
1353
+ function ot({ options: t, value: r, onChange: n, className: a }) {
1354
+ return /* @__PURE__ */ e("div", { className: h("inline-flex overflow-hidden rounded-md border border-card-border", a), role: "tablist", children: t.map((i, c) => {
1355
+ const l = i.value === r;
1356
1356
  return /* @__PURE__ */ e(
1357
1357
  "button",
1358
1358
  {
1359
1359
  type: "button",
1360
1360
  role: "tab",
1361
- "aria-selected": c,
1361
+ "aria-selected": l,
1362
1362
  onClick: () => n(i.value),
1363
1363
  className: h(
1364
1364
  "h-9 px-4 text-sm font-medium transition-colors",
1365
- l === 0 ? "border-r border-card-border" : "",
1366
- c ? "bg-accent text-white" : "bg-input text-ink-secondary hover:bg-accent-muted"
1365
+ c === 0 ? "border-r border-card-border" : "",
1366
+ l ? "bg-accent text-white" : "bg-input text-ink-secondary hover:bg-accent-muted"
1367
1367
  ),
1368
1368
  children: i.label
1369
1369
  },
@@ -1371,13 +1371,13 @@ function nt({ options: t, value: r, onChange: n, className: a }) {
1371
1371
  );
1372
1372
  }) });
1373
1373
  }
1374
- function at({ logo: t, children: r, className: n }) {
1374
+ function dt({ logo: t, children: r, className: n }) {
1375
1375
  return /* @__PURE__ */ e("div", { className: h("flex min-h-screen items-center justify-center bg-canvas px-4", n), children: /* @__PURE__ */ s("div", { className: "w-full max-w-md", children: [
1376
1376
  t && /* @__PURE__ */ e("div", { className: "mb-8 flex justify-center", children: t }),
1377
1377
  /* @__PURE__ */ e("div", { className: "rounded-lg border border-card-border bg-card p-8 shadow-lg", children: r })
1378
1378
  ] }) });
1379
1379
  }
1380
- function it({ className: t, children: r, ...n }) {
1380
+ function ut({ className: t, children: r, ...n }) {
1381
1381
  return /* @__PURE__ */ e(
1382
1382
  "footer",
1383
1383
  {
@@ -1387,7 +1387,7 @@ function it({ className: t, children: r, ...n }) {
1387
1387
  }
1388
1388
  );
1389
1389
  }
1390
- function st({ title: t, search: r, profileMenu: n, actions: a, className: i }) {
1390
+ function ft({ title: t, search: r, profileMenu: n, actions: a, className: i }) {
1391
1391
  return /* @__PURE__ */ s(
1392
1392
  "header",
1393
1393
  {
@@ -1406,7 +1406,7 @@ function st({ title: t, search: r, profileMenu: n, actions: a, className: i }) {
1406
1406
  }
1407
1407
  );
1408
1408
  }
1409
- function lt({ sidebar: t, header: r, footer: n, children: a, className: i }) {
1409
+ function mt({ sidebar: t, header: r, footer: n, children: a, className: i }) {
1410
1410
  return /* @__PURE__ */ s("div", { className: h("flex h-screen w-full overflow-hidden bg-canvas", i), children: [
1411
1411
  t,
1412
1412
  /* @__PURE__ */ s("div", { className: "flex min-w-0 flex-1 flex-col", children: [
@@ -1416,29 +1416,29 @@ function lt({ sidebar: t, header: r, footer: n, children: a, className: i }) {
1416
1416
  ] })
1417
1417
  ] });
1418
1418
  }
1419
- function ct({ name: t, role: r, avatarUrl: n, onSignOut: a, actions: i = [], className: l }) {
1420
- const [c, f] = b.useState(!1), d = b.useRef(null);
1419
+ function ht({ name: t, role: r, avatarUrl: n, onSignOut: a, actions: i = [], className: c }) {
1420
+ const [l, f] = b.useState(!1), o = b.useRef(null);
1421
1421
  return b.useEffect(() => {
1422
- function u(o) {
1423
- d.current && !d.current.contains(o.target) && f(!1);
1422
+ function d(u) {
1423
+ o.current && !o.current.contains(u.target) && f(!1);
1424
1424
  }
1425
- return document.addEventListener("mousedown", u), () => document.removeEventListener("mousedown", u);
1426
- }, []), /* @__PURE__ */ s("div", { ref: d, className: h("relative", l), children: [
1427
- /* @__PURE__ */ e("button", { onClick: () => f((u) => !u), className: "flex items-center gap-2", "aria-label": "Open profile menu", children: n ? /* @__PURE__ */ e("img", { src: n, alt: "", className: "h-9 w-9 rounded-full object-cover" }) : /* @__PURE__ */ e("span", { className: "flex h-9 w-9 items-center justify-center rounded-full bg-accent-muted text-accent", children: /* @__PURE__ */ e(Ne, { size: 16 }) }) }),
1428
- c && /* @__PURE__ */ s("div", { className: "absolute right-0 z-30 mt-2 w-56 rounded-lg border border-card-border bg-card p-4 shadow-lg", children: [
1425
+ return document.addEventListener("mousedown", d), () => document.removeEventListener("mousedown", d);
1426
+ }, []), /* @__PURE__ */ s("div", { ref: o, className: h("relative", c), children: [
1427
+ /* @__PURE__ */ e("button", { onClick: () => f((d) => !d), className: "flex items-center gap-2", "aria-label": "Open profile menu", children: n ? /* @__PURE__ */ e("img", { src: n, alt: "", className: "h-9 w-9 rounded-full object-cover" }) : /* @__PURE__ */ e("span", { className: "flex h-9 w-9 items-center justify-center rounded-full bg-accent-muted text-accent", children: /* @__PURE__ */ e(Me, { size: 16 }) }) }),
1428
+ l && /* @__PURE__ */ s("div", { className: "absolute right-0 z-30 mt-2 w-56 rounded-lg border border-card-border bg-card p-4 shadow-lg", children: [
1429
1429
  /* @__PURE__ */ e("p", { className: "font-secondary text-sm font-semibold text-ink-primary", children: t }),
1430
1430
  /* @__PURE__ */ e("p", { className: "text-xs text-ink-muted", children: r }),
1431
- i.length > 0 && /* @__PURE__ */ e("div", { className: "mt-3 flex flex-col gap-1 border-t border-card-border pt-3", children: i.map((u) => /* @__PURE__ */ s(
1431
+ i.length > 0 && /* @__PURE__ */ e("div", { className: "mt-3 flex flex-col gap-1 border-t border-card-border pt-3", children: i.map((d) => /* @__PURE__ */ s(
1432
1432
  "button",
1433
1433
  {
1434
- onClick: u.onClick,
1434
+ onClick: d.onClick,
1435
1435
  className: "flex items-center gap-2 rounded px-2 py-1.5 text-left text-sm text-ink-primary hover:bg-accent-muted",
1436
1436
  children: [
1437
- u.icon,
1438
- u.label
1437
+ d.icon,
1438
+ d.label
1439
1439
  ]
1440
1440
  },
1441
- u.label
1441
+ d.label
1442
1442
  )) }),
1443
1443
  /* @__PURE__ */ s(
1444
1444
  "button",
@@ -1446,7 +1446,7 @@ function ct({ name: t, role: r, avatarUrl: n, onSignOut: a, actions: i = [], cla
1446
1446
  onClick: a,
1447
1447
  className: "mt-2 flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm text-status-offline hover:bg-status-offline-bg",
1448
1448
  children: [
1449
- /* @__PURE__ */ e(ye, { size: 14 }),
1449
+ /* @__PURE__ */ e(we, { size: 14 }),
1450
1450
  "Sign out"
1451
1451
  ]
1452
1452
  }
@@ -1454,7 +1454,7 @@ function ct({ name: t, role: r, avatarUrl: n, onSignOut: a, actions: i = [], cla
1454
1454
  ] })
1455
1455
  ] });
1456
1456
  }
1457
- function ot({ items: t, collapsed: r, onCollapsedChange: n, logo: a, className: i }) {
1457
+ function bt({ items: t, collapsed: r, onCollapsedChange: n, logo: a, className: i }) {
1458
1458
  return /* @__PURE__ */ s(
1459
1459
  "aside",
1460
1460
  {
@@ -1465,22 +1465,22 @@ function ot({ items: t, collapsed: r, onCollapsedChange: n, logo: a, className:
1465
1465
  ),
1466
1466
  children: [
1467
1467
  a && /* @__PURE__ */ e("div", { className: "flex h-16 items-center justify-center border-b border-sidebar-border", children: a }),
1468
- /* @__PURE__ */ e("nav", { className: "flex flex-1 flex-col gap-1 p-2", children: t.map((l) => /* @__PURE__ */ s(
1468
+ /* @__PURE__ */ e("nav", { className: "flex flex-1 flex-col gap-1 p-2", children: t.map((c) => /* @__PURE__ */ s(
1469
1469
  "button",
1470
1470
  {
1471
- onClick: l.onClick,
1472
- title: r ? l.label : void 0,
1471
+ onClick: c.onClick,
1472
+ title: r ? c.label : void 0,
1473
1473
  className: h(
1474
1474
  "flex items-center gap-3 rounded-md px-3 py-2.5 text-sm font-medium transition-colors",
1475
- l.active ? "border-l-2 bg-nav-active-bg text-ink-onchrome" : "text-icon-idle hover:bg-nav-active-bg hover:text-icon-active"
1475
+ c.active ? "border-l-2 bg-nav-active-bg text-ink-onchrome" : "text-icon-idle hover:bg-nav-active-bg hover:text-icon-active"
1476
1476
  ),
1477
- style: l.active ? { borderColor: "var(--nav-active-border)" } : void 0,
1477
+ style: c.active ? { borderColor: "var(--nav-active-border)" } : void 0,
1478
1478
  children: [
1479
- /* @__PURE__ */ e("span", { className: "shrink-0", children: l.icon }),
1480
- !r && /* @__PURE__ */ e("span", { className: "truncate", children: l.label })
1479
+ /* @__PURE__ */ e("span", { className: "shrink-0", children: c.icon }),
1480
+ !r && /* @__PURE__ */ e("span", { className: "truncate", children: c.label })
1481
1481
  ]
1482
1482
  },
1483
- l.key
1483
+ c.key
1484
1484
  )) }),
1485
1485
  n && /* @__PURE__ */ e(
1486
1486
  "button",
@@ -1495,7 +1495,7 @@ function ot({ items: t, collapsed: r, onCollapsedChange: n, logo: a, className:
1495
1495
  }
1496
1496
  );
1497
1497
  }
1498
- function dt({ onOpen: t, className: r }) {
1498
+ function xt({ onOpen: t, className: r }) {
1499
1499
  function n() {
1500
1500
  if (t) return t();
1501
1501
  const a = window.open("", "_blank");
@@ -1512,50 +1512,50 @@ function dt({ onOpen: t, className: r }) {
1512
1512
  "bg-accent-light text-white shadow-lg hover:brightness-110 active:scale-95 transition-all",
1513
1513
  r
1514
1514
  ),
1515
- children: /* @__PURE__ */ e(ue, { size: 22 })
1515
+ children: /* @__PURE__ */ e(he, { size: 22 })
1516
1516
  }
1517
1517
  );
1518
1518
  }
1519
- function ut({ title: t, loading: r, onReload: n, onExport: a, onFilter: i, children: l, className: c }) {
1520
- return /* @__PURE__ */ s("div", { className: h("flex flex-col rounded-lg border border-card-border bg-card", c), children: [
1519
+ function pt({ title: t, loading: r, onReload: n, onExport: a, onFilter: i, children: c, className: l }) {
1520
+ return /* @__PURE__ */ s("div", { className: h("flex flex-col rounded-lg border border-card-border bg-card", l), children: [
1521
1521
  /* @__PURE__ */ s("div", { className: "flex items-center justify-between border-b border-card-border px-4 py-3", children: [
1522
1522
  /* @__PURE__ */ e("h3", { className: "font-secondary text-sm font-semibold text-ink-primary", children: t }),
1523
1523
  /* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
1524
- i && /* @__PURE__ */ e(L, { icon: /* @__PURE__ */ e(_, { size: 14 }), label: "Filter", size: "sm", onClick: i }),
1525
- n && /* @__PURE__ */ e(L, { icon: /* @__PURE__ */ e(ke, { size: 14 }), label: "Reload", size: "sm", onClick: n }),
1526
- a && /* @__PURE__ */ e(L, { icon: /* @__PURE__ */ e(be, { size: 14 }), label: "Export", size: "sm", onClick: a })
1524
+ i && /* @__PURE__ */ e(S, { icon: /* @__PURE__ */ e(K, { size: 14 }), label: "Filter", size: "sm", onClick: i }),
1525
+ n && /* @__PURE__ */ e(S, { icon: /* @__PURE__ */ e(Ce, { size: 14 }), label: "Reload", size: "sm", onClick: n }),
1526
+ a && /* @__PURE__ */ e(S, { icon: /* @__PURE__ */ e(ge, { size: 14 }), label: "Export", size: "sm", onClick: a })
1527
1527
  ] })
1528
1528
  ] }),
1529
- /* @__PURE__ */ e("div", { className: "p-4", children: r ? /* @__PURE__ */ e(K, { label: "Loading widget..." }) : l })
1529
+ /* @__PURE__ */ e("div", { className: "p-4", children: r ? /* @__PURE__ */ e(ee, { label: "Loading widget..." }) : c })
1530
1530
  ] });
1531
1531
  }
1532
- const Oe = [
1532
+ const We = [
1533
1533
  { value: "pdf", label: "Invoice PDF" },
1534
1534
  { value: "excel", label: "Renewal Excel" }
1535
1535
  ];
1536
- function mt({
1536
+ function gt({
1537
1537
  open: t,
1538
1538
  onClose: r,
1539
1539
  customerEmail: n,
1540
1540
  activeTab: a,
1541
1541
  onTabChange: i,
1542
- onSendEmail: l,
1543
- children: c
1542
+ onSendEmail: c,
1543
+ children: l
1544
1544
  }) {
1545
- return /* @__PURE__ */ e(Pe, { open: t, onClose: r, title: "Invoice preview", width: "640px", children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-4", children: [
1546
- /* @__PURE__ */ e(Ie, { items: Oe, value: a, onChange: i }),
1545
+ return /* @__PURE__ */ e(Ie, { open: t, onClose: r, title: "Invoice preview", width: "640px", children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-4", children: [
1546
+ /* @__PURE__ */ e(qe, { items: We, value: a, onChange: i }),
1547
1547
  n && /* @__PURE__ */ s("div", { className: "flex items-center justify-between rounded-md bg-accent-muted px-3 py-2 text-sm", children: [
1548
1548
  /* @__PURE__ */ s("span", { className: "flex items-center gap-2 text-ink-secondary", children: [
1549
- /* @__PURE__ */ e(ve, { size: 14 }),
1549
+ /* @__PURE__ */ e(Ne, { size: 14 }),
1550
1550
  n
1551
1551
  ] }),
1552
- l && /* @__PURE__ */ e(M, { size: "sm", variant: "secondary", onClick: l, children: "Send" })
1552
+ c && /* @__PURE__ */ e(B, { size: "sm", variant: "secondary", onClick: c, children: "Send" })
1553
1553
  ] }),
1554
- /* @__PURE__ */ e("div", { className: "min-h-[60vh]", children: c })
1554
+ /* @__PURE__ */ e("div", { className: "min-h-[60vh]", children: l })
1555
1555
  ] }) });
1556
1556
  }
1557
- function ft({ open: t, onClose: r, title: n = "Changes", fields: a }) {
1558
- return /* @__PURE__ */ e(I, { open: t, onClose: r, title: n, size: "md", children: /* @__PURE__ */ s("div", { className: "grid grid-cols-3 gap-2 text-sm", children: [
1557
+ function vt({ open: t, onClose: r, title: n = "Changes", fields: a }) {
1558
+ return /* @__PURE__ */ e(R, { open: t, onClose: r, title: n, size: "md", children: /* @__PURE__ */ s("div", { className: "grid grid-cols-3 gap-2 text-sm", children: [
1559
1559
  /* @__PURE__ */ e("div", { className: "font-medium text-ink-secondary", children: "Field" }),
1560
1560
  /* @__PURE__ */ e("div", { className: "font-medium text-ink-secondary", children: "Previous" }),
1561
1561
  /* @__PURE__ */ e("div", { className: "font-medium text-ink-secondary", children: "Current" }),
@@ -1566,46 +1566,264 @@ function ft({ open: t, onClose: r, title: n = "Changes", fields: a }) {
1566
1566
  ] }, i.label))
1567
1567
  ] }) });
1568
1568
  }
1569
+ const W = {
1570
+ chromeBg: "--chrome-bg",
1571
+ chromeDeep: "--chrome-deep",
1572
+ canvasBg: "--canvas-bg",
1573
+ cardBg: "--card-bg",
1574
+ cardBorder: "--card-border",
1575
+ accentPrimary: "--accent-primary",
1576
+ accentLight: "--accent-light",
1577
+ accentMutedBg: "--accent-muted-bg",
1578
+ accentBorder: "--accent-border",
1579
+ textPrimary: "--text-primary",
1580
+ textSecondary: "--text-secondary",
1581
+ textMuted: "--text-muted",
1582
+ textOnChrome: "--text-on-chrome",
1583
+ iconIdle: "--icon-idle",
1584
+ iconActive: "--icon-active",
1585
+ statusOnline: "--status-online",
1586
+ statusOnlineBg: "--status-online-bg",
1587
+ statusWarn: "--status-warn",
1588
+ statusWarnBg: "--status-warn-bg",
1589
+ statusOffline: "--status-offline",
1590
+ statusOfflineBg: "--status-offline-bg",
1591
+ liveBg: "--live-bg",
1592
+ liveText: "--live-text",
1593
+ sidebarBorder: "--sidebar-border",
1594
+ topbarBorder: "--topbar-border",
1595
+ navActiveBg: "--nav-active-bg",
1596
+ navActiveBorder: "--nav-active-border",
1597
+ tagBg: "--tag-bg",
1598
+ tagText: "--tag-text",
1599
+ tagBorder: "--tag-border",
1600
+ inputBg: "--input-bg"
1601
+ }, re = {
1602
+ "slate-navy": {
1603
+ label: "Theme 1 — Slate Navy",
1604
+ chromeBg: "#0d1b2e",
1605
+ chromeDeep: "#0a1626",
1606
+ canvasBg: "#f4f6f9",
1607
+ cardBg: "#ffffff",
1608
+ cardBorder: "#e2e8f0",
1609
+ accentPrimary: "#1d4ed8",
1610
+ accentLight: "#60a5fa",
1611
+ accentMutedBg: "#eff6ff",
1612
+ accentBorder: "#bfdbfe",
1613
+ textPrimary: "#0d1b2e",
1614
+ textSecondary: "#718096",
1615
+ textMuted: "#a0aec0",
1616
+ textOnChrome: "#e8edf5",
1617
+ iconIdle: "#4b7bab",
1618
+ iconActive: "#60a5fa",
1619
+ statusOnline: "#1a9b5a",
1620
+ statusOnlineBg: "#f0fdf4",
1621
+ statusWarn: "#e07b00",
1622
+ statusWarnBg: "#fffbeb",
1623
+ statusOffline: "#c53030",
1624
+ statusOfflineBg: "#fff5f5",
1625
+ liveBg: "#eff6ff",
1626
+ liveText: "#1d4ed8",
1627
+ barColors: ["#1d4ed8", "#3b82f6", "#60a5fa", "#93c5fd", "#bfdbfe", "#dbeafe", "#eff6ff"],
1628
+ sidebarBorder: "transparent",
1629
+ topbarBorder: "transparent",
1630
+ navActiveBg: "rgba(29,78,216,0.08)",
1631
+ navActiveBorder: "#1d4ed8",
1632
+ tagBg: "#eff6ff",
1633
+ tagText: "#1d4ed8",
1634
+ tagBorder: "#bfdbfe",
1635
+ inputBg: "#f4f6f9"
1636
+ },
1637
+ "arctic-white": {
1638
+ label: "Theme 2 — Arctic White",
1639
+ chromeBg: "#ffffff",
1640
+ chromeDeep: "#f8fafc",
1641
+ canvasBg: "#f1f5f9",
1642
+ cardBg: "#ffffff",
1643
+ cardBorder: "#e2e8f0",
1644
+ accentPrimary: "#2563eb",
1645
+ accentLight: "#3b82f6",
1646
+ accentMutedBg: "#eff6ff",
1647
+ accentBorder: "#bfdbfe",
1648
+ textPrimary: "#0f172a",
1649
+ textSecondary: "#64748b",
1650
+ textMuted: "#94a3b8",
1651
+ textOnChrome: "#0f172a",
1652
+ iconIdle: "#94a3b8",
1653
+ iconActive: "#2563eb",
1654
+ statusOnline: "#15803d",
1655
+ statusOnlineBg: "#f0fdf4",
1656
+ statusWarn: "#b45309",
1657
+ statusWarnBg: "#fffbeb",
1658
+ statusOffline: "#b91c1c",
1659
+ statusOfflineBg: "#fef2f2",
1660
+ liveBg: "#f0fdf4",
1661
+ liveText: "#15803d",
1662
+ barColors: ["#0ea5e9", "#38bdf8", "#7dd3fc", "#bae6fd", "#e0f2fe", "#f0f9ff", "#f8fafc"],
1663
+ sidebarBorder: "#e2e8f0",
1664
+ topbarBorder: "#e5e7eb",
1665
+ navActiveBg: "#eff6ff",
1666
+ navActiveBorder: "#2563eb",
1667
+ tagBg: "#eff6ff",
1668
+ tagText: "#2563eb",
1669
+ tagBorder: "#bfdbfe",
1670
+ inputBg: "#f8fafc"
1671
+ },
1672
+ "carbon-pro": {
1673
+ label: "Theme 3 — Carbon Pro",
1674
+ chromeBg: "#161b22",
1675
+ chromeDeep: "#0d1117",
1676
+ canvasBg: "#1c2128",
1677
+ cardBg: "#21262d",
1678
+ cardBorder: "#30363d",
1679
+ accentPrimary: "#58a6ff",
1680
+ accentLight: "#79c0ff",
1681
+ accentMutedBg: "#0d2a1f",
1682
+ accentBorder: "#30363d",
1683
+ textPrimary: "#e6edf3",
1684
+ textSecondary: "#c9d1d9",
1685
+ textMuted: "#8b949e",
1686
+ textOnChrome: "#e6edf3",
1687
+ iconIdle: "#484f58",
1688
+ iconActive: "#58a6ff",
1689
+ statusOnline: "#34d399",
1690
+ statusOnlineBg: "#0d2a1f",
1691
+ statusWarn: "#fbbf24",
1692
+ statusWarnBg: "#1f1a00",
1693
+ statusOffline: "#f87171",
1694
+ statusOfflineBg: "#1f0a0a",
1695
+ liveBg: "#0d2a1f",
1696
+ liveText: "#34d399",
1697
+ barColors: ["#58a6ff", "#388bfd", "#1f6feb", "#0d419d", "#0a2d6e", "#071e4a", "#040f2b"],
1698
+ sidebarBorder: "#21262d",
1699
+ topbarBorder: "#30363d",
1700
+ navActiveBg: "rgba(88,166,255,0.08)",
1701
+ navActiveBorder: "#58a6ff",
1702
+ tagBg: "#21262d",
1703
+ tagText: "#58a6ff",
1704
+ tagBorder: "#30363d",
1705
+ inputBg: "#21262d"
1706
+ },
1707
+ "narnix-edge": {
1708
+ label: "Theme 4 — Narnix Edge",
1709
+ chromeBg: "#061828",
1710
+ chromeDeep: "#040f1a",
1711
+ canvasBg: "#0b1e30",
1712
+ cardBg: "#112035",
1713
+ cardBorder: "#1e3a55",
1714
+ accentPrimary: "#00c9a7",
1715
+ accentLight: "#00ddb8",
1716
+ accentMutedBg: "#0a2240",
1717
+ accentBorder: "#1e3a55",
1718
+ textPrimary: "#daeaf8",
1719
+ textSecondary: "#a8c4d9",
1720
+ textMuted: "#4a7fa5",
1721
+ textOnChrome: "#daeaf8",
1722
+ iconIdle: "#2e5470",
1723
+ iconActive: "#00c9a7",
1724
+ statusOnline: "#00c9a7",
1725
+ statusOnlineBg: "#072219",
1726
+ statusWarn: "#f5a623",
1727
+ statusWarnBg: "#1e1200",
1728
+ statusOffline: "#e05252",
1729
+ statusOfflineBg: "#1a0808",
1730
+ liveBg: "#072219",
1731
+ liveText: "#00c9a7",
1732
+ barColors: ["#00ddb8", "#00c9a7", "#00b898", "#00a88a", "#018870", "#016a55", "#015a4a"],
1733
+ sidebarBorder: "#0e2236",
1734
+ topbarBorder: "#0e2236",
1735
+ navActiveBg: "rgba(0,201,167,0.08)",
1736
+ navActiveBorder: "#00c9a7",
1737
+ tagBg: "#0a2240",
1738
+ tagText: "#4a9ecf",
1739
+ tagBorder: "#1e3a55",
1740
+ inputBg: "#0b1e30"
1741
+ }
1742
+ }, $e = "narnix-edge", ne = b.createContext(null);
1743
+ function Ye(t, r) {
1744
+ const n = re[r];
1745
+ Object.keys(W).forEach((a) => {
1746
+ t.style.setProperty(W[a], n[a]);
1747
+ }), n.barColors.forEach((a, i) => {
1748
+ t.style.setProperty(`--bar-color-${i}`, a);
1749
+ }), t.dataset.theme = r;
1750
+ }
1751
+ function yt({ theme: t, onThemeChange: r, children: n }) {
1752
+ const [a, i] = b.useState(t ?? $e), c = t ?? a, l = b.useRef(null);
1753
+ b.useEffect(() => {
1754
+ l.current && Ye(l.current, c);
1755
+ }, [c]);
1756
+ const f = b.useCallback(
1757
+ (d) => {
1758
+ i(d), r == null || r(d);
1759
+ },
1760
+ [r]
1761
+ ), o = b.useMemo(() => ({ theme: c, setTheme: f, themes: re }), [c, f]);
1762
+ return /* @__PURE__ */ e(ne.Provider, { value: o, children: /* @__PURE__ */ e("div", { ref: l, "data-sls-theme-root": !0, children: n }) });
1763
+ }
1764
+ function He() {
1765
+ const t = b.useContext(ne);
1766
+ if (!t) throw new Error("useTheme must be used inside <ThemeProvider>");
1767
+ return t;
1768
+ }
1769
+ function kt({ className: t }) {
1770
+ const { theme: r, setTheme: n, themes: a } = He();
1771
+ return /* @__PURE__ */ e(
1772
+ "select",
1773
+ {
1774
+ value: r,
1775
+ onChange: (i) => n(i.target.value),
1776
+ className: h(
1777
+ "rounded-md border border-card-border bg-input px-3 py-1.5 text-sm text-ink-primary",
1778
+ "focus:outline-none focus:ring-2 focus:ring-accent/40",
1779
+ t
1780
+ ),
1781
+ children: Object.keys(a).map((i) => /* @__PURE__ */ e("option", { value: i, children: a[i].label }, i))
1782
+ }
1783
+ );
1784
+ }
1569
1785
  export {
1570
- at as AuthLayout,
1571
- Ye as Badge,
1572
- M as Button,
1573
- ie as Card,
1574
- ft as ChangesPreviewModal,
1575
- P as Checkbox,
1576
- He as ColumnFilterDropdown,
1577
- Ve as ConfirmDialog,
1578
- We as DataTable,
1579
- Ge as DatePicker,
1580
- Ue as DateRangePicker,
1581
- Qe as Dropdown,
1582
- Ze as DynamicRowList,
1583
- Je as FilterPanel,
1584
- Re as FloatingAddButton,
1585
- it as Footer,
1586
- D as FormGroup,
1587
- Xe as FormModal,
1588
- st as Header,
1589
- L as IconButton,
1590
- Ae as InputField,
1591
- mt as InvoicePreviewModal,
1592
- dt as LicenseAgentButton,
1593
- K as Loader,
1594
- lt as MainLayout,
1595
- I as Modal,
1596
- _e as MultiSelectDropdown,
1597
- Ke as Pagination,
1598
- et as Panel,
1786
+ dt as AuthLayout,
1787
+ _e as Badge,
1788
+ B as Button,
1789
+ le as Card,
1790
+ vt as ChangesPreviewModal,
1791
+ E as Checkbox,
1792
+ Qe as ColumnFilterDropdown,
1793
+ Ze as ConfirmDialog,
1794
+ Je as DataTable,
1795
+ Xe as DatePicker,
1796
+ Ke as DateRangePicker,
1797
+ et as Dropdown,
1798
+ tt as DynamicRowList,
1799
+ rt as FilterPanel,
1800
+ Oe as FloatingAddButton,
1801
+ ut as Footer,
1802
+ L as FormGroup,
1803
+ nt as FormModal,
1804
+ ft as Header,
1805
+ S as IconButton,
1806
+ Pe as InputField,
1807
+ gt as InvoicePreviewModal,
1808
+ xt as LicenseAgentButton,
1809
+ ee as Loader,
1810
+ mt as MainLayout,
1811
+ R as Modal,
1812
+ at as MultiSelectDropdown,
1813
+ it as Pagination,
1814
+ st as Panel,
1599
1815
  Ee as PasswordInput,
1600
- tt as PasswordStrengthMeter,
1601
- ct as ProfileMenu,
1602
- ut as ReportWidget,
1603
- q as RowSelectCheckbox,
1816
+ ct as PasswordStrengthMeter,
1817
+ ht as ProfileMenu,
1818
+ pt as ReportWidget,
1819
+ I as RowSelectCheckbox,
1604
1820
  Fe as SearchBox,
1605
- ot as Sidebar,
1606
- Pe as SlideOverModal,
1607
- rt as TableToolbar,
1608
- Ie as Tabs,
1609
- nt as ToggleButtonGroup,
1610
- Se as ValidationMessage
1821
+ bt as Sidebar,
1822
+ Ie as SlideOverModal,
1823
+ lt as TableToolbar,
1824
+ qe as Tabs,
1825
+ yt as ThemeProvider,
1826
+ kt as ThemeSwitcher,
1827
+ ot as ToggleButtonGroup,
1828
+ Ae as ValidationMessage
1611
1829
  };