@actioneer/ads 0.5.9 → 0.7.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/ai-elements/agent-trace.d.ts +2 -2
- package/components/ai-elements/agent-trace.js +163 -104
- package/components/ai-elements/chain-of-thought.d.ts +2 -2
- package/components/ai-elements/chain-of-thought.js +1 -1
- package/components/ai-elements/index.d.ts +0 -5
- package/components/ai-elements/inline-citation.js +1 -1
- package/components/alert.d.ts +6 -6
- package/components/alert.js +89 -53
- package/components/answer-sources.d.ts +2 -6
- package/components/answer-sources.js +58 -60
- package/components/answer.d.ts +5 -0
- package/components/answer.js +311 -271
- package/components/assistant-ui/composer-harness.js +11 -14
- package/components/assistant-ui/composer.d.ts +3 -1
- package/components/assistant-ui/composer.js +148 -144
- package/components/assistant-ui/index.d.ts +0 -3
- package/components/assistant-ui/thread-context.d.ts +3 -1
- package/components/assistant-ui/thread.js +50 -42
- package/components/avatar.js +42 -42
- package/components/badge.d.ts +5 -6
- package/components/badge.js +13 -76
- package/components/body-page-header.d.ts +15 -0
- package/components/body-page-header.js +24 -0
- package/components/brand-loader.d.ts +0 -3
- package/components/brand-loader.js +10 -32
- package/components/breadcrumbs.d.ts +1 -8
- package/components/breadcrumbs.js +65 -78
- package/components/button.d.ts +1 -1
- package/components/button.js +55 -49
- package/components/card.js +19 -18
- package/components/chart.js +526 -503
- package/components/chip.d.ts +13 -1
- package/components/chip.js +93 -80
- package/components/collection-header.d.ts +17 -0
- package/components/collection-header.js +31 -0
- package/components/connector-card.d.ts +6 -6
- package/components/connector-card.js +31 -32
- package/components/date-range-picker.d.ts +26 -0
- package/components/date-range-picker.js +223 -0
- package/components/drawer.d.ts +19 -3
- package/components/drawer.js +143 -116
- package/components/dropdown.d.ts +1 -2
- package/components/dropdown.js +88 -89
- package/components/field.js +39 -34
- package/components/file-dropzone.js +1 -1
- package/components/index.d.ts +5 -4
- package/components/index.js +501 -546
- package/components/infinite-canvas.js +24 -24
- package/components/input-field.d.ts +18 -3
- package/components/input-field.js +88 -72
- package/components/input.js +16 -15
- package/components/modal.d.ts +31 -3
- package/components/modal.js +243 -169
- package/components/number-field.js +45 -42
- package/components/page-body.d.ts +12 -0
- package/components/page-body.js +18 -0
- package/components/pagination.js +36 -36
- package/components/panel.js +31 -28
- package/components/select.d.ts +21 -0
- package/components/select.js +189 -148
- package/components/setting-row.d.ts +6 -5
- package/components/setting-row.js +33 -32
- package/components/sidebar.d.ts +2 -0
- package/components/sidebar.js +165 -155
- package/components/skeleton.js +8 -7
- package/components/slider.js +1 -1
- package/components/surface-loader.d.ts +11 -0
- package/components/surface-loader.js +35 -0
- package/components/table.d.ts +16 -10
- package/components/table.js +426 -410
- package/components/tabs.d.ts +2 -0
- package/components/tabs.js +159 -294
- package/components/textarea.js +9 -9
- package/components/toast.d.ts +1 -1
- package/components/toast.js +181 -118
- package/components/tree.d.ts +5 -1
- package/components/tree.js +96 -63
- package/components/typography.d.ts +4 -4
- package/components/typography.js +13 -13
- package/components/ui/button.d.ts +1 -1
- package/components/ui/dialog.js +33 -33
- package/components/viz-charts.js +186 -183
- package/demo/components/add-to-artifact.js +8 -10
- package/fonts.css +2 -0
- package/lib/cn.js +11 -4
- package/lib/icons.d.ts +4 -0
- package/lib/icons.js +107 -106
- package/lib/interactive.d.ts +1 -1
- package/llms.txt +115 -152
- package/manifest.json +13730 -1084
- package/package.json +4 -2
- package/styles.css +365 -225
- package/theme.css +315 -176
- package/components/agent-icon.d.ts +0 -76
- package/components/agent-icon.js +0 -265
- package/components/ai-elements/queue.d.ts +0 -60
- package/components/ai-elements/queue.js +0 -193
- package/components/ai-elements/speech-input.d.ts +0 -16
- package/components/ai-elements/speech-input.js +0 -151
- package/components/ai-elements/task-progress.d.ts +0 -41
- package/components/ai-elements/task-progress.js +0 -224
- package/components/ai-elements/task.d.ts +0 -39
- package/components/ai-elements/task.js +0 -105
- package/components/ai-elements/voice.d.ts +0 -90
- package/components/ai-elements/voice.js +0 -496
- package/components/assistant-ui/follow-up-suggestions.d.ts +0 -11
- package/components/assistant-ui/follow-up-suggestions.js +0 -72
- package/components/assistant-ui/suggestions.d.ts +0 -7
- package/components/assistant-ui/suggestions.js +0 -19
- package/components/assistant-ui/voice.d.ts +0 -18
- package/components/link.d.ts +0 -14
- package/components/link.js +0 -72
- package/components/navbar.d.ts +0 -15
- package/components/navbar.js +0 -68
- package/components/pixel-icon.d.ts +0 -37
- package/components/pixel-icon.js +0 -859
package/components/dropdown.js
CHANGED
|
@@ -1,82 +1,81 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as N, jsx as h } from "react/jsx-runtime";
|
|
3
3
|
import * as s from "react";
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import { MotionConfig as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { menuVariants as
|
|
8
|
-
import { Ripple as
|
|
9
|
-
const C = (r, t) => `${r === "top" ? "bottom" : "top"} ${t === "start" ? "left" : "right"}`,
|
|
4
|
+
import { createPortal as A } from "react-dom";
|
|
5
|
+
import { MotionConfig as I, AnimatePresence as P, motion as z } from "motion/react";
|
|
6
|
+
import { cn as R } from "../lib/cn.js";
|
|
7
|
+
import { menuVariants as S } from "../lib/motion.js";
|
|
8
|
+
import { Ripple as _ } from "./ripple.js";
|
|
9
|
+
const C = 6, L = (r, t) => `${r === "top" ? "bottom" : "top"} ${t === "start" ? "left" : "right"}`, O = s.createContext(null);
|
|
10
10
|
function k(r) {
|
|
11
|
-
const t = s.useContext(
|
|
11
|
+
const t = s.useContext(O);
|
|
12
12
|
if (!t)
|
|
13
13
|
throw new Error(`${r} must be used within a <Dropdown>.`);
|
|
14
14
|
return t;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
const [n,
|
|
18
|
-
return /* @__PURE__ */
|
|
16
|
+
function B({ children: r, defaultOpen: t = !1 }) {
|
|
17
|
+
const [n, f] = s.useState(t), p = s.useRef(null), d = s.useRef(null);
|
|
18
|
+
return /* @__PURE__ */ h(O.Provider, { value: { open: n, setOpen: f, triggerRef: p, contentRef: d }, children: r });
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
const { open: t, setOpen: n, triggerRef:
|
|
22
|
-
return s.cloneElement(
|
|
23
|
-
ref:
|
|
20
|
+
function U({ children: r }) {
|
|
21
|
+
const { open: t, setOpen: n, triggerRef: f } = k("DropdownTrigger"), p = r;
|
|
22
|
+
return s.cloneElement(p, {
|
|
23
|
+
ref: f,
|
|
24
24
|
"aria-expanded": t,
|
|
25
25
|
"aria-haspopup": "menu",
|
|
26
|
-
onClick: (
|
|
27
|
-
var
|
|
28
|
-
(
|
|
26
|
+
onClick: (d) => {
|
|
27
|
+
var a, m;
|
|
28
|
+
(m = (a = p.props).onClick) == null || m.call(a, d), n(!t);
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function V({
|
|
33
33
|
className: r,
|
|
34
34
|
align: t = "start",
|
|
35
35
|
side: n = "bottom",
|
|
36
|
-
|
|
37
|
-
autoFocusFirstItem: l = !1,
|
|
36
|
+
autoFocusFirstItem: f = !1,
|
|
38
37
|
children: p,
|
|
39
|
-
...
|
|
38
|
+
...d
|
|
40
39
|
}) {
|
|
41
|
-
const { open: a, setOpen:
|
|
40
|
+
const { open: a, setOpen: m, triggerRef: w, contentRef: c } = k("DropdownContent"), [l, D] = s.useState(null);
|
|
42
41
|
s.useLayoutEffect(() => {
|
|
43
42
|
if (!a) return;
|
|
44
|
-
const i =
|
|
43
|
+
const i = w.current;
|
|
45
44
|
if (!i) return;
|
|
46
45
|
const e = () => {
|
|
47
|
-
var x,
|
|
48
|
-
const o = i.getBoundingClientRect(),
|
|
49
|
-
|
|
46
|
+
var x, b;
|
|
47
|
+
const o = i.getBoundingClientRect(), u = ((x = c.current) == null ? void 0 : x.offsetWidth) ?? 0, v = ((b = c.current) == null ? void 0 : b.offsetHeight) ?? 0, y = t === "end" ? o.right - u : o.left, E = n === "top" ? o.top - v - C : o.bottom + C;
|
|
48
|
+
D({ top: E, left: y });
|
|
50
49
|
};
|
|
51
50
|
return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
|
|
52
51
|
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
53
52
|
};
|
|
54
|
-
}, [a, t, n,
|
|
53
|
+
}, [a, t, n, w, c]), s.useEffect(() => {
|
|
55
54
|
if (!a) return;
|
|
56
55
|
const i = requestAnimationFrame(() => {
|
|
57
56
|
var e, o;
|
|
58
|
-
if (
|
|
59
|
-
const
|
|
57
|
+
if (f) {
|
|
58
|
+
const u = (e = c.current) == null ? void 0 : e.querySelector(
|
|
60
59
|
'[role="menuitem"]:not([aria-disabled="true"])'
|
|
61
60
|
);
|
|
62
|
-
|
|
61
|
+
u == null || u.focus();
|
|
63
62
|
} else
|
|
64
63
|
(o = c.current) == null || o.focus();
|
|
65
64
|
});
|
|
66
65
|
return () => cancelAnimationFrame(i);
|
|
67
|
-
}, [a,
|
|
66
|
+
}, [a, f, c]), s.useEffect(() => {
|
|
68
67
|
if (!a) return;
|
|
69
68
|
const i = (e) => {
|
|
70
|
-
var
|
|
69
|
+
var u, v;
|
|
71
70
|
const o = e.target;
|
|
72
|
-
(
|
|
71
|
+
(u = c.current) != null && u.contains(o) || (v = w.current) != null && v.contains(o) || m(!1);
|
|
73
72
|
};
|
|
74
73
|
return document.addEventListener("pointerdown", i), () => document.removeEventListener("pointerdown", i);
|
|
75
|
-
}, [a,
|
|
76
|
-
const
|
|
77
|
-
var
|
|
74
|
+
}, [a, m, w, c]);
|
|
75
|
+
const g = (i) => {
|
|
76
|
+
var u, v, y, E, x, b;
|
|
78
77
|
const e = Array.from(
|
|
79
|
-
((
|
|
78
|
+
((u = c.current) == null ? void 0 : u.querySelectorAll(
|
|
80
79
|
'[role="menuitem"]:not([aria-disabled="true"])'
|
|
81
80
|
)) ?? []
|
|
82
81
|
);
|
|
@@ -84,49 +83,49 @@ function W({
|
|
|
84
83
|
const o = e.indexOf(document.activeElement);
|
|
85
84
|
switch (i.key) {
|
|
86
85
|
case "Escape":
|
|
87
|
-
i.preventDefault(),
|
|
86
|
+
i.preventDefault(), m(!1), (v = w.current) == null || v.focus();
|
|
88
87
|
break;
|
|
89
88
|
case "ArrowDown":
|
|
90
|
-
i.preventDefault(), (
|
|
89
|
+
i.preventDefault(), (y = e[o < 0 ? 0 : (o + 1) % e.length]) == null || y.focus();
|
|
91
90
|
break;
|
|
92
91
|
case "ArrowUp":
|
|
93
|
-
i.preventDefault(), (
|
|
92
|
+
i.preventDefault(), (E = e[o < 0 ? e.length - 1 : (o - 1 + e.length) % e.length]) == null || E.focus();
|
|
94
93
|
break;
|
|
95
94
|
case "Home":
|
|
96
95
|
i.preventDefault(), (x = e[0]) == null || x.focus();
|
|
97
96
|
break;
|
|
98
97
|
case "End":
|
|
99
|
-
i.preventDefault(), (
|
|
98
|
+
i.preventDefault(), (b = e[e.length - 1]) == null || b.focus();
|
|
100
99
|
break;
|
|
101
100
|
}
|
|
102
101
|
};
|
|
103
|
-
return
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
|
|
102
|
+
return A(
|
|
103
|
+
/* @__PURE__ */ h(I, { reducedMotion: "user", children: /* @__PURE__ */ h(P, { children: a && /* @__PURE__ */ N(
|
|
104
|
+
z.div,
|
|
106
105
|
{
|
|
107
106
|
ref: c,
|
|
108
107
|
role: "menu",
|
|
109
108
|
tabIndex: -1,
|
|
110
|
-
onKeyDown:
|
|
111
|
-
variants:
|
|
109
|
+
onKeyDown: g,
|
|
110
|
+
variants: S,
|
|
112
111
|
initial: "hidden",
|
|
113
112
|
animate: "visible",
|
|
114
113
|
exit: "hidden",
|
|
115
114
|
style: {
|
|
116
115
|
position: "fixed",
|
|
117
|
-
top: (
|
|
118
|
-
left: (
|
|
119
|
-
visibility:
|
|
120
|
-
transformOrigin:
|
|
116
|
+
top: (l == null ? void 0 : l.top) ?? 0,
|
|
117
|
+
left: (l == null ? void 0 : l.left) ?? 0,
|
|
118
|
+
visibility: l ? "visible" : "hidden",
|
|
119
|
+
transformOrigin: L(n, t)
|
|
121
120
|
},
|
|
122
|
-
className:
|
|
123
|
-
"relative z-50 min-w-44 rounded-lg border border-
|
|
121
|
+
className: R(
|
|
122
|
+
"relative z-50 min-w-44 rounded-lg border border-menu-stroke bg-elevated p-1",
|
|
124
123
|
"text-foreground shadow-elevation outline-none",
|
|
125
124
|
r
|
|
126
125
|
),
|
|
127
|
-
...
|
|
126
|
+
...d,
|
|
128
127
|
children: [
|
|
129
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ h(_, { origin: L(n, t) }),
|
|
130
129
|
p
|
|
131
130
|
]
|
|
132
131
|
}
|
|
@@ -134,78 +133,78 @@ function W({
|
|
|
134
133
|
document.body
|
|
135
134
|
);
|
|
136
135
|
}
|
|
137
|
-
const
|
|
136
|
+
const q = s.forwardRef(
|
|
138
137
|
({
|
|
139
138
|
className: r,
|
|
140
139
|
startContent: t,
|
|
141
140
|
danger: n,
|
|
142
|
-
disabled:
|
|
143
|
-
restoreFocus:
|
|
144
|
-
onSelect:
|
|
145
|
-
children:
|
|
146
|
-
...
|
|
147
|
-
},
|
|
148
|
-
const { setOpen:
|
|
149
|
-
var
|
|
150
|
-
|
|
141
|
+
disabled: f,
|
|
142
|
+
restoreFocus: p = !0,
|
|
143
|
+
onSelect: d,
|
|
144
|
+
children: a,
|
|
145
|
+
...m
|
|
146
|
+
}, w) => {
|
|
147
|
+
const { setOpen: c, triggerRef: l } = k("DropdownItem"), D = () => {
|
|
148
|
+
var g;
|
|
149
|
+
f || (d == null || d(), c(!1), p && ((g = l.current) == null || g.focus()));
|
|
151
150
|
};
|
|
152
|
-
return /* @__PURE__ */
|
|
151
|
+
return /* @__PURE__ */ N(
|
|
153
152
|
"div",
|
|
154
153
|
{
|
|
155
|
-
ref:
|
|
154
|
+
ref: w,
|
|
156
155
|
role: "menuitem",
|
|
157
156
|
tabIndex: -1,
|
|
158
|
-
"aria-disabled":
|
|
159
|
-
onClick:
|
|
160
|
-
onKeyDown: (
|
|
161
|
-
(
|
|
157
|
+
"aria-disabled": f || void 0,
|
|
158
|
+
onClick: D,
|
|
159
|
+
onKeyDown: (g) => {
|
|
160
|
+
(g.key === "Enter" || g.key === " ") && (g.preventDefault(), D());
|
|
162
161
|
},
|
|
163
|
-
className:
|
|
164
|
-
"flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-
|
|
162
|
+
className: R(
|
|
163
|
+
"flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-m font-medium",
|
|
165
164
|
"outline-none transition-colors duration-150",
|
|
166
165
|
"focus-visible:ring-3 focus-visible:ring-ring",
|
|
167
166
|
n ? "text-danger" : "text-foreground",
|
|
168
|
-
|
|
167
|
+
f ? "pointer-events-none opacity-50" : n ? "hover:bg-danger/10 focus:bg-danger/10" : "hover:bg-action-primary-soft hover:text-action-primary-text focus:bg-action-primary-soft focus:text-action-primary-text",
|
|
169
168
|
"[&_svg]:size-4 [&_svg]:shrink-0",
|
|
170
169
|
r
|
|
171
170
|
),
|
|
172
|
-
...
|
|
171
|
+
...m,
|
|
173
172
|
children: [
|
|
174
173
|
t,
|
|
175
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ h("span", { className: "flex-1", children: a })
|
|
176
175
|
]
|
|
177
176
|
}
|
|
178
177
|
);
|
|
179
178
|
}
|
|
180
179
|
);
|
|
181
|
-
|
|
182
|
-
const
|
|
180
|
+
q.displayName = "DropdownItem";
|
|
181
|
+
const F = s.forwardRef(({ className: r, ...t }, n) => /* @__PURE__ */ h(
|
|
183
182
|
"div",
|
|
184
183
|
{
|
|
185
184
|
ref: n,
|
|
186
185
|
role: "separator",
|
|
187
|
-
className:
|
|
186
|
+
className: R("my-1 h-px bg-menu-stroke", r),
|
|
188
187
|
...t
|
|
189
188
|
}
|
|
190
189
|
));
|
|
191
|
-
|
|
192
|
-
const
|
|
190
|
+
F.displayName = "DropdownSeparator";
|
|
191
|
+
const T = s.forwardRef(({ className: r, ...t }, n) => /* @__PURE__ */ h(
|
|
193
192
|
"div",
|
|
194
193
|
{
|
|
195
194
|
ref: n,
|
|
196
|
-
className:
|
|
195
|
+
className: R(
|
|
197
196
|
"px-2 py-1.5 text-xs font-normal text-muted-foreground select-none",
|
|
198
197
|
r
|
|
199
198
|
),
|
|
200
199
|
...t
|
|
201
200
|
}
|
|
202
201
|
));
|
|
203
|
-
|
|
202
|
+
T.displayName = "DropdownLabel";
|
|
204
203
|
export {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
204
|
+
B as Dropdown,
|
|
205
|
+
V as DropdownContent,
|
|
206
|
+
q as DropdownItem,
|
|
207
|
+
T as DropdownLabel,
|
|
208
|
+
F as DropdownSeparator,
|
|
209
|
+
U as DropdownTrigger
|
|
211
210
|
};
|
package/components/field.js
CHANGED
|
@@ -1,85 +1,90 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as v, jsx as
|
|
3
|
-
import * as
|
|
2
|
+
import { jsxs as v, jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import * as a from "react";
|
|
4
4
|
import { cn as i } from "../lib/cn.js";
|
|
5
5
|
import { interactive as R } from "../lib/interactive.js";
|
|
6
6
|
const L = i(
|
|
7
7
|
// Border WIDTH only — no border-color utility. ads-interactive owns the
|
|
8
8
|
// color (rest = --glow-border-rest below); a `border-input` utility here
|
|
9
|
-
// would out-cascade the hover/focus
|
|
10
|
-
"flex w-full rounded-md border bg-elevated text-
|
|
11
|
-
"px-3 text-
|
|
12
|
-
"placeholder:text-
|
|
9
|
+
// would out-cascade the shared hover/focus rules.
|
|
10
|
+
"flex w-full rounded-md border bg-elevated text-on-white-tertiary",
|
|
11
|
+
"px-3 text-m font-medium hover:text-on-white-secondary focus:text-on-white-primary",
|
|
12
|
+
"placeholder:text-on-white-tertiary hover:placeholder:text-on-white-secondary focus:placeholder:text-transparent",
|
|
13
13
|
"outline-none",
|
|
14
|
+
// Text/placeholder color changes are intentionally immediate. Interpolating
|
|
15
|
+
// glyph color makes browser antialiasing look like the copy shifts on hover.
|
|
16
|
+
"transition-[border-color,box-shadow]",
|
|
14
17
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
15
18
|
// Form controls keep a subtle stroke (the "~25%") for crisp definition;
|
|
16
|
-
// hover
|
|
19
|
+
// hover stays neutral while focus uses the subtle semantic green edge. The inner
|
|
17
20
|
// glow is a whisper of inset depth so the writing surface reads recessed —
|
|
18
21
|
// carried through every interactive state by the --glow-inset hook.
|
|
19
22
|
R({ on: "all", color: "brand", intensity: "medium", animate: !0 }),
|
|
20
23
|
"[--glow-border-rest:var(--input)]",
|
|
24
|
+
"[--glow-border-hover:var(--input)]",
|
|
25
|
+
"[--glow-border-active:var(--field-focus)]",
|
|
21
26
|
"[--glow-inset:var(--inner-glow-field)]"
|
|
22
|
-
),
|
|
27
|
+
), w = a.forwardRef(({ className: r, children: e, required: o, ...t }, d) => /* @__PURE__ */ v(
|
|
23
28
|
"label",
|
|
24
29
|
{
|
|
25
|
-
ref:
|
|
30
|
+
ref: d,
|
|
26
31
|
className: i(
|
|
27
|
-
"flex items-center gap-1 text-
|
|
32
|
+
"flex items-center gap-1 text-m font-medium text-secondary select-none",
|
|
28
33
|
"peer-disabled:cursor-not-allowed peer-disabled:opacity-60",
|
|
29
|
-
|
|
34
|
+
r
|
|
30
35
|
),
|
|
31
|
-
...
|
|
36
|
+
...t,
|
|
32
37
|
children: [
|
|
33
38
|
e,
|
|
34
|
-
o && /* @__PURE__ */
|
|
39
|
+
o && /* @__PURE__ */ l("span", { className: "text-danger", children: "*" })
|
|
35
40
|
]
|
|
36
41
|
}
|
|
37
42
|
));
|
|
38
|
-
|
|
39
|
-
const
|
|
43
|
+
w.displayName = "Label";
|
|
44
|
+
const h = a.forwardRef(({ className: r, ...e }, o) => /* @__PURE__ */ l(
|
|
40
45
|
"p",
|
|
41
46
|
{
|
|
42
47
|
ref: o,
|
|
43
|
-
className: i("text-
|
|
48
|
+
className: i("text-m font-normal text-muted-foreground", r),
|
|
44
49
|
...e
|
|
45
50
|
}
|
|
46
51
|
));
|
|
47
|
-
|
|
48
|
-
const y =
|
|
49
|
-
({ className:
|
|
52
|
+
h.displayName = "FieldDescription";
|
|
53
|
+
const y = a.forwardRef(
|
|
54
|
+
({ className: r, children: e, ...o }, t) => e ? /* @__PURE__ */ l(
|
|
50
55
|
"p",
|
|
51
56
|
{
|
|
52
|
-
ref:
|
|
53
|
-
className: i("text-
|
|
57
|
+
ref: t,
|
|
58
|
+
className: i("text-m font-normal text-danger", r),
|
|
54
59
|
...o,
|
|
55
60
|
children: e
|
|
56
61
|
}
|
|
57
62
|
) : null
|
|
58
63
|
);
|
|
59
64
|
y.displayName = "FieldError";
|
|
60
|
-
const D =
|
|
61
|
-
({ className:
|
|
62
|
-
const m =
|
|
63
|
-
let x =
|
|
64
|
-
if (E && u &&
|
|
65
|
-
const b =
|
|
66
|
-
x =
|
|
65
|
+
const D = a.forwardRef(
|
|
66
|
+
({ className: r, label: e, description: o, error: t, required: d, htmlFor: g, errorId: s, descriptionId: c, children: n, ...N }, F) => {
|
|
67
|
+
const m = a.useId(), p = s ?? `${m}-error`, f = c ?? `${m}-description`, u = t ? p : o ? f : void 0, E = s == null && c == null;
|
|
68
|
+
let x = n;
|
|
69
|
+
if (E && u && a.isValidElement(n)) {
|
|
70
|
+
const b = n.props;
|
|
71
|
+
x = a.cloneElement(n, {
|
|
67
72
|
"aria-describedby": [b["aria-describedby"], u].filter(Boolean).join(" ") || void 0,
|
|
68
|
-
"aria-invalid": b["aria-invalid"] ?? (
|
|
73
|
+
"aria-invalid": b["aria-invalid"] ?? (t ? !0 : void 0)
|
|
69
74
|
});
|
|
70
75
|
}
|
|
71
|
-
return /* @__PURE__ */ v("div", { ref:
|
|
72
|
-
e && /* @__PURE__ */
|
|
76
|
+
return /* @__PURE__ */ v("div", { ref: F, className: i("flex flex-col gap-1.5", r), ...N, children: [
|
|
77
|
+
e && /* @__PURE__ */ l(w, { htmlFor: g, required: d, children: e }),
|
|
73
78
|
x,
|
|
74
|
-
|
|
79
|
+
t ? /* @__PURE__ */ l(y, { id: p, children: t }) : o ? /* @__PURE__ */ l(h, { id: f, children: o }) : null
|
|
75
80
|
] });
|
|
76
81
|
}
|
|
77
82
|
);
|
|
78
83
|
D.displayName = "Field";
|
|
79
84
|
export {
|
|
80
85
|
D as Field,
|
|
81
|
-
|
|
86
|
+
h as FieldDescription,
|
|
82
87
|
y as FieldError,
|
|
83
|
-
|
|
88
|
+
w as Label,
|
|
84
89
|
L as inputBaseClass
|
|
85
90
|
};
|
|
@@ -8,7 +8,7 @@ import { FileText as R, Close as B, Upload as w } from "../lib/icons.js";
|
|
|
8
8
|
const T = C(
|
|
9
9
|
v(
|
|
10
10
|
"flex w-full cursor-pointer flex-col items-center justify-center gap-2 rounded-xl px-6 py-8 text-center",
|
|
11
|
-
"border
|
|
11
|
+
"border border-dashed border-border-strong bg-surface outline-none",
|
|
12
12
|
"transition-[background-color,border-color,transform] duration-150 ease-out",
|
|
13
13
|
"hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring",
|
|
14
14
|
"active:scale-[0.97] motion-reduce:transition-none"
|
package/components/index.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export * from './spinner';
|
|
|
9
9
|
export * from './reveal';
|
|
10
10
|
export * from './field';
|
|
11
11
|
export * from './typography';
|
|
12
|
-
export * from './link';
|
|
13
12
|
export * from './divider';
|
|
14
13
|
export * from './kbd';
|
|
15
14
|
export * from './code-block';
|
|
@@ -28,6 +27,7 @@ export * from './radio';
|
|
|
28
27
|
export * from './switch';
|
|
29
28
|
export * from './number-field';
|
|
30
29
|
export * from './select';
|
|
30
|
+
export * from './date-range-picker';
|
|
31
31
|
export * from './autocomplete';
|
|
32
32
|
export * from './slider';
|
|
33
33
|
export * from './segmented';
|
|
@@ -55,21 +55,22 @@ export * from './badge';
|
|
|
55
55
|
export * from './chip';
|
|
56
56
|
export * from './timeline';
|
|
57
57
|
export * from './alert';
|
|
58
|
+
export * from './surface-loader';
|
|
58
59
|
export * from './brand-loader';
|
|
59
60
|
export * from './pixel-blast-svg';
|
|
60
|
-
export * from './pixel-icon';
|
|
61
|
-
export * from './agent-icon';
|
|
62
61
|
export * from './ripple';
|
|
63
62
|
export * from './brand-texture';
|
|
64
63
|
export * from './progress';
|
|
65
64
|
export * from './progress-circle';
|
|
66
65
|
export * from './skeleton';
|
|
67
66
|
export * from './empty-state';
|
|
67
|
+
export * from './body-page-header';
|
|
68
|
+
export * from './collection-header';
|
|
68
69
|
export * from './page-header';
|
|
69
|
-
export * from './navbar';
|
|
70
70
|
export * from './breadcrumbs';
|
|
71
71
|
export * from './pagination';
|
|
72
72
|
export * from './sidebar';
|
|
73
|
+
export * from './page-body';
|
|
73
74
|
export * from './panel';
|
|
74
75
|
export * from './collapsible';
|
|
75
76
|
export * from './selection-action-bar';
|