@actioneer/ads 1.0.3 → 1.0.5
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 +89 -89
- 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/avatar.js +23 -23
- 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 +3 -3
- 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/input-field.js +2 -2
- package/components/input.js +9 -9
- 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/select.d.ts +1 -1
- package/components/select.js +1 -1
- 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 +12 -12
- package/manifest.json +19 -19
- package/package.json +1 -1
- package/styles.css +103 -95
- package/theme.css +97 -89
|
@@ -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: [
|
|
@@ -144,7 +144,7 @@ function se({
|
|
|
144
144
|
className: o(
|
|
145
145
|
"ml-auto inline-flex shrink-0 cursor-pointer items-center justify-center border border-transparent text-muted-foreground outline-none",
|
|
146
146
|
"transition-[background,color,transform] duration-150 ease-out",
|
|
147
|
-
"group-hover/field:text-foreground group-focus-within/field:text-
|
|
147
|
+
"group-hover/field:text-foreground group-focus-within/field:text-t12!",
|
|
148
148
|
"hover:bg-action-primary-soft hover:text-action-primary-text!",
|
|
149
149
|
"data-[pressed]:scale-[0.97] data-[pressed]:bg-action-primary-soft data-[pressed]:text-action-primary-text!",
|
|
150
150
|
"motion-reduce:data-[pressed]:scale-100",
|
|
@@ -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),
|
|
@@ -85,9 +85,9 @@ const U = i.forwardRef(
|
|
|
85
85
|
), z = r || n ? (
|
|
86
86
|
// group/field: adornment icons follow the field's interactive states.
|
|
87
87
|
/* @__PURE__ */ C("div", { className: "group/field relative w-full", children: [
|
|
88
|
-
r && /* @__PURE__ */ t("span", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-muted-foreground transition-colors duration-150 group-hover/field:text-foreground group-focus-within/field:text-
|
|
88
|
+
r && /* @__PURE__ */ t("span", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-muted-foreground transition-colors duration-150 group-hover/field:text-foreground group-focus-within/field:text-t12! [&_svg]:size-4", children: r }),
|
|
89
89
|
k,
|
|
90
|
-
n && /* @__PURE__ */ t("span", { className: "absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground transition-colors duration-150 group-hover/field:text-foreground group-focus-within/field:text-
|
|
90
|
+
n && /* @__PURE__ */ t("span", { className: "absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground transition-colors duration-150 group-hover/field:text-foreground group-focus-within/field:text-t12! [&_svg]:size-4", children: n })
|
|
91
91
|
] })
|
|
92
92
|
) : k;
|
|
93
93
|
return !v && !d && !o && !m ? z : /* @__PURE__ */ t(
|
package/components/input.js
CHANGED
|
@@ -18,7 +18,7 @@ const N = {
|
|
|
18
18
|
type: s,
|
|
19
19
|
...c
|
|
20
20
|
}, m) => {
|
|
21
|
-
const [i, p] = l.useState(!1),
|
|
21
|
+
const [i, p] = l.useState(!1), t = s === "password", r = u ?? (t ? /* @__PURE__ */ e(
|
|
22
22
|
"button",
|
|
23
23
|
{
|
|
24
24
|
type: "button",
|
|
@@ -27,11 +27,11 @@ const N = {
|
|
|
27
27
|
className: "-mr-1 flex items-center rounded-xs p-1 outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring",
|
|
28
28
|
children: i ? /* @__PURE__ */ e(x, {}) : /* @__PURE__ */ e(w, {})
|
|
29
29
|
}
|
|
30
|
-
) : void 0),
|
|
30
|
+
) : void 0), n = /* @__PURE__ */ e(
|
|
31
31
|
"input",
|
|
32
32
|
{
|
|
33
33
|
ref: m,
|
|
34
|
-
type:
|
|
34
|
+
type: t && i ? "text" : s,
|
|
35
35
|
"aria-invalid": f || void 0,
|
|
36
36
|
className: h(
|
|
37
37
|
b,
|
|
@@ -46,14 +46,14 @@ const N = {
|
|
|
46
46
|
...c
|
|
47
47
|
}
|
|
48
48
|
);
|
|
49
|
-
return !o && !r ?
|
|
49
|
+
return !o && !r ? n : (
|
|
50
50
|
// group/field: adornment icons follow the field's interactive states —
|
|
51
|
-
// muted at rest, readable on hover, and
|
|
52
|
-
// control is focused. Important keeps focus
|
|
51
|
+
// muted at rest, readable on hover, and T12 teal while the
|
|
52
|
+
// control is focused. Important keeps focus teal while still hovered.
|
|
53
53
|
/* @__PURE__ */ v("div", { className: "group/field relative w-full", children: [
|
|
54
|
-
o && /* @__PURE__ */ e("span", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-muted-foreground transition-colors duration-150 group-hover/field:text-foreground group-focus-within/field:text-
|
|
55
|
-
|
|
56
|
-
r && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground transition-colors duration-150 group-hover/field:text-foreground group-focus-within/field:text-
|
|
54
|
+
o && /* @__PURE__ */ e("span", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-muted-foreground transition-colors duration-150 group-hover/field:text-foreground group-focus-within/field:text-t12! [&_svg]:size-4", children: o }),
|
|
55
|
+
n,
|
|
56
|
+
r && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground transition-colors duration-150 group-hover/field:text-foreground group-focus-within/field:text-t12! [&_svg]:size-4", children: r })
|
|
57
57
|
] })
|
|
58
58
|
);
|
|
59
59
|
}
|
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
|
),
|
package/components/select.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export interface DropdownOptionsProps {
|
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* DropdownOptions — the reusable options surface composed by Select.
|
|
27
|
-
* It owns listbox semantics and the brand-
|
|
27
|
+
* It owns listbox semantics and the brand-teal option interaction treatment;
|
|
28
28
|
* positioning and open/closed state stay with the parent Select.
|
|
29
29
|
*/
|
|
30
30
|
export declare const DropdownOptions: React.ForwardRefExoticComponent<DropdownOptionsProps & React.RefAttributes<HTMLUListElement>>;
|
package/components/select.js
CHANGED
|
@@ -254,7 +254,7 @@ const re = n.forwardRef(
|
|
|
254
254
|
{
|
|
255
255
|
className: b(
|
|
256
256
|
"size-4 text-muted-foreground transition-[color,transform] duration-150 ease-out motion-reduce:transition-none",
|
|
257
|
-
"group-hover/select:text-foreground group-focus/select:text-
|
|
257
|
+
"group-hover/select:text-foreground group-focus/select:text-t12!",
|
|
258
258
|
r && "rotate-180"
|
|
259
259
|
),
|
|
260
260
|
"aria-hidden": !0
|