@actioneer/ads 0.5.3 → 0.5.5
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/components/accordion.js +15 -15
- package/components/agent-icon.d.ts +64 -0
- package/components/agent-icon.js +251 -0
- package/components/ai-elements/agent-trace.d.ts +8 -1
- package/components/ai-elements/agent-trace.js +164 -129
- package/components/ai-elements/chain-of-thought-icon.d.ts +42 -0
- package/components/ai-elements/chain-of-thought-icon.js +283 -0
- package/components/ai-elements/chain-of-thought.js +7 -7
- package/components/ai-elements/chart.js +38 -35
- package/components/ai-elements/index.d.ts +1 -0
- package/components/ai-elements/inline-citation.js +40 -40
- package/components/ai-elements/message.js +5 -5
- package/components/ai-elements/queue.js +1 -1
- package/components/ai-elements/research-activity.d.ts +2 -0
- package/components/ai-elements/research-activity.js +79 -81
- package/components/ai-elements/task-progress.js +2 -2
- package/components/ai-elements/tool.d.ts +4 -2
- package/components/ai-elements/tool.js +74 -54
- package/components/ai-elements/transcript.js +1 -1
- package/components/alert.js +1 -1
- package/components/answer.d.ts +2643 -311
- package/components/answer.js +1836 -425
- package/components/assistant-ui/answer-tool-ui.js +23 -28
- package/components/assistant-ui/chain-of-thought.d.ts +7 -2
- package/components/assistant-ui/composer-harness.js +20 -16
- package/components/assistant-ui/reasoning.js +35 -31
- package/components/assistant-ui/tool-fallback.js +125 -122
- package/components/assistant-ui/tool-group.d.ts +3 -1
- package/components/assistant-ui/tool-group.js +48 -43
- package/components/audio-waveform.js +14 -14
- package/components/autocomplete.js +52 -48
- package/components/avatar.js +58 -44
- package/components/badge.js +3 -3
- package/components/brand-texture.js +1 -1
- package/components/breadcrumbs.d.ts +27 -1
- package/components/breadcrumbs.js +94 -42
- package/components/button.js +15 -15
- package/components/carousel.js +10 -10
- package/components/chart.d.ts +14 -0
- package/components/chart.js +747 -614
- package/components/chip.js +3 -3
- package/components/code-block.d.ts +39 -17
- package/components/code-block.js +153 -104
- package/components/command-palette.js +27 -25
- package/components/connector-card.js +2 -2
- package/components/dropdown.js +65 -61
- package/components/empty-state.js +15 -15
- package/components/field.js +23 -23
- package/components/index.d.ts +5 -0
- package/components/index.js +523 -470
- package/components/infinite-canvas.js +60 -60
- package/components/kbd.js +6 -6
- package/components/link.js +6 -6
- package/components/modal.js +22 -20
- package/components/page-header.js +1 -1
- package/components/pagination.js +22 -22
- package/components/pixel-blast-svg.js +1 -1
- package/components/pixel-icon.d.ts +31 -0
- package/components/pixel-icon.js +733 -0
- package/components/popover.js +46 -42
- package/components/ripple.d.ts +29 -0
- package/components/ripple.js +17 -0
- package/components/segmented.js +24 -23
- package/components/select.js +71 -67
- package/components/selection-action-bar.js +22 -22
- package/components/sidebar.d.ts +11 -3
- package/components/sidebar.js +161 -148
- package/components/stepper.d.ts +2 -0
- package/components/stepper.js +80 -43
- package/components/table.d.ts +7 -0
- package/components/table.js +223 -155
- package/components/tabs.d.ts +3 -1
- package/components/tabs.js +165 -144
- package/components/textarea.js +10 -8
- package/components/toast.js +48 -46
- package/components/tooltip.js +61 -59
- package/components/tree.js +44 -41
- package/components/typography.d.ts +1 -1
- package/components/typography.js +25 -25
- package/components/viz-charts.d.ts +62 -0
- package/components/viz-charts.js +408 -0
- package/fonts/aribau-grotesk-500.otf +0 -0
- package/fonts/aribau-grotesk-600.woff2 +0 -0
- package/fonts.css +6 -4
- package/lib/icons.d.ts +411 -402
- package/lib/icons.js +109 -107
- package/lib/viz-format.d.ts +25 -0
- package/lib/viz-format.js +40 -0
- package/llms.txt +111 -8
- package/manifest.json +1096 -58
- package/package.json +5 -5
- package/styles.css +226 -96
- package/theme.css +220 -92
- package/fonts/aribau-grotesk-400.otf +0 -0
- package/fonts/aribau-grotesk-700.otf +0 -0
package/components/table.js
CHANGED
|
@@ -1,129 +1,191 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
2
|
+
import { jsx as s, jsxs as z } from "react/jsx-runtime";
|
|
3
|
+
import * as a from "react";
|
|
4
4
|
import { cn as t } from "../lib/cn.js";
|
|
5
|
-
import { Checkbox as
|
|
6
|
-
import { ChevronUp as
|
|
7
|
-
const
|
|
5
|
+
import { Checkbox as j } from "./checkbox.js";
|
|
6
|
+
import { ChevronUp as Q, ChevronDown as V, SortIcon as X } from "../lib/icons.js";
|
|
7
|
+
const L = (o) => o === "center" ? "text-center" : o === "right" ? "text-right" : "text-left", O = (o, n = !1) => o === "left" ? t(
|
|
8
|
+
"sticky left-0 z-10",
|
|
9
|
+
// Scroll-aware: the smudge only appears once content is actually
|
|
10
|
+
// hidden behind the pinned column (nothing to scroll back to at the
|
|
11
|
+
// far left → no shadow).
|
|
12
|
+
"group-data-[scroll-left=true]/table-shell:shadow-table-smudge-left"
|
|
13
|
+
) : o === "right" ? t(
|
|
8
14
|
"sticky right-0 z-10",
|
|
9
15
|
// Backward-compatible fallback. Action columns should opt into the
|
|
10
16
|
// Table-level elevation so one shadow spans the complete column.
|
|
11
|
-
!
|
|
12
|
-
) : void 0,
|
|
17
|
+
!n && "group-data-[scroll-right=true]/table-shell:shadow-table-smudge-right"
|
|
18
|
+
) : void 0, W = (o) => o === "right" ? t(
|
|
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-5 group-first/row:before:content-[''] group-first/row:before:[background:radial-gradient(circle_at_0%_100%,transparent_19.5px,var(--table-shell)_20px)]",
|
|
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-5 group-last/row:after:content-[''] group-last/row:after:[background:radial-gradient(circle_at_0%_0%,transparent_19.5px,var(--table-shell)_20px)]"
|
|
21
|
+
) : t(
|
|
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-5 group-first/row:before:content-[''] group-first/row:before:[background:radial-gradient(circle_at_100%_100%,transparent_19.5px,var(--table-shell)_20px)]",
|
|
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-5 group-last/row:after:content-[''] group-last/row:after:[background:radial-gradient(circle_at_100%_0%,transparent_19.5px,var(--table-shell)_20px)]"
|
|
24
|
+
), F = (o) => t(
|
|
13
25
|
"bg-card align-middle transition-colors",
|
|
14
26
|
// Row separators — functional hairline, none under the last row.
|
|
15
27
|
"border-b border-border group-last/row:border-b-0",
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
)
|
|
28
|
+
!o && t(
|
|
29
|
+
// Restore the original quiet neutral hover: the row softly sinks
|
|
30
|
+
// toward the shell instead of picking up a brand tint or a new
|
|
31
|
+
// rounded silhouette. The wash is pre-composited so scrolled text
|
|
32
|
+
// cannot show through sticky cells.
|
|
33
|
+
"group-hover/row:bg-(--table-row-hover) group-focus-within/row:bg-(--table-row-hover)",
|
|
34
|
+
"group-data-[selected]/row:bg-(--table-row-selected)"
|
|
35
|
+
)
|
|
36
|
+
), Y = t(
|
|
22
37
|
"group-first/row:rounded-tl-[calc(var(--radius-2xl)-var(--spacing))]",
|
|
23
38
|
"group-last/row:rounded-bl-[calc(var(--radius-2xl)-var(--spacing))]"
|
|
24
|
-
),
|
|
39
|
+
), Z = t(
|
|
25
40
|
"group-first/row:first:rounded-tl-[calc(var(--radius-2xl)-var(--spacing))]",
|
|
26
41
|
"group-first/row:last:rounded-tr-[calc(var(--radius-2xl)-var(--spacing))]",
|
|
27
42
|
"group-last/row:first:rounded-bl-[calc(var(--radius-2xl)-var(--spacing))]",
|
|
28
43
|
"group-last/row:last:rounded-br-[calc(var(--radius-2xl)-var(--spacing))]"
|
|
29
|
-
),
|
|
44
|
+
), I = t(
|
|
30
45
|
"after:pointer-events-none after:absolute after:right-0 after:top-1/2",
|
|
31
46
|
"after:h-4 after:w-px after:-translate-y-1/2 after:rounded-sm",
|
|
32
47
|
"after:bg-border-strong last:after:hidden"
|
|
33
|
-
),
|
|
48
|
+
), M = a.createContext(null), T = () => a.useContext(M), q = a.createContext("body"), D = a.forwardRef(
|
|
34
49
|
({
|
|
35
|
-
className:
|
|
36
|
-
wrapperClassName:
|
|
37
|
-
footer:
|
|
50
|
+
className: o,
|
|
51
|
+
wrapperClassName: n,
|
|
52
|
+
footer: i,
|
|
38
53
|
children: d,
|
|
39
|
-
selectionMode:
|
|
54
|
+
selectionMode: g = "none",
|
|
40
55
|
selectedKeys: e,
|
|
41
|
-
onSelectionChange:
|
|
42
|
-
rowKeys:
|
|
43
|
-
elevatedActionColumn:
|
|
44
|
-
actionColumnWidth:
|
|
45
|
-
sortDescriptor:
|
|
46
|
-
onSortChange:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (
|
|
56
|
-
|
|
56
|
+
onSelectionChange: c,
|
|
57
|
+
rowKeys: l,
|
|
58
|
+
elevatedActionColumn: u = !1,
|
|
59
|
+
actionColumnWidth: h = "4rem",
|
|
60
|
+
sortDescriptor: b,
|
|
61
|
+
onSortChange: w,
|
|
62
|
+
isStatic: x = !1,
|
|
63
|
+
...U
|
|
64
|
+
}, $) => {
|
|
65
|
+
const v = a.useMemo(() => l ?? [], [l]), m = e === "all", f = m ? null : e ?? /* @__PURE__ */ new Set(), C = a.useCallback(
|
|
66
|
+
(r) => m || !!(f != null && f.has(r)),
|
|
67
|
+
[m, f]
|
|
68
|
+
), N = v.length > 0 && (m || v.every((r) => f == null ? void 0 : f.has(r))), H = !N && (m || v.some((r) => f == null ? void 0 : f.has(r))), P = a.useCallback(
|
|
69
|
+
(r) => {
|
|
70
|
+
if (!c) return;
|
|
71
|
+
if (g === "single") {
|
|
72
|
+
c(C(r) ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([r]));
|
|
57
73
|
return;
|
|
58
74
|
}
|
|
59
|
-
const
|
|
60
|
-
|
|
75
|
+
const p = new Set(m ? v : f ?? /* @__PURE__ */ new Set());
|
|
76
|
+
p.has(r) ? p.delete(r) : p.add(r), c(p);
|
|
61
77
|
},
|
|
62
|
-
[
|
|
63
|
-
),
|
|
64
|
-
|
|
65
|
-
}, [
|
|
66
|
-
(
|
|
67
|
-
if (!
|
|
68
|
-
const
|
|
69
|
-
|
|
78
|
+
[c, g, C, m, v, f]
|
|
79
|
+
), A = a.useCallback(() => {
|
|
80
|
+
c && c(N ? /* @__PURE__ */ new Set() : new Set(v));
|
|
81
|
+
}, [c, N, v]), B = a.useCallback(
|
|
82
|
+
(r) => {
|
|
83
|
+
if (!w) return;
|
|
84
|
+
const p = (b == null ? void 0 : b.column) === r && b.direction === "ascending" ? "descending" : "ascending";
|
|
85
|
+
w({ column: r, direction: p });
|
|
70
86
|
},
|
|
71
|
-
[
|
|
72
|
-
),
|
|
87
|
+
[w, b]
|
|
88
|
+
), R = a.useRef(null), [S, G] = a.useState({
|
|
89
|
+
left: !1,
|
|
90
|
+
right: !1
|
|
91
|
+
}), _ = a.useCallback(() => {
|
|
92
|
+
const r = R.current;
|
|
93
|
+
if (!r) return;
|
|
94
|
+
const p = r.scrollWidth - r.clientWidth, y = r.scrollLeft > 1, E = r.scrollLeft < p - 1;
|
|
95
|
+
G(
|
|
96
|
+
(k) => k.left === y && k.right === E ? k : { left: y, right: E }
|
|
97
|
+
);
|
|
98
|
+
}, []);
|
|
99
|
+
a.useEffect(() => {
|
|
100
|
+
_();
|
|
101
|
+
const r = R.current;
|
|
102
|
+
if (!r || typeof ResizeObserver > "u") return;
|
|
103
|
+
const p = new ResizeObserver(_);
|
|
104
|
+
p.observe(r);
|
|
105
|
+
const y = r.querySelector("table");
|
|
106
|
+
return y && p.observe(y), () => p.disconnect();
|
|
107
|
+
}, [_]);
|
|
108
|
+
const J = a.useMemo(
|
|
73
109
|
() => ({
|
|
74
|
-
selectionMode:
|
|
110
|
+
selectionMode: g,
|
|
75
111
|
isSelected: C,
|
|
76
|
-
toggleKey:
|
|
77
|
-
toggleAll:
|
|
78
|
-
allSelected:
|
|
79
|
-
someSelected:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
112
|
+
toggleKey: P,
|
|
113
|
+
toggleAll: A,
|
|
114
|
+
allSelected: N,
|
|
115
|
+
someSelected: H,
|
|
116
|
+
isStatic: x,
|
|
117
|
+
sortDescriptor: b,
|
|
118
|
+
requestSort: w ? B : void 0,
|
|
119
|
+
elevatedActionColumn: u
|
|
83
120
|
}),
|
|
84
121
|
[
|
|
85
|
-
|
|
122
|
+
g,
|
|
86
123
|
C,
|
|
87
|
-
|
|
88
|
-
|
|
124
|
+
P,
|
|
125
|
+
A,
|
|
126
|
+
N,
|
|
127
|
+
H,
|
|
89
128
|
x,
|
|
90
|
-
R,
|
|
91
|
-
v,
|
|
92
129
|
b,
|
|
93
|
-
|
|
94
|
-
|
|
130
|
+
w,
|
|
131
|
+
B,
|
|
132
|
+
u
|
|
95
133
|
]
|
|
96
134
|
);
|
|
97
|
-
return /* @__PURE__ */
|
|
135
|
+
return /* @__PURE__ */ s(M.Provider, { value: J, children: /* @__PURE__ */ z(
|
|
98
136
|
"div",
|
|
99
137
|
{
|
|
138
|
+
"data-scroll-left": S.left ? "true" : "false",
|
|
139
|
+
"data-scroll-right": S.right ? "true" : "false",
|
|
100
140
|
className: t(
|
|
101
|
-
"overflow-clip rounded-2xl bg-
|
|
102
|
-
|
|
141
|
+
"group/table-shell overflow-clip rounded-2xl bg-table-shell px-1 pb-1",
|
|
142
|
+
n
|
|
103
143
|
),
|
|
104
144
|
children: [
|
|
105
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ z(
|
|
106
146
|
"div",
|
|
107
147
|
{
|
|
108
148
|
className: "relative",
|
|
109
|
-
style:
|
|
110
|
-
"--table-action-column-width":
|
|
149
|
+
style: u ? {
|
|
150
|
+
"--table-action-column-width": h
|
|
111
151
|
} : void 0,
|
|
112
152
|
children: [
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
"
|
|
153
|
+
/* @__PURE__ */ s(
|
|
154
|
+
"div",
|
|
155
|
+
{
|
|
156
|
+
ref: R,
|
|
157
|
+
onScroll: _,
|
|
158
|
+
className: "overflow-x-auto rounded-[calc(var(--radius-2xl)-var(--spacing))]",
|
|
159
|
+
children: /* @__PURE__ */ s(
|
|
160
|
+
"table",
|
|
161
|
+
{
|
|
162
|
+
ref: $,
|
|
163
|
+
"data-slot": "table",
|
|
164
|
+
className: t(
|
|
165
|
+
"w-full border-separate border-spacing-0 text-base",
|
|
166
|
+
o
|
|
167
|
+
),
|
|
168
|
+
...U,
|
|
169
|
+
children: d
|
|
170
|
+
}
|
|
171
|
+
)
|
|
172
|
+
}
|
|
173
|
+
),
|
|
174
|
+
/* @__PURE__ */ s(
|
|
175
|
+
"div",
|
|
115
176
|
{
|
|
116
|
-
|
|
117
|
-
"data-slot": "table",
|
|
177
|
+
"aria-hidden": "true",
|
|
178
|
+
"data-slot": "table-scroll-hint",
|
|
118
179
|
className: t(
|
|
119
|
-
"
|
|
120
|
-
l
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
180
|
+
"pointer-events-none absolute inset-y-0 z-20 w-10",
|
|
181
|
+
"bg-gradient-to-l from-(--table-scroll-hint) to-transparent",
|
|
182
|
+
"opacity-0 transition-opacity duration-(--duration-fast) ease-out motion-reduce:transition-none",
|
|
183
|
+
S.right && "opacity-100",
|
|
184
|
+
u ? "right-[var(--table-action-column-width)]" : "right-0"
|
|
185
|
+
)
|
|
124
186
|
}
|
|
125
|
-
)
|
|
126
|
-
|
|
187
|
+
),
|
|
188
|
+
u && /* @__PURE__ */ s(
|
|
127
189
|
"div",
|
|
128
190
|
{
|
|
129
191
|
"aria-hidden": "true",
|
|
@@ -131,65 +193,68 @@ const P = (l) => l === "center" ? "text-center" : l === "right" ? "text-right" :
|
|
|
131
193
|
className: t(
|
|
132
194
|
"pointer-events-none absolute inset-y-0 right-0 z-20",
|
|
133
195
|
"w-[var(--table-action-column-width)]",
|
|
134
|
-
"rounded-br-[calc(var(--radius-2xl)-var(--spacing))]"
|
|
135
|
-
|
|
196
|
+
"rounded-br-[calc(var(--radius-2xl)-var(--spacing))]"
|
|
197
|
+
// No shadow of its own: while columns hide behind the pinned
|
|
198
|
+
// surface the scroll-hint gradient is already washing the
|
|
199
|
+
// seam — stacking a cast on top of it read harsh. The hint
|
|
200
|
+
// IS the separation cue.
|
|
136
201
|
)
|
|
137
202
|
}
|
|
138
203
|
)
|
|
139
204
|
]
|
|
140
205
|
}
|
|
141
206
|
),
|
|
142
|
-
|
|
207
|
+
i && /* @__PURE__ */ s("div", { className: "flex items-center px-4 py-2.5", children: i })
|
|
143
208
|
]
|
|
144
209
|
}
|
|
145
210
|
) });
|
|
146
211
|
}
|
|
147
212
|
);
|
|
148
|
-
|
|
149
|
-
const
|
|
213
|
+
D.displayName = "Table";
|
|
214
|
+
const K = a.forwardRef(({ className: o, ...n }, i) => {
|
|
150
215
|
const d = T();
|
|
151
|
-
return /* @__PURE__ */
|
|
216
|
+
return /* @__PURE__ */ s(q.Provider, { value: "header", children: /* @__PURE__ */ s(
|
|
152
217
|
"thead",
|
|
153
218
|
{
|
|
154
|
-
ref:
|
|
219
|
+
ref: i,
|
|
155
220
|
className: t(
|
|
156
221
|
"text-xs text-muted-foreground",
|
|
157
|
-
(d == null ? void 0 : d.elevatedActionColumn) && "relative z-30 bg-
|
|
158
|
-
|
|
222
|
+
(d == null ? void 0 : d.elevatedActionColumn) && "relative z-30 bg-table-shell",
|
|
223
|
+
o
|
|
159
224
|
),
|
|
160
|
-
...
|
|
225
|
+
...n
|
|
161
226
|
}
|
|
162
227
|
) });
|
|
163
228
|
});
|
|
164
|
-
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
const
|
|
168
|
-
({ className:
|
|
169
|
-
const e = T(),
|
|
170
|
-
return /* @__PURE__ */
|
|
229
|
+
K.displayName = "TableHeader";
|
|
230
|
+
const ee = a.forwardRef(({ className: o, ...n }, i) => /* @__PURE__ */ s(q.Provider, { value: "body", children: /* @__PURE__ */ s("tbody", { ref: i, className: t(o), ...n }) }));
|
|
231
|
+
ee.displayName = "TableBody";
|
|
232
|
+
const re = a.forwardRef(
|
|
233
|
+
({ className: o, rowKey: n, children: i, ...d }, g) => {
|
|
234
|
+
const e = T(), c = a.useContext(q), l = !!e && e.selectionMode !== "none", u = l && c === "body" && n !== void 0 ? e.isSelected(n) : !1;
|
|
235
|
+
return /* @__PURE__ */ z(
|
|
171
236
|
"tr",
|
|
172
237
|
{
|
|
173
|
-
ref:
|
|
174
|
-
"data-selected":
|
|
175
|
-
className: t("group/row",
|
|
238
|
+
ref: g,
|
|
239
|
+
"data-selected": u || void 0,
|
|
240
|
+
className: t("group/row", o),
|
|
176
241
|
...d,
|
|
177
242
|
children: [
|
|
178
|
-
|
|
243
|
+
l && (c === "header" ? /* @__PURE__ */ s(
|
|
179
244
|
"th",
|
|
180
245
|
{
|
|
181
246
|
scope: "col",
|
|
182
247
|
className: t(
|
|
183
248
|
"w-10 px-4 py-2.5",
|
|
184
|
-
|
|
249
|
+
I,
|
|
185
250
|
// Sticky without the baked shadow — an always-on smudge
|
|
186
251
|
// muddies the shell's corners (elevation = actionability).
|
|
187
252
|
// (sticky is positioned, so the ::after tick anchors to it —
|
|
188
253
|
// no `relative` needed, and it would conflict with sticky.)
|
|
189
|
-
"sticky left-0 z-10 bg-
|
|
254
|
+
"sticky left-0 z-10 bg-table-shell"
|
|
190
255
|
),
|
|
191
|
-
children: e.selectionMode === "multiple" && /* @__PURE__ */
|
|
192
|
-
|
|
256
|
+
children: e.selectionMode === "multiple" && /* @__PURE__ */ s(
|
|
257
|
+
j,
|
|
193
258
|
{
|
|
194
259
|
size: "sm",
|
|
195
260
|
"aria-label": "Select all rows",
|
|
@@ -199,51 +264,53 @@ const Q = n.forwardRef(
|
|
|
199
264
|
}
|
|
200
265
|
)
|
|
201
266
|
}
|
|
202
|
-
) : /* @__PURE__ */
|
|
267
|
+
) : /* @__PURE__ */ s(
|
|
203
268
|
"td",
|
|
204
269
|
{
|
|
205
270
|
className: t(
|
|
206
271
|
"w-10 px-4 py-3",
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
"sticky left-0 z-10"
|
|
272
|
+
F(e.isStatic),
|
|
273
|
+
Y,
|
|
274
|
+
"sticky left-0 z-10",
|
|
275
|
+
// Same white-behind-white corner problem as pinned data cells.
|
|
276
|
+
W("left")
|
|
210
277
|
),
|
|
211
|
-
onClick: (
|
|
212
|
-
children:
|
|
213
|
-
|
|
278
|
+
onClick: (h) => h.stopPropagation(),
|
|
279
|
+
children: n !== void 0 && /* @__PURE__ */ s(
|
|
280
|
+
j,
|
|
214
281
|
{
|
|
215
282
|
size: "sm",
|
|
216
|
-
"aria-label": `Select ${
|
|
217
|
-
checked:
|
|
218
|
-
onChange: () => e.toggleKey(
|
|
283
|
+
"aria-label": `Select ${n}`,
|
|
284
|
+
checked: u,
|
|
285
|
+
onChange: () => e.toggleKey(n)
|
|
219
286
|
}
|
|
220
287
|
)
|
|
221
288
|
}
|
|
222
289
|
)),
|
|
223
|
-
|
|
290
|
+
i
|
|
224
291
|
]
|
|
225
292
|
}
|
|
226
293
|
);
|
|
227
294
|
}
|
|
228
295
|
);
|
|
229
|
-
|
|
230
|
-
const
|
|
231
|
-
var
|
|
232
|
-
const
|
|
233
|
-
return /* @__PURE__ */
|
|
296
|
+
re.displayName = "TableRow";
|
|
297
|
+
const te = a.forwardRef(({ className: o, align: n, sticky: i, sortKey: d, children: g, ...e }, c) => {
|
|
298
|
+
var w, x;
|
|
299
|
+
const l = T(), u = !!d && !!(l != null && l.requestSort), h = u && ((w = l == null ? void 0 : l.sortDescriptor) == null ? void 0 : w.column) === d, b = (x = l == null ? void 0 : l.sortDescriptor) == null ? void 0 : x.direction;
|
|
300
|
+
return /* @__PURE__ */ s(
|
|
234
301
|
"th",
|
|
235
302
|
{
|
|
236
|
-
ref:
|
|
303
|
+
ref: c,
|
|
237
304
|
scope: "col",
|
|
238
|
-
"aria-sort":
|
|
305
|
+
"aria-sort": h ? b === "ascending" ? "ascending" : "descending" : u ? "none" : void 0,
|
|
239
306
|
className: t(
|
|
240
307
|
// whitespace-nowrap: header labels hug their content — the table
|
|
241
308
|
// scrolls horizontally, so wrapping "Null %" to two lines only
|
|
242
309
|
// wastes header height without saving any width.
|
|
243
|
-
"relative whitespace-nowrap px-4 py-2.5 font-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
310
|
+
"relative whitespace-nowrap px-4 py-2.5 font-normal",
|
|
311
|
+
I,
|
|
312
|
+
L(n),
|
|
313
|
+
i && (i === "right" && (l != null && l.elevatedActionColumn) ? t(
|
|
247
314
|
// Preserve the semantic column width, but do not pin or paint
|
|
248
315
|
// a blank header cell over the labels behind it. Only body
|
|
249
316
|
// action cells participate in the sticky elevated surface.
|
|
@@ -251,68 +318,69 @@ const V = n.forwardRef(({ className: l, align: r, sticky: s, sortKey: d, childre
|
|
|
251
318
|
"min-w-[var(--table-action-column-width)]",
|
|
252
319
|
"max-w-[var(--table-action-column-width)]",
|
|
253
320
|
"bg-transparent"
|
|
254
|
-
) : t(
|
|
255
|
-
|
|
321
|
+
) : t(O(i), "bg-table-shell")),
|
|
322
|
+
o
|
|
256
323
|
),
|
|
257
324
|
...e,
|
|
258
|
-
children:
|
|
325
|
+
children: u ? /* @__PURE__ */ z(
|
|
259
326
|
"button",
|
|
260
327
|
{
|
|
261
328
|
type: "button",
|
|
262
|
-
onClick: () =>
|
|
329
|
+
onClick: () => l.requestSort(d),
|
|
263
330
|
className: t(
|
|
264
331
|
"group/sort -mx-1 inline-flex items-center gap-1 rounded px-1 outline-none transition-colors",
|
|
265
332
|
"hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",
|
|
266
|
-
|
|
267
|
-
|
|
333
|
+
n === "right" && "flex-row-reverse",
|
|
334
|
+
h && "text-foreground"
|
|
268
335
|
),
|
|
269
336
|
children: [
|
|
270
|
-
|
|
271
|
-
|
|
337
|
+
g,
|
|
338
|
+
h ? b === "ascending" ? /* @__PURE__ */ s(Q, { className: "size-3.5" }) : /* @__PURE__ */ s(V, { className: "size-3.5" }) : /* @__PURE__ */ s(X, { className: "size-3.5 opacity-0 transition-opacity group-hover/sort:opacity-60" })
|
|
272
339
|
]
|
|
273
340
|
}
|
|
274
|
-
) :
|
|
341
|
+
) : g
|
|
275
342
|
}
|
|
276
343
|
);
|
|
277
344
|
});
|
|
278
|
-
|
|
279
|
-
const
|
|
280
|
-
({ className:
|
|
281
|
-
const e = T(),
|
|
282
|
-
return /* @__PURE__ */
|
|
345
|
+
te.displayName = "TableColumn";
|
|
346
|
+
const oe = a.forwardRef(
|
|
347
|
+
({ className: o, align: n, sticky: i, ...d }, g) => {
|
|
348
|
+
const e = T(), c = i === "right" && (e == null ? void 0 : e.elevatedActionColumn);
|
|
349
|
+
return /* @__PURE__ */ s(
|
|
283
350
|
"td",
|
|
284
351
|
{
|
|
285
|
-
ref:
|
|
352
|
+
ref: g,
|
|
286
353
|
className: t(
|
|
287
354
|
// whitespace-nowrap: cell content never wraps — the table's
|
|
288
355
|
// overflow-x-auto viewport scrolls horizontally instead, matching the
|
|
289
356
|
// header cells. Opt back into wrapping with `whitespace-normal` for
|
|
290
357
|
// deliberate multi-line content (e.g. an EmptyState in a colSpan cell).
|
|
291
358
|
"whitespace-nowrap px-4 py-3",
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
i &&
|
|
359
|
+
F((e == null ? void 0 : e.isStatic) ?? !1),
|
|
360
|
+
Z,
|
|
361
|
+
L(n),
|
|
362
|
+
i && O(i, e == null ? void 0 : e.elevatedActionColumn),
|
|
363
|
+
i && W(i),
|
|
364
|
+
c && t(
|
|
297
365
|
"w-[var(--table-action-column-width)]",
|
|
298
366
|
"min-w-[var(--table-action-column-width)]",
|
|
299
367
|
"max-w-[var(--table-action-column-width)]",
|
|
300
368
|
"bg-elevated",
|
|
301
369
|
"group-hover/row:bg-elevated group-focus-within/row:bg-elevated"
|
|
302
370
|
),
|
|
303
|
-
|
|
371
|
+
o
|
|
304
372
|
),
|
|
305
373
|
...d
|
|
306
374
|
}
|
|
307
375
|
);
|
|
308
376
|
}
|
|
309
377
|
);
|
|
310
|
-
|
|
378
|
+
oe.displayName = "TableCell";
|
|
311
379
|
export {
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
380
|
+
D as Table,
|
|
381
|
+
ee as TableBody,
|
|
382
|
+
oe as TableCell,
|
|
383
|
+
te as TableColumn,
|
|
384
|
+
K as TableHeader,
|
|
385
|
+
re as TableRow
|
|
318
386
|
};
|
package/components/tabs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
type Variant = "primary" | "secondary";
|
|
2
|
+
type Variant = "primary" | "secondary" | "pill";
|
|
3
3
|
type Orientation = "horizontal" | "vertical";
|
|
4
4
|
type Size = "sm" | "md" | "lg";
|
|
5
5
|
export interface TabsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
@@ -17,6 +17,8 @@ export declare const TabList: React.ForwardRefExoticComponent<TabListProps & Rea
|
|
|
17
17
|
export interface TabProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
18
18
|
value: string;
|
|
19
19
|
isDisabled?: boolean;
|
|
20
|
+
/** Optional trailing count, rendered as `· N` (e.g. a filter's match count). */
|
|
21
|
+
count?: number;
|
|
20
22
|
}
|
|
21
23
|
export declare const Tab: React.ForwardRefExoticComponent<TabProps & React.RefAttributes<HTMLButtonElement>>;
|
|
22
24
|
export interface TabSeparatorProps extends React.HTMLAttributes<HTMLSpanElement> {
|