@enya-learning/nova 0.4.0 → 0.4.2
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/chunks/{button-npy7isi3nsvlhf86.js → button-kvgr8g13fe959ju0.js} +19 -19
- package/dist/chunks/{button-npy7isi3nsvlhf86.js.map → button-kvgr8g13fe959ju0.js.map} +1 -1
- package/dist/chunks/vendor-utils-egkaeebaqpft6cxj.js +473 -0
- package/dist/chunks/vendor-utils-egkaeebaqpft6cxj.js.map +1 -0
- package/dist/components/button.js +1 -1
- package/dist/components/enya-logo.js +1 -1
- package/dist/index.js +6782 -7036
- package/dist/index.js.map +1 -1
- package/package.json +26 -11
- package/changelog.md +0 -44
- package/components.json +0 -23
- package/dist/chunks/vendor-base-ui-efqwzv4oinwg1f0d.js +0 -16049
- package/dist/chunks/vendor-base-ui-efqwzv4oinwg1f0d.js.map +0 -1
- package/eslint.config.js +0 -30
- package/plopfile.mjs +0 -49
- package/src/components/.gitkeep +0 -0
- package/src/components/accordion/accordion.mdx +0 -83
- package/src/components/accordion/accordion.tsx +0 -81
- package/src/components/accordion/index.ts +0 -1
- package/src/components/alert/alert.tsx +0 -76
- package/src/components/alert/index.ts +0 -1
- package/src/components/alert-dialog/alert-dialog.tsx +0 -187
- package/src/components/alert-dialog/index.ts +0 -1
- package/src/components/aspect-ratio/aspect-ratio.tsx +0 -22
- package/src/components/aspect-ratio/index.ts +0 -1
- package/src/components/avatar/avatar.tsx +0 -107
- package/src/components/avatar/index.ts +0 -1
- package/src/components/badge/badge.tsx +0 -52
- package/src/components/badge/index.ts +0 -1
- package/src/components/breadcrumb/breadcrumb.tsx +0 -122
- package/src/components/breadcrumb/index.ts +0 -1
- package/src/components/button/button.mdx +0 -255
- package/src/components/button/button.tsx +0 -59
- package/src/components/button/index.ts +0 -1
- package/src/components/button-group/button-group.tsx +0 -87
- package/src/components/button-group/index.ts +0 -1
- package/src/components/calendar/calendar.tsx +0 -228
- package/src/components/calendar/index.ts +0 -1
- package/src/components/card/card.tsx +0 -100
- package/src/components/card/index.ts +0 -1
- package/src/components/carousel/carousel.tsx +0 -243
- package/src/components/carousel/index.ts +0 -1
- package/src/components/chart/chart.tsx +0 -371
- package/src/components/chart/index.ts +0 -1
- package/src/components/checkbox/checkbox.tsx +0 -28
- package/src/components/checkbox/index.ts +0 -1
- package/src/components/collapsible/collapsible.tsx +0 -19
- package/src/components/collapsible/index.ts +0 -1
- package/src/components/combobox/combobox.tsx +0 -298
- package/src/components/combobox/index.ts +0 -1
- package/src/components/command/command.tsx +0 -193
- package/src/components/command/index.ts +0 -1
- package/src/components/context-menu/context-menu.tsx +0 -272
- package/src/components/context-menu/index.ts +0 -1
- package/src/components/dialog/dialog.tsx +0 -157
- package/src/components/dialog/index.ts +0 -1
- package/src/components/direction/direction.tsx +0 -4
- package/src/components/direction/index.ts +0 -1
- package/src/components/drawer/drawer.tsx +0 -134
- package/src/components/drawer/index.ts +0 -1
- package/src/components/dropdown-menu/dropdown-menu.tsx +0 -270
- package/src/components/dropdown-menu/index.ts +0 -1
- package/src/components/empty/empty.tsx +0 -104
- package/src/components/empty/index.ts +0 -1
- package/src/components/enya-logo/enya-logo.mdx +0 -174
- package/src/components/enya-logo/enya-logo.tsx +0 -383
- package/src/components/enya-logo/index.ts +0 -1
- package/src/components/field/field.tsx +0 -236
- package/src/components/field/index.ts +0 -1
- package/src/components/hover-card/hover-card.tsx +0 -51
- package/src/components/hover-card/index.ts +0 -1
- package/src/components/input/index.ts +0 -1
- package/src/components/input/input.tsx +0 -20
- package/src/components/input-group/index.ts +0 -1
- package/src/components/input-group/input-group.tsx +0 -157
- package/src/components/input-otp/index.ts +0 -1
- package/src/components/input-otp/input-otp.tsx +0 -84
- package/src/components/item/index.ts +0 -1
- package/src/components/item/item.tsx +0 -201
- package/src/components/kbd/index.ts +0 -1
- package/src/components/kbd/kbd.tsx +0 -26
- package/src/components/label/index.ts +0 -1
- package/src/components/label/label.tsx +0 -20
- package/src/components/menubar/index.ts +0 -1
- package/src/components/menubar/menubar.tsx +0 -281
- package/src/components/native-select/index.ts +0 -1
- package/src/components/native-select/native-select.tsx +0 -65
- package/src/components/navigation-menu/index.ts +0 -1
- package/src/components/navigation-menu/navigation-menu.tsx +0 -171
- package/src/components/pagination/index.ts +0 -1
- package/src/components/pagination/pagination.tsx +0 -133
- package/src/components/popover/index.ts +0 -1
- package/src/components/popover/popover.tsx +0 -88
- package/src/components/progress/index.ts +0 -1
- package/src/components/progress/progress.tsx +0 -83
- package/src/components/radio-group/index.ts +0 -1
- package/src/components/radio-group/radio-group.tsx +0 -36
- package/src/components/resizable/index.ts +0 -1
- package/src/components/resizable/resizable.tsx +0 -50
- package/src/components/scroll-area/index.ts +0 -1
- package/src/components/scroll-area/scroll-area.tsx +0 -53
- package/src/components/select/index.ts +0 -1
- package/src/components/select/select.tsx +0 -205
- package/src/components/separator/index.ts +0 -1
- package/src/components/separator/separator.tsx +0 -23
- package/src/components/sheet/index.ts +0 -1
- package/src/components/sheet/sheet.tsx +0 -137
- package/src/components/sidebar/index.ts +0 -1
- package/src/components/sidebar/sidebar.tsx +0 -722
- package/src/components/skeleton/index.ts +0 -1
- package/src/components/skeleton/skeleton.tsx +0 -13
- package/src/components/slider/index.ts +0 -1
- package/src/components/slider/slider.tsx +0 -52
- package/src/components/sonner/index.ts +0 -1
- package/src/components/sonner/sonner.tsx +0 -45
- package/src/components/spinner/index.ts +0 -1
- package/src/components/spinner/spinner.tsx +0 -15
- package/src/components/switch/index.ts +0 -1
- package/src/components/switch/switch.tsx +0 -30
- package/src/components/table/index.ts +0 -1
- package/src/components/table/table.tsx +0 -116
- package/src/components/tabs/index.ts +0 -1
- package/src/components/tabs/tabs.tsx +0 -80
- package/src/components/textarea/index.ts +0 -1
- package/src/components/textarea/textarea.tsx +0 -18
- package/src/components/toggle/index.ts +0 -1
- package/src/components/toggle/toggle.tsx +0 -45
- package/src/components/toggle-group/index.ts +0 -1
- package/src/components/toggle-group/toggle-group.tsx +0 -87
- package/src/components/tooltip/index.ts +0 -1
- package/src/components/tooltip/tooltip.tsx +0 -64
- package/src/hooks/use-mobile.ts +0 -21
- package/src/index.ts +0 -58
- package/src/lib/.gitkeep +0 -0
- package/src/lib/utils.ts +0 -6
- package/src/styles/nova-binding.css +0 -290
- package/src/styles/nova.css +0 -58
- package/src/styles/theme-nova.css +0 -201
- package/src/styles/typography.css +0 -215
- package/src/utils/index.ts +0 -1
- package/templates/component/component.tsx.hbs +0 -16
- package/templates/component/index.ts.hbs +0 -1
- package/templates/component/stories.tsx.hbs +0 -13
- package/tsconfig.json +0 -18
- package/tsconfig.lint.json +0 -14
- package/vite.config.ts +0 -101
- /package/{Readme.md → README.md} +0 -0
- /package/{src → dist}/styles/globals.css +0 -0
|
@@ -1,298 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { Combobox as ComboboxPrimitive } from "@base-ui/react"
|
|
3
|
-
|
|
4
|
-
import { cn } from "../../lib/utils"
|
|
5
|
-
import { Button } from "../button"
|
|
6
|
-
import {
|
|
7
|
-
InputGroup,
|
|
8
|
-
InputGroupAddon,
|
|
9
|
-
InputGroupButton,
|
|
10
|
-
InputGroupInput,
|
|
11
|
-
} from "../input-group"
|
|
12
|
-
import { ChevronDownIcon, XIcon, CheckIcon } from "lucide-react"
|
|
13
|
-
|
|
14
|
-
const Combobox = ComboboxPrimitive.Root
|
|
15
|
-
|
|
16
|
-
function ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {
|
|
17
|
-
return <ComboboxPrimitive.Value data-slot="combobox-value" {...props} />
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function ComboboxTrigger({
|
|
21
|
-
className,
|
|
22
|
-
children,
|
|
23
|
-
...props
|
|
24
|
-
}: ComboboxPrimitive.Trigger.Props) {
|
|
25
|
-
return (
|
|
26
|
-
<ComboboxPrimitive.Trigger
|
|
27
|
-
data-slot="combobox-trigger"
|
|
28
|
-
className={cn("[&_svg:not([class*='size-'])]:size-4", className)}
|
|
29
|
-
{...props}
|
|
30
|
-
>
|
|
31
|
-
{children}
|
|
32
|
-
<ChevronDownIcon className="pointer-events-none size-4 text-muted-foreground" />
|
|
33
|
-
</ComboboxPrimitive.Trigger>
|
|
34
|
-
)
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) {
|
|
38
|
-
return (
|
|
39
|
-
<ComboboxPrimitive.Clear
|
|
40
|
-
data-slot="combobox-clear"
|
|
41
|
-
render={<InputGroupButton variant="ghost" size="icon-xs" />}
|
|
42
|
-
className={cn(className)}
|
|
43
|
-
{...props}
|
|
44
|
-
>
|
|
45
|
-
<XIcon className="pointer-events-none" />
|
|
46
|
-
</ComboboxPrimitive.Clear>
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function ComboboxInput({
|
|
51
|
-
className,
|
|
52
|
-
children,
|
|
53
|
-
disabled = false,
|
|
54
|
-
showTrigger = true,
|
|
55
|
-
showClear = false,
|
|
56
|
-
...props
|
|
57
|
-
}: ComboboxPrimitive.Input.Props & {
|
|
58
|
-
showTrigger?: boolean
|
|
59
|
-
showClear?: boolean
|
|
60
|
-
}) {
|
|
61
|
-
return (
|
|
62
|
-
<InputGroup className={cn("w-auto", className)}>
|
|
63
|
-
<ComboboxPrimitive.Input
|
|
64
|
-
render={<InputGroupInput disabled={disabled} />}
|
|
65
|
-
{...props}
|
|
66
|
-
/>
|
|
67
|
-
<InputGroupAddon align="inline-end">
|
|
68
|
-
{showTrigger && (
|
|
69
|
-
<InputGroupButton
|
|
70
|
-
size="icon-xs"
|
|
71
|
-
variant="ghost"
|
|
72
|
-
render={<ComboboxTrigger />}
|
|
73
|
-
data-slot="input-group-button"
|
|
74
|
-
className="group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent"
|
|
75
|
-
disabled={disabled}
|
|
76
|
-
/>
|
|
77
|
-
)}
|
|
78
|
-
{showClear && <ComboboxClear disabled={disabled} />}
|
|
79
|
-
</InputGroupAddon>
|
|
80
|
-
{children}
|
|
81
|
-
</InputGroup>
|
|
82
|
-
)
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function ComboboxContent({
|
|
86
|
-
className,
|
|
87
|
-
side = "bottom",
|
|
88
|
-
sideOffset = 6,
|
|
89
|
-
align = "start",
|
|
90
|
-
alignOffset = 0,
|
|
91
|
-
anchor,
|
|
92
|
-
...props
|
|
93
|
-
}: ComboboxPrimitive.Popup.Props &
|
|
94
|
-
Pick<
|
|
95
|
-
ComboboxPrimitive.Positioner.Props,
|
|
96
|
-
"side" | "align" | "sideOffset" | "alignOffset" | "anchor"
|
|
97
|
-
>) {
|
|
98
|
-
return (
|
|
99
|
-
<ComboboxPrimitive.Portal>
|
|
100
|
-
<ComboboxPrimitive.Positioner
|
|
101
|
-
side={side}
|
|
102
|
-
sideOffset={sideOffset}
|
|
103
|
-
align={align}
|
|
104
|
-
alignOffset={alignOffset}
|
|
105
|
-
anchor={anchor}
|
|
106
|
-
className="isolate z-50"
|
|
107
|
-
>
|
|
108
|
-
<ComboboxPrimitive.Popup
|
|
109
|
-
data-slot="combobox-content"
|
|
110
|
-
data-chips={!!anchor}
|
|
111
|
-
className={cn(
|
|
112
|
-
"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-2xl bg-popover text-popover-foreground shadow-2xl ring-1 ring-foreground/5 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-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-9 *:data-[slot=input-group]:border-none *: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",
|
|
113
|
-
className
|
|
114
|
-
)}
|
|
115
|
-
{...props}
|
|
116
|
-
/>
|
|
117
|
-
</ComboboxPrimitive.Positioner>
|
|
118
|
-
</ComboboxPrimitive.Portal>
|
|
119
|
-
)
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {
|
|
123
|
-
return (
|
|
124
|
-
<ComboboxPrimitive.List
|
|
125
|
-
data-slot="combobox-list"
|
|
126
|
-
className={cn(
|
|
127
|
-
"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",
|
|
128
|
-
className
|
|
129
|
-
)}
|
|
130
|
-
{...props}
|
|
131
|
-
/>
|
|
132
|
-
)
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
function ComboboxItem({
|
|
136
|
-
className,
|
|
137
|
-
children,
|
|
138
|
-
...props
|
|
139
|
-
}: ComboboxPrimitive.Item.Props) {
|
|
140
|
-
return (
|
|
141
|
-
<ComboboxPrimitive.Item
|
|
142
|
-
data-slot="combobox-item"
|
|
143
|
-
className={cn(
|
|
144
|
-
"relative flex w-full cursor-default items-center gap-2.5 rounded-xl py-2 ps-3 pe-8 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",
|
|
145
|
-
className
|
|
146
|
-
)}
|
|
147
|
-
{...props}
|
|
148
|
-
>
|
|
149
|
-
{children}
|
|
150
|
-
<ComboboxPrimitive.ItemIndicator
|
|
151
|
-
render={
|
|
152
|
-
<span className="pointer-events-none absolute end-2 flex size-4 items-center justify-center" />
|
|
153
|
-
}
|
|
154
|
-
>
|
|
155
|
-
<CheckIcon className="pointer-events-none" />
|
|
156
|
-
</ComboboxPrimitive.ItemIndicator>
|
|
157
|
-
</ComboboxPrimitive.Item>
|
|
158
|
-
)
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
function ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {
|
|
162
|
-
return (
|
|
163
|
-
<ComboboxPrimitive.Group
|
|
164
|
-
data-slot="combobox-group"
|
|
165
|
-
className={cn(className)}
|
|
166
|
-
{...props}
|
|
167
|
-
/>
|
|
168
|
-
)
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
function ComboboxLabel({
|
|
172
|
-
className,
|
|
173
|
-
...props
|
|
174
|
-
}: ComboboxPrimitive.GroupLabel.Props) {
|
|
175
|
-
return (
|
|
176
|
-
<ComboboxPrimitive.GroupLabel
|
|
177
|
-
data-slot="combobox-label"
|
|
178
|
-
className={cn("px-3.5 py-2.5 text-xs text-muted-foreground", className)}
|
|
179
|
-
{...props}
|
|
180
|
-
/>
|
|
181
|
-
)
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
function ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props) {
|
|
185
|
-
return (
|
|
186
|
-
<ComboboxPrimitive.Collection data-slot="combobox-collection" {...props} />
|
|
187
|
-
)
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
function ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) {
|
|
191
|
-
return (
|
|
192
|
-
<ComboboxPrimitive.Empty
|
|
193
|
-
data-slot="combobox-empty"
|
|
194
|
-
className={cn(
|
|
195
|
-
"hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex",
|
|
196
|
-
className
|
|
197
|
-
)}
|
|
198
|
-
{...props}
|
|
199
|
-
/>
|
|
200
|
-
)
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
function ComboboxSeparator({
|
|
204
|
-
className,
|
|
205
|
-
...props
|
|
206
|
-
}: ComboboxPrimitive.Separator.Props) {
|
|
207
|
-
return (
|
|
208
|
-
<ComboboxPrimitive.Separator
|
|
209
|
-
data-slot="combobox-separator"
|
|
210
|
-
className={cn("-mx-1 my-1 h-px bg-border/50", className)}
|
|
211
|
-
{...props}
|
|
212
|
-
/>
|
|
213
|
-
)
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
function ComboboxChips({
|
|
217
|
-
className,
|
|
218
|
-
...props
|
|
219
|
-
}: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> &
|
|
220
|
-
ComboboxPrimitive.Chips.Props) {
|
|
221
|
-
return (
|
|
222
|
-
<ComboboxPrimitive.Chips
|
|
223
|
-
data-slot="combobox-chips"
|
|
224
|
-
className={cn(
|
|
225
|
-
"flex min-h-9 flex-wrap items-center gap-1.5 rounded-4xl border border-input bg-input/30 bg-clip-padding px-2.5 py-1.5 text-sm transition-colors focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-[3px] has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1.5 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40",
|
|
226
|
-
className
|
|
227
|
-
)}
|
|
228
|
-
{...props}
|
|
229
|
-
/>
|
|
230
|
-
)
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
function ComboboxChip({
|
|
234
|
-
className,
|
|
235
|
-
children,
|
|
236
|
-
showRemove = true,
|
|
237
|
-
...props
|
|
238
|
-
}: ComboboxPrimitive.Chip.Props & {
|
|
239
|
-
showRemove?: boolean
|
|
240
|
-
}) {
|
|
241
|
-
return (
|
|
242
|
-
<ComboboxPrimitive.Chip
|
|
243
|
-
data-slot="combobox-chip"
|
|
244
|
-
className={cn(
|
|
245
|
-
"flex h-[calc(--spacing(5.5))] w-fit items-center justify-center gap-1 rounded-4xl bg-muted-foreground/10 px-2 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]:pe-0",
|
|
246
|
-
className
|
|
247
|
-
)}
|
|
248
|
-
{...props}
|
|
249
|
-
>
|
|
250
|
-
{children}
|
|
251
|
-
{showRemove && (
|
|
252
|
-
<ComboboxPrimitive.ChipRemove
|
|
253
|
-
render={<Button variant="ghost" size="icon-xs" />}
|
|
254
|
-
className="-ms-1 opacity-50 hover:opacity-100"
|
|
255
|
-
data-slot="combobox-chip-remove"
|
|
256
|
-
>
|
|
257
|
-
<XIcon className="pointer-events-none" />
|
|
258
|
-
</ComboboxPrimitive.ChipRemove>
|
|
259
|
-
)}
|
|
260
|
-
</ComboboxPrimitive.Chip>
|
|
261
|
-
)
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
function ComboboxChipsInput({
|
|
265
|
-
className,
|
|
266
|
-
...props
|
|
267
|
-
}: ComboboxPrimitive.Input.Props) {
|
|
268
|
-
return (
|
|
269
|
-
<ComboboxPrimitive.Input
|
|
270
|
-
data-slot="combobox-chip-input"
|
|
271
|
-
className={cn("min-w-16 flex-1 outline-none", className)}
|
|
272
|
-
{...props}
|
|
273
|
-
/>
|
|
274
|
-
)
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
function useComboboxAnchor() {
|
|
278
|
-
return React.useRef<HTMLDivElement | null>(null)
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
export {
|
|
282
|
-
Combobox,
|
|
283
|
-
ComboboxInput,
|
|
284
|
-
ComboboxContent,
|
|
285
|
-
ComboboxList,
|
|
286
|
-
ComboboxItem,
|
|
287
|
-
ComboboxGroup,
|
|
288
|
-
ComboboxLabel,
|
|
289
|
-
ComboboxCollection,
|
|
290
|
-
ComboboxEmpty,
|
|
291
|
-
ComboboxSeparator,
|
|
292
|
-
ComboboxChips,
|
|
293
|
-
ComboboxChip,
|
|
294
|
-
ComboboxChipsInput,
|
|
295
|
-
ComboboxTrigger,
|
|
296
|
-
ComboboxValue,
|
|
297
|
-
useComboboxAnchor,
|
|
298
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./combobox"
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { Command as CommandPrimitive } from "cmdk"
|
|
5
|
-
|
|
6
|
-
import { cn } from "../../lib/utils"
|
|
7
|
-
import {
|
|
8
|
-
Dialog,
|
|
9
|
-
DialogContent,
|
|
10
|
-
DialogDescription,
|
|
11
|
-
DialogHeader,
|
|
12
|
-
DialogTitle,
|
|
13
|
-
} from "../dialog"
|
|
14
|
-
import { InputGroup, InputGroupAddon } from "../input-group"
|
|
15
|
-
import { SearchIcon, CheckIcon } from "lucide-react"
|
|
16
|
-
|
|
17
|
-
function Command({
|
|
18
|
-
className,
|
|
19
|
-
...props
|
|
20
|
-
}: React.ComponentProps<typeof CommandPrimitive>) {
|
|
21
|
-
return (
|
|
22
|
-
<CommandPrimitive
|
|
23
|
-
data-slot="command"
|
|
24
|
-
className={cn(
|
|
25
|
-
"flex size-full flex-col overflow-hidden rounded-4xl bg-popover p-1 text-popover-foreground",
|
|
26
|
-
className
|
|
27
|
-
)}
|
|
28
|
-
{...props}
|
|
29
|
-
/>
|
|
30
|
-
)
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function CommandDialog({
|
|
34
|
-
title = "Command Palette",
|
|
35
|
-
description = "Search for a command to run...",
|
|
36
|
-
children,
|
|
37
|
-
className,
|
|
38
|
-
showCloseButton = false,
|
|
39
|
-
...props
|
|
40
|
-
}: Omit<React.ComponentProps<typeof Dialog>, "children"> & {
|
|
41
|
-
title?: string
|
|
42
|
-
description?: string
|
|
43
|
-
className?: string
|
|
44
|
-
showCloseButton?: boolean
|
|
45
|
-
children: React.ReactNode
|
|
46
|
-
}) {
|
|
47
|
-
return (
|
|
48
|
-
<Dialog {...props}>
|
|
49
|
-
<DialogHeader className="sr-only">
|
|
50
|
-
<DialogTitle>{title}</DialogTitle>
|
|
51
|
-
<DialogDescription>{description}</DialogDescription>
|
|
52
|
-
</DialogHeader>
|
|
53
|
-
<DialogContent
|
|
54
|
-
className={cn(
|
|
55
|
-
"top-1/3 translate-y-0 overflow-hidden rounded-4xl! p-0",
|
|
56
|
-
className
|
|
57
|
-
)}
|
|
58
|
-
showCloseButton={showCloseButton}
|
|
59
|
-
>
|
|
60
|
-
{children}
|
|
61
|
-
</DialogContent>
|
|
62
|
-
</Dialog>
|
|
63
|
-
)
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function CommandInput({
|
|
67
|
-
className,
|
|
68
|
-
...props
|
|
69
|
-
}: React.ComponentProps<typeof CommandPrimitive.Input>) {
|
|
70
|
-
return (
|
|
71
|
-
<div data-slot="command-input-wrapper" className="p-1 pb-0">
|
|
72
|
-
<InputGroup className="h-9 bg-input/30">
|
|
73
|
-
<CommandPrimitive.Input
|
|
74
|
-
data-slot="command-input"
|
|
75
|
-
className={cn(
|
|
76
|
-
"w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
77
|
-
className
|
|
78
|
-
)}
|
|
79
|
-
{...props}
|
|
80
|
-
/>
|
|
81
|
-
<InputGroupAddon>
|
|
82
|
-
<SearchIcon className="size-4 shrink-0 opacity-50" />
|
|
83
|
-
</InputGroupAddon>
|
|
84
|
-
</InputGroup>
|
|
85
|
-
</div>
|
|
86
|
-
)
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
function CommandList({
|
|
90
|
-
className,
|
|
91
|
-
...props
|
|
92
|
-
}: React.ComponentProps<typeof CommandPrimitive.List>) {
|
|
93
|
-
return (
|
|
94
|
-
<CommandPrimitive.List
|
|
95
|
-
data-slot="command-list"
|
|
96
|
-
className={cn(
|
|
97
|
-
"no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",
|
|
98
|
-
className
|
|
99
|
-
)}
|
|
100
|
-
{...props}
|
|
101
|
-
/>
|
|
102
|
-
)
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
function CommandEmpty({
|
|
106
|
-
className,
|
|
107
|
-
...props
|
|
108
|
-
}: React.ComponentProps<typeof CommandPrimitive.Empty>) {
|
|
109
|
-
return (
|
|
110
|
-
<CommandPrimitive.Empty
|
|
111
|
-
data-slot="command-empty"
|
|
112
|
-
className={cn("py-6 text-center text-sm", className)}
|
|
113
|
-
{...props}
|
|
114
|
-
/>
|
|
115
|
-
)
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function CommandGroup({
|
|
119
|
-
className,
|
|
120
|
-
...props
|
|
121
|
-
}: React.ComponentProps<typeof CommandPrimitive.Group>) {
|
|
122
|
-
return (
|
|
123
|
-
<CommandPrimitive.Group
|
|
124
|
-
data-slot="command-group"
|
|
125
|
-
className={cn(
|
|
126
|
-
"overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-3 **:[[cmdk-group-heading]]:py-2 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",
|
|
127
|
-
className
|
|
128
|
-
)}
|
|
129
|
-
{...props}
|
|
130
|
-
/>
|
|
131
|
-
)
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
function CommandSeparator({
|
|
135
|
-
className,
|
|
136
|
-
...props
|
|
137
|
-
}: React.ComponentProps<typeof CommandPrimitive.Separator>) {
|
|
138
|
-
return (
|
|
139
|
-
<CommandPrimitive.Separator
|
|
140
|
-
data-slot="command-separator"
|
|
141
|
-
className={cn("my-1 h-px bg-border/50", className)}
|
|
142
|
-
{...props}
|
|
143
|
-
/>
|
|
144
|
-
)
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
function CommandItem({
|
|
148
|
-
className,
|
|
149
|
-
children,
|
|
150
|
-
...props
|
|
151
|
-
}: React.ComponentProps<typeof CommandPrimitive.Item>) {
|
|
152
|
-
return (
|
|
153
|
-
<CommandPrimitive.Item
|
|
154
|
-
data-slot="command-item"
|
|
155
|
-
className={cn(
|
|
156
|
-
"group/command-item relative flex cursor-default items-center gap-2 rounded-lg px-3 py-2 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-2xl data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",
|
|
157
|
-
className
|
|
158
|
-
)}
|
|
159
|
-
{...props}
|
|
160
|
-
>
|
|
161
|
-
{children}
|
|
162
|
-
<CheckIcon className="ms-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" />
|
|
163
|
-
</CommandPrimitive.Item>
|
|
164
|
-
)
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
function CommandShortcut({
|
|
168
|
-
className,
|
|
169
|
-
...props
|
|
170
|
-
}: React.ComponentProps<"span">) {
|
|
171
|
-
return (
|
|
172
|
-
<span
|
|
173
|
-
data-slot="command-shortcut"
|
|
174
|
-
className={cn(
|
|
175
|
-
"ms-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground",
|
|
176
|
-
className
|
|
177
|
-
)}
|
|
178
|
-
{...props}
|
|
179
|
-
/>
|
|
180
|
-
)
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
export {
|
|
184
|
-
Command,
|
|
185
|
-
CommandDialog,
|
|
186
|
-
CommandInput,
|
|
187
|
-
CommandList,
|
|
188
|
-
CommandEmpty,
|
|
189
|
-
CommandGroup,
|
|
190
|
-
CommandItem,
|
|
191
|
-
CommandShortcut,
|
|
192
|
-
CommandSeparator,
|
|
193
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./command"
|