@cognite/aura 0.2.0 → 0.3.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/README.md +36 -3
- package/dist/colors.css +30 -0
- package/dist/components/index.d.ts +6 -36
- package/dist/components/index.js +311 -347
- package/dist/components/ui/core/accordion/accordion.d.ts +7 -7
- package/dist/components/ui/core/accordion/accordion.js +49 -47
- package/dist/components/ui/core/action-toolbar/action-toolbar.d.ts +41 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar.js +176 -0
- package/dist/components/ui/core/alert/alert.d.ts +23 -12
- package/dist/components/ui/core/alert/alert.js +123 -120
- package/dist/components/ui/core/avatar/avatar.d.ts +12 -8
- package/dist/components/ui/core/badge/badge.d.ts +11 -8
- package/dist/components/ui/core/banner/banner.d.ts +18 -28
- package/dist/components/ui/core/banner/banner.js +6 -6
- package/dist/components/ui/core/breadcrumb/breadcrumb.d.ts +10 -9
- package/dist/components/ui/core/breadcrumb/breadcrumb.js +98 -88
- package/dist/components/ui/core/button/button.d.ts +8 -5
- package/dist/components/ui/core/button/button.js +22 -19
- package/dist/components/ui/core/button-group/button-group.d.ts +7 -6
- package/dist/components/ui/core/card/card.d.ts +17 -16
- package/dist/components/ui/core/chart/chart.d.ts +69 -0
- package/dist/components/ui/core/chart/chart.js +215 -0
- package/dist/components/ui/core/chart/index.d.ts +2 -0
- package/dist/components/ui/core/chart/index.js +8 -0
- package/dist/components/ui/core/checkbox/checkbox.d.ts +13 -9
- package/dist/components/ui/core/checkbox/checkbox.js +38 -34
- package/dist/components/ui/core/code-block/code-block.d.ts +6 -9
- package/dist/components/ui/core/code-block/code-block.js +52 -48
- package/dist/components/ui/core/collapsible/collapsible.d.ts +5 -3
- package/dist/components/ui/core/combobox/combobox.d.ts +2 -2
- package/dist/components/ui/core/command/command.d.ts +11 -78
- package/dist/components/ui/core/command/command.js +53 -52
- package/dist/components/ui/core/count/count.d.ts +7 -6
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.d.ts +15 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js +99 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/index.d.ts +3 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/types.d.ts +25 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.d.ts +4 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js +82 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.d.ts +17 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js +190 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.d.ts +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.d.ts +42 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.d.ts +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js +161 -0
- package/dist/components/ui/core/date-time-pickers/index.d.ts +6 -0
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.d.ts +7 -0
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js +57 -0
- package/dist/components/ui/core/date-time-pickers/shared/calendar/calendar.d.ts +13 -0
- package/dist/components/ui/core/date-time-pickers/shared/calendar/calendar.js +119 -0
- package/dist/components/ui/core/date-time-pickers/shared/calendar-header/calendar-header.d.ts +10 -0
- package/dist/components/ui/core/date-time-pickers/shared/calendar-header/calendar-header.js +93 -0
- package/dist/components/ui/core/date-time-pickers/shared/constants.d.ts +20 -0
- package/dist/components/ui/core/date-time-pickers/shared/constants.js +14 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.d.ts +19 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js +99 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.d.ts +12 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js +68 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.d.ts +12 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js +40 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.d.ts +29 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js +63 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.d.ts +8 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js +19 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.d.ts +17 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js +34 -0
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.d.ts +8 -0
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js +7 -0
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.d.ts +13 -0
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js +31 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.d.ts +10 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js +52 -0
- package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.d.ts +48 -0
- package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.js +52 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.d.ts +26 -0
- package/dist/components/ui/core/date-time-pickers/utils/format-utils.d.ts +37 -0
- package/dist/components/ui/core/date-time-pickers/utils/segment-utils.d.ts +34 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.d.ts +43 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +15 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-validation.d.ts +23 -0
- package/dist/components/ui/core/dialog/dialog.d.ts +10 -10
- package/dist/components/ui/core/dialog/dialog.js +12 -3
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +24 -47
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +125 -123
- package/dist/components/ui/core/empty-state/empty-state.context.d.ts +10 -0
- package/dist/components/ui/core/empty-state/empty-state.context.js +8 -0
- package/dist/components/ui/core/empty-state/empty-state.d.ts +18 -0
- package/dist/components/ui/core/empty-state/empty-state.js +139 -0
- package/dist/components/ui/core/helper-text/helper-text.d.ts +7 -5
- package/dist/components/ui/core/hover-card/hover-card.d.ts +5 -7
- package/dist/components/ui/core/hover-card/hover-card.js +26 -25
- package/dist/components/ui/core/inline-citation/inline-citation.d.ts +10 -10
- package/dist/components/ui/core/inline-citation/inline-citation.js +57 -49
- package/dist/components/ui/core/input/input.d.ts +2 -1
- package/dist/components/ui/core/input-group/input-group.d.ts +17 -13
- package/dist/components/ui/core/input-group/input-group.js +35 -36
- package/dist/components/ui/core/kbd/kbd.d.ts +3 -2
- package/dist/components/ui/core/label/label.d.ts +3 -2
- package/dist/components/ui/core/loader/loader.d.ts +2 -2
- package/dist/components/ui/core/message/message.d.ts +18 -17
- package/dist/components/ui/core/message/message.js +15 -13
- package/dist/components/ui/core/pagination/pagination-size-context.d.ts +5 -0
- package/dist/components/ui/core/pagination/pagination-size-context.js +6 -0
- package/dist/components/ui/core/pagination/pagination-teleport.d.ts +11 -0
- package/dist/components/ui/core/pagination/pagination-teleport.js +108 -0
- package/dist/components/ui/core/pagination/pagination-teleport.utils.d.ts +1 -0
- package/dist/components/ui/core/pagination/pagination-teleport.utils.js +7 -0
- package/dist/components/ui/core/pagination/pagination.d.ts +41 -0
- package/dist/components/ui/core/pagination/pagination.js +335 -0
- package/dist/components/ui/core/popover/popover.d.ts +12 -16
- package/dist/components/ui/core/popover/popover.js +52 -51
- package/dist/components/ui/core/progress/progress.d.ts +7 -4
- package/dist/components/ui/core/prompt-input/prompt-input.d.ts +36 -103
- package/dist/components/ui/core/prompt-input/prompt-input.js +193 -180
- package/dist/components/ui/core/radio-group/radio-group.d.ts +12 -8
- package/dist/components/ui/core/radio-group/radio-group.js +58 -55
- package/dist/components/ui/core/reasoning/reasoning.d.ts +5 -5
- package/dist/components/ui/core/reasoning/reasoning.js +1 -1
- package/dist/components/ui/core/scroll-area/scroll-area.d.ts +4 -2
- package/dist/components/ui/core/search/search.d.ts +10 -0
- package/dist/components/ui/core/search/search.js +99 -0
- package/dist/components/ui/core/segmented-control/segmented-control.d.ts +15 -11
- package/dist/components/ui/core/segmented-control/segmented-control.js +7 -4
- package/dist/components/ui/core/select/select.d.ts +13 -13
- package/dist/components/ui/core/select/select.js +13 -10
- package/dist/components/ui/core/separator/separator.d.ts +2 -4
- package/dist/components/ui/core/separator/separator.js +4 -5
- package/dist/components/ui/core/shimmer/shimmer.d.ts +3 -5
- package/dist/components/ui/core/shimmer/shimmer.js +25 -26
- package/dist/components/ui/core/skeleton/skeleton.d.ts +2 -1
- package/dist/components/ui/core/sonner-toast/sonner-toast.d.ts +2 -1
- package/dist/components/ui/core/sources/sources.d.ts +3 -3
- package/dist/components/ui/core/sources/sources.js +6 -1
- package/dist/components/ui/core/switch/switch.d.ts +11 -0
- package/dist/components/ui/core/{button/button.metadata.d.ts → switch/switch.metadata.d.ts} +1 -1
- package/dist/components/ui/core/tabs/tabs.d.ts +21 -17
- package/dist/components/ui/core/tabs/tabs.js +14 -12
- package/dist/components/ui/core/textarea/textarea.d.ts +2 -1
- package/dist/components/ui/core/textarea/textarea.js +20 -18
- package/dist/components/ui/core/tool/tool.d.ts +7 -6
- package/dist/components/ui/core/tool/tool.js +48 -44
- package/dist/components/ui/core/tooltip/tooltip.d.ts +6 -5
- package/dist/components/ui/core/tooltip/tooltip.js +10 -8
- package/dist/components/ui/core/topbar/topbar.d.ts +11 -13
- package/dist/eslint/index.d.ts +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +302 -336
- package/dist/lib/portal-container-context.d.ts +2 -1
- package/dist/lib/portal-container-context.js +1 -3
- package/dist/styles.css +1 -1
- package/dist/styles.source.css +9 -1
- package/package.json +22 -1
- package/dist/components/ui/core/accordion/accordion.metadata.d.ts +0 -2
- package/dist/components/ui/core/accordion/accordion.metadata.js +0 -9
- package/dist/components/ui/core/alert/alert.metadata.d.ts +0 -2
- package/dist/components/ui/core/alert/alert.metadata.js +0 -9
- package/dist/components/ui/core/avatar/avatar.metadata.d.ts +0 -8
- package/dist/components/ui/core/avatar/avatar.metadata.js +0 -9
- package/dist/components/ui/core/badge/badge.metadata.d.ts +0 -2
- package/dist/components/ui/core/badge/badge.metadata.js +0 -8
- package/dist/components/ui/core/banner/banner.metadata.d.ts +0 -2
- package/dist/components/ui/core/banner/banner.metadata.js +0 -9
- package/dist/components/ui/core/breadcrumb/breadcrumb.metadata.d.ts +0 -2
- package/dist/components/ui/core/breadcrumb/breadcrumb.metadata.js +0 -9
- package/dist/components/ui/core/button/button.metadata.js +0 -9
- package/dist/components/ui/core/button-group/button-group.metadata.d.ts +0 -2
- package/dist/components/ui/core/button-group/button-group.metadata.js +0 -8
- package/dist/components/ui/core/card/card.metadata.d.ts +0 -8
- package/dist/components/ui/core/card/card.metadata.js +0 -9
- package/dist/components/ui/core/code-block/code-block.metadata.d.ts +0 -2
- package/dist/components/ui/core/code-block/code-block.metadata.js +0 -8
- package/dist/components/ui/core/collapsible/collapsible.metadata.d.ts +0 -2
- package/dist/components/ui/core/collapsible/collapsible.metadata.js +0 -9
- package/dist/components/ui/core/combobox/combobox.metadata.d.ts +0 -2
- package/dist/components/ui/core/command/command.metadata.d.ts +0 -2
- package/dist/components/ui/core/command/command.metadata.js +0 -9
- package/dist/components/ui/core/dialog/dialog.metadata.d.ts +0 -2
- package/dist/components/ui/core/dialog/dialog.metadata.js +0 -9
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.metadata.d.ts +0 -2
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.metadata.js +0 -9
- package/dist/components/ui/core/helper-text/helper-text.metadata.d.ts +0 -2
- package/dist/components/ui/core/helper-text/helper-text.metadata.js +0 -9
- package/dist/components/ui/core/hover-card/hover-card.metadata.d.ts +0 -2
- package/dist/components/ui/core/hover-card/hover-card.metadata.js +0 -8
- package/dist/components/ui/core/inline-citation/inline-citation.metadata.d.ts +0 -2
- package/dist/components/ui/core/inline-citation/inline-citation.metadata.js +0 -8
- package/dist/components/ui/core/input/input.metadata.d.ts +0 -2
- package/dist/components/ui/core/input/input.metadata.js +0 -9
- package/dist/components/ui/core/input-group/input-group.metadata.d.ts +0 -2
- package/dist/components/ui/core/input-group/input-group.metadata.js +0 -9
- package/dist/components/ui/core/kbd/kbd.metadata.d.ts +0 -2
- package/dist/components/ui/core/kbd/kbd.metadata.js +0 -9
- package/dist/components/ui/core/label/label.metadata.d.ts +0 -2
- package/dist/components/ui/core/label/label.metadata.js +0 -9
- package/dist/components/ui/core/loader/loader.metadata.d.ts +0 -2
- package/dist/components/ui/core/loader/loader.metadata.js +0 -9
- package/dist/components/ui/core/message/message.metadata.d.ts +0 -2
- package/dist/components/ui/core/popover/popover.metadata.d.ts +0 -2
- package/dist/components/ui/core/popover/popover.metadata.js +0 -9
- package/dist/components/ui/core/progress/progress.metadata.d.ts +0 -2
- package/dist/components/ui/core/progress/progress.metadata.js +0 -9
- package/dist/components/ui/core/prompt-input/prompt-input.metadata.d.ts +0 -2
- package/dist/components/ui/core/prompt-input/prompt-input.metadata.js +0 -9
- package/dist/components/ui/core/radio-group/radio-group.metadata.d.ts +0 -2
- package/dist/components/ui/core/radio-group/radio-group.metadata.js +0 -9
- package/dist/components/ui/core/reasoning/reasoning.metadata.d.ts +0 -2
- package/dist/components/ui/core/reasoning/reasoning.metadata.js +0 -8
- package/dist/components/ui/core/scroll-area/scroll-area.metadata.d.ts +0 -2
- package/dist/components/ui/core/scroll-area/scroll-area.metadata.js +0 -9
- package/dist/components/ui/core/select/select.metadata.d.ts +0 -2
- package/dist/components/ui/core/select/select.metadata.js +0 -9
- package/dist/components/ui/core/separator/separator.metadata.d.ts +0 -2
- package/dist/components/ui/core/separator/separator.metadata.js +0 -8
- package/dist/components/ui/core/shimmer/shimmer.metadata.d.ts +0 -2
- package/dist/components/ui/core/shimmer/shimmer.metadata.js +0 -9
- package/dist/components/ui/core/skeleton/skeleton.metadata.d.ts +0 -2
- package/dist/components/ui/core/skeleton/skeleton.metadata.js +0 -9
- package/dist/components/ui/core/sonner-toast/sonner-toast.metadata.d.ts +0 -2
- package/dist/components/ui/core/sonner-toast/sonner-toast.metadata.js +0 -9
- package/dist/components/ui/core/sources/sources.metadata.d.ts +0 -2
- package/dist/components/ui/core/textarea/textarea.metadata.d.ts +0 -2
- package/dist/components/ui/core/textarea/textarea.metadata.js +0 -9
- package/dist/components/ui/core/tool/tool.metadata.d.ts +0 -2
- package/dist/components/ui/core/tool/tool.metadata.js +0 -8
- package/dist/components/ui/core/tooltip/tooltip.metadata.d.ts +0 -8
- package/dist/components/ui/core/tooltip/tooltip.metadata.js +0 -9
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { jsxs as w, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useState as y, forwardRef as s, useCallback as H, useMemo as k, useContext as C, createContext as A } from "react";
|
|
3
|
+
import { IconPlus as E, IconInfoCircle as D, IconSend as z, IconLoader2 as B, IconSquare as L, IconX 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
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
|
-
import {
|
|
9
|
+
import { InputGroup as _, InputGroupButton as x, InputGroupAddon as h, InputGroupTextarea 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 N =
|
|
11
|
+
const N = A(
|
|
12
12
|
null
|
|
13
|
-
),
|
|
13
|
+
), Xt = () => {
|
|
14
14
|
const t = C(N);
|
|
15
15
|
if (!t)
|
|
16
16
|
throw new Error(
|
|
@@ -18,11 +18,11 @@ const N = H(
|
|
|
18
18
|
);
|
|
19
19
|
return t;
|
|
20
20
|
}, v = () => C(N);
|
|
21
|
-
function
|
|
21
|
+
function Jt({
|
|
22
22
|
initialInput: t = "",
|
|
23
23
|
children: e
|
|
24
24
|
}) {
|
|
25
|
-
const [n, a] = y(t), l =
|
|
25
|
+
const [n, a] = y(t), l = H(() => a(""), []), p = k(
|
|
26
26
|
() => ({
|
|
27
27
|
textInput: {
|
|
28
28
|
value: n,
|
|
@@ -34,8 +34,7 @@ function at({
|
|
|
34
34
|
);
|
|
35
35
|
return /* @__PURE__ */ o(N.Provider, { value: p, children: e });
|
|
36
36
|
}
|
|
37
|
-
at
|
|
38
|
-
const st = ({
|
|
37
|
+
const at = ({
|
|
39
38
|
className: t,
|
|
40
39
|
onSubmit: e,
|
|
41
40
|
helperText: n,
|
|
@@ -64,7 +63,7 @@ const st = ({
|
|
|
64
63
|
d instanceof Error ? d.message : "Failed to submit. Please try again."
|
|
65
64
|
);
|
|
66
65
|
}
|
|
67
|
-
}, S = n === !1 ? null : n ?? /* @__PURE__ */ o(f, { size: "xs", icon: /* @__PURE__ */ o(
|
|
66
|
+
}, S = n === !1 ? null : n ?? /* @__PURE__ */ o(f, { size: "xs", icon: /* @__PURE__ */ o(D, {}), children: "AI doesn't always get it right. Be sure to check results" });
|
|
68
67
|
return /* @__PURE__ */ w("div", { className: "w-full flex flex-col gap-2", children: [
|
|
69
68
|
/* @__PURE__ */ o(
|
|
70
69
|
"form",
|
|
@@ -73,14 +72,14 @@ const st = ({
|
|
|
73
72
|
className: r("w-full", t),
|
|
74
73
|
onSubmit: P,
|
|
75
74
|
...p,
|
|
76
|
-
children: /* @__PURE__ */ o(
|
|
75
|
+
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
76
|
}
|
|
78
77
|
),
|
|
79
78
|
a || u ? /* @__PURE__ */ o(f, { size: "xs", isError: !0, children: a || u }) : S
|
|
80
79
|
] });
|
|
81
80
|
};
|
|
82
|
-
|
|
83
|
-
const
|
|
81
|
+
at.displayName = "PromptInput";
|
|
82
|
+
const st = s(
|
|
84
83
|
({ className: t, ...e }, n) => /* @__PURE__ */ o(
|
|
85
84
|
"div",
|
|
86
85
|
{
|
|
@@ -91,8 +90,8 @@ const pt = s(
|
|
|
91
90
|
}
|
|
92
91
|
)
|
|
93
92
|
);
|
|
94
|
-
|
|
95
|
-
const
|
|
93
|
+
st.displayName = "PromptInputBody";
|
|
94
|
+
const pt = s(
|
|
96
95
|
({ onChange: t, className: e, placeholder: n = "Type your message...", ...a }, l) => {
|
|
97
96
|
const p = v(), [m, u] = y(!1), c = (i) => {
|
|
98
97
|
if (i.key === "Enter") {
|
|
@@ -109,7 +108,7 @@ const mt = s(
|
|
|
109
108
|
onChange: t
|
|
110
109
|
};
|
|
111
110
|
return /* @__PURE__ */ o(
|
|
112
|
-
|
|
111
|
+
$,
|
|
113
112
|
{
|
|
114
113
|
ref: l,
|
|
115
114
|
className: r(
|
|
@@ -127,78 +126,84 @@ const mt = s(
|
|
|
127
126
|
);
|
|
128
127
|
}
|
|
129
128
|
);
|
|
130
|
-
|
|
131
|
-
const
|
|
132
|
-
x,
|
|
133
|
-
{
|
|
134
|
-
ref: n,
|
|
135
|
-
align: "block-end",
|
|
136
|
-
className: r("order-first flex-wrap gap-1", t),
|
|
137
|
-
...e
|
|
138
|
-
}
|
|
139
|
-
));
|
|
140
|
-
lt.displayName = "PromptInputHeader";
|
|
141
|
-
const ut = s(({ className: t, ...e }, n) => /* @__PURE__ */ o(
|
|
142
|
-
x,
|
|
143
|
-
{
|
|
144
|
-
ref: n,
|
|
145
|
-
align: "block-end",
|
|
146
|
-
className: r("justify-between gap-1 p-2.75", t),
|
|
147
|
-
...e
|
|
148
|
-
}
|
|
149
|
-
));
|
|
150
|
-
ut.displayName = "PromptInputFooter";
|
|
151
|
-
const it = s(
|
|
129
|
+
pt.displayName = "PromptInputTextarea";
|
|
130
|
+
const mt = s(
|
|
152
131
|
({ className: t, ...e }, n) => /* @__PURE__ */ o(
|
|
153
|
-
|
|
132
|
+
h,
|
|
154
133
|
{
|
|
155
134
|
ref: n,
|
|
156
|
-
|
|
157
|
-
className: r("flex
|
|
135
|
+
align: "block-end",
|
|
136
|
+
className: r("order-first flex-wrap gap-1", t),
|
|
158
137
|
...e
|
|
159
138
|
}
|
|
160
139
|
)
|
|
161
140
|
);
|
|
162
|
-
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
return /* @__PURE__ */ o(
|
|
141
|
+
mt.displayName = "PromptInputHeader";
|
|
142
|
+
const lt = s(
|
|
143
|
+
({ className: t, ...e }, n) => /* @__PURE__ */ o(
|
|
166
144
|
h,
|
|
167
145
|
{
|
|
168
|
-
ref:
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
variant: t,
|
|
173
|
-
...a
|
|
146
|
+
ref: n,
|
|
147
|
+
align: "block-end",
|
|
148
|
+
className: r("justify-between gap-1 p-2.75", t),
|
|
149
|
+
...e
|
|
174
150
|
}
|
|
175
|
-
)
|
|
176
|
-
|
|
151
|
+
)
|
|
152
|
+
);
|
|
153
|
+
lt.displayName = "PromptInputFooter";
|
|
154
|
+
const ut = s(
|
|
155
|
+
({ className: t, ...e }, n) => /* @__PURE__ */ o(
|
|
156
|
+
"div",
|
|
157
|
+
{
|
|
158
|
+
ref: n,
|
|
159
|
+
"data-slot": "prompt-input-tools",
|
|
160
|
+
className: r("flex items-center gap-2", t),
|
|
161
|
+
...e
|
|
162
|
+
}
|
|
163
|
+
)
|
|
164
|
+
);
|
|
165
|
+
ut.displayName = "PromptInputTools";
|
|
166
|
+
const T = s(
|
|
167
|
+
({ variant: t = "ghost", className: e, size: n, ...a }, l) => {
|
|
168
|
+
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");
|
|
169
|
+
return /* @__PURE__ */ o(
|
|
170
|
+
x,
|
|
171
|
+
{
|
|
172
|
+
ref: l,
|
|
173
|
+
className: r(e),
|
|
174
|
+
size: m,
|
|
175
|
+
type: "button",
|
|
176
|
+
variant: t,
|
|
177
|
+
...a
|
|
178
|
+
}
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
);
|
|
177
182
|
T.displayName = "PromptInputButton";
|
|
178
|
-
const
|
|
179
|
-
|
|
180
|
-
const
|
|
183
|
+
const it = (t) => /* @__PURE__ */ o(W, { ...t });
|
|
184
|
+
it.displayName = "PromptInputActionMenu";
|
|
185
|
+
const dt = ({
|
|
181
186
|
className: t,
|
|
182
187
|
children: e,
|
|
183
188
|
...n
|
|
184
189
|
}) => /* @__PURE__ */ o(
|
|
185
190
|
Q,
|
|
186
191
|
{
|
|
187
|
-
render: /* @__PURE__ */ o(T, { className: t, ...n, children: e ?? /* @__PURE__ */ o(
|
|
192
|
+
render: /* @__PURE__ */ o(T, { className: t, ...n, children: e ?? /* @__PURE__ */ o(E, { className: "size-4" }) })
|
|
188
193
|
}
|
|
189
194
|
);
|
|
190
|
-
|
|
191
|
-
const
|
|
195
|
+
dt.displayName = "PromptInputActionMenuTrigger";
|
|
196
|
+
const ct = ({
|
|
192
197
|
className: t,
|
|
193
198
|
...e
|
|
194
199
|
}) => /* @__PURE__ */ o(X, { align: "start", className: r(t), ...e });
|
|
195
|
-
|
|
196
|
-
const
|
|
200
|
+
ct.displayName = "PromptInputActionMenuContent";
|
|
201
|
+
const It = ({
|
|
197
202
|
className: t,
|
|
198
203
|
...e
|
|
199
204
|
}) => /* @__PURE__ */ o(J, { className: r(t), ...e });
|
|
200
|
-
|
|
201
|
-
const
|
|
205
|
+
It.displayName = "PromptInputActionMenuItem";
|
|
206
|
+
const Pt = s(
|
|
202
207
|
({
|
|
203
208
|
className: t,
|
|
204
209
|
variant: e = "default",
|
|
@@ -207,9 +212,9 @@ const gt = s(
|
|
|
207
212
|
children: l,
|
|
208
213
|
...p
|
|
209
214
|
}, m) => {
|
|
210
|
-
let u = /* @__PURE__ */ o(
|
|
211
|
-
return a === "submitted" ? u = /* @__PURE__ */ o(
|
|
212
|
-
|
|
215
|
+
let u = /* @__PURE__ */ o(z, { className: "size-4" });
|
|
216
|
+
return a === "submitted" ? u = /* @__PURE__ */ o(B, { className: "size-4 animate-spin" }) : a === "streaming" ? u = /* @__PURE__ */ o(L, { className: "size-4" }) : a === "error" && (u = /* @__PURE__ */ o(G, { className: "size-4" })), /* @__PURE__ */ o(
|
|
217
|
+
x,
|
|
213
218
|
{
|
|
214
219
|
ref: m,
|
|
215
220
|
"aria-label": "Submit",
|
|
@@ -224,10 +229,10 @@ const gt = s(
|
|
|
224
229
|
);
|
|
225
230
|
}
|
|
226
231
|
);
|
|
227
|
-
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
const
|
|
232
|
+
Pt.displayName = "PromptInputSubmit";
|
|
233
|
+
const gt = (t) => /* @__PURE__ */ o(tt, { ...t });
|
|
234
|
+
gt.displayName = "PromptInputModelSelect";
|
|
235
|
+
const yt = ({
|
|
231
236
|
className: t,
|
|
232
237
|
...e
|
|
233
238
|
}) => /* @__PURE__ */ o(
|
|
@@ -241,46 +246,48 @@ const Nt = ({
|
|
|
241
246
|
...e
|
|
242
247
|
}
|
|
243
248
|
);
|
|
244
|
-
|
|
245
|
-
const
|
|
249
|
+
yt.displayName = "PromptInputModelSelectTrigger";
|
|
250
|
+
const Nt = ({
|
|
246
251
|
className: t,
|
|
247
252
|
...e
|
|
248
253
|
}) => /* @__PURE__ */ o(et, { className: r(t), ...e });
|
|
249
|
-
|
|
250
|
-
const
|
|
254
|
+
Nt.displayName = "PromptInputModelSelectContent";
|
|
255
|
+
const bt = ({
|
|
251
256
|
className: t,
|
|
252
257
|
...e
|
|
253
258
|
}) => /* @__PURE__ */ o(ot, { className: r(t), ...e });
|
|
254
|
-
|
|
255
|
-
const
|
|
259
|
+
bt.displayName = "PromptInputModelSelectItem";
|
|
260
|
+
const ft = ({
|
|
256
261
|
className: t,
|
|
257
262
|
...e
|
|
258
263
|
}) => /* @__PURE__ */ o(rt, { className: r(t), ...e });
|
|
259
|
-
|
|
260
|
-
const
|
|
264
|
+
ft.displayName = "PromptInputModelSelectValue";
|
|
265
|
+
const Ct = ({
|
|
261
266
|
openDelay: t = 0,
|
|
262
267
|
closeDelay: e = 0,
|
|
263
268
|
...n
|
|
264
269
|
}) => /* @__PURE__ */ o(U, { closeDelay: e, openDelay: t, ...n });
|
|
265
|
-
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
const
|
|
270
|
+
Ct.displayName = "PromptInputHoverCard";
|
|
271
|
+
const xt = (t) => /* @__PURE__ */ o(Z, { ...t });
|
|
272
|
+
xt.displayName = "PromptInputHoverCardTrigger";
|
|
273
|
+
const ht = ({
|
|
269
274
|
align: t = "start",
|
|
270
275
|
...e
|
|
271
276
|
}) => /* @__PURE__ */ o(Y, { align: t, ...e });
|
|
272
|
-
|
|
273
|
-
const
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
277
|
+
ht.displayName = "PromptInputHoverCardContent";
|
|
278
|
+
const vt = s(
|
|
279
|
+
({ className: t, ...e }, n) => /* @__PURE__ */ o(
|
|
280
|
+
"div",
|
|
281
|
+
{
|
|
282
|
+
ref: n,
|
|
283
|
+
"data-slot": "prompt-input-tabs-list",
|
|
284
|
+
className: r(t),
|
|
285
|
+
...e
|
|
286
|
+
}
|
|
287
|
+
)
|
|
288
|
+
);
|
|
289
|
+
vt.displayName = "PromptInputTabsList";
|
|
290
|
+
const Tt = s(
|
|
284
291
|
({ className: t, ...e }, n) => /* @__PURE__ */ o(
|
|
285
292
|
"div",
|
|
286
293
|
{
|
|
@@ -291,112 +298,118 @@ const St = s(
|
|
|
291
298
|
}
|
|
292
299
|
)
|
|
293
300
|
);
|
|
294
|
-
|
|
295
|
-
const
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
"
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
)
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
301
|
+
Tt.displayName = "PromptInputTab";
|
|
302
|
+
const St = s(
|
|
303
|
+
({ className: t, children: e, ...n }, a) => /* @__PURE__ */ o(
|
|
304
|
+
"h3",
|
|
305
|
+
{
|
|
306
|
+
ref: a,
|
|
307
|
+
"data-slot": "prompt-input-tab-label",
|
|
308
|
+
className: r(
|
|
309
|
+
"mb-2 px-3 font-medium text-muted-foreground text-xs",
|
|
310
|
+
t
|
|
311
|
+
),
|
|
312
|
+
...n,
|
|
313
|
+
children: e
|
|
314
|
+
}
|
|
315
|
+
)
|
|
316
|
+
);
|
|
317
|
+
St.displayName = "PromptInputTabLabel";
|
|
318
|
+
const Mt = s(
|
|
319
|
+
({ className: t, ...e }, n) => /* @__PURE__ */ o(
|
|
320
|
+
"div",
|
|
321
|
+
{
|
|
322
|
+
ref: n,
|
|
323
|
+
"data-slot": "prompt-input-tab-body",
|
|
324
|
+
className: r("space-y-1", t),
|
|
325
|
+
...e
|
|
326
|
+
}
|
|
327
|
+
)
|
|
328
|
+
);
|
|
329
|
+
Mt.displayName = "PromptInputTabBody";
|
|
330
|
+
const wt = s(
|
|
331
|
+
({ className: t, ...e }, n) => /* @__PURE__ */ o(
|
|
332
|
+
"div",
|
|
333
|
+
{
|
|
334
|
+
ref: n,
|
|
335
|
+
"data-slot": "prompt-input-tab-item",
|
|
336
|
+
className: r(
|
|
337
|
+
"flex items-center gap-2 px-3 py-2 text-xs hover:bg-accent-background",
|
|
338
|
+
t
|
|
339
|
+
),
|
|
340
|
+
...e
|
|
341
|
+
}
|
|
342
|
+
)
|
|
343
|
+
);
|
|
344
|
+
wt.displayName = "PromptInputTabItem";
|
|
345
|
+
const Ht = ({
|
|
333
346
|
className: t,
|
|
334
347
|
...e
|
|
335
348
|
}) => /* @__PURE__ */ o(F, { className: r(t), ...e });
|
|
336
|
-
|
|
337
|
-
const
|
|
349
|
+
Ht.displayName = "PromptInputCommand";
|
|
350
|
+
const kt = ({
|
|
338
351
|
className: t,
|
|
339
352
|
...e
|
|
340
353
|
}) => /* @__PURE__ */ o(V, { className: r(t), ...e });
|
|
341
|
-
|
|
342
|
-
const
|
|
354
|
+
kt.displayName = "PromptInputCommandInput";
|
|
355
|
+
const At = ({
|
|
343
356
|
className: t,
|
|
344
357
|
...e
|
|
345
358
|
}) => /* @__PURE__ */ o(R, { className: r(t), ...e });
|
|
346
|
-
|
|
347
|
-
const
|
|
359
|
+
At.displayName = "PromptInputCommandList";
|
|
360
|
+
const Et = ({
|
|
348
361
|
className: t,
|
|
349
362
|
...e
|
|
350
363
|
}) => /* @__PURE__ */ o(j, { className: r(t), ...e });
|
|
351
|
-
|
|
352
|
-
const
|
|
364
|
+
Et.displayName = "PromptInputCommandEmpty";
|
|
365
|
+
const Dt = ({
|
|
353
366
|
className: t,
|
|
354
367
|
...e
|
|
355
368
|
}) => /* @__PURE__ */ o(K, { className: r(t), ...e });
|
|
356
|
-
|
|
357
|
-
const
|
|
369
|
+
Dt.displayName = "PromptInputCommandGroup";
|
|
370
|
+
const zt = ({
|
|
358
371
|
className: t,
|
|
359
372
|
...e
|
|
360
373
|
}) => /* @__PURE__ */ o(q, { className: r(t), ...e });
|
|
361
|
-
|
|
362
|
-
const
|
|
374
|
+
zt.displayName = "PromptInputCommandItem";
|
|
375
|
+
const Bt = ({
|
|
363
376
|
className: t,
|
|
364
377
|
...e
|
|
365
378
|
}) => /* @__PURE__ */ o(O, { className: r(t), ...e });
|
|
366
|
-
|
|
379
|
+
Bt.displayName = "PromptInputCommandSeparator";
|
|
367
380
|
export {
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
381
|
+
at as PromptInput,
|
|
382
|
+
it as PromptInputActionMenu,
|
|
383
|
+
ct as PromptInputActionMenuContent,
|
|
384
|
+
It as PromptInputActionMenuItem,
|
|
385
|
+
dt as PromptInputActionMenuTrigger,
|
|
386
|
+
st as PromptInputBody,
|
|
374
387
|
T as PromptInputButton,
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
388
|
+
Ht as PromptInputCommand,
|
|
389
|
+
Et as PromptInputCommandEmpty,
|
|
390
|
+
Dt as PromptInputCommandGroup,
|
|
391
|
+
kt as PromptInputCommandInput,
|
|
392
|
+
zt as PromptInputCommandItem,
|
|
393
|
+
At as PromptInputCommandList,
|
|
394
|
+
Bt as PromptInputCommandSeparator,
|
|
395
|
+
lt as PromptInputFooter,
|
|
396
|
+
mt as PromptInputHeader,
|
|
397
|
+
Ct as PromptInputHoverCard,
|
|
398
|
+
ht as PromptInputHoverCardContent,
|
|
399
|
+
xt as PromptInputHoverCardTrigger,
|
|
400
|
+
gt as PromptInputModelSelect,
|
|
401
|
+
Nt as PromptInputModelSelectContent,
|
|
402
|
+
bt as PromptInputModelSelectItem,
|
|
403
|
+
yt as PromptInputModelSelectTrigger,
|
|
404
|
+
ft as PromptInputModelSelectValue,
|
|
405
|
+
Jt as PromptInputProvider,
|
|
406
|
+
Pt as PromptInputSubmit,
|
|
407
|
+
Tt as PromptInputTab,
|
|
408
|
+
Mt as PromptInputTabBody,
|
|
409
|
+
wt as PromptInputTabItem,
|
|
410
|
+
St as PromptInputTabLabel,
|
|
411
|
+
vt as PromptInputTabsList,
|
|
412
|
+
pt as PromptInputTextarea,
|
|
413
|
+
ut as PromptInputTools,
|
|
414
|
+
Xt as usePromptInputController
|
|
402
415
|
};
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes, HTMLAttributes } from 'react';
|
|
2
2
|
import { Radio as RadioPrimitive } from '@base-ui/react/radio';
|
|
3
3
|
import { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
5
6
|
type Orientation = 'horizontal' | 'vertical';
|
|
6
7
|
type RadioGroupProps = RadioGroupPrimitive.Props & {
|
|
7
8
|
orientation?: Orientation;
|
|
8
9
|
};
|
|
9
|
-
declare const RadioGroup:
|
|
10
|
-
|
|
11
|
-
variant?:
|
|
12
|
-
}
|
|
13
|
-
declare const
|
|
14
|
-
|
|
15
|
-
declare const
|
|
10
|
+
declare const RadioGroup: ForwardRefExoticComponent<Omit<RadioGroupProps, 'ref'> & RefAttributes<HTMLDivElement>>;
|
|
11
|
+
interface RadioGroupItemVariantProps {
|
|
12
|
+
variant?: 'default' | 'card' | null;
|
|
13
|
+
}
|
|
14
|
+
declare const radioGroupItemVariants: (props?: (RadioGroupItemVariantProps & ClassProp) | undefined) => string;
|
|
15
|
+
type RadioGroupItemProps = HTMLAttributes<HTMLLabelElement> & VariantProps<typeof radioGroupItemVariants>;
|
|
16
|
+
declare const RadioGroupItem: ForwardRefExoticComponent<Omit<RadioGroupItemProps, 'ref'> & RefAttributes<HTMLLabelElement>>;
|
|
17
|
+
declare const RadioGroupItemControl: ForwardRefExoticComponent<Omit<RadioPrimitive.Root.Props<unknown>, 'ref'> & RefAttributes<HTMLSpanElement>>;
|
|
18
|
+
declare const RadioGroupItemLabel: ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & RefAttributes<HTMLSpanElement>>;
|
|
19
|
+
declare const RadioGroupItemDescription: ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & RefAttributes<HTMLSpanElement>>;
|
|
16
20
|
export { RadioGroup, RadioGroupItem, RadioGroupItemControl, RadioGroupItemDescription, RadioGroupItemLabel, };
|