@forsyteco/product-ui 0.0.11 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/{active-element-history-BJ1HYFpN.mjs → active-element-history-B7wA4w4L.mjs} +3 -3
  2. package/dist/autocomplete/autocomplete.d.ts +87 -0
  3. package/dist/autocomplete/autocomplete.d.ts.map +1 -0
  4. package/dist/autocomplete/index.cjs +1 -0
  5. package/dist/autocomplete/index.d.ts +4 -0
  6. package/dist/autocomplete/index.d.ts.map +1 -0
  7. package/dist/autocomplete/index.mjs +4 -0
  8. package/dist/autocomplete/types.d.ts +7 -0
  9. package/dist/autocomplete/types.d.ts.map +1 -0
  10. package/dist/autocomplete-DqDP76nV.mjs +318 -0
  11. package/dist/autocomplete-DuGKfbQn.js +1 -0
  12. package/dist/avatar/index.mjs +1 -1
  13. package/dist/{avatar-CN9vtSKm.mjs → avatar-Br4ih6PQ.mjs} +2 -2
  14. package/dist/breadcrumb/index.cjs +1 -1
  15. package/dist/breadcrumb/index.mjs +1 -1
  16. package/dist/{breadcrumb-Bz_JVFcb.mjs → breadcrumb-C81R8CJz.mjs} +2 -2
  17. package/dist/{breadcrumb-y_RB72EG.js → breadcrumb-DJGlCCR1.js} +1 -1
  18. package/dist/{bugs-bn44RJ1Q.mjs → bugs-g7aYPtcD.mjs} +1 -1
  19. package/dist/calendar/calendar.d.ts.map +1 -1
  20. package/dist/calendar/index.cjs +1 -1
  21. package/dist/calendar/index.mjs +1 -1
  22. package/dist/{calendar-CAySGYDy.mjs → calendar-DQdo9vO-.mjs} +1058 -993
  23. package/dist/calendar-v2NOtsdr.js +1 -0
  24. package/dist/chevron-right-CIgI-iLu.js +1 -0
  25. package/dist/{chevron-right-DcjcIxI2.mjs → chevron-right-Ck5BtE5n.mjs} +11 -6
  26. package/dist/combobox/combobox.d.ts +72 -17
  27. package/dist/combobox/combobox.d.ts.map +1 -1
  28. package/dist/combobox/index.cjs +1 -1
  29. package/dist/combobox/index.d.ts +2 -1
  30. package/dist/combobox/index.d.ts.map +1 -1
  31. package/dist/combobox/index.mjs +1 -1
  32. package/dist/combobox/types.d.ts +7 -0
  33. package/dist/combobox/types.d.ts.map +1 -0
  34. package/dist/combobox-B1h2hn6a.js +4 -0
  35. package/dist/combobox-BHLjk9D9.mjs +293 -0
  36. package/dist/combobox-DxpuSWuM.js +1 -0
  37. package/dist/{combobox-Dyen_KC6.mjs → combobox-Umb1ZW9S.mjs} +358 -408
  38. package/dist/data-table/components/table-body.d.ts.map +1 -1
  39. package/dist/date-picker/date-picker.d.ts.map +1 -1
  40. package/dist/{description-CAH1nOgr.mjs → description-hiFZ303Y.mjs} +2 -2
  41. package/dist/dialog/index.mjs +1 -1
  42. package/dist/{dialog-nGcnK6o1.mjs → dialog-Cs7TMa7R.mjs} +53 -53
  43. package/dist/disclosure/index.cjs +1 -1
  44. package/dist/disclosure/index.mjs +1 -1
  45. package/dist/{disclosure-CA45jH3I.mjs → disclosure-DOWglOHy.mjs} +8 -12
  46. package/dist/{disclosure-CGxPdR-8.js → disclosure-qEQ_kll8.js} +1 -1
  47. package/dist/dropdown-menu/index.cjs +1 -1
  48. package/dist/dropdown-menu/index.mjs +1 -1
  49. package/dist/{dropdown-menu-Bj9ftuBZ.mjs → dropdown-menu--aGYYbJi.mjs} +22 -30
  50. package/dist/dropdown-menu-B9fTvSZe.js +1 -0
  51. package/dist/{element-movement-B3AVr940.mjs → element-movement-Bad2OqSj.mjs} +4 -4
  52. package/dist/floating-C1n3e5u7.js +1 -0
  53. package/dist/{floating-dEgEvBqv.mjs → floating-DQ2M2ViQ.mjs} +429 -425
  54. package/dist/{focus-management-DUVCz_zm.mjs → focus-management-BGuC9pKE.mjs} +2 -2
  55. package/dist/{form-fields-CXtJvVC5.mjs → form-fields-Bpp9kTvo.mjs} +2 -2
  56. package/dist/{frozen-Cpa22rmr.mjs → frozen-CXF36eio.mjs} +2 -2
  57. package/dist/{hidden-Blo8kfIB.mjs → hidden-H5tOTsXH.mjs} +1 -1
  58. package/dist/{index-CuNisU0H.mjs → index-Dh75VhI6.mjs} +1 -1
  59. package/dist/index.cjs +1 -1
  60. package/dist/index.d.ts +3 -1
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.mjs +769 -776
  63. package/dist/{keyboard-Bi11Rnr0.mjs → keyboard-BzaAKRwG.mjs} +1 -1
  64. package/dist/{label-DAaE-vxI.mjs → label--pGndX3z.mjs} +3 -3
  65. package/dist/listbox/index.cjs +1 -1
  66. package/dist/listbox/index.mjs +1 -1
  67. package/dist/{listbox-DZ4v8TYt.mjs → listbox-3DAgC6_y.mjs} +17 -21
  68. package/dist/{listbox-BIwbzCji.js → listbox-cpJossI7.js} +1 -1
  69. package/dist/{open-closed-BkH8ZC7H.mjs → open-closed-Be5nD5U2.mjs} +4 -4
  70. package/dist/popover/index.cjs +1 -1
  71. package/dist/popover/index.mjs +1 -1
  72. package/dist/{popover-BAm_8SCx.mjs → popover-CZO6Afya.mjs} +22 -22
  73. package/dist/{popover-B5-dVDC1.js → popover-CysmX396.js} +1 -1
  74. package/dist/{portal-BaBdcS83.mjs → portal-D-TZOwvF.mjs} +6 -6
  75. package/dist/radio-group/index.cjs +1 -1
  76. package/dist/radio-group/index.mjs +1 -1
  77. package/dist/{radio-group-CTf6mrDs.mjs → radio-group-BIQWXrVI.mjs} +8 -8
  78. package/dist/{radio-group-d2V69c7t.js → radio-group-CbQAsBFv.js} +1 -1
  79. package/dist/sonner/index.cjs +1 -1
  80. package/dist/sonner/index.mjs +1 -1
  81. package/dist/{sonner-CuPfwlK5.js → sonner-BRjN2nJD.js} +1 -1
  82. package/dist/{sonner-Ce9PJbum.mjs → sonner-Cgc0p6ph.mjs} +3 -5
  83. package/dist/switch/index.cjs +1 -1
  84. package/dist/switch/index.mjs +1 -1
  85. package/dist/{switch-DqAuXwa2.js → switch-D0OrcI50.js} +1 -1
  86. package/dist/{switch-DKcD0IFH.mjs → switch-Eoi1pTsi.mjs} +13 -13
  87. package/dist/tabs/index.cjs +1 -1
  88. package/dist/tabs/index.mjs +1 -1
  89. package/dist/{tabs-DLqfQ301.mjs → tabs-Cufnu60W.mjs} +15 -15
  90. package/dist/{tabs-X4sPQQYs.js → tabs-TTkcVq-Q.js} +1 -1
  91. package/dist/transition/index.mjs +1 -1
  92. package/dist/{transition-B0MGuDho.mjs → transition-B4KhhkrB.mjs} +4 -4
  93. package/dist/{transition-D0HuUd2-.mjs → transition-Dfxdl8Si.mjs} +1 -1
  94. package/dist/{use-event-listener-BjXsgSkG.mjs → use-event-listener-BUA2xXRr.mjs} +1 -1
  95. package/dist/{use-inert-others-BCB16FKE.mjs → use-inert-others-CgSXXC-d.mjs} +3 -3
  96. package/dist/{use-is-mounted-COmayWN0.mjs → use-is-mounted-DJc35WXO.mjs} +1 -1
  97. package/dist/{use-resolve-button-type-637wy6MK.mjs → use-resolve-button-type-BhmWA6Dl.mjs} +2 -2
  98. package/dist/{use-sync-refs-B0fmGxD4.mjs → use-sync-refs-CDCE8QtA.mjs} +2 -2
  99. package/dist/{use-tab-direction-BTonGsg0.mjs → use-tab-direction-tJsn3ckX.mjs} +8 -8
  100. package/dist/{use-text-value-BMXU9EaO.mjs → use-text-value-BKEvykNe.mjs} +2 -2
  101. package/dist/{use-tree-walker-D25YXIMY.mjs → use-tree-walker-CHC6ccbq.mjs} +2 -2
  102. package/dist/useFocusRing-BM96K_1O.js +1 -0
  103. package/dist/useFocusRing-Df1NuOsX.mjs +497 -0
  104. package/package.json +32 -22
  105. package/dist/calendar-BIhWkTtG.js +0 -1
  106. package/dist/chevron-right-HwlOajQy.js +0 -1
  107. package/dist/combobox-Cm_xVD4l.js +0 -4
  108. package/dist/dropdown-menu-BPMdVlet.js +0 -1
  109. package/dist/floating-CTjRm9bt.js +0 -1
  110. package/dist/useFocusRing-Bocdsy5M.mjs +0 -446
  111. package/dist/useFocusRing-uXUSOfAR.js +0 -1
package/dist/index.mjs CHANGED
@@ -1,137 +1,138 @@
1
1
  import { S as an } from "./spinner-HqsnWxuN.mjs";
2
- import { D as on, b as sn, a as cn } from "./dropdown-menu-Bj9ftuBZ.mjs";
3
- import { D as dn, a as un, b as fn } from "./disclosure-CA45jH3I.mjs";
4
- import { D as mn, c as pn, a as gn, b as yn } from "./dialog-nGcnK6o1.mjs";
5
- import { v as ee } from "./popover-BAm_8SCx.mjs";
6
- import { P as xn, b as Nn, a as vn } from "./popover-BAm_8SCx.mjs";
7
- import { b as Cn, a as wn, d as Mn, c as Dn, T as kn } from "./tabs-DLqfQ301.mjs";
8
- import { T as An } from "./transition-D0HuUd2-.mjs";
2
+ import { D as on, a as sn, b as cn } from "./dropdown-menu--aGYYbJi.mjs";
3
+ import { D as dn, a as un, b as fn } from "./disclosure-DOWglOHy.mjs";
4
+ import { D as mn, a as pn, b as gn, c as bn } from "./dialog-Cs7TMa7R.mjs";
5
+ import { v as ee } from "./popover-CZO6Afya.mjs";
6
+ import { P as xn, a as vn, b as Nn } from "./popover-CZO6Afya.mjs";
7
+ import { T as Cn, a as wn, b as Mn, c as Dn, d as kn } from "./tabs-Cufnu60W.mjs";
8
+ import { T as Tn } from "./transition-Dfxdl8Si.mjs";
9
9
  import { B as fe } from "./button-DiBXU5vv.mjs";
10
10
  import { I as he } from "./icon-button-D-O7rLZy.mjs";
11
11
  import { C as me } from "./checkbox-CIiu9MH0.mjs";
12
- import { C as Ln } from "./combobox-Dyen_KC6.mjs";
13
- import { F as Bn } from "./fieldset-CCz_4O8_.mjs";
14
- import { I as De } from "./input-Bcf3N-e-.mjs";
15
- import { jsx as a, jsxs as E, Fragment as Pe } from "react/jsx-runtime";
12
+ import { C as En } from "./combobox-BHLjk9D9.mjs";
13
+ import { A as Ln } from "./autocomplete-DqDP76nV.mjs";
14
+ import { F as In } from "./fieldset-CCz_4O8_.mjs";
15
+ import { I as Me } from "./input-Bcf3N-e-.mjs";
16
+ import { jsx as a, jsxs as I, Fragment as Ee } from "react/jsx-runtime";
16
17
  import * as z from "react";
17
- import { useState as Y, useRef as le, useEffect as de, useMemo as ke, Fragment as Be, useCallback as Ee } from "react";
18
- import { L as In } from "./listbox-DZ4v8TYt.mjs";
19
- import { R as On } from "./radio-group-CTf6mrDs.mjs";
20
- import { S as _n } from "./select-CO8U4sj3.mjs";
21
- import { S as Hn } from "./switch-DKcD0IFH.mjs";
22
- import { T as Wn } from "./textarea-BKYgl79b.mjs";
23
- import { c as M } from "./tailwind-DtaLkIY8.mjs";
24
- import { C as Vn, a as Yn, b as Kn, c as zn, d as Zn, e as Jn, f as Xn } from "./card-DGq_6AlR.mjs";
25
- import { C as Ie, b as Fe } from "./calendar-CAySGYDy.mjs";
26
- import { a as Qn } from "./calendar-CAySGYDy.mjs";
27
- import { t as Te } from "./portal-BaBdcS83.mjs";
28
- import { c as J, C as Ae } from "./chevron-right-DcjcIxI2.mjs";
29
- import { S as ta } from "./sonner-Ce9PJbum.mjs";
18
+ import { useState as K, useRef as le, useEffect as de, useMemo as De, Fragment as Pe, useCallback as Le } from "react";
19
+ import { L as Fn } from "./listbox-3DAgC6_y.mjs";
20
+ import { R as _n } from "./radio-group-BIQWXrVI.mjs";
21
+ import { S as Hn } from "./select-CO8U4sj3.mjs";
22
+ import { S as Wn } from "./switch-Eoi1pTsi.mjs";
23
+ import { T as Vn } from "./textarea-BKYgl79b.mjs";
24
+ import { c as A } from "./tailwind-DtaLkIY8.mjs";
25
+ import { C as Kn, a as zn, b as Zn, c as Jn, d as Xn, e as qn, f as Qn } from "./card-DGq_6AlR.mjs";
26
+ import { C as Be, b as Ie } from "./calendar-DQdo9vO-.mjs";
27
+ import { a as ta } from "./calendar-DQdo9vO-.mjs";
28
+ import { t as ke } from "./portal-D-TZOwvF.mjs";
29
+ import { c as J, C as Ae } from "./chevron-right-Ck5BtE5n.mjs";
30
+ import { S as aa } from "./sonner-Cgc0p6ph.mjs";
30
31
  import { S as ue } from "./skeleton-CK17S8WY.mjs";
31
- import { R as aa } from "./relative-time-B6ex5AzD.mjs";
32
- import { V as oa } from "./visually-hidden-DUoKCWmA.mjs";
33
- import { C as sa } from "./counter-label-DRT5FsNV.mjs";
34
- import { A as la, a as da, b as ua } from "./avatar-CN9vtSKm.mjs";
35
- import { B as ha, a as ma, b as pa, c as ga, d as ya, e as ba, f as xa } from "./breadcrumb-Bz_JVFcb.mjs";
36
- import { T as va, u as Sa } from "./use-theme-BQOvga8h.mjs";
37
- function Oe(e) {
32
+ import { R as oa } from "./relative-time-B6ex5AzD.mjs";
33
+ import { V as sa } from "./visually-hidden-DUoKCWmA.mjs";
34
+ import { C as la } from "./counter-label-DRT5FsNV.mjs";
35
+ import { A as ua, a as fa, b as ha } from "./avatar-Br4ih6PQ.mjs";
36
+ import { B as pa, a as ga, b as ba, c as ya, d as xa, e as va, f as Na } from "./breadcrumb-C81R8CJz.mjs";
37
+ import { T as Ca, u as wa } from "./use-theme-BQOvga8h.mjs";
38
+ function Re(e) {
38
39
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
39
40
  }
40
- const pe = 2, $e = (e) => e.replace(/,/g, "");
41
- function ye(e, t = "en-GB", n = pe, o = 0) {
41
+ const pe = 2, Te = (e) => e.replace(/,/g, "");
42
+ function be(e, t = "en-GB", n = pe, o = 0) {
42
43
  return e == null ? "" : new Intl.NumberFormat(t, {
43
44
  minimumFractionDigits: o,
44
45
  maximumFractionDigits: n
45
46
  }).format(e);
46
47
  }
47
- function Re(e, t = "en-GB", n = pe) {
48
- const o = $e(e);
48
+ function Fe(e, t = "en-GB", n = pe) {
49
+ const o = Te(e);
49
50
  if (o === "") return "";
50
- const i = o.includes("."), [c, u = ""] = o.split("."), h = c.replace(/\D/g, ""), f = h ? new Intl.NumberFormat(t, { maximumFractionDigits: 0 }).format(
51
- Number(h)
51
+ const s = o.includes("."), [l, u = ""] = o.split("."), p = l.replace(/\D/g, ""), f = p ? new Intl.NumberFormat(t, { maximumFractionDigits: 0 }).format(
52
+ Number(p)
52
53
  ) : "";
53
- if (!i) return f;
54
- const p = u.replace(/\D/g, "").slice(0, n);
55
- return f === "" && p === "" ? "." : `${f === "" ? "0" : f}.${p}`;
54
+ if (!s) return f;
55
+ const b = u.replace(/\D/g, "").slice(0, n);
56
+ return f === "" && b === "" ? "." : `${f === "" ? "0" : f}.${b}`;
56
57
  }
57
- function be(e) {
58
+ function ye(e) {
58
59
  if (e == null || e === "") return;
59
60
  const t = typeof e == "number" ? e : Number(e);
60
61
  return Number.isNaN(t) ? void 0 : t;
61
62
  }
62
- function _e(e, t) {
63
+ function Oe(e, t) {
63
64
  return e.includes(".") ? Math.min(e.split(".")[1]?.length ?? 0, t) : 0;
64
65
  }
65
66
  function xe(e, t) {
66
- const n = $e(e), o = _e(n, t);
67
+ const n = Te(e), o = Oe(n, t);
67
68
  if (n === "" || n === ".")
68
69
  return { sanitized: n, parsed: void 0, decimals: 0 };
69
- const i = Number(n);
70
- return { sanitized: n, parsed: Number.isNaN(i) ? void 0 : i, decimals: o };
70
+ const s = Number(n);
71
+ return { sanitized: n, parsed: Number.isNaN(s) ? void 0 : s, decimals: o };
71
72
  }
72
73
  function Gt({
73
74
  value: e,
74
75
  onValueChange: t,
75
76
  decimalScale: n = pe,
76
77
  locale: o = "en-GB",
77
- min: i,
78
- max: c,
78
+ min: s,
79
+ max: l,
79
80
  currencySymbol: u = "£",
80
- startElement: h,
81
+ startElement: p,
81
82
  onBlur: f,
82
- ...p
83
+ ...b
83
84
  }) {
84
- const [S, v] = Y(""), [D, I] = Y(!1), k = le(e), L = le(0);
85
+ const [w, S] = K(""), [E, D] = K(!1), P = le(e), L = le(0);
85
86
  de(() => {
86
- if (D || e == null) return;
87
- k.current !== e && (L.current = 0);
88
- const C = L.current > 0 ? Math.min(L.current, n) : 0, w = ye(
87
+ if (E || e == null) return;
88
+ P.current !== e && (L.current = 0);
89
+ const v = L.current > 0 ? Math.min(L.current, n) : 0, C = be(
89
90
  e,
90
91
  o,
91
92
  n,
92
- C
93
+ v
93
94
  );
94
- w !== S && v(w), k.current = e;
95
- }, [n, S, D, o, e]);
96
- function R(y) {
97
- const C = be(i), w = be(c), g = C === void 0 ? y : Math.max(y, C);
98
- return w === void 0 ? g : Math.min(g, w);
95
+ C !== w && S(C), P.current = e;
96
+ }, [n, w, E, o, e]);
97
+ function F(y) {
98
+ const v = ye(s), C = ye(l), h = v === void 0 ? y : Math.max(y, v);
99
+ return C === void 0 ? h : Math.min(h, C);
99
100
  }
100
101
  return /* @__PURE__ */ a(
101
- De,
102
+ Me,
102
103
  {
103
- ...p,
104
+ ...b,
104
105
  type: "text",
105
106
  inputMode: "decimal",
106
- startElement: h ?? (u ? /* @__PURE__ */ a("span", { children: u }) : void 0),
107
- value: S,
107
+ startElement: p ?? (u ? /* @__PURE__ */ a("span", { children: u }) : void 0),
108
+ value: w,
108
109
  onBlur: (y) => {
109
- I(!1);
110
- const C = y.currentTarget.value, { parsed: w, decimals: g } = xe(C, n);
111
- if (w === void 0) {
112
- v(""), L.current = 0, t?.(void 0), f?.(y);
110
+ D(!1);
111
+ const v = y.currentTarget.value, { parsed: C, decimals: h } = xe(v, n);
112
+ if (C === void 0) {
113
+ S(""), L.current = 0, t?.(void 0), f?.(y);
113
114
  return;
114
115
  }
115
- const T = R(w), $ = g;
116
- L.current = $, v(
117
- ye(T, o, n, $)
118
- ), t?.(T), f?.(y);
116
+ const k = F(C), T = h;
117
+ L.current = T, S(
118
+ be(k, o, n, T)
119
+ ), t?.(k), f?.(y);
119
120
  },
120
121
  onChange: (y) => {
121
- I(!0);
122
- const C = Re(
122
+ D(!0);
123
+ const v = Fe(
123
124
  y.target.value,
124
125
  o,
125
126
  n
126
127
  );
127
- v(C);
128
- const { parsed: w, decimals: g } = xe(C, n);
129
- if (w === void 0) {
128
+ S(v);
129
+ const { parsed: C, decimals: h } = xe(v, n);
130
+ if (C === void 0) {
130
131
  L.current = 0, t?.(void 0);
131
132
  return;
132
133
  }
133
- const T = R(w);
134
- L.current = g, k.current = T, t?.(T);
134
+ const k = F(C);
135
+ L.current = h, P.current = k, t?.(k);
135
136
  }
136
137
  }
137
138
  );
@@ -145,30 +146,30 @@ const te = {
145
146
  none: "px-0 py-0",
146
147
  condensed: "px-4 py-4 sm:px-6",
147
148
  normal: "px-4 py-6 sm:px-6 lg:px-8"
148
- }, Ge = {
149
+ }, _e = {
149
150
  none: "gap-x-0",
150
151
  condensed: "gap-x-4",
151
152
  normal: "gap-x-6"
152
- }, He = {
153
+ }, Ge = {
153
154
  none: "0px",
154
155
  condensed: "1rem",
155
156
  // tailwind gap-4
156
157
  normal: "1.5rem"
157
158
  // tailwind gap-6
158
- }, Ue = {
159
+ }, He = {
159
160
  none: "gap-y-0",
160
161
  condensed: "gap-y-4",
161
162
  normal: "gap-y-6"
162
- }, We = {
163
+ }, Ue = {
163
164
  none: "0px",
164
165
  condensed: "1rem",
165
166
  normal: "1.5rem"
166
- }, je = {
167
+ }, We = {
167
168
  line: "border-t border-border",
168
169
  filled: "h-px bg-border"
169
- }, Le = z.createContext(null);
170
+ }, $e = z.createContext(null);
170
171
  function ae() {
171
- const e = z.useContext(Le);
172
+ const e = z.useContext($e);
172
173
  if (!e) throw new Error("PageLayout.* must be used inside <PageLayout>.");
173
174
  return e;
174
175
  }
@@ -177,10 +178,10 @@ function Ht({
177
178
  padding: t = "normal",
178
179
  columnGap: n = "normal",
179
180
  rowGap: o = "normal",
180
- className: i,
181
- children: c
181
+ className: s,
182
+ children: l
182
183
  }) {
183
- return /* @__PURE__ */ a(Le.Provider, { value: { containerWidth: e, padding: t, columnGap: n, rowGap: o }, children: /* @__PURE__ */ a("div", { className: M("w-full", i), children: c }) });
184
+ return /* @__PURE__ */ a($e.Provider, { value: { containerWidth: e, padding: t, columnGap: n, rowGap: o }, children: /* @__PURE__ */ a("div", { className: A("w-full", s), children: l }) });
184
185
  }
185
186
  function Ut({
186
187
  containerWidth: e,
@@ -188,13 +189,13 @@ function Ut({
188
189
  className: n,
189
190
  ...o
190
191
  }) {
191
- const i = ae(), c = e ?? i.containerWidth, u = t ?? i.padding;
192
+ const s = ae(), l = e ?? s.containerWidth, u = t ?? s.padding;
192
193
  return /* @__PURE__ */ a(
193
194
  "section",
194
195
  {
195
- className: M(
196
+ className: A(
196
197
  "mx-auto w-full",
197
- te[c],
198
+ te[l],
198
199
  ne[u],
199
200
  n
200
201
  ),
@@ -203,28 +204,28 @@ function Ut({
203
204
  );
204
205
  }
205
206
  function ge({ divider: e }) {
206
- return e === "none" ? null : /* @__PURE__ */ a("div", { className: M("w-full", je[e]), "aria-hidden": "true" });
207
+ return e === "none" ? null : /* @__PURE__ */ a("div", { className: A("w-full", We[e]), "aria-hidden": "true" });
207
208
  }
208
209
  function Wt({
209
210
  ariaLabel: e,
210
211
  ariaLabelledby: t,
211
212
  padding: n,
212
213
  divider: o = "none",
213
- className: i,
214
- children: c,
214
+ className: s,
215
+ children: l,
215
216
  ...u
216
217
  }) {
217
- const h = ae(), f = n ?? h.padding;
218
- return /* @__PURE__ */ E(
218
+ const p = ae(), f = n ?? p.padding;
219
+ return /* @__PURE__ */ I(
219
220
  "header",
220
221
  {
221
222
  "aria-label": e,
222
223
  "aria-labelledby": t,
223
- className: M("mx-auto w-full", te[h.containerWidth], ne[f], i),
224
+ className: A("mx-auto w-full", te[p.containerWidth], ne[f], s),
224
225
  ...u,
225
226
  children: [
226
227
  /* @__PURE__ */ a(ge, { divider: o }),
227
- c
228
+ l
228
229
  ]
229
230
  }
230
231
  );
@@ -234,21 +235,21 @@ function jt({
234
235
  ariaLabelledby: t,
235
236
  padding: n,
236
237
  divider: o = "none",
237
- className: i,
238
- children: c,
238
+ className: s,
239
+ children: l,
239
240
  ...u
240
241
  }) {
241
- const h = ae(), f = n ?? h.padding;
242
- return /* @__PURE__ */ E(
242
+ const p = ae(), f = n ?? p.padding;
243
+ return /* @__PURE__ */ I(
243
244
  "footer",
244
245
  {
245
246
  "aria-label": e,
246
247
  "aria-labelledby": t,
247
- className: M("mx-auto w-full", te[h.containerWidth], ne[f], i),
248
+ className: A("mx-auto w-full", te[p.containerWidth], ne[f], s),
248
249
  ...u,
249
250
  children: [
250
251
  /* @__PURE__ */ a(ge, { divider: o }),
251
- c
252
+ l
252
253
  ]
253
254
  }
254
255
  );
@@ -258,141 +259,141 @@ function Vt({
258
259
  padding: t,
259
260
  columnGap: n,
260
261
  rowGap: o,
261
- className: i,
262
- style: c,
262
+ className: s,
263
+ style: l,
263
264
  ...u
264
265
  }) {
265
- const h = ae(), f = e ?? h.containerWidth, p = t ?? h.padding, S = n ?? h.columnGap, v = o ?? h.rowGap, D = {
266
- rowGap: We[v],
267
- columnGap: He[S],
268
- ...c
266
+ const p = ae(), f = e ?? p.containerWidth, b = t ?? p.padding, w = n ?? p.columnGap, S = o ?? p.rowGap, E = {
267
+ rowGap: Ue[S],
268
+ columnGap: Ge[w],
269
+ ...l
269
270
  };
270
271
  return /* @__PURE__ */ a(
271
272
  "div",
272
273
  {
273
- className: M(
274
+ className: A(
274
275
  "mx-auto w-full",
275
276
  te[f],
276
- ne[p],
277
+ ne[b],
277
278
  "grid grid-cols-12",
278
- Ge[S],
279
- Ue[v],
280
- i
279
+ _e[w],
280
+ He[S],
281
+ s
281
282
  ),
282
- style: D,
283
+ style: E,
283
284
  ...u
284
285
  }
285
286
  );
286
287
  }
287
288
  function Yt(e) {
288
- const { as: t, ariaLabel: n, ariaLabelledby: o, width: i, padding: c, className: u, ...h } = e, f = ae(), p = t ?? "main", S = i ?? f.containerWidth, v = c ?? "none";
289
+ const { as: t, ariaLabel: n, ariaLabelledby: o, width: s, padding: l, className: u, ...p } = e, f = ae(), b = t ?? "main", w = s ?? f.containerWidth, S = l ?? "none";
289
290
  return /* @__PURE__ */ a(
290
- p,
291
+ b,
291
292
  {
292
293
  "aria-label": n,
293
294
  "aria-labelledby": o,
294
- className: M(
295
+ className: A(
295
296
  "col-span-12 min-w-0 w-full",
296
- te[S],
297
- v === "none" ? "" : ne[v],
297
+ te[w],
298
+ S === "none" ? "" : ne[S],
298
299
  u
299
300
  ),
300
- ...h
301
+ ...p
301
302
  }
302
303
  );
303
304
  }
304
- const Ve = z.forwardRef(
305
+ const je = z.forwardRef(
305
306
  ({
306
307
  ariaLabel: e,
307
308
  ariaLabelledby: t,
308
309
  position: n = "end",
309
310
  width: o,
310
- minWidth: i = 280,
311
- resizable: c = !1,
311
+ minWidth: s = 280,
312
+ resizable: l = !1,
312
313
  widthStorageKey: u,
313
- sticky: h = !1,
314
+ sticky: p = !1,
314
315
  offsetHeader: f = 0,
315
- padding: p,
316
- divider: S = "none",
317
- className: v,
318
- children: D,
319
- ...I
320
- }, k) => {
321
- const L = ae(), R = o ?? L.containerWidth, y = p ?? "none", [C, w] = z.useState(null), g = z.useRef(null);
316
+ padding: b,
317
+ divider: w = "none",
318
+ className: S,
319
+ children: E,
320
+ ...D
321
+ }, P) => {
322
+ const L = ae(), F = o ?? L.containerWidth, y = b ?? "none", [v, C] = z.useState(null), h = z.useRef(null);
322
323
  z.useEffect(() => {
323
- if (!(!c || !u))
324
+ if (!(!l || !u))
324
325
  try {
325
- const x = window.localStorage.getItem(u);
326
- if (!x) return;
327
- const A = Number(x);
328
- Number.isFinite(A) && A >= i && w(A);
326
+ const g = window.localStorage.getItem(u);
327
+ if (!g) return;
328
+ const $ = Number(g);
329
+ Number.isFinite($) && $ >= s && C($);
329
330
  } catch {
330
331
  }
331
- }, [c, u, i]), z.useEffect(() => {
332
- if (!(!c || !u || C == null))
332
+ }, [l, u, s]), z.useEffect(() => {
333
+ if (!(!l || !u || v == null))
333
334
  try {
334
- window.localStorage.setItem(u, String(C));
335
+ window.localStorage.setItem(u, String(v));
335
336
  } catch {
336
337
  }
337
- }, [c, u, C]);
338
- const T = h ? {
338
+ }, [l, u, v]);
339
+ const k = p ? {
339
340
  position: "sticky",
340
341
  top: typeof f == "number" ? `${f}px` : f,
341
342
  alignSelf: "start"
342
- } : void 0, $ = c && C != null ? { width: `${C}px`, minWidth: `${i}px` } : { minWidth: `${i}px` }, H = (x) => {
343
- if (!c) return;
344
- const A = k?.current;
345
- if (!A) return;
346
- const K = A.getBoundingClientRect();
347
- g.current = { startX: x.clientX, startW: K.width }, x.currentTarget.setPointerCapture?.(x.pointerId), x.preventDefault();
348
- }, O = (x) => {
349
- if (!c) return;
350
- const A = g.current;
351
- if (!A) return;
352
- const K = x.clientX - A.startX, m = n === "end" ? A.startW - K : A.startW + K;
353
- w(Math.max(i, Math.round(m)));
354
- }, F = () => {
355
- g.current = null;
343
+ } : void 0, T = l && v != null ? { width: `${v}px`, minWidth: `${s}px` } : { minWidth: `${s}px` }, _ = (g) => {
344
+ if (!l) return;
345
+ const $ = P?.current;
346
+ if (!$) return;
347
+ const j = $.getBoundingClientRect();
348
+ h.current = { startX: g.clientX, startW: j.width }, g.currentTarget.setPointerCapture?.(g.pointerId), g.preventDefault();
349
+ }, H = (g) => {
350
+ if (!l) return;
351
+ const $ = h.current;
352
+ if (!$) return;
353
+ const j = g.clientX - $.startX, m = n === "end" ? $.startW - j : $.startW + j;
354
+ C(Math.max(s, Math.round(m)));
355
+ }, W = () => {
356
+ h.current = null;
356
357
  };
357
- return /* @__PURE__ */ E(
358
+ return /* @__PURE__ */ I(
358
359
  "div",
359
360
  {
360
- ref: k,
361
- className: M(
361
+ ref: P,
362
+ className: A(
362
363
  n === "start" ? "col-span-12 lg:col-span-4 lg:order-first" : "col-span-12 lg:col-span-4 lg:order-last",
363
364
  "relative min-w-0",
364
365
  // Nice defaults if used outside Body:
365
366
  "w-full",
366
- te[R],
367
+ te[F],
367
368
  y === "none" ? "" : ne[y],
368
- v
369
+ S
369
370
  ),
370
- style: { ...T, ...$ },
371
+ style: { ...k, ...T },
371
372
  children: [
372
- /* @__PURE__ */ a(ge, { divider: S }),
373
+ /* @__PURE__ */ a(ge, { divider: w }),
373
374
  /* @__PURE__ */ a(
374
375
  "aside",
375
376
  {
376
377
  "aria-label": e,
377
378
  "aria-labelledby": t,
378
379
  className: "relative",
379
- ...I,
380
- children: D
380
+ ...D,
381
+ children: E
381
382
  }
382
383
  ),
383
- c ? /* @__PURE__ */ a(
384
+ l ? /* @__PURE__ */ a(
384
385
  "div",
385
386
  {
386
387
  role: "separator",
387
388
  "aria-orientation": "vertical",
388
- className: M(
389
+ className: A(
389
390
  "absolute top-0 h-full w-2 cursor-col-resize select-none",
390
391
  n === "end" ? "left-0 -ml-1" : "right-0 -mr-1",
391
392
  "hover:bg-border/60"
392
393
  ),
393
- onPointerDown: H,
394
- onPointerMove: O,
395
- onPointerUp: F
394
+ onPointerDown: _,
395
+ onPointerMove: H,
396
+ onPointerUp: W
396
397
  }
397
398
  ) : null
398
399
  ]
@@ -400,22 +401,22 @@ const Ve = z.forwardRef(
400
401
  );
401
402
  }
402
403
  );
403
- Ve.displayName = "PageLayoutPane";
404
- const Ye = [
404
+ je.displayName = "PageLayoutPane";
405
+ const Ve = [
405
406
  ["path", { d: "M12 5v14", key: "s699le" }],
406
407
  ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
407
- ], Ke = J("arrow-down", Ye);
408
- const ze = [
408
+ ], Ye = J("arrow-down", Ve);
409
+ const Ke = [
409
410
  ["path", { d: "m21 16-4 4-4-4", key: "f6ql7i" }],
410
411
  ["path", { d: "M17 20V4", key: "1ejh1v" }],
411
412
  ["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
412
413
  ["path", { d: "M7 4v16", key: "1glfcx" }]
413
- ], Ze = J("arrow-up-down", ze);
414
- const Je = [
414
+ ], ze = J("arrow-up-down", Ke);
415
+ const Ze = [
415
416
  ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
416
417
  ["path", { d: "M12 19V5", key: "x0mq9r" }]
417
- ], Xe = J("arrow-up", Je);
418
- const qe = [
418
+ ], Je = J("arrow-up", Ze);
419
+ const Xe = [
419
420
  ["path", { d: "M8 2v4", key: "1cmpym" }],
420
421
  ["path", { d: "M16 2v4", key: "4m81vk" }],
421
422
  ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
@@ -426,16 +427,16 @@ const qe = [
426
427
  ["path", { d: "M8 18h.01", key: "lrp35t" }],
427
428
  ["path", { d: "M12 18h.01", key: "mhygvu" }],
428
429
  ["path", { d: "M16 18h.01", key: "kzsmim" }]
429
- ], Qe = J("calendar-days", qe);
430
- const et = [
430
+ ], qe = J("calendar-days", Xe);
431
+ const Qe = [
431
432
  ["path", { d: "M12 6v6l4 2", key: "mmk7yg" }],
432
433
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
433
- ], tt = J("clock", et);
434
- const nt = [
434
+ ], et = J("clock", Qe);
435
+ const tt = [
435
436
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
436
437
  ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
437
- ], at = J("copy", nt);
438
- const rt = [
438
+ ], nt = J("copy", tt);
439
+ const at = [
439
440
  [
440
441
  "path",
441
442
  {
@@ -443,11 +444,11 @@ const rt = [
443
444
  key: "sc7q7i"
444
445
  }
445
446
  ]
446
- ], ot = J("funnel", rt);
447
- const it = [
447
+ ], rt = J("funnel", at);
448
+ const ot = [
448
449
  ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
449
450
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
450
- ], st = J("search", it), Ne = (e) => e.toLocaleDateString("en", {
451
+ ], it = J("search", ot), ve = (e) => e.toLocaleDateString("en", {
451
452
  month: "short",
452
453
  day: "numeric",
453
454
  year: "numeric"
@@ -457,71 +458,83 @@ function Kt({
457
458
  defaultValue: t,
458
459
  onValueChange: n,
459
460
  placeholder: o = "Pick a date",
460
- formatDate: i = Ne,
461
- disabled: c,
461
+ formatDate: s = ve,
462
+ disabled: l,
462
463
  className: u,
463
- buttonClassName: h,
464
+ buttonClassName: p,
464
465
  calendarProps: f
465
466
  }) {
466
- const [p, S] = z.useState(t), v = e !== void 0, D = v ? e : p;
467
+ const b = z.useRef(null), [w, S] = z.useState(t), E = e !== void 0, D = E ? e : w;
467
468
  z.useEffect(() => {
468
- v || S(t);
469
- }, [t, v]);
470
- const k = z.useMemo(() => {
469
+ E || S(t);
470
+ }, [t, E]);
471
+ const L = z.useMemo(() => {
471
472
  if (D)
472
473
  try {
473
- return i(D);
474
+ return s(D);
474
475
  } catch {
475
- return Ne(D);
476
+ return ve(D);
476
477
  }
477
- }, [i, D]) ?? o, L = (R) => {
478
- v || S(R), n?.(R);
478
+ }, [s, D]) ?? o, F = (v) => {
479
+ E || S(v), n?.(v);
480
+ }, y = (v) => {
481
+ const h = v.nativeEvent.submitter, k = document.activeElement, T = b.current, _ = (H) => !!(H && (T?.contains(H) || H.closest('[data-calendar-submit-ignore="true"]')));
482
+ (_(h) || _(k)) && (v.preventDefault(), v.stopPropagation());
479
483
  };
480
- return /* @__PURE__ */ a(ee, { className: M("relative inline-flex w-full", u), children: ({ close: R, open: y }) => /* @__PURE__ */ E(Pe, { children: [
481
- /* @__PURE__ */ E(
482
- ee.Button,
483
- {
484
- as: fe,
485
- type: "button",
486
- variant: "outline",
487
- disabled: c,
488
- "aria-expanded": y,
489
- "aria-haspopup": "dialog",
490
- "aria-label": D ? `Selected date: ${k}` : o,
491
- className: M(
492
- "h-9 w-full justify-between gap-2 bg-background/80 px-3 text-left text-base font-normal",
493
- !D && "text-muted-foreground",
494
- h
484
+ return /* @__PURE__ */ a(
485
+ ee,
486
+ {
487
+ className: A("relative inline-flex w-full", u),
488
+ onSubmitCapture: y,
489
+ children: ({ close: v, open: C }) => /* @__PURE__ */ I(Ee, { children: [
490
+ /* @__PURE__ */ I(
491
+ ee.Button,
492
+ {
493
+ as: fe,
494
+ type: "button",
495
+ variant: "outline",
496
+ disabled: l,
497
+ "aria-expanded": C,
498
+ "aria-haspopup": "dialog",
499
+ "aria-label": D ? `Selected date: ${L}` : o,
500
+ className: A(
501
+ "h-9 w-full justify-between gap-2 bg-background/80 px-3 text-left text-base font-normal",
502
+ !D && "text-muted-foreground",
503
+ p
504
+ ),
505
+ children: [
506
+ /* @__PURE__ */ a("span", { className: "truncate", children: L }),
507
+ /* @__PURE__ */ a(qe, { className: "size-4 text-muted-foreground" })
508
+ ]
509
+ }
495
510
  ),
496
- children: [
497
- /* @__PURE__ */ a("span", { className: "truncate", children: k }),
498
- /* @__PURE__ */ a(Qe, { className: "size-4 text-muted-foreground" })
499
- ]
500
- }
501
- ),
502
- /* @__PURE__ */ a(Te, { children: /* @__PURE__ */ a(
503
- ee.Panel,
504
- {
505
- "data-slot": "popover-content",
506
- className: "z-50 mt-2 w-fit rounded-md bg-popover shadow-lg ring-1 ring-border focus:outline-none",
507
- children: /* @__PURE__ */ a(
508
- Ie,
511
+ /* @__PURE__ */ a(ke, { children: /* @__PURE__ */ a(
512
+ ee.Panel,
509
513
  {
510
- mode: "single",
511
- selected: D,
512
- onSelect: (C) => {
513
- L(C), R();
514
- },
515
- defaultMonth: D ?? t ?? /* @__PURE__ */ new Date(),
516
- initialFocus: !0,
517
- ...f
514
+ ref: b,
515
+ "data-slot": "popover-content",
516
+ "data-calendar-submit-ignore": "true",
517
+ className: "z-50 mt-2 w-fit rounded-md bg-popover shadow-lg ring-1 ring-border focus:outline-none",
518
+ children: /* @__PURE__ */ a(
519
+ Be,
520
+ {
521
+ mode: "single",
522
+ selected: D,
523
+ onSelect: (h) => {
524
+ F(h), v();
525
+ },
526
+ defaultMonth: D ?? t ?? /* @__PURE__ */ new Date(),
527
+ initialFocus: !0,
528
+ ...f
529
+ }
530
+ )
518
531
  }
519
- )
520
- }
521
- ) })
522
- ] }) });
532
+ ) })
533
+ ] })
534
+ }
535
+ );
523
536
  }
524
- const ct = {
537
+ const st = {
525
538
  headerBackground: "#000000",
526
539
  headerText: "#ffffff",
527
540
  headerIconActiveBackground: "#ffde13",
@@ -531,7 +544,7 @@ const ct = {
531
544
  borderColor: "#cbd5e1",
532
545
  paginationBackground: "#ffffff",
533
546
  paginationText: "#000000"
534
- }, V = {
547
+ }, Y = {
535
548
  /** Checkboxes for multi-select */
536
549
  SELECTION: "selection",
537
550
  /** Click row triggers onRowClick callback */
@@ -541,104 +554,104 @@ const ct = {
541
554
  /** Expandable rows with chevron toggle */
542
555
  EXPANDABLE: "expandable"
543
556
  };
544
- function lt({ direction: e, color: t, activeBackground: n, activeForeground: o }) {
545
- const i = e !== null, c = i ? o ?? t : t, u = c ? { color: c } : void 0, h = i && n ? { backgroundColor: n } : void 0;
546
- return /* @__PURE__ */ E(
557
+ function ct({ direction: e, color: t, activeBackground: n, activeForeground: o }) {
558
+ const s = e !== null, l = s ? o ?? t : t, u = l ? { color: l } : void 0, p = s && n ? { backgroundColor: n } : void 0;
559
+ return /* @__PURE__ */ I(
547
560
  "span",
548
561
  {
549
- className: M(
562
+ className: A(
550
563
  "inline-flex items-center justify-center rounded p-1",
551
- i && !n && "bg-accent"
564
+ s && !n && "bg-accent"
552
565
  ),
553
- style: h,
566
+ style: p,
554
567
  children: [
555
- e === "asc" && /* @__PURE__ */ a(Xe, { className: M("h-3 w-3", !c && "text-foreground"), style: u }),
556
- e === "desc" && /* @__PURE__ */ a(Ke, { className: M("h-3 w-3", !c && "text-foreground"), style: u }),
557
- e === null && /* @__PURE__ */ a(Ze, { className: M("h-3 w-3", !c && "opacity-50 text-foreground"), style: u })
568
+ e === "asc" && /* @__PURE__ */ a(Je, { className: A("h-3 w-3", !l && "text-foreground"), style: u }),
569
+ e === "desc" && /* @__PURE__ */ a(Ye, { className: A("h-3 w-3", !l && "text-foreground"), style: u }),
570
+ e === null && /* @__PURE__ */ a(ze, { className: A("h-3 w-3", !l && "opacity-50 text-foreground"), style: u })
558
571
  ]
559
572
  }
560
573
  );
561
574
  }
562
- function ve(e) {
575
+ function Ne(e) {
563
576
  const t = e.replaceAll("_", " ");
564
577
  return t.charAt(0).toUpperCase() + t.slice(1).toLowerCase();
565
578
  }
566
- function dt({
579
+ function lt({
567
580
  columnId: e,
568
581
  filterValues: t,
569
582
  selectedValues: n,
570
583
  onFilterChange: o,
571
- showSelectAll: i = !0,
572
- iconColor: c,
584
+ showSelectAll: s = !0,
585
+ iconColor: l,
573
586
  activeBackground: u,
574
- activeForeground: h
587
+ activeForeground: p
575
588
  }) {
576
- const [f, p] = Y(""), S = ke(() => {
589
+ const [f, b] = K(""), w = De(() => {
577
590
  if (!f) return t;
578
591
  const y = f.toLowerCase();
579
592
  return t.filter(
580
- (C) => C.toLowerCase().includes(y) || ve(C).toLowerCase().includes(y)
593
+ (v) => v.toLowerCase().includes(y) || Ne(v).toLowerCase().includes(y)
581
594
  );
582
- }, [t, f]), v = (y) => {
583
- const C = n.includes(y) ? n.filter((w) => w !== y) : [...n, y];
584
- o(e, C);
585
- }, D = () => {
595
+ }, [t, f]), S = (y) => {
596
+ const v = n.includes(y) ? n.filter((C) => C !== y) : [...n, y];
597
+ o(e, v);
598
+ }, E = () => {
586
599
  o(e, []);
587
- }, I = () => {
600
+ }, D = () => {
588
601
  o(e, [...t]);
589
- }, k = n.length > 0, L = k ? h ?? c : c, R = k && u ? { backgroundColor: u } : void 0;
590
- return /* @__PURE__ */ a("div", { className: "relative inline-block", children: /* @__PURE__ */ E(ee, { children: [
602
+ }, P = n.length > 0, L = P ? p ?? l : l, F = P && u ? { backgroundColor: u } : void 0;
603
+ return /* @__PURE__ */ a("div", { className: "relative inline-block", children: /* @__PURE__ */ I(ee, { children: [
591
604
  /* @__PURE__ */ a(
592
605
  ee.Button,
593
606
  {
594
607
  "aria-label": `Filter ${e}`,
595
- className: M(
608
+ className: A(
596
609
  "inline-flex items-center justify-center rounded p-1",
597
- k && !u && "bg-accent"
610
+ P && !u && "bg-accent"
598
611
  ),
599
- style: R,
612
+ style: F,
600
613
  onClick: (y) => y.stopPropagation(),
601
614
  children: /* @__PURE__ */ a(
602
- ot,
615
+ rt,
603
616
  {
604
- className: M("h-3 w-3", !L && "text-foreground"),
617
+ className: A("h-3 w-3", !L && "text-foreground"),
605
618
  style: L ? { color: L } : void 0
606
619
  }
607
620
  )
608
621
  }
609
622
  ),
610
- /* @__PURE__ */ a(Te, { children: /* @__PURE__ */ a(
623
+ /* @__PURE__ */ a(ke, { children: /* @__PURE__ */ a(
611
624
  ee.Panel,
612
625
  {
613
626
  anchor: { to: "bottom end", gap: 8 },
614
627
  className: "z-50 w-56 max-h-80 flex flex-col rounded-md bg-background shadow-lg ring-1 ring-border focus:outline-none",
615
628
  onClick: (y) => y.stopPropagation(),
616
- children: /* @__PURE__ */ E("div", { className: "p-2 flex flex-col min-h-0 flex-1", children: [
629
+ children: /* @__PURE__ */ I("div", { className: "p-2 flex flex-col min-h-0 flex-1", children: [
617
630
  /* @__PURE__ */ a("div", { className: "mb-2 flex-shrink-0", children: /* @__PURE__ */ a(
618
- De,
631
+ Me,
619
632
  {
620
633
  type: "search",
621
634
  placeholder: "Search...",
622
635
  value: f,
623
- onChange: (y) => p(y.target.value),
636
+ onChange: (y) => b(y.target.value),
624
637
  autoFocus: !0,
625
638
  size: "sm",
626
- startElement: /* @__PURE__ */ a(st, { className: "h-4 w-4" })
639
+ startElement: /* @__PURE__ */ a(it, { className: "h-4 w-4" })
627
640
  }
628
641
  ) }),
629
- i ? /* @__PURE__ */ E(
642
+ s ? /* @__PURE__ */ I(
630
643
  fe,
631
644
  {
632
645
  variant: "ghost",
633
646
  size: "sm",
634
- onClick: n.length > 0 ? D : I,
647
+ onClick: n.length > 0 ? E : D,
635
648
  className: "mb-2 flex-shrink-0 justify-center px-0 text-muted-foreground hover:text-foreground relative h-5 overflow-hidden",
636
649
  children: [
637
650
  /* @__PURE__ */ a(
638
651
  "span",
639
652
  {
640
653
  "aria-hidden": n.length > 0,
641
- className: M(
654
+ className: A(
642
655
  "inline-block transition-all duration-200",
643
656
  n.length > 0 ? "-translate-y-full opacity-0" : "translate-y-0 opacity-100"
644
657
  ),
@@ -649,7 +662,7 @@ function dt({
649
662
  "span",
650
663
  {
651
664
  "aria-hidden": n.length === 0,
652
- className: M(
665
+ className: A(
653
666
  "absolute inset-0 flex items-center justify-center transition-all duration-200",
654
667
  n.length > 0 ? "translate-y-0 opacity-100" : "translate-y-full opacity-0"
655
668
  ),
@@ -663,14 +676,14 @@ function dt({
663
676
  {
664
677
  variant: "ghost",
665
678
  size: "sm",
666
- onClick: D,
679
+ onClick: E,
667
680
  disabled: n.length === 0,
668
681
  className: "mb-2 flex-shrink-0 justify-center px-0 text-muted-foreground hover:text-foreground h-5",
669
682
  children: "Clear all"
670
683
  }
671
684
  ),
672
- /* @__PURE__ */ a("div", { "data-testid": "filter-options", className: "overflow-y-auto flex-1 min-h-0", children: S.map((y) => {
673
- const C = n.includes(y), w = ve(y);
685
+ /* @__PURE__ */ a("div", { "data-testid": "filter-options", className: "overflow-y-auto flex-1 min-h-0", children: w.map((y) => {
686
+ const v = n.includes(y), C = Ne(y);
674
687
  return /* @__PURE__ */ a(
675
688
  "label",
676
689
  {
@@ -678,11 +691,11 @@ function dt({
678
691
  children: /* @__PURE__ */ a(
679
692
  me,
680
693
  {
681
- checked: C,
682
- onChange: () => v(y),
683
- label: w,
694
+ checked: v,
695
+ onChange: () => S(y),
696
+ label: C,
684
697
  checkedBackground: u,
685
- checkedForeground: h
698
+ checkedForeground: p
686
699
  }
687
700
  )
688
701
  },
@@ -694,159 +707,159 @@ function dt({
694
707
  ) })
695
708
  ] }) });
696
709
  }
697
- function ut({
710
+ function dt({
698
711
  columns: e,
699
712
  sortState: t,
700
713
  onSortChange: n,
701
714
  filterState: o = [],
702
- onFilterChange: i,
703
- rowInteraction: c,
715
+ onFilterChange: s,
716
+ rowInteraction: l,
704
717
  allRowIds: u,
705
- selectedRowIds: h = /* @__PURE__ */ new Set(),
718
+ selectedRowIds: p = /* @__PURE__ */ new Set(),
706
719
  onSelectionChange: f,
707
- colorConfig: p
720
+ colorConfig: b
708
721
  }) {
709
- const S = c === V.SELECTION, v = c === V.EXPANDABLE, D = u.length > 0 && u.every((g) => h.has(g)), I = () => {
710
- f && f(D ? /* @__PURE__ */ new Set() : new Set(u));
711
- }, k = (g) => {
712
- if (!g.sortable || !n) return;
713
- const T = t?.columnId === g.id ? t.direction : null;
714
- let $;
715
- T === null ? $ = "asc" : T === "asc" ? $ = "desc" : $ = null, n($ === null ? null : { columnId: g.id, direction: $ });
716
- }, L = (g, T) => {
717
- if (!i) return;
718
- const $ = o.filter((H) => H.columnId !== g);
719
- T.length > 0 ? i([...$, { columnId: g, values: T }]) : i($);
720
- }, R = (g) => o.find(($) => $.columnId === g)?.values || [], y = (g) => {
721
- if (g.sortable)
722
- return t?.columnId === g.id ? t.direction === "asc" ? "ascending" : "descending" : "none";
723
- }, C = p?.headerBackground ? { backgroundColor: p.headerBackground } : void 0, w = p?.headerText ? { color: p.headerText } : void 0;
724
- return /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ E("tr", { className: "bg-muted border-b border-border", style: C, children: [
725
- v && /* @__PURE__ */ a("th", { className: "w-10 px-4 py-3", "aria-label": "Expand", style: w }),
726
- S && /* @__PURE__ */ a("th", { className: "px-4 py-3 text-left", style: w, children: /* @__PURE__ */ a(
722
+ const w = l === Y.SELECTION, S = l === Y.EXPANDABLE, E = u.length > 0 && u.every((h) => p.has(h)), D = () => {
723
+ f && f(E ? /* @__PURE__ */ new Set() : new Set(u));
724
+ }, P = (h) => {
725
+ if (!h.sortable || !n) return;
726
+ const k = t?.columnId === h.id ? t.direction : null;
727
+ let T;
728
+ k === null ? T = "asc" : k === "asc" ? T = "desc" : T = null, n(T === null ? null : { columnId: h.id, direction: T });
729
+ }, L = (h, k) => {
730
+ if (!s) return;
731
+ const T = o.filter((_) => _.columnId !== h);
732
+ k.length > 0 ? s([...T, { columnId: h, values: k }]) : s(T);
733
+ }, F = (h) => o.find((T) => T.columnId === h)?.values || [], y = (h) => {
734
+ if (h.sortable)
735
+ return t?.columnId === h.id ? t.direction === "asc" ? "ascending" : "descending" : "none";
736
+ }, v = b?.headerBackground ? { backgroundColor: b.headerBackground } : void 0, C = b?.headerText ? { color: b.headerText } : void 0;
737
+ return /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ I("tr", { className: "bg-muted border-b border-border", style: v, children: [
738
+ S && /* @__PURE__ */ a("th", { className: "w-10 px-4 py-3", "aria-label": "Expand", style: C }),
739
+ w && /* @__PURE__ */ a("th", { className: "px-4 py-3 text-left", style: C, children: /* @__PURE__ */ a(
727
740
  me,
728
741
  {
729
- checked: D,
730
- onChange: I,
742
+ checked: E,
743
+ onChange: D,
731
744
  "aria-label": "Select all rows",
732
745
  className: "h-3 w-3",
733
- checkedBackground: p?.headerIconActiveBackground,
734
- checkedForeground: p?.headerIconActiveForeground
746
+ checkedBackground: b?.headerIconActiveBackground,
747
+ checkedForeground: b?.headerIconActiveForeground
735
748
  }
736
749
  ) }),
737
- e.map((g) => {
738
- const T = t?.columnId === g.id ? t.direction : null;
750
+ e.map((h) => {
751
+ const k = t?.columnId === h.id ? t.direction : null;
739
752
  return /* @__PURE__ */ a(
740
753
  "th",
741
754
  {
742
755
  role: "columnheader",
743
- "aria-sort": y(g),
744
- className: M(
756
+ "aria-sort": y(h),
757
+ className: A(
745
758
  "px-4 py-3 text-left font-semibold text-foreground",
746
- g.sortable && "cursor-pointer select-none"
759
+ h.sortable && "cursor-pointer select-none"
747
760
  ),
748
761
  style: {
749
- width: g.width,
750
- minWidth: g.minWidth,
751
- ...w
762
+ width: h.width,
763
+ minWidth: h.minWidth,
764
+ ...C
752
765
  },
753
- onClick: () => k(g),
754
- children: /* @__PURE__ */ E("div", { className: "flex items-center gap-2", children: [
755
- /* @__PURE__ */ a("span", { children: g.header }),
756
- g.sortable && /* @__PURE__ */ a(
757
- lt,
766
+ onClick: () => P(h),
767
+ children: /* @__PURE__ */ I("div", { className: "flex items-center gap-2", children: [
768
+ /* @__PURE__ */ a("span", { children: h.header }),
769
+ h.sortable && /* @__PURE__ */ a(
770
+ ct,
758
771
  {
759
- direction: T,
760
- color: p?.headerText,
761
- activeBackground: p?.headerIconActiveBackground,
762
- activeForeground: p?.headerIconActiveForeground
772
+ direction: k,
773
+ color: b?.headerText,
774
+ activeBackground: b?.headerIconActiveBackground,
775
+ activeForeground: b?.headerIconActiveForeground
763
776
  }
764
777
  ),
765
- g.filterable && g.filterValues && i && /* @__PURE__ */ a(
766
- dt,
778
+ h.filterable && h.filterValues && s && /* @__PURE__ */ a(
779
+ lt,
767
780
  {
768
- columnId: g.id,
769
- filterValues: g.filterValues,
770
- selectedValues: R(g.id),
781
+ columnId: h.id,
782
+ filterValues: h.filterValues,
783
+ selectedValues: F(h.id),
771
784
  onFilterChange: L,
772
- showSelectAll: g.filterSelectAll !== !1,
773
- iconColor: p?.headerText,
774
- activeBackground: p?.headerIconActiveBackground,
775
- activeForeground: p?.headerIconActiveForeground
785
+ showSelectAll: h.filterSelectAll !== !1,
786
+ iconColor: b?.headerText,
787
+ activeBackground: b?.headerIconActiveBackground,
788
+ activeForeground: b?.headerIconActiveForeground
776
789
  }
777
790
  )
778
791
  ] })
779
792
  },
780
- g.id
793
+ h.id
781
794
  );
782
795
  })
783
796
  ] }) });
784
797
  }
785
- function ft({
798
+ function ut({
786
799
  row: e,
787
800
  rowId: t,
788
- rowInteraction: n = V.NONE,
801
+ rowInteraction: n = Y.NONE,
789
802
  isSelected: o = !1,
790
- onRowClick: i,
791
- onSelectionChange: c,
803
+ onRowClick: s,
804
+ onSelectionChange: l,
792
805
  children: u,
793
- isExpanded: h = !1,
806
+ isExpanded: p = !1,
794
807
  onExpandRow: f,
795
- expandedContentId: p,
796
- colorConfig: S
808
+ expandedContentId: b,
809
+ colorConfig: w
797
810
  }) {
798
- const v = n === V.LINK, D = n === V.SELECTION, I = n === V.EXPANDABLE, k = () => {
799
- v && i && i(e);
811
+ const S = n === Y.LINK, E = n === Y.SELECTION, D = n === Y.EXPANDABLE, P = () => {
812
+ S && s && s(e);
800
813
  }, L = () => {
801
- c && c(t, !o);
802
- }, R = (w) => {
803
- w.stopPropagation(), f && f(e, t);
814
+ l && l(t, !o);
815
+ }, F = (C) => {
816
+ C.stopPropagation(), f && f(e, t);
804
817
  }, y = () => {
805
- if (o && S?.selectedRowBackground)
806
- return S.selectedRowBackground;
807
- if (S?.rowBackground)
808
- return S.rowBackground;
809
- }, C = y() ? { backgroundColor: y() } : void 0;
810
- return /* @__PURE__ */ E(
818
+ if (o && w?.selectedRowBackground)
819
+ return w.selectedRowBackground;
820
+ if (w?.rowBackground)
821
+ return w.rowBackground;
822
+ }, v = y() ? { backgroundColor: y() } : void 0;
823
+ return /* @__PURE__ */ I(
811
824
  "tr",
812
825
  {
813
826
  role: "row",
814
- className: M(
827
+ className: A(
815
828
  "border-b border-border last:border-b-0 transition-colors duration-300",
816
- v && "cursor-pointer hover:bg-muted/50",
817
- D && "hover:bg-muted/30",
818
- o && !S?.selectedRowBackground && "bg-accent/10",
819
- h && "border-b-0"
829
+ S && "cursor-pointer hover:bg-muted/50",
830
+ E && "hover:bg-muted/30",
831
+ o && !w?.selectedRowBackground && "bg-accent/10",
832
+ p && "border-b-0"
820
833
  ),
821
- style: C,
822
- onClick: k,
834
+ style: v,
835
+ onClick: P,
823
836
  children: [
824
- I && /* @__PURE__ */ a("td", { className: "w-10 px-4 py-3", children: /* @__PURE__ */ a(
837
+ D && /* @__PURE__ */ a("td", { className: "w-10 px-4 py-3", children: /* @__PURE__ */ a(
825
838
  he,
826
839
  {
827
840
  icon: Ae,
828
841
  variant: "ghost",
829
842
  size: "small",
830
- onClick: R,
831
- "aria-expanded": h,
832
- "aria-controls": h ? p : void 0,
843
+ onClick: F,
844
+ "aria-expanded": p,
845
+ "aria-controls": p ? b : void 0,
833
846
  "aria-label": "Expand row",
834
- className: M(
847
+ className: A(
835
848
  "h-6 w-6 transition-colors duration-300 [&_svg]:transition-transform [&_svg]:duration-300",
836
- h && "bg-accent hover:bg-accent [&_svg]:rotate-90"
849
+ p && "bg-accent hover:bg-accent [&_svg]:rotate-90"
837
850
  )
838
851
  }
839
852
  ) }),
840
- D && /* @__PURE__ */ a("td", { className: "px-4 py-3", children: /* @__PURE__ */ a(
853
+ E && /* @__PURE__ */ a("td", { className: "px-4 py-3", children: /* @__PURE__ */ a(
841
854
  me,
842
855
  {
843
856
  checked: o,
844
857
  onChange: L,
845
- onClick: (w) => w.stopPropagation(),
858
+ onClick: (C) => C.stopPropagation(),
846
859
  "aria-label": "Select row",
847
860
  className: "h-3 w-3",
848
- checkedBackground: S?.headerIconActiveBackground,
849
- checkedForeground: S?.headerIconActiveForeground
861
+ checkedBackground: w?.headerIconActiveBackground,
862
+ checkedForeground: w?.headerIconActiveForeground
850
863
  }
851
864
  ) }),
852
865
  u
@@ -854,7 +867,7 @@ function ft({
854
867
  }
855
868
  );
856
869
  }
857
- function ht({
870
+ function ft({
858
871
  column: e,
859
872
  row: t,
860
873
  value: n
@@ -863,24 +876,24 @@ function ht({
863
876
  left: "text-left",
864
877
  center: "text-center",
865
878
  right: "text-right"
866
- }[e.align || "left"], i = e.cell;
879
+ }[e.align || "left"], s = e.cell;
867
880
  return /* @__PURE__ */ a(
868
881
  "td",
869
882
  {
870
883
  role: "gridcell",
871
- className: M("px-4 py-3", o),
884
+ className: A("px-4 py-3", o),
872
885
  style: {
873
886
  width: e.width,
874
887
  minWidth: e.minWidth
875
888
  },
876
- children: i ? /* @__PURE__ */ a(i, { value: n, row: t }) : String(n ?? "")
889
+ children: s ? /* @__PURE__ */ a(s, { value: n, row: t }) : String(n ?? "")
877
890
  }
878
891
  );
879
892
  }
880
- function mt({ columns: e, rowInteraction: t }) {
881
- return /* @__PURE__ */ E("tr", { className: "border-b border-border last:border-b-0", children: [
882
- t === V.EXPANDABLE && /* @__PURE__ */ a("td", { className: "w-10 px-4 py-3", children: /* @__PURE__ */ a(ue, { className: "h-4 w-4" }) }),
883
- t === V.SELECTION && /* @__PURE__ */ a("td", { className: "px-4 py-3", children: /* @__PURE__ */ a(ue, { className: "h-4 w-4" }) }),
893
+ function ht({ columns: e, rowInteraction: t }) {
894
+ return /* @__PURE__ */ I("tr", { className: "border-b border-border last:border-b-0", children: [
895
+ t === Y.EXPANDABLE && /* @__PURE__ */ a("td", { className: "w-10 px-4 py-3", children: /* @__PURE__ */ a(ue, { className: "h-4 w-4" }) }),
896
+ t === Y.SELECTION && /* @__PURE__ */ a("td", { className: "px-4 py-3", children: /* @__PURE__ */ a(ue, { className: "h-4 w-4" }) }),
884
897
  e.map((n) => /* @__PURE__ */ a(
885
898
  "td",
886
899
  {
@@ -895,23 +908,23 @@ function mt({ columns: e, rowInteraction: t }) {
895
908
  ))
896
909
  ] });
897
910
  }
898
- function pt({ children: e, colSpan: t }) {
911
+ function mt({ children: e, colSpan: t }) {
899
912
  return /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a("td", { colSpan: t, className: "px-4 py-12 text-center text-muted-foreground", children: e || "No data available" }) });
900
913
  }
901
- function Se({ id: e, colSpan: t, children: n, isCollapsing: o = !1 }) {
902
- const [i, c] = Y(!1), [u, h] = Y(0), f = le(null);
914
+ function pt({ id: e, colSpan: t, children: n, isCollapsing: o = !1 }) {
915
+ const [s, l] = K(!1), [u, p] = K(0), f = le(null);
903
916
  return de(() => {
904
917
  if (o)
905
- c(!1), h(0);
918
+ l(!1), p(0);
906
919
  else {
907
- const p = requestAnimationFrame(() => {
908
- c(!0), f.current && h(f.current.scrollHeight);
920
+ const b = requestAnimationFrame(() => {
921
+ l(!0), f.current && p(f.current.scrollHeight);
909
922
  });
910
- return () => cancelAnimationFrame(p);
923
+ return () => cancelAnimationFrame(b);
911
924
  }
912
925
  }, [o]), de(() => {
913
- f.current && i && !o && h(f.current.scrollHeight);
914
- }, [n, i, o]), /* @__PURE__ */ a("tr", { role: "row", id: e, className: "border-b border-border", children: /* @__PURE__ */ a(
926
+ f.current && s && !o && p(f.current.scrollHeight);
927
+ }, [n, s, o]), /* @__PURE__ */ a("tr", { role: "row", id: e, className: "border-b border-border", children: /* @__PURE__ */ a(
915
928
  "td",
916
929
  {
917
930
  colSpan: t,
@@ -920,12 +933,12 @@ function Se({ id: e, colSpan: t, children: n, isCollapsing: o = !1 }) {
920
933
  children: /* @__PURE__ */ a(
921
934
  "div",
922
935
  {
923
- className: M(
936
+ className: A(
924
937
  "transition-all duration-300 ease-in-out overflow-hidden",
925
- i ? "opacity-100" : "opacity-0"
938
+ s ? "opacity-100" : "opacity-0"
926
939
  ),
927
940
  style: {
928
- maxHeight: i ? `${u}px` : "0px"
941
+ maxHeight: s ? `${u}px` : "0px"
929
942
  },
930
943
  children: /* @__PURE__ */ a("div", { ref: f, className: "px-4 py-4", children: n })
931
944
  }
@@ -938,143 +951,122 @@ function gt({
938
951
  data: t,
939
952
  getRowId: n,
940
953
  loading: o = !1,
941
- emptyState: i,
942
- rowInteraction: c = V.NONE,
954
+ emptyState: s,
955
+ rowInteraction: l = Y.NONE,
943
956
  selectedRowIds: u = /* @__PURE__ */ new Set(),
944
- onRowClick: h,
957
+ onRowClick: p,
945
958
  onRowSelectionChange: f,
946
- pageSize: p,
947
- expandedRowId: S,
948
- expandedData: v,
949
- isLoadingExpanded: D = !1,
950
- onExpandRow: I,
951
- expandedRowContent: k,
959
+ pageSize: b,
960
+ expandedRowId: w,
961
+ expandedData: S,
962
+ isLoadingExpanded: E = !1,
963
+ onExpandRow: D,
964
+ expandedRowContent: P,
952
965
  colorConfig: L
953
966
  }) {
954
- const R = c === V.SELECTION, y = c === V.EXPANDABLE, C = e.length + (R ? 1 : 0) + (y ? 1 : 0), [w, g] = Y(null), [T, $] = Y(null), H = le(null);
955
- return de(() => {
956
- if (H.current && H.current !== S) {
957
- const O = t.find((F) => n(F) === H.current);
958
- if (O) {
959
- g(H.current), $(O);
960
- const F = setTimeout(() => {
961
- g(null), $(null);
962
- }, 300);
963
- return () => clearTimeout(F);
964
- }
967
+ const F = l === Y.SELECTION, y = l === Y.EXPANDABLE, v = e.length + (F ? 1 : 0) + (y ? 1 : 0), [C, h] = K(null), [k, T] = K(null), [_, H] = K(null), W = le(null);
968
+ return S != null && (W.current = S), w !== _ && (H(w ?? null), _ && (h(_), T(W.current), W.current = null)), de(() => {
969
+ if (C) {
970
+ const M = setTimeout(() => {
971
+ h(null), T(null);
972
+ }, 300);
973
+ return () => clearTimeout(M);
965
974
  }
966
- H.current = S ?? null;
967
- }, [S, t, n]), o ? /* @__PURE__ */ a("tbody", { children: Array.from({ length: Math.min(p, 5) }, (O, F) => `skeleton-row-${F}`).map((O) => /* @__PURE__ */ a(
968
- mt,
975
+ }, [C]), o ? /* @__PURE__ */ a("tbody", { children: Array.from({ length: Math.min(b, 5) }, (M, g) => `skeleton-row-${g}`).map((M) => /* @__PURE__ */ a(
976
+ ht,
969
977
  {
970
978
  columns: e,
971
- rowInteraction: c
979
+ rowInteraction: l
972
980
  },
973
- O
974
- )) }) : t.length === 0 ? /* @__PURE__ */ a("tbody", { children: /* @__PURE__ */ a(pt, { colSpan: C, children: i }) }) : /* @__PURE__ */ a("tbody", { children: t.map((O) => {
975
- const F = n(O), P = S === F, x = `expanded-content-${F}`;
976
- return /* @__PURE__ */ E(Be, { children: [
981
+ M
982
+ )) }) : t.length === 0 ? /* @__PURE__ */ a("tbody", { children: /* @__PURE__ */ a(mt, { colSpan: v, children: s }) }) : /* @__PURE__ */ a("tbody", { children: t.map((M) => {
983
+ const g = n(M), $ = w === g, j = C === g, m = `expanded-content-${g}`;
984
+ return /* @__PURE__ */ I(Pe, { children: [
977
985
  /* @__PURE__ */ a(
978
- ft,
986
+ ut,
979
987
  {
980
- row: O,
981
- rowId: F,
982
- rowInteraction: c,
983
- isSelected: u.has(F),
984
- onRowClick: h,
988
+ row: M,
989
+ rowId: g,
990
+ rowInteraction: l,
991
+ isSelected: u.has(g),
992
+ onRowClick: p,
985
993
  onSelectionChange: f,
986
- isExpanded: P,
987
- onExpandRow: I,
988
- expandedContentId: x,
994
+ isExpanded: $,
995
+ onExpandRow: D,
996
+ expandedContentId: m,
989
997
  colorConfig: L,
990
- children: e.map((A) => {
991
- const m = (() => {
992
- if (A.accessorFn) return A.accessorFn(O);
993
- if (A.accessorKey) return O[A.accessorKey];
998
+ children: e.map((i) => {
999
+ const d = (() => {
1000
+ if (i.accessorFn) return i.accessorFn(M);
1001
+ if (i.accessorKey) return M[i.accessorKey];
994
1002
  })();
995
1003
  return /* @__PURE__ */ a(
996
- ht,
1004
+ ft,
997
1005
  {
998
- column: A,
999
- row: O,
1000
- value: m
1006
+ column: i,
1007
+ row: M,
1008
+ value: d
1001
1009
  },
1002
- A.id
1010
+ i.id
1003
1011
  );
1004
1012
  })
1005
1013
  }
1006
1014
  ),
1007
- P && k && /* @__PURE__ */ a(
1008
- Se,
1009
- {
1010
- id: x,
1011
- colSpan: C,
1012
- children: /* @__PURE__ */ a(
1013
- k,
1014
- {
1015
- row: O,
1016
- rowId: F,
1017
- data: v ?? null,
1018
- loading: D
1019
- }
1020
- )
1021
- }
1022
- ),
1023
- w === F && T && k && /* @__PURE__ */ a(
1024
- Se,
1015
+ ($ || j) && P && /* @__PURE__ */ a(
1016
+ pt,
1025
1017
  {
1026
- id: `expanded-content-${F}-collapsing`,
1027
- colSpan: C,
1028
- isCollapsing: !0,
1018
+ id: m,
1019
+ colSpan: v,
1020
+ isCollapsing: j && !$,
1029
1021
  children: /* @__PURE__ */ a(
1030
- k,
1022
+ P,
1031
1023
  {
1032
- row: T,
1033
- rowId: F,
1034
- data: null,
1035
- loading: !1
1024
+ row: M,
1025
+ rowId: g,
1026
+ data: $ ? S ?? null : k ?? null,
1027
+ loading: $ ? E : !1
1036
1028
  }
1037
1029
  )
1038
1030
  }
1039
1031
  )
1040
- ] }, F);
1032
+ ] }, g);
1041
1033
  }) });
1042
1034
  }
1043
- function yt({
1035
+ function bt({
1044
1036
  page: e,
1045
1037
  pageSize: t,
1046
1038
  totalCount: n,
1047
1039
  onPageChange: o,
1048
- className: i,
1049
- colorConfig: c
1040
+ className: s,
1041
+ colorConfig: l
1050
1042
  }) {
1051
- const u = Math.max(1, Math.ceil(n / t)), h = e <= 1, f = e >= u, p = {
1052
- ...c?.paginationBackground && { backgroundColor: c.paginationBackground },
1053
- ...c?.paginationText && { color: c.paginationText }
1043
+ const u = Math.max(1, Math.ceil(n / t)), p = e <= 1, f = e >= u, b = {
1044
+ ...l?.paginationBackground && { backgroundColor: l.paginationBackground },
1045
+ ...l?.paginationText && { color: l.paginationText }
1054
1046
  };
1055
- return /* @__PURE__ */ E(
1047
+ return /* @__PURE__ */ I(
1056
1048
  "nav",
1057
1049
  {
1058
1050
  role: "navigation",
1059
1051
  "aria-label": "Pagination",
1060
- className: M("flex items-center justify-between px-4 py-3", i),
1061
- style: Object.keys(p).length > 0 ? p : void 0,
1052
+ className: A("flex items-center justify-between px-4 py-3", s),
1053
+ style: Object.keys(b).length > 0 ? b : void 0,
1062
1054
  children: [
1063
- /* @__PURE__ */ E("div", { className: "text-sm text-muted-foreground", children: [
1055
+ /* @__PURE__ */ I("div", { className: "text-sm text-muted-foreground", children: [
1064
1056
  "Page ",
1065
1057
  e,
1066
1058
  " of ",
1067
1059
  u
1068
1060
  ] }),
1069
- /* @__PURE__ */ E("div", { className: "flex items-center gap-2", children: [
1061
+ /* @__PURE__ */ I("div", { className: "flex items-center gap-2", children: [
1070
1062
  /* @__PURE__ */ a(
1071
1063
  he,
1072
1064
  {
1073
- icon: Fe,
1065
+ icon: Ie,
1074
1066
  variant: "ghost",
1075
1067
  size: "small",
1076
1068
  onClick: () => o(e - 1),
1077
- disabled: h,
1069
+ disabled: p,
1078
1070
  "aria-label": "Previous page"
1079
1071
  }
1080
1072
  ),
@@ -1098,72 +1090,72 @@ function zt({
1098
1090
  columns: e,
1099
1091
  data: t,
1100
1092
  getRowId: n,
1101
- rowInteraction: o = V.NONE,
1102
- onRowClick: i,
1103
- selectedRowIds: c = /* @__PURE__ */ new Set(),
1093
+ rowInteraction: o = Y.NONE,
1094
+ onRowClick: s,
1095
+ selectedRowIds: l = /* @__PURE__ */ new Set(),
1104
1096
  onSelectionChange: u,
1105
- expandedRowContent: h,
1097
+ expandedRowContent: p,
1106
1098
  getExpandedRowData: f,
1107
- page: p,
1108
- pageSize: S,
1109
- totalCount: v,
1110
- onPageChange: D,
1111
- sortState: I,
1112
- onSortChange: k,
1099
+ page: b,
1100
+ pageSize: w,
1101
+ totalCount: S,
1102
+ onPageChange: E,
1103
+ sortState: D,
1104
+ onSortChange: P,
1113
1105
  filterState: L = [],
1114
- onFilterChange: R,
1106
+ onFilterChange: F,
1115
1107
  loading: y = !1,
1116
- emptyState: C,
1117
- className: w,
1118
- colorConfig: g
1108
+ emptyState: v,
1109
+ className: C,
1110
+ colorConfig: h
1119
1111
  }) {
1120
- const T = { ...ct, ...g }, $ = ke(() => t.map(n), [t, n]), [H, O] = Y(null), [F, P] = Y(null), [x, A] = Y(!1), K = Ee(
1112
+ const k = { ...st, ...h }, T = De(() => t.map(n), [t, n]), [_, H] = K(null), [W, M] = K(null), [g, $] = K(!1), j = Le(
1121
1113
  async (r, d) => {
1122
- if (H === d) {
1123
- O(null), P(null), A(!1);
1114
+ if (_ === d) {
1115
+ H(null), M(null), $(!1);
1124
1116
  return;
1125
1117
  }
1126
- if (O(d), P(null), A(!0), f)
1118
+ if (H(d), M(null), $(!0), f)
1127
1119
  try {
1128
- const s = await f(r, d);
1129
- O((b) => (b === d && (P(s), A(!1)), b));
1120
+ const c = await f(r, d);
1121
+ H((x) => (x === d && (M(c), $(!1)), x));
1130
1122
  } catch {
1131
- A(!1);
1123
+ $(!1);
1132
1124
  }
1133
1125
  else
1134
- A(!1);
1126
+ $(!1);
1135
1127
  },
1136
- [H, f]
1128
+ [_, f]
1137
1129
  ), m = (r, d) => {
1138
1130
  if (!u) return;
1139
- const s = new Set(c);
1140
- d ? s.add(r) : s.delete(r), u(s);
1141
- }, l = T?.borderColor ? { borderColor: T.borderColor } : void 0;
1142
- return /* @__PURE__ */ E(
1131
+ const c = new Set(l);
1132
+ d ? c.add(r) : c.delete(r), u(c);
1133
+ }, i = k?.borderColor ? { borderColor: k.borderColor } : void 0;
1134
+ return /* @__PURE__ */ I(
1143
1135
  "div",
1144
1136
  {
1145
- className: M("overflow-hidden rounded-lg border border-border", w),
1146
- style: l,
1137
+ className: A("overflow-hidden rounded-lg border border-border", C),
1138
+ style: i,
1147
1139
  children: [
1148
- /* @__PURE__ */ a("div", { className: "overflow-x-auto", children: /* @__PURE__ */ E(
1140
+ /* @__PURE__ */ a("div", { className: "overflow-x-auto", children: /* @__PURE__ */ I(
1149
1141
  "table",
1150
1142
  {
1151
1143
  "aria-busy": y,
1152
1144
  className: "w-full border-collapse text-sm",
1153
1145
  children: [
1154
1146
  /* @__PURE__ */ a(
1155
- ut,
1147
+ dt,
1156
1148
  {
1157
1149
  columns: e,
1158
- sortState: I,
1159
- onSortChange: k,
1150
+ sortState: D,
1151
+ onSortChange: P,
1160
1152
  filterState: L,
1161
- onFilterChange: R,
1153
+ onFilterChange: F,
1162
1154
  rowInteraction: o,
1163
- allRowIds: $,
1164
- selectedRowIds: c,
1155
+ allRowIds: T,
1156
+ selectedRowIds: l,
1165
1157
  onSelectionChange: u,
1166
- colorConfig: T
1158
+ colorConfig: k
1167
1159
  }
1168
1160
  ),
1169
1161
  /* @__PURE__ */ a(
@@ -1173,334 +1165,334 @@ function zt({
1173
1165
  data: t,
1174
1166
  getRowId: n,
1175
1167
  loading: y,
1176
- emptyState: C,
1168
+ emptyState: v,
1177
1169
  rowInteraction: o,
1178
- selectedRowIds: c,
1179
- onRowClick: i,
1170
+ selectedRowIds: l,
1171
+ onRowClick: s,
1180
1172
  onRowSelectionChange: m,
1181
- pageSize: S,
1182
- expandedRowId: H,
1183
- expandedData: F,
1184
- isLoadingExpanded: x,
1185
- onExpandRow: K,
1186
- expandedRowContent: h,
1187
- colorConfig: T
1173
+ pageSize: w,
1174
+ expandedRowId: _,
1175
+ expandedData: W,
1176
+ isLoadingExpanded: g,
1177
+ onExpandRow: j,
1178
+ expandedRowContent: p,
1179
+ colorConfig: k
1188
1180
  }
1189
1181
  )
1190
1182
  ]
1191
1183
  }
1192
1184
  ) }),
1193
1185
  /* @__PURE__ */ a(
1194
- yt,
1186
+ bt,
1195
1187
  {
1196
- page: p,
1197
- pageSize: S,
1198
- totalCount: v,
1199
- onPageChange: D,
1188
+ page: b,
1189
+ pageSize: w,
1190
+ totalCount: S,
1191
+ onPageChange: E,
1200
1192
  className: "border-t border-border",
1201
- colorConfig: T
1193
+ colorConfig: k
1202
1194
  }
1203
1195
  )
1204
1196
  ]
1205
1197
  }
1206
1198
  );
1207
1199
  }
1208
- var ce = { exports: {} }, bt = ce.exports, Ce;
1200
+ var ce = { exports: {} }, yt = ce.exports, Se;
1209
1201
  function xt() {
1210
- return Ce || (Ce = 1, (function(e, t) {
1202
+ return Se || (Se = 1, (function(e, t) {
1211
1203
  (function(n, o) {
1212
1204
  e.exports = o();
1213
- })(bt, (function() {
1214
- var n = 1e3, o = 6e4, i = 36e5, c = "millisecond", u = "second", h = "minute", f = "hour", p = "day", S = "week", v = "month", D = "quarter", I = "year", k = "date", L = "Invalid Date", R = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, C = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(m) {
1215
- var l = ["th", "st", "nd", "rd"], r = m % 100;
1216
- return "[" + m + (l[(r - 20) % 10] || l[r] || l[0]) + "]";
1217
- } }, w = function(m, l, r) {
1205
+ })(yt, (function() {
1206
+ var n = 1e3, o = 6e4, s = 36e5, l = "millisecond", u = "second", p = "minute", f = "hour", b = "day", w = "week", S = "month", E = "quarter", D = "year", P = "date", L = "Invalid Date", F = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, v = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(m) {
1207
+ var i = ["th", "st", "nd", "rd"], r = m % 100;
1208
+ return "[" + m + (i[(r - 20) % 10] || i[r] || i[0]) + "]";
1209
+ } }, C = function(m, i, r) {
1218
1210
  var d = String(m);
1219
- return !d || d.length >= l ? m : "" + Array(l + 1 - d.length).join(r) + m;
1220
- }, g = { s: w, z: function(m) {
1221
- var l = -m.utcOffset(), r = Math.abs(l), d = Math.floor(r / 60), s = r % 60;
1222
- return (l <= 0 ? "+" : "-") + w(d, 2, "0") + ":" + w(s, 2, "0");
1223
- }, m: function m(l, r) {
1224
- if (l.date() < r.date()) return -m(r, l);
1225
- var d = 12 * (r.year() - l.year()) + (r.month() - l.month()), s = l.clone().add(d, v), b = r - s < 0, N = l.clone().add(d + (b ? -1 : 1), v);
1226
- return +(-(d + (r - s) / (b ? s - N : N - s)) || 0);
1211
+ return !d || d.length >= i ? m : "" + Array(i + 1 - d.length).join(r) + m;
1212
+ }, h = { s: C, z: function(m) {
1213
+ var i = -m.utcOffset(), r = Math.abs(i), d = Math.floor(r / 60), c = r % 60;
1214
+ return (i <= 0 ? "+" : "-") + C(d, 2, "0") + ":" + C(c, 2, "0");
1215
+ }, m: function m(i, r) {
1216
+ if (i.date() < r.date()) return -m(r, i);
1217
+ var d = 12 * (r.year() - i.year()) + (r.month() - i.month()), c = i.clone().add(d, S), x = r - c < 0, N = i.clone().add(d + (x ? -1 : 1), S);
1218
+ return +(-(d + (r - c) / (x ? c - N : N - c)) || 0);
1227
1219
  }, a: function(m) {
1228
1220
  return m < 0 ? Math.ceil(m) || 0 : Math.floor(m);
1229
1221
  }, p: function(m) {
1230
- return { M: v, y: I, w: S, d: p, D: k, h: f, m: h, s: u, ms: c, Q: D }[m] || String(m || "").toLowerCase().replace(/s$/, "");
1222
+ return { M: S, y: D, w, d: b, D: P, h: f, m: p, s: u, ms: l, Q: E }[m] || String(m || "").toLowerCase().replace(/s$/, "");
1231
1223
  }, u: function(m) {
1232
1224
  return m === void 0;
1233
- } }, T = "en", $ = {};
1234
- $[T] = C;
1235
- var H = "$isDayjsObject", O = function(m) {
1236
- return m instanceof A || !(!m || !m[H]);
1237
- }, F = function m(l, r, d) {
1238
- var s;
1239
- if (!l) return T;
1240
- if (typeof l == "string") {
1241
- var b = l.toLowerCase();
1242
- $[b] && (s = b), r && ($[b] = r, s = b);
1243
- var N = l.split("-");
1244
- if (!s && N.length > 1) return m(N[0]);
1225
+ } }, k = "en", T = {};
1226
+ T[k] = v;
1227
+ var _ = "$isDayjsObject", H = function(m) {
1228
+ return m instanceof $ || !(!m || !m[_]);
1229
+ }, W = function m(i, r, d) {
1230
+ var c;
1231
+ if (!i) return k;
1232
+ if (typeof i == "string") {
1233
+ var x = i.toLowerCase();
1234
+ T[x] && (c = x), r && (T[x] = r, c = x);
1235
+ var N = i.split("-");
1236
+ if (!c && N.length > 1) return m(N[0]);
1245
1237
  } else {
1246
- var B = l.name;
1247
- $[B] = l, s = B;
1238
+ var B = i.name;
1239
+ T[B] = i, c = B;
1248
1240
  }
1249
- return !d && s && (T = s), s || !d && T;
1250
- }, P = function(m, l) {
1251
- if (O(m)) return m.clone();
1252
- var r = typeof l == "object" ? l : {};
1253
- return r.date = m, r.args = arguments, new A(r);
1254
- }, x = g;
1255
- x.l = F, x.i = O, x.w = function(m, l) {
1256
- return P(m, { locale: l.$L, utc: l.$u, x: l.$x, $offset: l.$offset });
1241
+ return !d && c && (k = c), c || !d && k;
1242
+ }, M = function(m, i) {
1243
+ if (H(m)) return m.clone();
1244
+ var r = typeof i == "object" ? i : {};
1245
+ return r.date = m, r.args = arguments, new $(r);
1246
+ }, g = h;
1247
+ g.l = W, g.i = H, g.w = function(m, i) {
1248
+ return M(m, { locale: i.$L, utc: i.$u, x: i.$x, $offset: i.$offset });
1257
1249
  };
1258
- var A = (function() {
1250
+ var $ = (function() {
1259
1251
  function m(r) {
1260
- this.$L = F(r.locale, null, !0), this.parse(r), this.$x = this.$x || r.x || {}, this[H] = !0;
1252
+ this.$L = W(r.locale, null, !0), this.parse(r), this.$x = this.$x || r.x || {}, this[_] = !0;
1261
1253
  }
1262
- var l = m.prototype;
1263
- return l.parse = function(r) {
1254
+ var i = m.prototype;
1255
+ return i.parse = function(r) {
1264
1256
  this.$d = (function(d) {
1265
- var s = d.date, b = d.utc;
1266
- if (s === null) return /* @__PURE__ */ new Date(NaN);
1267
- if (x.u(s)) return /* @__PURE__ */ new Date();
1268
- if (s instanceof Date) return new Date(s);
1269
- if (typeof s == "string" && !/Z$/i.test(s)) {
1270
- var N = s.match(R);
1257
+ var c = d.date, x = d.utc;
1258
+ if (c === null) return /* @__PURE__ */ new Date(NaN);
1259
+ if (g.u(c)) return /* @__PURE__ */ new Date();
1260
+ if (c instanceof Date) return new Date(c);
1261
+ if (typeof c == "string" && !/Z$/i.test(c)) {
1262
+ var N = c.match(F);
1271
1263
  if (N) {
1272
- var B = N[2] - 1 || 0, _ = (N[7] || "0").substring(0, 3);
1273
- return b ? new Date(Date.UTC(N[1], B, N[3] || 1, N[4] || 0, N[5] || 0, N[6] || 0, _)) : new Date(N[1], B, N[3] || 1, N[4] || 0, N[5] || 0, N[6] || 0, _);
1264
+ var B = N[2] - 1 || 0, R = (N[7] || "0").substring(0, 3);
1265
+ return x ? new Date(Date.UTC(N[1], B, N[3] || 1, N[4] || 0, N[5] || 0, N[6] || 0, R)) : new Date(N[1], B, N[3] || 1, N[4] || 0, N[5] || 0, N[6] || 0, R);
1274
1266
  }
1275
1267
  }
1276
- return new Date(s);
1268
+ return new Date(c);
1277
1269
  })(r), this.init();
1278
- }, l.init = function() {
1270
+ }, i.init = function() {
1279
1271
  var r = this.$d;
1280
1272
  this.$y = r.getFullYear(), this.$M = r.getMonth(), this.$D = r.getDate(), this.$W = r.getDay(), this.$H = r.getHours(), this.$m = r.getMinutes(), this.$s = r.getSeconds(), this.$ms = r.getMilliseconds();
1281
- }, l.$utils = function() {
1282
- return x;
1283
- }, l.isValid = function() {
1273
+ }, i.$utils = function() {
1274
+ return g;
1275
+ }, i.isValid = function() {
1284
1276
  return this.$d.toString() !== L;
1285
- }, l.isSame = function(r, d) {
1286
- var s = P(r);
1287
- return this.startOf(d) <= s && s <= this.endOf(d);
1288
- }, l.isAfter = function(r, d) {
1289
- return P(r) < this.startOf(d);
1290
- }, l.isBefore = function(r, d) {
1291
- return this.endOf(d) < P(r);
1292
- }, l.$g = function(r, d, s) {
1293
- return x.u(r) ? this[d] : this.set(s, r);
1294
- }, l.unix = function() {
1277
+ }, i.isSame = function(r, d) {
1278
+ var c = M(r);
1279
+ return this.startOf(d) <= c && c <= this.endOf(d);
1280
+ }, i.isAfter = function(r, d) {
1281
+ return M(r) < this.startOf(d);
1282
+ }, i.isBefore = function(r, d) {
1283
+ return this.endOf(d) < M(r);
1284
+ }, i.$g = function(r, d, c) {
1285
+ return g.u(r) ? this[d] : this.set(c, r);
1286
+ }, i.unix = function() {
1295
1287
  return Math.floor(this.valueOf() / 1e3);
1296
- }, l.valueOf = function() {
1288
+ }, i.valueOf = function() {
1297
1289
  return this.$d.getTime();
1298
- }, l.startOf = function(r, d) {
1299
- var s = this, b = !!x.u(d) || d, N = x.p(r), B = function(q, W) {
1300
- var Z = x.w(s.$u ? Date.UTC(s.$y, W, q) : new Date(s.$y, W, q), s);
1301
- return b ? Z : Z.endOf(p);
1302
- }, _ = function(q, W) {
1303
- return x.w(s.toDate()[q].apply(s.toDate("s"), (b ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(W)), s);
1304
- }, G = this.$W, U = this.$M, j = this.$D, Q = "set" + (this.$u ? "UTC" : "");
1290
+ }, i.startOf = function(r, d) {
1291
+ var c = this, x = !!g.u(d) || d, N = g.p(r), B = function(q, U) {
1292
+ var Z = g.w(c.$u ? Date.UTC(c.$y, U, q) : new Date(c.$y, U, q), c);
1293
+ return x ? Z : Z.endOf(b);
1294
+ }, R = function(q, U) {
1295
+ return g.w(c.toDate()[q].apply(c.toDate("s"), (x ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(U)), c);
1296
+ }, O = this.$W, G = this.$M, V = this.$D, Q = "set" + (this.$u ? "UTC" : "");
1305
1297
  switch (N) {
1306
- case I:
1307
- return b ? B(1, 0) : B(31, 11);
1308
- case v:
1309
- return b ? B(1, U) : B(0, U + 1);
1298
+ case D:
1299
+ return x ? B(1, 0) : B(31, 11);
1310
1300
  case S:
1311
- var X = this.$locale().weekStart || 0, re = (G < X ? G + 7 : G) - X;
1312
- return B(b ? j - re : j + (6 - re), U);
1313
- case p:
1314
- case k:
1315
- return _(Q + "Hours", 0);
1301
+ return x ? B(1, G) : B(0, G + 1);
1302
+ case w:
1303
+ var X = this.$locale().weekStart || 0, re = (O < X ? O + 7 : O) - X;
1304
+ return B(x ? V - re : V + (6 - re), G);
1305
+ case b:
1306
+ case P:
1307
+ return R(Q + "Hours", 0);
1316
1308
  case f:
1317
- return _(Q + "Minutes", 1);
1318
- case h:
1319
- return _(Q + "Seconds", 2);
1309
+ return R(Q + "Minutes", 1);
1310
+ case p:
1311
+ return R(Q + "Seconds", 2);
1320
1312
  case u:
1321
- return _(Q + "Milliseconds", 3);
1313
+ return R(Q + "Milliseconds", 3);
1322
1314
  default:
1323
1315
  return this.clone();
1324
1316
  }
1325
- }, l.endOf = function(r) {
1317
+ }, i.endOf = function(r) {
1326
1318
  return this.startOf(r, !1);
1327
- }, l.$set = function(r, d) {
1328
- var s, b = x.p(r), N = "set" + (this.$u ? "UTC" : ""), B = (s = {}, s[p] = N + "Date", s[k] = N + "Date", s[v] = N + "Month", s[I] = N + "FullYear", s[f] = N + "Hours", s[h] = N + "Minutes", s[u] = N + "Seconds", s[c] = N + "Milliseconds", s)[b], _ = b === p ? this.$D + (d - this.$W) : d;
1329
- if (b === v || b === I) {
1330
- var G = this.clone().set(k, 1);
1331
- G.$d[B](_), G.init(), this.$d = G.set(k, Math.min(this.$D, G.daysInMonth())).$d;
1332
- } else B && this.$d[B](_);
1319
+ }, i.$set = function(r, d) {
1320
+ var c, x = g.p(r), N = "set" + (this.$u ? "UTC" : ""), B = (c = {}, c[b] = N + "Date", c[P] = N + "Date", c[S] = N + "Month", c[D] = N + "FullYear", c[f] = N + "Hours", c[p] = N + "Minutes", c[u] = N + "Seconds", c[l] = N + "Milliseconds", c)[x], R = x === b ? this.$D + (d - this.$W) : d;
1321
+ if (x === S || x === D) {
1322
+ var O = this.clone().set(P, 1);
1323
+ O.$d[B](R), O.init(), this.$d = O.set(P, Math.min(this.$D, O.daysInMonth())).$d;
1324
+ } else B && this.$d[B](R);
1333
1325
  return this.init(), this;
1334
- }, l.set = function(r, d) {
1326
+ }, i.set = function(r, d) {
1335
1327
  return this.clone().$set(r, d);
1336
- }, l.get = function(r) {
1337
- return this[x.p(r)]();
1338
- }, l.add = function(r, d) {
1339
- var s, b = this;
1328
+ }, i.get = function(r) {
1329
+ return this[g.p(r)]();
1330
+ }, i.add = function(r, d) {
1331
+ var c, x = this;
1340
1332
  r = Number(r);
1341
- var N = x.p(d), B = function(U) {
1342
- var j = P(b);
1343
- return x.w(j.date(j.date() + Math.round(U * r)), b);
1333
+ var N = g.p(d), B = function(G) {
1334
+ var V = M(x);
1335
+ return g.w(V.date(V.date() + Math.round(G * r)), x);
1344
1336
  };
1345
- if (N === v) return this.set(v, this.$M + r);
1346
- if (N === I) return this.set(I, this.$y + r);
1347
- if (N === p) return B(1);
1348
- if (N === S) return B(7);
1349
- var _ = (s = {}, s[h] = o, s[f] = i, s[u] = n, s)[N] || 1, G = this.$d.getTime() + r * _;
1350
- return x.w(G, this);
1351
- }, l.subtract = function(r, d) {
1337
+ if (N === S) return this.set(S, this.$M + r);
1338
+ if (N === D) return this.set(D, this.$y + r);
1339
+ if (N === b) return B(1);
1340
+ if (N === w) return B(7);
1341
+ var R = (c = {}, c[p] = o, c[f] = s, c[u] = n, c)[N] || 1, O = this.$d.getTime() + r * R;
1342
+ return g.w(O, this);
1343
+ }, i.subtract = function(r, d) {
1352
1344
  return this.add(-1 * r, d);
1353
- }, l.format = function(r) {
1354
- var d = this, s = this.$locale();
1355
- if (!this.isValid()) return s.invalidDate || L;
1356
- var b = r || "YYYY-MM-DDTHH:mm:ssZ", N = x.z(this), B = this.$H, _ = this.$m, G = this.$M, U = s.weekdays, j = s.months, Q = s.meridiem, X = function(W, Z, oe, ie) {
1357
- return W && (W[Z] || W(d, b)) || oe[Z].slice(0, ie);
1358
- }, re = function(W) {
1359
- return x.s(B % 12 || 12, W, "0");
1360
- }, q = Q || function(W, Z, oe) {
1361
- var ie = W < 12 ? "AM" : "PM";
1345
+ }, i.format = function(r) {
1346
+ var d = this, c = this.$locale();
1347
+ if (!this.isValid()) return c.invalidDate || L;
1348
+ var x = r || "YYYY-MM-DDTHH:mm:ssZ", N = g.z(this), B = this.$H, R = this.$m, O = this.$M, G = c.weekdays, V = c.months, Q = c.meridiem, X = function(U, Z, oe, ie) {
1349
+ return U && (U[Z] || U(d, x)) || oe[Z].slice(0, ie);
1350
+ }, re = function(U) {
1351
+ return g.s(B % 12 || 12, U, "0");
1352
+ }, q = Q || function(U, Z, oe) {
1353
+ var ie = U < 12 ? "AM" : "PM";
1362
1354
  return oe ? ie.toLowerCase() : ie;
1363
1355
  };
1364
- return b.replace(y, (function(W, Z) {
1356
+ return x.replace(y, (function(U, Z) {
1365
1357
  return Z || (function(oe) {
1366
1358
  switch (oe) {
1367
1359
  case "YY":
1368
1360
  return String(d.$y).slice(-2);
1369
1361
  case "YYYY":
1370
- return x.s(d.$y, 4, "0");
1362
+ return g.s(d.$y, 4, "0");
1371
1363
  case "M":
1372
- return G + 1;
1364
+ return O + 1;
1373
1365
  case "MM":
1374
- return x.s(G + 1, 2, "0");
1366
+ return g.s(O + 1, 2, "0");
1375
1367
  case "MMM":
1376
- return X(s.monthsShort, G, j, 3);
1368
+ return X(c.monthsShort, O, V, 3);
1377
1369
  case "MMMM":
1378
- return X(j, G);
1370
+ return X(V, O);
1379
1371
  case "D":
1380
1372
  return d.$D;
1381
1373
  case "DD":
1382
- return x.s(d.$D, 2, "0");
1374
+ return g.s(d.$D, 2, "0");
1383
1375
  case "d":
1384
1376
  return String(d.$W);
1385
1377
  case "dd":
1386
- return X(s.weekdaysMin, d.$W, U, 2);
1378
+ return X(c.weekdaysMin, d.$W, G, 2);
1387
1379
  case "ddd":
1388
- return X(s.weekdaysShort, d.$W, U, 3);
1380
+ return X(c.weekdaysShort, d.$W, G, 3);
1389
1381
  case "dddd":
1390
- return U[d.$W];
1382
+ return G[d.$W];
1391
1383
  case "H":
1392
1384
  return String(B);
1393
1385
  case "HH":
1394
- return x.s(B, 2, "0");
1386
+ return g.s(B, 2, "0");
1395
1387
  case "h":
1396
1388
  return re(1);
1397
1389
  case "hh":
1398
1390
  return re(2);
1399
1391
  case "a":
1400
- return q(B, _, !0);
1392
+ return q(B, R, !0);
1401
1393
  case "A":
1402
- return q(B, _, !1);
1394
+ return q(B, R, !1);
1403
1395
  case "m":
1404
- return String(_);
1396
+ return String(R);
1405
1397
  case "mm":
1406
- return x.s(_, 2, "0");
1398
+ return g.s(R, 2, "0");
1407
1399
  case "s":
1408
1400
  return String(d.$s);
1409
1401
  case "ss":
1410
- return x.s(d.$s, 2, "0");
1402
+ return g.s(d.$s, 2, "0");
1411
1403
  case "SSS":
1412
- return x.s(d.$ms, 3, "0");
1404
+ return g.s(d.$ms, 3, "0");
1413
1405
  case "Z":
1414
1406
  return N;
1415
1407
  }
1416
1408
  return null;
1417
- })(W) || N.replace(":", "");
1409
+ })(U) || N.replace(":", "");
1418
1410
  }));
1419
- }, l.utcOffset = function() {
1411
+ }, i.utcOffset = function() {
1420
1412
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
1421
- }, l.diff = function(r, d, s) {
1422
- var b, N = this, B = x.p(d), _ = P(r), G = (_.utcOffset() - this.utcOffset()) * o, U = this - _, j = function() {
1423
- return x.m(N, _);
1413
+ }, i.diff = function(r, d, c) {
1414
+ var x, N = this, B = g.p(d), R = M(r), O = (R.utcOffset() - this.utcOffset()) * o, G = this - R, V = function() {
1415
+ return g.m(N, R);
1424
1416
  };
1425
1417
  switch (B) {
1426
- case I:
1427
- b = j() / 12;
1428
- break;
1429
- case v:
1430
- b = j();
1431
- break;
1432
1418
  case D:
1433
- b = j() / 3;
1419
+ x = V() / 12;
1434
1420
  break;
1435
1421
  case S:
1436
- b = (U - G) / 6048e5;
1422
+ x = V();
1437
1423
  break;
1438
- case p:
1439
- b = (U - G) / 864e5;
1424
+ case E:
1425
+ x = V() / 3;
1426
+ break;
1427
+ case w:
1428
+ x = (G - O) / 6048e5;
1429
+ break;
1430
+ case b:
1431
+ x = (G - O) / 864e5;
1440
1432
  break;
1441
1433
  case f:
1442
- b = U / i;
1434
+ x = G / s;
1443
1435
  break;
1444
- case h:
1445
- b = U / o;
1436
+ case p:
1437
+ x = G / o;
1446
1438
  break;
1447
1439
  case u:
1448
- b = U / n;
1440
+ x = G / n;
1449
1441
  break;
1450
1442
  default:
1451
- b = U;
1443
+ x = G;
1452
1444
  }
1453
- return s ? b : x.a(b);
1454
- }, l.daysInMonth = function() {
1455
- return this.endOf(v).$D;
1456
- }, l.$locale = function() {
1457
- return $[this.$L];
1458
- }, l.locale = function(r, d) {
1445
+ return c ? x : g.a(x);
1446
+ }, i.daysInMonth = function() {
1447
+ return this.endOf(S).$D;
1448
+ }, i.$locale = function() {
1449
+ return T[this.$L];
1450
+ }, i.locale = function(r, d) {
1459
1451
  if (!r) return this.$L;
1460
- var s = this.clone(), b = F(r, d, !0);
1461
- return b && (s.$L = b), s;
1462
- }, l.clone = function() {
1463
- return x.w(this.$d, this);
1464
- }, l.toDate = function() {
1452
+ var c = this.clone(), x = W(r, d, !0);
1453
+ return x && (c.$L = x), c;
1454
+ }, i.clone = function() {
1455
+ return g.w(this.$d, this);
1456
+ }, i.toDate = function() {
1465
1457
  return new Date(this.valueOf());
1466
- }, l.toJSON = function() {
1458
+ }, i.toJSON = function() {
1467
1459
  return this.isValid() ? this.toISOString() : null;
1468
- }, l.toISOString = function() {
1460
+ }, i.toISOString = function() {
1469
1461
  return this.$d.toISOString();
1470
- }, l.toString = function() {
1462
+ }, i.toString = function() {
1471
1463
  return this.$d.toUTCString();
1472
1464
  }, m;
1473
- })(), K = A.prototype;
1474
- return P.prototype = K, [["$ms", c], ["$s", u], ["$m", h], ["$H", f], ["$W", p], ["$M", v], ["$y", I], ["$D", k]].forEach((function(m) {
1475
- K[m[1]] = function(l) {
1476
- return this.$g(l, m[0], m[1]);
1465
+ })(), j = $.prototype;
1466
+ return M.prototype = j, [["$ms", l], ["$s", u], ["$m", p], ["$H", f], ["$W", b], ["$M", S], ["$y", D], ["$D", P]].forEach((function(m) {
1467
+ j[m[1]] = function(i) {
1468
+ return this.$g(i, m[0], m[1]);
1477
1469
  };
1478
- })), P.extend = function(m, l) {
1479
- return m.$i || (m(l, A, P), m.$i = !0), P;
1480
- }, P.locale = F, P.isDayjs = O, P.unix = function(m) {
1481
- return P(1e3 * m);
1482
- }, P.en = $[T], P.Ls = $, P.p = {}, P;
1470
+ })), M.extend = function(m, i) {
1471
+ return m.$i || (m(i, $, M), m.$i = !0), M;
1472
+ }, M.locale = W, M.isDayjs = H, M.unix = function(m) {
1473
+ return M(1e3 * m);
1474
+ }, M.en = T[k], M.Ls = T, M.p = {}, M;
1483
1475
  }));
1484
1476
  })(ce)), ce.exports;
1485
1477
  }
1486
- var Nt = xt();
1487
- const we = /* @__PURE__ */ Oe(Nt);
1488
- function vt(e, t) {
1489
- const n = t.startOf("day"), i = e.startOf("day").diff(n, "day");
1490
- return i === 0 ? "today" : i === -1 ? "yesterday" : i < 0 ? `${Math.abs(i)} days ago` : `in ${i} days`;
1478
+ var vt = xt();
1479
+ const Ce = /* @__PURE__ */ Re(vt);
1480
+ function Nt(e, t) {
1481
+ const n = t.startOf("day"), s = e.startOf("day").diff(n, "day");
1482
+ return s === 0 ? "today" : s === -1 ? "yesterday" : s < 0 ? `${Math.abs(s)} days ago` : `in ${s} days`;
1491
1483
  }
1492
1484
  function Zt({ value: e, dateFormat: t = "DD/MM/YYYY" }) {
1493
- const n = we(e), o = we(), i = n.format(t), c = vt(n, o);
1494
- return /* @__PURE__ */ E("div", { className: "flex flex-col", children: [
1495
- /* @__PURE__ */ a("span", { className: "text-foreground", children: i }),
1496
- /* @__PURE__ */ E("span", { className: M("flex items-center gap-1 text-xs text-muted-foreground"), children: [
1497
- /* @__PURE__ */ a(tt, { className: "h-3 w-3" }),
1498
- c
1485
+ const n = Ce(e), o = Ce(), s = n.format(t), l = Nt(n, o);
1486
+ return /* @__PURE__ */ I("div", { className: "flex flex-col", children: [
1487
+ /* @__PURE__ */ a("span", { className: "text-foreground", children: s }),
1488
+ /* @__PURE__ */ I("span", { className: A("flex items-center gap-1 text-xs text-muted-foreground"), children: [
1489
+ /* @__PURE__ */ a(et, { className: "h-3 w-3" }),
1490
+ l
1499
1491
  ] })
1500
1492
  ] });
1501
1493
  }
1502
1494
  function Jt({ value: e, row: t }) {
1503
- return /* @__PURE__ */ E("div", { className: "flex flex-col", children: [
1495
+ return /* @__PURE__ */ I("div", { className: "flex flex-col", children: [
1504
1496
  /* @__PURE__ */ a("span", { className: "font-medium text-foreground", children: e }),
1505
1497
  /* @__PURE__ */ a("span", { className: "text-xs text-muted-foreground", children: t.email })
1506
1498
  ] });
@@ -1522,7 +1514,7 @@ function Ct(e) {
1522
1514
  }
1523
1515
  function Xt({ value: e }) {
1524
1516
  const t = St(e), n = Ct(e);
1525
- return /* @__PURE__ */ a("span", { className: M("rounded px-2 py-1 text-xs font-medium", t), children: n });
1517
+ return /* @__PURE__ */ a("span", { className: A("rounded px-2 py-1 text-xs font-medium", t), children: n });
1526
1518
  }
1527
1519
  const wt = {
1528
1520
  Afghanistan: "AF",
@@ -1778,21 +1770,21 @@ const wt = {
1778
1770
  function Mt(e) {
1779
1771
  return wt[e] ?? null;
1780
1772
  }
1781
- function Me(e) {
1773
+ function we(e) {
1782
1774
  return `https://cdn.jsdelivr.net/npm/twemoji@latest/2/svg/${e.toUpperCase().split("").map((o) => (127462 + ((o.codePointAt(0) ?? 0) - ("A".codePointAt(0) ?? 0))).toString(16)).join("-")}.svg`;
1783
1775
  }
1784
1776
  function qt({ value: e }) {
1785
- const [t, n] = Y(!1), o = Mt(e), i = Me(o || e), c = () => {
1777
+ const [t, n] = K(!1), o = Mt(e), s = we(o || e), l = () => {
1786
1778
  n(!0);
1787
1779
  };
1788
- return /* @__PURE__ */ E("div", { className: "inline-flex items-center gap-2", children: [
1780
+ return /* @__PURE__ */ I("div", { className: "inline-flex items-center gap-2", children: [
1789
1781
  t ? /* @__PURE__ */ a("span", { children: "-" }) : /* @__PURE__ */ a(
1790
1782
  "img",
1791
1783
  {
1792
- src: i,
1784
+ src: s,
1793
1785
  alt: `${e} flag`,
1794
1786
  className: "h-5 w-5",
1795
- onError: c
1787
+ onError: l
1796
1788
  }
1797
1789
  ),
1798
1790
  /* @__PURE__ */ a("span", { className: "text-foreground", children: e })
@@ -1802,17 +1794,17 @@ function Qt({ value: e }) {
1802
1794
  const t = () => {
1803
1795
  navigator.clipboard.writeText(e);
1804
1796
  };
1805
- return /* @__PURE__ */ E("span", { className: M("group inline-flex items-center gap-1"), children: [
1797
+ return /* @__PURE__ */ I("span", { className: A("group inline-flex items-center gap-1"), children: [
1806
1798
  /* @__PURE__ */ a("span", { className: "text-foreground", children: e }),
1807
1799
  /* @__PURE__ */ a(
1808
1800
  "button",
1809
1801
  {
1810
1802
  onClick: t,
1811
- className: M(
1803
+ className: A(
1812
1804
  "opacity-0 group-hover:opacity-100 cursor-pointer transition-opacity"
1813
1805
  ),
1814
1806
  "aria-label": "Copy to clipboard",
1815
- children: /* @__PURE__ */ a(at, { className: "h-3 w-3" })
1807
+ children: /* @__PURE__ */ a(nt, { className: "h-3 w-3" })
1816
1808
  }
1817
1809
  )
1818
1810
  ] });
@@ -1841,19 +1833,19 @@ function kt(e) {
1841
1833
  return t.charAt(0).toUpperCase() + t.slice(1).toLowerCase();
1842
1834
  }
1843
1835
  function en({ value: e, version: t }) {
1844
- const n = t !== !1 && t !== void 0 && t !== "unknown", o = Dt(e), i = kt(e);
1845
- return /* @__PURE__ */ E("div", { className: M("flex flex-col gap-1"), children: [
1836
+ const n = t !== !1 && t !== void 0 && t !== "unknown", o = Dt(e), s = kt(e);
1837
+ return /* @__PURE__ */ I("div", { className: A("flex flex-col gap-1"), children: [
1846
1838
  /* @__PURE__ */ a(
1847
1839
  "span",
1848
1840
  {
1849
- className: M(
1841
+ className: A(
1850
1842
  "inline-flex w-fit items-center rounded px-2 py-1 text-xs font-medium",
1851
1843
  o
1852
1844
  ),
1853
- children: i
1845
+ children: s
1854
1846
  }
1855
1847
  ),
1856
- n && /* @__PURE__ */ E("span", { className: "text-xs text-muted-foreground", children: [
1848
+ n && /* @__PURE__ */ I("span", { className: "text-xs text-muted-foreground", children: [
1857
1849
  /* @__PURE__ */ a("span", { children: "Version:" }),
1858
1850
  " ",
1859
1851
  /* @__PURE__ */ a("span", { children: t ?? "-" })
@@ -1861,80 +1853,81 @@ function en({ value: e, version: t }) {
1861
1853
  ] });
1862
1854
  }
1863
1855
  export {
1864
- la as Avatar,
1865
- da as AvatarFallback,
1866
- ua as AvatarImage,
1867
- ha as Breadcrumb,
1868
- ma as BreadcrumbEllipsis,
1869
- pa as BreadcrumbItem,
1870
- ga as BreadcrumbLink,
1871
- ya as BreadcrumbList,
1872
- ba as BreadcrumbPage,
1873
- xa as BreadcrumbSeparator,
1856
+ Ln as Autocomplete,
1857
+ ua as Avatar,
1858
+ fa as AvatarFallback,
1859
+ ha as AvatarImage,
1860
+ pa as Breadcrumb,
1861
+ ga as BreadcrumbEllipsis,
1862
+ ba as BreadcrumbItem,
1863
+ ya as BreadcrumbLink,
1864
+ xa as BreadcrumbList,
1865
+ va as BreadcrumbPage,
1866
+ Na as BreadcrumbSeparator,
1874
1867
  fe as Button,
1875
- Ie as Calendar,
1876
- Qn as CalendarDayButton,
1877
- Vn as Card,
1878
- Yn as CardAction,
1879
- Kn as CardContent,
1880
- zn as CardDescription,
1881
- Zn as CardFooter,
1882
- Jn as CardHeader,
1883
- Xn as CardTitle,
1868
+ Be as Calendar,
1869
+ ta as CalendarDayButton,
1870
+ Kn as Card,
1871
+ zn as CardAction,
1872
+ Zn as CardContent,
1873
+ Jn as CardDescription,
1874
+ Xn as CardFooter,
1875
+ qn as CardHeader,
1876
+ Qn as CardTitle,
1884
1877
  me as Checkbox,
1885
- Ln as Combobox,
1878
+ En as Combobox,
1886
1879
  Qt as CopyableCell,
1887
- sa as CounterLabel,
1880
+ la as CounterLabel,
1888
1881
  qt as CountryCell,
1889
1882
  Gt as CurrencyInput,
1890
- ct as DEFAULT_COLOR_CONFIG,
1883
+ st as DEFAULT_COLOR_CONFIG,
1891
1884
  zt as DataTable,
1892
1885
  Zt as DateCell,
1893
1886
  Kt as DatePicker,
1894
1887
  mn as Dialog,
1895
1888
  pn as DialogDescription,
1896
1889
  gn as DialogPanel,
1897
- yn as DialogTitle,
1890
+ bn as DialogTitle,
1898
1891
  dn as Disclosure,
1899
1892
  un as DisclosureButton,
1900
1893
  fn as DisclosurePanel,
1901
1894
  on as DropdownMenu,
1902
1895
  sn as DropdownMenuButton,
1903
1896
  cn as DropdownMenuItem,
1904
- Bn as Fieldset,
1897
+ In as Fieldset,
1905
1898
  he as IconButton,
1906
- De as Input,
1907
- In as Listbox,
1899
+ Me as Input,
1900
+ Fn as Listbox,
1908
1901
  Jt as NameCell,
1909
1902
  Ht as PageLayout,
1910
1903
  Vt as PageLayoutBody,
1911
1904
  Yt as PageLayoutContent,
1912
1905
  jt as PageLayoutFooter,
1913
1906
  Wt as PageLayoutHeader,
1914
- Ve as PageLayoutPane,
1907
+ je as PageLayoutPane,
1915
1908
  Ut as PageLayoutSection,
1916
1909
  xn as Popover,
1917
- Nn as PopoverContent,
1918
- vn as PopoverTrigger,
1919
- V as ROW_INTERACTION,
1920
- On as RadioGroup,
1921
- aa as RelativeTime,
1910
+ vn as PopoverContent,
1911
+ Nn as PopoverTrigger,
1912
+ Y as ROW_INTERACTION,
1913
+ _n as RadioGroup,
1914
+ oa as RelativeTime,
1922
1915
  Xt as RiskLevelCell,
1923
1916
  se as STATUS,
1924
- _n as Select,
1917
+ Hn as Select,
1925
1918
  ue as Skeleton,
1926
- ta as Sonner,
1919
+ aa as Sonner,
1927
1920
  an as Spinner,
1928
1921
  en as StatusCell,
1929
- Hn as Switch,
1922
+ Wn as Switch,
1930
1923
  Cn as Tab,
1931
1924
  wn as TabList,
1932
1925
  Mn as TabPanel,
1933
1926
  Dn as TabPanels,
1934
1927
  kn as Tabs,
1935
- Wn as Textarea,
1936
- va as ThemeProvider,
1937
- An as Transition,
1938
- oa as VisuallyHidden,
1939
- Sa as useTheme
1928
+ Vn as Textarea,
1929
+ Ca as ThemeProvider,
1930
+ Tn as Transition,
1931
+ sa as VisuallyHidden,
1932
+ wa as useTheme
1940
1933
  };