@actioneer/ads 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DESIGN.md +597 -0
- package/components/ai-elements/agent-trace.d.ts +2 -2
- package/components/ai-elements/agent-trace.js +164 -105
- 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/action-bar.js +1 -1
- package/components/assistant-ui/attachment.js +11 -11
- package/components/assistant-ui/badge.js +18 -18
- package/components/assistant-ui/composer-harness.js +15 -20
- package/components/assistant-ui/composer-trigger-popover.js +9 -9
- package/components/assistant-ui/composer.d.ts +3 -1
- package/components/assistant-ui/composer.js +148 -144
- package/components/assistant-ui/image.js +61 -61
- package/components/assistant-ui/index.d.ts +0 -3
- package/components/assistant-ui/message-timing.js +1 -1
- package/components/assistant-ui/selection-toolbar.js +7 -7
- 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 +0 -7
- package/components/breadcrumbs.js +54 -71
- package/components/button.d.ts +1 -1
- package/components/button.js +55 -49
- package/components/chart.js +298 -296
- 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 +2 -1
- package/components/date-range-picker.js +158 -122
- package/components/divider.js +25 -25
- package/components/drawer.d.ts +6 -2
- package/components/drawer.js +61 -58
- package/components/dropdown.d.ts +1 -2
- package/components/dropdown.js +88 -89
- package/components/field.js +41 -36
- package/components/file-dropzone.js +1 -1
- package/components/index.d.ts +4 -4
- package/components/index.js +501 -549
- 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 +32 -29
- package/components/modal.d.ts +31 -3
- package/components/modal.js +244 -170
- 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/pixel-blast-svg.js +71 -73
- 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 +151 -141
- 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 +427 -412
- package/components/tabs.d.ts +2 -0
- package/components/tabs.js +160 -295
- 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 +54 -49
- package/components/typography.d.ts +4 -4
- package/components/typography.js +13 -13
- package/components/ui/button.d.ts +1 -1
- package/components/ui/button.js +4 -4
- package/components/ui/dialog.js +25 -25
- package/demo/components/add-to-artifact.js +6 -10
- package/lib/cn.js +11 -4
- package/lib/icons.d.ts +4 -0
- package/lib/icons.js +103 -102
- package/lib/interactive.d.ts +1 -1
- package/llms.txt +132 -188
- package/manifest.json +1719 -2831
- package/package.json +2 -2
- package/styles.css +362 -233
- package/theme.css +312 -177
- 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/modal.js
CHANGED
|
@@ -1,203 +1,277 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { cn as
|
|
9
|
-
import { backdropVariants as
|
|
10
|
-
|
|
11
|
-
const q = T(
|
|
2
|
+
import { jsx as t, jsxs as y } from "react/jsx-runtime";
|
|
3
|
+
import * as r from "react";
|
|
4
|
+
import { MotionConfig as T, AnimatePresence as B, motion as g } from "motion/react";
|
|
5
|
+
import { Dialog as m } from "radix-ui";
|
|
6
|
+
import { cva as H } from "class-variance-authority";
|
|
7
|
+
import { Close as S } from "../lib/icons.js";
|
|
8
|
+
import { cn as n } from "../lib/cn.js";
|
|
9
|
+
import { backdropVariants as K, modalPanelVariants as q } from "../lib/motion.js";
|
|
10
|
+
const A = H(
|
|
12
11
|
[
|
|
13
|
-
"relative flex w-full flex-col",
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"max-h-[calc(100dvh-
|
|
17
|
-
"bg-elevated text-foreground",
|
|
18
|
-
"rounded-xl shadow-elevation"
|
|
12
|
+
"pointer-events-auto relative flex w-full min-w-0 flex-col overflow-hidden",
|
|
13
|
+
"max-h-[calc(100dvh-2rem)] bg-elevated text-foreground outline-none",
|
|
14
|
+
"rounded-xl shadow-400",
|
|
15
|
+
"max-sm:max-h-[calc(100dvh-1rem)] max-sm:rounded-lg"
|
|
19
16
|
],
|
|
20
17
|
{
|
|
21
18
|
variants: {
|
|
22
19
|
size: {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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]",
|
|
28
|
+
/** Responsive canvas with a 16px viewport gutter. */
|
|
29
|
+
full: "h-[calc(100dvh-2rem)] max-w-none"
|
|
30
|
+
},
|
|
31
|
+
position: {
|
|
32
|
+
center: "",
|
|
33
|
+
top: ""
|
|
27
34
|
}
|
|
28
35
|
},
|
|
29
|
-
defaultVariants: {
|
|
36
|
+
defaultVariants: {
|
|
37
|
+
size: "md",
|
|
38
|
+
position: "center"
|
|
39
|
+
}
|
|
30
40
|
}
|
|
31
|
-
);
|
|
32
|
-
function
|
|
41
|
+
), x = r.createContext(null);
|
|
42
|
+
function M(o) {
|
|
43
|
+
return r.Children.toArray(o).some((e) => r.isValidElement(e) ? e.type === N ? !0 : M(
|
|
44
|
+
e.props.children
|
|
45
|
+
) : !1);
|
|
46
|
+
}
|
|
47
|
+
function ee({
|
|
33
48
|
open: o,
|
|
34
|
-
onOpenChange:
|
|
35
|
-
size:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
49
|
+
onOpenChange: e,
|
|
50
|
+
size: a,
|
|
51
|
+
position: i,
|
|
52
|
+
className: l,
|
|
53
|
+
children: d,
|
|
54
|
+
showCloseButton: C = !0,
|
|
55
|
+
closeOnOverlayClick: D = !0,
|
|
56
|
+
closeOnEscape: z = !0,
|
|
57
|
+
container: I,
|
|
58
|
+
initialFocusRef: c,
|
|
59
|
+
onAfterClose: R,
|
|
60
|
+
onAfterOpen: u,
|
|
61
|
+
overlayClassName: j,
|
|
62
|
+
viewportClassName: V,
|
|
63
|
+
"aria-label": v,
|
|
64
|
+
"aria-labelledby": _,
|
|
65
|
+
"aria-describedby": k
|
|
42
66
|
}) {
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
onClick: () => t(!1),
|
|
98
|
-
"aria-hidden": !0
|
|
99
|
-
},
|
|
100
|
-
"backdrop"
|
|
101
|
-
),
|
|
102
|
-
/* @__PURE__ */ y(
|
|
103
|
-
h.div,
|
|
104
|
-
{
|
|
105
|
-
ref: d,
|
|
106
|
-
variants: H,
|
|
107
|
-
initial: "hidden",
|
|
108
|
-
animate: "visible",
|
|
109
|
-
exit: "hidden",
|
|
110
|
-
role: "dialog",
|
|
111
|
-
"aria-modal": "true",
|
|
112
|
-
"aria-label": N,
|
|
113
|
-
"aria-labelledby": k,
|
|
114
|
-
"aria-describedby": R,
|
|
115
|
-
tabIndex: -1,
|
|
116
|
-
className: i(q({ size: r }), "relative outline-none", g),
|
|
117
|
-
children: [
|
|
118
|
-
/* @__PURE__ */ a(L, { origin: "center" }),
|
|
119
|
-
M ? /* @__PURE__ */ a(
|
|
120
|
-
"button",
|
|
67
|
+
const b = r.useRef(null), f = r.useId(), p = r.useId(), P = r.useMemo(
|
|
68
|
+
() => M(d),
|
|
69
|
+
[d]
|
|
70
|
+
), E = r.useMemo(
|
|
71
|
+
() => ({ titleId: f, descriptionId: p }),
|
|
72
|
+
[p, f]
|
|
73
|
+
);
|
|
74
|
+
return /* @__PURE__ */ t(m.Root, { open: o, onOpenChange: e, children: /* @__PURE__ */ t(x.Provider, { value: E, children: /* @__PURE__ */ t(T, { reducedMotion: "user", children: /* @__PURE__ */ t(B, { initial: !1, onExitComplete: R, children: o ? /* @__PURE__ */ y(m.Portal, { forceMount: !0, container: I ?? void 0, children: [
|
|
75
|
+
/* @__PURE__ */ t(m.Overlay, { forceMount: !0, asChild: !0, children: /* @__PURE__ */ t(
|
|
76
|
+
g.div,
|
|
77
|
+
{
|
|
78
|
+
"data-slot": "modal-overlay",
|
|
79
|
+
variants: K,
|
|
80
|
+
initial: "hidden",
|
|
81
|
+
animate: "visible",
|
|
82
|
+
exit: "hidden",
|
|
83
|
+
className: n(
|
|
84
|
+
"fixed inset-0 z-50 bg-overlay",
|
|
85
|
+
j
|
|
86
|
+
)
|
|
87
|
+
},
|
|
88
|
+
"modal-overlay"
|
|
89
|
+
) }),
|
|
90
|
+
/* @__PURE__ */ t(
|
|
91
|
+
"div",
|
|
92
|
+
{
|
|
93
|
+
"data-slot": "modal-viewport",
|
|
94
|
+
className: n(
|
|
95
|
+
"pointer-events-none fixed inset-0 z-50 grid overflow-y-auto p-4",
|
|
96
|
+
i === "top" ? "place-items-start justify-items-center pt-[max(1rem,8dvh)]" : "place-items-center",
|
|
97
|
+
"max-sm:p-2",
|
|
98
|
+
V
|
|
99
|
+
),
|
|
100
|
+
children: /* @__PURE__ */ t(
|
|
101
|
+
m.Content,
|
|
102
|
+
{
|
|
103
|
+
forceMount: !0,
|
|
104
|
+
asChild: !0,
|
|
105
|
+
"aria-label": v,
|
|
106
|
+
"aria-labelledby": _ ?? (v ? void 0 : f),
|
|
107
|
+
"aria-describedby": k ?? (P ? p : void 0),
|
|
108
|
+
onEscapeKeyDown: (s) => {
|
|
109
|
+
z || s.preventDefault();
|
|
110
|
+
},
|
|
111
|
+
onPointerDownOutside: (s) => {
|
|
112
|
+
D || s.preventDefault();
|
|
113
|
+
},
|
|
114
|
+
onOpenAutoFocus: (s) => {
|
|
115
|
+
var h;
|
|
116
|
+
s.preventDefault(), (h = (c == null ? void 0 : c.current) ?? b.current) == null || h.focus();
|
|
117
|
+
},
|
|
118
|
+
onFocusOutside: (s) => s.preventDefault(),
|
|
119
|
+
children: /* @__PURE__ */ y(
|
|
120
|
+
g.div,
|
|
121
121
|
{
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
122
|
+
ref: b,
|
|
123
|
+
"data-slot": "modal",
|
|
124
|
+
tabIndex: -1,
|
|
125
|
+
variants: q,
|
|
126
|
+
initial: "hidden",
|
|
127
|
+
animate: "visible",
|
|
128
|
+
exit: "hidden",
|
|
129
|
+
onAnimationComplete: (s) => {
|
|
130
|
+
s === "visible" && (u == null || u());
|
|
131
|
+
},
|
|
132
|
+
className: n(
|
|
133
|
+
A({ size: a, position: i }),
|
|
134
|
+
l
|
|
132
135
|
),
|
|
133
|
-
children:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
136
|
+
children: [
|
|
137
|
+
C ? /* @__PURE__ */ t(w, {}) : null,
|
|
138
|
+
d
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
"modal-panel"
|
|
142
|
+
)
|
|
143
|
+
}
|
|
144
|
+
)
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
] }) : null }) }) }) });
|
|
144
148
|
}
|
|
145
|
-
const
|
|
146
|
-
"
|
|
147
|
-
{
|
|
148
|
-
ref: r,
|
|
149
|
-
className: i("flex shrink-0 flex-col gap-1 px-6 pt-6 pr-14", o),
|
|
150
|
-
...t
|
|
151
|
-
}
|
|
152
|
-
));
|
|
153
|
-
B.displayName = "ModalHeader";
|
|
154
|
-
const C = n.forwardRef(({ className: o, ...t }, r) => /* @__PURE__ */ a(
|
|
155
|
-
"h2",
|
|
149
|
+
const w = r.forwardRef(({ className: o, children: e, "aria-label": a = "Close", ...i }, l) => /* @__PURE__ */ t(m.Close, { asChild: !0, children: /* @__PURE__ */ t(
|
|
150
|
+
"button",
|
|
156
151
|
{
|
|
157
|
-
ref:
|
|
158
|
-
|
|
159
|
-
|
|
152
|
+
ref: l,
|
|
153
|
+
type: "button",
|
|
154
|
+
"data-slot": "modal-close",
|
|
155
|
+
"aria-label": a,
|
|
156
|
+
className: n(
|
|
157
|
+
"absolute right-2 top-2 z-10 inline-flex size-7 items-center justify-center",
|
|
158
|
+
"rounded-sm text-secondary outline-none",
|
|
159
|
+
"transition-[background,color,transform] duration-150 ease-out motion-reduce:transition-none",
|
|
160
|
+
"hover:bg-muted hover:text-foreground active:scale-[0.97] motion-reduce:active:scale-100",
|
|
161
|
+
"focus-visible:ring-3 focus-visible:ring-ring",
|
|
162
|
+
"[&_svg]:size-4 [&_svg]:shrink-0",
|
|
163
|
+
o
|
|
164
|
+
),
|
|
165
|
+
...i,
|
|
166
|
+
children: e ?? /* @__PURE__ */ t(S, { "aria-hidden": !0 })
|
|
160
167
|
}
|
|
161
|
-
));
|
|
162
|
-
|
|
163
|
-
const
|
|
164
|
-
"
|
|
168
|
+
) }));
|
|
169
|
+
w.displayName = "ModalClose";
|
|
170
|
+
const F = r.forwardRef(({ className: o, ...e }, a) => /* @__PURE__ */ t(
|
|
171
|
+
"div",
|
|
165
172
|
{
|
|
166
|
-
ref:
|
|
167
|
-
|
|
168
|
-
|
|
173
|
+
ref: a,
|
|
174
|
+
"data-slot": "modal-header",
|
|
175
|
+
className: n(
|
|
176
|
+
"flex min-h-11 shrink-0 flex-col justify-center gap-0.5 bg-surface px-3 py-3 pr-11",
|
|
177
|
+
o
|
|
178
|
+
),
|
|
179
|
+
...e
|
|
169
180
|
}
|
|
170
181
|
));
|
|
171
|
-
|
|
172
|
-
const
|
|
182
|
+
F.displayName = "ModalHeader";
|
|
183
|
+
const G = r.forwardRef(({ className: o, id: e, ...a }, i) => {
|
|
184
|
+
const l = r.useContext(x), d = n(
|
|
185
|
+
"text-[15px] font-semibold leading-5 text-foreground",
|
|
186
|
+
o
|
|
187
|
+
);
|
|
188
|
+
return l ? /* @__PURE__ */ t(
|
|
189
|
+
m.Title,
|
|
190
|
+
{
|
|
191
|
+
ref: i,
|
|
192
|
+
id: e ?? l.titleId,
|
|
193
|
+
"data-slot": "modal-title",
|
|
194
|
+
className: d,
|
|
195
|
+
...a
|
|
196
|
+
}
|
|
197
|
+
) : /* @__PURE__ */ t("h2", { ref: i, id: e, className: d, ...a });
|
|
198
|
+
});
|
|
199
|
+
G.displayName = "ModalTitle";
|
|
200
|
+
const N = r.forwardRef(({ className: o, id: e, ...a }, i) => {
|
|
201
|
+
const l = r.useContext(x), d = n(
|
|
202
|
+
"text-sm leading-5 text-muted-foreground",
|
|
203
|
+
o
|
|
204
|
+
);
|
|
205
|
+
return l ? /* @__PURE__ */ t(
|
|
206
|
+
m.Description,
|
|
207
|
+
{
|
|
208
|
+
ref: i,
|
|
209
|
+
id: e ?? l.descriptionId,
|
|
210
|
+
"data-slot": "modal-description",
|
|
211
|
+
className: d,
|
|
212
|
+
...a
|
|
213
|
+
}
|
|
214
|
+
) : /* @__PURE__ */ t(
|
|
215
|
+
"p",
|
|
216
|
+
{
|
|
217
|
+
ref: i,
|
|
218
|
+
id: e,
|
|
219
|
+
className: d,
|
|
220
|
+
...a
|
|
221
|
+
}
|
|
222
|
+
);
|
|
223
|
+
});
|
|
224
|
+
N.displayName = "ModalDescription";
|
|
225
|
+
const J = r.forwardRef(
|
|
226
|
+
({ className: o, padding: e = "default", ...a }, i) => /* @__PURE__ */ t(
|
|
227
|
+
"div",
|
|
228
|
+
{
|
|
229
|
+
ref: i,
|
|
230
|
+
"data-slot": "modal-body",
|
|
231
|
+
className: n(
|
|
232
|
+
"min-h-0 flex-1 overflow-y-auto overscroll-contain border-t-[1px] border-border-tertiary text-sm leading-5 text-foreground",
|
|
233
|
+
e === "default" && "px-4 py-4",
|
|
234
|
+
o
|
|
235
|
+
),
|
|
236
|
+
...a
|
|
237
|
+
}
|
|
238
|
+
)
|
|
239
|
+
);
|
|
240
|
+
J.displayName = "ModalBody";
|
|
241
|
+
const O = r.forwardRef(({ className: o, ...e }, a) => /* @__PURE__ */ t(
|
|
173
242
|
"div",
|
|
174
243
|
{
|
|
175
|
-
ref:
|
|
176
|
-
|
|
177
|
-
|
|
244
|
+
ref: a,
|
|
245
|
+
"data-slot": "modal-section",
|
|
246
|
+
className: n(
|
|
247
|
+
"px-4 py-4 [&+&]:border-t [&+&]:border-border-tertiary",
|
|
178
248
|
o
|
|
179
249
|
),
|
|
180
|
-
...
|
|
250
|
+
...e
|
|
181
251
|
}
|
|
182
252
|
));
|
|
183
|
-
|
|
184
|
-
const
|
|
253
|
+
O.displayName = "ModalSection";
|
|
254
|
+
const Q = r.forwardRef(({ className: o, ...e }, a) => /* @__PURE__ */ t(
|
|
185
255
|
"div",
|
|
186
256
|
{
|
|
187
|
-
ref:
|
|
188
|
-
|
|
189
|
-
|
|
257
|
+
ref: a,
|
|
258
|
+
"data-slot": "modal-footer",
|
|
259
|
+
className: n(
|
|
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",
|
|
261
|
+
"[&_button]:h-7 [&_button]:rounded-sm [&_button]:px-2.5 [&_button]:text-xs",
|
|
190
262
|
o
|
|
191
263
|
),
|
|
192
|
-
...
|
|
264
|
+
...e
|
|
193
265
|
}
|
|
194
266
|
));
|
|
195
|
-
|
|
267
|
+
Q.displayName = "ModalFooter";
|
|
196
268
|
export {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
269
|
+
ee as Modal,
|
|
270
|
+
J as ModalBody,
|
|
271
|
+
w as ModalClose,
|
|
272
|
+
N as ModalDescription,
|
|
273
|
+
Q as ModalFooter,
|
|
274
|
+
F as ModalHeader,
|
|
275
|
+
O as ModalSection,
|
|
276
|
+
G as ModalTitle
|
|
203
277
|
};
|
|
@@ -1,92 +1,95 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as k, jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import { Minus as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { inputBaseClass as
|
|
2
|
+
import { jsxs as k, jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import * as h from "react";
|
|
4
|
+
import { Minus as M, Plus as _ } from "../lib/icons.js";
|
|
5
|
+
import { cn as d } from "../lib/cn.js";
|
|
6
|
+
import { inputBaseClass as j } from "./field.js";
|
|
7
7
|
const D = {
|
|
8
8
|
sm: {
|
|
9
|
-
field: "h-8 rounded-sm
|
|
9
|
+
field: "h-8 rounded-sm",
|
|
10
10
|
btn: "size-8 rounded-sm [&_svg]:size-3.5"
|
|
11
11
|
},
|
|
12
12
|
md: {
|
|
13
|
-
field: "h-10 rounded-md
|
|
13
|
+
field: "h-10 rounded-md",
|
|
14
14
|
btn: "size-10 rounded-md [&_svg]:size-4"
|
|
15
15
|
},
|
|
16
16
|
lg: {
|
|
17
|
-
field: "h-11 rounded-md
|
|
17
|
+
field: "h-11 rounded-md",
|
|
18
18
|
btn: "size-11 rounded-md [&_svg]:size-4"
|
|
19
19
|
}
|
|
20
|
-
}, F =
|
|
20
|
+
}, F = h.forwardRef(
|
|
21
21
|
({
|
|
22
22
|
className: v,
|
|
23
23
|
value: c,
|
|
24
24
|
onChange: t,
|
|
25
|
-
min:
|
|
26
|
-
max:
|
|
25
|
+
min: r,
|
|
26
|
+
max: i,
|
|
27
27
|
step: l = 1,
|
|
28
|
-
size:
|
|
29
|
-
isInvalid:
|
|
30
|
-
disabled:
|
|
31
|
-
...
|
|
32
|
-
},
|
|
33
|
-
const
|
|
34
|
-
let e =
|
|
35
|
-
return
|
|
36
|
-
},
|
|
28
|
+
size: y = "md",
|
|
29
|
+
isInvalid: x,
|
|
30
|
+
disabled: a,
|
|
31
|
+
...N
|
|
32
|
+
}, z) => {
|
|
33
|
+
const b = D[y], u = (n) => {
|
|
34
|
+
let e = n;
|
|
35
|
+
return r !== void 0 && (e = Math.max(r, e)), i !== void 0 && (e = Math.min(i, e)), e;
|
|
36
|
+
}, s = c ?? 0, g = !a && (r === void 0 || s > r), w = !a && (i === void 0 || s < i), m = (n) => t == null ? void 0 : t(u(s + n * l)), p = d(
|
|
37
37
|
"inline-flex items-center justify-center rounded-md border border-input bg-elevated text-foreground",
|
|
38
|
-
"transition-[background,box-shadow] duration-150
|
|
38
|
+
"transition-[background,border,color,box-shadow,transform] duration-150 ease-out",
|
|
39
|
+
"enabled:hover:border-action-primary enabled:hover:bg-action-primary-soft enabled:hover:text-action-primary-text",
|
|
40
|
+
"enabled:active:scale-[0.97] enabled:active:border-action-primary enabled:active:bg-action-primary-soft enabled:active:text-action-primary-text",
|
|
41
|
+
"motion-reduce:active:scale-100",
|
|
39
42
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
40
43
|
"disabled:pointer-events-none disabled:opacity-50",
|
|
41
|
-
|
|
44
|
+
b.btn
|
|
42
45
|
);
|
|
43
|
-
return /* @__PURE__ */ k("div", { className:
|
|
44
|
-
/* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ k("div", { className: d("inline-flex items-center gap-1.5", v), children: [
|
|
47
|
+
/* @__PURE__ */ o(
|
|
45
48
|
"button",
|
|
46
49
|
{
|
|
47
50
|
type: "button",
|
|
48
51
|
"aria-label": "Decrease",
|
|
49
|
-
disabled: !
|
|
52
|
+
disabled: !g,
|
|
50
53
|
onClick: () => m(-1),
|
|
51
54
|
className: p,
|
|
52
|
-
children: /* @__PURE__ */
|
|
55
|
+
children: /* @__PURE__ */ o(M, {})
|
|
53
56
|
}
|
|
54
57
|
),
|
|
55
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ o(
|
|
56
59
|
"input",
|
|
57
60
|
{
|
|
58
|
-
ref:
|
|
61
|
+
ref: z,
|
|
59
62
|
type: "number",
|
|
60
63
|
inputMode: "numeric",
|
|
61
64
|
value: c ?? "",
|
|
62
|
-
min:
|
|
63
|
-
max:
|
|
65
|
+
min: r,
|
|
66
|
+
max: i,
|
|
64
67
|
step: l,
|
|
65
|
-
disabled:
|
|
66
|
-
"aria-invalid":
|
|
67
|
-
onChange: (
|
|
68
|
-
const e =
|
|
68
|
+
disabled: a,
|
|
69
|
+
"aria-invalid": x || void 0,
|
|
70
|
+
onChange: (n) => {
|
|
71
|
+
const e = n.target.value;
|
|
69
72
|
if (e === "") return;
|
|
70
73
|
const f = Number(e);
|
|
71
|
-
Number.isNaN(f) || t == null || t(
|
|
74
|
+
Number.isNaN(f) || t == null || t(u(f));
|
|
72
75
|
},
|
|
73
|
-
className:
|
|
74
|
-
|
|
76
|
+
className: d(
|
|
77
|
+
j,
|
|
75
78
|
"w-20 text-center [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
|
|
76
|
-
|
|
79
|
+
b.field
|
|
77
80
|
),
|
|
78
|
-
...
|
|
81
|
+
...N
|
|
79
82
|
}
|
|
80
83
|
),
|
|
81
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ o(
|
|
82
85
|
"button",
|
|
83
86
|
{
|
|
84
87
|
type: "button",
|
|
85
88
|
"aria-label": "Increase",
|
|
86
|
-
disabled: !
|
|
89
|
+
disabled: !w,
|
|
87
90
|
onClick: () => m(1),
|
|
88
91
|
className: p,
|
|
89
|
-
children: /* @__PURE__ */
|
|
92
|
+
children: /* @__PURE__ */ o(_, {})
|
|
90
93
|
}
|
|
91
94
|
)
|
|
92
95
|
] });
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface PageBodyProps extends React.HTMLAttributes<HTMLElement> {
|
|
3
|
+
/** Semantic element used by the page region. @default "main" */
|
|
4
|
+
as?: "main" | "div";
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* PageBody — the primary page region beside an application sidebar.
|
|
8
|
+
*
|
|
9
|
+
* It is intentionally borderless and uses a raised white surface while
|
|
10
|
+
* consuming all remaining width and height in the surrounding app shell.
|
|
11
|
+
*/
|
|
12
|
+
export declare const PageBody: React.ForwardRefExoticComponent<PageBodyProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
import { cn as r } from "../lib/cn.js";
|
|
4
|
+
const d = e.forwardRef(
|
|
5
|
+
({ as: a = "main", className: o, ...l }, t) => e.createElement(a, {
|
|
6
|
+
ref: t,
|
|
7
|
+
"data-slot": "page-body",
|
|
8
|
+
className: r(
|
|
9
|
+
"relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-card shadow-elevation",
|
|
10
|
+
o
|
|
11
|
+
),
|
|
12
|
+
...l
|
|
13
|
+
})
|
|
14
|
+
);
|
|
15
|
+
d.displayName = "PageBody";
|
|
16
|
+
export {
|
|
17
|
+
d as PageBody
|
|
18
|
+
};
|