@actioneer/ads 0.7.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DESIGN.md +597 -0
- package/components/ai-elements/agent-trace.js +1 -1
- package/components/alert.js +3 -3
- package/components/answer.js +2 -2
- package/components/assistant-ui/action-bar.js +1 -1
- package/components/assistant-ui/attachment.js +12 -12
- package/components/assistant-ui/badge.js +18 -18
- package/components/assistant-ui/composer-harness.js +5 -4
- package/components/assistant-ui/composer-trigger-popover.js +9 -9
- package/components/assistant-ui/composer.js +32 -32
- package/components/assistant-ui/directive-text.js +5 -5
- package/components/assistant-ui/image.js +61 -61
- package/components/assistant-ui/markdown-text.js +7 -7
- package/components/assistant-ui/message-timing.js +1 -1
- package/components/assistant-ui/selection-toolbar.js +7 -7
- package/components/assistant-ui/sources.js +1 -1
- package/components/avatar.d.ts +1 -1
- package/components/avatar.js +35 -35
- package/components/body-page-header.d.ts +1 -1
- package/components/body-page-header.js +1 -1
- package/components/chart.js +1 -1
- package/components/chip.js +8 -8
- package/components/divider.js +25 -25
- package/components/drawer.d.ts +2 -14
- package/components/drawer.js +103 -109
- package/components/field.js +9 -9
- package/components/index.d.ts +1 -0
- package/components/index.js +466 -465
- package/components/infinite-canvas.js +1 -1
- package/components/input.js +21 -19
- package/components/modal.js +26 -26
- package/components/page-body.js +6 -6
- package/components/page-header.js +1 -1
- package/components/pagination.js +1 -1
- package/components/pixel-blast-svg.js +71 -73
- package/components/search-disclosure.d.ts +18 -0
- package/components/search-disclosure.js +106 -0
- package/components/sidebar.js +60 -53
- package/components/table.d.ts +1 -1
- package/components/table.js +73 -74
- package/components/tabs.js +68 -59
- package/components/tree.js +17 -17
- package/components/typography.d.ts +1 -1
- package/components/typography.js +1 -1
- package/components/ui/button.d.ts +1 -1
- package/components/ui/button.js +4 -4
- package/components/ui/dialog.js +23 -23
- package/components/viz-charts.js +36 -36
- package/demo/components/add-to-artifact.js +3 -2
- package/lib/cn.js +7 -7
- package/lib/icons.d.ts +4 -0
- package/lib/icons.js +105 -104
- package/llms.txt +52 -49
- package/manifest.json +258 -235
- package/package.json +2 -1
- package/styles.css +171 -153
- package/theme.css +162 -140
package/components/table.js
CHANGED
|
@@ -3,7 +3,7 @@ import { jsx as d, jsxs as T } from "react/jsx-runtime";
|
|
|
3
3
|
import * as n from "react";
|
|
4
4
|
import { cn as m } from "../lib/cn.js";
|
|
5
5
|
import { Checkbox as ne } from "./checkbox.js";
|
|
6
|
-
import { ChevronUp as ve, ChevronDown as
|
|
6
|
+
import { ChevronUp as ve, ChevronDown as ye, SortIcon as we } from "../lib/icons.js";
|
|
7
7
|
const se = (r) => r === "center" ? "text-center" : r === "right" ? "text-right" : "text-left", ae = (r, t = !1) => r === "left" ? m(
|
|
8
8
|
"sticky left-0 z-10",
|
|
9
9
|
// Scroll-aware: the smudge only appears once content is actually
|
|
@@ -17,18 +17,16 @@ const se = (r) => r === "center" ? "text-center" : r === "right" ? "text-right"
|
|
|
17
17
|
!t && "group-data-[scroll-right=true]/table-shell:shadow-table-smudge-right"
|
|
18
18
|
) : void 0, ie = n.createContext(!1), le = (r) => m(
|
|
19
19
|
"bg-card align-middle transition-colors",
|
|
20
|
-
// The header is the first NG1 band, so the first body row stays white.
|
|
21
|
-
"group-even/row:bg-ng1",
|
|
22
20
|
// Functional row hairline; the table shell carries the outer stroke.
|
|
23
21
|
"border-b border-table-stroke group-last/row:border-b-0",
|
|
24
22
|
r && m(
|
|
25
|
-
// Use
|
|
23
|
+
// Use WG3 without introducing a new
|
|
26
24
|
// rounded silhouette. The wash is pre-composited so scrolled text
|
|
27
25
|
// cannot show through sticky cells.
|
|
28
26
|
"group-hover/row:bg-(--table-row-hover) group-focus-within/row:bg-(--table-row-hover)",
|
|
29
27
|
"group-data-[selected]/row:bg-(--table-row-selected)"
|
|
30
28
|
)
|
|
31
|
-
), ce = "bg-
|
|
29
|
+
), ce = "bg-wg1", ue = m(
|
|
32
30
|
"after:pointer-events-none after:absolute after:right-0 after:top-1/2",
|
|
33
31
|
"after:h-4 after:w-px after:-translate-y-1/2 after:rounded-sm",
|
|
34
32
|
"after:bg-border-strong last:after:hidden"
|
|
@@ -98,19 +96,19 @@ function Ne(r) {
|
|
|
98
96
|
if (!n.isValidElement(s) || s.type !== Z)
|
|
99
97
|
return s;
|
|
100
98
|
let u = 0;
|
|
101
|
-
const
|
|
99
|
+
const p = V(s.props.children).map((e) => {
|
|
102
100
|
if (!n.isValidElement(e)) return e;
|
|
103
101
|
for (; (t[u] ?? 0) > c; )
|
|
104
102
|
u += 1;
|
|
105
|
-
const N = Math.max(1, Number(e.props.colSpan ?? 1)), x = Math.max(1, Number(e.props.rowSpan ?? 1)),
|
|
103
|
+
const N = Math.max(1, Number(e.props.colSpan ?? 1)), x = Math.max(1, Number(e.props.rowSpan ?? 1)), y = u;
|
|
106
104
|
for (let g = 0; g < N; g += 1)
|
|
107
|
-
t[
|
|
108
|
-
t[
|
|
105
|
+
t[y + g] = Math.max(
|
|
106
|
+
t[y + g] ?? 0,
|
|
109
107
|
c + x
|
|
110
108
|
);
|
|
111
|
-
return u += N, e.type !== be ? e : n.cloneElement(e, { _sortColumnIndex:
|
|
109
|
+
return u += N, e.type !== be ? e : n.cloneElement(e, { _sortColumnIndex: y });
|
|
112
110
|
});
|
|
113
|
-
return n.cloneElement(s, void 0,
|
|
111
|
+
return n.cloneElement(s, void 0, p);
|
|
114
112
|
});
|
|
115
113
|
return n.cloneElement(r, void 0, o);
|
|
116
114
|
}
|
|
@@ -137,7 +135,7 @@ function me(r, t) {
|
|
|
137
135
|
o,
|
|
138
136
|
void 0,
|
|
139
137
|
me(o.props.children, t)
|
|
140
|
-
) : o.type ===
|
|
138
|
+
) : o.type === fe ? Ne(o) : o.type === pe && t && Number.isInteger(a) && a >= 0 ? ke(o, a, t.direction) : o : o);
|
|
141
139
|
}
|
|
142
140
|
const ze = n.forwardRef(
|
|
143
141
|
({
|
|
@@ -149,18 +147,18 @@ const ze = n.forwardRef(
|
|
|
149
147
|
selectionMode: c = "none",
|
|
150
148
|
selectedKeys: u,
|
|
151
149
|
onSelectionChange: h,
|
|
152
|
-
rowKeys:
|
|
150
|
+
rowKeys: p,
|
|
153
151
|
elevatedActionColumn: e = !1,
|
|
154
152
|
actionColumnWidth: N = "3rem",
|
|
155
153
|
sortDescriptor: x,
|
|
156
|
-
onSortChange:
|
|
154
|
+
onSortChange: y,
|
|
157
155
|
allowsSorting: g = !0,
|
|
158
156
|
isStatic: A = !1,
|
|
159
157
|
resizableColumns: E = !0,
|
|
160
158
|
maxBodyHeight: k,
|
|
161
159
|
..._
|
|
162
160
|
}, O) => {
|
|
163
|
-
const C = n.useMemo(() =>
|
|
161
|
+
const C = n.useMemo(() => p ?? [], [p]), z = u === "all", v = z ? null : u ?? /* @__PURE__ */ new Set(), D = n.useCallback(
|
|
164
162
|
(i) => z || !!(v != null && v.has(i)),
|
|
165
163
|
[z, v]
|
|
166
164
|
), R = C.length > 0 && (z || C.every((i) => v == null ? void 0 : v.has(i))), W = !R && (z || C.some((i) => v == null ? void 0 : v.has(i))), $ = n.useCallback(
|
|
@@ -176,25 +174,25 @@ const ze = n.forwardRef(
|
|
|
176
174
|
[h, c, D, z, C, v]
|
|
177
175
|
), I = n.useCallback(() => {
|
|
178
176
|
h && h(R ? /* @__PURE__ */ new Set() : new Set(C));
|
|
179
|
-
}, [h, R, C]), [H, U] = n.useState(),
|
|
177
|
+
}, [h, R, C]), [H, U] = n.useState(), f = g && !y, l = f ? H ?? x : x, S = n.useCallback(
|
|
180
178
|
(i) => {
|
|
181
179
|
if (!g) return;
|
|
182
|
-
const b = (l == null ? void 0 : l.column) === i && l.direction === "ascending" ? "descending" : "ascending",
|
|
183
|
-
|
|
180
|
+
const b = (l == null ? void 0 : l.column) === i && l.direction === "ascending" ? "descending" : "ascending", w = { column: i, direction: b };
|
|
181
|
+
y ? y(w) : U(w);
|
|
184
182
|
},
|
|
185
|
-
[l, g,
|
|
183
|
+
[l, g, y]
|
|
186
184
|
), j = n.useMemo(
|
|
187
|
-
() =>
|
|
188
|
-
[l,
|
|
185
|
+
() => f ? me(s, l) : s,
|
|
186
|
+
[l, f, s]
|
|
189
187
|
), M = n.useRef(null), [F, he] = n.useState({
|
|
190
188
|
left: !1,
|
|
191
189
|
right: !1
|
|
192
190
|
}), q = n.useCallback(() => {
|
|
193
191
|
const i = M.current;
|
|
194
192
|
if (!i) return;
|
|
195
|
-
const b = i.scrollWidth - i.clientWidth,
|
|
193
|
+
const b = i.scrollWidth - i.clientWidth, w = i.scrollLeft > 1, L = i.scrollLeft < b - 1;
|
|
196
194
|
he(
|
|
197
|
-
(K) => K.left ===
|
|
195
|
+
(K) => K.left === w && K.right === L ? K : { left: w, right: L }
|
|
198
196
|
);
|
|
199
197
|
}, []);
|
|
200
198
|
n.useEffect(() => {
|
|
@@ -203,8 +201,8 @@ const ze = n.forwardRef(
|
|
|
203
201
|
if (!i || typeof ResizeObserver > "u") return;
|
|
204
202
|
const b = new ResizeObserver(q);
|
|
205
203
|
b.observe(i);
|
|
206
|
-
const
|
|
207
|
-
return
|
|
204
|
+
const w = i.querySelector("table");
|
|
205
|
+
return w && b.observe(w), () => b.disconnect();
|
|
208
206
|
}, [q]);
|
|
209
207
|
const [P, J] = n.useState(
|
|
210
208
|
null
|
|
@@ -213,15 +211,15 @@ const ze = n.forwardRef(
|
|
|
213
211
|
J(
|
|
214
212
|
(b) => b ?? Array.from(
|
|
215
213
|
i.cells,
|
|
216
|
-
(
|
|
214
|
+
(w) => w.getBoundingClientRect().width
|
|
217
215
|
)
|
|
218
216
|
);
|
|
219
217
|
},
|
|
220
218
|
[]
|
|
221
219
|
), te = n.useCallback((i, b) => {
|
|
222
|
-
J((
|
|
223
|
-
if (!
|
|
224
|
-
const L = [...
|
|
220
|
+
J((w) => {
|
|
221
|
+
if (!w) return w;
|
|
222
|
+
const L = [...w];
|
|
225
223
|
return L[i] = Math.max(Q, b), L;
|
|
226
224
|
});
|
|
227
225
|
}, []), re = n.useCallback(
|
|
@@ -238,7 +236,7 @@ const ze = n.forwardRef(
|
|
|
238
236
|
isStatic: A,
|
|
239
237
|
sortDescriptor: l,
|
|
240
238
|
requestSort: g ? S : void 0,
|
|
241
|
-
automaticSorting:
|
|
239
|
+
automaticSorting: f,
|
|
242
240
|
elevatedActionColumn: e,
|
|
243
241
|
resizableColumns: E,
|
|
244
242
|
columnWidths: P,
|
|
@@ -257,7 +255,7 @@ const ze = n.forwardRef(
|
|
|
257
255
|
A,
|
|
258
256
|
l,
|
|
259
257
|
g,
|
|
260
|
-
|
|
258
|
+
f,
|
|
261
259
|
S,
|
|
262
260
|
e,
|
|
263
261
|
E,
|
|
@@ -275,7 +273,7 @@ const ze = n.forwardRef(
|
|
|
275
273
|
"data-scroll-left": F.left ? "true" : "false",
|
|
276
274
|
"data-scroll-right": F.right ? "true" : "false",
|
|
277
275
|
className: m(
|
|
278
|
-
"group/table-shell overflow-clip rounded-m border border-table-stroke bg-
|
|
276
|
+
"group/table-shell overflow-clip rounded-m border border-table-stroke bg-table-shell",
|
|
279
277
|
"[--table-card-radius:var(--radius-m)]",
|
|
280
278
|
t
|
|
281
279
|
),
|
|
@@ -366,24 +364,24 @@ const ze = n.forwardRef(
|
|
|
366
364
|
}
|
|
367
365
|
);
|
|
368
366
|
ze.displayName = "Table";
|
|
369
|
-
const
|
|
367
|
+
const fe = n.forwardRef(({ className: r, ...t }, a) => {
|
|
370
368
|
const o = B();
|
|
371
369
|
return /* @__PURE__ */ d(Y.Provider, { value: "header", children: /* @__PURE__ */ d(
|
|
372
370
|
"thead",
|
|
373
371
|
{
|
|
374
372
|
ref: a,
|
|
375
373
|
className: m(
|
|
376
|
-
"text-s font-medium
|
|
377
|
-
(o == null ? void 0 : o.elevatedActionColumn) && "relative z-30 bg-
|
|
374
|
+
"text-s font-medium text-table-header-foreground",
|
|
375
|
+
(o == null ? void 0 : o.elevatedActionColumn) && "relative z-30 bg-wg1",
|
|
378
376
|
r
|
|
379
377
|
),
|
|
380
378
|
...t
|
|
381
379
|
}
|
|
382
380
|
) });
|
|
383
381
|
});
|
|
384
|
-
|
|
385
|
-
const
|
|
386
|
-
|
|
382
|
+
fe.displayName = "TableHeader";
|
|
383
|
+
const pe = n.forwardRef(({ className: r, ...t }, a) => /* @__PURE__ */ d(Y.Provider, { value: "body", children: /* @__PURE__ */ d("tbody", { ref: a, className: m(r), ...t }) }));
|
|
384
|
+
pe.displayName = "TableBody";
|
|
387
385
|
const Z = n.forwardRef(
|
|
388
386
|
({
|
|
389
387
|
className: r,
|
|
@@ -394,14 +392,14 @@ const Z = n.forwardRef(
|
|
|
394
392
|
role: c,
|
|
395
393
|
...u
|
|
396
394
|
}, h) => {
|
|
397
|
-
const
|
|
395
|
+
const p = B(), e = n.useContext(Y), N = !!p && p.selectionMode !== "none", x = e === "body" && !(p != null && p.isStatic) && (o || N || typeof s == "function" || c === "button" || u["aria-expanded"] !== void 0), y = N && e === "body" && t !== void 0 ? p.isSelected(t) : !1;
|
|
398
396
|
return /* @__PURE__ */ d(ie.Provider, { value: x, children: /* @__PURE__ */ T(
|
|
399
397
|
"tr",
|
|
400
398
|
{
|
|
401
399
|
ref: h,
|
|
402
400
|
"data-interactive": x || void 0,
|
|
403
|
-
"data-selected":
|
|
404
|
-
className: m("group/row", e === "body" && "h-
|
|
401
|
+
"data-selected": y || void 0,
|
|
402
|
+
className: m("group/row", e === "body" && "h-16", r),
|
|
405
403
|
onClick: s,
|
|
406
404
|
role: c,
|
|
407
405
|
...u,
|
|
@@ -422,14 +420,14 @@ const Z = n.forwardRef(
|
|
|
422
420
|
),
|
|
423
421
|
children: [
|
|
424
422
|
/* @__PURE__ */ d("span", { className: "sr-only", children: "Row selection" }),
|
|
425
|
-
|
|
423
|
+
p.selectionMode === "multiple" && /* @__PURE__ */ d(
|
|
426
424
|
ne,
|
|
427
425
|
{
|
|
428
426
|
size: "sm",
|
|
429
427
|
"aria-label": "Select all rows",
|
|
430
|
-
checked:
|
|
431
|
-
indeterminate:
|
|
432
|
-
onChange:
|
|
428
|
+
checked: p.allSelected,
|
|
429
|
+
indeterminate: p.someSelected,
|
|
430
|
+
onChange: p.toggleAll
|
|
433
431
|
}
|
|
434
432
|
)
|
|
435
433
|
]
|
|
@@ -438,7 +436,7 @@ const Z = n.forwardRef(
|
|
|
438
436
|
"td",
|
|
439
437
|
{
|
|
440
438
|
className: m(
|
|
441
|
-
"h-
|
|
439
|
+
"h-16 w-10 px-4 py-2",
|
|
442
440
|
le(x),
|
|
443
441
|
"sticky left-0 z-10"
|
|
444
442
|
),
|
|
@@ -448,8 +446,8 @@ const Z = n.forwardRef(
|
|
|
448
446
|
{
|
|
449
447
|
size: "sm",
|
|
450
448
|
"aria-label": `Select ${t}`,
|
|
451
|
-
checked:
|
|
452
|
-
onChange: () =>
|
|
449
|
+
checked: y,
|
|
450
|
+
onChange: () => p.toggleKey(t)
|
|
453
451
|
}
|
|
454
452
|
)
|
|
455
453
|
}
|
|
@@ -471,38 +469,38 @@ const be = n.forwardRef(
|
|
|
471
469
|
_sortColumnIndex: c,
|
|
472
470
|
children: u,
|
|
473
471
|
...h
|
|
474
|
-
},
|
|
472
|
+
}, p) => {
|
|
475
473
|
var I, H, U;
|
|
476
|
-
const e = B(), x = (e != null && e.automaticSorting && c !== void 0 ? `${G}${c}` : void 0) ?? o,
|
|
477
|
-
if (
|
|
478
|
-
const l =
|
|
474
|
+
const e = B(), x = (e != null && e.automaticSorting && c !== void 0 ? `${G}${c}` : void 0) ?? o, y = Number(h.colSpan ?? 1) === 1, g = String(X(u)).trim(), A = g.length > 0, E = s && y && a !== "right" && A && !!x && !!(e != null && e.requestSort), k = E && ((I = e == null ? void 0 : e.sortDescriptor) == null ? void 0 : I.column) === x, _ = (H = e == null ? void 0 : e.sortDescriptor) == null ? void 0 : H.direction, O = !!(e != null && e.resizableColumns) && y && a !== "right", C = n.useRef(null), [z, v] = n.useState(!1), D = (f) => {
|
|
475
|
+
if (f.button !== 0 || !e) return;
|
|
476
|
+
const l = f.currentTarget.parentElement, S = l == null ? void 0 : l.parentElement;
|
|
479
477
|
if (!(!l || !S)) {
|
|
480
478
|
e.snapshotColumnWidths(S), C.current = {
|
|
481
479
|
index: l.cellIndex,
|
|
482
|
-
startX:
|
|
480
|
+
startX: f.clientX,
|
|
483
481
|
startWidth: l.getBoundingClientRect().width
|
|
484
482
|
}, v(!0);
|
|
485
483
|
try {
|
|
486
|
-
|
|
484
|
+
f.currentTarget.setPointerCapture(f.pointerId);
|
|
487
485
|
} catch {
|
|
488
486
|
}
|
|
489
|
-
|
|
487
|
+
f.preventDefault();
|
|
490
488
|
}
|
|
491
|
-
}, R = (
|
|
489
|
+
}, R = (f) => {
|
|
492
490
|
const l = C.current;
|
|
493
491
|
!l || !e || e.setColumnWidth(
|
|
494
492
|
l.index,
|
|
495
|
-
l.startWidth + (
|
|
493
|
+
l.startWidth + (f.clientX - l.startX)
|
|
496
494
|
);
|
|
497
495
|
}, W = () => {
|
|
498
496
|
C.current = null, v(!1);
|
|
499
|
-
}, $ = (
|
|
500
|
-
if (
|
|
501
|
-
|
|
502
|
-
const l =
|
|
497
|
+
}, $ = (f) => {
|
|
498
|
+
if (f.key !== "ArrowLeft" && f.key !== "ArrowRight" || !e) return;
|
|
499
|
+
f.preventDefault();
|
|
500
|
+
const l = f.currentTarget.parentElement, S = l == null ? void 0 : l.parentElement;
|
|
503
501
|
if (!l || !S) return;
|
|
504
502
|
e.snapshotColumnWidths(S);
|
|
505
|
-
const j =
|
|
503
|
+
const j = f.shiftKey ? 32 : 8, M = f.key === "ArrowRight" ? j : -j;
|
|
506
504
|
e.setColumnWidth(
|
|
507
505
|
l.cellIndex,
|
|
508
506
|
l.getBoundingClientRect().width + M
|
|
@@ -511,21 +509,21 @@ const be = n.forwardRef(
|
|
|
511
509
|
return /* @__PURE__ */ T(
|
|
512
510
|
"th",
|
|
513
511
|
{
|
|
514
|
-
ref:
|
|
512
|
+
ref: p,
|
|
515
513
|
scope: "col",
|
|
516
514
|
"aria-sort": k ? _ === "ascending" ? "ascending" : "descending" : E ? "none" : void 0,
|
|
517
515
|
className: m(
|
|
518
516
|
// whitespace-nowrap: header labels hug their content — the table
|
|
519
517
|
// scrolls horizontally, so wrapping "Null %" to two lines only
|
|
520
518
|
// wastes header height without saving any width.
|
|
521
|
-
"relative whitespace-nowrap border-b border-table-stroke px-4 py-2.5 font-medium
|
|
519
|
+
"relative whitespace-nowrap border-b border-table-stroke px-4 py-2.5 text-s font-medium text-table-header-foreground",
|
|
522
520
|
ce,
|
|
523
521
|
ue,
|
|
524
522
|
// The resize handle carries its own tick visual, so drop the
|
|
525
523
|
// decorative one; the last column never shows a handle.
|
|
526
524
|
O && "after:hidden [&:last-child>[data-slot=resize-handle]]:hidden",
|
|
527
525
|
// Capped-height tables scroll under the header: pin it to the
|
|
528
|
-
// viewport top, painted
|
|
526
|
+
// viewport top, painted WG1 so rows pass beneath.
|
|
529
527
|
(e == null ? void 0 : e.stickyHeader) && "sticky top-0 z-30",
|
|
530
528
|
se(t),
|
|
531
529
|
a && (a === "right" && (e != null && e.elevatedActionColumn) ? m(
|
|
@@ -548,14 +546,14 @@ const be = n.forwardRef(
|
|
|
548
546
|
type: "button",
|
|
549
547
|
onClick: () => e.requestSort(x),
|
|
550
548
|
className: m(
|
|
551
|
-
"group/sort -mx-1 inline-flex items-center gap-1 rounded px-1
|
|
549
|
+
"group/sort -mx-1 inline-flex items-center gap-1 rounded px-1 outline-none transition-colors",
|
|
552
550
|
"hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",
|
|
553
551
|
t === "right" && "flex-row-reverse",
|
|
554
552
|
k && "font-medium"
|
|
555
553
|
),
|
|
556
554
|
children: [
|
|
557
555
|
u,
|
|
558
|
-
k ? _ === "ascending" ? /* @__PURE__ */ d(ve, { className: "size-3.5" }) : /* @__PURE__ */ d(
|
|
556
|
+
k ? _ === "ascending" ? /* @__PURE__ */ d(ve, { className: "size-3.5" }) : /* @__PURE__ */ d(ye, { className: "size-3.5" }) : /* @__PURE__ */ d(we, { className: "size-3.5 opacity-0 transition-opacity group-hover/sort:opacity-60" })
|
|
559
557
|
]
|
|
560
558
|
}
|
|
561
559
|
) : A ? u : /* @__PURE__ */ d("span", { className: "sr-only", children: h["aria-label"] ?? "Table column" }),
|
|
@@ -606,7 +604,7 @@ const be = n.forwardRef(
|
|
|
606
604
|
be.displayName = "TableColumn";
|
|
607
605
|
const Se = n.forwardRef(
|
|
608
606
|
({ className: r, align: t, sticky: a, sortValue: o, ...s }, c) => {
|
|
609
|
-
const u = B(), h = n.useContext(ie),
|
|
607
|
+
const u = B(), h = n.useContext(ie), p = a === "right" && (u == null ? void 0 : u.elevatedActionColumn);
|
|
610
608
|
return /* @__PURE__ */ d(
|
|
611
609
|
"td",
|
|
612
610
|
{
|
|
@@ -617,18 +615,19 @@ const Se = n.forwardRef(
|
|
|
617
615
|
// overflow-x-auto viewport scrolls horizontally instead, matching the
|
|
618
616
|
// header cells. Opt back into wrapping with `whitespace-normal` for
|
|
619
617
|
// deliberate multi-line content (e.g. an EmptyState in a colSpan cell).
|
|
620
|
-
|
|
618
|
+
// Cell values own the ADS 14px body-text contract instead of relying
|
|
619
|
+
// on inheritance from <Table>; nested content stays 14px by default.
|
|
620
|
+
"h-16 whitespace-nowrap px-4 py-2 text-m",
|
|
621
621
|
le(h),
|
|
622
622
|
se(t),
|
|
623
623
|
a && ae(a, u == null ? void 0 : u.elevatedActionColumn),
|
|
624
|
-
|
|
624
|
+
p && m(
|
|
625
625
|
"w-[var(--table-action-column-width)]",
|
|
626
626
|
"min-w-[var(--table-action-column-width)]",
|
|
627
627
|
"max-w-[var(--table-action-column-width)]",
|
|
628
628
|
"px-2",
|
|
629
629
|
"bg-elevated",
|
|
630
|
-
// Keep the action column
|
|
631
|
-
"group-even/row:bg-elevated",
|
|
630
|
+
// Keep the action column on its elevated surface during hover.
|
|
632
631
|
"group-hover/row:bg-elevated group-focus-within/row:bg-elevated"
|
|
633
632
|
),
|
|
634
633
|
r
|
|
@@ -641,9 +640,9 @@ const Se = n.forwardRef(
|
|
|
641
640
|
Se.displayName = "TableCell";
|
|
642
641
|
export {
|
|
643
642
|
ze as Table,
|
|
644
|
-
|
|
643
|
+
pe as TableBody,
|
|
645
644
|
Se as TableCell,
|
|
646
645
|
be as TableColumn,
|
|
647
|
-
|
|
646
|
+
fe as TableHeader,
|
|
648
647
|
Z as TableRow
|
|
649
648
|
};
|