@actioneer/ads 0.5.7 → 0.5.9
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.d.ts +1 -0
- package/components/avatar.js +27 -26
- package/components/badge.d.ts +1 -1
- package/components/breadcrumbs.d.ts +2 -0
- package/components/breadcrumbs.js +52 -50
- 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.d.ts +6 -0
- package/components/chart.js +743 -672
- 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 +18 -11
- package/components/drawer.js +81 -78
- 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.d.ts +5 -1
- package/components/modal.js +121 -76
- 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 +4 -0
- package/components/pixel-icon.js +210 -164
- 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 +1 -0
- package/components/segmented.js +39 -36
- package/components/select.d.ts +7 -0
- package/components/select.js +186 -137
- 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 +16 -0
- package/components/table.js +393 -260
- 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 +363 -0
- package/demo/lib/artifact-library.js +142 -0
- package/demo/lib/artifact-pin-guard.js +12 -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 +24 -0
- package/lib/icons.js +114 -108
- 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 +53 -19
- package/manifest.json +258 -36
- 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/checkbox.js
CHANGED
|
@@ -1,84 +1,120 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
2
|
+
import { jsxs as v, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { motion as x, MotionConfig as w, AnimatePresence as C } from "motion/react";
|
|
5
|
+
import { Check as M, Minus as N } from "../lib/icons.js";
|
|
6
|
+
import { cn as p } from "../lib/cn.js";
|
|
7
|
+
import { Field as z } from "./field.js";
|
|
8
|
+
import { checkDrawTransition as b } from "../lib/motion.js";
|
|
9
|
+
const R = x.create(M), j = x.create(N), G = {
|
|
8
10
|
sm: "size-4 [&_svg]:size-3",
|
|
9
11
|
md: "size-4.5 [&_svg]:size-3.5"
|
|
10
|
-
},
|
|
11
|
-
({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
}, I = t.forwardRef(
|
|
13
|
+
({
|
|
14
|
+
className: a,
|
|
15
|
+
children: o,
|
|
16
|
+
indeterminate: r = !1,
|
|
17
|
+
size: l = "md",
|
|
18
|
+
disabled: c,
|
|
19
|
+
checked: n,
|
|
20
|
+
defaultChecked: d = !1,
|
|
21
|
+
onChange: i,
|
|
22
|
+
...h
|
|
23
|
+
}, k) => {
|
|
24
|
+
const s = t.useRef(null), f = n !== void 0, [g, y] = t.useState(d), m = f ? n : g;
|
|
25
|
+
return t.useImperativeHandle(k, () => s.current), t.useEffect(() => {
|
|
26
|
+
s.current && (s.current.indeterminate = r);
|
|
27
|
+
}, [r]), /* @__PURE__ */ v(
|
|
16
28
|
"label",
|
|
17
29
|
{
|
|
18
|
-
className:
|
|
30
|
+
className: p(
|
|
19
31
|
"group inline-flex items-center gap-2 text-xs text-foreground select-none",
|
|
20
|
-
|
|
21
|
-
|
|
32
|
+
c ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
33
|
+
a
|
|
22
34
|
),
|
|
23
35
|
children: [
|
|
24
36
|
/* @__PURE__ */ e(
|
|
25
37
|
"input",
|
|
26
38
|
{
|
|
27
|
-
ref:
|
|
39
|
+
ref: s,
|
|
28
40
|
type: "checkbox",
|
|
29
|
-
disabled:
|
|
41
|
+
disabled: c,
|
|
42
|
+
checked: m,
|
|
43
|
+
onChange: (u) => {
|
|
44
|
+
f || y(u.target.checked), i == null || i(u);
|
|
45
|
+
},
|
|
30
46
|
className: "peer sr-only",
|
|
31
|
-
...
|
|
47
|
+
...h
|
|
32
48
|
}
|
|
33
49
|
),
|
|
34
50
|
/* @__PURE__ */ e(
|
|
35
51
|
"span",
|
|
36
52
|
{
|
|
37
53
|
"aria-hidden": !0,
|
|
38
|
-
className:
|
|
54
|
+
className: p(
|
|
39
55
|
"flex shrink-0 items-center justify-center rounded-sm border border-input bg-elevated text-brand-foreground",
|
|
40
|
-
"transition-[background,border,box-shadow] duration-
|
|
56
|
+
"transition-[background,border,box-shadow] duration-150",
|
|
41
57
|
"peer-checked:border-brand peer-checked:bg-brand",
|
|
42
58
|
"peer-indeterminate:border-brand peer-indeterminate:bg-brand",
|
|
43
59
|
"peer-focus-visible:ring-3 peer-focus-visible:ring-ring",
|
|
44
|
-
|
|
60
|
+
G[l]
|
|
45
61
|
),
|
|
46
|
-
children:
|
|
62
|
+
children: /* @__PURE__ */ e(w, { reducedMotion: "user", children: /* @__PURE__ */ e(C, { initial: !1, mode: "wait", children: (m || r) && (r ? /* @__PURE__ */ e(
|
|
63
|
+
j,
|
|
64
|
+
{
|
|
65
|
+
initial: { opacity: 0, scale: 0.9 },
|
|
66
|
+
animate: { opacity: 1, scale: 1 },
|
|
67
|
+
exit: { opacity: 0, scale: 0.9 },
|
|
68
|
+
transition: b,
|
|
69
|
+
strokeWidth: 3
|
|
70
|
+
},
|
|
71
|
+
"indeterminate"
|
|
72
|
+
) : /* @__PURE__ */ e(
|
|
73
|
+
R,
|
|
74
|
+
{
|
|
75
|
+
initial: { opacity: 0, scale: 0.9 },
|
|
76
|
+
animate: { opacity: 1, scale: 1 },
|
|
77
|
+
exit: { opacity: 0, scale: 0.9 },
|
|
78
|
+
transition: b,
|
|
79
|
+
strokeWidth: 3
|
|
80
|
+
},
|
|
81
|
+
"checked"
|
|
82
|
+
)) }) })
|
|
47
83
|
}
|
|
48
84
|
),
|
|
49
|
-
|
|
85
|
+
o && /* @__PURE__ */ e("span", { children: o })
|
|
50
86
|
]
|
|
51
87
|
}
|
|
52
88
|
);
|
|
53
89
|
}
|
|
54
90
|
);
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
({ className:
|
|
58
|
-
|
|
91
|
+
I.displayName = "Checkbox";
|
|
92
|
+
const S = t.forwardRef(
|
|
93
|
+
({ className: a, label: o, description: r, error: l, orientation: c = "vertical", children: n, ...d }, i) => /* @__PURE__ */ e(
|
|
94
|
+
z,
|
|
59
95
|
{
|
|
60
|
-
ref:
|
|
61
|
-
label:
|
|
62
|
-
description:
|
|
63
|
-
error:
|
|
96
|
+
ref: i,
|
|
97
|
+
label: o,
|
|
98
|
+
description: r,
|
|
99
|
+
error: l,
|
|
64
100
|
role: "group",
|
|
65
|
-
className:
|
|
101
|
+
className: a,
|
|
66
102
|
...d,
|
|
67
103
|
children: /* @__PURE__ */ e(
|
|
68
104
|
"div",
|
|
69
105
|
{
|
|
70
|
-
className:
|
|
106
|
+
className: p(
|
|
71
107
|
"flex gap-3",
|
|
72
|
-
|
|
108
|
+
c === "vertical" ? "flex-col" : "flex-row flex-wrap"
|
|
73
109
|
),
|
|
74
|
-
children:
|
|
110
|
+
children: n
|
|
75
111
|
}
|
|
76
112
|
)
|
|
77
113
|
}
|
|
78
114
|
)
|
|
79
115
|
);
|
|
80
|
-
|
|
116
|
+
S.displayName = "CheckboxGroup";
|
|
81
117
|
export {
|
|
82
|
-
|
|
83
|
-
|
|
118
|
+
I as Checkbox,
|
|
119
|
+
S as CheckboxGroup
|
|
84
120
|
};
|
package/components/chip.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const chipVariants: (props?: ({
|
|
4
|
-
variant?: "soft" | "
|
|
4
|
+
variant?: "soft" | "outline" | "solid" | "dot" | null | undefined;
|
|
5
5
|
color?: "success" | "warning" | "danger" | "info" | "default" | "primary" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
export interface ChipProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "color">, VariantProps<typeof chipVariants> {
|
package/components/code-block.js
CHANGED
|
@@ -81,7 +81,7 @@ const G = _(
|
|
|
81
81
|
comment: "text-tertiary",
|
|
82
82
|
string: "text-foreground",
|
|
83
83
|
number: "text-foreground",
|
|
84
|
-
keyword: "font-
|
|
84
|
+
keyword: "font-medium text-foreground",
|
|
85
85
|
function: "font-medium text-foreground",
|
|
86
86
|
tag: "font-medium text-foreground",
|
|
87
87
|
punct: "text-tertiary"
|
|
@@ -208,7 +208,7 @@ const J = s.forwardRef(
|
|
|
208
208
|
"span",
|
|
209
209
|
{
|
|
210
210
|
className: u(
|
|
211
|
-
"absolute top-2 right-2 z-10 opacity-0 transition-opacity duration-
|
|
211
|
+
"absolute top-2 right-2 z-10 opacity-0 transition-opacity duration-150 ease-out",
|
|
212
212
|
"group-hover/code-block:opacity-100 focus-within:opacity-100",
|
|
213
213
|
"motion-reduce:transition-none"
|
|
214
214
|
),
|
|
@@ -256,7 +256,7 @@ const J = s.forwardRef(
|
|
|
256
256
|
className: u(
|
|
257
257
|
"select-none text-right text-tertiary",
|
|
258
258
|
d === "highlighted" && "text-info-700",
|
|
259
|
-
d === "added" && "font-
|
|
259
|
+
d === "added" && "font-medium text-foreground",
|
|
260
260
|
d === "removed" && "text-danger-700"
|
|
261
261
|
),
|
|
262
262
|
children: c
|
|
@@ -1,31 +1,75 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import { Collapsible as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
t.
|
|
2
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { Collapsible as r } from "radix-ui";
|
|
5
|
+
import { MotionConfig as u, AnimatePresence as g, motion as h } from "motion/react";
|
|
6
|
+
import { springDisclosure as y } from "../lib/motion.js";
|
|
7
|
+
const C = t.createContext(!1), v = t.forwardRef(({ children: o, open: i, defaultOpen: a = !1, onOpenChange: e, ...s }, n) => {
|
|
8
|
+
const c = i !== void 0, [f, b] = t.useState(a), p = c ? i : f, m = t.useCallback(
|
|
9
|
+
(d) => {
|
|
10
|
+
c || b(d), e == null || e(d);
|
|
11
|
+
},
|
|
12
|
+
[c, e]
|
|
13
|
+
);
|
|
14
|
+
return /* @__PURE__ */ l(C.Provider, { value: p, children: /* @__PURE__ */ l(
|
|
15
|
+
r.Root,
|
|
16
|
+
{
|
|
17
|
+
ref: n,
|
|
18
|
+
"data-slot": "collapsible",
|
|
19
|
+
open: p,
|
|
20
|
+
onOpenChange: m,
|
|
21
|
+
...s,
|
|
22
|
+
children: o
|
|
23
|
+
}
|
|
24
|
+
) });
|
|
25
|
+
});
|
|
26
|
+
v.displayName = "Collapsible";
|
|
27
|
+
const x = t.forwardRef(({ children: o, ...i }, a) => /* @__PURE__ */ l(
|
|
28
|
+
r.CollapsibleTrigger,
|
|
9
29
|
{
|
|
10
30
|
ref: a,
|
|
11
31
|
"data-slot": "collapsible-trigger",
|
|
12
|
-
...
|
|
13
|
-
children:
|
|
32
|
+
...i,
|
|
33
|
+
children: o
|
|
14
34
|
}
|
|
15
35
|
));
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
t.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
36
|
+
x.displayName = "CollapsibleTrigger";
|
|
37
|
+
const R = t.forwardRef(({ children: o, asChild: i, forceMount: a, ...e }, s) => {
|
|
38
|
+
const n = t.useContext(C);
|
|
39
|
+
return i ? /* @__PURE__ */ l(
|
|
40
|
+
r.CollapsibleContent,
|
|
41
|
+
{
|
|
42
|
+
ref: s,
|
|
43
|
+
"data-slot": "collapsible-content",
|
|
44
|
+
asChild: !0,
|
|
45
|
+
forceMount: a,
|
|
46
|
+
...e,
|
|
47
|
+
children: o
|
|
48
|
+
}
|
|
49
|
+
) : /* @__PURE__ */ l(
|
|
50
|
+
r.CollapsibleContent,
|
|
51
|
+
{
|
|
52
|
+
ref: s,
|
|
53
|
+
"data-slot": "collapsible-content",
|
|
54
|
+
...e,
|
|
55
|
+
forceMount: !0,
|
|
56
|
+
children: /* @__PURE__ */ l(u, { reducedMotion: "user", children: /* @__PURE__ */ l(g, { initial: !1, children: n && /* @__PURE__ */ l(
|
|
57
|
+
h.div,
|
|
58
|
+
{
|
|
59
|
+
initial: { height: 0, opacity: 0, y: -4 },
|
|
60
|
+
animate: { height: "auto", opacity: 1, y: 0 },
|
|
61
|
+
exit: { height: 0, opacity: 0, y: -4 },
|
|
62
|
+
transition: y,
|
|
63
|
+
className: "overflow-hidden",
|
|
64
|
+
children: o
|
|
65
|
+
}
|
|
66
|
+
) }) })
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
});
|
|
70
|
+
R.displayName = "CollapsibleContent";
|
|
27
71
|
export {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
72
|
+
v as Collapsible,
|
|
73
|
+
R as CollapsibleContent,
|
|
74
|
+
x as CollapsibleTrigger
|
|
31
75
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as r, Fragment as
|
|
2
|
+
import { jsxs as r, Fragment as f, jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import * as h from "react";
|
|
4
4
|
import { Database as x, ChevronRight as b } from "../lib/icons.js";
|
|
5
5
|
import { cn as o } from "../lib/cn.js";
|
|
@@ -68,7 +68,7 @@ function N({ strip: s }) {
|
|
|
68
68
|
const v = h.forwardRef(
|
|
69
69
|
({ className: s, card: e, onOpen: n, ...a }, i) => {
|
|
70
70
|
var m;
|
|
71
|
-
const c = !!n,
|
|
71
|
+
const c = !!n, g = ((m = e.action) == null ? void 0 : m.tone) === "reconnect", l = /* @__PURE__ */ r(f, { children: [
|
|
72
72
|
/* @__PURE__ */ r("div", { className: "rounded-t-xl p-[var(--card-padding)]", children: [
|
|
73
73
|
/* @__PURE__ */ r("div", { className: "mb-5 flex items-center gap-3.5", children: [
|
|
74
74
|
e.logo ? /* @__PURE__ */ t(
|
|
@@ -81,7 +81,7 @@ const v = h.forwardRef(
|
|
|
81
81
|
) : /* @__PURE__ */ t("span", { className: "grid size-10 shrink-0 place-items-center rounded-md bg-muted text-secondary", children: /* @__PURE__ */ t(x, { className: "size-5", "aria-hidden": !0 }) }),
|
|
82
82
|
/* @__PURE__ */ r("div", { className: "min-w-0 flex-1", children: [
|
|
83
83
|
/* @__PURE__ */ r("div", { className: "flex items-baseline justify-between gap-3", children: [
|
|
84
|
-
/* @__PURE__ */ t("div", { className: "min-w-0 truncate text-base font-
|
|
84
|
+
/* @__PURE__ */ t("div", { className: "min-w-0 truncate text-base font-medium leading-tight text-foreground", children: e.name }),
|
|
85
85
|
/* @__PURE__ */ t(
|
|
86
86
|
y,
|
|
87
87
|
{
|
|
@@ -101,7 +101,7 @@ const v = h.forwardRef(
|
|
|
101
101
|
{
|
|
102
102
|
className: o(
|
|
103
103
|
"min-w-0 truncate text-xs",
|
|
104
|
-
|
|
104
|
+
"text-secondary"
|
|
105
105
|
),
|
|
106
106
|
children: e.footer.text
|
|
107
107
|
}
|
|
@@ -111,7 +111,7 @@ const v = h.forwardRef(
|
|
|
111
111
|
{
|
|
112
112
|
className: o(
|
|
113
113
|
"inline-flex shrink-0 items-center gap-0.5 text-xs font-normal",
|
|
114
|
-
|
|
114
|
+
g ? "text-danger" : "text-foreground"
|
|
115
115
|
),
|
|
116
116
|
children: [
|
|
117
117
|
e.action.label,
|
|
@@ -127,7 +127,7 @@ const v = h.forwardRef(
|
|
|
127
127
|
// aliasing under transform is a real browser gotcha; forcing a
|
|
128
128
|
// compositor layer fixes it deterministically).
|
|
129
129
|
"rounded-xl bg-card text-card-foreground transform-gpu [will-change:transform] [backface-visibility:hidden]",
|
|
130
|
-
c && "shadow-elevation transition-[transform,box-shadow] duration-
|
|
130
|
+
c && "shadow-elevation transition-[transform,box-shadow] duration-150 ease-out motion-reduce:transition-none",
|
|
131
131
|
s
|
|
132
132
|
);
|
|
133
133
|
return c ? /* @__PURE__ */ t(
|
package/components/drawer.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const panelVariants: (props?: ({
|
|
4
|
-
side?: "
|
|
4
|
+
side?: "bottom" | "left" | "right" | null | undefined;
|
|
5
5
|
size?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
export interface DrawerProps extends VariantProps<typeof panelVariants> {
|
|
@@ -22,10 +22,12 @@ export interface DrawerProps extends VariantProps<typeof panelVariants> {
|
|
|
22
22
|
export interface ModalDrawerProps extends VariantProps<typeof panelVariants> {
|
|
23
23
|
open: boolean;
|
|
24
24
|
onOpenChange: (open: boolean) => void;
|
|
25
|
+
/** Accessible name for the modal drawer dialog. */
|
|
26
|
+
"aria-label": string;
|
|
25
27
|
className?: string;
|
|
26
28
|
children: React.ReactNode;
|
|
27
29
|
}
|
|
28
|
-
export declare function ModalDrawer({ open, onOpenChange, side: sideProp, size, className, children, }: ModalDrawerProps): React.ReactPortal;
|
|
30
|
+
export declare function ModalDrawer({ open, onOpenChange, side: sideProp, size, className, children, "aria-label": ariaLabel, }: ModalDrawerProps): React.ReactPortal;
|
|
29
31
|
/**
|
|
30
32
|
* Drawer — an in-flow side panel that slides in beside content instead of
|
|
31
33
|
* portaling over the whole page. No backdrop, no scroll lock; the surrounding
|
|
@@ -33,20 +35,25 @@ export declare function ModalDrawer({ open, onOpenChange, side: sideProp, size,
|
|
|
33
35
|
* Drawer in ADS. Use `ModalDrawer` when a page-blocking overlay is genuinely
|
|
34
36
|
* required.
|
|
35
37
|
*
|
|
36
|
-
* REQUIRES
|
|
37
|
-
* and no border — it separates from its neighbour purely by fill
|
|
38
|
-
* it is INVISIBLE on a white (`bg-
|
|
39
|
-
* content inside a `bg-
|
|
40
|
-
*
|
|
38
|
+
* REQUIRES THE CANVAS GROUND. The panel is flat white (`bg-card`) with no
|
|
39
|
+
* shadow and no border — it separates from its neighbour purely by fill
|
|
40
|
+
* contrast, so it is INVISIBLE on a pure-white (`bg-card`) parent. Place it
|
|
41
|
+
* and its sibling content inside a `bg-background` flex row — the SHELL
|
|
42
|
+
* CANVAS tint (ink-100), the same color as the frame around the screen. Do
|
|
43
|
+
* NOT use `bg-surface` (ink-200) for this row: it is one Radix step darker
|
|
44
|
+
* than the shell frame, so the gutter between the panels renders as a dark
|
|
45
|
+
* seam stripe instead of reading as canvas (field report 2026-08-06,
|
|
46
|
+
* Artifacts v2). The ground is the parent's job, not the panel's (the inline
|
|
47
|
+
* Drawer renders no ground of its own):
|
|
41
48
|
*
|
|
42
|
-
* <div className="flex gap-3 bg-
|
|
49
|
+
* <div className="flex gap-3 bg-background p-3">
|
|
43
50
|
* <main className="flex-1 rounded-xl bg-card">…content…</main>
|
|
44
51
|
* <Drawer open={open} onOpenChange={setOpen} aria-label="…">…</Drawer>
|
|
45
52
|
* </div>
|
|
46
53
|
*
|
|
47
|
-
* This mirrors the shell's main + chat layout — white panels on
|
|
48
|
-
*
|
|
49
|
-
*
|
|
54
|
+
* This mirrors the shell's main + chat layout — white panels on the canvas.
|
|
55
|
+
* If the panel doesn't read, fix the ground; never add a border or shadow to
|
|
56
|
+
* force it (that fights principle 1).
|
|
50
57
|
*/
|
|
51
58
|
export declare function Drawer({ open, onOpenChange, side: sideProp, size, className, children, "aria-label": ariaLabel, }: DrawerProps): React.JSX.Element;
|
|
52
59
|
/** @deprecated Alias for `Drawer` — the canonical drawer is now the inline
|