@actioneer/ads 1.0.8 → 1.0.9
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 +42 -8
- package/README.md +16 -4
- package/components/assistant-ui/composer-harness.js +5 -4
- package/components/breadcrumbs.js +12 -12
- package/components/button.d.ts +16 -1
- package/components/button.js +7 -4
- package/components/chart.d.ts +31 -4
- package/components/chart.js +747 -572
- package/components/chip.d.ts +2 -1
- package/components/chip.js +37 -34
- package/components/filters.d.ts +37 -0
- package/components/filters.js +129 -0
- package/components/index.d.ts +1 -0
- package/components/index.js +447 -444
- package/components/modal.d.ts +2 -1
- package/components/modal.js +101 -90
- package/components/popover.d.ts +6 -1
- package/components/popover.js +74 -64
- package/components/sidebar.d.ts +15 -0
- package/components/sidebar.js +186 -149
- package/components/table.d.ts +8 -0
- package/components/table.js +357 -350
- package/components/tabs.d.ts +6 -1
- package/components/tabs.js +28 -31
- package/demo/components/add-to-artifact.js +3 -2
- package/examples/README.md +3 -2
- package/examples/campaign-analysis-screen.tsx +138 -0
- package/examples/campaigns-screen.tsx +439 -0
- package/lib/icons.js +3 -3
- package/llms.txt +81 -17
- package/manifest.json +1601 -83
- package/package.json +1 -1
package/components/sidebar.js
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
3
|
-
import * as
|
|
4
|
-
import { MotionConfig as
|
|
5
|
-
import { User as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { springSidebar as
|
|
8
|
-
import { Tooltip as
|
|
9
|
-
import { Avatar as
|
|
10
|
-
const
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { MotionConfig as j, motion as _ } from "motion/react";
|
|
5
|
+
import { User as E, PanelLeft as H } from "../lib/icons.js";
|
|
6
|
+
import { cn as o } from "../lib/cn.js";
|
|
7
|
+
import { springSidebar as I } from "../lib/motion.js";
|
|
8
|
+
import { Tooltip as L } from "./tooltip.js";
|
|
9
|
+
import { Avatar as M } from "./avatar.js";
|
|
10
|
+
const z = n.createContext({
|
|
11
11
|
collapsed: !1,
|
|
12
12
|
toggle: () => {
|
|
13
13
|
},
|
|
14
14
|
setCollapsed: () => {
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
|
-
function
|
|
18
|
-
return
|
|
17
|
+
function W() {
|
|
18
|
+
return n.useContext(z);
|
|
19
19
|
}
|
|
20
|
-
const K =
|
|
20
|
+
const K = n.forwardRef(
|
|
21
21
|
({
|
|
22
|
-
className:
|
|
22
|
+
className: a,
|
|
23
23
|
collapsed: e,
|
|
24
|
-
defaultCollapsed:
|
|
25
|
-
onCollapsedChange:
|
|
24
|
+
defaultCollapsed: i = !1,
|
|
25
|
+
onCollapsedChange: t,
|
|
26
26
|
animateOnMount: s = !1,
|
|
27
27
|
keyboardToggle: d = !0,
|
|
28
28
|
...l
|
|
29
|
-
},
|
|
30
|
-
const [
|
|
29
|
+
}, b) => {
|
|
30
|
+
const [g, y] = n.useState(i), f = e !== void 0, u = f ? e : g, m = n.useCallback(
|
|
31
31
|
(p) => {
|
|
32
|
-
|
|
32
|
+
f || y(p), t == null || t(p);
|
|
33
33
|
},
|
|
34
|
-
[
|
|
35
|
-
),
|
|
36
|
-
() =>
|
|
37
|
-
[u,
|
|
34
|
+
[f, t]
|
|
35
|
+
), x = n.useCallback(
|
|
36
|
+
() => m(!u),
|
|
37
|
+
[u, m]
|
|
38
38
|
);
|
|
39
|
-
|
|
39
|
+
n.useEffect(() => {
|
|
40
40
|
if (!d) return;
|
|
41
|
-
const p = (
|
|
42
|
-
(
|
|
41
|
+
const p = (h) => {
|
|
42
|
+
(h.metaKey || h.ctrlKey) && h.key.toLowerCase() === "b" && (h.preventDefault(), x());
|
|
43
43
|
};
|
|
44
44
|
return document.addEventListener("keydown", p), () => document.removeEventListener("keydown", p);
|
|
45
|
-
}, [d,
|
|
46
|
-
const
|
|
47
|
-
() => ({ collapsed: u, toggle:
|
|
48
|
-
[u,
|
|
45
|
+
}, [d, x]);
|
|
46
|
+
const v = n.useMemo(
|
|
47
|
+
() => ({ collapsed: u, toggle: x, setCollapsed: m }),
|
|
48
|
+
[u, x, m]
|
|
49
49
|
);
|
|
50
|
-
return /* @__PURE__ */ r(
|
|
51
|
-
|
|
50
|
+
return /* @__PURE__ */ r(z.Provider, { value: v, children: /* @__PURE__ */ r(j, { reducedMotion: "user", children: /* @__PURE__ */ r(
|
|
51
|
+
_.aside,
|
|
52
52
|
{
|
|
53
|
-
ref:
|
|
53
|
+
ref: b,
|
|
54
54
|
"data-collapsed": u ? "true" : "false",
|
|
55
55
|
initial: s ? {
|
|
56
56
|
width: u ? 56 : 240,
|
|
@@ -62,10 +62,10 @@ const K = o.forwardRef(
|
|
|
62
62
|
transform: "translate3d(0, 0, 0)",
|
|
63
63
|
opacity: 1
|
|
64
64
|
},
|
|
65
|
-
transition:
|
|
66
|
-
className:
|
|
65
|
+
transition: I,
|
|
66
|
+
className: o(
|
|
67
67
|
"group/sidebar flex h-full shrink-0 flex-col bg-background",
|
|
68
|
-
|
|
68
|
+
a
|
|
69
69
|
),
|
|
70
70
|
...l
|
|
71
71
|
}
|
|
@@ -73,20 +73,20 @@ const K = o.forwardRef(
|
|
|
73
73
|
}
|
|
74
74
|
);
|
|
75
75
|
K.displayName = "Sidebar";
|
|
76
|
-
function S({ children:
|
|
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:
|
|
76
|
+
function S({ children: a }) {
|
|
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: a });
|
|
78
78
|
}
|
|
79
79
|
function k({
|
|
80
|
-
className:
|
|
80
|
+
className: a,
|
|
81
81
|
onClick: e,
|
|
82
|
-
tooltipSide:
|
|
83
|
-
...
|
|
82
|
+
tooltipSide: i = "right",
|
|
83
|
+
...t
|
|
84
84
|
}) {
|
|
85
|
-
const { collapsed: s, toggle: d } =
|
|
85
|
+
const { collapsed: s, toggle: d } = W();
|
|
86
86
|
return /* @__PURE__ */ r(
|
|
87
|
-
|
|
87
|
+
L,
|
|
88
88
|
{
|
|
89
|
-
side:
|
|
89
|
+
side: i,
|
|
90
90
|
content: /* @__PURE__ */ c("span", { className: "flex items-center gap-1.5", children: [
|
|
91
91
|
s ? "Expand" : "Collapse",
|
|
92
92
|
/* @__PURE__ */ c("span", { className: "flex items-center gap-0.5", children: [
|
|
@@ -103,100 +103,136 @@ function k({
|
|
|
103
103
|
onClick: (l) => {
|
|
104
104
|
e == null || e(l), d();
|
|
105
105
|
},
|
|
106
|
-
className:
|
|
106
|
+
className: o(
|
|
107
107
|
"inline-flex size-(--sidebar-item) shrink-0 items-center justify-center rounded-sm border border-transparent text-muted-foreground",
|
|
108
108
|
"transition-colors hover:border-border hover:bg-elevated hover:text-foreground",
|
|
109
109
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
110
110
|
"[&_svg]:size-4.5",
|
|
111
|
-
|
|
111
|
+
a
|
|
112
112
|
),
|
|
113
|
-
...
|
|
114
|
-
children: /* @__PURE__ */ r(
|
|
113
|
+
...t,
|
|
114
|
+
children: /* @__PURE__ */ r(H, {})
|
|
115
115
|
}
|
|
116
116
|
)
|
|
117
117
|
}
|
|
118
118
|
);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
121
|
-
logo:
|
|
120
|
+
function Z({
|
|
121
|
+
logo: a,
|
|
122
122
|
href: e,
|
|
123
|
-
label:
|
|
124
|
-
showTrigger:
|
|
123
|
+
label: i = "Home",
|
|
124
|
+
showTrigger: t = !0,
|
|
125
125
|
children: s,
|
|
126
126
|
className: d,
|
|
127
127
|
...l
|
|
128
128
|
}) {
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
const b = n.isValidElement(a) && a.type === R, g = o(
|
|
130
|
+
b ? "flex min-w-0 items-center rounded-m outline-none focus-visible:ring-3 focus-visible:ring-ring" : o(
|
|
131
|
+
// 20px mark centered in a 32px square — the same box as every other rail icon.
|
|
132
|
+
// group/brand lets a BrandMark logo play its blip loop on hover.
|
|
133
|
+
"group/brand flex size-(--sidebar-item) items-center justify-center",
|
|
134
|
+
"[&_img]:size-(--sidebar-logo) [&_svg]:size-(--sidebar-logo)"
|
|
135
|
+
),
|
|
134
136
|
// The logo owns the header at rest in BOTH states. On the collapsed rail
|
|
135
137
|
// it swaps for the expand trigger only while the rail is hovered (or
|
|
136
138
|
// holds keyboard focus, so the control stays reachable).
|
|
137
|
-
|
|
139
|
+
t && "group-data-[collapsed=true]/sidebar:group-hover/sidebar:hidden group-data-[collapsed=true]/sidebar:group-focus-within/sidebar:hidden"
|
|
138
140
|
);
|
|
139
141
|
return /* @__PURE__ */ c(
|
|
140
142
|
"div",
|
|
141
143
|
{
|
|
142
|
-
className:
|
|
144
|
+
className: o(
|
|
143
145
|
"flex h-(--sidebar-header) shrink-0 items-center justify-between gap-2 px-4",
|
|
144
146
|
"group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:px-2",
|
|
145
147
|
d
|
|
146
148
|
),
|
|
147
149
|
...l,
|
|
148
150
|
children: [
|
|
149
|
-
e ? /* @__PURE__ */ r("a", { href: e, "aria-label":
|
|
150
|
-
|
|
151
|
+
e ? /* @__PURE__ */ r("a", { href: e, "aria-label": i, className: g, children: a }) : /* @__PURE__ */ r("span", { className: g, children: a }),
|
|
152
|
+
t && /* @__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" }) }),
|
|
151
153
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-1 group-data-[collapsed=true]/sidebar:hidden", children: [
|
|
152
|
-
|
|
154
|
+
t && /* @__PURE__ */ r(k, { tooltipSide: "bottom" }),
|
|
153
155
|
s
|
|
154
156
|
] })
|
|
155
157
|
]
|
|
156
158
|
}
|
|
157
159
|
);
|
|
158
160
|
}
|
|
159
|
-
const
|
|
160
|
-
({ className: t, ...
|
|
161
|
+
const R = n.forwardRef(
|
|
162
|
+
({ className: a, name: e, logoSrc: i, showName: t = !0, ...s }, d) => {
|
|
163
|
+
const l = e.trim().charAt(0).toUpperCase();
|
|
164
|
+
return /* @__PURE__ */ c(
|
|
165
|
+
"span",
|
|
166
|
+
{
|
|
167
|
+
ref: d,
|
|
168
|
+
className: o("flex min-w-0 items-center gap-2.5", a),
|
|
169
|
+
...s,
|
|
170
|
+
children: [
|
|
171
|
+
i ? /* @__PURE__ */ r(
|
|
172
|
+
"img",
|
|
173
|
+
{
|
|
174
|
+
src: i,
|
|
175
|
+
alt: t ? "" : e,
|
|
176
|
+
className: "size-(--sidebar-item) shrink-0 rounded-m object-contain"
|
|
177
|
+
}
|
|
178
|
+
) : /* @__PURE__ */ r(
|
|
179
|
+
"span",
|
|
180
|
+
{
|
|
181
|
+
"aria-hidden": t || void 0,
|
|
182
|
+
role: t ? void 0 : "img",
|
|
183
|
+
"aria-label": t ? void 0 : e,
|
|
184
|
+
className: "flex size-(--sidebar-item) shrink-0 items-center justify-center rounded-m bg-wg12 text-m leading-[var(--text-m--line-height)] font-medium text-white",
|
|
185
|
+
children: l
|
|
186
|
+
}
|
|
187
|
+
),
|
|
188
|
+
t && /* @__PURE__ */ r("span", { className: "min-w-0 truncate text-l leading-[var(--text-l--line-height)] font-medium text-foreground group-data-[collapsed=true]/sidebar:sr-only", children: e })
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
);
|
|
194
|
+
R.displayName = "SidebarWorkspace";
|
|
195
|
+
const q = n.forwardRef(
|
|
196
|
+
({ className: a, ...e }, i) => /* @__PURE__ */ r(
|
|
161
197
|
"div",
|
|
162
198
|
{
|
|
163
|
-
ref:
|
|
164
|
-
className:
|
|
199
|
+
ref: i,
|
|
200
|
+
className: o(
|
|
165
201
|
"flex h-(--sidebar-header) shrink-0 items-center justify-between gap-2 px-3",
|
|
166
202
|
"group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:px-2",
|
|
167
|
-
|
|
203
|
+
a
|
|
168
204
|
),
|
|
169
205
|
...e
|
|
170
206
|
}
|
|
171
207
|
)
|
|
172
208
|
);
|
|
173
209
|
q.displayName = "SidebarHeader";
|
|
174
|
-
const
|
|
175
|
-
({ className:
|
|
210
|
+
const A = n.forwardRef(
|
|
211
|
+
({ className: a, ...e }, i) => /* @__PURE__ */ r("nav", { ref: i, className: o("min-h-0 flex-1 space-y-5 overflow-y-auto p-3", a), ...e })
|
|
176
212
|
);
|
|
177
|
-
|
|
178
|
-
const
|
|
179
|
-
({ className:
|
|
213
|
+
A.displayName = "SidebarNav";
|
|
214
|
+
const B = n.forwardRef(
|
|
215
|
+
({ className: a, label: e, children: i, ...t }, s) => /* @__PURE__ */ c("div", { ref: s, className: a, ...t, children: [
|
|
180
216
|
e && /* @__PURE__ */ r("div", { className: "mb-1.5 px-3 text-s font-normal uppercase leading-4 tracking-wider text-tertiary 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:
|
|
217
|
+
/* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5 group-data-[collapsed=true]/sidebar:gap-2", children: i })
|
|
182
218
|
] })
|
|
183
219
|
);
|
|
184
|
-
|
|
185
|
-
const
|
|
186
|
-
({ className:
|
|
220
|
+
B.displayName = "SidebarSection";
|
|
221
|
+
const D = n.forwardRef(
|
|
222
|
+
({ className: a, icon: e, isActive: i, endContent: t, children: s, title: d, ...l }, b) => /* @__PURE__ */ c(
|
|
187
223
|
"a",
|
|
188
224
|
{
|
|
189
|
-
ref:
|
|
190
|
-
"aria-current":
|
|
225
|
+
ref: b,
|
|
226
|
+
"aria-current": i ? "page" : void 0,
|
|
191
227
|
title: d ?? (typeof s == "string" ? s : void 0),
|
|
192
|
-
className:
|
|
228
|
+
className: o(
|
|
193
229
|
"group/sidebar-item 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-sidebar-foreground",
|
|
194
230
|
"transition-[background-color,border-color,color] duration-150 ease-out motion-reduce:transition-none",
|
|
195
231
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
196
232
|
// Collapsed: a centered square (--sidebar-item) so every rail item lines up.
|
|
197
233
|
"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
|
-
|
|
199
|
-
|
|
234
|
+
i ? "bg-sidebar-accent text-sidebar-accent-foreground" : "hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground",
|
|
235
|
+
a
|
|
200
236
|
),
|
|
201
237
|
...l,
|
|
202
238
|
children: [
|
|
@@ -205,34 +241,34 @@ const F = o.forwardRef(
|
|
|
205
241
|
{
|
|
206
242
|
"aria-hidden": !0,
|
|
207
243
|
className: "flex shrink-0 items-center justify-center transition-transform duration-150 ease-out group-hover/sidebar-item:scale-110 motion-reduce:transition-none motion-reduce:group-hover/sidebar-item:scale-100 [&_svg]:size-4 [&_svg]:shrink-0",
|
|
208
|
-
children:
|
|
244
|
+
children: i && n.isValidElement(e) ? n.cloneElement(e, { weight: "fill" }) : e
|
|
209
245
|
}
|
|
210
246
|
),
|
|
211
247
|
/* @__PURE__ */ r("span", { className: "min-w-0 flex-1 truncate group-data-[collapsed=true]/sidebar:hidden", children: s }),
|
|
212
|
-
|
|
248
|
+
t && /* @__PURE__ */ r("span", { className: "shrink-0 group-data-[collapsed=true]/sidebar:hidden", children: t })
|
|
213
249
|
]
|
|
214
250
|
}
|
|
215
251
|
)
|
|
216
252
|
);
|
|
217
|
-
|
|
218
|
-
const
|
|
219
|
-
({ className:
|
|
253
|
+
D.displayName = "SidebarItem";
|
|
254
|
+
const F = n.forwardRef(
|
|
255
|
+
({ className: a, ...e }, i) => /* @__PURE__ */ r(
|
|
220
256
|
"div",
|
|
221
257
|
{
|
|
222
|
-
ref:
|
|
223
|
-
className:
|
|
258
|
+
ref: i,
|
|
259
|
+
className: o("shrink-0 p-3 group-data-[collapsed=true]/sidebar:px-2", a),
|
|
224
260
|
...e
|
|
225
261
|
}
|
|
226
262
|
)
|
|
227
263
|
);
|
|
228
|
-
|
|
229
|
-
const
|
|
230
|
-
({ className:
|
|
264
|
+
F.displayName = "SidebarFooter";
|
|
265
|
+
const U = n.forwardRef(
|
|
266
|
+
({ className: a, icon: e, children: i, ...t }, s) => /* @__PURE__ */ r("div", { className: "px-3 pb-0.5 group-data-[collapsed=true]/sidebar:px-2", children: /* @__PURE__ */ c(
|
|
231
267
|
"button",
|
|
232
268
|
{
|
|
233
269
|
ref: s,
|
|
234
270
|
type: "button",
|
|
235
|
-
className:
|
|
271
|
+
className: o(
|
|
236
272
|
"flex h-9 w-full items-center justify-start gap-2 rounded-md px-3",
|
|
237
273
|
"text-m leading-[var(--text-m--line-height)] font-normal text-sidebar-foreground",
|
|
238
274
|
// Reads as a normal nav item: transparent at rest, the shared White
|
|
@@ -242,50 +278,50 @@ const $ = o.forwardRef(
|
|
|
242
278
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
243
279
|
"[&_svg]:size-4 [&_svg]:shrink-0",
|
|
244
280
|
"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",
|
|
245
|
-
|
|
281
|
+
a
|
|
246
282
|
),
|
|
247
|
-
...
|
|
283
|
+
...t,
|
|
248
284
|
children: [
|
|
249
285
|
e,
|
|
250
|
-
/* @__PURE__ */ r("span", { className: "truncate group-data-[collapsed=true]/sidebar:hidden", children:
|
|
286
|
+
/* @__PURE__ */ r("span", { className: "truncate group-data-[collapsed=true]/sidebar:hidden", children: i })
|
|
251
287
|
]
|
|
252
288
|
}
|
|
253
289
|
) })
|
|
254
290
|
);
|
|
255
|
-
|
|
256
|
-
const
|
|
257
|
-
({ className:
|
|
291
|
+
U.displayName = "SidebarAction";
|
|
292
|
+
const V = n.forwardRef(
|
|
293
|
+
({ className: a, label: e, children: i, ...t }, s) => /* @__PURE__ */ c(
|
|
258
294
|
"div",
|
|
259
295
|
{
|
|
260
296
|
ref: s,
|
|
261
|
-
className:
|
|
262
|
-
...
|
|
297
|
+
className: o("group-data-[collapsed=true]/sidebar:hidden", a),
|
|
298
|
+
...t,
|
|
263
299
|
children: [
|
|
264
|
-
e && /* @__PURE__ */ r("div", { className: "mb-1.5 px-3 text-s leading-
|
|
265
|
-
/* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children:
|
|
300
|
+
e && /* @__PURE__ */ r("div", { className: "mb-1.5 px-3 text-s font-normal uppercase leading-4 tracking-wider text-tertiary", children: e }),
|
|
301
|
+
/* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: i })
|
|
266
302
|
]
|
|
267
303
|
}
|
|
268
304
|
)
|
|
269
305
|
);
|
|
270
|
-
|
|
271
|
-
const
|
|
272
|
-
const
|
|
273
|
-
|
|
274
|
-
const
|
|
275
|
-
if (!
|
|
276
|
-
const
|
|
277
|
-
const w = p.scrollWidth -
|
|
278
|
-
u(w > 0 ? w + (
|
|
306
|
+
V.displayName = "SidebarHistory";
|
|
307
|
+
const $ = n.forwardRef(({ className: a, children: e, title: i, action: t, isActive: s, icon: d, ...l }, b) => {
|
|
308
|
+
const g = n.useRef(null), y = n.useRef(null), [f, u] = n.useState(0);
|
|
309
|
+
n.useLayoutEffect(() => {
|
|
310
|
+
const v = g.current, p = y.current;
|
|
311
|
+
if (!v || !p) return;
|
|
312
|
+
const h = () => {
|
|
313
|
+
const w = p.scrollWidth - v.clientWidth;
|
|
314
|
+
u(w > 0 ? w + (t ? 32 : 0) : 0);
|
|
279
315
|
};
|
|
280
|
-
|
|
281
|
-
const N = new ResizeObserver(
|
|
282
|
-
return N.observe(
|
|
283
|
-
}, [e,
|
|
284
|
-
const
|
|
316
|
+
h();
|
|
317
|
+
const N = new ResizeObserver(h);
|
|
318
|
+
return N.observe(v), N.observe(p), () => N.disconnect();
|
|
319
|
+
}, [e, t]);
|
|
320
|
+
const m = f > 0, x = Math.max(500, Math.round(f * 18));
|
|
285
321
|
return /* @__PURE__ */ c(
|
|
286
322
|
"div",
|
|
287
323
|
{
|
|
288
|
-
className:
|
|
324
|
+
className: o(
|
|
289
325
|
"group/hist relative flex items-center rounded-md transition-colors",
|
|
290
326
|
"text-sidebar-foreground",
|
|
291
327
|
s ? "bg-sidebar-accent text-sidebar-accent-foreground" : "hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground"
|
|
@@ -302,40 +338,40 @@ const O = o.forwardRef(({ className: t, children: e, title: a, action: i, isActi
|
|
|
302
338
|
/* @__PURE__ */ r(
|
|
303
339
|
"a",
|
|
304
340
|
{
|
|
305
|
-
ref:
|
|
306
|
-
title:
|
|
307
|
-
className:
|
|
341
|
+
ref: b,
|
|
342
|
+
title: i ?? (typeof e == "string" ? e : void 0),
|
|
343
|
+
className: o(
|
|
308
344
|
// Left pad matches a SidebarItem's text column (px-3 + icon size-4 +
|
|
309
345
|
// gap-2.5 = 2.375rem) so history titles line up under the nav labels.
|
|
310
346
|
"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",
|
|
311
347
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
312
|
-
|
|
348
|
+
a
|
|
313
349
|
),
|
|
314
350
|
...l,
|
|
315
351
|
children: /* @__PURE__ */ r(
|
|
316
352
|
"span",
|
|
317
353
|
{
|
|
318
|
-
ref:
|
|
319
|
-
className:
|
|
354
|
+
ref: g,
|
|
355
|
+
className: o(
|
|
320
356
|
"block overflow-hidden",
|
|
321
357
|
// Rest: fade the right edge (no ellipsis). Hover: the title scrolls,
|
|
322
358
|
// so fade the LEFT edge where it exits; the action backdrop (or the
|
|
323
359
|
// string's own end) handles the right.
|
|
324
|
-
|
|
325
|
-
|
|
360
|
+
m && "[mask-image:linear-gradient(to_right,var(--color-wg12)_calc(100%-1.5rem),transparent)]",
|
|
361
|
+
m && "group-hover/hist:[mask-image:linear-gradient(to_right,transparent,var(--color-wg12)_1.25rem,var(--color-wg12)_100%)]"
|
|
326
362
|
),
|
|
327
363
|
children: /* @__PURE__ */ r(
|
|
328
364
|
"span",
|
|
329
365
|
{
|
|
330
366
|
ref: y,
|
|
331
|
-
className:
|
|
367
|
+
className: o(
|
|
332
368
|
"block w-max whitespace-nowrap transition-transform ease-linear",
|
|
333
|
-
|
|
369
|
+
m && "group-hover/hist:[transform:translateX(var(--mq-x))]",
|
|
334
370
|
"motion-reduce:transition-none motion-reduce:group-hover/hist:[transform:none]"
|
|
335
371
|
),
|
|
336
372
|
style: {
|
|
337
|
-
"--mq-x": `-${
|
|
338
|
-
transitionDuration: `${
|
|
373
|
+
"--mq-x": `-${f}px`,
|
|
374
|
+
transitionDuration: `${x}ms`
|
|
339
375
|
},
|
|
340
376
|
children: e
|
|
341
377
|
}
|
|
@@ -344,10 +380,10 @@ const O = o.forwardRef(({ className: t, children: e, title: a, action: i, isActi
|
|
|
344
380
|
)
|
|
345
381
|
}
|
|
346
382
|
),
|
|
347
|
-
|
|
383
|
+
t && /* @__PURE__ */ r(
|
|
348
384
|
"span",
|
|
349
385
|
{
|
|
350
|
-
className:
|
|
386
|
+
className: o(
|
|
351
387
|
// Rounded end matches the row's radius so the backdrop doesn't
|
|
352
388
|
// square off the highlight's right corners.
|
|
353
389
|
"absolute inset-y-0 right-0 flex items-center rounded-e-md pl-8 pr-1",
|
|
@@ -357,30 +393,30 @@ const O = o.forwardRef(({ className: t, children: e, title: a, action: i, isActi
|
|
|
357
393
|
"pointer-events-none group-hover/hist:pointer-events-auto",
|
|
358
394
|
"focus-within:pointer-events-auto focus-within:opacity-100"
|
|
359
395
|
),
|
|
360
|
-
children:
|
|
396
|
+
children: t
|
|
361
397
|
}
|
|
362
398
|
)
|
|
363
399
|
]
|
|
364
400
|
}
|
|
365
401
|
);
|
|
366
402
|
});
|
|
367
|
-
|
|
368
|
-
const
|
|
369
|
-
({ className:
|
|
403
|
+
$.displayName = "SidebarHistoryItem";
|
|
404
|
+
const O = n.forwardRef(
|
|
405
|
+
({ className: a, name: e, role: i, src: t, hideAvatar: s, ...d }, l) => /* @__PURE__ */ c(
|
|
370
406
|
"a",
|
|
371
407
|
{
|
|
372
408
|
ref: l,
|
|
373
|
-
className:
|
|
409
|
+
className: o(
|
|
374
410
|
"flex items-center gap-2.5 rounded-md border border-transparent p-2 transition-colors hover:border-wg10",
|
|
375
411
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
376
412
|
"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",
|
|
377
|
-
|
|
413
|
+
a
|
|
378
414
|
),
|
|
379
415
|
...d,
|
|
380
416
|
children: [
|
|
381
|
-
!s && /* @__PURE__ */ r(
|
|
417
|
+
!s && /* @__PURE__ */ r(M, { size: "sm", name: e, src: t }),
|
|
382
418
|
s && /* @__PURE__ */ r(
|
|
383
|
-
|
|
419
|
+
E,
|
|
384
420
|
{
|
|
385
421
|
"aria-hidden": !0,
|
|
386
422
|
className: "hidden size-4 shrink-0 text-muted-foreground group-data-[collapsed=true]/sidebar:block"
|
|
@@ -388,25 +424,26 @@ const P = o.forwardRef(
|
|
|
388
424
|
),
|
|
389
425
|
/* @__PURE__ */ c("div", { className: "min-w-0 leading-tight group-data-[collapsed=true]/sidebar:hidden", children: [
|
|
390
426
|
/* @__PURE__ */ r("div", { className: "truncate text-base leading-[var(--text-base--line-height)] font-normal text-foreground", children: e }),
|
|
391
|
-
|
|
427
|
+
i && /* @__PURE__ */ r("div", { className: "truncate text-s leading-[var(--text-s--line-height)] text-tertiary", children: i })
|
|
392
428
|
] })
|
|
393
429
|
]
|
|
394
430
|
}
|
|
395
431
|
)
|
|
396
432
|
);
|
|
397
|
-
|
|
433
|
+
O.displayName = "SidebarAccount";
|
|
398
434
|
export {
|
|
399
435
|
K as Sidebar,
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
436
|
+
O as SidebarAccount,
|
|
437
|
+
U as SidebarAction,
|
|
438
|
+
Z as SidebarBrand,
|
|
439
|
+
F as SidebarFooter,
|
|
404
440
|
q as SidebarHeader,
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
441
|
+
V as SidebarHistory,
|
|
442
|
+
$ as SidebarHistoryItem,
|
|
443
|
+
D as SidebarItem,
|
|
444
|
+
A as SidebarNav,
|
|
445
|
+
B as SidebarSection,
|
|
410
446
|
k as SidebarTrigger,
|
|
411
|
-
|
|
447
|
+
R as SidebarWorkspace,
|
|
448
|
+
W as useSidebar
|
|
412
449
|
};
|
package/components/table.d.ts
CHANGED
|
@@ -95,6 +95,14 @@ export interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement>
|
|
|
95
95
|
disclosureLabel?: string;
|
|
96
96
|
/** @deprecated Existing visual-only marker. New rows should pass an action via onClick. */
|
|
97
97
|
isInteractive?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* This row's detail panel is open (e.g. the shell-level inline `Drawer`
|
|
100
|
+
* that `onClick` opened). Paints the same soft-teal left-to-right fade as a
|
|
101
|
+
* selected row and sets `aria-current="true"`, without needing a selection
|
|
102
|
+
* column. Clear it when the panel closes. Independent of `selectionMode`:
|
|
103
|
+
* a row can be both active and checked.
|
|
104
|
+
*/
|
|
105
|
+
isActive?: boolean;
|
|
98
106
|
}
|
|
99
107
|
export declare const TableRow: React.ForwardRefExoticComponent<TableRowProps & React.RefAttributes<HTMLTableRowElement>>;
|
|
100
108
|
export interface TableColumnProps extends React.ThHTMLAttributes<HTMLTableCellElement> {
|