@acronis-platform/ui-react 5.3.1 → 5.4.0

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.
@@ -8,11 +8,11 @@ import { DropdownMenu as ne, DropdownMenuContent as re, DropdownMenuTrigger as i
8
8
  import { Table as ae, TableActionsCell as oe, TableBody as se, TableCell as f, TableHead as ce, TableHeader as le, TableRow as p, TableSettingsCell as ue } from "../table/table.js";
9
9
  import { isBulkSelectionActive as de } from "./data-table-selection.js";
10
10
  import { DataTableViewOptions as fe } from "./data-table-view-options.js";
11
- import { Fragment as m, useEffect as h, useMemo as g, useRef as pe, useState as _ } from "react";
12
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
13
- import { EllipsisIcon as me } from "@acronis-platform/icons-react/stroke-mono";
11
+ import { Fragment as m, useEffect as pe, useMemo as h, useRef as me, useState as g } from "react";
12
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
13
+ import { EllipsisIcon as he } from "@acronis-platform/icons-react/stroke-mono";
14
14
  //#region src/components/ui/data-table/data-table.tsx
15
- function b(e) {
15
+ function y(e) {
16
16
  let t = e.getIsPinned();
17
17
  if (t) return {
18
18
  position: "sticky",
@@ -22,26 +22,26 @@ function b(e) {
22
22
  boxShadow: t === "left" ? "4px 0 4px -4px var(--ui-table-global-row-border-color)" : "-4px 0 4px -4px var(--ui-table-global-row-border-color)"
23
23
  };
24
24
  }
25
- function x(e, t) {
25
+ function b(e, t) {
26
26
  if (e.id === "select") return 48;
27
27
  if (t || e.columnDef.size !== void 0) return e.getSize();
28
28
  }
29
- function S(e, t) {
30
- let n = b(e.column), r = x(e.column, t);
29
+ function ge(e, t) {
30
+ let n = y(e.column), r = b(e.column, t);
31
31
  if (!(!n && r === void 0)) return {
32
32
  ...n,
33
33
  width: r
34
34
  };
35
35
  }
36
- function C(e, t) {
37
- let n = b(e.column), r = x(e.column, t);
36
+ function x(e, t) {
37
+ let n = y(e.column), r = b(e.column, t);
38
38
  if (!(!n && r === void 0)) return {
39
39
  ...n,
40
40
  width: r
41
41
  };
42
42
  }
43
- var w = 20, he = 2 ** 53 - 1;
44
- function ge(e, t, { shiftKey: n, min: r, max: i }) {
43
+ var S = 20, C = 2 ** 53 - 1;
44
+ function w(e, t, { shiftKey: n, min: r, max: i }) {
45
45
  let a = n ? 50 : 10;
46
46
  if (e === "ArrowLeft") return Math.min(i, Math.max(r, t - a));
47
47
  if (e === "ArrowRight") return Math.max(r, Math.min(i, t + a));
@@ -66,21 +66,21 @@ var _e = {
66
66
  action: "Drag border"
67
67
  }
68
68
  };
69
- function E({ columns: b = [], data: x = [], table: E, getRowCanExpand: ve, renderExpandedRow: D, striped: O = !1, bordered: ye = !1, highlightCurrentRow: k = !1, skeleton: A = !1, skeletonRows: be = 5, enableColumnResizing: j = !1, onColumnSizingChange: xe, enableColumnReordering: Se = !1, columnOrder: M, onColumnOrderChange: Ce, columnVisibility: we, onColumnVisibilityChange: Te, rowSelection: N, onRowSelectionChange: Ee, manualSorting: P = !1, sorting: F, onSortingChange: De, renderRow: I, renderEmptyState: L, paginationMode: R = "page", onLoadMore: Oe, loadMoreRootMargin: ke, hasNextPage: z = !1, resizeColumnLabel: Ae = "Resize column", emptyLabel: je = "No results.", isLoadingMore: B = !1, hideActionColumn: Me = !1, renderRowActions: V, rowActionsLabel: Ne = "Row actions", columnSettingsLabel: Pe, columnSearchPlaceholder: Fe, showAllColumnsLabel: Ie, noColumnsFoundLabel: Le, headerHints: Re }) {
70
- let H = {
69
+ function E({ columns: y = [], data: b = [], table: E, getRowId: ve, getRowCanExpand: ye, renderExpandedRow: D, striped: be = !1, bordered: xe = !1, highlightCurrentRow: O = !1, skeleton: k = !1, skeletonRows: Se = 5, enableColumnResizing: Ce = !1, onColumnSizingChange: we, enableColumnReordering: Te = !1, columnOrder: Ee, onColumnOrderChange: De, columnVisibility: Oe, onColumnVisibilityChange: ke, rowSelection: A, onRowSelectionChange: Ae, manualSorting: j = !1, sorting: M, onSortingChange: je, renderRow: N, renderEmptyState: P, paginationMode: F = "page", onLoadMore: Me, loadMoreRootMargin: Ne, hasNextPage: I = !1, resizeColumnLabel: Pe = "Resize column", emptyLabel: Fe = "No results.", isLoadingMore: L = !1, hideActionColumn: Ie = !1, renderRowActions: R, rowActionsLabel: Le = "Row actions", columnSettingsLabel: Re, columnSearchPlaceholder: ze, showAllColumnsLabel: Be, noColumnsFoundLabel: Ve, headerHints: He }) {
70
+ let z = {
71
71
  ..._e,
72
- ...Re
73
- }, [ze, Be] = _([]), Ve = F ?? ze, [He, Ue] = _([]), [We, Ge] = _({}), Ke = we ?? We, [qe, Je] = _({}), Ye = N ?? qe, [Xe, Ze] = _({}), [Qe, $e] = _({}), [et, tt] = _([]), nt = M ?? et, [U, W] = _(), [rt, it] = _(), [at, G] = _(0), K = pe([]), ot = (e) => {
74
- $e(e), xe?.(e);
75
- }, st = (e) => {
76
- M === void 0 && tt(e), Ce?.(e);
77
- }, ct = (e) => {
78
- Ge(e), Te?.(e);
79
- }, lt = (e) => {
80
- F === void 0 && Be(e), De?.(e);
81
- }, ut = (e) => {
82
- N === void 0 && Je(e), Ee?.(e);
83
- }, q = !Me && !E, dt = g(() => q ? [{
72
+ ...He
73
+ }, [Ue, We] = g([]), Ge = M ?? Ue, [Ke, qe] = g([]), [Je, Ye] = g({}), Xe = Oe ?? Je, [Ze, Qe] = g({}), $e = A ?? Ze, [et, tt] = g({}), [nt, rt] = g({}), [it, at] = g([]), ot = Ee ?? it, [B, V] = g(), [st, ct] = g(), [lt, H] = g(0), U = me([]), ut = (e) => {
74
+ rt(e), we?.(e);
75
+ }, dt = (e) => {
76
+ Ee === void 0 && at(e), De?.(e);
77
+ }, ft = (e) => {
78
+ Ye(e), ke?.(e);
79
+ }, pt = (e) => {
80
+ M === void 0 && We(e), je?.(e);
81
+ }, mt = (e) => {
82
+ A === void 0 && Qe(e), Ae?.(e);
83
+ }, W = !Ie && !E, G = h(() => W ? [{
84
84
  id: "__actions",
85
85
  size: 48,
86
86
  enableSorting: !1,
@@ -88,135 +88,136 @@ function E({ columns: b = [], data: x = [], table: E, getRowCanExpand: ve, rende
88
88
  meta: { pin: "right" },
89
89
  header: () => null,
90
90
  cell: () => null
91
- }] : [], [q]), ft = g(() => [...b, ...dt], [b, dt]), [pt, mt] = _(), ht = te({
92
- data: x,
93
- columns: ft,
94
- enableColumnResizing: j,
91
+ }] : [], [W]), K = h(() => [...y, ...G], [y, G]), [ht, q] = g(), gt = te({
92
+ data: b,
93
+ columns: K,
94
+ getRowId: ve,
95
+ enableColumnResizing: Ce,
95
96
  columnResizeMode: "onChange",
96
97
  getCoreRowModel: s(),
97
98
  getExpandedRowModel: c(),
98
- ...R === "page" ? { getPaginationRowModel: u() } : {},
99
- getRowCanExpand: ve,
100
- onExpandedChange: Ze,
101
- manualSorting: P,
102
- onSortingChange: lt,
103
- ...P ? {} : { getSortedRowModel: ee() },
104
- onColumnFiltersChange: Ue,
99
+ ...F === "page" ? { getPaginationRowModel: u() } : {},
100
+ getRowCanExpand: ye,
101
+ onExpandedChange: tt,
102
+ manualSorting: j,
103
+ onSortingChange: pt,
104
+ ...j ? {} : { getSortedRowModel: ee() },
105
+ onColumnFiltersChange: qe,
105
106
  getFilteredRowModel: l(),
106
- onColumnVisibilityChange: ct,
107
- onRowSelectionChange: ut,
108
- onColumnSizingChange: ot,
109
- onColumnOrderChange: st,
110
- initialState: q ? { columnPinning: { right: ["__actions"] } } : void 0,
107
+ onColumnVisibilityChange: ft,
108
+ onRowSelectionChange: mt,
109
+ onColumnSizingChange: ut,
110
+ onColumnOrderChange: dt,
111
+ initialState: W ? { columnPinning: { right: ["__actions"] } } : void 0,
111
112
  state: {
112
- sorting: Ve,
113
- columnFilters: He,
114
- columnVisibility: Ke,
115
- rowSelection: Ye,
116
- expanded: Xe,
117
- columnSizing: Qe,
118
- columnOrder: nt
113
+ sorting: Ge,
114
+ columnFilters: Ke,
115
+ columnVisibility: Xe,
116
+ rowSelection: $e,
117
+ expanded: et,
118
+ columnSizing: nt,
119
+ columnOrder: ot
119
120
  }
120
- }), J = E ?? ht, Y = !E && R === "infinite", X = j && !E, gt = Se && !E, Z = !!J.getState().columnSizingInfo.isResizingColumn;
121
- h(() => {
121
+ }), J = E ?? gt, Y = !E && F === "infinite", X = Ce && !E, _t = Te && !E, Z = !!J.getState().columnSizingInfo.isResizingColumn;
122
+ pe(() => {
122
123
  if (Z) return document.documentElement.setAttribute("data-ui-column-resizing", ""), () => {
123
124
  document.documentElement.removeAttribute("data-ui-column-resizing");
124
125
  };
125
126
  }, [Z]);
126
- let _t = t({
127
- onIntersect: () => Oe?.(),
128
- disabled: !Y || !z || B,
129
- rootMargin: ke
130
- }), vt = (e, t) => {
127
+ let vt = t({
128
+ onIntersect: () => Me?.(),
129
+ disabled: !Y || !I || L,
130
+ rootMargin: Ne
131
+ }), yt = (e, t) => {
131
132
  if (e.ctrlKey || e.altKey || e.metaKey) return;
132
- let n = ge(e.key, t.column.getSize(), {
133
+ let n = w(e.key, t.column.getSize(), {
133
134
  shiftKey: e.shiftKey,
134
- min: t.column.columnDef.minSize ?? w,
135
- max: t.column.columnDef.maxSize ?? he
135
+ min: t.column.columnDef.minSize ?? S,
136
+ max: t.column.columnDef.maxSize ?? C
136
137
  });
137
138
  n !== void 0 && (e.preventDefault(), J.setColumnSizing((e) => ({
138
139
  ...e,
139
140
  [t.column.id]: n
140
141
  })));
141
- }, yt = (e, t) => {
142
- e.dataTransfer && (e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain", t)), W(t);
143
- }, bt = (e) => {
142
+ }, bt = (e, t) => {
143
+ e.dataTransfer && (e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain", t)), V(t);
144
+ }, xt = (e) => {
144
145
  e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = "move");
145
- }, xt = (e, t) => {
146
- if (e.preventDefault(), !U) return;
146
+ }, St = (e, t) => {
147
+ if (e.preventDefault(), !B) return;
147
148
  let n = J.getState().columnOrder, r = n.length ? n : J.getAllLeafColumns().map((e) => e.id);
148
- J.setColumnOrder(T(r, U, t)), W(void 0);
149
+ J.setColumnOrder(T(r, B, t)), V(void 0);
149
150
  };
150
- h(() => {
151
+ pe(() => {
151
152
  E || J.getAllLeafColumns().forEach((e) => {
152
153
  e.pin(e.columnDef.meta?.pin ?? !1);
153
154
  });
154
155
  }, [
155
156
  J,
156
- ft,
157
+ K,
157
158
  E
158
159
  ]);
159
- let Q = J.getRowModel().rows, $ = de(J), St = Q.length ? Math.min(at, Q.length - 1) : 0, Ct = (e) => {
160
- G(e);
161
- }, wt = (e, t) => {
160
+ let Q = J.getRowModel().rows, $ = de(J), Ct = Q.length ? Math.min(lt, Q.length - 1) : 0, wt = (e) => {
161
+ H(e);
162
+ }, Tt = (e, t) => {
162
163
  if (e.target !== e.currentTarget || e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
163
164
  let n = e.key === "ArrowDown" ? Math.min(t + 1, Q.length - 1) : Math.max(t - 1, 0);
164
- n !== t && (e.preventDefault(), G(n), K.current[n]?.focus());
165
- }, Tt = ye ? "[&_th:not(:last-child)]:border-e [&_td:not(:last-child)]:border-e [&_th]:border-[var(--ui-table-global-row-border-color)] [&_td]:border-[var(--ui-table-global-row-border-color)]" : void 0, Et = "bg-background";
166
- return /* @__PURE__ */ v("div", {
167
- className: e("rounded-md border border-[var(--ui-table-global-row-border-color)]", Tt),
168
- children: /* @__PURE__ */ y(ae, {
165
+ n !== t && (e.preventDefault(), H(n), U.current[n]?.focus());
166
+ }, Et = xe ? "[&_th:not(:last-child)]:border-e [&_td:not(:last-child)]:border-e [&_th]:border-[var(--ui-table-global-row-border-color)] [&_td]:border-[var(--ui-table-global-row-border-color)]" : void 0, Dt = "bg-background";
167
+ return /* @__PURE__ */ _("div", {
168
+ className: e("rounded-md border border-[var(--ui-table-global-row-border-color)]", Et),
169
+ children: /* @__PURE__ */ v(ae, {
169
170
  style: X ? { width: J.getCenterTotalSize() } : void 0,
170
- children: [/* @__PURE__ */ v(a, { children: /* @__PURE__ */ v(le, { children: J.getHeaderGroups().map((t) => /* @__PURE__ */ v(p, {
171
+ children: [/* @__PURE__ */ _(a, { children: /* @__PURE__ */ _(le, { children: J.getHeaderGroups().map((t) => /* @__PURE__ */ _(p, {
171
172
  className: "hover:bg-transparent",
172
173
  children: t.headers.map((t) => {
173
- let n = t.column.getIsPinned(), a = X && t.column.getCanResize() && t.column.id !== "select", s = gt && !t.isPlaceholder && !n, c = !t.isPlaceholder && t.column.getCanSort(), l = [
174
- c && H.sort,
175
- s && H.reorder,
176
- a && H.resize
174
+ let n = t.column.getIsPinned(), a = X && t.column.getCanResize() && t.column.id !== "select", s = _t && !t.isPlaceholder && !n, c = !t.isPlaceholder && t.column.getCanSort(), l = [
175
+ c && z.sort,
176
+ s && z.reorder,
177
+ a && z.resize
177
178
  ].filter((e) => !!e);
178
- if (t.column.id === "__actions") return /* @__PURE__ */ v(ue, {
179
- style: S(t, X),
180
- className: Et,
181
- children: /* @__PURE__ */ v(fe, {
179
+ if (t.column.id === "__actions") return /* @__PURE__ */ _(ue, {
180
+ style: ge(t, X),
181
+ className: Dt,
182
+ children: /* @__PURE__ */ _(fe, {
182
183
  table: J,
183
184
  iconOnly: !0,
184
- triggerAriaLabel: Pe,
185
- searchPlaceholder: Fe,
186
- showAllLabel: Ie,
187
- noResultsLabel: Le
185
+ triggerAriaLabel: Re,
186
+ searchPlaceholder: ze,
187
+ showAllLabel: Be,
188
+ noResultsLabel: Ve
188
189
  })
189
190
  }, t.id);
190
- let u = /* @__PURE__ */ y(ce, {
191
+ let u = /* @__PURE__ */ v(ce, {
191
192
  wrap: t.column.columnDef.meta?.wrap,
192
- style: S(t, X),
193
+ style: ge(t, X),
193
194
  draggable: s && !Z || void 0,
194
- onDragStart: s ? (e) => yt(e, t.column.id) : void 0,
195
- onDragOver: s ? bt : void 0,
196
- onDrop: s ? (e) => xt(e, t.column.id) : void 0,
197
- onDragEnd: s ? () => W(void 0) : void 0,
198
- className: e(a && "relative", c && !Z && "transition-colors hover:bg-[var(--ui-table-header-cell-color-hover)] active:bg-[var(--ui-table-header-cell-color-active)]", s && !Z && "cursor-grab select-none active:cursor-grabbing", s && U === t.column.id && "opacity-50", n && Et),
199
- children: [t.isPlaceholder ? null : d(t.column.columnDef.header, t.getContext()), a && /* @__PURE__ */ v("div", {
195
+ onDragStart: s ? (e) => bt(e, t.column.id) : void 0,
196
+ onDragOver: s ? xt : void 0,
197
+ onDrop: s ? (e) => St(e, t.column.id) : void 0,
198
+ onDragEnd: s ? () => V(void 0) : void 0,
199
+ className: e(a && "relative", c && !Z && "transition-colors hover:bg-[var(--ui-table-header-cell-color-hover)] active:bg-[var(--ui-table-header-cell-color-active)]", s && !Z && "cursor-grab select-none active:cursor-grabbing", s && B === t.column.id && "opacity-50", n && Dt),
200
+ children: [t.isPlaceholder ? null : d(t.column.columnDef.header, t.getContext()), a && /* @__PURE__ */ _("div", {
200
201
  role: "separator",
201
202
  "aria-orientation": "vertical",
202
- "aria-label": Ae,
203
+ "aria-label": Pe,
203
204
  "aria-valuenow": t.column.getSize(),
204
- "aria-valuemin": t.column.columnDef.minSize ?? w,
205
- "aria-valuemax": t.column.columnDef.maxSize ?? he,
205
+ "aria-valuemin": t.column.columnDef.minSize ?? S,
206
+ "aria-valuemax": t.column.columnDef.maxSize ?? C,
206
207
  tabIndex: 0,
207
208
  draggable: !1,
208
209
  onMouseDown: t.getResizeHandler(),
209
210
  onTouchStart: t.getResizeHandler(),
210
- onKeyDown: (e) => vt(e, t),
211
+ onKeyDown: (e) => yt(e, t),
211
212
  className: e("absolute end-0 top-0 h-full w-1 cursor-(--ui-resizable-cursor) touch-none select-none bg-[var(--ui-table-global-row-border-color)] opacity-0 transition-[opacity,background-color] hover:bg-[var(--ui-resizable-border-color-hover)] hover:opacity-100 focus-visible:bg-[var(--ui-resizable-border-color-hover)] focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-inset focus-visible:ring-[var(--ui-focus-primary)]", t.column.getIsResizing() && "bg-[var(--ui-resizable-border-color-active)] opacity-100")
212
213
  })]
213
214
  });
214
- return l.length === 0 ? /* @__PURE__ */ v(m, { children: u }, t.id) : /* @__PURE__ */ y(r, {
215
- disabled: Z || U !== void 0,
216
- children: [/* @__PURE__ */ v(o, { render: u }), /* @__PURE__ */ v(i, {
215
+ return l.length === 0 ? /* @__PURE__ */ _(m, { children: u }, t.id) : /* @__PURE__ */ v(r, {
216
+ disabled: Z || B !== void 0,
217
+ children: [/* @__PURE__ */ _(o, { render: u }), /* @__PURE__ */ _(i, {
217
218
  className: "flex flex-col gap-1",
218
- children: l.map((e) => /* @__PURE__ */ y("span", { children: [
219
- /* @__PURE__ */ y("span", {
219
+ children: l.map((e) => /* @__PURE__ */ v("span", { children: [
220
+ /* @__PURE__ */ v("span", {
220
221
  className: "font-semibold",
221
222
  children: [e.label, ":"]
222
223
  }),
@@ -226,80 +227,80 @@ function E({ columns: b = [], data: x = [], table: E, getRowCanExpand: ve, rende
226
227
  })]
227
228
  }, t.id);
228
229
  })
229
- }, t.id)) }) }), /* @__PURE__ */ y(se, { children: [
230
- A ? Array.from({ length: be }).map((e, t) => /* @__PURE__ */ v(p, {
230
+ }, t.id)) }) }), /* @__PURE__ */ v(se, { children: [
231
+ k ? Array.from({ length: Se }).map((e, t) => /* @__PURE__ */ _(p, {
231
232
  className: "hover:bg-transparent",
232
- children: J.getVisibleLeafColumns().map((e) => /* @__PURE__ */ v(f, { children: /* @__PURE__ */ v("div", { className: "h-4 w-full animate-pulse rounded bg-[var(--ui-background-surface-secondary)]" }) }, e.id))
233
+ children: J.getVisibleLeafColumns().map((e) => /* @__PURE__ */ _(f, { children: /* @__PURE__ */ _("div", { className: "h-4 w-full animate-pulse rounded bg-[var(--ui-background-surface-secondary)]" }) }, e.id))
233
234
  }, `skeleton-${t}`)) : Q?.length ? Q.map((t, r) => {
234
- if (I) return /* @__PURE__ */ v(m, { children: I(t, r) }, t.id);
235
- let i = t.getIsSelected(), a = k && rt === t.id, o = i || a ? "bg-[var(--ui-table-data-row-color-active)]" : O && r % 2 == 1 ? "bg-[var(--ui-background-surface-secondary)]" : "bg-background group-hover:bg-[var(--ui-table-data-row-color-hover)]", s = !$ && pt === t.id;
236
- return /* @__PURE__ */ y(m, { children: [/* @__PURE__ */ v(p, {
235
+ if (N) return /* @__PURE__ */ _(m, { children: N(t, r) }, t.id);
236
+ let i = t.getIsSelected(), a = O && st === t.id, o = i || a ? "bg-[var(--ui-table-data-row-color-active)]" : be && r % 2 == 1 ? "bg-[var(--ui-background-surface-secondary)]" : "bg-background group-hover:bg-[var(--ui-table-data-row-color-hover)]", s = !$ && ht === t.id;
237
+ return /* @__PURE__ */ v(m, { children: [/* @__PURE__ */ _(p, {
237
238
  ref: (e) => {
238
- K.current[r] = e;
239
+ U.current[r] = e;
239
240
  },
240
- tabIndex: r === St ? 0 : -1,
241
- onFocus: () => Ct(r),
242
- onKeyDown: (e) => wt(e, r),
241
+ tabIndex: r === Ct ? 0 : -1,
242
+ onFocus: () => wt(r),
243
+ onKeyDown: (e) => Tt(e, r),
243
244
  selected: i,
244
- onClick: k ? () => it(t.id) : void 0,
245
- className: e("group", k && "cursor-pointer", O && r % 2 == 1 && !i && !a && "bg-[var(--ui-background-surface-secondary)]", a && !i && "bg-[var(--ui-table-data-row-color-active)]", s && "hover:bg-transparent"),
245
+ onClick: O ? () => ct(t.id) : void 0,
246
+ className: e("group", O && "cursor-pointer", be && r % 2 == 1 && !i && !a && "bg-[var(--ui-background-surface-secondary)]", a && !i && "bg-[var(--ui-table-data-row-color-active)]", s && "hover:bg-transparent"),
246
247
  children: t.getVisibleCells().map((r) => {
247
248
  let i = r.column.getIsPinned();
248
- return r.column.id === "__actions" ? /* @__PURE__ */ v(oe, {
249
- style: C(r, X),
249
+ return r.column.id === "__actions" ? /* @__PURE__ */ _(oe, {
250
+ style: x(r, X),
250
251
  className: o,
251
252
  bulkSelectionActive: $,
252
- onMouseEnter: $ ? void 0 : () => mt(t.id),
253
- onMouseLeave: $ ? void 0 : () => mt((e) => e === t.id ? void 0 : e),
254
- children: V && /* @__PURE__ */ y(ne, { children: [/* @__PURE__ */ v(ie, {
255
- render: /* @__PURE__ */ v(n, { "aria-label": Ne }),
256
- children: /* @__PURE__ */ v(me, {})
257
- }), /* @__PURE__ */ v(re, {
253
+ onMouseEnter: $ ? void 0 : () => q(t.id),
254
+ onMouseLeave: $ ? void 0 : () => q((e) => e === t.id ? void 0 : e),
255
+ children: R && /* @__PURE__ */ v(ne, { children: [/* @__PURE__ */ _(ie, {
256
+ render: /* @__PURE__ */ _(n, { "aria-label": Le }),
257
+ children: /* @__PURE__ */ _(he, {})
258
+ }), /* @__PURE__ */ _(re, {
258
259
  align: "end",
259
- children: V(t)
260
+ children: R(t)
260
261
  })] })
261
- }, r.id) : /* @__PURE__ */ v(f, {
262
+ }, r.id) : /* @__PURE__ */ _(f, {
262
263
  wrap: r.column.columnDef.meta?.wrap,
263
- style: C(r, X),
264
+ style: x(r, X),
264
265
  className: e(i && o),
265
266
  children: d(r.column.columnDef.cell, r.getContext())
266
267
  }, r.id);
267
268
  })
268
- }), D && t.getIsExpanded() && /* @__PURE__ */ v(p, {
269
+ }), D && t.getIsExpanded() && /* @__PURE__ */ _(p, {
269
270
  className: "hover:bg-transparent",
270
- children: /* @__PURE__ */ v(f, {
271
+ children: /* @__PURE__ */ _(f, {
271
272
  className: "h-auto py-3",
272
273
  colSpan: t.getVisibleCells().length,
273
274
  children: D(t)
274
275
  })
275
276
  })] }, t.id);
276
- }) : L ? /* @__PURE__ */ v(p, { children: /* @__PURE__ */ v(f, {
277
+ }) : P ? /* @__PURE__ */ _(p, { children: /* @__PURE__ */ _(f, {
277
278
  colSpan: J.getVisibleLeafColumns().length,
278
279
  className: "h-24 text-center",
279
- children: L({ hasFilters: J.getState().columnFilters.length > 0 })
280
- }) }) : /* @__PURE__ */ v(p, { children: /* @__PURE__ */ v(f, {
280
+ children: P({ hasFilters: J.getState().columnFilters.length > 0 })
281
+ }) }) : /* @__PURE__ */ _(p, { children: /* @__PURE__ */ _(f, {
281
282
  colSpan: J.getVisibleLeafColumns().length,
282
283
  className: "h-24 text-center text-[var(--ui-table-data-value-color-disabled)]",
283
- children: je
284
+ children: Fe
284
285
  }) }),
285
- Y && !A && Q.length > 0 && z && /* @__PURE__ */ v(p, {
286
- ref: _t,
286
+ Y && !k && Q.length > 0 && I && /* @__PURE__ */ _(p, {
287
+ ref: vt,
287
288
  "aria-hidden": !0,
288
289
  className: "hover:bg-transparent",
289
- children: /* @__PURE__ */ v(f, {
290
+ children: /* @__PURE__ */ _(f, {
290
291
  colSpan: J.getVisibleLeafColumns().length,
291
292
  className: "h-1 p-0"
292
293
  })
293
294
  }),
294
- Y && !A && Q.length > 0 && B && /* @__PURE__ */ v(p, {
295
+ Y && !k && Q.length > 0 && L && /* @__PURE__ */ _(p, {
295
296
  className: "hover:bg-transparent",
296
- children: /* @__PURE__ */ v(f, {
297
+ children: /* @__PURE__ */ _(f, {
297
298
  colSpan: J.getVisibleLeafColumns().length,
298
- children: /* @__PURE__ */ v("div", {
299
+ children: /* @__PURE__ */ _("div", {
299
300
  role: "status",
300
301
  "aria-live": "polite",
301
302
  className: "h-4 w-full animate-pulse rounded bg-[var(--ui-background-surface-secondary)]",
302
- children: /* @__PURE__ */ v("span", {
303
+ children: /* @__PURE__ */ _("span", {
303
304
  className: "sr-only",
304
305
  children: "Loading more rows…"
305
306
  })
@@ -311,6 +312,6 @@ function E({ columns: b = [], data: x = [], table: E, getRowCanExpand: ve, rende
311
312
  });
312
313
  }
313
314
  //#endregion
314
- export { E as DataTable, C as getCellStyle, x as getColumnWidth, b as getPinnedStyle, ge as getResizeKeyboardStep, T as reorderColumn };
315
+ export { E as DataTable, x as getCellStyle, b as getColumnWidth, y as getPinnedStyle, w as getResizeKeyboardStep, T as reorderColumn };
315
316
 
316
317
  //# sourceMappingURL=data-table.js.map