@mkbabb/glass-ui 0.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.
Files changed (335) hide show
  1. package/README.md +172 -0
  2. package/dist/glass-ui.css +1 -0
  3. package/dist/glass-ui.js +10019 -0
  4. package/dist/index.d.ts +6619 -0
  5. package/package.json +65 -0
  6. package/src/components/custom/aurora/Aurora.vue +34 -0
  7. package/src/components/custom/aurora/composables/color.ts +122 -0
  8. package/src/components/custom/aurora/composables/useAurora.ts +355 -0
  9. package/src/components/custom/aurora/index.ts +8 -0
  10. package/src/components/custom/confirm-dialog/ConfirmDialog.vue +88 -0
  11. package/src/components/custom/confirm-dialog/index.ts +1 -0
  12. package/src/components/custom/controls/DarkModeToggle.vue +96 -0
  13. package/src/components/custom/controls/index.ts +1 -0
  14. package/src/components/custom/dock/DockLayerGroup.vue +21 -0
  15. package/src/components/custom/dock/DockPopover.vue +263 -0
  16. package/src/components/custom/dock/GlassDock.vue +276 -0
  17. package/src/components/custom/dock/composables/index.ts +16 -0
  18. package/src/components/custom/dock/composables/isTeleportedTarget.ts +19 -0
  19. package/src/components/custom/dock/composables/useDockActionBar.ts +33 -0
  20. package/src/components/custom/dock/composables/useDockState.ts +301 -0
  21. package/src/components/custom/dock/composables/useDockTransition.ts +146 -0
  22. package/src/components/custom/dock/composables/useLayerTransition.ts +135 -0
  23. package/src/components/custom/dock/composables/usePopupMutex.ts +83 -0
  24. package/src/components/custom/dock/index.ts +9 -0
  25. package/src/components/custom/expandable-container/ExpandableContainer.vue +64 -0
  26. package/src/components/custom/expandable-container/index.ts +1 -0
  27. package/src/components/custom/glass-panel/GlassPanel.vue +98 -0
  28. package/src/components/custom/glass-panel/index.ts +2 -0
  29. package/src/components/custom/icon-tooltip/IconTooltip.vue +20 -0
  30. package/src/components/custom/icon-tooltip/index.ts +1 -0
  31. package/src/components/custom/index.ts +15 -0
  32. package/src/components/custom/infinite-scroll/InfiniteScroll.vue +55 -0
  33. package/src/components/custom/infinite-scroll/composables/index.ts +2 -0
  34. package/src/components/custom/infinite-scroll/composables/types.ts +23 -0
  35. package/src/components/custom/infinite-scroll/composables/useInfiniteScroll.ts +73 -0
  36. package/src/components/custom/infinite-scroll/index.ts +1 -0
  37. package/src/components/custom/labeled-field/LabeledInput.vue +29 -0
  38. package/src/components/custom/labeled-field/LabeledSelect.vue +59 -0
  39. package/src/components/custom/labeled-field/LabeledSlider.vue +32 -0
  40. package/src/components/custom/labeled-field/LabeledSwitch.vue +27 -0
  41. package/src/components/custom/labeled-field/index.ts +4 -0
  42. package/src/components/custom/metaballs/MetaballCanvas.vue +23 -0
  43. package/src/components/custom/metaballs/index.ts +4 -0
  44. package/src/components/custom/metaballs/shaders.ts +63 -0
  45. package/src/components/custom/metaballs/types.ts +29 -0
  46. package/src/components/custom/metaballs/useMetaballs.ts +252 -0
  47. package/src/components/custom/search/FuzzySearch.vue +589 -0
  48. package/src/components/custom/search/SearchBar.vue +44 -0
  49. package/src/components/custom/search/composables/fuzzySearchIndex.ts +224 -0
  50. package/src/components/custom/search/composables/index.ts +5 -0
  51. package/src/components/custom/search/composables/types.ts +34 -0
  52. package/src/components/custom/search/composables/useFuzzySearch.ts +115 -0
  53. package/src/components/custom/search/index.ts +7 -0
  54. package/src/components/custom/sidebar/ProgressiveSidebar.vue +256 -0
  55. package/src/components/custom/sidebar/composables/index.ts +6 -0
  56. package/src/components/custom/sidebar/composables/useScrollTracker.ts +242 -0
  57. package/src/components/custom/sidebar/composables/useSidebarFollow.ts +247 -0
  58. package/src/components/custom/sidebar/composables/useSidebarState.ts +72 -0
  59. package/src/components/custom/sidebar/composables/useTreeIndex.ts +152 -0
  60. package/src/components/custom/sidebar/index.ts +15 -0
  61. package/src/components/custom/sidebar/types.ts +50 -0
  62. package/src/components/custom/tabs/BouncyTabs.vue +39 -0
  63. package/src/components/custom/tabs/BouncyToggle.vue +352 -0
  64. package/src/components/custom/tabs/UnderlineTabs.vue +115 -0
  65. package/src/components/custom/tabs/index.ts +5 -0
  66. package/src/components/custom/timeline/GlassTimeline.vue +174 -0
  67. package/src/components/custom/timeline/index.ts +1 -0
  68. package/src/components/custom/typewriter/TypewriterText.vue +239 -0
  69. package/src/components/custom/typewriter/composables/index.ts +1 -0
  70. package/src/components/custom/typewriter/composables/useTypewriter.ts +413 -0
  71. package/src/components/custom/typewriter/index.ts +7 -0
  72. package/src/components/custom/typewriter/types.ts +159 -0
  73. package/src/components/custom/typewriter/utils/keyboard.ts +213 -0
  74. package/src/components/custom/typewriter/utils/pausePatterns.ts +55 -0
  75. package/src/components/custom/typewriter/utils/timing.ts +104 -0
  76. package/src/components/custom/typewriter/utils/typoStateMachine.ts +197 -0
  77. package/src/components/index.ts +2 -0
  78. package/src/components/ui/accordion/Accordion.vue +19 -0
  79. package/src/components/ui/accordion/AccordionContent.vue +24 -0
  80. package/src/components/ui/accordion/AccordionItem.vue +24 -0
  81. package/src/components/ui/accordion/AccordionTrigger.vue +39 -0
  82. package/src/components/ui/accordion/index.ts +4 -0
  83. package/src/components/ui/alert/Alert.vue +20 -0
  84. package/src/components/ui/alert/AlertDescription.vue +17 -0
  85. package/src/components/ui/alert/AlertTitle.vue +17 -0
  86. package/src/components/ui/alert/index.ts +23 -0
  87. package/src/components/ui/avatar/Avatar.vue +21 -0
  88. package/src/components/ui/avatar/AvatarFallback.vue +11 -0
  89. package/src/components/ui/avatar/AvatarImage.vue +9 -0
  90. package/src/components/ui/avatar/index.ts +24 -0
  91. package/src/components/ui/badge/Badge.vue +16 -0
  92. package/src/components/ui/badge/index.ts +25 -0
  93. package/src/components/ui/button/Button.vue +26 -0
  94. package/src/components/ui/button/index.ts +43 -0
  95. package/src/components/ui/card/Card.vue +28 -0
  96. package/src/components/ui/card/CardContent.vue +14 -0
  97. package/src/components/ui/card/CardDescription.vue +14 -0
  98. package/src/components/ui/card/CardFooter.vue +14 -0
  99. package/src/components/ui/card/CardHeader.vue +14 -0
  100. package/src/components/ui/card/CardTitle.vue +21 -0
  101. package/src/components/ui/card/index.ts +6 -0
  102. package/src/components/ui/carousel/Carousel.vue +53 -0
  103. package/src/components/ui/carousel/CarouselContent.vue +35 -0
  104. package/src/components/ui/carousel/CarouselItem.vue +24 -0
  105. package/src/components/ui/carousel/CarouselNext.vue +40 -0
  106. package/src/components/ui/carousel/CarouselPrevious.vue +40 -0
  107. package/src/components/ui/carousel/index.ts +10 -0
  108. package/src/components/ui/carousel/interface.ts +26 -0
  109. package/src/components/ui/carousel/useCarousel.ts +56 -0
  110. package/src/components/ui/checkbox/Checkbox.vue +33 -0
  111. package/src/components/ui/checkbox/index.ts +1 -0
  112. package/src/components/ui/collapsible/Collapsible.vue +15 -0
  113. package/src/components/ui/collapsible/CollapsibleContent.vue +11 -0
  114. package/src/components/ui/collapsible/CollapsibleTrigger.vue +11 -0
  115. package/src/components/ui/collapsible/index.ts +3 -0
  116. package/src/components/ui/combobox/Combobox.vue +17 -0
  117. package/src/components/ui/combobox/ComboboxAnchor.vue +23 -0
  118. package/src/components/ui/combobox/ComboboxEmpty.vue +21 -0
  119. package/src/components/ui/combobox/ComboboxGroup.vue +27 -0
  120. package/src/components/ui/combobox/ComboboxInput.vue +41 -0
  121. package/src/components/ui/combobox/ComboboxItem.vue +24 -0
  122. package/src/components/ui/combobox/ComboboxItemIndicator.vue +23 -0
  123. package/src/components/ui/combobox/ComboboxList.vue +29 -0
  124. package/src/components/ui/combobox/ComboboxSeparator.vue +21 -0
  125. package/src/components/ui/combobox/ComboboxViewport.vue +23 -0
  126. package/src/components/ui/combobox/index.ts +12 -0
  127. package/src/components/ui/command/Command.vue +30 -0
  128. package/src/components/ui/command/CommandDialog.vue +21 -0
  129. package/src/components/ui/command/CommandEmpty.vue +20 -0
  130. package/src/components/ui/command/CommandGroup.vue +29 -0
  131. package/src/components/ui/command/CommandInput.vue +33 -0
  132. package/src/components/ui/command/CommandItem.vue +26 -0
  133. package/src/components/ui/command/CommandList.vue +27 -0
  134. package/src/components/ui/command/CommandSeparator.vue +23 -0
  135. package/src/components/ui/command/CommandShortcut.vue +14 -0
  136. package/src/components/ui/command/index.ts +9 -0
  137. package/src/components/ui/context-menu/ContextMenu.vue +15 -0
  138. package/src/components/ui/context-menu/ContextMenuCheckboxItem.vue +40 -0
  139. package/src/components/ui/context-menu/ContextMenuContent.vue +36 -0
  140. package/src/components/ui/context-menu/ContextMenuGroup.vue +11 -0
  141. package/src/components/ui/context-menu/ContextMenuItem.vue +34 -0
  142. package/src/components/ui/context-menu/ContextMenuLabel.vue +25 -0
  143. package/src/components/ui/context-menu/ContextMenuPortal.vue +11 -0
  144. package/src/components/ui/context-menu/ContextMenuRadioGroup.vue +19 -0
  145. package/src/components/ui/context-menu/ContextMenuRadioItem.vue +40 -0
  146. package/src/components/ui/context-menu/ContextMenuSeparator.vue +20 -0
  147. package/src/components/ui/context-menu/ContextMenuShortcut.vue +14 -0
  148. package/src/components/ui/context-menu/ContextMenuSub.vue +19 -0
  149. package/src/components/ui/context-menu/ContextMenuSubContent.vue +35 -0
  150. package/src/components/ui/context-menu/ContextMenuSubTrigger.vue +34 -0
  151. package/src/components/ui/context-menu/ContextMenuTrigger.vue +13 -0
  152. package/src/components/ui/context-menu/index.ts +14 -0
  153. package/src/components/ui/data-table/DataTable.vue +167 -0
  154. package/src/components/ui/data-table/DataTablePagination.vue +112 -0
  155. package/src/components/ui/data-table/index.ts +3 -0
  156. package/src/components/ui/data-table/types.ts +48 -0
  157. package/src/components/ui/dialog/Dialog.vue +14 -0
  158. package/src/components/ui/dialog/DialogClose.vue +11 -0
  159. package/src/components/ui/dialog/DialogContent.vue +61 -0
  160. package/src/components/ui/dialog/DialogDescription.vue +24 -0
  161. package/src/components/ui/dialog/DialogFooter.vue +19 -0
  162. package/src/components/ui/dialog/DialogHeader.vue +16 -0
  163. package/src/components/ui/dialog/DialogScrollContent.vue +65 -0
  164. package/src/components/ui/dialog/DialogTitle.vue +29 -0
  165. package/src/components/ui/dialog/DialogTrigger.vue +11 -0
  166. package/src/components/ui/dialog/index.ts +9 -0
  167. package/src/components/ui/drawer/Drawer.vue +19 -0
  168. package/src/components/ui/drawer/DrawerContent.vue +28 -0
  169. package/src/components/ui/drawer/DrawerDescription.vue +20 -0
  170. package/src/components/ui/drawer/DrawerFooter.vue +14 -0
  171. package/src/components/ui/drawer/DrawerHeader.vue +14 -0
  172. package/src/components/ui/drawer/DrawerOverlay.vue +18 -0
  173. package/src/components/ui/drawer/DrawerTitle.vue +20 -0
  174. package/src/components/ui/drawer/index.ts +8 -0
  175. package/src/components/ui/dropdown-menu/DropdownMenu.vue +14 -0
  176. package/src/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +40 -0
  177. package/src/components/ui/dropdown-menu/DropdownMenuContent.vue +44 -0
  178. package/src/components/ui/dropdown-menu/DropdownMenuGroup.vue +11 -0
  179. package/src/components/ui/dropdown-menu/DropdownMenuItem.vue +28 -0
  180. package/src/components/ui/dropdown-menu/DropdownMenuLabel.vue +24 -0
  181. package/src/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +19 -0
  182. package/src/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +40 -0
  183. package/src/components/ui/dropdown-menu/DropdownMenuSeparator.vue +22 -0
  184. package/src/components/ui/dropdown-menu/DropdownMenuShortcut.vue +14 -0
  185. package/src/components/ui/dropdown-menu/DropdownMenuSub.vue +19 -0
  186. package/src/components/ui/dropdown-menu/DropdownMenuSubContent.vue +36 -0
  187. package/src/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +33 -0
  188. package/src/components/ui/dropdown-menu/DropdownMenuTrigger.vue +13 -0
  189. package/src/components/ui/dropdown-menu/index.ts +16 -0
  190. package/src/components/ui/hover-card/HoverCard.vue +14 -0
  191. package/src/components/ui/hover-card/HoverCardContent.vue +41 -0
  192. package/src/components/ui/hover-card/HoverCardTrigger.vue +11 -0
  193. package/src/components/ui/hover-card/index.ts +3 -0
  194. package/src/components/ui/index.ts +41 -0
  195. package/src/components/ui/input/Input.vue +24 -0
  196. package/src/components/ui/input/index.ts +1 -0
  197. package/src/components/ui/label/Label.vue +27 -0
  198. package/src/components/ui/label/index.ts +1 -0
  199. package/src/components/ui/multi-select/MultiSelect.vue +141 -0
  200. package/src/components/ui/multi-select/index.ts +7 -0
  201. package/src/components/ui/notification/Notification.vue +85 -0
  202. package/src/components/ui/notification/index.ts +1 -0
  203. package/src/components/ui/number-field/NumberField.vue +23 -0
  204. package/src/components/ui/number-field/NumberFieldContent.vue +14 -0
  205. package/src/components/ui/number-field/NumberFieldDecrement.vue +25 -0
  206. package/src/components/ui/number-field/NumberFieldIncrement.vue +25 -0
  207. package/src/components/ui/number-field/NumberFieldInput.vue +8 -0
  208. package/src/components/ui/number-field/index.ts +5 -0
  209. package/src/components/ui/popover/Popover.vue +15 -0
  210. package/src/components/ui/popover/PopoverContent.vue +61 -0
  211. package/src/components/ui/popover/PopoverTrigger.vue +11 -0
  212. package/src/components/ui/popover/index.ts +3 -0
  213. package/src/components/ui/progress/Progress.vue +39 -0
  214. package/src/components/ui/progress/index.ts +1 -0
  215. package/src/components/ui/radio-group/RadioGroup.vue +25 -0
  216. package/src/components/ui/radio-group/RadioGroupItem.vue +39 -0
  217. package/src/components/ui/radio-group/index.ts +2 -0
  218. package/src/components/ui/scroll-area/ScrollArea.vue +29 -0
  219. package/src/components/ui/scroll-area/ScrollBar.vue +30 -0
  220. package/src/components/ui/scroll-area/index.ts +2 -0
  221. package/src/components/ui/scroll-pane/ScrollPane.vue +25 -0
  222. package/src/components/ui/scroll-pane/ScrollPaneHeader.vue +75 -0
  223. package/src/components/ui/scroll-pane/index.ts +2 -0
  224. package/src/components/ui/select/Select.vue +15 -0
  225. package/src/components/ui/select/SelectContent.vue +57 -0
  226. package/src/components/ui/select/SelectGroup.vue +19 -0
  227. package/src/components/ui/select/SelectItem.vue +47 -0
  228. package/src/components/ui/select/SelectItemText.vue +11 -0
  229. package/src/components/ui/select/SelectLabel.vue +13 -0
  230. package/src/components/ui/select/SelectScrollDownButton.vue +24 -0
  231. package/src/components/ui/select/SelectScrollUpButton.vue +24 -0
  232. package/src/components/ui/select/SelectSeparator.vue +17 -0
  233. package/src/components/ui/select/SelectTrigger.vue +45 -0
  234. package/src/components/ui/select/SelectValue.vue +11 -0
  235. package/src/components/ui/select/index.ts +11 -0
  236. package/src/components/ui/separator/Separator.vue +35 -0
  237. package/src/components/ui/separator/index.ts +1 -0
  238. package/src/components/ui/sheet/Sheet.vue +14 -0
  239. package/src/components/ui/sheet/SheetClose.vue +11 -0
  240. package/src/components/ui/sheet/SheetContent.vue +56 -0
  241. package/src/components/ui/sheet/SheetDescription.vue +22 -0
  242. package/src/components/ui/sheet/SheetFooter.vue +19 -0
  243. package/src/components/ui/sheet/SheetHeader.vue +16 -0
  244. package/src/components/ui/sheet/SheetTitle.vue +22 -0
  245. package/src/components/ui/sheet/SheetTrigger.vue +11 -0
  246. package/src/components/ui/sheet/index.ts +31 -0
  247. package/src/components/ui/skeleton/Skeleton.vue +14 -0
  248. package/src/components/ui/skeleton/index.ts +1 -0
  249. package/src/components/ui/slider/Slider.vue +66 -0
  250. package/src/components/ui/slider/index.ts +1 -0
  251. package/src/components/ui/switch/Switch.vue +37 -0
  252. package/src/components/ui/switch/index.ts +1 -0
  253. package/src/components/ui/table/Table.vue +16 -0
  254. package/src/components/ui/table/TableBody.vue +14 -0
  255. package/src/components/ui/table/TableCaption.vue +14 -0
  256. package/src/components/ui/table/TableCell.vue +14 -0
  257. package/src/components/ui/table/TableEmpty.vue +39 -0
  258. package/src/components/ui/table/TableFooter.vue +16 -0
  259. package/src/components/ui/table/TableHead.vue +21 -0
  260. package/src/components/ui/table/TableHeader.vue +14 -0
  261. package/src/components/ui/table/TableRow.vue +21 -0
  262. package/src/components/ui/table/index.ts +9 -0
  263. package/src/components/ui/tabs/Tabs.vue +15 -0
  264. package/src/components/ui/tabs/TabsContent.vue +22 -0
  265. package/src/components/ui/tabs/TabsIndicator.vue +22 -0
  266. package/src/components/ui/tabs/TabsList.vue +25 -0
  267. package/src/components/ui/tabs/TabsTrigger.vue +29 -0
  268. package/src/components/ui/tabs/index.ts +5 -0
  269. package/src/components/ui/tags-input/TagsInput.vue +22 -0
  270. package/src/components/ui/tags-input/TagsInputInput.vue +19 -0
  271. package/src/components/ui/tags-input/TagsInputItem.vue +22 -0
  272. package/src/components/ui/tags-input/TagsInputItemDelete.vue +24 -0
  273. package/src/components/ui/tags-input/TagsInputItemText.vue +19 -0
  274. package/src/components/ui/tags-input/index.ts +5 -0
  275. package/src/components/ui/textarea/Textarea.vue +24 -0
  276. package/src/components/ui/textarea/index.ts +1 -0
  277. package/src/components/ui/toast/Toast.vue +57 -0
  278. package/src/components/ui/toast/ToastAction.vue +30 -0
  279. package/src/components/ui/toast/ToastClose.vue +31 -0
  280. package/src/components/ui/toast/ToastDescription.vue +25 -0
  281. package/src/components/ui/toast/ToastTitle.vue +25 -0
  282. package/src/components/ui/toast/Toaster.vue +31 -0
  283. package/src/components/ui/toast/index.ts +8 -0
  284. package/src/components/ui/toast/use-toast.ts +136 -0
  285. package/src/components/ui/toggle/Toggle.vue +35 -0
  286. package/src/components/ui/toggle/index.ts +27 -0
  287. package/src/components/ui/toggle-group/ToggleGroup.vue +34 -0
  288. package/src/components/ui/toggle-group/ToggleGroupItem.vue +35 -0
  289. package/src/components/ui/toggle-group/index.ts +2 -0
  290. package/src/components/ui/tooltip/Tooltip.vue +14 -0
  291. package/src/components/ui/tooltip/TooltipContent.vue +31 -0
  292. package/src/components/ui/tooltip/TooltipProvider.vue +11 -0
  293. package/src/components/ui/tooltip/TooltipTrigger.vue +11 -0
  294. package/src/components/ui/tooltip/index.ts +4 -0
  295. package/src/composables/glass/index.ts +8 -0
  296. package/src/composables/glass/useGlassRenderer.ts +252 -0
  297. package/src/composables/glass/webgl/frostShader.ts +221 -0
  298. package/src/composables/glass/webgpu/glassShader.wgsl +173 -0
  299. package/src/composables/index.ts +32 -0
  300. package/src/composables/infinite-scroll/index.ts +2 -0
  301. package/src/composables/infinite-scroll/types.ts +25 -0
  302. package/src/composables/infinite-scroll/useInfiniteScroll.ts +101 -0
  303. package/src/composables/interaction/index.ts +5 -0
  304. package/src/composables/interaction/useHeightTransition.ts +82 -0
  305. package/src/composables/interaction/useHoverPopover.ts +64 -0
  306. package/src/composables/interaction/useHoverToggle.ts +103 -0
  307. package/src/composables/interaction/useLeaveTimer.ts +17 -0
  308. package/src/composables/interaction/useTouchGate.ts +207 -0
  309. package/src/composables/pagination/index.ts +2 -0
  310. package/src/composables/pagination/useOffsetPagination.ts +70 -0
  311. package/src/composables/prng.ts +32 -0
  312. package/src/composables/useCharSplit.ts +31 -0
  313. package/src/composables/useClipboard.ts +46 -0
  314. package/src/composables/useGlobalDark.ts +61 -0
  315. package/src/composables/useKeyboardShortcuts.ts +205 -0
  316. package/src/composables/useWatercolorBlob.ts +136 -0
  317. package/src/composables/virtual/index.ts +22 -0
  318. package/src/composables/virtual/useVirtualSectionWindow.ts +338 -0
  319. package/src/composables/virtual/useWindowedStore.ts +86 -0
  320. package/src/composables/virtual/virtualSectionLayout.ts +212 -0
  321. package/src/index.ts +9 -0
  322. package/src/styles/animations.css +233 -0
  323. package/src/styles/cards.css +66 -0
  324. package/src/styles/dock.css +221 -0
  325. package/src/styles/floating-panel.css +49 -0
  326. package/src/styles/glass.css +266 -0
  327. package/src/styles/index.css +26 -0
  328. package/src/styles/scroll-pane.css +10 -0
  329. package/src/styles/theme.css +138 -0
  330. package/src/styles/tokens.css +333 -0
  331. package/src/styles/transitions.css +226 -0
  332. package/src/styles/typography.css +277 -0
  333. package/src/styles/utilities.css +697 -0
  334. package/src/utils/cn.ts +6 -0
  335. package/src/utils/index.ts +1 -0
@@ -0,0 +1,56 @@
1
+ import type { UnwrapRefCarouselApi as CarouselApi, CarouselEmits, CarouselProps } from './interface'
2
+ import { createInjectionState } from '@vueuse/core'
3
+ import emblaCarouselVue from 'embla-carousel-vue'
4
+ import { onMounted, ref } from 'vue'
5
+
6
+ const [useProvideCarousel, useInjectCarousel] = createInjectionState(
7
+ ({
8
+ opts,
9
+ orientation,
10
+ plugins,
11
+ }: CarouselProps, emits: CarouselEmits) => {
12
+ const [emblaNode, emblaApi] = emblaCarouselVue({
13
+ ...opts,
14
+ axis: orientation === 'horizontal' ? 'x' : 'y',
15
+ }, plugins)
16
+
17
+ function scrollPrev() {
18
+ emblaApi.value?.scrollPrev()
19
+ }
20
+ function scrollNext() {
21
+ emblaApi.value?.scrollNext()
22
+ }
23
+
24
+ const canScrollNext = ref(false)
25
+ const canScrollPrev = ref(false)
26
+
27
+ function onSelect(api: CarouselApi) {
28
+ canScrollNext.value = api?.canScrollNext() || false
29
+ canScrollPrev.value = api?.canScrollPrev() || false
30
+ }
31
+
32
+ onMounted(() => {
33
+ if (!emblaApi.value)
34
+ return
35
+
36
+ emblaApi.value?.on('init', onSelect)
37
+ emblaApi.value?.on('reInit', onSelect)
38
+ emblaApi.value?.on('select', onSelect)
39
+
40
+ emits('init-api', emblaApi.value)
41
+ })
42
+
43
+ return { carouselRef: emblaNode, carouselApi: emblaApi, canScrollPrev, canScrollNext, scrollPrev, scrollNext, orientation }
44
+ },
45
+ )
46
+
47
+ function useCarousel() {
48
+ const carouselState = useInjectCarousel()
49
+
50
+ if (!carouselState)
51
+ throw new Error('useCarousel must be used within a <Carousel />')
52
+
53
+ return carouselState
54
+ }
55
+
56
+ export { useCarousel, useProvideCarousel }
@@ -0,0 +1,33 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import type { CheckboxRootEmits, CheckboxRootProps } from 'reka-ui'
4
+ import { CheckboxIndicator, CheckboxRoot, useForwardPropsEmits } from 'reka-ui'
5
+ import { Check } from 'lucide-vue-next'
6
+ import { cn } from '../../../utils'
7
+
8
+ const props = defineProps<CheckboxRootProps & { class?: HTMLAttributes['class'] }>()
9
+ const emits = defineEmits<CheckboxRootEmits>()
10
+
11
+ const delegatedProps = computed(() => {
12
+ const { class: _, ...delegated } = props
13
+
14
+ return delegated
15
+ })
16
+
17
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
18
+ </script>
19
+
20
+ <template>
21
+ <CheckboxRoot
22
+ v-bind="forwarded"
23
+ :class="
24
+ cn('peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground',
25
+ props.class)"
26
+ >
27
+ <CheckboxIndicator class="flex h-full w-full items-center justify-center text-current">
28
+ <slot>
29
+ <Check class="h-4 w-4" />
30
+ </slot>
31
+ </CheckboxIndicator>
32
+ </CheckboxRoot>
33
+ </template>
@@ -0,0 +1 @@
1
+ export { default as Checkbox } from './Checkbox.vue'
@@ -0,0 +1,15 @@
1
+ <script setup lang="ts">
2
+ import { CollapsibleRoot, useForwardPropsEmits } from 'reka-ui'
3
+ import type { CollapsibleRootEmits, CollapsibleRootProps } from 'reka-ui'
4
+
5
+ const props = defineProps<CollapsibleRootProps>()
6
+ const emits = defineEmits<CollapsibleRootEmits>()
7
+
8
+ const forwarded = useForwardPropsEmits(props, emits)
9
+ </script>
10
+
11
+ <template>
12
+ <CollapsibleRoot v-slot="{ open }" v-bind="forwarded">
13
+ <slot :open="open" />
14
+ </CollapsibleRoot>
15
+ </template>
@@ -0,0 +1,11 @@
1
+ <script setup lang="ts">
2
+ import { CollapsibleContent, type CollapsibleContentProps } from 'reka-ui'
3
+
4
+ const props = defineProps<CollapsibleContentProps>()
5
+ </script>
6
+
7
+ <template>
8
+ <CollapsibleContent v-bind="props" class="overflow-hidden transition-all data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down">
9
+ <slot />
10
+ </CollapsibleContent>
11
+ </template>
@@ -0,0 +1,11 @@
1
+ <script setup lang="ts">
2
+ import { CollapsibleTrigger, type CollapsibleTriggerProps } from 'reka-ui'
3
+
4
+ const props = defineProps<CollapsibleTriggerProps>()
5
+ </script>
6
+
7
+ <template>
8
+ <CollapsibleTrigger v-bind="props">
9
+ <slot />
10
+ </CollapsibleTrigger>
11
+ </template>
@@ -0,0 +1,3 @@
1
+ export { default as Collapsible } from './Collapsible.vue'
2
+ export { default as CollapsibleTrigger } from './CollapsibleTrigger.vue'
3
+ export { default as CollapsibleContent } from './CollapsibleContent.vue'
@@ -0,0 +1,17 @@
1
+ <script setup lang="ts">
2
+ import { ComboboxRoot, type ComboboxRootEmits, type ComboboxRootProps, useForwardPropsEmits } from 'reka-ui'
3
+
4
+ const props = defineProps<ComboboxRootProps>()
5
+ const emits = defineEmits<ComboboxRootEmits>()
6
+
7
+ const forwarded = useForwardPropsEmits(props, emits)
8
+ </script>
9
+
10
+ <template>
11
+ <ComboboxRoot
12
+ data-slot="combobox"
13
+ v-bind="forwarded"
14
+ >
15
+ <slot />
16
+ </ComboboxRoot>
17
+ </template>
@@ -0,0 +1,23 @@
1
+ <script setup lang="ts">
2
+ import type { ComboboxAnchorProps } from 'reka-ui'
3
+ import type { HTMLAttributes } from 'vue'
4
+ import { reactiveOmit } from '@vueuse/core'
5
+ import { ComboboxAnchor, useForwardProps } from 'reka-ui'
6
+ import { cn } from '../../../utils'
7
+
8
+ const props = defineProps<ComboboxAnchorProps & { class?: HTMLAttributes['class'] }>()
9
+
10
+ const delegatedProps = reactiveOmit(props, 'class')
11
+
12
+ const forwarded = useForwardProps(delegatedProps)
13
+ </script>
14
+
15
+ <template>
16
+ <ComboboxAnchor
17
+ data-slot="combobox-anchor"
18
+ v-bind="forwarded"
19
+ :class="cn('w-[200px]', props.class)"
20
+ >
21
+ <slot />
22
+ </ComboboxAnchor>
23
+ </template>
@@ -0,0 +1,21 @@
1
+ <script setup lang="ts">
2
+ import type { ComboboxEmptyProps } from 'reka-ui'
3
+ import type { HTMLAttributes } from 'vue'
4
+ import { reactiveOmit } from '@vueuse/core'
5
+ import { ComboboxEmpty } from 'reka-ui'
6
+ import { cn } from '../../../utils'
7
+
8
+ const props = defineProps<ComboboxEmptyProps & { class?: HTMLAttributes['class'] }>()
9
+
10
+ const delegatedProps = reactiveOmit(props, 'class')
11
+ </script>
12
+
13
+ <template>
14
+ <ComboboxEmpty
15
+ data-slot="combobox-empty"
16
+ v-bind="delegatedProps"
17
+ :class="cn('py-6 text-center text-sm', props.class)"
18
+ >
19
+ <slot />
20
+ </ComboboxEmpty>
21
+ </template>
@@ -0,0 +1,27 @@
1
+ <script setup lang="ts">
2
+ import type { ComboboxGroupProps } from 'reka-ui'
3
+ import type { HTMLAttributes } from 'vue'
4
+ import { reactiveOmit } from '@vueuse/core'
5
+ import { ComboboxGroup, ComboboxLabel } from 'reka-ui'
6
+ import { cn } from '../../../utils'
7
+
8
+ const props = defineProps<ComboboxGroupProps & {
9
+ class?: HTMLAttributes['class']
10
+ heading?: string
11
+ }>()
12
+
13
+ const delegatedProps = reactiveOmit(props, 'class')
14
+ </script>
15
+
16
+ <template>
17
+ <ComboboxGroup
18
+ data-slot="combobox-group"
19
+ v-bind="delegatedProps"
20
+ :class="cn('overflow-hidden p-1 text-foreground', props.class)"
21
+ >
22
+ <ComboboxLabel v-if="heading" class="px-2 py-1.5 text-xs font-medium text-muted-foreground">
23
+ {{ heading }}
24
+ </ComboboxLabel>
25
+ <slot />
26
+ </ComboboxGroup>
27
+ </template>
@@ -0,0 +1,41 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { reactiveOmit } from '@vueuse/core'
4
+ import { SearchIcon } from 'lucide-vue-next'
5
+ import { ComboboxInput, type ComboboxInputEmits, type ComboboxInputProps, useForwardPropsEmits } from 'reka-ui'
6
+ import { cn } from '../../../utils'
7
+
8
+ defineOptions({
9
+ inheritAttrs: false,
10
+ })
11
+
12
+ const props = defineProps<ComboboxInputProps & {
13
+ class?: HTMLAttributes['class']
14
+ }>()
15
+
16
+ const emits = defineEmits<ComboboxInputEmits>()
17
+
18
+ const delegatedProps = reactiveOmit(props, 'class')
19
+
20
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
21
+ </script>
22
+
23
+ <template>
24
+ <div
25
+ data-slot="command-input-wrapper"
26
+ class="flex h-9 items-center gap-2 border-b px-3"
27
+ >
28
+ <SearchIcon class="size-4 shrink-0 opacity-50" />
29
+ <ComboboxInput
30
+ data-slot="command-input"
31
+ :class="cn(
32
+ 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50',
33
+ props.class,
34
+ )"
35
+
36
+ v-bind="{ ...forwarded, ...$attrs }"
37
+ >
38
+ <slot />
39
+ </ComboboxInput>
40
+ </div>
41
+ </template>
@@ -0,0 +1,24 @@
1
+ <script setup lang="ts">
2
+ import type { ComboboxItemEmits, ComboboxItemProps } from 'reka-ui'
3
+ import type { HTMLAttributes } from 'vue'
4
+ import { reactiveOmit } from '@vueuse/core'
5
+ import { ComboboxItem, useForwardPropsEmits } from 'reka-ui'
6
+ import { cn } from '../../../utils'
7
+
8
+ const props = defineProps<ComboboxItemProps & { class?: HTMLAttributes['class'] }>()
9
+ const emits = defineEmits<ComboboxItemEmits>()
10
+
11
+ const delegatedProps = reactiveOmit(props, 'class')
12
+
13
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
14
+ </script>
15
+
16
+ <template>
17
+ <ComboboxItem
18
+ data-slot="combobox-item"
19
+ v-bind="forwarded"
20
+ :class="cn(`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`, props.class)"
21
+ >
22
+ <slot />
23
+ </ComboboxItem>
24
+ </template>
@@ -0,0 +1,23 @@
1
+ <script setup lang="ts">
2
+ import type { ComboboxItemIndicatorProps } from 'reka-ui'
3
+ import type { HTMLAttributes } from 'vue'
4
+ import { reactiveOmit } from '@vueuse/core'
5
+ import { ComboboxItemIndicator, useForwardProps } from 'reka-ui'
6
+ import { cn } from '../../../utils'
7
+
8
+ const props = defineProps<ComboboxItemIndicatorProps & { class?: HTMLAttributes['class'] }>()
9
+
10
+ const delegatedProps = reactiveOmit(props, 'class')
11
+
12
+ const forwarded = useForwardProps(delegatedProps)
13
+ </script>
14
+
15
+ <template>
16
+ <ComboboxItemIndicator
17
+ data-slot="combobox-item-indicator"
18
+ v-bind="forwarded"
19
+ :class="cn('ml-auto', props.class)"
20
+ >
21
+ <slot />
22
+ </ComboboxItemIndicator>
23
+ </template>
@@ -0,0 +1,29 @@
1
+ <script setup lang="ts">
2
+ import type { ComboboxContentEmits, ComboboxContentProps } from 'reka-ui'
3
+ import type { HTMLAttributes } from 'vue'
4
+ import { reactiveOmit } from '@vueuse/core'
5
+ import { ComboboxContent, ComboboxPortal, useForwardPropsEmits } from 'reka-ui'
6
+ import { cn } from '../../../utils'
7
+
8
+ const props = withDefaults(defineProps<ComboboxContentProps & { class?: HTMLAttributes['class'] }>(), {
9
+ position: 'popper',
10
+ align: 'center',
11
+ sideOffset: 4,
12
+ })
13
+ const emits = defineEmits<ComboboxContentEmits>()
14
+
15
+ const delegatedProps = reactiveOmit(props, 'class')
16
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
17
+ </script>
18
+
19
+ <template>
20
+ <ComboboxPortal>
21
+ <ComboboxContent
22
+ data-slot="combobox-list"
23
+ v-bind="forwarded"
24
+ :class="cn('z-popover w-[200px] rounded-xl border bg-[var(--glass-bg-elevated)] [backdrop-filter:var(--glass-blur-elevated)] border-[var(--glass-border-elevated)] text-popover-foreground origin-[--reka-combobox-content-transform-origin] overflow-hidden shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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', props.class)"
25
+ >
26
+ <slot />
27
+ </ComboboxContent>
28
+ </ComboboxPortal>
29
+ </template>
@@ -0,0 +1,21 @@
1
+ <script setup lang="ts">
2
+ import type { ComboboxSeparatorProps } from 'reka-ui'
3
+ import type { HTMLAttributes } from 'vue'
4
+ import { reactiveOmit } from '@vueuse/core'
5
+ import { ComboboxSeparator } from 'reka-ui'
6
+ import { cn } from '../../../utils'
7
+
8
+ const props = defineProps<ComboboxSeparatorProps & { class?: HTMLAttributes['class'] }>()
9
+
10
+ const delegatedProps = reactiveOmit(props, 'class')
11
+ </script>
12
+
13
+ <template>
14
+ <ComboboxSeparator
15
+ data-slot="combobox-separator"
16
+ v-bind="delegatedProps"
17
+ :class="cn('bg-border -mx-1 h-px', props.class)"
18
+ >
19
+ <slot />
20
+ </ComboboxSeparator>
21
+ </template>
@@ -0,0 +1,23 @@
1
+ <script setup lang="ts">
2
+ import type { ComboboxViewportProps } from 'reka-ui'
3
+ import type { HTMLAttributes } from 'vue'
4
+ import { reactiveOmit } from '@vueuse/core'
5
+ import { ComboboxViewport, useForwardProps } from 'reka-ui'
6
+ import { cn } from '../../../utils'
7
+
8
+ const props = defineProps<ComboboxViewportProps & { class?: HTMLAttributes['class'] }>()
9
+
10
+ const delegatedProps = reactiveOmit(props, 'class')
11
+
12
+ const forwarded = useForwardProps(delegatedProps)
13
+ </script>
14
+
15
+ <template>
16
+ <ComboboxViewport
17
+ data-slot="combobox-viewport"
18
+ v-bind="forwarded"
19
+ :class="cn('max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto', props.class)"
20
+ >
21
+ <slot />
22
+ </ComboboxViewport>
23
+ </template>
@@ -0,0 +1,12 @@
1
+ export { default as Combobox } from './Combobox.vue'
2
+ export { default as ComboboxAnchor } from './ComboboxAnchor.vue'
3
+ export { default as ComboboxEmpty } from './ComboboxEmpty.vue'
4
+ export { default as ComboboxGroup } from './ComboboxGroup.vue'
5
+ export { default as ComboboxInput } from './ComboboxInput.vue'
6
+ export { default as ComboboxItem } from './ComboboxItem.vue'
7
+ export { default as ComboboxItemIndicator } from './ComboboxItemIndicator.vue'
8
+ export { default as ComboboxList } from './ComboboxList.vue'
9
+ export { default as ComboboxSeparator } from './ComboboxSeparator.vue'
10
+ export { default as ComboboxViewport } from './ComboboxViewport.vue'
11
+
12
+ export { ComboboxCancel, ComboboxTrigger } from 'reka-ui'
@@ -0,0 +1,30 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import type { ComboboxRootEmits, ComboboxRootProps } from 'reka-ui'
4
+ import { ComboboxRoot, useForwardPropsEmits } from 'reka-ui'
5
+ import { cn } from '../../../utils'
6
+
7
+ const props = withDefaults(defineProps<ComboboxRootProps & { class?: HTMLAttributes['class'] }>(), {
8
+ open: true,
9
+ modelValue: '',
10
+ })
11
+
12
+ const emits = defineEmits<ComboboxRootEmits>()
13
+
14
+ const delegatedProps = computed(() => {
15
+ const { class: _, ...delegated } = props
16
+
17
+ return delegated
18
+ })
19
+
20
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
21
+ </script>
22
+
23
+ <template>
24
+ <ComboboxRoot
25
+ v-bind="forwarded"
26
+ :class="cn('flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground', props.class)"
27
+ >
28
+ <slot />
29
+ </ComboboxRoot>
30
+ </template>
@@ -0,0 +1,21 @@
1
+ <script setup lang="ts">
2
+ import { useForwardPropsEmits } from 'reka-ui'
3
+ import type { DialogRootEmits, DialogRootProps } from 'reka-ui'
4
+ import Command from './Command.vue'
5
+ import { Dialog, DialogContent } from '../dialog'
6
+
7
+ const props = defineProps<DialogRootProps>()
8
+ const emits = defineEmits<DialogRootEmits>()
9
+
10
+ const forwarded = useForwardPropsEmits(props, emits)
11
+ </script>
12
+
13
+ <template>
14
+ <Dialog v-bind="forwarded">
15
+ <DialogContent class="overflow-hidden p-0 shadow-lg">
16
+ <Command class="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
17
+ <slot />
18
+ </Command>
19
+ </DialogContent>
20
+ </Dialog>
21
+ </template>
@@ -0,0 +1,20 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import type { ComboboxEmptyProps } from 'reka-ui'
4
+ import { ComboboxEmpty } from 'reka-ui'
5
+ import { cn } from '../../../utils'
6
+
7
+ const props = defineProps<ComboboxEmptyProps & { class?: HTMLAttributes['class'] }>()
8
+
9
+ const delegatedProps = computed(() => {
10
+ const { class: _, ...delegated } = props
11
+
12
+ return delegated
13
+ })
14
+ </script>
15
+
16
+ <template>
17
+ <ComboboxEmpty v-bind="delegatedProps" :class="cn('py-6 text-center text-sm', props.class)">
18
+ <slot />
19
+ </ComboboxEmpty>
20
+ </template>
@@ -0,0 +1,29 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import type { ComboboxGroupProps } from 'reka-ui'
4
+ import { ComboboxGroup, ComboboxLabel } from 'reka-ui'
5
+ import { cn } from '../../../utils'
6
+
7
+ const props = defineProps<ComboboxGroupProps & {
8
+ class?: HTMLAttributes['class']
9
+ heading?: string
10
+ }>()
11
+
12
+ const delegatedProps = computed(() => {
13
+ const { class: _, ...delegated } = props
14
+
15
+ return delegated
16
+ })
17
+ </script>
18
+
19
+ <template>
20
+ <ComboboxGroup
21
+ v-bind="delegatedProps"
22
+ :class="cn('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', props.class)"
23
+ >
24
+ <ComboboxLabel v-if="heading" class="px-2 py-1.5 text-xs font-medium text-muted-foreground">
25
+ {{ heading }}
26
+ </ComboboxLabel>
27
+ <slot />
28
+ </ComboboxGroup>
29
+ </template>
@@ -0,0 +1,33 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import { Search } from 'lucide-vue-next'
4
+ import { ComboboxInput, type ComboboxInputProps, useForwardProps } from 'reka-ui'
5
+ import { cn } from '../../../utils'
6
+
7
+ defineOptions({
8
+ inheritAttrs: false,
9
+ })
10
+
11
+ const props = defineProps<ComboboxInputProps & {
12
+ class?: HTMLAttributes['class']
13
+ }>()
14
+
15
+ const delegatedProps = computed(() => {
16
+ const { class: _, ...delegated } = props
17
+
18
+ return delegated
19
+ })
20
+
21
+ const forwardedProps = useForwardProps(delegatedProps)
22
+ </script>
23
+
24
+ <template>
25
+ <div class="flex items-center border-b px-3" cmdk-input-wrapper>
26
+ <Search class="mr-2 h-4 w-4 shrink-0 opacity-50" />
27
+ <ComboboxInput
28
+ v-bind="{ ...forwardedProps, ...$attrs }"
29
+ auto-focus
30
+ :class="cn('flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50', props.class)"
31
+ />
32
+ </div>
33
+ </template>
@@ -0,0 +1,26 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import type { ComboboxItemEmits, ComboboxItemProps } from 'reka-ui'
4
+ import { ComboboxItem, useForwardPropsEmits } from 'reka-ui'
5
+ import { cn } from '../../../utils'
6
+
7
+ const props = defineProps<ComboboxItemProps & { class?: HTMLAttributes['class'] }>()
8
+ const emits = defineEmits<ComboboxItemEmits>()
9
+
10
+ const delegatedProps = computed(() => {
11
+ const { class: _, ...delegated } = props
12
+
13
+ return delegated
14
+ })
15
+
16
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
17
+ </script>
18
+
19
+ <template>
20
+ <ComboboxItem
21
+ v-bind="forwarded"
22
+ :class="cn('relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', props.class)"
23
+ >
24
+ <slot />
25
+ </ComboboxItem>
26
+ </template>
@@ -0,0 +1,27 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import type { ComboboxContentEmits, ComboboxContentProps } from 'reka-ui'
4
+ import { ComboboxContent, useForwardPropsEmits } from 'reka-ui'
5
+ import { cn } from '../../../utils'
6
+
7
+ const props = withDefaults(defineProps<ComboboxContentProps & { class?: HTMLAttributes['class'] }>(), {
8
+ disableOutsidePointerEvents: false,
9
+ })
10
+ const emits = defineEmits<ComboboxContentEmits>()
11
+
12
+ const delegatedProps = computed(() => {
13
+ const { class: _, ...delegated } = props
14
+
15
+ return delegated
16
+ })
17
+
18
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
19
+ </script>
20
+
21
+ <template>
22
+ <ComboboxContent v-bind="forwarded" :class="cn('max-h-[300px] overflow-y-auto overflow-x-hidden', props.class)">
23
+ <div role="presentation">
24
+ <slot />
25
+ </div>
26
+ </ComboboxContent>
27
+ </template>
@@ -0,0 +1,23 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import type { ComboboxSeparatorProps } from 'reka-ui'
4
+ import { ComboboxSeparator } from 'reka-ui'
5
+ import { cn } from '../../../utils'
6
+
7
+ const props = defineProps<ComboboxSeparatorProps & { class?: HTMLAttributes['class'] }>()
8
+
9
+ const delegatedProps = computed(() => {
10
+ const { class: _, ...delegated } = props
11
+
12
+ return delegated
13
+ })
14
+ </script>
15
+
16
+ <template>
17
+ <ComboboxSeparator
18
+ v-bind="delegatedProps"
19
+ :class="cn('-mx-1 h-px bg-border', props.class)"
20
+ >
21
+ <slot />
22
+ </ComboboxSeparator>
23
+ </template>
@@ -0,0 +1,14 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { cn } from '../../../utils'
4
+
5
+ const props = defineProps<{
6
+ class?: HTMLAttributes['class']
7
+ }>()
8
+ </script>
9
+
10
+ <template>
11
+ <span :class="cn('ml-auto text-xs tracking-widest text-muted-foreground', props.class)">
12
+ <slot />
13
+ </span>
14
+ </template>
@@ -0,0 +1,9 @@
1
+ export { default as Command } from './Command.vue'
2
+ export { default as CommandDialog } from './CommandDialog.vue'
3
+ export { default as CommandEmpty } from './CommandEmpty.vue'
4
+ export { default as CommandGroup } from './CommandGroup.vue'
5
+ export { default as CommandInput } from './CommandInput.vue'
6
+ export { default as CommandItem } from './CommandItem.vue'
7
+ export { default as CommandList } from './CommandList.vue'
8
+ export { default as CommandSeparator } from './CommandSeparator.vue'
9
+ export { default as CommandShortcut } from './CommandShortcut.vue'