@hina-ui/vue 1.7.11 → 1.7.13

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 (716) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +25614 -10189
  3. package/dist/index.js.map +1 -1
  4. package/dist/shared/lib/css-time.ts +6 -0
  5. package/dist/shared/lib/line-clamp.ts +8 -8
  6. package/dist/shared/lib/tour.ts +261 -0
  7. package/dist/shared/locale/en-US.ts +8 -0
  8. package/dist/shared/locale/index.ts +1 -0
  9. package/dist/shared/locale/ja-JP.ts +9 -0
  10. package/dist/shared/locale/types.ts +8 -0
  11. package/dist/shared/locale/zh-CN.ts +8 -0
  12. package/dist/shared/primitives/combobox/LICENSE +44 -0
  13. package/dist/shared/primitives/combobox/index.ts +49 -0
  14. package/dist/shared/primitives/date/calendar-view.ts +264 -0
  15. package/dist/shared/primitives/date/calendar.ts +126 -0
  16. package/dist/shared/primitives/date/comparators.ts +144 -0
  17. package/dist/shared/primitives/date/field.ts +551 -0
  18. package/dist/shared/primitives/date/formatter.ts +110 -0
  19. package/dist/shared/primitives/date/parser.ts +182 -0
  20. package/dist/shared/primitives/date/parts.ts +16 -0
  21. package/dist/shared/primitives/date/picker-view.ts +186 -0
  22. package/dist/shared/primitives/date/placeholders.ts +485 -0
  23. package/dist/shared/primitives/date/range-calendar-view.ts +181 -0
  24. package/dist/shared/primitives/date/segment.ts +44 -0
  25. package/dist/shared/primitives/date/utils.ts +169 -0
  26. package/dist/shared/primitives/dialog/LICENSE +21 -0
  27. package/dist/shared/primitives/dialog/index.ts +73 -0
  28. package/dist/shared/primitives/grace-area/LICENSE +21 -0
  29. package/dist/shared/primitives/grace-area/index.ts +112 -0
  30. package/dist/shared/primitives/listbox/LICENSE +21 -0
  31. package/dist/shared/primitives/listbox/index.ts +213 -0
  32. package/dist/shared/primitives/menu/LICENSE +21 -0
  33. package/dist/shared/primitives/menu/index.ts +66 -0
  34. package/dist/shared/primitives/navigation-menu/LICENSE +44 -0
  35. package/dist/shared/primitives/navigation-menu/index.ts +125 -0
  36. package/dist/shared/primitives/pin-input/index.ts +394 -97
  37. package/dist/shared/primitives/popper/LICENSE +21 -0
  38. package/dist/shared/primitives/popper/index.ts +246 -0
  39. package/dist/shared/primitives/select/index.ts +98 -0
  40. package/dist/shared/primitives/tags-input/LICENSE +21 -0
  41. package/dist/shared/primitives/tags-input/index.ts +113 -0
  42. package/dist/shared/primitives/toast/LICENSE +44 -0
  43. package/dist/shared/primitives/toast/index.ts +106 -0
  44. package/dist/shared/primitives/tree/LICENSE +21 -0
  45. package/dist/shared/primitives/tree/index.ts +248 -0
  46. package/dist/shared/styles/interaction.css +6 -2
  47. package/dist/shared/styles/line-clamp.css +6 -2
  48. package/dist/shared/styles/pin-input.css +84 -0
  49. package/dist/shared/styles/tokens.css +2 -0
  50. package/dist/shared/styles/tour.css +29 -0
  51. package/dist/shared/variants/nav-link.ts +6 -2
  52. package/dist/shared/variants/pin-input.ts +26 -7
  53. package/dist/shared/variants/tour.ts +29 -0
  54. package/dist/types/shared/src/lib/css-time.d.ts +2 -0
  55. package/dist/types/shared/src/lib/css-time.d.ts.map +1 -0
  56. package/dist/types/shared/src/lib/line-clamp.d.ts.map +1 -1
  57. package/dist/types/shared/src/lib/tour.d.ts +81 -0
  58. package/dist/types/shared/src/lib/tour.d.ts.map +1 -0
  59. package/dist/types/shared/src/lib/virtual/filter.d.ts +6 -0
  60. package/dist/types/shared/src/lib/virtual/filter.d.ts.map +1 -0
  61. package/dist/types/shared/src/locale/en-US.d.ts.map +1 -1
  62. package/dist/types/shared/src/locale/index.d.ts.map +1 -1
  63. package/dist/types/shared/src/locale/ja-JP.d.ts.map +1 -1
  64. package/dist/types/shared/src/locale/types.d.ts +8 -0
  65. package/dist/types/shared/src/locale/types.d.ts.map +1 -1
  66. package/dist/types/shared/src/locale/zh-CN.d.ts.map +1 -1
  67. package/dist/types/shared/src/primitives/body-scroll-lock/index.d.ts +10 -0
  68. package/dist/types/shared/src/primitives/body-scroll-lock/index.d.ts.map +1 -0
  69. package/dist/types/shared/src/primitives/collapsible/index.d.ts +1 -1
  70. package/dist/types/shared/src/primitives/combobox/index.d.ts +9 -0
  71. package/dist/types/shared/src/primitives/combobox/index.d.ts.map +1 -0
  72. package/dist/types/shared/src/primitives/date/calendar-view.d.ts +53 -0
  73. package/dist/types/shared/src/primitives/date/calendar-view.d.ts.map +1 -0
  74. package/dist/types/shared/src/primitives/date/calendar.d.ts +39 -0
  75. package/dist/types/shared/src/primitives/date/calendar.d.ts.map +1 -0
  76. package/dist/types/shared/src/primitives/date/comparators.d.ts +31 -0
  77. package/dist/types/shared/src/primitives/date/comparators.d.ts.map +1 -0
  78. package/dist/types/shared/src/primitives/date/field.d.ts +46 -0
  79. package/dist/types/shared/src/primitives/date/field.d.ts.map +1 -0
  80. package/dist/types/shared/src/primitives/date/formatter.d.ts +20 -0
  81. package/dist/types/shared/src/primitives/date/formatter.d.ts.map +1 -0
  82. package/dist/types/shared/src/primitives/date/parser.d.ts +49 -0
  83. package/dist/types/shared/src/primitives/date/parser.d.ts.map +1 -0
  84. package/dist/types/shared/src/primitives/date/parts.d.ts +10 -0
  85. package/dist/types/shared/src/primitives/date/parts.d.ts.map +1 -0
  86. package/dist/types/shared/src/primitives/date/picker-view.d.ts +34 -0
  87. package/dist/types/shared/src/primitives/date/picker-view.d.ts.map +1 -0
  88. package/dist/types/shared/src/primitives/date/placeholders.d.ts +2 -0
  89. package/dist/types/shared/src/primitives/date/placeholders.d.ts.map +1 -0
  90. package/dist/types/shared/src/primitives/date/range-calendar-view.d.ts +67 -0
  91. package/dist/types/shared/src/primitives/date/range-calendar-view.d.ts.map +1 -0
  92. package/dist/types/shared/src/primitives/date/segment.d.ts +6 -0
  93. package/dist/types/shared/src/primitives/date/segment.d.ts.map +1 -0
  94. package/dist/types/shared/src/primitives/date/utils.d.ts +37 -0
  95. package/dist/types/shared/src/primitives/date/utils.d.ts.map +1 -0
  96. package/dist/types/shared/src/primitives/dialog/index.d.ts +32 -0
  97. package/dist/types/shared/src/primitives/dialog/index.d.ts.map +1 -0
  98. package/dist/types/shared/src/primitives/focus-guards/index.d.ts +2 -0
  99. package/dist/types/shared/src/primitives/focus-guards/index.d.ts.map +1 -0
  100. package/dist/types/shared/src/primitives/grace-area/index.d.ts +13 -0
  101. package/dist/types/shared/src/primitives/grace-area/index.d.ts.map +1 -0
  102. package/dist/types/shared/src/primitives/listbox/index.d.ts +55 -0
  103. package/dist/types/shared/src/primitives/listbox/index.d.ts.map +1 -0
  104. package/dist/types/shared/src/primitives/menu/index.d.ts +35 -0
  105. package/dist/types/shared/src/primitives/menu/index.d.ts.map +1 -0
  106. package/dist/types/shared/src/primitives/navigation-menu/index.d.ts +23 -0
  107. package/dist/types/shared/src/primitives/navigation-menu/index.d.ts.map +1 -0
  108. package/dist/types/shared/src/primitives/pin-input/index.d.ts +35 -27
  109. package/dist/types/shared/src/primitives/pin-input/index.d.ts.map +1 -1
  110. package/dist/types/shared/src/primitives/popper/index.d.ts +83 -0
  111. package/dist/types/shared/src/primitives/popper/index.d.ts.map +1 -0
  112. package/dist/types/shared/src/primitives/select/index.d.ts +24 -0
  113. package/dist/types/shared/src/primitives/select/index.d.ts.map +1 -0
  114. package/dist/types/shared/src/primitives/tags-input/index.d.ts +36 -0
  115. package/dist/types/shared/src/primitives/tags-input/index.d.ts.map +1 -0
  116. package/dist/types/shared/src/primitives/toast/index.d.ts +42 -0
  117. package/dist/types/shared/src/primitives/toast/index.d.ts.map +1 -0
  118. package/dist/types/shared/src/primitives/tree/index.d.ts +72 -0
  119. package/dist/types/shared/src/primitives/tree/index.d.ts.map +1 -0
  120. package/dist/types/shared/src/variants/nav-link.d.ts +2 -1
  121. package/dist/types/shared/src/variants/nav-link.d.ts.map +1 -1
  122. package/dist/types/shared/src/variants/pin-input.d.ts +30 -10
  123. package/dist/types/shared/src/variants/pin-input.d.ts.map +1 -1
  124. package/dist/types/shared/src/variants/tour.d.ts +10 -0
  125. package/dist/types/shared/src/variants/tour.d.ts.map +1 -0
  126. package/dist/types/vue/src/components/app-shell/AppShell.vue.d.ts +6 -6
  127. package/dist/types/vue/src/components/button/Button.vue.d.ts +1 -1
  128. package/dist/types/vue/src/components/button/Button.vue.d.ts.map +1 -1
  129. package/dist/types/vue/src/components/calendar/Calendar.vue.d.ts +1 -1
  130. package/dist/types/vue/src/components/calendar/Calendar.vue.d.ts.map +1 -1
  131. package/dist/types/vue/src/components/carousel/composables/useCarousel.d.ts +1 -1
  132. package/dist/types/vue/src/components/combobox/Combobox.vue.d.ts.map +1 -1
  133. package/dist/types/vue/src/components/command-palette/CommandPalettePanel.vue.d.ts.map +1 -1
  134. package/dist/types/vue/src/components/config-provider/ConfigProvider.vue.d.ts +20 -0
  135. package/dist/types/vue/src/components/config-provider/ConfigProvider.vue.d.ts.map +1 -0
  136. package/dist/types/vue/src/components/config-provider/types.d.ts +10 -0
  137. package/dist/types/vue/src/components/config-provider/types.d.ts.map +1 -0
  138. package/dist/types/vue/src/components/config-provider/useConfig.d.ts +2 -0
  139. package/dist/types/vue/src/components/config-provider/useConfig.d.ts.map +1 -0
  140. package/dist/types/vue/src/components/date-range-field/DateRangeField.vue.d.ts.map +1 -1
  141. package/dist/types/vue/src/components/date-time-picker/DateTimePicker.vue.d.ts +1 -1
  142. package/dist/types/vue/src/components/date-time-picker/DateTimePicker.vue.d.ts.map +1 -1
  143. package/dist/types/vue/src/components/dialog/ModalContent.vue.d.ts.map +1 -1
  144. package/dist/types/vue/src/components/dropdown-menu/DropdownMenu.vue.d.ts +20 -8
  145. package/dist/types/vue/src/components/dropdown-menu/DropdownMenu.vue.d.ts.map +1 -1
  146. package/dist/types/vue/src/components/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts.map +1 -1
  147. package/dist/types/vue/src/components/float-button/FloatButton.vue.d.ts +2 -2
  148. package/dist/types/vue/src/components/hover-card/HoverCard.vue.d.ts +1 -1
  149. package/dist/types/vue/src/components/hover-card/HoverCard.vue.d.ts.map +1 -1
  150. package/dist/types/vue/src/components/icon-button/IconButton.vue.d.ts +2 -2
  151. package/dist/types/vue/src/components/icon-button/IconButton.vue.d.ts.map +1 -1
  152. package/dist/types/vue/src/components/image/Image.vue.d.ts +1 -1
  153. package/dist/types/vue/src/components/image/Image.vue.d.ts.map +1 -1
  154. package/dist/types/vue/src/components/image/composables/useImage.d.ts.map +1 -1
  155. package/dist/types/vue/src/components/lightbox/Lightbox.vue.d.ts.map +1 -1
  156. package/dist/types/vue/src/components/menubar/MenubarMenu.vue.d.ts.map +1 -1
  157. package/dist/types/vue/src/components/menubar/MenubarSub.vue.d.ts.map +1 -1
  158. package/dist/types/vue/src/components/month-grid/MonthGrid.vue.d.ts +1 -1
  159. package/dist/types/vue/src/components/multi-combobox/MultiCombobox.vue.d.ts.map +1 -1
  160. package/dist/types/vue/src/components/nav-link/NavLink.vue.d.ts +5 -10
  161. package/dist/types/vue/src/components/nav-link/NavLink.vue.d.ts.map +1 -1
  162. package/dist/types/vue/src/components/nav-link/NavLinkChild.d.ts +8 -0
  163. package/dist/types/vue/src/components/nav-link/NavLinkChild.d.ts.map +1 -1
  164. package/dist/types/vue/src/components/navigation-menu/NavigationMenu.vue.d.ts +2 -2
  165. package/dist/types/vue/src/components/navigation-menu/NavigationMenu.vue.d.ts.map +1 -1
  166. package/dist/types/vue/src/components/navigation-menu/NavigationMenuContent.vue.d.ts +6 -6
  167. package/dist/types/vue/src/components/pagination/composables/usePaginationWindow.d.ts +6 -6
  168. package/dist/types/vue/src/components/pin-input/PinInput.vue.d.ts +2 -0
  169. package/dist/types/vue/src/components/pin-input/PinInput.vue.d.ts.map +1 -1
  170. package/dist/types/vue/src/components/popconfirm/Popconfirm.vue.d.ts.map +1 -1
  171. package/dist/types/vue/src/components/popover/Popover.vue.d.ts +9 -9
  172. package/dist/types/vue/src/components/popover/Popover.vue.d.ts.map +1 -1
  173. package/dist/types/vue/src/components/popover/PopoverContent.vue.d.ts +9 -9
  174. package/dist/types/vue/src/components/popover/PopoverContent.vue.d.ts.map +1 -1
  175. package/dist/types/vue/src/components/range-calendar/RangeCalendar.vue.d.ts +1 -1
  176. package/dist/types/vue/src/components/range-calendar/RangeCalendar.vue.d.ts.map +1 -1
  177. package/dist/types/vue/src/components/range-slider/RangeSlider.vue.d.ts +2 -2
  178. package/dist/types/vue/src/components/scroll-area/ScrollArea.vue.d.ts +1 -1
  179. package/dist/types/vue/src/components/scroll-area/ScrollArea.vue.d.ts.map +1 -1
  180. package/dist/types/vue/src/components/select/Select.vue.d.ts.map +1 -1
  181. package/dist/types/vue/src/components/sheet/Sheet.vue.d.ts +1 -1
  182. package/dist/types/vue/src/components/sheet/Sheet.vue.d.ts.map +1 -1
  183. package/dist/types/vue/src/components/slider/Slider.vue.d.ts +2 -2
  184. package/dist/types/vue/src/components/split-button/SplitButton.vue.d.ts +1 -1
  185. package/dist/types/vue/src/components/tags-input/TagsInput.vue.d.ts +1 -1
  186. package/dist/types/vue/src/components/tags-input/TagsInput.vue.d.ts.map +1 -1
  187. package/dist/types/vue/src/components/toolbar/Toolbar.vue.d.ts +1 -1
  188. package/dist/types/vue/src/components/toolbar/ToolbarControl.vue.d.ts +1 -1
  189. package/dist/types/vue/src/components/tour/Tour.vue.d.ts +34 -0
  190. package/dist/types/vue/src/components/tour/Tour.vue.d.ts.map +1 -0
  191. package/dist/types/vue/src/components/tour/tour.variants.d.ts +2 -0
  192. package/dist/types/vue/src/components/tour/tour.variants.d.ts.map +1 -0
  193. package/dist/types/vue/src/components/tour/types.d.ts +33 -0
  194. package/dist/types/vue/src/components/tour/types.d.ts.map +1 -0
  195. package/dist/types/vue/src/components/tree/TreeRows.vue.d.ts +1 -1
  196. package/dist/types/vue/src/components/tree/TreeRows.vue.d.ts.map +1 -1
  197. package/dist/types/vue/src/components/tree/VirtualTreeWindow.vue.d.ts +1 -1
  198. package/dist/types/vue/src/components/tree/VirtualTreeWindow.vue.d.ts.map +1 -1
  199. package/dist/types/vue/src/components/tree-select/TreeSelect.vue.d.ts.map +1 -1
  200. package/dist/types/vue/src/components/virtual-list/composables/useVirtualList.d.ts +7 -7
  201. package/dist/types/vue/src/index.d.ts +5 -0
  202. package/dist/types/vue/src/index.d.ts.map +1 -1
  203. package/dist/types/vue/src/lib/anchored-overlay.d.ts +11 -5
  204. package/dist/types/vue/src/lib/anchored-overlay.d.ts.map +1 -1
  205. package/dist/types/vue/src/lib/reka/useVirtualChoices.d.ts +6 -6
  206. package/dist/types/vue/src/lib/reka/useVirtualChoices.d.ts.map +1 -1
  207. package/dist/types/vue/src/lib/reka/useVirtualTree.d.ts +1 -1
  208. package/dist/types/vue/src/lib/reka/useVirtualTree.d.ts.map +1 -1
  209. package/dist/types/vue/src/lib/useDirection.d.ts +1 -1
  210. package/dist/types/vue/src/primitives/alert-dialog/index.d.ts +133 -0
  211. package/dist/types/vue/src/primitives/alert-dialog/index.d.ts.map +1 -0
  212. package/dist/types/vue/src/primitives/calendar/CalendarCellTrigger.d.ts +52 -0
  213. package/dist/types/vue/src/primitives/calendar/CalendarCellTrigger.d.ts.map +1 -0
  214. package/dist/types/vue/src/primitives/calendar/CalendarGrid.d.ts +227 -0
  215. package/dist/types/vue/src/primitives/calendar/CalendarGrid.d.ts.map +1 -0
  216. package/dist/types/vue/src/primitives/calendar/CalendarNav.d.ts +140 -0
  217. package/dist/types/vue/src/primitives/calendar/CalendarNav.d.ts.map +1 -0
  218. package/dist/types/vue/src/primitives/calendar/CalendarRoot.d.ts +313 -0
  219. package/dist/types/vue/src/primitives/calendar/CalendarRoot.d.ts.map +1 -0
  220. package/dist/types/vue/src/primitives/calendar/context.d.ts +48 -0
  221. package/dist/types/vue/src/primitives/calendar/context.d.ts.map +1 -0
  222. package/dist/types/vue/src/primitives/calendar/index.d.ts +6 -0
  223. package/dist/types/vue/src/primitives/calendar/index.d.ts.map +1 -0
  224. package/dist/types/vue/src/primitives/calendar/useCalendar.d.ts +65 -0
  225. package/dist/types/vue/src/primitives/calendar/useCalendar.d.ts.map +1 -0
  226. package/dist/types/vue/src/primitives/combobox/ComboboxContent.d.ts +273 -0
  227. package/dist/types/vue/src/primitives/combobox/ComboboxContent.d.ts.map +1 -0
  228. package/dist/types/vue/src/primitives/combobox/ComboboxItem.d.ts +166 -0
  229. package/dist/types/vue/src/primitives/combobox/ComboboxItem.d.ts.map +1 -0
  230. package/dist/types/vue/src/primitives/combobox/ComboboxRoot.d.ts +376 -0
  231. package/dist/types/vue/src/primitives/combobox/ComboboxRoot.d.ts.map +1 -0
  232. package/dist/types/vue/src/primitives/combobox/context.d.ts +68 -0
  233. package/dist/types/vue/src/primitives/combobox/context.d.ts.map +1 -0
  234. package/dist/types/vue/src/primitives/combobox/index.d.ts +5 -0
  235. package/dist/types/vue/src/primitives/combobox/index.d.ts.map +1 -0
  236. package/dist/types/vue/src/primitives/context-menu/index.d.ts +949 -0
  237. package/dist/types/vue/src/primitives/context-menu/index.d.ts.map +1 -0
  238. package/dist/types/vue/src/primitives/date-field/DateFieldInput.d.ts +40 -0
  239. package/dist/types/vue/src/primitives/date-field/DateFieldInput.d.ts.map +1 -0
  240. package/dist/types/vue/src/primitives/date-field/DateFieldRoot.d.ts +233 -0
  241. package/dist/types/vue/src/primitives/date-field/DateFieldRoot.d.ts.map +1 -0
  242. package/dist/types/vue/src/primitives/date-field/context.d.ts +26 -0
  243. package/dist/types/vue/src/primitives/date-field/context.d.ts.map +1 -0
  244. package/dist/types/vue/src/primitives/date-field/index.d.ts +4 -0
  245. package/dist/types/vue/src/primitives/date-field/index.d.ts.map +1 -0
  246. package/dist/types/vue/src/primitives/date-field/segmentInput.d.ts +36 -0
  247. package/dist/types/vue/src/primitives/date-field/segmentInput.d.ts.map +1 -0
  248. package/dist/types/vue/src/primitives/date-field/useDateFieldSegment.d.ts +32 -0
  249. package/dist/types/vue/src/primitives/date-field/useDateFieldSegment.d.ts.map +1 -0
  250. package/dist/types/vue/src/primitives/date-range-field/DateRangeFieldInput.d.ts +51 -0
  251. package/dist/types/vue/src/primitives/date-range-field/DateRangeFieldInput.d.ts.map +1 -0
  252. package/dist/types/vue/src/primitives/date-range-field/DateRangeFieldRoot.d.ts +221 -0
  253. package/dist/types/vue/src/primitives/date-range-field/DateRangeFieldRoot.d.ts.map +1 -0
  254. package/dist/types/vue/src/primitives/date-range-field/context.d.ts +31 -0
  255. package/dist/types/vue/src/primitives/date-range-field/context.d.ts.map +1 -0
  256. package/dist/types/vue/src/primitives/date-range-field/index.d.ts +4 -0
  257. package/dist/types/vue/src/primitives/date-range-field/index.d.ts.map +1 -0
  258. package/dist/types/vue/src/primitives/dialog/DialogContent.d.ts +54 -0
  259. package/dist/types/vue/src/primitives/dialog/DialogContent.d.ts.map +1 -0
  260. package/dist/types/vue/src/primitives/dialog/DialogContentImpl.d.ts +65 -0
  261. package/dist/types/vue/src/primitives/dialog/DialogContentImpl.d.ts.map +1 -0
  262. package/dist/types/vue/src/primitives/dialog/DialogOverlay.d.ts +40 -0
  263. package/dist/types/vue/src/primitives/dialog/DialogOverlay.d.ts.map +1 -0
  264. package/dist/types/vue/src/primitives/dialog/DialogPortal.d.ts +49 -0
  265. package/dist/types/vue/src/primitives/dialog/DialogPortal.d.ts.map +1 -0
  266. package/dist/types/vue/src/primitives/dialog/DialogRoot.d.ts +62 -0
  267. package/dist/types/vue/src/primitives/dialog/DialogRoot.d.ts.map +1 -0
  268. package/dist/types/vue/src/primitives/dialog/DialogText.d.ts +85 -0
  269. package/dist/types/vue/src/primitives/dialog/DialogText.d.ts.map +1 -0
  270. package/dist/types/vue/src/primitives/dialog/DialogTrigger.d.ts +33 -0
  271. package/dist/types/vue/src/primitives/dialog/DialogTrigger.d.ts.map +1 -0
  272. package/dist/types/vue/src/primitives/dialog/context.d.ts +16 -0
  273. package/dist/types/vue/src/primitives/dialog/context.d.ts.map +1 -0
  274. package/dist/types/vue/src/primitives/dialog/index.d.ts +8 -0
  275. package/dist/types/vue/src/primitives/dialog/index.d.ts.map +1 -0
  276. package/dist/types/vue/src/primitives/dismissable-layer/DismissableLayer.d.ts +76 -0
  277. package/dist/types/vue/src/primitives/dismissable-layer/DismissableLayer.d.ts.map +1 -0
  278. package/dist/types/vue/src/primitives/dismissable-layer/DismissableLayerBranch.d.ts +26 -0
  279. package/dist/types/vue/src/primitives/dismissable-layer/DismissableLayerBranch.d.ts.map +1 -0
  280. package/dist/types/vue/src/primitives/dismissable-layer/index.d.ts +3 -0
  281. package/dist/types/vue/src/primitives/dismissable-layer/index.d.ts.map +1 -0
  282. package/dist/types/vue/src/primitives/dropdown-menu/index.d.ts +1033 -0
  283. package/dist/types/vue/src/primitives/dropdown-menu/index.d.ts.map +1 -0
  284. package/dist/types/vue/src/primitives/focus-scope/FocusScope.d.ts +72 -0
  285. package/dist/types/vue/src/primitives/focus-scope/FocusScope.d.ts.map +1 -0
  286. package/dist/types/vue/src/primitives/focus-scope/index.d.ts +2 -0
  287. package/dist/types/vue/src/primitives/focus-scope/index.d.ts.map +1 -0
  288. package/dist/types/vue/src/primitives/hover-card/index.d.ts +442 -0
  289. package/dist/types/vue/src/primitives/hover-card/index.d.ts.map +1 -0
  290. package/dist/types/vue/src/primitives/listbox/ListboxContent.d.ts +30 -0
  291. package/dist/types/vue/src/primitives/listbox/ListboxContent.d.ts.map +1 -0
  292. package/dist/types/vue/src/primitives/listbox/ListboxFilter.d.ts +67 -0
  293. package/dist/types/vue/src/primitives/listbox/ListboxFilter.d.ts.map +1 -0
  294. package/dist/types/vue/src/primitives/listbox/ListboxGroup.d.ts +82 -0
  295. package/dist/types/vue/src/primitives/listbox/ListboxGroup.d.ts.map +1 -0
  296. package/dist/types/vue/src/primitives/listbox/ListboxItem.d.ts +58 -0
  297. package/dist/types/vue/src/primitives/listbox/ListboxItem.d.ts.map +1 -0
  298. package/dist/types/vue/src/primitives/{pin-input/PinInputRoot.d.ts → listbox/ListboxRoot.d.ts} +60 -53
  299. package/dist/types/vue/src/primitives/listbox/ListboxRoot.d.ts.map +1 -0
  300. package/dist/types/vue/src/primitives/listbox/context.d.ts +49 -0
  301. package/dist/types/vue/src/primitives/listbox/context.d.ts.map +1 -0
  302. package/dist/types/vue/src/primitives/listbox/index.d.ts +7 -0
  303. package/dist/types/vue/src/primitives/listbox/index.d.ts.map +1 -0
  304. package/dist/types/vue/src/primitives/menu/MenuContentImpl.d.ts +394 -0
  305. package/dist/types/vue/src/primitives/menu/MenuContentImpl.d.ts.map +1 -0
  306. package/dist/types/vue/src/primitives/menu/MenuItem.d.ts +396 -0
  307. package/dist/types/vue/src/primitives/menu/MenuItem.d.ts.map +1 -0
  308. package/dist/types/vue/src/primitives/menu/MenuRoot.d.ts +746 -0
  309. package/dist/types/vue/src/primitives/menu/MenuRoot.d.ts.map +1 -0
  310. package/dist/types/vue/src/primitives/menu/context.d.ts +74 -0
  311. package/dist/types/vue/src/primitives/menu/context.d.ts.map +1 -0
  312. package/dist/types/vue/src/primitives/menu/index.d.ts +5 -0
  313. package/dist/types/vue/src/primitives/menu/index.d.ts.map +1 -0
  314. package/dist/types/vue/src/primitives/menu/wrap.d.ts +14 -0
  315. package/dist/types/vue/src/primitives/menu/wrap.d.ts.map +1 -0
  316. package/dist/types/vue/src/primitives/menubar/index.d.ts +1036 -0
  317. package/dist/types/vue/src/primitives/menubar/index.d.ts.map +1 -0
  318. package/dist/types/vue/src/primitives/navigation-menu/NavigationMenuContent.d.ts +101 -0
  319. package/dist/types/vue/src/primitives/navigation-menu/NavigationMenuContent.d.ts.map +1 -0
  320. package/dist/types/vue/src/primitives/navigation-menu/NavigationMenuParts.d.ts +165 -0
  321. package/dist/types/vue/src/primitives/navigation-menu/NavigationMenuParts.d.ts.map +1 -0
  322. package/dist/types/vue/src/primitives/navigation-menu/NavigationMenuRoot.d.ts +187 -0
  323. package/dist/types/vue/src/primitives/navigation-menu/NavigationMenuRoot.d.ts.map +1 -0
  324. package/dist/types/vue/src/primitives/navigation-menu/context.d.ts +40 -0
  325. package/dist/types/vue/src/primitives/navigation-menu/context.d.ts.map +1 -0
  326. package/dist/types/vue/src/primitives/navigation-menu/index.d.ts +5 -0
  327. package/dist/types/vue/src/primitives/navigation-menu/index.d.ts.map +1 -0
  328. package/dist/types/vue/src/primitives/number-field/NumberFieldRoot.vue.d.ts +1 -1
  329. package/dist/types/vue/src/primitives/number-field/NumberFieldRoot.vue.d.ts.map +1 -1
  330. package/dist/types/vue/src/primitives/picker/createPicker.d.ts +247 -0
  331. package/dist/types/vue/src/primitives/picker/createPicker.d.ts.map +1 -0
  332. package/dist/types/vue/src/primitives/picker/index.d.ts +414 -0
  333. package/dist/types/vue/src/primitives/picker/index.d.ts.map +1 -0
  334. package/dist/types/vue/src/primitives/popover/PopoverContent.d.ts +257 -0
  335. package/dist/types/vue/src/primitives/popover/PopoverContent.d.ts.map +1 -0
  336. package/dist/types/vue/src/primitives/popover/PopoverParts.d.ts +183 -0
  337. package/dist/types/vue/src/primitives/popover/PopoverParts.d.ts.map +1 -0
  338. package/dist/types/vue/src/primitives/popover/PopoverRoot.d.ts +50 -0
  339. package/dist/types/vue/src/primitives/popover/PopoverRoot.d.ts.map +1 -0
  340. package/dist/types/vue/src/primitives/popover/context.d.ts +13 -0
  341. package/dist/types/vue/src/primitives/popover/context.d.ts.map +1 -0
  342. package/dist/types/vue/src/primitives/popover/index.d.ts +5 -0
  343. package/dist/types/vue/src/primitives/popover/index.d.ts.map +1 -0
  344. package/dist/types/vue/src/primitives/popper/Arrow.d.ts +67 -0
  345. package/dist/types/vue/src/primitives/popper/Arrow.d.ts.map +1 -0
  346. package/dist/types/vue/src/primitives/popper/PopperAnchor.d.ts +40 -0
  347. package/dist/types/vue/src/primitives/popper/PopperAnchor.d.ts.map +1 -0
  348. package/dist/types/vue/src/primitives/popper/PopperArrow.d.ts +61 -0
  349. package/dist/types/vue/src/primitives/popper/PopperArrow.d.ts.map +1 -0
  350. package/dist/types/vue/src/primitives/popper/PopperContent.d.ts +370 -0
  351. package/dist/types/vue/src/primitives/popper/PopperContent.d.ts.map +1 -0
  352. package/dist/types/vue/src/primitives/popper/PopperRoot.d.ts +4 -0
  353. package/dist/types/vue/src/primitives/popper/PopperRoot.d.ts.map +1 -0
  354. package/dist/types/vue/src/primitives/popper/context.d.ts +17 -0
  355. package/dist/types/vue/src/primitives/popper/context.d.ts.map +1 -0
  356. package/dist/types/vue/src/primitives/popper/index.d.ts +7 -0
  357. package/dist/types/vue/src/primitives/popper/index.d.ts.map +1 -0
  358. package/dist/types/vue/src/primitives/radio-group/RadioGroupRoot.d.ts +1 -1
  359. package/dist/types/vue/src/primitives/range-calendar/RangeCalendarCellTrigger.d.ts +52 -0
  360. package/dist/types/vue/src/primitives/range-calendar/RangeCalendarCellTrigger.d.ts.map +1 -0
  361. package/dist/types/vue/src/primitives/range-calendar/RangeCalendarGrid.d.ts +252 -0
  362. package/dist/types/vue/src/primitives/range-calendar/RangeCalendarGrid.d.ts.map +1 -0
  363. package/dist/types/vue/src/primitives/range-calendar/RangeCalendarRoot.d.ts +345 -0
  364. package/dist/types/vue/src/primitives/range-calendar/RangeCalendarRoot.d.ts.map +1 -0
  365. package/dist/types/vue/src/primitives/range-calendar/context.d.ts +64 -0
  366. package/dist/types/vue/src/primitives/range-calendar/context.d.ts.map +1 -0
  367. package/dist/types/vue/src/primitives/range-calendar/index.d.ts +6 -0
  368. package/dist/types/vue/src/primitives/range-calendar/index.d.ts.map +1 -0
  369. package/dist/types/vue/src/primitives/rating/RatingRoot.d.ts +1 -1
  370. package/dist/types/vue/src/primitives/roving-focus/RovingFocusGroup.vue.d.ts +3 -3
  371. package/dist/types/vue/src/primitives/roving-focus/RovingFocusGroup.vue.d.ts.map +1 -1
  372. package/dist/types/vue/src/primitives/select/SelectContent.d.ts +265 -0
  373. package/dist/types/vue/src/primitives/select/SelectContent.d.ts.map +1 -0
  374. package/dist/types/vue/src/primitives/select/SelectItem.d.ts +107 -0
  375. package/dist/types/vue/src/primitives/select/SelectItem.d.ts.map +1 -0
  376. package/dist/types/vue/src/primitives/select/SelectRoot.d.ts +275 -0
  377. package/dist/types/vue/src/primitives/select/SelectRoot.d.ts.map +1 -0
  378. package/dist/types/vue/src/primitives/select/context.d.ts +73 -0
  379. package/dist/types/vue/src/primitives/select/context.d.ts.map +1 -0
  380. package/dist/types/vue/src/primitives/select/index.d.ts +5 -0
  381. package/dist/types/vue/src/primitives/select/index.d.ts.map +1 -0
  382. package/dist/types/vue/src/primitives/slider/SliderRoot.d.ts +1 -1
  383. package/dist/types/vue/src/primitives/stepper/StepperRoot.d.ts +1 -1
  384. package/dist/types/vue/src/primitives/{pin-input/PinInputInput.d.ts → tags-input/TagsInputInput.d.ts} +23 -14
  385. package/dist/types/vue/src/primitives/tags-input/TagsInputInput.d.ts.map +1 -0
  386. package/dist/types/vue/src/primitives/tags-input/TagsInputItem.d.ts +76 -0
  387. package/dist/types/vue/src/primitives/tags-input/TagsInputItem.d.ts.map +1 -0
  388. package/dist/types/vue/src/primitives/tags-input/TagsInputRoot.d.ts +196 -0
  389. package/dist/types/vue/src/primitives/tags-input/TagsInputRoot.d.ts.map +1 -0
  390. package/dist/types/vue/src/primitives/tags-input/context.d.ts +30 -0
  391. package/dist/types/vue/src/primitives/tags-input/context.d.ts.map +1 -0
  392. package/dist/types/vue/src/primitives/tags-input/index.d.ts +5 -0
  393. package/dist/types/vue/src/primitives/tags-input/index.d.ts.map +1 -0
  394. package/dist/types/vue/src/primitives/teleport/Teleport.d.ts +49 -0
  395. package/dist/types/vue/src/primitives/teleport/Teleport.d.ts.map +1 -0
  396. package/dist/types/vue/src/primitives/teleport/index.d.ts +2 -0
  397. package/dist/types/vue/src/primitives/teleport/index.d.ts.map +1 -0
  398. package/dist/types/vue/src/primitives/time-field/TimeFieldInput.d.ts +40 -0
  399. package/dist/types/vue/src/primitives/time-field/TimeFieldInput.d.ts.map +1 -0
  400. package/dist/types/vue/src/primitives/time-field/TimeFieldRoot.d.ts +220 -0
  401. package/dist/types/vue/src/primitives/time-field/TimeFieldRoot.d.ts.map +1 -0
  402. package/dist/types/vue/src/primitives/time-field/context.d.ts +25 -0
  403. package/dist/types/vue/src/primitives/time-field/context.d.ts.map +1 -0
  404. package/dist/types/vue/src/primitives/time-field/index.d.ts +5 -0
  405. package/dist/types/vue/src/primitives/time-field/index.d.ts.map +1 -0
  406. package/dist/types/vue/src/primitives/toast/ToastProvider.d.ts +177 -0
  407. package/dist/types/vue/src/primitives/toast/ToastProvider.d.ts.map +1 -0
  408. package/dist/types/vue/src/primitives/toast/ToastRoot.d.ts +233 -0
  409. package/dist/types/vue/src/primitives/toast/ToastRoot.d.ts.map +1 -0
  410. package/dist/types/vue/src/primitives/toast/index.d.ts +3 -0
  411. package/dist/types/vue/src/primitives/toast/index.d.ts.map +1 -0
  412. package/dist/types/vue/src/primitives/toolbar/ToolbarRoot.d.ts +1 -1
  413. package/dist/types/vue/src/primitives/tooltip/TooltipParts.d.ts +267 -0
  414. package/dist/types/vue/src/primitives/tooltip/TooltipParts.d.ts.map +1 -0
  415. package/dist/types/vue/src/primitives/tooltip/TooltipRoot.d.ts +162 -0
  416. package/dist/types/vue/src/primitives/tooltip/TooltipRoot.d.ts.map +1 -0
  417. package/dist/types/vue/src/primitives/tooltip/context.d.ts +32 -0
  418. package/dist/types/vue/src/primitives/tooltip/context.d.ts.map +1 -0
  419. package/dist/types/vue/src/primitives/tooltip/index.d.ts +4 -0
  420. package/dist/types/vue/src/primitives/tooltip/index.d.ts.map +1 -0
  421. package/dist/types/vue/src/primitives/tree/TreeItem.d.ts +40 -0
  422. package/dist/types/vue/src/primitives/tree/TreeItem.d.ts.map +1 -0
  423. package/dist/types/vue/src/primitives/tree/TreeRoot.d.ts +50 -0
  424. package/dist/types/vue/src/primitives/tree/TreeRoot.d.ts.map +1 -0
  425. package/dist/types/vue/src/primitives/tree/context.d.ts +29 -0
  426. package/dist/types/vue/src/primitives/tree/context.d.ts.map +1 -0
  427. package/dist/types/vue/src/primitives/tree/index.d.ts +5 -0
  428. package/dist/types/vue/src/primitives/tree/index.d.ts.map +1 -0
  429. package/dist/types/vue/src/primitives/utils/config.d.ts +14 -1
  430. package/dist/types/vue/src/primitives/utils/config.d.ts.map +1 -1
  431. package/dist/types/vue/src/primitives/utils/defu.d.ts +2 -0
  432. package/dist/types/vue/src/primitives/utils/defu.d.ts.map +1 -0
  433. package/dist/types/vue/src/primitives/utils/env.d.ts +2 -0
  434. package/dist/types/vue/src/primitives/utils/env.d.ts.map +1 -0
  435. package/dist/types/vue/src/primitives/utils/layers.d.ts +5 -0
  436. package/dist/types/vue/src/primitives/utils/layers.d.ts.map +1 -0
  437. package/dist/types/vue/src/primitives/utils/propsWithoutDefaults.d.ts +2 -0
  438. package/dist/types/vue/src/primitives/utils/propsWithoutDefaults.d.ts.map +1 -0
  439. package/dist/types/vue/src/primitives/utils/useBodyScrollLock.d.ts +2 -0
  440. package/dist/types/vue/src/primitives/utils/useBodyScrollLock.d.ts.map +1 -0
  441. package/dist/types/vue/src/primitives/utils/useDirection.d.ts +1 -1
  442. package/dist/types/vue/src/primitives/utils/useDirection.d.ts.map +1 -1
  443. package/dist/types/vue/src/primitives/utils/useFocusGuards.d.ts +2 -0
  444. package/dist/types/vue/src/primitives/utils/useFocusGuards.d.ts.map +1 -0
  445. package/dist/types/vue/src/primitives/utils/useGraceArea.d.ts +6 -0
  446. package/dist/types/vue/src/primitives/utils/useGraceArea.d.ts.map +1 -0
  447. package/dist/types/vue/src/primitives/utils/useHideOthers.d.ts +4 -0
  448. package/dist/types/vue/src/primitives/utils/useHideOthers.d.ts.map +1 -0
  449. package/dist/types/vue/src/primitives/utils/useIsUsingKeyboard.d.ts +4 -0
  450. package/dist/types/vue/src/primitives/utils/useIsUsingKeyboard.d.ts.map +1 -0
  451. package/dist/types/vue/src/primitives/utils/useLocale.d.ts +3 -0
  452. package/dist/types/vue/src/primitives/utils/useLocale.d.ts.map +1 -0
  453. package/dist/types/vue/src/primitives/utils/useVModel.d.ts +1 -0
  454. package/dist/types/vue/src/primitives/utils/useVModel.d.ts.map +1 -1
  455. package/dist/types/vue/src/primitives/visually-hidden/VisuallyHiddenInput.d.ts +1 -1
  456. package/dist/types/vue/src/singletons.d.ts +1 -1
  457. package/dist/types/vue/src/singletons.d.ts.map +1 -1
  458. package/package.json +5 -5
  459. package/src/components/alert-dialog/AlertDialog.vue +1 -1
  460. package/src/components/calendar/Calendar.vue +1 -1
  461. package/src/components/calendar/CalendarLevels.vue +1 -1
  462. package/src/components/combobox/Combobox.vue +6 -1
  463. package/src/components/combobox/ComboboxList.vue +1 -1
  464. package/src/components/command-palette/CommandPalette.vue +2 -2
  465. package/src/components/command-palette/CommandPaletteInput.vue +1 -1
  466. package/src/components/command-palette/CommandPaletteItem.vue +1 -1
  467. package/src/components/command-palette/CommandPalettePanel.vue +6 -1
  468. package/src/components/config-provider/ConfigProvider.vue +24 -0
  469. package/src/components/config-provider/types.ts +11 -0
  470. package/src/components/config-provider/useConfig.ts +5 -0
  471. package/src/components/context-menu/ContextMenu.vue +1 -1
  472. package/src/components/context-menu/ContextMenuCheckboxItem.vue +1 -1
  473. package/src/components/context-menu/ContextMenuGroup.vue +1 -1
  474. package/src/components/context-menu/ContextMenuItem.vue +1 -1
  475. package/src/components/context-menu/ContextMenuLabel.vue +1 -1
  476. package/src/components/context-menu/ContextMenuRadioGroup.vue +1 -1
  477. package/src/components/context-menu/ContextMenuRadioItem.vue +1 -1
  478. package/src/components/context-menu/ContextMenuSeparator.vue +1 -1
  479. package/src/components/context-menu/ContextMenuSub.vue +1 -1
  480. package/src/components/data-table/DataTableDragPreview.vue +1 -1
  481. package/src/components/date-field/DateField.vue +1 -1
  482. package/src/components/date-picker/DatePicker.vue +1 -1
  483. package/src/components/date-range-field/DateRangeField.vue +5 -1
  484. package/src/components/date-range-picker/DateRangePicker.vue +1 -1
  485. package/src/components/date-time-picker/DateTimePicker.vue +1 -1
  486. package/src/components/dialog/Dialog.vue +1 -1
  487. package/src/components/dialog/ModalContent.vue +2 -1
  488. package/src/components/drawer/Drawer.vue +1 -1
  489. package/src/components/dropdown-menu/DropdownMenu.vue +1 -1
  490. package/src/components/dropdown-menu/DropdownMenuCheckboxItem.vue +4 -1
  491. package/src/components/dropdown-menu/DropdownMenuGroup.vue +1 -1
  492. package/src/components/dropdown-menu/DropdownMenuItem.vue +1 -1
  493. package/src/components/dropdown-menu/DropdownMenuLabel.vue +1 -1
  494. package/src/components/dropdown-menu/DropdownMenuRadioGroup.vue +1 -1
  495. package/src/components/dropdown-menu/DropdownMenuRadioItem.vue +1 -1
  496. package/src/components/dropdown-menu/DropdownMenuSeparator.vue +1 -1
  497. package/src/components/dropdown-menu/DropdownMenuSub.vue +1 -1
  498. package/src/components/hover-card/HoverCard.vue +6 -1
  499. package/src/components/hover-card/composables/useHoverCardAnchor.ts +1 -1
  500. package/src/components/icon-button/IconButton.vue +1 -1
  501. package/src/components/image/composables/useImage.ts +2 -1
  502. package/src/components/lightbox/Lightbox.vue +2 -1
  503. package/src/components/lightbox/LightboxChrome.vue +1 -1
  504. package/src/components/listbox/Listbox.vue +1 -1
  505. package/src/components/listbox/ListboxOptionContent.vue +1 -1
  506. package/src/components/menubar/Menubar.vue +1 -1
  507. package/src/components/menubar/MenubarCheckboxItem.vue +1 -1
  508. package/src/components/menubar/MenubarGroup.vue +1 -1
  509. package/src/components/menubar/MenubarItem.vue +1 -1
  510. package/src/components/menubar/MenubarLabel.vue +1 -1
  511. package/src/components/menubar/MenubarMenu.vue +6 -1
  512. package/src/components/menubar/MenubarRadioGroup.vue +1 -1
  513. package/src/components/menubar/MenubarRadioItem.vue +1 -1
  514. package/src/components/menubar/MenubarSeparator.vue +1 -1
  515. package/src/components/menubar/MenubarSub.vue +6 -1
  516. package/src/components/multi-combobox/MultiCombobox.vue +6 -1
  517. package/src/components/multi-select/MultiSelect.vue +1 -1
  518. package/src/components/nav-link/NavLink.vue +21 -2
  519. package/src/components/nav-link/NavLinkChild.ts +2 -0
  520. package/src/components/navigation-menu/NavigationMenu.vue +5 -1
  521. package/src/components/navigation-menu/NavigationMenuContent.vue +2 -2
  522. package/src/components/navigation-menu/NavigationMenuItem.vue +1 -1
  523. package/src/components/navigation-menu/NavigationMenuLink.vue +1 -1
  524. package/src/components/navigation-menu/NavigationMenuTrigger.vue +1 -1
  525. package/src/components/number-input/NumberInput.vue +1 -1
  526. package/src/components/pagination/PaginationPopup.vue +1 -1
  527. package/src/components/pin-input/PinInput.vue +103 -33
  528. package/src/components/popconfirm/Popconfirm.vue +6 -1
  529. package/src/components/popover/Popover.vue +6 -1
  530. package/src/components/popover/PopoverContent.vue +2 -2
  531. package/src/components/popover/composables/usePopoverCloseFocus.ts +1 -1
  532. package/src/components/range-calendar/RangeCalendar.vue +1 -1
  533. package/src/components/select/Select.vue +2 -1
  534. package/src/components/select/SelectList.vue +1 -1
  535. package/src/components/sheet/Sheet.vue +1 -1
  536. package/src/components/slider/SliderHandle.vue +1 -1
  537. package/src/components/tags-input/TagsInput.vue +1 -1
  538. package/src/components/tags-input/TagsInputChip.vue +1 -1
  539. package/src/components/time/Time.vue +1 -1
  540. package/src/components/time-field/TimeField.vue +1 -1
  541. package/src/components/toast/Toaster.vue +1 -1
  542. package/src/components/toggle/Toggle.vue +1 -1
  543. package/src/components/toolbar/ToolbarControl.vue +1 -1
  544. package/src/components/tooltip/Tooltip.vue +1 -1
  545. package/src/components/tooltip/TooltipBubble.vue +1 -1
  546. package/src/components/tooltip/TooltipDirectiveRoot.ts +1 -1
  547. package/src/components/tooltip/TooltipProvider.vue +1 -1
  548. package/src/components/tooltip/composables/useTooltipTarget.ts +1 -1
  549. package/src/components/tour/Tour.vue +447 -0
  550. package/src/components/tour/tour.variants.ts +1 -0
  551. package/src/components/tour/types.ts +43 -0
  552. package/src/components/tree/Tree.vue +1 -1
  553. package/src/components/tree/TreeRows.vue +1 -1
  554. package/src/components/tree/VirtualTreeWindow.vue +1 -1
  555. package/src/components/tree-select/TreeSelect.vue +2 -3
  556. package/src/components/tree-select/composables/useTreeSelect.ts +2 -2
  557. package/src/index.ts +15 -0
  558. package/src/lib/anchored-overlay.ts +2 -1
  559. package/src/lib/dialog-focus.ts +1 -1
  560. package/src/lib/reka/useVirtualChoices.ts +7 -8
  561. package/src/lib/reka/useVirtualTree.ts +1 -1
  562. package/src/primitives/alert-dialog/index.ts +166 -0
  563. package/src/primitives/calendar/CalendarCellTrigger.ts +190 -0
  564. package/src/primitives/calendar/CalendarGrid.ts +101 -0
  565. package/src/primitives/calendar/CalendarNav.ts +88 -0
  566. package/src/primitives/calendar/CalendarRoot.ts +324 -0
  567. package/src/primitives/calendar/LICENSE +44 -0
  568. package/src/primitives/calendar/context.ts +55 -0
  569. package/src/primitives/calendar/index.ts +12 -0
  570. package/src/primitives/calendar/useCalendar.ts +164 -0
  571. package/src/primitives/combobox/ComboboxContent.ts +199 -0
  572. package/src/primitives/combobox/ComboboxItem.ts +209 -0
  573. package/src/primitives/combobox/ComboboxRoot.ts +489 -0
  574. package/src/primitives/combobox/LICENSE +44 -0
  575. package/src/primitives/combobox/context.ts +47 -0
  576. package/src/primitives/combobox/index.ts +23 -0
  577. package/src/primitives/context-menu/LICENSE +44 -0
  578. package/src/primitives/context-menu/index.ts +388 -0
  579. package/src/primitives/date-field/DateFieldInput.ts +29 -0
  580. package/src/primitives/date-field/DateFieldRoot.ts +343 -0
  581. package/src/primitives/date-field/LICENSE +44 -0
  582. package/src/primitives/date-field/context.ts +29 -0
  583. package/src/primitives/date-field/index.ts +3 -0
  584. package/src/primitives/date-field/segmentInput.ts +96 -0
  585. package/src/primitives/date-field/useDateFieldSegment.ts +63 -0
  586. package/src/primitives/date-range-field/DateRangeFieldInput.ts +42 -0
  587. package/src/primitives/date-range-field/DateRangeFieldRoot.ts +389 -0
  588. package/src/primitives/date-range-field/LICENSE +44 -0
  589. package/src/primitives/date-range-field/context.ts +36 -0
  590. package/src/primitives/date-range-field/index.ts +12 -0
  591. package/src/primitives/dialog/DialogContent.ts +193 -0
  592. package/src/primitives/dialog/DialogContentImpl.ts +114 -0
  593. package/src/primitives/dialog/DialogOverlay.ts +99 -0
  594. package/src/primitives/dialog/DialogPortal.ts +33 -0
  595. package/src/primitives/dialog/DialogRoot.ts +61 -0
  596. package/src/primitives/dialog/DialogText.ts +59 -0
  597. package/src/primitives/dialog/DialogTrigger.ts +46 -0
  598. package/src/primitives/dialog/LICENSE +44 -0
  599. package/src/primitives/dialog/context.ts +19 -0
  600. package/src/primitives/dialog/index.ts +7 -0
  601. package/src/primitives/dismissable-layer/DismissableLayer.ts +212 -0
  602. package/src/primitives/dismissable-layer/DismissableLayerBranch.ts +36 -0
  603. package/src/primitives/dismissable-layer/LICENSE +44 -0
  604. package/src/primitives/dismissable-layer/index.ts +11 -0
  605. package/src/primitives/dropdown-menu/LICENSE +44 -0
  606. package/src/primitives/dropdown-menu/index.ts +344 -0
  607. package/src/primitives/focus-scope/FocusScope.ts +118 -0
  608. package/src/primitives/focus-scope/LICENSE +44 -0
  609. package/src/primitives/focus-scope/index.ts +1 -0
  610. package/src/primitives/hover-card/LICENSE +44 -0
  611. package/src/primitives/hover-card/index.ts +357 -0
  612. package/src/primitives/listbox/LICENSE +44 -0
  613. package/src/primitives/listbox/ListboxContent.ts +80 -0
  614. package/src/primitives/listbox/ListboxFilter.ts +130 -0
  615. package/src/primitives/listbox/ListboxGroup.ts +67 -0
  616. package/src/primitives/listbox/ListboxItem.ts +125 -0
  617. package/src/primitives/listbox/ListboxRoot.ts +376 -0
  618. package/src/primitives/listbox/context.ts +62 -0
  619. package/src/primitives/listbox/index.ts +17 -0
  620. package/src/primitives/menu/LICENSE +44 -0
  621. package/src/primitives/menu/MenuContentImpl.ts +304 -0
  622. package/src/primitives/menu/MenuItem.ts +495 -0
  623. package/src/primitives/menu/MenuRoot.ts +295 -0
  624. package/src/primitives/menu/context.ts +72 -0
  625. package/src/primitives/menu/index.ts +26 -0
  626. package/src/primitives/menu/wrap.ts +53 -0
  627. package/src/primitives/menubar/index.ts +494 -0
  628. package/src/primitives/navigation-menu/LICENSE +44 -0
  629. package/src/primitives/navigation-menu/NavigationMenuContent.ts +375 -0
  630. package/src/primitives/navigation-menu/NavigationMenuParts.ts +432 -0
  631. package/src/primitives/navigation-menu/NavigationMenuRoot.ts +260 -0
  632. package/src/primitives/navigation-menu/context.ts +50 -0
  633. package/src/primitives/navigation-menu/index.ts +20 -0
  634. package/src/primitives/number-field/__snapshots__/NumberField.test.ts.snap +288 -0
  635. package/src/primitives/picker/LICENSE +44 -0
  636. package/src/primitives/picker/createPicker.ts +618 -0
  637. package/src/primitives/picker/index.ts +26 -0
  638. package/src/primitives/popover/LICENSE +44 -0
  639. package/src/primitives/popover/PopoverContent.ts +243 -0
  640. package/src/primitives/popover/PopoverParts.ts +143 -0
  641. package/src/primitives/popover/PopoverRoot.ts +58 -0
  642. package/src/primitives/popover/context.ts +16 -0
  643. package/src/primitives/popover/index.ts +14 -0
  644. package/src/primitives/popper/Arrow.ts +49 -0
  645. package/src/primitives/popper/LICENSE +44 -0
  646. package/src/primitives/popper/PopperAnchor.ts +33 -0
  647. package/src/primitives/popper/PopperArrow.ts +77 -0
  648. package/src/primitives/popper/PopperContent.ts +262 -0
  649. package/src/primitives/popper/PopperRoot.ts +16 -0
  650. package/src/primitives/popper/context.ts +23 -0
  651. package/src/primitives/popper/index.ts +11 -0
  652. package/src/primitives/range-calendar/LICENSE +44 -0
  653. package/src/primitives/range-calendar/RangeCalendarCellTrigger.ts +241 -0
  654. package/src/primitives/range-calendar/RangeCalendarGrid.ts +90 -0
  655. package/src/primitives/range-calendar/RangeCalendarRoot.ts +413 -0
  656. package/src/primitives/range-calendar/context.ts +71 -0
  657. package/src/primitives/range-calendar/index.ts +21 -0
  658. package/src/primitives/select/LICENSE +44 -0
  659. package/src/primitives/select/SelectContent.ts +330 -0
  660. package/src/primitives/select/SelectItem.ts +204 -0
  661. package/src/primitives/select/SelectRoot.ts +408 -0
  662. package/src/primitives/select/context.ts +74 -0
  663. package/src/primitives/select/index.ts +17 -0
  664. package/src/primitives/tags-input/LICENSE +44 -0
  665. package/src/primitives/tags-input/TagsInputInput.ts +148 -0
  666. package/src/primitives/tags-input/TagsInputItem.ts +105 -0
  667. package/src/primitives/tags-input/TagsInputRoot.ts +215 -0
  668. package/src/primitives/tags-input/context.ts +36 -0
  669. package/src/primitives/tags-input/index.ts +9 -0
  670. package/src/primitives/teleport/LICENSE +44 -0
  671. package/src/primitives/teleport/Teleport.ts +41 -0
  672. package/src/primitives/teleport/index.ts +1 -0
  673. package/src/primitives/time-field/LICENSE +44 -0
  674. package/src/primitives/time-field/TimeFieldInput.ts +29 -0
  675. package/src/primitives/time-field/TimeFieldRoot.ts +379 -0
  676. package/src/primitives/time-field/context.ts +28 -0
  677. package/src/primitives/time-field/index.ts +4 -0
  678. package/src/primitives/toast/LICENSE +44 -0
  679. package/src/primitives/toast/ToastProvider.ts +311 -0
  680. package/src/primitives/toast/ToastRoot.ts +518 -0
  681. package/src/primitives/toast/index.ts +16 -0
  682. package/src/primitives/tooltip/LICENSE +44 -0
  683. package/src/primitives/tooltip/TooltipParts.ts +351 -0
  684. package/src/primitives/tooltip/TooltipRoot.ts +170 -0
  685. package/src/primitives/tooltip/context.ts +39 -0
  686. package/src/primitives/tooltip/index.ts +9 -0
  687. package/src/primitives/tree/LICENSE +44 -0
  688. package/src/primitives/tree/TreeItem.ts +256 -0
  689. package/src/primitives/tree/TreeRoot.ts +273 -0
  690. package/src/primitives/tree/context.ts +34 -0
  691. package/src/primitives/tree/index.ts +4 -0
  692. package/src/primitives/utils/config.ts +19 -1
  693. package/src/primitives/utils/defu.ts +26 -0
  694. package/src/primitives/utils/env.ts +5 -0
  695. package/src/primitives/utils/layers.ts +4 -0
  696. package/src/primitives/utils/propsWithoutDefaults.ts +8 -0
  697. package/src/primitives/utils/useBodyScrollLock.ts +29 -0
  698. package/src/primitives/utils/useFocusGuards.ts +10 -0
  699. package/src/primitives/utils/useGraceArea.ts +85 -0
  700. package/src/primitives/utils/useHideOthers.ts +18 -0
  701. package/src/primitives/utils/useIsUsingKeyboard.ts +25 -0
  702. package/src/primitives/utils/useLocale.ts +7 -0
  703. package/src/primitives/utils/useVModel.ts +8 -3
  704. package/src/singletons.ts +1 -1
  705. package/dist/types/vue/src/primitives/pin-input/PinInputInput.d.ts.map +0 -1
  706. package/dist/types/vue/src/primitives/pin-input/PinInputRoot.d.ts.map +0 -1
  707. package/dist/types/vue/src/primitives/pin-input/context.d.ts +0 -20
  708. package/dist/types/vue/src/primitives/pin-input/context.d.ts.map +0 -1
  709. package/dist/types/vue/src/primitives/pin-input/index.d.ts +0 -4
  710. package/dist/types/vue/src/primitives/pin-input/index.d.ts.map +0 -1
  711. package/src/primitives/pin-input/PinInputInput.ts +0 -218
  712. package/src/primitives/pin-input/PinInputRoot.ts +0 -136
  713. package/src/primitives/pin-input/context.ts +0 -24
  714. package/src/primitives/pin-input/index.ts +0 -3
  715. /package/dist/shared/primitives/{pin-input → date}/LICENSE +0 -0
  716. /package/src/primitives/{pin-input → alert-dialog}/LICENSE +0 -0
@@ -0,0 +1,118 @@
1
+ import {
2
+ defineComponent,
3
+ h,
4
+ nextTick,
5
+ reactive,
6
+ renderSlot,
7
+ watch,
8
+ watchEffect,
9
+ withCtx,
10
+ type PropType,
11
+ } from 'vue'
12
+ import { isClient } from '@vueuse/core'
13
+ import {
14
+ dispatchMountAutoFocus,
15
+ dispatchUnmountAutoFocus,
16
+ focusScopesStack,
17
+ getActiveElement,
18
+ handleFocusScopeKeyDown,
19
+ trapFocus,
20
+ type FocusScopeAPI,
21
+ } from '../../../../shared/src/primitives/focus-scope'
22
+ import { Primitive, type PrimitiveProps } from '../primitive'
23
+ import { useForwardExpose } from '../utils/useForwardExpose'
24
+
25
+ export interface FocusScopeProps {
26
+ loop?: boolean
27
+ trapped?: boolean
28
+ asChild?: boolean
29
+ as?: PrimitiveProps['as']
30
+ }
31
+
32
+ export type FocusScopeEmits = {
33
+ mountAutoFocus: [event: Event]
34
+ unmountAutoFocus: [event: Event]
35
+ }
36
+
37
+ export const FocusScope = defineComponent({
38
+ name: 'FocusScope',
39
+ props: {
40
+ loop: { type: Boolean, required: false, default: false },
41
+ trapped: { type: Boolean, required: false, default: false },
42
+ present: { type: Boolean, required: false, default: true },
43
+ asChild: { type: Boolean, required: false },
44
+ as: { type: null as unknown as PropType<PrimitiveProps['as']>, required: false },
45
+ },
46
+ emits: ['mountAutoFocus', 'unmountAutoFocus'],
47
+ setup(props, { emit, slots }) {
48
+ const { currentRef, currentElement } = useForwardExpose()
49
+ const focusScope = reactive<FocusScopeAPI>({
50
+ paused: false,
51
+ pause() {
52
+ this.paused = true
53
+ },
54
+ resume() {
55
+ this.paused = false
56
+ },
57
+ })
58
+
59
+ const onMount = (event: Event) => emit('mountAutoFocus', event)
60
+ const onUnmount = (event: Event) => emit('unmountAutoFocus', event)
61
+
62
+ watchEffect(onCleanup => {
63
+ if (!isClient) return
64
+ const container = currentElement.value
65
+ if (!props.trapped || !container) return
66
+ onCleanup(trapFocus(container, focusScope))
67
+ })
68
+
69
+ watchEffect(async onCleanup => {
70
+ const container = currentElement.value
71
+ await nextTick()
72
+ if (!container) return
73
+ if (props.present !== false) focusScopesStack.add(focusScope)
74
+ const previous = getActiveElement()
75
+ if (!container.contains(previous) && props.present !== false)
76
+ dispatchMountAutoFocus(container, previous, onMount)
77
+ onCleanup(() => dispatchUnmountAutoFocus(container, previous, focusScope, onUnmount))
78
+ })
79
+
80
+ watch(
81
+ () => props.present,
82
+ async (present, prevPresent) => {
83
+ if (!isClient) return
84
+ if (present === false && prevPresent === true) {
85
+ focusScopesStack.remove(focusScope)
86
+ return
87
+ }
88
+ if (present !== true || prevPresent !== false) return
89
+ focusScopesStack.add(focusScope)
90
+ await nextTick()
91
+ const container = currentElement.value
92
+ if (!container) return
93
+ const previous = getActiveElement()
94
+ if (!container.contains(previous)) dispatchMountAutoFocus(container, previous, onMount)
95
+ },
96
+ )
97
+
98
+ const onKeydown = (event: KeyboardEvent) =>
99
+ handleFocusScopeKeyDown(event, {
100
+ loop: props.loop,
101
+ trapped: props.trapped,
102
+ scope: focusScope,
103
+ })
104
+
105
+ return () =>
106
+ h(
107
+ Primitive,
108
+ {
109
+ ref: currentRef,
110
+ tabindex: '-1',
111
+ 'as-child': props.asChild,
112
+ as: props.as,
113
+ onKeydown,
114
+ },
115
+ { default: withCtx(() => [renderSlot(slots, 'default')]) },
116
+ )
117
+ },
118
+ })
@@ -0,0 +1,44 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 UnoVue <https://github.com/unovue>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ Portions adapted from VueUse:
24
+ MIT License
25
+
26
+ Copyright (c) 2019-PRESENT Anthony Fu<https://github.com/antfu>
27
+
28
+ Permission is hereby granted, free of charge, to any person obtaining a copy
29
+ of this software and associated documentation files (the "Software"), to deal
30
+ in the Software without restriction, including without limitation the rights
31
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32
+ copies of the Software, and to permit persons to whom the Software is
33
+ furnished to do so, subject to the following conditions:
34
+
35
+ The above copyright notice and this permission notice shall be included in all
36
+ copies or substantial portions of the Software.
37
+
38
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
39
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
40
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
41
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
42
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
43
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
44
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ export { FocusScope, type FocusScopeEmits, type FocusScopeProps } from './FocusScope'
@@ -0,0 +1,44 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 UnoVue <https://github.com/unovue>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ Portions adapted from VueUse:
24
+ MIT License
25
+
26
+ Copyright (c) 2019-PRESENT Anthony Fu<https://github.com/antfu>
27
+
28
+ Permission is hereby granted, free of charge, to any person obtaining a copy
29
+ of this software and associated documentation files (the "Software"), to deal
30
+ in the Software without restriction, including without limitation the rights
31
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32
+ copies of the Software, and to permit persons to whom the Software is
33
+ furnished to do so, subject to the following conditions:
34
+
35
+ The above copyright notice and this permission notice shall be included in all
36
+ copies or substantial portions of the Software.
37
+
38
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
39
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
40
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
41
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
42
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
43
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
44
+ SOFTWARE.
@@ -0,0 +1,357 @@
1
+ import {
2
+ defineComponent,
3
+ guardReactiveProps,
4
+ h,
5
+ mergeProps,
6
+ nextTick,
7
+ normalizeProps,
8
+ onMounted,
9
+ onUnmounted,
10
+ ref,
11
+ renderSlot,
12
+ toRefs,
13
+ watchEffect,
14
+ withCtx,
15
+ withModifiers,
16
+ type Component,
17
+ type PropType,
18
+ type Ref,
19
+ } from 'vue'
20
+ import { syncRef, useEventListener } from '@vueuse/core'
21
+ import { PopperAnchor, PopperArrow, PopperContent, PopperRoot, popperContentProps } from '../popper'
22
+ import { Presence } from '../presence'
23
+ import { Primitive, type PrimitiveProps } from '../primitive'
24
+ import { Teleport } from '../teleport'
25
+ import { createContext } from '../utils/createContext'
26
+ import { DismissableLayer } from '../utils/layers'
27
+ import { propsWithoutDefaults } from '../utils/propsWithoutDefaults'
28
+ import { useForwardExpose } from '../utils/useForwardExpose'
29
+ import { useForwardProps } from '../utils/useForwardProps'
30
+ import { useForwardPropsEmits } from '../utils/useForwardPropsEmits'
31
+ import { useGraceArea } from '../utils/useGraceArea'
32
+ import { useVModel } from '../utils/useVModel'
33
+
34
+ export interface HoverCardRootContext {
35
+ open: Ref<boolean>
36
+ onOpenChange: (open: boolean) => void
37
+ onOpen: () => void
38
+ onClose: () => void
39
+ onDismiss: () => void
40
+ hasSelectionRef: Ref<boolean>
41
+ isPointerDownOnContentRef: Ref<boolean>
42
+ isPointerInTransitRef: Ref<boolean>
43
+ triggerElement: Ref<HTMLElement | undefined>
44
+ enableTouch: Ref<boolean>
45
+ }
46
+
47
+ export const [injectHoverCardRootContext, provideHoverCardRootContext] =
48
+ createContext<HoverCardRootContext>('HoverCardRoot')
49
+
50
+ function excludeTouch(eventHandler: () => void) {
51
+ return (event: PointerEvent) => (event.pointerType === 'touch' ? undefined : eventHandler())
52
+ }
53
+
54
+ function getTabbableNodes(container: HTMLElement) {
55
+ const nodes: HTMLElement[] = []
56
+ const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
57
+ acceptNode: (node: Node) =>
58
+ (node as HTMLElement).tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP,
59
+ })
60
+ while (walker.nextNode()) nodes.push(walker.currentNode as HTMLElement)
61
+ return nodes
62
+ }
63
+
64
+ const primitive = (as?: string) =>
65
+ ({
66
+ asChild: { type: Boolean, required: false },
67
+ as: {
68
+ type: null as unknown as PropType<PrimitiveProps['as']>,
69
+ required: false,
70
+ ...(as ? { default: as } : {}),
71
+ },
72
+ }) as const
73
+
74
+ const contentEmits = ['escapeKeyDown', 'pointerDownOutside', 'focusOutside', 'interactOutside']
75
+ const contentProps = propsWithoutDefaults(popperContentProps)
76
+
77
+ export const HoverCardRoot = defineComponent({
78
+ name: 'HoverCardRoot',
79
+ props: {
80
+ defaultOpen: { type: Boolean, required: false, default: false },
81
+ open: { type: Boolean, required: false, default: undefined },
82
+ openDelay: { type: Number, required: false, default: 700 },
83
+ closeDelay: { type: Number, required: false, default: 300 },
84
+ enableTouch: { type: Boolean, required: false, default: false },
85
+ },
86
+ emits: ['update:open'],
87
+ setup(props, { emit, slots }) {
88
+ const { openDelay, closeDelay, enableTouch } = toRefs(props)
89
+ useForwardExpose()
90
+ const open = useVModel(props, 'open', emit, {
91
+ defaultValue: props.defaultOpen,
92
+ passive: props.open === undefined,
93
+ }) as Ref<boolean>
94
+ const openTimer = ref(0)
95
+ const closeTimer = ref(0)
96
+ const hasSelectionRef = ref(false)
97
+ const isPointerDownOnContentRef = ref(false)
98
+ const isPointerInTransitRef = ref(false)
99
+ const triggerElement = ref<HTMLElement>()
100
+
101
+ function handleOpen() {
102
+ clearTimeout(closeTimer.value)
103
+ openTimer.value = window.setTimeout(() => (open.value = true), openDelay.value)
104
+ }
105
+ function handleClose() {
106
+ clearTimeout(openTimer.value)
107
+ if (!hasSelectionRef.value && !isPointerDownOnContentRef.value)
108
+ closeTimer.value = window.setTimeout(() => (open.value = false), closeDelay.value)
109
+ }
110
+ function handleDismiss() {
111
+ clearTimeout(openTimer.value)
112
+ open.value = false
113
+ }
114
+
115
+ provideHoverCardRootContext({
116
+ open,
117
+ onOpenChange(value) {
118
+ open.value = value
119
+ },
120
+ onOpen: handleOpen,
121
+ onClose: handleClose,
122
+ onDismiss: handleDismiss,
123
+ hasSelectionRef,
124
+ isPointerDownOnContentRef,
125
+ isPointerInTransitRef,
126
+ triggerElement,
127
+ enableTouch,
128
+ })
129
+
130
+ return () =>
131
+ h(PopperRoot, null, {
132
+ default: withCtx(() => [renderSlot(slots, 'default', { open: open.value })]),
133
+ })
134
+ },
135
+ })
136
+
137
+ export const HoverCardTrigger = defineComponent({
138
+ name: 'HoverCardTrigger',
139
+ props: { reference: { type: null, required: false }, ...primitive('a') },
140
+ setup(props, { slots }) {
141
+ const { forwardRef, currentElement } = useForwardExpose()
142
+ const rootContext = injectHoverCardRootContext()
143
+ rootContext.triggerElement = currentElement as Ref<HTMLElement | undefined>
144
+
145
+ function handleLeave() {
146
+ setTimeout(() => {
147
+ if (!rootContext.isPointerInTransitRef.value && !rootContext.open.value)
148
+ rootContext.onClose()
149
+ }, 0)
150
+ }
151
+ function handleTouch(event: PointerEvent) {
152
+ if (!rootContext.enableTouch.value || event.pointerType !== 'touch') return
153
+ if (rootContext.open.value) rootContext.onDismiss()
154
+ else rootContext.onOpenChange(true)
155
+ }
156
+
157
+ return () =>
158
+ h(
159
+ PopperAnchor as Component,
160
+ { 'as-child': '', reference: props.reference },
161
+ {
162
+ default: withCtx(() => [
163
+ h(
164
+ Primitive,
165
+ {
166
+ ref: forwardRef,
167
+ 'as-child': props.asChild,
168
+ as: props.as,
169
+ 'data-state': rootContext.open.value ? 'open' : 'closed',
170
+ 'data-grace-area-trigger': '',
171
+ onPointerenter: (event: PointerEvent) => excludeTouch(rootContext.onOpen)(event),
172
+ onPointerleave: (event: PointerEvent) => excludeTouch(handleLeave)(event),
173
+ onPointerup: handleTouch,
174
+ onFocus: () => rootContext.onOpen(),
175
+ onBlur: () => rootContext.onClose(),
176
+ },
177
+ { default: withCtx(() => [renderSlot(slots, 'default')]) },
178
+ ),
179
+ ]),
180
+ },
181
+ )
182
+ },
183
+ })
184
+
185
+ const HoverCardContentImpl = defineComponent({
186
+ name: 'HoverCardContentImpl',
187
+ props: contentProps,
188
+ emits: contentEmits,
189
+ setup(props, { emit, slots, attrs }) {
190
+ const forwarded = useForwardProps(props)
191
+ const { forwardRef, currentElement: contentElement } = useForwardExpose()
192
+ const rootContext = injectHoverCardRootContext()
193
+ const { isPointerInTransit, onPointerExit } = useGraceArea(
194
+ rootContext.triggerElement,
195
+ contentElement as Ref<HTMLElement | undefined>,
196
+ )
197
+ syncRef(rootContext.isPointerInTransitRef, isPointerInTransit, { direction: 'rtl' })
198
+ onPointerExit(() => rootContext.onClose())
199
+
200
+ const containSelection = ref(false)
201
+ let originalBodyUserSelect: string
202
+ watchEffect(onCleanup => {
203
+ if (!containSelection.value) return
204
+ const body = document.body
205
+ originalBodyUserSelect = body.style.userSelect || body.style.webkitUserSelect
206
+ body.style.userSelect = 'none'
207
+ body.style.webkitUserSelect = 'none'
208
+ onCleanup(() => {
209
+ body.style.userSelect = originalBodyUserSelect
210
+ body.style.webkitUserSelect = originalBodyUserSelect
211
+ })
212
+ })
213
+
214
+ function handlePointerUp() {
215
+ containSelection.value = false
216
+ rootContext.isPointerDownOnContentRef.value = false
217
+ void nextTick(() => {
218
+ if (document.getSelection()?.toString() !== '') rootContext.hasSelectionRef.value = true
219
+ })
220
+ }
221
+
222
+ onMounted(() => {
223
+ if (contentElement.value) {
224
+ document.addEventListener('pointerup', handlePointerUp)
225
+ for (const tabbable of getTabbableNodes(contentElement.value))
226
+ tabbable.setAttribute('tabindex', '-1')
227
+ }
228
+ useEventListener(
229
+ window,
230
+ 'scroll',
231
+ (event: Event) => {
232
+ const target = event.target as HTMLElement
233
+ if (target?.contains(rootContext.triggerElement.value!)) rootContext.onDismiss()
234
+ },
235
+ { capture: true },
236
+ )
237
+ })
238
+
239
+ onUnmounted(() => {
240
+ document.removeEventListener('pointerup', handlePointerUp)
241
+ rootContext.hasSelectionRef.value = false
242
+ rootContext.isPointerDownOnContentRef.value = false
243
+ })
244
+
245
+ const onPointerdown = (event: PointerEvent) => {
246
+ if ((event.currentTarget as HTMLElement).contains(event.target as HTMLElement))
247
+ containSelection.value = true
248
+ rootContext.hasSelectionRef.value = false
249
+ rootContext.isPointerDownOnContentRef.value = true
250
+ }
251
+
252
+ return () =>
253
+ h(
254
+ DismissableLayer as Component,
255
+ {
256
+ 'as-child': '',
257
+ 'disable-outside-pointer-events': false,
258
+ onEscapeKeyDown: (event: Event) => emit('escapeKeyDown', event),
259
+ onPointerDownOutside: (event: Event) => emit('pointerDownOutside', event),
260
+ onFocusOutside: withModifiers(
261
+ ((event: Event) => emit('focusOutside', event)) as (event: Event) => void,
262
+ ['prevent'],
263
+ ),
264
+ onDismiss: rootContext.onDismiss,
265
+ },
266
+ {
267
+ default: withCtx(() => [
268
+ h(
269
+ PopperContent as Component,
270
+ mergeProps(
271
+ { ...forwarded.value, ...attrs },
272
+ {
273
+ ref: forwardRef,
274
+ 'data-state': rootContext.open.value ? 'open' : 'closed',
275
+ style: {
276
+ userSelect: containSelection.value ? 'text' : undefined,
277
+ WebkitUserSelect: containSelection.value ? 'text' : undefined,
278
+ '--reka-hover-card-content-transform-origin':
279
+ 'var(--reka-popper-transform-origin)',
280
+ '--reka-hover-card-content-available-width':
281
+ 'var(--reka-popper-available-width)',
282
+ '--reka-hover-card-content-available-height':
283
+ 'var(--reka-popper-available-height)',
284
+ '--reka-hover-card-trigger-width': 'var(--reka-popper-anchor-width)',
285
+ '--reka-hover-card-trigger-height': 'var(--reka-popper-anchor-height)',
286
+ },
287
+ onPointerdown,
288
+ },
289
+ ),
290
+ { default: withCtx(() => [renderSlot(slots, 'default')]) },
291
+ ),
292
+ ]),
293
+ },
294
+ )
295
+ },
296
+ })
297
+
298
+ export const HoverCardContent = defineComponent({
299
+ name: 'HoverCardContent',
300
+ props: { forceMount: { type: Boolean, required: false }, ...contentProps },
301
+ emits: contentEmits,
302
+ setup(props, { emit, slots }) {
303
+ const forwarded = useForwardPropsEmits(props, emit as (name: string) => void)
304
+ const { forwardRef } = useForwardExpose()
305
+ const rootContext = injectHoverCardRootContext()
306
+ return () =>
307
+ h(
308
+ Presence,
309
+ { present: props.forceMount || rootContext.open.value },
310
+ {
311
+ default: withCtx(() => [
312
+ h(
313
+ HoverCardContentImpl as Component,
314
+ mergeProps(forwarded.value, {
315
+ ref: forwardRef,
316
+ onPointerenter: (event: PointerEvent) => excludeTouch(rootContext.onOpen)(event),
317
+ }),
318
+ { default: withCtx(() => [renderSlot(slots, 'default')]) },
319
+ ),
320
+ ]),
321
+ },
322
+ )
323
+ },
324
+ })
325
+
326
+ export const HoverCardArrow = defineComponent({
327
+ name: 'HoverCardArrow',
328
+ props: {
329
+ width: { type: Number, required: false, default: 10 },
330
+ height: { type: Number, required: false, default: 5 },
331
+ rounded: { type: Boolean, required: false },
332
+ ...primitive('svg'),
333
+ },
334
+ setup(props, { slots }) {
335
+ useForwardExpose()
336
+ return () =>
337
+ h(PopperArrow as Component, normalizeProps(guardReactiveProps(props)), {
338
+ default: withCtx(() => [renderSlot(slots, 'default')]),
339
+ })
340
+ },
341
+ })
342
+
343
+ export const HoverCardPortal = defineComponent({
344
+ name: 'HoverCardPortal',
345
+ props: {
346
+ to: { type: null, required: false },
347
+ disabled: { type: Boolean, required: false },
348
+ defer: { type: Boolean, required: false },
349
+ forceMount: { type: Boolean, required: false },
350
+ },
351
+ setup(props, { slots }) {
352
+ return () =>
353
+ h(Teleport as Component, normalizeProps(guardReactiveProps(props)), {
354
+ default: withCtx(() => [renderSlot(slots, 'default')]),
355
+ })
356
+ },
357
+ })
@@ -0,0 +1,44 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 UnoVue <https://github.com/unovue>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ Portions adapted from VueUse:
24
+ MIT License
25
+
26
+ Copyright (c) 2019-PRESENT Anthony Fu<https://github.com/antfu>
27
+
28
+ Permission is hereby granted, free of charge, to any person obtaining a copy
29
+ of this software and associated documentation files (the "Software"), to deal
30
+ in the Software without restriction, including without limitation the rights
31
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
32
+ copies of the Software, and to permit persons to whom the Software is
33
+ furnished to do so, subject to the following conditions:
34
+
35
+ The above copyright notice and this permission notice shall be included in all
36
+ copies or substantial portions of the Software.
37
+
38
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
39
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
40
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
41
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
42
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
43
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
44
+ SOFTWARE.
@@ -0,0 +1,80 @@
1
+ import {
2
+ defineComponent,
3
+ h,
4
+ renderSlot,
5
+ withCtx,
6
+ withKeys,
7
+ withModifiers,
8
+ type PropType,
9
+ } from 'vue'
10
+ import { refAutoReset } from '@vueuse/core'
11
+ import {
12
+ ignoresListboxArrow,
13
+ listboxContentTabIndex,
14
+ } from '../../../../shared/src/primitives/listbox'
15
+ import { useCollection } from '../collection'
16
+ import { Primitive, type PrimitiveProps } from '../primitive'
17
+ import { injectListboxRootContext } from './context'
18
+
19
+ export interface ListboxContentProps {
20
+ asChild?: boolean
21
+ as?: PrimitiveProps['as']
22
+ }
23
+
24
+ export const ListboxContent = defineComponent({
25
+ name: 'ListboxContent',
26
+ props: {
27
+ asChild: { type: Boolean, required: false },
28
+ as: { type: null as unknown as PropType<PrimitiveProps['as']>, required: false },
29
+ },
30
+ setup(props, { slots }) {
31
+ const { CollectionSlot } = useCollection()
32
+ const rootContext = injectListboxRootContext()
33
+ const isClickFocus = refAutoReset(false, 10)
34
+
35
+ const onMousedown = withModifiers(() => {
36
+ isClickFocus.value = true
37
+ }, ['left'])
38
+ const onFocus = (event: FocusEvent) => {
39
+ if (isClickFocus.value) return
40
+ rootContext.onEnter(event)
41
+ }
42
+ const onNavigate = withKeys(
43
+ (event: KeyboardEvent) => {
44
+ if (ignoresListboxArrow(event.key, rootContext.orientation.value)) return
45
+ event.preventDefault()
46
+ if (rootContext.focusable.value) rootContext.onKeydownNavigation(event)
47
+ },
48
+ ['down', 'up', 'left', 'right', 'home', 'end'],
49
+ )
50
+
51
+ return () =>
52
+ h(CollectionSlot, null, {
53
+ default: withCtx(() => [
54
+ h(
55
+ Primitive,
56
+ {
57
+ role: 'listbox',
58
+ as: props.as,
59
+ 'as-child': props.asChild,
60
+ tabindex: listboxContentTabIndex(
61
+ rootContext.focusable.value,
62
+ !!rootContext.highlightedElement.value,
63
+ ),
64
+ 'aria-orientation': rootContext.orientation.value,
65
+ 'aria-multiselectable': !!rootContext.multiple.value,
66
+ 'data-orientation': rootContext.orientation.value,
67
+ onMousedown,
68
+ onFocus,
69
+ onKeydown: [
70
+ onNavigate,
71
+ withKeys(rootContext.onKeydownEnter, ['enter']),
72
+ rootContext.onKeydownTypeAhead,
73
+ ],
74
+ },
75
+ { default: withCtx(() => [renderSlot(slots, 'default')]) },
76
+ ),
77
+ ]),
78
+ })
79
+ },
80
+ })