@constructive-io/ui 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/alert-dialog.d.ts +31 -0
- package/dist/components/alert-dialog.js +314 -0
- package/dist/components/alert-dialog.js.map +1 -0
- package/dist/components/alert.d.ts +14 -0
- package/dist/components/alert.js +38 -0
- package/dist/components/alert.js.map +1 -0
- package/dist/components/autocomplete.d.ts +28 -0
- package/dist/components/autocomplete.js +395 -0
- package/dist/components/autocomplete.js.map +1 -0
- package/dist/components/avatar.d.ts +13 -0
- package/dist/components/avatar.js +37 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.d.ts +15 -0
- package/dist/components/badge.js +43 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/breadcrumb.d.ts +14 -0
- package/dist/components/breadcrumb.js +154 -0
- package/dist/components/breadcrumb.js.map +1 -0
- package/dist/components/button.d.ts +17 -0
- package/dist/components/button.js +62 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/calendar-rac.d.ts +13 -0
- package/dist/components/calendar-rac.js +82 -0
- package/dist/components/calendar-rac.js.map +1 -0
- package/dist/components/card.d.ts +19 -0
- package/dist/components/card.js +75 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/checkbox-group.d.ts +7 -0
- package/dist/components/checkbox-group.js +16 -0
- package/dist/components/checkbox-group.js.map +1 -0
- package/dist/components/checkbox.d.ts +8 -0
- package/dist/components/checkbox.js +67 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/collapsible.d.ts +54 -0
- package/dist/components/collapsible.js +121 -0
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/combobox.d.ts +44 -0
- package/dist/components/combobox.js +486 -0
- package/dist/components/combobox.js.map +1 -0
- package/dist/components/command.d.ts +43 -0
- package/dist/components/command.js +690 -0
- package/dist/components/command.js.map +1 -0
- package/dist/components/dialog.d.ts +35 -0
- package/dist/components/dialog.js +440 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/dock.d.ts +31 -0
- package/dist/components/dock.js +111 -0
- package/dist/components/dock.js.map +1 -0
- package/dist/components/drawer.d.ts +16 -0
- package/dist/components/drawer.js +147 -0
- package/dist/components/drawer.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +50 -0
- package/dist/components/dropdown-menu.js +380 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/field.d.ts +51 -0
- package/dist/components/field.js +115 -0
- package/dist/components/field.js.map +1 -0
- package/dist/components/flickering-grid.d.ts +15 -0
- package/dist/components/flickering-grid.js +147 -0
- package/dist/components/flickering-grid.js.map +1 -0
- package/dist/components/form-control.d.ts +15 -0
- package/dist/components/form-control.js +173 -0
- package/dist/components/form-control.js.map +1 -0
- package/dist/components/form.d.ts +37 -0
- package/dist/components/form.js +179 -0
- package/dist/components/form.js.map +1 -0
- package/dist/components/input-group.d.ts +18 -0
- package/dist/components/input-group.js +177 -0
- package/dist/components/input-group.js.map +1 -0
- package/dist/components/input.d.ts +11 -0
- package/dist/components/input.js +60 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/json-input.d.ts +25 -0
- package/dist/components/json-input.js +351 -0
- package/dist/components/json-input.js.map +1 -0
- package/dist/components/label.d.ts +11 -0
- package/dist/components/label.js +27 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/motion-grid.d.ts +20 -0
- package/dist/components/motion-grid.js +81 -0
- package/dist/components/motion-grid.js.map +1 -0
- package/dist/components/multi-select.d.ts +198 -0
- package/dist/components/multi-select.js +882 -0
- package/dist/components/multi-select.js.map +1 -0
- package/dist/components/page-header.d.ts +17 -0
- package/dist/components/page-header.js +17 -0
- package/dist/components/page-header.js.map +1 -0
- package/dist/components/pagination.d.ts +19 -0
- package/dist/components/pagination.js +144 -0
- package/dist/components/pagination.js.map +1 -0
- package/dist/components/popover.d.ts +35 -0
- package/dist/components/popover.js +188 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/portal.d.ts +108 -0
- package/dist/components/portal.js +75 -0
- package/dist/components/portal.js.map +1 -0
- package/dist/components/progress.d.ts +10 -0
- package/dist/components/progress.js +30 -0
- package/dist/components/progress.js.map +1 -0
- package/dist/components/progressive-blur-scroll-container.d.ts +25 -0
- package/dist/components/progressive-blur-scroll-container.js +142 -0
- package/dist/components/progressive-blur-scroll-container.js.map +1 -0
- package/dist/components/progressive-blur.d.ts +16 -0
- package/dist/components/progressive-blur.js +68 -0
- package/dist/components/progressive-blur.js.map +1 -0
- package/dist/components/radio-group.d.ts +10 -0
- package/dist/components/radio-group.js +37 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/record-picker.d.ts +16 -0
- package/dist/components/record-picker.js +366 -0
- package/dist/components/record-picker.js.map +1 -0
- package/dist/components/resizable.d.ts +11 -0
- package/dist/components/resizable.js +52 -0
- package/dist/components/resizable.js.map +1 -0
- package/dist/components/responsive-diagram.d.ts +10 -0
- package/dist/components/responsive-diagram.js +63 -0
- package/dist/components/responsive-diagram.js.map +1 -0
- package/dist/components/scroll-area.d.ts +12 -0
- package/dist/components/scroll-area.js +69 -0
- package/dist/components/scroll-area.js.map +1 -0
- package/dist/components/select.d.ts +47 -0
- package/dist/components/select.js +287 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.d.ts +11 -0
- package/dist/components/separator.js +24 -0
- package/dist/components/separator.js.map +1 -0
- package/dist/components/sheet.d.ts +112 -0
- package/dist/components/sheet.js +600 -0
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/sidebar.d.ts +77 -0
- package/dist/components/sidebar.js +1217 -0
- package/dist/components/sidebar.js.map +1 -0
- package/dist/components/skeleton.d.ts +7 -0
- package/dist/components/skeleton.js +16 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/sonner.d.ts +10 -0
- package/dist/components/sonner.js +23 -0
- package/dist/components/sonner.js.map +1 -0
- package/dist/components/stack/index.d.ts +663 -0
- package/dist/components/stack/index.js +1418 -0
- package/dist/components/stack/index.js.map +1 -0
- package/dist/components/stepper.d.ts +30 -0
- package/dist/components/stepper.js +280 -0
- package/dist/components/stepper.js.map +1 -0
- package/dist/components/switch.d.ts +8 -0
- package/dist/components/switch.js +40 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table.d.ts +15 -0
- package/dist/components/table.js +65 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.d.ts +10 -0
- package/dist/components/tabs.js +48 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/tags.d.ts +42 -0
- package/dist/components/tags.js +728 -0
- package/dist/components/tags.js.map +1 -0
- package/dist/components/textarea.d.ts +10 -0
- package/dist/components/textarea.js +54 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/toast/index.d.ts +52 -0
- package/dist/components/toast/index.js +221 -0
- package/dist/components/toast/index.js.map +1 -0
- package/dist/components/tooltip.d.ts +29 -0
- package/dist/components/tooltip.js +174 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/components/unlink-button.d.ts +14 -0
- package/dist/components/unlink-button.js +91 -0
- package/dist/components/unlink-button.js.map +1 -0
- package/dist/index.cjs +7692 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2157 -0
- package/dist/index.d.ts +2157 -0
- package/dist/index.js +7375 -0
- package/dist/index.js.map +1 -0
- package/package.json +490 -0
- package/src/styles/globals.css +397 -0
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Combobox as Combobox$1 } from '@base-ui/react/combobox';
|
|
3
|
+
import { ChevronsUpDownIcon, XIcon } from 'lucide-react';
|
|
4
|
+
import * as React3 from 'react';
|
|
5
|
+
import { clsx } from 'clsx';
|
|
6
|
+
import { twMerge } from 'tailwind-merge';
|
|
7
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
|
+
import { Input as Input$1 } from '@base-ui/react/input';
|
|
9
|
+
import { ScrollArea as ScrollArea$1 } from '@base-ui/react/scroll-area';
|
|
10
|
+
|
|
11
|
+
function cn(...inputs) {
|
|
12
|
+
return twMerge(clsx(inputs));
|
|
13
|
+
}
|
|
14
|
+
var PORTAL_ROOT_ID = "portal-root";
|
|
15
|
+
var PortalContext = React3.createContext({
|
|
16
|
+
layer: "base",
|
|
17
|
+
depth: 0,
|
|
18
|
+
floatingPortalStrategy: "root",
|
|
19
|
+
floatingZIndex: "default"
|
|
20
|
+
});
|
|
21
|
+
function useRootPortalContainer() {
|
|
22
|
+
const [container, setContainer] = React3.useState(null);
|
|
23
|
+
React3.useLayoutEffect(() => {
|
|
24
|
+
const el = document.getElementById(PORTAL_ROOT_ID);
|
|
25
|
+
setContainer(el);
|
|
26
|
+
}, []);
|
|
27
|
+
return container;
|
|
28
|
+
}
|
|
29
|
+
function useFloatingOverlayPortalProps() {
|
|
30
|
+
const rootContainer = useRootPortalContainer();
|
|
31
|
+
const { floatingPortalStrategy, floatingZIndex } = React3.useContext(PortalContext);
|
|
32
|
+
const container = floatingPortalStrategy === "nested" ? void 0 : rootContainer ?? null;
|
|
33
|
+
const zIndexClass = floatingZIndex === "elevated" ? "z-[var(--z-layer-floating-elevated)]" : "z-[var(--z-layer-floating)]";
|
|
34
|
+
return { container, zIndexClass };
|
|
35
|
+
}
|
|
36
|
+
function Input({ className, size = "default", unstyled = false, ...props }) {
|
|
37
|
+
const isFloating = props.placeholder === " ";
|
|
38
|
+
return /* @__PURE__ */ jsx(
|
|
39
|
+
"span",
|
|
40
|
+
{
|
|
41
|
+
className: cn(
|
|
42
|
+
!unstyled && [
|
|
43
|
+
// Base layout
|
|
44
|
+
"relative inline-flex w-full rounded-lg border border-input bg-background bg-clip-padding text-base shadow-xs transition-shadow",
|
|
45
|
+
// Inner shadow highlight
|
|
46
|
+
"before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)]",
|
|
47
|
+
"not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)]",
|
|
48
|
+
// Focus state - use primary brand color
|
|
49
|
+
"has-focus-visible:border-primary/60 has-focus-visible:ring-[3px] has-focus-visible:ring-primary/35",
|
|
50
|
+
// Invalid state
|
|
51
|
+
"has-aria-invalid:border-destructive/36",
|
|
52
|
+
"has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16",
|
|
53
|
+
// Disabled state
|
|
54
|
+
"has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none",
|
|
55
|
+
// Dark mode
|
|
56
|
+
"sm:text-sm dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border",
|
|
57
|
+
"dark:has-aria-invalid:ring-destructive/24",
|
|
58
|
+
"dark:not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/8%)]"
|
|
59
|
+
],
|
|
60
|
+
className
|
|
61
|
+
) || void 0,
|
|
62
|
+
"data-size": size,
|
|
63
|
+
"data-slot": "input-control",
|
|
64
|
+
children: /* @__PURE__ */ jsx(
|
|
65
|
+
Input$1,
|
|
66
|
+
{
|
|
67
|
+
className: cn(
|
|
68
|
+
"w-full min-w-0 rounded-[inherit] bg-transparent px-[calc(--spacing(3)-1px)] outline-none",
|
|
69
|
+
isFloating ? "h-11 pt-4.5 pb-1 leading-none placeholder:text-transparent sm:h-10" : "h-8.5 leading-8.5 placeholder:text-muted-foreground/72 sm:h-7.5 sm:leading-7.5",
|
|
70
|
+
size === "sm" && (isFloating ? "h-10 px-[calc(--spacing(2.5)-1px)] pt-4 pb-1 sm:h-9" : "h-7.5 px-[calc(--spacing(2.5)-1px)] leading-7.5 sm:h-6.5 sm:leading-6.5"),
|
|
71
|
+
size === "lg" && (isFloating ? "h-12 pt-5 pb-1.5 sm:h-11" : "h-9.5 leading-9.5 sm:h-8.5 sm:leading-8.5"),
|
|
72
|
+
props.type === "search" && "[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-webkit-search-results-button]:appearance-none [&::-webkit-search-results-decoration]:appearance-none",
|
|
73
|
+
props.type === "file" && "text-muted-foreground file:me-3 file:bg-transparent file:font-medium file:text-foreground file:text-sm"
|
|
74
|
+
),
|
|
75
|
+
"data-slot": "input",
|
|
76
|
+
size: typeof size === "number" ? size : void 0,
|
|
77
|
+
...props
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
var ScrollArea = React3.forwardRef(
|
|
84
|
+
({ className, children, scrollFade = false, scrollbarGutter = false, ...props }, ref) => {
|
|
85
|
+
return /* @__PURE__ */ jsxs(
|
|
86
|
+
ScrollArea$1.Root,
|
|
87
|
+
{
|
|
88
|
+
ref,
|
|
89
|
+
className: cn("size-full min-h-0", className),
|
|
90
|
+
...props,
|
|
91
|
+
children: [
|
|
92
|
+
/* @__PURE__ */ jsx(
|
|
93
|
+
ScrollArea$1.Viewport,
|
|
94
|
+
{
|
|
95
|
+
className: cn(
|
|
96
|
+
"h-full overscroll-contain rounded-[inherit] outline-none transition-shadows focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",
|
|
97
|
+
scrollFade && "mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] [--fade-size:1.5rem]",
|
|
98
|
+
scrollbarGutter && "data-has-overflow-y:pe-2.5 data-has-overflow-x:pb-2.5"
|
|
99
|
+
),
|
|
100
|
+
"data-slot": "scroll-area-viewport",
|
|
101
|
+
children
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
/* @__PURE__ */ jsx(ScrollBar, { orientation: "vertical" }),
|
|
105
|
+
/* @__PURE__ */ jsx(ScrollBar, { orientation: "horizontal" }),
|
|
106
|
+
/* @__PURE__ */ jsx(ScrollArea$1.Corner, { "data-slot": "scroll-area-corner" })
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
ScrollArea.displayName = "ScrollArea";
|
|
113
|
+
function ScrollBar({
|
|
114
|
+
className,
|
|
115
|
+
orientation = "vertical",
|
|
116
|
+
...props
|
|
117
|
+
}) {
|
|
118
|
+
return /* @__PURE__ */ jsx(
|
|
119
|
+
ScrollArea$1.Scrollbar,
|
|
120
|
+
{
|
|
121
|
+
className: cn(
|
|
122
|
+
"m-1 flex opacity-0 transition-opacity delay-300 data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:flex-col data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-100 data-scrolling:duration-100",
|
|
123
|
+
className
|
|
124
|
+
),
|
|
125
|
+
"data-slot": "scroll-area-scrollbar",
|
|
126
|
+
orientation,
|
|
127
|
+
...props,
|
|
128
|
+
children: /* @__PURE__ */ jsx(
|
|
129
|
+
ScrollArea$1.Thumb,
|
|
130
|
+
{
|
|
131
|
+
className: "relative flex-1 rounded-full bg-foreground/20",
|
|
132
|
+
"data-slot": "scroll-area-thumb"
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
var ComboboxContext = React3.createContext({
|
|
139
|
+
chipsRef: null,
|
|
140
|
+
multiple: false
|
|
141
|
+
});
|
|
142
|
+
function Combobox(props) {
|
|
143
|
+
const chipsRef = React3.useRef(null);
|
|
144
|
+
return /* @__PURE__ */ jsx(ComboboxContext.Provider, { value: { chipsRef, multiple: !!props.multiple }, children: /* @__PURE__ */ jsx(
|
|
145
|
+
Combobox$1.Root,
|
|
146
|
+
{
|
|
147
|
+
...props
|
|
148
|
+
}
|
|
149
|
+
) });
|
|
150
|
+
}
|
|
151
|
+
function ComboboxInput({
|
|
152
|
+
className,
|
|
153
|
+
showTrigger = true,
|
|
154
|
+
showClear = false,
|
|
155
|
+
startAddon,
|
|
156
|
+
size,
|
|
157
|
+
...props
|
|
158
|
+
}) {
|
|
159
|
+
const { multiple } = React3.useContext(ComboboxContext);
|
|
160
|
+
const sizeValue = size ?? "default";
|
|
161
|
+
if (multiple) {
|
|
162
|
+
return /* @__PURE__ */ jsx(
|
|
163
|
+
Combobox$1.Input,
|
|
164
|
+
{
|
|
165
|
+
className: cn(
|
|
166
|
+
"min-w-12 flex-1 text-base outline-none sm:text-sm [[data-slot=combobox-chip]+&]:ps-0.5",
|
|
167
|
+
sizeValue === "sm" ? "ps-1.5" : "ps-2",
|
|
168
|
+
className
|
|
169
|
+
),
|
|
170
|
+
"data-size": typeof sizeValue === "string" ? sizeValue : void 0,
|
|
171
|
+
"data-slot": "combobox-input",
|
|
172
|
+
size: typeof sizeValue === "number" ? sizeValue : void 0,
|
|
173
|
+
...props
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
return /* @__PURE__ */ jsxs("div", { className: "relative not-has-[>*.w-full]:w-fit w-full has-disabled:opacity-64", children: [
|
|
178
|
+
startAddon && /* @__PURE__ */ jsx(
|
|
179
|
+
"div",
|
|
180
|
+
{
|
|
181
|
+
"aria-hidden": "true",
|
|
182
|
+
className: "[&_svg]:-mx-0.5 pointer-events-none absolute inset-y-0 start-px z-10 flex items-center ps-[calc(--spacing(3)-1px)] opacity-80 has-[+[data-size=sm]]:ps-[calc(--spacing(2.5)-1px)] [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4",
|
|
183
|
+
"data-slot": "combobox-start-addon",
|
|
184
|
+
children: startAddon
|
|
185
|
+
}
|
|
186
|
+
),
|
|
187
|
+
/* @__PURE__ */ jsx(
|
|
188
|
+
Combobox$1.Input,
|
|
189
|
+
{
|
|
190
|
+
className: cn(
|
|
191
|
+
startAddon && "data-[size=sm]:*:data-[slot=combobox-input]:ps-[calc(--spacing(7.5)-1px)] *:data-[slot=combobox-input]:ps-[calc(--spacing(8.5)-1px)] sm:data-[size=sm]:*:data-[slot=combobox-input]:ps-[calc(--spacing(7)-1px)] sm:*:data-[slot=combobox-input]:ps-[calc(--spacing(8)-1px)]",
|
|
192
|
+
sizeValue === "sm" ? "has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-6.5" : "has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-7",
|
|
193
|
+
className
|
|
194
|
+
),
|
|
195
|
+
"data-slot": "combobox-input",
|
|
196
|
+
render: /* @__PURE__ */ jsx(Input, { className: "has-disabled:opacity-100", size: sizeValue }),
|
|
197
|
+
...props
|
|
198
|
+
}
|
|
199
|
+
),
|
|
200
|
+
showTrigger && /* @__PURE__ */ jsx(
|
|
201
|
+
ComboboxTrigger,
|
|
202
|
+
{
|
|
203
|
+
className: cn(
|
|
204
|
+
"-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-opacity pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
205
|
+
sizeValue === "sm" ? "end-0" : "end-0.5"
|
|
206
|
+
),
|
|
207
|
+
children: /* @__PURE__ */ jsx(ChevronsUpDownIcon, {})
|
|
208
|
+
}
|
|
209
|
+
),
|
|
210
|
+
showClear && /* @__PURE__ */ jsx(
|
|
211
|
+
ComboboxClear,
|
|
212
|
+
{
|
|
213
|
+
className: cn(
|
|
214
|
+
"-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-opacity pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
215
|
+
sizeValue === "sm" ? "end-0" : "end-0.5"
|
|
216
|
+
),
|
|
217
|
+
children: /* @__PURE__ */ jsx(XIcon, {})
|
|
218
|
+
}
|
|
219
|
+
)
|
|
220
|
+
] });
|
|
221
|
+
}
|
|
222
|
+
function ComboboxTrigger({
|
|
223
|
+
className,
|
|
224
|
+
...props
|
|
225
|
+
}) {
|
|
226
|
+
return /* @__PURE__ */ jsx(
|
|
227
|
+
Combobox$1.Trigger,
|
|
228
|
+
{
|
|
229
|
+
className,
|
|
230
|
+
"data-slot": "combobox-trigger",
|
|
231
|
+
...props
|
|
232
|
+
}
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
function ComboboxPopup({
|
|
236
|
+
className,
|
|
237
|
+
children,
|
|
238
|
+
sideOffset = 4,
|
|
239
|
+
...props
|
|
240
|
+
}) {
|
|
241
|
+
const { chipsRef, multiple } = React3.useContext(ComboboxContext);
|
|
242
|
+
const { container, zIndexClass } = useFloatingOverlayPortalProps();
|
|
243
|
+
return /* @__PURE__ */ jsx(Combobox$1.Portal, { container, children: /* @__PURE__ */ jsx(
|
|
244
|
+
Combobox$1.Positioner,
|
|
245
|
+
{
|
|
246
|
+
...multiple ? { anchor: chipsRef } : {},
|
|
247
|
+
className: cn("select-none", zIndexClass),
|
|
248
|
+
"data-slot": "combobox-positioner",
|
|
249
|
+
sideOffset,
|
|
250
|
+
children: /* @__PURE__ */ jsx(
|
|
251
|
+
"span",
|
|
252
|
+
{
|
|
253
|
+
className: cn(
|
|
254
|
+
"relative flex max-h-full origin-(--transform-origin) rounded-lg border bg-popover not-dark:bg-clip-padding shadow-lg/5 transition-[scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/6%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]",
|
|
255
|
+
className
|
|
256
|
+
),
|
|
257
|
+
children: /* @__PURE__ */ jsx(
|
|
258
|
+
Combobox$1.Popup,
|
|
259
|
+
{
|
|
260
|
+
className: "flex max-h-[min(var(--available-height),23rem)] w-(--anchor-width) max-w-(--available-width) flex-col",
|
|
261
|
+
"data-slot": "combobox-popup",
|
|
262
|
+
...props,
|
|
263
|
+
children
|
|
264
|
+
}
|
|
265
|
+
)
|
|
266
|
+
}
|
|
267
|
+
)
|
|
268
|
+
}
|
|
269
|
+
) });
|
|
270
|
+
}
|
|
271
|
+
function ComboboxItem({
|
|
272
|
+
className,
|
|
273
|
+
children,
|
|
274
|
+
...props
|
|
275
|
+
}) {
|
|
276
|
+
return /* @__PURE__ */ jsxs(
|
|
277
|
+
Combobox$1.Item,
|
|
278
|
+
{
|
|
279
|
+
className: cn(
|
|
280
|
+
"grid min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default grid-cols-[1rem_1fr] items-center gap-2 rounded-sm py-1 ps-2 pe-4 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
281
|
+
className
|
|
282
|
+
),
|
|
283
|
+
"data-slot": "combobox-item",
|
|
284
|
+
...props,
|
|
285
|
+
children: [
|
|
286
|
+
/* @__PURE__ */ jsx(Combobox$1.ItemIndicator, { className: "col-start-1", children: /* @__PURE__ */ jsx(
|
|
287
|
+
"svg",
|
|
288
|
+
{
|
|
289
|
+
fill: "none",
|
|
290
|
+
height: "24",
|
|
291
|
+
stroke: "currentColor",
|
|
292
|
+
strokeLinecap: "round",
|
|
293
|
+
strokeLinejoin: "round",
|
|
294
|
+
strokeWidth: "2",
|
|
295
|
+
viewBox: "0 0 24 24",
|
|
296
|
+
width: "24",
|
|
297
|
+
xmlns: "http://www.w3.org/1500/svg",
|
|
298
|
+
children: /* @__PURE__ */ jsx("path", { d: "M5.252 12.7 10.2 18.63 18.748 5.37" })
|
|
299
|
+
}
|
|
300
|
+
) }),
|
|
301
|
+
/* @__PURE__ */ jsx("div", { className: "col-start-2", children })
|
|
302
|
+
]
|
|
303
|
+
}
|
|
304
|
+
);
|
|
305
|
+
}
|
|
306
|
+
function ComboboxSeparator({
|
|
307
|
+
className,
|
|
308
|
+
...props
|
|
309
|
+
}) {
|
|
310
|
+
return /* @__PURE__ */ jsx(
|
|
311
|
+
Combobox$1.Separator,
|
|
312
|
+
{
|
|
313
|
+
className: cn("mx-2 my-1 h-px bg-border last:hidden", className),
|
|
314
|
+
"data-slot": "combobox-separator",
|
|
315
|
+
...props
|
|
316
|
+
}
|
|
317
|
+
);
|
|
318
|
+
}
|
|
319
|
+
function ComboboxGroup({ className, ...props }) {
|
|
320
|
+
return /* @__PURE__ */ jsx(
|
|
321
|
+
Combobox$1.Group,
|
|
322
|
+
{
|
|
323
|
+
className: cn("[[role=group]+&]:mt-1.5", className),
|
|
324
|
+
"data-slot": "combobox-group",
|
|
325
|
+
...props
|
|
326
|
+
}
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
function ComboboxGroupLabel({
|
|
330
|
+
className,
|
|
331
|
+
...props
|
|
332
|
+
}) {
|
|
333
|
+
return /* @__PURE__ */ jsx(
|
|
334
|
+
Combobox$1.GroupLabel,
|
|
335
|
+
{
|
|
336
|
+
className: cn(
|
|
337
|
+
"px-2 py-1.5 font-medium text-muted-foreground text-xs",
|
|
338
|
+
className
|
|
339
|
+
),
|
|
340
|
+
"data-slot": "combobox-group-label",
|
|
341
|
+
...props
|
|
342
|
+
}
|
|
343
|
+
);
|
|
344
|
+
}
|
|
345
|
+
function ComboboxEmpty({ className, ...props }) {
|
|
346
|
+
return /* @__PURE__ */ jsx(
|
|
347
|
+
Combobox$1.Empty,
|
|
348
|
+
{
|
|
349
|
+
className: cn(
|
|
350
|
+
"not-empty:p-2 text-center text-base text-muted-foreground sm:text-sm",
|
|
351
|
+
className
|
|
352
|
+
),
|
|
353
|
+
"data-slot": "combobox-empty",
|
|
354
|
+
...props
|
|
355
|
+
}
|
|
356
|
+
);
|
|
357
|
+
}
|
|
358
|
+
function ComboboxRow({ className, ...props }) {
|
|
359
|
+
return /* @__PURE__ */ jsx(
|
|
360
|
+
Combobox$1.Row,
|
|
361
|
+
{
|
|
362
|
+
className,
|
|
363
|
+
"data-slot": "combobox-row",
|
|
364
|
+
...props
|
|
365
|
+
}
|
|
366
|
+
);
|
|
367
|
+
}
|
|
368
|
+
function ComboboxValue({ ...props }) {
|
|
369
|
+
return /* @__PURE__ */ jsx(Combobox$1.Value, { "data-slot": "combobox-value", ...props });
|
|
370
|
+
}
|
|
371
|
+
function ComboboxList({ className, ...props }) {
|
|
372
|
+
return /* @__PURE__ */ jsx(ScrollArea, { scrollbarGutter: true, scrollFade: true, children: /* @__PURE__ */ jsx(
|
|
373
|
+
Combobox$1.List,
|
|
374
|
+
{
|
|
375
|
+
className: cn(
|
|
376
|
+
"not-empty:scroll-py-1 not-empty:px-1 not-empty:py-1 in-data-has-overflow-y:pe-3",
|
|
377
|
+
className
|
|
378
|
+
),
|
|
379
|
+
"data-slot": "combobox-list",
|
|
380
|
+
...props
|
|
381
|
+
}
|
|
382
|
+
) });
|
|
383
|
+
}
|
|
384
|
+
function ComboboxClear({ className, ...props }) {
|
|
385
|
+
return /* @__PURE__ */ jsx(
|
|
386
|
+
Combobox$1.Clear,
|
|
387
|
+
{
|
|
388
|
+
className,
|
|
389
|
+
"data-slot": "combobox-clear",
|
|
390
|
+
...props
|
|
391
|
+
}
|
|
392
|
+
);
|
|
393
|
+
}
|
|
394
|
+
function ComboboxStatus({
|
|
395
|
+
className,
|
|
396
|
+
...props
|
|
397
|
+
}) {
|
|
398
|
+
return /* @__PURE__ */ jsx(
|
|
399
|
+
Combobox$1.Status,
|
|
400
|
+
{
|
|
401
|
+
className: cn(
|
|
402
|
+
"px-3 py-2 font-medium text-muted-foreground text-xs empty:m-0 empty:p-0",
|
|
403
|
+
className
|
|
404
|
+
),
|
|
405
|
+
"data-slot": "combobox-status",
|
|
406
|
+
...props
|
|
407
|
+
}
|
|
408
|
+
);
|
|
409
|
+
}
|
|
410
|
+
function ComboboxCollection(props) {
|
|
411
|
+
return /* @__PURE__ */ jsx(Combobox$1.Collection, { "data-slot": "combobox-collection", ...props });
|
|
412
|
+
}
|
|
413
|
+
function ComboboxChips({
|
|
414
|
+
className,
|
|
415
|
+
children,
|
|
416
|
+
startAddon,
|
|
417
|
+
...props
|
|
418
|
+
}) {
|
|
419
|
+
const { chipsRef } = React3.useContext(ComboboxContext);
|
|
420
|
+
return /* @__PURE__ */ jsxs(
|
|
421
|
+
Combobox$1.Chips,
|
|
422
|
+
{
|
|
423
|
+
className: cn(
|
|
424
|
+
"relative inline-flex min-h-9 w-full flex-wrap gap-1 rounded-lg border border-input bg-background not-dark:bg-clip-padding p-[calc(--spacing(1)-1px)] text-base shadow-xs/5 outline-none ring-ring/24 transition-shadow *:min-h-7 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/6%)] focus-within:border-ring focus-within:ring-[3px] has-disabled:pointer-events-none has-data-[size=lg]:min-h-10 has-data-[size=sm]:min-h-8 has-aria-invalid:border-destructive/36 has-disabled:opacity-64 has-[:disabled,:focus-within,[aria-invalid]]:shadow-none focus-within:has-aria-invalid:border-destructive/64 focus-within:has-aria-invalid:ring-destructive/16 has-data-[size=lg]:*:min-h-8 has-data-[size=sm]:*:min-h-6 sm:min-h-8 sm:text-sm sm:has-data-[size=lg]:min-h-9 sm:has-data-[size=sm]:min-h-7 sm:*:min-h-6 sm:has-data-[size=lg]:*:min-h-7 sm:has-data-[size=sm]:*:min-h-5 dark:not-has-disabled:bg-input/32 dark:has-aria-invalid:ring-destructive/24 dark:not-has-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]",
|
|
425
|
+
className
|
|
426
|
+
),
|
|
427
|
+
"data-slot": "combobox-chips",
|
|
428
|
+
onMouseDown: (e) => {
|
|
429
|
+
const target = e.target;
|
|
430
|
+
const isChip = target.closest('[data-slot="combobox-chip"]');
|
|
431
|
+
if (isChip || !chipsRef?.current) return;
|
|
432
|
+
e.preventDefault();
|
|
433
|
+
const input = chipsRef.current.querySelector("input");
|
|
434
|
+
if (input && !chipsRef.current.querySelector("input:focus")) {
|
|
435
|
+
input.focus();
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
ref: chipsRef,
|
|
439
|
+
...props,
|
|
440
|
+
children: [
|
|
441
|
+
startAddon && /* @__PURE__ */ jsx(
|
|
442
|
+
"div",
|
|
443
|
+
{
|
|
444
|
+
"aria-hidden": "true",
|
|
445
|
+
className: "[&_svg]:-ms-0.5 [&_svg]:-me-1.5 flex shrink-0 items-center ps-2 opacity-80 has-[~[data-size=sm]]:has-[+[data-slot=combobox-chip]]:pe-1.5 has-[~[data-size=sm]]:ps-1.5 has-[+[data-slot=combobox-chip]]:pe-2 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
|
|
446
|
+
"data-slot": "combobox-start-addon",
|
|
447
|
+
children: startAddon
|
|
448
|
+
}
|
|
449
|
+
),
|
|
450
|
+
children
|
|
451
|
+
]
|
|
452
|
+
}
|
|
453
|
+
);
|
|
454
|
+
}
|
|
455
|
+
function ComboboxChip({ children, ...props }) {
|
|
456
|
+
return /* @__PURE__ */ jsxs(
|
|
457
|
+
Combobox$1.Chip,
|
|
458
|
+
{
|
|
459
|
+
className: "flex items-center rounded-[calc(var(--radius-md)-1px)] bg-accent ps-2 font-medium text-accent-foreground text-sm outline-none sm:text-xs/(--text-xs--line-height) [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5",
|
|
460
|
+
"data-slot": "combobox-chip",
|
|
461
|
+
...props,
|
|
462
|
+
children: [
|
|
463
|
+
children,
|
|
464
|
+
/* @__PURE__ */ jsx(ComboboxChipRemove, {})
|
|
465
|
+
]
|
|
466
|
+
}
|
|
467
|
+
);
|
|
468
|
+
}
|
|
469
|
+
function ComboboxChipRemove(props) {
|
|
470
|
+
return /* @__PURE__ */ jsx(
|
|
471
|
+
Combobox$1.ChipRemove,
|
|
472
|
+
{
|
|
473
|
+
"aria-label": "Remove",
|
|
474
|
+
className: "h-full shrink-0 cursor-pointer px-1.5 opacity-80 hover:opacity-100 [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5",
|
|
475
|
+
"data-slot": "combobox-chip-remove",
|
|
476
|
+
...props,
|
|
477
|
+
children: /* @__PURE__ */ jsx(XIcon, {})
|
|
478
|
+
}
|
|
479
|
+
);
|
|
480
|
+
}
|
|
481
|
+
var useComboboxFilter = Combobox$1.useFilter;
|
|
482
|
+
var ComboboxContent = ComboboxPopup;
|
|
483
|
+
|
|
484
|
+
export { Combobox, ComboboxChip, ComboboxChips, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxList, ComboboxPopup, ComboboxRow, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue, useComboboxFilter };
|
|
485
|
+
//# sourceMappingURL=combobox.js.map
|
|
486
|
+
//# sourceMappingURL=combobox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utils.ts","../../src/components/portal.tsx","../../src/components/input.tsx","../../src/components/scroll-area.tsx","../../src/components/combobox.tsx"],"names":["React","jsx","InputPrimitive","React2","ScrollAreaPr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AA,GAAkB","file":"combobox.js","sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","'use client';\n\nimport * as React from 'react';\n\n// ============================================================================\n// Types\n// ============================================================================\n\n/**\n * Overlay layer type:\n * - 'base': Root level (page content, base floating elements)\n * - 'modal': Inside a modal overlay (dialog, sheet, drawer)\n */\nexport type OverlayLayer = 'base' | 'modal';\n\n/**\n * Where floating overlays should portal:\n * - 'root': always portal into #portal-root\n * - 'nested': let Base UI nest portals into the nearest Base UI portal node\n */\nexport type FloatingPortalStrategy = 'root' | 'nested';\n\n/**\n * Z-index mode for floating overlays.\n * - 'default': --z-layer-floating\n * - 'elevated': --z-layer-floating-elevated\n */\nexport type FloatingZIndex = 'default' | 'elevated';\n\ninterface PortalContextValue {\n\t/** Current overlay layer */\n\tlayer: OverlayLayer;\n\t/** Modal nesting depth (0 for first modal, 1 for nested, etc.) */\n\tdepth: number;\n\t/** Strategy for where floating overlays should portal */\n\tfloatingPortalStrategy: FloatingPortalStrategy;\n\t/** Z-index mode for floating overlays */\n\tfloatingZIndex: FloatingZIndex;\n}\n\n// ============================================================================\n// Constants\n// ============================================================================\n\nexport const PORTAL_ROOT_ID = 'portal-root';\n\n// ============================================================================\n// Context\n// ============================================================================\n\nconst PortalContext = React.createContext<PortalContextValue>({\n\tlayer: 'base',\n\tdepth: 0,\n\tfloatingPortalStrategy: 'root',\n\tfloatingZIndex: 'default',\n});\n\n// ============================================================================\n// Providers\n// ============================================================================\n\n/**\n * Provider for modal overlays (Dialog, Sheet, Drawer, etc.)\n *\n * Wraps modal content to:\n * 1. Create a scoped portal container for nested floating elements\n * 2. Track the overlay layer (so floating elements know to use elevated z-index)\n * 3. Track nesting depth for stacked modals\n *\n * Usage:\n * ```tsx\n * <DialogPopup>\n * <ModalPortalScope>\n * {children} // Popovers inside here will render in the scoped container\n * </ModalPortalScope>\n * </DialogPopup>\n * ```\n */\nexport function ModalPortalScope({\n\tchildren,\n\tfloatingPortalStrategy = 'nested',\n\tfloatingZIndex = 'default',\n}: {\n\tchildren: React.ReactNode;\n\tfloatingPortalStrategy?: FloatingPortalStrategy;\n\tfloatingZIndex?: FloatingZIndex;\n}) {\n\tconst parentContext = React.useContext(PortalContext);\n\n\t// Increment depth from parent if already in modal layer\n\tconst depth = parentContext.layer === 'modal' ? parentContext.depth + 1 : 0;\n\n\tconst value = React.useMemo<PortalContextValue>(\n\t\t() => ({\n\t\t\tlayer: 'modal',\n\t\t\tdepth,\n\t\t\tfloatingPortalStrategy,\n\t\t\tfloatingZIndex,\n\t\t}),\n\t\t[depth, floatingPortalStrategy, floatingZIndex],\n\t);\n\n\treturn <PortalContext.Provider value={value}>{children}</PortalContext.Provider>;\n}\n\n// ============================================================================\n// Hooks\n// ============================================================================\n\n/**\n * Get the current portal context value.\n * Used internally by other hooks.\n */\nexport function usePortalContext(): PortalContextValue {\n\treturn React.useContext(PortalContext);\n}\n\nexport function useInModalOverlay(): boolean {\n\treturn React.useContext(PortalContext).layer === 'modal';\n}\n\n/**\n * Get the root portal container element.\n * Used by modal components (Dialog, Sheet, etc.) to render their portals.\n *\n * @returns The root portal container, or null during SSR/before mount\n */\nexport function useRootPortalContainer(): HTMLElement | null {\n\tconst [container, setContainer] = React.useState<HTMLElement | null>(null);\n\n\tReact.useLayoutEffect(() => {\n\t\tconst el = document.getElementById(PORTAL_ROOT_ID);\n\t\tsetContainer(el);\n\t}, []);\n\n\treturn container;\n}\n\n/**\n * Centralized portal + z-index policy for floating overlays.\n *\n * - When `floatingPortalStrategy` is 'nested', Base UI will automatically portal\n * into the nearest Base UI portal node (so dialog \"inert\" behavior includes it).\n * - When it's 'root', we portal into #portal-root.\n */\nexport function useFloatingOverlayPortalProps(): {\n\tcontainer?: HTMLElement | null;\n\tzIndexClass: string;\n} {\n\tconst rootContainer = useRootPortalContainer();\n\tconst { floatingPortalStrategy, floatingZIndex } = React.useContext(PortalContext);\n\n\tconst container = floatingPortalStrategy === 'nested' ? undefined : (rootContainer ?? null);\n\tconst zIndexClass =\n\t\tfloatingZIndex === 'elevated'\n\t\t\t? 'z-[var(--z-layer-floating-elevated)]'\n\t\t\t: 'z-[var(--z-layer-floating)]';\n\n\treturn { container, zIndexClass };\n}\n\n// ============================================================================\n// Components\n// ============================================================================\n\n/**\n * Portal root component to render in app layout.\n * All overlay components will render their portals inside this container.\n *\n * Usage in layout.tsx:\n * ```tsx\n * import { PortalRoot } from '@constructive-io/ui/portal';\n *\n * export default function RootLayout({ children }) {\n * return (\n * <html>\n * <body>\n * {children}\n * <PortalRoot />\n * </body>\n * </html>\n * );\n * }\n * ```\n */\nexport function PortalRoot() {\n\treturn (\n\t\t<div\n\t\t\tid={PORTAL_ROOT_ID}\n\t\t\tdata-slot='portal-root'\n\t\t\tstyle={{\n\t\t\t\tposition: 'fixed',\n\t\t\t\tinset: 0,\n\t\t\t\tzIndex: 'var(--z-layer-portal-root)',\n\t\t\t\tpointerEvents: 'none',\n\t\t\t\t// Children (portal contents) will have pointer-events: auto\n\t\t\t}}\n\t\t/>\n\t);\n}\n\n/**\n * Hook to get the portal container element for rendering floating UI elements.\n * Returns the element with id=\"portal-root\" if it exists in the DOM.\n *\n * @deprecated Use useRootPortalContainer or useFloatingOverlayPortalProps instead\n */\nexport function usePortalContainer(): HTMLElement | undefined {\n\tif (typeof document === 'undefined') return undefined;\n\tconst el = document.getElementById(PORTAL_ROOT_ID);\n\treturn el instanceof HTMLElement ? el : undefined;\n}\n","'use client';\n\nimport { Input as InputPrimitive } from '@base-ui/react/input';\nimport type * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\ntype InputProps = Omit<InputPrimitive.Props & React.RefAttributes<HTMLInputElement>, 'size'> & {\n\tsize?: 'sm' | 'default' | 'lg' | number;\n\tunstyled?: boolean;\n};\n\nfunction Input({ className, size = 'default', unstyled = false, ...props }: InputProps) {\n\tconst isFloating = props.placeholder === ' ';\n\n\treturn (\n\t\t<span\n\t\t\tclassName={\n\t\t\t\tcn(\n\t\t\t\t\t!unstyled && [\n\t\t\t\t\t\t// Base layout\n\t\t\t\t\t\t'relative inline-flex w-full rounded-lg border border-input bg-background bg-clip-padding text-base shadow-xs transition-shadow',\n\t\t\t\t\t\t// Inner shadow highlight\n\t\t\t\t\t\t'before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)]',\n\t\t\t\t\t\t'not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)]',\n\t\t\t\t\t\t// Focus state - use primary brand color\n\t\t\t\t\t\t'has-focus-visible:border-primary/60 has-focus-visible:ring-[3px] has-focus-visible:ring-primary/35',\n\t\t\t\t\t\t// Invalid state\n\t\t\t\t\t\t'has-aria-invalid:border-destructive/36',\n\t\t\t\t\t\t'has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16',\n\t\t\t\t\t\t// Disabled state\n\t\t\t\t\t\t'has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none',\n\t\t\t\t\t\t// Dark mode\n\t\t\t\t\t\t'sm:text-sm dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border',\n\t\t\t\t\t\t'dark:has-aria-invalid:ring-destructive/24',\n\t\t\t\t\t\t'dark:not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/8%)]',\n\t\t\t\t\t],\n\t\t\t\t\tclassName,\n\t\t\t\t) || undefined\n\t\t\t}\n\t\t\tdata-size={size}\n\t\t\tdata-slot=\"input-control\"\n\t\t>\n\t\t\t<InputPrimitive\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'w-full min-w-0 rounded-[inherit] bg-transparent px-[calc(--spacing(3)-1px)] outline-none',\n\t\t\t\t\tisFloating\n\t\t\t\t\t\t? 'h-11 pt-4.5 pb-1 leading-none placeholder:text-transparent sm:h-10'\n\t\t\t\t\t\t: 'h-8.5 leading-8.5 placeholder:text-muted-foreground/72 sm:h-7.5 sm:leading-7.5',\n\t\t\t\t\tsize === 'sm' &&\n\t\t\t\t\t\t(isFloating\n\t\t\t\t\t\t\t? 'h-10 px-[calc(--spacing(2.5)-1px)] pt-4 pb-1 sm:h-9'\n\t\t\t\t\t\t\t: 'h-7.5 px-[calc(--spacing(2.5)-1px)] leading-7.5 sm:h-6.5 sm:leading-6.5'),\n\t\t\t\t\tsize === 'lg' &&\n\t\t\t\t\t\t(isFloating ? 'h-12 pt-5 pb-1.5 sm:h-11' : 'h-9.5 leading-9.5 sm:h-8.5 sm:leading-8.5'),\n\t\t\t\t\tprops.type === 'search' &&\n\t\t\t\t\t\t'[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-webkit-search-results-button]:appearance-none [&::-webkit-search-results-decoration]:appearance-none',\n\t\t\t\t\tprops.type === 'file' &&\n\t\t\t\t\t\t'text-muted-foreground file:me-3 file:bg-transparent file:font-medium file:text-foreground file:text-sm',\n\t\t\t\t)}\n\t\t\t\tdata-slot=\"input\"\n\t\t\t\tsize={typeof size === 'number' ? size : undefined}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</span>\n\t);\n}\n\nexport { Input };\nexport type { InputProps };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { ScrollArea as ScrollAreaPrimitive } from \"@base-ui/react/scroll-area\";\n\nimport { cn } from \"../lib/utils\";\n\ntype ScrollAreaProps = ScrollAreaPrimitive.Root.Props & {\n scrollFade?: boolean;\n scrollbarGutter?: boolean;\n};\n\nconst ScrollArea = React.forwardRef<HTMLDivElement, ScrollAreaProps>(\n (\n { className, children, scrollFade = false, scrollbarGutter = false, ...props },\n ref\n ) => {\n return (\n <ScrollAreaPrimitive.Root\n ref={ref}\n className={cn(\"size-full min-h-0\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n className={cn(\n \"h-full overscroll-contain rounded-[inherit] outline-none transition-shadows focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background\",\n scrollFade &&\n \"mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] [--fade-size:1.5rem]\",\n scrollbarGutter &&\n \"data-has-overflow-y:pe-2.5 data-has-overflow-x:pb-2.5\",\n )}\n data-slot=\"scroll-area-viewport\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar orientation=\"vertical\" />\n <ScrollBar orientation=\"horizontal\" />\n <ScrollAreaPrimitive.Corner data-slot=\"scroll-area-corner\" />\n </ScrollAreaPrimitive.Root>\n );\n }\n);\nScrollArea.displayName = \"ScrollArea\";\n\nfunction ScrollBar({\n className,\n orientation = \"vertical\",\n ...props\n}: ScrollAreaPrimitive.Scrollbar.Props) {\n return (\n <ScrollAreaPrimitive.Scrollbar\n className={cn(\n \"m-1 flex opacity-0 transition-opacity delay-300 data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:flex-col data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-100 data-scrolling:duration-100\",\n className,\n )}\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n {...props}\n >\n <ScrollAreaPrimitive.Thumb\n className=\"relative flex-1 rounded-full bg-foreground/20\"\n data-slot=\"scroll-area-thumb\"\n />\n </ScrollAreaPrimitive.Scrollbar>\n );\n}\n\nexport { ScrollArea, ScrollBar };\n","\"use client\";\n\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react/combobox\";\nimport { ChevronsUpDownIcon, XIcon } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"../lib/utils\";\nimport { useFloatingOverlayPortalProps } from \"./portal\";\nimport { Input } from \"./input\";\nimport { ScrollArea } from \"./scroll-area\";\n\nconst ComboboxContext = React.createContext<{\n chipsRef: React.RefObject<Element | null> | null;\n multiple: boolean;\n}>({\n chipsRef: null,\n multiple: false,\n});\n\ntype ComboboxRootProps<\n ItemValue,\n Multiple extends boolean | undefined,\n> = Parameters<typeof ComboboxPrimitive.Root<ItemValue, Multiple>>[0];\n\nfunction Combobox<ItemValue, Multiple extends boolean | undefined = false>(\n props: ComboboxPrimitive.Root.Props<ItemValue, Multiple>,\n) {\n const chipsRef = React.useRef<Element | null>(null);\n return (\n <ComboboxContext.Provider value={{ chipsRef, multiple: !!props.multiple }}>\n <ComboboxPrimitive.Root\n {...(props as ComboboxRootProps<ItemValue, Multiple>)}\n />\n </ComboboxContext.Provider>\n );\n}\n\nfunction ComboboxInput({\n className,\n showTrigger = true,\n showClear = false,\n startAddon,\n size,\n ...props\n}: Omit<ComboboxPrimitive.Input.Props, \"size\"> & {\n showTrigger?: boolean;\n showClear?: boolean;\n startAddon?: React.ReactNode;\n size?: \"sm\" | \"default\" | \"lg\" | number;\n ref?: React.Ref<HTMLInputElement>;\n}) {\n const { multiple } = React.useContext(ComboboxContext);\n const sizeValue = (size ?? \"default\") as \"sm\" | \"default\" | \"lg\" | number;\n\n // multiple mode\n if (multiple) {\n return (\n <ComboboxPrimitive.Input\n className={cn(\n \"min-w-12 flex-1 text-base outline-none sm:text-sm [[data-slot=combobox-chip]+&]:ps-0.5\",\n sizeValue === \"sm\" ? \"ps-1.5\" : \"ps-2\",\n className,\n )}\n data-size={typeof sizeValue === \"string\" ? sizeValue : undefined}\n data-slot=\"combobox-input\"\n size={typeof sizeValue === \"number\" ? sizeValue : undefined}\n {...props}\n />\n );\n }\n\n // single mode\n return (\n <div className=\"relative not-has-[>*.w-full]:w-fit w-full has-disabled:opacity-64\">\n {startAddon && (\n <div\n aria-hidden=\"true\"\n className=\"[&_svg]:-mx-0.5 pointer-events-none absolute inset-y-0 start-px z-10 flex items-center ps-[calc(--spacing(3)-1px)] opacity-80 has-[+[data-size=sm]]:ps-[calc(--spacing(2.5)-1px)] [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4\"\n data-slot=\"combobox-start-addon\"\n >\n {startAddon}\n </div>\n )}\n <ComboboxPrimitive.Input\n className={cn(\n startAddon &&\n \"data-[size=sm]:*:data-[slot=combobox-input]:ps-[calc(--spacing(7.5)-1px)] *:data-[slot=combobox-input]:ps-[calc(--spacing(8.5)-1px)] sm:data-[size=sm]:*:data-[slot=combobox-input]:ps-[calc(--spacing(7)-1px)] sm:*:data-[slot=combobox-input]:ps-[calc(--spacing(8)-1px)]\",\n sizeValue === \"sm\"\n ? \"has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-6.5\"\n : \"has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-7\",\n className,\n )}\n data-slot=\"combobox-input\"\n render={<Input className=\"has-disabled:opacity-100\" size={sizeValue} />}\n {...props}\n />\n {showTrigger && (\n <ComboboxTrigger\n className={cn(\n \"-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-opacity pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n sizeValue === \"sm\" ? \"end-0\" : \"end-0.5\",\n )}\n >\n <ChevronsUpDownIcon />\n </ComboboxTrigger>\n )}\n {showClear && (\n <ComboboxClear\n className={cn(\n \"-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-opacity pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n sizeValue === \"sm\" ? \"end-0\" : \"end-0.5\",\n )}\n >\n <XIcon />\n </ComboboxClear>\n )}\n </div>\n );\n}\n\nfunction ComboboxTrigger({\n className,\n ...props\n}: ComboboxPrimitive.Trigger.Props) {\n return (\n <ComboboxPrimitive.Trigger\n className={className}\n data-slot=\"combobox-trigger\"\n {...props}\n />\n );\n}\n\nfunction ComboboxPopup({\n className,\n children,\n sideOffset = 4,\n ...props\n}: ComboboxPrimitive.Popup.Props & {\n sideOffset?: number;\n}) {\n const { chipsRef, multiple } = React.useContext(ComboboxContext);\n const { container, zIndexClass } = useFloatingOverlayPortalProps();\n\n return (\n <ComboboxPrimitive.Portal container={container}>\n <ComboboxPrimitive.Positioner\n {...(multiple ? { anchor: chipsRef } : {})}\n className={cn(\"select-none\", zIndexClass)}\n data-slot=\"combobox-positioner\"\n sideOffset={sideOffset}\n >\n <span\n className={cn(\n \"relative flex max-h-full origin-(--transform-origin) rounded-lg border bg-popover not-dark:bg-clip-padding shadow-lg/5 transition-[scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/6%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]\",\n className,\n )}\n >\n <ComboboxPrimitive.Popup\n className=\"flex max-h-[min(var(--available-height),23rem)] w-(--anchor-width) max-w-(--available-width) flex-col\"\n data-slot=\"combobox-popup\"\n {...props}\n >\n {children}\n </ComboboxPrimitive.Popup>\n </span>\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n );\n}\n\nfunction ComboboxItem({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Item.Props) {\n return (\n <ComboboxPrimitive.Item\n className={cn(\n \"grid min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default grid-cols-[1rem_1fr] items-center gap-2 rounded-sm py-1 ps-2 pe-4 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n className,\n )}\n data-slot=\"combobox-item\"\n {...props}\n >\n <ComboboxPrimitive.ItemIndicator className=\"col-start-1\">\n <svg\n fill=\"none\"\n height=\"24\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"2\"\n viewBox=\"0 0 24 24\"\n width=\"24\"\n xmlns=\"http://www.w3.org/1500/svg\"\n >\n <path d=\"M5.252 12.7 10.2 18.63 18.748 5.37\" />\n </svg>\n </ComboboxPrimitive.ItemIndicator>\n <div className=\"col-start-2\">{children}</div>\n </ComboboxPrimitive.Item>\n );\n}\n\nfunction ComboboxSeparator({\n className,\n ...props\n}: ComboboxPrimitive.Separator.Props) {\n return (\n <ComboboxPrimitive.Separator\n className={cn(\"mx-2 my-1 h-px bg-border last:hidden\", className)}\n data-slot=\"combobox-separator\"\n {...props}\n />\n );\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {\n return (\n <ComboboxPrimitive.Group\n className={cn(\"[[role=group]+&]:mt-1.5\", className)}\n data-slot=\"combobox-group\"\n {...props}\n />\n );\n}\n\nfunction ComboboxGroupLabel({\n className,\n ...props\n}: ComboboxPrimitive.GroupLabel.Props) {\n return (\n <ComboboxPrimitive.GroupLabel\n className={cn(\n \"px-2 py-1.5 font-medium text-muted-foreground text-xs\",\n className,\n )}\n data-slot=\"combobox-group-label\"\n {...props}\n />\n );\n}\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) {\n return (\n <ComboboxPrimitive.Empty\n className={cn(\n \"not-empty:p-2 text-center text-base text-muted-foreground sm:text-sm\",\n className,\n )}\n data-slot=\"combobox-empty\"\n {...props}\n />\n );\n}\n\nfunction ComboboxRow({ className, ...props }: ComboboxPrimitive.Row.Props) {\n return (\n <ComboboxPrimitive.Row\n className={className}\n data-slot=\"combobox-row\"\n {...props}\n />\n );\n}\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />;\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {\n return (\n <ScrollArea scrollbarGutter scrollFade>\n <ComboboxPrimitive.List\n className={cn(\n \"not-empty:scroll-py-1 not-empty:px-1 not-empty:py-1 in-data-has-overflow-y:pe-3\",\n className,\n )}\n data-slot=\"combobox-list\"\n {...props}\n />\n </ScrollArea>\n );\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) {\n return (\n <ComboboxPrimitive.Clear\n className={className}\n data-slot=\"combobox-clear\"\n {...props}\n />\n );\n}\n\nfunction ComboboxStatus({\n className,\n ...props\n}: ComboboxPrimitive.Status.Props) {\n return (\n <ComboboxPrimitive.Status\n className={cn(\n \"px-3 py-2 font-medium text-muted-foreground text-xs empty:m-0 empty:p-0\",\n className,\n )}\n data-slot=\"combobox-status\"\n {...props}\n />\n );\n}\n\nfunction ComboboxCollection(props: ComboboxPrimitive.Collection.Props) {\n return (\n <ComboboxPrimitive.Collection data-slot=\"combobox-collection\" {...props} />\n );\n}\n\nfunction ComboboxChips({\n className,\n children,\n startAddon,\n ...props\n}: ComboboxPrimitive.Chips.Props & {\n startAddon?: React.ReactNode;\n}) {\n const { chipsRef } = React.useContext(ComboboxContext);\n\n return (\n <ComboboxPrimitive.Chips\n className={cn(\n \"relative inline-flex min-h-9 w-full flex-wrap gap-1 rounded-lg border border-input bg-background not-dark:bg-clip-padding p-[calc(--spacing(1)-1px)] text-base shadow-xs/5 outline-none ring-ring/24 transition-shadow *:min-h-7 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/6%)] focus-within:border-ring focus-within:ring-[3px] has-disabled:pointer-events-none has-data-[size=lg]:min-h-10 has-data-[size=sm]:min-h-8 has-aria-invalid:border-destructive/36 has-disabled:opacity-64 has-[:disabled,:focus-within,[aria-invalid]]:shadow-none focus-within:has-aria-invalid:border-destructive/64 focus-within:has-aria-invalid:ring-destructive/16 has-data-[size=lg]:*:min-h-8 has-data-[size=sm]:*:min-h-6 sm:min-h-8 sm:text-sm sm:has-data-[size=lg]:min-h-9 sm:has-data-[size=sm]:min-h-7 sm:*:min-h-6 sm:has-data-[size=lg]:*:min-h-7 sm:has-data-[size=sm]:*:min-h-5 dark:not-has-disabled:bg-input/32 dark:has-aria-invalid:ring-destructive/24 dark:not-has-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]\",\n className,\n )}\n data-slot=\"combobox-chips\"\n onMouseDown={(e) => {\n const target = e.target as HTMLElement;\n const isChip = target.closest('[data-slot=\"combobox-chip\"]');\n if (isChip || !chipsRef?.current) return;\n e.preventDefault();\n const input: HTMLInputElement | null =\n chipsRef.current.querySelector(\"input\");\n if (input && !chipsRef.current.querySelector(\"input:focus\")) {\n input.focus();\n }\n }}\n ref={chipsRef as React.Ref<HTMLDivElement> | null}\n {...props}\n >\n {startAddon && (\n <div\n aria-hidden=\"true\"\n className=\"[&_svg]:-ms-0.5 [&_svg]:-me-1.5 flex shrink-0 items-center ps-2 opacity-80 has-[~[data-size=sm]]:has-[+[data-slot=combobox-chip]]:pe-1.5 has-[~[data-size=sm]]:ps-1.5 has-[+[data-slot=combobox-chip]]:pe-2 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none\"\n data-slot=\"combobox-start-addon\"\n >\n {startAddon}\n </div>\n )}\n {children}\n </ComboboxPrimitive.Chips>\n );\n}\n\nfunction ComboboxChip({ children, ...props }: ComboboxPrimitive.Chip.Props) {\n return (\n <ComboboxPrimitive.Chip\n className=\"flex items-center rounded-[calc(var(--radius-md)-1px)] bg-accent ps-2 font-medium text-accent-foreground text-sm outline-none sm:text-xs/(--text-xs--line-height) [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5\"\n data-slot=\"combobox-chip\"\n {...props}\n >\n {children}\n <ComboboxChipRemove />\n </ComboboxPrimitive.Chip>\n );\n}\n\nfunction ComboboxChipRemove(props: ComboboxPrimitive.ChipRemove.Props) {\n return (\n <ComboboxPrimitive.ChipRemove\n aria-label=\"Remove\"\n className=\"h-full shrink-0 cursor-pointer px-1.5 opacity-80 hover:opacity-100 [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5\"\n data-slot=\"combobox-chip-remove\"\n {...props}\n >\n <XIcon />\n </ComboboxPrimitive.ChipRemove>\n );\n}\n\nconst useComboboxFilter = ComboboxPrimitive.useFilter;\n\nconst ComboboxContent = ComboboxPopup;\n\ntype ComboboxProps<ItemValue = unknown, Multiple extends boolean | undefined = false> =\n ComboboxPrimitive.Root.Props<ItemValue, Multiple>;\ntype ComboboxTriggerProps = ComboboxPrimitive.Trigger.Props;\ntype ComboboxContentProps = React.ComponentProps<typeof ComboboxPopup>;\ntype ComboboxInputProps = React.ComponentProps<typeof ComboboxInput>;\ntype ComboboxListProps = React.ComponentProps<typeof ComboboxList>;\ntype ComboboxEmptyProps = React.ComponentProps<typeof ComboboxEmpty>;\ntype ComboboxGroupProps = React.ComponentProps<typeof ComboboxGroup>;\ntype ComboboxItemProps = React.ComponentProps<typeof ComboboxItem>;\ntype ComboboxSeparatorProps = React.ComponentProps<typeof ComboboxSeparator>;\n\nexport {\n Combobox,\n ComboboxInput,\n ComboboxTrigger,\n ComboboxContent,\n ComboboxPopup,\n ComboboxItem,\n ComboboxSeparator,\n ComboboxGroup,\n ComboboxGroupLabel,\n ComboboxEmpty,\n ComboboxValue,\n ComboboxList,\n ComboboxClear,\n ComboboxStatus,\n ComboboxRow,\n ComboboxCollection,\n ComboboxChips,\n ComboboxChip,\n useComboboxFilter,\n};\n\nexport type {\n ComboboxProps,\n ComboboxTriggerProps,\n ComboboxContentProps,\n ComboboxInputProps,\n ComboboxListProps,\n ComboboxEmptyProps,\n ComboboxGroupProps,\n ComboboxItemProps,\n ComboboxSeparatorProps,\n};\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Dialog } from '@base-ui/react/dialog';
|
|
3
|
+
import { AutocompleteRootProps } from '@base-ui/react/autocomplete';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { AutocompleteCollection, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteInput, AutocompleteItem, AutocompleteList, AutocompleteSeparator } from './autocomplete.js';
|
|
6
|
+
|
|
7
|
+
declare const CommandDialog: typeof Dialog.Root;
|
|
8
|
+
type CommandDialogTriggerProps = Omit<React.ComponentProps<typeof Dialog.Trigger>, "render" | "nativeButton"> & {
|
|
9
|
+
/** When true, merges props onto the child element instead of rendering a button */
|
|
10
|
+
asChild?: boolean;
|
|
11
|
+
/** Whether the child renders a native button. Defaults to true when asChild is used. */
|
|
12
|
+
nativeButton?: boolean;
|
|
13
|
+
};
|
|
14
|
+
declare function CommandDialogTrigger({ asChild, nativeButton, children, ...props }: CommandDialogTriggerProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare function CommandDialogPopup({ className, children, ...props }: Dialog.Popup.Props): react_jsx_runtime.JSX.Element;
|
|
16
|
+
type CommandProps<ItemValue> = Omit<AutocompleteRootProps<ItemValue>, "autoHighlight" | "keepHighlight" | "open"> & {
|
|
17
|
+
className?: string;
|
|
18
|
+
autoHighlight?: boolean | "always";
|
|
19
|
+
keepHighlight?: boolean;
|
|
20
|
+
open?: boolean;
|
|
21
|
+
};
|
|
22
|
+
declare function Command<ItemValue>({ autoHighlight, keepHighlight, open, ...props }: CommandProps<ItemValue>): react_jsx_runtime.JSX.Element;
|
|
23
|
+
type CommandInputProps = Omit<React.ComponentProps<typeof AutocompleteInput>, "onChange"> & {
|
|
24
|
+
value?: string;
|
|
25
|
+
onValueChange?: (value: string) => void;
|
|
26
|
+
};
|
|
27
|
+
declare function CommandInput({ className, placeholder, value, onValueChange, ...props }: CommandInputProps): react_jsx_runtime.JSX.Element;
|
|
28
|
+
declare function CommandList({ className, ...props }: React.ComponentProps<typeof AutocompleteList>): react_jsx_runtime.JSX.Element;
|
|
29
|
+
declare function CommandEmpty({ className, ...props }: React.ComponentProps<typeof AutocompleteEmpty>): react_jsx_runtime.JSX.Element;
|
|
30
|
+
declare function CommandPanel({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
31
|
+
type CommandGroupProps = React.ComponentProps<typeof AutocompleteGroup> & {
|
|
32
|
+
/** Group heading label */
|
|
33
|
+
heading?: React.ReactNode;
|
|
34
|
+
};
|
|
35
|
+
declare function CommandGroup({ className, heading, children, ...props }: CommandGroupProps): react_jsx_runtime.JSX.Element;
|
|
36
|
+
declare function CommandGroupLabel({ className, ...props }: React.ComponentProps<typeof AutocompleteGroupLabel>): react_jsx_runtime.JSX.Element;
|
|
37
|
+
declare function CommandCollection({ ...props }: React.ComponentProps<typeof AutocompleteCollection>): react_jsx_runtime.JSX.Element;
|
|
38
|
+
declare function CommandItem({ className, ...props }: React.ComponentProps<typeof AutocompleteItem>): react_jsx_runtime.JSX.Element;
|
|
39
|
+
declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof AutocompleteSeparator>): react_jsx_runtime.JSX.Element;
|
|
40
|
+
declare function CommandShortcut({ className, ...props }: React.ComponentProps<"kbd">): react_jsx_runtime.JSX.Element;
|
|
41
|
+
declare function CommandFooter({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
42
|
+
|
|
43
|
+
export { Command, CommandCollection, CommandDialog, CommandDialogPopup, CommandDialogTrigger, CommandEmpty, CommandFooter, CommandGroup, CommandGroupLabel, CommandInput, CommandItem, CommandList, CommandPanel, CommandSeparator, CommandShortcut };
|