@cognite/aura 0.1.5 → 0.1.7
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 +1269 -0
- package/README.md +24 -0
- package/dist/colors.css +824 -0
- package/dist/components/index.d.ts +11 -2
- package/dist/components/index.js +284 -249
- package/dist/components/ui/core/accordion/accordion.d.ts +24 -0
- package/dist/components/ui/core/accordion/accordion.js +113 -0
- package/dist/components/ui/core/accordion/accordion.metadata.d.ts +2 -0
- package/dist/components/ui/core/accordion/accordion.metadata.js +9 -0
- package/dist/components/ui/core/alert/alert.d.ts +2 -1
- package/dist/components/ui/core/alert/alert.js +120 -96
- package/dist/components/ui/core/alert/alert.metadata.js +1 -1
- package/dist/components/ui/core/avatar/avatar.js +29 -32
- package/dist/components/ui/core/badge/badge.d.ts +1 -1
- package/dist/components/ui/core/badge/badge.js +44 -52
- package/dist/components/ui/core/banner/banner.d.ts +40 -0
- package/dist/components/ui/core/banner/banner.js +218 -0
- package/dist/components/ui/core/banner/banner.metadata.d.ts +2 -0
- package/dist/components/ui/core/banner/banner.metadata.js +9 -0
- package/dist/components/ui/core/button/button.d.ts +2 -2
- package/dist/components/ui/core/button/button.js +19 -20
- package/dist/components/ui/core/button-group/button-group.js +10 -10
- package/dist/components/ui/core/card/card.js +1 -1
- package/dist/components/ui/core/code-block/code-block.d.ts +14 -3
- package/dist/components/ui/core/code-block/code-block.js +218 -97
- package/dist/components/ui/core/code-block/code-block.metadata.js +1 -1
- package/dist/components/ui/core/collapsible/collapsible.js +30 -24
- package/dist/components/ui/core/command/command.d.ts +2 -2
- package/dist/components/ui/core/command/command.js +30 -30
- package/dist/components/ui/core/dialog/dialog.js +8 -8
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +1 -1
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +65 -62
- package/dist/components/ui/core/helper-text/helper-text.js +8 -8
- package/dist/components/ui/core/hover-card/hover-card.js +5 -5
- package/dist/components/ui/core/inline-citation/inline-citation.js +19 -16
- package/dist/components/ui/core/input/input.d.ts +1 -5
- package/dist/components/ui/core/input/input.js +24 -30
- package/dist/components/ui/core/input-group/input-group.d.ts +2 -2
- package/dist/components/ui/core/input-group/input-group.js +104 -74
- package/dist/components/ui/core/label/label.d.ts +3 -1
- package/dist/components/ui/core/label/label.js +39 -16
- package/dist/components/ui/core/label/label.metadata.js +2 -2
- package/dist/components/ui/core/message/message-response-default-streamdown-controls.d.ts +11 -0
- package/dist/components/ui/core/message/message-response-default-streamdown-controls.js +13 -0
- package/dist/components/ui/core/message/message.d.ts +1 -1
- package/dist/components/ui/core/message/message.js +62 -44
- package/dist/components/ui/core/popover/popover.d.ts +10 -1
- package/dist/components/ui/core/popover/popover.js +137 -34
- package/dist/components/ui/core/popover/popover.metadata.js +9 -0
- package/dist/components/ui/core/progress/progress.d.ts +10 -0
- package/dist/components/ui/core/progress/progress.js +61 -0
- package/dist/components/ui/core/progress/progress.metadata.d.ts +2 -0
- package/dist/components/ui/core/progress/progress.metadata.js +9 -0
- package/dist/components/ui/core/prompt-input/prompt-input.d.ts +2 -2
- package/dist/components/ui/core/prompt-input/prompt-input.js +100 -100
- package/dist/components/ui/core/scroll-area/scroll-area.d.ts +3 -0
- package/dist/components/ui/core/scroll-area/scroll-area.js +71 -0
- package/dist/components/ui/core/scroll-area/scroll-area.metadata.d.ts +2 -0
- package/dist/components/ui/core/scroll-area/scroll-area.metadata.js +9 -0
- package/dist/components/ui/core/select/select.d.ts +3 -3
- package/dist/components/ui/core/select/select.js +69 -73
- package/dist/components/ui/core/skeleton/skeleton.js +6 -6
- package/dist/components/ui/core/sources/sources.js +8 -1
- package/dist/components/ui/core/textarea/textarea.d.ts +1 -8
- package/dist/components/ui/core/textarea/textarea.js +21 -45
- package/dist/components/ui/core/tool/tool.js +58 -50
- package/dist/components/ui/core/tooltip/tooltip.js +10 -10
- package/dist/index.d.ts +1 -1
- package/dist/index.js +281 -249
- package/dist/lib/utils.d.ts +6 -6
- package/dist/lib/utils.js +26 -26
- package/dist/styles.css +1 -1
- package/dist/styles.source.css +3 -812
- package/package.json +28 -9
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { jsx as o, jsxs as w } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as H, forwardRef as
|
|
3
|
-
import { IconSend as
|
|
2
|
+
import { createContext as H, forwardRef as s, useState as y, useContext as C, useCallback as k, useMemo as A } from "react";
|
|
3
|
+
import { IconSend as E, IconLoader2 as D, IconSquare as z, IconX as B, IconPlus as L, IconInfoCircle as G } from "@tabler/icons-react";
|
|
4
4
|
import { cn as r } from "../../../../lib/utils.js";
|
|
5
5
|
import { Command as F, CommandEmpty as j, CommandGroup as K, CommandInput as V, CommandItem as q, CommandList as R, CommandSeparator as O } from "../command/command.js";
|
|
6
6
|
import { DropdownMenu as W, DropdownMenuContent as X, DropdownMenuItem as J, DropdownMenuTrigger as Q } from "../dropdown-menu/dropdown-menu.js";
|
|
7
|
-
import { HelperText as
|
|
7
|
+
import { HelperText as f } from "../helper-text/helper-text.js";
|
|
8
8
|
import { HoverCard as U, HoverCardContent as Y, HoverCardTrigger as Z } from "../hover-card/hover-card.js";
|
|
9
9
|
import { InputGroupTextarea as _, InputGroupAddon as x, InputGroupButton as h, InputGroup as $ } from "../input-group/input-group.js";
|
|
10
10
|
import { Select as tt, SelectContent as et, SelectItem as ot, SelectTrigger as nt, SelectValue as rt } from "../select/select.js";
|
|
11
|
-
const
|
|
11
|
+
const N = H(
|
|
12
12
|
null
|
|
13
13
|
), Jt = () => {
|
|
14
|
-
const t =
|
|
14
|
+
const t = C(N);
|
|
15
15
|
if (!t)
|
|
16
16
|
throw new Error(
|
|
17
17
|
"Wrap your component inside <PromptInputProvider> to use usePromptInputController()."
|
|
18
18
|
);
|
|
19
19
|
return t;
|
|
20
|
-
}, v = () =>
|
|
20
|
+
}, v = () => C(N);
|
|
21
21
|
function at({
|
|
22
22
|
initialInput: t = "",
|
|
23
23
|
children: e
|
|
24
24
|
}) {
|
|
25
|
-
const [n, a] =
|
|
25
|
+
const [n, a] = y(t), l = k(() => a(""), []), p = A(
|
|
26
26
|
() => ({
|
|
27
27
|
textInput: {
|
|
28
28
|
value: n,
|
|
@@ -32,39 +32,39 @@ function at({
|
|
|
32
32
|
}),
|
|
33
33
|
[n, l]
|
|
34
34
|
);
|
|
35
|
-
return /* @__PURE__ */ o(
|
|
35
|
+
return /* @__PURE__ */ o(N.Provider, { value: p, children: e });
|
|
36
36
|
}
|
|
37
37
|
at.displayName = "PromptInputProvider";
|
|
38
|
-
const
|
|
38
|
+
const st = ({
|
|
39
39
|
className: t,
|
|
40
40
|
onSubmit: e,
|
|
41
41
|
helperText: n,
|
|
42
42
|
errorMessage: a,
|
|
43
43
|
children: l,
|
|
44
|
-
...
|
|
44
|
+
...p
|
|
45
45
|
}) => {
|
|
46
|
-
const m = v(), [u,
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
const I = new FormData(
|
|
46
|
+
const m = v(), [u, c] = y(null), P = (g) => {
|
|
47
|
+
g.preventDefault();
|
|
48
|
+
const b = g.currentTarget, M = m ? m.textInput.value : (() => {
|
|
49
|
+
const I = new FormData(b).get("message");
|
|
50
50
|
return typeof I == "string" ? I : "";
|
|
51
51
|
})();
|
|
52
|
-
m ||
|
|
52
|
+
m || b.reset();
|
|
53
53
|
try {
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
const d = e({ text: M }, g);
|
|
55
|
+
d instanceof Promise ? d.then(() => {
|
|
56
|
+
c(null), m?.textInput.clear();
|
|
57
57
|
}).catch((I) => {
|
|
58
|
-
console.error("PromptInput: Submission error:", I),
|
|
58
|
+
console.error("PromptInput: Submission error:", I), c(
|
|
59
59
|
I instanceof Error ? I.message : "Failed to submit. Please try again."
|
|
60
60
|
);
|
|
61
|
-
}) : (
|
|
62
|
-
} catch (
|
|
63
|
-
console.error("PromptInput: Submission error:",
|
|
64
|
-
|
|
61
|
+
}) : (c(null), m?.textInput.clear());
|
|
62
|
+
} catch (d) {
|
|
63
|
+
console.error("PromptInput: Submission error:", d), c(
|
|
64
|
+
d instanceof Error ? d.message : "Failed to submit. Please try again."
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
|
-
}, S = n === !1 ? null : n ?? /* @__PURE__ */ o(
|
|
67
|
+
}, S = n === !1 ? null : n ?? /* @__PURE__ */ o(f, { size: "xs", icon: /* @__PURE__ */ o(G, {}), children: "AI doesn't always get it right. Be sure to check results" });
|
|
68
68
|
return /* @__PURE__ */ w("div", { className: "w-full flex flex-col gap-2", children: [
|
|
69
69
|
/* @__PURE__ */ o(
|
|
70
70
|
"form",
|
|
@@ -72,15 +72,15 @@ const pt = ({
|
|
|
72
72
|
"data-slot": "prompt-input",
|
|
73
73
|
className: r("w-full", t),
|
|
74
74
|
onSubmit: P,
|
|
75
|
-
...
|
|
76
|
-
children: /* @__PURE__ */ o($, { className: "shadow-none rounded-xl has-[[data-slot=input-group-control]:read-only]:border-input hover:has-[[data-slot=input-group-control]:read-only]:border-
|
|
75
|
+
...p,
|
|
76
|
+
children: /* @__PURE__ */ o($, { className: "shadow-none rounded-xl has-[[data-slot=input-group-control]:is(:read-only,[aria-disabled=true])]:border-muted-background has-[[data-slot=input-group-control]:is(:read-only,[aria-disabled=true])]:bg-muted-background hover:has-[[data-slot=input-group-control]:is(:read-only,[aria-disabled=true])]:border-muted-background hover:has-[[data-slot=input-group-control]:is(:read-only,[aria-disabled=true])]:bg-muted-background hover:has-[[data-slot=input-group-control]:is(:read-only,[aria-disabled=true])]:text-muted-foreground", children: l })
|
|
77
77
|
}
|
|
78
78
|
),
|
|
79
|
-
a || u ? /* @__PURE__ */ o(
|
|
79
|
+
a || u ? /* @__PURE__ */ o(f, { size: "xs", isError: !0, children: a || u }) : S
|
|
80
80
|
] });
|
|
81
81
|
};
|
|
82
|
-
|
|
83
|
-
const
|
|
82
|
+
st.displayName = "PromptInput";
|
|
83
|
+
const pt = s(
|
|
84
84
|
({ className: t, ...e }, n) => /* @__PURE__ */ o(
|
|
85
85
|
"div",
|
|
86
86
|
{
|
|
@@ -91,19 +91,19 @@ const st = p(
|
|
|
91
91
|
}
|
|
92
92
|
)
|
|
93
93
|
);
|
|
94
|
-
|
|
95
|
-
const mt =
|
|
94
|
+
pt.displayName = "PromptInputBody";
|
|
95
|
+
const mt = s(
|
|
96
96
|
({ onChange: t, className: e, placeholder: n = "Type your message...", ...a }, l) => {
|
|
97
|
-
const
|
|
97
|
+
const p = v(), [m, u] = y(!1), c = (i) => {
|
|
98
98
|
if (i.key === "Enter") {
|
|
99
99
|
if (m || i.nativeEvent.isComposing || i.shiftKey)
|
|
100
100
|
return;
|
|
101
101
|
i.preventDefault(), i.currentTarget.form?.requestSubmit();
|
|
102
102
|
}
|
|
103
|
-
}, P =
|
|
104
|
-
value:
|
|
103
|
+
}, P = p ? {
|
|
104
|
+
value: p.textInput.value,
|
|
105
105
|
onChange: (i) => {
|
|
106
|
-
|
|
106
|
+
p.textInput.setInput(i.currentTarget.value), t?.(i);
|
|
107
107
|
}
|
|
108
108
|
} : {
|
|
109
109
|
onChange: t
|
|
@@ -119,7 +119,7 @@ const mt = p(
|
|
|
119
119
|
name: "message",
|
|
120
120
|
onCompositionEnd: () => u(!1),
|
|
121
121
|
onCompositionStart: () => u(!0),
|
|
122
|
-
onKeyDown:
|
|
122
|
+
onKeyDown: c,
|
|
123
123
|
placeholder: n,
|
|
124
124
|
...a,
|
|
125
125
|
...P
|
|
@@ -128,7 +128,7 @@ const mt = p(
|
|
|
128
128
|
}
|
|
129
129
|
);
|
|
130
130
|
mt.displayName = "PromptInputTextarea";
|
|
131
|
-
const lt =
|
|
131
|
+
const lt = s(({ className: t, ...e }, n) => /* @__PURE__ */ o(
|
|
132
132
|
x,
|
|
133
133
|
{
|
|
134
134
|
ref: n,
|
|
@@ -138,7 +138,7 @@ const lt = p(({ className: t, ...e }, n) => /* @__PURE__ */ o(
|
|
|
138
138
|
}
|
|
139
139
|
));
|
|
140
140
|
lt.displayName = "PromptInputHeader";
|
|
141
|
-
const ut =
|
|
141
|
+
const ut = s(({ className: t, ...e }, n) => /* @__PURE__ */ o(
|
|
142
142
|
x,
|
|
143
143
|
{
|
|
144
144
|
ref: n,
|
|
@@ -148,7 +148,7 @@ const ut = p(({ className: t, ...e }, n) => /* @__PURE__ */ o(
|
|
|
148
148
|
}
|
|
149
149
|
));
|
|
150
150
|
ut.displayName = "PromptInputFooter";
|
|
151
|
-
const it =
|
|
151
|
+
const it = s(
|
|
152
152
|
({ className: t, ...e }, n) => /* @__PURE__ */ o(
|
|
153
153
|
"div",
|
|
154
154
|
{
|
|
@@ -160,8 +160,8 @@ const it = p(
|
|
|
160
160
|
)
|
|
161
161
|
);
|
|
162
162
|
it.displayName = "PromptInputTools";
|
|
163
|
-
const T =
|
|
164
|
-
const
|
|
163
|
+
const T = s(({ variant: t = "ghost", className: e, size: n, ...a }, l) => {
|
|
164
|
+
const p = a.children === void 0 || a.children === null ? 0 : Array.isArray(a.children) ? a.children.length : 1, m = n ?? (p > 1 ? "sm" : "icon-sm");
|
|
165
165
|
return /* @__PURE__ */ o(
|
|
166
166
|
h,
|
|
167
167
|
{
|
|
@@ -175,19 +175,19 @@ const T = p(({ variant: t = "ghost", className: e, size: n, ...a }, l) => {
|
|
|
175
175
|
);
|
|
176
176
|
});
|
|
177
177
|
T.displayName = "PromptInputButton";
|
|
178
|
-
const
|
|
179
|
-
|
|
180
|
-
const
|
|
178
|
+
const dt = (t) => /* @__PURE__ */ o(W, { ...t });
|
|
179
|
+
dt.displayName = "PromptInputActionMenu";
|
|
180
|
+
const ct = ({
|
|
181
181
|
className: t,
|
|
182
182
|
children: e,
|
|
183
183
|
...n
|
|
184
184
|
}) => /* @__PURE__ */ o(
|
|
185
185
|
Q,
|
|
186
186
|
{
|
|
187
|
-
render: /* @__PURE__ */ o(T, { className: t, ...n, children: e ?? /* @__PURE__ */ o(
|
|
187
|
+
render: /* @__PURE__ */ o(T, { className: t, ...n, children: e ?? /* @__PURE__ */ o(L, { className: "size-4" }) })
|
|
188
188
|
}
|
|
189
189
|
);
|
|
190
|
-
|
|
190
|
+
ct.displayName = "PromptInputActionMenuTrigger";
|
|
191
191
|
const It = ({
|
|
192
192
|
className: t,
|
|
193
193
|
...e
|
|
@@ -198,17 +198,17 @@ const Pt = ({
|
|
|
198
198
|
...e
|
|
199
199
|
}) => /* @__PURE__ */ o(J, { className: r(t), ...e });
|
|
200
200
|
Pt.displayName = "PromptInputActionMenuItem";
|
|
201
|
-
const
|
|
201
|
+
const gt = s(
|
|
202
202
|
({
|
|
203
203
|
className: t,
|
|
204
204
|
variant: e = "default",
|
|
205
205
|
size: n = "icon-sm",
|
|
206
206
|
status: a,
|
|
207
207
|
children: l,
|
|
208
|
-
...
|
|
208
|
+
...p
|
|
209
209
|
}, m) => {
|
|
210
|
-
let u = /* @__PURE__ */ o(
|
|
211
|
-
return a === "submitted" ? u = /* @__PURE__ */ o(
|
|
210
|
+
let u = /* @__PURE__ */ o(E, { className: "size-4" });
|
|
211
|
+
return a === "submitted" ? u = /* @__PURE__ */ o(D, { className: "size-4 animate-spin" }) : a === "streaming" ? u = /* @__PURE__ */ o(z, { className: "size-4" }) : a === "error" && (u = /* @__PURE__ */ o(B, { className: "size-4" })), /* @__PURE__ */ o(
|
|
212
212
|
h,
|
|
213
213
|
{
|
|
214
214
|
ref: m,
|
|
@@ -218,16 +218,16 @@ const yt = p(
|
|
|
218
218
|
size: n,
|
|
219
219
|
type: "submit",
|
|
220
220
|
variant: e,
|
|
221
|
-
...
|
|
221
|
+
...p,
|
|
222
222
|
children: l ?? u
|
|
223
223
|
}
|
|
224
224
|
);
|
|
225
225
|
}
|
|
226
226
|
);
|
|
227
|
-
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
const
|
|
227
|
+
gt.displayName = "PromptInputSubmit";
|
|
228
|
+
const yt = (t) => /* @__PURE__ */ o(tt, { ...t });
|
|
229
|
+
yt.displayName = "PromptInputModelSelect";
|
|
230
|
+
const Nt = ({
|
|
231
231
|
className: t,
|
|
232
232
|
...e
|
|
233
233
|
}) => /* @__PURE__ */ o(
|
|
@@ -235,28 +235,28 @@ const gt = ({
|
|
|
235
235
|
{
|
|
236
236
|
className: r(
|
|
237
237
|
"border-none bg-transparent font-medium text-muted-foreground shadow-none transition-colors",
|
|
238
|
-
"hover:bg-accent hover:text-foreground aria-expanded:bg-accent aria-expanded:text-foreground",
|
|
238
|
+
"hover:bg-accent-background hover:text-foreground aria-expanded:bg-accent-background aria-expanded:text-foreground",
|
|
239
239
|
t
|
|
240
240
|
),
|
|
241
241
|
...e
|
|
242
242
|
}
|
|
243
243
|
);
|
|
244
|
-
|
|
245
|
-
const
|
|
244
|
+
Nt.displayName = "PromptInputModelSelectTrigger";
|
|
245
|
+
const bt = ({
|
|
246
246
|
className: t,
|
|
247
247
|
...e
|
|
248
248
|
}) => /* @__PURE__ */ o(et, { className: r(t), ...e });
|
|
249
|
-
|
|
250
|
-
const
|
|
249
|
+
bt.displayName = "PromptInputModelSelectContent";
|
|
250
|
+
const ft = ({
|
|
251
251
|
className: t,
|
|
252
252
|
...e
|
|
253
253
|
}) => /* @__PURE__ */ o(ot, { className: r(t), ...e });
|
|
254
|
-
|
|
255
|
-
const
|
|
254
|
+
ft.displayName = "PromptInputModelSelectItem";
|
|
255
|
+
const Ct = ({
|
|
256
256
|
className: t,
|
|
257
257
|
...e
|
|
258
258
|
}) => /* @__PURE__ */ o(rt, { className: r(t), ...e });
|
|
259
|
-
|
|
259
|
+
Ct.displayName = "PromptInputModelSelectValue";
|
|
260
260
|
const xt = ({
|
|
261
261
|
openDelay: t = 0,
|
|
262
262
|
closeDelay: e = 0,
|
|
@@ -270,7 +270,7 @@ const vt = ({
|
|
|
270
270
|
...e
|
|
271
271
|
}) => /* @__PURE__ */ o(Y, { align: t, ...e });
|
|
272
272
|
vt.displayName = "PromptInputHoverCardContent";
|
|
273
|
-
const Tt =
|
|
273
|
+
const Tt = s(({ className: t, ...e }, n) => /* @__PURE__ */ o(
|
|
274
274
|
"div",
|
|
275
275
|
{
|
|
276
276
|
ref: n,
|
|
@@ -280,7 +280,7 @@ const Tt = p(({ className: t, ...e }, n) => /* @__PURE__ */ o(
|
|
|
280
280
|
}
|
|
281
281
|
));
|
|
282
282
|
Tt.displayName = "PromptInputTabsList";
|
|
283
|
-
const St =
|
|
283
|
+
const St = s(
|
|
284
284
|
({ className: t, ...e }, n) => /* @__PURE__ */ o(
|
|
285
285
|
"div",
|
|
286
286
|
{
|
|
@@ -292,7 +292,7 @@ const St = p(
|
|
|
292
292
|
)
|
|
293
293
|
);
|
|
294
294
|
St.displayName = "PromptInputTab";
|
|
295
|
-
const Mt =
|
|
295
|
+
const Mt = s(({ className: t, children: e, ...n }, a) => /* @__PURE__ */ o(
|
|
296
296
|
"h3",
|
|
297
297
|
{
|
|
298
298
|
ref: a,
|
|
@@ -306,7 +306,7 @@ const Mt = p(({ className: t, children: e, ...n }, a) => /* @__PURE__ */ o(
|
|
|
306
306
|
}
|
|
307
307
|
));
|
|
308
308
|
Mt.displayName = "PromptInputTabLabel";
|
|
309
|
-
const wt =
|
|
309
|
+
const wt = s(({ className: t, ...e }, n) => /* @__PURE__ */ o(
|
|
310
310
|
"div",
|
|
311
311
|
{
|
|
312
312
|
ref: n,
|
|
@@ -316,81 +316,81 @@ const wt = p(({ className: t, ...e }, n) => /* @__PURE__ */ o(
|
|
|
316
316
|
}
|
|
317
317
|
));
|
|
318
318
|
wt.displayName = "PromptInputTabBody";
|
|
319
|
-
const Ht =
|
|
319
|
+
const Ht = s(({ className: t, ...e }, n) => /* @__PURE__ */ o(
|
|
320
320
|
"div",
|
|
321
321
|
{
|
|
322
322
|
ref: n,
|
|
323
323
|
"data-slot": "prompt-input-tab-item",
|
|
324
324
|
className: r(
|
|
325
|
-
"flex items-center gap-2 px-3 py-2 text-xs hover:bg-accent",
|
|
325
|
+
"flex items-center gap-2 px-3 py-2 text-xs hover:bg-accent-background",
|
|
326
326
|
t
|
|
327
327
|
),
|
|
328
328
|
...e
|
|
329
329
|
}
|
|
330
330
|
));
|
|
331
331
|
Ht.displayName = "PromptInputTabItem";
|
|
332
|
-
const
|
|
332
|
+
const kt = ({
|
|
333
333
|
className: t,
|
|
334
334
|
...e
|
|
335
335
|
}) => /* @__PURE__ */ o(F, { className: r(t), ...e });
|
|
336
|
-
|
|
337
|
-
const
|
|
336
|
+
kt.displayName = "PromptInputCommand";
|
|
337
|
+
const At = ({
|
|
338
338
|
className: t,
|
|
339
339
|
...e
|
|
340
340
|
}) => /* @__PURE__ */ o(V, { className: r(t), ...e });
|
|
341
|
-
|
|
342
|
-
const
|
|
341
|
+
At.displayName = "PromptInputCommandInput";
|
|
342
|
+
const Et = ({
|
|
343
343
|
className: t,
|
|
344
344
|
...e
|
|
345
345
|
}) => /* @__PURE__ */ o(R, { className: r(t), ...e });
|
|
346
|
-
|
|
347
|
-
const
|
|
346
|
+
Et.displayName = "PromptInputCommandList";
|
|
347
|
+
const Dt = ({
|
|
348
348
|
className: t,
|
|
349
349
|
...e
|
|
350
350
|
}) => /* @__PURE__ */ o(j, { className: r(t), ...e });
|
|
351
|
-
|
|
352
|
-
const
|
|
351
|
+
Dt.displayName = "PromptInputCommandEmpty";
|
|
352
|
+
const zt = ({
|
|
353
353
|
className: t,
|
|
354
354
|
...e
|
|
355
355
|
}) => /* @__PURE__ */ o(K, { className: r(t), ...e });
|
|
356
|
-
|
|
357
|
-
const
|
|
356
|
+
zt.displayName = "PromptInputCommandGroup";
|
|
357
|
+
const Bt = ({
|
|
358
358
|
className: t,
|
|
359
359
|
...e
|
|
360
360
|
}) => /* @__PURE__ */ o(q, { className: r(t), ...e });
|
|
361
|
-
|
|
362
|
-
const
|
|
361
|
+
Bt.displayName = "PromptInputCommandItem";
|
|
362
|
+
const Lt = ({
|
|
363
363
|
className: t,
|
|
364
364
|
...e
|
|
365
365
|
}) => /* @__PURE__ */ o(O, { className: r(t), ...e });
|
|
366
|
-
|
|
366
|
+
Lt.displayName = "PromptInputCommandSeparator";
|
|
367
367
|
export {
|
|
368
|
-
|
|
369
|
-
|
|
368
|
+
st as PromptInput,
|
|
369
|
+
dt as PromptInputActionMenu,
|
|
370
370
|
It as PromptInputActionMenuContent,
|
|
371
371
|
Pt as PromptInputActionMenuItem,
|
|
372
|
-
|
|
373
|
-
|
|
372
|
+
ct as PromptInputActionMenuTrigger,
|
|
373
|
+
pt as PromptInputBody,
|
|
374
374
|
T as PromptInputButton,
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
375
|
+
kt as PromptInputCommand,
|
|
376
|
+
Dt as PromptInputCommandEmpty,
|
|
377
|
+
zt as PromptInputCommandGroup,
|
|
378
|
+
At as PromptInputCommandInput,
|
|
379
|
+
Bt as PromptInputCommandItem,
|
|
380
|
+
Et as PromptInputCommandList,
|
|
381
|
+
Lt as PromptInputCommandSeparator,
|
|
382
382
|
ut as PromptInputFooter,
|
|
383
383
|
lt as PromptInputHeader,
|
|
384
384
|
xt as PromptInputHoverCard,
|
|
385
385
|
vt as PromptInputHoverCardContent,
|
|
386
386
|
ht as PromptInputHoverCardTrigger,
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
387
|
+
yt as PromptInputModelSelect,
|
|
388
|
+
bt as PromptInputModelSelectContent,
|
|
389
|
+
ft as PromptInputModelSelectItem,
|
|
390
|
+
Nt as PromptInputModelSelectTrigger,
|
|
391
|
+
Ct as PromptInputModelSelectValue,
|
|
392
392
|
at as PromptInputProvider,
|
|
393
|
-
|
|
393
|
+
gt as PromptInputSubmit,
|
|
394
394
|
St as PromptInputTab,
|
|
395
395
|
wt as PromptInputTabBody,
|
|
396
396
|
Ht as PromptInputTabItem,
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const ScrollArea: import('react').ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').ScrollAreaRootProps, "ref"> & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
2
|
+
declare const ScrollBar: import('react').ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').ScrollAreaScrollbarProps, "ref"> & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsxs as d, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as i } from "react";
|
|
3
|
+
import { ScrollArea as o } from "@base-ui/react/scroll-area";
|
|
4
|
+
import { focusRing as m, cn as s } from "../../../../lib/utils.js";
|
|
5
|
+
const p = i(
|
|
6
|
+
({
|
|
7
|
+
className: a,
|
|
8
|
+
children: l,
|
|
9
|
+
...e
|
|
10
|
+
}, t) => /* @__PURE__ */ d(
|
|
11
|
+
o.Root,
|
|
12
|
+
{
|
|
13
|
+
ref: t,
|
|
14
|
+
"data-slot": "scroll-area",
|
|
15
|
+
className: s("relative group/scroll-area", a),
|
|
16
|
+
...e,
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ r(
|
|
19
|
+
o.Viewport,
|
|
20
|
+
{
|
|
21
|
+
"data-slot": "scroll-area-viewport",
|
|
22
|
+
className: `size-full rounded-[inherit] transition-[color,box-shadow] ${m}`,
|
|
23
|
+
children: /* @__PURE__ */ r(o.Content, { "data-slot": "scroll-area-content", children: l })
|
|
24
|
+
}
|
|
25
|
+
),
|
|
26
|
+
/* @__PURE__ */ r(c, { orientation: "vertical" }),
|
|
27
|
+
/* @__PURE__ */ r(c, { orientation: "horizontal" }),
|
|
28
|
+
/* @__PURE__ */ r(o.Corner, { "data-slot": "scroll-area-corner" })
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
), c = i(
|
|
33
|
+
({
|
|
34
|
+
className: a,
|
|
35
|
+
orientation: l = "vertical",
|
|
36
|
+
...e
|
|
37
|
+
}, t) => {
|
|
38
|
+
const n = l === "horizontal";
|
|
39
|
+
return /* @__PURE__ */ r(
|
|
40
|
+
o.Scrollbar,
|
|
41
|
+
{
|
|
42
|
+
ref: t,
|
|
43
|
+
"data-slot": "scroll-area-scrollbar",
|
|
44
|
+
"data-orientation": l,
|
|
45
|
+
orientation: l,
|
|
46
|
+
className: s(
|
|
47
|
+
"group/scroll-area-scrollbar flex touch-none select-none items-start transition-colors",
|
|
48
|
+
n ? "w-full py-0.5 px-3" : "inline-flex self-stretch px-0.5 py-3",
|
|
49
|
+
a
|
|
50
|
+
),
|
|
51
|
+
...e,
|
|
52
|
+
children: /* @__PURE__ */ r(
|
|
53
|
+
o.Thumb,
|
|
54
|
+
{
|
|
55
|
+
"data-slot": "scroll-area-thumb",
|
|
56
|
+
className: s(
|
|
57
|
+
"relative rounded-full bg-secondary-background transition-colors group-hover/scroll-area-scrollbar:bg-secondary-background-hover",
|
|
58
|
+
n ? "h-1 min-w-10" : "w-1 min-h-10"
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
p.displayName = "ScrollArea";
|
|
67
|
+
c.displayName = "ScrollBar";
|
|
68
|
+
export {
|
|
69
|
+
p as ScrollArea,
|
|
70
|
+
c as ScrollBar
|
|
71
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const a = {
|
|
2
|
+
name: "ScrollArea",
|
|
3
|
+
status: "in-progress-code-review",
|
|
4
|
+
description: "A custom scrollable area built on Base UI Scroll Area, with styled scrollbars and an automatic corner for bidirectional scrolling.",
|
|
5
|
+
llmUsage: "Use `<ScrollArea>` as the container and place scrollable content directly as children. Both vertical and horizontal scrollbars are rendered automatically and only appear on the axes that actually overflow. Use the `dir` prop for RTL layouts (and a Base UI `DirectionProvider` when required by your app setup)."
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
a as ScrollAreaMetadata
|
|
9
|
+
};
|
|
@@ -23,10 +23,10 @@ declare function SelectGroup({ className, ...props }: SelectPrimitive.Group.Prop
|
|
|
23
23
|
declare function SelectValue({ icon, ...props }: SelectPrimitive.Value.Props & {
|
|
24
24
|
icon?: ReactNode;
|
|
25
25
|
}): import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
declare
|
|
27
|
-
size?:
|
|
26
|
+
declare const SelectTrigger: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').SelectTriggerProps & {
|
|
27
|
+
size?: "sm" | "default";
|
|
28
28
|
errorMessage?: string;
|
|
29
|
-
}
|
|
29
|
+
}, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
30
30
|
declare function SelectContent({ className, children, position: _position, align, alignOffset, side, sideOffset, ...props }: SelectPrimitive.Popup.Props & {
|
|
31
31
|
position?: 'popper' | 'item-aligned';
|
|
32
32
|
align?: SelectPrimitive.Positioner.Props['align'];
|