@actioneer/ads 0.5.7 → 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 +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.js +24 -24
- 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 +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.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.js +0 -1
- 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.js +26 -26
- package/components/select.d.ts +2 -0
- package/components/select.js +61 -57
- 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 +9 -0
- package/components/table.js +370 -247
- 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 +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 +4 -0
- package/lib/icons.js +103 -102
- 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 +52 -18
- package/manifest.json +240 -31
- 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/carousel.js
CHANGED
|
@@ -1,34 +1,36 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as b, jsxs as V } from "react/jsx-runtime";
|
|
3
3
|
import * as t from "react";
|
|
4
4
|
import { cva as W } from "class-variance-authority";
|
|
5
|
+
import { MotionConfig as H, motion as X } from "motion/react";
|
|
5
6
|
import { Button as D } from "./button.js";
|
|
6
|
-
import { ChevronLeft as
|
|
7
|
-
import { cn as
|
|
7
|
+
import { ChevronLeft as B, ChevronRight as G } from "../lib/icons.js";
|
|
8
|
+
import { cn as w } from "../lib/cn.js";
|
|
9
|
+
import { springCarousel as O } from "../lib/motion.js";
|
|
8
10
|
const q = t.createContext(null);
|
|
9
11
|
function T(l) {
|
|
10
|
-
const
|
|
11
|
-
if (!
|
|
12
|
+
const s = t.useContext(q);
|
|
13
|
+
if (!s)
|
|
12
14
|
throw new Error(`<${l}> must be used within <Carousel>`);
|
|
13
|
-
return
|
|
15
|
+
return s;
|
|
14
16
|
}
|
|
15
17
|
const F = t.createContext(null);
|
|
16
|
-
function L(l,
|
|
17
|
-
return
|
|
18
|
+
function L(l, s, d) {
|
|
19
|
+
return s <= 0 ? 0 : d ? (l % s + s) % s : Math.min(Math.max(l, 0), s - 1);
|
|
18
20
|
}
|
|
19
21
|
function _(l) {
|
|
20
22
|
return l.detail === 0;
|
|
21
23
|
}
|
|
22
|
-
const
|
|
24
|
+
const Y = W(
|
|
23
25
|
"relative w-full rounded-sm outline-none focus-visible:ring-3 focus-visible:ring-ring"
|
|
24
|
-
),
|
|
26
|
+
), J = t.forwardRef(
|
|
25
27
|
({
|
|
26
28
|
className: l,
|
|
27
|
-
index:
|
|
29
|
+
index: s,
|
|
28
30
|
defaultIndex: d = 0,
|
|
29
31
|
onIndexChange: f,
|
|
30
32
|
loop: o = !0,
|
|
31
|
-
children:
|
|
33
|
+
children: h,
|
|
32
34
|
role: p,
|
|
33
35
|
tabIndex: m,
|
|
34
36
|
onKeyDown: r,
|
|
@@ -36,55 +38,55 @@ const B = W(
|
|
|
36
38
|
"aria-roledescription": I,
|
|
37
39
|
...N
|
|
38
40
|
}, u) => {
|
|
39
|
-
const a =
|
|
40
|
-
|
|
41
|
-
(M) => L(M,
|
|
41
|
+
const a = s !== void 0, [n, y] = t.useState(d), [C, S] = t.useState(0), [P, v] = t.useState(!0), E = t.useId(), g = L(a ? s : n, C, !1), e = t.useCallback((i) => {
|
|
42
|
+
S(i), y(
|
|
43
|
+
(M) => L(M, i, !1)
|
|
42
44
|
);
|
|
43
45
|
}, []), c = t.useCallback(
|
|
44
|
-
(
|
|
45
|
-
const $ = L(
|
|
46
|
-
|
|
46
|
+
(i, M = "animated") => {
|
|
47
|
+
const $ = L(i, C, o);
|
|
48
|
+
v(M === "animated"), a || y($), $ !== g && (f == null || f($));
|
|
47
49
|
},
|
|
48
|
-
[
|
|
50
|
+
[C, g, a, o, f]
|
|
49
51
|
), A = t.useCallback(
|
|
50
|
-
(
|
|
52
|
+
(i) => c(g - 1, i),
|
|
51
53
|
[c, g]
|
|
52
|
-
),
|
|
53
|
-
(
|
|
54
|
+
), R = t.useCallback(
|
|
55
|
+
(i) => c(g + 1, i),
|
|
54
56
|
[c, g]
|
|
55
57
|
);
|
|
56
58
|
t.useEffect(() => {
|
|
57
59
|
if (P) return;
|
|
58
|
-
const
|
|
59
|
-
return () => cancelAnimationFrame(
|
|
60
|
+
const i = requestAnimationFrame(() => v(!0));
|
|
61
|
+
return () => cancelAnimationFrame(i);
|
|
60
62
|
}, [g, P]);
|
|
61
63
|
const k = t.useMemo(
|
|
62
64
|
() => ({
|
|
63
65
|
index: g,
|
|
64
|
-
count:
|
|
66
|
+
count: C,
|
|
65
67
|
loop: o,
|
|
66
68
|
contentId: E,
|
|
67
69
|
isAnimated: P,
|
|
68
70
|
setCount: e,
|
|
69
71
|
goTo: c,
|
|
70
72
|
goPrevious: A,
|
|
71
|
-
goNext:
|
|
73
|
+
goNext: R
|
|
72
74
|
}),
|
|
73
75
|
[
|
|
74
76
|
g,
|
|
75
|
-
|
|
77
|
+
C,
|
|
76
78
|
o,
|
|
77
79
|
E,
|
|
78
80
|
P,
|
|
79
81
|
e,
|
|
80
82
|
c,
|
|
81
83
|
A,
|
|
82
|
-
|
|
84
|
+
R
|
|
83
85
|
]
|
|
84
|
-
), z = (
|
|
85
|
-
r == null || r(
|
|
86
|
+
), z = (i) => {
|
|
87
|
+
r == null || r(i), !(i.defaultPrevented || i.target !== i.currentTarget) && (i.key === "ArrowLeft" ? (i.preventDefault(), A("instant")) : i.key === "ArrowRight" ? (i.preventDefault(), R("instant")) : i.key === "Home" ? (i.preventDefault(), c(0, "instant")) : i.key === "End" && (i.preventDefault(), c(C - 1, "instant")));
|
|
86
88
|
};
|
|
87
|
-
return /* @__PURE__ */
|
|
89
|
+
return /* @__PURE__ */ b(q.Provider, { value: k, children: /* @__PURE__ */ V(
|
|
88
90
|
"div",
|
|
89
91
|
{
|
|
90
92
|
ref: u,
|
|
@@ -92,26 +94,26 @@ const B = W(
|
|
|
92
94
|
"aria-roledescription": I ?? "carousel",
|
|
93
95
|
"aria-label": x ?? "Carousel",
|
|
94
96
|
tabIndex: m ?? 0,
|
|
95
|
-
className:
|
|
97
|
+
className: w(Y(), l),
|
|
96
98
|
onKeyDown: z,
|
|
97
99
|
...N,
|
|
98
100
|
children: [
|
|
99
|
-
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
+
h,
|
|
102
|
+
/* @__PURE__ */ b("span", { className: "sr-only", "aria-live": "polite", "aria-atomic": "true", children: C > 0 ? `Slide ${g + 1} of ${C}` : "" })
|
|
101
103
|
]
|
|
102
104
|
}
|
|
103
105
|
) });
|
|
104
106
|
}
|
|
105
107
|
);
|
|
106
|
-
|
|
107
|
-
const
|
|
108
|
+
J.displayName = "Carousel";
|
|
109
|
+
const Q = 40, Z = 10, K = 0.11, U = t.forwardRef(
|
|
108
110
|
({
|
|
109
111
|
className: l,
|
|
110
|
-
children:
|
|
112
|
+
children: s,
|
|
111
113
|
onPointerDown: d,
|
|
112
114
|
onPointerUp: f,
|
|
113
115
|
onPointerCancel: o,
|
|
114
|
-
onClickCapture:
|
|
116
|
+
onClickCapture: h,
|
|
115
117
|
...p
|
|
116
118
|
}, m) => {
|
|
117
119
|
const {
|
|
@@ -122,53 +124,52 @@ const O = 40, Y = 10, J = 0.11, Q = t.forwardRef(
|
|
|
122
124
|
setCount: u,
|
|
123
125
|
goPrevious: a,
|
|
124
126
|
goNext: n
|
|
125
|
-
} = T("CarouselContent"), y = t.Children.toArray(
|
|
127
|
+
} = T("CarouselContent"), y = t.Children.toArray(s), C = t.useRef(null), S = t.useRef(!1);
|
|
126
128
|
t.useEffect(() => {
|
|
127
129
|
u(y.length);
|
|
128
130
|
}, [y.length, u]);
|
|
129
131
|
const P = (e) => {
|
|
130
|
-
d == null || d(e), !(e.defaultPrevented || !e.isPrimary || e.pointerType === "mouse" || x <= 1) && (
|
|
132
|
+
d == null || d(e), !(e.defaultPrevented || !e.isPrimary || e.pointerType === "mouse" || x <= 1) && (C.current = {
|
|
131
133
|
pointerId: e.pointerId,
|
|
132
134
|
x: e.clientX,
|
|
133
135
|
time: e.timeStamp
|
|
134
136
|
}, e.currentTarget.setPointerCapture(e.pointerId));
|
|
135
|
-
},
|
|
137
|
+
}, v = (e) => {
|
|
136
138
|
e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId);
|
|
137
139
|
}, E = (e) => {
|
|
138
140
|
f == null || f(e);
|
|
139
|
-
const c =
|
|
140
|
-
if (
|
|
141
|
-
const A = e.clientX - c.x,
|
|
142
|
-
(Math.abs(A) >=
|
|
141
|
+
const c = C.current;
|
|
142
|
+
if (C.current = null, v(e), !c || c.pointerId !== e.pointerId) return;
|
|
143
|
+
const A = e.clientX - c.x, R = Math.max(1, e.timeStamp - c.time), k = Math.abs(A) / R;
|
|
144
|
+
(Math.abs(A) >= Q || Math.abs(A) >= Z && k > K) && (S.current = !0, A < 0 ? n() : a());
|
|
143
145
|
}, j = (e) => {
|
|
144
|
-
o == null || o(e),
|
|
146
|
+
o == null || o(e), C.current = null, v(e);
|
|
145
147
|
}, g = (e) => {
|
|
146
|
-
if (
|
|
147
|
-
|
|
148
|
+
if (S.current) {
|
|
149
|
+
S.current = !1, e.preventDefault(), e.stopPropagation();
|
|
148
150
|
return;
|
|
149
151
|
}
|
|
150
|
-
|
|
152
|
+
h == null || h(e);
|
|
151
153
|
};
|
|
152
|
-
return /* @__PURE__ */
|
|
154
|
+
return /* @__PURE__ */ b(
|
|
153
155
|
"div",
|
|
154
156
|
{
|
|
155
157
|
ref: m,
|
|
156
158
|
id: I,
|
|
157
|
-
className:
|
|
159
|
+
className: w("overflow-hidden touch-pan-y", l),
|
|
158
160
|
onPointerDown: P,
|
|
159
161
|
onPointerUp: E,
|
|
160
162
|
onPointerCancel: j,
|
|
161
163
|
onClickCapture: g,
|
|
162
164
|
...p,
|
|
163
|
-
children: /* @__PURE__ */
|
|
164
|
-
|
|
165
|
+
children: /* @__PURE__ */ b(H, { reducedMotion: "user", children: /* @__PURE__ */ b(
|
|
166
|
+
X.div,
|
|
165
167
|
{
|
|
166
|
-
className:
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
children: y.map((e, c) => /* @__PURE__ */ C(
|
|
168
|
+
className: "flex",
|
|
169
|
+
initial: !1,
|
|
170
|
+
animate: { x: `${-r * 100}%` },
|
|
171
|
+
transition: N ? O : { duration: 0 },
|
|
172
|
+
children: y.map((e, c) => /* @__PURE__ */ b(
|
|
172
173
|
F.Provider,
|
|
173
174
|
{
|
|
174
175
|
value: {
|
|
@@ -181,48 +182,48 @@ const O = 40, Y = 10, J = 0.11, Q = t.forwardRef(
|
|
|
181
182
|
t.isValidElement(e) ? e.key ?? c : c
|
|
182
183
|
))
|
|
183
184
|
}
|
|
184
|
-
)
|
|
185
|
+
) })
|
|
185
186
|
}
|
|
186
187
|
);
|
|
187
188
|
}
|
|
188
189
|
);
|
|
189
|
-
|
|
190
|
-
const
|
|
190
|
+
U.displayName = "CarouselContent";
|
|
191
|
+
const ee = t.forwardRef(
|
|
191
192
|
({
|
|
192
193
|
className: l,
|
|
193
|
-
role:
|
|
194
|
+
role: s,
|
|
194
195
|
inert: d,
|
|
195
196
|
"aria-label": f,
|
|
196
197
|
"aria-hidden": o,
|
|
197
|
-
"aria-roledescription":
|
|
198
|
+
"aria-roledescription": h,
|
|
198
199
|
...p
|
|
199
200
|
}, m) => {
|
|
200
201
|
const r = t.useContext(F);
|
|
201
|
-
return /* @__PURE__ */
|
|
202
|
+
return /* @__PURE__ */ b(
|
|
202
203
|
"div",
|
|
203
204
|
{
|
|
204
205
|
ref: m,
|
|
205
|
-
role:
|
|
206
|
-
"aria-roledescription":
|
|
206
|
+
role: s ?? "group",
|
|
207
|
+
"aria-roledescription": h ?? "slide",
|
|
207
208
|
"aria-label": f ?? (r ? `${r.index + 1} of ${r.count}` : void 0),
|
|
208
209
|
"aria-hidden": o ?? (r ? !r.isActive : void 0),
|
|
209
210
|
inert: d ?? (r ? !r.isActive : void 0),
|
|
210
211
|
"data-active": (r == null ? void 0 : r.isActive) || void 0,
|
|
211
|
-
className:
|
|
212
|
+
className: w("w-full shrink-0", l),
|
|
212
213
|
...p
|
|
213
214
|
}
|
|
214
215
|
);
|
|
215
216
|
}
|
|
216
217
|
);
|
|
217
|
-
|
|
218
|
-
const
|
|
218
|
+
ee.displayName = "CarouselItem";
|
|
219
|
+
const te = t.forwardRef(
|
|
219
220
|
({
|
|
220
221
|
className: l,
|
|
221
|
-
getLabel:
|
|
222
|
+
getLabel: s = (p) => `Go to slide ${p + 1}`,
|
|
222
223
|
onKeyDown: d,
|
|
223
224
|
"aria-label": f,
|
|
224
225
|
...o
|
|
225
|
-
},
|
|
226
|
+
}, h) => {
|
|
226
227
|
const { index: p, count: m, contentId: r, goTo: x } = T("CarouselIndicators"), I = t.useRef([]);
|
|
227
228
|
if (m <= 1) return null;
|
|
228
229
|
const N = (u) => {
|
|
@@ -231,25 +232,25 @@ const K = t.forwardRef(
|
|
|
231
232
|
let a = null;
|
|
232
233
|
u.key === "ArrowRight" ? a = (p + 1) % m : u.key === "ArrowLeft" ? a = (p - 1 + m) % m : u.key === "Home" ? a = 0 : u.key === "End" && (a = m - 1), a !== null && (u.preventDefault(), u.stopPropagation(), x(a, "instant"), (n = I.current[a]) == null || n.focus());
|
|
233
234
|
};
|
|
234
|
-
return /* @__PURE__ */
|
|
235
|
+
return /* @__PURE__ */ b(
|
|
235
236
|
"div",
|
|
236
237
|
{
|
|
237
|
-
ref:
|
|
238
|
+
ref: h,
|
|
238
239
|
role: "group",
|
|
239
240
|
"aria-label": f ?? "Choose a slide",
|
|
240
|
-
className:
|
|
241
|
+
className: w("flex items-center justify-center gap-1", l),
|
|
241
242
|
onKeyDown: N,
|
|
242
243
|
...o,
|
|
243
244
|
children: Array.from({ length: m }, (u, a) => {
|
|
244
245
|
const n = a === p;
|
|
245
|
-
return /* @__PURE__ */
|
|
246
|
+
return /* @__PURE__ */ b(
|
|
246
247
|
"button",
|
|
247
248
|
{
|
|
248
249
|
ref: (y) => {
|
|
249
250
|
I.current[a] = y;
|
|
250
251
|
},
|
|
251
252
|
type: "button",
|
|
252
|
-
"aria-label":
|
|
253
|
+
"aria-label": s(a),
|
|
253
254
|
"aria-current": n ? "true" : void 0,
|
|
254
255
|
"aria-controls": r,
|
|
255
256
|
tabIndex: n ? 0 : -1,
|
|
@@ -259,12 +260,12 @@ const K = t.forwardRef(
|
|
|
259
260
|
a,
|
|
260
261
|
_(y) ? "instant" : "animated"
|
|
261
262
|
),
|
|
262
|
-
children: /* @__PURE__ */
|
|
263
|
+
children: /* @__PURE__ */ b(
|
|
263
264
|
"span",
|
|
264
265
|
{
|
|
265
266
|
"aria-hidden": !0,
|
|
266
|
-
className:
|
|
267
|
-
"size-2.5 rounded-dot transition-colors duration-
|
|
267
|
+
className: w(
|
|
268
|
+
"size-2.5 rounded-dot transition-colors duration-150 ease-out motion-reduce:transition-none",
|
|
268
269
|
n ? "bg-brand" : "bg-fill group-hover:bg-muted"
|
|
269
270
|
)
|
|
270
271
|
}
|
|
@@ -277,75 +278,75 @@ const K = t.forwardRef(
|
|
|
277
278
|
);
|
|
278
279
|
}
|
|
279
280
|
);
|
|
280
|
-
|
|
281
|
-
const
|
|
281
|
+
te.displayName = "CarouselIndicators";
|
|
282
|
+
const re = t.forwardRef(
|
|
282
283
|
({
|
|
283
284
|
children: l,
|
|
284
|
-
variant:
|
|
285
|
+
variant: s = "secondary",
|
|
285
286
|
size: d = "icon-sm",
|
|
286
287
|
disabled: f,
|
|
287
288
|
onClick: o,
|
|
288
|
-
"aria-label":
|
|
289
|
+
"aria-label": h,
|
|
289
290
|
...p
|
|
290
291
|
}, m) => {
|
|
291
292
|
const { index: r, count: x, loop: I, contentId: N, goPrevious: u } = T("CarouselPrevious"), a = f || x <= 1 || !I && r === 0;
|
|
292
|
-
return /* @__PURE__ */
|
|
293
|
+
return /* @__PURE__ */ b(
|
|
293
294
|
D,
|
|
294
295
|
{
|
|
295
296
|
ref: m,
|
|
296
297
|
type: "button",
|
|
297
|
-
variant:
|
|
298
|
+
variant: s,
|
|
298
299
|
size: d,
|
|
299
300
|
disabled: a,
|
|
300
|
-
"aria-label":
|
|
301
|
+
"aria-label": h ?? "Previous slide",
|
|
301
302
|
"aria-controls": N,
|
|
302
303
|
onClick: (n) => {
|
|
303
304
|
o == null || o(n), n.defaultPrevented || u(_(n) ? "instant" : "animated");
|
|
304
305
|
},
|
|
305
306
|
...p,
|
|
306
|
-
children: l ?? /* @__PURE__ */
|
|
307
|
+
children: l ?? /* @__PURE__ */ b(B, {})
|
|
307
308
|
}
|
|
308
309
|
);
|
|
309
310
|
}
|
|
310
311
|
);
|
|
311
|
-
|
|
312
|
-
const
|
|
312
|
+
re.displayName = "CarouselPrevious";
|
|
313
|
+
const ae = t.forwardRef(
|
|
313
314
|
({
|
|
314
315
|
children: l,
|
|
315
|
-
variant:
|
|
316
|
+
variant: s = "secondary",
|
|
316
317
|
size: d = "icon-sm",
|
|
317
318
|
disabled: f,
|
|
318
319
|
onClick: o,
|
|
319
|
-
"aria-label":
|
|
320
|
+
"aria-label": h,
|
|
320
321
|
...p
|
|
321
322
|
}, m) => {
|
|
322
323
|
const { index: r, count: x, loop: I, contentId: N, goNext: u } = T("CarouselNext"), a = f || x <= 1 || !I && r === x - 1;
|
|
323
|
-
return /* @__PURE__ */
|
|
324
|
+
return /* @__PURE__ */ b(
|
|
324
325
|
D,
|
|
325
326
|
{
|
|
326
327
|
ref: m,
|
|
327
328
|
type: "button",
|
|
328
|
-
variant:
|
|
329
|
+
variant: s,
|
|
329
330
|
size: d,
|
|
330
331
|
disabled: a,
|
|
331
|
-
"aria-label":
|
|
332
|
+
"aria-label": h ?? "Next slide",
|
|
332
333
|
"aria-controls": N,
|
|
333
334
|
onClick: (n) => {
|
|
334
335
|
o == null || o(n), n.defaultPrevented || u(_(n) ? "instant" : "animated");
|
|
335
336
|
},
|
|
336
337
|
...p,
|
|
337
|
-
children: l ?? /* @__PURE__ */
|
|
338
|
+
children: l ?? /* @__PURE__ */ b(G, {})
|
|
338
339
|
}
|
|
339
340
|
);
|
|
340
341
|
}
|
|
341
342
|
);
|
|
342
|
-
|
|
343
|
+
ae.displayName = "CarouselNext";
|
|
343
344
|
export {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
345
|
+
J as Carousel,
|
|
346
|
+
U as CarouselContent,
|
|
347
|
+
te as CarouselIndicators,
|
|
348
|
+
ee as CarouselItem,
|
|
349
|
+
ae as CarouselNext,
|
|
350
|
+
re as CarouselPrevious,
|
|
351
|
+
Y as carouselVariants
|
|
351
352
|
};
|
package/components/chart.js
CHANGED
|
@@ -131,7 +131,7 @@ function Pe({
|
|
|
131
131
|
}) {
|
|
132
132
|
const a = t ?? {}, s = /* @__PURE__ */ N("span", { className: $(ue, D[l].pill), children: [
|
|
133
133
|
r,
|
|
134
|
-
n != null && /* @__PURE__ */ e("span", { className: "ml-1 tabular-nums
|
|
134
|
+
n != null && /* @__PURE__ */ e("span", { className: "ml-1 tabular-nums", children: n })
|
|
135
135
|
] });
|
|
136
136
|
return o === "y" ? /* @__PURE__ */ e("foreignObject", { x: a.x ?? 0, y: (a.y ?? 0) - 12, width: a.width ?? 0, height: 24, className: "overflow-visible", children: /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-end pr-1", children: s }) }) : /* @__PURE__ */ e("foreignObject", { x: (a.x ?? 0) - 90, y: (a.y ?? 0) - 12, width: 180, height: 24, className: "overflow-visible", children: /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: s }) });
|
|
137
137
|
}
|
|
@@ -156,7 +156,7 @@ function _e({
|
|
|
156
156
|
tabIndex: 0,
|
|
157
157
|
role: "img",
|
|
158
158
|
"aria-label": `Annotation ${n}: ${l.label}`,
|
|
159
|
-
className: "cursor-default outline-none [transform-box:fill-box] origin-center transition-transform ease-out [transition-duration:
|
|
159
|
+
className: "cursor-default outline-none [transform-box:fill-box] origin-center transition-transform ease-out [transition-duration:150ms] hover:scale-110 focus-visible:scale-110 motion-reduce:transition-none motion-reduce:hover:scale-100 motion-reduce:focus-visible:scale-100",
|
|
160
160
|
onMouseEnter: c,
|
|
161
161
|
onMouseLeave: f,
|
|
162
162
|
onFocus: () => {
|
|
@@ -176,7 +176,7 @@ function _e({
|
|
|
176
176
|
y: r,
|
|
177
177
|
dy: "0.35em",
|
|
178
178
|
textAnchor: "middle",
|
|
179
|
-
className: "pointer-events-none fill-brand-foreground text-xs font-
|
|
179
|
+
className: "pointer-events-none fill-brand-foreground text-xs font-medium select-none",
|
|
180
180
|
children: n
|
|
181
181
|
}
|
|
182
182
|
)
|
|
@@ -207,7 +207,7 @@ function Ge({ hovered: t, frameWidth: r, format: n }) {
|
|
|
207
207
|
"span",
|
|
208
208
|
{
|
|
209
209
|
"aria-hidden": !0,
|
|
210
|
-
className: "flex size-4.5 shrink-0 items-center justify-center rounded-full text-xs font-
|
|
210
|
+
className: "flex size-4.5 shrink-0 items-center justify-center rounded-full text-xs font-medium text-brand-foreground",
|
|
211
211
|
style: { background: D[t.ann.color ?? "primary"].ref },
|
|
212
212
|
children: t.n
|
|
213
213
|
}
|
|
@@ -834,6 +834,8 @@ const Ze = k.forwardRef(
|
|
|
834
834
|
children: t.map((p, i) => /* @__PURE__ */ e(
|
|
835
835
|
oe,
|
|
836
836
|
{
|
|
837
|
+
role: "presentation",
|
|
838
|
+
"aria-hidden": "true",
|
|
837
839
|
fill: b(String(p[r]), i),
|
|
838
840
|
fillOpacity: w(String(p[r]))
|
|
839
841
|
},
|
|
@@ -843,7 +845,7 @@ const Ze = k.forwardRef(
|
|
|
843
845
|
)
|
|
844
846
|
] }) }),
|
|
845
847
|
l && /* @__PURE__ */ N("div", { className: "pointer-events-none absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
846
|
-
/* @__PURE__ */ e("div", { className: "text-xl font-
|
|
848
|
+
/* @__PURE__ */ e("div", { className: "text-xl font-medium text-foreground tabular-nums", children: v(m) }),
|
|
847
849
|
o && /* @__PURE__ */ e("div", { className: "mt-0.5 text-xs font-normal tracking-wide uppercase text-tertiary", children: o })
|
|
848
850
|
] })
|
|
849
851
|
] })
|
|
@@ -1003,7 +1005,7 @@ const qe = k.forwardRef(
|
|
|
1003
1005
|
}
|
|
1004
1006
|
) }),
|
|
1005
1007
|
/* @__PURE__ */ N("div", { className: "pointer-events-none absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
1006
|
-
/* @__PURE__ */ e("div", { className: "text-xl font-
|
|
1008
|
+
/* @__PURE__ */ e("div", { className: "text-xl font-medium text-foreground tabular-nums", children: x(Math.round(m)) }),
|
|
1007
1009
|
o && /* @__PURE__ */ e("div", { className: "mt-0.5 text-xs font-normal tracking-wide uppercase text-tertiary", children: o })
|
|
1008
1010
|
] })
|
|
1009
1011
|
] }),
|
|
@@ -1053,7 +1055,7 @@ function Je({
|
|
|
1053
1055
|
"p",
|
|
1054
1056
|
{
|
|
1055
1057
|
className: $(
|
|
1056
|
-
"truncate text-xs font-
|
|
1058
|
+
"truncate text-xs font-medium",
|
|
1057
1059
|
d ? "text-background" : "text-foreground"
|
|
1058
1060
|
),
|
|
1059
1061
|
children: s
|
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
|
};
|