@actioneer/ads 1.0.4 → 1.0.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/DESIGN.md +75 -75
- package/README.md +205 -0
- package/components/ai-elements/agent-trace.js +14 -14
- package/components/ai-elements/chain-of-thought.js +3 -3
- package/components/ai-elements/chart.js +3 -3
- package/components/ai-elements/inline-citation.js +2 -2
- package/components/ai-elements/message.js +1 -1
- package/components/ai-elements/research-activity.js +4 -4
- package/components/answer-sources.js +3 -3
- package/components/answer.js +3 -3
- package/components/assistant-ui/action-bar.js +2 -2
- package/components/assistant-ui/attachment.js +5 -5
- package/components/assistant-ui/badge.js +1 -1
- package/components/assistant-ui/branch-picker.js +1 -1
- package/components/assistant-ui/composer-add-context.js +7 -7
- package/components/assistant-ui/composer-deep-research.js +3 -3
- package/components/assistant-ui/composer-harness.js +1 -1
- package/components/assistant-ui/composer-trigger-popover.js +8 -8
- package/components/assistant-ui/composer.js +45 -45
- package/components/assistant-ui/file.js +9 -9
- package/components/assistant-ui/image.js +1 -1
- package/components/assistant-ui/markdown-text.js +1 -1
- package/components/assistant-ui/message-timing.js +1 -1
- package/components/assistant-ui/reasoning.js +10 -10
- package/components/assistant-ui/thread.js +1 -1
- package/components/assistant-ui/tool-fallback.js +2 -2
- package/components/assistant-ui/tool-group.js +3 -3
- package/components/autocomplete.js +28 -27
- package/components/brand-loader.d.ts +1 -1
- package/components/brand-loader.js +9 -9
- package/components/chart.js +5 -5
- package/components/checkbox.js +16 -16
- package/components/chip.js +33 -33
- package/components/collapsible.js +14 -12
- package/components/command-palette.js +37 -37
- package/components/connector-card.js +1 -1
- package/components/date-range-picker.js +2 -2
- package/components/dropdown.js +1 -1
- package/components/field.js +1 -1
- package/components/file-dropzone.js +2 -2
- package/components/infinite-canvas.js +1 -1
- package/components/modal.js +6 -6
- package/components/pagination.js +23 -23
- package/components/radio.js +1 -1
- package/components/segmented.js +23 -23
- package/components/selection-action-bar.js +13 -13
- package/components/sidebar.js +5 -5
- package/components/stepper.d.ts +1 -1
- package/components/stepper.js +4 -4
- package/components/switch.js +7 -7
- package/components/tooltip.js +1 -1
- package/components/tree.js +20 -20
- package/components/ui/button.js +21 -21
- package/components/ui/tooltip.js +3 -3
- package/llms.txt +6 -6
- package/manifest.json +13 -13
- package/package.json +1 -1
- package/styles.css +49 -56
- package/theme.css +49 -56
|
@@ -8,7 +8,7 @@ import { MarkdownText as V } from "./markdown-text.js";
|
|
|
8
8
|
import { Collapsible as H, CollapsibleTrigger as $, CollapsibleContent as q } from "../collapsible.js";
|
|
9
9
|
import { cn as u } from "../../lib/cn.js";
|
|
10
10
|
import { TraceStateIcon as B } from "../ai-elements/chain-of-thought-icon.js";
|
|
11
|
-
const J = 200,
|
|
11
|
+
const J = 200, x = _(!1), K = D("aui-reasoning-root mb-4 w-full", {
|
|
12
12
|
variants: {
|
|
13
13
|
variant: {
|
|
14
14
|
outline: "rounded-lg border px-3 py-2",
|
|
@@ -53,11 +53,11 @@ function k({
|
|
|
53
53
|
K({ variant: n, className: a })
|
|
54
54
|
),
|
|
55
55
|
...l,
|
|
56
|
-
children: /* @__PURE__ */ r(
|
|
56
|
+
children: /* @__PURE__ */ r(x.Provider, { value: A, children: g })
|
|
57
57
|
}
|
|
58
58
|
);
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function h({
|
|
61
61
|
side: a = "bottom",
|
|
62
62
|
className: n,
|
|
63
63
|
...o
|
|
@@ -104,7 +104,7 @@ function C({
|
|
|
104
104
|
{
|
|
105
105
|
"data-slot": "reasoning-trigger",
|
|
106
106
|
className: u(
|
|
107
|
-
"aui-reasoning-trigger group/trigger text-muted-foreground hover:text-foreground flex max-w-[75%] origin-left items-center gap-2 py-1.5 text-
|
|
107
|
+
"aui-reasoning-trigger group/trigger text-muted-foreground hover:text-foreground flex max-w-[75%] origin-left items-center gap-2 py-1.5 text-s transition-[color,scale] active:scale-[0.98]",
|
|
108
108
|
o
|
|
109
109
|
),
|
|
110
110
|
...e,
|
|
@@ -165,7 +165,7 @@ function I({
|
|
|
165
165
|
children: n,
|
|
166
166
|
...o
|
|
167
167
|
}) {
|
|
168
|
-
const e = w(
|
|
168
|
+
const e = w(x);
|
|
169
169
|
return /* @__PURE__ */ d(
|
|
170
170
|
q,
|
|
171
171
|
{
|
|
@@ -178,9 +178,9 @@ function I({
|
|
|
178
178
|
),
|
|
179
179
|
...o,
|
|
180
180
|
children: [
|
|
181
|
-
/* @__PURE__ */ r(
|
|
181
|
+
/* @__PURE__ */ r(h, { side: "top" }),
|
|
182
182
|
n,
|
|
183
|
-
e ? /* @__PURE__ */ r(
|
|
183
|
+
e ? /* @__PURE__ */ r(h, {}) : null
|
|
184
184
|
]
|
|
185
185
|
}
|
|
186
186
|
);
|
|
@@ -190,7 +190,7 @@ function S({
|
|
|
190
190
|
children: n,
|
|
191
191
|
...o
|
|
192
192
|
}) {
|
|
193
|
-
const e = w(
|
|
193
|
+
const e = w(x), i = m(null), t = m(null);
|
|
194
194
|
return j(() => {
|
|
195
195
|
if (!e) return;
|
|
196
196
|
const g = i.current, l = t.current;
|
|
@@ -239,13 +239,13 @@ p.Root = k;
|
|
|
239
239
|
p.Trigger = C;
|
|
240
240
|
p.Content = I;
|
|
241
241
|
p.Text = S;
|
|
242
|
-
p.Fade =
|
|
242
|
+
p.Fade = h;
|
|
243
243
|
const X = T(W);
|
|
244
244
|
X.displayName = "ReasoningGroup";
|
|
245
245
|
export {
|
|
246
246
|
p as Reasoning,
|
|
247
247
|
I as ReasoningContent,
|
|
248
|
-
|
|
248
|
+
h as ReasoningFade,
|
|
249
249
|
X as ReasoningGroup,
|
|
250
250
|
k as ReasoningRoot,
|
|
251
251
|
S as ReasoningText,
|
|
@@ -75,7 +75,7 @@ const H = ({
|
|
|
75
75
|
w,
|
|
76
76
|
{
|
|
77
77
|
variant: "ghost",
|
|
78
|
-
className: "aui-thread-welcome-suggestion text-foreground hover:bg-muted border-border/60 h-auto gap-1.5 rounded-full border px-3.5 py-1.5
|
|
78
|
+
className: "aui-thread-welcome-suggestion text-foreground hover:bg-muted border-border/60 h-auto gap-1.5 rounded-full border px-3.5 py-1.5 font-normal whitespace-nowrap transition-colors",
|
|
79
79
|
children: [
|
|
80
80
|
/* @__PURE__ */ e(s.Title, { className: "aui-thread-welcome-suggestion-text-1" }),
|
|
81
81
|
/* @__PURE__ */ e(s.Description, { className: "aui-thread-welcome-suggestion-text-2 empty:hidden" })
|
|
@@ -58,7 +58,7 @@ function Q({
|
|
|
58
58
|
{
|
|
59
59
|
"data-slot": "tool-fallback-duration",
|
|
60
60
|
className: c(
|
|
61
|
-
"aui-tool-fallback-duration text-muted-foreground text-
|
|
61
|
+
"aui-tool-fallback-duration text-muted-foreground text-s tabular-nums",
|
|
62
62
|
e
|
|
63
63
|
),
|
|
64
64
|
...l,
|
|
@@ -78,7 +78,7 @@ function R({
|
|
|
78
78
|
{
|
|
79
79
|
"data-slot": "tool-fallback-trigger",
|
|
80
80
|
className: c(
|
|
81
|
-
"aui-tool-fallback-trigger group/trigger text-muted-foreground hover:text-foreground flex w-fit origin-left items-center gap-2 py-1.5 text-
|
|
81
|
+
"aui-tool-fallback-trigger group/trigger text-muted-foreground hover:text-foreground flex w-fit origin-left items-center gap-2 py-1.5 text-s transition-[color,scale] active:scale-[0.98]",
|
|
82
82
|
a
|
|
83
83
|
),
|
|
84
84
|
...n,
|
|
@@ -63,7 +63,7 @@ function v({
|
|
|
63
63
|
{
|
|
64
64
|
"data-slot": "tool-group-trigger",
|
|
65
65
|
className: l(
|
|
66
|
-
"aui-tool-group-trigger group/trigger flex origin-left items-center gap-2 text-
|
|
66
|
+
"aui-tool-group-trigger group/trigger flex origin-left items-center gap-2 text-s transition-[color,scale] active:scale-[0.98]",
|
|
67
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",
|
|
68
68
|
"group-data-[variant=outline]/tool-group-root:w-full group-data-[variant=outline]/tool-group-root:px-4",
|
|
69
69
|
"group-data-[variant=muted]/tool-group-root:w-full group-data-[variant=muted]/tool-group-root:px-4",
|
|
@@ -92,13 +92,13 @@ function v({
|
|
|
92
92
|
"group-data-[variant=muted]/tool-group-root:grow"
|
|
93
93
|
),
|
|
94
94
|
children: [
|
|
95
|
-
/* @__PURE__ */ t("span", { className: "text-
|
|
95
|
+
/* @__PURE__ */ t("span", { className: "text-s", children: n }),
|
|
96
96
|
o && /* @__PURE__ */ t(
|
|
97
97
|
"span",
|
|
98
98
|
{
|
|
99
99
|
"aria-hidden": !0,
|
|
100
100
|
"data-slot": "tool-group-trigger-shimmer",
|
|
101
|
-
className: "aui-tool-group-trigger-shimmer shimmer pointer-events-none absolute inset-0 text-
|
|
101
|
+
className: "aui-tool-group-trigger-shimmer shimmer pointer-events-none absolute inset-0 text-s motion-reduce:animate-none",
|
|
102
102
|
children: n
|
|
103
103
|
}
|
|
104
104
|
)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as x, jsx as c } from "react/jsx-runtime";
|
|
3
|
-
import * as
|
|
3
|
+
import * as i from "react";
|
|
4
4
|
import { MotionConfig as z, AnimatePresence as q, motion as O } from "motion/react";
|
|
5
5
|
import { Search as P, Check as B } from "../lib/icons.js";
|
|
6
6
|
import { cn as y } from "../lib/cn.js";
|
|
7
7
|
import { inputBaseClass as F } from "./field.js";
|
|
8
8
|
import { floatVariants as K } from "../lib/motion.js";
|
|
9
9
|
import { Ripple as Q } from "./ripple.js";
|
|
10
|
-
const T =
|
|
10
|
+
const T = i.forwardRef(
|
|
11
11
|
({
|
|
12
12
|
items: u,
|
|
13
13
|
value: f,
|
|
@@ -20,36 +20,36 @@ const T = o.forwardRef(
|
|
|
20
20
|
id: I,
|
|
21
21
|
"aria-describedby": M
|
|
22
22
|
}, L) => {
|
|
23
|
-
const d = u.find((e) => e.value === f), [m, h] =
|
|
24
|
-
|
|
23
|
+
const d = u.find((e) => e.value === f), [m, h] = i.useState((d == null ? void 0 : d.label) ?? ""), [r, a] = i.useState(!1), [n, w] = i.useState(-1), N = i.useRef(null), k = i.useRef(null), b = i.useId();
|
|
24
|
+
i.useEffect(() => {
|
|
25
25
|
h((d == null ? void 0 : d.label) ?? (p ? f ?? "" : ""));
|
|
26
26
|
}, [d, f, p]);
|
|
27
|
-
const
|
|
27
|
+
const l = i.useMemo(() => {
|
|
28
28
|
const e = m.trim().toLowerCase();
|
|
29
29
|
return e ? u.filter((t) => t.label.toLowerCase().includes(e)) : u;
|
|
30
30
|
}, [u, m]);
|
|
31
|
-
|
|
31
|
+
i.useEffect(() => {
|
|
32
32
|
if (!r) return;
|
|
33
33
|
const e = (t) => {
|
|
34
|
-
var
|
|
35
|
-
(
|
|
34
|
+
var o;
|
|
35
|
+
(o = N.current) != null && o.contains(t.target) || a(!1);
|
|
36
36
|
};
|
|
37
37
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
38
|
-
}, [r]),
|
|
38
|
+
}, [r]), i.useEffect(() => {
|
|
39
39
|
var t;
|
|
40
|
-
if (!r ||
|
|
41
|
-
const e = (t = k.current) == null ? void 0 : t.children[
|
|
40
|
+
if (!r || n < 0) return;
|
|
41
|
+
const e = (t = k.current) == null ? void 0 : t.children[n];
|
|
42
42
|
e == null || e.scrollIntoView({ block: "nearest" });
|
|
43
|
-
}, [r,
|
|
43
|
+
}, [r, n]);
|
|
44
44
|
const g = (e) => {
|
|
45
|
-
|
|
46
|
-
let
|
|
47
|
-
for (let v = 0; v <
|
|
48
|
-
if (
|
|
45
|
+
l.length !== 0 && w((t) => {
|
|
46
|
+
let o = t;
|
|
47
|
+
for (let v = 0; v < l.length; v++)
|
|
48
|
+
if (o = (o + e + l.length) % l.length, !l[o].disabled) return o;
|
|
49
49
|
return t;
|
|
50
50
|
});
|
|
51
51
|
}, D = (e) => {
|
|
52
|
-
const t =
|
|
52
|
+
const t = l[e];
|
|
53
53
|
!t || t.disabled || (s == null || s(t.value), h(t.label), a(!1));
|
|
54
54
|
}, $ = (e) => {
|
|
55
55
|
switch (e.key) {
|
|
@@ -60,7 +60,7 @@ const T = o.forwardRef(
|
|
|
60
60
|
e.preventDefault(), r ? g(-1) : a(!0);
|
|
61
61
|
break;
|
|
62
62
|
case "Enter":
|
|
63
|
-
r &&
|
|
63
|
+
r && n >= 0 ? (e.preventDefault(), D(n)) : p && (s == null || s(m), a(!1));
|
|
64
64
|
break;
|
|
65
65
|
case "Escape":
|
|
66
66
|
r && (e.preventDefault(), a(!1));
|
|
@@ -91,7 +91,7 @@ const T = o.forwardRef(
|
|
|
91
91
|
"aria-haspopup": "listbox",
|
|
92
92
|
"aria-expanded": r,
|
|
93
93
|
"aria-controls": b,
|
|
94
|
-
"aria-activedescendant": r &&
|
|
94
|
+
"aria-activedescendant": r && n >= 0 ? `${b}-opt-${n}` : void 0,
|
|
95
95
|
"aria-invalid": R || void 0,
|
|
96
96
|
"aria-describedby": M,
|
|
97
97
|
disabled: E,
|
|
@@ -123,34 +123,35 @@ const T = o.forwardRef(
|
|
|
123
123
|
),
|
|
124
124
|
children: [
|
|
125
125
|
/* @__PURE__ */ c(Q, { origin: "top" }),
|
|
126
|
-
|
|
126
|
+
l.length === 0 ? /* @__PURE__ */ c(
|
|
127
127
|
"li",
|
|
128
128
|
{
|
|
129
129
|
role: "presentation",
|
|
130
|
-
className: "px-2 py-6 text-center text-
|
|
130
|
+
className: "px-2 py-6 text-center text-s text-muted-foreground",
|
|
131
131
|
children: "No results"
|
|
132
132
|
}
|
|
133
|
-
) :
|
|
134
|
-
const
|
|
133
|
+
) : l.map((e, t) => {
|
|
134
|
+
const o = e.value === f, v = t === n;
|
|
135
135
|
return /* @__PURE__ */ x(
|
|
136
136
|
"li",
|
|
137
137
|
{
|
|
138
138
|
id: `${b}-opt-${t}`,
|
|
139
139
|
role: "option",
|
|
140
|
-
"aria-selected":
|
|
140
|
+
"aria-selected": o,
|
|
141
141
|
"aria-disabled": e.disabled || void 0,
|
|
142
142
|
onMouseEnter: () => !e.disabled && w(t),
|
|
143
143
|
onMouseDown: (j) => j.preventDefault(),
|
|
144
144
|
onClick: () => D(t),
|
|
145
145
|
className: y(
|
|
146
146
|
"flex cursor-pointer items-center justify-between gap-2",
|
|
147
|
-
"rounded-sm px-2 py-1.5 text-
|
|
148
|
-
v && !e.disabled && "bg-
|
|
147
|
+
"rounded-sm px-2 py-1.5 text-m text-foreground select-none",
|
|
148
|
+
v && !e.disabled && "bg-action-primary-soft text-brand-text",
|
|
149
|
+
o && "text-brand-text",
|
|
149
150
|
e.disabled && "pointer-events-none opacity-50"
|
|
150
151
|
),
|
|
151
152
|
children: [
|
|
152
153
|
/* @__PURE__ */ c("span", { className: "truncate", children: e.label }),
|
|
153
|
-
|
|
154
|
+
o && /* @__PURE__ */ c(B, { className: "size-4 shrink-0", "aria-hidden": !0 })
|
|
154
155
|
]
|
|
155
156
|
},
|
|
156
157
|
e.value
|
|
@@ -7,7 +7,7 @@ export interface BrandMarkProps extends React.SVGProps<SVGSVGElement> {
|
|
|
7
7
|
* BrandMark — the growth mark as a static logo that comes alive on hover:
|
|
8
8
|
* while the wrapping `group/brand` link is hovered, the nine cells dim and
|
|
9
9
|
* shrink in the brand film's staggered blip loop (rest state is the solid
|
|
10
|
-
* mark).
|
|
10
|
+
* mark). Defaults to brand teal; size with a `size-*` class. Keyframes +
|
|
11
11
|
* reduced-motion handling live in `src/styles/index.css` (`.ads-mark-cell`).
|
|
12
12
|
*/
|
|
13
13
|
export declare function BrandMark({ className, hoverAnimate, ...props }: BrandMarkProps): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import { cn as
|
|
4
|
-
const
|
|
3
|
+
import { cn as H } from "../lib/cn.js";
|
|
4
|
+
const t = [
|
|
5
5
|
{ d: "M31.1845 32.5508C31.1845 33.1031 30.7368 33.5508 30.1845 33.5508H1.00104C0.287428 33.5508 -0.196523 32.8248 0.0779916 32.1661L13.2269 0.615317C13.3822 0.242707 13.7463 0 14.15 0H30.1845C30.7368 0 31.1845 0.447715 31.1845 1V32.5508Z", delay: 0.55 },
|
|
6
6
|
{ d: "M68.4648 32.5508C68.4648 33.1031 68.0171 33.5508 67.4648 33.5508H38.3042C37.5846 33.5508 37.1006 32.8136 37.3866 32.1533L51.0553 0.602474C51.2138 0.236721 51.5743 0 51.9729 0H67.4648C68.0171 0 68.4648 0.447715 68.4648 1V32.5508Z", delay: 0.1 },
|
|
7
7
|
{ d: "M103.87 32.5508C103.87 33.1031 103.422 33.5508 102.87 33.5508H73.7702C73.0352 33.5508 72.5514 32.7845 72.8673 32.1209L87.8906 0.570086C88.0564 0.221833 88.4078 0 88.7935 0H102.87C103.422 0 103.87 0.447715 103.87 1V32.5508Z", delay: 0.8 },
|
|
@@ -11,8 +11,8 @@ const s = [
|
|
|
11
11
|
{ d: "M30.6757 104.001C30.6757 104.553 30.228 105.001 29.6757 105.001H1.70344C0.797433 105.001 0.358418 103.893 1.01872 103.272L24.0355 81.6472C24.2209 81.473 24.4658 81.376 24.7202 81.376H29.6757C30.228 81.376 30.6757 81.8237 30.6757 82.376V104.001Z", delay: 0.2 },
|
|
12
12
|
{ d: "M67.4287 104.001C67.4287 104.553 66.9809 105.001 66.4287 105.001H38.2664C37.387 105.001 36.9358 103.948 37.5426 103.311L58.1566 81.686C58.3453 81.488 58.6069 81.376 58.8804 81.376H66.4287C66.9809 81.376 67.4287 81.8237 67.4287 82.376V104.001Z", delay: 0.9 },
|
|
13
13
|
{ d: "M104.182 104.001C104.182 104.553 103.734 105.001 103.182 105.001H74.834C73.9838 105.001 73.5214 104.007 74.0691 103.357L92.2803 81.7318C92.4704 81.5062 92.7503 81.376 93.0452 81.376H103.182C103.734 81.376 104.182 81.8237 104.182 82.376V104.001Z", delay: 0.45 }
|
|
14
|
-
],
|
|
15
|
-
function
|
|
14
|
+
], s = [0.26, 0.13, 0, 0.39, 0.26, 0.13, 0.52, 0.39, 0.26];
|
|
15
|
+
function o({
|
|
16
16
|
className: a,
|
|
17
17
|
hoverAnimate: C = !0,
|
|
18
18
|
...l
|
|
@@ -22,15 +22,15 @@ function i({
|
|
|
22
22
|
{
|
|
23
23
|
viewBox: "0 0 105 105",
|
|
24
24
|
"aria-hidden": !0,
|
|
25
|
-
className:
|
|
25
|
+
className: H("shrink-0 text-brand", a),
|
|
26
26
|
...l,
|
|
27
|
-
children:
|
|
27
|
+
children: t.map(({ d: r }, d) => /* @__PURE__ */ e(
|
|
28
28
|
"path",
|
|
29
29
|
{
|
|
30
|
-
d:
|
|
30
|
+
d: r,
|
|
31
31
|
fill: "currentColor",
|
|
32
32
|
className: C ? "ads-mark-cell" : void 0,
|
|
33
|
-
style: C ? { "--blip-delay": `${
|
|
33
|
+
style: C ? { "--blip-delay": `${s[d]}s` } : void 0
|
|
34
34
|
},
|
|
35
35
|
d
|
|
36
36
|
))
|
|
@@ -38,5 +38,5 @@ function i({
|
|
|
38
38
|
);
|
|
39
39
|
}
|
|
40
40
|
export {
|
|
41
|
-
|
|
41
|
+
o as BrandMark
|
|
42
42
|
};
|
package/components/chart.js
CHANGED
|
@@ -6,7 +6,7 @@ import { MotionConfig as We, AnimatePresence as ze, motion as _e } from "motion/
|
|
|
6
6
|
import { cn as $ } from "../lib/cn.js";
|
|
7
7
|
import { floatVariants as je } from "../lib/motion.js";
|
|
8
8
|
const U = (t) => `var(--color-chart-${t % 6 + 1})`, ee = (t) => U(t), ne = "var(--chart-context)", me = { fillOpacity: "var(--chart-active-bar-opacity)" }, Y = 2.5, He = 2.5, W = {
|
|
9
|
-
primary: { ref: "var(--brand)", pill: "bg-
|
|
9
|
+
primary: { ref: "var(--brand)", pill: "bg-action-primary-soft text-brand-text" },
|
|
10
10
|
success: { ref: "var(--color-success-600)", pill: "bg-success-50 text-success-700" },
|
|
11
11
|
warning: { ref: "var(--color-warning-500)", pill: "bg-warning-50 text-warning-700" },
|
|
12
12
|
danger: { ref: "var(--color-danger-500)", pill: "bg-danger-50 text-danger-700" },
|
|
@@ -190,7 +190,7 @@ function Ue({
|
|
|
190
190
|
y: n,
|
|
191
191
|
dy: "0.35em",
|
|
192
192
|
textAnchor: "middle",
|
|
193
|
-
className: "pointer-events-none fill-brand-foreground text-
|
|
193
|
+
className: "pointer-events-none fill-brand-foreground text-s font-medium select-none",
|
|
194
194
|
children: a
|
|
195
195
|
}
|
|
196
196
|
)
|
|
@@ -221,7 +221,7 @@ function Ye({ hovered: t, frameWidth: n, format: a }) {
|
|
|
221
221
|
"span",
|
|
222
222
|
{
|
|
223
223
|
"aria-hidden": !0,
|
|
224
|
-
className: "flex size-4.5 shrink-0 items-center justify-center rounded-full text-
|
|
224
|
+
className: "flex size-4.5 shrink-0 items-center justify-center rounded-full text-s font-medium text-brand-foreground",
|
|
225
225
|
style: { background: W[t.ann.color ?? "primary"].ref },
|
|
226
226
|
children: t.n
|
|
227
227
|
}
|
|
@@ -326,7 +326,7 @@ function X({
|
|
|
326
326
|
"aria-label": `Toggle ${r.label} series`,
|
|
327
327
|
onClick: () => i(r.key),
|
|
328
328
|
className: $(
|
|
329
|
-
"inline-flex cursor-pointer items-center gap-1.5 rounded-sm text-
|
|
329
|
+
"inline-flex cursor-pointer items-center gap-1.5 rounded-sm text-s outline-none",
|
|
330
330
|
"transition-colors duration-150 ease-out motion-reduce:transition-none",
|
|
331
331
|
"focus-visible:ring-2 focus-visible:ring-ring",
|
|
332
332
|
r.hidden ? "text-tertiary" : "text-secondary hover:text-foreground"
|
|
@@ -347,7 +347,7 @@ function X({
|
|
|
347
347
|
]
|
|
348
348
|
},
|
|
349
349
|
r.label
|
|
350
|
-
) : /* @__PURE__ */ A("span", { className: "inline-flex items-center gap-1.5 text-
|
|
350
|
+
) : /* @__PURE__ */ A("span", { className: "inline-flex items-center gap-1.5 text-s text-secondary", children: [
|
|
351
351
|
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "size-2 rounded-dot", style: { background: r.color } }),
|
|
352
352
|
r.label
|
|
353
353
|
] }, r.label)
|
package/components/checkbox.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as v, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import * as t from "react";
|
|
4
|
-
import { motion as
|
|
4
|
+
import { motion as h, MotionConfig as w, AnimatePresence as C } from "motion/react";
|
|
5
5
|
import { Check as M, Minus as N } from "../lib/icons.js";
|
|
6
6
|
import { cn as p } from "../lib/cn.js";
|
|
7
7
|
import { Field as z } from "./field.js";
|
|
8
8
|
import { checkDrawTransition as b } from "../lib/motion.js";
|
|
9
|
-
const R =
|
|
9
|
+
const R = h.create(M), j = h.create(N), G = {
|
|
10
10
|
sm: "size-4 [&_svg]:size-3",
|
|
11
11
|
md: "size-4.5 [&_svg]:size-3.5"
|
|
12
12
|
}, I = t.forwardRef(
|
|
13
13
|
({
|
|
14
|
-
className:
|
|
14
|
+
className: s,
|
|
15
15
|
children: o,
|
|
16
16
|
indeterminate: r = !1,
|
|
17
17
|
size: l = "md",
|
|
@@ -19,32 +19,32 @@ const R = x.create(M), j = x.create(N), G = {
|
|
|
19
19
|
checked: n,
|
|
20
20
|
defaultChecked: d = !1,
|
|
21
21
|
onChange: i,
|
|
22
|
-
...
|
|
22
|
+
...x
|
|
23
23
|
}, k) => {
|
|
24
|
-
const
|
|
25
|
-
return t.useImperativeHandle(k, () =>
|
|
26
|
-
|
|
24
|
+
const a = t.useRef(null), m = n !== void 0, [g, y] = t.useState(d), f = m ? n : g;
|
|
25
|
+
return t.useImperativeHandle(k, () => a.current), t.useEffect(() => {
|
|
26
|
+
a.current && (a.current.indeterminate = r);
|
|
27
27
|
}, [r]), /* @__PURE__ */ v(
|
|
28
28
|
"label",
|
|
29
29
|
{
|
|
30
30
|
className: p(
|
|
31
|
-
"group inline-flex items-center gap-2 text-
|
|
31
|
+
"group inline-flex items-center gap-2 text-m text-foreground select-none",
|
|
32
32
|
c ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
33
|
-
|
|
33
|
+
s
|
|
34
34
|
),
|
|
35
35
|
children: [
|
|
36
36
|
/* @__PURE__ */ e(
|
|
37
37
|
"input",
|
|
38
38
|
{
|
|
39
|
-
ref:
|
|
39
|
+
ref: a,
|
|
40
40
|
type: "checkbox",
|
|
41
41
|
disabled: c,
|
|
42
|
-
checked:
|
|
42
|
+
checked: f,
|
|
43
43
|
onChange: (u) => {
|
|
44
|
-
|
|
44
|
+
m || y(u.target.checked), i == null || i(u);
|
|
45
45
|
},
|
|
46
46
|
className: "peer sr-only",
|
|
47
|
-
...
|
|
47
|
+
...x
|
|
48
48
|
}
|
|
49
49
|
),
|
|
50
50
|
/* @__PURE__ */ e(
|
|
@@ -59,7 +59,7 @@ const R = x.create(M), j = x.create(N), G = {
|
|
|
59
59
|
"peer-focus-visible:ring-3 peer-focus-visible:ring-ring",
|
|
60
60
|
G[l]
|
|
61
61
|
),
|
|
62
|
-
children: /* @__PURE__ */ e(w, { reducedMotion: "user", children: /* @__PURE__ */ e(C, { initial: !1, mode: "wait", children: (
|
|
62
|
+
children: /* @__PURE__ */ e(w, { reducedMotion: "user", children: /* @__PURE__ */ e(C, { initial: !1, mode: "wait", children: (f || r) && (r ? /* @__PURE__ */ e(
|
|
63
63
|
j,
|
|
64
64
|
{
|
|
65
65
|
initial: { opacity: 0, scale: 0.9 },
|
|
@@ -90,7 +90,7 @@ const R = x.create(M), j = x.create(N), G = {
|
|
|
90
90
|
);
|
|
91
91
|
I.displayName = "Checkbox";
|
|
92
92
|
const S = t.forwardRef(
|
|
93
|
-
({ className:
|
|
93
|
+
({ className: s, label: o, description: r, error: l, orientation: c = "vertical", children: n, ...d }, i) => /* @__PURE__ */ e(
|
|
94
94
|
z,
|
|
95
95
|
{
|
|
96
96
|
ref: i,
|
|
@@ -98,7 +98,7 @@ const S = t.forwardRef(
|
|
|
98
98
|
description: r,
|
|
99
99
|
error: l,
|
|
100
100
|
role: "group",
|
|
101
|
-
className:
|
|
101
|
+
className: s,
|
|
102
102
|
...d,
|
|
103
103
|
children: /* @__PURE__ */ e(
|
|
104
104
|
"div",
|
package/components/chip.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as x, Fragment as h, jsx as
|
|
3
|
-
import * as
|
|
2
|
+
import { jsxs as x, Fragment as h, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import * as y from "react";
|
|
4
4
|
import { cva as N } from "class-variance-authority";
|
|
5
|
-
import { Close as
|
|
5
|
+
import { Close as w } from "../lib/icons.js";
|
|
6
6
|
import { cn as i } from "../lib/cn.js";
|
|
7
7
|
const k = N(
|
|
8
8
|
"inline-flex h-6 items-center gap-1 whitespace-nowrap rounded-[4px] border px-2 py-0 text-s font-medium leading-[var(--text-s--line-height)]",
|
|
@@ -24,14 +24,14 @@ const k = N(
|
|
|
24
24
|
compoundVariants: [
|
|
25
25
|
// solid — the default tinted surface
|
|
26
26
|
{ variant: "solid", color: "default", className: "border-wg6 bg-wg2 text-muted-foreground" },
|
|
27
|
-
{ variant: "solid", color: "primary", className: "border-
|
|
27
|
+
{ variant: "solid", color: "primary", className: "border-brand bg-action-primary-soft text-brand-text" },
|
|
28
28
|
{ variant: "solid", color: "success", className: "border-success-400 bg-success-50 text-success-700" },
|
|
29
29
|
{ variant: "solid", color: "warning", className: "border-warning-300 bg-warning-50 text-warning-700" },
|
|
30
30
|
{ variant: "solid", color: "danger", className: "border-danger-300 bg-danger-50 text-danger-700" },
|
|
31
31
|
{ variant: "solid", color: "info", className: "border-info-300 bg-info-50 text-info-700" },
|
|
32
32
|
// outline
|
|
33
33
|
{ variant: "outline", color: "default", className: "border-border-strong bg-card text-foreground" },
|
|
34
|
-
{ variant: "outline", color: "primary", className: "border-
|
|
34
|
+
{ variant: "outline", color: "primary", className: "border-brand bg-card text-brand-text" },
|
|
35
35
|
{ variant: "outline", color: "success", className: "border-success-400 bg-success-50 text-success-700" },
|
|
36
36
|
{ variant: "outline", color: "warning", className: "border-warning-400 bg-warning-50 text-warning-700" },
|
|
37
37
|
{ variant: "outline", color: "danger", className: "border-danger-400 bg-danger-50 text-danger-700" },
|
|
@@ -41,63 +41,63 @@ const k = N(
|
|
|
41
41
|
}
|
|
42
42
|
), z = {
|
|
43
43
|
default: "bg-muted-foreground",
|
|
44
|
-
primary: "bg-
|
|
44
|
+
primary: "bg-brand",
|
|
45
45
|
success: "bg-success",
|
|
46
46
|
warning: "bg-warning",
|
|
47
47
|
danger: "bg-danger",
|
|
48
48
|
info: "bg-info"
|
|
49
|
-
}, j =
|
|
49
|
+
}, j = y.forwardRef(
|
|
50
50
|
({
|
|
51
|
-
className:
|
|
52
|
-
variant:
|
|
53
|
-
color:
|
|
54
|
-
interaction:
|
|
55
|
-
isPressable:
|
|
56
|
-
onClose:
|
|
57
|
-
startContent:
|
|
58
|
-
avatar:
|
|
51
|
+
className: g,
|
|
52
|
+
variant: u = "solid",
|
|
53
|
+
color: t = "default",
|
|
54
|
+
interaction: m,
|
|
55
|
+
isPressable: f = !1,
|
|
56
|
+
onClose: e,
|
|
57
|
+
startContent: o,
|
|
58
|
+
avatar: r,
|
|
59
59
|
showDot: p = !1,
|
|
60
60
|
children: v,
|
|
61
61
|
...s
|
|
62
62
|
}, c) => {
|
|
63
|
-
const n =
|
|
64
|
-
k({ variant:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
l && "cursor-pointer select-none shadow-100 outline-none transition-[background,border,color,box-shadow,transform] duration-150 ease-out data-[interaction=actionable]:border-action-primary data-[interaction=actionable]:bg-card data-[interaction=actionable]:text-action-primary-text hover:-translate-y-px hover:bg-action-primary-soft hover:shadow-200 active:translate-y-0 active:scale-[0.97] active:bg-action-primary-soft aria-pressed:border-
|
|
68
|
-
|
|
69
|
-
),
|
|
70
|
-
|
|
71
|
-
p && /* @__PURE__ */
|
|
63
|
+
const n = e ? "actionable" : m ?? (f ? "actionable" : "non-actionable"), l = n === "actionable" && !e, d = i(
|
|
64
|
+
k({ variant: u, color: t }),
|
|
65
|
+
r && "pl-1",
|
|
66
|
+
e && "pr-1.5",
|
|
67
|
+
l && "cursor-pointer select-none shadow-100 outline-none transition-[background,border,color,box-shadow,transform] duration-150 ease-out data-[interaction=actionable]:border-action-primary data-[interaction=actionable]:bg-card data-[interaction=actionable]:text-action-primary-text hover:-translate-y-px hover:bg-action-primary-soft hover:shadow-200 active:translate-y-0 active:scale-[0.97] active:bg-action-primary-soft aria-pressed:border-brand! aria-pressed:bg-action-primary-soft! aria-pressed:text-brand-text! focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background motion-reduce:transition-none motion-reduce:hover:translate-y-0 motion-reduce:active:scale-100",
|
|
68
|
+
g
|
|
69
|
+
), b = /* @__PURE__ */ x(h, { children: [
|
|
70
|
+
r && /* @__PURE__ */ a("span", { className: "-ml-0.5 inline-flex shrink-0", children: r }),
|
|
71
|
+
p && /* @__PURE__ */ a(
|
|
72
72
|
"span",
|
|
73
73
|
{
|
|
74
74
|
"aria-hidden": !0,
|
|
75
75
|
className: i(
|
|
76
76
|
"size-1.5",
|
|
77
77
|
"rounded-dot",
|
|
78
|
-
z[
|
|
78
|
+
z[t ?? "default"]
|
|
79
79
|
)
|
|
80
80
|
}
|
|
81
81
|
),
|
|
82
|
-
|
|
82
|
+
o && /* @__PURE__ */ a("span", { className: "inline-flex shrink-0 [&_svg]:size-3.5", children: o }),
|
|
83
83
|
v,
|
|
84
|
-
|
|
84
|
+
e && /* @__PURE__ */ a(
|
|
85
85
|
"button",
|
|
86
86
|
{
|
|
87
87
|
type: "button",
|
|
88
88
|
"aria-label": "Remove",
|
|
89
|
-
onClick:
|
|
89
|
+
onClick: e,
|
|
90
90
|
className: i(
|
|
91
91
|
"inline-flex size-4 shrink-0 items-center justify-center rounded-full",
|
|
92
92
|
"opacity-60 transition-opacity hover:opacity-100",
|
|
93
93
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
94
94
|
"[&_svg]:size-3"
|
|
95
95
|
),
|
|
96
|
-
children: /* @__PURE__ */
|
|
96
|
+
children: /* @__PURE__ */ a(w, { "aria-hidden": !0 })
|
|
97
97
|
}
|
|
98
98
|
)
|
|
99
99
|
] });
|
|
100
|
-
return l ? /* @__PURE__ */
|
|
100
|
+
return l ? /* @__PURE__ */ a(
|
|
101
101
|
"button",
|
|
102
102
|
{
|
|
103
103
|
ref: c,
|
|
@@ -105,16 +105,16 @@ const k = N(
|
|
|
105
105
|
"data-interaction": n,
|
|
106
106
|
className: d,
|
|
107
107
|
...s,
|
|
108
|
-
children:
|
|
108
|
+
children: b
|
|
109
109
|
}
|
|
110
|
-
) : /* @__PURE__ */
|
|
110
|
+
) : /* @__PURE__ */ a(
|
|
111
111
|
"span",
|
|
112
112
|
{
|
|
113
113
|
ref: c,
|
|
114
114
|
"data-interaction": n,
|
|
115
115
|
className: d,
|
|
116
116
|
...s,
|
|
117
|
-
children:
|
|
117
|
+
children: b
|
|
118
118
|
}
|
|
119
119
|
);
|
|
120
120
|
}
|
|
@@ -4,38 +4,40 @@ import * as t from "react";
|
|
|
4
4
|
import { Collapsible as r } from "radix-ui";
|
|
5
5
|
import { MotionConfig as u, AnimatePresence as g, motion as h } from "motion/react";
|
|
6
6
|
import { springDisclosure as y } from "../lib/motion.js";
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
import { cn as x } from "../lib/cn.js";
|
|
8
|
+
const m = t.createContext(!1), v = t.forwardRef(({ children: o, open: i, defaultOpen: a = !1, onOpenChange: e, ...s }, n) => {
|
|
9
|
+
const c = i !== void 0, [f, C] = t.useState(a), p = c ? i : f, b = t.useCallback(
|
|
9
10
|
(d) => {
|
|
10
|
-
c ||
|
|
11
|
+
c || C(d), e == null || e(d);
|
|
11
12
|
},
|
|
12
13
|
[c, e]
|
|
13
14
|
);
|
|
14
|
-
return /* @__PURE__ */ l(
|
|
15
|
+
return /* @__PURE__ */ l(m.Provider, { value: p, children: /* @__PURE__ */ l(
|
|
15
16
|
r.Root,
|
|
16
17
|
{
|
|
17
18
|
ref: n,
|
|
18
19
|
"data-slot": "collapsible",
|
|
19
20
|
open: p,
|
|
20
|
-
onOpenChange:
|
|
21
|
+
onOpenChange: b,
|
|
21
22
|
...s,
|
|
22
23
|
children: o
|
|
23
24
|
}
|
|
24
25
|
) });
|
|
25
26
|
});
|
|
26
27
|
v.displayName = "Collapsible";
|
|
27
|
-
const
|
|
28
|
+
const N = t.forwardRef(({ className: o, children: i, ...a }, e) => /* @__PURE__ */ l(
|
|
28
29
|
r.CollapsibleTrigger,
|
|
29
30
|
{
|
|
30
|
-
ref:
|
|
31
|
+
ref: e,
|
|
31
32
|
"data-slot": "collapsible-trigger",
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
className: x("text-m", o),
|
|
34
|
+
...a,
|
|
35
|
+
children: i
|
|
34
36
|
}
|
|
35
37
|
));
|
|
36
|
-
|
|
38
|
+
N.displayName = "CollapsibleTrigger";
|
|
37
39
|
const R = t.forwardRef(({ children: o, asChild: i, forceMount: a, ...e }, s) => {
|
|
38
|
-
const n = t.useContext(
|
|
40
|
+
const n = t.useContext(m);
|
|
39
41
|
return i ? /* @__PURE__ */ l(
|
|
40
42
|
r.CollapsibleContent,
|
|
41
43
|
{
|
|
@@ -71,5 +73,5 @@ R.displayName = "CollapsibleContent";
|
|
|
71
73
|
export {
|
|
72
74
|
v as Collapsible,
|
|
73
75
|
R as CollapsibleContent,
|
|
74
|
-
|
|
76
|
+
N as CollapsibleTrigger
|
|
75
77
|
};
|