@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/tabs.js
CHANGED
|
@@ -93,7 +93,7 @@ const O = $("inline-flex", {
|
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
compoundVariants: [
|
|
96
|
-
// Track radius follows control size: compact = 4px, standard =
|
|
96
|
+
// Track radius follows control size: compact = 4px, standard = 6px.
|
|
97
97
|
{ variant: "primary", size: "sm", className: "rounded-sm" },
|
|
98
98
|
{ variant: "primary", size: "md", className: "rounded-md" },
|
|
99
99
|
{ variant: "primary", size: "lg", className: "rounded-md" },
|
package/components/tree.js
CHANGED
|
@@ -1,91 +1,119 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as e, jsxs as
|
|
2
|
+
import { jsx as e, jsxs as i, Fragment as T } from "react/jsx-runtime";
|
|
3
3
|
import * as t from "react";
|
|
4
|
-
import { MotionConfig as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { ChevronRight as
|
|
7
|
-
import { springDisclosure as
|
|
8
|
-
const
|
|
4
|
+
import { MotionConfig as _, AnimatePresence as $, motion as D } from "motion/react";
|
|
5
|
+
import { cn as d } from "../lib/cn.js";
|
|
6
|
+
import { ChevronRight as V, FileText as W } from "../lib/icons.js";
|
|
7
|
+
import { springDisclosure as q } from "../lib/motion.js";
|
|
8
|
+
const B = t.forwardRef(({ className: f, ...o }, m) => /* @__PURE__ */ e(
|
|
9
9
|
"div",
|
|
10
10
|
{
|
|
11
|
-
ref:
|
|
11
|
+
ref: m,
|
|
12
12
|
role: "tree",
|
|
13
|
-
className:
|
|
14
|
-
...
|
|
13
|
+
className: d("flex flex-col gap-0.5 text-xs", f),
|
|
14
|
+
...o
|
|
15
15
|
}
|
|
16
16
|
));
|
|
17
|
-
|
|
18
|
-
const
|
|
17
|
+
B.displayName = "Tree";
|
|
18
|
+
const E = t.forwardRef(
|
|
19
19
|
({
|
|
20
|
-
className:
|
|
21
|
-
label:
|
|
22
|
-
icon:
|
|
23
|
-
count:
|
|
24
|
-
endContent:
|
|
25
|
-
defaultExpanded:
|
|
26
|
-
expanded:
|
|
27
|
-
onExpandedChange:
|
|
28
|
-
href:
|
|
29
|
-
isActive:
|
|
30
|
-
onSelect:
|
|
31
|
-
children:
|
|
32
|
-
...
|
|
33
|
-
},
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
"flex h-9 w-full items-center gap-
|
|
20
|
+
className: f,
|
|
21
|
+
label: o,
|
|
22
|
+
icon: m,
|
|
23
|
+
count: g,
|
|
24
|
+
endContent: x,
|
|
25
|
+
defaultExpanded: R = !1,
|
|
26
|
+
expanded: v,
|
|
27
|
+
onExpandedChange: u,
|
|
28
|
+
href: y,
|
|
29
|
+
isActive: s,
|
|
30
|
+
onSelect: b,
|
|
31
|
+
children: l,
|
|
32
|
+
...j
|
|
33
|
+
}, z) => {
|
|
34
|
+
const n = t.Children.count(l) > 0, N = v !== void 0, [F, M] = t.useState(R), r = N ? v : F, w = (c) => {
|
|
35
|
+
N || M(c), u == null || u(c);
|
|
36
|
+
}, a = d(
|
|
37
|
+
"flex h-9 w-full items-center gap-1.5 rounded-md px-2 text-left",
|
|
38
38
|
"outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring",
|
|
39
39
|
"[&_svg]:size-4 [&_svg]:shrink-0",
|
|
40
|
-
|
|
41
|
-
),
|
|
42
|
-
|
|
40
|
+
s ? "bg-fill font-normal text-foreground" : "text-muted-foreground hover:bg-fill/60 hover:text-foreground"
|
|
41
|
+
), h = m ?? (n ? null : /* @__PURE__ */ e(W, { className: "text-tertiary" })), C = s && t.isValidElement(h) ? t.cloneElement(
|
|
42
|
+
h,
|
|
43
43
|
{ weight: "fill" }
|
|
44
|
-
) :
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
) : h, k = /* @__PURE__ */ e(
|
|
45
|
+
V,
|
|
46
|
+
{
|
|
47
|
+
className: d(
|
|
48
|
+
"text-muted-foreground transition-transform duration-150 motion-reduce:transition-none",
|
|
49
|
+
r && "rotate-90"
|
|
50
|
+
),
|
|
51
|
+
strokeWidth: 2
|
|
52
|
+
}
|
|
53
|
+
), I = (g ?? t.Children.count(l)) > 0 && /* @__PURE__ */ e("span", { className: "shrink-0 tabular-nums text-xs text-tertiary", children: g ?? t.Children.count(l) }), p = /* @__PURE__ */ i(T, { children: [
|
|
54
|
+
C,
|
|
55
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate", children: o }),
|
|
56
|
+
x,
|
|
57
|
+
n && /* @__PURE__ */ i(T, { children: [
|
|
58
|
+
I,
|
|
59
|
+
k
|
|
60
|
+
] })
|
|
61
|
+
] });
|
|
62
|
+
return /* @__PURE__ */ i("div", { ref: z, role: "treeitem", "aria-expanded": n ? r : void 0, "aria-selected": s, className: f, ...j, children: [
|
|
63
|
+
n && b ? /* @__PURE__ */ i("div", { className: a, children: [
|
|
64
|
+
/* @__PURE__ */ i(
|
|
65
|
+
"button",
|
|
66
|
+
{
|
|
67
|
+
type: "button",
|
|
68
|
+
className: "flex min-w-0 flex-1 items-center gap-1.5 rounded-sm outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
69
|
+
onClick: b,
|
|
70
|
+
children: [
|
|
71
|
+
C,
|
|
72
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate", children: o })
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
),
|
|
76
|
+
x,
|
|
77
|
+
I,
|
|
50
78
|
/* @__PURE__ */ e(
|
|
51
|
-
|
|
79
|
+
"button",
|
|
52
80
|
{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
81
|
+
type: "button",
|
|
82
|
+
"aria-label": `${r ? "Collapse" : "Expand"} ${typeof o == "string" ? o : "tree item"}`,
|
|
83
|
+
"aria-expanded": r,
|
|
84
|
+
className: "inline-flex size-7 shrink-0 items-center justify-center rounded-sm outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring",
|
|
85
|
+
onClick: () => w(!r),
|
|
86
|
+
children: k
|
|
58
87
|
}
|
|
59
88
|
)
|
|
60
|
-
] })
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
r ? /* @__PURE__ */ e("button", { type: "button", className: m, onClick: () => j(!i), children: b }) : g ? /* @__PURE__ */ e("a", { href: g, className: m, "aria-current": o ? "page" : void 0, children: b }) : /* @__PURE__ */ e("button", { type: "button", className: m, onClick: C, children: b }),
|
|
64
|
-
/* @__PURE__ */ e(M, { reducedMotion: "user", children: /* @__PURE__ */ e(_, { initial: !1, children: r && i && /* @__PURE__ */ e(
|
|
65
|
-
z.div,
|
|
89
|
+
] }) : n ? /* @__PURE__ */ e("button", { type: "button", className: a, onClick: () => w(!r), children: p }) : y ? /* @__PURE__ */ e("a", { href: y, className: a, "aria-current": s ? "page" : void 0, children: p }) : /* @__PURE__ */ e("button", { type: "button", className: a, onClick: b, children: p }),
|
|
90
|
+
/* @__PURE__ */ e(_, { reducedMotion: "user", children: /* @__PURE__ */ e($, { initial: !1, children: n && r && /* @__PURE__ */ e(
|
|
91
|
+
D.div,
|
|
66
92
|
{
|
|
67
93
|
role: "group",
|
|
68
94
|
initial: { height: 0, opacity: 0, y: -4 },
|
|
69
95
|
animate: { height: "auto", opacity: 1, y: 0 },
|
|
70
96
|
exit: { height: 0, opacity: 0, y: -4 },
|
|
71
|
-
transition:
|
|
97
|
+
transition: q,
|
|
72
98
|
className: "ml-4 flex flex-col gap-0.5 overflow-hidden",
|
|
73
|
-
children: t.Children.map(
|
|
99
|
+
children: t.Children.map(l, (c) => /* @__PURE__ */ e(
|
|
74
100
|
"div",
|
|
75
101
|
{
|
|
76
|
-
className:
|
|
102
|
+
className: d(
|
|
77
103
|
"relative ps-5",
|
|
78
104
|
// Continuous vertical rail — a straight line (no radius) so it
|
|
79
105
|
// never breaks between children. The LAST child needs no rail
|
|
80
106
|
// at all: the elbow's own left border draws its final vertical
|
|
81
107
|
// segment, so a rail there would poke through the curve.
|
|
82
|
-
|
|
108
|
+
// Extend through the group's 2px row gap so the shared
|
|
109
|
+
// spine remains visually continuous between elbows.
|
|
110
|
+
"before:absolute before:left-0 before:top-0 before:-bottom-0.5 before:border-l before:border-border before:content-['']",
|
|
83
111
|
"last:before:hidden",
|
|
84
112
|
// Rounded elbow branching off the rail to this child. Its own
|
|
85
113
|
// left border overlaps the rail, so the curve reads cleanly.
|
|
86
114
|
"after:absolute after:left-0 after:top-0 after:h-4 after:w-4 after:rounded-bl-[9px] after:border-b after:border-l after:border-border after:content-['']"
|
|
87
115
|
),
|
|
88
|
-
children:
|
|
116
|
+
children: c
|
|
89
117
|
}
|
|
90
118
|
))
|
|
91
119
|
}
|
|
@@ -93,8 +121,8 @@ const q = t.forwardRef(
|
|
|
93
121
|
] });
|
|
94
122
|
}
|
|
95
123
|
);
|
|
96
|
-
|
|
124
|
+
E.displayName = "TreeItem";
|
|
97
125
|
export {
|
|
98
|
-
|
|
99
|
-
|
|
126
|
+
B as Tree,
|
|
127
|
+
E as TreeItem
|
|
100
128
|
};
|