@actioneer/ads 0.5.7 → 0.5.8
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.
- package/bin/ads-init.mjs +6 -0
- package/components/accordion.js +50 -48
- package/components/agent-icon.d.ts +12 -0
- package/components/agent-icon.js +133 -120
- package/components/ai-elements/chain-of-thought.d.ts +1 -1
- package/components/ai-elements/chain-of-thought.js +108 -108
- package/components/ai-elements/chart.js +16 -14
- package/components/ai-elements/inline-citation.js +41 -41
- package/components/ai-elements/message.js +4 -4
- package/components/ai-elements/queue.js +7 -7
- package/components/ai-elements/research-activity.js +114 -114
- package/components/ai-elements/shimmer.d.ts +2 -2
- package/components/ai-elements/speech-input.js +28 -28
- package/components/ai-elements/task-progress.js +26 -16
- package/components/ai-elements/task.js +17 -17
- package/components/ai-elements/tool.js +6 -6
- package/components/ai-elements/transcript.js +6 -5
- package/components/ai-elements/voice.js +1 -1
- package/components/alert.js +10 -10
- package/components/answer-sources.js +1 -1
- package/components/answer.js +115 -114
- package/components/assistant-ui/action-bar.js +94 -48
- package/components/assistant-ui/attachment.js +103 -75
- package/components/assistant-ui/badge.d.ts +1 -1
- package/components/assistant-ui/badge.js +17 -17
- package/components/assistant-ui/chain-of-thought.d.ts +1 -1
- package/components/assistant-ui/composer-add-context.js +9 -9
- package/components/assistant-ui/composer-deep-research.js +5 -5
- package/components/assistant-ui/composer-harness.js +11 -9
- package/components/assistant-ui/composer-trigger-popover.js +45 -34
- package/components/assistant-ui/composer.js +59 -59
- package/components/assistant-ui/error.js +14 -14
- package/components/assistant-ui/file.d.ts +1 -1
- package/components/assistant-ui/image.d.ts +1 -1
- package/components/assistant-ui/image.js +113 -103
- package/components/assistant-ui/markdown-text.js +18 -18
- package/components/assistant-ui/message.js +46 -45
- package/components/assistant-ui/quote.js +1 -1
- package/components/assistant-ui/reasoning.d.ts +1 -1
- package/components/assistant-ui/reasoning.js +66 -77
- package/components/assistant-ui/suggestions.js +4 -4
- package/components/assistant-ui/thread.js +22 -22
- package/components/assistant-ui/tool-fallback.js +60 -63
- package/components/assistant-ui/tool-group.d.ts +1 -1
- package/components/assistant-ui/tool-group.js +36 -42
- package/components/audio-waveform.js +25 -24
- package/components/autocomplete.d.ts +1 -0
- package/components/autocomplete.js +45 -43
- package/components/avatar.js +24 -24
- package/components/badge.d.ts +1 -1
- package/components/breadcrumbs.js +2 -2
- package/components/button.d.ts +2 -2
- package/components/button.js +22 -20
- package/components/card.js +8 -8
- package/components/carousel.js +105 -104
- package/components/chart.js +9 -7
- package/components/checkbox.js +74 -38
- package/components/chip.d.ts +1 -1
- package/components/code-block.js +3 -3
- package/components/collapsible.js +67 -23
- package/components/connector-card.js +6 -6
- package/components/drawer.d.ts +15 -10
- package/components/drawer.js +78 -77
- package/components/dropdown.d.ts +2 -0
- package/components/dropdown.js +88 -79
- package/components/empty-state.d.ts +1 -1
- package/components/empty-state.js +7 -7
- package/components/field.d.ts +4 -0
- package/components/field.js +45 -34
- package/components/file-dropzone.js +12 -12
- package/components/index.d.ts +3 -0
- package/components/index.js +584 -558
- package/components/input-field.js +51 -46
- package/components/input.js +20 -20
- package/components/link.js +9 -9
- package/components/modal.js +105 -73
- package/components/navbar.d.ts +1 -1
- package/components/navbar.js +1 -1
- package/components/number-field.js +38 -29
- package/components/page-header.js +12 -12
- package/components/pagination.js +19 -19
- package/components/panel.js +2 -2
- package/components/pixel-blast-svg.js +3 -3
- package/components/pixel-icon.js +0 -1
- package/components/popover.d.ts +1 -1
- package/components/popover.js +66 -64
- package/components/progress-circle.js +36 -32
- package/components/progress.js +28 -24
- package/components/radio.js +59 -49
- package/components/resizable-panel.js +1 -1
- package/components/reveal.d.ts +2 -2
- package/components/ripple.d.ts +3 -3
- package/components/scroll-area.js +17 -16
- package/components/segmented.js +26 -26
- package/components/select.d.ts +2 -0
- package/components/select.js +61 -57
- package/components/setting-row.js +45 -42
- package/components/sidebar.js +131 -127
- package/components/skeleton.js +5 -5
- package/components/spinner.d.ts +13 -4
- package/components/spinner.js +42 -42
- package/components/stepper.js +21 -21
- package/components/switch.js +41 -39
- package/components/table.d.ts +9 -0
- package/components/table.js +370 -247
- package/components/tabs.js +149 -137
- package/components/toast.js +66 -66
- package/components/tooltip.js +2 -2
- package/components/tree.js +62 -51
- package/components/typography.d.ts +2 -1
- package/components/typography.js +33 -32
- package/components/ui/button.d.ts +2 -2
- package/components/ui/button.js +19 -19
- package/components/ui/collapsible.d.ts +1 -5
- package/components/ui/dialog.d.ts +3 -3
- package/components/ui/dialog.js +95 -58
- package/components/ui/tooltip.d.ts +2 -2
- package/components/ui/tooltip.js +67 -33
- package/components/viz-charts.js +95 -95
- package/demo/components/add-to-artifact.js +341 -0
- package/demo/lib/artifact-library.js +134 -0
- package/fonts/aribau-grotesk-medium.woff2 +0 -0
- package/fonts/aribau-grotesk-regular.woff2 +0 -0
- package/fonts.css +11 -11
- package/hooks/agents-ui/use-agent-audio-visualizer-aura.js +17 -16
- package/hooks/agents-ui/use-agent-audio-visualizer-wave.js +21 -20
- package/lib/icons.d.ts +4 -0
- package/lib/icons.js +103 -102
- package/lib/motion.d.ts +42 -39
- package/lib/motion.js +112 -52
- package/lib/spinner-mark.d.ts +9 -0
- package/lib/spinner-mark.js +98 -0
- package/llms.txt +52 -18
- package/manifest.json +240 -31
- package/package.json +1 -1
- package/styles.css +143 -124
- package/theme.css +90 -93
- package/components/ui/collapsible.js +0 -35
- package/fonts/aribau-grotesk-500.otf +0 -0
- package/fonts/aribau-grotesk-600.woff2 +0 -0
package/components/table.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as d, jsxs as
|
|
3
|
-
import * as
|
|
2
|
+
import { jsx as d, jsxs as _ } from "react/jsx-runtime";
|
|
3
|
+
import * as o from "react";
|
|
4
4
|
import { cn as u } from "../lib/cn.js";
|
|
5
|
-
import { Checkbox as
|
|
6
|
-
import { ChevronUp as
|
|
7
|
-
const
|
|
5
|
+
import { Checkbox as re } from "./checkbox.js";
|
|
6
|
+
import { ChevronUp as be, ChevronDown as ge, SortIcon as he } from "../lib/icons.js";
|
|
7
|
+
const ne = (e) => e === "center" ? "text-center" : e === "right" ? "text-right" : "text-left", ae = (e, t = !1) => e === "left" ? u(
|
|
8
8
|
"sticky left-0 z-10",
|
|
9
9
|
// Scroll-aware: the smudge only appears once content is actually
|
|
10
10
|
// hidden behind the pinned column (nothing to scroll back to at the
|
|
@@ -15,13 +15,13 @@ const W = (e) => e === "center" ? "text-center" : e === "right" ? "text-right" :
|
|
|
15
15
|
// Backward-compatible fallback. Action columns should opt into the
|
|
16
16
|
// Table-level elevation so one shadow spans the complete column.
|
|
17
17
|
!t && "group-data-[scroll-right=true]/table-shell:shadow-table-smudge-right"
|
|
18
|
-
) : void 0,
|
|
19
|
-
"group-first/row:before:pointer-events-none group-first/row:before:absolute group-first/row:before:right-0 group-first/row:before:top-0 group-first/row:before:size-
|
|
20
|
-
"group-last/row:after:pointer-events-none group-last/row:after:absolute group-last/row:after:right-0 group-last/row:after:bottom-0 group-last/row:after:size-
|
|
18
|
+
) : void 0, se = (e) => e === "right" ? u(
|
|
19
|
+
"group-first/row:before:pointer-events-none group-first/row:before:absolute group-first/row:before:right-0 group-first/row:before:top-0 group-first/row:before:size-3 group-first/row:before:content-[''] group-first/row:before:[background:radial-gradient(circle_at_0%_100%,transparent_11.5px,var(--table-shell)_12px)]",
|
|
20
|
+
"group-last/row:after:pointer-events-none group-last/row:after:absolute group-last/row:after:right-0 group-last/row:after:bottom-0 group-last/row:after:size-3 group-last/row:after:content-[''] group-last/row:after:[background:radial-gradient(circle_at_0%_0%,transparent_11.5px,var(--table-shell)_12px)]"
|
|
21
21
|
) : u(
|
|
22
|
-
"group-first/row:before:pointer-events-none group-first/row:before:absolute group-first/row:before:left-0 group-first/row:before:top-0 group-first/row:before:size-
|
|
23
|
-
"group-last/row:after:pointer-events-none group-last/row:after:absolute group-last/row:after:left-0 group-last/row:after:bottom-0 group-last/row:after:size-
|
|
24
|
-
),
|
|
22
|
+
"group-first/row:before:pointer-events-none group-first/row:before:absolute group-first/row:before:left-0 group-first/row:before:top-0 group-first/row:before:size-3 group-first/row:before:content-[''] group-first/row:before:[background:radial-gradient(circle_at_100%_100%,transparent_11.5px,var(--table-shell)_12px)]",
|
|
23
|
+
"group-last/row:after:pointer-events-none group-last/row:after:absolute group-last/row:after:left-0 group-last/row:after:bottom-0 group-last/row:after:size-3 group-last/row:after:content-[''] group-last/row:after:[background:radial-gradient(circle_at_100%_0%,transparent_11.5px,var(--table-shell)_12px)]"
|
|
24
|
+
), ie = (e) => u(
|
|
25
25
|
"bg-card align-middle transition-colors",
|
|
26
26
|
// Row separators — functional hairline, none under the last row.
|
|
27
27
|
"border-b border-border group-last/row:border-b-0",
|
|
@@ -33,45 +33,45 @@ const W = (e) => e === "center" ? "text-center" : e === "right" ? "text-right" :
|
|
|
33
33
|
"group-hover/row:bg-(--table-row-hover) group-focus-within/row:bg-(--table-row-hover)",
|
|
34
34
|
"group-data-[selected]/row:bg-(--table-row-selected)"
|
|
35
35
|
)
|
|
36
|
-
),
|
|
37
|
-
"group-first/row:rounded-tl-
|
|
38
|
-
"group-last/row:rounded-bl-
|
|
39
|
-
),
|
|
40
|
-
"group-first/row:first:rounded-tl-
|
|
41
|
-
"group-first/row:last:rounded-tr-
|
|
42
|
-
"group-last/row:first:rounded-bl-
|
|
43
|
-
"group-last/row:last:rounded-br-
|
|
44
|
-
),
|
|
36
|
+
), we = u(
|
|
37
|
+
"group-first/row:rounded-tl-(--table-card-radius)",
|
|
38
|
+
"group-last/row:rounded-bl-(--table-card-radius)"
|
|
39
|
+
), ve = u(
|
|
40
|
+
"group-first/row:first:rounded-tl-(--table-card-radius)",
|
|
41
|
+
"group-first/row:last:rounded-tr-(--table-card-radius)",
|
|
42
|
+
"group-last/row:first:rounded-bl-(--table-card-radius)",
|
|
43
|
+
"group-last/row:last:rounded-br-(--table-card-radius)"
|
|
44
|
+
), le = u(
|
|
45
45
|
"after:pointer-events-none after:absolute after:right-0 after:top-1/2",
|
|
46
46
|
"after:h-4 after:w-px after:-translate-y-1/2 after:rounded-sm",
|
|
47
47
|
"after:bg-border-strong last:after:hidden"
|
|
48
|
-
),
|
|
48
|
+
), K = "__ads_table_column_", G = 64, xe = new Intl.Collator(void 0, {
|
|
49
49
|
numeric: !0,
|
|
50
50
|
sensitivity: "base"
|
|
51
51
|
});
|
|
52
|
-
function
|
|
52
|
+
function V(e) {
|
|
53
53
|
const t = [];
|
|
54
|
-
return
|
|
55
|
-
if (
|
|
56
|
-
t.push(...
|
|
54
|
+
return o.Children.forEach(e, (a) => {
|
|
55
|
+
if (o.isValidElement(a) && a.type === o.Fragment) {
|
|
56
|
+
t.push(...V(a.props.children));
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
|
-
t.push(
|
|
59
|
+
t.push(a);
|
|
60
60
|
}), t;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function U(e) {
|
|
63
63
|
if (e == null || typeof e == "boolean")
|
|
64
64
|
return "";
|
|
65
65
|
if (typeof e == "number" || typeof e == "string") return e;
|
|
66
66
|
if (Array.isArray(e))
|
|
67
|
-
return e.map((
|
|
68
|
-
if (!
|
|
67
|
+
return e.map((n) => String(U(n))).join(" ").trim();
|
|
68
|
+
if (!o.isValidElement(e)) return "";
|
|
69
69
|
const t = e.props.sortValue;
|
|
70
70
|
if (typeof t == "string" || typeof t == "number" || t instanceof Date)
|
|
71
71
|
return t;
|
|
72
|
-
const
|
|
73
|
-
if (String(
|
|
74
|
-
for (const
|
|
72
|
+
const a = U(e.props.children);
|
|
73
|
+
if (String(a).trim()) return a;
|
|
74
|
+
for (const n of [
|
|
75
75
|
"value",
|
|
76
76
|
"label",
|
|
77
77
|
"status",
|
|
@@ -79,12 +79,12 @@ function D(e) {
|
|
|
79
79
|
"title",
|
|
80
80
|
"health"
|
|
81
81
|
]) {
|
|
82
|
-
const
|
|
83
|
-
if (typeof
|
|
82
|
+
const s = e.props[n];
|
|
83
|
+
if (typeof s == "string" || typeof s == "number") return s;
|
|
84
84
|
}
|
|
85
85
|
return "";
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function oe(e) {
|
|
88
88
|
if (e instanceof Date)
|
|
89
89
|
return { kind: "number", value: e.getTime() };
|
|
90
90
|
if (typeof e == "number")
|
|
@@ -92,194 +92,239 @@ function J(e) {
|
|
|
92
92
|
const t = e.trim();
|
|
93
93
|
if (!t || t === "—" || t === "-")
|
|
94
94
|
return { kind: "empty", value: "" };
|
|
95
|
-
const
|
|
96
|
-
if (/^[+-]?(?:\d+\.?\d*|\.\d+)$/.test(
|
|
97
|
-
return { kind: "number", value: Number(
|
|
98
|
-
const
|
|
99
|
-
return Number.isNaN(
|
|
95
|
+
const a = t.replace(/[,\s]/g, "").replace(/^[₹$€£]/, "").replace(/%$/, "");
|
|
96
|
+
if (/^[+-]?(?:\d+\.?\d*|\.\d+)$/.test(a))
|
|
97
|
+
return { kind: "number", value: Number(a) };
|
|
98
|
+
const s = /^\d{4}[-/]\d{1,2}[-/]\d{1,2}/.test(t) || /\b(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\b/i.test(t) ? Date.parse(t) : Number.NaN;
|
|
99
|
+
return Number.isNaN(s) ? { kind: "text", value: t } : { kind: "number", value: s };
|
|
100
100
|
}
|
|
101
|
-
function
|
|
102
|
-
const
|
|
103
|
-
if (
|
|
104
|
-
if (
|
|
105
|
-
const l =
|
|
106
|
-
return
|
|
101
|
+
function ye(e, t, a) {
|
|
102
|
+
const n = oe(e), s = oe(t);
|
|
103
|
+
if (n.kind === "empty") return s.kind === "empty" ? 0 : 1;
|
|
104
|
+
if (s.kind === "empty") return -1;
|
|
105
|
+
const l = n.kind === "number" && s.kind === "number" ? n.value - s.value : xe.compare(String(n.value), String(s.value));
|
|
106
|
+
return a === "ascending" ? l : -l;
|
|
107
107
|
}
|
|
108
|
-
const
|
|
109
|
-
function
|
|
110
|
-
const t = [],
|
|
111
|
-
if (!
|
|
112
|
-
return
|
|
113
|
-
let
|
|
114
|
-
const
|
|
115
|
-
if (!
|
|
116
|
-
for (; (t[
|
|
117
|
-
|
|
118
|
-
const
|
|
119
|
-
for (let
|
|
120
|
-
t[
|
|
121
|
-
t[
|
|
122
|
-
l +
|
|
108
|
+
const ce = o.createContext(null), q = () => o.useContext(ce), Q = o.createContext("body");
|
|
109
|
+
function Ce(e) {
|
|
110
|
+
const t = [], n = V(e.props.children).map((s, l) => {
|
|
111
|
+
if (!o.isValidElement(s) || s.type !== Y)
|
|
112
|
+
return s;
|
|
113
|
+
let i = 0;
|
|
114
|
+
const w = V(s.props.children).map((r) => {
|
|
115
|
+
if (!o.isValidElement(r)) return r;
|
|
116
|
+
for (; (t[i] ?? 0) > l; )
|
|
117
|
+
i += 1;
|
|
118
|
+
const T = Math.max(1, Number(r.props.colSpan ?? 1)), y = Math.max(1, Number(r.props.rowSpan ?? 1)), v = i;
|
|
119
|
+
for (let C = 0; C < T; C += 1)
|
|
120
|
+
t[v + C] = Math.max(
|
|
121
|
+
t[v + C] ?? 0,
|
|
122
|
+
l + y
|
|
123
123
|
);
|
|
124
|
-
return
|
|
124
|
+
return i += T, r.type !== fe ? r : o.cloneElement(r, { _sortColumnIndex: v });
|
|
125
125
|
});
|
|
126
|
-
return
|
|
126
|
+
return o.cloneElement(s, void 0, w);
|
|
127
127
|
});
|
|
128
|
-
return
|
|
128
|
+
return o.cloneElement(e, void 0, n);
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
const
|
|
132
|
-
if (!
|
|
133
|
-
return { row:
|
|
134
|
-
const
|
|
130
|
+
function Ne(e, t, a) {
|
|
131
|
+
const n = V(e.props.children).map((s, l) => {
|
|
132
|
+
if (!o.isValidElement(s) || s.type !== Y)
|
|
133
|
+
return { row: s, index: l, value: "" };
|
|
134
|
+
const i = V(s.props.children);
|
|
135
135
|
return {
|
|
136
|
-
row:
|
|
136
|
+
row: s,
|
|
137
137
|
index: l,
|
|
138
|
-
value:
|
|
138
|
+
value: U(i[t])
|
|
139
139
|
};
|
|
140
140
|
});
|
|
141
|
-
return
|
|
141
|
+
return n.sort((s, l) => ye(s.value, l.value, a) || s.index - l.index), o.cloneElement(
|
|
142
142
|
e,
|
|
143
143
|
void 0,
|
|
144
|
-
|
|
144
|
+
n.map(({ row: s }) => s)
|
|
145
145
|
);
|
|
146
146
|
}
|
|
147
|
-
function
|
|
148
|
-
const
|
|
149
|
-
return
|
|
150
|
-
|
|
147
|
+
function ue(e, t) {
|
|
148
|
+
const a = t != null && t.column.startsWith(K) ? Number(t.column.slice(K.length)) : Number.NaN;
|
|
149
|
+
return o.Children.map(e, (n) => o.isValidElement(n) ? n.type === o.Fragment ? o.cloneElement(
|
|
150
|
+
n,
|
|
151
151
|
void 0,
|
|
152
|
-
|
|
153
|
-
) :
|
|
152
|
+
ue(n.props.children, t)
|
|
153
|
+
) : n.type === de ? Ce(n) : n.type === pe && t && Number.isInteger(a) && a >= 0 ? Ne(n, a, t.direction) : n : n);
|
|
154
154
|
}
|
|
155
|
-
const
|
|
155
|
+
const ze = o.forwardRef(
|
|
156
156
|
({
|
|
157
157
|
className: e,
|
|
158
158
|
wrapperClassName: t,
|
|
159
|
-
footer:
|
|
160
|
-
children:
|
|
161
|
-
selectionMode:
|
|
159
|
+
footer: a,
|
|
160
|
+
children: n,
|
|
161
|
+
selectionMode: s = "none",
|
|
162
162
|
selectedKeys: l,
|
|
163
|
-
onSelectionChange:
|
|
164
|
-
rowKeys:
|
|
165
|
-
elevatedActionColumn:
|
|
166
|
-
actionColumnWidth:
|
|
167
|
-
sortDescriptor:
|
|
168
|
-
onSortChange:
|
|
169
|
-
allowsSorting:
|
|
170
|
-
isStatic:
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
163
|
+
onSelectionChange: i,
|
|
164
|
+
rowKeys: h,
|
|
165
|
+
elevatedActionColumn: w = !1,
|
|
166
|
+
actionColumnWidth: r = "4rem",
|
|
167
|
+
sortDescriptor: T,
|
|
168
|
+
onSortChange: y,
|
|
169
|
+
allowsSorting: v = !0,
|
|
170
|
+
isStatic: C = !1,
|
|
171
|
+
resizableColumns: A = !0,
|
|
172
|
+
...W
|
|
173
|
+
}, M) => {
|
|
174
|
+
const N = o.useMemo(() => h ?? [], [h]), z = l === "all", b = z ? null : l ?? /* @__PURE__ */ new Set(), E = o.useCallback(
|
|
175
|
+
(c) => z || !!(b != null && b.has(c)),
|
|
176
|
+
[z, b]
|
|
177
|
+
), k = N.length > 0 && (z || N.every((c) => b == null ? void 0 : b.has(c))), B = !k && (z || N.some((c) => b == null ? void 0 : b.has(c))), O = o.useCallback(
|
|
177
178
|
(c) => {
|
|
178
|
-
if (!
|
|
179
|
-
if (
|
|
180
|
-
|
|
179
|
+
if (!i) return;
|
|
180
|
+
if (s === "single") {
|
|
181
|
+
i(E(c) ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([c]));
|
|
181
182
|
return;
|
|
182
183
|
}
|
|
183
|
-
const m = new Set(
|
|
184
|
-
m.has(c) ? m.delete(c) : m.add(c),
|
|
184
|
+
const m = new Set(z ? N : b ?? /* @__PURE__ */ new Set());
|
|
185
|
+
m.has(c) ? m.delete(c) : m.add(c), i(m);
|
|
185
186
|
},
|
|
186
|
-
[
|
|
187
|
-
), I =
|
|
188
|
-
|
|
189
|
-
}, [
|
|
187
|
+
[i, s, E, z, N, b]
|
|
188
|
+
), I = o.useCallback(() => {
|
|
189
|
+
i && i(k ? /* @__PURE__ */ new Set() : new Set(N));
|
|
190
|
+
}, [i, k, N]), [F, H] = o.useState(), R = v && !y, x = R ? F ?? T : T, f = o.useCallback(
|
|
190
191
|
(c) => {
|
|
191
|
-
if (!
|
|
192
|
-
const m = (
|
|
193
|
-
|
|
192
|
+
if (!v) return;
|
|
193
|
+
const m = (x == null ? void 0 : x.column) === c && x.direction === "ascending" ? "descending" : "ascending", g = { column: c, direction: m };
|
|
194
|
+
y ? y(g) : H(g);
|
|
194
195
|
},
|
|
195
|
-
[
|
|
196
|
-
),
|
|
197
|
-
() =>
|
|
198
|
-
[
|
|
199
|
-
),
|
|
196
|
+
[x, v, y]
|
|
197
|
+
), p = o.useMemo(
|
|
198
|
+
() => R ? ue(n, x) : n,
|
|
199
|
+
[x, R, n]
|
|
200
|
+
), S = o.useRef(null), [D, X] = o.useState({
|
|
200
201
|
left: !1,
|
|
201
202
|
right: !1
|
|
202
|
-
}),
|
|
203
|
-
const c =
|
|
203
|
+
}), $ = o.useCallback(() => {
|
|
204
|
+
const c = S.current;
|
|
204
205
|
if (!c) return;
|
|
205
|
-
const m = c.scrollWidth - c.clientWidth,
|
|
206
|
-
|
|
207
|
-
(
|
|
206
|
+
const m = c.scrollWidth - c.clientWidth, g = c.scrollLeft > 1, L = c.scrollLeft < m - 1;
|
|
207
|
+
X(
|
|
208
|
+
(J) => J.left === g && J.right === L ? J : { left: g, right: L }
|
|
208
209
|
);
|
|
209
210
|
}, []);
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
const c =
|
|
211
|
+
o.useEffect(() => {
|
|
212
|
+
$();
|
|
213
|
+
const c = S.current;
|
|
213
214
|
if (!c || typeof ResizeObserver > "u") return;
|
|
214
|
-
const m = new ResizeObserver(
|
|
215
|
+
const m = new ResizeObserver($);
|
|
215
216
|
m.observe(c);
|
|
216
|
-
const
|
|
217
|
-
return
|
|
218
|
-
}, [
|
|
219
|
-
const
|
|
217
|
+
const g = c.querySelector("table");
|
|
218
|
+
return g && m.observe(g), () => m.disconnect();
|
|
219
|
+
}, [$]);
|
|
220
|
+
const [P, j] = o.useState(
|
|
221
|
+
null
|
|
222
|
+
), Z = o.useCallback(
|
|
223
|
+
(c) => {
|
|
224
|
+
j(
|
|
225
|
+
(m) => m ?? Array.from(
|
|
226
|
+
c.cells,
|
|
227
|
+
(g) => g.getBoundingClientRect().width
|
|
228
|
+
)
|
|
229
|
+
);
|
|
230
|
+
},
|
|
231
|
+
[]
|
|
232
|
+
), ee = o.useCallback(
|
|
233
|
+
(c, m) => {
|
|
234
|
+
j((g) => {
|
|
235
|
+
if (!g) return g;
|
|
236
|
+
const L = [...g];
|
|
237
|
+
return L[c] = Math.max(G, m), L;
|
|
238
|
+
});
|
|
239
|
+
},
|
|
240
|
+
[]
|
|
241
|
+
), te = o.useCallback(
|
|
242
|
+
() => j(null),
|
|
243
|
+
[]
|
|
244
|
+
), me = o.useMemo(
|
|
220
245
|
() => ({
|
|
221
|
-
selectionMode:
|
|
222
|
-
isSelected:
|
|
223
|
-
toggleKey:
|
|
246
|
+
selectionMode: s,
|
|
247
|
+
isSelected: E,
|
|
248
|
+
toggleKey: O,
|
|
224
249
|
toggleAll: I,
|
|
225
250
|
allSelected: k,
|
|
226
|
-
someSelected:
|
|
227
|
-
isStatic:
|
|
228
|
-
sortDescriptor:
|
|
229
|
-
requestSort:
|
|
230
|
-
automaticSorting:
|
|
231
|
-
elevatedActionColumn:
|
|
251
|
+
someSelected: B,
|
|
252
|
+
isStatic: C,
|
|
253
|
+
sortDescriptor: x,
|
|
254
|
+
requestSort: v ? f : void 0,
|
|
255
|
+
automaticSorting: R,
|
|
256
|
+
elevatedActionColumn: w,
|
|
257
|
+
resizableColumns: A,
|
|
258
|
+
columnWidths: P,
|
|
259
|
+
snapshotColumnWidths: Z,
|
|
260
|
+
setColumnWidth: ee,
|
|
261
|
+
resetColumnWidths: te
|
|
232
262
|
}),
|
|
233
263
|
[
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
264
|
+
s,
|
|
265
|
+
E,
|
|
266
|
+
O,
|
|
237
267
|
I,
|
|
238
268
|
k,
|
|
239
|
-
q,
|
|
240
|
-
x,
|
|
241
|
-
y,
|
|
242
|
-
g,
|
|
243
|
-
T,
|
|
244
269
|
B,
|
|
245
|
-
|
|
270
|
+
C,
|
|
271
|
+
x,
|
|
272
|
+
v,
|
|
273
|
+
R,
|
|
274
|
+
f,
|
|
275
|
+
w,
|
|
276
|
+
A,
|
|
277
|
+
P,
|
|
278
|
+
Z,
|
|
279
|
+
ee,
|
|
280
|
+
te
|
|
246
281
|
]
|
|
247
282
|
);
|
|
248
|
-
return /* @__PURE__ */ d(
|
|
283
|
+
return /* @__PURE__ */ d(ce.Provider, { value: me, children: /* @__PURE__ */ _(
|
|
249
284
|
"div",
|
|
250
285
|
{
|
|
251
|
-
"data-scroll-left":
|
|
252
|
-
"data-scroll-right":
|
|
286
|
+
"data-scroll-left": D.left ? "true" : "false",
|
|
287
|
+
"data-scroll-right": D.right ? "true" : "false",
|
|
253
288
|
className: u(
|
|
254
289
|
"group/table-shell overflow-clip rounded-2xl bg-table-shell px-1 pb-1",
|
|
290
|
+
// Concentric inner radius for the white body card: shell radius
|
|
291
|
+
// minus the 4px inset above. Every card corner (cells, viewport,
|
|
292
|
+
// pinned caps) derives from this one value.
|
|
293
|
+
"[--table-card-radius:calc(var(--radius-2xl)-0.25rem)]",
|
|
255
294
|
t
|
|
256
295
|
),
|
|
257
296
|
children: [
|
|
258
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ _(
|
|
259
298
|
"div",
|
|
260
299
|
{
|
|
261
300
|
className: "relative",
|
|
262
|
-
style:
|
|
263
|
-
"--table-action-column-width":
|
|
301
|
+
style: w ? {
|
|
302
|
+
"--table-action-column-width": r
|
|
264
303
|
} : void 0,
|
|
265
304
|
children: [
|
|
266
305
|
/* @__PURE__ */ d(
|
|
267
306
|
"div",
|
|
268
307
|
{
|
|
269
|
-
ref:
|
|
270
|
-
onScroll:
|
|
271
|
-
className: "overflow-x-auto rounded-
|
|
272
|
-
children: /* @__PURE__ */
|
|
308
|
+
ref: S,
|
|
309
|
+
onScroll: $,
|
|
310
|
+
className: "overflow-x-auto rounded-(--table-card-radius)",
|
|
311
|
+
children: /* @__PURE__ */ _(
|
|
273
312
|
"table",
|
|
274
313
|
{
|
|
275
|
-
ref:
|
|
314
|
+
ref: M,
|
|
276
315
|
"data-slot": "table",
|
|
277
316
|
className: u(
|
|
278
317
|
"w-full border-separate border-spacing-0 text-base",
|
|
318
|
+
// Manual widths need fixed layout so the <colgroup> wins;
|
|
319
|
+
// until the first resize the automatic layout is untouched.
|
|
320
|
+
P && "table-fixed",
|
|
279
321
|
e
|
|
280
322
|
),
|
|
281
|
-
...
|
|
282
|
-
children:
|
|
323
|
+
...W,
|
|
324
|
+
children: [
|
|
325
|
+
P && /* @__PURE__ */ d("colgroup", { children: P.map((c, m) => /* @__PURE__ */ d("col", { style: { width: c } }, m)) }),
|
|
326
|
+
p
|
|
327
|
+
]
|
|
283
328
|
}
|
|
284
329
|
)
|
|
285
330
|
}
|
|
@@ -292,13 +337,13 @@ const he = a.forwardRef(
|
|
|
292
337
|
className: u(
|
|
293
338
|
"pointer-events-none absolute inset-y-0 z-20 w-10",
|
|
294
339
|
"bg-gradient-to-l from-(--table-scroll-hint) to-transparent",
|
|
295
|
-
"opacity-0 transition-opacity duration-
|
|
296
|
-
|
|
297
|
-
|
|
340
|
+
"opacity-0 transition-opacity duration-150 ease-out motion-reduce:transition-none",
|
|
341
|
+
D.right && "opacity-100",
|
|
342
|
+
w ? "right-[var(--table-action-column-width)]" : "right-0"
|
|
298
343
|
)
|
|
299
344
|
}
|
|
300
345
|
),
|
|
301
|
-
|
|
346
|
+
w && /* @__PURE__ */ d(
|
|
302
347
|
"div",
|
|
303
348
|
{
|
|
304
349
|
"aria-hidden": "true",
|
|
@@ -306,7 +351,7 @@ const he = a.forwardRef(
|
|
|
306
351
|
className: u(
|
|
307
352
|
"pointer-events-none absolute inset-y-0 right-0 z-20",
|
|
308
353
|
"w-[var(--table-action-column-width)]",
|
|
309
|
-
"rounded-br-
|
|
354
|
+
"rounded-br-(--table-card-radius)"
|
|
310
355
|
// No shadow of its own: while columns hide behind the pinned
|
|
311
356
|
// surface the scroll-hint gradient is already washing the
|
|
312
357
|
// seam — stacking a cast on top of it read harsh. The hint
|
|
@@ -317,113 +362,150 @@ const he = a.forwardRef(
|
|
|
317
362
|
]
|
|
318
363
|
}
|
|
319
364
|
),
|
|
320
|
-
|
|
365
|
+
a && /* @__PURE__ */ d("div", { className: "flex items-center px-4 py-2.5", children: a })
|
|
321
366
|
]
|
|
322
367
|
}
|
|
323
368
|
) });
|
|
324
369
|
}
|
|
325
370
|
);
|
|
326
|
-
|
|
327
|
-
const
|
|
328
|
-
const
|
|
329
|
-
return /* @__PURE__ */ d(
|
|
371
|
+
ze.displayName = "Table";
|
|
372
|
+
const de = o.forwardRef(({ className: e, ...t }, a) => {
|
|
373
|
+
const n = q();
|
|
374
|
+
return /* @__PURE__ */ d(Q.Provider, { value: "header", children: /* @__PURE__ */ d(
|
|
330
375
|
"thead",
|
|
331
376
|
{
|
|
332
|
-
ref:
|
|
377
|
+
ref: a,
|
|
333
378
|
className: u(
|
|
334
379
|
"text-xs text-muted-foreground",
|
|
335
|
-
(
|
|
380
|
+
(n == null ? void 0 : n.elevatedActionColumn) && "relative z-30 bg-table-shell",
|
|
336
381
|
e
|
|
337
382
|
),
|
|
338
383
|
...t
|
|
339
384
|
}
|
|
340
385
|
) });
|
|
341
386
|
});
|
|
342
|
-
|
|
343
|
-
const
|
|
344
|
-
|
|
345
|
-
const
|
|
346
|
-
({ className: e, rowKey: t, children:
|
|
347
|
-
const l =
|
|
348
|
-
return /* @__PURE__ */
|
|
387
|
+
de.displayName = "TableHeader";
|
|
388
|
+
const pe = o.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ d(Q.Provider, { value: "body", children: /* @__PURE__ */ d("tbody", { ref: a, className: u(e), ...t }) }));
|
|
389
|
+
pe.displayName = "TableBody";
|
|
390
|
+
const Y = o.forwardRef(
|
|
391
|
+
({ className: e, rowKey: t, children: a, ...n }, s) => {
|
|
392
|
+
const l = q(), i = o.useContext(Q), h = !!l && l.selectionMode !== "none", w = h && i === "body" && t !== void 0 ? l.isSelected(t) : !1;
|
|
393
|
+
return /* @__PURE__ */ _(
|
|
349
394
|
"tr",
|
|
350
395
|
{
|
|
351
|
-
ref:
|
|
352
|
-
"data-selected":
|
|
396
|
+
ref: s,
|
|
397
|
+
"data-selected": w || void 0,
|
|
353
398
|
className: u("group/row", e),
|
|
354
|
-
...
|
|
399
|
+
...n,
|
|
355
400
|
children: [
|
|
356
|
-
|
|
401
|
+
h && (i === "header" ? /* @__PURE__ */ _(
|
|
357
402
|
"th",
|
|
358
403
|
{
|
|
359
404
|
scope: "col",
|
|
360
405
|
className: u(
|
|
361
406
|
"w-10 px-4 py-2.5",
|
|
362
|
-
|
|
407
|
+
le,
|
|
363
408
|
// Sticky without the baked shadow — an always-on smudge
|
|
364
409
|
// muddies the shell's corners (elevation = actionability).
|
|
365
410
|
// (sticky is positioned, so the ::after tick anchors to it —
|
|
366
411
|
// no `relative` needed, and it would conflict with sticky.)
|
|
367
412
|
"sticky left-0 z-10 bg-table-shell"
|
|
368
413
|
),
|
|
369
|
-
children:
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
414
|
+
children: [
|
|
415
|
+
/* @__PURE__ */ d("span", { className: "sr-only", children: "Row selection" }),
|
|
416
|
+
l.selectionMode === "multiple" && /* @__PURE__ */ d(
|
|
417
|
+
re,
|
|
418
|
+
{
|
|
419
|
+
size: "sm",
|
|
420
|
+
"aria-label": "Select all rows",
|
|
421
|
+
checked: l.allSelected,
|
|
422
|
+
indeterminate: l.someSelected,
|
|
423
|
+
onChange: l.toggleAll
|
|
424
|
+
}
|
|
425
|
+
)
|
|
426
|
+
]
|
|
379
427
|
}
|
|
380
428
|
) : /* @__PURE__ */ d(
|
|
381
429
|
"td",
|
|
382
430
|
{
|
|
383
431
|
className: u(
|
|
384
432
|
"w-10 px-4 py-3",
|
|
385
|
-
|
|
386
|
-
|
|
433
|
+
ie(l.isStatic),
|
|
434
|
+
we,
|
|
387
435
|
"sticky left-0 z-10",
|
|
388
436
|
// Same white-behind-white corner problem as pinned data cells.
|
|
389
|
-
|
|
437
|
+
se("left")
|
|
390
438
|
),
|
|
391
|
-
onClick: (
|
|
439
|
+
onClick: (r) => r.stopPropagation(),
|
|
392
440
|
children: t !== void 0 && /* @__PURE__ */ d(
|
|
393
|
-
|
|
441
|
+
re,
|
|
394
442
|
{
|
|
395
443
|
size: "sm",
|
|
396
444
|
"aria-label": `Select ${t}`,
|
|
397
|
-
checked:
|
|
445
|
+
checked: w,
|
|
398
446
|
onChange: () => l.toggleKey(t)
|
|
399
447
|
}
|
|
400
448
|
)
|
|
401
449
|
}
|
|
402
450
|
)),
|
|
403
|
-
|
|
451
|
+
a
|
|
404
452
|
]
|
|
405
453
|
}
|
|
406
454
|
);
|
|
407
455
|
}
|
|
408
456
|
);
|
|
409
|
-
|
|
410
|
-
const
|
|
411
|
-
var
|
|
412
|
-
const
|
|
413
|
-
|
|
457
|
+
Y.displayName = "TableRow";
|
|
458
|
+
const fe = o.forwardRef(({ className: e, align: t, sticky: a, sortKey: n, allowsSorting: s = !0, _sortColumnIndex: l, children: i, ...h }, w) => {
|
|
459
|
+
var H, R, x;
|
|
460
|
+
const r = q(), y = (r != null && r.automaticSorting && l !== void 0 ? `${K}${l}` : void 0) ?? n, v = Number(h.colSpan ?? 1) === 1, C = String(U(i)).trim(), A = C.length > 0, W = s && v && a !== "right" && A && !!y && !!(r != null && r.requestSort), M = W && ((H = r == null ? void 0 : r.sortDescriptor) == null ? void 0 : H.column) === y, N = (R = r == null ? void 0 : r.sortDescriptor) == null ? void 0 : R.direction, z = !!(r != null && r.resizableColumns) && v && a !== "right", b = o.useRef(null), [E, k] = o.useState(!1), B = (f) => {
|
|
461
|
+
if (f.button !== 0 || !r) return;
|
|
462
|
+
const p = f.currentTarget.parentElement, S = p == null ? void 0 : p.parentElement;
|
|
463
|
+
if (!(!p || !S)) {
|
|
464
|
+
r.snapshotColumnWidths(S), b.current = {
|
|
465
|
+
index: p.cellIndex,
|
|
466
|
+
startX: f.clientX,
|
|
467
|
+
startWidth: p.getBoundingClientRect().width
|
|
468
|
+
}, k(!0);
|
|
469
|
+
try {
|
|
470
|
+
f.currentTarget.setPointerCapture(f.pointerId);
|
|
471
|
+
} catch {
|
|
472
|
+
}
|
|
473
|
+
f.preventDefault();
|
|
474
|
+
}
|
|
475
|
+
}, O = (f) => {
|
|
476
|
+
const p = b.current;
|
|
477
|
+
!p || !r || r.setColumnWidth(
|
|
478
|
+
p.index,
|
|
479
|
+
p.startWidth + (f.clientX - p.startX)
|
|
480
|
+
);
|
|
481
|
+
}, I = () => {
|
|
482
|
+
b.current = null, k(!1);
|
|
483
|
+
}, F = (f) => {
|
|
484
|
+
if (f.key !== "ArrowLeft" && f.key !== "ArrowRight" || !r) return;
|
|
485
|
+
f.preventDefault();
|
|
486
|
+
const p = f.currentTarget.parentElement, S = p == null ? void 0 : p.parentElement;
|
|
487
|
+
if (!p || !S) return;
|
|
488
|
+
r.snapshotColumnWidths(S);
|
|
489
|
+
const D = f.shiftKey ? 32 : 8, X = f.key === "ArrowRight" ? D : -D;
|
|
490
|
+
r.setColumnWidth(p.cellIndex, p.getBoundingClientRect().width + X);
|
|
491
|
+
};
|
|
492
|
+
return /* @__PURE__ */ _(
|
|
414
493
|
"th",
|
|
415
494
|
{
|
|
416
|
-
ref:
|
|
495
|
+
ref: w,
|
|
417
496
|
scope: "col",
|
|
418
|
-
"aria-sort":
|
|
497
|
+
"aria-sort": M ? N === "ascending" ? "ascending" : "descending" : W ? "none" : void 0,
|
|
419
498
|
className: u(
|
|
420
499
|
// whitespace-nowrap: header labels hug their content — the table
|
|
421
500
|
// scrolls horizontally, so wrapping "Null %" to two lines only
|
|
422
501
|
// wastes header height without saving any width.
|
|
423
502
|
"relative whitespace-nowrap px-4 py-2.5 font-normal",
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
503
|
+
le,
|
|
504
|
+
// The resize handle carries its own tick visual, so drop the
|
|
505
|
+
// decorative one; the last column never shows a handle.
|
|
506
|
+
z && "after:hidden [&:last-child>[data-slot=resize-handle]]:hidden",
|
|
507
|
+
ne(t),
|
|
508
|
+
a && (a === "right" && (r != null && r.elevatedActionColumn) ? u(
|
|
427
509
|
// Preserve the semantic column width, but do not pin or paint
|
|
428
510
|
// a blank header cell over the labels behind it. Only body
|
|
429
511
|
// action cells participate in the sticky elevated surface.
|
|
@@ -431,51 +513,92 @@ const re = a.forwardRef(({ className: e, align: t, sticky: n, sortKey: r, allows
|
|
|
431
513
|
"min-w-[var(--table-action-column-width)]",
|
|
432
514
|
"max-w-[var(--table-action-column-width)]",
|
|
433
515
|
"bg-transparent"
|
|
434
|
-
) : u(
|
|
516
|
+
) : u(ae(a), "bg-table-shell")),
|
|
435
517
|
e
|
|
436
518
|
),
|
|
437
|
-
...
|
|
438
|
-
children:
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
519
|
+
...h,
|
|
520
|
+
children: [
|
|
521
|
+
W ? /* @__PURE__ */ _(
|
|
522
|
+
"button",
|
|
523
|
+
{
|
|
524
|
+
type: "button",
|
|
525
|
+
onClick: () => r.requestSort(y),
|
|
526
|
+
className: u(
|
|
527
|
+
"group/sort -mx-1 inline-flex items-center gap-1 rounded px-1 outline-none transition-colors",
|
|
528
|
+
"hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",
|
|
529
|
+
t === "right" && "flex-row-reverse",
|
|
530
|
+
M && "text-foreground"
|
|
531
|
+
),
|
|
532
|
+
children: [
|
|
533
|
+
i,
|
|
534
|
+
M ? N === "ascending" ? /* @__PURE__ */ d(be, { className: "size-3.5" }) : /* @__PURE__ */ d(ge, { className: "size-3.5" }) : /* @__PURE__ */ d(he, { className: "size-3.5 opacity-0 transition-opacity group-hover/sort:opacity-60" })
|
|
535
|
+
]
|
|
536
|
+
}
|
|
537
|
+
) : A ? i : /* @__PURE__ */ d("span", { className: "sr-only", children: h["aria-label"] ?? "Table column" }),
|
|
538
|
+
z && /* @__PURE__ */ d(
|
|
539
|
+
"span",
|
|
540
|
+
{
|
|
541
|
+
"data-slot": "resize-handle",
|
|
542
|
+
role: "separator",
|
|
543
|
+
"aria-orientation": "vertical",
|
|
544
|
+
"aria-label": `Resize ${C || "this"} column`,
|
|
545
|
+
"aria-valuemin": G,
|
|
546
|
+
"aria-valuemax": 2e3,
|
|
547
|
+
"aria-valuenow": ((x = r == null ? void 0 : r.columnWidths) == null ? void 0 : x[l ?? -1]) ?? G,
|
|
548
|
+
tabIndex: 0,
|
|
549
|
+
"data-resizing": E ? "true" : void 0,
|
|
550
|
+
onPointerDown: B,
|
|
551
|
+
onPointerMove: O,
|
|
552
|
+
onPointerUp: I,
|
|
553
|
+
onPointerCancel: I,
|
|
554
|
+
onKeyDown: F,
|
|
555
|
+
onDoubleClick: () => r == null ? void 0 : r.resetColumnWidths(),
|
|
556
|
+
className: u(
|
|
557
|
+
// 12px hit area straddling the column edge; the 1px tick inside
|
|
558
|
+
// is the visible affordance (it replaces the decorative one).
|
|
559
|
+
"group/resize absolute -right-1.5 top-0 z-10 flex h-full w-3 cursor-col-resize touch-none select-none items-center justify-center rounded-sm outline-none",
|
|
560
|
+
"focus-visible:ring-2 focus-visible:ring-ring"
|
|
561
|
+
),
|
|
562
|
+
children: /* @__PURE__ */ d(
|
|
563
|
+
"span",
|
|
564
|
+
{
|
|
565
|
+
"aria-hidden": "true",
|
|
566
|
+
className: u(
|
|
567
|
+
"h-4 w-px rounded-sm bg-border-strong",
|
|
568
|
+
"transition-[transform,background-color] duration-150 ease-out motion-reduce:transition-none",
|
|
569
|
+
"group-hover/resize:scale-y-125 group-hover/resize:bg-foreground/60",
|
|
570
|
+
"group-focus-visible/resize:scale-y-125 group-focus-visible/resize:bg-foreground/60",
|
|
571
|
+
"group-data-[resizing]/resize:scale-y-125 group-data-[resizing]/resize:bg-foreground/60"
|
|
572
|
+
)
|
|
573
|
+
}
|
|
574
|
+
)
|
|
575
|
+
}
|
|
576
|
+
)
|
|
577
|
+
]
|
|
455
578
|
}
|
|
456
579
|
);
|
|
457
580
|
});
|
|
458
|
-
|
|
459
|
-
const
|
|
460
|
-
({ className: e, align: t, sticky:
|
|
461
|
-
const
|
|
581
|
+
fe.displayName = "TableColumn";
|
|
582
|
+
const Se = o.forwardRef(
|
|
583
|
+
({ className: e, align: t, sticky: a, sortValue: n, ...s }, l) => {
|
|
584
|
+
const i = q(), h = a === "right" && (i == null ? void 0 : i.elevatedActionColumn);
|
|
462
585
|
return /* @__PURE__ */ d(
|
|
463
586
|
"td",
|
|
464
587
|
{
|
|
465
588
|
ref: l,
|
|
466
|
-
"data-sort-value":
|
|
589
|
+
"data-sort-value": n instanceof Date ? n.toISOString() : n,
|
|
467
590
|
className: u(
|
|
468
591
|
// whitespace-nowrap: cell content never wraps — the table's
|
|
469
592
|
// overflow-x-auto viewport scrolls horizontally instead, matching the
|
|
470
593
|
// header cells. Opt back into wrapping with `whitespace-normal` for
|
|
471
594
|
// deliberate multi-line content (e.g. an EmptyState in a colSpan cell).
|
|
472
595
|
"whitespace-nowrap px-4 py-3",
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
596
|
+
ie((i == null ? void 0 : i.isStatic) ?? !1),
|
|
597
|
+
ve,
|
|
598
|
+
ne(t),
|
|
599
|
+
a && ae(a, i == null ? void 0 : i.elevatedActionColumn),
|
|
600
|
+
a && se(a),
|
|
601
|
+
h && u(
|
|
479
602
|
"w-[var(--table-action-column-width)]",
|
|
480
603
|
"min-w-[var(--table-action-column-width)]",
|
|
481
604
|
"max-w-[var(--table-action-column-width)]",
|
|
@@ -484,17 +607,17 @@ const we = a.forwardRef(
|
|
|
484
607
|
),
|
|
485
608
|
e
|
|
486
609
|
),
|
|
487
|
-
...
|
|
610
|
+
...s
|
|
488
611
|
}
|
|
489
612
|
);
|
|
490
613
|
}
|
|
491
614
|
);
|
|
492
|
-
|
|
615
|
+
Se.displayName = "TableCell";
|
|
493
616
|
export {
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
617
|
+
ze as Table,
|
|
618
|
+
pe as TableBody,
|
|
619
|
+
Se as TableCell,
|
|
620
|
+
fe as TableColumn,
|
|
621
|
+
de as TableHeader,
|
|
622
|
+
Y as TableRow
|
|
500
623
|
};
|