@actioneer/ads 0.7.0 → 1.0.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/DESIGN.md +597 -0
- package/components/ai-elements/agent-trace.js +1 -1
- package/components/alert.js +3 -3
- package/components/answer.js +2 -2
- package/components/assistant-ui/action-bar.js +1 -1
- package/components/assistant-ui/attachment.js +12 -12
- package/components/assistant-ui/badge.js +18 -18
- package/components/assistant-ui/composer-harness.js +5 -4
- package/components/assistant-ui/composer-trigger-popover.js +9 -9
- package/components/assistant-ui/composer.js +32 -32
- package/components/assistant-ui/directive-text.js +5 -5
- package/components/assistant-ui/image.js +61 -61
- package/components/assistant-ui/markdown-text.js +7 -7
- package/components/assistant-ui/message-timing.js +1 -1
- package/components/assistant-ui/selection-toolbar.js +7 -7
- package/components/assistant-ui/sources.js +1 -1
- package/components/avatar.d.ts +1 -1
- package/components/avatar.js +35 -35
- package/components/body-page-header.d.ts +1 -1
- package/components/body-page-header.js +1 -1
- package/components/chart.js +1 -1
- package/components/chip.js +8 -8
- package/components/divider.js +25 -25
- package/components/drawer.d.ts +2 -14
- package/components/drawer.js +103 -109
- package/components/field.js +9 -9
- package/components/index.d.ts +1 -0
- package/components/index.js +466 -465
- package/components/infinite-canvas.js +1 -1
- package/components/input.js +21 -19
- package/components/modal.js +26 -26
- package/components/page-body.js +6 -6
- package/components/page-header.js +1 -1
- package/components/pagination.js +1 -1
- package/components/pixel-blast-svg.js +71 -73
- package/components/search-disclosure.d.ts +18 -0
- package/components/search-disclosure.js +106 -0
- package/components/sidebar.js +60 -53
- package/components/table.d.ts +1 -1
- package/components/table.js +73 -74
- package/components/tabs.js +68 -59
- package/components/tree.js +17 -17
- package/components/typography.d.ts +1 -1
- package/components/typography.js +1 -1
- package/components/ui/button.d.ts +1 -1
- package/components/ui/button.js +4 -4
- package/components/ui/dialog.js +23 -23
- package/components/viz-charts.js +36 -36
- package/demo/components/add-to-artifact.js +3 -2
- package/lib/cn.js +7 -7
- package/lib/icons.d.ts +4 -0
- package/lib/icons.js +105 -104
- package/llms.txt +52 -49
- package/manifest.json +258 -235
- package/package.json +2 -1
- package/styles.css +171 -153
- package/theme.css +162 -140
package/components/tabs.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as p, jsxs as E } from "react/jsx-runtime";
|
|
3
3
|
import * as r from "react";
|
|
4
4
|
import { MotionConfig as $, motion as M } from "motion/react";
|
|
5
5
|
import { cva as L } from "class-variance-authority";
|
|
6
|
-
import { cn as
|
|
6
|
+
import { cn as b } from "../lib/cn.js";
|
|
7
7
|
import { springControl as U } from "../lib/motion.js";
|
|
8
8
|
const N = (o, e, t) => `${o}-${e}-${encodeURIComponent(t).replaceAll("%", "_")}`, P = r.createContext(null);
|
|
9
9
|
function z(o) {
|
|
@@ -18,13 +18,13 @@ const _ = r.forwardRef(
|
|
|
18
18
|
value: e,
|
|
19
19
|
defaultValue: t,
|
|
20
20
|
onValueChange: a,
|
|
21
|
-
variant:
|
|
22
|
-
orientation:
|
|
23
|
-
size:
|
|
21
|
+
variant: y,
|
|
22
|
+
orientation: c = "horizontal",
|
|
23
|
+
size: m,
|
|
24
24
|
children: R,
|
|
25
25
|
...A
|
|
26
|
-
},
|
|
27
|
-
const x = e !== void 0, [
|
|
26
|
+
}, k) => {
|
|
27
|
+
const x = e !== void 0, [g, v] = r.useState(t), T = r.useId().replaceAll(":", ""), d = r.useId(), w = r.useRef([]), h = r.useRef(/* @__PURE__ */ new Set()), f = x ? e : g, I = r.useCallback(
|
|
28
28
|
(l) => {
|
|
29
29
|
x || v(l), a == null || a(l);
|
|
30
30
|
},
|
|
@@ -39,41 +39,41 @@ const _ = r.forwardRef(
|
|
|
39
39
|
registerTab: i,
|
|
40
40
|
tabs: w,
|
|
41
41
|
disabled: h,
|
|
42
|
-
thumbId:
|
|
43
|
-
orientation:
|
|
42
|
+
thumbId: d,
|
|
43
|
+
orientation: c
|
|
44
44
|
}),
|
|
45
45
|
[
|
|
46
46
|
f,
|
|
47
47
|
I,
|
|
48
48
|
T,
|
|
49
49
|
i,
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
d,
|
|
51
|
+
c
|
|
52
52
|
]
|
|
53
53
|
);
|
|
54
|
-
return /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ p(P.Provider, { value: s, children: /* @__PURE__ */ p(
|
|
55
55
|
"div",
|
|
56
56
|
{
|
|
57
|
-
ref:
|
|
58
|
-
"data-orientation":
|
|
57
|
+
ref: k,
|
|
58
|
+
"data-orientation": c,
|
|
59
59
|
"data-variant": "primary",
|
|
60
|
-
className:
|
|
60
|
+
className: b(
|
|
61
61
|
"flex w-full gap-4",
|
|
62
|
-
|
|
62
|
+
c === "horizontal" ? "flex-col" : "flex-row",
|
|
63
63
|
o
|
|
64
64
|
),
|
|
65
65
|
...A,
|
|
66
|
-
children: /* @__PURE__ */
|
|
66
|
+
children: /* @__PURE__ */ p($, { reducedMotion: "user", children: R })
|
|
67
67
|
}
|
|
68
68
|
) });
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
71
|
_.displayName = "Tabs";
|
|
72
|
-
const C = L("inline-flex
|
|
72
|
+
const C = L("inline-flex text-l", {
|
|
73
73
|
variants: {
|
|
74
74
|
orientation: {
|
|
75
|
-
horizontal: "w-full self-start flex-row items-center gap-
|
|
76
|
-
vertical: "flex-col items-stretch border-r border-
|
|
75
|
+
horizontal: "w-full self-start flex-row items-center gap-4 overflow-x-auto border-b border-table-stroke",
|
|
76
|
+
vertical: "flex-col items-stretch gap-0 border-r border-table-stroke"
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
defaultVariants: {
|
|
@@ -82,7 +82,7 @@ const C = L("inline-flex gap-0 text-m", {
|
|
|
82
82
|
}), B = r.forwardRef(
|
|
83
83
|
({ className: o, ...e }, t) => {
|
|
84
84
|
const { orientation: a } = z("TabList");
|
|
85
|
-
return /* @__PURE__ */
|
|
85
|
+
return /* @__PURE__ */ p(
|
|
86
86
|
"div",
|
|
87
87
|
{
|
|
88
88
|
ref: t,
|
|
@@ -90,7 +90,7 @@ const C = L("inline-flex gap-0 text-m", {
|
|
|
90
90
|
"aria-orientation": a,
|
|
91
91
|
"data-orientation": a,
|
|
92
92
|
"data-variant": "primary",
|
|
93
|
-
className:
|
|
93
|
+
className: b(C({ orientation: a }), o),
|
|
94
94
|
...e
|
|
95
95
|
}
|
|
96
96
|
);
|
|
@@ -98,8 +98,8 @@ const C = L("inline-flex gap-0 text-m", {
|
|
|
98
98
|
);
|
|
99
99
|
B.displayName = "TabList";
|
|
100
100
|
const H = L(
|
|
101
|
-
|
|
102
|
-
"relative inline-flex items-center whitespace-nowrap
|
|
101
|
+
b(
|
|
102
|
+
"relative inline-flex items-center whitespace-nowrap select-none",
|
|
103
103
|
"transition-colors duration-150 cursor-pointer",
|
|
104
104
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
105
105
|
"disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed"
|
|
@@ -111,8 +111,8 @@ const H = L(
|
|
|
111
111
|
vertical: "h-8 justify-start px-3 pr-4 -mr-px"
|
|
112
112
|
},
|
|
113
113
|
selected: {
|
|
114
|
-
true: "text-action-primary-text",
|
|
115
|
-
false: "text-
|
|
114
|
+
true: "font-medium text-action-primary-text",
|
|
115
|
+
false: "font-normal text-secondary hover:text-foreground"
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
118
|
defaultVariants: {
|
|
@@ -121,24 +121,24 @@ const H = L(
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
), O = r.forwardRef(
|
|
124
|
-
({ className: o, value: e, isDisabled: t, count: a, children:
|
|
124
|
+
({ className: o, value: e, isDisabled: t, count: a, children: y, onClick: c, onKeyDown: m, ...R }, A) => {
|
|
125
125
|
const {
|
|
126
|
-
value:
|
|
126
|
+
value: k,
|
|
127
127
|
setValue: x,
|
|
128
|
-
baseId:
|
|
128
|
+
baseId: g,
|
|
129
129
|
registerTab: v,
|
|
130
130
|
tabs: T,
|
|
131
|
-
disabled:
|
|
131
|
+
disabled: d,
|
|
132
132
|
thumbId: w,
|
|
133
133
|
orientation: h
|
|
134
|
-
} = z("Tab"), f =
|
|
134
|
+
} = z("Tab"), f = k === e;
|
|
135
135
|
r.useEffect(() => {
|
|
136
136
|
v(e);
|
|
137
137
|
}, [v, e]), r.useEffect(() => {
|
|
138
|
-
t ?
|
|
139
|
-
}, [
|
|
138
|
+
t ? d.current.add(e) : d.current.delete(e);
|
|
139
|
+
}, [d, t, e]);
|
|
140
140
|
const I = (i) => {
|
|
141
|
-
if (
|
|
141
|
+
if (m == null || m(i), i.defaultPrevented) return;
|
|
142
142
|
const s = T.current, l = s.indexOf(e);
|
|
143
143
|
if (l === -1) return;
|
|
144
144
|
const V = h === "vertical" ? ["ArrowDown"] : ["ArrowRight", "ArrowDown"], j = h === "vertical" ? ["ArrowUp"] : ["ArrowLeft", "ArrowUp"];
|
|
@@ -147,17 +147,17 @@ const H = L(
|
|
|
147
147
|
n = l;
|
|
148
148
|
do
|
|
149
149
|
n = (n + 1) % s.length;
|
|
150
|
-
while (
|
|
150
|
+
while (d.current.has(s[n]) && n !== l);
|
|
151
151
|
} else if (j.includes(i.key)) {
|
|
152
152
|
n = l;
|
|
153
153
|
do
|
|
154
154
|
n = (n - 1 + s.length) % s.length;
|
|
155
|
-
while (
|
|
155
|
+
while (d.current.has(s[n]) && n !== l);
|
|
156
156
|
} else if (i.key === "Home")
|
|
157
|
-
n = s.findIndex((u) => !
|
|
157
|
+
n = s.findIndex((u) => !d.current.has(u));
|
|
158
158
|
else if (i.key === "End") {
|
|
159
159
|
for (let u = s.length - 1; u >= 0; u--)
|
|
160
|
-
if (!
|
|
160
|
+
if (!d.current.has(s[u])) {
|
|
161
161
|
n = u;
|
|
162
162
|
break;
|
|
163
163
|
}
|
|
@@ -166,8 +166,8 @@ const H = L(
|
|
|
166
166
|
i.preventDefault();
|
|
167
167
|
const u = s[n];
|
|
168
168
|
x(u);
|
|
169
|
-
const
|
|
170
|
-
|
|
169
|
+
const S = document.getElementById(N(g, "tab", u));
|
|
170
|
+
S == null || S.focus();
|
|
171
171
|
}
|
|
172
172
|
};
|
|
173
173
|
return /* @__PURE__ */ E(
|
|
@@ -176,41 +176,50 @@ const H = L(
|
|
|
176
176
|
ref: A,
|
|
177
177
|
type: "button",
|
|
178
178
|
role: "tab",
|
|
179
|
-
id: N(
|
|
179
|
+
id: N(g, "tab", e),
|
|
180
180
|
"aria-selected": f,
|
|
181
181
|
"aria-disabled": t || void 0,
|
|
182
182
|
disabled: t,
|
|
183
183
|
"data-selected": f || void 0,
|
|
184
184
|
"data-disabled": t || void 0,
|
|
185
185
|
tabIndex: f && !t ? 0 : -1,
|
|
186
|
-
className:
|
|
186
|
+
className: b(
|
|
187
187
|
H({ orientation: h, selected: f }),
|
|
188
188
|
o
|
|
189
189
|
),
|
|
190
190
|
onClick: (i) => {
|
|
191
|
-
|
|
191
|
+
c == null || c(i), t || x(e);
|
|
192
192
|
},
|
|
193
193
|
onKeyDown: I,
|
|
194
194
|
...R,
|
|
195
195
|
children: [
|
|
196
|
-
f && /* @__PURE__ */
|
|
196
|
+
f && /* @__PURE__ */ p(
|
|
197
197
|
M.span,
|
|
198
198
|
{
|
|
199
199
|
layoutId: w,
|
|
200
200
|
"aria-hidden": !0,
|
|
201
201
|
transition: U,
|
|
202
|
-
className:
|
|
202
|
+
className: b(
|
|
203
203
|
"absolute bg-action-primary",
|
|
204
204
|
h === "horizontal" ? "left-0 right-0 bottom-0 h-0.5" : "top-0 bottom-0 right-0 w-0.5"
|
|
205
205
|
)
|
|
206
206
|
}
|
|
207
207
|
),
|
|
208
208
|
/* @__PURE__ */ E("span", { className: "relative inline-flex items-center gap-1", children: [
|
|
209
|
-
|
|
210
|
-
a != null && /* @__PURE__ */ E(
|
|
211
|
-
"
|
|
212
|
-
|
|
213
|
-
|
|
209
|
+
y,
|
|
210
|
+
a != null && /* @__PURE__ */ E(
|
|
211
|
+
"span",
|
|
212
|
+
{
|
|
213
|
+
className: b(
|
|
214
|
+
"tabular-nums",
|
|
215
|
+
f ? "text-action-primary-text" : "text-secondary"
|
|
216
|
+
),
|
|
217
|
+
children: [
|
|
218
|
+
"· ",
|
|
219
|
+
a
|
|
220
|
+
]
|
|
221
|
+
}
|
|
222
|
+
)
|
|
214
223
|
] })
|
|
215
224
|
]
|
|
216
225
|
}
|
|
@@ -221,13 +230,13 @@ O.displayName = "Tab";
|
|
|
221
230
|
const q = r.forwardRef(
|
|
222
231
|
({ className: o, ...e }, t) => {
|
|
223
232
|
const { orientation: a } = z("TabSeparator");
|
|
224
|
-
return /* @__PURE__ */
|
|
233
|
+
return /* @__PURE__ */ p(
|
|
225
234
|
"span",
|
|
226
235
|
{
|
|
227
236
|
ref: t,
|
|
228
237
|
"aria-hidden": !0,
|
|
229
238
|
role: "separator",
|
|
230
|
-
className:
|
|
239
|
+
className: b(
|
|
231
240
|
"shrink-0 bg-border",
|
|
232
241
|
a === "horizontal" ? "mx-1 h-4 w-px" : "my-1 h-px w-full",
|
|
233
242
|
o
|
|
@@ -239,17 +248,17 @@ const q = r.forwardRef(
|
|
|
239
248
|
);
|
|
240
249
|
q.displayName = "TabSeparator";
|
|
241
250
|
const F = r.forwardRef(
|
|
242
|
-
({ className: o, value: e, children: t, ...a },
|
|
243
|
-
const { value:
|
|
244
|
-
return
|
|
251
|
+
({ className: o, value: e, children: t, ...a }, y) => {
|
|
252
|
+
const { value: c, baseId: m } = z("TabPanel");
|
|
253
|
+
return c !== e ? null : /* @__PURE__ */ p(
|
|
245
254
|
"div",
|
|
246
255
|
{
|
|
247
|
-
ref:
|
|
256
|
+
ref: y,
|
|
248
257
|
role: "tabpanel",
|
|
249
|
-
id: N(
|
|
250
|
-
"aria-labelledby": N(
|
|
258
|
+
id: N(m, "panel", e),
|
|
259
|
+
"aria-labelledby": N(m, "tab", e),
|
|
251
260
|
tabIndex: 0,
|
|
252
|
-
className:
|
|
261
|
+
className: b(
|
|
253
262
|
"flex-1 outline-none focus-visible:ring-3 focus-visible:ring-ring rounded-sm",
|
|
254
263
|
o
|
|
255
264
|
),
|
package/components/tree.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
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
4
|
import { MotionConfig as M, AnimatePresence as $, motion as D } from "motion/react";
|
|
5
5
|
import { cn as f } from "../lib/cn.js";
|
|
6
6
|
import { ChevronRight as V, FileText as W } from "../lib/icons.js";
|
|
7
7
|
import { springDisclosure as q } from "../lib/motion.js";
|
|
8
8
|
const B = t.forwardRef(
|
|
9
|
-
({ className: u, variant: a = "default", ...m },
|
|
9
|
+
({ className: u, variant: a = "default", ...m }, n) => /* @__PURE__ */ e(
|
|
10
10
|
"div",
|
|
11
11
|
{
|
|
12
|
-
ref:
|
|
12
|
+
ref: n,
|
|
13
13
|
role: "tree",
|
|
14
14
|
"data-variant": a,
|
|
15
15
|
className: f("group/tree flex flex-col gap-0.5 text-xs", u),
|
|
@@ -23,26 +23,26 @@ const E = t.forwardRef(
|
|
|
23
23
|
className: u,
|
|
24
24
|
label: a,
|
|
25
25
|
icon: m,
|
|
26
|
-
count:
|
|
26
|
+
count: n,
|
|
27
27
|
endContent: v,
|
|
28
28
|
defaultExpanded: R = !1,
|
|
29
29
|
expanded: x,
|
|
30
30
|
onExpandedChange: g,
|
|
31
|
-
href:
|
|
31
|
+
href: w,
|
|
32
32
|
isActive: s,
|
|
33
33
|
onSelect: b,
|
|
34
34
|
children: l,
|
|
35
35
|
..._
|
|
36
36
|
}, j) => {
|
|
37
|
-
const o = t.Children.count(l) > 0,
|
|
38
|
-
|
|
37
|
+
const o = t.Children.count(l) > 0, y = x !== void 0, [z, F] = t.useState(R), r = y ? x : z, N = (c) => {
|
|
38
|
+
y || F(c), g == null || g(c);
|
|
39
39
|
}, d = f(
|
|
40
40
|
"group/tree-row flex h-9 w-full items-center gap-1.5 rounded-md px-2 text-left",
|
|
41
41
|
"outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring",
|
|
42
42
|
"[&_svg]:size-4 [&_svg]:shrink-0",
|
|
43
|
-
"group-data-[variant=sidebar]/tree:border group-data-[variant=sidebar]/tree:border-transparent group-data-[variant=sidebar]/tree:text-
|
|
44
|
-
"group-data-[variant=sidebar]/tree:[&_svg]:size-5 group-data-[variant=sidebar]/tree:[&_svg]:text-
|
|
45
|
-
s ? "bg-fill font-normal text-foreground group-data-[variant=sidebar]/tree:border-
|
|
43
|
+
"group-data-[variant=sidebar]/tree:border group-data-[variant=sidebar]/tree:border-transparent group-data-[variant=sidebar]/tree:text-wg11",
|
|
44
|
+
"group-data-[variant=sidebar]/tree:[&_svg]:size-5 group-data-[variant=sidebar]/tree:[&_svg]:text-wg11",
|
|
45
|
+
s ? "bg-fill font-normal text-foreground group-data-[variant=sidebar]/tree:border-wg4 group-data-[variant=sidebar]/tree:bg-wg2 group-data-[variant=sidebar]/tree:text-wg11" : "text-muted-foreground hover:bg-fill/60 hover:text-foreground group-data-[variant=sidebar]/tree:hover:bg-wg1 group-data-[variant=sidebar]/tree:hover:text-wg11"
|
|
46
46
|
), p = m ?? (o ? null : /* @__PURE__ */ e(W, { className: "text-tertiary" })), k = s && t.isValidElement(p) ? t.cloneElement(
|
|
47
47
|
p,
|
|
48
48
|
{ weight: "fill" }
|
|
@@ -55,18 +55,18 @@ const E = t.forwardRef(
|
|
|
55
55
|
),
|
|
56
56
|
strokeWidth: 2
|
|
57
57
|
}
|
|
58
|
-
), I = (
|
|
58
|
+
), I = (n ?? t.Children.count(l)) > 0 && /* @__PURE__ */ e("span", { className: "shrink-0 tabular-nums text-xs text-tertiary", children: n ?? t.Children.count(l) }), h = /* @__PURE__ */ i(T, { children: [
|
|
59
59
|
k,
|
|
60
60
|
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate", children: a }),
|
|
61
61
|
v,
|
|
62
|
-
o && /* @__PURE__ */
|
|
62
|
+
o && /* @__PURE__ */ i(T, { children: [
|
|
63
63
|
I,
|
|
64
64
|
C
|
|
65
65
|
] })
|
|
66
66
|
] });
|
|
67
|
-
return /* @__PURE__ */
|
|
68
|
-
o && b ? /* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */
|
|
67
|
+
return /* @__PURE__ */ i("div", { ref: j, role: "treeitem", "aria-expanded": o ? r : void 0, "aria-selected": s, className: u, ..._, children: [
|
|
68
|
+
o && b ? /* @__PURE__ */ i("div", { className: d, children: [
|
|
69
|
+
/* @__PURE__ */ i(
|
|
70
70
|
"button",
|
|
71
71
|
{
|
|
72
72
|
type: "button",
|
|
@@ -87,11 +87,11 @@ const E = t.forwardRef(
|
|
|
87
87
|
"aria-label": `${r ? "Collapse" : "Expand"} ${typeof a == "string" ? a : "tree item"}`,
|
|
88
88
|
"aria-expanded": r,
|
|
89
89
|
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",
|
|
90
|
-
onClick: () =>
|
|
90
|
+
onClick: () => N(!r),
|
|
91
91
|
children: C
|
|
92
92
|
}
|
|
93
93
|
)
|
|
94
|
-
] }) : o ? /* @__PURE__ */ e("button", { type: "button", className: d, onClick: () =>
|
|
94
|
+
] }) : o ? /* @__PURE__ */ e("button", { type: "button", className: d, onClick: () => N(!r), children: h }) : w ? /* @__PURE__ */ e("a", { href: w, className: d, "aria-current": s ? "page" : void 0, children: h }) : /* @__PURE__ */ e("button", { type: "button", className: d, onClick: b, children: h }),
|
|
95
95
|
/* @__PURE__ */ e(M, { reducedMotion: "user", children: /* @__PURE__ */ e($, { initial: !1, children: o && r && /* @__PURE__ */ e(
|
|
96
96
|
D.div,
|
|
97
97
|
{
|
|
@@ -4,7 +4,7 @@ export interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
|
4
4
|
}
|
|
5
5
|
export declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
6
6
|
declare const textSizes: {
|
|
7
|
-
readonly xs: "text-
|
|
7
|
+
readonly xs: "text-xs";
|
|
8
8
|
readonly sm: "text-s";
|
|
9
9
|
readonly md: "text-m";
|
|
10
10
|
readonly lg: "text-l";
|
package/components/typography.js
CHANGED
|
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
4
|
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "xs" | "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-xs" | "icon-lg" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
8
8
|
asChild?: boolean;
|
package/components/ui/button.js
CHANGED
|
@@ -9,8 +9,8 @@ const u = a(
|
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
11
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
12
|
-
destructive: "bg-destructive text-
|
|
13
|
-
outline: "border bg-background shadow-
|
|
12
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20",
|
|
13
|
+
outline: "border bg-background shadow-100 hover:bg-accent hover:text-accent-foreground",
|
|
14
14
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
15
15
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
16
16
|
link: "text-primary underline-offset-4 hover:underline"
|
|
@@ -32,7 +32,7 @@ const u = a(
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
);
|
|
35
|
-
function
|
|
35
|
+
function p({
|
|
36
36
|
className: o,
|
|
37
37
|
variant: e = "default",
|
|
38
38
|
size: t = "default",
|
|
@@ -52,6 +52,6 @@ function f({
|
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
54
|
export {
|
|
55
|
-
|
|
55
|
+
p as Button,
|
|
56
56
|
u as buttonVariants
|
|
57
57
|
};
|
package/components/ui/dialog.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
3
3
|
import * as s from "react";
|
|
4
|
-
import { Close as
|
|
4
|
+
import { Close as b } from "../../lib/icons.js";
|
|
5
5
|
import { Dialog as o } from "radix-ui";
|
|
6
|
-
import { MotionConfig as v, AnimatePresence as
|
|
6
|
+
import { MotionConfig as v, AnimatePresence as h, motion as x } from "motion/react";
|
|
7
7
|
import { cn as u } from "../../lib/cn.js";
|
|
8
8
|
import "./button.js";
|
|
9
|
-
import { modalPanelVariants as
|
|
9
|
+
import { modalPanelVariants as C, backdropVariants as M } from "../../lib/motion.js";
|
|
10
10
|
const m = s.createContext(!1);
|
|
11
|
-
function
|
|
11
|
+
function k({
|
|
12
12
|
open: t,
|
|
13
13
|
defaultOpen: i = !1,
|
|
14
14
|
onOpenChange: n,
|
|
15
15
|
children: r,
|
|
16
16
|
...a
|
|
17
17
|
}) {
|
|
18
|
-
const l = t !== void 0, [d,
|
|
18
|
+
const l = t !== void 0, [d, p] = s.useState(i), f = l ? t : d;
|
|
19
19
|
return /* @__PURE__ */ e(m.Provider, { value: f, children: /* @__PURE__ */ e(
|
|
20
20
|
o.Root,
|
|
21
21
|
{
|
|
22
22
|
"data-slot": "dialog",
|
|
23
23
|
open: f,
|
|
24
24
|
onOpenChange: (g) => {
|
|
25
|
-
l ||
|
|
25
|
+
l || p(g), n == null || n(g);
|
|
26
26
|
},
|
|
27
27
|
...a,
|
|
28
28
|
children: r
|
|
@@ -34,27 +34,27 @@ function R({
|
|
|
34
34
|
}) {
|
|
35
35
|
return /* @__PURE__ */ e(o.Trigger, { "data-slot": "dialog-trigger", ...t });
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function D({
|
|
38
38
|
...t
|
|
39
39
|
}) {
|
|
40
40
|
return /* @__PURE__ */ e(o.Portal, { "data-slot": "dialog-portal", ...t });
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function y({
|
|
43
43
|
className: t,
|
|
44
44
|
forceMount: i,
|
|
45
45
|
asChild: n,
|
|
46
46
|
...r
|
|
47
47
|
}) {
|
|
48
48
|
const a = s.useContext(m);
|
|
49
|
-
return /* @__PURE__ */ e(v, { reducedMotion: "user", children: /* @__PURE__ */ e(
|
|
50
|
-
|
|
49
|
+
return /* @__PURE__ */ e(v, { reducedMotion: "user", children: /* @__PURE__ */ e(h, { initial: !1, children: a && /* @__PURE__ */ e(o.Overlay, { forceMount: !0, asChild: !0, ...r, children: /* @__PURE__ */ e(
|
|
50
|
+
x.div,
|
|
51
51
|
{
|
|
52
52
|
"data-slot": "dialog-overlay",
|
|
53
|
-
variants:
|
|
53
|
+
variants: M,
|
|
54
54
|
initial: "hidden",
|
|
55
55
|
animate: "visible",
|
|
56
56
|
exit: "hidden",
|
|
57
|
-
className: u("fixed inset-0 z-50 bg-
|
|
57
|
+
className: u("fixed inset-0 z-50 bg-overlay", t)
|
|
58
58
|
}
|
|
59
59
|
) }) }) });
|
|
60
60
|
}
|
|
@@ -67,9 +67,9 @@ function V({
|
|
|
67
67
|
...l
|
|
68
68
|
}) {
|
|
69
69
|
const d = s.useContext(m);
|
|
70
|
-
return /* @__PURE__ */ c(
|
|
71
|
-
/* @__PURE__ */ e(
|
|
72
|
-
/* @__PURE__ */ e(v, { reducedMotion: "user", children: /* @__PURE__ */ e(
|
|
70
|
+
return /* @__PURE__ */ c(D, { "data-slot": "dialog-portal", forceMount: !0, children: [
|
|
71
|
+
/* @__PURE__ */ e(y, {}),
|
|
72
|
+
/* @__PURE__ */ e(v, { reducedMotion: "user", children: /* @__PURE__ */ e(h, { initial: !1, children: d && /* @__PURE__ */ e(
|
|
73
73
|
o.Content,
|
|
74
74
|
{
|
|
75
75
|
"data-slot": "dialog-content",
|
|
@@ -77,14 +77,14 @@ function V({
|
|
|
77
77
|
className: "pointer-events-none fixed inset-0 z-50 grid place-items-center p-4 outline-none",
|
|
78
78
|
...l,
|
|
79
79
|
children: /* @__PURE__ */ c(
|
|
80
|
-
|
|
80
|
+
x.div,
|
|
81
81
|
{
|
|
82
|
-
variants:
|
|
82
|
+
variants: C,
|
|
83
83
|
initial: "hidden",
|
|
84
84
|
animate: "visible",
|
|
85
85
|
exit: "hidden",
|
|
86
86
|
className: u(
|
|
87
|
-
"pointer-events-auto relative flex max-h-[calc(100dvh-2rem)] w-full max-w-[38.75rem] flex-col overflow-hidden rounded-xl bg-elevated text-foreground shadow-
|
|
87
|
+
"pointer-events-auto relative flex max-h-[calc(100dvh-2rem)] w-full max-w-[38.75rem] flex-col overflow-hidden rounded-xl bg-elevated text-foreground shadow-400 outline-none max-sm:max-h-[calc(100dvh-1rem)] max-sm:rounded-lg",
|
|
88
88
|
t
|
|
89
89
|
),
|
|
90
90
|
children: [
|
|
@@ -95,7 +95,7 @@ function V({
|
|
|
95
95
|
"data-slot": "dialog-close",
|
|
96
96
|
className: "absolute right-2 top-2 z-10 inline-flex size-7 items-center justify-center rounded-sm text-secondary outline-none transition-[background,color,transform] duration-150 ease-out hover:bg-muted hover:text-foreground active:scale-[0.97] focus-visible:ring-3 focus-visible:ring-ring disabled:pointer-events-none motion-reduce:transition-none motion-reduce:active:scale-100 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
97
97
|
children: [
|
|
98
|
-
/* @__PURE__ */ e(
|
|
98
|
+
/* @__PURE__ */ e(b, {}),
|
|
99
99
|
/* @__PURE__ */ e("span", { className: "sr-only", children: "Close" })
|
|
100
100
|
]
|
|
101
101
|
}
|
|
@@ -115,16 +115,16 @@ function A({
|
|
|
115
115
|
o.Title,
|
|
116
116
|
{
|
|
117
117
|
"data-slot": "dialog-title",
|
|
118
|
-
className: u("text-
|
|
118
|
+
className: u("text-l font-semibold leading-5", t),
|
|
119
119
|
...i
|
|
120
120
|
}
|
|
121
121
|
);
|
|
122
122
|
}
|
|
123
123
|
export {
|
|
124
|
-
|
|
124
|
+
k as Dialog,
|
|
125
125
|
V as DialogContent,
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
y as DialogOverlay,
|
|
127
|
+
D as DialogPortal,
|
|
128
128
|
A as DialogTitle,
|
|
129
129
|
R as DialogTrigger
|
|
130
130
|
};
|