@actioneer/ads 0.5.4 → 0.5.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/components/accordion.js +15 -15
- package/components/agent-icon.d.ts +64 -0
- package/components/agent-icon.js +251 -0
- package/components/ai-elements/agent-trace.d.ts +8 -1
- package/components/ai-elements/agent-trace.js +164 -129
- package/components/ai-elements/chain-of-thought-icon.d.ts +42 -0
- package/components/ai-elements/chain-of-thought-icon.js +283 -0
- package/components/ai-elements/chain-of-thought.js +7 -7
- package/components/ai-elements/chart.js +38 -35
- package/components/ai-elements/index.d.ts +1 -0
- package/components/ai-elements/inline-citation.js +40 -40
- package/components/ai-elements/message.js +5 -5
- package/components/ai-elements/queue.js +1 -1
- package/components/ai-elements/research-activity.d.ts +2 -0
- package/components/ai-elements/research-activity.js +79 -81
- package/components/ai-elements/task-progress.js +2 -2
- package/components/ai-elements/tool.d.ts +4 -2
- package/components/ai-elements/tool.js +74 -54
- package/components/ai-elements/transcript.js +1 -1
- package/components/alert.js +1 -1
- package/components/answer.d.ts +2643 -311
- package/components/answer.js +1836 -425
- package/components/assistant-ui/answer-tool-ui.js +23 -28
- package/components/assistant-ui/chain-of-thought.d.ts +7 -2
- package/components/assistant-ui/composer-harness.js +20 -16
- package/components/assistant-ui/reasoning.js +35 -31
- package/components/assistant-ui/tool-fallback.js +125 -122
- package/components/assistant-ui/tool-group.d.ts +3 -1
- package/components/assistant-ui/tool-group.js +48 -43
- package/components/audio-waveform.js +14 -14
- package/components/autocomplete.js +52 -48
- package/components/avatar.js +58 -44
- package/components/badge.js +3 -3
- package/components/brand-texture.js +1 -1
- package/components/breadcrumbs.d.ts +27 -1
- package/components/breadcrumbs.js +94 -42
- package/components/button.js +15 -15
- package/components/carousel.js +10 -10
- package/components/chart.js +77 -77
- package/components/chip.js +3 -3
- package/components/code-block.d.ts +39 -17
- package/components/code-block.js +153 -104
- package/components/command-palette.js +27 -25
- package/components/connector-card.js +2 -2
- package/components/dropdown.js +65 -61
- package/components/empty-state.js +15 -15
- package/components/field.js +23 -23
- package/components/index.d.ts +4 -0
- package/components/index.js +523 -477
- package/components/infinite-canvas.js +60 -60
- package/components/kbd.js +6 -6
- package/components/link.js +6 -6
- package/components/modal.js +22 -20
- package/components/page-header.js +1 -1
- package/components/pagination.js +22 -22
- package/components/pixel-blast-svg.js +1 -1
- package/components/pixel-icon.d.ts +31 -0
- package/components/pixel-icon.js +733 -0
- package/components/popover.js +46 -42
- package/components/ripple.d.ts +29 -0
- package/components/ripple.js +17 -0
- package/components/segmented.js +24 -23
- package/components/select.js +71 -67
- package/components/selection-action-bar.js +22 -22
- package/components/sidebar.d.ts +11 -3
- package/components/sidebar.js +161 -148
- package/components/stepper.d.ts +2 -0
- package/components/stepper.js +80 -43
- package/components/table.d.ts +7 -0
- package/components/table.js +223 -155
- package/components/tabs.d.ts +3 -1
- package/components/tabs.js +165 -144
- package/components/textarea.js +10 -8
- package/components/toast.js +48 -46
- package/components/tooltip.js +61 -59
- package/components/tree.js +44 -41
- package/components/typography.d.ts +1 -1
- package/components/typography.js +25 -25
- package/components/viz-charts.js +133 -133
- package/fonts/aribau-grotesk-500.otf +0 -0
- package/fonts/aribau-grotesk-600.woff2 +0 -0
- package/fonts.css +6 -4
- package/lib/icons.d.ts +411 -402
- package/lib/icons.js +109 -107
- package/llms.txt +96 -8
- package/manifest.json +951 -54
- package/package.json +5 -5
- package/styles.css +206 -81
- package/theme.css +200 -77
- package/fonts/aribau-grotesk-400.otf +0 -0
- package/fonts/aribau-grotesk-700.otf +0 -0
package/components/sidebar.js
CHANGED
|
@@ -1,123 +1,127 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
3
3
|
import * as n from "react";
|
|
4
|
-
import { PanelLeft as
|
|
4
|
+
import { User as R, PanelLeft as _ } from "../lib/icons.js";
|
|
5
5
|
import { cn as o } from "../lib/cn.js";
|
|
6
|
-
import { Tooltip as
|
|
7
|
-
import { Avatar as
|
|
8
|
-
const
|
|
6
|
+
import { Tooltip as j } from "./tooltip.js";
|
|
7
|
+
import { Avatar as H } from "./avatar.js";
|
|
8
|
+
const k = n.createContext({
|
|
9
9
|
collapsed: !1,
|
|
10
10
|
toggle: () => {
|
|
11
11
|
},
|
|
12
12
|
setCollapsed: () => {
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
|
-
function
|
|
16
|
-
return n.useContext(
|
|
15
|
+
function E() {
|
|
16
|
+
return n.useContext(k);
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const I = n.forwardRef(
|
|
19
19
|
({
|
|
20
|
-
className:
|
|
20
|
+
className: t,
|
|
21
21
|
collapsed: e,
|
|
22
22
|
defaultCollapsed: i = !1,
|
|
23
|
-
onCollapsedChange:
|
|
23
|
+
onCollapsedChange: a,
|
|
24
24
|
keyboardToggle: s = !0,
|
|
25
25
|
...d
|
|
26
|
-
},
|
|
27
|
-
const [
|
|
28
|
-
(
|
|
29
|
-
|
|
26
|
+
}, l) => {
|
|
27
|
+
const [b, x] = n.useState(i), f = e !== void 0, u = f ? e : b, h = n.useCallback(
|
|
28
|
+
(p) => {
|
|
29
|
+
f || x(p), a == null || a(p);
|
|
30
30
|
},
|
|
31
|
-
[
|
|
31
|
+
[f, a]
|
|
32
32
|
), g = n.useCallback(
|
|
33
|
-
() => h(!
|
|
34
|
-
[
|
|
33
|
+
() => h(!u),
|
|
34
|
+
[u, h]
|
|
35
35
|
);
|
|
36
36
|
n.useEffect(() => {
|
|
37
37
|
if (!s) return;
|
|
38
|
-
const
|
|
38
|
+
const p = (m) => {
|
|
39
39
|
(m.metaKey || m.ctrlKey) && m.key.toLowerCase() === "b" && (m.preventDefault(), g());
|
|
40
40
|
};
|
|
41
|
-
return document.addEventListener("keydown",
|
|
41
|
+
return document.addEventListener("keydown", p), () => document.removeEventListener("keydown", p);
|
|
42
42
|
}, [s, g]);
|
|
43
|
-
const
|
|
44
|
-
() => ({ collapsed:
|
|
45
|
-
[
|
|
43
|
+
const v = n.useMemo(
|
|
44
|
+
() => ({ collapsed: u, toggle: g, setCollapsed: h }),
|
|
45
|
+
[u, g, h]
|
|
46
46
|
);
|
|
47
|
-
return /* @__PURE__ */
|
|
47
|
+
return /* @__PURE__ */ r(k.Provider, { value: v, children: /* @__PURE__ */ r(
|
|
48
48
|
"aside",
|
|
49
49
|
{
|
|
50
|
-
ref:
|
|
51
|
-
"data-collapsed":
|
|
50
|
+
ref: l,
|
|
51
|
+
"data-collapsed": u ? "true" : "false",
|
|
52
52
|
className: o(
|
|
53
53
|
"group/sidebar flex h-full shrink-0 flex-col bg-transparent",
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
u ? "w-(--sidebar-width-sm)" : "w-(--sidebar-width)",
|
|
55
|
+
t
|
|
56
56
|
),
|
|
57
57
|
...d
|
|
58
58
|
}
|
|
59
59
|
) });
|
|
60
60
|
}
|
|
61
61
|
);
|
|
62
|
-
|
|
63
|
-
function S({ children:
|
|
64
|
-
return /* @__PURE__ */
|
|
62
|
+
I.displayName = "Sidebar";
|
|
63
|
+
function S({ children: t }) {
|
|
64
|
+
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 });
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
className:
|
|
66
|
+
function z({
|
|
67
|
+
className: t,
|
|
68
68
|
onClick: e,
|
|
69
|
-
|
|
69
|
+
tooltipSide: i = "right",
|
|
70
|
+
...a
|
|
70
71
|
}) {
|
|
71
|
-
const { collapsed:
|
|
72
|
-
return /* @__PURE__ */
|
|
73
|
-
|
|
72
|
+
const { collapsed: s, toggle: d } = E();
|
|
73
|
+
return /* @__PURE__ */ r(
|
|
74
|
+
j,
|
|
74
75
|
{
|
|
75
|
-
side:
|
|
76
|
+
side: i,
|
|
76
77
|
content: /* @__PURE__ */ c("span", { className: "flex items-center gap-1.5", children: [
|
|
77
|
-
|
|
78
|
+
s ? "Expand" : "Collapse",
|
|
78
79
|
/* @__PURE__ */ c("span", { className: "flex items-center gap-0.5", children: [
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ r(S, { children: "⌘" }),
|
|
81
|
+
/* @__PURE__ */ r(S, { children: "B" })
|
|
81
82
|
] })
|
|
82
83
|
] }),
|
|
83
|
-
children: /* @__PURE__ */
|
|
84
|
+
children: /* @__PURE__ */ r(
|
|
84
85
|
"button",
|
|
85
86
|
{
|
|
86
87
|
type: "button",
|
|
87
|
-
"aria-label":
|
|
88
|
-
"aria-pressed":
|
|
89
|
-
onClick: (
|
|
90
|
-
e == null || e(
|
|
88
|
+
"aria-label": s ? "Expand sidebar" : "Collapse sidebar",
|
|
89
|
+
"aria-pressed": s,
|
|
90
|
+
onClick: (l) => {
|
|
91
|
+
e == null || e(l), d();
|
|
91
92
|
},
|
|
92
93
|
className: o(
|
|
93
94
|
"inline-flex size-(--sidebar-item) shrink-0 items-center justify-center rounded-md border border-transparent text-muted-foreground",
|
|
94
95
|
"transition-colors hover:border-border hover:bg-elevated hover:text-foreground",
|
|
95
96
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
96
97
|
"[&_svg]:size-4.5",
|
|
97
|
-
|
|
98
|
+
t
|
|
98
99
|
),
|
|
99
|
-
...
|
|
100
|
-
children: /* @__PURE__ */
|
|
100
|
+
...a,
|
|
101
|
+
children: /* @__PURE__ */ r(_, {})
|
|
101
102
|
}
|
|
102
103
|
)
|
|
103
104
|
}
|
|
104
105
|
);
|
|
105
106
|
}
|
|
106
|
-
function
|
|
107
|
-
logo:
|
|
107
|
+
function G({
|
|
108
|
+
logo: t,
|
|
108
109
|
href: e,
|
|
109
110
|
label: i = "Home",
|
|
110
|
-
showTrigger:
|
|
111
|
+
showTrigger: a = !0,
|
|
111
112
|
children: s,
|
|
112
113
|
className: d,
|
|
113
|
-
...
|
|
114
|
+
...l
|
|
114
115
|
}) {
|
|
115
|
-
const
|
|
116
|
+
const b = o(
|
|
116
117
|
// 20px mark centered in a 32px square — the same box as every other rail icon.
|
|
117
118
|
// group/brand lets a BrandMark logo play its blip loop on hover.
|
|
118
119
|
"group/brand flex size-(--sidebar-item) items-center justify-center",
|
|
119
120
|
"[&_img]:size-(--sidebar-logo) [&_svg]:size-(--sidebar-logo)",
|
|
120
|
-
|
|
121
|
+
// The logo owns the header at rest in BOTH states. On the collapsed rail
|
|
122
|
+
// it swaps for the expand trigger only while the rail is hovered (or
|
|
123
|
+
// holds keyboard focus, so the control stays reachable).
|
|
124
|
+
a && "group-data-[collapsed=true]/sidebar:group-hover/sidebar:hidden group-data-[collapsed=true]/sidebar:group-focus-within/sidebar:hidden"
|
|
121
125
|
);
|
|
122
126
|
return /* @__PURE__ */ c(
|
|
123
127
|
"div",
|
|
@@ -127,144 +131,146 @@ function X({
|
|
|
127
131
|
"group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:px-2",
|
|
128
132
|
d
|
|
129
133
|
),
|
|
130
|
-
...
|
|
134
|
+
...l,
|
|
131
135
|
children: [
|
|
132
|
-
e ? /* @__PURE__ */
|
|
133
|
-
|
|
134
|
-
|
|
136
|
+
e ? /* @__PURE__ */ r("a", { href: e, "aria-label": i, className: b, children: t }) : /* @__PURE__ */ r("span", { className: b, children: t }),
|
|
137
|
+
a && /* @__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(z, { tooltipSide: "right" }) }),
|
|
138
|
+
/* @__PURE__ */ c("div", { className: "flex items-center gap-1 group-data-[collapsed=true]/sidebar:hidden", children: [
|
|
139
|
+
a && /* @__PURE__ */ r(z, { tooltipSide: "bottom" }),
|
|
140
|
+
s
|
|
141
|
+
] })
|
|
135
142
|
]
|
|
136
143
|
}
|
|
137
144
|
);
|
|
138
145
|
}
|
|
139
|
-
const
|
|
140
|
-
({ className:
|
|
146
|
+
const L = n.forwardRef(
|
|
147
|
+
({ className: t, ...e }, i) => /* @__PURE__ */ r(
|
|
141
148
|
"div",
|
|
142
149
|
{
|
|
143
150
|
ref: i,
|
|
144
151
|
className: o(
|
|
145
152
|
"flex h-(--sidebar-header) shrink-0 items-center justify-between gap-2 px-3",
|
|
146
153
|
"group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:px-2",
|
|
147
|
-
|
|
154
|
+
t
|
|
148
155
|
),
|
|
149
156
|
...e
|
|
150
157
|
}
|
|
151
158
|
)
|
|
152
159
|
);
|
|
153
|
-
|
|
154
|
-
const
|
|
155
|
-
({ className:
|
|
160
|
+
L.displayName = "SidebarHeader";
|
|
161
|
+
const K = n.forwardRef(
|
|
162
|
+
({ className: t, ...e }, i) => /* @__PURE__ */ r("nav", { ref: i, className: o("min-h-0 flex-1 space-y-5 overflow-y-auto p-3", t), ...e })
|
|
156
163
|
);
|
|
157
|
-
|
|
164
|
+
K.displayName = "SidebarNav";
|
|
158
165
|
const A = n.forwardRef(
|
|
159
|
-
({ className:
|
|
160
|
-
e && /* @__PURE__ */
|
|
161
|
-
/* @__PURE__ */
|
|
166
|
+
({ className: t, label: e, children: i, ...a }, s) => /* @__PURE__ */ c("div", { ref: s, className: t, ...a, children: [
|
|
167
|
+
e && /* @__PURE__ */ r("div", { className: "mb-1.5 px-3 text-[length:var(--sidebar-section-label-size)] leading-[var(--text-xs--line-height)] font-normal text-secondary group-data-[collapsed=true]/sidebar:hidden", children: e }),
|
|
168
|
+
/* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: i })
|
|
162
169
|
] })
|
|
163
170
|
);
|
|
164
171
|
A.displayName = "SidebarSection";
|
|
165
|
-
const
|
|
166
|
-
({ className:
|
|
172
|
+
const M = n.forwardRef(
|
|
173
|
+
({ className: t, icon: e, isActive: i, endContent: a, children: s, title: d, ...l }, b) => /* @__PURE__ */ c(
|
|
167
174
|
"a",
|
|
168
175
|
{
|
|
169
|
-
ref:
|
|
176
|
+
ref: b,
|
|
170
177
|
"aria-current": i ? "page" : void 0,
|
|
171
178
|
title: d ?? (typeof s == "string" ? s : void 0),
|
|
172
179
|
className: o(
|
|
173
|
-
"flex items-center gap-2.5 rounded-md px-3
|
|
180
|
+
"flex h-9 items-center gap-2.5 rounded-md px-3 text-[length:var(--sidebar-navigation-text-size)] leading-[var(--text-xs--line-height)] transition-colors",
|
|
174
181
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
175
182
|
"[&_svg]:size-4 [&_svg]:shrink-0",
|
|
176
183
|
// Collapsed: a centered square (--sidebar-item) so every rail item lines up.
|
|
177
184
|
"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",
|
|
178
|
-
i ? "bg-
|
|
179
|
-
|
|
185
|
+
i ? "bg-sidebar-accent font-normal text-foreground" : "text-primary hover:bg-sidebar-accent/60 hover:text-foreground",
|
|
186
|
+
t
|
|
180
187
|
),
|
|
181
|
-
...
|
|
188
|
+
...l,
|
|
182
189
|
children: [
|
|
183
190
|
e,
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
|
|
191
|
+
/* @__PURE__ */ r("span", { className: "min-w-0 flex-1 truncate group-data-[collapsed=true]/sidebar:hidden", children: s }),
|
|
192
|
+
a && /* @__PURE__ */ r("span", { className: "shrink-0 group-data-[collapsed=true]/sidebar:hidden", children: a })
|
|
186
193
|
]
|
|
187
194
|
}
|
|
188
195
|
)
|
|
189
196
|
);
|
|
190
|
-
|
|
191
|
-
const
|
|
192
|
-
({ className:
|
|
197
|
+
M.displayName = "SidebarItem";
|
|
198
|
+
const q = n.forwardRef(
|
|
199
|
+
({ className: t, ...e }, i) => /* @__PURE__ */ r(
|
|
193
200
|
"div",
|
|
194
201
|
{
|
|
195
202
|
ref: i,
|
|
196
|
-
className: o("shrink-0 p-3 group-data-[collapsed=true]/sidebar:px-2",
|
|
203
|
+
className: o("shrink-0 p-3 group-data-[collapsed=true]/sidebar:px-2", t),
|
|
197
204
|
...e
|
|
198
205
|
}
|
|
199
206
|
)
|
|
200
207
|
);
|
|
201
|
-
|
|
202
|
-
const
|
|
203
|
-
({ className:
|
|
208
|
+
q.displayName = "SidebarFooter";
|
|
209
|
+
const B = n.forwardRef(
|
|
210
|
+
({ className: t, icon: e, children: i, ...a }, s) => /* @__PURE__ */ r("div", { className: "px-3 pb-0.5 group-data-[collapsed=true]/sidebar:px-2", children: /* @__PURE__ */ c(
|
|
204
211
|
"button",
|
|
205
212
|
{
|
|
206
213
|
ref: s,
|
|
207
214
|
type: "button",
|
|
208
215
|
className: o(
|
|
209
|
-
"flex h-
|
|
210
|
-
"text-[length:var(--sidebar-navigation-text-size)] leading-[var(--text-xs--line-height)] font-
|
|
211
|
-
//
|
|
212
|
-
// hover
|
|
213
|
-
"
|
|
214
|
-
"
|
|
215
|
-
"hover:-translate-y-0.5 active:translate-y-0",
|
|
216
|
+
"flex h-9 w-full items-center justify-start gap-2 rounded-md px-3",
|
|
217
|
+
"text-[length:var(--sidebar-navigation-text-size)] leading-[var(--text-xs--line-height)] font-normal text-primary",
|
|
218
|
+
// Reads as a normal nav item: transparent at rest, the shared grey
|
|
219
|
+
// hover wash on hover (no fill-at-rest, no elevation).
|
|
220
|
+
"transition-colors duration-(--duration-fast) ease-out motion-reduce:transition-none",
|
|
221
|
+
"hover:bg-sidebar-accent/60 hover:text-foreground",
|
|
216
222
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
217
223
|
"[&_svg]:size-4 [&_svg]:shrink-0",
|
|
218
224
|
"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",
|
|
219
|
-
|
|
225
|
+
t
|
|
220
226
|
),
|
|
221
|
-
...
|
|
227
|
+
...a,
|
|
222
228
|
children: [
|
|
223
229
|
e,
|
|
224
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ r("span", { className: "truncate group-data-[collapsed=true]/sidebar:hidden", children: i })
|
|
225
231
|
]
|
|
226
232
|
}
|
|
227
233
|
) })
|
|
228
234
|
);
|
|
229
|
-
|
|
230
|
-
const
|
|
231
|
-
({ className:
|
|
235
|
+
B.displayName = "SidebarAction";
|
|
236
|
+
const D = n.forwardRef(
|
|
237
|
+
({ className: t, label: e, children: i, ...a }, s) => /* @__PURE__ */ c(
|
|
232
238
|
"div",
|
|
233
239
|
{
|
|
234
240
|
ref: s,
|
|
235
|
-
className: o("group-data-[collapsed=true]/sidebar:hidden",
|
|
236
|
-
...
|
|
241
|
+
className: o("group-data-[collapsed=true]/sidebar:hidden", t),
|
|
242
|
+
...a,
|
|
237
243
|
children: [
|
|
238
|
-
e && /* @__PURE__ */
|
|
239
|
-
/* @__PURE__ */
|
|
244
|
+
e && /* @__PURE__ */ r("div", { className: "mb-1.5 px-3 text-[length:var(--sidebar-section-label-size)] leading-[var(--text-xs--line-height)] font-normal text-secondary", children: e }),
|
|
245
|
+
/* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: i })
|
|
240
246
|
]
|
|
241
247
|
}
|
|
242
248
|
)
|
|
243
249
|
);
|
|
244
|
-
|
|
245
|
-
const
|
|
246
|
-
const
|
|
250
|
+
D.displayName = "SidebarHistory";
|
|
251
|
+
const F = n.forwardRef(({ className: t, children: e, title: i, action: a, isActive: s, icon: d, ...l }, b) => {
|
|
252
|
+
const x = n.useRef(null), f = n.useRef(null), [u, h] = n.useState(0);
|
|
247
253
|
n.useLayoutEffect(() => {
|
|
248
|
-
const
|
|
249
|
-
if (!
|
|
254
|
+
const p = x.current, m = f.current;
|
|
255
|
+
if (!p || !m) return;
|
|
250
256
|
const N = () => {
|
|
251
|
-
const w = m.scrollWidth -
|
|
252
|
-
h(w > 0 ? w + (
|
|
257
|
+
const w = m.scrollWidth - p.clientWidth;
|
|
258
|
+
h(w > 0 ? w + (a ? 32 : 0) : 0);
|
|
253
259
|
};
|
|
254
260
|
N();
|
|
255
261
|
const y = new ResizeObserver(N);
|
|
256
|
-
return y.observe(
|
|
257
|
-
}, [e,
|
|
258
|
-
const g =
|
|
262
|
+
return y.observe(p), y.observe(m), () => y.disconnect();
|
|
263
|
+
}, [e, a]);
|
|
264
|
+
const g = u > 0, v = Math.max(500, Math.round(u * 18));
|
|
259
265
|
return /* @__PURE__ */ c(
|
|
260
266
|
"div",
|
|
261
267
|
{
|
|
262
268
|
className: o(
|
|
263
269
|
"group/hist relative flex items-center rounded-md transition-colors",
|
|
264
|
-
s ? "bg-
|
|
270
|
+
s ? "bg-sidebar-accent/60 text-foreground" : "text-muted-foreground hover:bg-sidebar-accent/60 hover:text-foreground"
|
|
265
271
|
),
|
|
266
272
|
children: [
|
|
267
|
-
d && /* @__PURE__ */
|
|
273
|
+
d && /* @__PURE__ */ r(
|
|
268
274
|
"span",
|
|
269
275
|
{
|
|
270
276
|
"aria-hidden": !0,
|
|
@@ -272,23 +278,23 @@ const D = n.forwardRef(({ className: a, children: e, title: i, action: r, isActi
|
|
|
272
278
|
children: d
|
|
273
279
|
}
|
|
274
280
|
),
|
|
275
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ r(
|
|
276
282
|
"a",
|
|
277
283
|
{
|
|
278
|
-
ref:
|
|
284
|
+
ref: b,
|
|
279
285
|
title: i ?? (typeof e == "string" ? e : void 0),
|
|
280
286
|
className: o(
|
|
281
287
|
// Left pad matches a SidebarItem's text column (px-3 + icon size-4 +
|
|
282
288
|
// gap-2.5 = 2.375rem) so history titles line up under the nav labels.
|
|
283
289
|
"block min-w-0 flex-1 rounded-md py-1.5 pr-3 ps-(--sidebar-text-indent) text-[length:var(--sidebar-navigation-text-size)] leading-[var(--text-xs--line-height)]",
|
|
284
290
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
285
|
-
|
|
291
|
+
t
|
|
286
292
|
),
|
|
287
|
-
...
|
|
288
|
-
children: /* @__PURE__ */
|
|
293
|
+
...l,
|
|
294
|
+
children: /* @__PURE__ */ r(
|
|
289
295
|
"span",
|
|
290
296
|
{
|
|
291
|
-
ref:
|
|
297
|
+
ref: x,
|
|
292
298
|
className: o(
|
|
293
299
|
"block overflow-hidden",
|
|
294
300
|
// Rest: fade the right edge (no ellipsis). Hover: the title scrolls,
|
|
@@ -297,18 +303,18 @@ const D = n.forwardRef(({ className: a, children: e, title: i, action: r, isActi
|
|
|
297
303
|
g && "[mask-image:linear-gradient(to_right,#000_calc(100%-1.5rem),transparent)]",
|
|
298
304
|
g && "group-hover/hist:[mask-image:linear-gradient(to_right,transparent,#000_1.25rem,#000_100%)]"
|
|
299
305
|
),
|
|
300
|
-
children: /* @__PURE__ */
|
|
306
|
+
children: /* @__PURE__ */ r(
|
|
301
307
|
"span",
|
|
302
308
|
{
|
|
303
|
-
ref:
|
|
309
|
+
ref: f,
|
|
304
310
|
className: o(
|
|
305
311
|
"block w-max whitespace-nowrap transition-transform ease-linear",
|
|
306
312
|
g && "group-hover/hist:[transform:translateX(var(--mq-x))]",
|
|
307
313
|
"motion-reduce:transition-none motion-reduce:group-hover/hist:[transform:none]"
|
|
308
314
|
),
|
|
309
315
|
style: {
|
|
310
|
-
"--mq-x": `-${
|
|
311
|
-
transitionDuration: `${
|
|
316
|
+
"--mq-x": `-${u}px`,
|
|
317
|
+
transitionDuration: `${v}ms`
|
|
312
318
|
},
|
|
313
319
|
children: e
|
|
314
320
|
}
|
|
@@ -317,7 +323,7 @@ const D = n.forwardRef(({ className: a, children: e, title: i, action: r, isActi
|
|
|
317
323
|
)
|
|
318
324
|
}
|
|
319
325
|
),
|
|
320
|
-
|
|
326
|
+
a && /* @__PURE__ */ r(
|
|
321
327
|
"span",
|
|
322
328
|
{
|
|
323
329
|
className: o(
|
|
@@ -329,49 +335,56 @@ const D = n.forwardRef(({ className: a, children: e, title: i, action: r, isActi
|
|
|
329
335
|
"pointer-events-none group-hover/hist:pointer-events-auto",
|
|
330
336
|
"focus-within:pointer-events-auto focus-within:opacity-100"
|
|
331
337
|
),
|
|
332
|
-
children:
|
|
338
|
+
children: a
|
|
333
339
|
}
|
|
334
340
|
)
|
|
335
341
|
]
|
|
336
342
|
}
|
|
337
343
|
);
|
|
338
344
|
});
|
|
339
|
-
|
|
340
|
-
const
|
|
341
|
-
({ className:
|
|
345
|
+
F.displayName = "SidebarHistoryItem";
|
|
346
|
+
const W = n.forwardRef(
|
|
347
|
+
({ className: t, name: e, role: i, src: a, hideAvatar: s, ...d }, l) => /* @__PURE__ */ c(
|
|
342
348
|
"a",
|
|
343
349
|
{
|
|
344
|
-
ref:
|
|
350
|
+
ref: l,
|
|
345
351
|
className: o(
|
|
346
|
-
"flex items-center gap-2.5 rounded-md p-2 transition-colors hover:bg-
|
|
352
|
+
"flex items-center gap-2.5 rounded-md p-2 transition-colors hover:bg-sidebar-accent/60",
|
|
347
353
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
348
354
|
"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",
|
|
349
|
-
|
|
355
|
+
t
|
|
350
356
|
),
|
|
351
|
-
...
|
|
357
|
+
...d,
|
|
352
358
|
children: [
|
|
353
|
-
/* @__PURE__ */
|
|
359
|
+
!s && /* @__PURE__ */ r(H, { size: "sm", name: e, src: a }),
|
|
360
|
+
s && /* @__PURE__ */ r(
|
|
361
|
+
R,
|
|
362
|
+
{
|
|
363
|
+
"aria-hidden": !0,
|
|
364
|
+
className: "hidden size-4 shrink-0 text-muted-foreground group-data-[collapsed=true]/sidebar:block"
|
|
365
|
+
}
|
|
366
|
+
),
|
|
354
367
|
/* @__PURE__ */ c("div", { className: "min-w-0 leading-tight group-data-[collapsed=true]/sidebar:hidden", children: [
|
|
355
|
-
/* @__PURE__ */
|
|
356
|
-
i && /* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ r("div", { className: "truncate text-base leading-[var(--text-base--line-height)] font-normal text-foreground", children: e }),
|
|
369
|
+
i && /* @__PURE__ */ r("div", { className: "truncate text-xs leading-[var(--text-xs--line-height)] text-tertiary", children: i })
|
|
357
370
|
] })
|
|
358
371
|
]
|
|
359
372
|
}
|
|
360
373
|
)
|
|
361
374
|
);
|
|
362
|
-
|
|
375
|
+
W.displayName = "SidebarAccount";
|
|
363
376
|
export {
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
377
|
+
I as Sidebar,
|
|
378
|
+
W as SidebarAccount,
|
|
379
|
+
B as SidebarAction,
|
|
380
|
+
G as SidebarBrand,
|
|
381
|
+
q as SidebarFooter,
|
|
382
|
+
L as SidebarHeader,
|
|
383
|
+
D as SidebarHistory,
|
|
384
|
+
F as SidebarHistoryItem,
|
|
385
|
+
M as SidebarItem,
|
|
386
|
+
K as SidebarNav,
|
|
374
387
|
A as SidebarSection,
|
|
375
|
-
|
|
376
|
-
|
|
388
|
+
z as SidebarTrigger,
|
|
389
|
+
E as useSidebar
|
|
377
390
|
};
|
package/components/stepper.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ export interface StepperProps extends Omit<React.HTMLAttributes<HTMLOListElement
|
|
|
35
35
|
activeIndex: number;
|
|
36
36
|
/** Makes completed steps navigable. */
|
|
37
37
|
onSelect?: (index: number) => void;
|
|
38
|
+
/** Places each label below its marker or directly beside it. */
|
|
39
|
+
labelPosition?: "below" | "inline";
|
|
38
40
|
}
|
|
39
41
|
export declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<HTMLOListElement>>;
|
|
40
42
|
export { markerVariants as stepperMarkerVariants };
|