@actioneer/ads 1.0.9 → 1.0.10
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 +98 -57
- package/README.md +19 -7
- package/components/answer.js +1 -1
- package/components/assistant-ui/composer-harness.js +13 -10
- package/components/body-page-header.d.ts +9 -4
- package/components/body-page-header.js +10 -10
- package/components/breadcrumbs.js +22 -22
- package/components/card.js +18 -18
- package/components/chart.d.ts +9 -0
- package/components/chart.js +738 -717
- package/components/chip.js +12 -12
- package/components/collection-header.js +4 -4
- package/components/connector-card.js +30 -30
- package/components/date-range-picker.js +1 -1
- package/components/detail-list.d.ts +28 -0
- package/components/detail-list.js +52 -0
- package/components/drawer.d.ts +38 -15
- package/components/drawer.js +150 -86
- package/components/empty-state.d.ts +3 -2
- package/components/empty-state.js +22 -22
- package/components/field.d.ts +16 -0
- package/components/field.js +63 -42
- package/components/file-dropzone.d.ts +15 -4
- package/components/file-dropzone.js +100 -64
- package/components/filter-bar.d.ts +44 -0
- package/components/filter-bar.js +89 -0
- package/components/index.d.ts +3 -0
- package/components/index.js +526 -513
- package/components/input-field.d.ts +1 -1
- package/components/input-field.js +24 -22
- package/components/modal.js +56 -53
- package/components/panel.js +26 -27
- package/components/sidebar.js +54 -54
- package/components/sparkline.d.ts +30 -0
- package/components/sparkline.js +69 -0
- package/demo/components/add-to-artifact.js +5 -2
- package/examples/README.md +4 -2
- package/examples/call-logs-screen.tsx +381 -0
- package/examples/campaign-analysis-screen.tsx +114 -72
- package/examples/campaigns-screen.tsx +218 -160
- package/examples/guardrails-settings-screen.tsx +123 -0
- package/fonts/geist-variable.woff2 +0 -0
- package/fonts.css +12 -17
- package/lib/icons.js +3 -3
- package/llms.txt +107 -39
- package/manifest.json +3100 -892
- package/package.json +1 -1
- package/styles.css +102 -59
- package/theme.css +81 -37
- package/fonts/aribau-grotesk-medium.woff2 +0 -0
- package/fonts/aribau-grotesk-regular.woff2 +0 -0
|
@@ -18,7 +18,7 @@ type InputElement = HTMLInputElement | HTMLTextAreaElement;
|
|
|
18
18
|
* • A generated id is used to wire the label ↔ input pair when the caller
|
|
19
19
|
* doesn't pass one, so a `label` always labels the input for a11y.
|
|
20
20
|
*/
|
|
21
|
-
type FieldOnlyProps = Pick<FieldProps, "label" | "description" | "error" | "required" | "className">;
|
|
21
|
+
type FieldOnlyProps = Pick<FieldProps, "label" | "description" | "error" | "required" | "className" | "info">;
|
|
22
22
|
type SharedNativeProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "className" | "type">;
|
|
23
23
|
export interface InputFieldProps extends SharedNativeProps, FieldOnlyProps {
|
|
24
24
|
startContent?: React.ReactNode;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as t, jsxs as
|
|
2
|
+
import { jsx as t, jsxs as G } from "react/jsx-runtime";
|
|
3
3
|
import * as i from "react";
|
|
4
|
-
import { cn as
|
|
5
|
-
import { EyeOff as
|
|
6
|
-
import { inputBaseClass as
|
|
7
|
-
const
|
|
4
|
+
import { cn as J } from "../lib/cn.js";
|
|
5
|
+
import { EyeOff as L, Eye as M } from "../lib/icons.js";
|
|
6
|
+
import { inputBaseClass as Q, Field as U } from "./field.js";
|
|
7
|
+
const W = i.forwardRef(
|
|
8
8
|
({
|
|
9
9
|
// Field props
|
|
10
10
|
label: v,
|
|
@@ -12,21 +12,22 @@ const U = i.forwardRef(
|
|
|
12
12
|
error: o,
|
|
13
13
|
required: m,
|
|
14
14
|
className: B,
|
|
15
|
+
info: R,
|
|
15
16
|
// Input props
|
|
16
|
-
id:
|
|
17
|
-
inputClassName:
|
|
17
|
+
id: T,
|
|
18
|
+
inputClassName: _,
|
|
18
19
|
startContent: r,
|
|
19
|
-
endContent:
|
|
20
|
+
endContent: $,
|
|
20
21
|
isInvalid: g,
|
|
21
22
|
type: h,
|
|
22
23
|
multiline: l = !1,
|
|
23
|
-
rows:
|
|
24
|
-
"aria-describedby":
|
|
24
|
+
rows: H,
|
|
25
|
+
"aria-describedby": O,
|
|
25
26
|
onBlur: c,
|
|
26
27
|
onKeyDown: u,
|
|
27
28
|
...s
|
|
28
29
|
}, p) => {
|
|
29
|
-
const
|
|
30
|
+
const A = i.useId(), a = T ?? A, x = (e) => e != null && String(e).length > 0, [b, y] = i.useState(
|
|
30
31
|
() => x(s.value ?? s.defaultValue)
|
|
31
32
|
);
|
|
32
33
|
i.useEffect(() => {
|
|
@@ -38,28 +39,28 @@ const U = i.forwardRef(
|
|
|
38
39
|
w(e.currentTarget), c == null || c(e);
|
|
39
40
|
}, N = (e) => {
|
|
40
41
|
!l && e.key === "Enter" && w(e.currentTarget), u == null || u(e);
|
|
41
|
-
}, E = `${a}-error`, S = `${a}-description`, V = [
|
|
42
|
+
}, E = `${a}-error`, S = `${a}-description`, V = [O, o ? E : d ? S : null].filter(Boolean).join(" ") || void 0, [f, C] = i.useState(!1), F = !l && h === "password", n = $ ?? (F ? /* @__PURE__ */ t(
|
|
42
43
|
"button",
|
|
43
44
|
{
|
|
44
45
|
type: "button",
|
|
45
46
|
"aria-label": f ? "Hide password" : "Show password",
|
|
46
|
-
onClick: () =>
|
|
47
|
+
onClick: () => C((e) => !e),
|
|
47
48
|
className: "-mr-1 flex items-center rounded-xs p-1 outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring",
|
|
48
|
-
children: f ? /* @__PURE__ */ t(
|
|
49
|
+
children: f ? /* @__PURE__ */ t(L, {}) : /* @__PURE__ */ t(M, {})
|
|
49
50
|
}
|
|
50
|
-
) : void 0), j =
|
|
51
|
-
|
|
51
|
+
) : void 0), j = J(
|
|
52
|
+
Q,
|
|
52
53
|
l ? "h-30 resize-none py-2" : "h-8",
|
|
53
54
|
"data-[value-set]:text-on-white-primary!",
|
|
54
55
|
r && "pl-9",
|
|
55
56
|
n && "pr-9",
|
|
56
|
-
|
|
57
|
+
_
|
|
57
58
|
), k = l ? /* @__PURE__ */ t(
|
|
58
59
|
"textarea",
|
|
59
60
|
{
|
|
60
61
|
ref: p,
|
|
61
62
|
id: a,
|
|
62
|
-
rows:
|
|
63
|
+
rows: H ?? 3,
|
|
63
64
|
"aria-invalid": g || !!o || void 0,
|
|
64
65
|
"aria-describedby": V,
|
|
65
66
|
"data-value-set": b || void 0,
|
|
@@ -84,19 +85,20 @@ const U = i.forwardRef(
|
|
|
84
85
|
}
|
|
85
86
|
), z = r || n ? (
|
|
86
87
|
// group/field: adornment icons follow the field's interactive states.
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ G("div", { className: "group/field relative w-full", children: [
|
|
88
89
|
r && /* @__PURE__ */ t("span", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-muted-foreground transition-colors duration-150 group-hover/field:text-foreground group-focus-within/field:text-t12! [&_svg]:size-4", children: r }),
|
|
89
90
|
k,
|
|
90
91
|
n && /* @__PURE__ */ t("span", { className: "absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground transition-colors duration-150 group-hover/field:text-foreground group-focus-within/field:text-t12! [&_svg]:size-4", children: n })
|
|
91
92
|
] })
|
|
92
93
|
) : k;
|
|
93
94
|
return !v && !d && !o && !m ? z : /* @__PURE__ */ t(
|
|
94
|
-
|
|
95
|
+
U,
|
|
95
96
|
{
|
|
96
97
|
label: v,
|
|
97
98
|
description: d,
|
|
98
99
|
error: o,
|
|
99
100
|
required: m,
|
|
101
|
+
info: R,
|
|
100
102
|
htmlFor: a,
|
|
101
103
|
errorId: E,
|
|
102
104
|
descriptionId: S,
|
|
@@ -106,7 +108,7 @@ const U = i.forwardRef(
|
|
|
106
108
|
);
|
|
107
109
|
}
|
|
108
110
|
);
|
|
109
|
-
|
|
111
|
+
W.displayName = "InputField";
|
|
110
112
|
export {
|
|
111
|
-
|
|
113
|
+
W as InputField
|
|
112
114
|
};
|
package/components/modal.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { jsx as t, jsxs as g } from "react/jsx-runtime";
|
|
3
3
|
import * as r from "react";
|
|
4
4
|
import { MotionConfig as B, AnimatePresence as H, motion as M } from "motion/react";
|
|
5
|
-
import { Dialog as
|
|
5
|
+
import { Dialog as m } from "radix-ui";
|
|
6
6
|
import { cva as S } from "class-variance-authority";
|
|
7
7
|
import { Close as K } from "../lib/icons.js";
|
|
8
|
-
import { cn as
|
|
8
|
+
import { cn as l } from "../lib/cn.js";
|
|
9
9
|
import { backdropVariants as q, modalPanelVariants as A } from "../lib/motion.js";
|
|
10
10
|
const F = S(
|
|
11
11
|
[
|
|
@@ -17,14 +17,14 @@ const F = S(
|
|
|
17
17
|
{
|
|
18
18
|
variants: {
|
|
19
19
|
size: {
|
|
20
|
-
/** Quick confirmations and short prompts. */
|
|
21
|
-
sm: "max-w-[23.75rem]",
|
|
22
|
-
/** Polaris-style default task dialog. */
|
|
23
|
-
md: "max-w-[38.75rem]",
|
|
24
|
-
/** Dense forms, settings, and previews. */
|
|
25
|
-
lg: "max-w-[48.75rem]",
|
|
26
|
-
/** Tables and content-heavy workflows. */
|
|
27
|
-
xl: "max-w-[61.25rem]",
|
|
20
|
+
/** Quick confirmations and short prompts. Fixed 320px tall. */
|
|
21
|
+
sm: "h-(--modal-height-sm) max-w-[23.75rem]",
|
|
22
|
+
/** Polaris-style default task dialog. Fixed 640px tall. */
|
|
23
|
+
md: "h-(--modal-height) max-w-[38.75rem]",
|
|
24
|
+
/** Dense forms, settings, and previews. Fixed 640px tall. */
|
|
25
|
+
lg: "h-(--modal-height) max-w-[48.75rem]",
|
|
26
|
+
/** Tables and content-heavy workflows. Fixed 640px tall. */
|
|
27
|
+
xl: "h-(--modal-height) max-w-[61.25rem]",
|
|
28
28
|
/** Responsive canvas with a 16px viewport gutter. */
|
|
29
29
|
full: "h-[calc(100dvh-2rem)] max-w-none"
|
|
30
30
|
},
|
|
@@ -33,22 +33,25 @@ const F = S(
|
|
|
33
33
|
top: ""
|
|
34
34
|
},
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* footer stay put and ModalBody scrolls
|
|
36
|
+
* Every modal has a FIXED height (user-mandated, 2026-10-26): sm is
|
|
37
|
+
* `--modal-height-sm` (320px), md/lg/xl are `--modal-height` (640px).
|
|
38
|
+
* The header and footer stay put and ModalBody scrolls; a modal never
|
|
39
|
+
* grows or shrinks with its content. `content` is a deprecated alias
|
|
40
|
+
* kept for compatibility — it renders the same fixed frame.
|
|
39
41
|
*/
|
|
40
42
|
height: {
|
|
41
|
-
|
|
42
|
-
fixed
|
|
43
|
+
fixed: "",
|
|
44
|
+
/** @deprecated Modals are always fixed-height; renders as `fixed`. */
|
|
45
|
+
content: ""
|
|
43
46
|
}
|
|
44
47
|
},
|
|
45
48
|
defaultVariants: {
|
|
46
49
|
size: "md",
|
|
47
50
|
position: "center",
|
|
48
|
-
height: "
|
|
51
|
+
height: "fixed"
|
|
49
52
|
}
|
|
50
53
|
}
|
|
51
|
-
),
|
|
54
|
+
), x = r.createContext(null);
|
|
52
55
|
function w(o) {
|
|
53
56
|
return r.Children.toArray(o).some((e) => r.isValidElement(e) ? e.type === C ? !0 : w(
|
|
54
57
|
e.props.children
|
|
@@ -59,9 +62,9 @@ function te({
|
|
|
59
62
|
onOpenChange: e,
|
|
60
63
|
size: a,
|
|
61
64
|
position: i,
|
|
62
|
-
height:
|
|
65
|
+
height: n,
|
|
63
66
|
className: s,
|
|
64
|
-
children:
|
|
67
|
+
children: c,
|
|
65
68
|
showCloseButton: D = !0,
|
|
66
69
|
closeOnOverlayClick: z = !0,
|
|
67
70
|
closeOnEscape: I = !0,
|
|
@@ -71,19 +74,19 @@ function te({
|
|
|
71
74
|
onAfterOpen: f,
|
|
72
75
|
overlayClassName: V,
|
|
73
76
|
viewportClassName: k,
|
|
74
|
-
"aria-label":
|
|
77
|
+
"aria-label": v,
|
|
75
78
|
"aria-labelledby": P,
|
|
76
79
|
"aria-describedby": _
|
|
77
80
|
}) {
|
|
78
|
-
const b = r.useRef(null), p = r.useId(),
|
|
79
|
-
() => w(
|
|
80
|
-
[
|
|
81
|
+
const b = r.useRef(null), p = r.useId(), h = r.useId(), E = r.useMemo(
|
|
82
|
+
() => w(c),
|
|
83
|
+
[c]
|
|
81
84
|
), T = r.useMemo(
|
|
82
|
-
() => ({ titleId: p, descriptionId:
|
|
83
|
-
[
|
|
85
|
+
() => ({ titleId: p, descriptionId: h }),
|
|
86
|
+
[h, p]
|
|
84
87
|
);
|
|
85
|
-
return /* @__PURE__ */ t(
|
|
86
|
-
/* @__PURE__ */ t(
|
|
88
|
+
return /* @__PURE__ */ t(m.Root, { open: o, onOpenChange: e, children: /* @__PURE__ */ t(x.Provider, { value: T, children: /* @__PURE__ */ t(B, { reducedMotion: "user", children: /* @__PURE__ */ t(H, { initial: !1, onExitComplete: j, children: o ? /* @__PURE__ */ g(m.Portal, { forceMount: !0, container: R ?? void 0, children: [
|
|
89
|
+
/* @__PURE__ */ t(m.Overlay, { forceMount: !0, asChild: !0, children: /* @__PURE__ */ t(
|
|
87
90
|
M.div,
|
|
88
91
|
{
|
|
89
92
|
"data-slot": "modal-overlay",
|
|
@@ -91,7 +94,7 @@ function te({
|
|
|
91
94
|
initial: "hidden",
|
|
92
95
|
animate: "visible",
|
|
93
96
|
exit: "hidden",
|
|
94
|
-
className:
|
|
97
|
+
className: l(
|
|
95
98
|
"fixed inset-0 z-50 bg-overlay",
|
|
96
99
|
V
|
|
97
100
|
)
|
|
@@ -102,20 +105,20 @@ function te({
|
|
|
102
105
|
"div",
|
|
103
106
|
{
|
|
104
107
|
"data-slot": "modal-viewport",
|
|
105
|
-
className:
|
|
108
|
+
className: l(
|
|
106
109
|
"pointer-events-none fixed inset-0 z-50 grid overflow-y-auto p-4",
|
|
107
110
|
i === "top" ? "place-items-start justify-items-center pt-[max(1rem,8dvh)]" : "place-items-center",
|
|
108
111
|
"max-sm:p-2",
|
|
109
112
|
k
|
|
110
113
|
),
|
|
111
114
|
children: /* @__PURE__ */ t(
|
|
112
|
-
|
|
115
|
+
m.Content,
|
|
113
116
|
{
|
|
114
117
|
forceMount: !0,
|
|
115
118
|
asChild: !0,
|
|
116
|
-
"aria-label":
|
|
117
|
-
"aria-labelledby": P ?? (
|
|
118
|
-
"aria-describedby": _ ?? (E ?
|
|
119
|
+
"aria-label": v,
|
|
120
|
+
"aria-labelledby": P ?? (v ? void 0 : p),
|
|
121
|
+
"aria-describedby": _ ?? (E ? h : void 0),
|
|
119
122
|
onEscapeKeyDown: (d) => {
|
|
120
123
|
I || d.preventDefault();
|
|
121
124
|
},
|
|
@@ -140,13 +143,13 @@ function te({
|
|
|
140
143
|
onAnimationComplete: (d) => {
|
|
141
144
|
d === "visible" && (f == null || f());
|
|
142
145
|
},
|
|
143
|
-
className:
|
|
144
|
-
F({ size: a, position: i, height:
|
|
146
|
+
className: l(
|
|
147
|
+
F({ size: a, position: i, height: n }),
|
|
145
148
|
s
|
|
146
149
|
),
|
|
147
150
|
children: [
|
|
148
151
|
D ? /* @__PURE__ */ t(N, {}) : null,
|
|
149
|
-
|
|
152
|
+
c
|
|
150
153
|
]
|
|
151
154
|
},
|
|
152
155
|
"modal-panel"
|
|
@@ -157,14 +160,14 @@ function te({
|
|
|
157
160
|
)
|
|
158
161
|
] }) : null }) }) }) });
|
|
159
162
|
}
|
|
160
|
-
const N = r.forwardRef(({ className: o, children: e, "aria-label": a = "Close", ...i },
|
|
163
|
+
const N = r.forwardRef(({ className: o, children: e, "aria-label": a = "Close", ...i }, n) => /* @__PURE__ */ t(m.Close, { asChild: !0, children: /* @__PURE__ */ t(
|
|
161
164
|
"button",
|
|
162
165
|
{
|
|
163
|
-
ref:
|
|
166
|
+
ref: n,
|
|
164
167
|
type: "button",
|
|
165
168
|
"data-slot": "modal-close",
|
|
166
169
|
"aria-label": a,
|
|
167
|
-
className:
|
|
170
|
+
className: l(
|
|
168
171
|
"absolute right-2 top-2 z-10 inline-flex size-7 items-center justify-center",
|
|
169
172
|
"rounded-sm text-secondary outline-none",
|
|
170
173
|
"transition-[background,color,transform] duration-150 ease-out motion-reduce:transition-none",
|
|
@@ -183,7 +186,7 @@ const G = r.forwardRef(({ className: o, ...e }, a) => /* @__PURE__ */ t(
|
|
|
183
186
|
{
|
|
184
187
|
ref: a,
|
|
185
188
|
"data-slot": "modal-header",
|
|
186
|
-
className:
|
|
189
|
+
className: l(
|
|
187
190
|
"flex min-h-11 shrink-0 flex-col justify-center gap-0.5 bg-surface px-3 py-3 pr-11",
|
|
188
191
|
o
|
|
189
192
|
),
|
|
@@ -192,15 +195,15 @@ const G = r.forwardRef(({ className: o, ...e }, a) => /* @__PURE__ */ t(
|
|
|
192
195
|
));
|
|
193
196
|
G.displayName = "ModalHeader";
|
|
194
197
|
const J = r.forwardRef(({ className: o, id: e, ...a }, i) => {
|
|
195
|
-
const
|
|
196
|
-
"text-l font-
|
|
198
|
+
const n = r.useContext(x), s = l(
|
|
199
|
+
"text-l font-medium leading-5 text-foreground",
|
|
197
200
|
o
|
|
198
201
|
);
|
|
199
|
-
return
|
|
200
|
-
|
|
202
|
+
return n ? /* @__PURE__ */ t(
|
|
203
|
+
m.Title,
|
|
201
204
|
{
|
|
202
205
|
ref: i,
|
|
203
|
-
id: e ??
|
|
206
|
+
id: e ?? n.titleId,
|
|
204
207
|
"data-slot": "modal-title",
|
|
205
208
|
className: s,
|
|
206
209
|
...a
|
|
@@ -209,15 +212,15 @@ const J = r.forwardRef(({ className: o, id: e, ...a }, i) => {
|
|
|
209
212
|
});
|
|
210
213
|
J.displayName = "ModalTitle";
|
|
211
214
|
const C = r.forwardRef(({ className: o, id: e, ...a }, i) => {
|
|
212
|
-
const
|
|
215
|
+
const n = r.useContext(x), s = l(
|
|
213
216
|
"text-sm leading-5 text-muted-foreground",
|
|
214
217
|
o
|
|
215
218
|
);
|
|
216
|
-
return
|
|
217
|
-
|
|
219
|
+
return n ? /* @__PURE__ */ t(
|
|
220
|
+
m.Description,
|
|
218
221
|
{
|
|
219
222
|
ref: i,
|
|
220
|
-
id: e ??
|
|
223
|
+
id: e ?? n.descriptionId,
|
|
221
224
|
"data-slot": "modal-description",
|
|
222
225
|
className: s,
|
|
223
226
|
...a
|
|
@@ -239,7 +242,7 @@ const O = r.forwardRef(
|
|
|
239
242
|
{
|
|
240
243
|
ref: i,
|
|
241
244
|
"data-slot": "modal-body",
|
|
242
|
-
className:
|
|
245
|
+
className: l(
|
|
243
246
|
"min-h-0 flex-1 overflow-y-auto overscroll-contain border-t-[1px] border-border-tertiary text-sm leading-5 text-foreground",
|
|
244
247
|
e === "default" && "px-4 py-4",
|
|
245
248
|
o
|
|
@@ -254,7 +257,7 @@ const Q = r.forwardRef(({ className: o, ...e }, a) => /* @__PURE__ */ t(
|
|
|
254
257
|
{
|
|
255
258
|
ref: a,
|
|
256
259
|
"data-slot": "modal-section",
|
|
257
|
-
className:
|
|
260
|
+
className: l(
|
|
258
261
|
"px-4 py-4 [&+&]:border-t [&+&]:border-border-tertiary",
|
|
259
262
|
o
|
|
260
263
|
),
|
|
@@ -267,8 +270,8 @@ const U = r.forwardRef(({ className: o, ...e }, a) => /* @__PURE__ */ t(
|
|
|
267
270
|
{
|
|
268
271
|
ref: a,
|
|
269
272
|
"data-slot": "modal-footer",
|
|
270
|
-
className:
|
|
271
|
-
"flex min-h-[3.75rem] shrink-0 flex-wrap items-center justify-end gap-2 border-t-[1px] border-border-tertiary px-4 py-4",
|
|
273
|
+
className: l(
|
|
274
|
+
"mt-auto flex min-h-[3.75rem] shrink-0 flex-wrap items-center justify-end gap-2 border-t-[1px] border-border-tertiary px-4 py-4",
|
|
272
275
|
"[&_button]:h-7 [&_button]:rounded-sm [&_button]:px-2.5",
|
|
273
276
|
o
|
|
274
277
|
),
|
package/components/panel.js
CHANGED
|
@@ -1,14 +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 l } from "react/jsx-runtime";
|
|
3
|
+
import * as o from "react";
|
|
4
|
+
import { cn as n } from "../lib/cn.js";
|
|
5
|
+
const t = o.forwardRef(
|
|
6
|
+
({ className: e, ...a }, r) => /* @__PURE__ */ l(
|
|
7
7
|
"div",
|
|
8
8
|
{
|
|
9
9
|
ref: r,
|
|
10
10
|
"data-slot": "panel",
|
|
11
|
-
className:
|
|
11
|
+
className: n(
|
|
12
12
|
// Static surface — delineated by color alone (elevation is reserved for
|
|
13
13
|
// actionable surfaces).
|
|
14
14
|
"flex min-h-0 min-w-0 flex-col overflow-hidden rounded-lg bg-card",
|
|
@@ -18,17 +18,16 @@ const l = n.forwardRef(
|
|
|
18
18
|
}
|
|
19
19
|
)
|
|
20
20
|
);
|
|
21
|
-
|
|
22
|
-
const s =
|
|
23
|
-
({ className: e, ...a }, r) => /* @__PURE__ */
|
|
21
|
+
t.displayName = "Panel";
|
|
22
|
+
const s = o.forwardRef(
|
|
23
|
+
({ className: e, ...a }, r) => /* @__PURE__ */ l(
|
|
24
24
|
"div",
|
|
25
25
|
{
|
|
26
26
|
ref: r,
|
|
27
|
-
className:
|
|
27
|
+
className: n(
|
|
28
28
|
"relative flex h-[var(--panel-header-height)] shrink-0 items-center justify-between gap-2",
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
"after:bg-[linear-gradient(to_right,var(--color-border)_0%,transparent_100%)] after:content-['']",
|
|
29
|
+
// Structural divider: a full-width WG4 hairline closes the header bar.
|
|
30
|
+
"border-b border-border bg-card px-3",
|
|
32
31
|
e
|
|
33
32
|
),
|
|
34
33
|
...a
|
|
@@ -36,39 +35,39 @@ const s = n.forwardRef(
|
|
|
36
35
|
)
|
|
37
36
|
);
|
|
38
37
|
s.displayName = "PanelHeader";
|
|
39
|
-
const
|
|
38
|
+
const d = o.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ l(
|
|
40
39
|
"h2",
|
|
41
40
|
{
|
|
42
41
|
ref: r,
|
|
43
|
-
className:
|
|
42
|
+
className: n("flex min-w-0 items-center gap-2 truncate text-xs font-medium text-foreground", e),
|
|
44
43
|
...a
|
|
45
44
|
}
|
|
46
45
|
));
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
({ className: e, ...a }, r) => /* @__PURE__ */
|
|
46
|
+
d.displayName = "PanelTitle";
|
|
47
|
+
const i = o.forwardRef(
|
|
48
|
+
({ className: e, ...a }, r) => /* @__PURE__ */ l("div", { ref: r, className: n("flex shrink-0 items-center gap-1", e), ...a })
|
|
50
49
|
);
|
|
51
|
-
|
|
52
|
-
const f =
|
|
53
|
-
({ className: e, ...a }, r) => /* @__PURE__ */
|
|
50
|
+
i.displayName = "PanelToolbar";
|
|
51
|
+
const f = o.forwardRef(
|
|
52
|
+
({ className: e, ...a }, r) => /* @__PURE__ */ l("div", { ref: r, tabIndex: 0, className: n("min-h-0 flex-1 overflow-auto p-4", e), ...a })
|
|
54
53
|
);
|
|
55
54
|
f.displayName = "PanelBody";
|
|
56
|
-
const m =
|
|
57
|
-
({ className: e, ...a }, r) => /* @__PURE__ */
|
|
55
|
+
const m = o.forwardRef(
|
|
56
|
+
({ className: e, ...a }, r) => /* @__PURE__ */ l(
|
|
58
57
|
"div",
|
|
59
58
|
{
|
|
60
59
|
ref: r,
|
|
61
|
-
className:
|
|
60
|
+
className: n("flex shrink-0 items-center gap-2 bg-surface/40 px-3 py-2", e),
|
|
62
61
|
...a
|
|
63
62
|
}
|
|
64
63
|
)
|
|
65
64
|
);
|
|
66
65
|
m.displayName = "PanelFooter";
|
|
67
66
|
export {
|
|
68
|
-
|
|
67
|
+
t as Panel,
|
|
69
68
|
f as PanelBody,
|
|
70
69
|
m as PanelFooter,
|
|
71
70
|
s as PanelHeader,
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
d as PanelTitle,
|
|
72
|
+
i as PanelToolbar
|
|
74
73
|
};
|