@pibit.ai/cure-design-system 0.3.21 → 0.3.24

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 (68) hide show
  1. package/dist/index.d.ts +3 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +157 -136
  4. package/dist/patterns/table/TableWrapper.d.ts.map +1 -1
  5. package/dist/patterns/table/TableWrapper.js +330 -323
  6. package/dist/patterns/table/index.d.ts +5 -2
  7. package/dist/patterns/table/index.d.ts.map +1 -1
  8. package/dist/patterns/table/integrateTableUndoRedo.d.ts +41 -0
  9. package/dist/patterns/table/integrateTableUndoRedo.d.ts.map +1 -0
  10. package/dist/patterns/table/integrateTableUndoRedo.js +63 -0
  11. package/dist/patterns/table/storyHelpers/useMockTableState.d.ts +3 -1
  12. package/dist/patterns/table/storyHelpers/useMockTableState.d.ts.map +1 -1
  13. package/dist/patterns/table/table.d.ts +2 -1
  14. package/dist/patterns/table/table.d.ts.map +1 -1
  15. package/dist/patterns/table/table.js +181 -155
  16. package/dist/patterns/table/tableUndoRedo.d.ts +38 -0
  17. package/dist/patterns/table/tableUndoRedo.d.ts.map +1 -0
  18. package/dist/patterns/table/tableUndoRedo.js +147 -0
  19. package/dist/patterns/table/toolbar/AlignDropdown.d.ts.map +1 -1
  20. package/dist/patterns/table/toolbar/AlignDropdown.js +5 -11
  21. package/dist/patterns/table/toolbar/ColumnHeaderMenu.d.ts +4 -0
  22. package/dist/patterns/table/toolbar/ColumnHeaderMenu.d.ts.map +1 -1
  23. package/dist/patterns/table/toolbar/ColumnHeaderMenu.js +81 -77
  24. package/dist/patterns/table/toolbar/GroupByDropdown.d.ts.map +1 -1
  25. package/dist/patterns/table/toolbar/GroupByDropdown.js +48 -43
  26. package/dist/patterns/table/toolbar/TableToolbar.d.ts +12 -1
  27. package/dist/patterns/table/toolbar/TableToolbar.d.ts.map +1 -1
  28. package/dist/patterns/table/toolbar/TableToolbar.js +164 -114
  29. package/dist/patterns/table/toolbar/index.d.ts +2 -2
  30. package/dist/patterns/table/toolbar/index.d.ts.map +1 -1
  31. package/dist/patterns/table/toolbar/tableToolbarHelpers.d.ts +10 -1
  32. package/dist/patterns/table/toolbar/tableToolbarHelpers.d.ts.map +1 -1
  33. package/dist/patterns/table/toolbar/tableToolbarHelpers.js +116 -116
  34. package/dist/patterns/table/toolbar/useUndoRedoShortcuts.d.ts +9 -0
  35. package/dist/patterns/table/toolbar/useUndoRedoShortcuts.d.ts.map +1 -0
  36. package/dist/patterns/table/toolbar/useUndoRedoShortcuts.js +21 -0
  37. package/dist/patterns/table/types.d.ts +5 -1
  38. package/dist/patterns/table/types.d.ts.map +1 -1
  39. package/dist/patterns/table/useTableUndoRedo.d.ts +41 -0
  40. package/dist/patterns/table/useTableUndoRedo.d.ts.map +1 -0
  41. package/dist/patterns/table/useTableUndoRedo.js +168 -0
  42. package/dist/primitives/badge/badge.js +5 -5
  43. package/dist/primitives/input/input.d.ts +1 -1
  44. package/dist/primitives/input/input.d.ts.map +1 -1
  45. package/dist/primitives/input/input.js +63 -62
  46. package/dist/primitives/multi-chips-select/MultiChipsSelect.d.ts +20 -0
  47. package/dist/primitives/multi-chips-select/MultiChipsSelect.d.ts.map +1 -0
  48. package/dist/primitives/multi-chips-select/MultiChipsSelect.js +233 -0
  49. package/dist/primitives/multi-chips-select/index.d.ts +3 -0
  50. package/dist/primitives/multi-chips-select/index.d.ts.map +1 -0
  51. package/dist/primitives/multi-chips-select/tagKeyFromLabel.d.ts +3 -0
  52. package/dist/primitives/multi-chips-select/tagKeyFromLabel.d.ts.map +1 -0
  53. package/dist/primitives/multi-chips-select/tagKeyFromLabel.js +6 -0
  54. package/dist/primitives/select/ExpandableSearchInput.d.ts +3 -1
  55. package/dist/primitives/select/ExpandableSearchInput.d.ts.map +1 -1
  56. package/dist/primitives/select/ExpandableSearchInput.js +100 -78
  57. package/dist/primitives/select/SearchInput.d.ts +5 -1
  58. package/dist/primitives/select/SearchInput.d.ts.map +1 -1
  59. package/dist/primitives/select/SearchInput.js +101 -80
  60. package/dist/primitives/select/combobox.d.ts.map +1 -1
  61. package/dist/primitives/select/combobox.js +48 -47
  62. package/dist/primitives/select/multi-select.d.ts.map +1 -1
  63. package/dist/primitives/select/multi-select.js +50 -49
  64. package/dist/styles/components.css +1 -1
  65. package/dist/utils/keyboard-shortcut.d.ts +4 -0
  66. package/dist/utils/keyboard-shortcut.d.ts.map +1 -0
  67. package/dist/utils/keyboard-shortcut.js +29 -0
  68. package/package.json +1 -1
@@ -1,40 +1,40 @@
1
- import { jsx as i, jsxs as k } from "react/jsx-runtime";
2
- import { forwardRef as qt, useState as q, useMemo as h, useCallback as B, useRef as Bt, useEffect as Jt, useLayoutEffect as Vt } from "react";
3
- import { ChevronRight as Xt } from "@untitledui/icons";
1
+ import { jsx as i, jsxs as S } from "react/jsx-runtime";
2
+ import { forwardRef as Bt, useState as J, useMemo as u, useCallback as V, useRef as Jt, useEffect as Vt, useLayoutEffect as Xt } from "react";
3
+ import { ChevronRight as Yt } from "@untitledui/icons";
4
4
  import { cx as c } from "../../utils/cn.js";
5
- import { TableCard as Yt, Table as d } from "./table.js";
5
+ import { TableCard as Ht, Table as d } from "./table.js";
6
6
  import { TablePagination as Qt } from "./TablePagination.js";
7
- import { getEffectiveAlignment as lt, resolveColumnLabel as Zt, alignmentClass as Kt } from "./toolbar/tableToolbarHelpers.js";
7
+ import { getEffectiveAlignment as ot, resolveColumnLabel as Zt, alignmentClass as Kt } from "./toolbar/tableToolbarHelpers.js";
8
8
  import { findGridCell as er, isWithinCellEditor as tr, getGridNeighbor as rr, getGridTabNeighbor as nr, focusGridCell as ir, GridNavProvider as sr } from "./useGridKeyboardNavigation.js";
9
9
  import { BulkActionBar as ar } from "./toolbar/BulkActionBar.js";
10
- import { TableToolbar as or } from "./toolbar/TableToolbar.js";
10
+ import { TableToolbar as lr } from "./toolbar/TableToolbar.js";
11
11
  import { Checkbox as nt } from "../../primitives/checkbox/checkbox.js";
12
- import { ColumnHeaderMenu as lr } from "./toolbar/ColumnHeaderMenu.js";
12
+ import { ColumnHeaderMenu as or } from "./toolbar/ColumnHeaderMenu.js";
13
13
  import { Button as dr } from "../../primitives/button/button.js";
14
14
  import { SummaryFooterRow as cr } from "./toolbar/SummaryFooter.js";
15
15
  import { RowActionsMenu as fr } from "./toolbar/RowActionsMenu.js";
16
16
  import { Icon as hr } from "../../primitives/icon/icon.js";
17
17
  import { ShimmerLine as ur } from "../../primitives/shimmer/shimmer.js";
18
- const wr = 5, yr = "__all__", it = {
18
+ const yr = 5, pr = "__all__", it = {
19
19
  ArrowUp: "up",
20
20
  ArrowDown: "down",
21
21
  ArrowLeft: "left",
22
22
  ArrowRight: "right"
23
- }, J = (t) => t.__rowId ?? t.id ?? t.rule_id ?? String(t);
23
+ }, X = (t) => t.__rowId ?? t.id ?? t.rule_id ?? String(t);
24
24
  function st(t, a) {
25
25
  return t === "all" ? new Set(a) : t ?? /* @__PURE__ */ new Set();
26
26
  }
27
- function pr(t, a, o) {
28
- return t ? t === "all" ? o.includes(a) : t.has(a) : !1;
27
+ function wr(t, a, l) {
28
+ return t ? t === "all" ? l.includes(a) : t.has(a) : !1;
29
29
  }
30
30
  function xr(t, a) {
31
31
  return t ? t === "all" ? a.length : t.size : 0;
32
32
  }
33
33
  function gr(t, a) {
34
- return a.length === 0 ? !1 : t === "all" ? !0 : a.every((o) => (t == null ? void 0 : t.has(o)) ?? !1);
34
+ return a.length === 0 ? !1 : t === "all" ? !0 : a.every((l) => (t == null ? void 0 : t.has(l)) ?? !1);
35
35
  }
36
36
  function br(t, a) {
37
- return t === "all" ? a.length > 0 : a.some((o) => (t == null ? void 0 : t.has(o)) ?? !1);
37
+ return t === "all" ? a.length > 0 : a.some((l) => (t == null ? void 0 : t.has(l)) ?? !1);
38
38
  }
39
39
  function mr(t) {
40
40
  if (t)
@@ -44,256 +44,261 @@ function mr(t) {
44
44
  }
45
45
  function Nr(t) {
46
46
  var a;
47
- return t != null && t.length ? t.length > 1 ? !0 : ((a = t[0]) == null ? void 0 : a.key) !== yr : !1;
47
+ return t != null && t.length ? t.length > 1 ? !0 : ((a = t[0]) == null ? void 0 : a.key) !== pr : !1;
48
48
  }
49
- function at(t, a, o) {
50
- return o ? lt(o, a ?? /* @__PURE__ */ new Map()) : (a == null ? void 0 : a.get(t)) ?? "left";
49
+ function at(t, a, l) {
50
+ return l ? ot(l, a ?? /* @__PURE__ */ new Map()) : (a == null ? void 0 : a.get(t)) ?? "left";
51
51
  }
52
- const de = "120px", Te = "300px", Pe = (t) => {
52
+ const Oe = "300px", Te = (t) => {
53
53
  if (!t) return 0;
54
54
  const a = t.match(/^(\d+(?:\.\d+)?)px$/);
55
55
  return a ? Number(a[1]) : 0;
56
- }, A = (t) => !!(t.maxWidth && t.sticky === "right"), kr = (t) => ({
57
- maxWidth: t.maxWidth ?? Te,
58
- minWidth: t.minWidth ?? de
59
- }), ot = (t) => A(t) && t.maxWidth ? {
56
+ }, G = (t) => !!(t.maxWidth && t.sticky === "right"), kr = (t) => ({
57
+ maxWidth: t.maxWidth ?? Oe,
58
+ minWidth: t.minWidth
59
+ }), lt = (t) => G(t) && t.maxWidth ? {
60
60
  minWidth: t.maxWidth,
61
61
  width: t.maxWidth,
62
62
  maxWidth: t.maxWidth
63
63
  } : {
64
- minWidth: t.minWidth ?? de,
65
- maxWidth: t.maxWidth ?? Te
66
- }, Mr = qt(
64
+ minWidth: t.minWidth,
65
+ maxWidth: t.maxWidth ?? Oe
66
+ }, Mr = Bt(
67
67
  function({
68
68
  data: a,
69
- columns: o,
69
+ columns: l,
70
70
  renderRowCell: Le,
71
- onRowClick: V,
71
+ onRowClick: Y,
72
+ onRowHover: O,
72
73
  arialabel: dt,
73
- size: Oe = "sm",
74
+ size: ze = "sm",
74
75
  allowDefaultRowClass: ct = !1,
75
76
  centeredHeaders: ft = [],
76
77
  rootClassName: ht,
77
- removeBorders: ze,
78
+ removeBorders: Ae,
78
79
  headerClassName: ut,
79
- isRowExpandable: Ae,
80
- renderExpandedContent: wt,
80
+ isRowExpandable: Ge,
81
+ renderExpandedContent: yt,
81
82
  loading: P = !1,
82
- loadingRowCount: Ge = wr,
83
+ loadingRowCount: $e = yr,
83
84
  renderHeaderCell: ce,
84
- tableClassName: yt,
85
+ tableClassName: pt,
85
86
  getRowClassName: fe,
86
- selectionMode: G = "none",
87
- selectedKeys: C,
88
- onSelectionChange: y,
87
+ selectionMode: $ = "none",
88
+ selectedKeys: k,
89
+ onSelectionChange: w,
89
90
  inlineSelection: he = !1,
90
- toolbar: p,
91
- showToolbar: pt,
92
- toolbarTitle: $e,
93
- toolbarTrailing: je,
94
- disableExtendedTools: Fe,
91
+ toolbar: h,
92
+ showToolbar: wt,
93
+ toolbarTitle: je,
94
+ toolbarTrailing: Fe,
95
+ disableExtendedTools: ue,
95
96
  pagination: x,
96
- showBorders: X,
97
+ showBorders: H,
97
98
  emptyState: Me,
98
- editChrome: S,
99
+ editChrome: v,
99
100
  showEditActions: xt = !1,
100
- searchCollapsible: He,
101
+ searchCollapsible: De,
101
102
  isEditable: gt,
102
- toolbarSlot: ue,
103
+ toolbarSlot: ye,
103
104
  rowHeightClass: Ue,
104
105
  groupedData: L,
105
106
  showSummaryFooter: bt,
106
- summaryFooterProps: we,
107
- bulkActionBar: Y,
108
- renderBulkActionBar: Q,
109
- onBulkDuplicate: Z,
110
- onBulkDelete: K,
111
- bulkActionBusy: ee,
112
- columnAlignments: O,
113
- onColumnHeaderAction: te,
107
+ summaryFooterProps: pe,
108
+ bulkActionBar: Q,
109
+ renderBulkActionBar: Z,
110
+ onBulkDuplicate: K,
111
+ onBulkDelete: ee,
112
+ bulkActionBusy: te,
113
+ columnAlignments: z,
114
+ onColumnHeaderAction: re,
114
115
  showColumnHeaderMenu: mt,
115
116
  columnMenuCapabilities: Nt,
116
- renderGroupHeader: De,
117
- columnMenuSchema: $,
118
- columnSchema: j,
117
+ renderGroupHeader: qe,
118
+ columnMenuSchema: j,
119
+ columnSchema: F,
119
120
  labelMeta: kt,
120
121
  renderColumnHeaderMenuExtraItems: Ct,
121
- fillWidth: w = !1,
122
- rowActions: ye,
123
- onCellActivate: pe
124
- }, F) {
125
- const [re, vt] = q(
122
+ fillWidth: p = !1,
123
+ rowActions: we,
124
+ onCellActivate: xe
125
+ }, M) {
126
+ const [ne, St] = J(
126
127
  () => /* @__PURE__ */ new Set()
127
- ), [St, Rt] = q(
128
+ ), [vt, Wt] = J(
128
129
  null
129
- ), [b, xe] = q(null), [z, Wt] = q(null), ne = G === "single" || G === "multiple", ge = !!ye, R = ne && !he, be = Nr(L), It = h(() => $ != null && $.length ? new Map($.map((e) => [e.key, e])) : /* @__PURE__ */ new Map(), [$]), qe = h(() => j != null && j.length ? new Map(j.map((e) => [e.value, e])) : /* @__PURE__ */ new Map(), [j]), ie = h(
130
- () => o.map((e) => e.key),
131
- [o]
132
- ), _t = B((e) => {
133
- vt((r) => {
130
+ ), [b, ge] = J(null), [A, Rt] = J(null), ie = $ === "single" || $ === "multiple", be = !!we, W = ie && !he, me = Nr(L), It = u(() => j != null && j.length ? new Map(j.map((e) => [e.key, e])) : /* @__PURE__ */ new Map(), [j]), Be = u(() => F != null && F.length ? new Map(F.map((e) => [e.value, e])) : /* @__PURE__ */ new Map(), [F]), se = u(
131
+ () => l.map((e) => e.key),
132
+ [l]
133
+ ), _t = V((e) => {
134
+ St((r) => {
134
135
  const n = new Set(r);
135
136
  return n.has(e) ? n.delete(e) : n.add(e), n;
136
137
  });
137
- }, []), se = h(() => P ? Array.from({ length: Ge }, (e, r) => ({
138
+ }, []), ae = u(() => P ? Array.from({ length: $e }, (e, r) => ({
138
139
  id: `loading-${r}`
139
140
  })) : a.map((e) => {
140
141
  const r = e;
141
142
  if (r.__rowId != null)
142
143
  return r;
143
- const n = J(r);
144
+ const n = X(r);
144
145
  return r.id != null && String(r.id) === n ? r : { ...r, id: n };
145
- }), [P, a, Ge]), g = h(() => P ? [] : be && L ? L.flatMap(
146
- (e) => re.has(e.key) ? [] : e.rows.map((r) => J(r))
147
- ) : se.map((e) => J(e)), [P, be, L, re, se]), me = h(
148
- () => st(C, g),
149
- [C, g]
150
- ), Ne = xr(C, g), ke = Ne > 0, Be = ke && !!(Y ?? Q ?? Z ?? K), M = h(() => {
151
- if (!ke) return;
146
+ }), [P, a, $e]), g = u(() => P ? [] : me && L ? L.flatMap(
147
+ (e) => ne.has(e.key) ? [] : e.rows.map((r) => X(r))
148
+ ) : ae.map((e) => X(e)), [P, me, L, ne, ae]), Ne = u(
149
+ () => st(k, g),
150
+ [k, g]
151
+ ), ke = xr(k, g), Ce = ke > 0, Je = Ce && !!(Q ?? Z ?? K ?? ee), D = u(() => {
152
+ if (!Ce) return;
152
153
  const e = a.filter(
153
- (r) => me.has(J(r))
154
+ (r) => Ne.has(X(r))
154
155
  );
155
156
  return {
156
- selectedKeys: me,
157
+ selectedKeys: Ne,
157
158
  selectedRows: e,
158
- clearSelection: () => y == null ? void 0 : y(/* @__PURE__ */ new Set()),
159
- busy: ee
159
+ clearSelection: () => w == null ? void 0 : w(/* @__PURE__ */ new Set()),
160
+ busy: te
160
161
  };
161
162
  }, [
162
- ke,
163
- me,
163
+ Ce,
164
+ Ne,
164
165
  a,
165
- y,
166
- ee
167
- ]), Je = h(() => {
168
- if (ue != null) return ue;
169
- if (Be) {
170
- if (Y != null) return Y;
171
- if (Q && M)
172
- return Q(M);
173
- if (M && (Z || K))
166
+ w,
167
+ te
168
+ ]), Ve = u(() => {
169
+ if (ye != null) return ye;
170
+ if (Je) {
171
+ if (Q != null) return Q;
172
+ if (Z && D)
173
+ return Z(D);
174
+ if (D && (K || ee))
174
175
  return /* @__PURE__ */ i(
175
176
  ar,
176
177
  {
177
- count: Ne,
178
- onDuplicate: Z,
179
- onDelete: K,
180
- onClearSelection: M.clearSelection,
181
- busy: ee
178
+ count: ke,
179
+ onDuplicate: K,
180
+ onDelete: ee,
181
+ onClearSelection: D.clearSelection,
182
+ busy: te
182
183
  }
183
184
  );
184
185
  }
185
- return p ? /* @__PURE__ */ i(
186
- or,
186
+ return h ? /* @__PURE__ */ i(
187
+ lr,
187
188
  {
188
- sort: p.sort,
189
- filter: p.filter,
190
- search: p.search,
191
- rowHeight: p.rowHeight,
192
- hideFields: p.hideFields,
193
- align: p.align,
194
- groupBy: p.groupBy,
195
- summary: p.summary,
196
- sortContent: p.sortContent,
197
- filterContent: p.filterContent,
198
- fallbackTitle: $e,
199
- trailing: je,
200
- searchCollapsible: He,
201
- disableExtendedTools: Fe
189
+ sort: h.sort,
190
+ filter: h.filter,
191
+ search: h.search,
192
+ rowHeight: h.rowHeight,
193
+ hideFields: h.hideFields,
194
+ align: h.align,
195
+ groupBy: h.groupBy,
196
+ summary: h.summary,
197
+ sortContent: h.sortContent,
198
+ filterContent: h.filterContent,
199
+ fallbackTitle: je,
200
+ trailing: Fe,
201
+ searchCollapsible: De,
202
+ disableExtendedTools: ue,
203
+ undoRedo: h.undoRedo ? {
204
+ ...h.undoRedo,
205
+ isDisabled: h.undoRedo.isDisabled ?? ue
206
+ } : void 0
202
207
  }
203
208
  ) : null;
204
209
  }, [
205
- ue,
206
- Be,
207
- Y,
210
+ ye,
211
+ Je,
208
212
  Q,
209
- M,
210
213
  Z,
214
+ D,
211
215
  K,
212
216
  ee,
213
- Ne,
214
- p,
215
- $e,
217
+ te,
218
+ ke,
219
+ h,
216
220
  je,
217
- He,
218
- Fe
219
- ]), Ve = Je != null && pt !== !1, Xe = !!x && (x == null ? void 0 : x.showPagination) !== !1, Et = Ve || Xe, Ye = !P && a.length === 0 && Me != null, m = !!(xt && S), Ce = !!(S != null && S.showFooterRow), T = gt ?? (m || Ce || ge), Pt = Ye && !(Ce && S), H = o.length + (R ? 1 : 0) + (m ? 1 : 0), Tt = !!(bt && we), u = X ? "border-r border-secondary last:border-r-0" : void 0, I = h(() => {
220
- if (!w) return null;
221
- const e = o.reduce(
222
- (s, f) => A(f) ? s + Pe(f.maxWidth) : s,
221
+ Fe,
222
+ De,
223
+ ue
224
+ ]), Xe = Ve != null && wt !== !1, Ye = !!x && (x == null ? void 0 : x.showPagination) !== !1, Et = Xe || Ye, He = !P && a.length === 0 && Me != null, m = !!(xt && v), Se = !!(v != null && v.showFooterRow), T = gt ?? (m || Se || be), Pt = He && !(Se && v), U = l.length + (W ? 1 : 0) + (m ? 1 : 0), Tt = !!(bt && pe), y = H ? "border-r border-secondary last:border-r-0" : void 0, I = u(() => {
225
+ if (!p) return null;
226
+ const e = l.reduce(
227
+ (s, f) => G(f) ? s + Te(f.maxWidth) : s,
223
228
  0
224
229
  );
225
- return { minTableWidth: o.filter(
226
- (s) => !A(s)
230
+ return { minTableWidth: l.filter(
231
+ (s) => !G(s)
227
232
  ).reduce(
228
- (s, f) => s + Pe(f.minWidth ?? de),
233
+ (s, f) => s + Te(f.minWidth),
229
234
  0
230
235
  ) + e };
231
- }, [o, w]), Lt = h(() => {
236
+ }, [l, p]), Ot = u(() => {
232
237
  const e = /* @__PURE__ */ new Map();
233
- return te && o.forEach((r) => {
238
+ return re && l.forEach((r) => {
234
239
  e.set(
235
240
  r.key,
236
- (n) => te(r.key, n)
241
+ (n) => re(r.key, n)
237
242
  );
238
243
  }), e;
239
- }, [o, te]), W = Bt(null), [U, Qe] = q(null), ve = B(
244
+ }, [l, re]), R = Jt(null), [q, Qe] = J(null), ve = V(
240
245
  (e, r, n) => {
241
246
  var f;
242
247
  let s = n ?? null;
243
248
  if (s == null) {
244
249
  const N = (f = er(
245
- W.current,
250
+ R.current,
246
251
  e,
247
252
  r
248
253
  )) == null ? void 0 : f.getAttribute("data-grid-source-index"), _ = N != null && N !== "" ? Number(N) : NaN;
249
254
  s = Number.isNaN(_) ? null : _;
250
255
  }
251
- xe({ rowId: e, columnKey: r, sourceIndex: s });
256
+ ge({ rowId: e, columnKey: r, sourceIndex: s });
252
257
  },
253
258
  []
254
- ), Ot = B(
259
+ ), Lt = V(
255
260
  (e) => {
256
- var ae, oe, le;
261
+ var le, oe, de;
257
262
  const r = e.key in it;
258
263
  if (e.key !== "Enter" && e.key !== "Tab" && e.key !== "Escape" && !r || tr(e.target)) return;
259
264
  if (e.key === "Escape") {
260
265
  if (!b) return;
261
- e.preventDefault(), e.stopPropagation(), xe(null), (ae = W.current) != null && ae.contains(document.activeElement) && document.activeElement.blur();
266
+ e.preventDefault(), e.stopPropagation(), ge(null), (le = R.current) != null && le.contains(document.activeElement) && document.activeElement.blur();
262
267
  return;
263
268
  }
264
- const n = (le = (oe = e.target).closest) == null ? void 0 : le.call(
269
+ const n = (de = (oe = e.target).closest) == null ? void 0 : de.call(
265
270
  oe,
266
271
  "[data-grid-cell]"
267
272
  ), s = n == null ? void 0 : n.getAttribute("data-grid-row-id"), f = n == null ? void 0 : n.getAttribute("data-grid-col-key"), N = n == null ? void 0 : n.getAttribute(
268
273
  "data-grid-source-index"
269
- ), _ = N != null && N !== "" ? Number(N) : NaN, l = Number.isNaN(_) ? null : _, v = b ?? (s && f ? {
274
+ ), _ = N != null && N !== "" ? Number(N) : NaN, o = Number.isNaN(_) ? null : _, C = b ?? (s && f ? {
270
275
  rowId: s,
271
276
  columnKey: f,
272
- sourceIndex: l
277
+ sourceIndex: o
273
278
  } : null);
274
- if (!v) return;
279
+ if (!C) return;
275
280
  if (e.key === "Enter") {
276
- if (!pe) return;
277
- e.preventDefault(), e.stopPropagation(), pe({
278
- rowId: v.rowId,
279
- columnKey: v.columnKey,
280
- sourceIndex: v.sourceIndex
281
+ if (!xe) return;
282
+ e.preventDefault(), e.stopPropagation(), xe({
283
+ rowId: C.rowId,
284
+ columnKey: C.columnKey,
285
+ sourceIndex: C.sourceIndex
281
286
  });
282
287
  return;
283
288
  }
284
289
  const E = r ? rr(
285
- W.current,
290
+ R.current,
286
291
  g,
287
- ie,
288
- v.rowId,
289
- v.columnKey,
292
+ se,
293
+ C.rowId,
294
+ C.columnKey,
290
295
  it[e.key]
291
296
  ) : nr(
292
- W.current,
297
+ R.current,
293
298
  g,
294
- ie,
295
- v.rowId,
296
- v.columnKey,
299
+ se,
300
+ C.rowId,
301
+ C.columnKey,
297
302
  !e.shiftKey
298
303
  );
299
304
  if (!E) {
@@ -302,44 +307,44 @@ const de = "120px", Te = "300px", Pe = (t) => {
302
307
  }
303
308
  e.preventDefault(), e.stopPropagation(), ve(E.rowId, E.columnKey, E.sourceIndex), requestAnimationFrame(
304
309
  () => ir(
305
- W.current,
310
+ R.current,
306
311
  E.rowId,
307
312
  E.columnKey
308
313
  )
309
314
  );
310
315
  },
311
- [b, g, ie, pe, ve]
316
+ [b, g, se, xe, ve]
312
317
  );
313
- Jt(() => {
318
+ Vt(() => {
314
319
  if (!T || !b) return;
315
320
  const e = (r) => {
316
- const n = W.current;
317
- n && !n.contains(r.target) && xe(null);
321
+ const n = R.current;
322
+ n && !n.contains(r.target) && ge(null);
318
323
  };
319
324
  return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
320
325
  }, [T, b]);
321
- const Ze = h(() => {
326
+ const Ze = u(() => {
322
327
  let e = 0;
323
- return R && (e += 40), m && (e += 56), o.forEach((r) => {
324
- A(r) && (e += Pe(r.maxWidth));
328
+ return W && (e += 40), m && (e += 56), l.forEach((r) => {
329
+ G(r) && (e += Te(r.maxWidth));
325
330
  }), e;
326
- }, [o, m, R]), Se = h(
327
- () => o.filter((e) => !A(e)).length,
328
- [o]
329
- ), Re = h(() => {
330
- if (!w || !I) return null;
331
+ }, [l, m, W]), We = u(
332
+ () => l.filter((e) => !G(e)).length,
333
+ [l]
334
+ ), Re = u(() => {
335
+ if (!p || !I) return null;
331
336
  const { minTableWidth: e } = I;
332
- return U ? Math.max(U, e) : e;
333
- }, [U, w, I]), We = !!(w && I && U && U < I.minTableWidth), Ie = h(() => !Re || Se === 0 ? null : Math.max(
337
+ return q ? Math.max(q, e) : e;
338
+ }, [q, p, I]), Ie = !!(p && I && q && q < I.minTableWidth), _e = u(() => !Re || We === 0 ? null : Math.max(
334
339
  0,
335
- (Re - Ze) / Se
336
- ), [Re, Ze, Se]);
337
- Vt(() => {
338
- if (!w) {
340
+ (Re - Ze) / We
341
+ ), [Re, Ze, We]);
342
+ Xt(() => {
343
+ if (!p) {
339
344
  Qe(null);
340
345
  return;
341
346
  }
342
- const e = W.current;
347
+ const e = R.current;
343
348
  if (!e) return;
344
349
  const r = () => {
345
350
  const s = e.clientWidth;
@@ -351,66 +356,66 @@ const de = "120px", Te = "300px", Pe = (t) => {
351
356
  n.disconnect();
352
357
  };
353
358
  }, [
354
- o.length,
359
+ l.length,
355
360
  a.length,
356
- w,
361
+ p,
357
362
  P,
358
363
  m,
359
- R
364
+ W
360
365
  ]);
361
- const _e = B(
362
- (e) => w ? A(e) && e.maxWidth ? ot(e) : Ie != null ? {
363
- width: `${Ie}px`,
364
- minWidth: e.minWidth ?? de,
365
- maxWidth: e.maxWidth ?? Te
366
- } : ot(e) : kr(e),
367
- [w, Ie]
368
- ), zt = h(() => {
369
- if (!(!w || !I))
370
- return We ? {
366
+ const Ee = V(
367
+ (e) => p ? G(e) && e.maxWidth ? lt(e) : _e != null ? {
368
+ width: `${_e}px`,
369
+ minWidth: e.minWidth,
370
+ maxWidth: e.maxWidth ?? Oe
371
+ } : lt(e) : kr(e),
372
+ [p, _e]
373
+ ), zt = u(() => {
374
+ if (!(!p || !I))
375
+ return Ie ? {
371
376
  width: `${I.minTableWidth}px`,
372
377
  tableLayout: "fixed"
373
378
  } : {
374
379
  width: "100%",
375
380
  tableLayout: "fixed"
376
381
  };
377
- }, [w, I, We]), At = B(
382
+ }, [p, I, Ie]), At = V(
378
383
  (e) => {
379
- W.current = e, typeof F == "function" ? F(e) : F && (F.current = e);
384
+ R.current = e, typeof M == "function" ? M(e) : M && (M.current = e);
380
385
  },
381
- [F]
382
- ), Gt = ne ? {
383
- selectionMode: G,
384
- selectedKeys: C === "all" ? "all" : C,
385
- onSelectionChange: mr(y)
386
+ [M]
387
+ ), Gt = ie ? {
388
+ selectionMode: $,
389
+ selectedKeys: k === "all" ? "all" : k,
390
+ onSelectionChange: mr(w)
386
391
  } : {}, $t = (e) => {
387
392
  const r = e.__sourceIndex;
388
393
  return typeof r == "number" ? r : 0;
389
- }, Ee = ne && gr(C, g), jt = ne && br(C, g), Ft = () => {
390
- if (y) {
391
- if (Ee) {
392
- y(/* @__PURE__ */ new Set());
394
+ }, Pe = ie && gr(k, g), jt = ie && br(k, g), Ft = () => {
395
+ if (w) {
396
+ if (Pe) {
397
+ w(/* @__PURE__ */ new Set());
393
398
  return;
394
399
  }
395
- y("all");
400
+ w("all");
396
401
  }
397
402
  }, Mt = (e, r) => {
398
- if (!y) return;
399
- if (G === "single") {
400
- y(r ? /* @__PURE__ */ new Set([e]) : /* @__PURE__ */ new Set());
403
+ if (!w) return;
404
+ if ($ === "single") {
405
+ w(r ? /* @__PURE__ */ new Set([e]) : /* @__PURE__ */ new Set());
401
406
  return;
402
407
  }
403
- const n = C === "all" ? new Set(g) : new Set(st(C, g));
404
- r ? n.add(e) : n.delete(e), y(n);
405
- }, Ht = (e) => {
406
- const r = re.has(e.key);
407
- return De ? /* @__PURE__ */ i(
408
+ const n = k === "all" ? new Set(g) : new Set(st(k, g));
409
+ r ? n.add(e) : n.delete(e), w(n);
410
+ }, Dt = (e) => {
411
+ const r = ne.has(e.key);
412
+ return qe ? /* @__PURE__ */ i(
408
413
  d.Row,
409
414
  {
410
415
  id: `group-${e.key}`,
411
416
  highlightSelectedRow: !1,
412
417
  className: "bg-secondary_subtle hover:bg-secondary_subtle",
413
- children: /* @__PURE__ */ i(d.Cell, { colSpan: H, className: c(u), children: De(e) })
418
+ children: /* @__PURE__ */ i(d.Cell, { colSpan: U, className: c(y), children: qe(e) })
414
419
  },
415
420
  `group-${e.key}`
416
421
  ) : /* @__PURE__ */ i(
@@ -422,9 +427,9 @@ const de = "120px", Te = "300px", Pe = (t) => {
422
427
  children: /* @__PURE__ */ i(
423
428
  d.Cell,
424
429
  {
425
- colSpan: H,
426
- className: c("py-1.5", u),
427
- children: /* @__PURE__ */ k(
430
+ colSpan: U,
431
+ className: c("py-1.5", y),
432
+ children: /* @__PURE__ */ S(
428
433
  "button",
429
434
  {
430
435
  type: "button",
@@ -433,7 +438,7 @@ const de = "120px", Te = "300px", Pe = (t) => {
433
438
  "aria-expanded": !r,
434
439
  children: [
435
440
  /* @__PURE__ */ i(
436
- Xt,
441
+ Yt,
437
442
  {
438
443
  className: c(
439
444
  "size-4 shrink-0 text-fg-quaternary transition-transform",
@@ -442,7 +447,7 @@ const de = "120px", Te = "300px", Pe = (t) => {
442
447
  }
443
448
  ),
444
449
  /* @__PURE__ */ i("span", { className: "truncate", children: e.label || "(Empty)" }),
445
- /* @__PURE__ */ k("span", { className: "text-tertiary", children: [
450
+ /* @__PURE__ */ S("span", { className: "text-tertiary", children: [
446
451
  "(",
447
452
  e.rows.length,
448
453
  ")"
@@ -456,44 +461,46 @@ const de = "120px", Te = "300px", Pe = (t) => {
456
461
  `group-${e.key}`
457
462
  );
458
463
  }, Ke = (e, r) => {
459
- const n = Ae ? Ae(e) : !1, s = J(e), f = $t(e), N = pr(C, s, g), _ = St === s;
460
- return /* @__PURE__ */ k(
464
+ const n = Ge ? Ge(e) : !1, s = X(e), f = $t(e), N = wr(k, s, g), _ = vt === s;
465
+ return /* @__PURE__ */ S(
461
466
  d.Row,
462
467
  {
463
- onAction: () => V == null ? void 0 : V(e),
468
+ onAction: () => Y == null ? void 0 : Y(e),
469
+ onMouseEnter: () => O == null ? void 0 : O(e, !0),
470
+ onMouseLeave: () => O == null ? void 0 : O(e, !1),
464
471
  id: s,
465
472
  value: e,
466
- columns: o,
467
- expandedColSpan: H,
473
+ columns: l,
474
+ expandedColSpan: U,
468
475
  isExpandable: n,
469
476
  highlightSelectedRow: !he,
470
- renderExpandedContent: n ? wt : void 0,
477
+ renderExpandedContent: n ? yt : void 0,
471
478
  className: c(
472
- V && "cursor-pointer",
479
+ Y && "cursor-pointer",
473
480
  ct ? "prose" : "",
474
- ze && "[&>td]:after:hidden",
475
- ge && "group/rowactions",
481
+ Ae && "[&>td]:after:hidden",
482
+ be && "group/rowactions",
476
483
  _ && "bg-utility-brand-25 hover:bg-utility-brand-25",
477
484
  Ue,
478
485
  fe == null ? void 0 : fe(e)
479
486
  ),
480
487
  children: [
481
- R && /* @__PURE__ */ i(
488
+ W && /* @__PURE__ */ i(
482
489
  d.Cell,
483
490
  {
484
- className: c("relative w-10 text-center", u),
491
+ className: c("relative w-10 text-center", y),
485
492
  style: { minWidth: "40px", width: "40px" },
486
493
  children: /* @__PURE__ */ i(
487
494
  "div",
488
495
  {
489
496
  className: "flex items-center justify-center",
490
- onClick: (l) => l.stopPropagation(),
491
- onKeyDown: (l) => l.stopPropagation(),
497
+ onClick: (o) => o.stopPropagation(),
498
+ onKeyDown: (o) => o.stopPropagation(),
492
499
  children: /* @__PURE__ */ i(
493
500
  nt,
494
501
  {
495
502
  checked: N,
496
- onCheckedChange: (l) => Mt(s, l === !0),
503
+ onCheckedChange: (o) => Mt(s, o === !0),
497
504
  "aria-label": `Select row ${s}`,
498
505
  className: "items-center justify-center"
499
506
  }
@@ -502,21 +509,21 @@ const de = "120px", Te = "300px", Pe = (t) => {
502
509
  )
503
510
  }
504
511
  ),
505
- o.map((l, v) => {
506
- const E = qe.get(l.key), ae = at(
507
- l.key,
508
- O,
512
+ l.map((o, C) => {
513
+ const E = Be.get(o.key), le = at(
514
+ o.key,
515
+ z,
509
516
  E
510
- ), oe = (z == null ? void 0 : z.rowId) === s && (z == null ? void 0 : z.columnKey) === l.key, le = T && !oe && (b == null ? void 0 : b.rowId) === s && (b == null ? void 0 : b.columnKey) === l.key;
517
+ ), oe = (A == null ? void 0 : A.rowId) === s && (A == null ? void 0 : A.columnKey) === o.key, de = T && !oe && (b == null ? void 0 : b.rowId) === s && (b == null ? void 0 : b.columnKey) === o.key;
511
518
  return /* @__PURE__ */ i(
512
519
  d.Cell,
513
520
  {
514
- sticky: l.sticky,
515
- stickyOffset: l.stickyOffset,
516
- style: _e(l),
521
+ sticky: o.sticky,
522
+ stickyOffset: o.stickyOffset,
523
+ style: Ee(o),
517
524
  "data-grid-cell": "",
518
525
  "data-grid-row-id": s,
519
- "data-grid-col-key": l.key,
526
+ "data-grid-col-key": o.key,
520
527
  "data-grid-source-index": f,
521
528
  className: c(
522
529
  "relative overflow-x-hidden",
@@ -524,36 +531,36 @@ const de = "120px", Te = "300px", Pe = (t) => {
524
531
  // selected cell (state-driven). Inset so it sits at the cell edge
525
532
  // without shifting layout. `after:opacity-0` hides the row's bottom-
526
533
  // border pseudo-element so it doesn't overlap the ring's bottom edge.
527
- le && "z-1 outline-hidden ring-2 ring-inset ring-brand after:opacity-0",
528
- l.cellClassName,
529
- Kt(ae),
530
- u
534
+ de && "z-1 outline-hidden ring-2 ring-inset ring-brand after:opacity-0",
535
+ o.cellClassName,
536
+ Kt(le),
537
+ y
531
538
  ),
532
539
  children: (() => {
533
- const rt = v === 0 && (n || ge) ? /* @__PURE__ */ k("div", { className: "flex items-center", children: [
534
- ye && /* @__PURE__ */ i(
540
+ const rt = C === 0 && (n || be) ? /* @__PURE__ */ S("div", { className: "flex items-center", children: [
541
+ we && /* @__PURE__ */ i(
535
542
  "div",
536
543
  {
537
544
  className: "flex items-center justify-center",
538
- onClick: (D) => D.stopPropagation(),
539
- onKeyDown: (D) => D.stopPropagation(),
545
+ onClick: (B) => B.stopPropagation(),
546
+ onKeyDown: (B) => B.stopPropagation(),
540
547
  children: /* @__PURE__ */ i(
541
548
  fr,
542
549
  {
543
- config: ye,
550
+ config: we,
544
551
  sourceRowIndex: f,
545
552
  item: e,
546
553
  triggerClassName: c(
547
554
  "transition-opacity group-hover/rowactions:opacity-100 focus-visible:opacity-100",
548
555
  _ ? "opacity-100" : "opacity-0"
549
556
  ),
550
- onOpenChange: (D) => Rt(D ? s : null)
557
+ onOpenChange: (B) => Wt(B ? s : null)
551
558
  }
552
559
  )
553
560
  }
554
561
  ),
555
- /* @__PURE__ */ i("div", { className: "flex-1 min-w-0", children: Le(l.key, e[l.key], e) })
556
- ] }) : Le(l.key, e[l.key], e);
562
+ /* @__PURE__ */ i("div", { className: "flex-1 min-w-0", children: Le(o.key, e[o.key], e) })
563
+ ] }) : Le(o.key, e[o.key], e);
557
564
  return T ? /* @__PURE__ */ i(
558
565
  "div",
559
566
  {
@@ -565,13 +572,13 @@ const de = "120px", Te = "300px", Pe = (t) => {
565
572
  ) : rt;
566
573
  })()
567
574
  },
568
- l.key
575
+ o.key
569
576
  );
570
577
  }),
571
- m && S && /* @__PURE__ */ i(
578
+ m && v && /* @__PURE__ */ i(
572
579
  d.Cell,
573
580
  {
574
- className: c("relative w-14 text-center", u),
581
+ className: c("relative w-14 text-center", y),
575
582
  style: { minWidth: "56px", width: "56px" },
576
583
  children: /* @__PURE__ */ i(
577
584
  "button",
@@ -580,8 +587,8 @@ const de = "120px", Te = "300px", Pe = (t) => {
580
587
  title: "Delete row",
581
588
  "aria-label": "Delete row",
582
589
  className: "inline-flex items-center justify-center rounded p-1 text-fg-quaternary hover:bg-secondary_subtle hover:text-fg-secondary",
583
- onClick: (l) => {
584
- l.stopPropagation(), S.onDeleteRow(f);
590
+ onClick: (o) => {
591
+ o.stopPropagation(), v.onDeleteRow(f);
585
592
  },
586
593
  children: /* @__PURE__ */ i(hr, { name: "Trash02", className: "size-3" })
587
594
  }
@@ -592,30 +599,30 @@ const de = "120px", Te = "300px", Pe = (t) => {
592
599
  },
593
600
  s
594
601
  );
595
- }, Ut = (e) => /* @__PURE__ */ k(
602
+ }, Ut = (e) => /* @__PURE__ */ S(
596
603
  d.Row,
597
604
  {
598
605
  id: String(e.id),
599
606
  isExpandable: !1,
600
- className: c(ze && "[&>td]:after:hidden", Ue),
607
+ className: c(Ae && "[&>td]:after:hidden", Ue),
601
608
  children: [
602
- R && /* @__PURE__ */ i(
609
+ W && /* @__PURE__ */ i(
603
610
  d.Cell,
604
611
  {
605
- className: c("relative w-10", u),
612
+ className: c("relative w-10", y),
606
613
  style: { minWidth: "40px", width: "40px" }
607
614
  }
608
615
  ),
609
- o.map((r) => /* @__PURE__ */ i(
616
+ l.map((r) => /* @__PURE__ */ i(
610
617
  d.Cell,
611
618
  {
612
619
  sticky: r.sticky,
613
620
  stickyOffset: r.stickyOffset,
614
- style: _e(r),
621
+ style: Ee(r),
615
622
  className: c(
616
623
  "overflow-x-hidden text-left",
617
624
  r.cellClassName,
618
- u
625
+ y
619
626
  ),
620
627
  children: /* @__PURE__ */ i(ur, { height: "14px", width: "75%", className: "rounded" })
621
628
  },
@@ -624,64 +631,65 @@ const de = "120px", Te = "300px", Pe = (t) => {
624
631
  m && /* @__PURE__ */ i(
625
632
  d.Cell,
626
633
  {
627
- className: c("w-14", u),
634
+ className: c("w-14", y),
628
635
  style: { minWidth: "56px", width: "56px" }
629
636
  }
630
637
  )
631
638
  ]
632
639
  },
633
640
  String(e.id)
634
- ), Dt = () => P ? se.map((e) => Ut(e)) : be && L ? L.flatMap((e) => {
635
- const r = re.has(e.key);
641
+ ), qt = () => P ? ae.map((e) => Ut(e)) : me && L ? L.flatMap((e) => {
642
+ const r = ne.has(e.key);
636
643
  return [
637
- Ht(e),
644
+ Dt(e),
638
645
  ...r ? [] : e.rows.map((n) => Ke(n))
639
646
  ];
640
- }) : se.map((e) => Ke(e)), et = /* @__PURE__ */ i(
641
- Yt.Root,
647
+ }) : ae.map((e) => Ke(e)), et = /* @__PURE__ */ i(
648
+ Ht.Root,
642
649
  {
643
650
  ref: At,
644
- onKeyDownCapture: T ? Ot : void 0,
651
+ onKeyDownCapture: T ? Lt : void 0,
645
652
  className: c(
646
653
  "w-full",
647
- !w || We ? "overflow-x-auto" : "overflow-x-hidden",
648
- X && "border border-secondary rounded-xl",
654
+ !p || Ie ? "overflow-x-auto" : "overflow-x-hidden",
655
+ H && "border border-secondary rounded-xl",
656
+ "[&_tr:hover>td]:!bg-secondary_subtle",
649
657
  ht
650
658
  ),
651
- size: Oe,
652
- children: /* @__PURE__ */ k(
659
+ size: ze,
660
+ children: /* @__PURE__ */ S(
653
661
  d,
654
662
  {
655
663
  "aria-label": dt,
656
- size: Oe,
664
+ size: ze,
657
665
  isEditable: T,
658
666
  inlineSelection: he,
659
- className: c(w && "min-w-full", yt),
667
+ className: c(p && "min-w-full", pt),
660
668
  style: zt,
661
669
  ...Gt,
662
670
  children: [
663
- /* @__PURE__ */ k(
671
+ /* @__PURE__ */ S(
664
672
  d.Header,
665
673
  {
666
674
  className: c(
667
675
  "sticky top-0",
668
- X && "[&>tr>th:first-child]:rounded-bl-none [&>tr>th:last-child]:rounded-br-none z-1",
676
+ H && "[&>tr>th:first-child]:rounded-bl-none [&>tr>th:last-child]:rounded-br-none z-1",
669
677
  ut
670
678
  ),
671
679
  children: [
672
- R && /* @__PURE__ */ i(
680
+ W && /* @__PURE__ */ i(
673
681
  d.Head,
674
682
  {
675
683
  label: "",
676
684
  allowsSorting: !1,
677
685
  isRowHeader: !1,
678
686
  style: { minWidth: "40px", width: "40px" },
679
- className: c(u),
687
+ className: c(y),
680
688
  headerCellClass: "justify-center",
681
- children: G === "multiple" && y && /* @__PURE__ */ i("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ i(
689
+ children: $ === "multiple" && w && /* @__PURE__ */ i("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ i(
682
690
  nt,
683
691
  {
684
- checked: Ee ? !0 : jt && !Ee ? "indeterminate" : !1,
692
+ checked: Pe ? !0 : jt && !Pe ? "indeterminate" : !1,
685
693
  onCheckedChange: () => Ft(),
686
694
  "aria-label": "Select all rows",
687
695
  className: "items-center justify-center"
@@ -690,46 +698,45 @@ const de = "120px", Te = "300px", Pe = (t) => {
690
698
  },
691
699
  "selection"
692
700
  ),
693
- o.map((e, r) => {
694
- const n = mt ? It.get(e.key) : void 0, s = qe.get(e.key), f = at(
701
+ l.map((e, r) => {
702
+ const n = mt ? It.get(e.key) : void 0, s = Be.get(e.key), f = at(
695
703
  e.key,
696
- O,
704
+ z,
697
705
  s
698
706
  ), N = ft.includes(e.key) || f === "center" ? "justify-center" : f === "right" ? "justify-end" : "";
699
- return /* @__PURE__ */ k(
707
+ return /* @__PURE__ */ i(
700
708
  d.Head,
701
709
  {
702
710
  sticky: e.sticky,
703
711
  stickyOffset: e.stickyOffset,
704
712
  id: e.key,
705
713
  label: e.label,
706
- isRowHeader: r === 0 && !R,
714
+ isRowHeader: r === 0 && !W,
707
715
  allowsSorting: e.allowsSorting,
708
716
  headerCellClass: `${e.headerCellClass} ${N}`,
709
- style: _e(e),
717
+ style: Ee(e),
710
718
  className: c(
711
719
  "overflow-hidden",
712
720
  e.headClassName,
713
- u
721
+ y
714
722
  ),
715
- children: [
716
- n && te && /* @__PURE__ */ i(
717
- lr,
718
- {
719
- column: n,
720
- columnLabel: n.label ?? (s ? Zt(s, kt) : e.label),
721
- currentAlignment: s ? lt(
722
- s,
723
- O ?? /* @__PURE__ */ new Map()
724
- ) : (O == null ? void 0 : O.get(e.key)) ?? "left",
725
- capabilities: Nt,
726
- hideDisabled: o.length <= 1,
727
- onAction: Lt.get(e.key),
728
- renderExtraItems: Ct
729
- }
730
- ),
731
- (ce == null ? void 0 : ce(e.key)) ?? null
732
- ]
723
+ headerAction: n && re ? /* @__PURE__ */ i(
724
+ or,
725
+ {
726
+ column: n,
727
+ columnLabel: n.label ?? (s ? Zt(s, kt) : e.label),
728
+ currentAlignment: s ? ot(
729
+ s,
730
+ z ?? /* @__PURE__ */ new Map()
731
+ ) : (z == null ? void 0 : z.get(e.key)) ?? "left",
732
+ capabilities: Nt,
733
+ hideDisabled: l.length <= 1,
734
+ onAction: Ot.get(e.key),
735
+ renderExtraItems: Ct,
736
+ showOnHeaderHover: !0
737
+ }
738
+ ) : void 0,
739
+ children: (ce == null ? void 0 : ce(e.key)) ?? null
733
740
  },
734
741
  e.key
735
742
  );
@@ -741,15 +748,15 @@ const de = "120px", Te = "300px", Pe = (t) => {
741
748
  allowsSorting: !1,
742
749
  isRowHeader: !1,
743
750
  style: { minWidth: "56px", width: "56px" },
744
- className: c(u)
751
+ className: c(y)
745
752
  },
746
753
  "actions"
747
754
  )
748
755
  ]
749
756
  }
750
757
  ),
751
- /* @__PURE__ */ k(d.Body, { children: [
752
- !Ye && Dt(),
758
+ /* @__PURE__ */ S(d.Body, { children: [
759
+ !He && qt(),
753
760
  Pt && /* @__PURE__ */ i(
754
761
  d.Row,
755
762
  {
@@ -758,10 +765,10 @@ const de = "120px", Te = "300px", Pe = (t) => {
758
765
  children: /* @__PURE__ */ i(
759
766
  d.Cell,
760
767
  {
761
- colSpan: H,
768
+ colSpan: U,
762
769
  className: c(
763
770
  "text-left text-placeholder_subtle border-b border-secondary py-3",
764
- u
771
+ y
765
772
  ),
766
773
  children: Me
767
774
  }
@@ -769,7 +776,7 @@ const de = "120px", Te = "300px", Pe = (t) => {
769
776
  },
770
777
  "empty-state"
771
778
  ),
772
- Ce && S && /* @__PURE__ */ k(
779
+ Se && v && /* @__PURE__ */ S(
773
780
  d.Row,
774
781
  {
775
782
  id: "add-row-footer",
@@ -778,15 +785,15 @@ const de = "120px", Te = "300px", Pe = (t) => {
778
785
  /* @__PURE__ */ i(
779
786
  d.Cell,
780
787
  {
781
- colSpan: H - (m ? 1 : 0),
782
- className: c(u),
788
+ colSpan: U - (m ? 1 : 0),
789
+ className: c(y),
783
790
  children: /* @__PURE__ */ i(
784
791
  dr,
785
792
  {
786
793
  color: "tertiary",
787
794
  className: "bg-secondary text-primary",
788
795
  size: "xs",
789
- onClick: S.onAddRow,
796
+ onClick: v.onAddRow,
790
797
  children: "+ Add Row"
791
798
  }
792
799
  )
@@ -795,7 +802,7 @@ const de = "120px", Te = "300px", Pe = (t) => {
795
802
  m && /* @__PURE__ */ i(
796
803
  d.Cell,
797
804
  {
798
- className: c("w-14", u),
805
+ className: c("w-14", y),
799
806
  style: { minWidth: "56px", width: "56px" }
800
807
  }
801
808
  )
@@ -803,13 +810,13 @@ const de = "120px", Te = "300px", Pe = (t) => {
803
810
  },
804
811
  "add-row-footer"
805
812
  ),
806
- Tt && we && /* @__PURE__ */ i(
813
+ Tt && pe && /* @__PURE__ */ i(
807
814
  cr,
808
815
  {
809
- ...we,
816
+ ...pe,
810
817
  hasActionsColumn: m,
811
- hasSelectionColumn: R,
812
- showBorders: !!X
818
+ hasSelectionColumn: W,
819
+ showBorders: !!H
813
820
  }
814
821
  )
815
822
  ] })
@@ -821,17 +828,17 @@ const de = "120px", Te = "300px", Pe = (t) => {
821
828
  sr,
822
829
  {
823
830
  rowIds: g,
824
- columnKeys: ie,
825
- containerRef: W,
831
+ columnKeys: se,
832
+ containerRef: R,
826
833
  onSelectCell: ve,
827
- onEditingCellChange: Wt,
834
+ onEditingCellChange: Rt,
828
835
  children: et
829
836
  }
830
837
  ) : et;
831
- return Et ? /* @__PURE__ */ k("div", { className: "flex flex-col gap-3", children: [
832
- Ve && Je,
838
+ return Et ? /* @__PURE__ */ S("div", { className: "flex flex-col gap-3", children: [
839
+ Xe && Ve,
833
840
  tt,
834
- Xe && x && /* @__PURE__ */ i(
841
+ Ye && x && /* @__PURE__ */ i(
835
842
  Qt,
836
843
  {
837
844
  currentPage: x.currentPage,