@actioneer/ads 0.5.8 → 0.5.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/components/avatar.d.ts +1 -0
- package/components/avatar.js +5 -4
- package/components/breadcrumbs.d.ts +2 -0
- package/components/breadcrumbs.js +50 -48
- package/components/chart.d.ts +6 -0
- package/components/chart.js +737 -668
- package/components/drawer.d.ts +3 -1
- package/components/drawer.js +74 -72
- package/components/modal.d.ts +5 -1
- package/components/modal.js +74 -61
- 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/demo/components/add-to-artifact.js +129 -107
- package/demo/lib/artifact-library.js +37 -29
- package/demo/lib/artifact-pin-guard.js +12 -0
- package/lib/icons.d.ts +20 -0
- package/lib/icons.js +112 -107
- package/llms.txt +1 -1
- package/manifest.json +20 -7
- package/package.json +1 -1
package/components/drawer.d.ts
CHANGED
|
@@ -22,10 +22,12 @@ export interface DrawerProps extends VariantProps<typeof panelVariants> {
|
|
|
22
22
|
export interface ModalDrawerProps extends VariantProps<typeof panelVariants> {
|
|
23
23
|
open: boolean;
|
|
24
24
|
onOpenChange: (open: boolean) => void;
|
|
25
|
+
/** Accessible name for the modal drawer dialog. */
|
|
26
|
+
"aria-label": string;
|
|
25
27
|
className?: string;
|
|
26
28
|
children: React.ReactNode;
|
|
27
29
|
}
|
|
28
|
-
export declare function ModalDrawer({ open, onOpenChange, side: sideProp, size, className, children, }: ModalDrawerProps): React.ReactPortal;
|
|
30
|
+
export declare function ModalDrawer({ open, onOpenChange, side: sideProp, size, className, children, "aria-label": ariaLabel, }: ModalDrawerProps): React.ReactPortal;
|
|
29
31
|
/**
|
|
30
32
|
* Drawer — an in-flow side panel that slides in beside content instead of
|
|
31
33
|
* portaling over the whole page. No backdrop, no scroll lock; the surrounding
|
package/components/drawer.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as i, jsxs as v } from "react/jsx-runtime";
|
|
3
3
|
import * as a from "react";
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import { MotionConfig as
|
|
6
|
-
import { Close as
|
|
7
|
-
import { cva as
|
|
8
|
-
import { cn as
|
|
9
|
-
import { springSheet as
|
|
10
|
-
const
|
|
4
|
+
import { createPortal as R } from "react-dom";
|
|
5
|
+
import { MotionConfig as b, AnimatePresence as z, motion as h } from "motion/react";
|
|
6
|
+
import { Close as E } from "../lib/icons.js";
|
|
7
|
+
import { cva as j } from "class-variance-authority";
|
|
8
|
+
import { cn as l } from "../lib/cn.js";
|
|
9
|
+
import { springSheet as c, drawerOffset as m, drawerBackdropVariants as F } from "../lib/motion.js";
|
|
10
|
+
const N = j(
|
|
11
11
|
[
|
|
12
12
|
"relative flex flex-col",
|
|
13
13
|
"bg-elevated text-foreground",
|
|
@@ -43,12 +43,12 @@ const z = E(
|
|
|
43
43
|
],
|
|
44
44
|
defaultVariants: { side: "right", size: "md" }
|
|
45
45
|
}
|
|
46
|
-
),
|
|
46
|
+
), A = {
|
|
47
47
|
right: "justify-end items-stretch",
|
|
48
48
|
left: "justify-start items-stretch",
|
|
49
49
|
bottom: "justify-center items-end"
|
|
50
50
|
};
|
|
51
|
-
function
|
|
51
|
+
function k({
|
|
52
52
|
onClick: t,
|
|
53
53
|
className: e
|
|
54
54
|
}) {
|
|
@@ -58,7 +58,7 @@ function N({
|
|
|
58
58
|
type: "button",
|
|
59
59
|
onClick: t,
|
|
60
60
|
"aria-label": "Close",
|
|
61
|
-
className:
|
|
61
|
+
className: l(
|
|
62
62
|
"absolute inline-flex size-8 items-center justify-center",
|
|
63
63
|
"rounded-sm text-muted-foreground",
|
|
64
64
|
"transition-[background,color,transform] duration-150 ease-out motion-reduce:transition-none hover:bg-muted hover:text-foreground",
|
|
@@ -67,42 +67,43 @@ function N({
|
|
|
67
67
|
"[&_svg]:size-4 [&_svg]:shrink-0",
|
|
68
68
|
e
|
|
69
69
|
),
|
|
70
|
-
children: /* @__PURE__ */ i(
|
|
70
|
+
children: /* @__PURE__ */ i(E, { "aria-hidden": !0 })
|
|
71
71
|
}
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function S({
|
|
75
75
|
open: t,
|
|
76
76
|
onOpenChange: e,
|
|
77
77
|
side: r,
|
|
78
|
-
size:
|
|
79
|
-
className:
|
|
80
|
-
children:
|
|
78
|
+
size: f,
|
|
79
|
+
className: u,
|
|
80
|
+
children: w,
|
|
81
|
+
"aria-label": x
|
|
81
82
|
}) {
|
|
82
|
-
const
|
|
83
|
+
const o = r ?? "right", d = a.useRef(null), n = a.useRef(null);
|
|
83
84
|
return a.useEffect(() => {
|
|
84
85
|
if (!t) return;
|
|
85
|
-
|
|
86
|
-
const
|
|
86
|
+
n.current = document.activeElement;
|
|
87
|
+
const g = document.body.style.overflow;
|
|
87
88
|
document.body.style.overflow = "hidden";
|
|
88
|
-
const
|
|
89
|
+
const y = (s) => {
|
|
89
90
|
s.key === "Escape" && (s.stopPropagation(), e(!1));
|
|
90
91
|
};
|
|
91
|
-
document.addEventListener("keydown",
|
|
92
|
-
const
|
|
92
|
+
document.addEventListener("keydown", y);
|
|
93
|
+
const D = requestAnimationFrame(() => {
|
|
93
94
|
var s;
|
|
94
|
-
(s =
|
|
95
|
+
(s = d.current) == null || s.focus();
|
|
95
96
|
});
|
|
96
97
|
return () => {
|
|
97
|
-
var s,
|
|
98
|
-
document.removeEventListener("keydown",
|
|
98
|
+
var s, p;
|
|
99
|
+
document.removeEventListener("keydown", y), document.body.style.overflow = g, cancelAnimationFrame(D), (p = (s = n.current) == null ? void 0 : s.focus) == null || p.call(s);
|
|
99
100
|
};
|
|
100
|
-
}, [t, e]),
|
|
101
|
-
/* @__PURE__ */ i(
|
|
101
|
+
}, [t, e]), R(
|
|
102
|
+
/* @__PURE__ */ i(b, { reducedMotion: "user", children: /* @__PURE__ */ i(z, { children: t && /* @__PURE__ */ v("div", { className: l("fixed inset-0 z-50 flex", A[o]), children: [
|
|
102
103
|
/* @__PURE__ */ i(
|
|
103
104
|
h.div,
|
|
104
105
|
{
|
|
105
|
-
variants:
|
|
106
|
+
variants: F,
|
|
106
107
|
initial: "hidden",
|
|
107
108
|
animate: "visible",
|
|
108
109
|
exit: "hidden",
|
|
@@ -115,23 +116,24 @@ function q({
|
|
|
115
116
|
/* @__PURE__ */ v(
|
|
116
117
|
h.div,
|
|
117
118
|
{
|
|
118
|
-
ref:
|
|
119
|
-
initial:
|
|
120
|
-
animate: { transform: "translate3d(0, 0, 0)", opacity: 1, transition:
|
|
121
|
-
exit: { ...
|
|
119
|
+
ref: d,
|
|
120
|
+
initial: m[o],
|
|
121
|
+
animate: { transform: "translate3d(0, 0, 0)", opacity: 1, transition: c },
|
|
122
|
+
exit: { ...m[o], transition: c },
|
|
122
123
|
role: "dialog",
|
|
123
124
|
"aria-modal": "true",
|
|
125
|
+
"aria-label": x,
|
|
124
126
|
tabIndex: -1,
|
|
125
|
-
className:
|
|
127
|
+
className: l(N({ side: o, size: f }), "relative outline-none", u),
|
|
126
128
|
children: [
|
|
127
129
|
/* @__PURE__ */ i(
|
|
128
|
-
|
|
130
|
+
k,
|
|
129
131
|
{
|
|
130
132
|
onClick: () => e(!1),
|
|
131
133
|
className: "right-4 top-4"
|
|
132
134
|
}
|
|
133
135
|
),
|
|
134
|
-
|
|
136
|
+
w
|
|
135
137
|
]
|
|
136
138
|
},
|
|
137
139
|
"panel"
|
|
@@ -140,96 +142,96 @@ function q({
|
|
|
140
142
|
document.body
|
|
141
143
|
);
|
|
142
144
|
}
|
|
143
|
-
function
|
|
145
|
+
function B({
|
|
144
146
|
open: t,
|
|
145
147
|
onOpenChange: e,
|
|
146
148
|
side: r,
|
|
147
|
-
size:
|
|
148
|
-
className:
|
|
149
|
-
children:
|
|
150
|
-
"aria-label":
|
|
149
|
+
size: f,
|
|
150
|
+
className: u,
|
|
151
|
+
children: w,
|
|
152
|
+
"aria-label": x
|
|
151
153
|
}) {
|
|
152
|
-
const
|
|
154
|
+
const o = r ?? "right", d = a.useRef(null);
|
|
153
155
|
return a.useEffect(() => {
|
|
154
156
|
if (!t) return;
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
+
const n = (g) => {
|
|
158
|
+
g.key === "Escape" && e(!1);
|
|
157
159
|
};
|
|
158
|
-
return document.addEventListener("keydown",
|
|
159
|
-
}, [t, e]), /* @__PURE__ */ i(
|
|
160
|
+
return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
|
|
161
|
+
}, [t, e]), /* @__PURE__ */ i(b, { reducedMotion: "user", children: /* @__PURE__ */ i(z, { initial: !1, children: t && /* @__PURE__ */ v(
|
|
160
162
|
h.aside,
|
|
161
163
|
{
|
|
162
164
|
ref: d,
|
|
163
|
-
initial:
|
|
164
|
-
animate: { transform: "translate3d(0, 0, 0)", opacity: 1, transition:
|
|
165
|
-
exit: { ...
|
|
165
|
+
initial: m[o],
|
|
166
|
+
animate: { transform: "translate3d(0, 0, 0)", opacity: 1, transition: c },
|
|
167
|
+
exit: { ...m[o], transition: c },
|
|
166
168
|
role: "complementary",
|
|
167
|
-
"aria-label":
|
|
168
|
-
className:
|
|
169
|
-
|
|
169
|
+
"aria-label": x,
|
|
170
|
+
className: l(
|
|
171
|
+
N({ side: o, size: f }),
|
|
170
172
|
"relative shrink-0 overflow-hidden rounded-lg bg-card shadow-none outline-none",
|
|
171
|
-
|
|
173
|
+
u
|
|
172
174
|
),
|
|
173
175
|
children: [
|
|
174
176
|
/* @__PURE__ */ i(
|
|
175
|
-
|
|
177
|
+
k,
|
|
176
178
|
{
|
|
177
179
|
onClick: () => e(!1),
|
|
178
180
|
className: "right-2 top-1"
|
|
179
181
|
}
|
|
180
182
|
),
|
|
181
|
-
|
|
183
|
+
w
|
|
182
184
|
]
|
|
183
185
|
},
|
|
184
186
|
"inline-drawer"
|
|
185
187
|
) }) });
|
|
186
188
|
}
|
|
187
|
-
const
|
|
189
|
+
const G = B, L = a.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
188
190
|
"div",
|
|
189
191
|
{
|
|
190
192
|
ref: r,
|
|
191
|
-
className:
|
|
193
|
+
className: l("flex flex-col gap-1 px-6 py-4 pr-14", t),
|
|
192
194
|
...e
|
|
193
195
|
}
|
|
194
196
|
));
|
|
195
|
-
|
|
196
|
-
const
|
|
197
|
+
L.displayName = "DrawerHeader";
|
|
198
|
+
const M = a.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
197
199
|
"h2",
|
|
198
200
|
{
|
|
199
201
|
ref: r,
|
|
200
|
-
className:
|
|
202
|
+
className: l("text-lg font-medium text-foreground", t),
|
|
201
203
|
...e
|
|
202
204
|
}
|
|
203
205
|
));
|
|
204
|
-
|
|
205
|
-
const
|
|
206
|
+
M.displayName = "DrawerTitle";
|
|
207
|
+
const V = a.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
206
208
|
"div",
|
|
207
209
|
{
|
|
208
210
|
ref: r,
|
|
209
211
|
tabIndex: 0,
|
|
210
|
-
className:
|
|
212
|
+
className: l("flex-1 overflow-y-auto px-6 py-4 text-xs text-foreground", t),
|
|
211
213
|
...e
|
|
212
214
|
}
|
|
213
215
|
));
|
|
214
|
-
|
|
215
|
-
const
|
|
216
|
+
V.displayName = "DrawerBody";
|
|
217
|
+
const I = a.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
|
|
216
218
|
"div",
|
|
217
219
|
{
|
|
218
220
|
ref: r,
|
|
219
|
-
className:
|
|
221
|
+
className: l(
|
|
220
222
|
"flex items-center justify-end gap-2 px-6 py-4",
|
|
221
223
|
t
|
|
222
224
|
),
|
|
223
225
|
...e
|
|
224
226
|
}
|
|
225
227
|
));
|
|
226
|
-
|
|
228
|
+
I.displayName = "DrawerFooter";
|
|
227
229
|
export {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
230
|
+
B as Drawer,
|
|
231
|
+
V as DrawerBody,
|
|
232
|
+
I as DrawerFooter,
|
|
233
|
+
L as DrawerHeader,
|
|
234
|
+
M as DrawerTitle,
|
|
235
|
+
G as InlineDrawer,
|
|
236
|
+
S as ModalDrawer
|
|
235
237
|
};
|
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
|
};
|
|
@@ -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
|
}
|