@brumaombra/ui-vintage 0.1.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 (297) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +78 -0
  3. package/dist/AlertDialogTitle.vue_vue_type_script_setup_true_lang-CWCr2erD.js +360 -0
  4. package/dist/AlertDialogTrigger.vue_vue_type_script_setup_true_lang-vNwxOYhM.js +158 -0
  5. package/dist/BackgroundGrid-Cxvbtefm.js +13 -0
  6. package/dist/Busy-B65Nd9ec.js +62 -0
  7. package/dist/BusyIndicator-CnWzSMDb.js +4 -0
  8. package/dist/BusyIndicator.vue_vue_type_script_setup_true_lang-CYeXMI_V.js +66 -0
  9. package/dist/CalendarPrevButton.vue_vue_type_script_setup_true_lang-C-WnFnvj.js +3805 -0
  10. package/dist/Card.vue_vue_type_script_setup_true_lang-6ol3rxy1.js +27 -0
  11. package/dist/CardTitle.vue_vue_type_script_setup_true_lang-DVAd7AWF.js +112 -0
  12. package/dist/Collection-CmOoLBo7.js +76 -0
  13. package/dist/ConfigProvider-D2O0Jles.js +6 -0
  14. package/dist/ConfirmDialog-DEsvF0b_.js +4 -0
  15. package/dist/ConfirmDialog.vue_vue_type_script_setup_true_lang-BAd1l1zF.js +230 -0
  16. package/dist/DashboardShell.vue_vue_type_script_setup_true_lang-CT2SQBXv.js +171 -0
  17. package/dist/DatePicker.vue_vue_type_script_setup_true_lang-D8mev2ha.js +92 -0
  18. package/dist/DialogClose-BNlqG4G2.js +36 -0
  19. package/dist/DialogTitle-DXj0nkXn.js +522 -0
  20. package/dist/DialogTitle.vue_vue_type_script_setup_true_lang-Bw40D4AK.js +174 -0
  21. package/dist/DialogTrigger-CpyKnu11.js +52 -0
  22. package/dist/DialogTrigger.vue_vue_type_script_setup_true_lang-DLrFiCsw.js +141 -0
  23. package/dist/FocusScope-C3mcVwsf.js +454 -0
  24. package/dist/Input.vue_vue_type_script_setup_true_lang-U778IWa0.js +37 -0
  25. package/dist/Label.vue_vue_type_script_setup_true_lang-B_fwvfJ-.js +65 -0
  26. package/dist/MessageDialog-BrowppID.js +4 -0
  27. package/dist/MessageDialog.vue_vue_type_script_setup_true_lang-Ddih5Isd.js +242 -0
  28. package/dist/NativeSelectOption.vue_vue_type_script_setup_true_lang-DS87OTLT.js +73 -0
  29. package/dist/PopoverAnchor.vue_vue_type_script_setup_true_lang-CsfybvZp.js +61 -0
  30. package/dist/PopoverTrigger.vue_vue_type_script_setup_true_lang-KTcg6Jnl.js +798 -0
  31. package/dist/PopperContent-BiM0YLO3.js +2144 -0
  32. package/dist/Primitive-D3IcFg81.js +61 -0
  33. package/dist/SelectValue.vue_vue_type_script_setup_true_lang-DGAI4hw5.js +2124 -0
  34. package/dist/Separator-CFm_M4pb.js +87 -0
  35. package/dist/Separator.vue_vue_type_script_setup_true_lang-COrZ60NR.js +29 -0
  36. package/dist/SheetTitle.vue_vue_type_script_setup_true_lang-DLoXGMbx.js +175 -0
  37. package/dist/SheetTrigger.vue_vue_type_script_setup_true_lang-CE2XJNHy.js +62 -0
  38. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-BSbVyZz7.js +20 -0
  39. package/dist/Slider.vue_vue_type_script_setup_true_lang-D-cAN-4Q.js +802 -0
  40. package/dist/SliderFormComponent.vue_vue_type_script_setup_true_lang-KPzC_Lmr.js +59 -0
  41. package/dist/Switch.vue_vue_type_script_setup_true_lang-BWKCycMm.js +226 -0
  42. package/dist/SwitchFormComponent.vue_vue_type_script_setup_true_lang-XOBEs3pa.js +39 -0
  43. package/dist/Teleport-CuUn4UkG.js +493 -0
  44. package/dist/TooltipProvider.vue_vue_type_script_setup_true_lang-DwIfCQjY.js +28 -0
  45. package/dist/TooltipTrigger.vue_vue_type_script_setup_true_lang-BRyHTWgw.js +1117 -0
  46. package/dist/VisuallyHidden-udQT2Fmo.js +60 -0
  47. package/dist/VisuallyHiddenInput-DLAsRwUw.js +142 -0
  48. package/dist/_plugin-vue_export-helper-1tPrXgE0.js +10 -0
  49. package/dist/alert-dialog.d.ts +2 -0
  50. package/dist/alert-dialog.js +13 -0
  51. package/dist/alert.d.ts +2 -0
  52. package/dist/alert.js +76 -0
  53. package/dist/background-grid.d.ts +6 -0
  54. package/dist/background-grid.js +5 -0
  55. package/dist/busy-indicator.d.ts +2 -0
  56. package/dist/busy-indicator.js +6 -0
  57. package/dist/busy.d.ts +2 -0
  58. package/dist/busy.js +4 -0
  59. package/dist/button.d.ts +2 -0
  60. package/dist/button.js +63 -0
  61. package/dist/calendar.d.ts +2 -0
  62. package/dist/calendar.js +15 -0
  63. package/dist/card.d.ts +2 -0
  64. package/dist/card.js +11 -0
  65. package/dist/check-iejznCzf.js +11 -0
  66. package/dist/chevron-down-DP-oz-sL.js +13 -0
  67. package/dist/clamp-D5Ye0kJT.js +6 -0
  68. package/dist/command.d.ts +2 -0
  69. package/dist/command.js +1122 -0
  70. package/dist/components/background-grid/BackgroundGrid.vue.d.ts +2 -0
  71. package/dist/components/background-grid/index.d.ts +2 -0
  72. package/dist/components/busy-indicator/BusyIndicator.vue.d.ts +2 -0
  73. package/dist/components/busy-indicator/busy-indicator-state.d.ts +15 -0
  74. package/dist/components/busy-indicator/index.d.ts +3 -0
  75. package/dist/components/confirm-dialog/ConfirmDialog.vue.d.ts +2 -0
  76. package/dist/components/confirm-dialog/confirm-dialog-state.d.ts +37 -0
  77. package/dist/components/confirm-dialog/index.d.ts +3 -0
  78. package/dist/components/dashboard-shell/DashboardShell.vue.d.ts +54 -0
  79. package/dist/components/dashboard-shell/index.d.ts +2 -0
  80. package/dist/components/message-dialog/MessageDialog.vue.d.ts +2 -0
  81. package/dist/components/message-dialog/index.d.ts +3 -0
  82. package/dist/components/message-dialog/message-dialog-state.d.ts +28 -0
  83. package/dist/components/slider-form-component/SliderFormComponent.vue.d.ts +23 -0
  84. package/dist/components/slider-form-component/index.d.ts +2 -0
  85. package/dist/components/switch-form-component/SwitchFormComponent.vue.d.ts +12 -0
  86. package/dist/components/switch-form-component/index.d.ts +2 -0
  87. package/dist/components/ui/alert/Alert.vue.d.ts +23 -0
  88. package/dist/components/ui/alert/AlertDescription.vue.d.ts +21 -0
  89. package/dist/components/ui/alert/AlertTitle.vue.d.ts +21 -0
  90. package/dist/components/ui/alert/index.d.ts +8 -0
  91. package/dist/components/ui/alert-dialog/AlertDialog.vue.d.ts +25 -0
  92. package/dist/components/ui/alert-dialog/AlertDialogAction.vue.d.ts +22 -0
  93. package/dist/components/ui/alert-dialog/AlertDialogCancel.vue.d.ts +22 -0
  94. package/dist/components/ui/alert-dialog/AlertDialogContent.vue.d.ts +36 -0
  95. package/dist/components/ui/alert-dialog/AlertDialogDescription.vue.d.ts +22 -0
  96. package/dist/components/ui/alert-dialog/AlertDialogFooter.vue.d.ts +21 -0
  97. package/dist/components/ui/alert-dialog/AlertDialogHeader.vue.d.ts +21 -0
  98. package/dist/components/ui/alert-dialog/AlertDialogTitle.vue.d.ts +22 -0
  99. package/dist/components/ui/alert-dialog/AlertDialogTrigger.vue.d.ts +18 -0
  100. package/dist/components/ui/alert-dialog/index.d.ts +9 -0
  101. package/dist/components/ui/busy/Busy.vue.d.ts +27 -0
  102. package/dist/components/ui/busy/index.d.ts +1 -0
  103. package/dist/components/ui/button/Button.vue.d.ts +27 -0
  104. package/dist/components/ui/button/index.d.ts +7 -0
  105. package/dist/components/ui/calendar/Calendar.vue.d.ts +44 -0
  106. package/dist/components/ui/calendar/CalendarCell.vue.d.ts +22 -0
  107. package/dist/components/ui/calendar/CalendarCellTrigger.vue.d.ts +24 -0
  108. package/dist/components/ui/calendar/CalendarGrid.vue.d.ts +22 -0
  109. package/dist/components/ui/calendar/CalendarGridBody.vue.d.ts +18 -0
  110. package/dist/components/ui/calendar/CalendarGridHead.vue.d.ts +22 -0
  111. package/dist/components/ui/calendar/CalendarGridRow.vue.d.ts +22 -0
  112. package/dist/components/ui/calendar/CalendarHeadCell.vue.d.ts +22 -0
  113. package/dist/components/ui/calendar/CalendarHeader.vue.d.ts +22 -0
  114. package/dist/components/ui/calendar/CalendarHeading.vue.d.ts +28 -0
  115. package/dist/components/ui/calendar/CalendarNextButton.vue.d.ts +22 -0
  116. package/dist/components/ui/calendar/CalendarPrevButton.vue.d.ts +22 -0
  117. package/dist/components/ui/calendar/index.d.ts +13 -0
  118. package/dist/components/ui/card/Card.vue.d.ts +21 -0
  119. package/dist/components/ui/card/CardAction.vue.d.ts +21 -0
  120. package/dist/components/ui/card/CardContent.vue.d.ts +21 -0
  121. package/dist/components/ui/card/CardDescription.vue.d.ts +21 -0
  122. package/dist/components/ui/card/CardFooter.vue.d.ts +21 -0
  123. package/dist/components/ui/card/CardHeader.vue.d.ts +21 -0
  124. package/dist/components/ui/card/CardTitle.vue.d.ts +21 -0
  125. package/dist/components/ui/card/index.d.ts +7 -0
  126. package/dist/components/ui/command/Command.vue.d.ts +40 -0
  127. package/dist/components/ui/command/CommandDialog.vue.d.ts +32 -0
  128. package/dist/components/ui/command/CommandEmpty.vue.d.ts +22 -0
  129. package/dist/components/ui/command/CommandGroup.vue.d.ts +23 -0
  130. package/dist/components/ui/command/CommandInput.vue.d.ts +7 -0
  131. package/dist/components/ui/command/CommandItem.vue.d.ts +30 -0
  132. package/dist/components/ui/command/CommandList.vue.d.ts +22 -0
  133. package/dist/components/ui/command/CommandSeparator.vue.d.ts +22 -0
  134. package/dist/components/ui/command/CommandShortcut.vue.d.ts +21 -0
  135. package/dist/components/ui/command/index.d.ts +90 -0
  136. package/dist/components/ui/date-picker/DatePicker.vue.d.ts +19 -0
  137. package/dist/components/ui/date-picker/index.d.ts +2 -0
  138. package/dist/components/ui/dialog/Dialog.vue.d.ts +25 -0
  139. package/dist/components/ui/dialog/DialogClose.vue.d.ts +18 -0
  140. package/dist/components/ui/dialog/DialogContent.vue.d.ts +39 -0
  141. package/dist/components/ui/dialog/DialogDescription.vue.d.ts +22 -0
  142. package/dist/components/ui/dialog/DialogFooter.vue.d.ts +24 -0
  143. package/dist/components/ui/dialog/DialogHeader.vue.d.ts +21 -0
  144. package/dist/components/ui/dialog/DialogOverlay.vue.d.ts +22 -0
  145. package/dist/components/ui/dialog/DialogScrollContent.vue.d.ts +36 -0
  146. package/dist/components/ui/dialog/DialogTitle.vue.d.ts +22 -0
  147. package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +18 -0
  148. package/dist/components/ui/dialog/index.d.ts +10 -0
  149. package/dist/components/ui/field/Field.vue.d.ts +23 -0
  150. package/dist/components/ui/field/FieldContent.vue.d.ts +21 -0
  151. package/dist/components/ui/field/FieldDescription.vue.d.ts +21 -0
  152. package/dist/components/ui/field/FieldError.vue.d.ts +24 -0
  153. package/dist/components/ui/field/FieldGroup.vue.d.ts +21 -0
  154. package/dist/components/ui/field/FieldLabel.vue.d.ts +21 -0
  155. package/dist/components/ui/field/FieldLegend.vue.d.ts +22 -0
  156. package/dist/components/ui/field/FieldSeparator.vue.d.ts +21 -0
  157. package/dist/components/ui/field/FieldSet.vue.d.ts +21 -0
  158. package/dist/components/ui/field/FieldTitle.vue.d.ts +21 -0
  159. package/dist/components/ui/field/index.d.ts +15 -0
  160. package/dist/components/ui/input/Input.vue.d.ts +12 -0
  161. package/dist/components/ui/input/index.d.ts +1 -0
  162. package/dist/components/ui/label/Label.vue.d.ts +22 -0
  163. package/dist/components/ui/label/index.d.ts +1 -0
  164. package/dist/components/ui/native-select/NativeSelect.vue.d.ts +27 -0
  165. package/dist/components/ui/native-select/NativeSelectOptGroup.vue.d.ts +21 -0
  166. package/dist/components/ui/native-select/NativeSelectOption.vue.d.ts +21 -0
  167. package/dist/components/ui/native-select/index.d.ts +3 -0
  168. package/dist/components/ui/popover/Popover.vue.d.ts +25 -0
  169. package/dist/components/ui/popover/PopoverAnchor.vue.d.ts +18 -0
  170. package/dist/components/ui/popover/PopoverContent.vue.d.ts +39 -0
  171. package/dist/components/ui/popover/PopoverTrigger.vue.d.ts +18 -0
  172. package/dist/components/ui/popover/index.d.ts +4 -0
  173. package/dist/components/ui/select/Select.vue.d.ts +28 -0
  174. package/dist/components/ui/select/SelectContent.vue.d.ts +32 -0
  175. package/dist/components/ui/select/SelectGroup.vue.d.ts +18 -0
  176. package/dist/components/ui/select/SelectItem.vue.d.ts +24 -0
  177. package/dist/components/ui/select/SelectItemText.vue.d.ts +18 -0
  178. package/dist/components/ui/select/SelectLabel.vue.d.ts +22 -0
  179. package/dist/components/ui/select/SelectScrollDownButton.vue.d.ts +22 -0
  180. package/dist/components/ui/select/SelectScrollUpButton.vue.d.ts +22 -0
  181. package/dist/components/ui/select/SelectSeparator.vue.d.ts +7 -0
  182. package/dist/components/ui/select/SelectTrigger.vue.d.ts +25 -0
  183. package/dist/components/ui/select/SelectValue.vue.d.ts +18 -0
  184. package/dist/components/ui/select/index.d.ts +11 -0
  185. package/dist/components/ui/separator/Separator.vue.d.ts +10 -0
  186. package/dist/components/ui/separator/index.d.ts +1 -0
  187. package/dist/components/ui/sheet/Sheet.vue.d.ts +25 -0
  188. package/dist/components/ui/sheet/SheetClose.vue.d.ts +18 -0
  189. package/dist/components/ui/sheet/SheetContent.vue.d.ts +39 -0
  190. package/dist/components/ui/sheet/SheetDescription.vue.d.ts +22 -0
  191. package/dist/components/ui/sheet/SheetFooter.vue.d.ts +21 -0
  192. package/dist/components/ui/sheet/SheetHeader.vue.d.ts +21 -0
  193. package/dist/components/ui/sheet/SheetOverlay.vue.d.ts +22 -0
  194. package/dist/components/ui/sheet/SheetTitle.vue.d.ts +22 -0
  195. package/dist/components/ui/sheet/SheetTrigger.vue.d.ts +18 -0
  196. package/dist/components/ui/sheet/index.d.ts +8 -0
  197. package/dist/components/ui/sidebar/Sidebar.vue.d.ts +24 -0
  198. package/dist/components/ui/sidebar/SidebarContent.vue.d.ts +21 -0
  199. package/dist/components/ui/sidebar/SidebarFooter.vue.d.ts +21 -0
  200. package/dist/components/ui/sidebar/SidebarGroup.vue.d.ts +21 -0
  201. package/dist/components/ui/sidebar/SidebarGroupAction.vue.d.ts +22 -0
  202. package/dist/components/ui/sidebar/SidebarGroupContent.vue.d.ts +21 -0
  203. package/dist/components/ui/sidebar/SidebarGroupLabel.vue.d.ts +22 -0
  204. package/dist/components/ui/sidebar/SidebarHeader.vue.d.ts +21 -0
  205. package/dist/components/ui/sidebar/SidebarInput.vue.d.ts +21 -0
  206. package/dist/components/ui/sidebar/SidebarInset.vue.d.ts +21 -0
  207. package/dist/components/ui/sidebar/SidebarMenu.vue.d.ts +21 -0
  208. package/dist/components/ui/sidebar/SidebarMenuAction.vue.d.ts +25 -0
  209. package/dist/components/ui/sidebar/SidebarMenuBadge.vue.d.ts +21 -0
  210. package/dist/components/ui/sidebar/SidebarMenuButton.vue.d.ts +27 -0
  211. package/dist/components/ui/sidebar/SidebarMenuButtonChild.vue.d.ts +30 -0
  212. package/dist/components/ui/sidebar/SidebarMenuItem.vue.d.ts +21 -0
  213. package/dist/components/ui/sidebar/SidebarMenuSkeleton.vue.d.ts +7 -0
  214. package/dist/components/ui/sidebar/SidebarMenuSub.vue.d.ts +21 -0
  215. package/dist/components/ui/sidebar/SidebarMenuSubButton.vue.d.ts +27 -0
  216. package/dist/components/ui/sidebar/SidebarMenuSubItem.vue.d.ts +21 -0
  217. package/dist/components/ui/sidebar/SidebarProvider.vue.d.ts +30 -0
  218. package/dist/components/ui/sidebar/SidebarRail.vue.d.ts +21 -0
  219. package/dist/components/ui/sidebar/SidebarSeparator.vue.d.ts +21 -0
  220. package/dist/components/ui/sidebar/SidebarTrigger.vue.d.ts +6 -0
  221. package/dist/components/ui/sidebar/index.d.ts +37 -0
  222. package/dist/components/ui/sidebar/utils.d.ts +56 -0
  223. package/dist/components/ui/skeleton/Skeleton.vue.d.ts +6 -0
  224. package/dist/components/ui/skeleton/index.d.ts +1 -0
  225. package/dist/components/ui/slider/Slider.vue.d.ts +13 -0
  226. package/dist/components/ui/slider/index.d.ts +1 -0
  227. package/dist/components/ui/switch/Switch.vue.d.ts +29 -0
  228. package/dist/components/ui/switch/index.d.ts +1 -0
  229. package/dist/components/ui/tooltip/Tooltip.vue.d.ts +24 -0
  230. package/dist/components/ui/tooltip/TooltipContent.vue.d.ts +30 -0
  231. package/dist/components/ui/tooltip/TooltipProvider.vue.d.ts +20 -0
  232. package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts +18 -0
  233. package/dist/components/ui/tooltip/index.d.ts +4 -0
  234. package/dist/confirm-dialog.d.ts +2 -0
  235. package/dist/confirm-dialog.js +9 -0
  236. package/dist/createLucideIcon-CCMB2vDW.js +130 -0
  237. package/dist/dashboard-shell.d.ts +6 -0
  238. package/dist/dashboard-shell.js +5 -0
  239. package/dist/date-picker.d.ts +6 -0
  240. package/dist/date-picker.js +5 -0
  241. package/dist/dialog.d.ts +2 -0
  242. package/dist/dialog.js +14 -0
  243. package/dist/field.d.ts +2 -0
  244. package/dist/field.js +294 -0
  245. package/dist/index-C1_fxYhb.js +251 -0
  246. package/dist/index-Dfi5ESP2.js +299 -0
  247. package/dist/index-FpH8cK6B.js +44 -0
  248. package/dist/index.d.ts +28 -0
  249. package/dist/index.js +171 -0
  250. package/dist/info-DZrSmi42.js +15 -0
  251. package/dist/input.d.ts +2 -0
  252. package/dist/input.js +4 -0
  253. package/dist/label.d.ts +2 -0
  254. package/dist/label.js +4 -0
  255. package/dist/lib/utils.d.ts +2 -0
  256. package/dist/message-dialog.d.ts +2 -0
  257. package/dist/message-dialog.js +8 -0
  258. package/dist/native-select.d.ts +2 -0
  259. package/dist/native-select.js +25 -0
  260. package/dist/popover.d.ts +2 -0
  261. package/dist/popover.js +8 -0
  262. package/dist/select.d.ts +2 -0
  263. package/dist/select.js +14 -0
  264. package/dist/separator.d.ts +2 -0
  265. package/dist/separator.js +4 -0
  266. package/dist/sheet.d.ts +2 -0
  267. package/dist/sheet.js +12 -0
  268. package/dist/sidebar.d.ts +2 -0
  269. package/dist/sidebar.js +813 -0
  270. package/dist/skeleton.d.ts +2 -0
  271. package/dist/skeleton.js +4 -0
  272. package/dist/slider-form-component.d.ts +6 -0
  273. package/dist/slider-form-component.js +5 -0
  274. package/dist/slider.d.ts +2 -0
  275. package/dist/slider.js +4 -0
  276. package/dist/style.css +4021 -0
  277. package/dist/switch-form-component.d.ts +6 -0
  278. package/dist/switch-form-component.js +5 -0
  279. package/dist/switch.d.ts +2 -0
  280. package/dist/switch.js +4 -0
  281. package/dist/tooltip.d.ts +2 -0
  282. package/dist/tooltip.js +8 -0
  283. package/dist/useDirection-SIyEYNxv.js +12 -0
  284. package/dist/useFocusGuards-tgErlvMF.js +29 -0
  285. package/dist/useFormControl-7ytzz-r7.js +11 -0
  286. package/dist/useForwardExpose-CNVHwdF2.js +58 -0
  287. package/dist/useForwardPropsEmits-DmumnZO5.js +63 -0
  288. package/dist/useKbd-JjFOu4f7.js +41 -0
  289. package/dist/usePrimitiveElement-CijaRBgF.js +16 -0
  290. package/dist/useSize-DO9Z3wC4.js +51 -0
  291. package/dist/useTypeahead-Dqe1QXq1.js +159 -0
  292. package/dist/utils-Bz4m9VPB.js +3192 -0
  293. package/dist/utils-RRmyeqLm.js +16 -0
  294. package/dist/utils.d.ts +2 -0
  295. package/dist/utils.js +4 -0
  296. package/dist/x-2_VzbDS9.js +48 -0
  297. package/package.json +186 -0
@@ -0,0 +1,1122 @@
1
+ import { c as createContext, u as useForwardPropsEmits, a as useForwardProps } from "./useForwardPropsEmits-DmumnZO5.js";
2
+ import { computed, unref, defineComponent, toRefs, ref, watch, nextTick, openBlock, createBlock, withCtx, renderSlot, createCommentVNode, createVNode, withKeys, withModifiers, watchSyncEffect, onMounted, onUnmounted, mergeProps, withMemo, reactive, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString, createElementVNode, createElementBlock, normalizeClass } from "vue";
3
+ import { i as isEqual, u as useTypeahead } from "./useTypeahead-Dqe1QXq1.js";
4
+ import { u as useDirection } from "./useDirection-SIyEYNxv.js";
5
+ import { u as useFormControl } from "./useFormControl-7ytzz-r7.js";
6
+ import { u as useKbd } from "./useKbd-JjFOu4f7.js";
7
+ import { P as Primitive } from "./Primitive-D3IcFg81.js";
8
+ import { u as usePrimitiveElement } from "./usePrimitiveElement-CijaRBgF.js";
9
+ import { u as useCollection } from "./Collection-CmOoLBo7.js";
10
+ import { V as VisuallyHiddenInput_default } from "./VisuallyHiddenInput-DLAsRwUw.js";
11
+ import { u as useVModel, e as useCurrentElement } from "./index-C1_fxYhb.js";
12
+ import { o as createEventHook, g as refAutoReset, r as reactiveOmit } from "./index-Dfi5ESP2.js";
13
+ import { c as cn } from "./utils-Bz4m9VPB.js";
14
+ import { _ as _sfc_main$9, a as _sfc_main$a, c as _sfc_main$b, e as _sfc_main$c, b as _sfc_main$d } from "./DialogTitle.vue_vue_type_script_setup_true_lang-Bw40D4AK.js";
15
+ import { u as useId, h as handleAndDispatchCustomEvent } from "./Teleport-CuUn4UkG.js";
16
+ import { c as createLucideIcon } from "./createLucideIcon-CCMB2vDW.js";
17
+ import { u as useForwardExpose } from "./useForwardExpose-CNVHwdF2.js";
18
+ import { S as Separator_default } from "./Separator-CFm_M4pb.js";
19
+ function findValuesBetween(array, start, end) {
20
+ const startIndex = array.findIndex((i) => isEqual(i, start));
21
+ const endIndex = array.findIndex((i) => isEqual(i, end));
22
+ if (startIndex === -1 || endIndex === -1) return [];
23
+ const [minIndex, maxIndex] = [startIndex, endIndex].sort((a, b) => a - b);
24
+ return array.slice(minIndex, maxIndex + 1);
25
+ }
26
+ function useFilter(options) {
27
+ const computedOptions = computed(() => unref(options));
28
+ const collator = computed(() => new Intl.Collator("en", {
29
+ usage: "search",
30
+ ...computedOptions.value
31
+ }));
32
+ const startsWith = (string, substring) => {
33
+ if (substring.length === 0) return true;
34
+ string = string.normalize("NFC");
35
+ substring = substring.normalize("NFC");
36
+ return collator.value.compare(string.slice(0, substring.length), substring) === 0;
37
+ };
38
+ const endsWith = (string, substring) => {
39
+ if (substring.length === 0) return true;
40
+ string = string.normalize("NFC");
41
+ substring = substring.normalize("NFC");
42
+ return collator.value.compare(string.slice(-substring.length), substring) === 0;
43
+ };
44
+ const contains = (string, substring) => {
45
+ if (substring.length === 0) return true;
46
+ string = string.normalize("NFC");
47
+ substring = substring.normalize("NFC");
48
+ let scan = 0;
49
+ const sliceLen = substring.length;
50
+ for (; scan + sliceLen <= string.length; scan++) {
51
+ const slice = string.slice(scan, scan + sliceLen);
52
+ if (collator.value.compare(substring, slice) === 0) return true;
53
+ }
54
+ return false;
55
+ };
56
+ return {
57
+ startsWith,
58
+ endsWith,
59
+ contains
60
+ };
61
+ }
62
+ function valueComparator(value, currentValue, comparator) {
63
+ if (value === void 0) return false;
64
+ else if (Array.isArray(value)) return value.some((val) => compare(val, currentValue, comparator));
65
+ else return compare(value, currentValue, comparator);
66
+ }
67
+ function compare(value, currentValue, comparator) {
68
+ if (value === void 0 || currentValue === void 0) return false;
69
+ if (typeof value === "string") return value === currentValue;
70
+ if (typeof comparator === "function") return comparator(value, currentValue);
71
+ if (typeof comparator === "string") return (value == null ? void 0 : value[comparator]) === (currentValue == null ? void 0 : currentValue[comparator]);
72
+ return isEqual(value, currentValue);
73
+ }
74
+ const MAP_KEY_TO_FOCUS_INTENT = {
75
+ ArrowLeft: "prev",
76
+ ArrowUp: "prev",
77
+ ArrowRight: "next",
78
+ ArrowDown: "next",
79
+ PageUp: "first",
80
+ Home: "first",
81
+ PageDown: "last",
82
+ End: "last"
83
+ };
84
+ function getDirectionAwareKey(key, dir) {
85
+ if (dir !== "rtl") return key;
86
+ return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
87
+ }
88
+ function getFocusIntent(event, orientation, dir) {
89
+ const key = getDirectionAwareKey(event.key, dir);
90
+ if (orientation === "vertical" && ["ArrowLeft", "ArrowRight"].includes(key)) return void 0;
91
+ if (orientation === "horizontal" && ["ArrowUp", "ArrowDown"].includes(key)) return void 0;
92
+ return MAP_KEY_TO_FOCUS_INTENT[key];
93
+ }
94
+ const [injectListboxRootContext, provideListboxRootContext] = createContext("ListboxRoot");
95
+ var ListboxRoot_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
96
+ __name: "ListboxRoot",
97
+ props: {
98
+ modelValue: {
99
+ type: null,
100
+ required: false
101
+ },
102
+ defaultValue: {
103
+ type: null,
104
+ required: false
105
+ },
106
+ multiple: {
107
+ type: Boolean,
108
+ required: false
109
+ },
110
+ orientation: {
111
+ type: String,
112
+ required: false,
113
+ default: "vertical"
114
+ },
115
+ dir: {
116
+ type: String,
117
+ required: false
118
+ },
119
+ disabled: {
120
+ type: Boolean,
121
+ required: false
122
+ },
123
+ selectionBehavior: {
124
+ type: String,
125
+ required: false,
126
+ default: "toggle"
127
+ },
128
+ highlightOnHover: {
129
+ type: Boolean,
130
+ required: false
131
+ },
132
+ by: {
133
+ type: [String, Function],
134
+ required: false
135
+ },
136
+ asChild: {
137
+ type: Boolean,
138
+ required: false
139
+ },
140
+ as: {
141
+ type: null,
142
+ required: false
143
+ },
144
+ name: {
145
+ type: String,
146
+ required: false
147
+ },
148
+ required: {
149
+ type: Boolean,
150
+ required: false
151
+ }
152
+ },
153
+ emits: [
154
+ "update:modelValue",
155
+ "highlight",
156
+ "entryFocus",
157
+ "leave"
158
+ ],
159
+ setup(__props, { expose: __expose, emit: __emit }) {
160
+ const props = __props;
161
+ const emits = __emit;
162
+ const { multiple, highlightOnHover, orientation, disabled, selectionBehavior, dir: propDir } = toRefs(props);
163
+ const { getItems } = useCollection({ isProvider: true });
164
+ const { handleTypeaheadSearch } = useTypeahead();
165
+ const { primitiveElement, currentElement } = usePrimitiveElement();
166
+ const kbd = useKbd();
167
+ const dir = useDirection(propDir);
168
+ const isFormControl = useFormControl(currentElement);
169
+ const firstValue = ref();
170
+ const isUserAction = ref(false);
171
+ const focusable = ref(true);
172
+ const modelValue = useVModel(props, "modelValue", emits, {
173
+ defaultValue: props.defaultValue ?? (multiple.value ? [] : void 0),
174
+ passive: props.modelValue === void 0,
175
+ deep: true
176
+ });
177
+ function onValueChange(val) {
178
+ isUserAction.value = true;
179
+ if (props.multiple) {
180
+ const modelArray = Array.isArray(modelValue.value) ? [...modelValue.value] : [];
181
+ const index = modelArray.findIndex((i) => compare(i, val, props.by));
182
+ if (props.selectionBehavior === "toggle") {
183
+ index === -1 ? modelArray.push(val) : modelArray.splice(index, 1);
184
+ modelValue.value = modelArray;
185
+ } else {
186
+ modelValue.value = [val];
187
+ firstValue.value = val;
188
+ }
189
+ } else if (props.selectionBehavior === "toggle") if (compare(modelValue.value, val, props.by)) modelValue.value = void 0;
190
+ else modelValue.value = val;
191
+ else modelValue.value = val;
192
+ setTimeout(() => {
193
+ isUserAction.value = false;
194
+ }, 1);
195
+ }
196
+ const highlightedElement = ref(null);
197
+ const previousElement = ref(null);
198
+ const isVirtual = ref(false);
199
+ const isComposing = ref(false);
200
+ const virtualFocusHook = createEventHook();
201
+ const virtualKeydownHook = createEventHook();
202
+ const virtualHighlightHook = createEventHook();
203
+ function getCollectionItem() {
204
+ return getItems().map((i) => i.ref).filter((i) => i.dataset.disabled !== "");
205
+ }
206
+ function changeHighlight(el, scrollIntoView = true) {
207
+ if (!el) return;
208
+ highlightedElement.value = el;
209
+ if (focusable.value) highlightedElement.value.focus();
210
+ if (scrollIntoView) highlightedElement.value.scrollIntoView({ block: "nearest" });
211
+ const highlightedItem = getItems().find((i) => i.ref === el);
212
+ emits("highlight", highlightedItem);
213
+ }
214
+ function highlightItem(value) {
215
+ if (isVirtual.value) virtualHighlightHook.trigger(value);
216
+ else {
217
+ const item = getItems().find((i) => compare(i.value, value, props.by));
218
+ if (item) {
219
+ highlightedElement.value = item.ref;
220
+ changeHighlight(item.ref);
221
+ }
222
+ }
223
+ }
224
+ function onKeydownEnter(event) {
225
+ if (highlightedElement.value && highlightedElement.value.isConnected) {
226
+ event.preventDefault();
227
+ event.stopPropagation();
228
+ if (!isComposing.value) highlightedElement.value.click();
229
+ }
230
+ }
231
+ function onKeydownTypeAhead(event) {
232
+ if (!focusable.value) return;
233
+ isUserAction.value = true;
234
+ if (isVirtual.value) virtualKeydownHook.trigger(event);
235
+ else {
236
+ const isMetaKey = event.altKey || event.ctrlKey || event.metaKey;
237
+ if (isMetaKey && event.key === "a" && multiple.value) {
238
+ const collection = getItems();
239
+ const values = collection.map((i) => i.value);
240
+ modelValue.value = [...values];
241
+ event.preventDefault();
242
+ changeHighlight(collection[collection.length - 1].ref);
243
+ } else if (!isMetaKey) {
244
+ const el = handleTypeaheadSearch(event.key, getItems());
245
+ if (el) changeHighlight(el);
246
+ }
247
+ }
248
+ setTimeout(() => {
249
+ isUserAction.value = false;
250
+ }, 1);
251
+ }
252
+ function onCompositionStart() {
253
+ isComposing.value = true;
254
+ }
255
+ function onCompositionEnd() {
256
+ nextTick(() => {
257
+ isComposing.value = false;
258
+ });
259
+ }
260
+ function highlightFirstItem() {
261
+ nextTick(() => {
262
+ const event = new KeyboardEvent("keydown", { key: "PageUp" });
263
+ onKeydownNavigation(event);
264
+ });
265
+ }
266
+ function onLeave(event) {
267
+ const el = highlightedElement.value;
268
+ if (el == null ? void 0 : el.isConnected) previousElement.value = el;
269
+ highlightedElement.value = null;
270
+ emits("leave", event);
271
+ }
272
+ function onEnter(event) {
273
+ var _a, _b;
274
+ const entryFocusEvent = new CustomEvent("listbox.entryFocus", {
275
+ bubbles: false,
276
+ cancelable: true
277
+ });
278
+ (_a = event.currentTarget) == null ? void 0 : _a.dispatchEvent(entryFocusEvent);
279
+ emits("entryFocus", entryFocusEvent);
280
+ if (entryFocusEvent.defaultPrevented) return;
281
+ if (previousElement.value) changeHighlight(previousElement.value);
282
+ else {
283
+ const el = (_b = getCollectionItem()) == null ? void 0 : _b[0];
284
+ changeHighlight(el);
285
+ }
286
+ }
287
+ function onKeydownNavigation(event) {
288
+ const intent = getFocusIntent(event, orientation.value, dir.value);
289
+ if (!intent) return;
290
+ let collection = getCollectionItem();
291
+ if (highlightedElement.value) {
292
+ if (intent === "last") collection.reverse();
293
+ else if (intent === "prev" || intent === "next") {
294
+ if (intent === "prev") collection.reverse();
295
+ const currentIndex = collection.indexOf(highlightedElement.value);
296
+ collection = collection.slice(currentIndex + 1);
297
+ }
298
+ handleMultipleReplace(event, collection[0]);
299
+ }
300
+ if (collection.length) {
301
+ const index = !highlightedElement.value && intent === "prev" ? collection.length - 1 : 0;
302
+ changeHighlight(collection[index]);
303
+ }
304
+ if (isVirtual.value) return virtualKeydownHook.trigger(event);
305
+ }
306
+ function handleMultipleReplace(event, targetEl) {
307
+ var _a;
308
+ if (isVirtual.value || props.selectionBehavior !== "replace" || !multiple.value || !Array.isArray(modelValue.value)) return;
309
+ const isMetaKey = event.altKey || event.ctrlKey || event.metaKey;
310
+ if (isMetaKey && !event.shiftKey) return;
311
+ if (event.shiftKey) {
312
+ const collection = getItems().filter((i) => i.ref.dataset.disabled !== "");
313
+ let lastValue = (_a = collection.find((i) => i.ref === targetEl)) == null ? void 0 : _a.value;
314
+ if (event.key === kbd.END) lastValue = collection[collection.length - 1].value;
315
+ else if (event.key === kbd.HOME) lastValue = collection[0].value;
316
+ if (!lastValue || !firstValue.value) return;
317
+ const values = findValuesBetween(collection.map((i) => i.value), firstValue.value, lastValue);
318
+ modelValue.value = values;
319
+ }
320
+ }
321
+ async function highlightSelected(event) {
322
+ await nextTick();
323
+ if (isVirtual.value) virtualFocusHook.trigger(event);
324
+ else {
325
+ const collection = getCollectionItem();
326
+ const item = collection.find((i) => i.dataset.state === "checked");
327
+ if (item) changeHighlight(item);
328
+ else if (collection.length) changeHighlight(collection[0]);
329
+ }
330
+ }
331
+ watch(modelValue, () => {
332
+ if (!isUserAction.value) nextTick(() => {
333
+ highlightSelected();
334
+ });
335
+ }, {
336
+ immediate: true,
337
+ deep: true
338
+ });
339
+ __expose({
340
+ highlightedElement,
341
+ highlightItem,
342
+ highlightFirstItem,
343
+ highlightSelected,
344
+ getItems
345
+ });
346
+ provideListboxRootContext({
347
+ modelValue,
348
+ onValueChange,
349
+ multiple,
350
+ orientation,
351
+ dir,
352
+ disabled,
353
+ highlightOnHover,
354
+ highlightedElement,
355
+ isVirtual,
356
+ virtualFocusHook,
357
+ virtualKeydownHook,
358
+ virtualHighlightHook,
359
+ by: props.by,
360
+ firstValue,
361
+ selectionBehavior,
362
+ focusable,
363
+ onLeave,
364
+ onEnter,
365
+ changeHighlight,
366
+ onKeydownEnter,
367
+ onKeydownNavigation,
368
+ onKeydownTypeAhead,
369
+ onCompositionStart,
370
+ onCompositionEnd,
371
+ highlightFirstItem
372
+ });
373
+ return (_ctx, _cache) => {
374
+ return openBlock(), createBlock(unref(Primitive), {
375
+ ref_key: "primitiveElement",
376
+ ref: primitiveElement,
377
+ as: _ctx.as,
378
+ "as-child": _ctx.asChild,
379
+ dir: unref(dir),
380
+ "data-disabled": unref(disabled) ? "" : void 0,
381
+ onPointerleave: onLeave,
382
+ onFocusout: _cache[0] || (_cache[0] = async (event) => {
383
+ const target = event.relatedTarget || event.target;
384
+ await nextTick();
385
+ if (highlightedElement.value && unref(currentElement) && !unref(currentElement).contains(target)) onLeave(event);
386
+ })
387
+ }, {
388
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", { modelValue: unref(modelValue) }), unref(isFormControl) && _ctx.name ? (openBlock(), createBlock(unref(VisuallyHiddenInput_default), {
389
+ key: 0,
390
+ name: _ctx.name,
391
+ value: unref(modelValue),
392
+ disabled: unref(disabled),
393
+ required: _ctx.required
394
+ }, null, 8, [
395
+ "name",
396
+ "value",
397
+ "disabled",
398
+ "required"
399
+ ])) : createCommentVNode("v-if", true)]),
400
+ _: 3
401
+ }, 8, [
402
+ "as",
403
+ "as-child",
404
+ "dir",
405
+ "data-disabled"
406
+ ]);
407
+ };
408
+ }
409
+ });
410
+ var ListboxRoot_default = ListboxRoot_vue_vue_type_script_setup_true_lang_default;
411
+ var ListboxContent_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
412
+ __name: "ListboxContent",
413
+ props: {
414
+ asChild: {
415
+ type: Boolean,
416
+ required: false
417
+ },
418
+ as: {
419
+ type: null,
420
+ required: false
421
+ }
422
+ },
423
+ setup(__props) {
424
+ const { CollectionSlot } = useCollection();
425
+ const rootContext = injectListboxRootContext();
426
+ const isClickFocus = refAutoReset(false, 10);
427
+ return (_ctx, _cache) => {
428
+ return openBlock(), createBlock(unref(CollectionSlot), null, {
429
+ default: withCtx(() => [createVNode(unref(Primitive), {
430
+ role: "listbox",
431
+ as: _ctx.as,
432
+ "as-child": _ctx.asChild,
433
+ tabindex: unref(rootContext).focusable.value ? unref(rootContext).highlightedElement.value ? "-1" : "0" : "-1",
434
+ "aria-orientation": unref(rootContext).orientation.value,
435
+ "aria-multiselectable": !!unref(rootContext).multiple.value,
436
+ "data-orientation": unref(rootContext).orientation.value,
437
+ onMousedown: _cache[0] || (_cache[0] = withModifiers(($event) => isClickFocus.value = true, ["left"])),
438
+ onFocus: _cache[1] || (_cache[1] = (ev) => {
439
+ if (unref(isClickFocus)) return;
440
+ unref(rootContext).onEnter(ev);
441
+ }),
442
+ onKeydown: [
443
+ _cache[2] || (_cache[2] = withKeys((event) => {
444
+ if (unref(rootContext).orientation.value === "vertical" && (event.key === "ArrowLeft" || event.key === "ArrowRight") || unref(rootContext).orientation.value === "horizontal" && (event.key === "ArrowUp" || event.key === "ArrowDown")) return;
445
+ event.preventDefault();
446
+ unref(rootContext).focusable.value && unref(rootContext).onKeydownNavigation(event);
447
+ }, [
448
+ "down",
449
+ "up",
450
+ "left",
451
+ "right",
452
+ "home",
453
+ "end"
454
+ ])),
455
+ withKeys(unref(rootContext).onKeydownEnter, ["enter"]),
456
+ unref(rootContext).onKeydownTypeAhead
457
+ ]
458
+ }, {
459
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
460
+ _: 3
461
+ }, 8, [
462
+ "as",
463
+ "as-child",
464
+ "tabindex",
465
+ "aria-orientation",
466
+ "aria-multiselectable",
467
+ "data-orientation",
468
+ "onKeydown"
469
+ ])]),
470
+ _: 3
471
+ });
472
+ };
473
+ }
474
+ });
475
+ var ListboxContent_default = ListboxContent_vue_vue_type_script_setup_true_lang_default;
476
+ var ListboxFilter_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
477
+ __name: "ListboxFilter",
478
+ props: {
479
+ modelValue: {
480
+ type: String,
481
+ required: false
482
+ },
483
+ autoFocus: {
484
+ type: Boolean,
485
+ required: false
486
+ },
487
+ disabled: {
488
+ type: Boolean,
489
+ required: false
490
+ },
491
+ asChild: {
492
+ type: Boolean,
493
+ required: false
494
+ },
495
+ as: {
496
+ type: null,
497
+ required: false,
498
+ default: "input"
499
+ }
500
+ },
501
+ emits: ["update:modelValue"],
502
+ setup(__props, { emit: __emit }) {
503
+ const props = __props;
504
+ const emits = __emit;
505
+ const modelValue = useVModel(props, "modelValue", emits, {
506
+ defaultValue: "",
507
+ passive: props.modelValue === void 0
508
+ });
509
+ const rootContext = injectListboxRootContext();
510
+ const { primitiveElement, currentElement } = usePrimitiveElement();
511
+ const disabled = computed(() => props.disabled || rootContext.disabled.value || false);
512
+ const activedescendant = ref();
513
+ watchSyncEffect(() => {
514
+ var _a;
515
+ return activedescendant.value = (_a = rootContext.highlightedElement.value) == null ? void 0 : _a.id;
516
+ });
517
+ onMounted(() => {
518
+ rootContext.focusable.value = false;
519
+ setTimeout(() => {
520
+ var _a;
521
+ if (props.autoFocus) (_a = currentElement.value) == null ? void 0 : _a.focus();
522
+ }, 1);
523
+ });
524
+ onUnmounted(() => {
525
+ rootContext.focusable.value = true;
526
+ });
527
+ return (_ctx, _cache) => {
528
+ return openBlock(), createBlock(unref(Primitive), {
529
+ ref_key: "primitiveElement",
530
+ ref: primitiveElement,
531
+ as: _ctx.as,
532
+ "as-child": _ctx.asChild,
533
+ value: unref(modelValue),
534
+ disabled: disabled.value ? "" : void 0,
535
+ "data-disabled": disabled.value ? "" : void 0,
536
+ "aria-disabled": disabled.value ?? void 0,
537
+ "aria-activedescendant": activedescendant.value,
538
+ type: "text",
539
+ onKeydown: [withKeys(withModifiers(unref(rootContext).onKeydownNavigation, ["prevent"]), [
540
+ "down",
541
+ "up",
542
+ "home",
543
+ "end"
544
+ ]), withKeys(unref(rootContext).onKeydownEnter, ["enter"])],
545
+ onInput: _cache[0] || (_cache[0] = (event) => {
546
+ modelValue.value = event.target.value;
547
+ unref(rootContext).highlightFirstItem();
548
+ }),
549
+ onCompositionstart: unref(rootContext).onCompositionStart,
550
+ onCompositionend: unref(rootContext).onCompositionEnd
551
+ }, {
552
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", { modelValue: unref(modelValue) })]),
553
+ _: 3
554
+ }, 8, [
555
+ "as",
556
+ "as-child",
557
+ "value",
558
+ "disabled",
559
+ "data-disabled",
560
+ "aria-disabled",
561
+ "aria-activedescendant",
562
+ "onKeydown",
563
+ "onCompositionstart",
564
+ "onCompositionend"
565
+ ]);
566
+ };
567
+ }
568
+ });
569
+ var ListboxFilter_default = ListboxFilter_vue_vue_type_script_setup_true_lang_default;
570
+ const [injectListboxGroupContext, provideListboxGroupContext] = createContext("ListboxGroup");
571
+ var ListboxGroup_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
572
+ __name: "ListboxGroup",
573
+ props: {
574
+ asChild: {
575
+ type: Boolean,
576
+ required: false
577
+ },
578
+ as: {
579
+ type: null,
580
+ required: false
581
+ }
582
+ },
583
+ setup(__props) {
584
+ const props = __props;
585
+ const id = useId(void 0, "reka-listbox-group");
586
+ provideListboxGroupContext({ id });
587
+ return (_ctx, _cache) => {
588
+ return openBlock(), createBlock(unref(Primitive), mergeProps({ role: "group" }, props, { "aria-labelledby": unref(id) }), {
589
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
590
+ _: 3
591
+ }, 16, ["aria-labelledby"]);
592
+ };
593
+ }
594
+ });
595
+ var ListboxGroup_default = ListboxGroup_vue_vue_type_script_setup_true_lang_default;
596
+ var ListboxGroupLabel_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
597
+ __name: "ListboxGroupLabel",
598
+ props: {
599
+ for: {
600
+ type: String,
601
+ required: false
602
+ },
603
+ asChild: {
604
+ type: Boolean,
605
+ required: false
606
+ },
607
+ as: {
608
+ type: null,
609
+ required: false,
610
+ default: "div"
611
+ }
612
+ },
613
+ setup(__props) {
614
+ const props = __props;
615
+ const groupContext = injectListboxGroupContext({ id: "" });
616
+ return (_ctx, _cache) => {
617
+ return openBlock(), createBlock(unref(Primitive), mergeProps(props, { id: unref(groupContext).id }), {
618
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
619
+ _: 3
620
+ }, 16, ["id"]);
621
+ };
622
+ }
623
+ });
624
+ var ListboxGroupLabel_default = ListboxGroupLabel_vue_vue_type_script_setup_true_lang_default;
625
+ const LISTBOX_SELECT = "listbox.select";
626
+ const [injectListboxItemContext, provideListboxItemContext] = createContext("ListboxItem");
627
+ var ListboxItem_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
628
+ __name: "ListboxItem",
629
+ props: {
630
+ value: {
631
+ type: null,
632
+ required: true
633
+ },
634
+ disabled: {
635
+ type: Boolean,
636
+ required: false
637
+ },
638
+ asChild: {
639
+ type: Boolean,
640
+ required: false
641
+ },
642
+ as: {
643
+ type: null,
644
+ required: false,
645
+ default: "div"
646
+ }
647
+ },
648
+ emits: ["select"],
649
+ setup(__props, { emit: __emit }) {
650
+ const props = __props;
651
+ const emits = __emit;
652
+ const id = useId(void 0, "reka-listbox-item");
653
+ const { CollectionItem } = useCollection();
654
+ const { forwardRef, currentElement } = useForwardExpose();
655
+ const rootContext = injectListboxRootContext();
656
+ const isHighlighted = computed(() => currentElement.value === rootContext.highlightedElement.value);
657
+ const isSelected = computed(() => valueComparator(rootContext.modelValue.value, props.value, rootContext.by));
658
+ const disabled = computed(() => rootContext.disabled.value || props.disabled);
659
+ async function handleSelect(ev) {
660
+ emits("select", ev);
661
+ if (ev == null ? void 0 : ev.defaultPrevented) return;
662
+ if (!disabled.value && ev) {
663
+ rootContext.onValueChange(props.value);
664
+ rootContext.changeHighlight(currentElement.value);
665
+ }
666
+ }
667
+ function handleSelectCustomEvent(ev) {
668
+ const eventDetail = {
669
+ originalEvent: ev,
670
+ value: props.value
671
+ };
672
+ handleAndDispatchCustomEvent(LISTBOX_SELECT, handleSelect, eventDetail);
673
+ }
674
+ provideListboxItemContext({ isSelected });
675
+ return (_ctx, _cache) => {
676
+ return openBlock(), createBlock(unref(CollectionItem), { value: _ctx.value }, {
677
+ default: withCtx(() => [withMemo([isHighlighted.value, isSelected.value], () => createVNode(unref(Primitive), mergeProps({ id: unref(id) }, _ctx.$attrs, {
678
+ ref: unref(forwardRef),
679
+ role: "option",
680
+ tabindex: unref(rootContext).focusable.value ? isHighlighted.value ? "0" : "-1" : -1,
681
+ "aria-selected": isSelected.value,
682
+ as: _ctx.as,
683
+ "as-child": _ctx.asChild,
684
+ disabled: disabled.value ? "" : void 0,
685
+ "data-disabled": disabled.value ? "" : void 0,
686
+ "data-highlighted": isHighlighted.value ? "" : void 0,
687
+ "data-state": isSelected.value ? "checked" : "unchecked",
688
+ onClick: handleSelectCustomEvent,
689
+ onKeydown: withKeys(withModifiers(handleSelectCustomEvent, ["prevent"]), ["space"]),
690
+ onPointermove: _cache[0] || (_cache[0] = () => {
691
+ if (unref(rootContext).highlightedElement.value === unref(currentElement)) return;
692
+ if (unref(rootContext).highlightOnHover.value && !unref(rootContext).focusable.value) unref(rootContext).changeHighlight(unref(currentElement), false);
693
+ })
694
+ }), {
695
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
696
+ _: 3
697
+ }, 16, [
698
+ "id",
699
+ "tabindex",
700
+ "aria-selected",
701
+ "as",
702
+ "as-child",
703
+ "disabled",
704
+ "data-disabled",
705
+ "data-highlighted",
706
+ "data-state",
707
+ "onKeydown"
708
+ ]), _cache, 1)]),
709
+ _: 3
710
+ }, 8, ["value"]);
711
+ };
712
+ }
713
+ });
714
+ var ListboxItem_default = ListboxItem_vue_vue_type_script_setup_true_lang_default;
715
+ /**
716
+ * @license lucide-vue-next v1.0.0 - ISC
717
+ *
718
+ * This source code is licensed under the ISC license.
719
+ * See the LICENSE file in the root directory of this source tree.
720
+ */
721
+ const Search = createLucideIcon("search", [
722
+ ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
723
+ ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
724
+ ]);
725
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
726
+ __name: "Command",
727
+ props: {
728
+ modelValue: { default: "" },
729
+ defaultValue: {},
730
+ multiple: { type: Boolean },
731
+ orientation: {},
732
+ dir: {},
733
+ disabled: { type: Boolean },
734
+ selectionBehavior: {},
735
+ highlightOnHover: { type: Boolean },
736
+ by: {},
737
+ asChild: { type: Boolean },
738
+ as: {},
739
+ name: {},
740
+ required: { type: Boolean },
741
+ class: {}
742
+ },
743
+ emits: ["update:modelValue", "highlight", "entryFocus", "leave"],
744
+ setup(__props, { emit: __emit }) {
745
+ const props = __props;
746
+ const emits = __emit;
747
+ const delegatedProps = reactiveOmit(props, "class");
748
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
749
+ const allItems = ref(/* @__PURE__ */ new Map());
750
+ const allGroups = ref(/* @__PURE__ */ new Map());
751
+ const { contains } = useFilter({ sensitivity: "base" });
752
+ const filterState = reactive({
753
+ search: "",
754
+ filtered: {
755
+ /** The count of all visible items. */
756
+ count: 0,
757
+ /** Map from visible item id to its search score. */
758
+ items: /* @__PURE__ */ new Map(),
759
+ /** Set of groups with at least one visible item. */
760
+ groups: /* @__PURE__ */ new Set()
761
+ }
762
+ });
763
+ function filterItems() {
764
+ if (!filterState.search) {
765
+ filterState.filtered.count = allItems.value.size;
766
+ return;
767
+ }
768
+ filterState.filtered.groups = /* @__PURE__ */ new Set();
769
+ let itemCount = 0;
770
+ for (const [id, value] of allItems.value) {
771
+ const score = contains(value, filterState.search);
772
+ filterState.filtered.items.set(id, score ? 1 : 0);
773
+ if (score)
774
+ itemCount++;
775
+ }
776
+ for (const [groupId, group] of allGroups.value) {
777
+ for (const itemId of group) {
778
+ if (filterState.filtered.items.get(itemId) > 0) {
779
+ filterState.filtered.groups.add(groupId);
780
+ break;
781
+ }
782
+ }
783
+ }
784
+ filterState.filtered.count = itemCount;
785
+ }
786
+ watch(() => filterState.search, () => {
787
+ filterItems();
788
+ });
789
+ provideCommandContext({
790
+ allItems,
791
+ allGroups,
792
+ filterState
793
+ });
794
+ return (_ctx, _cache) => {
795
+ return openBlock(), createBlock(unref(ListboxRoot_default), mergeProps({ "data-slot": "command" }, unref(forwarded), {
796
+ class: unref(cn)("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded transition-colors duration-300 ease-in-out", props.class)
797
+ }), {
798
+ default: withCtx(() => [
799
+ renderSlot(_ctx.$slots, "default")
800
+ ]),
801
+ _: 3
802
+ }, 16, ["class"]);
803
+ };
804
+ }
805
+ });
806
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
807
+ __name: "CommandDialog",
808
+ props: {
809
+ open: { type: Boolean },
810
+ defaultOpen: { type: Boolean },
811
+ modal: { type: Boolean },
812
+ title: { default: "Command Palette" },
813
+ description: { default: "Search for a command to run..." }
814
+ },
815
+ emits: ["update:open"],
816
+ setup(__props, { emit: __emit }) {
817
+ const props = __props;
818
+ const emits = __emit;
819
+ const forwarded = useForwardPropsEmits(props, emits);
820
+ return (_ctx, _cache) => {
821
+ return openBlock(), createBlock(unref(_sfc_main$9), normalizeProps(guardReactiveProps(unref(forwarded))), {
822
+ default: withCtx((slotProps) => [
823
+ createVNode(unref(_sfc_main$a), { class: "overflow-hidden p-0" }, {
824
+ default: withCtx(() => [
825
+ createVNode(unref(_sfc_main$b), { class: "sr-only" }, {
826
+ default: withCtx(() => [
827
+ createVNode(unref(_sfc_main$c), null, {
828
+ default: withCtx(() => [
829
+ createTextVNode(toDisplayString(_ctx.title), 1)
830
+ ]),
831
+ _: 1
832
+ }),
833
+ createVNode(unref(_sfc_main$d), null, {
834
+ default: withCtx(() => [
835
+ createTextVNode(toDisplayString(_ctx.description), 1)
836
+ ]),
837
+ _: 1
838
+ })
839
+ ]),
840
+ _: 1
841
+ }),
842
+ createVNode(_sfc_main$8, null, {
843
+ default: withCtx(() => [
844
+ renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps)))
845
+ ]),
846
+ _: 2
847
+ }, 1024)
848
+ ]),
849
+ _: 2
850
+ }, 1024)
851
+ ]),
852
+ _: 3
853
+ }, 16);
854
+ };
855
+ }
856
+ });
857
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
858
+ __name: "CommandEmpty",
859
+ props: {
860
+ asChild: { type: Boolean },
861
+ as: {},
862
+ class: {}
863
+ },
864
+ setup(__props) {
865
+ const props = __props;
866
+ const delegatedProps = reactiveOmit(props, "class");
867
+ const { filterState } = useCommand();
868
+ const isRender = computed(
869
+ () => !!filterState.search && filterState.filtered.count === 0
870
+ );
871
+ return (_ctx, _cache) => {
872
+ return isRender.value ? (openBlock(), createBlock(unref(Primitive), mergeProps({
873
+ key: 0,
874
+ "data-slot": "command-empty"
875
+ }, unref(delegatedProps), {
876
+ class: unref(cn)("py-6 text-center text-sm", props.class)
877
+ }), {
878
+ default: withCtx(() => [
879
+ renderSlot(_ctx.$slots, "default")
880
+ ]),
881
+ _: 3
882
+ }, 16, ["class"])) : createCommentVNode("", true);
883
+ };
884
+ }
885
+ });
886
+ const _hoisted_1$2 = { class: "p-2" };
887
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
888
+ __name: "CommandGroup",
889
+ props: {
890
+ asChild: { type: Boolean },
891
+ as: {},
892
+ class: {},
893
+ heading: {}
894
+ },
895
+ setup(__props) {
896
+ const props = __props;
897
+ const delegatedProps = reactiveOmit(props, "class");
898
+ const { allGroups, filterState } = useCommand();
899
+ const id = useId();
900
+ const isRender = computed(() => !filterState.search ? true : filterState.filtered.groups.has(id));
901
+ provideCommandGroupContext({ id });
902
+ onMounted(() => {
903
+ if (!allGroups.value.has(id))
904
+ allGroups.value.set(id, /* @__PURE__ */ new Set());
905
+ });
906
+ onUnmounted(() => {
907
+ allGroups.value.delete(id);
908
+ });
909
+ return (_ctx, _cache) => {
910
+ return openBlock(), createBlock(unref(ListboxGroup_default), mergeProps(unref(delegatedProps), {
911
+ id: unref(id),
912
+ "data-slot": "command-group",
913
+ class: unref(cn)("text-foreground overflow-hidden", props.class),
914
+ hidden: isRender.value ? void 0 : true
915
+ }), {
916
+ default: withCtx(() => [
917
+ _ctx.heading ? (openBlock(), createBlock(unref(ListboxGroupLabel_default), {
918
+ key: 0,
919
+ "data-slot": "command-group-heading",
920
+ class: "border-b border-(--border-light) px-3 py-2 text-xs font-semibold uppercase tracking-[0.16em] text-(--text-secondary-light) dark:border-(--border-dark) dark:text-(--text-secondary-dark)"
921
+ }, {
922
+ default: withCtx(() => [
923
+ createTextVNode(toDisplayString(_ctx.heading), 1)
924
+ ]),
925
+ _: 1
926
+ })) : createCommentVNode("", true),
927
+ createElementVNode("div", _hoisted_1$2, [
928
+ renderSlot(_ctx.$slots, "default")
929
+ ])
930
+ ]),
931
+ _: 3
932
+ }, 16, ["id", "class", "hidden"]);
933
+ };
934
+ }
935
+ });
936
+ const _hoisted_1$1 = {
937
+ "data-slot": "command-input-wrapper",
938
+ class: "flex h-9 items-center gap-2 border-b px-3"
939
+ };
940
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
941
+ ...{
942
+ inheritAttrs: false
943
+ },
944
+ __name: "CommandInput",
945
+ props: {
946
+ modelValue: {},
947
+ autoFocus: { type: Boolean },
948
+ disabled: { type: Boolean },
949
+ asChild: { type: Boolean },
950
+ as: {},
951
+ class: {}
952
+ },
953
+ setup(__props) {
954
+ const props = __props;
955
+ const delegatedProps = reactiveOmit(props, "class");
956
+ const forwardedProps = useForwardProps(delegatedProps);
957
+ const { filterState } = useCommand();
958
+ return (_ctx, _cache) => {
959
+ return openBlock(), createElementBlock("div", _hoisted_1$1, [
960
+ createVNode(unref(Search), { class: "size-4 shrink-0 opacity-50" }),
961
+ createVNode(unref(ListboxFilter_default), mergeProps({ ...unref(forwardedProps), ..._ctx.$attrs }, {
962
+ modelValue: unref(filterState).search,
963
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(filterState).search = $event),
964
+ "data-slot": "command-input",
965
+ "auto-focus": "",
966
+ class: unref(cn)("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", props.class)
967
+ }), null, 16, ["modelValue", "class"])
968
+ ]);
969
+ };
970
+ }
971
+ });
972
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
973
+ __name: "CommandItem",
974
+ props: {
975
+ value: {},
976
+ disabled: { type: Boolean },
977
+ asChild: { type: Boolean },
978
+ as: {},
979
+ class: {}
980
+ },
981
+ emits: ["select"],
982
+ setup(__props, { emit: __emit }) {
983
+ const props = __props;
984
+ const emits = __emit;
985
+ const delegatedProps = reactiveOmit(props, "class");
986
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
987
+ const id = useId();
988
+ const { filterState, allItems, allGroups } = useCommand();
989
+ const groupContext = useCommandGroup();
990
+ const isRender = computed(() => {
991
+ if (!filterState.search) {
992
+ return true;
993
+ } else {
994
+ const filteredCurrentItem = filterState.filtered.items.get(id);
995
+ if (filteredCurrentItem === void 0) {
996
+ return true;
997
+ }
998
+ return filteredCurrentItem > 0;
999
+ }
1000
+ });
1001
+ const itemRef = ref();
1002
+ const currentElement = useCurrentElement(itemRef);
1003
+ onMounted(() => {
1004
+ var _a, _b;
1005
+ if (!(currentElement.value instanceof HTMLElement))
1006
+ return;
1007
+ allItems.value.set(id, currentElement.value.textContent ?? (((_a = props.value) == null ? void 0 : _a.toString()) ?? ""));
1008
+ const groupId = groupContext == null ? void 0 : groupContext.id;
1009
+ if (groupId) {
1010
+ if (!allGroups.value.has(groupId)) {
1011
+ allGroups.value.set(groupId, /* @__PURE__ */ new Set([id]));
1012
+ } else {
1013
+ (_b = allGroups.value.get(groupId)) == null ? void 0 : _b.add(id);
1014
+ }
1015
+ }
1016
+ });
1017
+ onUnmounted(() => {
1018
+ allItems.value.delete(id);
1019
+ });
1020
+ return (_ctx, _cache) => {
1021
+ return isRender.value ? (openBlock(), createBlock(unref(ListboxItem_default), mergeProps({ key: 0 }, unref(forwarded), {
1022
+ id: unref(id),
1023
+ ref_key: "itemRef",
1024
+ ref: itemRef,
1025
+ "data-slot": "command-item",
1026
+ class: unref(cn)("relative flex cursor-pointer items-center gap-3 rounded px-3 py-2 text-left text-sm font-medium text-(--text-secondary-light) outline-hidden transition-colors duration-200 select-none data-[highlighted]:bg-(--bg-selected-light) data-[highlighted]:text-(--text-primary-light) data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:text-(--text-secondary-dark) dark:data-[highlighted]:bg-(--bg-selected-dark) dark:data-[highlighted]:text-(--text-primary-dark) [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-current", props.class),
1027
+ onSelect: _cache[0] || (_cache[0] = () => {
1028
+ unref(filterState).search = "";
1029
+ })
1030
+ }), {
1031
+ default: withCtx(() => [
1032
+ renderSlot(_ctx.$slots, "default")
1033
+ ]),
1034
+ _: 3
1035
+ }, 16, ["id", "class"])) : createCommentVNode("", true);
1036
+ };
1037
+ }
1038
+ });
1039
+ const _hoisted_1 = { role: "presentation" };
1040
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1041
+ __name: "CommandList",
1042
+ props: {
1043
+ asChild: { type: Boolean },
1044
+ as: {},
1045
+ class: {}
1046
+ },
1047
+ setup(__props) {
1048
+ const props = __props;
1049
+ const delegatedProps = reactiveOmit(props, "class");
1050
+ const forwarded = useForwardProps(delegatedProps);
1051
+ return (_ctx, _cache) => {
1052
+ return openBlock(), createBlock(unref(ListboxContent_default), mergeProps({ "data-slot": "command-list" }, unref(forwarded), {
1053
+ class: unref(cn)("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", props.class)
1054
+ }), {
1055
+ default: withCtx(() => [
1056
+ createElementVNode("div", _hoisted_1, [
1057
+ renderSlot(_ctx.$slots, "default")
1058
+ ])
1059
+ ]),
1060
+ _: 3
1061
+ }, 16, ["class"]);
1062
+ };
1063
+ }
1064
+ });
1065
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1066
+ __name: "CommandSeparator",
1067
+ props: {
1068
+ orientation: {},
1069
+ decorative: { type: Boolean },
1070
+ asChild: { type: Boolean },
1071
+ as: {},
1072
+ class: {}
1073
+ },
1074
+ setup(__props) {
1075
+ const props = __props;
1076
+ const delegatedProps = reactiveOmit(props, "class");
1077
+ return (_ctx, _cache) => {
1078
+ return openBlock(), createBlock(unref(Separator_default), mergeProps({ "data-slot": "command-separator" }, unref(delegatedProps), {
1079
+ class: unref(cn)("bg-border -mx-1 h-px", props.class)
1080
+ }), {
1081
+ default: withCtx(() => [
1082
+ renderSlot(_ctx.$slots, "default")
1083
+ ]),
1084
+ _: 3
1085
+ }, 16, ["class"]);
1086
+ };
1087
+ }
1088
+ });
1089
+ const _sfc_main = /* @__PURE__ */ defineComponent({
1090
+ __name: "CommandShortcut",
1091
+ props: {
1092
+ class: {}
1093
+ },
1094
+ setup(__props) {
1095
+ const props = __props;
1096
+ return (_ctx, _cache) => {
1097
+ return openBlock(), createElementBlock("span", {
1098
+ "data-slot": "command-shortcut",
1099
+ class: normalizeClass(unref(cn)("text-muted-foreground ml-auto text-xs tracking-widest", props.class))
1100
+ }, [
1101
+ renderSlot(_ctx.$slots, "default")
1102
+ ], 2);
1103
+ };
1104
+ }
1105
+ });
1106
+ const [useCommand, provideCommandContext] = createContext("Command");
1107
+ const [useCommandGroup, provideCommandGroupContext] = createContext("CommandGroup");
1108
+ export {
1109
+ _sfc_main$8 as Command,
1110
+ _sfc_main$7 as CommandDialog,
1111
+ _sfc_main$6 as CommandEmpty,
1112
+ _sfc_main$5 as CommandGroup,
1113
+ _sfc_main$4 as CommandInput,
1114
+ _sfc_main$3 as CommandItem,
1115
+ _sfc_main$2 as CommandList,
1116
+ _sfc_main$1 as CommandSeparator,
1117
+ _sfc_main as CommandShortcut,
1118
+ provideCommandContext,
1119
+ provideCommandGroupContext,
1120
+ useCommand,
1121
+ useCommandGroup
1122
+ };