@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/toast.js
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as P, jsx as c } from "react/jsx-runtime";
|
|
3
3
|
import * as o from "react";
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import { MotionConfig as
|
|
6
|
-
import { WarningCircle as
|
|
4
|
+
import { createPortal as W } from "react-dom";
|
|
5
|
+
import { MotionConfig as A, AnimatePresence as F, motion as B } from "motion/react";
|
|
6
|
+
import { WarningCircle as D, Warning as V, Info as E, CheckCircle as q, Close as G } from "../lib/icons.js";
|
|
7
7
|
import { cn as g } from "../lib/cn.js";
|
|
8
|
-
import {
|
|
8
|
+
import { springOverlay as z } from "../lib/motion.js";
|
|
9
9
|
import { Ripple as J } from "./ripple.js";
|
|
10
10
|
import { Button as K } from "./button.js";
|
|
11
11
|
import { Spinner as Q } from "./spinner.js";
|
|
12
|
-
const
|
|
13
|
-
function
|
|
14
|
-
const b = o.useContext(
|
|
12
|
+
const S = o.createContext(null);
|
|
13
|
+
function at() {
|
|
14
|
+
const b = o.useContext(S);
|
|
15
15
|
if (!b)
|
|
16
16
|
throw new Error("useToast must be used within a <ToastProvider>.");
|
|
17
|
-
const { push:
|
|
17
|
+
const { push: a, close: p, clear: d } = b;
|
|
18
18
|
return { toast: o.useMemo(() => {
|
|
19
19
|
const s = ((r, i) => {
|
|
20
20
|
if (r !== null && typeof r == "object" && !o.isValidElement(r)) {
|
|
21
|
-
const { title:
|
|
22
|
-
return
|
|
21
|
+
const { title: f, ...m } = r;
|
|
22
|
+
return a(f, { ...m, ...i });
|
|
23
23
|
}
|
|
24
|
-
return
|
|
25
|
-
}), l = (r) => (i,
|
|
26
|
-
return s.success = l("success"), s.info = l("info"), s.warning = l("warning"), s.danger = l("danger"), s.close = p, s.clear =
|
|
27
|
-
const
|
|
24
|
+
return a(r, i);
|
|
25
|
+
}), l = (r) => (i, f) => a(i, { ...f, variant: r });
|
|
26
|
+
return s.success = l("success"), s.info = l("info"), s.warning = l("warning"), s.danger = l("danger"), s.close = p, s.clear = d, s.promise = (r, i) => {
|
|
27
|
+
const f = a(i.loading, { isLoading: !0, timeout: 0 });
|
|
28
28
|
return r.then((m) => {
|
|
29
|
-
p(
|
|
29
|
+
p(f), a(
|
|
30
30
|
typeof i.success == "function" ? i.success(m) : i.success,
|
|
31
31
|
{ variant: "success" }
|
|
32
32
|
);
|
|
33
33
|
}).catch((m) => {
|
|
34
|
-
p(
|
|
34
|
+
p(f), a(
|
|
35
35
|
typeof i.error == "function" ? i.error(m) : i.error,
|
|
36
36
|
{ variant: "danger" }
|
|
37
37
|
);
|
|
38
38
|
}), r;
|
|
39
39
|
}, s;
|
|
40
|
-
}, [
|
|
40
|
+
}, [a, p, d]) };
|
|
41
41
|
}
|
|
42
|
-
const
|
|
43
|
-
default: { icon:
|
|
44
|
-
success: { icon:
|
|
45
|
-
info: { icon:
|
|
46
|
-
warning: { icon:
|
|
47
|
-
danger: { icon:
|
|
48
|
-
},
|
|
42
|
+
const U = {
|
|
43
|
+
default: { icon: E, accent: "text-foreground" },
|
|
44
|
+
success: { icon: q, accent: "text-success-700" },
|
|
45
|
+
info: { icon: E, accent: "text-info-700" },
|
|
46
|
+
warning: { icon: V, accent: "text-warning-700" },
|
|
47
|
+
danger: { icon: D, accent: "text-danger-700" }
|
|
48
|
+
}, X = {
|
|
49
49
|
"bottom-end": "bottom-4 right-4",
|
|
50
50
|
bottom: "bottom-4 left-1/2 -translate-x-1/2",
|
|
51
51
|
"bottom-start": "bottom-4 left-4",
|
|
52
52
|
"top-end": "top-4 right-4",
|
|
53
53
|
top: "top-4 left-1/2 -translate-x-1/2",
|
|
54
54
|
"top-start": "top-4 left-4"
|
|
55
|
-
},
|
|
56
|
-
function
|
|
55
|
+
}, R = 12, Y = 0.05;
|
|
56
|
+
function lt({
|
|
57
57
|
children: b,
|
|
58
|
-
placement:
|
|
58
|
+
placement: a = "bottom-end",
|
|
59
59
|
maxVisible: p = 3
|
|
60
60
|
}) {
|
|
61
|
-
var
|
|
62
|
-
const [
|
|
61
|
+
var M;
|
|
62
|
+
const [d, y] = o.useState([]), s = o.useRef(/* @__PURE__ */ new Map()), l = o.useRef(/* @__PURE__ */ new Map()), r = o.useCallback((t) => {
|
|
63
63
|
y((u) => u.filter((h) => h.id !== t));
|
|
64
64
|
const n = s.current.get(t);
|
|
65
65
|
n && (clearTimeout(n), s.current.delete(t));
|
|
@@ -71,7 +71,7 @@ function ut({
|
|
|
71
71
|
const e = s.current.get(n.id);
|
|
72
72
|
e && clearTimeout(e), s.current.delete(n.id), (u = l.current.get(n.id)) == null || u(), l.current.delete(n.id);
|
|
73
73
|
}), []));
|
|
74
|
-
}, []),
|
|
74
|
+
}, []), f = o.useCallback(
|
|
75
75
|
(t, n = {}) => {
|
|
76
76
|
const e = Math.random().toString(36).slice(2), u = { variant: "default", ...n, id: e, title: t };
|
|
77
77
|
y((x) => [...x, u]), l.current.set(e, n.onClose);
|
|
@@ -86,40 +86,40 @@ function ut({
|
|
|
86
86
|
t.forEach((n) => clearTimeout(n)), t.clear();
|
|
87
87
|
};
|
|
88
88
|
}, []);
|
|
89
|
-
const m = o.useMemo(() => ({ push:
|
|
90
|
-
o.useEffect(() =>
|
|
91
|
-
const [w,
|
|
89
|
+
const m = o.useMemo(() => ({ push: f, close: r, clear: i }), [f, r, i]), [j, H] = o.useState(!1);
|
|
90
|
+
o.useEffect(() => H(!0), []);
|
|
91
|
+
const [w, T] = o.useState(null), k = o.useRef(null), L = (M = d[d.length - 1]) == null ? void 0 : M.id;
|
|
92
92
|
o.useLayoutEffect(() => {
|
|
93
|
-
const t =
|
|
93
|
+
const t = k.current;
|
|
94
94
|
if (!t) {
|
|
95
|
-
|
|
95
|
+
T(null);
|
|
96
96
|
return;
|
|
97
97
|
}
|
|
98
|
-
const n = () =>
|
|
98
|
+
const n = () => T(t.offsetHeight);
|
|
99
99
|
n();
|
|
100
100
|
const e = new ResizeObserver(n);
|
|
101
101
|
return e.observe(t), () => e.disconnect();
|
|
102
|
-
}, [
|
|
103
|
-
const v =
|
|
104
|
-
return /* @__PURE__ */
|
|
102
|
+
}, [L]);
|
|
103
|
+
const v = a.startsWith("top"), I = v ? 1 : -1, _ = Math.min(p, Math.max(d.length, 1)), $ = w != null ? w + R * (_ - 1) : void 0;
|
|
104
|
+
return /* @__PURE__ */ P(S.Provider, { value: m, children: [
|
|
105
105
|
b,
|
|
106
|
-
|
|
107
|
-
/* @__PURE__ */
|
|
106
|
+
j && d.length > 0 && W(
|
|
107
|
+
/* @__PURE__ */ c(
|
|
108
108
|
"div",
|
|
109
109
|
{
|
|
110
110
|
className: g(
|
|
111
111
|
"pointer-events-none fixed z-50 w-full max-w-sm",
|
|
112
|
-
|
|
112
|
+
X[a]
|
|
113
113
|
),
|
|
114
|
-
style: { height:
|
|
114
|
+
style: { height: $ },
|
|
115
115
|
role: "region",
|
|
116
116
|
"aria-label": "Notifications",
|
|
117
|
-
children: /* @__PURE__ */
|
|
118
|
-
const e =
|
|
119
|
-
return /* @__PURE__ */
|
|
120
|
-
|
|
117
|
+
children: /* @__PURE__ */ c(A, { reducedMotion: "user", children: /* @__PURE__ */ c(F, { children: d.map((t, n) => {
|
|
118
|
+
const e = d.length - 1 - n, u = e === 0, h = e >= p, x = U[t.variant ?? "default"], O = x.icon;
|
|
119
|
+
return /* @__PURE__ */ P(
|
|
120
|
+
B.div,
|
|
121
121
|
{
|
|
122
|
-
ref: u ?
|
|
122
|
+
ref: u ? k : void 0,
|
|
123
123
|
layout: !1,
|
|
124
124
|
role: "status",
|
|
125
125
|
"aria-live": "polite",
|
|
@@ -129,14 +129,14 @@ function ut({
|
|
|
129
129
|
},
|
|
130
130
|
animate: {
|
|
131
131
|
opacity: h ? 0 : 1,
|
|
132
|
-
transform: `translate3d(0, ${
|
|
132
|
+
transform: `translate3d(0, ${I * e * R}px, 0) scale(${1 - e * Y})`
|
|
133
133
|
},
|
|
134
134
|
exit: {
|
|
135
135
|
opacity: 0,
|
|
136
136
|
transform: `translate3d(0, ${v ? -16 : 16}px, 0) scale(0.98)`,
|
|
137
|
-
transition:
|
|
137
|
+
transition: z
|
|
138
138
|
},
|
|
139
|
-
transition:
|
|
139
|
+
transition: z,
|
|
140
140
|
className: g(
|
|
141
141
|
"group/toast absolute inset-x-0 flex items-start gap-1.5",
|
|
142
142
|
v ? "top-0" : "bottom-0",
|
|
@@ -150,35 +150,35 @@ function ut({
|
|
|
150
150
|
height: !u && w != null ? w : void 0
|
|
151
151
|
},
|
|
152
152
|
children: [
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ c(J, { origin: v ? "top" : "bottom" }),
|
|
154
|
+
/* @__PURE__ */ c(
|
|
155
155
|
"span",
|
|
156
156
|
{
|
|
157
157
|
className: g(
|
|
158
158
|
"flex shrink-0 select-none items-center justify-center p-1 [&_svg]:size-4",
|
|
159
159
|
x.accent
|
|
160
160
|
),
|
|
161
|
-
children: t.isLoading ? /* @__PURE__ */
|
|
161
|
+
children: t.isLoading ? /* @__PURE__ */ c(Q, { variant: "action", size: "sm", "aria-hidden": !0 }) : t.indicator ?? /* @__PURE__ */ c(O, { "aria-hidden": !0 })
|
|
162
162
|
}
|
|
163
163
|
),
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
/* @__PURE__ */
|
|
166
|
-
t.description && /* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ P("div", { className: "flex min-w-0 grow flex-col items-start self-center", children: [
|
|
165
|
+
/* @__PURE__ */ c("p", { className: g("text-xs font-normal leading-5", x.accent), children: t.title }),
|
|
166
|
+
t.description && /* @__PURE__ */ c("p", { className: "text-xs text-muted-foreground", children: t.description })
|
|
167
167
|
] }),
|
|
168
|
-
t.actionProps && /* @__PURE__ */
|
|
168
|
+
t.actionProps && /* @__PURE__ */ c(
|
|
169
169
|
K,
|
|
170
170
|
{
|
|
171
171
|
size: "sm",
|
|
172
172
|
variant: t.actionProps.variant ?? "soft",
|
|
173
173
|
className: g("ml-2 shrink-0 self-center rounded-full", t.actionProps.className),
|
|
174
174
|
onClick: () => {
|
|
175
|
-
var C,
|
|
176
|
-
return (
|
|
175
|
+
var C, N;
|
|
176
|
+
return (N = (C = t.actionProps) == null ? void 0 : C.onClick) == null ? void 0 : N.call(C);
|
|
177
177
|
},
|
|
178
178
|
children: t.actionProps.children
|
|
179
179
|
}
|
|
180
180
|
),
|
|
181
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ c(
|
|
182
182
|
"button",
|
|
183
183
|
{
|
|
184
184
|
type: "button",
|
|
@@ -187,13 +187,13 @@ function ut({
|
|
|
187
187
|
className: g(
|
|
188
188
|
"absolute -right-1 -top-1 inline-flex size-5 items-center justify-center",
|
|
189
189
|
"rounded-full border border-border bg-elevated text-muted-foreground shadow-elevation",
|
|
190
|
-
"opacity-0 transition-opacity duration-
|
|
190
|
+
"opacity-0 transition-opacity duration-150 ease-out",
|
|
191
191
|
"group-hover/toast:opacity-100 focus-visible:opacity-100",
|
|
192
192
|
"hover:bg-muted hover:text-foreground",
|
|
193
193
|
"outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
194
194
|
"[&_svg]:size-3 [&_svg]:shrink-0"
|
|
195
195
|
),
|
|
196
|
-
children: /* @__PURE__ */
|
|
196
|
+
children: /* @__PURE__ */ c(G, { "aria-hidden": !0 })
|
|
197
197
|
}
|
|
198
198
|
)
|
|
199
199
|
]
|
|
@@ -208,6 +208,6 @@ function ut({
|
|
|
208
208
|
] });
|
|
209
209
|
}
|
|
210
210
|
export {
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
lt as ToastProvider,
|
|
212
|
+
at as useToast
|
|
213
213
|
};
|
package/components/tooltip.js
CHANGED
|
@@ -115,7 +115,7 @@ function Y({
|
|
|
115
115
|
transformOrigin: W[a]
|
|
116
116
|
},
|
|
117
117
|
className: S(
|
|
118
|
-
"relative z-50 max-w-xs rounded-
|
|
118
|
+
"relative z-50 max-w-xs rounded-sm bg-foreground px-2 py-1",
|
|
119
119
|
"text-xs text-background",
|
|
120
120
|
"pointer-events-none select-none",
|
|
121
121
|
A
|
|
@@ -127,7 +127,7 @@ function Y({
|
|
|
127
127
|
{
|
|
128
128
|
"aria-hidden": !0,
|
|
129
129
|
className: S(
|
|
130
|
-
"absolute size-2 rotate-45 rounded-
|
|
130
|
+
"absolute size-2 rotate-45 rounded-xs bg-foreground",
|
|
131
131
|
V[a]
|
|
132
132
|
)
|
|
133
133
|
}
|
package/components/tree.js
CHANGED
|
@@ -1,89 +1,100 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as e, jsxs as
|
|
2
|
+
import { jsx as e, jsxs as h, Fragment as y } from "react/jsx-runtime";
|
|
3
3
|
import * as t from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
4
|
+
import { MotionConfig as M, AnimatePresence as _, motion as z } from "motion/react";
|
|
5
|
+
import { cn as a } from "../lib/cn.js";
|
|
6
|
+
import { ChevronRight as D, FileText as S } from "../lib/icons.js";
|
|
7
|
+
import { springDisclosure as V } from "../lib/motion.js";
|
|
8
|
+
const W = t.forwardRef(({ className: s, ...c }, d) => /* @__PURE__ */ e(
|
|
7
9
|
"div",
|
|
8
10
|
{
|
|
9
|
-
ref:
|
|
11
|
+
ref: d,
|
|
10
12
|
role: "tree",
|
|
11
|
-
className:
|
|
12
|
-
...
|
|
13
|
+
className: a("flex flex-col gap-0.5 text-xs", s),
|
|
14
|
+
...c
|
|
13
15
|
}
|
|
14
16
|
));
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
+
W.displayName = "Tree";
|
|
18
|
+
const q = t.forwardRef(
|
|
17
19
|
({
|
|
18
|
-
className:
|
|
19
|
-
label:
|
|
20
|
-
icon:
|
|
20
|
+
className: s,
|
|
21
|
+
label: c,
|
|
22
|
+
icon: d,
|
|
21
23
|
count: p,
|
|
22
|
-
endContent:
|
|
23
|
-
defaultExpanded:
|
|
24
|
-
expanded:
|
|
25
|
-
onExpandedChange:
|
|
24
|
+
endContent: N,
|
|
25
|
+
defaultExpanded: w = !1,
|
|
26
|
+
expanded: x,
|
|
27
|
+
onExpandedChange: f,
|
|
26
28
|
href: g,
|
|
27
29
|
isActive: o,
|
|
28
30
|
onSelect: C,
|
|
29
31
|
children: n,
|
|
30
32
|
...I
|
|
31
33
|
}, k) => {
|
|
32
|
-
const r = t.Children.count(n) > 0, v =
|
|
33
|
-
v || R(
|
|
34
|
-
}, m =
|
|
34
|
+
const r = t.Children.count(n) > 0, v = x !== void 0, [T, R] = t.useState(w), i = v ? x : T, j = (l) => {
|
|
35
|
+
v || R(l), f == null || f(l);
|
|
36
|
+
}, m = a(
|
|
35
37
|
"flex h-9 w-full items-center gap-2 rounded-md px-2 text-left",
|
|
36
38
|
"outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring",
|
|
37
39
|
"[&_svg]:size-4 [&_svg]:shrink-0",
|
|
38
40
|
o ? "bg-fill font-normal text-foreground" : "text-muted-foreground hover:bg-fill/60 hover:text-foreground"
|
|
39
|
-
), u =
|
|
41
|
+
), u = d ?? (r ? null : /* @__PURE__ */ e(S, { className: "text-tertiary" })), F = o && t.isValidElement(u) ? t.cloneElement(
|
|
40
42
|
u,
|
|
41
43
|
{ weight: "fill" }
|
|
42
|
-
) : u, b = /* @__PURE__ */
|
|
44
|
+
) : u, b = /* @__PURE__ */ h(y, { children: [
|
|
43
45
|
F,
|
|
44
|
-
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate", children:
|
|
45
|
-
|
|
46
|
-
r && /* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate", children: c }),
|
|
47
|
+
N,
|
|
48
|
+
r && /* @__PURE__ */ h(y, { children: [
|
|
47
49
|
(p ?? t.Children.count(n)) > 0 && /* @__PURE__ */ e("span", { className: "shrink-0 tabular-nums text-xs text-tertiary", children: p ?? t.Children.count(n) }),
|
|
48
50
|
/* @__PURE__ */ e(
|
|
49
|
-
|
|
51
|
+
D,
|
|
50
52
|
{
|
|
51
|
-
className:
|
|
52
|
-
"text-muted-foreground transition-transform duration-
|
|
53
|
-
|
|
53
|
+
className: a(
|
|
54
|
+
"text-muted-foreground transition-transform duration-150 motion-reduce:transition-none",
|
|
55
|
+
i && "rotate-90"
|
|
54
56
|
),
|
|
55
57
|
strokeWidth: 2
|
|
56
58
|
}
|
|
57
59
|
)
|
|
58
60
|
] })
|
|
59
61
|
] });
|
|
60
|
-
return /* @__PURE__ */
|
|
61
|
-
r ? /* @__PURE__ */ e("button", { type: "button", className: m, onClick: () => j(!
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
/* @__PURE__ */ e("div", { role: "group", className: "ml-4 flex flex-col gap-0.5", children: t.Children.map(n, (a) => /* @__PURE__ */ e(
|
|
65
|
-
"div",
|
|
62
|
+
return /* @__PURE__ */ h("div", { ref: k, role: "treeitem", "aria-expanded": r ? i : void 0, "aria-selected": o, className: s, ...I, children: [
|
|
63
|
+
r ? /* @__PURE__ */ e("button", { type: "button", className: m, onClick: () => j(!i), children: b }) : g ? /* @__PURE__ */ e("a", { href: g, className: m, "aria-current": o ? "page" : void 0, children: b }) : /* @__PURE__ */ e("button", { type: "button", className: m, onClick: C, children: b }),
|
|
64
|
+
/* @__PURE__ */ e(M, { reducedMotion: "user", children: /* @__PURE__ */ e(_, { initial: !1, children: r && i && /* @__PURE__ */ e(
|
|
65
|
+
z.div,
|
|
66
66
|
{
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
67
|
+
role: "group",
|
|
68
|
+
initial: { height: 0, opacity: 0, y: -4 },
|
|
69
|
+
animate: { height: "auto", opacity: 1, y: 0 },
|
|
70
|
+
exit: { height: 0, opacity: 0, y: -4 },
|
|
71
|
+
transition: V,
|
|
72
|
+
className: "ml-4 flex flex-col gap-0.5 overflow-hidden",
|
|
73
|
+
children: t.Children.map(n, (l) => /* @__PURE__ */ e(
|
|
74
|
+
"div",
|
|
75
|
+
{
|
|
76
|
+
className: a(
|
|
77
|
+
"relative ps-5",
|
|
78
|
+
// Continuous vertical rail — a straight line (no radius) so it
|
|
79
|
+
// never breaks between children. The LAST child needs no rail
|
|
80
|
+
// at all: the elbow's own left border draws its final vertical
|
|
81
|
+
// segment, so a rail there would poke through the curve.
|
|
82
|
+
"before:absolute before:left-0 before:top-0 before:bottom-0 before:border-l before:border-border before:content-['']",
|
|
83
|
+
"last:before:hidden",
|
|
84
|
+
// Rounded elbow branching off the rail to this child. Its own
|
|
85
|
+
// left border overlaps the rail, so the curve reads cleanly.
|
|
86
|
+
"after:absolute after:left-0 after:top-0 after:h-4 after:w-4 after:rounded-bl-[9px] after:border-b after:border-l after:border-border after:content-['']"
|
|
87
|
+
),
|
|
88
|
+
children: l
|
|
89
|
+
}
|
|
90
|
+
))
|
|
80
91
|
}
|
|
81
|
-
)) })
|
|
92
|
+
) }) })
|
|
82
93
|
] });
|
|
83
94
|
}
|
|
84
95
|
);
|
|
85
|
-
|
|
96
|
+
q.displayName = "TreeItem";
|
|
86
97
|
export {
|
|
87
|
-
|
|
88
|
-
|
|
98
|
+
W as Tree,
|
|
99
|
+
q as TreeItem
|
|
89
100
|
};
|
|
@@ -11,7 +11,8 @@ declare const textSizes: {
|
|
|
11
11
|
};
|
|
12
12
|
declare const textWeights: {
|
|
13
13
|
readonly regular: "font-normal";
|
|
14
|
-
readonly
|
|
14
|
+
readonly medium: "font-medium";
|
|
15
|
+
readonly bold: "font-medium";
|
|
15
16
|
};
|
|
16
17
|
declare const textColors: {
|
|
17
18
|
readonly primary: "text-primary";
|
package/components/typography.js
CHANGED
|
@@ -1,52 +1,53 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import * as d from "react";
|
|
4
4
|
import { cn as c } from "../lib/cn.js";
|
|
5
|
-
const
|
|
6
|
-
1: { tag: "h1", className: "text-2xl font-
|
|
7
|
-
2: { tag: "h2", className: "text-xl font-
|
|
8
|
-
3: { tag: "h3", className: "text-lg font-
|
|
9
|
-
4: { tag: "h4", className: "text-base font-
|
|
10
|
-
},
|
|
11
|
-
({ className: e, level:
|
|
12
|
-
const { tag: r, className:
|
|
13
|
-
return /* @__PURE__ */
|
|
5
|
+
const u = {
|
|
6
|
+
1: { tag: "h1", className: "text-2xl font-medium tracking-tight" },
|
|
7
|
+
2: { tag: "h2", className: "text-xl font-medium tracking-tight" },
|
|
8
|
+
3: { tag: "h3", className: "text-lg font-medium" },
|
|
9
|
+
4: { tag: "h4", className: "text-base font-medium" }
|
|
10
|
+
}, p = d.forwardRef(
|
|
11
|
+
({ className: e, level: a = 1, children: t, ...m }, s) => {
|
|
12
|
+
const { tag: r, className: o } = u[a];
|
|
13
|
+
return /* @__PURE__ */ i(r, { ref: s, className: c(o, e), ...m, children: t });
|
|
14
14
|
}
|
|
15
15
|
);
|
|
16
|
-
|
|
17
|
-
const
|
|
16
|
+
p.displayName = "Heading";
|
|
17
|
+
const y = {
|
|
18
18
|
xs: "text-xs",
|
|
19
19
|
sm: "text-xs",
|
|
20
20
|
md: "text-base",
|
|
21
21
|
lg: "text-lg"
|
|
22
|
-
},
|
|
22
|
+
}, N = {
|
|
23
23
|
regular: "font-normal",
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
medium: "font-medium",
|
|
25
|
+
bold: "font-medium"
|
|
26
|
+
}, n = {
|
|
26
27
|
primary: "text-primary",
|
|
27
28
|
secondary: "text-secondary",
|
|
28
29
|
tertiary: "text-tertiary"
|
|
29
|
-
},
|
|
30
|
-
({ className: e, size:
|
|
31
|
-
const g = r, f = t ?
|
|
32
|
-
return /* @__PURE__ */
|
|
30
|
+
}, h = d.forwardRef(
|
|
31
|
+
({ className: e, size: a = "md", color: t, muted: m = !1, weight: s, as: r = "p", children: o, ...l }, x) => {
|
|
32
|
+
const g = r, f = t ? n[t] : m ? n.tertiary : n.primary;
|
|
33
|
+
return /* @__PURE__ */ i(
|
|
33
34
|
g,
|
|
34
35
|
{
|
|
35
|
-
ref:
|
|
36
|
+
ref: x,
|
|
36
37
|
className: c(
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
y[a],
|
|
39
|
+
s && N[s],
|
|
39
40
|
f,
|
|
40
41
|
e
|
|
41
42
|
),
|
|
42
|
-
...
|
|
43
|
-
children:
|
|
43
|
+
...l,
|
|
44
|
+
children: o
|
|
44
45
|
}
|
|
45
46
|
);
|
|
46
47
|
}
|
|
47
48
|
);
|
|
48
|
-
|
|
49
|
-
const
|
|
49
|
+
h.displayName = "Text";
|
|
50
|
+
const b = d.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ i(
|
|
50
51
|
"code",
|
|
51
52
|
{
|
|
52
53
|
ref: t,
|
|
@@ -54,12 +55,12 @@ const h = i.forwardRef(({ className: e, ...s }, t) => /* @__PURE__ */ n(
|
|
|
54
55
|
"rounded bg-muted px-1.5 py-0.5 tabular-nums text-xs",
|
|
55
56
|
e
|
|
56
57
|
),
|
|
57
|
-
...
|
|
58
|
+
...a
|
|
58
59
|
}
|
|
59
60
|
));
|
|
60
|
-
|
|
61
|
+
b.displayName = "Code";
|
|
61
62
|
export {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
b as Code,
|
|
64
|
+
p as Heading,
|
|
65
|
+
h as Text
|
|
65
66
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "
|
|
5
|
-
size?: "default" | "
|
|
4
|
+
variant?: "default" | "outline" | "link" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
5
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-sm" | "icon-xs" | "icon-lg" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
8
8
|
asChild?: boolean;
|
package/components/ui/button.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
3
|
import { cva as a } from "class-variance-authority";
|
|
4
4
|
import { Slot as d } from "radix-ui";
|
|
5
5
|
import { cn as c } from "../../lib/cn.js";
|
|
6
6
|
const u = a(
|
|
7
|
-
"inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-xs font-medium whitespace-nowrap transition-[background-color,border-color,color,box-shadow,transform] duration-
|
|
7
|
+
"inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-xs font-medium whitespace-nowrap transition-[background-color,border-color,color,box-shadow,transform] duration-150 ease-out outline-none motion-reduce:transition-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
11
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
12
|
-
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20
|
|
13
|
-
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground
|
|
12
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20",
|
|
13
|
+
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",
|
|
14
14
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
15
|
-
ghost: "hover:bg-accent hover:text-accent-foreground
|
|
15
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
16
16
|
link: "text-primary underline-offset-4 hover:underline"
|
|
17
17
|
},
|
|
18
18
|
size: {
|
|
19
19
|
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
20
|
-
xs: "h-6 gap-1 rounded-
|
|
20
|
+
xs: "h-6 gap-1 rounded-sm px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
21
21
|
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
|
22
22
|
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
23
23
|
icon: "size-9",
|
|
24
|
-
"icon-xs": "size-6 rounded-
|
|
25
|
-
"icon-sm": "size-8",
|
|
24
|
+
"icon-xs": "size-6 rounded-sm [&_svg:not([class*='size-'])]:size-3",
|
|
25
|
+
"icon-sm": "size-8 rounded-sm",
|
|
26
26
|
"icon-lg": "size-10"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
@@ -32,26 +32,26 @@ const u = a(
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
);
|
|
35
|
-
function
|
|
36
|
-
className:
|
|
35
|
+
function f({
|
|
36
|
+
className: o,
|
|
37
37
|
variant: e = "default",
|
|
38
|
-
size:
|
|
39
|
-
asChild:
|
|
40
|
-
...
|
|
38
|
+
size: t = "default",
|
|
39
|
+
asChild: r = !1,
|
|
40
|
+
...s
|
|
41
41
|
}) {
|
|
42
|
-
const n =
|
|
43
|
-
return /* @__PURE__ */
|
|
42
|
+
const n = r ? d.Root : "button";
|
|
43
|
+
return /* @__PURE__ */ i(
|
|
44
44
|
n,
|
|
45
45
|
{
|
|
46
46
|
"data-slot": "button",
|
|
47
47
|
"data-variant": e,
|
|
48
|
-
"data-size":
|
|
49
|
-
className: c(u({ variant: e, size:
|
|
50
|
-
...
|
|
48
|
+
"data-size": t,
|
|
49
|
+
className: c(u({ variant: e, size: t, className: o })),
|
|
50
|
+
...s
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
54
|
export {
|
|
55
|
-
|
|
55
|
+
f as Button,
|
|
56
56
|
u as buttonVariants
|
|
57
57
|
};
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): import("react").JSX.Element;
|
|
3
|
-
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): import("react").JSX.Element;
|
|
4
|
-
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): import("react").JSX.Element;
|
|
5
|
-
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
1
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent, } from '../collapsible';
|