@spawn-llc/design-system 1.1.0 → 1.2.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/DESIGN-SYSTEM.md +4 -0
- package/README.md +8 -6
- package/SPEC.md +3 -1
- package/dist/DESIGN-SYSTEM.md +4 -0
- package/dist/chunk-227VGN2D.js +617 -0
- package/dist/chunk-2UK4FHS3.js +31 -0
- package/dist/chunk-36NOAJFW.js +53 -0
- package/dist/chunk-3EZ5FFYG.js +154 -0
- package/dist/chunk-3PN2XMRA.js +80 -0
- package/dist/chunk-3SLZRFKQ.js +107 -0
- package/dist/chunk-4ABNKOPC.js +18 -0
- package/dist/chunk-4IKPZU4X.js +34 -0
- package/dist/chunk-5YRMB7KW.js +31 -0
- package/dist/chunk-66R4755B.js +37 -0
- package/dist/chunk-ATBQXQM7.js +165 -0
- package/dist/chunk-AUWFUYJI.js +79 -0
- package/dist/chunk-BTGJV2P6.js +237 -0
- package/dist/chunk-BYJWYU66.js +95 -0
- package/dist/chunk-D6UXXTC6.js +18 -0
- package/dist/chunk-DFVSGTAN.js +24 -0
- package/dist/chunk-DQ52UWO2.js +28 -0
- package/dist/chunk-DXXFNPYR.js +20 -0
- package/dist/chunk-GBPD3QPO.js +60 -0
- package/dist/chunk-GHSVAEXO.js +227 -0
- package/dist/chunk-GQIUVLXP.js +42 -0
- package/dist/chunk-HG4AEMA5.js +74 -0
- package/dist/chunk-HK6P54FZ.js +139 -0
- package/dist/chunk-HSP43BHH.js +97 -0
- package/dist/chunk-HYBBZTLY.js +1 -0
- package/dist/chunk-IS2ZVRUW.js +186 -0
- package/dist/chunk-JSULEEYQ.js +9 -0
- package/dist/chunk-K46NYJUT.js +15 -0
- package/dist/chunk-L5SMHZJL.js +162 -0
- package/dist/chunk-LPPLLYOR.js +185 -0
- package/dist/chunk-LYDG55X2.js +194 -0
- package/dist/chunk-MLC45YHE.js +122 -0
- package/dist/chunk-MZEY2L46.js +186 -0
- package/dist/chunk-N34HFTEJ.js +22 -0
- package/dist/chunk-PPW4C342.js +232 -0
- package/dist/chunk-PZCXY6QZ.js +208 -0
- package/dist/chunk-Q3HD7YQZ.js +261 -0
- package/dist/chunk-QF7LZKLC.js +98 -0
- package/dist/chunk-QNUAUOJW.js +15 -0
- package/dist/chunk-QZSQXEOU.js +28 -0
- package/dist/chunk-RBTFEYGV.js +77 -0
- package/dist/chunk-SJMEO63M.js +116 -0
- package/dist/chunk-T6DWCVR3.js +73 -0
- package/dist/chunk-T7GS4AXQ.js +245 -0
- package/dist/chunk-TP35WWVP.js +46 -0
- package/dist/chunk-TQ6CJZMT.js +42 -0
- package/dist/chunk-U7N2A7A3.js +9 -0
- package/dist/chunk-V3NRC7QE.js +142 -0
- package/dist/chunk-VOHNOSMH.js +22 -0
- package/dist/chunk-W3PHWPYP.js +43 -0
- package/dist/chunk-WJ6DNG2Z.js +75 -0
- package/dist/chunk-WMXCMDSQ.js +126 -0
- package/dist/chunk-WSNSTJAR.js +58 -0
- package/dist/chunk-XG3HHC3U.js +79 -0
- package/dist/chunk-XOLQ37I2.js +118 -0
- package/dist/chunk-YFPY5SLS.js +19 -0
- package/dist/chunk-YFVERFQA.js +76 -0
- package/dist/chunk-YL4VCJKF.js +75 -0
- package/dist/chunk-ZMHTPZVQ.js +61 -0
- package/dist/chunk-ZO74KVH3.js +38 -0
- package/dist/components/ui/accordion.d.ts +9 -0
- package/dist/components/ui/accordion.js +3 -0
- package/dist/components/ui/alert-dialog.d.ts +24 -0
- package/dist/components/ui/alert-dialog.js +5 -0
- package/dist/components/ui/alert.d.ts +13 -0
- package/dist/components/ui/alert.js +3 -0
- package/dist/components/ui/aspect-ratio.d.ts +7 -0
- package/dist/components/ui/aspect-ratio.js +3 -0
- package/dist/components/ui/avatar.d.ts +13 -0
- package/dist/components/ui/avatar.js +3 -0
- package/dist/components/ui/badge.d.ts +11 -0
- package/dist/components/ui/badge.js +3 -0
- package/dist/components/ui/breadcrumb.d.ts +12 -0
- package/dist/components/ui/breadcrumb.js +3 -0
- package/dist/components/ui/button-group.d.ts +15 -0
- package/dist/components/ui/button-group.js +4 -0
- package/dist/components/ui/button.d.ts +9 -0
- package/dist/components/ui/button.js +4 -0
- package/dist/components/ui/calendar.d.ts +16 -0
- package/dist/components/ui/calendar.js +5 -0
- package/dist/components/ui/card.d.ts +13 -0
- package/dist/components/ui/card.js +3 -0
- package/dist/components/ui/carousel.d.ts +34 -0
- package/dist/components/ui/carousel.js +5 -0
- package/dist/components/ui/chart.d.ts +46 -0
- package/dist/components/ui/chart.js +3 -0
- package/dist/components/ui/checkbox.d.ts +6 -0
- package/dist/components/ui/checkbox.js +3 -0
- package/dist/components/ui/collapsible.d.ts +8 -0
- package/dist/components/ui/collapsible.js +2 -0
- package/dist/components/ui/combobox.d.ts +26 -0
- package/dist/components/ui/combobox.js +8 -0
- package/dist/components/ui/command.d.ts +22 -0
- package/dist/components/ui/command.js +9 -0
- package/dist/components/ui/context-menu.d.ts +31 -0
- package/dist/components/ui/context-menu.js +3 -0
- package/dist/components/ui/dialog.d.ts +19 -0
- package/dist/components/ui/dialog.js +5 -0
- package/dist/components/ui/direction.d.ts +1 -0
- package/dist/components/ui/direction.js +2 -0
- package/dist/components/ui/drawer.d.ts +15 -0
- package/dist/components/ui/drawer.js +3 -0
- package/dist/components/ui/dropdown-menu.d.ts +31 -0
- package/dist/components/ui/dropdown-menu.js +3 -0
- package/dist/components/ui/empty.d.ts +15 -0
- package/dist/components/ui/empty.js +3 -0
- package/dist/components/ui/field.d.ts +28 -0
- package/dist/components/ui/field.js +5 -0
- package/dist/components/ui/hover-card.d.ts +8 -0
- package/dist/components/ui/hover-card.js +3 -0
- package/dist/components/ui/input-group.d.ts +23 -0
- package/dist/components/ui/input-group.js +7 -0
- package/dist/components/ui/input-otp.d.ts +13 -0
- package/dist/components/ui/input-otp.js +3 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/input.js +3 -0
- package/dist/components/ui/item.d.ts +26 -0
- package/dist/components/ui/item.js +4 -0
- package/dist/components/ui/kbd.d.ts +6 -0
- package/dist/components/ui/kbd.js +3 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/label.js +3 -0
- package/dist/components/ui/logo.d.ts +17 -0
- package/dist/components/ui/logo.js +3 -0
- package/dist/components/ui/menubar.d.ts +31 -0
- package/dist/components/ui/menubar.js +4 -0
- package/dist/components/ui/native-select.d.ts +10 -0
- package/dist/components/ui/native-select.js +3 -0
- package/dist/components/ui/navigation-menu.d.ts +15 -0
- package/dist/components/ui/navigation-menu.js +3 -0
- package/dist/components/ui/pagination.d.ts +23 -0
- package/dist/components/ui/pagination.js +5 -0
- package/dist/components/ui/popover.d.ts +11 -0
- package/dist/components/ui/popover.js +3 -0
- package/dist/components/ui/progress.d.ts +10 -0
- package/dist/components/ui/progress.js +3 -0
- package/dist/components/ui/radio-group.d.ts +8 -0
- package/dist/components/ui/radio-group.js +3 -0
- package/dist/components/ui/resizable.d.ts +10 -0
- package/dist/components/ui/resizable.js +3 -0
- package/dist/components/ui/scroll-area.d.ts +7 -0
- package/dist/components/ui/scroll-area.js +3 -0
- package/dist/components/ui/select.d.ts +17 -0
- package/dist/components/ui/select.js +3 -0
- package/dist/components/ui/separator.d.ts +6 -0
- package/dist/components/ui/separator.js +3 -0
- package/dist/components/ui/sheet.d.ts +16 -0
- package/dist/components/ui/sheet.js +5 -0
- package/dist/components/ui/sidebar.d.ts +70 -0
- package/dist/components/ui/sidebar.js +11 -0
- package/dist/components/ui/skeleton.d.ts +5 -0
- package/dist/components/ui/skeleton.js +3 -0
- package/dist/components/ui/slider.d.ts +6 -0
- package/dist/components/ui/slider.js +3 -0
- package/dist/components/ui/sonner.d.ts +6 -0
- package/dist/components/ui/sonner.js +2 -0
- package/dist/components/ui/spinner.d.ts +5 -0
- package/dist/components/ui/spinner.js +3 -0
- package/dist/components/ui/switch.d.ts +8 -0
- package/dist/components/ui/switch.js +3 -0
- package/dist/components/ui/table.d.ts +12 -0
- package/dist/components/ui/table.js +3 -0
- package/dist/components/ui/tabs.d.ts +14 -0
- package/dist/components/ui/tabs.js +3 -0
- package/dist/components/ui/textarea.d.ts +5 -0
- package/dist/components/ui/textarea.js +3 -0
- package/dist/components/ui/toggle-group.d.ts +14 -0
- package/dist/components/ui/toggle-group.js +4 -0
- package/dist/components/ui/toggle.d.ts +12 -0
- package/dist/components/ui/toggle.js +3 -0
- package/dist/components/ui/tooltip.d.ts +9 -0
- package/dist/components/ui/tooltip.js +3 -0
- package/dist/hooks/use-mobile.d.ts +3 -0
- package/dist/hooks/use-mobile.js +2 -0
- package/dist/index.d.ts +98 -640
- package/dist/index.js +60 -5573
- package/dist/lib/button-variants.d.ts +17 -0
- package/dist/lib/button-variants.js +1 -0
- package/dist/lib/contrast.d.ts +9 -0
- package/dist/lib/contrast.js +1 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +1 -0
- package/dist/styles.css +1 -1
- package/dist/theme.css +4 -0
- package/dist/{tokens.d.ts → tokens.generated.d.ts} +8 -0
- package/dist/{tokens.js → tokens.generated.js} +4 -0
- package/dist/variants.d.ts +3 -0
- package/dist/variants.js +1 -0
- package/package.json +17 -5
- package/tokens/tokens.css +2 -0
- package/tokens/tokens.json +5 -1
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { DropdownMenu, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent } from './chunk-BTGJV2P6.js';
|
|
2
|
+
import { cn } from './chunk-U7N2A7A3.js';
|
|
3
|
+
import { Menu } from '@base-ui/react/menu';
|
|
4
|
+
import { Menubar as Menubar$1 } from '@base-ui/react/menubar';
|
|
5
|
+
import { CheckIcon } from 'lucide-react';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
function Menubar({ className, ...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
Menubar$1,
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "menubar",
|
|
13
|
+
className: cn(
|
|
14
|
+
"flex h-8 items-center gap-0.5 rounded-lg border p-[3px]",
|
|
15
|
+
className
|
|
16
|
+
),
|
|
17
|
+
...props
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
function MenubarMenu({ ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx(DropdownMenu, { "data-slot": "menubar-menu", ...props });
|
|
23
|
+
}
|
|
24
|
+
function MenubarGroup({
|
|
25
|
+
...props
|
|
26
|
+
}) {
|
|
27
|
+
return /* @__PURE__ */ jsx(DropdownMenuGroup, { "data-slot": "menubar-group", ...props });
|
|
28
|
+
}
|
|
29
|
+
function MenubarPortal({
|
|
30
|
+
...props
|
|
31
|
+
}) {
|
|
32
|
+
return /* @__PURE__ */ jsx(DropdownMenuPortal, { "data-slot": "menubar-portal", ...props });
|
|
33
|
+
}
|
|
34
|
+
function MenubarTrigger({
|
|
35
|
+
className,
|
|
36
|
+
...props
|
|
37
|
+
}) {
|
|
38
|
+
return /* @__PURE__ */ jsx(
|
|
39
|
+
DropdownMenuTrigger,
|
|
40
|
+
{
|
|
41
|
+
"data-slot": "menubar-trigger",
|
|
42
|
+
className: cn(
|
|
43
|
+
"flex items-center rounded-sm px-1.5 py-[2px] text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted",
|
|
44
|
+
className
|
|
45
|
+
),
|
|
46
|
+
...props
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
function MenubarContent({
|
|
51
|
+
className,
|
|
52
|
+
align = "start",
|
|
53
|
+
alignOffset = -4,
|
|
54
|
+
sideOffset = 8,
|
|
55
|
+
...props
|
|
56
|
+
}) {
|
|
57
|
+
return /* @__PURE__ */ jsx(
|
|
58
|
+
DropdownMenuContent,
|
|
59
|
+
{
|
|
60
|
+
"data-slot": "menubar-content",
|
|
61
|
+
align,
|
|
62
|
+
alignOffset,
|
|
63
|
+
sideOffset,
|
|
64
|
+
className: cn("min-w-36 rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95", className),
|
|
65
|
+
...props
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
function MenubarItem({
|
|
70
|
+
className,
|
|
71
|
+
inset,
|
|
72
|
+
variant = "default",
|
|
73
|
+
...props
|
|
74
|
+
}) {
|
|
75
|
+
return /* @__PURE__ */ jsx(
|
|
76
|
+
DropdownMenuItem,
|
|
77
|
+
{
|
|
78
|
+
"data-slot": "menubar-item",
|
|
79
|
+
"data-inset": inset,
|
|
80
|
+
"data-variant": variant,
|
|
81
|
+
className: cn(
|
|
82
|
+
"group/menubar-item gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!",
|
|
83
|
+
className
|
|
84
|
+
),
|
|
85
|
+
...props
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
function MenubarCheckboxItem({
|
|
90
|
+
className,
|
|
91
|
+
children,
|
|
92
|
+
checked,
|
|
93
|
+
inset,
|
|
94
|
+
...props
|
|
95
|
+
}) {
|
|
96
|
+
return /* @__PURE__ */ jsxs(
|
|
97
|
+
Menu.CheckboxItem,
|
|
98
|
+
{
|
|
99
|
+
"data-slot": "menubar-checkbox-item",
|
|
100
|
+
"data-inset": inset,
|
|
101
|
+
className: cn(
|
|
102
|
+
"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
103
|
+
className
|
|
104
|
+
),
|
|
105
|
+
checked,
|
|
106
|
+
...props,
|
|
107
|
+
children: [
|
|
108
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4", children: /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
109
|
+
CheckIcon,
|
|
110
|
+
{}
|
|
111
|
+
) }) }),
|
|
112
|
+
children
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
function MenubarRadioGroup({
|
|
118
|
+
...props
|
|
119
|
+
}) {
|
|
120
|
+
return /* @__PURE__ */ jsx(DropdownMenuRadioGroup, { "data-slot": "menubar-radio-group", ...props });
|
|
121
|
+
}
|
|
122
|
+
function MenubarRadioItem({
|
|
123
|
+
className,
|
|
124
|
+
children,
|
|
125
|
+
inset,
|
|
126
|
+
...props
|
|
127
|
+
}) {
|
|
128
|
+
return /* @__PURE__ */ jsxs(
|
|
129
|
+
Menu.RadioItem,
|
|
130
|
+
{
|
|
131
|
+
"data-slot": "menubar-radio-item",
|
|
132
|
+
"data-inset": inset,
|
|
133
|
+
className: cn(
|
|
134
|
+
"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
135
|
+
className
|
|
136
|
+
),
|
|
137
|
+
...props,
|
|
138
|
+
children: [
|
|
139
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4", children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
140
|
+
CheckIcon,
|
|
141
|
+
{}
|
|
142
|
+
) }) }),
|
|
143
|
+
children
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
function MenubarLabel({
|
|
149
|
+
className,
|
|
150
|
+
inset,
|
|
151
|
+
...props
|
|
152
|
+
}) {
|
|
153
|
+
return /* @__PURE__ */ jsx(
|
|
154
|
+
DropdownMenuLabel,
|
|
155
|
+
{
|
|
156
|
+
"data-slot": "menubar-label",
|
|
157
|
+
"data-inset": inset,
|
|
158
|
+
className: cn(
|
|
159
|
+
"px-1.5 py-1 text-sm font-medium data-inset:pl-7",
|
|
160
|
+
className
|
|
161
|
+
),
|
|
162
|
+
...props
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
function MenubarSeparator({
|
|
167
|
+
className,
|
|
168
|
+
...props
|
|
169
|
+
}) {
|
|
170
|
+
return /* @__PURE__ */ jsx(
|
|
171
|
+
DropdownMenuSeparator,
|
|
172
|
+
{
|
|
173
|
+
"data-slot": "menubar-separator",
|
|
174
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
175
|
+
...props
|
|
176
|
+
}
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
function MenubarShortcut({
|
|
180
|
+
className,
|
|
181
|
+
...props
|
|
182
|
+
}) {
|
|
183
|
+
return /* @__PURE__ */ jsx(
|
|
184
|
+
DropdownMenuShortcut,
|
|
185
|
+
{
|
|
186
|
+
"data-slot": "menubar-shortcut",
|
|
187
|
+
className: cn(
|
|
188
|
+
"ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground",
|
|
189
|
+
className
|
|
190
|
+
),
|
|
191
|
+
...props
|
|
192
|
+
}
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
function MenubarSub({
|
|
196
|
+
...props
|
|
197
|
+
}) {
|
|
198
|
+
return /* @__PURE__ */ jsx(DropdownMenuSub, { "data-slot": "menubar-sub", ...props });
|
|
199
|
+
}
|
|
200
|
+
function MenubarSubTrigger({
|
|
201
|
+
className,
|
|
202
|
+
inset,
|
|
203
|
+
...props
|
|
204
|
+
}) {
|
|
205
|
+
return /* @__PURE__ */ jsx(
|
|
206
|
+
DropdownMenuSubTrigger,
|
|
207
|
+
{
|
|
208
|
+
"data-slot": "menubar-sub-trigger",
|
|
209
|
+
"data-inset": inset,
|
|
210
|
+
className: cn(
|
|
211
|
+
"gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4",
|
|
212
|
+
className
|
|
213
|
+
),
|
|
214
|
+
...props
|
|
215
|
+
}
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
function MenubarSubContent({
|
|
219
|
+
className,
|
|
220
|
+
...props
|
|
221
|
+
}) {
|
|
222
|
+
return /* @__PURE__ */ jsx(
|
|
223
|
+
DropdownMenuSubContent,
|
|
224
|
+
{
|
|
225
|
+
"data-slot": "menubar-sub-content",
|
|
226
|
+
className: cn("min-w-32 rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
227
|
+
...props
|
|
228
|
+
}
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger };
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { Label } from './chunk-4ABNKOPC.js';
|
|
2
|
+
import { Separator } from './chunk-DFVSGTAN.js';
|
|
3
|
+
import { cn } from './chunk-U7N2A7A3.js';
|
|
4
|
+
import { useMemo } from 'react';
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
function FieldSet({ className, ...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
"fieldset",
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "field-set",
|
|
13
|
+
className: cn(
|
|
14
|
+
"flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
15
|
+
className
|
|
16
|
+
),
|
|
17
|
+
...props
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
function FieldLegend({
|
|
22
|
+
className,
|
|
23
|
+
variant = "legend",
|
|
24
|
+
...props
|
|
25
|
+
}) {
|
|
26
|
+
return /* @__PURE__ */ jsx(
|
|
27
|
+
"legend",
|
|
28
|
+
{
|
|
29
|
+
"data-slot": "field-legend",
|
|
30
|
+
"data-variant": variant,
|
|
31
|
+
className: cn(
|
|
32
|
+
"mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",
|
|
33
|
+
className
|
|
34
|
+
),
|
|
35
|
+
...props
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
function FieldGroup({ className, ...props }) {
|
|
40
|
+
return /* @__PURE__ */ jsx(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
"data-slot": "field-group",
|
|
44
|
+
className: cn(
|
|
45
|
+
"group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",
|
|
46
|
+
className
|
|
47
|
+
),
|
|
48
|
+
...props
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
var fieldVariants = cva(
|
|
53
|
+
"group/field flex w-full gap-2 data-[invalid=true]:text-destructive",
|
|
54
|
+
{
|
|
55
|
+
variants: {
|
|
56
|
+
orientation: {
|
|
57
|
+
vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
|
|
58
|
+
horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
|
|
59
|
+
responsive: "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
defaultVariants: {
|
|
63
|
+
orientation: "vertical"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
function Field({
|
|
68
|
+
className,
|
|
69
|
+
orientation = "vertical",
|
|
70
|
+
...props
|
|
71
|
+
}) {
|
|
72
|
+
return /* @__PURE__ */ jsx(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
role: "group",
|
|
76
|
+
"data-slot": "field",
|
|
77
|
+
"data-orientation": orientation,
|
|
78
|
+
className: cn(fieldVariants({ orientation }), className),
|
|
79
|
+
...props
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
function FieldContent({ className, ...props }) {
|
|
84
|
+
return /* @__PURE__ */ jsx(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
"data-slot": "field-content",
|
|
88
|
+
className: cn(
|
|
89
|
+
"group/field-content flex flex-1 flex-col gap-0.5 leading-snug",
|
|
90
|
+
className
|
|
91
|
+
),
|
|
92
|
+
...props
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
function FieldLabel({
|
|
97
|
+
className,
|
|
98
|
+
...props
|
|
99
|
+
}) {
|
|
100
|
+
return /* @__PURE__ */ jsx(
|
|
101
|
+
Label,
|
|
102
|
+
{
|
|
103
|
+
"data-slot": "field-label",
|
|
104
|
+
className: cn(
|
|
105
|
+
"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10",
|
|
106
|
+
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",
|
|
107
|
+
className
|
|
108
|
+
),
|
|
109
|
+
...props
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
function FieldTitle({ className, ...props }) {
|
|
114
|
+
return /* @__PURE__ */ jsx(
|
|
115
|
+
"div",
|
|
116
|
+
{
|
|
117
|
+
"data-slot": "field-label",
|
|
118
|
+
className: cn(
|
|
119
|
+
"flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50",
|
|
120
|
+
className
|
|
121
|
+
),
|
|
122
|
+
...props
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
function FieldDescription({ className, ...props }) {
|
|
127
|
+
return /* @__PURE__ */ jsx(
|
|
128
|
+
"p",
|
|
129
|
+
{
|
|
130
|
+
"data-slot": "field-description",
|
|
131
|
+
className: cn(
|
|
132
|
+
"text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5",
|
|
133
|
+
"last:mt-0 nth-last-2:-mt-1",
|
|
134
|
+
"[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
135
|
+
className
|
|
136
|
+
),
|
|
137
|
+
...props
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
function FieldSeparator({
|
|
142
|
+
children,
|
|
143
|
+
className,
|
|
144
|
+
...props
|
|
145
|
+
}) {
|
|
146
|
+
return /* @__PURE__ */ jsxs(
|
|
147
|
+
"div",
|
|
148
|
+
{
|
|
149
|
+
"data-slot": "field-separator",
|
|
150
|
+
"data-content": !!children,
|
|
151
|
+
className: cn(
|
|
152
|
+
"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
|
|
153
|
+
className
|
|
154
|
+
),
|
|
155
|
+
...props,
|
|
156
|
+
children: [
|
|
157
|
+
/* @__PURE__ */ jsx(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
158
|
+
children && /* @__PURE__ */ jsx(
|
|
159
|
+
"span",
|
|
160
|
+
{
|
|
161
|
+
className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
|
|
162
|
+
"data-slot": "field-separator-content",
|
|
163
|
+
children
|
|
164
|
+
}
|
|
165
|
+
)
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
function FieldError({
|
|
171
|
+
className,
|
|
172
|
+
children,
|
|
173
|
+
errors,
|
|
174
|
+
...props
|
|
175
|
+
}) {
|
|
176
|
+
const content = useMemo(() => {
|
|
177
|
+
if (children) {
|
|
178
|
+
return children;
|
|
179
|
+
}
|
|
180
|
+
if (!errors?.length) {
|
|
181
|
+
return null;
|
|
182
|
+
}
|
|
183
|
+
const uniqueErrors = [
|
|
184
|
+
...new Map(errors.map((error) => [error?.message, error])).values()
|
|
185
|
+
];
|
|
186
|
+
if (uniqueErrors?.length == 1) {
|
|
187
|
+
return uniqueErrors[0]?.message;
|
|
188
|
+
}
|
|
189
|
+
return /* @__PURE__ */ jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
|
|
190
|
+
(error, index) => error?.message && /* @__PURE__ */ jsx("li", { children: error.message }, index)
|
|
191
|
+
) });
|
|
192
|
+
}, [children, errors]);
|
|
193
|
+
if (!content) {
|
|
194
|
+
return null;
|
|
195
|
+
}
|
|
196
|
+
return /* @__PURE__ */ jsx(
|
|
197
|
+
"div",
|
|
198
|
+
{
|
|
199
|
+
role: "alert",
|
|
200
|
+
"data-slot": "field-error",
|
|
201
|
+
className: cn("text-sm font-normal text-destructive", className),
|
|
202
|
+
...props,
|
|
203
|
+
children: content
|
|
204
|
+
}
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import { InputGroup, InputGroupInput, InputGroupAddon, InputGroupButton } from './chunk-HK6P54FZ.js';
|
|
2
|
+
import { Button } from './chunk-N34HFTEJ.js';
|
|
3
|
+
import { cn } from './chunk-U7N2A7A3.js';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { Combobox as Combobox$1 } from '@base-ui/react';
|
|
6
|
+
import { ChevronDownIcon, CheckIcon, XIcon } from 'lucide-react';
|
|
7
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var Combobox = Combobox$1.Root;
|
|
10
|
+
function ComboboxValue({ ...props }) {
|
|
11
|
+
return /* @__PURE__ */ jsx(Combobox$1.Value, { "data-slot": "combobox-value", ...props });
|
|
12
|
+
}
|
|
13
|
+
function ComboboxTrigger({
|
|
14
|
+
className,
|
|
15
|
+
children,
|
|
16
|
+
...props
|
|
17
|
+
}) {
|
|
18
|
+
return /* @__PURE__ */ jsxs(
|
|
19
|
+
Combobox$1.Trigger,
|
|
20
|
+
{
|
|
21
|
+
"data-slot": "combobox-trigger",
|
|
22
|
+
className: cn("[&_svg:not([class*='size-'])]:size-4", className),
|
|
23
|
+
...props,
|
|
24
|
+
children: [
|
|
25
|
+
children,
|
|
26
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" })
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
function ComboboxClear({ className, ...props }) {
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
33
|
+
Combobox$1.Clear,
|
|
34
|
+
{
|
|
35
|
+
"data-slot": "combobox-clear",
|
|
36
|
+
render: /* @__PURE__ */ jsx(InputGroupButton, { variant: "ghost", size: "icon-xs" }),
|
|
37
|
+
className: cn(className),
|
|
38
|
+
...props,
|
|
39
|
+
children: /* @__PURE__ */ jsx(XIcon, { className: "pointer-events-none" })
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
function ComboboxInput({
|
|
44
|
+
className,
|
|
45
|
+
children,
|
|
46
|
+
disabled = false,
|
|
47
|
+
showTrigger = true,
|
|
48
|
+
showClear = false,
|
|
49
|
+
...props
|
|
50
|
+
}) {
|
|
51
|
+
return /* @__PURE__ */ jsxs(InputGroup, { className: cn("w-auto", className), children: [
|
|
52
|
+
/* @__PURE__ */ jsx(
|
|
53
|
+
Combobox$1.Input,
|
|
54
|
+
{
|
|
55
|
+
render: /* @__PURE__ */ jsx(InputGroupInput, { disabled }),
|
|
56
|
+
...props
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
/* @__PURE__ */ jsxs(InputGroupAddon, { align: "inline-end", children: [
|
|
60
|
+
showTrigger && /* @__PURE__ */ jsx(
|
|
61
|
+
InputGroupButton,
|
|
62
|
+
{
|
|
63
|
+
size: "icon-xs",
|
|
64
|
+
variant: "ghost",
|
|
65
|
+
render: /* @__PURE__ */ jsx(ComboboxTrigger, {}),
|
|
66
|
+
"data-slot": "input-group-button",
|
|
67
|
+
className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",
|
|
68
|
+
disabled
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
showClear && /* @__PURE__ */ jsx(ComboboxClear, { disabled })
|
|
72
|
+
] }),
|
|
73
|
+
children
|
|
74
|
+
] });
|
|
75
|
+
}
|
|
76
|
+
function ComboboxContent({
|
|
77
|
+
className,
|
|
78
|
+
side = "bottom",
|
|
79
|
+
sideOffset = 6,
|
|
80
|
+
align = "start",
|
|
81
|
+
alignOffset = 0,
|
|
82
|
+
anchor,
|
|
83
|
+
...props
|
|
84
|
+
}) {
|
|
85
|
+
return /* @__PURE__ */ jsx(Combobox$1.Portal, { children: /* @__PURE__ */ jsx(
|
|
86
|
+
Combobox$1.Positioner,
|
|
87
|
+
{
|
|
88
|
+
side,
|
|
89
|
+
sideOffset,
|
|
90
|
+
align,
|
|
91
|
+
alignOffset,
|
|
92
|
+
anchor,
|
|
93
|
+
className: "isolate z-50",
|
|
94
|
+
children: /* @__PURE__ */ jsx(
|
|
95
|
+
Combobox$1.Popup,
|
|
96
|
+
{
|
|
97
|
+
"data-slot": "combobox-content",
|
|
98
|
+
"data-chips": !!anchor,
|
|
99
|
+
className: cn("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
100
|
+
...props
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
}
|
|
104
|
+
) });
|
|
105
|
+
}
|
|
106
|
+
function ComboboxList({ className, ...props }) {
|
|
107
|
+
return /* @__PURE__ */ jsx(
|
|
108
|
+
Combobox$1.List,
|
|
109
|
+
{
|
|
110
|
+
"data-slot": "combobox-list",
|
|
111
|
+
className: cn(
|
|
112
|
+
"no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0",
|
|
113
|
+
className
|
|
114
|
+
),
|
|
115
|
+
...props
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
function ComboboxItem({
|
|
120
|
+
className,
|
|
121
|
+
children,
|
|
122
|
+
...props
|
|
123
|
+
}) {
|
|
124
|
+
return /* @__PURE__ */ jsxs(
|
|
125
|
+
Combobox$1.Item,
|
|
126
|
+
{
|
|
127
|
+
"data-slot": "combobox-item",
|
|
128
|
+
className: cn(
|
|
129
|
+
"relative flex w-full cursor-default items-center gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
130
|
+
className
|
|
131
|
+
),
|
|
132
|
+
...props,
|
|
133
|
+
children: [
|
|
134
|
+
children,
|
|
135
|
+
/* @__PURE__ */ jsx(
|
|
136
|
+
Combobox$1.ItemIndicator,
|
|
137
|
+
{
|
|
138
|
+
render: /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
|
|
139
|
+
children: /* @__PURE__ */ jsx(CheckIcon, { className: "pointer-events-none" })
|
|
140
|
+
}
|
|
141
|
+
)
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
function ComboboxGroup({ className, ...props }) {
|
|
147
|
+
return /* @__PURE__ */ jsx(
|
|
148
|
+
Combobox$1.Group,
|
|
149
|
+
{
|
|
150
|
+
"data-slot": "combobox-group",
|
|
151
|
+
className: cn(className),
|
|
152
|
+
...props
|
|
153
|
+
}
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
function ComboboxLabel({
|
|
157
|
+
className,
|
|
158
|
+
...props
|
|
159
|
+
}) {
|
|
160
|
+
return /* @__PURE__ */ jsx(
|
|
161
|
+
Combobox$1.GroupLabel,
|
|
162
|
+
{
|
|
163
|
+
"data-slot": "combobox-label",
|
|
164
|
+
className: cn("px-2 py-1.5 text-xs text-muted-foreground", className),
|
|
165
|
+
...props
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
function ComboboxCollection({ ...props }) {
|
|
170
|
+
return /* @__PURE__ */ jsx(Combobox$1.Collection, { "data-slot": "combobox-collection", ...props });
|
|
171
|
+
}
|
|
172
|
+
function ComboboxEmpty({ className, ...props }) {
|
|
173
|
+
return /* @__PURE__ */ jsx(
|
|
174
|
+
Combobox$1.Empty,
|
|
175
|
+
{
|
|
176
|
+
"data-slot": "combobox-empty",
|
|
177
|
+
className: cn(
|
|
178
|
+
"hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex",
|
|
179
|
+
className
|
|
180
|
+
),
|
|
181
|
+
...props
|
|
182
|
+
}
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
function ComboboxSeparator({
|
|
186
|
+
className,
|
|
187
|
+
...props
|
|
188
|
+
}) {
|
|
189
|
+
return /* @__PURE__ */ jsx(
|
|
190
|
+
Combobox$1.Separator,
|
|
191
|
+
{
|
|
192
|
+
"data-slot": "combobox-separator",
|
|
193
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
194
|
+
...props
|
|
195
|
+
}
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
function ComboboxChips({
|
|
199
|
+
className,
|
|
200
|
+
...props
|
|
201
|
+
}) {
|
|
202
|
+
return /* @__PURE__ */ jsx(
|
|
203
|
+
Combobox$1.Chips,
|
|
204
|
+
{
|
|
205
|
+
"data-slot": "combobox-chips",
|
|
206
|
+
className: cn(
|
|
207
|
+
"flex min-h-8 flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40",
|
|
208
|
+
className
|
|
209
|
+
),
|
|
210
|
+
...props
|
|
211
|
+
}
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
function ComboboxChip({
|
|
215
|
+
className,
|
|
216
|
+
children,
|
|
217
|
+
showRemove = true,
|
|
218
|
+
...props
|
|
219
|
+
}) {
|
|
220
|
+
return /* @__PURE__ */ jsxs(
|
|
221
|
+
Combobox$1.Chip,
|
|
222
|
+
{
|
|
223
|
+
"data-slot": "combobox-chip",
|
|
224
|
+
className: cn(
|
|
225
|
+
"flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0",
|
|
226
|
+
className
|
|
227
|
+
),
|
|
228
|
+
...props,
|
|
229
|
+
children: [
|
|
230
|
+
children,
|
|
231
|
+
showRemove && /* @__PURE__ */ jsx(
|
|
232
|
+
Combobox$1.ChipRemove,
|
|
233
|
+
{
|
|
234
|
+
render: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon-xs" }),
|
|
235
|
+
className: "-ml-1 opacity-50 hover:opacity-100",
|
|
236
|
+
"data-slot": "combobox-chip-remove",
|
|
237
|
+
children: /* @__PURE__ */ jsx(XIcon, { className: "pointer-events-none" })
|
|
238
|
+
}
|
|
239
|
+
)
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
function ComboboxChipsInput({
|
|
245
|
+
className,
|
|
246
|
+
...props
|
|
247
|
+
}) {
|
|
248
|
+
return /* @__PURE__ */ jsx(
|
|
249
|
+
Combobox$1.Input,
|
|
250
|
+
{
|
|
251
|
+
"data-slot": "combobox-chip-input",
|
|
252
|
+
className: cn("min-w-16 flex-1 outline-none", className),
|
|
253
|
+
...props
|
|
254
|
+
}
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
function useComboboxAnchor() {
|
|
258
|
+
return React.useRef(null);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor };
|