@actioneer/ads 1.0.8 → 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 +125 -50
- package/README.md +31 -7
- package/components/answer.js +1 -1
- package/components/assistant-ui/composer-harness.js +14 -10
- package/components/body-page-header.d.ts +9 -4
- package/components/body-page-header.js +10 -10
- package/components/breadcrumbs.js +15 -15
- package/components/button.d.ts +16 -1
- package/components/button.js +7 -4
- package/components/card.js +18 -18
- package/components/chart.d.ts +40 -4
- package/components/chart.js +824 -628
- package/components/chip.d.ts +2 -1
- package/components/chip.js +49 -46
- 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/filters.d.ts +37 -0
- package/components/filters.js +129 -0
- package/components/index.d.ts +4 -0
- package/components/index.js +526 -510
- package/components/input-field.d.ts +1 -1
- package/components/input-field.js +24 -22
- package/components/modal.d.ts +2 -1
- package/components/modal.js +120 -106
- package/components/panel.js +26 -27
- package/components/popover.d.ts +6 -1
- package/components/popover.js +74 -64
- package/components/sidebar.d.ts +15 -0
- package/components/sidebar.js +166 -129
- package/components/sparkline.d.ts +30 -0
- package/components/sparkline.js +69 -0
- package/components/table.d.ts +8 -0
- package/components/table.js +357 -350
- package/components/tabs.d.ts +6 -1
- package/components/tabs.js +28 -31
- package/demo/components/add-to-artifact.js +6 -2
- package/examples/README.md +5 -2
- package/examples/call-logs-screen.tsx +381 -0
- package/examples/campaign-analysis-screen.tsx +180 -0
- package/examples/campaigns-screen.tsx +497 -0
- 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 +162 -30
- package/manifest.json +11604 -7878
- 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.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
declare const panelVariants: (props?: ({
|
|
4
4
|
size?: "xl" | "sm" | "md" | "lg" | "full" | null | undefined;
|
|
5
5
|
position?: "top" | "center" | null | undefined;
|
|
6
|
+
height?: "content" | "fixed" | null | undefined;
|
|
6
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
8
|
export interface ModalProps extends VariantProps<typeof panelVariants> {
|
|
8
9
|
open: boolean;
|
|
@@ -34,7 +35,7 @@ export interface ModalProps extends VariantProps<typeof panelVariants> {
|
|
|
34
35
|
* outside interaction, scroll locking, and focus restoration. ADS owns the
|
|
35
36
|
* geometry, tokens, motion, and composable header/body/footer anatomy.
|
|
36
37
|
*/
|
|
37
|
-
export declare function Modal({ open, onOpenChange, size, position, className, children, showCloseButton, closeOnOverlayClick, closeOnEscape, container, initialFocusRef, onAfterClose, onAfterOpen, overlayClassName, viewportClassName, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, }: ModalProps): React.JSX.Element;
|
|
38
|
+
export declare function Modal({ open, onOpenChange, size, position, height, className, children, showCloseButton, closeOnOverlayClick, closeOnEscape, container, initialFocusRef, onAfterClose, onAfterOpen, overlayClassName, viewportClassName, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, }: ModalProps): React.JSX.Element;
|
|
38
39
|
export declare const ModalClose: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
39
40
|
export declare const ModalHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
40
41
|
export declare const ModalTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
|
package/components/modal.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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 r from "react";
|
|
4
|
-
import { MotionConfig as
|
|
4
|
+
import { MotionConfig as B, AnimatePresence as H, motion as M } from "motion/react";
|
|
5
5
|
import { Dialog as m } from "radix-ui";
|
|
6
|
-
import { cva as
|
|
7
|
-
import { Close as
|
|
8
|
-
import { cn as
|
|
9
|
-
import { backdropVariants as
|
|
10
|
-
const
|
|
6
|
+
import { cva as S } from "class-variance-authority";
|
|
7
|
+
import { Close as K } from "../lib/icons.js";
|
|
8
|
+
import { cn as l } from "../lib/cn.js";
|
|
9
|
+
import { backdropVariants as q, modalPanelVariants as A } from "../lib/motion.js";
|
|
10
|
+
const F = S(
|
|
11
11
|
[
|
|
12
12
|
"pointer-events-auto relative flex w-full min-w-0 flex-col overflow-hidden",
|
|
13
13
|
"max-h-[calc(100dvh-2rem)] bg-elevated text-foreground outline-none",
|
|
@@ -17,72 +17,86 @@ const A = H(
|
|
|
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
|
},
|
|
31
31
|
position: {
|
|
32
32
|
center: "",
|
|
33
33
|
top: ""
|
|
34
|
+
},
|
|
35
|
+
/**
|
|
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.
|
|
41
|
+
*/
|
|
42
|
+
height: {
|
|
43
|
+
fixed: "",
|
|
44
|
+
/** @deprecated Modals are always fixed-height; renders as `fixed`. */
|
|
45
|
+
content: ""
|
|
34
46
|
}
|
|
35
47
|
},
|
|
36
48
|
defaultVariants: {
|
|
37
49
|
size: "md",
|
|
38
|
-
position: "center"
|
|
50
|
+
position: "center",
|
|
51
|
+
height: "fixed"
|
|
39
52
|
}
|
|
40
53
|
}
|
|
41
54
|
), x = r.createContext(null);
|
|
42
|
-
function
|
|
43
|
-
return r.Children.toArray(o).some((e) => r.isValidElement(e) ? e.type ===
|
|
55
|
+
function w(o) {
|
|
56
|
+
return r.Children.toArray(o).some((e) => r.isValidElement(e) ? e.type === C ? !0 : w(
|
|
44
57
|
e.props.children
|
|
45
58
|
) : !1);
|
|
46
59
|
}
|
|
47
|
-
function
|
|
60
|
+
function te({
|
|
48
61
|
open: o,
|
|
49
62
|
onOpenChange: e,
|
|
50
63
|
size: a,
|
|
51
64
|
position: i,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
height: n,
|
|
66
|
+
className: s,
|
|
67
|
+
children: c,
|
|
68
|
+
showCloseButton: D = !0,
|
|
69
|
+
closeOnOverlayClick: z = !0,
|
|
70
|
+
closeOnEscape: I = !0,
|
|
71
|
+
container: R,
|
|
72
|
+
initialFocusRef: u,
|
|
73
|
+
onAfterClose: j,
|
|
74
|
+
onAfterOpen: f,
|
|
75
|
+
overlayClassName: V,
|
|
76
|
+
viewportClassName: k,
|
|
63
77
|
"aria-label": v,
|
|
64
|
-
"aria-labelledby":
|
|
65
|
-
"aria-describedby":
|
|
78
|
+
"aria-labelledby": P,
|
|
79
|
+
"aria-describedby": _
|
|
66
80
|
}) {
|
|
67
|
-
const b = r.useRef(null),
|
|
68
|
-
() =>
|
|
69
|
-
[
|
|
70
|
-
),
|
|
71
|
-
() => ({ titleId:
|
|
72
|
-
[
|
|
81
|
+
const b = r.useRef(null), p = r.useId(), h = r.useId(), E = r.useMemo(
|
|
82
|
+
() => w(c),
|
|
83
|
+
[c]
|
|
84
|
+
), T = r.useMemo(
|
|
85
|
+
() => ({ titleId: p, descriptionId: h }),
|
|
86
|
+
[h, p]
|
|
73
87
|
);
|
|
74
|
-
return /* @__PURE__ */ t(m.Root, { open: o, onOpenChange: e, children: /* @__PURE__ */ t(x.Provider, { value:
|
|
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: [
|
|
75
89
|
/* @__PURE__ */ t(m.Overlay, { forceMount: !0, asChild: !0, children: /* @__PURE__ */ t(
|
|
76
|
-
|
|
90
|
+
M.div,
|
|
77
91
|
{
|
|
78
92
|
"data-slot": "modal-overlay",
|
|
79
|
-
variants:
|
|
93
|
+
variants: q,
|
|
80
94
|
initial: "hidden",
|
|
81
95
|
animate: "visible",
|
|
82
96
|
exit: "hidden",
|
|
83
|
-
className:
|
|
97
|
+
className: l(
|
|
84
98
|
"fixed inset-0 z-50 bg-overlay",
|
|
85
|
-
|
|
99
|
+
V
|
|
86
100
|
)
|
|
87
101
|
},
|
|
88
102
|
"modal-overlay"
|
|
@@ -91,11 +105,11 @@ function ee({
|
|
|
91
105
|
"div",
|
|
92
106
|
{
|
|
93
107
|
"data-slot": "modal-viewport",
|
|
94
|
-
className:
|
|
108
|
+
className: l(
|
|
95
109
|
"pointer-events-none fixed inset-0 z-50 grid overflow-y-auto p-4",
|
|
96
110
|
i === "top" ? "place-items-start justify-items-center pt-[max(1rem,8dvh)]" : "place-items-center",
|
|
97
111
|
"max-sm:p-2",
|
|
98
|
-
|
|
112
|
+
k
|
|
99
113
|
),
|
|
100
114
|
children: /* @__PURE__ */ t(
|
|
101
115
|
m.Content,
|
|
@@ -103,39 +117,39 @@ function ee({
|
|
|
103
117
|
forceMount: !0,
|
|
104
118
|
asChild: !0,
|
|
105
119
|
"aria-label": v,
|
|
106
|
-
"aria-labelledby":
|
|
107
|
-
"aria-describedby":
|
|
108
|
-
onEscapeKeyDown: (
|
|
109
|
-
|
|
120
|
+
"aria-labelledby": P ?? (v ? void 0 : p),
|
|
121
|
+
"aria-describedby": _ ?? (E ? h : void 0),
|
|
122
|
+
onEscapeKeyDown: (d) => {
|
|
123
|
+
I || d.preventDefault();
|
|
110
124
|
},
|
|
111
|
-
onPointerDownOutside: (
|
|
112
|
-
|
|
125
|
+
onPointerDownOutside: (d) => {
|
|
126
|
+
z || d.preventDefault();
|
|
113
127
|
},
|
|
114
|
-
onOpenAutoFocus: (
|
|
115
|
-
var
|
|
116
|
-
|
|
128
|
+
onOpenAutoFocus: (d) => {
|
|
129
|
+
var y;
|
|
130
|
+
d.preventDefault(), (y = (u == null ? void 0 : u.current) ?? b.current) == null || y.focus();
|
|
117
131
|
},
|
|
118
|
-
onFocusOutside: (
|
|
119
|
-
children: /* @__PURE__ */
|
|
120
|
-
|
|
132
|
+
onFocusOutside: (d) => d.preventDefault(),
|
|
133
|
+
children: /* @__PURE__ */ g(
|
|
134
|
+
M.div,
|
|
121
135
|
{
|
|
122
136
|
ref: b,
|
|
123
137
|
"data-slot": "modal",
|
|
124
138
|
tabIndex: -1,
|
|
125
|
-
variants:
|
|
139
|
+
variants: A,
|
|
126
140
|
initial: "hidden",
|
|
127
141
|
animate: "visible",
|
|
128
142
|
exit: "hidden",
|
|
129
|
-
onAnimationComplete: (
|
|
130
|
-
|
|
143
|
+
onAnimationComplete: (d) => {
|
|
144
|
+
d === "visible" && (f == null || f());
|
|
131
145
|
},
|
|
132
|
-
className:
|
|
133
|
-
|
|
134
|
-
|
|
146
|
+
className: l(
|
|
147
|
+
F({ size: a, position: i, height: n }),
|
|
148
|
+
s
|
|
135
149
|
),
|
|
136
150
|
children: [
|
|
137
|
-
|
|
138
|
-
|
|
151
|
+
D ? /* @__PURE__ */ t(N, {}) : null,
|
|
152
|
+
c
|
|
139
153
|
]
|
|
140
154
|
},
|
|
141
155
|
"modal-panel"
|
|
@@ -146,14 +160,14 @@ function ee({
|
|
|
146
160
|
)
|
|
147
161
|
] }) : null }) }) }) });
|
|
148
162
|
}
|
|
149
|
-
const
|
|
163
|
+
const N = r.forwardRef(({ className: o, children: e, "aria-label": a = "Close", ...i }, n) => /* @__PURE__ */ t(m.Close, { asChild: !0, children: /* @__PURE__ */ t(
|
|
150
164
|
"button",
|
|
151
165
|
{
|
|
152
|
-
ref:
|
|
166
|
+
ref: n,
|
|
153
167
|
type: "button",
|
|
154
168
|
"data-slot": "modal-close",
|
|
155
169
|
"aria-label": a,
|
|
156
|
-
className:
|
|
170
|
+
className: l(
|
|
157
171
|
"absolute right-2 top-2 z-10 inline-flex size-7 items-center justify-center",
|
|
158
172
|
"rounded-sm text-secondary outline-none",
|
|
159
173
|
"transition-[background,color,transform] duration-150 ease-out motion-reduce:transition-none",
|
|
@@ -163,52 +177,52 @@ const w = r.forwardRef(({ className: o, children: e, "aria-label": a = "Close",
|
|
|
163
177
|
o
|
|
164
178
|
),
|
|
165
179
|
...i,
|
|
166
|
-
children: e ?? /* @__PURE__ */ t(
|
|
180
|
+
children: e ?? /* @__PURE__ */ t(K, { "aria-hidden": !0 })
|
|
167
181
|
}
|
|
168
182
|
) }));
|
|
169
|
-
|
|
170
|
-
const
|
|
183
|
+
N.displayName = "ModalClose";
|
|
184
|
+
const G = r.forwardRef(({ className: o, ...e }, a) => /* @__PURE__ */ t(
|
|
171
185
|
"div",
|
|
172
186
|
{
|
|
173
187
|
ref: a,
|
|
174
188
|
"data-slot": "modal-header",
|
|
175
|
-
className:
|
|
189
|
+
className: l(
|
|
176
190
|
"flex min-h-11 shrink-0 flex-col justify-center gap-0.5 bg-surface px-3 py-3 pr-11",
|
|
177
191
|
o
|
|
178
192
|
),
|
|
179
193
|
...e
|
|
180
194
|
}
|
|
181
195
|
));
|
|
182
|
-
|
|
183
|
-
const
|
|
184
|
-
const
|
|
185
|
-
"text-l font-
|
|
196
|
+
G.displayName = "ModalHeader";
|
|
197
|
+
const J = r.forwardRef(({ className: o, id: e, ...a }, i) => {
|
|
198
|
+
const n = r.useContext(x), s = l(
|
|
199
|
+
"text-l font-medium leading-5 text-foreground",
|
|
186
200
|
o
|
|
187
201
|
);
|
|
188
|
-
return
|
|
202
|
+
return n ? /* @__PURE__ */ t(
|
|
189
203
|
m.Title,
|
|
190
204
|
{
|
|
191
205
|
ref: i,
|
|
192
|
-
id: e ??
|
|
206
|
+
id: e ?? n.titleId,
|
|
193
207
|
"data-slot": "modal-title",
|
|
194
|
-
className:
|
|
208
|
+
className: s,
|
|
195
209
|
...a
|
|
196
210
|
}
|
|
197
|
-
) : /* @__PURE__ */ t("h2", { ref: i, id: e, className:
|
|
211
|
+
) : /* @__PURE__ */ t("h2", { ref: i, id: e, className: s, ...a });
|
|
198
212
|
});
|
|
199
|
-
|
|
200
|
-
const
|
|
201
|
-
const
|
|
213
|
+
J.displayName = "ModalTitle";
|
|
214
|
+
const C = r.forwardRef(({ className: o, id: e, ...a }, i) => {
|
|
215
|
+
const n = r.useContext(x), s = l(
|
|
202
216
|
"text-sm leading-5 text-muted-foreground",
|
|
203
217
|
o
|
|
204
218
|
);
|
|
205
|
-
return
|
|
219
|
+
return n ? /* @__PURE__ */ t(
|
|
206
220
|
m.Description,
|
|
207
221
|
{
|
|
208
222
|
ref: i,
|
|
209
|
-
id: e ??
|
|
223
|
+
id: e ?? n.descriptionId,
|
|
210
224
|
"data-slot": "modal-description",
|
|
211
|
-
className:
|
|
225
|
+
className: s,
|
|
212
226
|
...a
|
|
213
227
|
}
|
|
214
228
|
) : /* @__PURE__ */ t(
|
|
@@ -216,19 +230,19 @@ const N = r.forwardRef(({ className: o, id: e, ...a }, i) => {
|
|
|
216
230
|
{
|
|
217
231
|
ref: i,
|
|
218
232
|
id: e,
|
|
219
|
-
className:
|
|
233
|
+
className: s,
|
|
220
234
|
...a
|
|
221
235
|
}
|
|
222
236
|
);
|
|
223
237
|
});
|
|
224
|
-
|
|
225
|
-
const
|
|
238
|
+
C.displayName = "ModalDescription";
|
|
239
|
+
const O = r.forwardRef(
|
|
226
240
|
({ className: o, padding: e = "default", ...a }, i) => /* @__PURE__ */ t(
|
|
227
241
|
"div",
|
|
228
242
|
{
|
|
229
243
|
ref: i,
|
|
230
244
|
"data-slot": "modal-body",
|
|
231
|
-
className:
|
|
245
|
+
className: l(
|
|
232
246
|
"min-h-0 flex-1 overflow-y-auto overscroll-contain border-t-[1px] border-border-tertiary text-sm leading-5 text-foreground",
|
|
233
247
|
e === "default" && "px-4 py-4",
|
|
234
248
|
o
|
|
@@ -237,41 +251,41 @@ const J = r.forwardRef(
|
|
|
237
251
|
}
|
|
238
252
|
)
|
|
239
253
|
);
|
|
240
|
-
|
|
241
|
-
const
|
|
254
|
+
O.displayName = "ModalBody";
|
|
255
|
+
const Q = r.forwardRef(({ className: o, ...e }, a) => /* @__PURE__ */ t(
|
|
242
256
|
"div",
|
|
243
257
|
{
|
|
244
258
|
ref: a,
|
|
245
259
|
"data-slot": "modal-section",
|
|
246
|
-
className:
|
|
260
|
+
className: l(
|
|
247
261
|
"px-4 py-4 [&+&]:border-t [&+&]:border-border-tertiary",
|
|
248
262
|
o
|
|
249
263
|
),
|
|
250
264
|
...e
|
|
251
265
|
}
|
|
252
266
|
));
|
|
253
|
-
|
|
254
|
-
const
|
|
267
|
+
Q.displayName = "ModalSection";
|
|
268
|
+
const U = r.forwardRef(({ className: o, ...e }, a) => /* @__PURE__ */ t(
|
|
255
269
|
"div",
|
|
256
270
|
{
|
|
257
271
|
ref: a,
|
|
258
272
|
"data-slot": "modal-footer",
|
|
259
|
-
className:
|
|
260
|
-
"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",
|
|
261
275
|
"[&_button]:h-7 [&_button]:rounded-sm [&_button]:px-2.5",
|
|
262
276
|
o
|
|
263
277
|
),
|
|
264
278
|
...e
|
|
265
279
|
}
|
|
266
280
|
));
|
|
267
|
-
|
|
281
|
+
U.displayName = "ModalFooter";
|
|
268
282
|
export {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
283
|
+
te as Modal,
|
|
284
|
+
O as ModalBody,
|
|
285
|
+
N as ModalClose,
|
|
286
|
+
C as ModalDescription,
|
|
287
|
+
U as ModalFooter,
|
|
288
|
+
G as ModalHeader,
|
|
289
|
+
Q as ModalSection,
|
|
290
|
+
J as ModalTitle
|
|
277
291
|
};
|
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
|
};
|
package/components/popover.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
export interface PopoverProps {
|
|
3
3
|
children: React.ReactNode;
|
|
4
|
+
/** Uncontrolled initial state. */
|
|
4
5
|
defaultOpen?: boolean;
|
|
6
|
+
/** Controlled open state — pair with `onOpenChange`. */
|
|
7
|
+
open?: boolean;
|
|
8
|
+
/** Called whenever the trigger, Escape, or an outside press changes the state. */
|
|
9
|
+
onOpenChange?: (open: boolean) => void;
|
|
5
10
|
}
|
|
6
|
-
export declare function Popover({ children, defaultOpen }: PopoverProps): React.JSX.Element;
|
|
11
|
+
export declare function Popover({ children, defaultOpen, open: openProp, onOpenChange, }: PopoverProps): React.JSX.Element;
|
|
7
12
|
export interface PopoverTriggerProps {
|
|
8
13
|
children: React.ReactElement;
|
|
9
14
|
}
|