@pibit.ai/cure-design-system 0.6.2 → 0.6.4

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 (29) hide show
  1. package/dist/patterns/table/TableWrapper.d.ts.map +1 -1
  2. package/dist/patterns/table/TableWrapper.js +454 -449
  3. package/dist/patterns/table/integrateTableUndoRedo.d.ts +6 -2
  4. package/dist/patterns/table/integrateTableUndoRedo.d.ts.map +1 -1
  5. package/dist/patterns/table/integrateTableUndoRedo.js +19 -15
  6. package/dist/patterns/table/storyHelpers/useMockTableState.d.ts +1 -0
  7. package/dist/patterns/table/storyHelpers/useMockTableState.d.ts.map +1 -1
  8. package/dist/patterns/table/tableUndoRedo.d.ts +4 -0
  9. package/dist/patterns/table/tableUndoRedo.d.ts.map +1 -1
  10. package/dist/patterns/table/tableUndoRedo.js +47 -37
  11. package/dist/patterns/table/tableUndoRedo.test.d.ts +2 -0
  12. package/dist/patterns/table/tableUndoRedo.test.d.ts.map +1 -0
  13. package/dist/patterns/table/toolbar/ColumnHeaderMenu.d.ts +9 -0
  14. package/dist/patterns/table/toolbar/ColumnHeaderMenu.d.ts.map +1 -1
  15. package/dist/patterns/table/toolbar/ColumnHeaderMenu.js +123 -110
  16. package/dist/patterns/table/types.d.ts +5 -0
  17. package/dist/patterns/table/types.d.ts.map +1 -1
  18. package/dist/patterns/table/useTableUndoRedo.d.ts +1 -1
  19. package/dist/patterns/table/useTableUndoRedo.d.ts.map +1 -1
  20. package/dist/patterns/table/useTableUndoRedo.js +179 -165
  21. package/dist/primitives/select/multi-select.d.ts.map +1 -1
  22. package/dist/primitives/select/multi-select.js +428 -387
  23. package/dist/primitives/select/searchable-select.d.ts +3 -1
  24. package/dist/primitives/select/searchable-select.d.ts.map +1 -1
  25. package/dist/primitives/select/searchable-select.js +254 -229
  26. package/dist/primitives/select/select-item.d.ts.map +1 -1
  27. package/dist/primitives/select/select-item.js +19 -18
  28. package/dist/styles/components.css +1 -1
  29. package/package.json +1 -1
@@ -1,227 +1,228 @@
1
- import { jsx as c, jsxs as S, Fragment as Jt } from "react/jsx-runtime";
2
- import { forwardRef as Qr, useRef as se, useState as K, useMemo as k, useCallback as E, useEffect as Z, useLayoutEffect as Qt } from "react";
3
- import { ChevronRight as en } from "@untitledui/icons";
1
+ import { jsx as c, jsxs as S, Fragment as Qt } from "react/jsx-runtime";
2
+ import { forwardRef as en, useRef as oe, useState as K, useMemo as k, useCallback as E, useEffect as Z, useLayoutEffect as er } from "react";
3
+ import { ChevronRight as tn } from "@untitledui/icons";
4
4
  import { cx as x } from "../../utils/cn.js";
5
- import { TableCard as tn, Table as m } from "./table.js";
6
- import { TablePagination as rn } from "./TablePagination.js";
7
- import { TableZoomControl as nn } from "./TableZoomControl.js";
8
- import { useFitTableToViewport as sn } from "./useFitTableToViewport.js";
9
- import { useTableZoomState as on } from "./useTableZoomState.js";
10
- import { getEffectiveAlignment as dr, resolveColumnLabel as an, alignmentClass as cn } from "./toolbar/tableToolbarHelpers.js";
11
- import { parsePxValue as ht, DEFAULT_ZOOMABLE_COLUMN_MIN_WIDTH as er, supportsCssZoom as dn, DEFAULT_TABLE_ZOOM_MIN as ln, computeFillBaseWidth as un, computeEffectiveTableWidth as fn, computeFlexColumnWidth as pn, DEFAULT_COLUMN_MAX_WIDTH as lr, getTableZoomFontSize as hn, computeNeedsHorizontalScroll as yn } from "./tableZoomLayout.js";
12
- import { findGridCell as tr, isWithinCellEditor as Ae, getGridNeighbor as wn, getGridTabNeighbor as mn, focusGridCell as rr, GridNavProvider as gn } from "./useGridKeyboardNavigation.js";
13
- import { scrollGridCellIntoView as xn } from "./scrollCellIntoView.js";
14
- import { ROW_DRAG_THRESHOLD_PX as Rn, computeDropTarget as vn, clipDropLineToScrollport as kn, ROW_REORDER_ATTR as nr, measureRowPreview as En, cloneRowForPreview as In, FloatingRowPreview as Ln, DropIndicatorLine as bn, getRowDragScrollDelta as Nn, ROW_DRAG_SOURCE_STYLE as Wn, ROW_SOURCE_INDEX_ATTR as Dn } from "./rowReorderDrag.js";
15
- import { selectionFromSingleCell as yt, resolveCellCoordFromElement as Be, resolveRowAnchorCoordFromTarget as _n, buildCellRangeRect as wt, nextKeyboardCellSelection as Pn, CELL_RANGE_DRAG_THRESHOLD_PX as Sn, hitTestGridCell as Tn, canStartCellRangeFromTarget as ir, getDragScrollDeltas as Cn, getCellRangeVisualState as Fn, cellRangeEdgeBoxShadow as On } from "./cellRangeSelection.js";
16
- import { BulkActionBar as zn } from "./toolbar/BulkActionBar.js";
17
- import { TableToolbar as Gn } from "./toolbar/TableToolbar.js";
18
- import { Checkbox as sr } from "../../primitives/checkbox/checkbox.js";
19
- import { ColumnHeaderMenu as Mn } from "./toolbar/ColumnHeaderMenu.js";
20
- import { Button as Un } from "../../primitives/button/button.js";
21
- import { SummaryFooterRow as Yn } from "./toolbar/SummaryFooter.js";
22
- import { RowActionsMenu as An } from "./toolbar/RowActionsMenu.js";
23
- import { Icon as Bn } from "../../primitives/icon/icon.js";
24
- import { ShimmerLine as Xn } from "../../primitives/shimmer/shimmer.js";
25
- const $n = dn(), jn = 5, Zn = "__all__", or = {
5
+ import { TableCard as rn, Table as m } from "./table.js";
6
+ import { TablePagination as nn } from "./TablePagination.js";
7
+ import { TableZoomControl as sn } from "./TableZoomControl.js";
8
+ import { useFitTableToViewport as on } from "./useFitTableToViewport.js";
9
+ import { useTableZoomState as an } from "./useTableZoomState.js";
10
+ import { getEffectiveAlignment as lr, resolveColumnLabel as cn, alignmentClass as dn } from "./toolbar/tableToolbarHelpers.js";
11
+ import { parsePxValue as yt, DEFAULT_ZOOMABLE_COLUMN_MIN_WIDTH as tr, supportsCssZoom as ln, DEFAULT_TABLE_ZOOM_MIN as un, computeFillBaseWidth as fn, computeEffectiveTableWidth as pn, computeFlexColumnWidth as hn, DEFAULT_COLUMN_MAX_WIDTH as ur, getTableZoomFontSize as yn, computeNeedsHorizontalScroll as wn } from "./tableZoomLayout.js";
12
+ import { findGridCell as rr, isWithinCellEditor as Be, getGridNeighbor as mn, getGridTabNeighbor as gn, focusGridCell as nr, GridNavProvider as xn } from "./useGridKeyboardNavigation.js";
13
+ import { scrollGridCellIntoView as Rn } from "./scrollCellIntoView.js";
14
+ import { ROW_DRAG_THRESHOLD_PX as vn, computeDropTarget as kn, clipDropLineToScrollport as En, ROW_REORDER_ATTR as ir, measureRowPreview as In, cloneRowForPreview as Ln, FloatingRowPreview as bn, DropIndicatorLine as Nn, getRowDragScrollDelta as Dn, ROW_DRAG_SOURCE_STYLE as Wn, ROW_SOURCE_INDEX_ATTR as _n } from "./rowReorderDrag.js";
15
+ import { selectionFromSingleCell as wt, resolveCellCoordFromElement as Xe, resolveRowAnchorCoordFromTarget as Pn, buildCellRangeRect as mt, nextKeyboardCellSelection as Sn, CELL_RANGE_DRAG_THRESHOLD_PX as Cn, hitTestGridCell as Tn, canStartCellRangeFromTarget as sr, getDragScrollDeltas as Fn, getCellRangeVisualState as On, cellRangeEdgeBoxShadow as zn } from "./cellRangeSelection.js";
16
+ import { BulkActionBar as Gn } from "./toolbar/BulkActionBar.js";
17
+ import { TableToolbar as Mn } from "./toolbar/TableToolbar.js";
18
+ import { Checkbox as or } from "../../primitives/checkbox/checkbox.js";
19
+ import { ColumnHeaderMenu as Un } from "./toolbar/ColumnHeaderMenu.js";
20
+ import { Button as Yn } from "../../primitives/button/button.js";
21
+ import { SummaryFooterRow as An } from "./toolbar/SummaryFooter.js";
22
+ import { RowActionsMenu as Bn } from "./toolbar/RowActionsMenu.js";
23
+ import { Icon as Xn } from "../../primitives/icon/icon.js";
24
+ import { ShimmerLine as $n } from "../../primitives/shimmer/shimmer.js";
25
+ const jn = ln(), Zn = 5, qn = "__all__", ar = {
26
26
  ArrowUp: "up",
27
27
  ArrowDown: "down",
28
28
  ArrowLeft: "left",
29
29
  ArrowRight: "right"
30
- }, xe = (s) => s.__rowId ?? s.id ?? s.rule_id ?? String(s);
31
- function ar(s, u) {
30
+ }, Re = (s) => s.__rowId ?? s.id ?? s.rule_id ?? String(s);
31
+ function cr(s, u) {
32
32
  return s === "all" ? new Set(u) : s ?? /* @__PURE__ */ new Set();
33
33
  }
34
- function qn(s, u, f) {
34
+ function Kn(s, u, f) {
35
35
  return s ? s === "all" ? f.includes(u) : s.has(u) : !1;
36
36
  }
37
- function Kn(s, u) {
37
+ function Hn(s, u) {
38
38
  return s ? s === "all" ? u.length : s.size : 0;
39
39
  }
40
- function Hn(s, u) {
40
+ function Vn(s, u) {
41
41
  return u.length === 0 ? !1 : s === "all" ? !0 : u.every((f) => (s == null ? void 0 : s.has(f)) ?? !1);
42
42
  }
43
- function Vn(s, u) {
43
+ function Jn(s, u) {
44
44
  return s === "all" ? u.length > 0 : u.some((f) => (s == null ? void 0 : s.has(f)) ?? !1);
45
45
  }
46
- function Jn(s) {
46
+ function Qn(s) {
47
47
  if (s)
48
48
  return (u) => {
49
49
  s(u === "all" ? "all" : new Set([...u].map(String)));
50
50
  };
51
51
  }
52
- function Qn(s) {
52
+ function ei(s) {
53
53
  var u;
54
- return s != null && s.length ? s.length > 1 ? !0 : ((u = s[0]) == null ? void 0 : u.key) !== Zn : !1;
54
+ return s != null && s.length ? s.length > 1 ? !0 : ((u = s[0]) == null ? void 0 : u.key) !== qn : !1;
55
55
  }
56
- function cr(s, u, f) {
57
- return f ? dr(f, u ?? /* @__PURE__ */ new Map()) : (u == null ? void 0 : u.get(s)) ?? "left";
56
+ function dr(s, u, f) {
57
+ return f ? lr(f, u ?? /* @__PURE__ */ new Map()) : (u == null ? void 0 : u.get(s)) ?? "left";
58
58
  }
59
- const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s) => s.width ?? (s.maxWidth && s.sticky === "right" ? s.maxWidth : void 0), ei = (s) => ({
59
+ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s) => s.width ?? (s.maxWidth && s.sticky === "right" ? s.maxWidth : void 0), ti = (s) => ({
60
60
  width: s.width,
61
- maxWidth: s.maxWidth ?? lr,
61
+ maxWidth: s.maxWidth ?? ur,
62
62
  minWidth: s.minWidth ?? s.width
63
- }), bi = Qr(
63
+ }), Ni = en(
64
64
  function({
65
65
  data: u,
66
66
  columns: f,
67
- renderRowCell: gt,
68
- onRowClick: ve,
67
+ renderRowCell: xt,
68
+ onRowClick: ke,
69
69
  onRowHover: H,
70
- arialabel: ur,
71
- size: xt = "sm",
72
- allowDefaultRowClass: fr = !1,
73
- centeredHeaders: pr = [],
74
- rootClassName: hr,
75
- removeBorders: Rt,
76
- headerClassName: yr,
77
- isRowExpandable: vt,
78
- renderExpandedContent: wr,
70
+ arialabel: fr,
71
+ size: Rt = "sm",
72
+ allowDefaultRowClass: pr = !1,
73
+ centeredHeaders: hr = [],
74
+ rootClassName: yr,
75
+ removeBorders: vt,
76
+ headerClassName: wr,
77
+ isRowExpandable: kt,
78
+ renderExpandedContent: mr,
79
79
  loading: X = !1,
80
- loadingRowCount: kt = jn,
81
- renderHeaderCell: Xe,
82
- tableClassName: mr,
83
- getRowClassName: $e,
84
- selectionMode: oe = "none",
85
- selectedKeys: C,
86
- onSelectionChange: D,
87
- inlineSelection: ke = !1,
80
+ loadingRowCount: Et = Zn,
81
+ renderHeaderCell: $e,
82
+ tableClassName: gr,
83
+ getRowClassName: je,
84
+ selectionMode: ae = "none",
85
+ selectedKeys: T,
86
+ onSelectionChange: W,
87
+ inlineSelection: Ee = !1,
88
88
  toolbar: d,
89
- showToolbar: gr,
90
- toolbarTitle: Et,
91
- toolbarTrailing: It,
92
- disableExtendedTools: Ee,
89
+ showToolbar: xr,
90
+ toolbarTitle: It,
91
+ toolbarTrailing: Lt,
92
+ disableExtendedTools: Ie,
93
93
  pagination: _,
94
- showBorders: Ie,
95
- emptyState: Lt,
94
+ showBorders: Le,
95
+ emptyState: bt,
96
96
  editChrome: z,
97
- showEditActions: xr = !1,
98
- searchCollapsible: bt,
99
- isEditable: Rr,
100
- isEditMode: Nt = !0,
101
- toolbarSlot: je,
97
+ showEditActions: Rr = !1,
98
+ searchCollapsible: Nt,
99
+ isEditable: vr,
100
+ isEditMode: Dt = !0,
101
+ toolbarSlot: Ze,
102
102
  rowHeightClass: Wt,
103
103
  groupedData: V,
104
- showSummaryFooter: vr,
105
- summaryFooterProps: Ze,
106
- bulkActionBar: Le,
107
- renderBulkActionBar: be,
108
- onBulkDuplicate: Ne,
104
+ showSummaryFooter: kr,
105
+ summaryFooterProps: qe,
106
+ bulkActionBar: be,
107
+ renderBulkActionBar: Ne,
108
+ onBulkDuplicate: De,
109
109
  onBulkDelete: We,
110
- bulkActionBusy: De,
110
+ bulkActionBusy: _e,
111
111
  columnAlignments: J,
112
- onColumnHeaderAction: _e,
113
- showColumnHeaderMenu: kr,
114
- columnMenuCapabilities: Er,
115
- renderGroupHeader: Dt,
116
- columnMenuSchema: ae,
117
- columnSchema: ce,
118
- labelMeta: Ir,
119
- renderColumnHeaderMenuExtraItems: Lr,
120
- fillWidth: br = !1,
121
- zoom: Nr,
112
+ columnTextWrap: Q,
113
+ onColumnHeaderAction: Pe,
114
+ showColumnHeaderMenu: Er,
115
+ columnMenuCapabilities: Ir,
116
+ renderGroupHeader: _t,
117
+ columnMenuSchema: ce,
118
+ columnSchema: de,
119
+ labelMeta: Lr,
120
+ renderColumnHeaderMenuExtraItems: br,
121
+ fillWidth: Nr = !1,
122
+ zoom: Dr,
122
123
  rowActions: I,
123
- onCellActivate: Q,
124
+ onCellActivate: ee,
124
125
  cellSelection: w = null,
125
126
  onCellSelectionChange: N,
126
- onCopyCells: qe,
127
- onPasteCells: Ke,
128
- onClearCells: He
129
- }, de) {
130
- const { zoomConfig: G, zoomPercent: le, setZoomPercent: _t } = on(Nr), F = G !== null && $n, ue = le / 100, Pe = F ? hn(le) : void 0, W = br, g = se(null), [fe, Pt] = K(null), Wr = sn({
127
+ onCopyCells: Ke,
128
+ onPasteCells: He,
129
+ onClearCells: Ve
130
+ }, le) {
131
+ const { zoomConfig: G, zoomPercent: ue, setZoomPercent: Pt } = an(Dr), F = G !== null && jn, fe = ue / 100, Se = F ? yn(ue) : void 0, D = Nr, g = oe(null), [pe, St] = K(null), Wr = on({
131
132
  containerRef: g,
132
133
  zoomConfig: G,
133
- zoomPercent: le,
134
- setZoomPercent: _t
135
- }), ee = k(() => {
136
- if (!W) return null;
134
+ zoomPercent: ue,
135
+ setZoomPercent: Pt
136
+ }), te = k(() => {
137
+ if (!D) return null;
137
138
  const e = f.reduce(
138
- (i, n) => Re(n) ? i + ht(mt(n)) : i,
139
+ (i, n) => ve(n) ? i + yt(gt(n)) : i,
139
140
  0
140
141
  );
141
142
  return { minTableWidth: f.filter(
142
- (i) => !Re(i)
143
+ (i) => !ve(i)
143
144
  ).reduce(
144
- (i, n) => i + ht(
145
- n.minWidth ?? (F ? er : void 0)
145
+ (i, n) => i + yt(
146
+ n.minWidth ?? (F ? tr : void 0)
146
147
  ),
147
148
  0
148
149
  ) + e };
149
- }, [f, W, F]), St = (G == null ? void 0 : G.minZoom) ?? ln, [Se, Dr] = K(
150
+ }, [f, D, F]), Ct = (G == null ? void 0 : G.minZoom) ?? un, [Ce, _r] = K(
150
151
  () => /* @__PURE__ */ new Set()
151
- ), [_r, Tt] = K(
152
+ ), [Pr, Tt] = K(
152
153
  null
153
- ), [p, Pr] = K(null), M = se(null), Ve = se({ x: 0, y: 0 }), te = E((e) => {
154
- M.current = e, Pr(e);
155
- }, []), [q, Ct] = K(null), [re, Sr] = K(null), y = typeof N == "function", $ = se(null), Je = se({ x: 0, y: 0 }), [ne, Ft] = K(!1), Qe = se(null), Te = oe === "single" || oe === "multiple", et = !!I, U = Te && !ke, Ce = Qn(V), tt = !!(I != null && I.onReorderRows) && (I == null ? void 0 : I.enableRowReorder) !== !1 && !Ce && !X, Tr = k(() => ae != null && ae.length ? new Map(ae.map((e) => [e.key, e])) : /* @__PURE__ */ new Map(), [ae]), Ot = k(() => ce != null && ce.length ? new Map(ce.map((e) => [e.value, e])) : /* @__PURE__ */ new Map(), [ce]), Y = k(
154
+ ), [p, Sr] = K(null), M = oe(null), Je = oe({ x: 0, y: 0 }), re = E((e) => {
155
+ M.current = e, Sr(e);
156
+ }, []), [q, Ft] = K(null), [ne, Cr] = K(null), y = typeof N == "function", $ = oe(null), Qe = oe({ x: 0, y: 0 }), [ie, Ot] = K(!1), et = oe(null), Te = ae === "single" || ae === "multiple", tt = !!I, U = Te && !Ee, Fe = ei(V), rt = !!(I != null && I.onReorderRows) && (I == null ? void 0 : I.enableRowReorder) !== !1 && !Fe && !X, Tr = k(() => ce != null && ce.length ? new Map(ce.map((e) => [e.key, e])) : /* @__PURE__ */ new Map(), [ce]), zt = k(() => de != null && de.length ? new Map(de.map((e) => [e.value, e])) : /* @__PURE__ */ new Map(), [de]), Y = k(
156
157
  () => f.map((e) => e.key),
157
158
  [f]
158
- ), Cr = E((e) => {
159
- Dr((t) => {
159
+ ), Fr = E((e) => {
160
+ _r((t) => {
160
161
  const r = new Set(t);
161
162
  return r.has(e) ? r.delete(e) : r.add(e), r;
162
163
  });
163
- }, []), Fe = k(() => X ? Array.from({ length: kt }, (e, t) => ({
164
+ }, []), Oe = k(() => X ? Array.from({ length: Et }, (e, t) => ({
164
165
  id: `loading-${t}`
165
166
  })) : u.map((e) => {
166
167
  const t = e;
167
168
  if (t.__rowId != null)
168
169
  return t;
169
- const r = xe(t);
170
+ const r = Re(t);
170
171
  return t.id != null && String(t.id) === r ? t : { ...t, id: r };
171
- }), [X, u, kt]), R = k(() => X ? [] : Ce && V ? V.flatMap(
172
- (e) => Se.has(e.key) ? [] : e.rows.map((t) => xe(t))
173
- ) : Fe.map((e) => xe(e)), [X, Ce, V, Se, Fe]), pe = k(
174
- () => ar(C, R),
175
- [C, R]
176
- ), rt = Kn(C, R), nt = rt > 0, zt = nt && !!(Le ?? be ?? Ne ?? We), he = k(() => {
177
- if (!nt) return;
172
+ }), [X, u, Et]), R = k(() => X ? [] : Fe && V ? V.flatMap(
173
+ (e) => Ce.has(e.key) ? [] : e.rows.map((t) => Re(t))
174
+ ) : Oe.map((e) => Re(e)), [X, Fe, V, Ce, Oe]), he = k(
175
+ () => cr(T, R),
176
+ [T, R]
177
+ ), nt = Hn(T, R), it = nt > 0, Gt = it && !!(be ?? Ne ?? De ?? We), ye = k(() => {
178
+ if (!it) return;
178
179
  const e = u.filter(
179
- (t) => pe.has(xe(t))
180
+ (t) => he.has(Re(t))
180
181
  );
181
182
  return {
182
- selectedKeys: pe,
183
+ selectedKeys: he,
183
184
  selectedRows: e,
184
- clearSelection: () => D == null ? void 0 : D(/* @__PURE__ */ new Set()),
185
- busy: De
185
+ clearSelection: () => W == null ? void 0 : W(/* @__PURE__ */ new Set()),
186
+ busy: _e
186
187
  };
187
188
  }, [
188
- nt,
189
- pe,
189
+ it,
190
+ he,
190
191
  u,
191
- D,
192
- De
193
- ]), Gt = k(() => {
194
- if (je != null) return je;
195
- if (zt) {
196
- if (Le != null) return Le;
197
- if (be && he)
198
- return be(he);
199
- if (he && (Ne || We))
192
+ W,
193
+ _e
194
+ ]), Mt = k(() => {
195
+ if (Ze != null) return Ze;
196
+ if (Gt) {
197
+ if (be != null) return be;
198
+ if (Ne && ye)
199
+ return Ne(ye);
200
+ if (ye && (De || We))
200
201
  return /* @__PURE__ */ c(
201
- zn,
202
+ Gn,
202
203
  {
203
- count: rt,
204
- onDuplicate: Ne,
204
+ count: nt,
205
+ onDuplicate: De,
205
206
  onDelete: We,
206
- onClearSelection: he.clearSelection,
207
- busy: De
207
+ onClearSelection: ye.clearSelection,
208
+ busy: _e
208
209
  }
209
210
  );
210
211
  }
211
212
  const e = F && G ? /* @__PURE__ */ c(
212
- nn,
213
+ sn,
213
214
  {
214
- value: le,
215
- minValue: St,
215
+ value: ue,
216
+ minValue: Ct,
216
217
  maxValue: G.maxZoom,
217
218
  step: G.step,
218
- onChange: _t,
219
+ onChange: Pt,
219
220
  onFitToViewport: Wr,
220
- isDisabled: Ee
221
+ isDisabled: Ie
221
222
  }
222
- ) : null, t = It;
223
+ ) : null, t = Lt;
223
224
  return !d && !t && !e ? null : /* @__PURE__ */ c(
224
- Gn,
225
+ Mn,
225
226
  {
226
227
  sort: d == null ? void 0 : d.sort,
227
228
  filter: d == null ? void 0 : d.filter,
@@ -234,52 +235,52 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
234
235
  sortContent: d == null ? void 0 : d.sortContent,
235
236
  filterContent: d == null ? void 0 : d.filterContent,
236
237
  views: d == null ? void 0 : d.views,
237
- fallbackTitle: Et,
238
+ fallbackTitle: It,
238
239
  beforeSearch: e,
239
240
  trailing: t,
240
- searchCollapsible: bt,
241
- disableExtendedTools: Ee,
242
- isEditMode: Nt,
241
+ searchCollapsible: Nt,
242
+ disableExtendedTools: Ie,
243
+ isEditMode: Dt,
243
244
  undoRedo: d != null && d.undoRedo ? {
244
245
  ...d.undoRedo,
245
- isDisabled: d.undoRedo.isDisabled ?? Ee
246
+ isDisabled: d.undoRedo.isDisabled ?? Ie
246
247
  } : void 0
247
248
  }
248
249
  );
249
250
  }, [
250
- je,
251
- zt,
252
- Le,
251
+ Ze,
252
+ Gt,
253
253
  be,
254
- he,
255
254
  Ne,
256
- We,
255
+ ye,
257
256
  De,
258
- rt,
257
+ We,
258
+ _e,
259
+ nt,
259
260
  d,
260
- Et,
261
261
  It,
262
- bt,
262
+ Lt,
263
263
  Nt,
264
- Ee,
264
+ Dt,
265
+ Ie,
265
266
  G,
266
267
  F,
267
- le,
268
- St
269
- ]), Mt = Gt != null && gr !== !1, Ut = !!_ && (_ == null ? void 0 : _.showPagination) !== !1, Fr = Mt || Ut, Yt = !X && u.length === 0 && Lt != null, T = !!(xr && z), it = !!(z != null && z.showFooterRow), L = Rr ?? (T || it || et), Or = Yt && !(it && z), ye = f.length + (U ? 1 : 0) + (T ? 1 : 0), zr = !!(vr && Ze), b = Ie ? "border-r border-secondary last:border-r-0" : void 0, Gr = k(() => {
268
+ ue,
269
+ Ct
270
+ ]), Ut = Mt != null && xr !== !1, Yt = !!_ && (_ == null ? void 0 : _.showPagination) !== !1, Or = Ut || Yt, At = !X && u.length === 0 && bt != null, C = !!(Rr && z), st = !!(z != null && z.showFooterRow), L = vr ?? (C || st || tt), zr = At && !(st && z), we = f.length + (U ? 1 : 0) + (C ? 1 : 0), Gr = !!(kr && qe), b = Le ? "border-r border-secondary last:border-r-0" : void 0, Mr = k(() => {
270
271
  const e = /* @__PURE__ */ new Map();
271
- return _e && f.forEach((t) => {
272
+ return Pe && f.forEach((t) => {
272
273
  e.set(
273
274
  t.key,
274
- (r) => _e(t.key, r)
275
+ (r) => Pe(t.key, r)
275
276
  );
276
277
  }), e;
277
- }, [f, _e]), st = E(
278
+ }, [f, Pe]), ot = E(
278
279
  (e, t, r) => {
279
280
  var a;
280
281
  let i = r ?? null;
281
282
  if (i == null) {
282
- const l = (a = tr(
283
+ const l = (a = rr(
283
284
  g.current,
284
285
  e,
285
286
  t
@@ -292,47 +293,47 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
292
293
  sourceIndex: i
293
294
  };
294
295
  if (y) {
295
- N == null || N(yt(n));
296
+ N == null || N(wt(n));
296
297
  return;
297
298
  }
298
- Ct(n);
299
+ Ft(n);
299
300
  },
300
301
  [y, N]
301
- ), Oe = E(() => {
302
+ ), ze = E(() => {
302
303
  if (y) {
303
304
  N == null || N(null);
304
305
  return;
305
306
  }
306
- Ct(null);
307
+ Ft(null);
307
308
  }, [y, N]), P = y ? (w == null ? void 0 : w.focus) ?? null : q, A = E(
308
309
  (e) => {
309
310
  y && (N == null || N(e));
310
311
  },
311
312
  [y, N]
312
- ), Mr = E(
313
+ ), Ur = E(
313
314
  (e) => {
314
- var Ye, ie, ge;
315
- const t = e.key in or;
316
- if (e.key !== "Enter" && e.key !== "Tab" && e.key !== "Escape" && e.key !== "Delete" && e.key !== "Backspace" && !t || Ae(e.target)) return;
315
+ var Ae, se, xe;
316
+ const t = e.key in ar;
317
+ if (e.key !== "Enter" && e.key !== "Tab" && e.key !== "Escape" && e.key !== "Delete" && e.key !== "Backspace" && !t || Be(e.target)) return;
317
318
  if (e.key === "Escape") {
318
319
  if (!P && !w) return;
319
- e.preventDefault(), e.stopPropagation(), Oe(), (Ye = g.current) != null && Ye.contains(document.activeElement) && document.activeElement.blur();
320
+ e.preventDefault(), e.stopPropagation(), ze(), (Ae = g.current) != null && Ae.contains(document.activeElement) && document.activeElement.blur();
320
321
  return;
321
322
  }
322
- const r = (ge = (ie = e.target).closest) == null ? void 0 : ge.call(
323
- ie,
323
+ const r = (xe = (se = e.target).closest) == null ? void 0 : xe.call(
324
+ se,
324
325
  "[data-grid-cell]"
325
- ), i = r ? Be(r) : null, n = y && t && e.shiftKey && !P && !i ? _n(e.target, g.current) : null, a = n != null && pe.has(n.rowId), l = P ?? i ?? (a ? n : null);
326
+ ), i = r ? Xe(r) : null, n = y && t && e.shiftKey && !P && !i ? Pn(e.target, g.current) : null, a = n != null && he.has(n.rowId), l = P ?? i ?? (a ? n : null);
326
327
  if (!l) return;
327
328
  if (e.key === "Delete" || e.key === "Backspace") {
328
- if (!y || !w || !He) return;
329
- const j = wt(
329
+ if (!y || !w || !Ve) return;
330
+ const j = mt(
330
331
  w,
331
332
  R,
332
333
  Y
333
334
  );
334
335
  if (!j) return;
335
- e.preventDefault(), e.stopPropagation(), He({
336
+ e.preventDefault(), e.stopPropagation(), Ve({
336
337
  selection: w,
337
338
  rect: j,
338
339
  event: e.nativeEvent
@@ -340,22 +341,22 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
340
341
  return;
341
342
  }
342
343
  if (e.key === "Enter") {
343
- if (!Q) return;
344
- e.preventDefault(), e.stopPropagation(), Q({
344
+ if (!ee) return;
345
+ e.preventDefault(), e.stopPropagation(), ee({
345
346
  rowId: l.rowId,
346
347
  columnKey: l.columnKey,
347
348
  sourceIndex: l.sourceIndex
348
349
  });
349
350
  return;
350
351
  }
351
- const h = y && e.shiftKey && t, v = t ? or[e.key] : e.shiftKey ? "left" : "right", o = t ? wn(
352
+ const h = y && e.shiftKey && t, v = t ? ar[e.key] : e.shiftKey ? "left" : "right", o = t ? mn(
352
353
  g.current,
353
354
  R,
354
355
  Y,
355
356
  l.rowId,
356
357
  l.columnKey,
357
358
  v
358
- ) : mn(
359
+ ) : gn(
359
360
  g.current,
360
361
  R,
361
362
  Y,
@@ -368,27 +369,27 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
368
369
  return;
369
370
  }
370
371
  e.preventDefault(), e.stopPropagation();
371
- const pt = o ? {
372
+ const ht = o ? {
372
373
  rowId: o.rowId,
373
374
  columnKey: o.columnKey,
374
375
  sourceIndex: o.sourceIndex
375
- } : null, we = a ? null : pt, me = we ? v : null;
376
- if (Qe.current = me, y) {
377
- const j = Pn(
376
+ } : null, me = a ? null : ht, ge = me ? v : null;
377
+ if (et.current = ge, y) {
378
+ const j = Sn(
378
379
  l,
379
- we,
380
+ me,
380
381
  w,
381
382
  h
382
383
  );
383
384
  j && j !== w && A(j);
384
- } else o && st(o.rowId, o.columnKey, o.sourceIndex);
385
- const O = we ?? l;
385
+ } else o && ot(o.rowId, o.columnKey, o.sourceIndex);
386
+ const O = me ?? l;
386
387
  requestAnimationFrame(
387
- () => rr(
388
+ () => nr(
388
389
  g.current,
389
390
  O.rowId,
390
391
  O.columnKey,
391
- { dir: me }
392
+ { dir: ge }
392
393
  )
393
394
  );
394
395
  },
@@ -397,65 +398,65 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
397
398
  R,
398
399
  y,
399
400
  w,
400
- Oe,
401
+ ze,
401
402
  Y,
402
403
  A,
403
- pe,
404
- Q,
405
- He,
406
- st
404
+ he,
405
+ ee,
406
+ Ve,
407
+ ot
407
408
  ]
408
409
  );
409
410
  Z(() => {
410
411
  if (!L || !P && !w) return;
411
412
  const e = (t) => {
412
413
  const r = g.current;
413
- r && !r.contains(t.target) && Oe();
414
+ r && !r.contains(t.target) && ze();
414
415
  };
415
416
  return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
416
- }, [L, P, w, Oe]);
417
- const ot = (P == null ? void 0 : P.rowId) ?? null, at = (P == null ? void 0 : P.columnKey) ?? null;
418
- Qt(() => {
419
- if (!L || ne || !ot || !at) return;
420
- const e = tr(
417
+ }, [L, P, w, ze]);
418
+ const at = (P == null ? void 0 : P.rowId) ?? null, ct = (P == null ? void 0 : P.columnKey) ?? null;
419
+ er(() => {
420
+ if (!L || ie || !at || !ct) return;
421
+ const e = rr(
421
422
  g.current,
422
- ot,
423
- at
423
+ at,
424
+ ct
424
425
  );
425
- e && xn(e, { dir: Qe.current });
426
- }, [L, ne, ot, at]);
427
- const At = k(() => {
426
+ e && Rn(e, { dir: et.current });
427
+ }, [L, ie, at, ct]);
428
+ const Bt = k(() => {
428
429
  let e = 0;
429
- return U && (e += 40), T && (e += 56), f.forEach((t) => {
430
- Re(t) && (e += ht(mt(t)));
430
+ return U && (e += 40), C && (e += 56), f.forEach((t) => {
431
+ ve(t) && (e += yt(gt(t)));
431
432
  }), e;
432
- }, [f, T, U]), Bt = k(
433
- () => f.filter((e) => !Re(e)).length,
433
+ }, [f, C, U]), Xt = k(
434
+ () => f.filter((e) => !ve(e)).length,
434
435
  [f]
435
- ), ct = k(
436
- () => W && ee ? un(fe, ee.minTableWidth) : null,
437
- [fe, W, ee]
438
- ), Xt = W && yn(ct, fe, ue), ze = k(
439
- () => fn(ct, fe, ue),
440
- [ct, fe, ue]
441
436
  ), dt = k(
442
- () => pn(
443
- ze,
444
- At,
445
- Bt
437
+ () => D && te ? fn(pe, te.minTableWidth) : null,
438
+ [pe, D, te]
439
+ ), $t = D && wn(dt, pe, fe), Ge = k(
440
+ () => pn(dt, pe, fe),
441
+ [dt, pe, fe]
442
+ ), lt = k(
443
+ () => hn(
444
+ Ge,
445
+ Bt,
446
+ Xt
446
447
  ),
447
- [ze, At, Bt]
448
+ [Ge, Bt, Xt]
448
449
  );
449
- Qt(() => {
450
- if (!W) {
451
- Pt(null);
450
+ er(() => {
451
+ if (!D) {
452
+ St(null);
452
453
  return;
453
454
  }
454
455
  const e = g.current;
455
456
  if (!e) return;
456
457
  const t = () => {
457
458
  const i = e.clientWidth;
458
- i > 0 && Pt((n) => n === i ? n : i);
459
+ i > 0 && St((n) => n === i ? n : i);
459
460
  };
460
461
  t();
461
462
  const r = new ResizeObserver(t);
@@ -465,72 +466,72 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
465
466
  }, [
466
467
  f.length,
467
468
  u.length,
468
- W,
469
+ D,
469
470
  X,
470
- T,
471
+ C,
471
472
  U
472
473
  ]);
473
- const lt = E(
474
+ const ut = E(
474
475
  (e) => {
475
- if (!W)
476
- return ei(e);
477
- const t = e.minWidth ?? (F ? er : void 0), r = mt(e), i = r, n = e.maxWidth ?? r ?? lr;
478
- return Re(e) && i ? {
476
+ if (!D)
477
+ return ti(e);
478
+ const t = e.minWidth ?? (F ? tr : void 0), r = gt(e), i = r, n = e.maxWidth ?? r ?? ur;
479
+ return ve(e) && i ? {
479
480
  minWidth: i,
480
481
  width: i,
481
482
  maxWidth: n ?? i
482
- } : dt != null ? {
483
- width: `${dt}px`,
483
+ } : lt != null ? {
484
+ width: `${lt}px`,
484
485
  minWidth: t
485
486
  } : { minWidth: t, maxWidth: n };
486
487
  },
487
- [W, dt, F]
488
- ), Ur = k(() => {
488
+ [D, lt, F]
489
+ ), Yr = k(() => {
489
490
  const e = F ? {
490
- zoom: ue,
491
- "--table-zoom-font-size": Pe ? `${Pe}px` : void 0
491
+ zoom: fe,
492
+ "--table-zoom-font-size": Se ? `${Se}px` : void 0
492
493
  } : void 0;
493
- return !W || !ee ? F ? { ...e, width: "max-content", minWidth: "100%" } : void 0 : {
494
+ return !D || !te ? F ? { ...e, width: "max-content", minWidth: "100%" } : void 0 : {
494
495
  ...e,
495
496
  // The zoom-independent base, so the painted width tracks the zoom and overflows by
496
497
  // more as you zoom in — matching the widths `getColumnStyle` hands the columns.
497
- width: `${ze ?? ee.minTableWidth}px`,
498
+ width: `${Ge ?? te.minTableWidth}px`,
498
499
  tableLayout: "fixed"
499
500
  };
500
501
  }, [
501
- W,
502
- ee,
503
- Xt,
504
- ze,
502
+ D,
503
+ te,
504
+ $t,
505
+ Ge,
505
506
  F,
506
- ue,
507
- Pe
508
- ]), Yr = E(
507
+ fe,
508
+ Se
509
+ ]), Ar = E(
509
510
  (e) => {
510
- g.current = e, typeof de == "function" ? de(e) : de && (de.current = e);
511
+ g.current = e, typeof le == "function" ? le(e) : le && (le.current = e);
511
512
  },
512
- [de]
513
- ), Ar = Te && ke ? {
514
- selectionMode: oe,
515
- selectedKeys: C === "all" ? "all" : C,
516
- onSelectionChange: Jn(D)
517
- } : {}, Br = (e, t = 0) => {
513
+ [le]
514
+ ), Br = Te && Ee ? {
515
+ selectionMode: ae,
516
+ selectedKeys: T === "all" ? "all" : T,
517
+ onSelectionChange: Qn(W)
518
+ } : {}, Xr = (e, t = 0) => {
518
519
  const r = e.__sourceIndex;
519
520
  return typeof r == "number" ? r : t;
520
- }, Ge = E(
521
+ }, Me = E(
521
522
  (e) => {
522
523
  const t = M.current;
523
524
  if (!t) return;
524
525
  const { fromSourceIndex: r, toSourceIndex: i, item: n, active: a } = t;
525
- te(null), e && a && r !== i && (I != null && I.onReorderRows) && I.onReorderRows(r, i, n);
526
+ re(null), e && a && r !== i && (I != null && I.onReorderRows) && I.onReorderRows(r, i, n);
526
527
  },
527
- [I, te]
528
- ), Me = E(
528
+ [I, re]
529
+ ), Ue = E(
529
530
  (e, t) => {
530
531
  const r = M.current;
531
532
  if (!r) return;
532
- Ve.current = { x: e, y: t };
533
- const i = e - r.startX, n = t - r.startY, a = Math.hypot(i, n), l = r.active || a >= Rn;
533
+ Je.current = { x: e, y: t };
534
+ const i = e - r.startX, n = t - r.startY, a = Math.hypot(i, n), l = r.active || a >= vn;
534
535
  let h = {
535
536
  ...r,
536
537
  currentX: e,
@@ -541,7 +542,7 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
541
542
  r.active || Tt(null);
542
543
  const v = g.current;
543
544
  if (v) {
544
- const o = vn(
545
+ const o = kn(
545
546
  v,
546
547
  t,
547
548
  r.fromSourceIndex,
@@ -551,7 +552,7 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
551
552
  ...h,
552
553
  toSourceIndex: o.toSourceIndex,
553
554
  // Clip to scrollport so the line never draws over the header / outside the card.
554
- dropLineY: kn(
555
+ dropLineY: En(
555
556
  o.dropLineY,
556
557
  v
557
558
  ),
@@ -560,15 +561,15 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
560
561
  });
561
562
  }
562
563
  }
563
- te(h);
564
+ re(h);
564
565
  },
565
- [te]
566
- ), Xr = E(
566
+ [re]
567
+ ), $r = E(
567
568
  (e, t, r, i) => {
568
569
  var v, o;
569
- if (!tt || e.button !== 0) return;
570
+ if (!rt || e.button !== 0) return;
570
571
  const n = (v = g.current) == null ? void 0 : v.querySelector(
571
- `tr[${nr}="${CSS.escape(t)}"]`
572
+ `tr[${ir}="${CSS.escape(t)}"]`
572
573
  );
573
574
  if (!n) return;
574
575
  e.preventDefault();
@@ -576,8 +577,8 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
576
577
  e.currentTarget.setPointerCapture(e.pointerId);
577
578
  } catch {
578
579
  }
579
- const a = En(n), l = In(n), h = ((o = n.closest("table")) == null ? void 0 : o.getBoundingClientRect()) ?? n.getBoundingClientRect();
580
- Ve.current = { x: e.clientX, y: e.clientY }, te({
580
+ const a = In(n), l = Ln(n), h = ((o = n.closest("table")) == null ? void 0 : o.getBoundingClientRect()) ?? n.getBoundingClientRect();
581
+ Je.current = { x: e.clientX, y: e.clientY }, re({
581
582
  rowId: t,
582
583
  fromSourceIndex: r,
583
584
  item: i,
@@ -595,26 +596,26 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
595
596
  rowClone: l
596
597
  });
597
598
  },
598
- [tt, te]
599
- ), $t = p != null;
599
+ [rt, re]
600
+ ), jt = p != null;
600
601
  Z(() => {
601
- if (!$t) return;
602
+ if (!jt) return;
602
603
  const e = (n) => {
603
604
  var a;
604
- n.pointerId === ((a = M.current) == null ? void 0 : a.pointerId) && Me(n.clientX, n.clientY);
605
+ n.pointerId === ((a = M.current) == null ? void 0 : a.pointerId) && Ue(n.clientX, n.clientY);
605
606
  }, t = (n) => {
606
607
  var a;
607
- n.pointerId === ((a = M.current) == null ? void 0 : a.pointerId) && Ge(!0);
608
+ n.pointerId === ((a = M.current) == null ? void 0 : a.pointerId) && Me(!0);
608
609
  }, r = (n) => {
609
610
  var a;
610
- n.pointerId === ((a = M.current) == null ? void 0 : a.pointerId) && Ge(!1);
611
+ n.pointerId === ((a = M.current) == null ? void 0 : a.pointerId) && Me(!1);
611
612
  }, i = (n) => {
612
- n.key === "Escape" && (n.preventDefault(), Ge(!1));
613
+ n.key === "Escape" && (n.preventDefault(), Me(!1));
613
614
  };
614
615
  return window.addEventListener("pointermove", e), window.addEventListener("pointerup", t), window.addEventListener("pointercancel", r), window.addEventListener("keydown", i), () => {
615
616
  window.removeEventListener("pointermove", e), window.removeEventListener("pointerup", t), window.removeEventListener("pointercancel", r), window.removeEventListener("keydown", i);
616
617
  };
617
- }, [$t, Ge, Me]), Z(() => {
618
+ }, [jt, Me, Ue]), Z(() => {
618
619
  if (!(p != null && p.active)) return;
619
620
  const e = document.body.style.userSelect, t = document.body.style.cursor;
620
621
  return document.body.style.userSelect = "none", document.body.style.cursor = "grabbing", () => {
@@ -626,62 +627,62 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
626
627
  const t = () => {
627
628
  const r = M.current, i = g.current;
628
629
  if (!(r != null && r.active) || !i) return;
629
- const { x: n, y: a } = Ve.current, l = Nn(i, a);
630
- l !== 0 && (i.scrollTop += l, Me(n, a)), e = requestAnimationFrame(t);
630
+ const { x: n, y: a } = Je.current, l = Dn(i, a);
631
+ l !== 0 && (i.scrollTop += l, Ue(n, a)), e = requestAnimationFrame(t);
631
632
  };
632
633
  return e = requestAnimationFrame(t), () => cancelAnimationFrame(e);
633
- }, [p == null ? void 0 : p.active, Me]);
634
- const Ue = E(
634
+ }, [p == null ? void 0 : p.active, Ue]);
635
+ const Ye = E(
635
636
  (e, t) => {
636
637
  const r = $.current, i = g.current;
637
638
  if (!r || !i) return;
638
- Je.current = { x: e, y: t };
639
- const n = e - r.startX, a = t - r.startY, l = Math.hypot(n, a), h = r.active || l >= Sn;
640
- if (h && !r.active && (r.active = !0, Ft(!0)), !h) return;
641
- const v = Tn(i, e, t), o = v ? Be(v) : null;
639
+ Qe.current = { x: e, y: t };
640
+ const n = e - r.startX, a = t - r.startY, l = Math.hypot(n, a), h = r.active || l >= Cn;
641
+ if (h && !r.active && (r.active = !0, Ot(!0)), !h) return;
642
+ const v = Tn(i, e, t), o = v ? Xe(v) : null;
642
643
  o && (r.focus = o, A({
643
644
  anchor: r.anchor,
644
645
  focus: o
645
646
  }));
646
647
  },
647
648
  [A]
648
- ), ut = E((e) => {
649
+ ), ft = E((e) => {
649
650
  const t = $.current;
650
- $.current = null, Ft(!1), t && requestAnimationFrame(
651
- () => rr(
651
+ $.current = null, Ot(!1), t && requestAnimationFrame(
652
+ () => nr(
652
653
  g.current,
653
654
  t.focus.rowId,
654
655
  t.focus.columnKey
655
656
  )
656
657
  );
657
- }, []), $r = E(
658
+ }, []), jr = E(
658
659
  (e) => {
659
- if (!y || !L || !Q || Ae(e.target)) return;
660
- const t = ir(
660
+ if (!y || !L || !ee || Be(e.target)) return;
661
+ const t = sr(
661
662
  e.target,
662
663
  g.current
663
664
  );
664
665
  if (!t) return;
665
- const r = Be(t);
666
- r && (e.preventDefault(), e.stopPropagation(), A(yt(r)), Q({
666
+ const r = Xe(t);
667
+ r && (e.preventDefault(), e.stopPropagation(), A(wt(r)), ee({
667
668
  rowId: r.rowId,
668
669
  columnKey: r.columnKey,
669
670
  sourceIndex: r.sourceIndex
670
671
  }));
671
672
  },
672
- [y, A, L, Q]
673
- ), jr = E(
673
+ [y, A, L, ee]
674
+ ), Zr = E(
674
675
  (e) => {
675
676
  if (!y || !L || e.button !== 0 || M.current) return;
676
- const t = ir(
677
+ const t = sr(
677
678
  e.target,
678
679
  g.current
679
680
  );
680
681
  if (!t) return;
681
- const r = Be(t);
682
+ const r = Xe(t);
682
683
  if (!r) return;
683
684
  const i = e.shiftKey && w != null, n = i ? w.anchor : r;
684
- Qe.current = null, Je.current = { x: e.clientX, y: e.clientY }, $.current = {
685
+ et.current = null, Qe.current = { x: e.clientX, y: e.clientY }, $.current = {
685
686
  pointerId: e.pointerId,
686
687
  startX: e.clientX,
687
688
  startY: e.clientY,
@@ -690,7 +691,7 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
690
691
  origin: r,
691
692
  focus: r,
692
693
  extend: i
693
- }, A(i ? { anchor: n, focus: r } : yt(r));
694
+ }, A(i ? { anchor: n, focus: r } : wt(r));
694
695
  },
695
696
  [y, w, A, L]
696
697
  );
@@ -698,64 +699,64 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
698
699
  if (!y) return;
699
700
  const e = (i) => {
700
701
  const n = $.current;
701
- !n || i.pointerId !== n.pointerId || (i.preventDefault(), Ue(i.clientX, i.clientY));
702
+ !n || i.pointerId !== n.pointerId || (i.preventDefault(), Ye(i.clientX, i.clientY));
702
703
  }, t = (i) => {
703
704
  const n = $.current;
704
- !n || i.pointerId !== n.pointerId || ut(!0);
705
+ !n || i.pointerId !== n.pointerId || ft(!0);
705
706
  }, r = (i) => {
706
707
  const n = $.current;
707
- !n || i.pointerId !== n.pointerId || ut(!1);
708
+ !n || i.pointerId !== n.pointerId || ft(!1);
708
709
  };
709
710
  return window.addEventListener("pointermove", e), window.addEventListener("pointerup", t), window.addEventListener("pointercancel", r), () => {
710
711
  window.removeEventListener("pointermove", e), window.removeEventListener("pointerup", t), window.removeEventListener("pointercancel", r);
711
712
  };
712
- }, [y, ut, Ue]), Z(() => {
713
- if (!ne) return;
713
+ }, [y, ft, Ye]), Z(() => {
714
+ if (!ie) return;
714
715
  const e = document.body.style.userSelect;
715
716
  return document.body.style.userSelect = "none", () => {
716
717
  document.body.style.userSelect = e;
717
718
  };
718
- }, [ne]), Z(() => {
719
- if (!ne) return;
719
+ }, [ie]), Z(() => {
720
+ if (!ie) return;
720
721
  let e = 0;
721
722
  const t = () => {
722
723
  const r = $.current, i = g.current;
723
724
  if (!(r != null && r.active) || !i) return;
724
- const { x: n, y: a } = Je.current, { dx: l, dy: h } = Cn(i, n, a);
725
- (l !== 0 || h !== 0) && (l !== 0 && (i.scrollLeft += l), h !== 0 && (i.scrollTop += h), Ue(n, a)), e = requestAnimationFrame(t);
725
+ const { x: n, y: a } = Qe.current, { dx: l, dy: h } = Fn(i, n, a);
726
+ (l !== 0 || h !== 0) && (l !== 0 && (i.scrollLeft += l), h !== 0 && (i.scrollTop += h), Ye(n, a)), e = requestAnimationFrame(t);
726
727
  };
727
728
  return e = requestAnimationFrame(t), () => cancelAnimationFrame(e);
728
- }, [ne, Ue]), Z(() => {
729
+ }, [ie, Ye]), Z(() => {
729
730
  if (!y || !w) return;
730
731
  const e = (r) => {
731
- if (Ae(r.target)) return;
732
+ if (Be(r.target)) return;
732
733
  const i = g.current;
733
734
  if (!i) return;
734
735
  const n = document.activeElement;
735
736
  if (n && !i.contains(n) && r.target instanceof Node && !i.contains(r.target))
736
737
  return;
737
- const a = wt(
738
+ const a = mt(
738
739
  w,
739
740
  R,
740
741
  Y
741
742
  );
742
- !a || !qe || (r.preventDefault(), qe({ selection: w, rect: a, event: r }));
743
+ !a || !Ke || (r.preventDefault(), Ke({ selection: w, rect: a, event: r }));
743
744
  }, t = (r) => {
744
745
  var h;
745
- if (Ae(r.target)) return;
746
+ if (Be(r.target)) return;
746
747
  const i = g.current;
747
748
  if (!i) return;
748
749
  const n = document.activeElement;
749
750
  if (n && !i.contains(n) && r.target instanceof Node && !i.contains(r.target))
750
751
  return;
751
- const a = wt(
752
+ const a = mt(
752
753
  w,
753
754
  R,
754
755
  Y
755
756
  );
756
- if (!a || !Ke) return;
757
+ if (!a || !He) return;
757
758
  const l = ((h = r.clipboardData) == null ? void 0 : h.getData("text/plain")) ?? "";
758
- r.preventDefault(), Ke({ selection: w, rect: a, text: l, event: r });
759
+ r.preventDefault(), He({ selection: w, rect: a, text: l, event: r });
759
760
  };
760
761
  return document.addEventListener("copy", e), document.addEventListener("paste", t), () => {
761
762
  document.removeEventListener("copy", e), document.removeEventListener("paste", t);
@@ -765,34 +766,34 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
765
766
  y,
766
767
  w,
767
768
  Y,
768
- qe,
769
- Ke
769
+ Ke,
770
+ He
770
771
  ]);
771
- const ft = Te && Hn(C, R), Zr = Te && Vn(C, R), qr = () => {
772
- if (D) {
773
- if (ft) {
774
- D(/* @__PURE__ */ new Set());
772
+ const pt = Te && Vn(T, R), qr = Te && Jn(T, R), Kr = () => {
773
+ if (W) {
774
+ if (pt) {
775
+ W(/* @__PURE__ */ new Set());
775
776
  return;
776
777
  }
777
- D("all");
778
+ W("all");
778
779
  }
779
- }, Kr = (e, t) => {
780
- if (!D) return;
781
- if (oe === "single") {
782
- D(t ? /* @__PURE__ */ new Set([e]) : /* @__PURE__ */ new Set());
780
+ }, Hr = (e, t) => {
781
+ if (!W) return;
782
+ if (ae === "single") {
783
+ W(t ? /* @__PURE__ */ new Set([e]) : /* @__PURE__ */ new Set());
783
784
  return;
784
785
  }
785
- const r = C === "all" ? new Set(R) : new Set(ar(C, R));
786
- t ? r.add(e) : r.delete(e), D(r);
787
- }, Hr = (e) => {
788
- const t = Se.has(e.key);
789
- return Dt ? /* @__PURE__ */ c(
786
+ const r = T === "all" ? new Set(R) : new Set(cr(T, R));
787
+ t ? r.add(e) : r.delete(e), W(r);
788
+ }, Vr = (e) => {
789
+ const t = Ce.has(e.key);
790
+ return _t ? /* @__PURE__ */ c(
790
791
  m.Row,
791
792
  {
792
793
  id: `group-${e.key}`,
793
794
  highlightSelectedRow: !1,
794
795
  className: "bg-secondary_subtle hover:bg-secondary_subtle",
795
- children: /* @__PURE__ */ c(m.Cell, { colSpan: ye, className: x(b), children: Dt(e) })
796
+ children: /* @__PURE__ */ c(m.Cell, { colSpan: we, className: x(b), children: _t(e) })
796
797
  },
797
798
  `group-${e.key}`
798
799
  ) : /* @__PURE__ */ c(
@@ -804,18 +805,18 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
804
805
  children: /* @__PURE__ */ c(
805
806
  m.Cell,
806
807
  {
807
- colSpan: ye,
808
+ colSpan: we,
808
809
  className: x("py-1.5", b),
809
810
  children: /* @__PURE__ */ S(
810
811
  "button",
811
812
  {
812
813
  type: "button",
813
814
  className: "flex w-full items-center gap-2 px-2 text-left text-xs font-medium text-secondary",
814
- onClick: () => Cr(e.key),
815
+ onClick: () => Fr(e.key),
815
816
  "aria-expanded": !t,
816
817
  children: [
817
818
  /* @__PURE__ */ c(
818
- en,
819
+ tn,
819
820
  {
820
821
  className: x(
821
822
  "size-4 shrink-0 text-fg-quaternary transition-transform",
@@ -837,35 +838,35 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
837
838
  },
838
839
  `group-${e.key}`
839
840
  );
840
- }, jt = (e, t, r = 0) => {
841
- const i = vt ? vt(e) : !1, n = xe(e), a = Br(e, r), l = qn(C, n, R), h = _r === n, v = (p == null ? void 0 : p.active) === !0 && p.rowId === n;
841
+ }, Zt = (e, t, r = 0) => {
842
+ const i = kt ? kt(e) : !1, n = Re(e), a = Xr(e, r), l = Kn(T, n, R), h = Pr === n, v = (p == null ? void 0 : p.active) === !0 && p.rowId === n;
842
843
  return /* @__PURE__ */ S(
843
844
  m.Row,
844
845
  {
845
846
  onAction: () => {
846
847
  var o;
847
- (o = M.current) != null && o.active || ve == null || ve(e);
848
+ (o = M.current) != null && o.active || ke == null || ke(e);
848
849
  },
849
850
  onMouseEnter: () => H == null ? void 0 : H(e, !0),
850
851
  onMouseLeave: () => H == null ? void 0 : H(e, !1),
851
852
  id: n,
852
853
  value: e,
853
854
  columns: f,
854
- expandedColSpan: ye,
855
+ expandedColSpan: we,
855
856
  isExpandable: i,
856
- highlightSelectedRow: ke,
857
- renderExpandedContent: i ? wr : void 0,
858
- [nr]: n,
859
- [Dn]: String(a),
857
+ highlightSelectedRow: Ee,
858
+ renderExpandedContent: i ? mr : void 0,
859
+ [ir]: n,
860
+ [_n]: String(a),
860
861
  className: x(
861
- ve && "cursor-pointer",
862
- fr ? "prose" : "",
863
- Rt && "[&>td]:after:hidden",
864
- et && "group/rowactions",
862
+ ke && "cursor-pointer",
863
+ pr ? "prose" : "",
864
+ vt && "[&>td]:after:hidden",
865
+ tt && "group/rowactions",
865
866
  h && "bg-utility-brand-25 hover:bg-utility-brand-25",
866
867
  U && l && "bg-secondary",
867
868
  Wt,
868
- $e == null ? void 0 : $e(e)
869
+ je == null ? void 0 : je(e)
869
870
  ),
870
871
  style: v ? Wn : void 0,
871
872
  children: [
@@ -882,10 +883,10 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
882
883
  onClick: (o) => o.stopPropagation(),
883
884
  onKeyDown: (o) => o.stopPropagation(),
884
885
  children: /* @__PURE__ */ c(
885
- sr,
886
+ or,
886
887
  {
887
888
  checked: l,
888
- onCheckedChange: (o) => Kr(n, o === !0),
889
+ onCheckedChange: (o) => Hr(n, o === !0),
889
890
  "aria-label": `Select row ${n}`,
890
891
  className: "items-center justify-center"
891
892
  }
@@ -894,18 +895,18 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
894
895
  )
895
896
  }
896
897
  ),
897
- f.map((o, Ht) => {
898
- const pt = Ot.get(o.key), we = cr(
898
+ f.map((o, Vt) => {
899
+ const ht = zt.get(o.key), me = dr(
899
900
  o.key,
900
901
  J,
901
- pt
902
- ), me = (re == null ? void 0 : re.rowId) === n && (re == null ? void 0 : re.columnKey) === o.key, O = y ? Fn(
902
+ ht
903
+ ), ge = (ne == null ? void 0 : ne.rowId) === n && (ne == null ? void 0 : ne.columnKey) === o.key, O = y ? On(
903
904
  w,
904
905
  n,
905
906
  o.key,
906
907
  R,
907
908
  Y
908
- ) : null, Ye = !y && L && !me && (q == null ? void 0 : q.rowId) === n && (q == null ? void 0 : q.columnKey) === o.key, ie = !!(O != null && O.inRange) && L && !me, ge = ie && O ? On(O.edges) : void 0, j = lt(o);
909
+ ) : null, Ae = !y && L && !ge && (q == null ? void 0 : q.rowId) === n && (q == null ? void 0 : q.columnKey) === o.key, se = !!(O != null && O.inRange) && L && !ge, xe = se && O ? zn(O.edges) : void 0, j = ut(o);
909
910
  return /* @__PURE__ */ c(
910
911
  m.Cell,
911
912
  {
@@ -913,7 +914,7 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
913
914
  stickyOffset: o.stickyOffset,
914
915
  style: {
915
916
  ...j,
916
- ...ge ? { boxShadow: ge } : null
917
+ ...xe ? { boxShadow: xe } : null
917
918
  },
918
919
  "data-grid-cell": "",
919
920
  "data-grid-row-id": n,
@@ -922,16 +923,19 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
922
923
  className: x(
923
924
  "relative overflow-x-hidden",
924
925
  // Uncontrolled single-cell highlight (legacy).
925
- Ye && "z-1 outline-hidden ring-2 ring-inset ring-brand after:opacity-0",
926
+ Ae && "z-1 outline-hidden ring-2 ring-inset ring-brand after:opacity-0",
926
927
  // Controlled range: fill all selected cells except the anchor; perimeter via boxShadow.
927
- ie && "z-1 outline-hidden after:opacity-0",
928
- ie && O && !O.isAnchor && "bg-utility-brand-25",
928
+ se && "z-1 outline-hidden after:opacity-0",
929
+ se && O && !O.isAnchor && "bg-utility-brand-25",
930
+ // Row heights are minimums on <tr>, so wrapped rows grow; `renderRowCell`
931
+ // content must not truncate itself for wrapping to show.
932
+ (Q == null ? void 0 : Q.has(o.key)) && "whitespace-normal break-words",
929
933
  o.cellClassName,
930
- cn(we),
934
+ dn(me),
931
935
  b
932
936
  ),
933
937
  children: (() => {
934
- const Vt = Ht === 0 && (i || et) ? /* @__PURE__ */ S("div", { className: "flex items-center", children: [
938
+ const Jt = Vt === 0 && (i || tt) ? /* @__PURE__ */ S("div", { className: "flex items-center", children: [
935
939
  I && /* @__PURE__ */ c(
936
940
  "div",
937
941
  {
@@ -941,14 +945,14 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
941
945
  onContextMenu: (B) => B.stopPropagation(),
942
946
  onKeyDown: (B) => B.stopPropagation(),
943
947
  children: /* @__PURE__ */ c(
944
- An,
948
+ Bn,
945
949
  {
946
950
  config: I,
947
951
  sourceRowIndex: a,
948
952
  item: e,
949
- enableDrag: tt,
953
+ enableDrag: rt,
950
954
  isDragging: v,
951
- onDragHandlePointerDown: (B) => Xr(
955
+ onDragHandlePointerDown: (B) => $r(
952
956
  B,
953
957
  n,
954
958
  a,
@@ -965,23 +969,23 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
965
969
  )
966
970
  }
967
971
  ),
968
- /* @__PURE__ */ c("div", { className: "flex-1 min-w-0", children: gt(o.key, e[o.key], e) })
969
- ] }) : gt(o.key, e[o.key], e);
972
+ /* @__PURE__ */ c("div", { className: "flex-1 min-w-0", children: xt(o.key, e[o.key], e) })
973
+ ] }) : xt(o.key, e[o.key], e);
970
974
  return L ? /* @__PURE__ */ c(
971
975
  "div",
972
976
  {
973
977
  "data-grid-focus": !0,
974
978
  tabIndex: -1,
975
979
  className: "outline-hidden",
976
- children: Vt
980
+ children: Jt
977
981
  }
978
- ) : Vt;
982
+ ) : Jt;
979
983
  })()
980
984
  },
981
985
  o.key
982
986
  );
983
987
  }),
984
- T && z && /* @__PURE__ */ c(
988
+ C && z && /* @__PURE__ */ c(
985
989
  m.Cell,
986
990
  {
987
991
  "data-grid-no-range": "",
@@ -997,7 +1001,7 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
997
1001
  onClick: (o) => {
998
1002
  o.stopPropagation(), z.onDeleteRow(a);
999
1003
  },
1000
- children: /* @__PURE__ */ c(Bn, { name: "Trash02", className: "size-3" })
1004
+ children: /* @__PURE__ */ c(Xn, { name: "Trash02", className: "size-3" })
1001
1005
  }
1002
1006
  )
1003
1007
  }
@@ -1006,12 +1010,12 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
1006
1010
  },
1007
1011
  n
1008
1012
  );
1009
- }, Vr = (e) => /* @__PURE__ */ S(
1013
+ }, Jr = (e) => /* @__PURE__ */ S(
1010
1014
  m.Row,
1011
1015
  {
1012
1016
  id: String(e.id),
1013
1017
  isExpandable: !1,
1014
- className: x(Rt && "[&>td]:after:hidden", Wt),
1018
+ className: x(vt && "[&>td]:after:hidden", Wt),
1015
1019
  children: [
1016
1020
  U && /* @__PURE__ */ c(
1017
1021
  m.Cell,
@@ -1025,17 +1029,17 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
1025
1029
  {
1026
1030
  sticky: t.sticky,
1027
1031
  stickyOffset: t.stickyOffset,
1028
- style: lt(t),
1032
+ style: ut(t),
1029
1033
  className: x(
1030
1034
  "overflow-x-hidden text-left",
1031
1035
  t.cellClassName,
1032
1036
  b
1033
1037
  ),
1034
- children: /* @__PURE__ */ c(Xn, { height: "14px", width: "75%", className: "rounded" })
1038
+ children: /* @__PURE__ */ c($n, { height: "14px", width: "75%", className: "rounded" })
1035
1039
  },
1036
1040
  t.key
1037
1041
  )),
1038
- T && /* @__PURE__ */ c(
1042
+ C && /* @__PURE__ */ c(
1039
1043
  m.Cell,
1040
1044
  {
1041
1045
  className: x("w-14", b),
@@ -1045,53 +1049,53 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
1045
1049
  ]
1046
1050
  },
1047
1051
  String(e.id)
1048
- ), Jr = () => X ? Fe.map((e) => Vr(e)) : Ce && V ? V.flatMap((e) => {
1049
- const t = Se.has(e.key);
1052
+ ), Qr = () => X ? Oe.map((e) => Jr(e)) : Fe && V ? V.flatMap((e) => {
1053
+ const t = Ce.has(e.key);
1050
1054
  return [
1051
- Hr(e),
1055
+ Vr(e),
1052
1056
  ...t ? [] : e.rows.map(
1053
- (r, i) => jt(r, void 0, i)
1057
+ (r, i) => Zt(r, void 0, i)
1054
1058
  )
1055
1059
  ];
1056
- }) : Fe.map(
1057
- (e, t) => jt(e, void 0, t)
1058
- ), Zt = /* @__PURE__ */ c(
1059
- tn.Root,
1060
+ }) : Oe.map(
1061
+ (e, t) => Zt(e, void 0, t)
1062
+ ), qt = /* @__PURE__ */ c(
1063
+ rn.Root,
1060
1064
  {
1061
- ref: Yr,
1062
- onKeyDownCapture: L ? Mr : void 0,
1063
- onPointerDownCapture: y ? jr : void 0,
1064
- onDoubleClickCapture: y ? $r : void 0,
1065
+ ref: Ar,
1066
+ onKeyDownCapture: L ? Ur : void 0,
1067
+ onPointerDownCapture: y ? Zr : void 0,
1068
+ onDoubleClickCapture: y ? jr : void 0,
1065
1069
  className: x(
1066
1070
  "w-full",
1067
- !W || Xt ? "overflow-x-auto" : "overflow-x-hidden",
1068
- Ie && "border border-secondary rounded-xl",
1071
+ !D || $t ? "overflow-x-auto" : "overflow-x-hidden",
1072
+ Le && "border border-secondary rounded-xl",
1069
1073
  "[&_tr:hover>td]:!bg-secondary_subtle",
1070
- hr
1074
+ yr
1071
1075
  ),
1072
- size: xt,
1076
+ size: Rt,
1073
1077
  children: /* @__PURE__ */ S(
1074
1078
  m,
1075
1079
  {
1076
- "data-table-zoom-typography": Pe !== void 0 ? "" : void 0,
1077
- "aria-label": ur,
1078
- size: xt,
1080
+ "data-table-zoom-typography": Se !== void 0 ? "" : void 0,
1081
+ "aria-label": fr,
1082
+ size: Rt,
1079
1083
  isEditable: L,
1080
- inlineSelection: ke,
1084
+ inlineSelection: Ee,
1081
1085
  className: x(
1082
- W && "min-w-full",
1083
- mr
1086
+ D && "min-w-full",
1087
+ gr
1084
1088
  ),
1085
- style: Ur,
1086
- ...Ar,
1089
+ style: Yr,
1090
+ ...Br,
1087
1091
  children: [
1088
1092
  /* @__PURE__ */ S(
1089
1093
  m.Header,
1090
1094
  {
1091
1095
  className: x(
1092
1096
  "sticky top-0 z-20",
1093
- Ie && "[&>tr>th:first-child]:rounded-bl-none [&>tr>th:last-child]:rounded-br-none",
1094
- yr
1097
+ Le && "[&>tr>th:first-child]:rounded-bl-none [&>tr>th:last-child]:rounded-br-none",
1098
+ wr
1095
1099
  ),
1096
1100
  children: [
1097
1101
  U && /* @__PURE__ */ c(
@@ -1103,11 +1107,11 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
1103
1107
  style: { minWidth: "40px", width: "40px" },
1104
1108
  className: x(b),
1105
1109
  headerCellClass: "justify-center",
1106
- children: oe === "multiple" && D && /* @__PURE__ */ c("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ c(
1107
- sr,
1110
+ children: ae === "multiple" && W && /* @__PURE__ */ c("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ c(
1111
+ or,
1108
1112
  {
1109
- checked: ft ? !0 : Zr && !ft ? "indeterminate" : !1,
1110
- onCheckedChange: () => qr(),
1113
+ checked: pt ? !0 : qr && !pt ? "indeterminate" : !1,
1114
+ onCheckedChange: () => Kr(),
1111
1115
  "aria-label": "Select all rows",
1112
1116
  className: "items-center justify-center"
1113
1117
  }
@@ -1116,11 +1120,11 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
1116
1120
  "selection"
1117
1121
  ),
1118
1122
  f.map((e, t) => {
1119
- const r = kr ? Tr.get(e.key) : void 0, i = Ot.get(e.key), n = cr(
1123
+ const r = Er ? Tr.get(e.key) : void 0, i = zt.get(e.key), n = dr(
1120
1124
  e.key,
1121
1125
  J,
1122
1126
  i
1123
- ), a = pr.includes(e.key) || n === "center" ? "justify-center" : n === "right" ? "justify-end" : "";
1127
+ ), a = hr.includes(e.key) || n === "center" ? "justify-center" : n === "right" ? "justify-end" : "";
1124
1128
  return /* @__PURE__ */ c(
1125
1129
  m.Head,
1126
1130
  {
@@ -1131,34 +1135,35 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
1131
1135
  isRowHeader: t === 0,
1132
1136
  allowsSorting: e.allowsSorting,
1133
1137
  headerCellClass: `${e.headerCellClass} ${a}`,
1134
- style: lt(e),
1138
+ style: ut(e),
1135
1139
  className: x(
1136
1140
  "overflow-hidden",
1137
1141
  e.headClassName,
1138
1142
  b
1139
1143
  ),
1140
- headerAction: r && _e ? /* @__PURE__ */ c(
1141
- Mn,
1144
+ headerAction: r && Pe ? /* @__PURE__ */ c(
1145
+ Un,
1142
1146
  {
1143
1147
  column: r,
1144
- columnLabel: r.label ?? (i ? an(i, Ir) : e.label),
1145
- currentAlignment: i ? dr(
1148
+ columnLabel: r.label ?? (i ? cn(i, Lr) : e.label),
1149
+ currentAlignment: i ? lr(
1146
1150
  i,
1147
1151
  J ?? /* @__PURE__ */ new Map()
1148
1152
  ) : (J == null ? void 0 : J.get(e.key)) ?? "left",
1149
- capabilities: Er,
1153
+ textWrapped: (Q == null ? void 0 : Q.has(e.key)) ?? !1,
1154
+ capabilities: Ir,
1150
1155
  hideDisabled: f.length <= 1,
1151
- onAction: Gr.get(e.key),
1152
- renderExtraItems: Lr,
1156
+ onAction: Mr.get(e.key),
1157
+ renderExtraItems: br,
1153
1158
  showOnHeaderHover: !0
1154
1159
  }
1155
1160
  ) : void 0,
1156
- children: (Xe == null ? void 0 : Xe(e.key)) ?? null
1161
+ children: ($e == null ? void 0 : $e(e.key)) ?? null
1157
1162
  },
1158
1163
  e.key
1159
1164
  );
1160
1165
  }),
1161
- T && /* @__PURE__ */ c(
1166
+ C && /* @__PURE__ */ c(
1162
1167
  m.Head,
1163
1168
  {
1164
1169
  label: "",
@@ -1173,8 +1178,8 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
1173
1178
  }
1174
1179
  ),
1175
1180
  /* @__PURE__ */ S(m.Body, { children: [
1176
- !Yt && Jr(),
1177
- Or && /* @__PURE__ */ c(
1181
+ !At && Qr(),
1182
+ zr && /* @__PURE__ */ c(
1178
1183
  m.Row,
1179
1184
  {
1180
1185
  id: "empty-state",
@@ -1182,18 +1187,18 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
1182
1187
  children: /* @__PURE__ */ c(
1183
1188
  m.Cell,
1184
1189
  {
1185
- colSpan: ye,
1190
+ colSpan: we,
1186
1191
  className: x(
1187
1192
  "text-left text-placeholder_subtle border-b border-secondary py-3",
1188
1193
  b
1189
1194
  ),
1190
- children: Lt
1195
+ children: bt
1191
1196
  }
1192
1197
  )
1193
1198
  },
1194
1199
  "empty-state"
1195
1200
  ),
1196
- it && z && /* @__PURE__ */ S(
1201
+ st && z && /* @__PURE__ */ S(
1197
1202
  m.Row,
1198
1203
  {
1199
1204
  id: "add-row-footer",
@@ -1202,10 +1207,10 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
1202
1207
  /* @__PURE__ */ c(
1203
1208
  m.Cell,
1204
1209
  {
1205
- colSpan: ye - (T ? 1 : 0),
1210
+ colSpan: we - (C ? 1 : 0),
1206
1211
  className: x(b),
1207
1212
  children: /* @__PURE__ */ c(
1208
- Un,
1213
+ Yn,
1209
1214
  {
1210
1215
  color: "tertiary",
1211
1216
  className: "bg-secondary text-primary",
@@ -1216,7 +1221,7 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
1216
1221
  )
1217
1222
  }
1218
1223
  ),
1219
- T && /* @__PURE__ */ c(
1224
+ C && /* @__PURE__ */ c(
1220
1225
  m.Cell,
1221
1226
  {
1222
1227
  className: x("w-14", b),
@@ -1227,13 +1232,13 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
1227
1232
  },
1228
1233
  "add-row-footer"
1229
1234
  ),
1230
- zr && Ze && /* @__PURE__ */ c(
1231
- Yn,
1235
+ Gr && qe && /* @__PURE__ */ c(
1236
+ An,
1232
1237
  {
1233
- ...Ze,
1234
- hasActionsColumn: T,
1238
+ ...qe,
1239
+ hasActionsColumn: C,
1235
1240
  hasSelectionColumn: U,
1236
- showBorders: !!Ie
1241
+ showBorders: !!Le
1237
1242
  }
1238
1243
  )
1239
1244
  ] })
@@ -1241,20 +1246,20 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
1241
1246
  }
1242
1247
  )
1243
1248
  }
1244
- ), qt = L ? /* @__PURE__ */ c(
1245
- gn,
1249
+ ), Kt = L ? /* @__PURE__ */ c(
1250
+ xn,
1246
1251
  {
1247
1252
  rowIds: R,
1248
1253
  columnKeys: Y,
1249
1254
  containerRef: g,
1250
- onSelectCell: st,
1251
- onEditingCellChange: Sr,
1252
- children: Zt
1255
+ onSelectCell: ot,
1256
+ onEditingCellChange: Cr,
1257
+ children: qt
1253
1258
  }
1254
- ) : Zt, Kt = p != null && p.active ? /* @__PURE__ */ S(Jt, { children: [
1255
- /* @__PURE__ */ c(Ln, { session: p }),
1259
+ ) : qt, Ht = p != null && p.active ? /* @__PURE__ */ S(Qt, { children: [
1260
+ /* @__PURE__ */ c(bn, { session: p }),
1256
1261
  p.dropLineY != null && /* @__PURE__ */ c(
1257
- bn,
1262
+ Nn,
1258
1263
  {
1259
1264
  y: p.dropLineY,
1260
1265
  left: p.dropLineLeft,
@@ -1262,11 +1267,11 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
1262
1267
  }
1263
1268
  )
1264
1269
  ] }) : null;
1265
- return Fr ? /* @__PURE__ */ S("div", { className: "flex flex-col gap-3", children: [
1266
- Mt && Gt,
1267
- qt,
1268
- Ut && _ && /* @__PURE__ */ c(
1269
- rn,
1270
+ return Or ? /* @__PURE__ */ S("div", { className: "flex flex-col gap-3", children: [
1271
+ Ut && Mt,
1272
+ Kt,
1273
+ Yt && _ && /* @__PURE__ */ c(
1274
+ nn,
1270
1275
  {
1271
1276
  currentPage: _.currentPage,
1272
1277
  pageSize: _.pageSize,
@@ -1277,13 +1282,13 @@ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s)
1277
1282
  showPagination: _.showPagination
1278
1283
  }
1279
1284
  ),
1280
- Kt
1281
- ] }) : /* @__PURE__ */ S(Jt, { children: [
1282
- qt,
1283
- Kt
1285
+ Ht
1286
+ ] }) : /* @__PURE__ */ S(Qt, { children: [
1287
+ Kt,
1288
+ Ht
1284
1289
  ] });
1285
1290
  }
1286
1291
  );
1287
1292
  export {
1288
- bi as TableWrapper
1293
+ Ni as TableWrapper
1289
1294
  };