create-disposabl-app 0.9.1 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/disposabl.js +1 -1
  2. package/dist/index.js +2 -2
  3. package/dist/templates/default/.github/workflows/pipeline.yml +1 -1
  4. package/dist/templates/default/apps/web/src/router/_authenticated/dashboard.api-keys.tsx +1 -1
  5. package/dist/templates/default/bun.lock +77 -1397
  6. package/dist/templates/default/package.json +1 -2
  7. package/dist/templates/default/packages/backend/README.md +3 -1
  8. package/dist/templates/default/packages/backend/convex/_generated/api.d.ts +6 -0
  9. package/dist/templates/default/packages/backend/convex/_generated/server.d.ts +0 -2
  10. package/dist/templates/default/packages/backend/convex/auth.config.ts +2 -10
  11. package/dist/templates/default/packages/backend/convex/convex.config.ts +3 -14
  12. package/dist/templates/default/packages/backend/convex/mcpEnterprise/README.md +42 -0
  13. package/dist/templates/default/packages/backend/convex/mcpEnterprise/internal.ts +153 -0
  14. package/dist/templates/default/packages/backend/convex/mcpEnterprise/provision.ts +102 -0
  15. package/dist/templates/default/packages/backend/convex/mcpEnterprise/validator.ts +35 -0
  16. package/dist/templates/default/packages/backend/convex/schema.ts +18 -0
  17. package/dist/templates/default/packages/backend/package.json +0 -1
  18. package/dist/templates/default/packages/cli/README.md +9 -24
  19. package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/login.tsx +1 -1
  20. package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/signUp.tsx +1 -1
  21. package/dist/templates/default/packages/disposabl-kit/client/routes/consent.tsx +71 -13
  22. package/dist/templates/default/packages/disposabl-kit/package.json +4 -14
  23. package/dist/templates/default/packages/disposabl-kit/server/http.ts +19 -12
  24. package/dist/templates/default/packages/disposabl-kit/server/lib/functions.ts +12 -0
  25. package/dist/templates/default/packages/disposabl-kit/server/mcp/enterprise.ts +267 -0
  26. package/dist/templates/default/packages/disposabl-kit/server/mcp/identity.ts +33 -0
  27. package/dist/templates/default/vendor/README.md +30 -0
  28. package/dist/templates/default/vendor/convex-auth-6c0ebf3f.tgz +0 -0
  29. package/package.json +1 -1
  30. package/dist/templates/default/apps/web/src/components/connections/expo-connection.tsx +0 -97
  31. package/dist/templates/default/apps/web/src/components/connections/provider-logo.tsx +0 -44
  32. package/dist/templates/default/apps/web/src/components/connections/use-connection-setup.ts +0 -169
  33. package/dist/templates/default/packages/disposabl-kit/client/components/ui/accordion.tsx +0 -77
  34. package/dist/templates/default/packages/disposabl-kit/client/components/ui/alert-dialog.tsx +0 -185
  35. package/dist/templates/default/packages/disposabl-kit/client/components/ui/alert.tsx +0 -75
  36. package/dist/templates/default/packages/disposabl-kit/client/components/ui/aspect-ratio.tsx +0 -22
  37. package/dist/templates/default/packages/disposabl-kit/client/components/ui/attachment.tsx +0 -207
  38. package/dist/templates/default/packages/disposabl-kit/client/components/ui/avatar.tsx +0 -106
  39. package/dist/templates/default/packages/disposabl-kit/client/components/ui/badge.tsx +0 -51
  40. package/dist/templates/default/packages/disposabl-kit/client/components/ui/breadcrumb.tsx +0 -121
  41. package/dist/templates/default/packages/disposabl-kit/client/components/ui/bubble.tsx +0 -127
  42. package/dist/templates/default/packages/disposabl-kit/client/components/ui/button-group.tsx +0 -87
  43. package/dist/templates/default/packages/disposabl-kit/client/components/ui/calendar.tsx +0 -241
  44. package/dist/templates/default/packages/disposabl-kit/client/components/ui/carousel.tsx +0 -239
  45. package/dist/templates/default/packages/disposabl-kit/client/components/ui/chart.tsx +0 -368
  46. package/dist/templates/default/packages/disposabl-kit/client/components/ui/checkbox.tsx +0 -27
  47. package/dist/templates/default/packages/disposabl-kit/client/components/ui/code-block.tsx +0 -243
  48. package/dist/templates/default/packages/disposabl-kit/client/components/ui/collapsible.tsx +0 -19
  49. package/dist/templates/default/packages/disposabl-kit/client/components/ui/combobox.tsx +0 -300
  50. package/dist/templates/default/packages/disposabl-kit/client/components/ui/command.tsx +0 -194
  51. package/dist/templates/default/packages/disposabl-kit/client/components/ui/context-menu.tsx +0 -271
  52. package/dist/templates/default/packages/disposabl-kit/client/components/ui/dialog.tsx +0 -156
  53. package/dist/templates/default/packages/disposabl-kit/client/components/ui/direction.tsx +0 -4
  54. package/dist/templates/default/packages/disposabl-kit/client/components/ui/drawer.tsx +0 -224
  55. package/dist/templates/default/packages/disposabl-kit/client/components/ui/dropdown-menu.tsx +0 -269
  56. package/dist/templates/default/packages/disposabl-kit/client/components/ui/empty.tsx +0 -103
  57. package/dist/templates/default/packages/disposabl-kit/client/components/ui/hover-card.tsx +0 -50
  58. package/dist/templates/default/packages/disposabl-kit/client/components/ui/input-group.tsx +0 -158
  59. package/dist/templates/default/packages/disposabl-kit/client/components/ui/input-otp.tsx +0 -83
  60. package/dist/templates/default/packages/disposabl-kit/client/components/ui/item.tsx +0 -201
  61. package/dist/templates/default/packages/disposabl-kit/client/components/ui/kbd.tsx +0 -26
  62. package/dist/templates/default/packages/disposabl-kit/client/components/ui/marker.tsx +0 -70
  63. package/dist/templates/default/packages/disposabl-kit/client/components/ui/menubar.tsx +0 -284
  64. package/dist/templates/default/packages/disposabl-kit/client/components/ui/message-scroller.tsx +0 -128
  65. package/dist/templates/default/packages/disposabl-kit/client/components/ui/message.tsx +0 -91
  66. package/dist/templates/default/packages/disposabl-kit/client/components/ui/native-select.tsx +0 -64
  67. package/dist/templates/default/packages/disposabl-kit/client/components/ui/navigation-menu.tsx +0 -170
  68. package/dist/templates/default/packages/disposabl-kit/client/components/ui/pagination.tsx +0 -133
  69. package/dist/templates/default/packages/disposabl-kit/client/components/ui/popover.tsx +0 -87
  70. package/dist/templates/default/packages/disposabl-kit/client/components/ui/progress.tsx +0 -82
  71. package/dist/templates/default/packages/disposabl-kit/client/components/ui/questionnaire.tsx +0 -330
  72. package/dist/templates/default/packages/disposabl-kit/client/components/ui/radio-group.tsx +0 -35
  73. package/dist/templates/default/packages/disposabl-kit/client/components/ui/resizable.tsx +0 -49
  74. package/dist/templates/default/packages/disposabl-kit/client/components/ui/scroll-area.tsx +0 -51
  75. package/dist/templates/default/packages/disposabl-kit/client/components/ui/select.tsx +0 -201
  76. package/dist/templates/default/packages/disposabl-kit/client/components/ui/sheet.tsx +0 -132
  77. package/dist/templates/default/packages/disposabl-kit/client/components/ui/sidebar.tsx +0 -723
  78. package/dist/templates/default/packages/disposabl-kit/client/components/ui/skeleton.tsx +0 -13
  79. package/dist/templates/default/packages/disposabl-kit/client/components/ui/slider.tsx +0 -51
  80. package/dist/templates/default/packages/disposabl-kit/client/components/ui/switch.tsx +0 -31
  81. package/dist/templates/default/packages/disposabl-kit/client/components/ui/table.tsx +0 -113
  82. package/dist/templates/default/packages/disposabl-kit/client/components/ui/tabs.tsx +0 -81
  83. package/dist/templates/default/packages/disposabl-kit/client/components/ui/textarea.tsx +0 -17
  84. package/dist/templates/default/packages/disposabl-kit/client/components/ui/toast.tsx +0 -229
  85. package/dist/templates/default/packages/disposabl-kit/client/components/ui/toggle-group.tsx +0 -87
  86. package/dist/templates/default/packages/disposabl-kit/client/components/ui/toggle.tsx +0 -42
  87. package/dist/templates/default/packages/disposabl-kit/client/components/ui/tooltip.tsx +0 -65
  88. package/dist/templates/default/packages/disposabl-kit/client/components/ui/trace.tsx +0 -161
  89. package/dist/templates/default/packages/disposabl-kit/client/hooks/use-mobile.ts +0 -21
  90. package/dist/templates/default/patches/@convex-dev%2Fauth@2.0.0-beta.0.patch +0 -310
@@ -1,300 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import { Combobox as ComboboxPrimitive } from "@base-ui/react";
5
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
6
-
7
- import { Button } from "@disposabl/disposabl-kit/client/components/ui/button";
8
- import {
9
- InputGroup,
10
- InputGroupAddon,
11
- InputGroupButton,
12
- InputGroupInput,
13
- } from "@disposabl/disposabl-kit/client/components/ui/input-group";
14
- import { ChevronDownIcon, XIcon, CheckIcon } from "lucide-react";
15
-
16
- const Combobox = ComboboxPrimitive.Root;
17
-
18
- function ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {
19
- return <ComboboxPrimitive.Value data-slot="combobox-value" {...props} />;
20
- }
21
-
22
- function ComboboxTrigger({
23
- className,
24
- children,
25
- ...props
26
- }: ComboboxPrimitive.Trigger.Props) {
27
- return (
28
- <ComboboxPrimitive.Trigger
29
- data-slot="combobox-trigger"
30
- className={cn("[&_svg:not([class*='size-'])]:size-4", className)}
31
- {...props}
32
- >
33
- {children}
34
- <ChevronDownIcon className="pointer-events-none size-4 text-muted-foreground" />
35
- </ComboboxPrimitive.Trigger>
36
- );
37
- }
38
-
39
- function ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) {
40
- return (
41
- <ComboboxPrimitive.Clear
42
- data-slot="combobox-clear"
43
- render={<InputGroupButton variant="ghost" size="icon-xs" />}
44
- className={cn(className)}
45
- {...props}
46
- >
47
- <XIcon className="pointer-events-none" />
48
- </ComboboxPrimitive.Clear>
49
- );
50
- }
51
-
52
- function ComboboxInput({
53
- className,
54
- children,
55
- disabled = false,
56
- showTrigger = true,
57
- showClear = false,
58
- ...props
59
- }: ComboboxPrimitive.Input.Props & {
60
- showTrigger?: boolean;
61
- showClear?: boolean;
62
- }) {
63
- return (
64
- <InputGroup className={cn("w-auto", className)}>
65
- <ComboboxPrimitive.Input
66
- render={<InputGroupInput disabled={disabled} />}
67
- {...props}
68
- />
69
- <InputGroupAddon align="inline-end">
70
- {showTrigger && (
71
- <InputGroupButton
72
- size="icon-xs"
73
- variant="ghost"
74
- render={<ComboboxTrigger />}
75
- data-slot="input-group-button"
76
- className="group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent"
77
- disabled={disabled}
78
- />
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(
114
- "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-md 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",
115
- className,
116
- )}
117
- {...props}
118
- />
119
- </ComboboxPrimitive.Positioner>
120
- </ComboboxPrimitive.Portal>
121
- );
122
- }
123
-
124
- function ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {
125
- return (
126
- <ComboboxPrimitive.List
127
- data-slot="combobox-list"
128
- className={cn(
129
- "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",
130
- className,
131
- )}
132
- {...props}
133
- />
134
- );
135
- }
136
-
137
- function ComboboxItem({
138
- className,
139
- children,
140
- ...props
141
- }: ComboboxPrimitive.Item.Props) {
142
- return (
143
- <ComboboxPrimitive.Item
144
- data-slot="combobox-item"
145
- className={cn(
146
- "relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 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",
147
- className,
148
- )}
149
- {...props}
150
- >
151
- {children}
152
- <ComboboxPrimitive.ItemIndicator
153
- render={
154
- <span className="pointer-events-none absolute right-2 flex size-4 items-center justify-center" />
155
- }
156
- >
157
- <CheckIcon className="pointer-events-none" />
158
- </ComboboxPrimitive.ItemIndicator>
159
- </ComboboxPrimitive.Item>
160
- );
161
- }
162
-
163
- function ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {
164
- return (
165
- <ComboboxPrimitive.Group
166
- data-slot="combobox-group"
167
- className={cn(className)}
168
- {...props}
169
- />
170
- );
171
- }
172
-
173
- function ComboboxLabel({
174
- className,
175
- ...props
176
- }: ComboboxPrimitive.GroupLabel.Props) {
177
- return (
178
- <ComboboxPrimitive.GroupLabel
179
- data-slot="combobox-label"
180
- className={cn("px-2 py-1.5 text-xs text-muted-foreground", className)}
181
- {...props}
182
- />
183
- );
184
- }
185
-
186
- function ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props) {
187
- return (
188
- <ComboboxPrimitive.Collection data-slot="combobox-collection" {...props} />
189
- );
190
- }
191
-
192
- function ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) {
193
- return (
194
- <ComboboxPrimitive.Empty
195
- data-slot="combobox-empty"
196
- className={cn(
197
- "hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex",
198
- className,
199
- )}
200
- {...props}
201
- />
202
- );
203
- }
204
-
205
- function ComboboxSeparator({
206
- className,
207
- ...props
208
- }: ComboboxPrimitive.Separator.Props) {
209
- return (
210
- <ComboboxPrimitive.Separator
211
- data-slot="combobox-separator"
212
- className={cn("-mx-1 my-1 h-px bg-border", className)}
213
- {...props}
214
- />
215
- );
216
- }
217
-
218
- function ComboboxChips({
219
- className,
220
- ...props
221
- }: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> &
222
- ComboboxPrimitive.Chips.Props) {
223
- return (
224
- <ComboboxPrimitive.Chips
225
- data-slot="combobox-chips"
226
- className={cn(
227
- "flex min-h-9 flex-wrap items-center gap-1.5 rounded-md border border-input bg-transparent bg-clip-padding px-2.5 py-1.5 text-sm shadow-xs transition-[color,box-shadow] 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.5 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40",
228
- className,
229
- )}
230
- {...props}
231
- />
232
- );
233
- }
234
-
235
- function ComboboxChip({
236
- className,
237
- children,
238
- showRemove = true,
239
- ...props
240
- }: ComboboxPrimitive.Chip.Props & {
241
- showRemove?: boolean;
242
- }) {
243
- return (
244
- <ComboboxPrimitive.Chip
245
- data-slot="combobox-chip"
246
- className={cn(
247
- "flex h-[calc(--spacing(5.5))] 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",
248
- className,
249
- )}
250
- {...props}
251
- >
252
- {children}
253
- {showRemove && (
254
- <ComboboxPrimitive.ChipRemove
255
- render={<Button variant="ghost" size="icon-xs" />}
256
- className="-ml-1 opacity-50 hover:opacity-100"
257
- data-slot="combobox-chip-remove"
258
- >
259
- <XIcon className="pointer-events-none" />
260
- </ComboboxPrimitive.ChipRemove>
261
- )}
262
- </ComboboxPrimitive.Chip>
263
- );
264
- }
265
-
266
- function ComboboxChipsInput({
267
- className,
268
- ...props
269
- }: ComboboxPrimitive.Input.Props) {
270
- return (
271
- <ComboboxPrimitive.Input
272
- data-slot="combobox-chip-input"
273
- className={cn("min-w-16 flex-1 outline-none", className)}
274
- {...props}
275
- />
276
- );
277
- }
278
-
279
- function useComboboxAnchor() {
280
- return React.useRef<HTMLDivElement | null>(null);
281
- }
282
-
283
- export {
284
- Combobox,
285
- ComboboxInput,
286
- ComboboxContent,
287
- ComboboxList,
288
- ComboboxItem,
289
- ComboboxGroup,
290
- ComboboxLabel,
291
- ComboboxCollection,
292
- ComboboxEmpty,
293
- ComboboxSeparator,
294
- ComboboxChips,
295
- ComboboxChip,
296
- ComboboxChipsInput,
297
- ComboboxTrigger,
298
- ComboboxValue,
299
- useComboboxAnchor,
300
- };
@@ -1,194 +0,0 @@
1
- import * as React from "react";
2
- import { Command as CommandPrimitive } from "cmdk";
3
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
4
-
5
- import {
6
- Dialog,
7
- DialogContent,
8
- DialogDescription,
9
- DialogHeader,
10
- DialogTitle,
11
- } from "@disposabl/disposabl-kit/client/components/ui/dialog";
12
- import {
13
- InputGroup,
14
- InputGroupAddon,
15
- } from "@disposabl/disposabl-kit/client/components/ui/input-group";
16
- import { SearchIcon, CheckIcon } from "lucide-react";
17
-
18
- function Command({
19
- className,
20
- ...props
21
- }: React.ComponentProps<typeof CommandPrimitive>) {
22
- return (
23
- <CommandPrimitive
24
- data-slot="command"
25
- className={cn(
26
- "flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",
27
- className,
28
- )}
29
- {...props}
30
- />
31
- );
32
- }
33
-
34
- function CommandDialog({
35
- title = "Command Palette",
36
- description = "Search for a command to run...",
37
- children,
38
- className,
39
- showCloseButton = false,
40
- ...props
41
- }: Omit<React.ComponentProps<typeof Dialog>, "children"> & {
42
- title?: string;
43
- description?: string;
44
- className?: string;
45
- showCloseButton?: boolean;
46
- children: React.ReactNode;
47
- }) {
48
- return (
49
- <Dialog {...props}>
50
- <DialogHeader className="sr-only">
51
- <DialogTitle>{title}</DialogTitle>
52
- <DialogDescription>{description}</DialogDescription>
53
- </DialogHeader>
54
- <DialogContent
55
- className={cn(
56
- "top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0",
57
- className,
58
- )}
59
- showCloseButton={showCloseButton}
60
- >
61
- {children}
62
- </DialogContent>
63
- </Dialog>
64
- );
65
- }
66
-
67
- function CommandInput({
68
- className,
69
- ...props
70
- }: React.ComponentProps<typeof CommandPrimitive.Input>) {
71
- return (
72
- <div data-slot="command-input-wrapper" className="p-1 pb-0">
73
- <InputGroup className="h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!">
74
- <CommandPrimitive.Input
75
- data-slot="command-input"
76
- className={cn(
77
- "w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
78
- className,
79
- )}
80
- {...props}
81
- />
82
- <InputGroupAddon>
83
- <SearchIcon className="size-4 shrink-0 opacity-50" />
84
- </InputGroupAddon>
85
- </InputGroup>
86
- </div>
87
- );
88
- }
89
-
90
- function CommandList({
91
- className,
92
- ...props
93
- }: React.ComponentProps<typeof CommandPrimitive.List>) {
94
- return (
95
- <CommandPrimitive.List
96
- data-slot="command-list"
97
- className={cn(
98
- "no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",
99
- className,
100
- )}
101
- {...props}
102
- />
103
- );
104
- }
105
-
106
- function CommandEmpty({
107
- className,
108
- ...props
109
- }: React.ComponentProps<typeof CommandPrimitive.Empty>) {
110
- return (
111
- <CommandPrimitive.Empty
112
- data-slot="command-empty"
113
- className={cn("py-6 text-center text-sm", className)}
114
- {...props}
115
- />
116
- );
117
- }
118
-
119
- function CommandGroup({
120
- className,
121
- ...props
122
- }: React.ComponentProps<typeof CommandPrimitive.Group>) {
123
- return (
124
- <CommandPrimitive.Group
125
- data-slot="command-group"
126
- className={cn(
127
- "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",
128
- className,
129
- )}
130
- {...props}
131
- />
132
- );
133
- }
134
-
135
- function CommandSeparator({
136
- className,
137
- ...props
138
- }: React.ComponentProps<typeof CommandPrimitive.Separator>) {
139
- return (
140
- <CommandPrimitive.Separator
141
- data-slot="command-separator"
142
- className={cn("-mx-1 h-px w-auto bg-border", className)}
143
- {...props}
144
- />
145
- );
146
- }
147
-
148
- function CommandItem({
149
- className,
150
- children,
151
- ...props
152
- }: React.ComponentProps<typeof CommandPrimitive.Item>) {
153
- return (
154
- <CommandPrimitive.Item
155
- data-slot="command-item"
156
- className={cn(
157
- "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",
158
- className,
159
- )}
160
- {...props}
161
- >
162
- {children}
163
- <CheckIcon className="ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" />
164
- </CommandPrimitive.Item>
165
- );
166
- }
167
-
168
- function CommandShortcut({
169
- className,
170
- ...props
171
- }: React.ComponentProps<"span">) {
172
- return (
173
- <span
174
- data-slot="command-shortcut"
175
- className={cn(
176
- "ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground",
177
- className,
178
- )}
179
- {...props}
180
- />
181
- );
182
- }
183
-
184
- export {
185
- Command,
186
- CommandDialog,
187
- CommandInput,
188
- CommandList,
189
- CommandEmpty,
190
- CommandGroup,
191
- CommandItem,
192
- CommandShortcut,
193
- CommandSeparator,
194
- };