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