@cognite/aura 0.3.0 → 0.3.1
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 +869 -870
- package/README.md +112 -11
- package/dist/components/index.d.ts +3 -2
- package/dist/components/index.js +165 -160
- package/dist/components/ui/core/action-toolbar/action-toolbar.js +4 -4
- package/dist/components/ui/core/alert/alert.js +3 -3
- package/dist/components/ui/core/banner/banner.js +6 -6
- package/dist/components/ui/core/button/button.js +4 -4
- package/dist/components/ui/core/checkbox/checkbox.js +8 -8
- package/dist/components/ui/core/code-block/code-block.js +6 -6
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.d.ts +15 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js +84 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/index.d.ts +3 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/types.d.ts +18 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.d.ts +3 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js +63 -0
- package/dist/components/ui/core/date-time-pickers/index.d.ts +2 -0
- package/dist/components/ui/core/date-time-pickers/index.js +8 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.d.ts +23 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js +32 -0
- package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.js +3 -3
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +1 -1
- package/dist/components/ui/core/hover-card/hover-card.js +3 -3
- package/dist/components/ui/core/input/input.js +1 -1
- package/dist/components/ui/core/message/message.js +387 -101
- package/dist/components/ui/core/pagination/pagination.js +9 -7
- package/dist/components/ui/core/prompt-input/prompt-input.js +16 -16
- package/dist/components/ui/core/radio-group/radio-group.js +7 -7
- package/dist/components/ui/core/reasoning/reasoning.js +1 -1
- package/dist/components/ui/core/segmented-control/segmented-control.js +3 -3
- package/dist/components/ui/core/select/select.d.ts +2 -1
- package/dist/components/ui/core/select/select.js +134 -110
- package/dist/components/ui/core/shimmer/shimmer.d.ts +3 -1
- package/dist/components/ui/core/shimmer/shimmer.js +89 -49
- package/dist/components/ui/core/tabs/tabs.js +3 -3
- package/dist/components/ui/core/textarea/textarea.js +1 -1
- package/dist/components/ui/core/toggle/toggle.d.ts +15 -0
- package/dist/components/ui/core/toggle/toggle.js +74 -0
- package/dist/components/ui/core/tool/tool.js +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/lib/portal-container-context.js +3 -3
- package/dist/lib/utils.d.ts +1 -1
- package/dist/lib/utils.js +7 -7
- package/dist/styles.css +1 -1
- package/dist/styles.source.css +3 -0
- package/package.json +200 -18
- package/dist/index.js +0 -308
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { memo as h, useMemo as
|
|
3
|
-
import { motion as
|
|
4
|
-
import { cn as
|
|
1
|
+
import { jsx as s, jsxs as b } from "react/jsx-runtime";
|
|
2
|
+
import { memo as h, useMemo as p } from "react";
|
|
3
|
+
import { motion as m } from "framer-motion";
|
|
4
|
+
import { cn as u } from "../../../../lib/utils.js";
|
|
5
5
|
const v = {
|
|
6
6
|
nordic: "var(--gradient-nordic)",
|
|
7
7
|
aurora: "var(--gradient-aurora)",
|
|
@@ -10,59 +10,99 @@ const v = {
|
|
|
10
10
|
summer: "var(--gradient-summer)",
|
|
11
11
|
spring: "var(--gradient-spring)",
|
|
12
12
|
fall: "var(--gradient-fall)"
|
|
13
|
+
}, c = {
|
|
14
|
+
backgroundPosition: ["100% center, center", "0% center, center"]
|
|
13
15
|
};
|
|
16
|
+
function x(e, a) {
|
|
17
|
+
const r = e.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
18
|
+
return {
|
|
19
|
+
...a,
|
|
20
|
+
WebkitMaskImage: `url("${r}")`,
|
|
21
|
+
maskImage: `url("${r}")`,
|
|
22
|
+
WebkitMaskRepeat: "no-repeat",
|
|
23
|
+
maskRepeat: "no-repeat",
|
|
24
|
+
WebkitMaskSize: "contain",
|
|
25
|
+
maskSize: "contain",
|
|
26
|
+
WebkitMaskPosition: "center",
|
|
27
|
+
maskPosition: "center"
|
|
28
|
+
};
|
|
29
|
+
}
|
|
14
30
|
function S({
|
|
15
|
-
children:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
31
|
+
children: e,
|
|
32
|
+
iconUrl: a,
|
|
33
|
+
as: r = "p",
|
|
34
|
+
className: l,
|
|
35
|
+
duration: g = 2,
|
|
36
|
+
spread: d = 2,
|
|
37
|
+
variant: n = "default"
|
|
21
38
|
}) {
|
|
22
|
-
const
|
|
23
|
-
() => (
|
|
24
|
-
[
|
|
25
|
-
),
|
|
26
|
-
const
|
|
27
|
-
return
|
|
28
|
-
}, [
|
|
29
|
-
"--spread": `${
|
|
30
|
-
backgroundImage:
|
|
39
|
+
const k = p(
|
|
40
|
+
() => (e?.length ?? 0) * d,
|
|
41
|
+
[e, d]
|
|
42
|
+
), f = p(() => {
|
|
43
|
+
const t = "linear-gradient(90deg, transparent calc(50% - var(--spread)), rgba(255, 255, 255, 0.4), transparent calc(50% + var(--spread)))";
|
|
44
|
+
return n === "default" ? `${t}, linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))` : `${t}, ${v[n]}`;
|
|
45
|
+
}, [n]), i = {
|
|
46
|
+
"--spread": `${k}px`,
|
|
47
|
+
backgroundImage: f,
|
|
31
48
|
backgroundSize: "250% 100%, 100% 100%"
|
|
32
|
-
},
|
|
49
|
+
}, o = {
|
|
33
50
|
repeat: Number.POSITIVE_INFINITY,
|
|
34
|
-
duration:
|
|
51
|
+
duration: g,
|
|
35
52
|
ease: "linear"
|
|
36
|
-
}, r = {
|
|
37
|
-
"data-slot": "shimmer",
|
|
38
|
-
animate: {
|
|
39
|
-
backgroundPosition: ["100% center, center", "0% center, center"]
|
|
40
|
-
},
|
|
41
|
-
className: f(
|
|
42
|
-
"relative inline-block bg-clip-text text-transparent rounded-md",
|
|
43
|
-
d
|
|
44
|
-
),
|
|
45
|
-
style: g,
|
|
46
|
-
transition: l,
|
|
47
|
-
children: n
|
|
48
53
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
54
|
+
if (!a) {
|
|
55
|
+
const t = m[r];
|
|
56
|
+
return /* @__PURE__ */ s(
|
|
57
|
+
t,
|
|
58
|
+
{
|
|
59
|
+
"data-slot": "shimmer",
|
|
60
|
+
className: u(
|
|
61
|
+
"relative inline-block bg-clip-text text-transparent rounded-md",
|
|
62
|
+
l
|
|
63
|
+
),
|
|
64
|
+
animate: c,
|
|
65
|
+
style: i,
|
|
66
|
+
transition: o,
|
|
67
|
+
children: e
|
|
68
|
+
}
|
|
69
|
+
);
|
|
62
70
|
}
|
|
71
|
+
return /* @__PURE__ */ b(
|
|
72
|
+
r,
|
|
73
|
+
{
|
|
74
|
+
"data-slot": "shimmer",
|
|
75
|
+
className: u(
|
|
76
|
+
"relative rounded-md inline-flex items-center gap-1.5",
|
|
77
|
+
l
|
|
78
|
+
),
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ s(
|
|
81
|
+
m.span,
|
|
82
|
+
{
|
|
83
|
+
"aria-hidden": !0,
|
|
84
|
+
className: "inline-block size-[1em] shrink-0",
|
|
85
|
+
animate: c,
|
|
86
|
+
style: x(a, i),
|
|
87
|
+
transition: o
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
/* @__PURE__ */ s(
|
|
91
|
+
m.span,
|
|
92
|
+
{
|
|
93
|
+
className: "inline-block bg-clip-text text-transparent",
|
|
94
|
+
animate: c,
|
|
95
|
+
style: i,
|
|
96
|
+
transition: o,
|
|
97
|
+
children: e
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
);
|
|
63
103
|
}
|
|
64
|
-
const
|
|
65
|
-
|
|
104
|
+
const I = h(S);
|
|
105
|
+
I.displayName = "Shimmer";
|
|
66
106
|
export {
|
|
67
|
-
|
|
107
|
+
I as Shimmer
|
|
68
108
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as i, jsxs as b } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as n,
|
|
2
|
+
import { forwardRef as n, createContext as v, useContext as x } from "react";
|
|
3
3
|
import { Tabs as u } from "@base-ui/react/tabs";
|
|
4
4
|
import { cva as f } from "class-variance-authority";
|
|
5
5
|
import { cn as l } from "../../../../lib/utils.js";
|
|
@@ -94,7 +94,7 @@ const w = f("relative isolate inline-flex", {
|
|
|
94
94
|
)
|
|
95
95
|
);
|
|
96
96
|
_.displayName = "Tabs";
|
|
97
|
-
const g =
|
|
97
|
+
const g = v(void 0), h = n(({ className: e, size: t = "small", ...a }, s) => /* @__PURE__ */ i(
|
|
98
98
|
u.Indicator,
|
|
99
99
|
{
|
|
100
100
|
ref: s,
|
|
@@ -151,7 +151,7 @@ const V = n(
|
|
|
151
151
|
children: d,
|
|
152
152
|
...c
|
|
153
153
|
}, r) => {
|
|
154
|
-
const p =
|
|
154
|
+
const p = x(g), m = t ?? p ?? "small";
|
|
155
155
|
return /* @__PURE__ */ b(
|
|
156
156
|
u.Tab,
|
|
157
157
|
{
|
|
@@ -8,7 +8,7 @@ const c = r(
|
|
|
8
8
|
ref: a,
|
|
9
9
|
"data-slot": "textarea",
|
|
10
10
|
className: i(
|
|
11
|
-
"flex field-sizing-content min-h-20 w-full transition-[color,background-color,border-color,box-shadow] resize-none",
|
|
11
|
+
"flex field-sizing-content h-auto min-h-20 w-full transition-[color,background-color,border-color,box-shadow] resize-none",
|
|
12
12
|
m,
|
|
13
13
|
f,
|
|
14
14
|
d,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentRef, ForwardRefExoticComponent, ReactNode, RefAttributes } from 'react';
|
|
2
|
+
import { Toggle as TogglePrimitive } from '@base-ui/react/toggle';
|
|
3
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
4
|
+
type ToggleVariantProps = {
|
|
5
|
+
variant?: 'default' | 'outline';
|
|
6
|
+
size?: 'default' | 'sm' | 'lg';
|
|
7
|
+
};
|
|
8
|
+
declare const toggleVariants: (props?: (ToggleVariantProps & ClassProp) | undefined) => string;
|
|
9
|
+
type ToggleProps = TogglePrimitive.Props & ToggleVariantProps & {
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
label?: ReactNode;
|
|
12
|
+
count?: number | string;
|
|
13
|
+
};
|
|
14
|
+
declare const Toggle: ForwardRefExoticComponent<Omit<ToggleProps, 'ref'> & RefAttributes<ComponentRef<typeof TogglePrimitive>>>;
|
|
15
|
+
export { Toggle, toggleVariants };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx as o, jsxs as m, Fragment as f } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as v } from "react";
|
|
3
|
+
import { Toggle as b } from "@base-ui/react/toggle";
|
|
4
|
+
import { cva as p } from "class-variance-authority";
|
|
5
|
+
import { cn as s } from "../../../../lib/utils.js";
|
|
6
|
+
const x = p(
|
|
7
|
+
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium text-muted-foreground hover:bg-accent-background hover:text-foreground disabled:pointer-events-none disabled:text-disabled-foreground aria-pressed:bg-active-muted-background aria-pressed:text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring-muted focus-visible:ring outline-none transition-[color,box-shadow] aria-invalid:ring-destructive-background/20 dark:aria-invalid:ring-destructive-background/40 aria-invalid:border-destructive-background whitespace-nowrap",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-transparent",
|
|
12
|
+
outline: "border border-muted-background bg-transparent shadow-xs hover:bg-accent-background hover:text-foreground"
|
|
13
|
+
},
|
|
14
|
+
size: {
|
|
15
|
+
default: "h-9 px-2 min-w-9",
|
|
16
|
+
sm: "h-7 px-1.5 min-w-7",
|
|
17
|
+
lg: "h-8 px-2.5 min-w-8"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
variant: "default",
|
|
22
|
+
size: "default"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
), h = (e, r) => {
|
|
26
|
+
if (e == null || e === "")
|
|
27
|
+
return null;
|
|
28
|
+
const t = String(e);
|
|
29
|
+
return /* @__PURE__ */ o(
|
|
30
|
+
"span",
|
|
31
|
+
{
|
|
32
|
+
"data-slot": "toggle-count",
|
|
33
|
+
className: s(
|
|
34
|
+
"inline-flex h-4 min-w-4 items-center justify-center rounded-sm px-0.5 text-xs font-medium leading-3.5 tracking-tightest",
|
|
35
|
+
r ? "bg-disabled-background text-disabled-foreground" : "bg-decorative-background-mountain text-decorative-foreground-mountain"
|
|
36
|
+
),
|
|
37
|
+
children: t
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}, k = v(
|
|
41
|
+
({
|
|
42
|
+
className: e,
|
|
43
|
+
variant: r,
|
|
44
|
+
size: t,
|
|
45
|
+
icon: i,
|
|
46
|
+
label: n,
|
|
47
|
+
count: a,
|
|
48
|
+
children: g,
|
|
49
|
+
disabled: d,
|
|
50
|
+
...u
|
|
51
|
+
}, l) => {
|
|
52
|
+
const c = i !== void 0 || n !== void 0 || a !== void 0;
|
|
53
|
+
return /* @__PURE__ */ o(
|
|
54
|
+
b,
|
|
55
|
+
{
|
|
56
|
+
ref: l,
|
|
57
|
+
"data-slot": "toggle",
|
|
58
|
+
disabled: d,
|
|
59
|
+
className: s(x({ variant: r, size: t, className: e })),
|
|
60
|
+
...u,
|
|
61
|
+
children: g ?? (c && /* @__PURE__ */ m(f, { children: [
|
|
62
|
+
i,
|
|
63
|
+
n && /* @__PURE__ */ o("span", { "data-slot": "toggle-label", children: n }),
|
|
64
|
+
h(a, d)
|
|
65
|
+
] }))
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
k.displayName = "Toggle";
|
|
71
|
+
export {
|
|
72
|
+
k as Toggle,
|
|
73
|
+
x as toggleVariants
|
|
74
|
+
};
|
|
@@ -5,7 +5,7 @@ import { cn as s } from "../../../../lib/utils.js";
|
|
|
5
5
|
import { Badge as g } from "../badge/badge.js";
|
|
6
6
|
import { Button as h } from "../button/button.js";
|
|
7
7
|
import { CodeBlock as c, CodeBlockCopyButton as m, CodeBlockDownloadButton as u, CodeBlockCollapseButton as f } from "../code-block/code-block.js";
|
|
8
|
-
import { Collapsible as x,
|
|
8
|
+
import { Collapsible as x, CollapsibleTrigger as N, CollapsibleContent as b } from "../collapsible/collapsible.js";
|
|
9
9
|
const y = d(
|
|
10
10
|
({ className: t, ...o }, l) => /* @__PURE__ */ e(
|
|
11
11
|
x,
|
|
@@ -23,7 +23,7 @@ const y = d(
|
|
|
23
23
|
y.displayName = "Tool";
|
|
24
24
|
const v = d(
|
|
25
25
|
({ className: t, title: o, type: l, hasError: r = !1, ...i }, a) => /* @__PURE__ */ e(
|
|
26
|
-
|
|
26
|
+
N,
|
|
27
27
|
{
|
|
28
28
|
ref: a,
|
|
29
29
|
"data-slot": "tool-header",
|
|
@@ -56,7 +56,7 @@ const v = d(
|
|
|
56
56
|
v.displayName = "ToolHeader";
|
|
57
57
|
const j = d(
|
|
58
58
|
({ className: t, ...o }, l) => /* @__PURE__ */ e(
|
|
59
|
-
|
|
59
|
+
b,
|
|
60
60
|
{
|
|
61
61
|
ref: l,
|
|
62
62
|
"data-slot": "tool-content",
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionToolbar, ActionToolbarAction, ActionToolbarActionClear, ActionToolbarActions, ActionToolbarPrimaryAction, ActionToolbarSelection, ActionToolbarSelectionSummary, Alert, AlertActions, AlertButton, AlertClose, AlertDescription, AlertTitle, EmptyState, EmptyStateIcon, EmptyStateTitle, EmptyStateDescription, EmptyStateActions, Avatar, AvatarFallback, AvatarIcon, AvatarImage, Badge, Banner, BannerAction, BannerActions, BannerClose, BannerIcon, BannerStatus, BannerTitle, badgeVariants, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, buttonVariants, Card, CardActions, CardContent, CardDescription, CardFooter, CardFooterEnd, CardFooterStart, CardHeader, CardHeaderCenter, CardHeaderEnd, CardHeaderStart, CardTitle, CheckboxGroup, CheckboxItem, CheckboxItemControl, CheckboxItemDescription, CheckboxItemLabel, CheckboxMetadata, CodeBlock, CodeBlockCollapseButton, CodeBlockCopyButton, CodeBlockDownloadButton, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Count, countVariants, DateRangePicker, DateTimeRangePicker, type DateRangePickerProps, type DateTimeRangePickerProps, type ShortcutItem, type TimeFormat, type ComponentMeta, type ComponentStatusType, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuHeader, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSectionLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, HelperText, HoverCard, HoverCardContent, HoverCardTrigger, InlineCitation, InlineCitationCard, InlineCitationCardBody, InlineCitationCardTrigger, InlineCitationGroup, InlineCitationLink, type InlineCitationLinkProps, InlineCitationQuote, InlineCitationSource, InlineCitationText, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Kbd, KbdGroup, Label, Loader, Message, MessageAction, MessageActions, MessageContent, MessageResponse, Pagination, PaginationContent, PaginationEllipsis, PaginationFirst, PaginationItem, PaginationLast, PaginationLink, PaginationNext, PaginationPrevious, PaginationResultsPerPage, PaginationResultsPerPageLabel, PaginationSelectTrigger, PaginationStatus, PaginationTeleport, Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverHeaderContent, PopoverSlot, PopoverTitle, PopoverTrigger, PortalContainerContext, PromptInput, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuItem, PromptInputActionMenuTrigger, PromptInputBody, PromptInputButton, PromptInputCommand, PromptInputCommandEmpty, PromptInputCommandGroup, PromptInputCommandInput, PromptInputCommandItem, PromptInputCommandList, PromptInputCommandSeparator, PromptInputFooter, PromptInputHeader, PromptInputHoverCard, PromptInputHoverCardContent, PromptInputHoverCardTrigger, PromptInputModelSelect, PromptInputModelSelectContent, PromptInputModelSelectItem, PromptInputModelSelectTrigger, PromptInputModelSelectValue, PromptInputProvider, PromptInputSubmit, PromptInputTab, PromptInputTabBody, PromptInputTabItem, PromptInputTabLabel, PromptInputTabsList, PromptInputTextarea, PromptInputTools, Reasoning, ReasoningContent, ReasoningHeader, ReasoningItem, RadioGroup, RadioGroupItem, RadioGroupItemControl, RadioGroupItemDescription, RadioGroupItemLabel, ScrollArea, ScrollBar, Search, SegmentedControl, SegmentedControlButton, SegmentedControlContent, SegmentedControlList, segmentedControlButtonVariants, segmentedControlListVariants, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Shimmer, Skeleton, Source, Sources, SourcesTitle, toast, Toaster, Tabs, TabsLabel, TabsList, TabsPanel, TabsTrigger, tabsListVariants, tabsTriggerVariants, Textarea, Topbar, TopbarAction, TopbarBreadcrumbs, TopbarCenter, TopbarIcon, TopbarLeft, TopbarMetadata, TopbarRight, type TopbarTheme, TopbarThemeSwitcher, Tool, ToolContent, ToolHeader, ToolInput, ToolOutput, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, usePromptInputController, } from './components';
|
|
1
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionToolbar, ActionToolbarAction, ActionToolbarActionClear, ActionToolbarActions, ActionToolbarPrimaryAction, ActionToolbarSelection, ActionToolbarSelectionSummary, Alert, AlertActions, AlertButton, AlertClose, AlertDescription, AlertTitle, EmptyState, EmptyStateIcon, EmptyStateTitle, EmptyStateDescription, EmptyStateActions, Avatar, AvatarFallback, AvatarIcon, AvatarImage, Badge, Banner, BannerAction, BannerActions, BannerClose, BannerIcon, BannerStatus, BannerTitle, badgeVariants, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, buttonVariants, Card, CardActions, CardContent, CardDescription, CardFooter, CardFooterEnd, CardFooterStart, CardHeader, CardHeaderCenter, CardHeaderEnd, CardHeaderStart, CardTitle, CheckboxGroup, CheckboxItem, CheckboxItemControl, CheckboxItemDescription, CheckboxItemLabel, CheckboxMetadata, CodeBlock, CodeBlockCollapseButton, CodeBlockCopyButton, CodeBlockDownloadButton, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Count, countVariants, DateRangePicker, DateTimeRangePicker, type DateRangePickerProps, type DateTimeRangePickerProps, type ShortcutItem, type TimeFormat, type ComponentMeta, type ComponentStatusType, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuHeader, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSectionLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, HelperText, HoverCard, HoverCardContent, HoverCardTrigger, InlineCitation, InlineCitationCard, InlineCitationCardBody, InlineCitationCardTrigger, InlineCitationGroup, InlineCitationLink, type InlineCitationLinkProps, InlineCitationQuote, InlineCitationSource, InlineCitationText, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Kbd, KbdGroup, Label, Loader, Message, MessageAction, MessageActions, MessageContent, MessageResponse, Pagination, PaginationContent, PaginationEllipsis, PaginationFirst, PaginationItem, PaginationLast, PaginationLink, PaginationNext, PaginationPrevious, PaginationResultsPerPage, PaginationResultsPerPageLabel, PaginationSelectTrigger, PaginationStatus, PaginationTeleport, Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverHeaderContent, PopoverSlot, PopoverTitle, PopoverTrigger, PortalContainerContext, PromptInput, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuItem, PromptInputActionMenuTrigger, PromptInputBody, PromptInputButton, PromptInputCommand, PromptInputCommandEmpty, PromptInputCommandGroup, PromptInputCommandInput, PromptInputCommandItem, PromptInputCommandList, PromptInputCommandSeparator, PromptInputFooter, PromptInputHeader, PromptInputHoverCard, PromptInputHoverCardContent, PromptInputHoverCardTrigger, PromptInputModelSelect, PromptInputModelSelectContent, PromptInputModelSelectItem, PromptInputModelSelectTrigger, PromptInputModelSelectValue, PromptInputProvider, PromptInputSubmit, PromptInputTab, PromptInputTabBody, PromptInputTabItem, PromptInputTabLabel, PromptInputTabsList, PromptInputTextarea, PromptInputTools, Reasoning, ReasoningContent, ReasoningHeader, ReasoningItem, RadioGroup, RadioGroupItem, RadioGroupItemControl, RadioGroupItemDescription, RadioGroupItemLabel, ScrollArea, ScrollBar, Search, SegmentedControl, SegmentedControlButton, SegmentedControlContent, SegmentedControlList, segmentedControlButtonVariants, segmentedControlListVariants, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Shimmer, Skeleton, Source, Sources, SourcesTitle, toast, Toaster, Tabs, TabsLabel, TabsList, TabsPanel, TabsTrigger, tabsListVariants, tabsTriggerVariants, Textarea, Topbar, TopbarAction, TopbarBreadcrumbs, TopbarCenter, TopbarIcon, TopbarLeft, TopbarMetadata, TopbarRight, type TopbarTheme, TopbarThemeSwitcher, Toggle, toggleVariants, Tool, ToolContent, ToolHeader, ToolInput, ToolOutput, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, usePromptInputController, } from './components';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useContext as t, createContext as o } from "react";
|
|
2
2
|
import { getPortalContainer as n } from "./utils.js";
|
|
3
|
-
const e =
|
|
3
|
+
const e = o(void 0);
|
|
4
4
|
function C() {
|
|
5
|
-
return
|
|
5
|
+
return t(e) ?? n();
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
8
|
e as PortalContainerContext,
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare const focusRingDestructive: "focus-visible:shadow-focus-ring-dest
|
|
|
19
19
|
* Reusable form element state Tailwind classes.
|
|
20
20
|
* Import these to maintain consistent styling across all form components.
|
|
21
21
|
*/
|
|
22
|
-
export declare const formElementBase: "border border-transparent rounded-lg bg-muted-background py-
|
|
22
|
+
export declare const formElementBase: "border border-transparent rounded-lg bg-muted-background py-1.75 pl-2 pr-1 text-sm leading-5 tracking-tight text-muted-foreground placeholder:text-muted-foreground";
|
|
23
23
|
export declare const hoverState: "hover:bg-accent-background hover:border hover:border-border-emphasized";
|
|
24
24
|
export declare const filledState: "[&:not(:placeholder-shown):not(:focus)]:bg-muted-background [&:not(:placeholder-shown)]:text-foreground";
|
|
25
25
|
export declare const focusState: "focus-visible:shadow-focus-ring focus-visible:bg-background focus-visible:border-transparent focus-visible:text-foreground outline-none";
|
package/dist/lib/utils.js
CHANGED
|
@@ -2,7 +2,7 @@ import { clsx as u } from "clsx";
|
|
|
2
2
|
import { codeToHtml as i } from "shiki";
|
|
3
3
|
import { twMerge as b } from "tailwind-merge";
|
|
4
4
|
import d from "./style-scope.js";
|
|
5
|
-
let
|
|
5
|
+
let a = null, l = !1;
|
|
6
6
|
function f(...e) {
|
|
7
7
|
return b(u(e));
|
|
8
8
|
}
|
|
@@ -58,7 +58,7 @@ function k(e) {
|
|
|
58
58
|
const r = t[0].charAt(0).toUpperCase(), o = t[t.length - 1].charAt(0).toUpperCase();
|
|
59
59
|
return r + o;
|
|
60
60
|
}
|
|
61
|
-
const C = "focus-visible:shadow-focus-ring outline-none", S = "focus-visible:shadow-focus-ring-destructive outline-none", I = "border border-transparent rounded-lg bg-muted-background py-
|
|
61
|
+
const C = "focus-visible:shadow-focus-ring outline-none", S = "focus-visible:shadow-focus-ring-destructive outline-none", I = "border border-transparent rounded-lg bg-muted-background py-1.75 pl-2 pr-1 text-sm leading-5 tracking-tight text-muted-foreground placeholder:text-muted-foreground", P = "hover:bg-accent-background hover:border hover:border-border-emphasized", T = "[&:not(:placeholder-shown):not(:focus)]:bg-muted-background [&:not(:placeholder-shown)]:text-foreground", O = "focus-visible:shadow-focus-ring focus-visible:bg-background focus-visible:border-transparent focus-visible:text-foreground outline-none", N = "aria-invalid:border-destructive-foreground aria-invalid:shadow-focus-ring-destructive aria-invalid:border-transparent aria-invalid:text-foreground aria-invalid:focus-visible:shadow-focus-ring aria-invalid:focus-visible:bg-background aria-invalid:focus-visible:border-transparent aria-invalid:focus-visible:text-foreground outline-none", U = "disabled:bg-disabled-background disabled:border-transparent disabled:text-disabled-foreground disabled:placeholder:text-disabled-foreground disabled:pointer-events-none disabled:cursor-not-allowed", _ = "read-only:border-transparent read-only:text-muted-foreground read-only:cursor-default read-only:hover:border-transparent read-only:focus-visible:shadow-none read-only:focus-visible:border-transparent read-only:focus-visible:bg-muted-background [&:read-only:not(:placeholder-shown)]:text-muted-foreground", B = "grid max-w-150 cursor-pointer grid-cols-[auto_1fr] items-start gap-x-2 gap-y-1 has-[[data-disabled]]:cursor-not-allowed", E = "min-h-9 py-2", z = f(
|
|
62
62
|
"w-64 rounded-md border border-transparent p-3 bg-card-background",
|
|
63
63
|
"has-[[data-checked]]:bg-active-muted-background",
|
|
64
64
|
"hover:border-border-emphasized hover:bg-accent-background",
|
|
@@ -77,20 +77,20 @@ function D(e) {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
const H = (e) => {
|
|
80
|
-
const t = !!(e && Object.keys(e).length > 0), r = e?.id ?? d.portalContainer, o = e?.className ?? d.styleScope, c = (
|
|
81
|
-
|
|
80
|
+
const t = !!(e && Object.keys(e).length > 0), r = e?.id ?? d.portalContainer, o = e?.className ?? d.styleScope, c = (s) => {
|
|
81
|
+
s.id = r, s.className = o, s.style.position = e?.style?.position ?? "fixed", s.style.zIndex = e?.style?.zIndex ?? "1000", e?.style && Object.assign(s.style, e.style);
|
|
82
82
|
};
|
|
83
|
-
if (
|
|
83
|
+
if (a && !document.body?.contains(a) && (a = null), a)
|
|
84
84
|
return t && console.warn(
|
|
85
85
|
"getPortalContainer: Portal container already exists. Custom options will be ignored to prevent side effects."
|
|
86
|
-
),
|
|
86
|
+
), a;
|
|
87
87
|
if (typeof window > "u")
|
|
88
88
|
return;
|
|
89
89
|
t && !l && (console.warn(
|
|
90
90
|
"Custom portal container props can lead to unintended behavior. Use with caution."
|
|
91
91
|
), l = !0);
|
|
92
92
|
let n = document?.getElementById(r);
|
|
93
|
-
return n || (n = document.createElement("div"), document.body.appendChild(n)), c(n),
|
|
93
|
+
return n || (n = document.createElement("div"), document.body.appendChild(n)), c(n), a = n, n;
|
|
94
94
|
};
|
|
95
95
|
export {
|
|
96
96
|
f as cn,
|