@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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as u, jsx as a } from "react/jsx-runtime";
|
|
3
3
|
import * as o from "react";
|
|
4
4
|
import { createPortal as S } from "react-dom";
|
|
5
5
|
import { Search as q } from "../lib/icons.js";
|
|
6
|
-
import { cn as
|
|
6
|
+
import { cn as v } from "../lib/cn.js";
|
|
7
7
|
import { Ripple as C } from "./ripple.js";
|
|
8
8
|
const F = (s, i) => `${s.label} ${s.keywords ?? ""}`.toLowerCase().includes(i);
|
|
9
9
|
function L({
|
|
@@ -14,44 +14,44 @@ function L({
|
|
|
14
14
|
placeholder: $ = "Search…",
|
|
15
15
|
emptyLabel: A = "No results",
|
|
16
16
|
"aria-label": D = "Global search",
|
|
17
|
-
filter:
|
|
17
|
+
filter: y = F,
|
|
18
18
|
className: E
|
|
19
19
|
}) {
|
|
20
|
-
const f = o.useId(),
|
|
20
|
+
const f = o.useId(), b = o.useRef(null), g = o.useRef(null), w = o.useRef(null), [m, N] = o.useState(""), [c, x] = o.useState(0), l = o.useMemo(() => {
|
|
21
21
|
const e = m.trim().toLowerCase();
|
|
22
|
-
return e ? p.filter((r) =>
|
|
23
|
-
}, [p, m,
|
|
22
|
+
return e ? p.filter((r) => y(r, e)) : [...p];
|
|
23
|
+
}, [p, m, y]), M = o.useMemo(() => {
|
|
24
24
|
const e = [], r = /* @__PURE__ */ new Map();
|
|
25
|
-
for (const t of
|
|
25
|
+
for (const t of l)
|
|
26
26
|
r.has(t.group) || (r.set(t.group, []), e.push(t.group)), r.get(t.group).push(t);
|
|
27
27
|
return e.map((t) => ({ group: t, items: r.get(t) }));
|
|
28
|
-
}, [
|
|
28
|
+
}, [l]), d = l[c];
|
|
29
29
|
o.useEffect(() => {
|
|
30
30
|
x(0);
|
|
31
31
|
}, [m, s]), o.useEffect(() => {
|
|
32
32
|
if (!s) return;
|
|
33
|
-
|
|
33
|
+
w.current = document.activeElement, N("");
|
|
34
34
|
const e = document.body.style.overflow;
|
|
35
35
|
document.body.style.overflow = "hidden";
|
|
36
36
|
const r = requestAnimationFrame(() => {
|
|
37
37
|
var t;
|
|
38
|
-
return (t =
|
|
38
|
+
return (t = b.current) == null ? void 0 : t.focus();
|
|
39
39
|
});
|
|
40
40
|
return () => {
|
|
41
|
-
var t,
|
|
42
|
-
document.body.style.overflow = e, cancelAnimationFrame(r), (
|
|
41
|
+
var t, n;
|
|
42
|
+
document.body.style.overflow = e, cancelAnimationFrame(r), (n = (t = w.current) == null ? void 0 : t.focus) == null || n.call(t);
|
|
43
43
|
};
|
|
44
44
|
}, [s]), o.useEffect(() => {
|
|
45
45
|
var e, r;
|
|
46
|
-
!s || !
|
|
47
|
-
}, [s,
|
|
48
|
-
const
|
|
46
|
+
!s || !d || (r = (e = g.current) == null ? void 0 : e.querySelector(`[data-index="${c}"]`)) == null || r.scrollIntoView({ block: "nearest" });
|
|
47
|
+
}, [s, d, c]);
|
|
48
|
+
const k = (e) => {
|
|
49
49
|
i(!1), R(e);
|
|
50
50
|
}, I = (e) => {
|
|
51
|
-
e.key === "Escape" ? (e.preventDefault(), i(!1)) : e.key === "ArrowDown" ? (e.preventDefault(), x((r) => Math.min(r + 1,
|
|
51
|
+
e.key === "Escape" ? (e.preventDefault(), i(!1)) : e.key === "ArrowDown" ? (e.preventDefault(), x((r) => Math.min(r + 1, l.length - 1))) : e.key === "ArrowUp" ? (e.preventDefault(), x((r) => Math.max(r - 1, 0))) : e.key === "Enter" && d && (e.preventDefault(), k(d));
|
|
52
52
|
};
|
|
53
53
|
return s ? S(
|
|
54
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ u("div", { className: "fixed inset-0 z-50 flex items-start justify-center px-4 pt-[15vh]", children: [
|
|
55
55
|
/* @__PURE__ */ a(
|
|
56
56
|
"div",
|
|
57
57
|
{
|
|
@@ -60,13 +60,13 @@ function L({
|
|
|
60
60
|
onClick: () => i(!1)
|
|
61
61
|
}
|
|
62
62
|
),
|
|
63
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ u(
|
|
64
64
|
"div",
|
|
65
65
|
{
|
|
66
66
|
role: "dialog",
|
|
67
67
|
"aria-modal": "true",
|
|
68
68
|
"aria-label": D,
|
|
69
|
-
className:
|
|
69
|
+
className: v(
|
|
70
70
|
"relative flex w-full max-w-lg flex-col overflow-hidden",
|
|
71
71
|
"rounded-xl bg-elevated text-foreground shadow-elevation",
|
|
72
72
|
E
|
|
@@ -74,19 +74,19 @@ function L({
|
|
|
74
74
|
onKeyDown: I,
|
|
75
75
|
children: [
|
|
76
76
|
/* @__PURE__ */ a(C, { origin: "top" }),
|
|
77
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ u("div", { className: "flex items-center gap-2.5 px-4 py-3", children: [
|
|
78
78
|
/* @__PURE__ */ a(q, { "aria-hidden": !0, className: "size-4 shrink-0 text-muted-foreground" }),
|
|
79
79
|
/* @__PURE__ */ a(
|
|
80
80
|
"input",
|
|
81
81
|
{
|
|
82
|
-
ref:
|
|
82
|
+
ref: b,
|
|
83
83
|
role: "combobox",
|
|
84
84
|
"aria-expanded": "true",
|
|
85
85
|
"aria-controls": f,
|
|
86
|
-
"aria-activedescendant":
|
|
86
|
+
"aria-activedescendant": d ? `${f}-${c}` : void 0,
|
|
87
87
|
"aria-autocomplete": "list",
|
|
88
88
|
value: m,
|
|
89
|
-
onChange: (e) =>
|
|
89
|
+
onChange: (e) => N(e.target.value),
|
|
90
90
|
placeholder: $,
|
|
91
91
|
className: "w-full bg-transparent text-base text-foreground outline-none placeholder:text-muted-foreground"
|
|
92
92
|
}
|
|
@@ -100,34 +100,34 @@ function L({
|
|
|
100
100
|
role: "listbox",
|
|
101
101
|
"aria-label": "Results",
|
|
102
102
|
className: "max-h-80 overflow-y-auto p-1.5 pt-0",
|
|
103
|
-
children:
|
|
104
|
-
e && /* @__PURE__ */ a("div", { className: "px-2.5 pb-1 pt-2.5 text-
|
|
103
|
+
children: l.length === 0 ? /* @__PURE__ */ a("p", { className: "px-2.5 py-6 text-center text-s text-muted-foreground", children: A }) : M.map(({ group: e, items: r }) => /* @__PURE__ */ u("div", { role: "group", "aria-label": e, children: [
|
|
104
|
+
e && /* @__PURE__ */ a("div", { className: "px-2.5 pb-1 pt-2.5 text-s font-normal text-muted-foreground select-none", children: e }),
|
|
105
105
|
r.map((t) => {
|
|
106
|
-
const
|
|
107
|
-
return /* @__PURE__ */
|
|
106
|
+
const n = l.indexOf(t), h = n === c;
|
|
107
|
+
return /* @__PURE__ */ u(
|
|
108
108
|
"div",
|
|
109
109
|
{
|
|
110
|
-
id: `${f}-${
|
|
111
|
-
"data-index":
|
|
110
|
+
id: `${f}-${n}`,
|
|
111
|
+
"data-index": n,
|
|
112
112
|
role: "option",
|
|
113
|
-
"aria-selected":
|
|
114
|
-
onPointerMove: () => x(
|
|
115
|
-
onClick: () =>
|
|
116
|
-
className:
|
|
117
|
-
"flex cursor-default items-center gap-2 rounded-md px-2.5 py-1.5 text-
|
|
118
|
-
|
|
113
|
+
"aria-selected": h,
|
|
114
|
+
onPointerMove: () => x(n),
|
|
115
|
+
onClick: () => k(t),
|
|
116
|
+
className: v(
|
|
117
|
+
"flex cursor-default items-center gap-2 rounded-md px-2.5 py-1.5 text-m",
|
|
118
|
+
h ? "bg-action-primary-soft text-brand-text" : "text-secondary"
|
|
119
119
|
),
|
|
120
120
|
children: [
|
|
121
121
|
t.icon && /* @__PURE__ */ a(
|
|
122
122
|
"span",
|
|
123
123
|
{
|
|
124
124
|
"aria-hidden": !0,
|
|
125
|
-
className: "flex shrink-0 items-center
|
|
125
|
+
className: v("flex shrink-0 items-center [&_svg]:size-4", h ? "text-brand-text" : "text-muted-foreground"),
|
|
126
126
|
children: t.icon
|
|
127
127
|
}
|
|
128
128
|
),
|
|
129
129
|
/* @__PURE__ */ a("span", { className: "min-w-0 flex-1 truncate", children: t.label }),
|
|
130
|
-
t.hint && /* @__PURE__ */ a("span", { className: "shrink-0 text-
|
|
130
|
+
t.hint && /* @__PURE__ */ a("span", { className: "shrink-0 text-s text-tertiary", children: t.hint })
|
|
131
131
|
]
|
|
132
132
|
},
|
|
133
133
|
t.id
|
|
@@ -109,7 +109,7 @@ const w = g.forwardRef(
|
|
|
109
109
|
"span",
|
|
110
110
|
{
|
|
111
111
|
className: o(
|
|
112
|
-
"inline-flex shrink-0 items-center gap-0.5 text-
|
|
112
|
+
"inline-flex shrink-0 items-center gap-0.5 text-m font-normal",
|
|
113
113
|
h ? "text-danger" : "text-foreground"
|
|
114
114
|
),
|
|
115
115
|
children: [
|
|
@@ -185,7 +185,7 @@ function se({
|
|
|
185
185
|
)
|
|
186
186
|
] }),
|
|
187
187
|
/* @__PURE__ */ d(F, { weekdayStyle: "short", className: "w-full border-separate border-spacing-0.5", children: [
|
|
188
|
-
/* @__PURE__ */ t(_, { children: (r) => /* @__PURE__ */ t($, { className: "h-7 text-center text-
|
|
188
|
+
/* @__PURE__ */ t(_, { children: (r) => /* @__PURE__ */ t($, { className: "h-7 text-center text-s font-medium text-muted-foreground", children: r }) }),
|
|
189
189
|
/* @__PURE__ */ t(q, { children: (r) => /* @__PURE__ */ t(
|
|
190
190
|
K,
|
|
191
191
|
{
|
|
@@ -199,7 +199,7 @@ function se({
|
|
|
199
199
|
isSelectionStart: M,
|
|
200
200
|
isUnavailable: P
|
|
201
201
|
}) => o(
|
|
202
|
-
"relative flex size-8 cursor-pointer items-center justify-center rounded-sm text-
|
|
202
|
+
"relative flex size-8 cursor-pointer items-center justify-center rounded-sm text-s tabular-nums outline-none transition-colors duration-150",
|
|
203
203
|
"hover:bg-action-primary-soft hover:text-action-primary-text",
|
|
204
204
|
"data-[pressed]:bg-action-primary-soft data-[pressed]:text-action-primary-text",
|
|
205
205
|
G && "bg-action-primary-soft font-medium text-action-primary-text",
|
package/components/dropdown.js
CHANGED
|
@@ -193,7 +193,7 @@ const T = s.forwardRef(({ className: r, ...t }, n) => /* @__PURE__ */ h(
|
|
|
193
193
|
{
|
|
194
194
|
ref: n,
|
|
195
195
|
className: R(
|
|
196
|
-
"px-2 py-1.5 text-
|
|
196
|
+
"px-2 py-1.5 text-s font-normal text-muted-foreground select-none",
|
|
197
197
|
r
|
|
198
198
|
),
|
|
199
199
|
...t
|
package/components/field.js
CHANGED
|
@@ -16,7 +16,7 @@ const L = i(
|
|
|
16
16
|
"transition-[border-color,box-shadow]",
|
|
17
17
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
18
18
|
// Form controls keep a subtle stroke (the "~25%") for crisp definition;
|
|
19
|
-
// hover stays neutral while focus uses the subtle
|
|
19
|
+
// hover stays neutral while focus uses the subtle teal edge. The inner
|
|
20
20
|
// glow is a whisper of inset depth so the writing surface reads recessed —
|
|
21
21
|
// carried through every interactive state by the --glow-inset hook.
|
|
22
22
|
R({ on: "all", color: "brand", intensity: "medium", animate: !0 }),
|
|
@@ -92,7 +92,7 @@ const T = C(
|
|
|
92
92
|
/* @__PURE__ */ r("span", { "aria-hidden": !0, className: "text-tertiary [&>svg]:size-6", children: /* @__PURE__ */ r(R, {}) }),
|
|
93
93
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: s.map((e) => /* @__PURE__ */ a("span", { className: "text-base text-foreground", children: [
|
|
94
94
|
e.name,
|
|
95
|
-
/* @__PURE__ */ r("span", { className: "ml-2 text-
|
|
95
|
+
/* @__PURE__ */ r("span", { className: "ml-2 text-s text-tertiary tabular-nums", children: j(e.size) })
|
|
96
96
|
] }, e.name)) }),
|
|
97
97
|
/* @__PURE__ */ a("div", { className: "mt-1 flex items-center gap-2", children: [
|
|
98
98
|
/* @__PURE__ */ r(D, { size: "sm", variant: "secondary", onClick: (e) => {
|
|
@@ -120,7 +120,7 @@ const T = C(
|
|
|
120
120
|
" ",
|
|
121
121
|
/* @__PURE__ */ r("span", { className: "underline underline-offset-4", children: "browse" })
|
|
122
122
|
] }) }),
|
|
123
|
-
p && /* @__PURE__ */ r("span", { className: "text-
|
|
123
|
+
p && /* @__PURE__ */ r("span", { className: "text-s text-tertiary", children: p })
|
|
124
124
|
] })
|
|
125
125
|
]
|
|
126
126
|
}
|
|
@@ -65,7 +65,7 @@ function S({
|
|
|
65
65
|
/* @__PURE__ */ b(
|
|
66
66
|
"span",
|
|
67
67
|
{
|
|
68
|
-
className: "min-w-12 text-center text-
|
|
68
|
+
className: "min-w-12 text-center text-s tabular-nums text-muted-foreground",
|
|
69
69
|
"aria-live": "polite",
|
|
70
70
|
children: [
|
|
71
71
|
Math.round(u * 100),
|
package/components/modal.js
CHANGED
|
@@ -61,10 +61,10 @@ function ee({
|
|
|
61
61
|
overlayClassName: j,
|
|
62
62
|
viewportClassName: V,
|
|
63
63
|
"aria-label": v,
|
|
64
|
-
"aria-labelledby":
|
|
65
|
-
"aria-describedby":
|
|
64
|
+
"aria-labelledby": k,
|
|
65
|
+
"aria-describedby": P
|
|
66
66
|
}) {
|
|
67
|
-
const b = r.useRef(null), f = r.useId(), p = r.useId(),
|
|
67
|
+
const b = r.useRef(null), f = r.useId(), p = r.useId(), _ = r.useMemo(
|
|
68
68
|
() => M(d),
|
|
69
69
|
[d]
|
|
70
70
|
), E = r.useMemo(
|
|
@@ -103,8 +103,8 @@ function ee({
|
|
|
103
103
|
forceMount: !0,
|
|
104
104
|
asChild: !0,
|
|
105
105
|
"aria-label": v,
|
|
106
|
-
"aria-labelledby":
|
|
107
|
-
"aria-describedby":
|
|
106
|
+
"aria-labelledby": k ?? (v ? void 0 : f),
|
|
107
|
+
"aria-describedby": P ?? (_ ? p : void 0),
|
|
108
108
|
onEscapeKeyDown: (s) => {
|
|
109
109
|
z || s.preventDefault();
|
|
110
110
|
},
|
|
@@ -258,7 +258,7 @@ const Q = r.forwardRef(({ className: o, ...e }, a) => /* @__PURE__ */ t(
|
|
|
258
258
|
"data-slot": "modal-footer",
|
|
259
259
|
className: n(
|
|
260
260
|
"flex min-h-[3.75rem] shrink-0 flex-wrap items-center justify-end gap-2 border-t-[1px] border-border-tertiary px-4 py-4",
|
|
261
|
-
"[&_button]:h-7 [&_button]:rounded-sm [&_button]:px-2.5
|
|
261
|
+
"[&_button]:h-7 [&_button]:rounded-sm [&_button]:px-2.5",
|
|
262
262
|
o
|
|
263
263
|
),
|
|
264
264
|
...e
|
package/components/pagination.js
CHANGED
|
@@ -4,15 +4,15 @@ import * as j from "react";
|
|
|
4
4
|
import { ChevronLeft as L, MoreHorizontal as k, ChevronRight as G } from "../lib/icons.js";
|
|
5
5
|
import { cn as u } from "../lib/cn.js";
|
|
6
6
|
import { Select as M } from "./select.js";
|
|
7
|
-
function p(t,
|
|
7
|
+
function p(t, r) {
|
|
8
8
|
const e = [];
|
|
9
|
-
for (let
|
|
9
|
+
for (let s = t; s <= r; s += 1) e.push(s);
|
|
10
10
|
return e;
|
|
11
11
|
}
|
|
12
|
-
function z(t,
|
|
12
|
+
function z(t, r, e) {
|
|
13
13
|
if (e * 2 + 5 >= t)
|
|
14
14
|
return p(1, t);
|
|
15
|
-
const m = Math.max(
|
|
15
|
+
const m = Math.max(r - e, 1), a = Math.min(r + e, t), d = m > 2, i = a < t - 1;
|
|
16
16
|
if (!d && i) {
|
|
17
17
|
const l = e * 2 + 3;
|
|
18
18
|
return [...p(1, l), "end-ellipsis", t];
|
|
@@ -34,13 +34,13 @@ const E = () => u(
|
|
|
34
34
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
35
35
|
"transition active:scale-[0.97] motion-reduce:transition-none motion-reduce:active:scale-100",
|
|
36
36
|
"disabled:pointer-events-none disabled:opacity-40",
|
|
37
|
-
"size-6 text-
|
|
37
|
+
"size-6 text-s"
|
|
38
38
|
), N = (t) => t === "sm" ? "w-auto gap-1.5 px-2" : "w-auto gap-1.5 px-2.5", A = j.forwardRef(
|
|
39
39
|
({
|
|
40
40
|
className: t,
|
|
41
|
-
total:
|
|
41
|
+
total: r,
|
|
42
42
|
page: e,
|
|
43
|
-
onChange:
|
|
43
|
+
onChange: s,
|
|
44
44
|
siblings: m = 1,
|
|
45
45
|
size: a = "md",
|
|
46
46
|
summary: d,
|
|
@@ -48,21 +48,21 @@ const E = () => u(
|
|
|
48
48
|
pageSize: l,
|
|
49
49
|
pageSizeOptions: w,
|
|
50
50
|
onPageSizeChange: h,
|
|
51
|
-
...
|
|
52
|
-
},
|
|
53
|
-
if (
|
|
54
|
-
const P = z(
|
|
51
|
+
...y
|
|
52
|
+
}, C) => {
|
|
53
|
+
if (r <= 0) return null;
|
|
54
|
+
const P = z(r, e, m), R = e <= 1, S = e >= r, f = E(), x = a === "sm" ? "size-3.5" : "size-4", g = l != null && !!h, b = d != null || g;
|
|
55
55
|
return /* @__PURE__ */ c(
|
|
56
56
|
"nav",
|
|
57
57
|
{
|
|
58
|
-
ref:
|
|
58
|
+
ref: C,
|
|
59
59
|
"aria-label": "Pagination",
|
|
60
60
|
className: u(
|
|
61
61
|
"flex items-center",
|
|
62
62
|
b ? "w-full justify-between gap-4" : "gap-1",
|
|
63
63
|
t
|
|
64
64
|
),
|
|
65
|
-
...
|
|
65
|
+
...y,
|
|
66
66
|
children: [
|
|
67
67
|
b && /* @__PURE__ */ o(
|
|
68
68
|
"span",
|
|
@@ -72,7 +72,7 @@ const E = () => u(
|
|
|
72
72
|
}
|
|
73
73
|
),
|
|
74
74
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-4", children: [
|
|
75
|
-
|
|
75
|
+
g && /* @__PURE__ */ c(
|
|
76
76
|
"label",
|
|
77
77
|
{
|
|
78
78
|
className: "flex items-center gap-2 text-s text-muted-foreground",
|
|
@@ -102,14 +102,14 @@ const E = () => u(
|
|
|
102
102
|
type: "button",
|
|
103
103
|
"aria-label": "Go to previous page",
|
|
104
104
|
disabled: R,
|
|
105
|
-
onClick: () =>
|
|
105
|
+
onClick: () => s(e - 1),
|
|
106
106
|
className: u(
|
|
107
107
|
f,
|
|
108
|
-
"text-foreground hover:bg-
|
|
108
|
+
"text-foreground hover:bg-action-primary-soft hover:text-brand-text",
|
|
109
109
|
i && N(a)
|
|
110
110
|
),
|
|
111
111
|
children: [
|
|
112
|
-
/* @__PURE__ */ o(L, { className:
|
|
112
|
+
/* @__PURE__ */ o(L, { className: x, "aria-hidden": !0 }),
|
|
113
113
|
i && "Prev"
|
|
114
114
|
]
|
|
115
115
|
}
|
|
@@ -121,7 +121,7 @@ const E = () => u(
|
|
|
121
121
|
{
|
|
122
122
|
"aria-hidden": !0,
|
|
123
123
|
className: u(f, "text-muted-foreground"),
|
|
124
|
-
children: /* @__PURE__ */ o(k, { className:
|
|
124
|
+
children: /* @__PURE__ */ o(k, { className: x })
|
|
125
125
|
},
|
|
126
126
|
n
|
|
127
127
|
);
|
|
@@ -132,10 +132,10 @@ const E = () => u(
|
|
|
132
132
|
type: "button",
|
|
133
133
|
"aria-label": `Go to page ${n}`,
|
|
134
134
|
"aria-current": v ? "page" : void 0,
|
|
135
|
-
onClick: () =>
|
|
135
|
+
onClick: () => s(n),
|
|
136
136
|
className: u(
|
|
137
137
|
f,
|
|
138
|
-
v ? "bg-
|
|
138
|
+
v ? "bg-brand text-brand-foreground" : "text-foreground hover:bg-action-primary-soft hover:text-brand-text"
|
|
139
139
|
),
|
|
140
140
|
children: n
|
|
141
141
|
},
|
|
@@ -148,15 +148,15 @@ const E = () => u(
|
|
|
148
148
|
type: "button",
|
|
149
149
|
"aria-label": "Go to next page",
|
|
150
150
|
disabled: S,
|
|
151
|
-
onClick: () =>
|
|
151
|
+
onClick: () => s(e + 1),
|
|
152
152
|
className: u(
|
|
153
153
|
f,
|
|
154
|
-
"text-foreground hover:bg-
|
|
154
|
+
"text-foreground hover:bg-action-primary-soft hover:text-brand-text",
|
|
155
155
|
i && N(a)
|
|
156
156
|
),
|
|
157
157
|
children: [
|
|
158
158
|
i && "Next",
|
|
159
|
-
/* @__PURE__ */ o(G, { className:
|
|
159
|
+
/* @__PURE__ */ o(G, { className: x, "aria-hidden": !0 })
|
|
160
160
|
]
|
|
161
161
|
}
|
|
162
162
|
)
|
package/components/radio.js
CHANGED
|
@@ -55,7 +55,7 @@ const j = i.forwardRef(
|
|
|
55
55
|
"label",
|
|
56
56
|
{
|
|
57
57
|
className: b(
|
|
58
|
-
"group inline-flex items-center gap-2 text-
|
|
58
|
+
"group inline-flex items-center gap-2 text-m text-foreground select-none",
|
|
59
59
|
s ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
60
60
|
d
|
|
61
61
|
),
|
package/components/segmented.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as n, jsxs as
|
|
2
|
+
import { jsx as n, jsxs as x } from "react/jsx-runtime";
|
|
3
3
|
import * as l from "react";
|
|
4
4
|
import { MotionConfig as v, motion as w } from "motion/react";
|
|
5
5
|
import { cva as c } from "class-variance-authority";
|
|
@@ -13,9 +13,9 @@ const D = c(
|
|
|
13
13
|
{
|
|
14
14
|
variants: {
|
|
15
15
|
size: {
|
|
16
|
-
sm: "rounded-sm
|
|
17
|
-
md: "rounded-md
|
|
18
|
-
lg: "rounded-md
|
|
16
|
+
sm: "rounded-sm",
|
|
17
|
+
md: "rounded-md",
|
|
18
|
+
lg: "rounded-md"
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
defaultVariants: { size: "md" }
|
|
@@ -24,7 +24,7 @@ const D = c(
|
|
|
24
24
|
o(
|
|
25
25
|
// The active segment is a shared motion thumb that SLIDES between options
|
|
26
26
|
// (layoutId), so the option itself only carries text color.
|
|
27
|
-
"relative inline-flex items-center justify-center whitespace-nowrap font-normal select-none",
|
|
27
|
+
"relative inline-flex items-center justify-center whitespace-nowrap text-m font-normal select-none",
|
|
28
28
|
"transition-colors duration-150 cursor-pointer",
|
|
29
29
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
30
30
|
"disabled:pointer-events-none disabled:opacity-50"
|
|
@@ -37,21 +37,21 @@ const D = c(
|
|
|
37
37
|
lg: "h-9 rounded-md px-4"
|
|
38
38
|
},
|
|
39
39
|
selected: {
|
|
40
|
-
true: "text-foreground",
|
|
41
|
-
false: "text-muted-foreground hover:text-
|
|
40
|
+
true: "text-brand-foreground",
|
|
41
|
+
false: "text-muted-foreground hover:text-brand-text"
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
defaultVariants: { size: "md", selected: !1 }
|
|
45
45
|
}
|
|
46
|
-
), I = l.forwardRef(({ options:
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
s(
|
|
46
|
+
), I = l.forwardRef(({ options: t, value: a, onChange: s, size: i, className: m, elevated: u = !0, ...f }, b) => {
|
|
47
|
+
const p = l.useId(), d = (e) => {
|
|
48
|
+
const r = t.findIndex((h) => h.value === a), g = ((r < 0 ? 0 : r) + e + t.length) % t.length;
|
|
49
|
+
s(t[g].value);
|
|
50
50
|
};
|
|
51
51
|
return /* @__PURE__ */ n(
|
|
52
52
|
"div",
|
|
53
53
|
{
|
|
54
|
-
ref:
|
|
54
|
+
ref: b,
|
|
55
55
|
role: "radiogroup",
|
|
56
56
|
onKeyDown: (e) => {
|
|
57
57
|
switch (e.key) {
|
|
@@ -65,31 +65,31 @@ const D = c(
|
|
|
65
65
|
break;
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
|
-
className: o(D({ size: i }),
|
|
68
|
+
className: o(D({ size: i }), m),
|
|
69
69
|
...f,
|
|
70
|
-
children: /* @__PURE__ */ n(v, { reducedMotion: "user", children:
|
|
71
|
-
const
|
|
72
|
-
return /* @__PURE__ */
|
|
70
|
+
children: /* @__PURE__ */ n(v, { reducedMotion: "user", children: t.map((e) => {
|
|
71
|
+
const r = e.value === a;
|
|
72
|
+
return /* @__PURE__ */ x(
|
|
73
73
|
"button",
|
|
74
74
|
{
|
|
75
75
|
type: "button",
|
|
76
76
|
role: "radio",
|
|
77
|
-
"aria-checked":
|
|
77
|
+
"aria-checked": r,
|
|
78
78
|
"aria-label": e.ariaLabel,
|
|
79
|
-
tabIndex:
|
|
79
|
+
tabIndex: r ? 0 : -1,
|
|
80
80
|
onClick: () => s(e.value),
|
|
81
|
-
className: k({ size: i, selected:
|
|
81
|
+
className: k({ size: i, selected: r }),
|
|
82
82
|
children: [
|
|
83
|
-
|
|
83
|
+
r && /* @__PURE__ */ n(
|
|
84
84
|
w.span,
|
|
85
85
|
{
|
|
86
|
-
layoutId:
|
|
86
|
+
layoutId: p,
|
|
87
87
|
"aria-hidden": !0,
|
|
88
88
|
layoutDependency: a,
|
|
89
89
|
transition: y,
|
|
90
90
|
className: o(
|
|
91
|
-
"absolute inset-0 rounded-[inherit] bg-
|
|
92
|
-
|
|
91
|
+
"absolute inset-0 rounded-[inherit] bg-brand",
|
|
92
|
+
u && "shadow-elevation"
|
|
93
93
|
)
|
|
94
94
|
}
|
|
95
95
|
),
|
|
@@ -3,12 +3,12 @@ import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
|
3
3
|
import * as i from "react";
|
|
4
4
|
import { cn as s } from "../lib/cn.js";
|
|
5
5
|
import { Button as g } from "./button.js";
|
|
6
|
-
const
|
|
6
|
+
const p = i.forwardRef(
|
|
7
7
|
({
|
|
8
8
|
className: r,
|
|
9
9
|
selectedCount: o,
|
|
10
|
-
selectedLabel:
|
|
11
|
-
actions:
|
|
10
|
+
selectedLabel: t,
|
|
11
|
+
actions: n,
|
|
12
12
|
onClear: e,
|
|
13
13
|
clearLabel: l = "Clear",
|
|
14
14
|
...m
|
|
@@ -17,19 +17,19 @@ const u = i.forwardRef(
|
|
|
17
17
|
{
|
|
18
18
|
ref: f,
|
|
19
19
|
className: s(
|
|
20
|
-
"flex items-center gap-3 rounded-lg bg-brand px-3 py-2 text-
|
|
20
|
+
"flex items-center gap-3 rounded-lg bg-brand px-3 py-2 text-s text-brand-foreground",
|
|
21
21
|
r
|
|
22
22
|
),
|
|
23
23
|
...m,
|
|
24
24
|
children: [
|
|
25
|
-
/* @__PURE__ */ a("span", { className: "font-normal tabular-nums", children:
|
|
25
|
+
/* @__PURE__ */ a("span", { className: "font-normal tabular-nums", children: t ?? `${o} selected` }),
|
|
26
26
|
/* @__PURE__ */ c("div", { className: "ml-auto flex items-center gap-1", children: [
|
|
27
|
-
|
|
27
|
+
n,
|
|
28
28
|
e && /* @__PURE__ */ a(
|
|
29
29
|
d,
|
|
30
30
|
{
|
|
31
31
|
onClick: e,
|
|
32
|
-
className: "text-brand-foreground
|
|
32
|
+
className: "text-brand-foreground",
|
|
33
33
|
children: l
|
|
34
34
|
}
|
|
35
35
|
)
|
|
@@ -38,22 +38,22 @@ const u = i.forwardRef(
|
|
|
38
38
|
}
|
|
39
39
|
)
|
|
40
40
|
);
|
|
41
|
-
|
|
42
|
-
const d = i.forwardRef(({ className: r, variant: o = "ghost", size:
|
|
41
|
+
p.displayName = "SelectionActionBar";
|
|
42
|
+
const d = i.forwardRef(({ className: r, variant: o = "ghost", size: t = "xs", ...n }, e) => /* @__PURE__ */ a(
|
|
43
43
|
g,
|
|
44
44
|
{
|
|
45
45
|
ref: e,
|
|
46
46
|
variant: o,
|
|
47
|
-
size:
|
|
47
|
+
size: t,
|
|
48
48
|
className: s(
|
|
49
|
-
"text-brand-foreground hover:bg-brand-
|
|
49
|
+
"text-brand-foreground hover:bg-brand-hover hover:text-brand-foreground focus-visible:ring-brand-foreground",
|
|
50
50
|
r
|
|
51
51
|
),
|
|
52
|
-
...
|
|
52
|
+
...n
|
|
53
53
|
}
|
|
54
54
|
));
|
|
55
55
|
d.displayName = "SelectionActionBarAction";
|
|
56
56
|
export {
|
|
57
|
-
|
|
57
|
+
p as SelectionActionBar,
|
|
58
58
|
d as SelectionActionBarAction
|
|
59
59
|
};
|
package/components/sidebar.js
CHANGED
|
@@ -195,7 +195,7 @@ const D = s.forwardRef(
|
|
|
195
195
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
196
196
|
// Collapsed: a centered square (--sidebar-item) so every rail item lines up.
|
|
197
197
|
"group-data-[collapsed=true]/sidebar:mx-auto group-data-[collapsed=true]/sidebar:size-(--sidebar-item) group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:p-0",
|
|
198
|
-
a ? "bg-sidebar-accent" : "hover:bg-sidebar-accent/60",
|
|
198
|
+
a ? "bg-sidebar-accent text-sidebar-accent-foreground" : "hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground",
|
|
199
199
|
t
|
|
200
200
|
),
|
|
201
201
|
...l,
|
|
@@ -235,10 +235,10 @@ const W = s.forwardRef(
|
|
|
235
235
|
className: n(
|
|
236
236
|
"flex h-9 w-full items-center justify-start gap-2 rounded-md px-3",
|
|
237
237
|
"text-m leading-[var(--text-m--line-height)] font-normal text-wg12",
|
|
238
|
-
// Reads as a normal nav item: transparent at rest, the shared
|
|
238
|
+
// Reads as a normal nav item: transparent at rest, the shared teal
|
|
239
239
|
// hover wash on hover (no fill-at-rest, no elevation).
|
|
240
240
|
"transition-colors duration-150 ease-out motion-reduce:transition-none",
|
|
241
|
-
"hover:bg-sidebar-accent/60",
|
|
241
|
+
"hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground",
|
|
242
242
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
243
243
|
"[&_svg]:size-4 [&_svg]:shrink-0",
|
|
244
244
|
"group-data-[collapsed=true]/sidebar:mx-auto group-data-[collapsed=true]/sidebar:size-(--sidebar-item) group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:px-0",
|
|
@@ -288,7 +288,7 @@ const O = s.forwardRef(({ className: t, children: e, title: a, action: i, isActi
|
|
|
288
288
|
className: n(
|
|
289
289
|
"group/hist relative flex items-center rounded-md transition-colors",
|
|
290
290
|
"text-wg12",
|
|
291
|
-
o ? "bg-sidebar-accent
|
|
291
|
+
o ? "bg-sidebar-accent text-sidebar-accent-foreground" : "hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground"
|
|
292
292
|
),
|
|
293
293
|
children: [
|
|
294
294
|
d && /* @__PURE__ */ r(
|
|
@@ -387,7 +387,7 @@ const P = s.forwardRef(
|
|
|
387
387
|
),
|
|
388
388
|
/* @__PURE__ */ c("div", { className: "min-w-0 leading-tight group-data-[collapsed=true]/sidebar:hidden", children: [
|
|
389
389
|
/* @__PURE__ */ r("div", { className: "truncate text-base leading-[var(--text-base--line-height)] font-normal text-foreground", children: e }),
|
|
390
|
-
a && /* @__PURE__ */ r("div", { className: "truncate text-
|
|
390
|
+
a && /* @__PURE__ */ r("div", { className: "truncate text-s leading-[var(--text-s--line-height)] text-tertiary", children: a })
|
|
391
391
|
] })
|
|
392
392
|
]
|
|
393
393
|
}
|
package/components/stepper.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import * as React from "react";
|
|
|
5
5
|
*
|
|
6
6
|
* `Progress` is a continuous bar and `Timeline` is a chronological list of
|
|
7
7
|
* content; neither says "step 2 of 5, and here is what 3 through 5 will be".
|
|
8
|
-
* Completed steps collapse to a
|
|
8
|
+
* Completed steps collapse to a teal check so the eye counts what is left,
|
|
9
9
|
* not what is done; the current step stays brand-black; a failed step turns
|
|
10
10
|
* danger and keeps its place in the sequence rather than disappearing — a
|
|
11
11
|
* wizard that hides the step that broke is unusable.
|