@actioneer/ads 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ai-elements/agent-trace.d.ts +2 -2
- package/components/ai-elements/agent-trace.js +163 -104
- package/components/ai-elements/chain-of-thought.d.ts +2 -2
- package/components/ai-elements/chain-of-thought.js +1 -1
- package/components/ai-elements/index.d.ts +0 -5
- package/components/ai-elements/inline-citation.js +1 -1
- package/components/alert.d.ts +6 -6
- package/components/alert.js +89 -53
- package/components/answer-sources.d.ts +2 -6
- package/components/answer-sources.js +58 -60
- package/components/answer.d.ts +5 -0
- package/components/answer.js +311 -271
- package/components/assistant-ui/composer-harness.js +15 -20
- package/components/assistant-ui/composer.d.ts +3 -1
- package/components/assistant-ui/composer.js +148 -144
- package/components/assistant-ui/index.d.ts +0 -3
- package/components/assistant-ui/thread-context.d.ts +3 -1
- package/components/assistant-ui/thread.js +50 -42
- package/components/avatar.js +42 -42
- package/components/badge.d.ts +5 -6
- package/components/badge.js +13 -76
- package/components/body-page-header.d.ts +15 -0
- package/components/body-page-header.js +24 -0
- package/components/brand-loader.d.ts +0 -3
- package/components/brand-loader.js +10 -32
- package/components/breadcrumbs.d.ts +0 -7
- package/components/breadcrumbs.js +54 -71
- package/components/button.d.ts +1 -1
- package/components/button.js +55 -49
- package/components/chart.js +298 -296
- package/components/chip.d.ts +13 -1
- package/components/chip.js +93 -80
- package/components/collection-header.d.ts +17 -0
- package/components/collection-header.js +31 -0
- package/components/connector-card.d.ts +6 -6
- package/components/connector-card.js +31 -32
- package/components/date-range-picker.d.ts +2 -1
- package/components/date-range-picker.js +158 -122
- package/components/drawer.d.ts +19 -3
- package/components/drawer.js +109 -100
- package/components/dropdown.d.ts +1 -2
- package/components/dropdown.js +88 -89
- package/components/field.js +39 -34
- package/components/file-dropzone.js +1 -1
- package/components/index.d.ts +4 -4
- package/components/index.js +499 -546
- package/components/infinite-canvas.js +24 -24
- package/components/input-field.d.ts +18 -3
- package/components/input-field.js +88 -72
- package/components/input.js +16 -15
- package/components/modal.d.ts +31 -3
- package/components/modal.js +243 -169
- package/components/number-field.js +45 -42
- package/components/page-body.d.ts +12 -0
- package/components/page-body.js +18 -0
- package/components/pagination.js +36 -36
- package/components/select.d.ts +21 -0
- package/components/select.js +189 -148
- package/components/setting-row.d.ts +6 -5
- package/components/setting-row.js +33 -32
- package/components/sidebar.d.ts +2 -0
- package/components/sidebar.js +165 -155
- package/components/skeleton.js +8 -7
- package/components/slider.js +1 -1
- package/components/surface-loader.d.ts +11 -0
- package/components/surface-loader.js +35 -0
- package/components/table.d.ts +16 -10
- package/components/table.js +426 -410
- package/components/tabs.d.ts +2 -0
- package/components/tabs.js +159 -294
- package/components/textarea.js +9 -9
- package/components/toast.d.ts +1 -1
- package/components/toast.js +181 -118
- package/components/tree.d.ts +5 -1
- package/components/tree.js +54 -49
- package/components/typography.d.ts +4 -4
- package/components/typography.js +13 -13
- package/components/ui/button.d.ts +1 -1
- package/components/ui/dialog.js +33 -33
- package/demo/components/add-to-artifact.js +6 -10
- package/lib/cn.js +11 -4
- package/lib/icons.d.ts +4 -0
- package/lib/icons.js +107 -106
- package/lib/interactive.d.ts +1 -1
- package/llms.txt +95 -152
- package/manifest.json +1628 -2729
- package/package.json +1 -2
- package/styles.css +347 -223
- package/theme.css +303 -177
- package/components/agent-icon.d.ts +0 -76
- package/components/agent-icon.js +0 -265
- package/components/ai-elements/queue.d.ts +0 -60
- package/components/ai-elements/queue.js +0 -193
- package/components/ai-elements/speech-input.d.ts +0 -16
- package/components/ai-elements/speech-input.js +0 -151
- package/components/ai-elements/task-progress.d.ts +0 -41
- package/components/ai-elements/task-progress.js +0 -224
- package/components/ai-elements/task.d.ts +0 -39
- package/components/ai-elements/task.js +0 -105
- package/components/ai-elements/voice.d.ts +0 -90
- package/components/ai-elements/voice.js +0 -496
- package/components/assistant-ui/follow-up-suggestions.d.ts +0 -11
- package/components/assistant-ui/follow-up-suggestions.js +0 -72
- package/components/assistant-ui/suggestions.d.ts +0 -7
- package/components/assistant-ui/suggestions.js +0 -19
- package/components/assistant-ui/voice.d.ts +0 -18
- package/components/link.d.ts +0 -14
- package/components/link.js +0 -72
- package/components/navbar.d.ts +0 -15
- package/components/navbar.js +0 -68
- package/components/pixel-icon.d.ts +0 -37
- package/components/pixel-icon.js +0 -859
package/components/sidebar.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import { MotionConfig as
|
|
5
|
-
import { User as j, PanelLeft as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { springSidebar as
|
|
2
|
+
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
3
|
+
import * as s from "react";
|
|
4
|
+
import { MotionConfig as z, motion as _ } from "motion/react";
|
|
5
|
+
import { User as j, PanelLeft as E } from "../lib/icons.js";
|
|
6
|
+
import { cn as o } from "../lib/cn.js";
|
|
7
|
+
import { springSidebar as H } from "../lib/motion.js";
|
|
8
8
|
import { Tooltip as I } from "./tooltip.js";
|
|
9
9
|
import { Avatar as L } from "./avatar.js";
|
|
10
|
-
const
|
|
10
|
+
const R = s.createContext({
|
|
11
11
|
collapsed: !1,
|
|
12
12
|
toggle: () => {
|
|
13
13
|
},
|
|
@@ -15,94 +15,103 @@ const k = o.createContext({
|
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
function M() {
|
|
18
|
-
return
|
|
18
|
+
return s.useContext(R);
|
|
19
19
|
}
|
|
20
|
-
const K =
|
|
20
|
+
const K = s.forwardRef(
|
|
21
21
|
({
|
|
22
22
|
className: t,
|
|
23
|
-
collapsed:
|
|
24
|
-
defaultCollapsed:
|
|
25
|
-
onCollapsedChange:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
collapsed: e,
|
|
24
|
+
defaultCollapsed: a = !1,
|
|
25
|
+
onCollapsedChange: i,
|
|
26
|
+
animateOnMount: n = !1,
|
|
27
|
+
keyboardToggle: d = !0,
|
|
28
|
+
...l
|
|
29
|
+
}, m) => {
|
|
30
|
+
const [v, y] = s.useState(a), b = e !== void 0, u = b ? e : v, g = s.useCallback(
|
|
30
31
|
(p) => {
|
|
31
|
-
|
|
32
|
+
b || y(p), i == null || i(p);
|
|
32
33
|
},
|
|
33
|
-
[
|
|
34
|
-
),
|
|
35
|
-
() =>
|
|
36
|
-
[u,
|
|
34
|
+
[b, i]
|
|
35
|
+
), h = s.useCallback(
|
|
36
|
+
() => g(!u),
|
|
37
|
+
[u, g]
|
|
37
38
|
);
|
|
38
|
-
|
|
39
|
-
if (!
|
|
40
|
-
const p = (
|
|
41
|
-
(
|
|
39
|
+
s.useEffect(() => {
|
|
40
|
+
if (!d) return;
|
|
41
|
+
const p = (f) => {
|
|
42
|
+
(f.metaKey || f.ctrlKey) && f.key.toLowerCase() === "b" && (f.preventDefault(), h());
|
|
42
43
|
};
|
|
43
44
|
return document.addEventListener("keydown", p), () => document.removeEventListener("keydown", p);
|
|
44
|
-
}, [
|
|
45
|
-
const
|
|
46
|
-
() => ({ collapsed: u, toggle:
|
|
47
|
-
[u,
|
|
45
|
+
}, [d, h]);
|
|
46
|
+
const x = s.useMemo(
|
|
47
|
+
() => ({ collapsed: u, toggle: h, setCollapsed: g }),
|
|
48
|
+
[u, h, g]
|
|
48
49
|
);
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
+
return /* @__PURE__ */ r(R.Provider, { value: x, children: /* @__PURE__ */ r(z, { reducedMotion: "user", children: /* @__PURE__ */ r(
|
|
50
51
|
_.aside,
|
|
51
52
|
{
|
|
52
|
-
ref:
|
|
53
|
+
ref: m,
|
|
53
54
|
"data-collapsed": u ? "true" : "false",
|
|
54
|
-
initial:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
initial: n ? {
|
|
56
|
+
width: u ? 56 : 240,
|
|
57
|
+
transform: "translate3d(-100%, 0, 0)",
|
|
58
|
+
opacity: 0
|
|
59
|
+
} : !1,
|
|
60
|
+
animate: {
|
|
61
|
+
width: u ? 56 : 240,
|
|
62
|
+
transform: "translate3d(0, 0, 0)",
|
|
63
|
+
opacity: 1
|
|
64
|
+
},
|
|
65
|
+
transition: H,
|
|
66
|
+
className: o(
|
|
67
|
+
"group/sidebar flex h-full shrink-0 flex-col bg-background",
|
|
59
68
|
t
|
|
60
69
|
),
|
|
61
|
-
...
|
|
70
|
+
...l
|
|
62
71
|
}
|
|
63
72
|
) }) });
|
|
64
73
|
}
|
|
65
74
|
);
|
|
66
75
|
K.displayName = "Sidebar";
|
|
67
|
-
function
|
|
68
|
-
return /* @__PURE__ */
|
|
76
|
+
function S({ children: t }) {
|
|
77
|
+
return /* @__PURE__ */ r("kbd", { className: "inline-flex h-4 min-w-4 items-center justify-center rounded bg-background/20 px-1 text-xs leading-none", children: t });
|
|
69
78
|
}
|
|
70
|
-
function
|
|
79
|
+
function k({
|
|
71
80
|
className: t,
|
|
72
|
-
onClick:
|
|
73
|
-
tooltipSide:
|
|
74
|
-
...
|
|
81
|
+
onClick: e,
|
|
82
|
+
tooltipSide: a = "right",
|
|
83
|
+
...i
|
|
75
84
|
}) {
|
|
76
|
-
const { collapsed:
|
|
77
|
-
return /* @__PURE__ */
|
|
85
|
+
const { collapsed: n, toggle: d } = M();
|
|
86
|
+
return /* @__PURE__ */ r(
|
|
78
87
|
I,
|
|
79
88
|
{
|
|
80
|
-
side:
|
|
89
|
+
side: a,
|
|
81
90
|
content: /* @__PURE__ */ c("span", { className: "flex items-center gap-1.5", children: [
|
|
82
|
-
|
|
91
|
+
n ? "Expand" : "Collapse",
|
|
83
92
|
/* @__PURE__ */ c("span", { className: "flex items-center gap-0.5", children: [
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ r(S, { children: "⌘" }),
|
|
94
|
+
/* @__PURE__ */ r(S, { children: "B" })
|
|
86
95
|
] })
|
|
87
96
|
] }),
|
|
88
|
-
children: /* @__PURE__ */
|
|
97
|
+
children: /* @__PURE__ */ r(
|
|
89
98
|
"button",
|
|
90
99
|
{
|
|
91
100
|
type: "button",
|
|
92
|
-
"aria-label":
|
|
93
|
-
"aria-pressed":
|
|
101
|
+
"aria-label": n ? "Expand sidebar" : "Collapse sidebar",
|
|
102
|
+
"aria-pressed": n,
|
|
94
103
|
onClick: (l) => {
|
|
95
|
-
|
|
104
|
+
e == null || e(l), d();
|
|
96
105
|
},
|
|
97
|
-
className:
|
|
106
|
+
className: o(
|
|
98
107
|
"inline-flex size-(--sidebar-item) shrink-0 items-center justify-center rounded-sm border border-transparent text-muted-foreground",
|
|
99
108
|
"transition-colors hover:border-border hover:bg-elevated hover:text-foreground",
|
|
100
109
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
101
110
|
"[&_svg]:size-4.5",
|
|
102
111
|
t
|
|
103
112
|
),
|
|
104
|
-
...
|
|
105
|
-
children: /* @__PURE__ */
|
|
113
|
+
...i,
|
|
114
|
+
children: /* @__PURE__ */ r(E, {})
|
|
106
115
|
}
|
|
107
116
|
)
|
|
108
117
|
}
|
|
@@ -110,14 +119,14 @@ function z({
|
|
|
110
119
|
}
|
|
111
120
|
function Y({
|
|
112
121
|
logo: t,
|
|
113
|
-
href:
|
|
114
|
-
label:
|
|
115
|
-
showTrigger:
|
|
116
|
-
children:
|
|
122
|
+
href: e,
|
|
123
|
+
label: a = "Home",
|
|
124
|
+
showTrigger: i = !0,
|
|
125
|
+
children: n,
|
|
117
126
|
className: d,
|
|
118
127
|
...l
|
|
119
128
|
}) {
|
|
120
|
-
const m =
|
|
129
|
+
const m = o(
|
|
121
130
|
// 20px mark centered in a 32px square — the same box as every other rail icon.
|
|
122
131
|
// group/brand lets a BrandMark logo play its blip loop on hover.
|
|
123
132
|
"group/brand flex size-(--sidebar-item) items-center justify-center",
|
|
@@ -125,156 +134,157 @@ function Y({
|
|
|
125
134
|
// The logo owns the header at rest in BOTH states. On the collapsed rail
|
|
126
135
|
// it swaps for the expand trigger only while the rail is hovered (or
|
|
127
136
|
// holds keyboard focus, so the control stays reachable).
|
|
128
|
-
|
|
137
|
+
i && "group-data-[collapsed=true]/sidebar:group-hover/sidebar:hidden group-data-[collapsed=true]/sidebar:group-focus-within/sidebar:hidden"
|
|
129
138
|
);
|
|
130
139
|
return /* @__PURE__ */ c(
|
|
131
140
|
"div",
|
|
132
141
|
{
|
|
133
|
-
className:
|
|
134
|
-
"flex h-(--sidebar-header) shrink-0 items-center justify-between gap-2 px-
|
|
142
|
+
className: o(
|
|
143
|
+
"flex h-(--sidebar-header) shrink-0 items-center justify-between gap-2 px-4",
|
|
135
144
|
"group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:px-2",
|
|
136
145
|
d
|
|
137
146
|
),
|
|
138
147
|
...l,
|
|
139
148
|
children: [
|
|
140
|
-
|
|
141
|
-
|
|
149
|
+
e ? /* @__PURE__ */ r("a", { href: e, "aria-label": a, className: m, children: t }) : /* @__PURE__ */ r("span", { className: m, children: t }),
|
|
150
|
+
i && /* @__PURE__ */ r("div", { className: "hidden group-data-[collapsed=true]/sidebar:group-hover/sidebar:flex group-data-[collapsed=true]/sidebar:group-focus-within/sidebar:flex", children: /* @__PURE__ */ r(k, { tooltipSide: "right" }) }),
|
|
142
151
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-1 group-data-[collapsed=true]/sidebar:hidden", children: [
|
|
143
|
-
|
|
144
|
-
|
|
152
|
+
i && /* @__PURE__ */ r(k, { tooltipSide: "bottom" }),
|
|
153
|
+
n
|
|
145
154
|
] })
|
|
146
155
|
]
|
|
147
156
|
}
|
|
148
157
|
);
|
|
149
158
|
}
|
|
150
|
-
const
|
|
151
|
-
({ className: t, ...
|
|
159
|
+
const q = s.forwardRef(
|
|
160
|
+
({ className: t, ...e }, a) => /* @__PURE__ */ r(
|
|
152
161
|
"div",
|
|
153
162
|
{
|
|
154
|
-
ref:
|
|
155
|
-
className:
|
|
163
|
+
ref: a,
|
|
164
|
+
className: o(
|
|
156
165
|
"flex h-(--sidebar-header) shrink-0 items-center justify-between gap-2 px-3",
|
|
157
166
|
"group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:px-2",
|
|
158
167
|
t
|
|
159
168
|
),
|
|
160
|
-
...
|
|
169
|
+
...e
|
|
161
170
|
}
|
|
162
171
|
)
|
|
163
172
|
);
|
|
164
|
-
|
|
165
|
-
const
|
|
166
|
-
({ className: t, ...
|
|
173
|
+
q.displayName = "SidebarHeader";
|
|
174
|
+
const A = s.forwardRef(
|
|
175
|
+
({ className: t, ...e }, a) => /* @__PURE__ */ r("nav", { ref: a, className: o("min-h-0 flex-1 space-y-5 overflow-y-auto p-3", t), ...e })
|
|
167
176
|
);
|
|
168
|
-
|
|
169
|
-
const B =
|
|
170
|
-
({ className: t, label:
|
|
171
|
-
|
|
172
|
-
/* @__PURE__ */
|
|
177
|
+
A.displayName = "SidebarNav";
|
|
178
|
+
const B = s.forwardRef(
|
|
179
|
+
({ className: t, label: e, children: a, ...i }, n) => /* @__PURE__ */ c("div", { ref: n, className: t, ...i, children: [
|
|
180
|
+
e && /* @__PURE__ */ r("div", { className: "mb-1.5 px-3 text-s leading-[var(--text-s--line-height)] font-medium text-ng10 group-data-[collapsed=true]/sidebar:hidden", children: e }),
|
|
181
|
+
/* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5 group-data-[collapsed=true]/sidebar:gap-2", children: a })
|
|
173
182
|
] })
|
|
174
183
|
);
|
|
175
184
|
B.displayName = "SidebarSection";
|
|
176
|
-
const D =
|
|
177
|
-
({ className: t, icon:
|
|
185
|
+
const D = s.forwardRef(
|
|
186
|
+
({ className: t, icon: e, isActive: a, endContent: i, children: n, title: d, ...l }, m) => /* @__PURE__ */ c(
|
|
178
187
|
"a",
|
|
179
188
|
{
|
|
180
189
|
ref: m,
|
|
181
|
-
"aria-current":
|
|
182
|
-
title: d ?? (typeof
|
|
183
|
-
className:
|
|
184
|
-
"flex h-9 items-center gap-2.5 rounded-md px-3 text-
|
|
190
|
+
"aria-current": a ? "page" : void 0,
|
|
191
|
+
title: d ?? (typeof n == "string" ? n : void 0),
|
|
192
|
+
className: o(
|
|
193
|
+
"flex h-9 items-center gap-2.5 rounded-md border border-transparent px-3 text-m leading-[var(--text-m--line-height)] font-normal text-ng12 transition-colors",
|
|
185
194
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
186
195
|
"[&_svg]:size-4 [&_svg]:shrink-0",
|
|
187
196
|
// Collapsed: a centered square (--sidebar-item) so every rail item lines up.
|
|
188
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",
|
|
189
|
-
|
|
198
|
+
a ? "border-ng4 bg-white" : "hover:bg-sidebar-accent/60",
|
|
190
199
|
t
|
|
191
200
|
),
|
|
192
201
|
...l,
|
|
193
202
|
children: [
|
|
194
|
-
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
-
|
|
203
|
+
a && s.isValidElement(e) ? s.cloneElement(e, { weight: "fill" }) : e,
|
|
204
|
+
/* @__PURE__ */ r("span", { className: "min-w-0 flex-1 truncate group-data-[collapsed=true]/sidebar:hidden", children: n }),
|
|
205
|
+
i && /* @__PURE__ */ r("span", { className: "shrink-0 group-data-[collapsed=true]/sidebar:hidden", children: i })
|
|
197
206
|
]
|
|
198
207
|
}
|
|
199
208
|
)
|
|
200
209
|
);
|
|
201
210
|
D.displayName = "SidebarItem";
|
|
202
|
-
const F =
|
|
203
|
-
({ className: t, ...
|
|
211
|
+
const F = s.forwardRef(
|
|
212
|
+
({ className: t, ...e }, a) => /* @__PURE__ */ r(
|
|
204
213
|
"div",
|
|
205
214
|
{
|
|
206
|
-
ref:
|
|
207
|
-
className:
|
|
208
|
-
...
|
|
215
|
+
ref: a,
|
|
216
|
+
className: o("shrink-0 p-3 group-data-[collapsed=true]/sidebar:px-2", t),
|
|
217
|
+
...e
|
|
209
218
|
}
|
|
210
219
|
)
|
|
211
220
|
);
|
|
212
221
|
F.displayName = "SidebarFooter";
|
|
213
|
-
const W =
|
|
214
|
-
({ className: t, icon:
|
|
222
|
+
const W = s.forwardRef(
|
|
223
|
+
({ className: t, icon: e, children: a, ...i }, n) => /* @__PURE__ */ r("div", { className: "px-3 pb-0.5 group-data-[collapsed=true]/sidebar:px-2", children: /* @__PURE__ */ c(
|
|
215
224
|
"button",
|
|
216
225
|
{
|
|
217
|
-
ref:
|
|
226
|
+
ref: n,
|
|
218
227
|
type: "button",
|
|
219
|
-
className:
|
|
228
|
+
className: o(
|
|
220
229
|
"flex h-9 w-full items-center justify-start gap-2 rounded-md px-3",
|
|
221
|
-
"text-
|
|
230
|
+
"text-m leading-[var(--text-m--line-height)] font-normal text-ng12",
|
|
222
231
|
// Reads as a normal nav item: transparent at rest, the shared grey
|
|
223
232
|
// hover wash on hover (no fill-at-rest, no elevation).
|
|
224
233
|
"transition-colors duration-150 ease-out motion-reduce:transition-none",
|
|
225
|
-
"hover:bg-sidebar-accent/60
|
|
234
|
+
"hover:bg-sidebar-accent/60",
|
|
226
235
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
227
236
|
"[&_svg]:size-4 [&_svg]:shrink-0",
|
|
228
237
|
"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",
|
|
229
238
|
t
|
|
230
239
|
),
|
|
231
|
-
...
|
|
240
|
+
...i,
|
|
232
241
|
children: [
|
|
233
|
-
|
|
234
|
-
/* @__PURE__ */
|
|
242
|
+
e,
|
|
243
|
+
/* @__PURE__ */ r("span", { className: "truncate group-data-[collapsed=true]/sidebar:hidden", children: a })
|
|
235
244
|
]
|
|
236
245
|
}
|
|
237
246
|
) })
|
|
238
247
|
);
|
|
239
248
|
W.displayName = "SidebarAction";
|
|
240
|
-
const $ =
|
|
241
|
-
({ className: t, label:
|
|
249
|
+
const $ = s.forwardRef(
|
|
250
|
+
({ className: t, label: e, children: a, ...i }, n) => /* @__PURE__ */ c(
|
|
242
251
|
"div",
|
|
243
252
|
{
|
|
244
|
-
ref:
|
|
245
|
-
className:
|
|
246
|
-
...
|
|
253
|
+
ref: n,
|
|
254
|
+
className: o("group-data-[collapsed=true]/sidebar:hidden", t),
|
|
255
|
+
...i,
|
|
247
256
|
children: [
|
|
248
|
-
|
|
249
|
-
/* @__PURE__ */
|
|
257
|
+
e && /* @__PURE__ */ r("div", { className: "mb-1.5 px-3 text-s leading-[var(--text-s--line-height)] font-medium text-ng10", children: e }),
|
|
258
|
+
/* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: a })
|
|
250
259
|
]
|
|
251
260
|
}
|
|
252
261
|
)
|
|
253
262
|
);
|
|
254
263
|
$.displayName = "SidebarHistory";
|
|
255
|
-
const O =
|
|
256
|
-
const
|
|
257
|
-
|
|
258
|
-
const
|
|
259
|
-
if (!
|
|
260
|
-
const
|
|
261
|
-
const
|
|
262
|
-
|
|
264
|
+
const O = s.forwardRef(({ className: t, children: e, title: a, action: i, isActive: n, icon: d, ...l }, m) => {
|
|
265
|
+
const v = s.useRef(null), y = s.useRef(null), [b, u] = s.useState(0);
|
|
266
|
+
s.useLayoutEffect(() => {
|
|
267
|
+
const x = v.current, p = y.current;
|
|
268
|
+
if (!x || !p) return;
|
|
269
|
+
const f = () => {
|
|
270
|
+
const w = p.scrollWidth - x.clientWidth;
|
|
271
|
+
u(w > 0 ? w + (i ? 32 : 0) : 0);
|
|
263
272
|
};
|
|
264
|
-
|
|
265
|
-
const
|
|
266
|
-
return
|
|
267
|
-
}, [
|
|
268
|
-
const g =
|
|
273
|
+
f();
|
|
274
|
+
const N = new ResizeObserver(f);
|
|
275
|
+
return N.observe(x), N.observe(p), () => N.disconnect();
|
|
276
|
+
}, [e, i]);
|
|
277
|
+
const g = b > 0, h = Math.max(500, Math.round(b * 18));
|
|
269
278
|
return /* @__PURE__ */ c(
|
|
270
279
|
"div",
|
|
271
280
|
{
|
|
272
|
-
className:
|
|
281
|
+
className: o(
|
|
273
282
|
"group/hist relative flex items-center rounded-md transition-colors",
|
|
274
|
-
|
|
283
|
+
"text-ng12",
|
|
284
|
+
n ? "bg-sidebar-accent/60" : "hover:bg-sidebar-accent/60"
|
|
275
285
|
),
|
|
276
286
|
children: [
|
|
277
|
-
d && /* @__PURE__ */
|
|
287
|
+
d && /* @__PURE__ */ r(
|
|
278
288
|
"span",
|
|
279
289
|
{
|
|
280
290
|
"aria-hidden": !0,
|
|
@@ -282,24 +292,24 @@ const O = o.forwardRef(({ className: t, children: r, title: i, action: a, isActi
|
|
|
282
292
|
children: d
|
|
283
293
|
}
|
|
284
294
|
),
|
|
285
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ r(
|
|
286
296
|
"a",
|
|
287
297
|
{
|
|
288
298
|
ref: m,
|
|
289
|
-
title:
|
|
290
|
-
className:
|
|
299
|
+
title: a ?? (typeof e == "string" ? e : void 0),
|
|
300
|
+
className: o(
|
|
291
301
|
// Left pad matches a SidebarItem's text column (px-3 + icon size-4 +
|
|
292
302
|
// gap-2.5 = 2.375rem) so history titles line up under the nav labels.
|
|
293
|
-
"block min-w-0 flex-1 rounded-md py-1.5 pr-3 ps-(--sidebar-text-indent) text-
|
|
303
|
+
"block min-w-0 flex-1 rounded-md py-1.5 pr-3 ps-(--sidebar-text-indent) text-m leading-[var(--text-m--line-height)] font-normal",
|
|
294
304
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
295
305
|
t
|
|
296
306
|
),
|
|
297
307
|
...l,
|
|
298
|
-
children: /* @__PURE__ */
|
|
308
|
+
children: /* @__PURE__ */ r(
|
|
299
309
|
"span",
|
|
300
310
|
{
|
|
301
|
-
ref:
|
|
302
|
-
className:
|
|
311
|
+
ref: v,
|
|
312
|
+
className: o(
|
|
303
313
|
"block overflow-hidden",
|
|
304
314
|
// Rest: fade the right edge (no ellipsis). Hover: the title scrolls,
|
|
305
315
|
// so fade the LEFT edge where it exits; the action backdrop (or the
|
|
@@ -307,30 +317,30 @@ const O = o.forwardRef(({ className: t, children: r, title: i, action: a, isActi
|
|
|
307
317
|
g && "[mask-image:linear-gradient(to_right,#000_calc(100%-1.5rem),transparent)]",
|
|
308
318
|
g && "group-hover/hist:[mask-image:linear-gradient(to_right,transparent,#000_1.25rem,#000_100%)]"
|
|
309
319
|
),
|
|
310
|
-
children: /* @__PURE__ */
|
|
320
|
+
children: /* @__PURE__ */ r(
|
|
311
321
|
"span",
|
|
312
322
|
{
|
|
313
|
-
ref:
|
|
314
|
-
className:
|
|
323
|
+
ref: y,
|
|
324
|
+
className: o(
|
|
315
325
|
"block w-max whitespace-nowrap transition-transform ease-linear",
|
|
316
326
|
g && "group-hover/hist:[transform:translateX(var(--mq-x))]",
|
|
317
327
|
"motion-reduce:transition-none motion-reduce:group-hover/hist:[transform:none]"
|
|
318
328
|
),
|
|
319
329
|
style: {
|
|
320
|
-
"--mq-x": `-${
|
|
321
|
-
transitionDuration: `${
|
|
330
|
+
"--mq-x": `-${b}px`,
|
|
331
|
+
transitionDuration: `${h}ms`
|
|
322
332
|
},
|
|
323
|
-
children:
|
|
333
|
+
children: e
|
|
324
334
|
}
|
|
325
335
|
)
|
|
326
336
|
}
|
|
327
337
|
)
|
|
328
338
|
}
|
|
329
339
|
),
|
|
330
|
-
|
|
340
|
+
i && /* @__PURE__ */ r(
|
|
331
341
|
"span",
|
|
332
342
|
{
|
|
333
|
-
className:
|
|
343
|
+
className: o(
|
|
334
344
|
// Rounded end matches the row's radius so the backdrop doesn't
|
|
335
345
|
// square off the highlight's right corners.
|
|
336
346
|
"absolute inset-y-0 right-0 flex items-center rounded-e-md pl-8 pr-1",
|
|
@@ -339,7 +349,7 @@ const O = o.forwardRef(({ className: t, children: r, title: i, action: a, isActi
|
|
|
339
349
|
"pointer-events-none group-hover/hist:pointer-events-auto",
|
|
340
350
|
"focus-within:pointer-events-auto focus-within:opacity-100"
|
|
341
351
|
),
|
|
342
|
-
children:
|
|
352
|
+
children: i
|
|
343
353
|
}
|
|
344
354
|
)
|
|
345
355
|
]
|
|
@@ -347,21 +357,21 @@ const O = o.forwardRef(({ className: t, children: r, title: i, action: a, isActi
|
|
|
347
357
|
);
|
|
348
358
|
});
|
|
349
359
|
O.displayName = "SidebarHistoryItem";
|
|
350
|
-
const P =
|
|
351
|
-
({ className: t, name:
|
|
360
|
+
const P = s.forwardRef(
|
|
361
|
+
({ className: t, name: e, role: a, src: i, hideAvatar: n, ...d }, l) => /* @__PURE__ */ c(
|
|
352
362
|
"a",
|
|
353
363
|
{
|
|
354
364
|
ref: l,
|
|
355
|
-
className:
|
|
356
|
-
"flex items-center gap-2.5 rounded-md p-2 transition-colors hover:
|
|
365
|
+
className: o(
|
|
366
|
+
"flex items-center gap-2.5 rounded-md border border-transparent p-2 transition-colors hover:border-ng10",
|
|
357
367
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
358
368
|
"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",
|
|
359
369
|
t
|
|
360
370
|
),
|
|
361
371
|
...d,
|
|
362
372
|
children: [
|
|
363
|
-
!
|
|
364
|
-
|
|
373
|
+
!n && /* @__PURE__ */ r(L, { size: "sm", name: e, src: i }),
|
|
374
|
+
n && /* @__PURE__ */ r(
|
|
365
375
|
j,
|
|
366
376
|
{
|
|
367
377
|
"aria-hidden": !0,
|
|
@@ -369,8 +379,8 @@ const P = o.forwardRef(
|
|
|
369
379
|
}
|
|
370
380
|
),
|
|
371
381
|
/* @__PURE__ */ c("div", { className: "min-w-0 leading-tight group-data-[collapsed=true]/sidebar:hidden", children: [
|
|
372
|
-
/* @__PURE__ */
|
|
373
|
-
|
|
382
|
+
/* @__PURE__ */ r("div", { className: "truncate text-base leading-[var(--text-base--line-height)] font-normal text-foreground", children: e }),
|
|
383
|
+
a && /* @__PURE__ */ r("div", { className: "truncate text-xs leading-[var(--text-xs--line-height)] text-tertiary", children: a })
|
|
374
384
|
] })
|
|
375
385
|
]
|
|
376
386
|
}
|
|
@@ -383,12 +393,12 @@ export {
|
|
|
383
393
|
W as SidebarAction,
|
|
384
394
|
Y as SidebarBrand,
|
|
385
395
|
F as SidebarFooter,
|
|
386
|
-
|
|
396
|
+
q as SidebarHeader,
|
|
387
397
|
$ as SidebarHistory,
|
|
388
398
|
O as SidebarHistoryItem,
|
|
389
399
|
D as SidebarItem,
|
|
390
|
-
|
|
400
|
+
A as SidebarNav,
|
|
391
401
|
B as SidebarSection,
|
|
392
|
-
|
|
402
|
+
k as SidebarTrigger,
|
|
393
403
|
M as useSidebar
|
|
394
404
|
};
|
package/components/skeleton.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import { cn as
|
|
5
|
-
const i =
|
|
6
|
-
({ className: e, circle: r = !1, ...t }, a) => /* @__PURE__ */
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import * as o from "react";
|
|
4
|
+
import { cn as f } from "../lib/cn.js";
|
|
5
|
+
const i = o.forwardRef(
|
|
6
|
+
({ className: e, circle: r = !1, ...t }, a) => /* @__PURE__ */ n(
|
|
7
7
|
"div",
|
|
8
8
|
{
|
|
9
9
|
ref: a,
|
|
10
10
|
"aria-hidden": !0,
|
|
11
|
-
className:
|
|
11
|
+
className: f(
|
|
12
12
|
"relative overflow-hidden bg-muted",
|
|
13
13
|
r ? "rounded-full" : "rounded-md",
|
|
14
14
|
"after:absolute after:inset-0 after:-translate-x-full",
|
|
15
15
|
"after:bg-gradient-to-r after:from-transparent after:via-foreground/10 after:to-transparent",
|
|
16
|
-
"after:animate-[ads-shimmer_1.
|
|
16
|
+
"after:will-change-transform after:animate-[ads-shimmer_1.8s_ease-in-out_infinite]",
|
|
17
|
+
"motion-reduce:after:animate-none",
|
|
17
18
|
e
|
|
18
19
|
),
|
|
19
20
|
...t
|
package/components/slider.js
CHANGED
|
@@ -44,7 +44,7 @@ const m = v.forwardRef(
|
|
|
44
44
|
{
|
|
45
45
|
className: s(
|
|
46
46
|
"pointer-events-none absolute size-4 -translate-x-1/2 rounded-full",
|
|
47
|
-
"border
|
|
47
|
+
"border border-background bg-brand shadow-elevation transition-shadow",
|
|
48
48
|
"peer-focus-visible:ring-3 peer-focus-visible:ring-ring"
|
|
49
49
|
),
|
|
50
50
|
style: { left: `${o}%` },
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface SurfaceLoaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
3
|
+
/** Short status shown below the loader. */
|
|
4
|
+
label?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Canonical loading state for a blocked panel, modal, or page. Owns the ADS
|
|
8
|
+
* surface spinner, spacing, and accessible busy semantics so products do not
|
|
9
|
+
* need to assemble their own full-surface loading moment.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SurfaceLoader: React.ForwardRefExoticComponent<SurfaceLoaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import * as u from "react";
|
|
4
|
+
import { cn as c } from "../lib/cn.js";
|
|
5
|
+
import { Spinner as f } from "./spinner.js";
|
|
6
|
+
import { Text as n } from "./typography.js";
|
|
7
|
+
const l = u.forwardRef(
|
|
8
|
+
({
|
|
9
|
+
className: a,
|
|
10
|
+
label: r = "Preparing your workspace…",
|
|
11
|
+
role: i,
|
|
12
|
+
"aria-busy": t,
|
|
13
|
+
...s
|
|
14
|
+
}, o) => /* @__PURE__ */ m(
|
|
15
|
+
"div",
|
|
16
|
+
{
|
|
17
|
+
ref: o,
|
|
18
|
+
role: i ?? "status",
|
|
19
|
+
"aria-busy": t ?? !0,
|
|
20
|
+
className: c(
|
|
21
|
+
"flex min-h-44 w-full flex-col items-center justify-center gap-3",
|
|
22
|
+
a
|
|
23
|
+
),
|
|
24
|
+
...s,
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ e(f, { variant: "surface", size: "lg", "aria-hidden": !0 }),
|
|
27
|
+
r ? /* @__PURE__ */ e(n, { size: "sm", muted: !0, children: r }) : null
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
);
|
|
32
|
+
l.displayName = "SurfaceLoader";
|
|
33
|
+
export {
|
|
34
|
+
l as SurfaceLoader
|
|
35
|
+
};
|