@actioneer/ads 0.3.0 → 0.3.1
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/ai-elements/chain-of-thought.d.ts +25 -5
- package/components/ai-elements/chain-of-thought.js +248 -204
- package/components/ai-elements/research-activity.d.ts +17 -0
- package/components/ai-elements/research-activity.js +125 -107
- package/components/ai-elements/task.d.ts +7 -3
- package/components/ai-elements/task.js +84 -52
- package/components/ai-elements/tool.js +16 -16
- package/components/ai-elements/voice.d.ts +7 -1
- package/components/ai-elements/voice.js +234 -180
- package/components/alert.js +28 -16
- package/components/code-block.d.ts +11 -5
- package/components/code-block.js +161 -62
- package/components/scroll-area.js +10 -10
- package/components/sidebar.js +1 -1
- package/components/stepper.d.ts +17 -9
- package/components/stepper.js +85 -96
- package/lib/icons.js +1 -1
- package/lib/motion.d.ts +2 -0
- package/lib/motion.js +21 -20
- package/llms.txt +2 -1
- package/manifest.json +22 -5
- package/package.json +1 -1
- package/styles.css +108 -2
- package/theme.css +10 -2
package/components/alert.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import * as i from "react";
|
|
4
|
-
import { cva as
|
|
4
|
+
import { cva as u } from "class-variance-authority";
|
|
5
5
|
import { Info as l, WarningCircle as g, Warning as p, CheckCircle as x, Close as v } from "../lib/icons.js";
|
|
6
6
|
import { cn as n } from "../lib/cn.js";
|
|
7
|
-
const h =
|
|
7
|
+
const h = u(
|
|
8
8
|
"flex w-full items-start gap-4 rounded-2xl bg-muted px-4 py-3",
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
@@ -25,17 +25,17 @@ const h = m(
|
|
|
25
25
|
danger: g,
|
|
26
26
|
info: l
|
|
27
27
|
}, N = i.forwardRef(
|
|
28
|
-
({ className:
|
|
29
|
-
const f = w[
|
|
30
|
-
return /* @__PURE__ */
|
|
28
|
+
({ className: t, variant: r = "default", icon: a, onClose: s, children: o, ...c }, d) => {
|
|
29
|
+
const f = w[r ?? "default"];
|
|
30
|
+
return /* @__PURE__ */ m(
|
|
31
31
|
"div",
|
|
32
32
|
{
|
|
33
33
|
ref: d,
|
|
34
34
|
role: "alert",
|
|
35
|
-
className: n(h({ variant:
|
|
35
|
+
className: n(h({ variant: r }), t),
|
|
36
36
|
...c,
|
|
37
37
|
children: [
|
|
38
|
-
/* @__PURE__ */ e("span", { className: "flex shrink-0 select-none items-center justify-center
|
|
38
|
+
/* @__PURE__ */ e("span", { className: "flex shrink-0 select-none items-center justify-center py-1 text-(--alert-accent) [&_svg]:size-4", children: a ?? /* @__PURE__ */ e(f, { "aria-hidden": !0 }) }),
|
|
39
39
|
/* @__PURE__ */ e("div", { className: "flex min-w-0 grow flex-col items-start", children: o }),
|
|
40
40
|
s && /* @__PURE__ */ e(
|
|
41
41
|
"button",
|
|
@@ -58,19 +58,31 @@ const h = m(
|
|
|
58
58
|
}
|
|
59
59
|
);
|
|
60
60
|
N.displayName = "Alert";
|
|
61
|
-
const
|
|
61
|
+
const y = i.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ e(
|
|
62
62
|
"p",
|
|
63
63
|
{
|
|
64
64
|
ref: a,
|
|
65
|
-
className: n("text-xs font-medium leading-6 text-(--alert-accent)",
|
|
66
|
-
...
|
|
65
|
+
className: n("text-xs font-medium leading-6 text-(--alert-accent)", t),
|
|
66
|
+
...r
|
|
67
67
|
}
|
|
68
68
|
));
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
69
|
+
y.displayName = "AlertTitle";
|
|
70
|
+
const b = i.forwardRef(({ className: t, ...r }, a) => (
|
|
71
|
+
// leading-normal (150%) — the description is the only part of an alert that
|
|
72
|
+
// regularly wraps, and the text-xs default (138%) sets multi-line copy too
|
|
73
|
+
// tight to scan.
|
|
74
|
+
/* @__PURE__ */ e(
|
|
75
|
+
"p",
|
|
76
|
+
{
|
|
77
|
+
ref: a,
|
|
78
|
+
className: n("text-xs leading-normal text-muted-foreground", t),
|
|
79
|
+
...r
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
));
|
|
83
|
+
b.displayName = "AlertDescription";
|
|
72
84
|
export {
|
|
73
85
|
N as Alert,
|
|
74
|
-
|
|
75
|
-
|
|
86
|
+
b as AlertDescription,
|
|
87
|
+
y as AlertTitle
|
|
76
88
|
};
|
|
@@ -10,10 +10,12 @@ import * as React from "react";
|
|
|
10
10
|
* cap the height from the outside (`className="max-h-96"`) rather than letting
|
|
11
11
|
* the page grow.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
* a
|
|
15
|
-
*
|
|
16
|
-
*
|
|
13
|
+
* Highlighting is deliberately minimal and dependency-free: `language` selects
|
|
14
|
+
* one of a few small built-in grammars (sql, json, yaml, bash, ts/js) and only
|
|
15
|
+
* the parts a reader scans for are coloured — comments recede, strings and
|
|
16
|
+
* numbers take one accent each, keywords take weight. An unrecognised language
|
|
17
|
+
* renders plain rather than guessing. No highlighter library, and no rainbow
|
|
18
|
+
* competing with the brand's monochrome.
|
|
17
19
|
*/
|
|
18
20
|
declare const codeBlockVariants: (props?: ({
|
|
19
21
|
variant?: "soft" | "plain" | null | undefined;
|
|
@@ -21,7 +23,11 @@ declare const codeBlockVariants: (props?: ({
|
|
|
21
23
|
export interface CodeBlockProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children">, VariantProps<typeof codeBlockVariants> {
|
|
22
24
|
/** The source to display, verbatim. */
|
|
23
25
|
code: string;
|
|
24
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Language label for the header, e.g. `sql`. Also selects the highlighting
|
|
28
|
+
* grammar: sql · json · yaml · yml · bash/sh/shell/zsh · ts/tsx/js/jsx.
|
|
29
|
+
* Anything else is shown as a label and rendered plain.
|
|
30
|
+
*/
|
|
25
31
|
language?: string;
|
|
26
32
|
/** Leading header label, e.g. `schema.yaml`. Takes the header's start slot. */
|
|
27
33
|
filename?: string;
|
package/components/code-block.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
4
|
-
import { cva as
|
|
5
|
-
import { Button as
|
|
6
|
-
import { Check as
|
|
7
|
-
import { cn as
|
|
8
|
-
const
|
|
9
|
-
|
|
2
|
+
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import * as c from "react";
|
|
4
|
+
import { cva as C } from "class-variance-authority";
|
|
5
|
+
import { Button as R } from "./button.js";
|
|
6
|
+
import { Check as E, Copy as S } from "../lib/icons.js";
|
|
7
|
+
import { cn as k } from "../lib/cn.js";
|
|
8
|
+
const j = C(
|
|
9
|
+
// `flex flex-col` so a height cap from the consumer squeezes the <pre>
|
|
10
|
+
// rather than clipping it — the pre is the scroll container, not this.
|
|
11
|
+
"group/code-block relative flex w-full flex-col overflow-hidden rounded-lg text-xs",
|
|
10
12
|
{
|
|
11
13
|
variants: {
|
|
12
14
|
variant: {
|
|
@@ -18,110 +20,207 @@ const B = k(
|
|
|
18
20
|
},
|
|
19
21
|
defaultVariants: { variant: "soft" }
|
|
20
22
|
}
|
|
21
|
-
)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
), f = '"(?:[^"\\\\\\n]|\\\\.)*"', h = "'(?:[^'\\\\\\n]|\\\\.)*'", T = {
|
|
24
|
+
sql: [
|
|
25
|
+
{ kind: "comment", re: /--[^\n]*/y },
|
|
26
|
+
{ kind: "string", re: new RegExp(h, "y") },
|
|
27
|
+
{
|
|
28
|
+
kind: "keyword",
|
|
29
|
+
re: /\b(select|from|where|create|table|index|concurrently|on|and|or|not|null|group|by|order|limit|offset|insert|into|values|update|set|delete|join|left|right|inner|outer|full|as|distinct|case|when|then|else|end|with|union|all|desc|asc|true|false|count|sum|avg|min|max|having)\b/iy
|
|
30
|
+
},
|
|
31
|
+
{ kind: "number", re: /\b\d+(?:\.\d+)?\b/y },
|
|
32
|
+
{ kind: "punct", re: /[(),;]/y }
|
|
33
|
+
],
|
|
34
|
+
json: [
|
|
35
|
+
{ kind: "string", re: new RegExp(f, "y") },
|
|
36
|
+
{ kind: "keyword", re: /\b(?:true|false|null)\b/y },
|
|
37
|
+
{ kind: "number", re: /-?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b/y },
|
|
38
|
+
{ kind: "punct", re: /[{}[\],:]/y }
|
|
39
|
+
],
|
|
40
|
+
yaml: [
|
|
41
|
+
{ kind: "comment", re: /#[^\n]*/y },
|
|
42
|
+
{ kind: "string", re: new RegExp(`${f}|${h}`, "y") },
|
|
43
|
+
{ kind: "keyword", re: /\b(?:true|false|null|yes|no)\b/y },
|
|
44
|
+
{ kind: "number", re: /\b\d+(?:\.\d+)?\b/y },
|
|
45
|
+
{ kind: "punct", re: /[-:]/y }
|
|
46
|
+
],
|
|
47
|
+
bash: [
|
|
48
|
+
{ kind: "comment", re: /#[^\n]*/y },
|
|
49
|
+
{ kind: "string", re: new RegExp(`${f}|${h}`, "y") },
|
|
50
|
+
{ kind: "keyword", re: /--?[A-Za-z][\w-]*/y },
|
|
51
|
+
{ kind: "number", re: /\b\d+\b/y }
|
|
52
|
+
],
|
|
53
|
+
ts: [
|
|
54
|
+
{ kind: "comment", re: /\/\/[^\n]*|\/\*[\s\S]*?\*\//y },
|
|
55
|
+
{ kind: "string", re: new RegExp(`${f}|${h}|\`(?:[^\`\\\\]|\\\\.)*\``, "y") },
|
|
56
|
+
{
|
|
57
|
+
kind: "keyword",
|
|
58
|
+
re: /\b(?:const|let|var|function|return|if|else|for|while|import|from|export|default|new|class|extends|implements|async|await|type|interface|enum|public|private|readonly|true|false|null|undefined|this)\b/y
|
|
59
|
+
},
|
|
60
|
+
{ kind: "number", re: /\b\d+(?:\.\d+)?\b/y },
|
|
61
|
+
{ kind: "punct", re: /[{}[\]();,:]/y }
|
|
62
|
+
]
|
|
63
|
+
}, A = {
|
|
64
|
+
sql: "sql",
|
|
65
|
+
json: "json",
|
|
66
|
+
yaml: "yaml",
|
|
67
|
+
yml: "yaml",
|
|
68
|
+
bash: "bash",
|
|
69
|
+
sh: "bash",
|
|
70
|
+
shell: "bash",
|
|
71
|
+
zsh: "bash",
|
|
72
|
+
ts: "ts",
|
|
73
|
+
tsx: "ts",
|
|
74
|
+
js: "ts",
|
|
75
|
+
jsx: "ts",
|
|
76
|
+
javascript: "ts",
|
|
77
|
+
typescript: "ts"
|
|
78
|
+
}, $ = {
|
|
79
|
+
comment: "text-tertiary",
|
|
80
|
+
string: "text-success-700",
|
|
81
|
+
number: "text-info-700",
|
|
82
|
+
keyword: "font-bold text-foreground",
|
|
83
|
+
punct: "text-tertiary"
|
|
84
|
+
};
|
|
85
|
+
function B(s, t) {
|
|
86
|
+
const e = [];
|
|
87
|
+
let n = "", o = 0;
|
|
88
|
+
for (; o < s.length; ) {
|
|
89
|
+
let i = null;
|
|
90
|
+
for (const { kind: y, re: u } of t) {
|
|
91
|
+
u.lastIndex = o;
|
|
92
|
+
const l = u.exec(s);
|
|
93
|
+
if (l && l.index === o && l[0].length > 0) {
|
|
94
|
+
i = { text: l[0], kind: y };
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
i ? (n && (e.push({ text: n }), n = ""), e.push(i), o += i.text.length) : (n += s[o], o += 1);
|
|
99
|
+
}
|
|
100
|
+
return n && e.push({ text: n }), e;
|
|
101
|
+
}
|
|
102
|
+
function z(s) {
|
|
103
|
+
const t = [[]];
|
|
104
|
+
for (const e of s)
|
|
105
|
+
e.text.split(`
|
|
106
|
+
`).forEach((o, i) => {
|
|
107
|
+
i > 0 && t.push([]), o && t[t.length - 1].push({ ...e, text: o });
|
|
108
|
+
});
|
|
109
|
+
return t;
|
|
110
|
+
}
|
|
111
|
+
function g(s) {
|
|
112
|
+
return s.map(
|
|
113
|
+
(t, e) => t.kind ? /* @__PURE__ */ r("span", { className: $[t.kind], children: t.text }, e) : /* @__PURE__ */ r(c.Fragment, { children: t.text }, e)
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
function M(s = 2e3) {
|
|
117
|
+
const [t, e] = c.useState(!1), n = c.useRef(null);
|
|
118
|
+
c.useEffect(
|
|
25
119
|
() => () => {
|
|
26
|
-
|
|
120
|
+
n.current !== null && window.clearTimeout(n.current);
|
|
27
121
|
},
|
|
28
122
|
[]
|
|
29
123
|
);
|
|
30
|
-
const
|
|
124
|
+
const o = c.useCallback(
|
|
31
125
|
(i) => {
|
|
32
126
|
!i || typeof navigator > "u" || !navigator.clipboard || navigator.clipboard.writeText(i).then(
|
|
33
127
|
() => {
|
|
34
|
-
|
|
35
|
-
() =>
|
|
36
|
-
|
|
128
|
+
e(!0), n.current !== null && window.clearTimeout(n.current), n.current = window.setTimeout(
|
|
129
|
+
() => e(!1),
|
|
130
|
+
s
|
|
37
131
|
);
|
|
38
132
|
},
|
|
39
133
|
() => {
|
|
40
134
|
}
|
|
41
135
|
);
|
|
42
136
|
},
|
|
43
|
-
[
|
|
137
|
+
[s]
|
|
44
138
|
);
|
|
45
|
-
return { isCopied:
|
|
139
|
+
return { isCopied: t, copy: o };
|
|
46
140
|
}
|
|
47
|
-
const
|
|
141
|
+
const _ = c.forwardRef(
|
|
48
142
|
({
|
|
49
|
-
className:
|
|
50
|
-
code:
|
|
51
|
-
language:
|
|
52
|
-
filename:
|
|
53
|
-
variant:
|
|
143
|
+
className: s,
|
|
144
|
+
code: t,
|
|
145
|
+
language: e,
|
|
146
|
+
filename: n,
|
|
147
|
+
variant: o,
|
|
54
148
|
isCopyable: i = !0,
|
|
55
|
-
showLineNumbers:
|
|
56
|
-
copyLabel:
|
|
57
|
-
...
|
|
58
|
-
},
|
|
59
|
-
const { isCopied:
|
|
60
|
-
()
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
C,
|
|
149
|
+
showLineNumbers: y = !1,
|
|
150
|
+
copyLabel: u = "Copy code",
|
|
151
|
+
...l
|
|
152
|
+
}, v) => {
|
|
153
|
+
const { isCopied: x, copy: N } = M(), b = !!(n || e), w = c.useMemo(() => {
|
|
154
|
+
const d = e ? T[A[e.toLowerCase()]] : void 0, a = t.replace(/\n$/, "");
|
|
155
|
+
return z(d ? B(a, d) : [{ text: a }]);
|
|
156
|
+
}, [t, e]), p = i ? /* @__PURE__ */ r(
|
|
157
|
+
R,
|
|
65
158
|
{
|
|
66
159
|
type: "button",
|
|
67
160
|
variant: "ghost",
|
|
68
161
|
size: "icon-xs",
|
|
69
|
-
"aria-label":
|
|
70
|
-
onClick: () =>
|
|
71
|
-
children:
|
|
162
|
+
"aria-label": u,
|
|
163
|
+
onClick: () => N(t),
|
|
164
|
+
children: x ? /* @__PURE__ */ r(E, { "aria-hidden": !0, className: "text-success" }) : /* @__PURE__ */ r(S, { "aria-hidden": !0 })
|
|
72
165
|
}
|
|
73
166
|
) : null;
|
|
74
|
-
return /* @__PURE__ */
|
|
167
|
+
return /* @__PURE__ */ m(
|
|
75
168
|
"div",
|
|
76
169
|
{
|
|
77
|
-
ref:
|
|
170
|
+
ref: v,
|
|
78
171
|
"data-slot": "code-block",
|
|
79
|
-
className:
|
|
80
|
-
...
|
|
172
|
+
className: k(j({ variant: o }), s),
|
|
173
|
+
...l,
|
|
81
174
|
children: [
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
|
|
175
|
+
/* @__PURE__ */ r("span", { "aria-live": "polite", className: "sr-only", children: x ? "Copied to clipboard" : "" }),
|
|
176
|
+
b && /* @__PURE__ */ m(
|
|
84
177
|
"div",
|
|
85
178
|
{
|
|
86
179
|
"data-slot": "code-block-header",
|
|
87
180
|
className: "flex items-center gap-2 px-3 py-1.5 text-tertiary",
|
|
88
181
|
children: [
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
182
|
+
n && /* @__PURE__ */ r("span", { className: "min-w-0 truncate font-medium text-secondary", children: n }),
|
|
183
|
+
e && /* @__PURE__ */ r("span", { className: "shrink-0 font-mono text-[11px] uppercase", children: e }),
|
|
184
|
+
p && /* @__PURE__ */ r("span", { className: "ml-auto shrink-0", children: p })
|
|
92
185
|
]
|
|
93
186
|
}
|
|
94
187
|
),
|
|
95
|
-
!
|
|
188
|
+
!b && p && /* @__PURE__ */ r(
|
|
96
189
|
"span",
|
|
97
190
|
{
|
|
98
|
-
className:
|
|
191
|
+
className: k(
|
|
99
192
|
"absolute top-1.5 right-1.5 z-10 opacity-0 transition-opacity duration-(--duration-fast) ease-out",
|
|
100
193
|
"group-hover/code-block:opacity-100 focus-within:opacity-100",
|
|
101
194
|
"motion-reduce:transition-none"
|
|
102
195
|
),
|
|
103
|
-
children:
|
|
196
|
+
children: p
|
|
104
197
|
}
|
|
105
198
|
),
|
|
106
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ r(
|
|
107
200
|
"pre",
|
|
108
201
|
{
|
|
109
202
|
"data-slot": "code-block-content",
|
|
110
|
-
className:
|
|
111
|
-
|
|
112
|
-
|
|
203
|
+
className: k(
|
|
204
|
+
// min-h-0 lets this shrink inside the flex column; without it a
|
|
205
|
+
// capped block clips its overflow instead of scrolling to it.
|
|
206
|
+
"min-h-0 overflow-auto px-3 leading-relaxed text-foreground tabular-nums",
|
|
207
|
+
b ? "pb-3" : "py-3"
|
|
113
208
|
),
|
|
114
|
-
children: /* @__PURE__ */
|
|
115
|
-
/* @__PURE__ */
|
|
209
|
+
children: /* @__PURE__ */ r("code", { className: "font-mono", children: y ? w.map((d, a) => /* @__PURE__ */ m("span", { className: "grid grid-cols-[2ch_1fr] gap-3", children: [
|
|
210
|
+
/* @__PURE__ */ r(
|
|
116
211
|
"span",
|
|
117
212
|
{
|
|
118
213
|
"aria-hidden": !0,
|
|
119
214
|
className: "select-none text-right text-tertiary",
|
|
120
|
-
children:
|
|
215
|
+
children: a + 1
|
|
121
216
|
}
|
|
122
217
|
),
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
] },
|
|
218
|
+
/* @__PURE__ */ r("span", { children: g(d) })
|
|
219
|
+
] }, a)) : w.map((d, a) => /* @__PURE__ */ m(c.Fragment, { children: [
|
|
220
|
+
a > 0 && `
|
|
221
|
+
`,
|
|
222
|
+
g(d)
|
|
223
|
+
] }, a)) })
|
|
125
224
|
}
|
|
126
225
|
)
|
|
127
226
|
]
|
|
@@ -129,8 +228,8 @@ const R = r.forwardRef(
|
|
|
129
228
|
);
|
|
130
229
|
}
|
|
131
230
|
);
|
|
132
|
-
|
|
231
|
+
_.displayName = "CodeBlock";
|
|
133
232
|
export {
|
|
134
|
-
|
|
135
|
-
|
|
233
|
+
_ as CodeBlock,
|
|
234
|
+
j as codeBlockVariants
|
|
136
235
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as f, jsx as o } from "react/jsx-runtime";
|
|
3
3
|
import * as i from "react";
|
|
4
|
-
import { ScrollArea as
|
|
4
|
+
import { ScrollArea as e } from "radix-ui";
|
|
5
5
|
import { cn as s } from "../lib/cn.js";
|
|
6
6
|
const m = i.forwardRef(
|
|
7
|
-
({ className:
|
|
8
|
-
|
|
7
|
+
({ className: a, children: l, orientation: r = "vertical", viewportClassName: t, ...n }, d) => /* @__PURE__ */ f(
|
|
8
|
+
e.Root,
|
|
9
9
|
{
|
|
10
10
|
ref: d,
|
|
11
11
|
"data-slot": "scroll-area",
|
|
12
|
-
className: s("relative overflow-hidden",
|
|
12
|
+
className: s("relative overflow-hidden border border-border", a),
|
|
13
13
|
...n,
|
|
14
14
|
children: [
|
|
15
15
|
/* @__PURE__ */ o(
|
|
16
|
-
|
|
16
|
+
e.Viewport,
|
|
17
17
|
{
|
|
18
18
|
className: s("size-full rounded-[inherit]", t),
|
|
19
19
|
children: l
|
|
@@ -21,14 +21,14 @@ const m = i.forwardRef(
|
|
|
21
21
|
),
|
|
22
22
|
(r === "vertical" || r === "both") && /* @__PURE__ */ o(c, { orientation: "vertical" }),
|
|
23
23
|
(r === "horizontal" || r === "both") && /* @__PURE__ */ o(c, { orientation: "horizontal" }),
|
|
24
|
-
/* @__PURE__ */ o(
|
|
24
|
+
/* @__PURE__ */ o(e.Corner, {})
|
|
25
25
|
]
|
|
26
26
|
}
|
|
27
27
|
)
|
|
28
28
|
);
|
|
29
29
|
m.displayName = "ScrollArea";
|
|
30
|
-
const c = i.forwardRef(({ className:
|
|
31
|
-
|
|
30
|
+
const c = i.forwardRef(({ className: a, orientation: l = "vertical", ...r }, t) => /* @__PURE__ */ o(
|
|
31
|
+
e.ScrollAreaScrollbar,
|
|
32
32
|
{
|
|
33
33
|
ref: t,
|
|
34
34
|
orientation: l,
|
|
@@ -38,11 +38,11 @@ const c = i.forwardRef(({ className: e, orientation: l = "vertical", ...r }, t)
|
|
|
38
38
|
"transition-colors duration-(--duration-fast) ease-out motion-reduce:transition-none",
|
|
39
39
|
l === "vertical" && "h-full w-2.5",
|
|
40
40
|
l === "horizontal" && "h-2.5 flex-col",
|
|
41
|
-
|
|
41
|
+
a
|
|
42
42
|
),
|
|
43
43
|
...r,
|
|
44
44
|
children: /* @__PURE__ */ o(
|
|
45
|
-
|
|
45
|
+
e.ScrollAreaThumb,
|
|
46
46
|
{
|
|
47
47
|
"data-slot": "scroll-bar-thumb",
|
|
48
48
|
className: "relative flex-1 rounded-full bg-fill transition-colors duration-(--duration-fast) ease-out hover:bg-border-strong motion-reduce:transition-none"
|
package/components/sidebar.js
CHANGED
|
@@ -235,7 +235,7 @@ const B = n.forwardRef(
|
|
|
235
235
|
className: o("group-data-[collapsed=true]/sidebar:hidden", a),
|
|
236
236
|
...r,
|
|
237
237
|
children: [
|
|
238
|
-
e && /* @__PURE__ */ t("div", { className: "mb-1.5 px-3 text-[length:var(--sidebar-section-label-size)] leading-[var(--text-xs--line-height)] font-
|
|
238
|
+
e && /* @__PURE__ */ t("div", { className: "mb-1.5 px-3 text-[length:var(--sidebar-section-label-size)] leading-[var(--text-xs--line-height)] font-normal uppercase tracking-wider text-muted-foreground", children: e }),
|
|
239
239
|
/* @__PURE__ */ t("div", { className: "flex flex-col gap-0.5", children: i })
|
|
240
240
|
]
|
|
241
241
|
}
|
package/components/stepper.d.ts
CHANGED
|
@@ -5,26 +5,34 @@ import * as React from "react";
|
|
|
5
5
|
*
|
|
6
6
|
* `Progress` is a continuous bar and `Timeline` is a chronological list of
|
|
7
7
|
* content; neither says "step 2 of 5, and here is what 3 through 5 will be".
|
|
8
|
-
* Completed steps collapse to a check so the eye counts what is left,
|
|
9
|
-
* is done
|
|
10
|
-
*
|
|
8
|
+
* Completed steps collapse to a green check so the eye counts what is left,
|
|
9
|
+
* not what is done; the current step stays brand-black; a failed step turns
|
|
10
|
+
* danger and keeps its place in the sequence rather than disappearing — a
|
|
11
|
+
* wizard that hides the step that broke is unusable.
|
|
12
|
+
*
|
|
13
|
+
* One label per step, deliberately: a sub-label under every step is the
|
|
14
|
+
* redundant chrome design principle 8 warns about.
|
|
15
|
+
*
|
|
16
|
+
* Horizontal only. The connector is a functional rail, like `Tree`'s — an
|
|
17
|
+
* allowed stroke — running the full distance between two markers so the
|
|
18
|
+
* sequence reads as one continuous line rather than a row of ticks.
|
|
11
19
|
*/
|
|
12
|
-
export type StepperStatus = "complete" | "current" | "upcoming";
|
|
20
|
+
export type StepperStatus = "complete" | "current" | "upcoming" | "error";
|
|
13
21
|
export interface StepperStep {
|
|
14
22
|
/** Stable key, also used for the accessible label. */
|
|
15
23
|
id: string;
|
|
16
24
|
label: React.ReactNode;
|
|
17
|
-
/**
|
|
18
|
-
|
|
25
|
+
/** Marks a step that failed. Overrides the index-derived status. */
|
|
26
|
+
isError?: boolean;
|
|
19
27
|
}
|
|
20
28
|
declare const markerVariants: (props?: ({
|
|
21
|
-
status?: "current" | "complete" | "upcoming" | null | undefined;
|
|
29
|
+
status?: "current" | "error" | "complete" | "upcoming" | null | undefined;
|
|
30
|
+
size?: "sm" | "md" | null | undefined;
|
|
22
31
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
23
|
-
export interface StepperProps extends Omit<React.HTMLAttributes<HTMLOListElement>, "onSelect">, VariantProps<typeof markerVariants> {
|
|
32
|
+
export interface StepperProps extends Omit<React.HTMLAttributes<HTMLOListElement>, "onSelect">, Pick<VariantProps<typeof markerVariants>, "size"> {
|
|
24
33
|
steps: StepperStep[];
|
|
25
34
|
/** Zero-based index of the current step. */
|
|
26
35
|
activeIndex: number;
|
|
27
|
-
orientation?: "horizontal" | "vertical";
|
|
28
36
|
/** Makes completed steps navigable. */
|
|
29
37
|
onSelect?: (index: number) => void;
|
|
30
38
|
}
|