@acronis-platform/ui-react 5.4.0 → 5.4.2

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