@pibit.ai/cure-design-system 0.3.48 → 0.3.50

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