@actioneer/ads 0.5.6 → 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 +135 -121
- package/components/ai-elements/chain-of-thought-icon.d.ts +10 -12
- package/components/ai-elements/chain-of-thought-icon.js +341 -201
- package/components/ai-elements/chain-of-thought.d.ts +2 -2
- 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.d.ts +42 -0
- package/components/answer-sources.js +111 -0
- package/components/answer.js +115 -114
- package/components/assistant-ui/action-bar.js +94 -48
- package/components/assistant-ui/attachment.js +131 -103
- 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 +12 -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-context.d.ts +2 -0
- package/components/assistant-ui/thread.js +41 -40
- 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 +30 -30
- 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 +3 -1
- package/components/dropdown.js +88 -79
- package/components/empty-state.d.ts +4 -4
- 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 +4 -0
- package/components/index.js +584 -553
- package/components/infinite-canvas.js +1 -1
- 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.d.ts +3 -1
- package/components/pixel-icon.js +294 -215
- 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.d.ts +4 -1
- package/components/segmented.js +26 -25
- package/components/select.d.ts +2 -0
- package/components/select.js +61 -57
- package/components/setting-row.js +45 -42
- package/components/sidebar.d.ts +2 -2
- 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 +52 -32
- package/components/table.d.ts +24 -7
- package/components/table.js +457 -220
- package/components/tabs.js +149 -137
- package/components/textarea.js +1 -2
- 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 +12 -0
- package/lib/icons.js +107 -104
- 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 +69 -26
- package/manifest.json +344 -42
- package/package.json +1 -1
- package/styles.css +175 -161
- package/theme.css +104 -128
- 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/spinner.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import { cva as
|
|
5
|
-
import { cn as
|
|
6
|
-
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import * as u from "react";
|
|
4
|
+
import { cva as p } from "class-variance-authority";
|
|
5
|
+
import { cn as f } from "../lib/cn.js";
|
|
6
|
+
import { SpinnerMark as x } from "../lib/spinner-mark.js";
|
|
7
|
+
import { SPINNER_VARIANTS as k } from "../lib/spinner-mark.js";
|
|
8
|
+
const z = p("inline-block shrink-0", {
|
|
7
9
|
variants: {
|
|
8
10
|
size: {
|
|
11
|
+
xs: "size-3.5",
|
|
9
12
|
sm: "size-4",
|
|
10
13
|
md: "size-6",
|
|
11
14
|
lg: "size-8"
|
|
@@ -17,46 +20,43 @@ const r = "M12 2.5 C5 2.5 2.5 5 2.5 12 C2.5 19 5 21.5 12 21.5 C19 21.5 21.5 19 2
|
|
|
17
20
|
}
|
|
18
21
|
},
|
|
19
22
|
defaultVariants: { size: "md", color: "current" }
|
|
20
|
-
}),
|
|
21
|
-
({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
}), N = u.forwardRef(
|
|
24
|
+
({
|
|
25
|
+
className: a,
|
|
26
|
+
size: n,
|
|
27
|
+
color: o,
|
|
28
|
+
variant: e = "action",
|
|
29
|
+
label: s,
|
|
30
|
+
role: m,
|
|
31
|
+
"aria-label": d,
|
|
32
|
+
"aria-hidden": r,
|
|
33
|
+
...l
|
|
34
|
+
}, c) => {
|
|
35
|
+
const i = r === !0 || r === "true";
|
|
36
|
+
return /* @__PURE__ */ t(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
ref: c,
|
|
40
|
+
role: i ? void 0 : m ?? "status",
|
|
41
|
+
"aria-label": i ? void 0 : d ?? s ?? "Loading",
|
|
42
|
+
"aria-hidden": r,
|
|
43
|
+
"data-variant": e,
|
|
44
|
+
className: f(z({ size: n, color: o }), a),
|
|
45
|
+
...l,
|
|
46
|
+
children: /* @__PURE__ */ t(
|
|
47
|
+
x,
|
|
32
48
|
{
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
className: "opacity-15"
|
|
37
|
-
}
|
|
38
|
-
),
|
|
39
|
-
/* @__PURE__ */ e(
|
|
40
|
-
"g",
|
|
41
|
-
{
|
|
42
|
-
className: "origin-center animate-[ads-spin_var(--duration-spin)_linear_infinite] motion-reduce:animate-none",
|
|
43
|
-
children: /* @__PURE__ */ e(
|
|
44
|
-
"path",
|
|
45
|
-
{
|
|
46
|
-
d: r,
|
|
47
|
-
stroke: "currentColor",
|
|
48
|
-
strokeWidth: "2.5",
|
|
49
|
-
strokeLinecap: "round",
|
|
50
|
-
className: "animate-[ads-spin-head_var(--duration-spin)_var(--ease-in-out)_infinite] motion-reduce:animate-none"
|
|
51
|
-
}
|
|
52
|
-
)
|
|
49
|
+
variant: e,
|
|
50
|
+
"aria-hidden": !0,
|
|
51
|
+
className: "size-full"
|
|
53
52
|
}
|
|
54
53
|
)
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
}
|
|
58
57
|
);
|
|
59
|
-
|
|
58
|
+
N.displayName = "Spinner";
|
|
60
59
|
export {
|
|
61
|
-
|
|
60
|
+
k as SPINNER_VARIANTS,
|
|
61
|
+
N as Spinner
|
|
62
62
|
};
|
package/components/stepper.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
3
3
|
import * as v from "react";
|
|
4
4
|
import { cva as y } from "class-variance-authority";
|
|
5
|
-
import { cn as
|
|
5
|
+
import { cn as a } from "../lib/cn.js";
|
|
6
6
|
import { Check as p, Close as g } from "../lib/icons.js";
|
|
7
7
|
const b = y(
|
|
8
|
-
|
|
8
|
+
a(
|
|
9
9
|
"flex shrink-0 items-center justify-center rounded-full font-normal tabular-nums",
|
|
10
|
-
"transition-colors duration-
|
|
10
|
+
"transition-colors duration-150 ease-out motion-reduce:transition-none"
|
|
11
11
|
),
|
|
12
12
|
{
|
|
13
13
|
variants: {
|
|
@@ -27,31 +27,31 @@ const b = y(
|
|
|
27
27
|
), j = v.forwardRef(
|
|
28
28
|
({
|
|
29
29
|
className: x,
|
|
30
|
-
steps:
|
|
30
|
+
steps: m,
|
|
31
31
|
activeIndex: n,
|
|
32
32
|
size: i = "md",
|
|
33
33
|
onSelect: o,
|
|
34
34
|
labelPosition: h = "below",
|
|
35
|
-
...
|
|
35
|
+
...u
|
|
36
36
|
}, N) => /* @__PURE__ */ e(
|
|
37
37
|
"ol",
|
|
38
38
|
{
|
|
39
39
|
ref: N,
|
|
40
40
|
"data-slot": "stepper",
|
|
41
|
-
"aria-label":
|
|
42
|
-
className:
|
|
43
|
-
...
|
|
44
|
-
children:
|
|
45
|
-
const r =
|
|
41
|
+
"aria-label": u["aria-label"] ?? "Progress",
|
|
42
|
+
className: a("flex w-full flex-row items-start", x),
|
|
43
|
+
...u,
|
|
44
|
+
children: m.map((s, t) => {
|
|
45
|
+
const r = s.isError ? "error" : t < n ? "complete" : t === n ? "current" : "upcoming", l = t === m.length - 1, w = !!o && t < n, d = t < n && !s.isError, k = /* @__PURE__ */ e("span", { "aria-hidden": !0, className: b({ status: r, size: i }), children: r === "complete" ? /* @__PURE__ */ e(p, {}) : r === "error" ? /* @__PURE__ */ e(g, {}) : t + 1 }), f = w ? /* @__PURE__ */ e(
|
|
46
46
|
"button",
|
|
47
47
|
{
|
|
48
48
|
type: "button",
|
|
49
49
|
onClick: () => o == null ? void 0 : o(t),
|
|
50
50
|
"aria-label": `Go to step ${t + 1}`,
|
|
51
|
-
className:
|
|
51
|
+
className: a(
|
|
52
52
|
b({ status: r, size: i }),
|
|
53
53
|
"cursor-pointer outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
54
|
-
"active:scale-
|
|
54
|
+
"active:scale-[0.97]"
|
|
55
55
|
),
|
|
56
56
|
children: r === "complete" ? /* @__PURE__ */ e(p, {}) : r === "error" ? /* @__PURE__ */ e(g, {}) : t + 1
|
|
57
57
|
}
|
|
@@ -61,7 +61,7 @@ const b = y(
|
|
|
61
61
|
{
|
|
62
62
|
"data-status": r,
|
|
63
63
|
"aria-current": r === "current" ? "step" : void 0,
|
|
64
|
-
className:
|
|
64
|
+
className: a(
|
|
65
65
|
"flex min-w-0 items-center gap-2",
|
|
66
66
|
l ? "shrink-0" : "flex-1"
|
|
67
67
|
),
|
|
@@ -70,20 +70,20 @@ const b = y(
|
|
|
70
70
|
/* @__PURE__ */ e(
|
|
71
71
|
"span",
|
|
72
72
|
{
|
|
73
|
-
className:
|
|
73
|
+
className: a(
|
|
74
74
|
"truncate whitespace-nowrap",
|
|
75
75
|
i === "sm" ? "text-xs" : "text-base",
|
|
76
76
|
r === "upcoming" ? "text-tertiary" : "text-foreground",
|
|
77
77
|
r === "error" && "text-danger"
|
|
78
78
|
),
|
|
79
|
-
children:
|
|
79
|
+
children: s.label
|
|
80
80
|
}
|
|
81
81
|
),
|
|
82
82
|
!l && /* @__PURE__ */ e(
|
|
83
83
|
"span",
|
|
84
84
|
{
|
|
85
85
|
"aria-hidden": !0,
|
|
86
|
-
className:
|
|
86
|
+
className: a(
|
|
87
87
|
"h-px min-w-4 flex-1 shrink-0 bg-border",
|
|
88
88
|
d && "bg-success"
|
|
89
89
|
)
|
|
@@ -91,7 +91,7 @@ const b = y(
|
|
|
91
91
|
)
|
|
92
92
|
]
|
|
93
93
|
},
|
|
94
|
-
|
|
94
|
+
s.id
|
|
95
95
|
) : /* @__PURE__ */ c(
|
|
96
96
|
"li",
|
|
97
97
|
{
|
|
@@ -105,7 +105,7 @@ const b = y(
|
|
|
105
105
|
"span",
|
|
106
106
|
{
|
|
107
107
|
"aria-hidden": !0,
|
|
108
|
-
className:
|
|
108
|
+
className: a(
|
|
109
109
|
"h-px flex-1 shrink-0 bg-border",
|
|
110
110
|
d && "bg-success"
|
|
111
111
|
)
|
|
@@ -115,18 +115,18 @@ const b = y(
|
|
|
115
115
|
/* @__PURE__ */ e("div", { className: "min-w-0 pr-4", children: /* @__PURE__ */ e(
|
|
116
116
|
"div",
|
|
117
117
|
{
|
|
118
|
-
className:
|
|
118
|
+
className: a(
|
|
119
119
|
"truncate",
|
|
120
120
|
i === "sm" ? "text-xs" : "text-base",
|
|
121
121
|
r === "upcoming" ? "text-tertiary" : "text-foreground",
|
|
122
122
|
r === "error" && "text-danger"
|
|
123
123
|
),
|
|
124
|
-
children:
|
|
124
|
+
children: s.label
|
|
125
125
|
}
|
|
126
126
|
) })
|
|
127
127
|
]
|
|
128
128
|
},
|
|
129
|
-
|
|
129
|
+
s.id
|
|
130
130
|
);
|
|
131
131
|
})
|
|
132
132
|
}
|
package/components/switch.js
CHANGED
|
@@ -1,61 +1,81 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import { jsxs as p, jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import * as c from "react";
|
|
4
|
+
import { MotionConfig as w, motion as x } from "motion/react";
|
|
5
|
+
import { cn as n } from "../lib/cn.js";
|
|
6
|
+
import { springSwitch as g } from "../lib/motion.js";
|
|
7
|
+
const v = {
|
|
8
|
+
sm: {
|
|
9
|
+
track: "h-5 w-9",
|
|
10
|
+
knob: "size-4",
|
|
11
|
+
offset: 16
|
|
12
|
+
},
|
|
13
|
+
md: {
|
|
14
|
+
track: "h-6 w-11",
|
|
15
|
+
knob: "size-5",
|
|
16
|
+
offset: 20
|
|
17
|
+
}
|
|
18
|
+
}, y = c.forwardRef(
|
|
19
|
+
({
|
|
20
|
+
className: d,
|
|
21
|
+
checked: t = !1,
|
|
22
|
+
onCheckedChange: e,
|
|
23
|
+
size: f = "md",
|
|
24
|
+
disabled: s,
|
|
25
|
+
children: o,
|
|
26
|
+
...r
|
|
27
|
+
}, m) => {
|
|
28
|
+
const l = v[f], a = c.useId(), u = r["aria-label"] != null || r["aria-labelledby"] != null, b = o && !u ? a : void 0;
|
|
29
|
+
return /* @__PURE__ */ p(
|
|
12
30
|
"label",
|
|
13
31
|
{
|
|
14
|
-
className:
|
|
32
|
+
className: n(
|
|
15
33
|
"inline-flex items-center gap-2 text-xs text-foreground select-none",
|
|
16
|
-
|
|
34
|
+
s ? "cursor-not-allowed opacity-50" : "cursor-pointer"
|
|
17
35
|
),
|
|
18
36
|
children: [
|
|
19
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ i(
|
|
20
38
|
"button",
|
|
21
39
|
{
|
|
22
|
-
ref:
|
|
40
|
+
ref: m,
|
|
23
41
|
type: "button",
|
|
24
42
|
role: "switch",
|
|
25
43
|
"aria-checked": t,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
44
|
+
"aria-labelledby": b,
|
|
45
|
+
disabled: s,
|
|
46
|
+
onClick: () => e == null ? void 0 : e(!t),
|
|
47
|
+
className: n(
|
|
29
48
|
"relative inline-flex shrink-0 items-center rounded-full border border-transparent",
|
|
30
|
-
"transition-colors duration-
|
|
49
|
+
"transition-colors duration-150",
|
|
31
50
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
32
51
|
"disabled:cursor-not-allowed",
|
|
33
52
|
t ? "bg-brand" : "bg-input",
|
|
34
|
-
|
|
35
|
-
|
|
53
|
+
l.track,
|
|
54
|
+
d
|
|
36
55
|
),
|
|
37
|
-
...
|
|
38
|
-
children: /* @__PURE__ */
|
|
39
|
-
|
|
56
|
+
...r,
|
|
57
|
+
children: /* @__PURE__ */ i(w, { reducedMotion: "user", children: /* @__PURE__ */ i(
|
|
58
|
+
x.span,
|
|
40
59
|
{
|
|
41
60
|
"aria-hidden": !0,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
61
|
+
initial: !1,
|
|
62
|
+
animate: { x: t ? l.offset : 0 },
|
|
63
|
+
transition: g,
|
|
64
|
+
className: n(
|
|
65
|
+
"ml-0.5 inline-block rounded-full bg-elevated shadow-elevation",
|
|
66
|
+
l.knob
|
|
47
67
|
)
|
|
48
68
|
}
|
|
49
|
-
)
|
|
69
|
+
) })
|
|
50
70
|
}
|
|
51
71
|
),
|
|
52
|
-
|
|
72
|
+
o && /* @__PURE__ */ i("span", { id: a, children: o })
|
|
53
73
|
]
|
|
54
74
|
}
|
|
55
75
|
);
|
|
56
76
|
}
|
|
57
77
|
);
|
|
58
|
-
|
|
78
|
+
y.displayName = "Switch";
|
|
59
79
|
export {
|
|
60
|
-
|
|
80
|
+
y as Switch
|
|
61
81
|
};
|
package/components/table.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export interface SortDescriptor {
|
|
|
7
7
|
column: string;
|
|
8
8
|
direction: SortDirection;
|
|
9
9
|
}
|
|
10
|
+
type SortValue = string | number | Date;
|
|
10
11
|
export type SelectionMode = "none" | "single" | "multiple";
|
|
11
12
|
/** `"all"` selects every current key without enumerating them. */
|
|
12
13
|
export type Selection = Set<string> | "all";
|
|
@@ -35,6 +36,8 @@ export interface TableProps extends Omit<React.TableHTMLAttributes<HTMLTableElem
|
|
|
35
36
|
actionColumnWidth?: string;
|
|
36
37
|
sortDescriptor?: SortDescriptor;
|
|
37
38
|
onSortChange?: (descriptor: SortDescriptor) => void;
|
|
39
|
+
/** Enable sortable data-column headers. Defaults to true. */
|
|
40
|
+
allowsSorting?: boolean;
|
|
38
41
|
/**
|
|
39
42
|
* A purely display table: no row hover/focus wash, no selection. Set this
|
|
40
43
|
* when rows have nothing to click — a plain data grid — so hovering never
|
|
@@ -42,16 +45,24 @@ export interface TableProps extends Omit<React.TableHTMLAttributes<HTMLTableElem
|
|
|
42
45
|
* table with row selection, sorting, or a click-through action.
|
|
43
46
|
*/
|
|
44
47
|
isStatic?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Draggable column-width handles on the header ticks (defaults to true).
|
|
50
|
+
* Dragging the tick between two headers resizes the column to its left;
|
|
51
|
+
* the handle is keyboard-operable (arrows, Shift for coarse steps) and
|
|
52
|
+
* double-click restores the automatic layout. The last column has no
|
|
53
|
+
* handle — it absorbs the remaining width. Set false for tables whose
|
|
54
|
+
* layout must stay fixed (e.g. a compact summary card).
|
|
55
|
+
*/
|
|
56
|
+
resizableColumns?: boolean;
|
|
45
57
|
}
|
|
46
58
|
/**
|
|
47
59
|
* Styled wrapper around a semantic `<table>` with horizontal overflow.
|
|
48
60
|
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* `
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* with `<Pagination>` below for paging.
|
|
61
|
+
* A plain `<Table>` automatically makes its labeled data columns sortable.
|
|
62
|
+
* Consumers can opt out with `allowsSorting={false}`, or control sorting with
|
|
63
|
+
* `sortDescriptor` + `onSortChange` and explicit column `sortKey` values.
|
|
64
|
+
* Row selection and sticky columns remain opt-in. Compose with `<Pagination>`
|
|
65
|
+
* below for paging.
|
|
55
66
|
*/
|
|
56
67
|
export declare const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttributes<HTMLTableElement>>;
|
|
57
68
|
export declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -64,13 +75,19 @@ export declare const TableRow: React.ForwardRefExoticComponent<TableRowProps & R
|
|
|
64
75
|
export interface TableColumnProps extends React.ThHTMLAttributes<HTMLTableCellElement> {
|
|
65
76
|
align?: Align;
|
|
66
77
|
sticky?: Sticky;
|
|
67
|
-
/**
|
|
78
|
+
/** Sort key used by a consumer-controlled table. */
|
|
68
79
|
sortKey?: string;
|
|
80
|
+
/** Disable sorting for a non-data or action header. */
|
|
81
|
+
allowsSorting?: boolean;
|
|
82
|
+
/** Assigned internally by Table's automatic header layout. */
|
|
83
|
+
_sortColumnIndex?: number;
|
|
69
84
|
}
|
|
70
85
|
export declare const TableColumn: React.ForwardRefExoticComponent<TableColumnProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
71
86
|
export interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {
|
|
72
87
|
align?: Align;
|
|
73
88
|
sticky?: Sticky;
|
|
89
|
+
/** Explicit value when automatic sorting cannot infer the rendered value. */
|
|
90
|
+
sortValue?: SortValue;
|
|
74
91
|
}
|
|
75
92
|
export declare const TableCell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
76
93
|
export {};
|