@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,38 +1,40 @@
1
- import { jsx as i, jsxs as p, Fragment as rn } from "react/jsx-runtime";
2
- import { forwardRef as sn, useMemo as y, useState as re, useEffect as ln, useCallback as F, useRef as ie, useLayoutEffect as an, Fragment as dn } from "react";
3
- import { functionalUpdate as Je, useTable as cn } from "@tanstack/react-table";
1
+ import { jsx as i, jsxs as m, Fragment as sn } from "react/jsx-runtime";
2
+ import { forwardRef as ln, useCallback as A, useMemo as v, useRef as oe, useState as Ne, useLayoutEffect as an, Fragment as dn } from "react";
3
+ import { functionalUpdate as Ye, useTable as cn } from "@tanstack/react-table";
4
4
  import { ArrowDown as un, ChevronSelectorVertical as mn, ChevronRight as $e } from "@untitledui/icons";
5
- import { Checkbox as He } from "../../primitives/checkbox/checkbox.js";
5
+ import { Checkbox as Ue } from "../../primitives/checkbox/checkbox.js";
6
6
  import { ShimmerLine as fn } from "../../primitives/shimmer/shimmer.js";
7
7
  import { cn as d } from "../../utils/cn.js";
8
- import { selectionFromSingleCell as pn, getCellRangeVisualState as hn, cellRangeEdgeBoxShadow as bn } from "../table/cellRangeSelection.js";
8
+ import { selectionFromSingleCell as pn, getCellRangeVisualState as bn, cellRangeEdgeBoxShadow as hn } from "../table/cellRangeSelection.js";
9
9
  import { useCellRangeSelection as gn } from "./useCellRangeSelection.js";
10
10
  import { useRowReorderDrag as xn } from "./useRowReorderDrag.js";
11
11
  import { GridNavProvider as yn } from "../table/useGridKeyboardNavigation.js";
12
12
  import { ROW_DRAG_SOURCE_STYLE as wn, ROW_SOURCE_INDEX_ATTR as vn, ROW_REORDER_ATTR as Cn, FloatingRowPreview as Sn, DropIndicatorLine as In } from "../table/rowReorderDrag.js";
13
13
  import { buildTableComponentColumns as Nn } from "./buildTableColumns.js";
14
- import { HEADER_PADDING_CLASS as En, ROW_HEIGHT_CLASS as qe, CELL_PADDING_CLASS as Be } from "./rowMetrics.js";
15
- import { tableComponentFeatures as _n } from "./tableFeatures.js";
16
- import { TableZoomControl as Ln } from "../table/TableZoomControl.js";
17
- import { normalizeZoomConfig as Rn, DEFAULT_TABLE_ZOOM as Tn, DEFAULT_TABLE_ZOOM_MIN as Wn, clamp as Dn, parsePxValue as _e, DEFAULT_ZOOMABLE_COLUMN_MIN_WIDTH as Ge, supportsCssZoom as kn, computeFillBaseWidth as On, computeEffectiveTableWidth as An, computeFlexColumnWidth as Fn, getTableZoomFontSize as Zn, computeNeedsHorizontalScroll as Pn, DEFAULT_COLUMN_MAX_WIDTH as Mn } from "../table/tableZoomLayout.js";
18
- const Vn = 5, jn = kn(), Kn = (r) => r === "center" ? "text-center" : r === "right" ? "text-right" : "text-left", Xe = (r) => r === "center" ? "justify-center" : r === "right" ? "justify-end" : "justify-start", oe = (r, l) => {
14
+ import { HEADER_PADDING_CLASS as En, ROW_HEIGHT_CLASS as Ze, CELL_PADDING_CLASS as He } from "./rowMetrics.js";
15
+ import { tableComponentFeatures as Tn } from "./tableFeatures.js";
16
+ import { TableZoomControl as _n } from "../table/TableZoomControl.js";
17
+ import { useFitTableToViewport as Ln } from "../table/useFitTableToViewport.js";
18
+ import { useTableZoomState as Rn } from "../table/useTableZoomState.js";
19
+ import { DEFAULT_TABLE_ZOOM_MIN as Wn, parsePxValue as Ee, DEFAULT_ZOOMABLE_COLUMN_MIN_WIDTH as qe, supportsCssZoom as Dn, computeFillBaseWidth as kn, computeEffectiveTableWidth as On, computeFlexColumnWidth as zn, getTableZoomFontSize as An, computeNeedsHorizontalScroll as Fn, DEFAULT_COLUMN_MAX_WIDTH as Pn } from "../table/tableZoomLayout.js";
20
+ const Vn = 5, jn = Dn(), Mn = (r) => r === "center" ? "text-center" : r === "right" ? "text-right" : "text-left", Ge = (r) => r === "center" ? "justify-center" : r === "right" ? "justify-end" : "justify-start", ne = (r, l) => {
19
21
  const c = r.__sourceIndex;
20
22
  return typeof c == "number" ? c : Number.isFinite(l) ? l : null;
21
- }, Ye = (r) => r instanceof HTMLElement && !!r.closest(
23
+ }, Be = (r) => r instanceof HTMLElement && !!r.closest(
22
24
  'button,a,input,textarea,select,[contenteditable]:not([contenteditable="false"]),[role="button"],[role="menuitem"]'
23
- ), A = (r, l, c) => {
24
- const [T, W] = re(l), h = r ?? T, I = ie(h), b = ie(c);
25
- I.current = h, b.current = c;
26
- const le = F(
27
- (w) => {
28
- var v;
29
- const E = Je(w, I.current);
30
- I.current = E, r === void 0 && W(E), (v = b.current) == null || v.call(b, E);
25
+ ), z = (r, l, c) => {
26
+ const [L, R] = Ne(l), f = r ?? L, C = oe(f), p = oe(c);
27
+ C.current = f, p.current = c;
28
+ const ie = A(
29
+ (g) => {
30
+ var x;
31
+ const I = Ye(g, C.current);
32
+ C.current = I, r === void 0 && R(I), (x = p.current) == null || x.call(p, I);
31
33
  },
32
34
  [r]
33
35
  );
34
- return [h, le];
35
- }, Un = (r, l) => {
36
+ return [f, ie];
37
+ }, Kn = (r, l) => {
36
38
  if (!r) return;
37
39
  const c = r.sticky ? {
38
40
  position: "sticky",
@@ -43,50 +45,50 @@ const Vn = 5, jn = kn(), Kn = (r) => r === "center" ? "text-center" : r === "rig
43
45
  } : {};
44
46
  return {
45
47
  width: r.width,
46
- minWidth: r.minWidth ?? r.width ?? `${se}px`,
47
- maxWidth: r.maxWidth ?? Mn,
48
+ minWidth: r.minWidth ?? r.width ?? `${re}px`,
49
+ maxWidth: r.maxWidth ?? Pn,
48
50
  ...c
49
51
  };
50
- }, se = 120, Ee = (r) => !!(r.maxWidth && r.sticky === "right"), $n = (r, l = se) => _e(r.minWidth) || l, ze = (r, l, c, T) => {
52
+ }, re = 120, Ie = (r) => !!(r.maxWidth && r.sticky === "right"), $n = (r, l = re) => Ee(r.minWidth) || l, Xe = (r, l, c, L) => {
51
53
  if (l === "multiple") return r;
52
- if (r === !0) return T ? { [T]: !0 } : {};
53
- const W = c && c !== !0 ? new Set(
54
- Object.keys(c).filter((b) => c[b])
55
- ) : /* @__PURE__ */ new Set(), h = Object.keys(r).filter((b) => r[b]), I = h.find((b) => !W.has(b)) ?? h[0];
56
- return I ? { [I]: !0 } : {};
54
+ if (r === !0) return L ? { [L]: !0 } : {};
55
+ const R = c && c !== !0 ? new Set(
56
+ Object.keys(c).filter((p) => c[p])
57
+ ) : /* @__PURE__ */ new Set(), f = Object.keys(r).filter((p) => r[p]), C = f.find((p) => !R.has(p)) ?? f[0];
58
+ return C ? { [C]: !0 } : {};
57
59
  };
58
- function Hn({
60
+ function Un({
59
61
  data: r,
60
62
  columns: l,
61
63
  getRowId: c,
62
- ariaLabel: T,
63
- headerGroups: W,
64
- size: h = "xs",
65
- loading: I = !1,
66
- loadingRowCount: b = Vn,
67
- emptyState: le = "No data found",
68
- showBorders: w = !1,
69
- removeRowBorders: E = !1,
70
- fillWidth: v = !1,
71
- zoom: m,
64
+ ariaLabel: L,
65
+ headerGroups: R,
66
+ size: f = "xs",
67
+ loading: C = !1,
68
+ loadingRowCount: p = Vn,
69
+ emptyState: ie = "No data found",
70
+ showBorders: g = !1,
71
+ removeRowBorders: I = !1,
72
+ fillWidth: x = !1,
73
+ zoom: Je,
72
74
  zoomDisabled: Qe = !1,
73
- className: Le,
75
+ className: Te,
74
76
  rootClassName: et,
75
77
  tableClassName: tt,
76
78
  headerClassName: nt,
77
- getRowClassName: ae,
78
- onRowClick: de,
79
- onRowHover: U,
79
+ getRowClassName: se,
80
+ onRowClick: le,
81
+ onRowHover: $,
80
82
  toolbar: ot,
81
- renderToolbar: ce,
82
- pagination: Re,
83
+ renderToolbar: ae,
84
+ pagination: _e,
83
85
  summaryRow: rt,
84
- rowGroups: Z,
85
- renderGroupHeader: ue,
86
+ rowGroups: F,
87
+ renderGroupHeader: de,
86
88
  collapsedGroupIds: it,
87
89
  defaultCollapsedGroupIds: st = [],
88
90
  onCollapsedGroupIdsChange: lt,
89
- enableSorting: Te = !1,
91
+ enableSorting: Le = !1,
90
92
  sorting: at,
91
93
  defaultSorting: dt = [],
92
94
  onSortingChange: ct,
@@ -94,217 +96,211 @@ function Hn({
94
96
  defaultColumnVisibility: mt = {},
95
97
  onColumnVisibilityChange: ft,
96
98
  columnOrder: pt,
97
- defaultColumnOrder: ht = [],
98
- onColumnOrderChange: bt,
99
- selectionMode: $ = "none",
99
+ defaultColumnOrder: bt = [],
100
+ onColumnOrderChange: ht,
101
+ selectionMode: U = "none",
100
102
  rowSelection: gt,
101
103
  defaultRowSelection: xt = {},
102
104
  onRowSelectionChange: yt,
103
105
  expanded: wt,
104
106
  defaultExpanded: vt = {},
105
107
  onExpandedChange: Ct,
106
- expansionMode: me = "multiple",
107
- getRowCanExpand: fe,
108
- renderExpandedContent: H,
109
- onCellClick: pe,
110
- onCellDoubleClick: he,
111
- onCellActivate: D,
112
- cellSelection: q,
108
+ expansionMode: ce = "multiple",
109
+ getRowCanExpand: ue,
110
+ renderExpandedContent: Z,
111
+ onCellClick: me,
112
+ onCellDoubleClick: fe,
113
+ onCellActivate: W,
114
+ cellSelection: H,
113
115
  onCellSelectionChange: P,
114
116
  onCopyCells: St,
115
117
  onPasteCells: It,
116
118
  onClearCells: Nt,
117
- onReorderRows: We,
119
+ onReorderRows: Re,
118
120
  enableRowReorder: Et,
119
- activateOnSingleClick: _t
120
- }, B) {
121
- var Ke;
122
- const u = y(
123
- () => m ? Rn(m) : null,
124
- [m == null ? void 0 : m.defaultZoom, m == null ? void 0 : m.minZoom, m == null ? void 0 : m.maxZoom, m == null ? void 0 : m.step]
125
- ), [G, De] = re(
126
- () => (u == null ? void 0 : u.defaultZoom) ?? Tn
127
- ), C = u !== null && jn, M = C ? G / 100 : 1, X = C ? Zn(G) : void 0, Lt = (u == null ? void 0 : u.minZoom) ?? Wn;
128
- ln(() => {
129
- u && De(
130
- (e) => Dn(e, u.minZoom, u.maxZoom)
131
- );
132
- }, [u]);
133
- const [Rt, Tt] = A(
121
+ activateOnSingleClick: Tt
122
+ }, q) {
123
+ var Me;
124
+ const { zoomConfig: N, zoomPercent: V, setZoomPercent: We } = Rn(Je), y = N !== null && jn, j = y ? V / 100 : 1, G = y ? An(V) : void 0, _t = (N == null ? void 0 : N.minZoom) ?? Wn, [Lt, Rt] = z(
134
125
  at,
135
126
  dt,
136
127
  ct
137
- ), [Wt, Dt] = A(
128
+ ), [Wt, Dt] = z(
138
129
  ut,
139
130
  mt,
140
131
  ft
141
- ), [kt, Ot] = A(
132
+ ), [kt, Ot] = z(
142
133
  pt,
143
- ht,
144
- bt
145
- ), [At, Ft] = A(
134
+ bt,
135
+ ht
136
+ ), [zt, At] = z(
146
137
  gt,
147
138
  xt,
148
139
  yt
149
- ), [Zt, ke] = A(
140
+ ), [Ft, De] = z(
150
141
  wt,
151
142
  vt,
152
143
  Ct
153
- ), be = r.length > 0 ? c(r[0], 0) : void 0, Pt = ze(
154
- Zt,
155
- me,
144
+ ), pe = r.length > 0 ? c(r[0], 0) : void 0, Pt = Xe(
145
+ Ft,
146
+ ce,
156
147
  void 0,
157
- be
158
- ), Mt = F(
148
+ pe
149
+ ), Vt = A(
159
150
  (e) => {
160
- ke(
161
- (t) => ze(
162
- Je(e, t),
163
- me,
151
+ De(
152
+ (t) => Xe(
153
+ Ye(e, t),
154
+ ce,
164
155
  t,
165
- be
156
+ pe
166
157
  )
167
158
  );
168
159
  },
169
- [me, be, ke]
170
- ), [Oe, Ae] = A(
160
+ [ce, pe, De]
161
+ ), [ke, Oe] = z(
171
162
  it,
172
163
  st,
173
164
  lt
174
- ), ge = y(
175
- () => new Set(Oe),
176
- [Oe]
177
- ), Vt = F(
178
- (e) => Ae(
165
+ ), be = v(
166
+ () => new Set(ke),
167
+ [ke]
168
+ ), jt = A(
169
+ (e) => Oe(
179
170
  (t) => t.includes(e) ? t.filter((o) => o !== e) : [...t, e]
180
171
  ),
181
- [Ae]
182
- ), V = ie(null), [j, Fe] = re(null);
172
+ [Oe]
173
+ ), D = oe(null), [M, ze] = Ne(null), Mt = Ln({
174
+ containerRef: D,
175
+ zoomConfig: N,
176
+ zoomPercent: V,
177
+ setZoomPercent: We
178
+ });
183
179
  an(() => {
184
- if (!v) {
185
- Fe(null);
180
+ if (!x) {
181
+ ze(null);
186
182
  return;
187
183
  }
188
- const e = V.current;
184
+ const e = D.current;
189
185
  if (!e || typeof ResizeObserver > "u") return;
190
186
  const t = () => {
191
187
  const n = e.clientWidth;
192
- n > 0 && Fe(
188
+ n > 0 && ze(
193
189
  (s) => s === n ? s : n
194
190
  );
195
191
  };
196
192
  t();
197
193
  const o = new ResizeObserver(t);
198
194
  return o.observe(e), () => o.disconnect();
199
- }, [v, l.length, r.length, I]);
200
- const g = y(() => {
201
- if (!v) return null;
195
+ }, [x, l.length, r.length, C]);
196
+ const b = v(() => {
197
+ if (!x) return null;
202
198
  const e = l.reduce(
203
- (n, s) => Ee(s) ? n + _e(s.maxWidth) : n,
199
+ (n, s) => Ie(s) ? n + Ee(s.maxWidth) : n,
204
200
  0
205
- ), t = l.filter((n) => !Ee(n));
201
+ ), t = l.filter((n) => !Ie(n));
206
202
  return { minTableWidth: t.reduce(
207
203
  (n, s) => n + $n(
208
204
  s,
209
- C ? _e(Ge) : se
205
+ y ? Ee(qe) : re
210
206
  ),
211
207
  0
212
208
  ) + e, fixedTotal: e, flexibleCount: t.length };
213
- }, [v, l, C]), xe = y(
214
- () => g ? On(j, g.minTableWidth) : null,
215
- [j, g]
216
- ), ye = Pn(
217
- xe,
218
- j,
219
- M
220
- ), Y = y(
221
- () => An(xe, j, M),
222
- [xe, j, M]
223
- ), Ze = y(() => !g || g.flexibleCount === 0 ? null : Fn(
224
- Y,
225
- g.fixedTotal,
226
- g.flexibleCount
227
- ), [g, Y]), z = (e, t) => {
228
- const o = Un(e, t);
229
- return !v || !e ? o : Ee(e) ? {
209
+ }, [x, l, y]), he = v(
210
+ () => b ? kn(M, b.minTableWidth) : null,
211
+ [M, b]
212
+ ), ge = Fn(
213
+ he,
214
+ M,
215
+ j
216
+ ), B = v(
217
+ () => On(he, M, j),
218
+ [he, M, j]
219
+ ), Ae = v(() => !b || b.flexibleCount === 0 ? null : zn(
220
+ B,
221
+ b.fixedTotal,
222
+ b.flexibleCount
223
+ ), [b, B]), X = (e, t) => {
224
+ const o = Kn(e, t);
225
+ return !x || !e ? o : Ie(e) ? {
230
226
  ...o,
231
227
  width: e.maxWidth,
232
228
  minWidth: e.maxWidth,
233
229
  maxWidth: e.maxWidth
234
- } : Ze == null ? o : {
230
+ } : Ae == null ? o : {
235
231
  ...o,
236
- width: `${Ze}px`,
237
- minWidth: e.minWidth ?? (C ? Ge : `${se}px`)
232
+ width: `${Ae}px`,
233
+ minWidth: e.minWidth ?? (y ? qe : `${re}px`)
238
234
  };
239
- }, we = y(
235
+ }, xe = v(
240
236
  () => new Map(l.map((e) => [e.id, e])),
241
237
  [l]
242
- ), jt = y(
243
- () => Nn(l, W),
244
- [l, W]
245
- ), N = cn({
246
- features: _n,
238
+ ), Kt = v(
239
+ () => Nn(l, R),
240
+ [l, R]
241
+ ), S = cn({
242
+ features: Tn,
247
243
  data: r,
248
- columns: jt,
244
+ columns: Kt,
249
245
  getRowId: c,
250
- enableSorting: Te,
246
+ enableSorting: Le,
251
247
  enableCellSpanning: !0,
252
- enableRowSelection: $ !== "none",
253
- enableMultiRowSelection: $ === "multiple",
254
- getRowCanExpand: fe && H ? (e) => fe(e.original) : () => !1,
248
+ enableRowSelection: U !== "none",
249
+ enableMultiRowSelection: U === "multiple",
250
+ getRowCanExpand: ue && Z ? (e) => ue(e.original) : () => !1,
255
251
  state: {
256
- sorting: Rt,
252
+ sorting: Lt,
257
253
  columnVisibility: Wt,
258
254
  columnOrder: kt,
259
- rowSelection: At,
255
+ rowSelection: zt,
260
256
  expanded: Pt
261
257
  },
262
- onSortingChange: Tt,
258
+ onSortingChange: Rt,
263
259
  onColumnVisibilityChange: Dt,
264
260
  onColumnOrderChange: Ot,
265
- onRowSelectionChange: Ft,
266
- onExpandedChange: Mt
267
- }), J = $ !== "none", Kt = !!(fe && H), Ut = J ? 1 : 0, $t = N.getVisibleLeafColumns().length, Q = Math.max(
268
- $t + Ut,
261
+ onRowSelectionChange: At,
262
+ onExpandedChange: Vt
263
+ }), Y = U !== "none", $t = !!(ue && Z), Ut = Y ? 1 : 0, Zt = S.getVisibleLeafColumns().length, J = Math.max(
264
+ Zt + Ut,
269
265
  1
270
- ), Ht = Math.max(N.getHeaderGroups().length, 1), L = N.getRowModel().rows, ve = C && u ? /* @__PURE__ */ i(
271
- Ln,
266
+ ), Ht = Math.max(S.getHeaderGroups().length, 1), T = S.getRowModel().rows, ye = y && N ? /* @__PURE__ */ i(
267
+ _n,
272
268
  {
273
- value: G,
274
- defaultValue: u.defaultZoom,
275
- minValue: Lt,
276
- maxValue: u.maxZoom,
277
- step: u.step,
278
- onChange: De,
269
+ value: V,
270
+ minValue: _t,
271
+ maxValue: N.maxZoom,
272
+ step: N.step,
273
+ onChange: We,
274
+ onFitToViewport: Mt,
279
275
  isDisabled: Qe
280
276
  }
281
- ) : null, Pe = ce ? ce({ zoomControl: ve, zoomPercent: G }) : ot, Me = !ce && ve ? /* @__PURE__ */ i("div", { className: "flex justify-end", children: ve }) : null, qt = !!(Pe || Me || Re), Bt = y(() => {
282
- const e = C ? {
283
- zoom: M,
284
- "--table-zoom-font-size": X ? `${X}px` : void 0
277
+ ) : null, Fe = ae ? ae({ zoomControl: ye, zoomPercent: V }) : ot, Pe = !ae && ye ? /* @__PURE__ */ i("div", { className: "flex justify-end", children: ye }) : null, qt = !!(Fe || Pe || _e), Gt = v(() => {
278
+ const e = y ? {
279
+ zoom: j,
280
+ "--table-zoom-font-size": G ? `${G}px` : void 0
285
281
  } : void 0;
286
- return !v || !g ? C ? { ...e, width: "max-content", minWidth: "100%" } : void 0 : C ? {
282
+ return !x || !b ? y ? { ...e, width: "max-content", minWidth: "100%" } : void 0 : y ? {
287
283
  ...e,
288
284
  tableLayout: "fixed",
289
- width: `${Y ?? g.minTableWidth}px`
285
+ width: `${B ?? b.minTableWidth}px`
290
286
  } : {
291
287
  tableLayout: "fixed",
292
- width: ye ? `${g.minTableWidth}px` : "100%"
288
+ width: ge ? `${b.minTableWidth}px` : "100%"
293
289
  };
294
290
  }, [
295
- Y,
296
- v,
297
- g,
298
- ye,
299
- C,
300
- M,
301
- X
302
- ]), Gt = ie(
291
+ B,
292
+ x,
293
+ b,
294
+ ge,
295
+ y,
296
+ j,
297
+ G
298
+ ]), Bt = oe(
303
299
  null
304
- ), [k, Xt] = re(null), Yt = !!D, zt = F(
300
+ ), [k, Xt] = Ne(null), Yt = !!W, Jt = A(
305
301
  (e, t, o) => {
306
- if (Gt.current = { rowId: e, columnKey: t }, !P) return;
307
- const n = q;
302
+ if (Bt.current = { rowId: e, columnKey: t }, !P) return;
303
+ const n = H;
308
304
  n != null && n.anchor.rowId === e && n.anchor.columnKey === t && n.focus.rowId === e && n.focus.columnKey === t || P(
309
305
  pn({
310
306
  rowId: e,
@@ -313,17 +309,17 @@ function Hn({
313
309
  })
314
310
  );
315
311
  },
316
- [P, q]
317
- ), Jt = F(
312
+ [P, H]
313
+ ), Qt = A(
318
314
  (e) => {
319
315
  Xt((t) => t === e || t && e && t.rowId === e.rowId && t.columnKey === e.columnKey ? t : e);
320
316
  },
321
317
  []
322
- ), ee = !!We && Et !== !1, f = xn({
323
- enabled: ee,
324
- onReorderRows: We,
325
- containerRef: V
326
- }), Qt = F(
318
+ ), Q = !!Re && Et !== !1, u = xn({
319
+ enabled: Q,
320
+ onReorderRows: Re,
321
+ containerRef: D
322
+ }), en = A(
327
323
  (e, t, o) => {
328
324
  var n;
329
325
  return {
@@ -332,76 +328,76 @@ function Hn({
332
328
  columnId: t,
333
329
  value: o,
334
330
  rowIndex: e.index,
335
- sourceIndex: oe(e.original, e.index),
336
- isRowDragging: ((n = f.session) == null ? void 0 : n.active) === !0 && f.session.rowId === e.id,
337
- startRowDrag: ee ? (s) => f.startDrag(
331
+ sourceIndex: ne(e.original, e.index),
332
+ isRowDragging: ((n = u.session) == null ? void 0 : n.active) === !0 && u.session.rowId === e.id,
333
+ startRowDrag: Q ? (s) => u.startDrag(
338
334
  s,
339
335
  e.id,
340
- oe(e.original, e.index) ?? e.index,
336
+ ne(e.original, e.index) ?? e.index,
341
337
  e.original
342
338
  ) : void 0
343
339
  };
344
340
  },
345
341
  // eslint-disable-next-line react-hooks/exhaustive-deps
346
- [ee, f.startDrag, f.session]
347
- ), Ce = L.map((e) => e.id).join("\0"), Se = y(
342
+ [Q, u.startDrag, u.session]
343
+ ), we = T.map((e) => e.id).join("\0"), ve = v(
344
+ () => we ? we.split("\0") : [],
345
+ [we]
346
+ ), Ce = S.getVisibleLeafColumns().map((e) => e.id).join("\0"), Se = v(
348
347
  () => Ce ? Ce.split("\0") : [],
349
348
  [Ce]
350
- ), Ie = N.getVisibleLeafColumns().map((e) => e.id).join("\0"), Ne = y(
351
- () => Ie ? Ie.split("\0") : [],
352
- [Ie]
353
- ), O = typeof P == "function", te = gn({
349
+ ), O = typeof P == "function", ee = gn({
354
350
  enabled: O,
355
- selection: q,
351
+ selection: H,
356
352
  onSelectionChange: P,
357
353
  onCopyCells: St,
358
354
  onPasteCells: It,
359
355
  onClearCells: Nt,
360
- onActivateCell: D ? (e) => {
361
- const t = L.find((o) => o.id === e.rowId);
362
- t && D({
356
+ onActivateCell: W ? (e) => {
357
+ const t = T.find((o) => o.id === e.rowId);
358
+ t && W({
363
359
  row: t.original,
364
360
  rowId: e.rowId,
365
361
  columnId: e.columnKey,
366
362
  value: void 0,
367
363
  rowIndex: t.index,
368
- sourceIndex: e.sourceIndex ?? oe(t.original, t.index)
364
+ sourceIndex: e.sourceIndex ?? ne(t.original, t.index)
369
365
  });
370
366
  } : void 0,
371
- activateOnSingleClick: _t,
372
- containerRef: V,
373
- rowIds: Se,
374
- columnKeys: Ne
375
- }), en = y(() => {
376
- if (!(Z != null && Z.length)) return L.map((n) => ({ kind: "row", row: n }));
377
- const e = new Map(L.map((n) => [n.id, n])), t = /* @__PURE__ */ new Set(), o = [];
378
- for (const n of Z) {
379
- const s = n.rowIds.map((x) => e.get(x)).filter((x) => x !== void 0);
367
+ activateOnSingleClick: Tt,
368
+ containerRef: D,
369
+ rowIds: ve,
370
+ columnKeys: Se
371
+ }), tn = v(() => {
372
+ if (!(F != null && F.length)) return T.map((n) => ({ kind: "row", row: n }));
373
+ const e = new Map(T.map((n) => [n.id, n])), t = /* @__PURE__ */ new Set(), o = [];
374
+ for (const n of F) {
375
+ const s = n.rowIds.map((h) => e.get(h)).filter((h) => h !== void 0);
380
376
  s.length !== 0 && (o.push({
381
377
  kind: "group",
382
378
  group: { id: n.id, label: n.label, rowCount: s.length }
383
- }), s.forEach((x) => t.add(x.id)), !ge.has(n.id) && s.forEach((x) => o.push({ kind: "row", row: x })));
379
+ }), s.forEach((h) => t.add(h.id)), !be.has(n.id) && s.forEach((h) => o.push({ kind: "row", row: h })));
384
380
  }
385
- for (const n of L)
381
+ for (const n of T)
386
382
  t.has(n.id) || o.push({ kind: "row", row: n });
387
383
  return o;
388
- }, [Z, L, ge]), tn = (e) => {
389
- const t = ge.has(e.id), o = () => Vt(e.id);
384
+ }, [F, T, be]), nn = (e) => {
385
+ const t = be.has(e.id), o = () => jt(e.id);
390
386
  return /* @__PURE__ */ i("tr", { className: "bg-secondary_subtle", children: /* @__PURE__ */ i(
391
387
  "td",
392
388
  {
393
- colSpan: Q,
389
+ colSpan: J,
394
390
  className: d(
395
- !ue && "py-1.5",
396
- w && "border-r border-secondary last:border-r-0"
391
+ !de && "py-1.5",
392
+ g && "border-r border-secondary last:border-r-0"
397
393
  ),
398
- children: ue ? ue({
394
+ children: de ? de({
399
395
  id: e.id,
400
396
  label: e.label,
401
397
  rowCount: e.rowCount,
402
398
  isCollapsed: t,
403
399
  toggle: o
404
- }) : /* @__PURE__ */ p(
400
+ }) : /* @__PURE__ */ m(
405
401
  "button",
406
402
  {
407
403
  type: "button",
@@ -419,7 +415,7 @@ function Hn({
419
415
  }
420
416
  ),
421
417
  /* @__PURE__ */ i("span", { className: "truncate", children: e.label || "(Empty)" }),
422
- /* @__PURE__ */ p("span", { className: "text-tertiary", children: [
418
+ /* @__PURE__ */ m("span", { className: "text-tertiary", children: [
423
419
  "(",
424
420
  e.rowCount,
425
421
  ")"
@@ -429,61 +425,61 @@ function Hn({
429
425
  )
430
426
  }
431
427
  ) }, `group-${e.id}`);
432
- }, Ve = /* @__PURE__ */ p(
428
+ }, Ve = /* @__PURE__ */ m(
433
429
  "div",
434
430
  {
435
431
  ref: (e) => {
436
- V.current = e, typeof B == "function" ? B(e) : B && (B.current = e);
432
+ D.current = e, typeof q == "function" ? q(e) : q && (q.current = e);
437
433
  },
438
- onPointerDownCapture: O ? te.onPointerDownCapture : void 0,
439
- onKeyDownCapture: O ? te.onKeyDownCapture : void 0,
440
- onClickCapture: O ? te.onClickCapture : void 0,
441
- onDoubleClickCapture: O ? te.onDoubleClickCapture : void 0,
434
+ onPointerDownCapture: O ? ee.onPointerDownCapture : void 0,
435
+ onKeyDownCapture: O ? ee.onKeyDownCapture : void 0,
436
+ onClickCapture: O ? ee.onClickCapture : void 0,
437
+ onDoubleClickCapture: O ? ee.onDoubleClickCapture : void 0,
442
438
  className: d(
443
439
  "w-full rounded-lg bg-primary",
444
- C || !v || ye ? "overflow-x-auto" : "overflow-x-hidden",
445
- w && "rounded-xl border border-secondary",
440
+ y || !x || ge ? "overflow-x-auto" : "overflow-x-hidden",
441
+ g && "rounded-xl border border-secondary",
446
442
  et
447
443
  ),
448
444
  children: [
449
- /* @__PURE__ */ p(
445
+ /* @__PURE__ */ m(
450
446
  "table",
451
447
  {
452
- "aria-label": T,
453
- "data-table-zoom-typography": X !== void 0 ? "" : void 0,
448
+ "aria-label": L,
449
+ "data-table-zoom-typography": G !== void 0 ? "" : void 0,
454
450
  className: d(
455
451
  "w-full border-separate border-spacing-0 overflow-x-hidden",
456
452
  tt
457
453
  ),
458
- style: Bt,
454
+ style: Gt,
459
455
  children: [
460
456
  /* @__PURE__ */ i(
461
457
  "thead",
462
458
  {
463
459
  className: d(
464
460
  "sticky top-0 z-30 rounded-t-lg bg-secondary_subtle [&>tr>th]:h-9 [&>tr>th:first-child]:rounded-tl-lg [&>tr>th:last-child]:rounded-tr-lg",
465
- w && "[&>tr>th]:border-b [&>tr>th]:border-secondary [&>tr>th:first-child]:rounded-bl-none [&>tr>th:last-child]:rounded-br-none",
461
+ g && "[&>tr>th]:border-b [&>tr>th]:border-secondary [&>tr>th:first-child]:rounded-bl-none [&>tr>th:last-child]:rounded-br-none",
466
462
  nt
467
463
  ),
468
- children: N.getHeaderGroups().map((e, t) => /* @__PURE__ */ p("tr", { children: [
469
- J && t === 0 ? /* @__PURE__ */ i(
464
+ children: S.getHeaderGroups().map((e, t) => /* @__PURE__ */ m("tr", { children: [
465
+ Y && t === 0 ? /* @__PURE__ */ i(
470
466
  "th",
471
467
  {
472
468
  rowSpan: Ht,
473
469
  className: d(
474
470
  "relative w-10 min-w-10 p-0 align-middle",
475
- w && "border-r border-secondary"
471
+ g && "border-r border-secondary"
476
472
  ),
477
- children: $ === "multiple" ? /* @__PURE__ */ i(
473
+ children: U === "multiple" ? /* @__PURE__ */ i(
478
474
  "div",
479
475
  {
480
476
  className: "flex items-center justify-center",
481
477
  onClick: (o) => o.stopPropagation(),
482
478
  children: /* @__PURE__ */ i(
483
- He,
479
+ Ue,
484
480
  {
485
- checked: N.getIsAllRowsSelected() ? !0 : N.getIsSomeRowsSelected() ? "indeterminate" : !1,
486
- onCheckedChange: (o) => N.toggleAllRowsSelected(o === !0),
481
+ checked: S.getIsAllRowsSelected() ? !0 : S.getIsSomeRowsSelected() ? "indeterminate" : !1,
482
+ onCheckedChange: (o) => S.toggleAllRowsSelected(o === !0),
487
483
  "aria-label": "Select all rows",
488
484
  className: "items-center justify-center"
489
485
  }
@@ -494,10 +490,10 @@ function Hn({
494
490
  ) : null,
495
491
  e.headers.map((o) => {
496
492
  if (o.rowSpan === 0) return null;
497
- const n = we.get(o.column.id), s = o.column.getIsSorted(), x = Te && !o.isPlaceholder && o.column.getCanSort(), a = n != null && n.renderHeader ? n.renderHeader({
493
+ const n = xe.get(o.column.id), s = o.column.getIsSorted(), h = Le && !o.isPlaceholder && o.column.getCanSort(), a = n != null && n.renderHeader ? n.renderHeader({
498
494
  columnId: n.id,
499
495
  label: n.header
500
- }) : o.isPlaceholder ? null : N.FlexRender({ header: o });
496
+ }) : o.isPlaceholder ? null : S.FlexRender({ header: o });
501
497
  return /* @__PURE__ */ i(
502
498
  "th",
503
499
  {
@@ -505,20 +501,20 @@ function Hn({
505
501
  rowSpan: o.rowSpan,
506
502
  scope: o.colSpan > 1 ? "colgroup" : "col",
507
503
  "aria-sort": s === "asc" ? "ascending" : s === "desc" ? "descending" : void 0,
508
- style: z(n, !0),
504
+ style: X(n, !0),
509
505
  className: d(
510
506
  "relative overflow-hidden p-0 outline-hidden focus-within:z-1 focus-within:ring-2 focus-within:ring-focus-ring focus-within:ring-inset",
511
- En[h],
512
- w && "border-r border-secondary last:border-r-0",
507
+ En[f],
508
+ g && "border-r border-secondary last:border-r-0",
513
509
  n == null ? void 0 : n.headerClassName
514
510
  ),
515
- children: x ? /* @__PURE__ */ p(
511
+ children: h ? /* @__PURE__ */ m(
516
512
  "button",
517
513
  {
518
514
  type: "button",
519
515
  className: d(
520
516
  "flex w-full items-center gap-1 overflow-hidden rounded outline-none",
521
- Xe(n == null ? void 0 : n.align)
517
+ Ge(n == null ? void 0 : n.align)
522
518
  ),
523
519
  onClick: o.column.getToggleSortingHandler(),
524
520
  "aria-label": `Sort by ${String((n == null ? void 0 : n.header) ?? o.column.id)}`,
@@ -547,7 +543,7 @@ function Hn({
547
543
  {
548
544
  className: d(
549
545
  "flex items-center gap-1 overflow-hidden",
550
- Xe(n == null ? void 0 : n.align)
546
+ Ge(n == null ? void 0 : n.align)
551
547
  ),
552
548
  children: /* @__PURE__ */ i("div", { className: "flex items-center overflow-hidden text-ellipsis whitespace-nowrap text-xs font-medium text-secondary", children: a })
553
549
  }
@@ -559,34 +555,34 @@ function Hn({
559
555
  ] }, e.id))
560
556
  }
561
557
  ),
562
- /* @__PURE__ */ p("tbody", { children: [
563
- I ? Array.from({ length: b }, (e, t) => /* @__PURE__ */ p(
558
+ /* @__PURE__ */ m("tbody", { children: [
559
+ C ? Array.from({ length: p }, (e, t) => /* @__PURE__ */ m(
564
560
  "tr",
565
561
  {
566
- className: qe[h],
562
+ className: Ze[f],
567
563
  "aria-hidden": "true",
568
564
  children: [
569
- J ? /* @__PURE__ */ i(
565
+ Y ? /* @__PURE__ */ i(
570
566
  "td",
571
567
  {
572
568
  className: d(
573
569
  "w-10 min-w-10",
574
- w && "border-r border-secondary",
575
- !E && "border-b border-tertiary"
570
+ g && "border-r border-secondary",
571
+ !I && "border-b border-tertiary"
576
572
  )
577
573
  }
578
574
  ) : null,
579
- N.getVisibleLeafColumns().map((o) => {
580
- const n = we.get(o.id);
575
+ S.getVisibleLeafColumns().map((o) => {
576
+ const n = xe.get(o.id);
581
577
  return /* @__PURE__ */ i(
582
578
  "td",
583
579
  {
584
- style: z(n, !1),
580
+ style: X(n, !1),
585
581
  className: d(
586
582
  "relative overflow-hidden text-secondary",
587
- Be[h],
588
- w && "border-r border-secondary last:border-r-0",
589
- !E && "border-b border-tertiary",
583
+ He[f],
584
+ g && "border-r border-secondary last:border-r-0",
585
+ !I && "border-b border-tertiary",
590
586
  n == null ? void 0 : n.cellClassName
591
587
  ),
592
588
  children: /* @__PURE__ */ i(
@@ -604,54 +600,54 @@ function Hn({
604
600
  ]
605
601
  },
606
602
  `loading-${t}`
607
- )) : L.length === 0 ? /* @__PURE__ */ i("tr", { children: /* @__PURE__ */ i(
603
+ )) : T.length === 0 ? /* @__PURE__ */ i("tr", { children: /* @__PURE__ */ i(
608
604
  "td",
609
605
  {
610
- colSpan: Q,
606
+ colSpan: J,
611
607
  className: "border-b border-secondary px-3 py-3 text-left text-xs text-placeholder_subtle",
612
- children: le
608
+ children: ie
613
609
  }
614
- ) }) : en.map((e) => {
615
- var x;
610
+ ) }) : tn.map((e) => {
611
+ var h;
616
612
  if (e.kind === "group")
617
- return tn(e.group);
618
- const t = e.row, o = Kt && t.getCanExpand(), n = o && t.getIsExpanded(), s = t.getVisibleCells();
619
- return /* @__PURE__ */ p(dn, { children: [
620
- /* @__PURE__ */ p(
613
+ return nn(e.group);
614
+ const t = e.row, o = $t && t.getCanExpand(), n = o && t.getIsExpanded(), s = t.getVisibleCells();
615
+ return /* @__PURE__ */ m(dn, { children: [
616
+ /* @__PURE__ */ m(
621
617
  "tr",
622
618
  {
623
- ...ee ? {
619
+ ...Q ? {
624
620
  [Cn]: t.id,
625
621
  [vn]: String(
626
- oe(t.original, t.index) ?? t.index
622
+ ne(t.original, t.index) ?? t.index
627
623
  )
628
624
  } : {},
629
- style: (x = f.session) != null && x.active && f.session.rowId === t.id ? wn : void 0,
625
+ style: (h = u.session) != null && h.active && u.session.rowId === t.id ? wn : void 0,
630
626
  className: d(
631
627
  // `focus-visible`, not `focus-within`: the ring marks the row itself being keyboard-focused.
632
628
  // `focus-within` also fires for anything inside it, so an open cell
633
629
  // editor outlined the entire row.
634
630
  "relative outline-focus-ring transition-colors hover:bg-secondary_subtle focus-visible:outline-2 focus-visible:-outline-offset-2",
635
- qe[h],
631
+ Ze[f],
636
632
  t.getIsSelected() && "bg-secondary",
637
- de && "cursor-pointer",
638
- ae == null ? void 0 : ae(t.original)
633
+ le && "cursor-pointer",
634
+ se == null ? void 0 : se(t.original)
639
635
  ),
640
636
  onClick: (a) => {
641
- !de || Ye(a.target) || de(t.original);
637
+ !le || Be(a.target) || le(t.original);
642
638
  },
643
- onMouseEnter: U ? () => U(t.original, !0) : void 0,
644
- onMouseLeave: U ? () => U(t.original, !1) : void 0,
639
+ onMouseEnter: $ ? () => $(t.original, !0) : void 0,
640
+ onMouseLeave: $ ? () => $(t.original, !1) : void 0,
645
641
  children: [
646
- J ? /* @__PURE__ */ i(
642
+ Y ? /* @__PURE__ */ i(
647
643
  "td",
648
644
  {
649
645
  className: d(
650
646
  "relative w-10 min-w-10 p-0 text-center",
651
- w && "border-r border-secondary",
647
+ g && "border-r border-secondary",
652
648
  // Matches the data cells, so the row separator
653
649
  // runs the full width of the table.
654
- !E && !n && "border-b border-tertiary"
650
+ !I && !n && "border-b border-tertiary"
655
651
  ),
656
652
  children: /* @__PURE__ */ i(
657
653
  "div",
@@ -660,7 +656,7 @@ function Hn({
660
656
  onClick: (a) => a.stopPropagation(),
661
657
  onKeyDown: (a) => a.stopPropagation(),
662
658
  children: /* @__PURE__ */ i(
663
- He,
659
+ Ue,
664
660
  {
665
661
  checked: t.getIsSelected(),
666
662
  onCheckedChange: (a) => t.toggleSelected(a === !0),
@@ -672,38 +668,38 @@ function Hn({
672
668
  )
673
669
  }
674
670
  ) : null,
675
- s.map((a, Ue) => {
671
+ s.map((a, Ke) => {
676
672
  if (a.getIsCovered()) return null;
677
- const S = we.get(a.column.id);
678
- if (!S) return null;
679
- const K = Qt(
673
+ const w = xe.get(a.column.id);
674
+ if (!w) return null;
675
+ const K = en(
680
676
  t,
681
- S.id,
677
+ w.id,
682
678
  a.getValue()
683
- ), nn = S.renderCell ? S.renderCell(K) : String(a.getValue() ?? ""), _ = O ? hn(
684
- q,
679
+ ), on = w.renderCell ? w.renderCell(K) : String(a.getValue() ?? ""), E = O ? bn(
680
+ H,
685
681
  t.id,
686
- S.id,
687
- Se,
688
- Ne
689
- ) : null, ne = !!(_ != null && _.inRange), on = (k == null ? void 0 : k.rowId) === t.id && (k == null ? void 0 : k.columnKey) === S.id;
682
+ w.id,
683
+ ve,
684
+ Se
685
+ ) : null, te = !!(E != null && E.inRange), rn = (k == null ? void 0 : k.rowId) === t.id && (k == null ? void 0 : k.columnKey) === w.id;
690
686
  return /* @__PURE__ */ i(
691
687
  "td",
692
688
  {
693
689
  colSpan: a.getColSpan(),
694
690
  rowSpan: a.getRowSpan(),
695
- style: ne && _ ? {
696
- ...z(S, !1),
697
- boxShadow: bn(
698
- _.edges
691
+ style: te && E ? {
692
+ ...X(w, !1),
693
+ boxShadow: hn(
694
+ E.edges
699
695
  )
700
- } : z(S, !1),
696
+ } : X(w, !1),
701
697
  "data-table-component-cell": "",
702
698
  "data-grid-cell": "",
703
699
  "data-grid-row-id": t.id,
704
- "data-grid-col-key": S.id,
700
+ "data-grid-col-key": w.id,
705
701
  "data-grid-source-index": K.sourceIndex ?? void 0,
706
- tabIndex: D ? 0 : void 0,
702
+ tabIndex: W ? 0 : void 0,
707
703
  className: d(
708
704
  // `overflow-hidden`, never `overflow-x-hidden`: when `overflow-x` is not
709
705
  // `visible` the browser computes `overflow-y` to `auto`, turning
@@ -713,24 +709,24 @@ function Hn({
713
709
  // The cell holding an open editor must not clip it: a wrapped
714
710
  // multi-line value has to be visible, and the row only grows
715
711
  // around content the cell is allowed to show.
716
- on ? "z-1 overflow-visible" : "overflow-hidden",
717
- Be[h],
718
- Kn(S.align),
719
- w && "border-r border-secondary last:border-r-0",
720
- !E && !n && !ne && "border-b border-tertiary",
721
- ne && "z-1 outline-hidden",
722
- ne && !(_ != null && _.isAnchor) && "bg-utility-brand-25",
723
- S.cellClassName
712
+ rn ? "z-1 overflow-visible" : "overflow-hidden",
713
+ He[f],
714
+ Mn(w.align),
715
+ g && "border-r border-secondary last:border-r-0",
716
+ !I && !n && !te && "border-b border-tertiary",
717
+ te && "z-1 outline-hidden",
718
+ te && !(E != null && E.isAnchor) && "bg-utility-brand-25",
719
+ w.cellClassName
724
720
  ),
725
- onClick: (R) => {
726
- pe == null || pe(K), Ue === 0 && o && Ye(R.target) && R.stopPropagation();
721
+ onClick: (_) => {
722
+ me == null || me(K), Ke === 0 && o && Be(_.target) && _.stopPropagation();
727
723
  },
728
- onDoubleClick: () => he == null ? void 0 : he(K),
729
- onKeyDown: (R) => {
730
- R.key !== "Enter" || !D || (R.preventDefault(), D(K));
724
+ onDoubleClick: () => fe == null ? void 0 : fe(K),
725
+ onKeyDown: (_) => {
726
+ _.key !== "Enter" || !W || (_.preventDefault(), W(K));
731
727
  },
732
- children: /* @__PURE__ */ p("div", { className: "flex min-w-0 items-center gap-2", children: [
733
- Ue === 0 && o ? /* @__PURE__ */ i(
728
+ children: /* @__PURE__ */ m("div", { className: "flex min-w-0 items-center gap-2", children: [
729
+ Ke === 0 && o ? /* @__PURE__ */ i(
734
730
  "button",
735
731
  {
736
732
  type: "button",
@@ -741,13 +737,13 @@ function Hn({
741
737
  "aria-label": n ? "Collapse row" : "Expand row",
742
738
  "aria-expanded": n,
743
739
  "aria-controls": `${t.id}-detail`,
744
- onClick: (R) => {
745
- R.stopPropagation(), t.toggleExpanded();
740
+ onClick: (_) => {
741
+ _.stopPropagation(), t.toggleExpanded();
746
742
  },
747
743
  children: /* @__PURE__ */ i($e, { className: "size-4 text-fg-quaternary" })
748
744
  }
749
745
  ) : null,
750
- /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: nn })
746
+ /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: on })
751
747
  ] })
752
748
  },
753
749
  a.id
@@ -756,59 +752,59 @@ function Hn({
756
752
  ]
757
753
  }
758
754
  ),
759
- n && H ? /* @__PURE__ */ i(
755
+ n && Z ? /* @__PURE__ */ i(
760
756
  "tr",
761
757
  {
762
758
  id: `${t.id}-detail`,
763
759
  className: "relative bg-secondary_subtle",
764
- children: /* @__PURE__ */ i("td", { colSpan: Q, className: "p-0", children: H({
760
+ children: /* @__PURE__ */ i("td", { colSpan: J, className: "p-0", children: Z({
765
761
  row: t.original,
766
762
  rowId: t.id,
767
- colSpan: Q,
763
+ colSpan: J,
768
764
  collapse: () => t.toggleExpanded(!1)
769
765
  }) })
770
766
  }
771
767
  ) : null
772
768
  ] }, t.id);
773
769
  }),
774
- !I && rt
770
+ !C && rt
775
771
  ] })
776
772
  ]
777
773
  }
778
774
  ),
779
- ((Ke = f.session) == null ? void 0 : Ke.active) && /* @__PURE__ */ p(rn, { children: [
780
- /* @__PURE__ */ i(Sn, { session: f.session }),
781
- f.session.dropLineY !== null && /* @__PURE__ */ i(
775
+ ((Me = u.session) == null ? void 0 : Me.active) && /* @__PURE__ */ m(sn, { children: [
776
+ /* @__PURE__ */ i(Sn, { session: u.session }),
777
+ u.session.dropLineY !== null && /* @__PURE__ */ i(
782
778
  In,
783
779
  {
784
- y: f.session.dropLineY,
785
- left: f.session.dropLineLeft,
786
- width: f.session.dropLineWidth
780
+ y: u.session.dropLineY,
781
+ left: u.session.dropLineLeft,
782
+ width: u.session.dropLineWidth
787
783
  }
788
784
  )
789
785
  ] })
790
786
  ]
791
787
  }
792
- ), je = qt ? /* @__PURE__ */ p("div", { className: d("flex flex-col gap-3", Le), children: [
788
+ ), je = qt ? /* @__PURE__ */ m("div", { className: d("flex flex-col gap-3", Te), children: [
789
+ Fe,
793
790
  Pe,
794
- Me,
795
791
  Ve,
796
- Re
797
- ] }) : /* @__PURE__ */ i("div", { className: Le, children: Ve });
792
+ _e
793
+ ] }) : /* @__PURE__ */ i("div", { className: Te, children: Ve });
798
794
  return Yt ? /* @__PURE__ */ i(
799
795
  yn,
800
796
  {
801
- rowIds: Se,
802
- columnKeys: Ne,
803
- containerRef: V,
804
- onSelectCell: zt,
805
- onEditingCellChange: Jt,
797
+ rowIds: ve,
798
+ columnKeys: Se,
799
+ containerRef: D,
800
+ onSelectCell: Jt,
801
+ onEditingCellChange: Qt,
806
802
  children: je
807
803
  }
808
804
  ) : je;
809
805
  }
810
- const co = sn(Hn);
806
+ const uo = ln(Un);
811
807
  export {
812
- co as TableComponent,
813
- co as default
808
+ uo as TableComponent,
809
+ uo as default
814
810
  };