@actioneer/ads 0.5.8 → 0.6.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/assistant-ui/composer-harness.js +12 -10
- package/components/avatar.d.ts +1 -0
- package/components/avatar.js +5 -4
- package/components/breadcrumbs.d.ts +3 -1
- package/components/breadcrumbs.js +62 -56
- package/components/button.js +11 -11
- package/components/card.js +19 -18
- package/components/chart.d.ts +6 -0
- package/components/chart.js +747 -657
- package/components/date-range-picker.d.ts +25 -0
- package/components/date-range-picker.js +187 -0
- package/components/drawer.d.ts +3 -1
- package/components/drawer.js +115 -95
- package/components/index.d.ts +1 -0
- package/components/index.js +499 -497
- package/components/modal.d.ts +5 -1
- package/components/modal.js +74 -61
- package/components/panel.js +31 -28
- package/components/pixel-icon.d.ts +4 -0
- package/components/pixel-icon.js +210 -163
- package/components/segmented.d.ts +1 -0
- package/components/segmented.js +31 -28
- package/components/select.d.ts +5 -0
- package/components/select.js +177 -132
- package/components/table.d.ts +7 -0
- package/components/table.js +183 -173
- package/components/tabs.js +1 -1
- package/components/tree.js +86 -58
- package/components/viz-charts.js +186 -183
- package/demo/components/add-to-artifact.js +131 -107
- package/demo/lib/artifact-library.js +37 -29
- package/demo/lib/artifact-pin-guard.js +12 -0
- package/fonts.css +2 -0
- package/lib/icons.d.ts +20 -0
- package/lib/icons.js +112 -107
- package/llms.txt +23 -3
- package/manifest.json +13774 -14
- package/package.json +4 -1
- package/styles.css +76 -60
- package/theme.css +70 -57
package/components/modal.d.ts
CHANGED
|
@@ -8,8 +8,12 @@ export interface ModalProps extends VariantProps<typeof panelVariants> {
|
|
|
8
8
|
onOpenChange: (open: boolean) => void;
|
|
9
9
|
className?: string;
|
|
10
10
|
children: React.ReactNode;
|
|
11
|
+
showCloseButton?: boolean;
|
|
12
|
+
"aria-label"?: string;
|
|
13
|
+
"aria-labelledby"?: string;
|
|
14
|
+
"aria-describedby"?: string;
|
|
11
15
|
}
|
|
12
|
-
export declare function Modal({ open, onOpenChange, size, className, children }: ModalProps): React.ReactPortal;
|
|
16
|
+
export declare function Modal({ open, onOpenChange, size, className, children, showCloseButton, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, }: ModalProps): React.ReactPortal;
|
|
13
17
|
export declare const ModalHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
14
18
|
export declare const ModalTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
|
|
15
19
|
export declare const ModalDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
package/components/modal.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import { MotionConfig as
|
|
6
|
-
import { Close as
|
|
7
|
-
import { cva as
|
|
8
|
-
import { cn as
|
|
9
|
-
import { backdropVariants as
|
|
10
|
-
import { Ripple as
|
|
11
|
-
const
|
|
2
|
+
import { jsx as a, jsxs as y } from "react/jsx-runtime";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { createPortal as F } from "react-dom";
|
|
5
|
+
import { MotionConfig as j, AnimatePresence as z, motion as h } from "motion/react";
|
|
6
|
+
import { Close as P } from "../lib/icons.js";
|
|
7
|
+
import { cva as T } from "class-variance-authority";
|
|
8
|
+
import { cn as i } from "../lib/cn.js";
|
|
9
|
+
import { backdropVariants as V, modalPanelVariants as H } from "../lib/motion.js";
|
|
10
|
+
import { Ripple as L } from "./ripple.js";
|
|
11
|
+
const q = T(
|
|
12
12
|
[
|
|
13
13
|
"relative flex w-full flex-col",
|
|
14
14
|
// Cap height to the viewport and clip, so a tall modal scrolls its body
|
|
@@ -29,57 +29,67 @@ const T = F(
|
|
|
29
29
|
defaultVariants: { size: "md" }
|
|
30
30
|
}
|
|
31
31
|
);
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
function Z({
|
|
33
|
+
open: o,
|
|
34
|
+
onOpenChange: t,
|
|
35
|
+
size: r,
|
|
36
|
+
className: g,
|
|
37
|
+
children: w,
|
|
38
|
+
showCloseButton: M = !0,
|
|
39
|
+
"aria-label": N,
|
|
40
|
+
"aria-labelledby": k,
|
|
41
|
+
"aria-describedby": R
|
|
42
|
+
}) {
|
|
43
|
+
const d = n.useRef(null), f = n.useRef(null), u = n.useRef(null);
|
|
44
|
+
return n.useEffect(() => {
|
|
35
45
|
if (!o) return;
|
|
36
46
|
u.current = document.activeElement;
|
|
37
|
-
const
|
|
47
|
+
const E = document.body.style.overflow;
|
|
38
48
|
document.body.style.overflow = "hidden";
|
|
39
49
|
const m = f.current, p = [];
|
|
40
50
|
if (m)
|
|
41
51
|
for (const e of Array.from(document.body.children))
|
|
42
52
|
e !== m && e instanceof HTMLElement && !e.inert && (e.inert = !0, p.push(e));
|
|
43
|
-
const
|
|
53
|
+
const A = () => {
|
|
44
54
|
var e;
|
|
45
55
|
return Array.from(
|
|
46
56
|
((e = d.current) == null ? void 0 : e.querySelectorAll(
|
|
47
57
|
'a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])'
|
|
48
58
|
)) ?? []
|
|
49
59
|
);
|
|
50
|
-
},
|
|
60
|
+
}, b = (e) => {
|
|
51
61
|
if (e.key === "Escape") {
|
|
52
62
|
e.stopPropagation(), t(!1);
|
|
53
63
|
return;
|
|
54
64
|
}
|
|
55
65
|
if (e.key !== "Tab") return;
|
|
56
|
-
const
|
|
57
|
-
if (!
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
60
|
-
e.preventDefault(),
|
|
66
|
+
const l = d.current;
|
|
67
|
+
if (!l) return;
|
|
68
|
+
const s = A();
|
|
69
|
+
if (s.length === 0) {
|
|
70
|
+
e.preventDefault(), l.focus();
|
|
61
71
|
return;
|
|
62
72
|
}
|
|
63
|
-
const
|
|
64
|
-
e.shiftKey ? (c ===
|
|
73
|
+
const x = s[0], v = s[s.length - 1], c = document.activeElement;
|
|
74
|
+
e.shiftKey ? (c === x || c === l) && (e.preventDefault(), v.focus()) : c === v && (e.preventDefault(), x.focus());
|
|
65
75
|
};
|
|
66
|
-
document.addEventListener("keydown",
|
|
67
|
-
const
|
|
76
|
+
document.addEventListener("keydown", b);
|
|
77
|
+
const D = requestAnimationFrame(() => {
|
|
68
78
|
var e;
|
|
69
79
|
(e = d.current) == null || e.focus();
|
|
70
80
|
});
|
|
71
81
|
return () => {
|
|
72
|
-
var e,
|
|
73
|
-
document.removeEventListener("keydown",
|
|
74
|
-
for (const
|
|
75
|
-
cancelAnimationFrame(
|
|
82
|
+
var e, l;
|
|
83
|
+
document.removeEventListener("keydown", b), document.body.style.overflow = E;
|
|
84
|
+
for (const s of p) s.inert = !1;
|
|
85
|
+
cancelAnimationFrame(D), (l = (e = u.current) == null ? void 0 : e.focus) == null || l.call(e);
|
|
76
86
|
};
|
|
77
|
-
}, [o, t]),
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
/* @__PURE__ */
|
|
87
|
+
}, [o, t]), F(
|
|
88
|
+
/* @__PURE__ */ a(j, { reducedMotion: "user", children: /* @__PURE__ */ a(z, { children: o && /* @__PURE__ */ y("div", { ref: f, className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
|
|
89
|
+
/* @__PURE__ */ a(
|
|
80
90
|
h.div,
|
|
81
91
|
{
|
|
82
|
-
variants:
|
|
92
|
+
variants: V,
|
|
83
93
|
initial: "hidden",
|
|
84
94
|
animate: "visible",
|
|
85
95
|
exit: "hidden",
|
|
@@ -93,23 +103,26 @@ function U({ open: o, onOpenChange: t, size: r, className: g, children: w }) {
|
|
|
93
103
|
h.div,
|
|
94
104
|
{
|
|
95
105
|
ref: d,
|
|
96
|
-
variants:
|
|
106
|
+
variants: H,
|
|
97
107
|
initial: "hidden",
|
|
98
108
|
animate: "visible",
|
|
99
109
|
exit: "hidden",
|
|
100
110
|
role: "dialog",
|
|
101
111
|
"aria-modal": "true",
|
|
112
|
+
"aria-label": N,
|
|
113
|
+
"aria-labelledby": k,
|
|
114
|
+
"aria-describedby": R,
|
|
102
115
|
tabIndex: -1,
|
|
103
|
-
className:
|
|
116
|
+
className: i(q({ size: r }), "relative outline-none", g),
|
|
104
117
|
children: [
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ a(L, { origin: "center" }),
|
|
119
|
+
M ? /* @__PURE__ */ a(
|
|
107
120
|
"button",
|
|
108
121
|
{
|
|
109
122
|
type: "button",
|
|
110
123
|
onClick: () => t(!1),
|
|
111
124
|
"aria-label": "Close",
|
|
112
|
-
className:
|
|
125
|
+
className: i(
|
|
113
126
|
"absolute right-4 top-4 inline-flex size-8 items-center justify-center",
|
|
114
127
|
"rounded-sm text-muted-foreground",
|
|
115
128
|
"transition-[background,color,transform] duration-150 ease-out motion-reduce:transition-none hover:bg-muted hover:text-foreground",
|
|
@@ -117,9 +130,9 @@ function U({ open: o, onOpenChange: t, size: r, className: g, children: w }) {
|
|
|
117
130
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
118
131
|
"[&_svg]:size-4 [&_svg]:shrink-0"
|
|
119
132
|
),
|
|
120
|
-
children: /* @__PURE__ */
|
|
133
|
+
children: /* @__PURE__ */ a(P, { "aria-hidden": !0 })
|
|
121
134
|
}
|
|
122
|
-
),
|
|
135
|
+
) : null,
|
|
123
136
|
w
|
|
124
137
|
]
|
|
125
138
|
},
|
|
@@ -129,62 +142,62 @@ function U({ open: o, onOpenChange: t, size: r, className: g, children: w }) {
|
|
|
129
142
|
document.body
|
|
130
143
|
);
|
|
131
144
|
}
|
|
132
|
-
const
|
|
145
|
+
const B = n.forwardRef(({ className: o, ...t }, r) => /* @__PURE__ */ a(
|
|
133
146
|
"div",
|
|
134
147
|
{
|
|
135
148
|
ref: r,
|
|
136
|
-
className:
|
|
149
|
+
className: i("flex shrink-0 flex-col gap-1 px-6 pt-6 pr-14", o),
|
|
137
150
|
...t
|
|
138
151
|
}
|
|
139
152
|
));
|
|
140
|
-
|
|
141
|
-
const
|
|
153
|
+
B.displayName = "ModalHeader";
|
|
154
|
+
const C = n.forwardRef(({ className: o, ...t }, r) => /* @__PURE__ */ a(
|
|
142
155
|
"h2",
|
|
143
156
|
{
|
|
144
157
|
ref: r,
|
|
145
|
-
className:
|
|
158
|
+
className: i("text-lg font-medium text-foreground", o),
|
|
146
159
|
...t
|
|
147
160
|
}
|
|
148
161
|
));
|
|
149
|
-
|
|
150
|
-
const
|
|
162
|
+
C.displayName = "ModalTitle";
|
|
163
|
+
const K = n.forwardRef(({ className: o, ...t }, r) => /* @__PURE__ */ a(
|
|
151
164
|
"p",
|
|
152
165
|
{
|
|
153
166
|
ref: r,
|
|
154
|
-
className:
|
|
167
|
+
className: i("text-xs text-muted-foreground", o),
|
|
155
168
|
...t
|
|
156
169
|
}
|
|
157
170
|
));
|
|
158
|
-
|
|
159
|
-
const
|
|
171
|
+
K.displayName = "ModalDescription";
|
|
172
|
+
const _ = n.forwardRef(({ className: o, ...t }, r) => /* @__PURE__ */ a(
|
|
160
173
|
"div",
|
|
161
174
|
{
|
|
162
175
|
ref: r,
|
|
163
|
-
className:
|
|
176
|
+
className: i(
|
|
164
177
|
"min-h-0 flex-1 overflow-y-auto overscroll-contain px-6 py-4 text-xs text-foreground",
|
|
165
178
|
o
|
|
166
179
|
),
|
|
167
180
|
...t
|
|
168
181
|
}
|
|
169
182
|
));
|
|
170
|
-
|
|
171
|
-
const
|
|
183
|
+
_.displayName = "ModalBody";
|
|
184
|
+
const I = n.forwardRef(({ className: o, ...t }, r) => /* @__PURE__ */ a(
|
|
172
185
|
"div",
|
|
173
186
|
{
|
|
174
187
|
ref: r,
|
|
175
|
-
className:
|
|
188
|
+
className: i(
|
|
176
189
|
"flex shrink-0 items-center justify-end gap-2 px-6 pb-6 pt-2",
|
|
177
190
|
o
|
|
178
191
|
),
|
|
179
192
|
...t
|
|
180
193
|
}
|
|
181
194
|
));
|
|
182
|
-
|
|
195
|
+
I.displayName = "ModalFooter";
|
|
183
196
|
export {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
197
|
+
Z as Modal,
|
|
198
|
+
_ as ModalBody,
|
|
199
|
+
K as ModalDescription,
|
|
200
|
+
I as ModalFooter,
|
|
201
|
+
B as ModalHeader,
|
|
202
|
+
C as ModalTitle
|
|
190
203
|
};
|
package/components/panel.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import { cn as
|
|
5
|
-
const
|
|
6
|
-
({ className: e, ...a }, r) => /* @__PURE__ */
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { cn as o } from "../lib/cn.js";
|
|
5
|
+
const l = n.forwardRef(
|
|
6
|
+
({ className: e, ...a }, r) => /* @__PURE__ */ t(
|
|
7
7
|
"div",
|
|
8
8
|
{
|
|
9
9
|
ref: r,
|
|
10
|
-
|
|
10
|
+
"data-slot": "panel",
|
|
11
|
+
className: o(
|
|
11
12
|
// Static surface — delineated by color alone (elevation is reserved for
|
|
12
13
|
// actionable surfaces).
|
|
13
14
|
"flex min-h-0 min-w-0 flex-col overflow-hidden rounded-lg bg-card",
|
|
@@ -17,55 +18,57 @@ const s = l.forwardRef(
|
|
|
17
18
|
}
|
|
18
19
|
)
|
|
19
20
|
);
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
({ className: e, ...a }, r) => /* @__PURE__ */
|
|
21
|
+
l.displayName = "Panel";
|
|
22
|
+
const s = n.forwardRef(
|
|
23
|
+
({ className: e, ...a }, r) => /* @__PURE__ */ t(
|
|
23
24
|
"div",
|
|
24
25
|
{
|
|
25
26
|
ref: r,
|
|
26
|
-
className:
|
|
27
|
-
"flex h-[var(--panel-header-height)] shrink-0 items-center justify-between gap-2",
|
|
28
|
-
"border-b
|
|
27
|
+
className: o(
|
|
28
|
+
"relative flex h-[var(--panel-header-height)] shrink-0 items-center justify-between gap-2",
|
|
29
|
+
"border-b-0 bg-card px-3",
|
|
30
|
+
"after:pointer-events-none after:absolute after:inset-x-0 after:bottom-0 after:h-px",
|
|
31
|
+
"after:bg-[linear-gradient(to_right,var(--color-border)_0%,transparent_100%)] after:content-['']",
|
|
29
32
|
e
|
|
30
33
|
),
|
|
31
34
|
...a
|
|
32
35
|
}
|
|
33
36
|
)
|
|
34
37
|
);
|
|
35
|
-
|
|
36
|
-
const
|
|
38
|
+
s.displayName = "PanelHeader";
|
|
39
|
+
const i = n.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
|
|
37
40
|
"h2",
|
|
38
41
|
{
|
|
39
42
|
ref: r,
|
|
40
|
-
className:
|
|
43
|
+
className: o("flex min-w-0 items-center gap-2 truncate text-xs font-medium text-foreground", e),
|
|
41
44
|
...a
|
|
42
45
|
}
|
|
43
46
|
));
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
({ className: e, ...a }, r) => /* @__PURE__ */
|
|
47
|
+
i.displayName = "PanelTitle";
|
|
48
|
+
const d = n.forwardRef(
|
|
49
|
+
({ className: e, ...a }, r) => /* @__PURE__ */ t("div", { ref: r, className: o("flex shrink-0 items-center gap-1", e), ...a })
|
|
47
50
|
);
|
|
48
|
-
|
|
49
|
-
const f =
|
|
50
|
-
({ className: e, ...a }, r) => /* @__PURE__ */
|
|
51
|
+
d.displayName = "PanelToolbar";
|
|
52
|
+
const f = n.forwardRef(
|
|
53
|
+
({ className: e, ...a }, r) => /* @__PURE__ */ t("div", { ref: r, tabIndex: 0, className: o("min-h-0 flex-1 overflow-auto p-4", e), ...a })
|
|
51
54
|
);
|
|
52
55
|
f.displayName = "PanelBody";
|
|
53
|
-
const m =
|
|
54
|
-
({ className: e, ...a }, r) => /* @__PURE__ */
|
|
56
|
+
const m = n.forwardRef(
|
|
57
|
+
({ className: e, ...a }, r) => /* @__PURE__ */ t(
|
|
55
58
|
"div",
|
|
56
59
|
{
|
|
57
60
|
ref: r,
|
|
58
|
-
className:
|
|
61
|
+
className: o("flex shrink-0 items-center gap-2 bg-surface/40 px-3 py-2", e),
|
|
59
62
|
...a
|
|
60
63
|
}
|
|
61
64
|
)
|
|
62
65
|
);
|
|
63
66
|
m.displayName = "PanelFooter";
|
|
64
67
|
export {
|
|
65
|
-
|
|
68
|
+
l as Panel,
|
|
66
69
|
f as PanelBody,
|
|
67
70
|
m as PanelFooter,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
s as PanelHeader,
|
|
72
|
+
i as PanelTitle,
|
|
73
|
+
d as PanelToolbar
|
|
71
74
|
};
|
|
@@ -22,6 +22,10 @@ export interface PixelIconProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
22
22
|
motionMode?: number;
|
|
23
23
|
/** Optional hover/click accent. Defaults to the standard green interaction color. */
|
|
24
24
|
interactionColor?: string;
|
|
25
|
+
/** Optional 1–10 color ramp. Short ramps repeat to fill the ten tile shades. */
|
|
26
|
+
palette?: readonly string[];
|
|
27
|
+
/** Whether interaction is limited to filled tiles or spans the whole icon surface. */
|
|
28
|
+
interactionArea?: "tiles" | "surface";
|
|
25
29
|
/** Larger hero rendering (broader hatch, mode 3). */
|
|
26
30
|
hero?: boolean;
|
|
27
31
|
}
|