@pibit.ai/cure-design-system 0.6.5 → 0.6.6

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.
@@ -1,5 +1,5 @@
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";
1
+ import { jsx as c, jsxs as P, Fragment as Qt } from "react/jsx-runtime";
2
+ import { forwardRef as en, useRef as oe, useState as K, useMemo as E, useCallback as I, useEffect as Z, useLayoutEffect as er } from "react";
3
3
  import { ChevronRight as tn } from "@untitledui/icons";
4
4
  import { cx as x } from "../../utils/cn.js";
5
5
  import { TableCard as rn, Table as m } from "./table.js";
@@ -11,8 +11,8 @@ import { getEffectiveAlignment as lr, resolveColumnLabel as cn, alignmentClass a
11
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
12
  import { findGridCell as rr, isWithinCellEditor as Be, getGridNeighbor as mn, getGridTabNeighbor as gn, focusGridCell as nr, GridNavProvider as xn } from "./useGridKeyboardNavigation.js";
13
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";
14
+ import { ROW_DRAG_THRESHOLD_PX as vn, computeDropTarget as En, clipDropLineToScrollport as In, ROW_REORDER_ATTR as ir, measureRowPreview as kn, cloneRowForPreview as Ln, FloatingRowPreview as bn, DropIndicatorLine as Nn, getRowDragScrollDelta as Dn, ROW_DRAG_SOURCE_STYLE as Wn, ROW_SOURCE_INDEX_ATTR as Sn } from "./rowReorderDrag.js";
15
+ import { selectionFromSingleCell as wt, resolveCellCoordFromElement as Xe, resolveRowAnchorCoordFromTarget as _n, buildCellRangeRect as mt, nextKeyboardCellSelection as Pn, 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
16
  import { BulkActionBar as Gn } from "./toolbar/BulkActionBar.js";
17
17
  import { TableToolbar as Mn } from "./toolbar/TableToolbar.js";
18
18
  import { Checkbox as or } from "../../primitives/checkbox/checkbox.js";
@@ -65,7 +65,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
65
65
  data: u,
66
66
  columns: f,
67
67
  renderRowCell: xt,
68
- onRowClick: ke,
68
+ onRowClick: Ee,
69
69
  onRowHover: H,
70
70
  arialabel: fr,
71
71
  size: Rt = "sm",
@@ -74,23 +74,23 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
74
74
  rootClassName: yr,
75
75
  removeBorders: vt,
76
76
  headerClassName: wr,
77
- isRowExpandable: kt,
77
+ isRowExpandable: Et,
78
78
  renderExpandedContent: mr,
79
79
  loading: X = !1,
80
- loadingRowCount: Et = Zn,
80
+ loadingRowCount: It = Zn,
81
81
  renderHeaderCell: $e,
82
82
  tableClassName: gr,
83
83
  getRowClassName: je,
84
84
  selectionMode: ae = "none",
85
85
  selectedKeys: T,
86
86
  onSelectionChange: W,
87
- inlineSelection: Ee = !1,
87
+ inlineSelection: Ie = !1,
88
88
  toolbar: d,
89
89
  showToolbar: xr,
90
- toolbarTitle: It,
90
+ toolbarTitle: kt,
91
91
  toolbarTrailing: Lt,
92
- disableExtendedTools: Ie,
93
- pagination: _,
92
+ disableExtendedTools: ke,
93
+ pagination: S,
94
94
  showBorders: Le,
95
95
  emptyState: bt,
96
96
  editChrome: z,
@@ -101,26 +101,26 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
101
101
  toolbarSlot: Ze,
102
102
  rowHeightClass: Wt,
103
103
  groupedData: V,
104
- showSummaryFooter: kr,
104
+ showSummaryFooter: Er,
105
105
  summaryFooterProps: qe,
106
106
  bulkActionBar: be,
107
107
  renderBulkActionBar: Ne,
108
108
  onBulkDuplicate: De,
109
109
  onBulkDelete: We,
110
- bulkActionBusy: _e,
110
+ bulkActionBusy: Se,
111
111
  columnAlignments: J,
112
112
  columnTextWrap: Q,
113
- onColumnHeaderAction: Pe,
114
- showColumnHeaderMenu: Er,
115
- columnMenuCapabilities: Ir,
116
- renderGroupHeader: _t,
113
+ onColumnHeaderAction: _e,
114
+ showColumnHeaderMenu: Ir,
115
+ columnMenuCapabilities: kr,
116
+ renderGroupHeader: St,
117
117
  columnMenuSchema: ce,
118
118
  columnSchema: de,
119
119
  labelMeta: Lr,
120
120
  renderColumnHeaderMenuExtraItems: br,
121
121
  fillWidth: Nr = !1,
122
122
  zoom: Dr,
123
- rowActions: I,
123
+ rowActions: k,
124
124
  onCellActivate: ee,
125
125
  cellSelection: w = null,
126
126
  onCellSelectionChange: N,
@@ -128,12 +128,12 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
128
128
  onPasteCells: He,
129
129
  onClearCells: Ve
130
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
+ const { zoomConfig: G, zoomPercent: ue, setZoomPercent: _t } = an(Dr), F = G !== null && jn, fe = ue / 100, Pe = F ? yn(ue) : void 0, D = Nr, g = oe(null), [pe, Pt] = K(null), Wr = on({
132
132
  containerRef: g,
133
133
  zoomConfig: G,
134
134
  zoomPercent: ue,
135
- setZoomPercent: Pt
136
- }), te = k(() => {
135
+ setZoomPercent: _t
136
+ }), te = E(() => {
137
137
  if (!D) return null;
138
138
  const e = f.reduce(
139
139
  (i, n) => ve(n) ? i + yt(gt(n)) : i,
@@ -147,21 +147,21 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
147
147
  ),
148
148
  0
149
149
  ) + e };
150
- }, [f, D, F]), Ct = (G == null ? void 0 : G.minZoom) ?? un, [Ce, _r] = K(
150
+ }, [f, D, F]), Ct = (G == null ? void 0 : G.minZoom) ?? un, [Ce, Sr] = K(
151
151
  () => /* @__PURE__ */ new Set()
152
- ), [Pr, Tt] = K(
152
+ ), [_r, Tt] = K(
153
153
  null
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(
154
+ ), [p, Pr] = K(null), M = oe(null), Je = oe({ x: 0, y: 0 }), re = I((e) => {
155
+ M.current = e, Pr(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 = !!k, U = Te && !Ie, Fe = ei(V), rt = !!(k != null && k.onReorderRows) && (k == null ? void 0 : k.enableRowReorder) !== !1 && !Fe && !X, Tr = E(() => ce != null && ce.length ? new Map(ce.map((e) => [e.key, e])) : /* @__PURE__ */ new Map(), [ce]), zt = E(() => de != null && de.length ? new Map(de.map((e) => [e.value, e])) : /* @__PURE__ */ new Map(), [de]), Y = E(
157
157
  () => f.map((e) => e.key),
158
158
  [f]
159
- ), Fr = E((e) => {
160
- _r((t) => {
159
+ ), Fr = I((e) => {
160
+ Sr((t) => {
161
161
  const r = new Set(t);
162
162
  return r.has(e) ? r.delete(e) : r.add(e), r;
163
163
  });
164
- }, []), Oe = k(() => X ? Array.from({ length: Et }, (e, t) => ({
164
+ }, []), Oe = E(() => X ? Array.from({ length: It }, (e, t) => ({
165
165
  id: `loading-${t}`
166
166
  })) : u.map((e) => {
167
167
  const t = e;
@@ -169,12 +169,12 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
169
169
  return t;
170
170
  const r = Re(t);
171
171
  return t.id != null && String(t.id) === r ? t : { ...t, id: r };
172
- }), [X, u, Et]), R = k(() => X ? [] : Fe && V ? V.flatMap(
172
+ }), [X, u, It]), R = E(() => X ? [] : Fe && V ? V.flatMap(
173
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(
174
+ ) : Oe.map((e) => Re(e)), [X, Fe, V, Ce, Oe]), he = E(
175
175
  () => cr(T, R),
176
176
  [T, R]
177
- ), nt = Hn(T, R), it = nt > 0, Gt = it && !!(be ?? Ne ?? De ?? We), ye = k(() => {
177
+ ), nt = Hn(T, R), it = nt > 0, Gt = it && !!(be ?? Ne ?? De ?? We), ye = E(() => {
178
178
  if (!it) return;
179
179
  const e = u.filter(
180
180
  (t) => he.has(Re(t))
@@ -183,15 +183,15 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
183
183
  selectedKeys: he,
184
184
  selectedRows: e,
185
185
  clearSelection: () => W == null ? void 0 : W(/* @__PURE__ */ new Set()),
186
- busy: _e
186
+ busy: Se
187
187
  };
188
188
  }, [
189
189
  it,
190
190
  he,
191
191
  u,
192
192
  W,
193
- _e
194
- ]), Mt = k(() => {
193
+ Se
194
+ ]), Mt = E(() => {
195
195
  if (Ze != null) return Ze;
196
196
  if (Gt) {
197
197
  if (be != null) return be;
@@ -205,7 +205,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
205
205
  onDuplicate: De,
206
206
  onDelete: We,
207
207
  onClearSelection: ye.clearSelection,
208
- busy: _e
208
+ busy: Se
209
209
  }
210
210
  );
211
211
  }
@@ -216,9 +216,9 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
216
216
  minValue: Ct,
217
217
  maxValue: G.maxZoom,
218
218
  step: G.step,
219
- onChange: Pt,
219
+ onChange: _t,
220
220
  onFitToViewport: Wr,
221
- isDisabled: Ie
221
+ isDisabled: ke
222
222
  }
223
223
  ) : null, t = Lt;
224
224
  return !d && !t && !e ? null : /* @__PURE__ */ c(
@@ -235,15 +235,15 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
235
235
  sortContent: d == null ? void 0 : d.sortContent,
236
236
  filterContent: d == null ? void 0 : d.filterContent,
237
237
  views: d == null ? void 0 : d.views,
238
- fallbackTitle: It,
238
+ fallbackTitle: kt,
239
239
  beforeSearch: e,
240
240
  trailing: t,
241
241
  searchCollapsible: Nt,
242
- disableExtendedTools: Ie,
242
+ disableExtendedTools: ke,
243
243
  isEditMode: Dt,
244
244
  undoRedo: d != null && d.undoRedo ? {
245
245
  ...d.undoRedo,
246
- isDisabled: d.undoRedo.isDisabled ?? Ie
246
+ isDisabled: d.undoRedo.isDisabled ?? ke
247
247
  } : void 0
248
248
  }
249
249
  );
@@ -255,27 +255,27 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
255
255
  ye,
256
256
  De,
257
257
  We,
258
- _e,
258
+ Se,
259
259
  nt,
260
260
  d,
261
- It,
261
+ kt,
262
262
  Lt,
263
263
  Nt,
264
264
  Dt,
265
- Ie,
265
+ ke,
266
266
  G,
267
267
  F,
268
268
  ue,
269
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
+ ]), Ut = Mt != null && xr !== !1, Yt = !!S && (S == null ? void 0 : S.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 = !!(Er && qe), b = Le ? "border-r border-secondary last:border-r-0" : void 0, Mr = E(() => {
271
271
  const e = /* @__PURE__ */ new Map();
272
- return Pe && f.forEach((t) => {
272
+ return _e && f.forEach((t) => {
273
273
  e.set(
274
274
  t.key,
275
- (r) => Pe(t.key, r)
275
+ (r) => _e(t.key, r)
276
276
  );
277
277
  }), e;
278
- }, [f, Pe]), ot = E(
278
+ }, [f, _e]), ot = I(
279
279
  (e, t, r) => {
280
280
  var a;
281
281
  let i = r ?? null;
@@ -299,31 +299,31 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
299
299
  Ft(n);
300
300
  },
301
301
  [y, N]
302
- ), ze = E(() => {
302
+ ), ze = I(() => {
303
303
  if (y) {
304
304
  N == null || N(null);
305
305
  return;
306
306
  }
307
307
  Ft(null);
308
- }, [y, N]), P = y ? (w == null ? void 0 : w.focus) ?? null : q, A = E(
308
+ }, [y, N]), _ = y ? (w == null ? void 0 : w.focus) ?? null : q, A = I(
309
309
  (e) => {
310
310
  y && (N == null || N(e));
311
311
  },
312
312
  [y, N]
313
- ), Ur = E(
313
+ ), Ur = I(
314
314
  (e) => {
315
315
  var Ae, se, xe;
316
316
  const t = e.key in ar;
317
317
  if (e.key !== "Enter" && e.key !== "Tab" && e.key !== "Escape" && e.key !== "Delete" && e.key !== "Backspace" && !t || Be(e.target)) return;
318
318
  if (e.key === "Escape") {
319
- if (!P && !w) return;
319
+ if (!_ && !w) return;
320
320
  e.preventDefault(), e.stopPropagation(), ze(), (Ae = g.current) != null && Ae.contains(document.activeElement) && document.activeElement.blur();
321
321
  return;
322
322
  }
323
323
  const r = (xe = (se = e.target).closest) == null ? void 0 : xe.call(
324
324
  se,
325
325
  "[data-grid-cell]"
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
+ ), i = r ? Xe(r) : null, n = y && t && e.shiftKey && !_ && !i ? _n(e.target, g.current) : null, a = n != null && he.has(n.rowId), l = _ ?? i ?? (a ? n : null);
327
327
  if (!l) return;
328
328
  if (e.key === "Delete" || e.key === "Backspace") {
329
329
  if (!y || !w || !Ve) return;
@@ -375,7 +375,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
375
375
  sourceIndex: o.sourceIndex
376
376
  } : null, me = a ? null : ht, ge = me ? v : null;
377
377
  if (et.current = ge, y) {
378
- const j = Sn(
378
+ const j = Pn(
379
379
  l,
380
380
  me,
381
381
  w,
@@ -394,7 +394,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
394
394
  );
395
395
  },
396
396
  [
397
- P,
397
+ _,
398
398
  R,
399
399
  y,
400
400
  w,
@@ -408,14 +408,14 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
408
408
  ]
409
409
  );
410
410
  Z(() => {
411
- if (!L || !P && !w) return;
411
+ if (!L || !_ && !w) return;
412
412
  const e = (t) => {
413
413
  const r = g.current;
414
414
  r && !r.contains(t.target) && ze();
415
415
  };
416
416
  return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
417
- }, [L, P, w, ze]);
418
- const at = (P == null ? void 0 : P.rowId) ?? null, ct = (P == null ? void 0 : P.columnKey) ?? null;
417
+ }, [L, _, w, ze]);
418
+ const at = (_ == null ? void 0 : _.rowId) ?? null, ct = (_ == null ? void 0 : _.columnKey) ?? null;
419
419
  er(() => {
420
420
  if (!L || ie || !at || !ct) return;
421
421
  const e = rr(
@@ -425,21 +425,21 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
425
425
  );
426
426
  e && Rn(e, { dir: et.current });
427
427
  }, [L, ie, at, ct]);
428
- const Bt = k(() => {
428
+ const Bt = E(() => {
429
429
  let e = 0;
430
430
  return U && (e += 40), C && (e += 56), f.forEach((t) => {
431
431
  ve(t) && (e += yt(gt(t)));
432
432
  }), e;
433
- }, [f, C, U]), Xt = k(
433
+ }, [f, C, U]), Xt = E(
434
434
  () => f.filter((e) => !ve(e)).length,
435
435
  [f]
436
- ), dt = k(
436
+ ), dt = E(
437
437
  () => D && te ? fn(pe, te.minTableWidth) : null,
438
438
  [pe, D, te]
439
- ), $t = D && wn(dt, pe, fe), Ge = k(
439
+ ), $t = D && wn(dt, pe, fe), Ge = E(
440
440
  () => pn(dt, pe, fe),
441
441
  [dt, pe, fe]
442
- ), lt = k(
442
+ ), lt = E(
443
443
  () => hn(
444
444
  Ge,
445
445
  Bt,
@@ -449,14 +449,14 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
449
449
  );
450
450
  er(() => {
451
451
  if (!D) {
452
- St(null);
452
+ Pt(null);
453
453
  return;
454
454
  }
455
455
  const e = g.current;
456
456
  if (!e) return;
457
457
  const t = () => {
458
458
  const i = e.clientWidth;
459
- i > 0 && St((n) => n === i ? n : i);
459
+ i > 0 && Pt((n) => n === i ? n : i);
460
460
  };
461
461
  t();
462
462
  const r = new ResizeObserver(t);
@@ -471,7 +471,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
471
471
  C,
472
472
  U
473
473
  ]);
474
- const ut = E(
474
+ const ut = I(
475
475
  (e) => {
476
476
  if (!D)
477
477
  return ti(e);
@@ -486,10 +486,10 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
486
486
  } : { minWidth: t, maxWidth: n };
487
487
  },
488
488
  [D, lt, F]
489
- ), Yr = k(() => {
489
+ ), Yr = E(() => {
490
490
  const e = F ? {
491
491
  zoom: fe,
492
- "--table-zoom-font-size": Se ? `${Se}px` : void 0
492
+ "--table-zoom-font-size": Pe ? `${Pe}px` : void 0
493
493
  } : void 0;
494
494
  return !D || !te ? F ? { ...e, width: "max-content", minWidth: "100%" } : void 0 : {
495
495
  ...e,
@@ -505,28 +505,28 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
505
505
  Ge,
506
506
  F,
507
507
  fe,
508
- Se
509
- ]), Ar = E(
508
+ Pe
509
+ ]), Ar = I(
510
510
  (e) => {
511
511
  g.current = e, typeof le == "function" ? le(e) : le && (le.current = e);
512
512
  },
513
513
  [le]
514
- ), Br = Te && Ee ? {
514
+ ), Br = Te && Ie ? {
515
515
  selectionMode: ae,
516
516
  selectedKeys: T === "all" ? "all" : T,
517
517
  onSelectionChange: Qn(W)
518
518
  } : {}, Xr = (e, t = 0) => {
519
519
  const r = e.__sourceIndex;
520
520
  return typeof r == "number" ? r : t;
521
- }, Me = E(
521
+ }, Me = I(
522
522
  (e) => {
523
523
  const t = M.current;
524
524
  if (!t) return;
525
525
  const { fromSourceIndex: r, toSourceIndex: i, item: n, active: a } = t;
526
- re(null), e && a && r !== i && (I != null && I.onReorderRows) && I.onReorderRows(r, i, n);
526
+ re(null), e && a && r !== i && (k != null && k.onReorderRows) && k.onReorderRows(r, i, n);
527
527
  },
528
- [I, re]
529
- ), Ue = E(
528
+ [k, re]
529
+ ), Ue = I(
530
530
  (e, t) => {
531
531
  const r = M.current;
532
532
  if (!r) return;
@@ -542,7 +542,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
542
542
  r.active || Tt(null);
543
543
  const v = g.current;
544
544
  if (v) {
545
- const o = kn(
545
+ const o = En(
546
546
  v,
547
547
  t,
548
548
  r.fromSourceIndex,
@@ -552,7 +552,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
552
552
  ...h,
553
553
  toSourceIndex: o.toSourceIndex,
554
554
  // Clip to scrollport so the line never draws over the header / outside the card.
555
- dropLineY: En(
555
+ dropLineY: In(
556
556
  o.dropLineY,
557
557
  v
558
558
  ),
@@ -564,7 +564,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
564
564
  re(h);
565
565
  },
566
566
  [re]
567
- ), $r = E(
567
+ ), $r = I(
568
568
  (e, t, r, i) => {
569
569
  var v, o;
570
570
  if (!rt || e.button !== 0) return;
@@ -577,7 +577,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
577
577
  e.currentTarget.setPointerCapture(e.pointerId);
578
578
  } catch {
579
579
  }
580
- const a = In(n), l = Ln(n), h = ((o = n.closest("table")) == null ? void 0 : o.getBoundingClientRect()) ?? n.getBoundingClientRect();
580
+ const a = kn(n), l = Ln(n), h = ((o = n.closest("table")) == null ? void 0 : o.getBoundingClientRect()) ?? n.getBoundingClientRect();
581
581
  Je.current = { x: e.clientX, y: e.clientY }, re({
582
582
  rowId: t,
583
583
  fromSourceIndex: r,
@@ -632,7 +632,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
632
632
  };
633
633
  return e = requestAnimationFrame(t), () => cancelAnimationFrame(e);
634
634
  }, [p == null ? void 0 : p.active, Ue]);
635
- const Ye = E(
635
+ const Ye = I(
636
636
  (e, t) => {
637
637
  const r = $.current, i = g.current;
638
638
  if (!r || !i) return;
@@ -646,7 +646,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
646
646
  }));
647
647
  },
648
648
  [A]
649
- ), ft = E((e) => {
649
+ ), ft = I((e) => {
650
650
  const t = $.current;
651
651
  $.current = null, Ot(!1), t && requestAnimationFrame(
652
652
  () => nr(
@@ -655,7 +655,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
655
655
  t.focus.columnKey
656
656
  )
657
657
  );
658
- }, []), jr = E(
658
+ }, []), jr = I(
659
659
  (e) => {
660
660
  if (!y || !L || !ee || Be(e.target)) return;
661
661
  const t = sr(
@@ -671,7 +671,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
671
671
  }));
672
672
  },
673
673
  [y, A, L, ee]
674
- ), Zr = E(
674
+ ), Zr = I(
675
675
  (e) => {
676
676
  if (!y || !L || e.button !== 0 || M.current) return;
677
677
  const t = sr(
@@ -787,13 +787,13 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
787
787
  t ? r.add(e) : r.delete(e), W(r);
788
788
  }, Vr = (e) => {
789
789
  const t = Ce.has(e.key);
790
- return _t ? /* @__PURE__ */ c(
790
+ return St ? /* @__PURE__ */ c(
791
791
  m.Row,
792
792
  {
793
793
  id: `group-${e.key}`,
794
794
  highlightSelectedRow: !1,
795
795
  className: "bg-secondary_subtle hover:bg-secondary_subtle",
796
- children: /* @__PURE__ */ c(m.Cell, { colSpan: we, className: x(b), children: _t(e) })
796
+ children: /* @__PURE__ */ c(m.Cell, { colSpan: we, className: x(b), children: St(e) })
797
797
  },
798
798
  `group-${e.key}`
799
799
  ) : /* @__PURE__ */ c(
@@ -807,7 +807,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
807
807
  {
808
808
  colSpan: we,
809
809
  className: x("py-1.5", b),
810
- children: /* @__PURE__ */ S(
810
+ children: /* @__PURE__ */ P(
811
811
  "button",
812
812
  {
813
813
  type: "button",
@@ -825,7 +825,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
825
825
  }
826
826
  ),
827
827
  /* @__PURE__ */ c("span", { className: "truncate", children: e.label || "(Empty)" }),
828
- /* @__PURE__ */ S("span", { className: "text-tertiary", children: [
828
+ /* @__PURE__ */ P("span", { className: "text-tertiary", children: [
829
829
  "(",
830
830
  e.rows.length,
831
831
  ")"
@@ -839,13 +839,13 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
839
839
  `group-${e.key}`
840
840
  );
841
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;
843
- return /* @__PURE__ */ S(
842
+ const i = Et ? Et(e) : !1, n = Re(e), a = Xr(e, r), l = Kn(T, n, R), h = _r === n, v = (p == null ? void 0 : p.active) === !0 && p.rowId === n;
843
+ return /* @__PURE__ */ P(
844
844
  m.Row,
845
845
  {
846
846
  onAction: () => {
847
847
  var o;
848
- (o = M.current) != null && o.active || ke == null || ke(e);
848
+ (o = M.current) != null && o.active || Ee == null || Ee(e);
849
849
  },
850
850
  onMouseEnter: () => H == null ? void 0 : H(e, !0),
851
851
  onMouseLeave: () => H == null ? void 0 : H(e, !1),
@@ -854,12 +854,12 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
854
854
  columns: f,
855
855
  expandedColSpan: we,
856
856
  isExpandable: i,
857
- highlightSelectedRow: Ee,
857
+ highlightSelectedRow: Ie,
858
858
  renderExpandedContent: i ? mr : void 0,
859
859
  [ir]: n,
860
- [_n]: String(a),
860
+ [Sn]: String(a),
861
861
  className: x(
862
- ke && "cursor-pointer",
862
+ Ee && "cursor-pointer",
863
863
  pr ? "prose" : "",
864
864
  vt && "[&>td]:after:hidden",
865
865
  tt && "group/rowactions",
@@ -885,8 +885,8 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
885
885
  children: /* @__PURE__ */ c(
886
886
  or,
887
887
  {
888
- checked: l,
889
- onCheckedChange: (o) => Hr(n, o === !0),
888
+ isSelected: l,
889
+ onChange: (o) => Hr(n, o),
890
890
  "aria-label": `Select row ${n}`,
891
891
  className: "items-center justify-center"
892
892
  }
@@ -935,8 +935,8 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
935
935
  b
936
936
  ),
937
937
  children: (() => {
938
- const Jt = Vt === 0 && (i || tt) ? /* @__PURE__ */ S("div", { className: "flex items-center", children: [
939
- I && /* @__PURE__ */ c(
938
+ const Jt = Vt === 0 && (i || tt) ? /* @__PURE__ */ P("div", { className: "flex items-center", children: [
939
+ k && /* @__PURE__ */ c(
940
940
  "div",
941
941
  {
942
942
  "data-grid-no-range": "",
@@ -947,7 +947,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
947
947
  children: /* @__PURE__ */ c(
948
948
  Bn,
949
949
  {
950
- config: I,
950
+ config: k,
951
951
  sourceRowIndex: a,
952
952
  item: e,
953
953
  enableDrag: rt,
@@ -1010,7 +1010,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
1010
1010
  },
1011
1011
  n
1012
1012
  );
1013
- }, Jr = (e) => /* @__PURE__ */ S(
1013
+ }, Jr = (e) => /* @__PURE__ */ P(
1014
1014
  m.Row,
1015
1015
  {
1016
1016
  id: String(e.id),
@@ -1074,14 +1074,14 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
1074
1074
  yr
1075
1075
  ),
1076
1076
  size: Rt,
1077
- children: /* @__PURE__ */ S(
1077
+ children: /* @__PURE__ */ P(
1078
1078
  m,
1079
1079
  {
1080
- "data-table-zoom-typography": Se !== void 0 ? "" : void 0,
1080
+ "data-table-zoom-typography": Pe !== void 0 ? "" : void 0,
1081
1081
  "aria-label": fr,
1082
1082
  size: Rt,
1083
1083
  isEditable: L,
1084
- inlineSelection: Ee,
1084
+ inlineSelection: Ie,
1085
1085
  className: x(
1086
1086
  D && "min-w-full",
1087
1087
  gr
@@ -1089,7 +1089,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
1089
1089
  style: Yr,
1090
1090
  ...Br,
1091
1091
  children: [
1092
- /* @__PURE__ */ S(
1092
+ /* @__PURE__ */ P(
1093
1093
  m.Header,
1094
1094
  {
1095
1095
  className: x(
@@ -1110,8 +1110,9 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
1110
1110
  children: ae === "multiple" && W && /* @__PURE__ */ c("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ c(
1111
1111
  or,
1112
1112
  {
1113
- checked: pt ? !0 : qr && !pt ? "indeterminate" : !1,
1114
- onCheckedChange: () => Kr(),
1113
+ isSelected: pt,
1114
+ isIndeterminate: qr && !pt,
1115
+ onChange: () => Kr(),
1115
1116
  "aria-label": "Select all rows",
1116
1117
  className: "items-center justify-center"
1117
1118
  }
@@ -1120,7 +1121,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
1120
1121
  "selection"
1121
1122
  ),
1122
1123
  f.map((e, t) => {
1123
- const r = Er ? Tr.get(e.key) : void 0, i = zt.get(e.key), n = dr(
1124
+ const r = Ir ? Tr.get(e.key) : void 0, i = zt.get(e.key), n = dr(
1124
1125
  e.key,
1125
1126
  J,
1126
1127
  i
@@ -1141,7 +1142,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
1141
1142
  e.headClassName,
1142
1143
  b
1143
1144
  ),
1144
- headerAction: r && Pe ? /* @__PURE__ */ c(
1145
+ headerAction: r && _e ? /* @__PURE__ */ c(
1145
1146
  Un,
1146
1147
  {
1147
1148
  column: r,
@@ -1151,7 +1152,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
1151
1152
  J ?? /* @__PURE__ */ new Map()
1152
1153
  ) : (J == null ? void 0 : J.get(e.key)) ?? "left",
1153
1154
  textWrapped: (Q == null ? void 0 : Q.has(e.key)) ?? !1,
1154
- capabilities: Ir,
1155
+ capabilities: kr,
1155
1156
  hideDisabled: f.length <= 1,
1156
1157
  onAction: Mr.get(e.key),
1157
1158
  renderExtraItems: br,
@@ -1177,7 +1178,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
1177
1178
  ]
1178
1179
  }
1179
1180
  ),
1180
- /* @__PURE__ */ S(m.Body, { children: [
1181
+ /* @__PURE__ */ P(m.Body, { children: [
1181
1182
  !At && Qr(),
1182
1183
  zr && /* @__PURE__ */ c(
1183
1184
  m.Row,
@@ -1198,7 +1199,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
1198
1199
  },
1199
1200
  "empty-state"
1200
1201
  ),
1201
- st && z && /* @__PURE__ */ S(
1202
+ st && z && /* @__PURE__ */ P(
1202
1203
  m.Row,
1203
1204
  {
1204
1205
  id: "add-row-footer",
@@ -1256,7 +1257,7 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
1256
1257
  onEditingCellChange: Cr,
1257
1258
  children: qt
1258
1259
  }
1259
- ) : qt, Ht = p != null && p.active ? /* @__PURE__ */ S(Qt, { children: [
1260
+ ) : qt, Ht = p != null && p.active ? /* @__PURE__ */ P(Qt, { children: [
1260
1261
  /* @__PURE__ */ c(bn, { session: p }),
1261
1262
  p.dropLineY != null && /* @__PURE__ */ c(
1262
1263
  Nn,
@@ -1267,23 +1268,23 @@ const ve = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), gt = (s)
1267
1268
  }
1268
1269
  )
1269
1270
  ] }) : null;
1270
- return Or ? /* @__PURE__ */ S("div", { className: "flex flex-col gap-3", children: [
1271
+ return Or ? /* @__PURE__ */ P("div", { className: "flex flex-col gap-3", children: [
1271
1272
  Ut && Mt,
1272
1273
  Kt,
1273
- Yt && _ && /* @__PURE__ */ c(
1274
+ Yt && S && /* @__PURE__ */ c(
1274
1275
  nn,
1275
1276
  {
1276
- currentPage: _.currentPage,
1277
- pageSize: _.pageSize,
1278
- totalPages: _.totalPages,
1279
- totalItems: _.totalItems,
1280
- onPageChange: _.onPageChange,
1281
- onPageSizeChange: _.onPageSizeChange,
1282
- showPagination: _.showPagination
1277
+ currentPage: S.currentPage,
1278
+ pageSize: S.pageSize,
1279
+ totalPages: S.totalPages,
1280
+ totalItems: S.totalItems,
1281
+ onPageChange: S.onPageChange,
1282
+ onPageSizeChange: S.onPageSizeChange,
1283
+ showPagination: S.showPagination
1283
1284
  }
1284
1285
  ),
1285
1286
  Ht
1286
- ] }) : /* @__PURE__ */ S(Qt, { children: [
1287
+ ] }) : /* @__PURE__ */ P(Qt, { children: [
1287
1288
  Kt,
1288
1289
  Ht
1289
1290
  ] });