@cognite/aura 0.1.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/dist/components/index.d.ts +53 -0
- package/dist/components/ui/core/alert/alert.d.ts +19 -0
- package/dist/components/ui/core/alert/alert.js +180 -0
- package/dist/components/ui/core/alert/alert.metadata.d.ts +2 -0
- package/dist/components/ui/core/alert/alert.metadata.js +9 -0
- package/dist/components/ui/core/avatar/avatar.d.ts +10 -0
- package/dist/components/ui/core/avatar/avatar.js +94 -0
- package/dist/components/ui/core/avatar/avatar.metadata.d.ts +8 -0
- package/dist/components/ui/core/avatar/avatar.metadata.js +9 -0
- package/dist/components/ui/core/badge/badge.d.ts +14 -0
- package/dist/components/ui/core/badge/badge.js +116 -0
- package/dist/components/ui/core/badge/badge.metadata.d.ts +2 -0
- package/dist/components/ui/core/badge/badge.metadata.js +8 -0
- package/dist/components/ui/core/button/button.d.ts +9 -0
- package/dist/components/ui/core/button/button.js +50 -0
- package/dist/components/ui/core/button/button.metadata.d.ts +2 -0
- package/dist/components/ui/core/button/button.metadata.js +9 -0
- package/dist/components/ui/core/button-group/button-group.d.ts +11 -0
- package/dist/components/ui/core/button-group/button-group.js +83 -0
- package/dist/components/ui/core/button-group/button-group.metadata.d.ts +2 -0
- package/dist/components/ui/core/button-group/button-group.metadata.js +8 -0
- package/dist/components/ui/core/code-block/code-block.d.ts +21 -0
- package/dist/components/ui/core/code-block/code-block.js +146 -0
- package/dist/components/ui/core/code-block/code-block.metadata.d.ts +2 -0
- package/dist/components/ui/core/code-block/code-block.metadata.js +8 -0
- package/dist/components/ui/core/collapsible/collapsible.d.ts +4 -0
- package/dist/components/ui/core/collapsible/collapsible.js +44 -0
- package/dist/components/ui/core/collapsible/collapsible.metadata.d.ts +2 -0
- package/dist/components/ui/core/collapsible/collapsible.metadata.js +9 -0
- package/dist/components/ui/core/command/command.d.ts +86 -0
- package/dist/components/ui/core/command/command.js +150 -0
- package/dist/components/ui/core/command/command.metadata.d.ts +2 -0
- package/dist/components/ui/core/command/command.metadata.js +9 -0
- package/dist/components/ui/core/dialog/dialog.d.ts +18 -0
- package/dist/components/ui/core/dialog/dialog.js +155 -0
- package/dist/components/ui/core/dialog/dialog.metadata.d.ts +2 -0
- package/dist/components/ui/core/dialog/dialog.metadata.js +9 -0
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +53 -0
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +250 -0
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.metadata.d.ts +2 -0
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.metadata.js +9 -0
- package/dist/components/ui/core/helper-text/helper-text.d.ts +12 -0
- package/dist/components/ui/core/helper-text/helper-text.js +65 -0
- package/dist/components/ui/core/helper-text/helper-text.metadata.d.ts +2 -0
- package/dist/components/ui/core/helper-text/helper-text.metadata.js +9 -0
- package/dist/components/ui/core/hover-card/hover-card.d.ts +12 -0
- package/dist/components/ui/core/hover-card/hover-card.js +76 -0
- package/dist/components/ui/core/hover-card/hover-card.metadata.d.ts +2 -0
- package/dist/components/ui/core/hover-card/hover-card.metadata.js +8 -0
- package/dist/components/ui/core/inline-citation/inline-citation.d.ts +33 -0
- package/dist/components/ui/core/inline-citation/inline-citation.js +170 -0
- package/dist/components/ui/core/inline-citation/inline-citation.metadata.d.ts +2 -0
- package/dist/components/ui/core/inline-citation/inline-citation.metadata.js +8 -0
- package/dist/components/ui/core/input/input.d.ts +6 -0
- package/dist/components/ui/core/input/input.js +34 -0
- package/dist/components/ui/core/input/input.metadata.d.ts +2 -0
- package/dist/components/ui/core/input/input.metadata.js +9 -0
- package/dist/components/ui/core/input-group/input-group.d.ts +15 -0
- package/dist/components/ui/core/input-group/input-group.js +144 -0
- package/dist/components/ui/core/input-group/input-group.metadata.d.ts +2 -0
- package/dist/components/ui/core/input-group/input-group.metadata.js +9 -0
- package/dist/components/ui/core/label/label.d.ts +2 -0
- package/dist/components/ui/core/label/label.js +20 -0
- package/dist/components/ui/core/label/label.metadata.d.ts +2 -0
- package/dist/components/ui/core/label/label.metadata.js +9 -0
- package/dist/components/ui/core/loader/loader.d.ts +7 -0
- package/dist/components/ui/core/loader/loader.js +119 -0
- package/dist/components/ui/core/loader/loader.metadata.d.ts +2 -0
- package/dist/components/ui/core/loader/loader.metadata.js +9 -0
- package/dist/components/ui/core/message/message.d.ts +55 -0
- package/dist/components/ui/core/message/message.js +169 -0
- package/dist/components/ui/core/message/message.metadata.d.ts +2 -0
- package/dist/components/ui/core/popover/popover.d.ts +8 -0
- package/dist/components/ui/core/popover/popover.metadata.d.ts +2 -0
- package/dist/components/ui/core/prompt-input/prompt-input.d.ts +161 -0
- package/dist/components/ui/core/prompt-input/prompt-input.js +402 -0
- package/dist/components/ui/core/prompt-input/prompt-input.metadata.d.ts +2 -0
- package/dist/components/ui/core/prompt-input/prompt-input.metadata.js +9 -0
- package/dist/components/ui/core/reasoning/reasoning.d.ts +9 -0
- package/dist/components/ui/core/reasoning/reasoning.js +85 -0
- package/dist/components/ui/core/reasoning/reasoning.metadata.d.ts +2 -0
- package/dist/components/ui/core/reasoning/reasoning.metadata.js +8 -0
- package/dist/components/ui/core/select/select.d.ts +44 -0
- package/dist/components/ui/core/select/select.js +279 -0
- package/dist/components/ui/core/select/select.metadata.d.ts +2 -0
- package/dist/components/ui/core/select/select.metadata.js +9 -0
- package/dist/components/ui/core/separator/separator.d.ts +6 -0
- package/dist/components/ui/core/separator/separator.js +25 -0
- package/dist/components/ui/core/separator/separator.metadata.d.ts +2 -0
- package/dist/components/ui/core/separator/separator.metadata.js +8 -0
- package/dist/components/ui/core/shimmer/shimmer.d.ts +14 -0
- package/dist/components/ui/core/shimmer/shimmer.js +69 -0
- package/dist/components/ui/core/shimmer/shimmer.metadata.d.ts +2 -0
- package/dist/components/ui/core/shimmer/shimmer.metadata.js +9 -0
- package/dist/components/ui/core/skeleton/skeleton.d.ts +2 -0
- package/dist/components/ui/core/skeleton/skeleton.js +18 -0
- package/dist/components/ui/core/skeleton/skeleton.metadata.d.ts +2 -0
- package/dist/components/ui/core/skeleton/skeleton.metadata.js +9 -0
- package/dist/components/ui/core/sources/sources.d.ts +16 -0
- package/dist/components/ui/core/sources/sources.metadata.d.ts +2 -0
- package/dist/components/ui/core/textarea/textarea.d.ts +9 -0
- package/dist/components/ui/core/textarea/textarea.js +49 -0
- package/dist/components/ui/core/textarea/textarea.metadata.d.ts +2 -0
- package/dist/components/ui/core/textarea/textarea.metadata.js +9 -0
- package/dist/components/ui/core/tool/tool.d.ts +21 -0
- package/dist/components/ui/core/tool/tool.js +151 -0
- package/dist/components/ui/core/tool/tool.metadata.d.ts +2 -0
- package/dist/components/ui/core/tool/tool.metadata.js +8 -0
- package/dist/components/ui/core/tooltip/tooltip.d.ts +10 -0
- package/dist/components/ui/core/tooltip/tooltip.js +82 -0
- package/dist/components/ui/core/tooltip/tooltip.metadata.d.ts +8 -0
- package/dist/components/ui/core/tooltip/tooltip.metadata.js +9 -0
- package/dist/components/ui/lab/breadcrumb/breadcrumb.d.ts +134 -0
- package/dist/components/ui/lab/breadcrumb/breadcrumb.metadata.d.ts +2 -0
- package/dist/components/ui/lab/topbar/topbar.d.ts +10 -0
- package/dist/components/ui/lab/topbar/topbar.metadata.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +229 -0
- package/dist/lib/ai/types.d.ts +53 -0
- package/dist/lib/component-status-config.d.ts +12 -0
- package/dist/lib/style-scope.d.ts +5 -0
- package/dist/lib/style-scope.js +7 -0
- package/dist/lib/types.d.ts +50 -0
- package/dist/lib/use-controllable-state.d.ts +11 -0
- package/dist/lib/use-controllable-state.js +32 -0
- package/dist/lib/utils.d.ts +45 -0
- package/dist/lib/utils.js +92 -0
- package/package.json +51 -0
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { jsx as t, jsxs as u, Fragment as C } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as N, useMemo as y, useId as z, useContext as I } from "react";
|
|
3
|
+
import { Select as o } from "@base-ui/react/select";
|
|
4
|
+
import { IconCheck as V, IconChevronDown as v, IconChevronUp as _, IconExclamationCircle as O } from "@tabler/icons-react";
|
|
5
|
+
import { useControllableState as P } from "../../../../lib/use-controllable-state.js";
|
|
6
|
+
import { getPortalContainer as j, cn as s, disabledState as k, invalidState as D, focusState as T, filledState as B, hoverState as E, formElementBase as G } from "../../../../lib/utils.js";
|
|
7
|
+
const f = N(null), L = () => {
|
|
8
|
+
const e = I(f);
|
|
9
|
+
if (!e)
|
|
10
|
+
throw new Error("Select components must be used within Select");
|
|
11
|
+
return e;
|
|
12
|
+
};
|
|
13
|
+
function K(e) {
|
|
14
|
+
const [a, l] = P({
|
|
15
|
+
prop: e.open,
|
|
16
|
+
defaultProp: e.defaultOpen ?? !1,
|
|
17
|
+
onChange: e.onOpenChange
|
|
18
|
+
}), n = y(() => ({ isOpen: a ?? !1 }), [a]);
|
|
19
|
+
if (e.multiple) {
|
|
20
|
+
const {
|
|
21
|
+
multiple: m,
|
|
22
|
+
value: g,
|
|
23
|
+
defaultValue: b,
|
|
24
|
+
onValueChange: S,
|
|
25
|
+
...w
|
|
26
|
+
} = e;
|
|
27
|
+
return /* @__PURE__ */ t(f.Provider, { value: n, children: /* @__PURE__ */ t(
|
|
28
|
+
o.Root,
|
|
29
|
+
{
|
|
30
|
+
"data-slot": "select",
|
|
31
|
+
open: a,
|
|
32
|
+
onOpenChange: (p) => l(p),
|
|
33
|
+
value: g,
|
|
34
|
+
defaultValue: b,
|
|
35
|
+
onValueChange: (p, R) => {
|
|
36
|
+
S?.(p ?? []);
|
|
37
|
+
},
|
|
38
|
+
multiple: !0,
|
|
39
|
+
...w
|
|
40
|
+
}
|
|
41
|
+
) });
|
|
42
|
+
}
|
|
43
|
+
const { value: r, defaultValue: i, onValueChange: c, ...d } = e, h = r === void 0 ? void 0 : r === "" ? null : r, x = i === void 0 ? void 0 : i === "" ? null : i;
|
|
44
|
+
return /* @__PURE__ */ t(f.Provider, { value: n, children: /* @__PURE__ */ t(
|
|
45
|
+
o.Root,
|
|
46
|
+
{
|
|
47
|
+
"data-slot": "select",
|
|
48
|
+
open: a,
|
|
49
|
+
onOpenChange: (m) => l(m),
|
|
50
|
+
value: h,
|
|
51
|
+
defaultValue: x,
|
|
52
|
+
onValueChange: (m, g) => {
|
|
53
|
+
c?.(typeof m == "string" ? m : "");
|
|
54
|
+
},
|
|
55
|
+
...d
|
|
56
|
+
}
|
|
57
|
+
) });
|
|
58
|
+
}
|
|
59
|
+
function Q({ className: e, ...a }) {
|
|
60
|
+
return /* @__PURE__ */ t(
|
|
61
|
+
o.Group,
|
|
62
|
+
{
|
|
63
|
+
"data-slot": "select-group",
|
|
64
|
+
className: s("scroll-my-1 p-1", e),
|
|
65
|
+
...a
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
function X({
|
|
70
|
+
icon: e,
|
|
71
|
+
...a
|
|
72
|
+
}) {
|
|
73
|
+
return e ? /* @__PURE__ */ u("span", { className: "flex items-center gap-2", children: [
|
|
74
|
+
e,
|
|
75
|
+
/* @__PURE__ */ t(o.Value, { "data-slot": "select-value", ...a })
|
|
76
|
+
] }) : /* @__PURE__ */ t(o.Value, { "data-slot": "select-value", ...a });
|
|
77
|
+
}
|
|
78
|
+
function Y({
|
|
79
|
+
className: e,
|
|
80
|
+
size: a = "default",
|
|
81
|
+
children: l,
|
|
82
|
+
errorMessage: n,
|
|
83
|
+
...r
|
|
84
|
+
}) {
|
|
85
|
+
const { isOpen: i } = L(), c = !!n, d = z();
|
|
86
|
+
return /* @__PURE__ */ u(C, { children: [
|
|
87
|
+
/* @__PURE__ */ u(
|
|
88
|
+
o.Trigger,
|
|
89
|
+
{
|
|
90
|
+
"data-slot": "select-trigger",
|
|
91
|
+
"data-size": a,
|
|
92
|
+
"aria-invalid": c ? !0 : void 0,
|
|
93
|
+
"aria-describedby": c ? d : void 0,
|
|
94
|
+
className: s(
|
|
95
|
+
"w-fit min-w-50 min-h-9 flex items-center justify-between gap-2 whitespace-nowrap transition-[color,box-shadow] cursor-pointer",
|
|
96
|
+
G,
|
|
97
|
+
E,
|
|
98
|
+
B,
|
|
99
|
+
T,
|
|
100
|
+
D,
|
|
101
|
+
k,
|
|
102
|
+
"dark:bg-input/30 dark:text-muted-foreground dark:hover:bg-accent",
|
|
103
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
104
|
+
"*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2",
|
|
105
|
+
e
|
|
106
|
+
),
|
|
107
|
+
...r,
|
|
108
|
+
children: [
|
|
109
|
+
l,
|
|
110
|
+
/* @__PURE__ */ t(
|
|
111
|
+
o.Icon,
|
|
112
|
+
{
|
|
113
|
+
render: /* @__PURE__ */ t(
|
|
114
|
+
v,
|
|
115
|
+
{
|
|
116
|
+
className: s(
|
|
117
|
+
"size-4 opacity-50 transition-transform",
|
|
118
|
+
i ? "rotate-180" : "rotate-0"
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
)
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
n && /* @__PURE__ */ u(
|
|
128
|
+
"div",
|
|
129
|
+
{
|
|
130
|
+
id: d,
|
|
131
|
+
className: "flex flex-row gap-1 justify-start items-center p-1",
|
|
132
|
+
children: [
|
|
133
|
+
/* @__PURE__ */ t(O, { className: "text-destructive-foreground text-sm size-4" }),
|
|
134
|
+
/* @__PURE__ */ t("span", { className: "text-destructive-foreground text-sm", children: n })
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
)
|
|
138
|
+
] });
|
|
139
|
+
}
|
|
140
|
+
function Z({
|
|
141
|
+
className: e,
|
|
142
|
+
children: a,
|
|
143
|
+
position: l = "popper",
|
|
144
|
+
align: n = "start",
|
|
145
|
+
alignOffset: r = 0,
|
|
146
|
+
side: i = "bottom",
|
|
147
|
+
sideOffset: c = 4,
|
|
148
|
+
...d
|
|
149
|
+
}) {
|
|
150
|
+
return /* @__PURE__ */ t(o.Portal, { container: j(), children: /* @__PURE__ */ t(
|
|
151
|
+
o.Positioner,
|
|
152
|
+
{
|
|
153
|
+
alignItemWithTrigger: !1,
|
|
154
|
+
align: n,
|
|
155
|
+
alignOffset: r,
|
|
156
|
+
side: i,
|
|
157
|
+
sideOffset: c,
|
|
158
|
+
collisionPadding: 10,
|
|
159
|
+
className: "isolate z-50",
|
|
160
|
+
children: /* @__PURE__ */ u(
|
|
161
|
+
o.Popup,
|
|
162
|
+
{
|
|
163
|
+
"data-slot": "select-content",
|
|
164
|
+
className: s(
|
|
165
|
+
"bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md outline-none",
|
|
166
|
+
l === "popper" && "data-[side=bottom]:translate-y-1",
|
|
167
|
+
e
|
|
168
|
+
),
|
|
169
|
+
...d,
|
|
170
|
+
children: [
|
|
171
|
+
/* @__PURE__ */ t(U, {}),
|
|
172
|
+
/* @__PURE__ */ t(o.List, { children: a }),
|
|
173
|
+
/* @__PURE__ */ t(A, {})
|
|
174
|
+
]
|
|
175
|
+
}
|
|
176
|
+
)
|
|
177
|
+
}
|
|
178
|
+
) });
|
|
179
|
+
}
|
|
180
|
+
function M({
|
|
181
|
+
className: e,
|
|
182
|
+
...a
|
|
183
|
+
}) {
|
|
184
|
+
return /* @__PURE__ */ t(
|
|
185
|
+
o.GroupLabel,
|
|
186
|
+
{
|
|
187
|
+
"data-slot": "select-label",
|
|
188
|
+
className: s("text-muted-foreground px-2 py-1.5 text-xs", e),
|
|
189
|
+
...a
|
|
190
|
+
}
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
function ee({
|
|
194
|
+
className: e,
|
|
195
|
+
children: a,
|
|
196
|
+
icon: l,
|
|
197
|
+
...n
|
|
198
|
+
}) {
|
|
199
|
+
return /* @__PURE__ */ u(
|
|
200
|
+
o.Item,
|
|
201
|
+
{
|
|
202
|
+
"data-slot": "select-item",
|
|
203
|
+
className: s(
|
|
204
|
+
"relative flex w-full min-h-9 cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-base leading-5 tracking-tightest outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
205
|
+
e
|
|
206
|
+
),
|
|
207
|
+
...n,
|
|
208
|
+
children: [
|
|
209
|
+
/* @__PURE__ */ t(
|
|
210
|
+
o.ItemIndicator,
|
|
211
|
+
{
|
|
212
|
+
render: /* @__PURE__ */ t("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ t(V, { className: "size-4 text-popover-foreground" }) })
|
|
213
|
+
}
|
|
214
|
+
),
|
|
215
|
+
l && /* @__PURE__ */ t("span", { className: "flex items-center gap-2 mr-1", children: l }),
|
|
216
|
+
/* @__PURE__ */ t(o.ItemText, { children: a })
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
function te({
|
|
222
|
+
className: e,
|
|
223
|
+
...a
|
|
224
|
+
}) {
|
|
225
|
+
return /* @__PURE__ */ t(
|
|
226
|
+
o.Separator,
|
|
227
|
+
{
|
|
228
|
+
"data-slot": "select-separator",
|
|
229
|
+
className: s("bg-border pointer-events-none -mx-1 my-1 h-px", e),
|
|
230
|
+
...a
|
|
231
|
+
}
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
function U({
|
|
235
|
+
className: e,
|
|
236
|
+
...a
|
|
237
|
+
}) {
|
|
238
|
+
return /* @__PURE__ */ t(
|
|
239
|
+
o.ScrollUpArrow,
|
|
240
|
+
{
|
|
241
|
+
"data-slot": "select-scroll-up-button",
|
|
242
|
+
className: s(
|
|
243
|
+
"bg-popover z-10 flex cursor-default items-center justify-center py-1 top-0 w-full",
|
|
244
|
+
e
|
|
245
|
+
),
|
|
246
|
+
...a,
|
|
247
|
+
children: /* @__PURE__ */ t(_, { className: "size-4" })
|
|
248
|
+
}
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
function A({
|
|
252
|
+
className: e,
|
|
253
|
+
...a
|
|
254
|
+
}) {
|
|
255
|
+
return /* @__PURE__ */ t(
|
|
256
|
+
o.ScrollDownArrow,
|
|
257
|
+
{
|
|
258
|
+
"data-slot": "select-scroll-down-button",
|
|
259
|
+
className: s(
|
|
260
|
+
"bg-popover z-10 flex cursor-default items-center justify-center py-1 bottom-0 w-full",
|
|
261
|
+
e
|
|
262
|
+
),
|
|
263
|
+
...a,
|
|
264
|
+
children: /* @__PURE__ */ t(v, { className: "size-4" })
|
|
265
|
+
}
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
export {
|
|
269
|
+
K as Select,
|
|
270
|
+
Z as SelectContent,
|
|
271
|
+
Q as SelectGroup,
|
|
272
|
+
ee as SelectItem,
|
|
273
|
+
M as SelectLabel,
|
|
274
|
+
A as SelectScrollDownButton,
|
|
275
|
+
U as SelectScrollUpButton,
|
|
276
|
+
te as SelectSeparator,
|
|
277
|
+
Y as SelectTrigger,
|
|
278
|
+
X as SelectValue
|
|
279
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
name: "Select",
|
|
3
|
+
status: "in-progress-code-review",
|
|
4
|
+
description: "A select dropdown component built on Base UI Select primitives.",
|
|
5
|
+
llmUsage: "Use `<Select>` with `<SelectTrigger>`, `<SelectContent>`, and `<SelectItem>` for dropdowns."
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
e as SelectMetadata
|
|
9
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Separator as SeparatorPrimitive } from '@base-ui/react/separator';
|
|
2
|
+
declare function Separator({ className, orientation, ...props }: SeparatorPrimitive.Props): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare namespace Separator {
|
|
4
|
+
var displayName: string;
|
|
5
|
+
}
|
|
6
|
+
export { Separator };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { Separator as i } from "@base-ui/react/separator";
|
|
3
|
+
import { cn as e } from "../../../../lib/utils.js";
|
|
4
|
+
function n({
|
|
5
|
+
className: a,
|
|
6
|
+
orientation: r = "horizontal",
|
|
7
|
+
...t
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ o(
|
|
10
|
+
i,
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "separator",
|
|
13
|
+
orientation: r,
|
|
14
|
+
className: e(
|
|
15
|
+
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
16
|
+
a
|
|
17
|
+
),
|
|
18
|
+
...t
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
n.displayName = "Separator";
|
|
23
|
+
export {
|
|
24
|
+
n as Separator
|
|
25
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type TextShimmerProps = {
|
|
2
|
+
children: string;
|
|
3
|
+
as?: 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3';
|
|
4
|
+
className?: string;
|
|
5
|
+
duration?: number;
|
|
6
|
+
spread?: number;
|
|
7
|
+
variant?: 'default' | 'nordic' | 'aurora' | 'dusk' | 'equinox' | 'summer' | 'spring' | 'fall';
|
|
8
|
+
};
|
|
9
|
+
declare function ShimmerComponent({ children, as: Component, className, duration, spread, variant, }: TextShimmerProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare namespace ShimmerComponent {
|
|
11
|
+
var displayName: string;
|
|
12
|
+
}
|
|
13
|
+
declare const MemoizedShimmer: import('react').MemoExoticComponent<typeof ShimmerComponent>;
|
|
14
|
+
export { MemoizedShimmer as Shimmer };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as f, useMemo as s } from "react";
|
|
3
|
+
import { motion as a } from "framer-motion";
|
|
4
|
+
import { cn as v } from "../../../../lib/utils.js";
|
|
5
|
+
const S = {
|
|
6
|
+
nordic: "var(--gradient-nordic)",
|
|
7
|
+
aurora: "var(--gradient-aurora)",
|
|
8
|
+
dusk: "var(--gradient-dusk)",
|
|
9
|
+
equinox: "var(--gradient-equinox)",
|
|
10
|
+
summer: "var(--gradient-summer)",
|
|
11
|
+
spring: "var(--gradient-spring)",
|
|
12
|
+
fall: "var(--gradient-fall)"
|
|
13
|
+
};
|
|
14
|
+
function m({
|
|
15
|
+
children: n,
|
|
16
|
+
as: d = "p",
|
|
17
|
+
className: c,
|
|
18
|
+
duration: u = 2,
|
|
19
|
+
spread: i = 2,
|
|
20
|
+
variant: t = "default"
|
|
21
|
+
}) {
|
|
22
|
+
const p = s(
|
|
23
|
+
() => (n?.length ?? 0) * i,
|
|
24
|
+
[n, i]
|
|
25
|
+
), g = s(() => {
|
|
26
|
+
const o = "linear-gradient(90deg, transparent calc(50% - var(--spread)), rgba(255, 255, 255, 0.4), transparent calc(50% + var(--spread)))";
|
|
27
|
+
return t === "default" ? `${o}, linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))` : `${o}, ${S[t]}`;
|
|
28
|
+
}, [t]), l = {
|
|
29
|
+
"--spread": `${p}px`,
|
|
30
|
+
backgroundImage: g,
|
|
31
|
+
backgroundSize: "250% 100%, 100% 100%"
|
|
32
|
+
}, h = {
|
|
33
|
+
repeat: Number.POSITIVE_INFINITY,
|
|
34
|
+
duration: u,
|
|
35
|
+
ease: "linear"
|
|
36
|
+
}, r = {
|
|
37
|
+
"data-slot": "shimmer",
|
|
38
|
+
animate: {
|
|
39
|
+
backgroundPosition: ["100% center, center", "0% center, center"]
|
|
40
|
+
},
|
|
41
|
+
className: v(
|
|
42
|
+
"relative inline-block bg-clip-text text-transparent rounded-md",
|
|
43
|
+
c
|
|
44
|
+
),
|
|
45
|
+
style: l,
|
|
46
|
+
transition: h,
|
|
47
|
+
children: n
|
|
48
|
+
};
|
|
49
|
+
switch (d) {
|
|
50
|
+
case "span":
|
|
51
|
+
return /* @__PURE__ */ e(a.span, { ...r });
|
|
52
|
+
case "div":
|
|
53
|
+
return /* @__PURE__ */ e(a.div, { ...r });
|
|
54
|
+
case "h1":
|
|
55
|
+
return /* @__PURE__ */ e(a.h1, { ...r });
|
|
56
|
+
case "h2":
|
|
57
|
+
return /* @__PURE__ */ e(a.h2, { ...r });
|
|
58
|
+
case "h3":
|
|
59
|
+
return /* @__PURE__ */ e(a.h3, { ...r });
|
|
60
|
+
default:
|
|
61
|
+
return /* @__PURE__ */ e(a.p, { ...r });
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
m.displayName = "Shimmer";
|
|
65
|
+
const b = f(m);
|
|
66
|
+
b.displayName = "Shimmer";
|
|
67
|
+
export {
|
|
68
|
+
b as Shimmer
|
|
69
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
name: "Shimmer",
|
|
3
|
+
status: "in-progress-code-review",
|
|
4
|
+
description: "An animated text shimmer component for creating eye-catching loading states and progressive reveal effects.",
|
|
5
|
+
llmUsage: 'Use `<Shimmer>` with text content for loading states. Use variants like "nordic", "aurora", "dusk" for branded effects.'
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
e as ShimmerMetadata
|
|
9
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as m } from "react";
|
|
3
|
+
import { cn as r } from "../../../../lib/utils.js";
|
|
4
|
+
const n = m(
|
|
5
|
+
({ className: e, ...o }, t) => /* @__PURE__ */ a(
|
|
6
|
+
"div",
|
|
7
|
+
{
|
|
8
|
+
ref: t,
|
|
9
|
+
"data-slot": "skeleton",
|
|
10
|
+
className: r("bg-accent animate-pulse rounded-md", e),
|
|
11
|
+
...o
|
|
12
|
+
}
|
|
13
|
+
)
|
|
14
|
+
);
|
|
15
|
+
n.displayName = "Skeleton";
|
|
16
|
+
export {
|
|
17
|
+
n as Skeleton
|
|
18
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
name: "Skeleton",
|
|
3
|
+
status: "in-progress-code-review",
|
|
4
|
+
description: "A placeholder loading component.",
|
|
5
|
+
llmUsage: "Use `<Skeleton>` with width/height classes for loading states. Combine multiple skeletons to mimic content structure."
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
e as SkeletonMetadata
|
|
9
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { InlineCitationLink } from '../inline-citation/inline-citation';
|
|
3
|
+
type SourcesProps = Omit<ComponentProps<'div'>, 'title'> & {
|
|
4
|
+
title?: ReactNode | boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const Sources: ({ className, title, children, ...props }: SourcesProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
type SourcesTitleProps = ComponentProps<'div'> & {
|
|
8
|
+
title?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const SourcesTitle: ({ className, title, children, ...props }: SourcesTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
type SourceProps = ComponentProps<typeof InlineCitationLink> & {
|
|
12
|
+
title?: string;
|
|
13
|
+
url?: string;
|
|
14
|
+
};
|
|
15
|
+
declare const Source: ({ href, url, title, variant, target, icon, className, children, ...props }: SourceProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
16
|
+
export { Source, Sources, SourcesTitle };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
interface TextareaProps extends ComponentProps<'textarea'> {
|
|
3
|
+
maxChars?: number;
|
|
4
|
+
errorMessage?: string;
|
|
5
|
+
overLimitMessage?: string;
|
|
6
|
+
charactersLeftMessage?: (remaining: number) => string;
|
|
7
|
+
}
|
|
8
|
+
declare const Textarea: import('react').ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & import('react').RefAttributes<HTMLTextAreaElement>>;
|
|
9
|
+
export { Textarea };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsxs as x, Fragment as C, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as S, useState as b } from "react";
|
|
3
|
+
import { cn as T, disabledState as w, invalidState as E, focusState as j, filledState as k, hoverState as y, formElementBase as L } from "../../../../lib/utils.js";
|
|
4
|
+
import { HelperText as c } from "../helper-text/helper-text.js";
|
|
5
|
+
const N = (a) => `${a} characters left`, V = S(
|
|
6
|
+
({
|
|
7
|
+
className: a,
|
|
8
|
+
maxChars: e,
|
|
9
|
+
errorMessage: o,
|
|
10
|
+
overLimitMessage: s = "Too many characters",
|
|
11
|
+
charactersLeftMessage: u = N,
|
|
12
|
+
...t
|
|
13
|
+
}, f) => {
|
|
14
|
+
const i = t.value !== void 0, [h, g] = b(() => {
|
|
15
|
+
const n = t.defaultValue ?? "";
|
|
16
|
+
return String(n).length;
|
|
17
|
+
}), d = i ? String(t.value ?? "").length : h, r = e !== void 0 && d > e, m = !!o || r, v = (n) => {
|
|
18
|
+
i || g(n.target.value.length), t.onChange && t.onChange(n);
|
|
19
|
+
};
|
|
20
|
+
return /* @__PURE__ */ x(C, { children: [
|
|
21
|
+
/* @__PURE__ */ l(
|
|
22
|
+
"textarea",
|
|
23
|
+
{
|
|
24
|
+
ref: f,
|
|
25
|
+
"data-slot": "textarea",
|
|
26
|
+
"aria-invalid": m ? !0 : void 0,
|
|
27
|
+
className: T(
|
|
28
|
+
"flex field-sizing-content min-h-16 w-full placeholder:text-muted-foreground transition-[color,background-color,border-color,box-shadow]",
|
|
29
|
+
L,
|
|
30
|
+
y,
|
|
31
|
+
k,
|
|
32
|
+
j,
|
|
33
|
+
E,
|
|
34
|
+
w,
|
|
35
|
+
"dark:bg-input/30",
|
|
36
|
+
a
|
|
37
|
+
),
|
|
38
|
+
onChange: v,
|
|
39
|
+
...t
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
o ? /* @__PURE__ */ l(c, { isError: !0, children: o }) : e !== void 0 && /* @__PURE__ */ l(c, { isError: r, children: r ? s : u(e - d) })
|
|
43
|
+
] });
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
V.displayName = "Textarea";
|
|
47
|
+
export {
|
|
48
|
+
V as Textarea
|
|
49
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { ToolUIPart } from '../../../../lib/ai/types';
|
|
3
|
+
import { CollapsibleTrigger } from '../collapsible/collapsible';
|
|
4
|
+
declare const Tool: import('react').ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').CollapsibleRootProps, "ref"> & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
5
|
+
type ToolHeaderProps = Omit<ComponentProps<typeof CollapsibleTrigger>, 'type'> & {
|
|
6
|
+
title?: string;
|
|
7
|
+
type: ToolUIPart['type'];
|
|
8
|
+
hasError?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const ToolHeader: import('react').ForwardRefExoticComponent<Omit<ToolHeaderProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
declare const ToolContent: import('react').ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').CollapsiblePanelProps, "ref"> & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
12
|
+
type ToolInputProps = ComponentProps<'div'> & {
|
|
13
|
+
input: ToolUIPart['input'];
|
|
14
|
+
};
|
|
15
|
+
declare const ToolInput: import('react').ForwardRefExoticComponent<Omit<ToolInputProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
16
|
+
type ToolOutputProps = ComponentProps<'div'> & {
|
|
17
|
+
output: ToolUIPart['output'];
|
|
18
|
+
errorText: ToolUIPart['errorText'];
|
|
19
|
+
};
|
|
20
|
+
declare const ToolOutput: import('react').ForwardRefExoticComponent<Omit<ToolOutputProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
21
|
+
export { Tool, ToolHeader, ToolContent, ToolInput, ToolOutput };
|