@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/popover.d.ts
CHANGED
|
@@ -17,4 +17,4 @@ export interface PopoverContentProps extends React.HTMLAttributes<HTMLDivElement
|
|
|
17
17
|
align?: "start" | "center" | "end";
|
|
18
18
|
sideOffset?: number;
|
|
19
19
|
}
|
|
20
|
-
export declare function PopoverContent({ className, align, sideOffset, children, ...props }: PopoverContentProps): React.ReactPortal;
|
|
20
|
+
export declare function PopoverContent({ className, align, sideOffset, children, "aria-label": ariaLabel, ...props }: PopoverContentProps): React.ReactPortal;
|
package/components/popover.js
CHANGED
|
@@ -1,97 +1,99 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as g, jsxs as
|
|
2
|
+
import { jsx as g, jsxs as C } from "react/jsx-runtime";
|
|
3
3
|
import * as n from "react";
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import { MotionConfig as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { floatVariants as
|
|
8
|
-
import { Ripple as
|
|
9
|
-
const
|
|
4
|
+
import { createPortal as y } from "react-dom";
|
|
5
|
+
import { MotionConfig as L, AnimatePresence as R, motion as k } from "motion/react";
|
|
6
|
+
import { cn as z } from "../lib/cn.js";
|
|
7
|
+
import { floatVariants as O } from "../lib/motion.js";
|
|
8
|
+
import { Ripple as j } from "./ripple.js";
|
|
9
|
+
const x = {
|
|
10
10
|
start: "top left",
|
|
11
11
|
center: "top",
|
|
12
12
|
end: "top right"
|
|
13
|
-
},
|
|
14
|
-
function E(
|
|
15
|
-
const e = n.useContext(
|
|
13
|
+
}, P = n.createContext(null);
|
|
14
|
+
function E(i) {
|
|
15
|
+
const e = n.useContext(P);
|
|
16
16
|
if (!e)
|
|
17
|
-
throw new Error(`${
|
|
17
|
+
throw new Error(`${i} must be used within a <Popover>.`);
|
|
18
18
|
return e;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
const [
|
|
22
|
-
return /* @__PURE__ */ g(
|
|
20
|
+
function W({ children: i, defaultOpen: e = !1 }) {
|
|
21
|
+
const [c, l] = n.useState(e), d = n.useRef(null);
|
|
22
|
+
return /* @__PURE__ */ g(P.Provider, { value: { open: c, setOpen: l, triggerRef: d }, children: i });
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
const { open: e, setOpen:
|
|
26
|
-
return n.cloneElement(
|
|
27
|
-
ref:
|
|
24
|
+
function K({ children: i }) {
|
|
25
|
+
const { open: e, setOpen: c, triggerRef: l } = E("PopoverTrigger"), d = i;
|
|
26
|
+
return n.cloneElement(d, {
|
|
27
|
+
ref: l,
|
|
28
28
|
"aria-expanded": e,
|
|
29
29
|
"aria-haspopup": !0,
|
|
30
|
-
onClick: (
|
|
31
|
-
var
|
|
32
|
-
(
|
|
30
|
+
onClick: (w) => {
|
|
31
|
+
var r, u;
|
|
32
|
+
(u = (r = d.props).onClick) == null || u.call(r, w), c(!e);
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
className:
|
|
36
|
+
function N({
|
|
37
|
+
className: i,
|
|
38
38
|
align: e = "start",
|
|
39
|
-
sideOffset:
|
|
40
|
-
children:
|
|
41
|
-
|
|
39
|
+
sideOffset: c = 8,
|
|
40
|
+
children: l,
|
|
41
|
+
"aria-label": d = "Popover",
|
|
42
|
+
...w
|
|
42
43
|
}) {
|
|
43
|
-
const { open:
|
|
44
|
+
const { open: r, setOpen: u, triggerRef: v } = E("PopoverContent"), h = n.useRef(null), [s, b] = n.useState(null);
|
|
44
45
|
return n.useLayoutEffect(() => {
|
|
45
|
-
if (!
|
|
46
|
-
const
|
|
47
|
-
if (!
|
|
48
|
-
const
|
|
49
|
-
var
|
|
50
|
-
const t =
|
|
51
|
-
let
|
|
52
|
-
e === "center" ?
|
|
46
|
+
if (!r) return;
|
|
47
|
+
const f = v.current;
|
|
48
|
+
if (!f) return;
|
|
49
|
+
const o = () => {
|
|
50
|
+
var m;
|
|
51
|
+
const t = f.getBoundingClientRect(), p = ((m = h.current) == null ? void 0 : m.offsetWidth) ?? 0;
|
|
52
|
+
let a = t.left;
|
|
53
|
+
e === "center" ? a = t.left + t.width / 2 - p / 2 : e === "end" && (a = t.right - p), b({ top: t.bottom + c, left: a });
|
|
53
54
|
};
|
|
54
|
-
return
|
|
55
|
-
window.removeEventListener("resize",
|
|
55
|
+
return o(), window.addEventListener("resize", o), window.addEventListener("scroll", o, !0), () => {
|
|
56
|
+
window.removeEventListener("resize", o), window.removeEventListener("scroll", o, !0);
|
|
56
57
|
};
|
|
57
|
-
}, [
|
|
58
|
-
if (!
|
|
59
|
-
const
|
|
60
|
-
t.key === "Escape" &&
|
|
61
|
-
},
|
|
62
|
-
var
|
|
63
|
-
const
|
|
64
|
-
(
|
|
58
|
+
}, [r, e, c, v]), n.useEffect(() => {
|
|
59
|
+
if (!r) return;
|
|
60
|
+
const f = (t) => {
|
|
61
|
+
t.key === "Escape" && u(!1);
|
|
62
|
+
}, o = (t) => {
|
|
63
|
+
var a, m;
|
|
64
|
+
const p = t.target;
|
|
65
|
+
(a = h.current) != null && a.contains(p) || (m = v.current) != null && m.contains(p) || u(!1);
|
|
65
66
|
};
|
|
66
|
-
return document.addEventListener("keydown",
|
|
67
|
-
document.removeEventListener("keydown",
|
|
67
|
+
return document.addEventListener("keydown", f), document.addEventListener("pointerdown", o), () => {
|
|
68
|
+
document.removeEventListener("keydown", f), document.removeEventListener("pointerdown", o);
|
|
68
69
|
};
|
|
69
|
-
}, [
|
|
70
|
-
/* @__PURE__ */ g(
|
|
71
|
-
|
|
70
|
+
}, [r, u, v]), y(
|
|
71
|
+
/* @__PURE__ */ g(L, { reducedMotion: "user", children: /* @__PURE__ */ g(R, { children: r && /* @__PURE__ */ C(
|
|
72
|
+
k.div,
|
|
72
73
|
{
|
|
73
|
-
ref:
|
|
74
|
+
ref: h,
|
|
74
75
|
role: "dialog",
|
|
75
|
-
|
|
76
|
+
"aria-label": d,
|
|
77
|
+
variants: O,
|
|
76
78
|
initial: "hidden",
|
|
77
79
|
animate: "visible",
|
|
78
80
|
exit: "hidden",
|
|
79
81
|
style: {
|
|
80
82
|
position: "fixed",
|
|
81
|
-
top: (
|
|
82
|
-
left: (
|
|
83
|
-
visibility:
|
|
84
|
-
transformOrigin:
|
|
83
|
+
top: (s == null ? void 0 : s.top) ?? 0,
|
|
84
|
+
left: (s == null ? void 0 : s.left) ?? 0,
|
|
85
|
+
visibility: s ? "visible" : "hidden",
|
|
86
|
+
transformOrigin: x[e]
|
|
85
87
|
},
|
|
86
|
-
className:
|
|
88
|
+
className: z(
|
|
87
89
|
"relative z-50 min-w-44 rounded-lg border border-border bg-elevated p-3",
|
|
88
90
|
"text-xs text-foreground shadow-elevation",
|
|
89
|
-
|
|
91
|
+
i
|
|
90
92
|
),
|
|
91
|
-
...
|
|
93
|
+
...w,
|
|
92
94
|
children: [
|
|
93
|
-
/* @__PURE__ */ g(
|
|
94
|
-
|
|
95
|
+
/* @__PURE__ */ g(j, { origin: x[e] }),
|
|
96
|
+
l
|
|
95
97
|
]
|
|
96
98
|
}
|
|
97
99
|
) }) }),
|
|
@@ -99,7 +101,7 @@ function K({
|
|
|
99
101
|
);
|
|
100
102
|
}
|
|
101
103
|
export {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
W as Popover,
|
|
105
|
+
N as PopoverContent,
|
|
106
|
+
K as PopoverTrigger
|
|
105
107
|
};
|
|
@@ -1,32 +1,34 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as o, jsxs as v } from "react/jsx-runtime";
|
|
3
3
|
import * as x from "react";
|
|
4
|
+
import { MotionConfig as w, motion as y } from "motion/react";
|
|
4
5
|
import { cn as l } from "../lib/cn.js";
|
|
5
|
-
|
|
6
|
+
import { springProgress as M } from "../lib/motion.js";
|
|
7
|
+
const N = x.forwardRef(
|
|
6
8
|
({
|
|
7
|
-
className:
|
|
8
|
-
value:
|
|
9
|
-
max:
|
|
9
|
+
className: m,
|
|
10
|
+
value: f = 0,
|
|
11
|
+
max: e = 100,
|
|
10
12
|
size: r = 40,
|
|
11
|
-
strokeWidth:
|
|
13
|
+
strokeWidth: i = 4,
|
|
12
14
|
isIndeterminate: n = !1,
|
|
13
15
|
label: d,
|
|
14
|
-
...
|
|
16
|
+
...p
|
|
15
17
|
}, h) => {
|
|
16
|
-
const
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
+
const c = Math.min(Math.max(f, 0), e), u = e > 0 ? c / e : 0, s = (r - i) / 2, t = 2 * Math.PI * s, g = n ? t * 0.75 : t * (1 - u), a = r / 2;
|
|
19
|
+
return /* @__PURE__ */ o(
|
|
18
20
|
"div",
|
|
19
21
|
{
|
|
20
22
|
ref: h,
|
|
21
23
|
role: "progressbar",
|
|
22
24
|
"aria-label": d,
|
|
23
25
|
"aria-valuemin": 0,
|
|
24
|
-
"aria-valuemax":
|
|
25
|
-
"aria-valuenow": n ? void 0 :
|
|
26
|
-
className: l("inline-flex",
|
|
26
|
+
"aria-valuemax": e,
|
|
27
|
+
"aria-valuenow": n ? void 0 : c,
|
|
28
|
+
className: l("inline-flex", m),
|
|
27
29
|
style: { width: r, height: r },
|
|
28
|
-
...
|
|
29
|
-
children: /* @__PURE__ */
|
|
30
|
+
...p,
|
|
31
|
+
children: /* @__PURE__ */ v(
|
|
30
32
|
"svg",
|
|
31
33
|
{
|
|
32
34
|
width: r,
|
|
@@ -34,34 +36,36 @@ const w = x.forwardRef(
|
|
|
34
36
|
viewBox: `0 0 ${r} ${r}`,
|
|
35
37
|
className: l(
|
|
36
38
|
"-rotate-90",
|
|
37
|
-
n && "animate-[ads-
|
|
39
|
+
n && "animate-[ads-spin_800ms_linear_infinite]"
|
|
38
40
|
),
|
|
39
41
|
children: [
|
|
40
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ o(
|
|
41
43
|
"circle",
|
|
42
44
|
{
|
|
43
45
|
className: "stroke-muted",
|
|
44
46
|
fill: "none",
|
|
45
|
-
cx:
|
|
46
|
-
cy:
|
|
47
|
-
r:
|
|
48
|
-
strokeWidth:
|
|
47
|
+
cx: a,
|
|
48
|
+
cy: a,
|
|
49
|
+
r: s,
|
|
50
|
+
strokeWidth: i
|
|
49
51
|
}
|
|
50
52
|
),
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
|
|
53
|
+
/* @__PURE__ */ o(w, { reducedMotion: "user", children: /* @__PURE__ */ o(
|
|
54
|
+
y.circle,
|
|
53
55
|
{
|
|
54
|
-
className: "stroke-brand
|
|
56
|
+
className: "stroke-brand",
|
|
55
57
|
fill: "none",
|
|
56
|
-
cx:
|
|
57
|
-
cy:
|
|
58
|
-
r:
|
|
59
|
-
strokeWidth:
|
|
58
|
+
cx: a,
|
|
59
|
+
cy: a,
|
|
60
|
+
r: s,
|
|
61
|
+
strokeWidth: i,
|
|
60
62
|
strokeLinecap: "round",
|
|
61
|
-
strokeDasharray:
|
|
62
|
-
|
|
63
|
+
strokeDasharray: t,
|
|
64
|
+
initial: !1,
|
|
65
|
+
animate: { strokeDashoffset: g },
|
|
66
|
+
transition: M
|
|
63
67
|
}
|
|
64
|
-
)
|
|
68
|
+
) })
|
|
65
69
|
]
|
|
66
70
|
}
|
|
67
71
|
)
|
|
@@ -69,7 +73,7 @@ const w = x.forwardRef(
|
|
|
69
73
|
);
|
|
70
74
|
}
|
|
71
75
|
);
|
|
72
|
-
|
|
76
|
+
N.displayName = "ProgressCircle";
|
|
73
77
|
export {
|
|
74
|
-
|
|
78
|
+
N as ProgressCircle
|
|
75
79
|
};
|
package/components/progress.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as r } from "react/jsx-runtime";
|
|
3
3
|
import * as g from "react";
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { MotionConfig as p, motion as b } from "motion/react";
|
|
5
|
+
import { cn as i } from "../lib/cn.js";
|
|
6
|
+
import { springProgress as v } from "../lib/motion.js";
|
|
7
|
+
const h = {
|
|
6
8
|
sm: "h-1.5",
|
|
7
9
|
md: "h-2"
|
|
8
10
|
}, s = {
|
|
@@ -11,18 +13,18 @@ const p = {
|
|
|
11
13
|
warning: "bg-warning",
|
|
12
14
|
danger: "bg-danger",
|
|
13
15
|
info: "bg-info"
|
|
14
|
-
},
|
|
16
|
+
}, w = g.forwardRef(
|
|
15
17
|
({
|
|
16
18
|
className: l,
|
|
17
19
|
value: t = 0,
|
|
18
20
|
max: e = 100,
|
|
19
|
-
isIndeterminate:
|
|
21
|
+
isIndeterminate: a = !1,
|
|
20
22
|
size: d = "md",
|
|
21
|
-
color:
|
|
23
|
+
color: n = "primary",
|
|
22
24
|
label: m,
|
|
23
|
-
...
|
|
25
|
+
...f
|
|
24
26
|
}, c) => {
|
|
25
|
-
const o = Math.min(Math.max(t, 0), e),
|
|
27
|
+
const o = Math.min(Math.max(t, 0), e), u = e > 0 ? o / e * 100 : 0;
|
|
26
28
|
return /* @__PURE__ */ r(
|
|
27
29
|
"div",
|
|
28
30
|
{
|
|
@@ -31,36 +33,38 @@ const p = {
|
|
|
31
33
|
"aria-label": m,
|
|
32
34
|
"aria-valuemin": 0,
|
|
33
35
|
"aria-valuemax": e,
|
|
34
|
-
"aria-valuenow":
|
|
35
|
-
className:
|
|
36
|
+
"aria-valuenow": a ? void 0 : o,
|
|
37
|
+
className: i(
|
|
36
38
|
"relative w-full overflow-hidden rounded-full bg-muted",
|
|
37
|
-
|
|
39
|
+
h[d],
|
|
38
40
|
l
|
|
39
41
|
),
|
|
40
|
-
...
|
|
41
|
-
children:
|
|
42
|
+
...f,
|
|
43
|
+
children: a ? /* @__PURE__ */ r(
|
|
42
44
|
"div",
|
|
43
45
|
{
|
|
44
|
-
className:
|
|
45
|
-
"absolute inset-y-0 left-0 w-2/5 rounded-full animate-[ads-
|
|
46
|
-
s[
|
|
46
|
+
className: i(
|
|
47
|
+
"absolute inset-y-0 left-0 w-2/5 rounded-full animate-[ads-indeterminate_1.5s_linear_infinite] motion-reduce:animate-none",
|
|
48
|
+
s[n]
|
|
47
49
|
)
|
|
48
50
|
}
|
|
49
|
-
) : /* @__PURE__ */ r(
|
|
50
|
-
|
|
51
|
+
) : /* @__PURE__ */ r(p, { reducedMotion: "user", children: /* @__PURE__ */ r(
|
|
52
|
+
b.div,
|
|
51
53
|
{
|
|
52
|
-
className:
|
|
53
|
-
"h-full w-full origin-left rounded-full
|
|
54
|
-
s[
|
|
54
|
+
className: i(
|
|
55
|
+
"h-full w-full origin-left rounded-full",
|
|
56
|
+
s[n]
|
|
55
57
|
),
|
|
56
|
-
|
|
58
|
+
initial: !1,
|
|
59
|
+
animate: { scaleX: u / 100 },
|
|
60
|
+
transition: v
|
|
57
61
|
}
|
|
58
|
-
)
|
|
62
|
+
) })
|
|
59
63
|
}
|
|
60
64
|
);
|
|
61
65
|
}
|
|
62
66
|
);
|
|
63
|
-
|
|
67
|
+
w.displayName = "Progress";
|
|
64
68
|
export {
|
|
65
|
-
|
|
69
|
+
w as Progress
|
|
66
70
|
};
|
package/components/radio.js
CHANGED
|
@@ -1,101 +1,111 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as r, jsxs as
|
|
2
|
+
import { jsx as r, jsxs as R } from "react/jsx-runtime";
|
|
3
3
|
import * as i from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
4
|
+
import { MotionConfig as v, motion as y } from "motion/react";
|
|
5
|
+
import { cn as b } from "../lib/cn.js";
|
|
6
|
+
import { Field as N } from "./field.js";
|
|
7
|
+
import { springRadio as w } from "../lib/motion.js";
|
|
8
|
+
const x = i.createContext(null), k = i.forwardRef(
|
|
7
9
|
({
|
|
8
|
-
className:
|
|
9
|
-
name:
|
|
10
|
+
className: d,
|
|
11
|
+
name: n,
|
|
10
12
|
value: o,
|
|
11
|
-
onChange:
|
|
12
|
-
label:
|
|
13
|
-
description:
|
|
14
|
-
error:
|
|
15
|
-
orientation:
|
|
16
|
-
disabled:
|
|
17
|
-
children:
|
|
18
|
-
...
|
|
19
|
-
},
|
|
20
|
-
const
|
|
21
|
-
() => ({ name:
|
|
22
|
-
[
|
|
13
|
+
onChange: t,
|
|
14
|
+
label: a,
|
|
15
|
+
description: c,
|
|
16
|
+
error: u,
|
|
17
|
+
orientation: p = "vertical",
|
|
18
|
+
disabled: e,
|
|
19
|
+
children: s,
|
|
20
|
+
...l
|
|
21
|
+
}, f) => {
|
|
22
|
+
const m = i.useMemo(
|
|
23
|
+
() => ({ name: n, value: o, onValueChange: t, disabled: e }),
|
|
24
|
+
[n, o, t, e]
|
|
23
25
|
);
|
|
24
26
|
return /* @__PURE__ */ r(
|
|
25
|
-
|
|
27
|
+
N,
|
|
26
28
|
{
|
|
27
|
-
ref:
|
|
28
|
-
label:
|
|
29
|
-
description:
|
|
30
|
-
error:
|
|
29
|
+
ref: f,
|
|
30
|
+
label: a,
|
|
31
|
+
description: c,
|
|
32
|
+
error: u,
|
|
31
33
|
role: "radiogroup",
|
|
32
|
-
className:
|
|
33
|
-
...
|
|
34
|
-
children: /* @__PURE__ */ r(
|
|
34
|
+
className: d,
|
|
35
|
+
...l,
|
|
36
|
+
children: /* @__PURE__ */ r(x.Provider, { value: m, children: /* @__PURE__ */ r(
|
|
35
37
|
"div",
|
|
36
38
|
{
|
|
37
|
-
className:
|
|
39
|
+
className: b(
|
|
38
40
|
"flex gap-3",
|
|
39
|
-
|
|
41
|
+
p === "vertical" ? "flex-col" : "flex-row flex-wrap"
|
|
40
42
|
),
|
|
41
|
-
children:
|
|
43
|
+
children: s
|
|
42
44
|
}
|
|
43
45
|
) })
|
|
44
46
|
}
|
|
45
47
|
);
|
|
46
48
|
}
|
|
47
49
|
);
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
({ className:
|
|
51
|
-
const e = i.useContext(
|
|
52
|
-
return /* @__PURE__ */
|
|
50
|
+
k.displayName = "RadioGroup";
|
|
51
|
+
const j = i.forwardRef(
|
|
52
|
+
({ className: d, children: n, value: o, disabled: t, checked: a, defaultChecked: c, ...u }, p) => {
|
|
53
|
+
const e = i.useContext(x), s = t || (e == null ? void 0 : e.disabled), l = a !== void 0, [f, m] = i.useState(!!c), g = e ? e.value === o : l ? a : f;
|
|
54
|
+
return /* @__PURE__ */ R(
|
|
53
55
|
"label",
|
|
54
56
|
{
|
|
55
|
-
className:
|
|
57
|
+
className: b(
|
|
56
58
|
"group inline-flex items-center gap-2 text-xs text-foreground select-none",
|
|
57
59
|
s ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
58
|
-
|
|
60
|
+
d
|
|
59
61
|
),
|
|
60
62
|
children: [
|
|
61
63
|
/* @__PURE__ */ r(
|
|
62
64
|
"input",
|
|
63
65
|
{
|
|
64
|
-
ref:
|
|
66
|
+
ref: p,
|
|
65
67
|
type: "radio",
|
|
66
68
|
name: e == null ? void 0 : e.name,
|
|
67
69
|
value: o,
|
|
68
|
-
checked:
|
|
70
|
+
checked: g,
|
|
69
71
|
disabled: s,
|
|
70
|
-
onChange: (
|
|
71
|
-
var
|
|
72
|
-
|
|
72
|
+
onChange: (C) => {
|
|
73
|
+
var h;
|
|
74
|
+
C.target.checked && (e ? (h = e.onValueChange) == null || h.call(e, o) : l || m(!0));
|
|
73
75
|
},
|
|
74
76
|
className: "peer sr-only",
|
|
75
|
-
...
|
|
77
|
+
...u
|
|
76
78
|
}
|
|
77
79
|
),
|
|
78
80
|
/* @__PURE__ */ r(
|
|
79
81
|
"span",
|
|
80
82
|
{
|
|
81
83
|
"aria-hidden": !0,
|
|
82
|
-
className:
|
|
84
|
+
className: b(
|
|
83
85
|
"flex size-4.5 shrink-0 items-center justify-center rounded-full border border-input bg-elevated",
|
|
84
|
-
"transition-[border-color,box-shadow] duration-
|
|
86
|
+
"transition-[border-color,box-shadow] duration-150 ease-out",
|
|
85
87
|
"peer-checked:border-brand",
|
|
86
88
|
"peer-focus-visible:ring-3 peer-focus-visible:ring-ring"
|
|
87
89
|
),
|
|
88
|
-
children: /* @__PURE__ */ r(
|
|
90
|
+
children: /* @__PURE__ */ r(v, { reducedMotion: "user", children: /* @__PURE__ */ r(
|
|
91
|
+
y.span,
|
|
92
|
+
{
|
|
93
|
+
className: "size-2 rounded-full bg-brand",
|
|
94
|
+
initial: !1,
|
|
95
|
+
animate: { opacity: g ? 1 : 0, scale: g ? 1 : 0.9 },
|
|
96
|
+
transition: w
|
|
97
|
+
}
|
|
98
|
+
) })
|
|
89
99
|
}
|
|
90
100
|
),
|
|
91
|
-
|
|
101
|
+
n && /* @__PURE__ */ r("span", { children: n })
|
|
92
102
|
]
|
|
93
103
|
}
|
|
94
104
|
);
|
|
95
105
|
}
|
|
96
106
|
);
|
|
97
|
-
|
|
107
|
+
j.displayName = "Radio";
|
|
98
108
|
export {
|
|
99
|
-
|
|
100
|
-
|
|
109
|
+
j as Radio,
|
|
110
|
+
k as RadioGroup
|
|
101
111
|
};
|
|
@@ -83,7 +83,7 @@ const H = t.forwardRef(
|
|
|
83
83
|
"aria-hidden": !0,
|
|
84
84
|
className: f(
|
|
85
85
|
"my-3 w-px rounded-full bg-transparent",
|
|
86
|
-
"transition-colors duration-
|
|
86
|
+
"transition-colors duration-150 ease-out motion-reduce:transition-none",
|
|
87
87
|
"group-hover/resize:bg-border-strong group-focus-visible/resize:bg-ring",
|
|
88
88
|
c && "bg-ring"
|
|
89
89
|
)
|
package/components/reveal.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import { ComponentProps } from 'react';
|
|
|
5
5
|
* arrives in hierarchy: shells rise, labels and values ink in, visualizations
|
|
6
6
|
* draw left to right — each slot offset by a shared stagger step.
|
|
7
7
|
*
|
|
8
|
-
* Pure CSS animations (off the main thread)
|
|
9
|
-
*
|
|
8
|
+
* Pure CSS animations (off the main thread) with a reduced-motion fallback
|
|
9
|
+
* that keeps only the fade. Durations are deliberate:
|
|
10
10
|
* data drawing is explanatory motion, so the wipe may breathe past the <300ms
|
|
11
11
|
* UI-chrome rule; interactive chrome must never use these classes.
|
|
12
12
|
*/
|
package/components/ripple.d.ts
CHANGED
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
*
|
|
12
12
|
* It is an absolute, `pointer-events-none`, `z-0` layer clipped to the panel
|
|
13
13
|
* radius (`rounded-[inherit]`), so it sits under the content and never
|
|
14
|
-
* intercepts input.
|
|
15
|
-
* `--
|
|
16
|
-
* replay on each open.
|
|
14
|
+
* intercepts input. Its one-off duration is local; the origin and tint use
|
|
15
|
+
* `--ripple-*` visual variables. Reduced motion drops it entirely. Remount it
|
|
16
|
+
* (via `key`) to replay on each open.
|
|
17
17
|
*/
|
|
18
18
|
export interface RippleProps {
|
|
19
19
|
/**
|
|
@@ -1,41 +1,42 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as m, jsx as o } from "react/jsx-runtime";
|
|
3
3
|
import * as i from "react";
|
|
4
4
|
import { ScrollArea as e } from "radix-ui";
|
|
5
|
-
import { cn as
|
|
6
|
-
const
|
|
7
|
-
({ className: a, children: l, orientation: r = "vertical", viewportClassName: t, ...n }, d) => /* @__PURE__ */
|
|
5
|
+
import { cn as c } from "../lib/cn.js";
|
|
6
|
+
const f = i.forwardRef(
|
|
7
|
+
({ className: a, children: l, orientation: r = "vertical", viewportClassName: t, ...n }, d) => /* @__PURE__ */ m(
|
|
8
8
|
e.Root,
|
|
9
9
|
{
|
|
10
10
|
ref: d,
|
|
11
11
|
"data-slot": "scroll-area",
|
|
12
|
-
className:
|
|
12
|
+
className: c("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
|
+
tabIndex: 0,
|
|
19
|
+
className: c("size-full rounded-[inherit]", t),
|
|
19
20
|
children: l
|
|
20
21
|
}
|
|
21
22
|
),
|
|
22
|
-
(r === "vertical" || r === "both") && /* @__PURE__ */ o(
|
|
23
|
-
(r === "horizontal" || r === "both") && /* @__PURE__ */ o(
|
|
23
|
+
(r === "vertical" || r === "both") && /* @__PURE__ */ o(s, { orientation: "vertical" }),
|
|
24
|
+
(r === "horizontal" || r === "both") && /* @__PURE__ */ o(s, { orientation: "horizontal" }),
|
|
24
25
|
/* @__PURE__ */ o(e.Corner, {})
|
|
25
26
|
]
|
|
26
27
|
}
|
|
27
28
|
)
|
|
28
29
|
);
|
|
29
|
-
|
|
30
|
-
const
|
|
30
|
+
f.displayName = "ScrollArea";
|
|
31
|
+
const s = i.forwardRef(({ className: a, orientation: l = "vertical", ...r }, t) => /* @__PURE__ */ o(
|
|
31
32
|
e.ScrollAreaScrollbar,
|
|
32
33
|
{
|
|
33
34
|
ref: t,
|
|
34
35
|
orientation: l,
|
|
35
36
|
"data-slot": "scroll-bar",
|
|
36
|
-
className:
|
|
37
|
+
className: c(
|
|
37
38
|
"flex touch-none select-none p-0.5",
|
|
38
|
-
"transition-colors duration-
|
|
39
|
+
"transition-colors duration-150 ease-out motion-reduce:transition-none",
|
|
39
40
|
l === "vertical" && "h-full w-2.5",
|
|
40
41
|
l === "horizontal" && "h-2.5 flex-col",
|
|
41
42
|
a
|
|
@@ -45,13 +46,13 @@ const c = i.forwardRef(({ className: a, orientation: l = "vertical", ...r }, t)
|
|
|
45
46
|
e.ScrollAreaThumb,
|
|
46
47
|
{
|
|
47
48
|
"data-slot": "scroll-bar-thumb",
|
|
48
|
-
className: "relative flex-1 rounded-full bg-fill transition-colors duration-
|
|
49
|
+
className: "relative flex-1 rounded-full bg-fill transition-colors duration-150 ease-out hover:bg-border-strong motion-reduce:transition-none"
|
|
49
50
|
}
|
|
50
51
|
)
|
|
51
52
|
}
|
|
52
53
|
));
|
|
53
|
-
|
|
54
|
+
s.displayName = "ScrollBar";
|
|
54
55
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
f as ScrollArea,
|
|
57
|
+
s as ScrollBar
|
|
57
58
|
};
|