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