@actioneer/ads 0.5.4 → 0.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion.js +15 -15
- package/components/agent-icon.d.ts +64 -0
- package/components/agent-icon.js +251 -0
- package/components/ai-elements/agent-trace.d.ts +8 -1
- package/components/ai-elements/agent-trace.js +164 -129
- package/components/ai-elements/chain-of-thought-icon.d.ts +42 -0
- package/components/ai-elements/chain-of-thought-icon.js +283 -0
- package/components/ai-elements/chain-of-thought.js +7 -7
- package/components/ai-elements/chart.js +38 -35
- package/components/ai-elements/index.d.ts +1 -0
- package/components/ai-elements/inline-citation.js +40 -40
- package/components/ai-elements/message.js +5 -5
- package/components/ai-elements/queue.js +1 -1
- package/components/ai-elements/research-activity.d.ts +2 -0
- package/components/ai-elements/research-activity.js +79 -81
- package/components/ai-elements/task-progress.js +2 -2
- package/components/ai-elements/tool.d.ts +4 -2
- package/components/ai-elements/tool.js +74 -54
- package/components/ai-elements/transcript.js +1 -1
- package/components/alert.js +1 -1
- package/components/answer.d.ts +2644 -311
- package/components/answer.js +1776 -371
- package/components/assistant-ui/answer-tool-ui.js +27 -28
- package/components/assistant-ui/chain-of-thought.d.ts +7 -2
- package/components/assistant-ui/composer-harness.js +20 -16
- package/components/assistant-ui/follow-up-suggestions.d.ts +5 -1
- package/components/assistant-ui/follow-up-suggestions.js +47 -19
- package/components/assistant-ui/reasoning.js +35 -31
- package/components/assistant-ui/tool-fallback.js +125 -122
- package/components/assistant-ui/tool-group.d.ts +3 -1
- package/components/assistant-ui/tool-group.js +48 -43
- package/components/audio-waveform.js +14 -14
- package/components/autocomplete.js +52 -48
- package/components/avatar.js +58 -44
- package/components/badge.js +3 -3
- package/components/brand-texture.js +1 -1
- package/components/breadcrumbs.d.ts +27 -1
- package/components/breadcrumbs.js +94 -42
- package/components/button.js +15 -15
- package/components/carousel.js +10 -10
- package/components/chart.js +77 -77
- package/components/chip.js +3 -3
- package/components/code-block.d.ts +39 -17
- package/components/code-block.js +153 -104
- package/components/command-palette.js +27 -25
- package/components/connector-card.js +2 -2
- package/components/dropdown.js +65 -61
- package/components/empty-state.js +15 -15
- package/components/field.js +16 -16
- package/components/index.d.ts +4 -0
- package/components/index.js +525 -478
- package/components/infinite-canvas.js +60 -60
- package/components/kbd.js +6 -6
- package/components/link.js +6 -6
- package/components/modal.js +22 -20
- package/components/page-header.js +1 -1
- package/components/pagination.js +22 -22
- package/components/pixel-blast-svg.js +1 -1
- package/components/pixel-icon.d.ts +31 -0
- package/components/pixel-icon.js +733 -0
- package/components/popover.js +46 -42
- package/components/ripple.d.ts +29 -0
- package/components/ripple.js +17 -0
- package/components/segmented.js +24 -23
- package/components/select.js +71 -67
- package/components/selection-action-bar.js +22 -22
- package/components/sidebar.d.ts +11 -3
- package/components/sidebar.js +161 -148
- package/components/stepper.d.ts +2 -0
- package/components/stepper.js +80 -43
- package/components/table.d.ts +7 -0
- package/components/table.js +223 -155
- package/components/tabs.d.ts +3 -1
- package/components/tabs.js +165 -144
- package/components/textarea.js +10 -8
- package/components/toast.js +48 -46
- package/components/tooltip.js +61 -59
- package/components/tree.js +44 -41
- package/components/typography.d.ts +1 -1
- package/components/typography.js +25 -25
- package/components/viz-charts.js +133 -133
- package/fonts/aribau-grotesk-500.otf +0 -0
- package/fonts/aribau-grotesk-600.woff2 +0 -0
- package/fonts.css +6 -4
- package/lib/icons.d.ts +411 -402
- package/lib/icons.js +109 -107
- package/llms.txt +98 -8
- package/manifest.json +1012 -96
- package/package.json +5 -5
- package/styles.css +206 -81
- package/theme.css +200 -77
- package/fonts/aribau-grotesk-400.otf +0 -0
- package/fonts/aribau-grotesk-700.otf +0 -0
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { memo as w, useRef as y, useState as C, useCallback as
|
|
4
|
-
import {
|
|
2
|
+
import { jsxs as p, jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { memo as w, useRef as y, useState as C, useCallback as k } from "react";
|
|
4
|
+
import { ChevronDown as G } from "../../lib/icons.js";
|
|
5
5
|
import { cva as I } from "class-variance-authority";
|
|
6
|
-
import { useScrollLock as
|
|
7
|
-
import { Collapsible as S, CollapsibleTrigger as
|
|
6
|
+
import { useScrollLock as R } from "@assistant-ui/react";
|
|
7
|
+
import { Collapsible as S, CollapsibleTrigger as A, CollapsibleContent as j } from "../ui/collapsible.js";
|
|
8
8
|
import { cn as n } from "../../lib/cn.js";
|
|
9
|
-
|
|
9
|
+
import { TraceStateIcon as z } from "../ai-elements/chain-of-thought-icon.js";
|
|
10
|
+
const D = 200, U = I("aui-tool-group-root group/tool-group w-full", {
|
|
10
11
|
variants: {
|
|
11
12
|
variant: {
|
|
12
13
|
outline: "rounded-lg border py-3",
|
|
@@ -16,48 +17,49 @@ const D = 200, L = I("aui-tool-group-root group/tool-group w-full", {
|
|
|
16
17
|
},
|
|
17
18
|
defaultVariants: { variant: "outline" }
|
|
18
19
|
});
|
|
19
|
-
function
|
|
20
|
+
function c({
|
|
20
21
|
className: r,
|
|
21
22
|
variant: o,
|
|
22
23
|
open: a,
|
|
23
24
|
onOpenChange: e,
|
|
24
|
-
defaultOpen:
|
|
25
|
-
children:
|
|
25
|
+
defaultOpen: u = !1,
|
|
26
|
+
children: l,
|
|
26
27
|
...h
|
|
27
28
|
}) {
|
|
28
|
-
const
|
|
29
|
-
(
|
|
30
|
-
|
|
29
|
+
const s = y(null), [x, b] = C(u), d = R(s, D), g = a !== void 0, N = g ? a : x, T = k(
|
|
30
|
+
(m) => {
|
|
31
|
+
d(), g || b(m), e == null || e(m);
|
|
31
32
|
},
|
|
32
|
-
[
|
|
33
|
+
[d, g, e]
|
|
33
34
|
);
|
|
34
35
|
return /* @__PURE__ */ t(
|
|
35
36
|
S,
|
|
36
37
|
{
|
|
37
|
-
ref:
|
|
38
|
+
ref: s,
|
|
38
39
|
"data-slot": "tool-group-root",
|
|
39
40
|
"data-variant": o ?? "outline",
|
|
40
41
|
open: N,
|
|
41
42
|
onOpenChange: T,
|
|
42
43
|
className: n(
|
|
43
|
-
|
|
44
|
+
U({ variant: o }),
|
|
44
45
|
"group/tool-group-root",
|
|
45
46
|
r
|
|
46
47
|
),
|
|
47
48
|
...h,
|
|
48
|
-
children:
|
|
49
|
+
children: l
|
|
49
50
|
}
|
|
50
51
|
);
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
+
function v({
|
|
53
54
|
count: r,
|
|
54
55
|
active: o = !1,
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
stage: a = "thinking",
|
|
57
|
+
className: e,
|
|
58
|
+
...u
|
|
57
59
|
}) {
|
|
58
60
|
const l = `${r} tool ${r === 1 ? "call" : "calls"}`;
|
|
59
|
-
return /* @__PURE__ */
|
|
60
|
-
|
|
61
|
+
return /* @__PURE__ */ p(
|
|
62
|
+
A,
|
|
61
63
|
{
|
|
62
64
|
"data-slot": "tool-group-trigger",
|
|
63
65
|
className: n(
|
|
@@ -65,18 +67,21 @@ function c({
|
|
|
65
67
|
"group-data-[variant=ghost]/tool-group-root:text-muted-foreground group-data-[variant=ghost]/tool-group-root:hover:text-foreground group-data-[variant=ghost]/tool-group-root:py-1.5",
|
|
66
68
|
"group-data-[variant=outline]/tool-group-root:w-full group-data-[variant=outline]/tool-group-root:px-4",
|
|
67
69
|
"group-data-[variant=muted]/tool-group-root:w-full group-data-[variant=muted]/tool-group-root:px-4",
|
|
68
|
-
|
|
70
|
+
e
|
|
69
71
|
),
|
|
70
|
-
...
|
|
72
|
+
...u,
|
|
71
73
|
children: [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
/* @__PURE__ */ t(
|
|
75
|
+
z,
|
|
74
76
|
{
|
|
75
|
-
"data-slot": "tool-group-trigger-
|
|
76
|
-
|
|
77
|
+
"data-slot": "tool-group-trigger-icon",
|
|
78
|
+
stage: a,
|
|
79
|
+
status: o ? "active" : "complete",
|
|
80
|
+
className: "aui-tool-group-trigger-icon size-4 shrink-0",
|
|
81
|
+
"aria-hidden": !0
|
|
77
82
|
}
|
|
78
83
|
),
|
|
79
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ p(
|
|
80
85
|
"span",
|
|
81
86
|
{
|
|
82
87
|
"data-slot": "tool-group-trigger-label",
|
|
@@ -101,7 +106,7 @@ function c({
|
|
|
101
106
|
}
|
|
102
107
|
),
|
|
103
108
|
/* @__PURE__ */ t(
|
|
104
|
-
|
|
109
|
+
G,
|
|
105
110
|
{
|
|
106
111
|
"data-slot": "tool-group-trigger-chevron",
|
|
107
112
|
className: n(
|
|
@@ -116,13 +121,13 @@ function c({
|
|
|
116
121
|
}
|
|
117
122
|
);
|
|
118
123
|
}
|
|
119
|
-
function
|
|
124
|
+
function f({
|
|
120
125
|
className: r,
|
|
121
126
|
children: o,
|
|
122
127
|
...a
|
|
123
128
|
}) {
|
|
124
129
|
return /* @__PURE__ */ t(
|
|
125
|
-
|
|
130
|
+
j,
|
|
126
131
|
{
|
|
127
132
|
"data-slot": "tool-group-content",
|
|
128
133
|
className: n(
|
|
@@ -153,21 +158,21 @@ function v({
|
|
|
153
158
|
}
|
|
154
159
|
);
|
|
155
160
|
}
|
|
156
|
-
const
|
|
161
|
+
const V = ({ children: r, startIndex: o, endIndex: a }) => {
|
|
157
162
|
const e = a - o + 1;
|
|
158
|
-
return /* @__PURE__ */
|
|
159
|
-
/* @__PURE__ */ t(
|
|
160
|
-
/* @__PURE__ */ t(
|
|
163
|
+
return /* @__PURE__ */ p(c, { children: [
|
|
164
|
+
/* @__PURE__ */ t(v, { count: e }),
|
|
165
|
+
/* @__PURE__ */ t(f, { children: r })
|
|
161
166
|
] });
|
|
162
|
-
}, i = w(
|
|
167
|
+
}, i = w(V);
|
|
163
168
|
i.displayName = "ToolGroup";
|
|
164
|
-
i.Root =
|
|
165
|
-
i.Trigger =
|
|
166
|
-
i.Content =
|
|
169
|
+
i.Root = c;
|
|
170
|
+
i.Trigger = v;
|
|
171
|
+
i.Content = f;
|
|
167
172
|
export {
|
|
168
173
|
i as ToolGroup,
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
174
|
+
f as ToolGroupContent,
|
|
175
|
+
c as ToolGroupRoot,
|
|
176
|
+
v as ToolGroupTrigger,
|
|
177
|
+
U as toolGroupVariants
|
|
173
178
|
};
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
3
3
|
import * as u from "react";
|
|
4
4
|
import { Button as ee, buttonVariants as re } from "./button.js";
|
|
5
|
-
import { Loader as te, Warning as ae, Pause as ne, Play as oe, Download as
|
|
6
|
-
import { cn as
|
|
5
|
+
import { Loader as te, Warning as ae, Pause as ne, Play as oe, Download as se } from "../lib/icons.js";
|
|
6
|
+
import { cn as ie } from "../lib/cn.js";
|
|
7
7
|
function A(t) {
|
|
8
8
|
if (!t || !Number.isFinite(t) || t < 0) return "0:00";
|
|
9
9
|
const e = Math.floor(t), a = Math.floor(e / 3600), c = Math.floor(e % 3600 / 60), d = e % 60;
|
|
@@ -40,8 +40,8 @@ function fe({
|
|
|
40
40
|
import("wavesurfer.js/dist/plugins/hover.esm.js")
|
|
41
41
|
]);
|
|
42
42
|
if (M) return;
|
|
43
|
-
const N = B(o, "--foreground", "currentColor"), O = B(o, "--muted-foreground", "currentColor"), Q = B(o, "--background", "Canvas"), X = (
|
|
44
|
-
const Y =
|
|
43
|
+
const N = B(o, "--foreground", "currentColor"), O = B(o, "--muted-foreground", "currentColor"), Q = B(o, "--background", "Canvas"), X = (i, P) => {
|
|
44
|
+
const Y = i[0] ?? [], Z = i[1] ?? i[0] ?? [], { width: _, height: T } = P.canvas, y = T / 2, S = 4, I = 2, $ = Math.max(1, Math.floor(_ / (S + I))), H = (n, g) => {
|
|
45
45
|
if (!n.length) return 0;
|
|
46
46
|
const h = Math.floor(g / $ * n.length), j = Math.max(h + 1, Math.floor((g + 1) / $ * n.length));
|
|
47
47
|
let W = 0;
|
|
@@ -52,7 +52,7 @@ function fe({
|
|
|
52
52
|
const g = n * (S + I), h = Math.max(1, H(Y, n) * (y - 2)), j = Math.max(1, H(Z, n) * (y - 2));
|
|
53
53
|
P.fillRect(g, y - h, S, h), P.fillRect(g, y + 1, S, j);
|
|
54
54
|
}
|
|
55
|
-
},
|
|
55
|
+
}, s = w.create({
|
|
56
56
|
container: o,
|
|
57
57
|
url: t,
|
|
58
58
|
duration: e,
|
|
@@ -79,11 +79,11 @@ function fe({
|
|
|
79
79
|
})
|
|
80
80
|
]
|
|
81
81
|
});
|
|
82
|
-
p.current =
|
|
83
|
-
D(
|
|
84
|
-
}),
|
|
85
|
-
x(!1), b(
|
|
86
|
-
}),
|
|
82
|
+
p.current = s, s.on("ready", (i) => {
|
|
83
|
+
D(i), C(!0);
|
|
84
|
+
}), s.on("timeupdate", (i) => b(i)), s.on("seeking", (i) => b(i)), s.on("play", () => x(!0)), s.on("pause", () => x(!1)), s.on("finish", () => {
|
|
85
|
+
x(!1), b(s.getDuration());
|
|
86
|
+
}), s.on("error", () => {
|
|
87
87
|
R("Recording could not be loaded."), C(!1);
|
|
88
88
|
});
|
|
89
89
|
} catch {
|
|
@@ -98,16 +98,16 @@ function fe({
|
|
|
98
98
|
var o;
|
|
99
99
|
!k || f || (o = p.current) == null || o.playPause();
|
|
100
100
|
};
|
|
101
|
-
return /* @__PURE__ */ l("div", { className:
|
|
101
|
+
return /* @__PURE__ */ l("div", { className: ie("space-y-3", V), "data-slot": "audio-waveform", children: [
|
|
102
102
|
/* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-3", children: [
|
|
103
103
|
/* @__PURE__ */ l("div", { className: "min-w-0", children: [
|
|
104
|
-
/* @__PURE__ */ r("p", { className: "text-base font-
|
|
104
|
+
/* @__PURE__ */ r("p", { className: "text-base font-normal", children: "Recording" }),
|
|
105
105
|
/* @__PURE__ */ r("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: v ? `${d} above · ${m.toLowerCase()} below` : a ?? "Audio" })
|
|
106
106
|
] }),
|
|
107
107
|
/* @__PURE__ */ r("p", { className: "font-mono text-xs tabular-nums text-muted-foreground", children: A(L) })
|
|
108
108
|
] }),
|
|
109
109
|
/* @__PURE__ */ l("div", { className: "relative overflow-hidden py-2", children: [
|
|
110
|
-
v && /* @__PURE__ */ l("div", { className: "pointer-events-none absolute inset-x-0 top-2 z-10 flex h-[92px] flex-col items-center justify-between text-
|
|
110
|
+
v && /* @__PURE__ */ l("div", { className: "pointer-events-none absolute inset-x-0 top-2 z-10 flex h-[92px] flex-col items-center justify-between text-xs font-normal uppercase tracking-wide text-muted-foreground", children: [
|
|
111
111
|
/* @__PURE__ */ r("span", { className: "rounded-sm bg-card/85 px-1.5 py-0.5", children: d }),
|
|
112
112
|
/* @__PURE__ */ r("span", { className: "rounded-sm bg-card/85 px-1.5 py-0.5", children: m })
|
|
113
113
|
] }),
|
|
@@ -136,7 +136,7 @@ function fe({
|
|
|
136
136
|
}
|
|
137
137
|
),
|
|
138
138
|
/* @__PURE__ */ l("a", { href: t, download: q, className: re({ variant: "ghost" }), children: [
|
|
139
|
-
/* @__PURE__ */ r(
|
|
139
|
+
/* @__PURE__ */ r(se, { "aria-hidden": "true", className: "size-4" }),
|
|
140
140
|
"Audio"
|
|
141
141
|
] })
|
|
142
142
|
] })
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as x, jsx as c } from "react/jsx-runtime";
|
|
3
3
|
import * as o from "react";
|
|
4
4
|
import { MotionConfig as j, AnimatePresence as z, motion as q } from "motion/react";
|
|
5
5
|
import { Search as O, Check as P } from "../lib/icons.js";
|
|
6
6
|
import { cn as y } from "../lib/cn.js";
|
|
7
7
|
import { inputBaseClass as B } from "./field.js";
|
|
8
8
|
import { floatVariants as F } from "../lib/motion.js";
|
|
9
|
-
|
|
9
|
+
import { Ripple as K } from "./ripple.js";
|
|
10
|
+
const Q = o.forwardRef(
|
|
10
11
|
({
|
|
11
12
|
items: u,
|
|
12
13
|
value: f,
|
|
@@ -18,9 +19,9 @@ const K = o.forwardRef(
|
|
|
18
19
|
className: S,
|
|
19
20
|
id: I
|
|
20
21
|
}, M) => {
|
|
21
|
-
const d = u.find((e) => e.value === f), [m,
|
|
22
|
+
const d = u.find((e) => e.value === f), [m, h] = o.useState((d == null ? void 0 : d.label) ?? ""), [r, a] = o.useState(!1), [n, w] = o.useState(-1), N = o.useRef(null), k = o.useRef(null), b = o.useId();
|
|
22
23
|
o.useEffect(() => {
|
|
23
|
-
|
|
24
|
+
h((d == null ? void 0 : d.label) ?? (p ? f ?? "" : ""));
|
|
24
25
|
}, [d, f, p]);
|
|
25
26
|
const l = o.useMemo(() => {
|
|
26
27
|
const e = m.trim().toLowerCase();
|
|
@@ -39,26 +40,26 @@ const K = o.forwardRef(
|
|
|
39
40
|
const e = (t = k.current) == null ? void 0 : t.children[n];
|
|
40
41
|
e == null || e.scrollIntoView({ block: "nearest" });
|
|
41
42
|
}, [r, n]);
|
|
42
|
-
const
|
|
43
|
-
l.length !== 0 &&
|
|
43
|
+
const g = (e) => {
|
|
44
|
+
l.length !== 0 && w((t) => {
|
|
44
45
|
let s = t;
|
|
45
46
|
for (let v = 0; v < l.length; v++)
|
|
46
47
|
if (s = (s + e + l.length) % l.length, !l[s].disabled) return s;
|
|
47
48
|
return t;
|
|
48
49
|
});
|
|
49
|
-
},
|
|
50
|
+
}, D = (e) => {
|
|
50
51
|
const t = l[e];
|
|
51
|
-
!t || t.disabled || (i == null || i(t.value),
|
|
52
|
+
!t || t.disabled || (i == null || i(t.value), h(t.label), a(!1));
|
|
52
53
|
}, L = (e) => {
|
|
53
54
|
switch (e.key) {
|
|
54
55
|
case "ArrowDown":
|
|
55
|
-
e.preventDefault(), r ?
|
|
56
|
+
e.preventDefault(), r ? g(1) : a(!0);
|
|
56
57
|
break;
|
|
57
58
|
case "ArrowUp":
|
|
58
|
-
e.preventDefault(), r ?
|
|
59
|
+
e.preventDefault(), r ? g(-1) : a(!0);
|
|
59
60
|
break;
|
|
60
61
|
case "Enter":
|
|
61
|
-
r && n >= 0 ? (e.preventDefault(),
|
|
62
|
+
r && n >= 0 ? (e.preventDefault(), D(n)) : p && (i == null || i(m), a(!1));
|
|
62
63
|
break;
|
|
63
64
|
case "Escape":
|
|
64
65
|
r && (e.preventDefault(), a(!1));
|
|
@@ -68,8 +69,8 @@ const K = o.forwardRef(
|
|
|
68
69
|
break;
|
|
69
70
|
}
|
|
70
71
|
};
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
72
|
+
return /* @__PURE__ */ x("div", { ref: N, className: "relative", children: [
|
|
73
|
+
/* @__PURE__ */ x("div", { className: "group/field relative", children: [
|
|
73
74
|
/* @__PURE__ */ c(
|
|
74
75
|
O,
|
|
75
76
|
{
|
|
@@ -95,7 +96,7 @@ const K = o.forwardRef(
|
|
|
95
96
|
placeholder: A,
|
|
96
97
|
value: m,
|
|
97
98
|
onChange: (e) => {
|
|
98
|
-
|
|
99
|
+
h(e.target.value), a(!0), w(-1), p && (i == null || i(e.target.value));
|
|
99
100
|
},
|
|
100
101
|
onFocus: () => a(!0),
|
|
101
102
|
onKeyDown: L,
|
|
@@ -103,7 +104,7 @@ const K = o.forwardRef(
|
|
|
103
104
|
}
|
|
104
105
|
)
|
|
105
106
|
] }),
|
|
106
|
-
/* @__PURE__ */ c(j, { reducedMotion: "user", children: /* @__PURE__ */ c(z, { children: r && /* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ c(j, { reducedMotion: "user", children: /* @__PURE__ */ c(z, { children: r && /* @__PURE__ */ x(
|
|
107
108
|
q.ul,
|
|
108
109
|
{
|
|
109
110
|
ref: k,
|
|
@@ -118,45 +119,48 @@ const K = o.forwardRef(
|
|
|
118
119
|
"absolute z-50 mt-1.5 max-h-60 w-full overflow-auto p-1",
|
|
119
120
|
"rounded-md border border-border bg-elevated shadow-elevation"
|
|
120
121
|
),
|
|
121
|
-
children:
|
|
122
|
-
"
|
|
123
|
-
|
|
124
|
-
role: "presentation",
|
|
125
|
-
className: "px-2 py-6 text-center text-xs text-muted-foreground",
|
|
126
|
-
children: "No results"
|
|
127
|
-
}
|
|
128
|
-
) : l.map((e, t) => {
|
|
129
|
-
const s = e.value === f, v = t === n;
|
|
130
|
-
return /* @__PURE__ */ w(
|
|
122
|
+
children: [
|
|
123
|
+
/* @__PURE__ */ c(K, { origin: "top" }),
|
|
124
|
+
l.length === 0 ? /* @__PURE__ */ c(
|
|
131
125
|
"li",
|
|
132
126
|
{
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
"
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
127
|
+
role: "presentation",
|
|
128
|
+
className: "px-2 py-6 text-center text-xs text-muted-foreground",
|
|
129
|
+
children: "No results"
|
|
130
|
+
}
|
|
131
|
+
) : l.map((e, t) => {
|
|
132
|
+
const s = e.value === f, v = t === n;
|
|
133
|
+
return /* @__PURE__ */ x(
|
|
134
|
+
"li",
|
|
135
|
+
{
|
|
136
|
+
id: `${b}-opt-${t}`,
|
|
137
|
+
role: "option",
|
|
138
|
+
"aria-selected": s,
|
|
139
|
+
"aria-disabled": e.disabled || void 0,
|
|
140
|
+
onMouseEnter: () => !e.disabled && w(t),
|
|
141
|
+
onMouseDown: ($) => $.preventDefault(),
|
|
142
|
+
onClick: () => D(t),
|
|
143
|
+
className: y(
|
|
144
|
+
"flex cursor-pointer items-center justify-between gap-2",
|
|
145
|
+
"rounded-sm px-2 py-1.5 text-xs text-foreground select-none",
|
|
146
|
+
v && !e.disabled && "bg-muted",
|
|
147
|
+
e.disabled && "pointer-events-none opacity-50"
|
|
148
|
+
),
|
|
149
|
+
children: [
|
|
150
|
+
/* @__PURE__ */ c("span", { className: "truncate", children: e.label }),
|
|
151
|
+
s && /* @__PURE__ */ c(P, { className: "size-4 shrink-0", "aria-hidden": !0 })
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
e.value
|
|
155
|
+
);
|
|
156
|
+
})
|
|
157
|
+
]
|
|
154
158
|
}
|
|
155
159
|
) }) })
|
|
156
160
|
] });
|
|
157
161
|
}
|
|
158
162
|
);
|
|
159
|
-
|
|
163
|
+
Q.displayName = "Autocomplete";
|
|
160
164
|
export {
|
|
161
|
-
|
|
165
|
+
Q as Autocomplete
|
|
162
166
|
};
|
package/components/avatar.js
CHANGED
|
@@ -1,83 +1,97 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import { cn as
|
|
5
|
-
const
|
|
2
|
+
import { jsx as l, jsxs as x } from "react/jsx-runtime";
|
|
3
|
+
import * as f from "react";
|
|
4
|
+
import { cn as o } from "../lib/cn.js";
|
|
5
|
+
const g = {
|
|
6
6
|
sm: "size-8 text-xs",
|
|
7
7
|
md: "size-10 text-xs",
|
|
8
8
|
lg: "size-12 text-base",
|
|
9
9
|
xl: "size-16 text-lg"
|
|
10
|
-
},
|
|
10
|
+
}, p = {
|
|
11
11
|
full: "rounded-full",
|
|
12
12
|
lg: "rounded-lg"
|
|
13
13
|
};
|
|
14
|
-
function
|
|
15
|
-
const e =
|
|
14
|
+
function v(r) {
|
|
15
|
+
const e = r.trim().split(/\s+/).filter(Boolean);
|
|
16
16
|
return e.length === 0 ? "" : e.length === 1 ? e[0].slice(0, 2).toUpperCase() : (e[0][0] + e[e.length - 1][0]).toUpperCase();
|
|
17
17
|
}
|
|
18
|
-
const
|
|
19
|
-
(
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
const m = [
|
|
19
|
+
"bg-(--color-cyan-soft) text-(--color-cyan-deep)",
|
|
20
|
+
"bg-(--color-lime-soft) text-(--color-lime-deep)",
|
|
21
|
+
"bg-(--color-amber-soft) text-(--color-amber-deep)",
|
|
22
|
+
"bg-info-100 text-info-700",
|
|
23
|
+
"bg-sage-300 text-sage-950"
|
|
24
|
+
];
|
|
25
|
+
function y(r) {
|
|
26
|
+
let e = 0;
|
|
27
|
+
for (const t of r) e = e * 31 + t.charCodeAt(0) >>> 0;
|
|
28
|
+
return m[e % m.length];
|
|
29
|
+
}
|
|
30
|
+
const N = f.forwardRef(
|
|
31
|
+
({ className: r, src: e, name: t, size: i = "md", radius: s = "full", ...a }, c) => {
|
|
32
|
+
const n = t ? v(t) : "";
|
|
33
|
+
return /* @__PURE__ */ l(
|
|
22
34
|
"span",
|
|
23
35
|
{
|
|
24
|
-
ref:
|
|
36
|
+
ref: c,
|
|
25
37
|
role: "img",
|
|
26
38
|
"aria-label": t,
|
|
27
|
-
className:
|
|
28
|
-
"relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden font-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
39
|
+
className: o(
|
|
40
|
+
"relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden font-normal",
|
|
41
|
+
// Images sit on the neutral fill; initials take a deterministic
|
|
42
|
+
// per-name identity tint so a roster reads multi-color.
|
|
43
|
+
e || !t ? "bg-fill text-fill-foreground" : y(t),
|
|
44
|
+
g[i],
|
|
45
|
+
p[s],
|
|
46
|
+
r
|
|
33
47
|
),
|
|
34
|
-
...
|
|
35
|
-
children: e ? /* @__PURE__ */
|
|
48
|
+
...a,
|
|
49
|
+
children: e ? /* @__PURE__ */ l(
|
|
36
50
|
"img",
|
|
37
51
|
{
|
|
38
52
|
src: e,
|
|
39
53
|
alt: t ?? "",
|
|
40
54
|
className: "size-full object-cover"
|
|
41
55
|
}
|
|
42
|
-
) : /* @__PURE__ */
|
|
56
|
+
) : /* @__PURE__ */ l("span", { "aria-hidden": !0, children: n })
|
|
43
57
|
}
|
|
44
58
|
);
|
|
45
59
|
}
|
|
46
60
|
);
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
({ className:
|
|
50
|
-
const
|
|
51
|
-
return /* @__PURE__ */
|
|
61
|
+
N.displayName = "Avatar";
|
|
62
|
+
const z = f.forwardRef(
|
|
63
|
+
({ className: r, max: e, size: t = "md", radius: i = "full", children: s, ...a }, c) => {
|
|
64
|
+
const n = f.Children.toArray(s), d = typeof e == "number" ? n.length - e : 0, h = typeof e == "number" ? n.slice(0, e) : n;
|
|
65
|
+
return /* @__PURE__ */ x(
|
|
52
66
|
"div",
|
|
53
67
|
{
|
|
54
|
-
ref:
|
|
55
|
-
className:
|
|
56
|
-
...
|
|
68
|
+
ref: c,
|
|
69
|
+
className: o("flex items-center", r),
|
|
70
|
+
...a,
|
|
57
71
|
children: [
|
|
58
|
-
|
|
72
|
+
h.map((b, u) => /* @__PURE__ */ l(
|
|
59
73
|
"div",
|
|
60
74
|
{
|
|
61
|
-
className:
|
|
75
|
+
className: o(
|
|
62
76
|
"ring-2 ring-background rounded-full",
|
|
63
|
-
|
|
77
|
+
u > 0 && "-ml-2"
|
|
64
78
|
),
|
|
65
|
-
children:
|
|
79
|
+
children: b
|
|
66
80
|
},
|
|
67
|
-
|
|
81
|
+
u
|
|
68
82
|
)),
|
|
69
|
-
|
|
83
|
+
d > 0 && /* @__PURE__ */ l("div", { className: o("ring-2 ring-background rounded-full -ml-2"), children: /* @__PURE__ */ l(
|
|
70
84
|
"span",
|
|
71
85
|
{
|
|
72
86
|
role: "img",
|
|
73
|
-
"aria-label": `${
|
|
74
|
-
className:
|
|
75
|
-
"relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden font-
|
|
87
|
+
"aria-label": `${d} more`,
|
|
88
|
+
className: o(
|
|
89
|
+
"relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden font-normal",
|
|
76
90
|
"bg-muted text-muted-foreground",
|
|
77
|
-
|
|
78
|
-
|
|
91
|
+
g[t],
|
|
92
|
+
p[i]
|
|
79
93
|
),
|
|
80
|
-
children: /* @__PURE__ */
|
|
94
|
+
children: /* @__PURE__ */ l("span", { "aria-hidden": !0, children: `+${d}` })
|
|
81
95
|
}
|
|
82
96
|
) })
|
|
83
97
|
]
|
|
@@ -85,8 +99,8 @@ const N = u.forwardRef(
|
|
|
85
99
|
);
|
|
86
100
|
}
|
|
87
101
|
);
|
|
88
|
-
|
|
102
|
+
z.displayName = "AvatarGroup";
|
|
89
103
|
export {
|
|
90
|
-
|
|
91
|
-
|
|
104
|
+
N as Avatar,
|
|
105
|
+
z as AvatarGroup
|
|
92
106
|
};
|
package/components/badge.js
CHANGED
|
@@ -4,7 +4,7 @@ import * as d from "react";
|
|
|
4
4
|
import { cva as c } from "class-variance-authority";
|
|
5
5
|
import { cn as o } from "../lib/cn.js";
|
|
6
6
|
const g = c(
|
|
7
|
-
"inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-
|
|
7
|
+
"inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-normal whitespace-nowrap",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
@@ -25,7 +25,7 @@ const g = c(
|
|
|
25
25
|
compoundVariants: [
|
|
26
26
|
// solid
|
|
27
27
|
{ variant: "solid", color: "default", className: "bg-fill text-fill-foreground" },
|
|
28
|
-
{ variant: "solid", color: "primary", className: "bg-
|
|
28
|
+
{ variant: "solid", color: "primary", className: "bg-foreground text-background" },
|
|
29
29
|
{ variant: "solid", color: "success", className: "bg-success text-success-foreground" },
|
|
30
30
|
{ variant: "solid", color: "warning", className: "bg-warning text-warning-foreground" },
|
|
31
31
|
{ variant: "solid", color: "danger", className: "bg-danger text-danger-foreground" },
|
|
@@ -49,7 +49,7 @@ const g = c(
|
|
|
49
49
|
}
|
|
50
50
|
), f = {
|
|
51
51
|
default: "bg-muted-foreground",
|
|
52
|
-
primary: "bg-
|
|
52
|
+
primary: "bg-foreground",
|
|
53
53
|
success: "bg-success",
|
|
54
54
|
warning: "bg-warning",
|
|
55
55
|
danger: "bg-danger",
|
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
export
|
|
2
|
+
export interface BreadcrumbsProps extends React.HTMLAttributes<HTMLElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Pin the trail to the top of its scroll container. While pinned and the
|
|
5
|
+
* content has scrolled beneath it, a hairline stroke fades in below the row
|
|
6
|
+
* to separate the header from the scrolled content (and clears at the top).
|
|
7
|
+
*/
|
|
8
|
+
sticky?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Render a leading back-arrow control before the trail (the standard ADS
|
|
11
|
+
* back affordance). Fires on click; give it an accessible label via
|
|
12
|
+
* `backLabel` if the default "Back" isn't right.
|
|
13
|
+
*/
|
|
14
|
+
onBack?: () => void;
|
|
15
|
+
backLabel?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Right-aligned controls rendered inside the trail row (page actions, an
|
|
18
|
+
* overflow menu) — they ride along when the trail is sticky.
|
|
19
|
+
*/
|
|
20
|
+
actions?: React.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Supporting metadata stitched inline right after the trail (schema name,
|
|
23
|
+
* sync status…). Muted, truncates before the trail does.
|
|
24
|
+
*/
|
|
25
|
+
meta?: React.ReactNode;
|
|
26
|
+
}
|
|
3
27
|
export declare const Breadcrumbs: React.ForwardRefExoticComponent<BreadcrumbsProps & React.RefAttributes<HTMLElement>>;
|
|
4
28
|
export interface BreadcrumbItemProps extends React.HTMLAttributes<HTMLLIElement> {
|
|
5
29
|
href?: string;
|
|
6
30
|
isCurrent?: boolean;
|
|
31
|
+
/** Leading glyph or avatar shown before the label (e.g. a source icon). */
|
|
32
|
+
icon?: React.ReactNode;
|
|
7
33
|
}
|
|
8
34
|
export declare const BreadcrumbItem: React.ForwardRefExoticComponent<BreadcrumbItemProps & React.RefAttributes<HTMLLIElement>>;
|