@hina-ui/vue 1.7.12 → 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 (687) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +23318 -7947
  3. package/dist/index.js.map +1 -1
  4. package/dist/shared/lib/tour.ts +261 -0
  5. package/dist/shared/locale/en-US.ts +8 -0
  6. package/dist/shared/locale/index.ts +1 -0
  7. package/dist/shared/locale/ja-JP.ts +9 -0
  8. package/dist/shared/locale/types.ts +8 -0
  9. package/dist/shared/locale/zh-CN.ts +8 -0
  10. package/dist/shared/primitives/combobox/LICENSE +44 -0
  11. package/dist/shared/primitives/combobox/index.ts +49 -0
  12. package/dist/shared/primitives/date/LICENSE +21 -0
  13. package/dist/shared/primitives/date/calendar-view.ts +264 -0
  14. package/dist/shared/primitives/date/calendar.ts +126 -0
  15. package/dist/shared/primitives/date/comparators.ts +144 -0
  16. package/dist/shared/primitives/date/field.ts +551 -0
  17. package/dist/shared/primitives/date/formatter.ts +110 -0
  18. package/dist/shared/primitives/date/parser.ts +182 -0
  19. package/dist/shared/primitives/date/parts.ts +16 -0
  20. package/dist/shared/primitives/date/picker-view.ts +186 -0
  21. package/dist/shared/primitives/date/placeholders.ts +485 -0
  22. package/dist/shared/primitives/date/range-calendar-view.ts +181 -0
  23. package/dist/shared/primitives/date/segment.ts +44 -0
  24. package/dist/shared/primitives/date/utils.ts +169 -0
  25. package/dist/shared/primitives/dialog/LICENSE +21 -0
  26. package/dist/shared/primitives/dialog/index.ts +73 -0
  27. package/dist/shared/primitives/grace-area/LICENSE +21 -0
  28. package/dist/shared/primitives/grace-area/index.ts +112 -0
  29. package/dist/shared/primitives/listbox/LICENSE +21 -0
  30. package/dist/shared/primitives/listbox/index.ts +213 -0
  31. package/dist/shared/primitives/menu/LICENSE +21 -0
  32. package/dist/shared/primitives/menu/index.ts +66 -0
  33. package/dist/shared/primitives/navigation-menu/LICENSE +44 -0
  34. package/dist/shared/primitives/navigation-menu/index.ts +125 -0
  35. package/dist/shared/primitives/popper/LICENSE +21 -0
  36. package/dist/shared/primitives/popper/index.ts +246 -0
  37. package/dist/shared/primitives/select/index.ts +98 -0
  38. package/dist/shared/primitives/tags-input/LICENSE +21 -0
  39. package/dist/shared/primitives/tags-input/index.ts +113 -0
  40. package/dist/shared/primitives/toast/LICENSE +44 -0
  41. package/dist/shared/primitives/toast/index.ts +106 -0
  42. package/dist/shared/primitives/tree/LICENSE +21 -0
  43. package/dist/shared/primitives/tree/index.ts +248 -0
  44. package/dist/shared/styles/tokens.css +1 -0
  45. package/dist/shared/styles/tour.css +29 -0
  46. package/dist/shared/variants/nav-link.ts +6 -2
  47. package/dist/shared/variants/tour.ts +29 -0
  48. package/dist/types/shared/src/lib/tour.d.ts +81 -0
  49. package/dist/types/shared/src/lib/tour.d.ts.map +1 -0
  50. package/dist/types/shared/src/lib/virtual/filter.d.ts +6 -0
  51. package/dist/types/shared/src/lib/virtual/filter.d.ts.map +1 -0
  52. package/dist/types/shared/src/locale/en-US.d.ts.map +1 -1
  53. package/dist/types/shared/src/locale/index.d.ts.map +1 -1
  54. package/dist/types/shared/src/locale/ja-JP.d.ts.map +1 -1
  55. package/dist/types/shared/src/locale/types.d.ts +8 -0
  56. package/dist/types/shared/src/locale/types.d.ts.map +1 -1
  57. package/dist/types/shared/src/locale/zh-CN.d.ts.map +1 -1
  58. package/dist/types/shared/src/primitives/body-scroll-lock/index.d.ts +10 -0
  59. package/dist/types/shared/src/primitives/body-scroll-lock/index.d.ts.map +1 -0
  60. package/dist/types/shared/src/primitives/collapsible/index.d.ts +1 -1
  61. package/dist/types/shared/src/primitives/combobox/index.d.ts +9 -0
  62. package/dist/types/shared/src/primitives/combobox/index.d.ts.map +1 -0
  63. package/dist/types/shared/src/primitives/date/calendar-view.d.ts +53 -0
  64. package/dist/types/shared/src/primitives/date/calendar-view.d.ts.map +1 -0
  65. package/dist/types/shared/src/primitives/date/calendar.d.ts +39 -0
  66. package/dist/types/shared/src/primitives/date/calendar.d.ts.map +1 -0
  67. package/dist/types/shared/src/primitives/date/comparators.d.ts +31 -0
  68. package/dist/types/shared/src/primitives/date/comparators.d.ts.map +1 -0
  69. package/dist/types/shared/src/primitives/date/field.d.ts +46 -0
  70. package/dist/types/shared/src/primitives/date/field.d.ts.map +1 -0
  71. package/dist/types/shared/src/primitives/date/formatter.d.ts +20 -0
  72. package/dist/types/shared/src/primitives/date/formatter.d.ts.map +1 -0
  73. package/dist/types/shared/src/primitives/date/parser.d.ts +49 -0
  74. package/dist/types/shared/src/primitives/date/parser.d.ts.map +1 -0
  75. package/dist/types/shared/src/primitives/date/parts.d.ts +10 -0
  76. package/dist/types/shared/src/primitives/date/parts.d.ts.map +1 -0
  77. package/dist/types/shared/src/primitives/date/picker-view.d.ts +34 -0
  78. package/dist/types/shared/src/primitives/date/picker-view.d.ts.map +1 -0
  79. package/dist/types/shared/src/primitives/date/placeholders.d.ts +2 -0
  80. package/dist/types/shared/src/primitives/date/placeholders.d.ts.map +1 -0
  81. package/dist/types/shared/src/primitives/date/range-calendar-view.d.ts +67 -0
  82. package/dist/types/shared/src/primitives/date/range-calendar-view.d.ts.map +1 -0
  83. package/dist/types/shared/src/primitives/date/segment.d.ts +6 -0
  84. package/dist/types/shared/src/primitives/date/segment.d.ts.map +1 -0
  85. package/dist/types/shared/src/primitives/date/utils.d.ts +37 -0
  86. package/dist/types/shared/src/primitives/date/utils.d.ts.map +1 -0
  87. package/dist/types/shared/src/primitives/dialog/index.d.ts +32 -0
  88. package/dist/types/shared/src/primitives/dialog/index.d.ts.map +1 -0
  89. package/dist/types/shared/src/primitives/focus-guards/index.d.ts +2 -0
  90. package/dist/types/shared/src/primitives/focus-guards/index.d.ts.map +1 -0
  91. package/dist/types/shared/src/primitives/grace-area/index.d.ts +13 -0
  92. package/dist/types/shared/src/primitives/grace-area/index.d.ts.map +1 -0
  93. package/dist/types/shared/src/primitives/listbox/index.d.ts +55 -0
  94. package/dist/types/shared/src/primitives/listbox/index.d.ts.map +1 -0
  95. package/dist/types/shared/src/primitives/menu/index.d.ts +35 -0
  96. package/dist/types/shared/src/primitives/menu/index.d.ts.map +1 -0
  97. package/dist/types/shared/src/primitives/navigation-menu/index.d.ts +23 -0
  98. package/dist/types/shared/src/primitives/navigation-menu/index.d.ts.map +1 -0
  99. package/dist/types/shared/src/primitives/popper/index.d.ts +83 -0
  100. package/dist/types/shared/src/primitives/popper/index.d.ts.map +1 -0
  101. package/dist/types/shared/src/primitives/select/index.d.ts +24 -0
  102. package/dist/types/shared/src/primitives/select/index.d.ts.map +1 -0
  103. package/dist/types/shared/src/primitives/tags-input/index.d.ts +36 -0
  104. package/dist/types/shared/src/primitives/tags-input/index.d.ts.map +1 -0
  105. package/dist/types/shared/src/primitives/toast/index.d.ts +42 -0
  106. package/dist/types/shared/src/primitives/toast/index.d.ts.map +1 -0
  107. package/dist/types/shared/src/primitives/tree/index.d.ts +72 -0
  108. package/dist/types/shared/src/primitives/tree/index.d.ts.map +1 -0
  109. package/dist/types/shared/src/variants/nav-link.d.ts +2 -1
  110. package/dist/types/shared/src/variants/nav-link.d.ts.map +1 -1
  111. package/dist/types/shared/src/variants/tour.d.ts +10 -0
  112. package/dist/types/shared/src/variants/tour.d.ts.map +1 -0
  113. package/dist/types/vue/src/components/app-shell/AppShell.vue.d.ts +6 -6
  114. package/dist/types/vue/src/components/button/Button.vue.d.ts +1 -1
  115. package/dist/types/vue/src/components/button/Button.vue.d.ts.map +1 -1
  116. package/dist/types/vue/src/components/calendar/Calendar.vue.d.ts +1 -1
  117. package/dist/types/vue/src/components/calendar/Calendar.vue.d.ts.map +1 -1
  118. package/dist/types/vue/src/components/carousel/composables/useCarousel.d.ts +1 -1
  119. package/dist/types/vue/src/components/combobox/Combobox.vue.d.ts.map +1 -1
  120. package/dist/types/vue/src/components/command-palette/CommandPalettePanel.vue.d.ts.map +1 -1
  121. package/dist/types/vue/src/components/config-provider/ConfigProvider.vue.d.ts +20 -0
  122. package/dist/types/vue/src/components/config-provider/ConfigProvider.vue.d.ts.map +1 -0
  123. package/dist/types/vue/src/components/config-provider/types.d.ts +10 -0
  124. package/dist/types/vue/src/components/config-provider/types.d.ts.map +1 -0
  125. package/dist/types/vue/src/components/config-provider/useConfig.d.ts +2 -0
  126. package/dist/types/vue/src/components/config-provider/useConfig.d.ts.map +1 -0
  127. package/dist/types/vue/src/components/date-range-field/DateRangeField.vue.d.ts.map +1 -1
  128. package/dist/types/vue/src/components/date-time-picker/DateTimePicker.vue.d.ts +1 -1
  129. package/dist/types/vue/src/components/date-time-picker/DateTimePicker.vue.d.ts.map +1 -1
  130. package/dist/types/vue/src/components/dialog/ModalContent.vue.d.ts.map +1 -1
  131. package/dist/types/vue/src/components/dropdown-menu/DropdownMenu.vue.d.ts +20 -8
  132. package/dist/types/vue/src/components/dropdown-menu/DropdownMenu.vue.d.ts.map +1 -1
  133. package/dist/types/vue/src/components/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts.map +1 -1
  134. package/dist/types/vue/src/components/float-button/FloatButton.vue.d.ts +2 -2
  135. package/dist/types/vue/src/components/hover-card/HoverCard.vue.d.ts +1 -1
  136. package/dist/types/vue/src/components/hover-card/HoverCard.vue.d.ts.map +1 -1
  137. package/dist/types/vue/src/components/icon-button/IconButton.vue.d.ts +2 -2
  138. package/dist/types/vue/src/components/icon-button/IconButton.vue.d.ts.map +1 -1
  139. package/dist/types/vue/src/components/image/Image.vue.d.ts +1 -1
  140. package/dist/types/vue/src/components/image/Image.vue.d.ts.map +1 -1
  141. package/dist/types/vue/src/components/lightbox/Lightbox.vue.d.ts.map +1 -1
  142. package/dist/types/vue/src/components/menubar/MenubarMenu.vue.d.ts.map +1 -1
  143. package/dist/types/vue/src/components/menubar/MenubarSub.vue.d.ts.map +1 -1
  144. package/dist/types/vue/src/components/month-grid/MonthGrid.vue.d.ts +1 -1
  145. package/dist/types/vue/src/components/multi-combobox/MultiCombobox.vue.d.ts.map +1 -1
  146. package/dist/types/vue/src/components/nav-link/NavLink.vue.d.ts +5 -10
  147. package/dist/types/vue/src/components/nav-link/NavLink.vue.d.ts.map +1 -1
  148. package/dist/types/vue/src/components/nav-link/NavLinkChild.d.ts +8 -0
  149. package/dist/types/vue/src/components/nav-link/NavLinkChild.d.ts.map +1 -1
  150. package/dist/types/vue/src/components/navigation-menu/NavigationMenu.vue.d.ts +2 -2
  151. package/dist/types/vue/src/components/navigation-menu/NavigationMenu.vue.d.ts.map +1 -1
  152. package/dist/types/vue/src/components/navigation-menu/NavigationMenuContent.vue.d.ts +6 -6
  153. package/dist/types/vue/src/components/pagination/composables/usePaginationWindow.d.ts +6 -6
  154. package/dist/types/vue/src/components/popconfirm/Popconfirm.vue.d.ts.map +1 -1
  155. package/dist/types/vue/src/components/popover/Popover.vue.d.ts +9 -9
  156. package/dist/types/vue/src/components/popover/Popover.vue.d.ts.map +1 -1
  157. package/dist/types/vue/src/components/popover/PopoverContent.vue.d.ts +9 -9
  158. package/dist/types/vue/src/components/popover/PopoverContent.vue.d.ts.map +1 -1
  159. package/dist/types/vue/src/components/range-calendar/RangeCalendar.vue.d.ts +1 -1
  160. package/dist/types/vue/src/components/range-calendar/RangeCalendar.vue.d.ts.map +1 -1
  161. package/dist/types/vue/src/components/range-slider/RangeSlider.vue.d.ts +2 -2
  162. package/dist/types/vue/src/components/scroll-area/ScrollArea.vue.d.ts +1 -1
  163. package/dist/types/vue/src/components/scroll-area/ScrollArea.vue.d.ts.map +1 -1
  164. package/dist/types/vue/src/components/select/Select.vue.d.ts.map +1 -1
  165. package/dist/types/vue/src/components/sheet/Sheet.vue.d.ts +1 -1
  166. package/dist/types/vue/src/components/sheet/Sheet.vue.d.ts.map +1 -1
  167. package/dist/types/vue/src/components/slider/Slider.vue.d.ts +2 -2
  168. package/dist/types/vue/src/components/split-button/SplitButton.vue.d.ts +1 -1
  169. package/dist/types/vue/src/components/tags-input/TagsInput.vue.d.ts +1 -1
  170. package/dist/types/vue/src/components/tags-input/TagsInput.vue.d.ts.map +1 -1
  171. package/dist/types/vue/src/components/toolbar/Toolbar.vue.d.ts +1 -1
  172. package/dist/types/vue/src/components/toolbar/ToolbarControl.vue.d.ts +1 -1
  173. package/dist/types/vue/src/components/tour/Tour.vue.d.ts +34 -0
  174. package/dist/types/vue/src/components/tour/Tour.vue.d.ts.map +1 -0
  175. package/dist/types/vue/src/components/tour/tour.variants.d.ts +2 -0
  176. package/dist/types/vue/src/components/tour/tour.variants.d.ts.map +1 -0
  177. package/dist/types/vue/src/components/tour/types.d.ts +33 -0
  178. package/dist/types/vue/src/components/tour/types.d.ts.map +1 -0
  179. package/dist/types/vue/src/components/tree/TreeRows.vue.d.ts +1 -1
  180. package/dist/types/vue/src/components/tree/TreeRows.vue.d.ts.map +1 -1
  181. package/dist/types/vue/src/components/tree/VirtualTreeWindow.vue.d.ts +1 -1
  182. package/dist/types/vue/src/components/tree/VirtualTreeWindow.vue.d.ts.map +1 -1
  183. package/dist/types/vue/src/components/tree-select/TreeSelect.vue.d.ts.map +1 -1
  184. package/dist/types/vue/src/components/virtual-list/composables/useVirtualList.d.ts +7 -7
  185. package/dist/types/vue/src/index.d.ts +5 -0
  186. package/dist/types/vue/src/index.d.ts.map +1 -1
  187. package/dist/types/vue/src/lib/anchored-overlay.d.ts +11 -5
  188. package/dist/types/vue/src/lib/anchored-overlay.d.ts.map +1 -1
  189. package/dist/types/vue/src/lib/reka/useVirtualChoices.d.ts +6 -6
  190. package/dist/types/vue/src/lib/reka/useVirtualChoices.d.ts.map +1 -1
  191. package/dist/types/vue/src/lib/reka/useVirtualTree.d.ts +1 -1
  192. package/dist/types/vue/src/lib/reka/useVirtualTree.d.ts.map +1 -1
  193. package/dist/types/vue/src/lib/useDirection.d.ts +1 -1
  194. package/dist/types/vue/src/primitives/alert-dialog/index.d.ts +133 -0
  195. package/dist/types/vue/src/primitives/alert-dialog/index.d.ts.map +1 -0
  196. package/dist/types/vue/src/primitives/calendar/CalendarCellTrigger.d.ts +52 -0
  197. package/dist/types/vue/src/primitives/calendar/CalendarCellTrigger.d.ts.map +1 -0
  198. package/dist/types/vue/src/primitives/calendar/CalendarGrid.d.ts +227 -0
  199. package/dist/types/vue/src/primitives/calendar/CalendarGrid.d.ts.map +1 -0
  200. package/dist/types/vue/src/primitives/calendar/CalendarNav.d.ts +140 -0
  201. package/dist/types/vue/src/primitives/calendar/CalendarNav.d.ts.map +1 -0
  202. package/dist/types/vue/src/primitives/calendar/CalendarRoot.d.ts +313 -0
  203. package/dist/types/vue/src/primitives/calendar/CalendarRoot.d.ts.map +1 -0
  204. package/dist/types/vue/src/primitives/calendar/context.d.ts +48 -0
  205. package/dist/types/vue/src/primitives/calendar/context.d.ts.map +1 -0
  206. package/dist/types/vue/src/primitives/calendar/index.d.ts +6 -0
  207. package/dist/types/vue/src/primitives/calendar/index.d.ts.map +1 -0
  208. package/dist/types/vue/src/primitives/calendar/useCalendar.d.ts +65 -0
  209. package/dist/types/vue/src/primitives/calendar/useCalendar.d.ts.map +1 -0
  210. package/dist/types/vue/src/primitives/combobox/ComboboxContent.d.ts +273 -0
  211. package/dist/types/vue/src/primitives/combobox/ComboboxContent.d.ts.map +1 -0
  212. package/dist/types/vue/src/primitives/combobox/ComboboxItem.d.ts +166 -0
  213. package/dist/types/vue/src/primitives/combobox/ComboboxItem.d.ts.map +1 -0
  214. package/dist/types/vue/src/primitives/combobox/ComboboxRoot.d.ts +376 -0
  215. package/dist/types/vue/src/primitives/combobox/ComboboxRoot.d.ts.map +1 -0
  216. package/dist/types/vue/src/primitives/combobox/context.d.ts +68 -0
  217. package/dist/types/vue/src/primitives/combobox/context.d.ts.map +1 -0
  218. package/dist/types/vue/src/primitives/combobox/index.d.ts +5 -0
  219. package/dist/types/vue/src/primitives/combobox/index.d.ts.map +1 -0
  220. package/dist/types/vue/src/primitives/context-menu/index.d.ts +949 -0
  221. package/dist/types/vue/src/primitives/context-menu/index.d.ts.map +1 -0
  222. package/dist/types/vue/src/primitives/date-field/DateFieldInput.d.ts +40 -0
  223. package/dist/types/vue/src/primitives/date-field/DateFieldInput.d.ts.map +1 -0
  224. package/dist/types/vue/src/primitives/date-field/DateFieldRoot.d.ts +233 -0
  225. package/dist/types/vue/src/primitives/date-field/DateFieldRoot.d.ts.map +1 -0
  226. package/dist/types/vue/src/primitives/date-field/context.d.ts +26 -0
  227. package/dist/types/vue/src/primitives/date-field/context.d.ts.map +1 -0
  228. package/dist/types/vue/src/primitives/date-field/index.d.ts +4 -0
  229. package/dist/types/vue/src/primitives/date-field/index.d.ts.map +1 -0
  230. package/dist/types/vue/src/primitives/date-field/segmentInput.d.ts +36 -0
  231. package/dist/types/vue/src/primitives/date-field/segmentInput.d.ts.map +1 -0
  232. package/dist/types/vue/src/primitives/date-field/useDateFieldSegment.d.ts +32 -0
  233. package/dist/types/vue/src/primitives/date-field/useDateFieldSegment.d.ts.map +1 -0
  234. package/dist/types/vue/src/primitives/date-range-field/DateRangeFieldInput.d.ts +51 -0
  235. package/dist/types/vue/src/primitives/date-range-field/DateRangeFieldInput.d.ts.map +1 -0
  236. package/dist/types/vue/src/primitives/date-range-field/DateRangeFieldRoot.d.ts +221 -0
  237. package/dist/types/vue/src/primitives/date-range-field/DateRangeFieldRoot.d.ts.map +1 -0
  238. package/dist/types/vue/src/primitives/date-range-field/context.d.ts +31 -0
  239. package/dist/types/vue/src/primitives/date-range-field/context.d.ts.map +1 -0
  240. package/dist/types/vue/src/primitives/date-range-field/index.d.ts +4 -0
  241. package/dist/types/vue/src/primitives/date-range-field/index.d.ts.map +1 -0
  242. package/dist/types/vue/src/primitives/dialog/DialogContent.d.ts +54 -0
  243. package/dist/types/vue/src/primitives/dialog/DialogContent.d.ts.map +1 -0
  244. package/dist/types/vue/src/primitives/dialog/DialogContentImpl.d.ts +65 -0
  245. package/dist/types/vue/src/primitives/dialog/DialogContentImpl.d.ts.map +1 -0
  246. package/dist/types/vue/src/primitives/dialog/DialogOverlay.d.ts +40 -0
  247. package/dist/types/vue/src/primitives/dialog/DialogOverlay.d.ts.map +1 -0
  248. package/dist/types/vue/src/primitives/dialog/DialogPortal.d.ts +49 -0
  249. package/dist/types/vue/src/primitives/dialog/DialogPortal.d.ts.map +1 -0
  250. package/dist/types/vue/src/primitives/dialog/DialogRoot.d.ts +62 -0
  251. package/dist/types/vue/src/primitives/dialog/DialogRoot.d.ts.map +1 -0
  252. package/dist/types/vue/src/primitives/dialog/DialogText.d.ts +85 -0
  253. package/dist/types/vue/src/primitives/dialog/DialogText.d.ts.map +1 -0
  254. package/dist/types/vue/src/primitives/dialog/DialogTrigger.d.ts +33 -0
  255. package/dist/types/vue/src/primitives/dialog/DialogTrigger.d.ts.map +1 -0
  256. package/dist/types/vue/src/primitives/dialog/context.d.ts +16 -0
  257. package/dist/types/vue/src/primitives/dialog/context.d.ts.map +1 -0
  258. package/dist/types/vue/src/primitives/dialog/index.d.ts +8 -0
  259. package/dist/types/vue/src/primitives/dialog/index.d.ts.map +1 -0
  260. package/dist/types/vue/src/primitives/dismissable-layer/DismissableLayer.d.ts +76 -0
  261. package/dist/types/vue/src/primitives/dismissable-layer/DismissableLayer.d.ts.map +1 -0
  262. package/dist/types/vue/src/primitives/dismissable-layer/DismissableLayerBranch.d.ts +26 -0
  263. package/dist/types/vue/src/primitives/dismissable-layer/DismissableLayerBranch.d.ts.map +1 -0
  264. package/dist/types/vue/src/primitives/dismissable-layer/index.d.ts +3 -0
  265. package/dist/types/vue/src/primitives/dismissable-layer/index.d.ts.map +1 -0
  266. package/dist/types/vue/src/primitives/dropdown-menu/index.d.ts +1033 -0
  267. package/dist/types/vue/src/primitives/dropdown-menu/index.d.ts.map +1 -0
  268. package/dist/types/vue/src/primitives/focus-scope/FocusScope.d.ts +72 -0
  269. package/dist/types/vue/src/primitives/focus-scope/FocusScope.d.ts.map +1 -0
  270. package/dist/types/vue/src/primitives/focus-scope/index.d.ts +2 -0
  271. package/dist/types/vue/src/primitives/focus-scope/index.d.ts.map +1 -0
  272. package/dist/types/vue/src/primitives/hover-card/index.d.ts +442 -0
  273. package/dist/types/vue/src/primitives/hover-card/index.d.ts.map +1 -0
  274. package/dist/types/vue/src/primitives/listbox/ListboxContent.d.ts +30 -0
  275. package/dist/types/vue/src/primitives/listbox/ListboxContent.d.ts.map +1 -0
  276. package/dist/types/vue/src/primitives/listbox/ListboxFilter.d.ts +67 -0
  277. package/dist/types/vue/src/primitives/listbox/ListboxFilter.d.ts.map +1 -0
  278. package/dist/types/vue/src/primitives/listbox/ListboxGroup.d.ts +82 -0
  279. package/dist/types/vue/src/primitives/listbox/ListboxGroup.d.ts.map +1 -0
  280. package/dist/types/vue/src/primitives/listbox/ListboxItem.d.ts +58 -0
  281. package/dist/types/vue/src/primitives/listbox/ListboxItem.d.ts.map +1 -0
  282. package/dist/types/vue/src/primitives/listbox/ListboxRoot.d.ts +156 -0
  283. package/dist/types/vue/src/primitives/listbox/ListboxRoot.d.ts.map +1 -0
  284. package/dist/types/vue/src/primitives/listbox/context.d.ts +49 -0
  285. package/dist/types/vue/src/primitives/listbox/context.d.ts.map +1 -0
  286. package/dist/types/vue/src/primitives/listbox/index.d.ts +7 -0
  287. package/dist/types/vue/src/primitives/listbox/index.d.ts.map +1 -0
  288. package/dist/types/vue/src/primitives/menu/MenuContentImpl.d.ts +394 -0
  289. package/dist/types/vue/src/primitives/menu/MenuContentImpl.d.ts.map +1 -0
  290. package/dist/types/vue/src/primitives/menu/MenuItem.d.ts +396 -0
  291. package/dist/types/vue/src/primitives/menu/MenuItem.d.ts.map +1 -0
  292. package/dist/types/vue/src/primitives/menu/MenuRoot.d.ts +746 -0
  293. package/dist/types/vue/src/primitives/menu/MenuRoot.d.ts.map +1 -0
  294. package/dist/types/vue/src/primitives/menu/context.d.ts +74 -0
  295. package/dist/types/vue/src/primitives/menu/context.d.ts.map +1 -0
  296. package/dist/types/vue/src/primitives/menu/index.d.ts +5 -0
  297. package/dist/types/vue/src/primitives/menu/index.d.ts.map +1 -0
  298. package/dist/types/vue/src/primitives/menu/wrap.d.ts +14 -0
  299. package/dist/types/vue/src/primitives/menu/wrap.d.ts.map +1 -0
  300. package/dist/types/vue/src/primitives/menubar/index.d.ts +1036 -0
  301. package/dist/types/vue/src/primitives/menubar/index.d.ts.map +1 -0
  302. package/dist/types/vue/src/primitives/navigation-menu/NavigationMenuContent.d.ts +101 -0
  303. package/dist/types/vue/src/primitives/navigation-menu/NavigationMenuContent.d.ts.map +1 -0
  304. package/dist/types/vue/src/primitives/navigation-menu/NavigationMenuParts.d.ts +165 -0
  305. package/dist/types/vue/src/primitives/navigation-menu/NavigationMenuParts.d.ts.map +1 -0
  306. package/dist/types/vue/src/primitives/navigation-menu/NavigationMenuRoot.d.ts +187 -0
  307. package/dist/types/vue/src/primitives/navigation-menu/NavigationMenuRoot.d.ts.map +1 -0
  308. package/dist/types/vue/src/primitives/navigation-menu/context.d.ts +40 -0
  309. package/dist/types/vue/src/primitives/navigation-menu/context.d.ts.map +1 -0
  310. package/dist/types/vue/src/primitives/navigation-menu/index.d.ts +5 -0
  311. package/dist/types/vue/src/primitives/navigation-menu/index.d.ts.map +1 -0
  312. package/dist/types/vue/src/primitives/number-field/NumberFieldRoot.vue.d.ts +1 -1
  313. package/dist/types/vue/src/primitives/number-field/NumberFieldRoot.vue.d.ts.map +1 -1
  314. package/dist/types/vue/src/primitives/picker/createPicker.d.ts +247 -0
  315. package/dist/types/vue/src/primitives/picker/createPicker.d.ts.map +1 -0
  316. package/dist/types/vue/src/primitives/picker/index.d.ts +414 -0
  317. package/dist/types/vue/src/primitives/picker/index.d.ts.map +1 -0
  318. package/dist/types/vue/src/primitives/popover/PopoverContent.d.ts +257 -0
  319. package/dist/types/vue/src/primitives/popover/PopoverContent.d.ts.map +1 -0
  320. package/dist/types/vue/src/primitives/popover/PopoverParts.d.ts +183 -0
  321. package/dist/types/vue/src/primitives/popover/PopoverParts.d.ts.map +1 -0
  322. package/dist/types/vue/src/primitives/popover/PopoverRoot.d.ts +50 -0
  323. package/dist/types/vue/src/primitives/popover/PopoverRoot.d.ts.map +1 -0
  324. package/dist/types/vue/src/primitives/popover/context.d.ts +13 -0
  325. package/dist/types/vue/src/primitives/popover/context.d.ts.map +1 -0
  326. package/dist/types/vue/src/primitives/popover/index.d.ts +5 -0
  327. package/dist/types/vue/src/primitives/popover/index.d.ts.map +1 -0
  328. package/dist/types/vue/src/primitives/popper/Arrow.d.ts +67 -0
  329. package/dist/types/vue/src/primitives/popper/Arrow.d.ts.map +1 -0
  330. package/dist/types/vue/src/primitives/popper/PopperAnchor.d.ts +40 -0
  331. package/dist/types/vue/src/primitives/popper/PopperAnchor.d.ts.map +1 -0
  332. package/dist/types/vue/src/primitives/popper/PopperArrow.d.ts +61 -0
  333. package/dist/types/vue/src/primitives/popper/PopperArrow.d.ts.map +1 -0
  334. package/dist/types/vue/src/primitives/popper/PopperContent.d.ts +370 -0
  335. package/dist/types/vue/src/primitives/popper/PopperContent.d.ts.map +1 -0
  336. package/dist/types/vue/src/primitives/popper/PopperRoot.d.ts +4 -0
  337. package/dist/types/vue/src/primitives/popper/PopperRoot.d.ts.map +1 -0
  338. package/dist/types/vue/src/primitives/popper/context.d.ts +17 -0
  339. package/dist/types/vue/src/primitives/popper/context.d.ts.map +1 -0
  340. package/dist/types/vue/src/primitives/popper/index.d.ts +7 -0
  341. package/dist/types/vue/src/primitives/popper/index.d.ts.map +1 -0
  342. package/dist/types/vue/src/primitives/radio-group/RadioGroupRoot.d.ts +1 -1
  343. package/dist/types/vue/src/primitives/range-calendar/RangeCalendarCellTrigger.d.ts +52 -0
  344. package/dist/types/vue/src/primitives/range-calendar/RangeCalendarCellTrigger.d.ts.map +1 -0
  345. package/dist/types/vue/src/primitives/range-calendar/RangeCalendarGrid.d.ts +252 -0
  346. package/dist/types/vue/src/primitives/range-calendar/RangeCalendarGrid.d.ts.map +1 -0
  347. package/dist/types/vue/src/primitives/range-calendar/RangeCalendarRoot.d.ts +345 -0
  348. package/dist/types/vue/src/primitives/range-calendar/RangeCalendarRoot.d.ts.map +1 -0
  349. package/dist/types/vue/src/primitives/range-calendar/context.d.ts +64 -0
  350. package/dist/types/vue/src/primitives/range-calendar/context.d.ts.map +1 -0
  351. package/dist/types/vue/src/primitives/range-calendar/index.d.ts +6 -0
  352. package/dist/types/vue/src/primitives/range-calendar/index.d.ts.map +1 -0
  353. package/dist/types/vue/src/primitives/rating/RatingRoot.d.ts +1 -1
  354. package/dist/types/vue/src/primitives/roving-focus/RovingFocusGroup.vue.d.ts +3 -3
  355. package/dist/types/vue/src/primitives/roving-focus/RovingFocusGroup.vue.d.ts.map +1 -1
  356. package/dist/types/vue/src/primitives/select/SelectContent.d.ts +265 -0
  357. package/dist/types/vue/src/primitives/select/SelectContent.d.ts.map +1 -0
  358. package/dist/types/vue/src/primitives/select/SelectItem.d.ts +107 -0
  359. package/dist/types/vue/src/primitives/select/SelectItem.d.ts.map +1 -0
  360. package/dist/types/vue/src/primitives/select/SelectRoot.d.ts +275 -0
  361. package/dist/types/vue/src/primitives/select/SelectRoot.d.ts.map +1 -0
  362. package/dist/types/vue/src/primitives/select/context.d.ts +73 -0
  363. package/dist/types/vue/src/primitives/select/context.d.ts.map +1 -0
  364. package/dist/types/vue/src/primitives/select/index.d.ts +5 -0
  365. package/dist/types/vue/src/primitives/select/index.d.ts.map +1 -0
  366. package/dist/types/vue/src/primitives/slider/SliderRoot.d.ts +1 -1
  367. package/dist/types/vue/src/primitives/stepper/StepperRoot.d.ts +1 -1
  368. package/dist/types/vue/src/primitives/tags-input/TagsInputInput.d.ts +61 -0
  369. package/dist/types/vue/src/primitives/tags-input/TagsInputInput.d.ts.map +1 -0
  370. package/dist/types/vue/src/primitives/tags-input/TagsInputItem.d.ts +76 -0
  371. package/dist/types/vue/src/primitives/tags-input/TagsInputItem.d.ts.map +1 -0
  372. package/dist/types/vue/src/primitives/tags-input/TagsInputRoot.d.ts +196 -0
  373. package/dist/types/vue/src/primitives/tags-input/TagsInputRoot.d.ts.map +1 -0
  374. package/dist/types/vue/src/primitives/tags-input/context.d.ts +30 -0
  375. package/dist/types/vue/src/primitives/tags-input/context.d.ts.map +1 -0
  376. package/dist/types/vue/src/primitives/tags-input/index.d.ts +5 -0
  377. package/dist/types/vue/src/primitives/tags-input/index.d.ts.map +1 -0
  378. package/dist/types/vue/src/primitives/teleport/Teleport.d.ts +49 -0
  379. package/dist/types/vue/src/primitives/teleport/Teleport.d.ts.map +1 -0
  380. package/dist/types/vue/src/primitives/teleport/index.d.ts +2 -0
  381. package/dist/types/vue/src/primitives/teleport/index.d.ts.map +1 -0
  382. package/dist/types/vue/src/primitives/time-field/TimeFieldInput.d.ts +40 -0
  383. package/dist/types/vue/src/primitives/time-field/TimeFieldInput.d.ts.map +1 -0
  384. package/dist/types/vue/src/primitives/time-field/TimeFieldRoot.d.ts +220 -0
  385. package/dist/types/vue/src/primitives/time-field/TimeFieldRoot.d.ts.map +1 -0
  386. package/dist/types/vue/src/primitives/time-field/context.d.ts +25 -0
  387. package/dist/types/vue/src/primitives/time-field/context.d.ts.map +1 -0
  388. package/dist/types/vue/src/primitives/time-field/index.d.ts +5 -0
  389. package/dist/types/vue/src/primitives/time-field/index.d.ts.map +1 -0
  390. package/dist/types/vue/src/primitives/toast/ToastProvider.d.ts +177 -0
  391. package/dist/types/vue/src/primitives/toast/ToastProvider.d.ts.map +1 -0
  392. package/dist/types/vue/src/primitives/toast/ToastRoot.d.ts +233 -0
  393. package/dist/types/vue/src/primitives/toast/ToastRoot.d.ts.map +1 -0
  394. package/dist/types/vue/src/primitives/toast/index.d.ts +3 -0
  395. package/dist/types/vue/src/primitives/toast/index.d.ts.map +1 -0
  396. package/dist/types/vue/src/primitives/toolbar/ToolbarRoot.d.ts +1 -1
  397. package/dist/types/vue/src/primitives/tooltip/TooltipParts.d.ts +267 -0
  398. package/dist/types/vue/src/primitives/tooltip/TooltipParts.d.ts.map +1 -0
  399. package/dist/types/vue/src/primitives/tooltip/TooltipRoot.d.ts +162 -0
  400. package/dist/types/vue/src/primitives/tooltip/TooltipRoot.d.ts.map +1 -0
  401. package/dist/types/vue/src/primitives/tooltip/context.d.ts +32 -0
  402. package/dist/types/vue/src/primitives/tooltip/context.d.ts.map +1 -0
  403. package/dist/types/vue/src/primitives/tooltip/index.d.ts +4 -0
  404. package/dist/types/vue/src/primitives/tooltip/index.d.ts.map +1 -0
  405. package/dist/types/vue/src/primitives/tree/TreeItem.d.ts +40 -0
  406. package/dist/types/vue/src/primitives/tree/TreeItem.d.ts.map +1 -0
  407. package/dist/types/vue/src/primitives/tree/TreeRoot.d.ts +50 -0
  408. package/dist/types/vue/src/primitives/tree/TreeRoot.d.ts.map +1 -0
  409. package/dist/types/vue/src/primitives/tree/context.d.ts +29 -0
  410. package/dist/types/vue/src/primitives/tree/context.d.ts.map +1 -0
  411. package/dist/types/vue/src/primitives/tree/index.d.ts +5 -0
  412. package/dist/types/vue/src/primitives/tree/index.d.ts.map +1 -0
  413. package/dist/types/vue/src/primitives/utils/config.d.ts +14 -1
  414. package/dist/types/vue/src/primitives/utils/config.d.ts.map +1 -1
  415. package/dist/types/vue/src/primitives/utils/defu.d.ts +2 -0
  416. package/dist/types/vue/src/primitives/utils/defu.d.ts.map +1 -0
  417. package/dist/types/vue/src/primitives/utils/env.d.ts +2 -0
  418. package/dist/types/vue/src/primitives/utils/env.d.ts.map +1 -0
  419. package/dist/types/vue/src/primitives/utils/layers.d.ts +5 -0
  420. package/dist/types/vue/src/primitives/utils/layers.d.ts.map +1 -0
  421. package/dist/types/vue/src/primitives/utils/propsWithoutDefaults.d.ts +2 -0
  422. package/dist/types/vue/src/primitives/utils/propsWithoutDefaults.d.ts.map +1 -0
  423. package/dist/types/vue/src/primitives/utils/useBodyScrollLock.d.ts +2 -0
  424. package/dist/types/vue/src/primitives/utils/useBodyScrollLock.d.ts.map +1 -0
  425. package/dist/types/vue/src/primitives/utils/useDirection.d.ts +1 -1
  426. package/dist/types/vue/src/primitives/utils/useDirection.d.ts.map +1 -1
  427. package/dist/types/vue/src/primitives/utils/useFocusGuards.d.ts +2 -0
  428. package/dist/types/vue/src/primitives/utils/useFocusGuards.d.ts.map +1 -0
  429. package/dist/types/vue/src/primitives/utils/useGraceArea.d.ts +6 -0
  430. package/dist/types/vue/src/primitives/utils/useGraceArea.d.ts.map +1 -0
  431. package/dist/types/vue/src/primitives/utils/useHideOthers.d.ts +4 -0
  432. package/dist/types/vue/src/primitives/utils/useHideOthers.d.ts.map +1 -0
  433. package/dist/types/vue/src/primitives/utils/useIsUsingKeyboard.d.ts +4 -0
  434. package/dist/types/vue/src/primitives/utils/useIsUsingKeyboard.d.ts.map +1 -0
  435. package/dist/types/vue/src/primitives/utils/useLocale.d.ts +3 -0
  436. package/dist/types/vue/src/primitives/utils/useLocale.d.ts.map +1 -0
  437. package/dist/types/vue/src/primitives/utils/useVModel.d.ts +1 -0
  438. package/dist/types/vue/src/primitives/utils/useVModel.d.ts.map +1 -1
  439. package/dist/types/vue/src/primitives/visually-hidden/VisuallyHiddenInput.d.ts +1 -1
  440. package/dist/types/vue/src/singletons.d.ts +1 -1
  441. package/dist/types/vue/src/singletons.d.ts.map +1 -1
  442. package/package.json +5 -5
  443. package/src/components/alert-dialog/AlertDialog.vue +1 -1
  444. package/src/components/calendar/Calendar.vue +1 -1
  445. package/src/components/calendar/CalendarLevels.vue +1 -1
  446. package/src/components/combobox/Combobox.vue +6 -1
  447. package/src/components/combobox/ComboboxList.vue +1 -1
  448. package/src/components/command-palette/CommandPalette.vue +2 -2
  449. package/src/components/command-palette/CommandPaletteInput.vue +1 -1
  450. package/src/components/command-palette/CommandPaletteItem.vue +1 -1
  451. package/src/components/command-palette/CommandPalettePanel.vue +6 -1
  452. package/src/components/config-provider/ConfigProvider.vue +24 -0
  453. package/src/components/config-provider/types.ts +11 -0
  454. package/src/components/config-provider/useConfig.ts +5 -0
  455. package/src/components/context-menu/ContextMenu.vue +1 -1
  456. package/src/components/context-menu/ContextMenuCheckboxItem.vue +1 -1
  457. package/src/components/context-menu/ContextMenuGroup.vue +1 -1
  458. package/src/components/context-menu/ContextMenuItem.vue +1 -1
  459. package/src/components/context-menu/ContextMenuLabel.vue +1 -1
  460. package/src/components/context-menu/ContextMenuRadioGroup.vue +1 -1
  461. package/src/components/context-menu/ContextMenuRadioItem.vue +1 -1
  462. package/src/components/context-menu/ContextMenuSeparator.vue +1 -1
  463. package/src/components/context-menu/ContextMenuSub.vue +1 -1
  464. package/src/components/data-table/DataTableDragPreview.vue +1 -1
  465. package/src/components/date-field/DateField.vue +1 -1
  466. package/src/components/date-picker/DatePicker.vue +1 -1
  467. package/src/components/date-range-field/DateRangeField.vue +5 -1
  468. package/src/components/date-range-picker/DateRangePicker.vue +1 -1
  469. package/src/components/date-time-picker/DateTimePicker.vue +1 -1
  470. package/src/components/dialog/Dialog.vue +1 -1
  471. package/src/components/dialog/ModalContent.vue +2 -1
  472. package/src/components/drawer/Drawer.vue +1 -1
  473. package/src/components/dropdown-menu/DropdownMenu.vue +1 -1
  474. package/src/components/dropdown-menu/DropdownMenuCheckboxItem.vue +4 -1
  475. package/src/components/dropdown-menu/DropdownMenuGroup.vue +1 -1
  476. package/src/components/dropdown-menu/DropdownMenuItem.vue +1 -1
  477. package/src/components/dropdown-menu/DropdownMenuLabel.vue +1 -1
  478. package/src/components/dropdown-menu/DropdownMenuRadioGroup.vue +1 -1
  479. package/src/components/dropdown-menu/DropdownMenuRadioItem.vue +1 -1
  480. package/src/components/dropdown-menu/DropdownMenuSeparator.vue +1 -1
  481. package/src/components/dropdown-menu/DropdownMenuSub.vue +1 -1
  482. package/src/components/hover-card/HoverCard.vue +6 -1
  483. package/src/components/hover-card/composables/useHoverCardAnchor.ts +1 -1
  484. package/src/components/icon-button/IconButton.vue +1 -1
  485. package/src/components/lightbox/Lightbox.vue +2 -1
  486. package/src/components/lightbox/LightboxChrome.vue +1 -1
  487. package/src/components/listbox/Listbox.vue +1 -1
  488. package/src/components/listbox/ListboxOptionContent.vue +1 -1
  489. package/src/components/menubar/Menubar.vue +1 -1
  490. package/src/components/menubar/MenubarCheckboxItem.vue +1 -1
  491. package/src/components/menubar/MenubarGroup.vue +1 -1
  492. package/src/components/menubar/MenubarItem.vue +1 -1
  493. package/src/components/menubar/MenubarLabel.vue +1 -1
  494. package/src/components/menubar/MenubarMenu.vue +6 -1
  495. package/src/components/menubar/MenubarRadioGroup.vue +1 -1
  496. package/src/components/menubar/MenubarRadioItem.vue +1 -1
  497. package/src/components/menubar/MenubarSeparator.vue +1 -1
  498. package/src/components/menubar/MenubarSub.vue +6 -1
  499. package/src/components/multi-combobox/MultiCombobox.vue +6 -1
  500. package/src/components/multi-select/MultiSelect.vue +1 -1
  501. package/src/components/nav-link/NavLink.vue +21 -2
  502. package/src/components/nav-link/NavLinkChild.ts +2 -0
  503. package/src/components/navigation-menu/NavigationMenu.vue +5 -1
  504. package/src/components/navigation-menu/NavigationMenuContent.vue +2 -2
  505. package/src/components/navigation-menu/NavigationMenuItem.vue +1 -1
  506. package/src/components/navigation-menu/NavigationMenuLink.vue +1 -1
  507. package/src/components/navigation-menu/NavigationMenuTrigger.vue +1 -1
  508. package/src/components/number-input/NumberInput.vue +1 -1
  509. package/src/components/pagination/PaginationPopup.vue +1 -1
  510. package/src/components/popconfirm/Popconfirm.vue +6 -1
  511. package/src/components/popover/Popover.vue +6 -1
  512. package/src/components/popover/PopoverContent.vue +2 -2
  513. package/src/components/popover/composables/usePopoverCloseFocus.ts +1 -1
  514. package/src/components/range-calendar/RangeCalendar.vue +1 -1
  515. package/src/components/select/Select.vue +2 -1
  516. package/src/components/select/SelectList.vue +1 -1
  517. package/src/components/sheet/Sheet.vue +1 -1
  518. package/src/components/slider/SliderHandle.vue +1 -1
  519. package/src/components/tags-input/TagsInput.vue +1 -1
  520. package/src/components/tags-input/TagsInputChip.vue +1 -1
  521. package/src/components/time/Time.vue +1 -1
  522. package/src/components/time-field/TimeField.vue +1 -1
  523. package/src/components/toast/Toaster.vue +1 -1
  524. package/src/components/toggle/Toggle.vue +1 -1
  525. package/src/components/toolbar/ToolbarControl.vue +1 -1
  526. package/src/components/tooltip/Tooltip.vue +1 -1
  527. package/src/components/tooltip/TooltipBubble.vue +1 -1
  528. package/src/components/tooltip/TooltipDirectiveRoot.ts +1 -1
  529. package/src/components/tooltip/TooltipProvider.vue +1 -1
  530. package/src/components/tooltip/composables/useTooltipTarget.ts +1 -1
  531. package/src/components/tour/Tour.vue +447 -0
  532. package/src/components/tour/tour.variants.ts +1 -0
  533. package/src/components/tour/types.ts +43 -0
  534. package/src/components/tree/Tree.vue +1 -1
  535. package/src/components/tree/TreeRows.vue +1 -1
  536. package/src/components/tree/VirtualTreeWindow.vue +1 -1
  537. package/src/components/tree-select/TreeSelect.vue +2 -3
  538. package/src/components/tree-select/composables/useTreeSelect.ts +2 -2
  539. package/src/index.ts +15 -0
  540. package/src/lib/anchored-overlay.ts +2 -1
  541. package/src/lib/dialog-focus.ts +1 -1
  542. package/src/lib/reka/useVirtualChoices.ts +7 -8
  543. package/src/lib/reka/useVirtualTree.ts +1 -1
  544. package/src/primitives/alert-dialog/LICENSE +44 -0
  545. package/src/primitives/alert-dialog/index.ts +166 -0
  546. package/src/primitives/calendar/CalendarCellTrigger.ts +190 -0
  547. package/src/primitives/calendar/CalendarGrid.ts +101 -0
  548. package/src/primitives/calendar/CalendarNav.ts +88 -0
  549. package/src/primitives/calendar/CalendarRoot.ts +324 -0
  550. package/src/primitives/calendar/LICENSE +44 -0
  551. package/src/primitives/calendar/context.ts +55 -0
  552. package/src/primitives/calendar/index.ts +12 -0
  553. package/src/primitives/calendar/useCalendar.ts +164 -0
  554. package/src/primitives/combobox/ComboboxContent.ts +199 -0
  555. package/src/primitives/combobox/ComboboxItem.ts +209 -0
  556. package/src/primitives/combobox/ComboboxRoot.ts +489 -0
  557. package/src/primitives/combobox/LICENSE +44 -0
  558. package/src/primitives/combobox/context.ts +47 -0
  559. package/src/primitives/combobox/index.ts +23 -0
  560. package/src/primitives/context-menu/LICENSE +44 -0
  561. package/src/primitives/context-menu/index.ts +388 -0
  562. package/src/primitives/date-field/DateFieldInput.ts +29 -0
  563. package/src/primitives/date-field/DateFieldRoot.ts +343 -0
  564. package/src/primitives/date-field/LICENSE +44 -0
  565. package/src/primitives/date-field/context.ts +29 -0
  566. package/src/primitives/date-field/index.ts +3 -0
  567. package/src/primitives/date-field/segmentInput.ts +96 -0
  568. package/src/primitives/date-field/useDateFieldSegment.ts +63 -0
  569. package/src/primitives/date-range-field/DateRangeFieldInput.ts +42 -0
  570. package/src/primitives/date-range-field/DateRangeFieldRoot.ts +389 -0
  571. package/src/primitives/date-range-field/LICENSE +44 -0
  572. package/src/primitives/date-range-field/context.ts +36 -0
  573. package/src/primitives/date-range-field/index.ts +12 -0
  574. package/src/primitives/dialog/DialogContent.ts +193 -0
  575. package/src/primitives/dialog/DialogContentImpl.ts +114 -0
  576. package/src/primitives/dialog/DialogOverlay.ts +99 -0
  577. package/src/primitives/dialog/DialogPortal.ts +33 -0
  578. package/src/primitives/dialog/DialogRoot.ts +61 -0
  579. package/src/primitives/dialog/DialogText.ts +59 -0
  580. package/src/primitives/dialog/DialogTrigger.ts +46 -0
  581. package/src/primitives/dialog/LICENSE +44 -0
  582. package/src/primitives/dialog/context.ts +19 -0
  583. package/src/primitives/dialog/index.ts +7 -0
  584. package/src/primitives/dismissable-layer/DismissableLayer.ts +212 -0
  585. package/src/primitives/dismissable-layer/DismissableLayerBranch.ts +36 -0
  586. package/src/primitives/dismissable-layer/LICENSE +44 -0
  587. package/src/primitives/dismissable-layer/index.ts +11 -0
  588. package/src/primitives/dropdown-menu/LICENSE +44 -0
  589. package/src/primitives/dropdown-menu/index.ts +344 -0
  590. package/src/primitives/focus-scope/FocusScope.ts +118 -0
  591. package/src/primitives/focus-scope/LICENSE +44 -0
  592. package/src/primitives/focus-scope/index.ts +1 -0
  593. package/src/primitives/hover-card/LICENSE +44 -0
  594. package/src/primitives/hover-card/index.ts +357 -0
  595. package/src/primitives/listbox/LICENSE +44 -0
  596. package/src/primitives/listbox/ListboxContent.ts +80 -0
  597. package/src/primitives/listbox/ListboxFilter.ts +130 -0
  598. package/src/primitives/listbox/ListboxGroup.ts +67 -0
  599. package/src/primitives/listbox/ListboxItem.ts +125 -0
  600. package/src/primitives/listbox/ListboxRoot.ts +376 -0
  601. package/src/primitives/listbox/context.ts +62 -0
  602. package/src/primitives/listbox/index.ts +17 -0
  603. package/src/primitives/menu/LICENSE +44 -0
  604. package/src/primitives/menu/MenuContentImpl.ts +304 -0
  605. package/src/primitives/menu/MenuItem.ts +495 -0
  606. package/src/primitives/menu/MenuRoot.ts +295 -0
  607. package/src/primitives/menu/context.ts +72 -0
  608. package/src/primitives/menu/index.ts +26 -0
  609. package/src/primitives/menu/wrap.ts +53 -0
  610. package/src/primitives/menubar/index.ts +494 -0
  611. package/src/primitives/navigation-menu/LICENSE +44 -0
  612. package/src/primitives/navigation-menu/NavigationMenuContent.ts +375 -0
  613. package/src/primitives/navigation-menu/NavigationMenuParts.ts +432 -0
  614. package/src/primitives/navigation-menu/NavigationMenuRoot.ts +260 -0
  615. package/src/primitives/navigation-menu/context.ts +50 -0
  616. package/src/primitives/navigation-menu/index.ts +20 -0
  617. package/src/primitives/number-field/__snapshots__/NumberField.test.ts.snap +288 -0
  618. package/src/primitives/picker/LICENSE +44 -0
  619. package/src/primitives/picker/createPicker.ts +618 -0
  620. package/src/primitives/picker/index.ts +26 -0
  621. package/src/primitives/popover/LICENSE +44 -0
  622. package/src/primitives/popover/PopoverContent.ts +243 -0
  623. package/src/primitives/popover/PopoverParts.ts +143 -0
  624. package/src/primitives/popover/PopoverRoot.ts +58 -0
  625. package/src/primitives/popover/context.ts +16 -0
  626. package/src/primitives/popover/index.ts +14 -0
  627. package/src/primitives/popper/Arrow.ts +49 -0
  628. package/src/primitives/popper/LICENSE +44 -0
  629. package/src/primitives/popper/PopperAnchor.ts +33 -0
  630. package/src/primitives/popper/PopperArrow.ts +77 -0
  631. package/src/primitives/popper/PopperContent.ts +262 -0
  632. package/src/primitives/popper/PopperRoot.ts +16 -0
  633. package/src/primitives/popper/context.ts +23 -0
  634. package/src/primitives/popper/index.ts +11 -0
  635. package/src/primitives/range-calendar/LICENSE +44 -0
  636. package/src/primitives/range-calendar/RangeCalendarCellTrigger.ts +241 -0
  637. package/src/primitives/range-calendar/RangeCalendarGrid.ts +90 -0
  638. package/src/primitives/range-calendar/RangeCalendarRoot.ts +413 -0
  639. package/src/primitives/range-calendar/context.ts +71 -0
  640. package/src/primitives/range-calendar/index.ts +21 -0
  641. package/src/primitives/select/LICENSE +44 -0
  642. package/src/primitives/select/SelectContent.ts +330 -0
  643. package/src/primitives/select/SelectItem.ts +204 -0
  644. package/src/primitives/select/SelectRoot.ts +408 -0
  645. package/src/primitives/select/context.ts +74 -0
  646. package/src/primitives/select/index.ts +17 -0
  647. package/src/primitives/tags-input/LICENSE +44 -0
  648. package/src/primitives/tags-input/TagsInputInput.ts +148 -0
  649. package/src/primitives/tags-input/TagsInputItem.ts +105 -0
  650. package/src/primitives/tags-input/TagsInputRoot.ts +215 -0
  651. package/src/primitives/tags-input/context.ts +36 -0
  652. package/src/primitives/tags-input/index.ts +9 -0
  653. package/src/primitives/teleport/LICENSE +44 -0
  654. package/src/primitives/teleport/Teleport.ts +41 -0
  655. package/src/primitives/teleport/index.ts +1 -0
  656. package/src/primitives/time-field/LICENSE +44 -0
  657. package/src/primitives/time-field/TimeFieldInput.ts +29 -0
  658. package/src/primitives/time-field/TimeFieldRoot.ts +379 -0
  659. package/src/primitives/time-field/context.ts +28 -0
  660. package/src/primitives/time-field/index.ts +4 -0
  661. package/src/primitives/toast/LICENSE +44 -0
  662. package/src/primitives/toast/ToastProvider.ts +311 -0
  663. package/src/primitives/toast/ToastRoot.ts +518 -0
  664. package/src/primitives/toast/index.ts +16 -0
  665. package/src/primitives/tooltip/LICENSE +44 -0
  666. package/src/primitives/tooltip/TooltipParts.ts +351 -0
  667. package/src/primitives/tooltip/TooltipRoot.ts +170 -0
  668. package/src/primitives/tooltip/context.ts +39 -0
  669. package/src/primitives/tooltip/index.ts +9 -0
  670. package/src/primitives/tree/LICENSE +44 -0
  671. package/src/primitives/tree/TreeItem.ts +256 -0
  672. package/src/primitives/tree/TreeRoot.ts +273 -0
  673. package/src/primitives/tree/context.ts +34 -0
  674. package/src/primitives/tree/index.ts +4 -0
  675. package/src/primitives/utils/config.ts +19 -1
  676. package/src/primitives/utils/defu.ts +26 -0
  677. package/src/primitives/utils/env.ts +5 -0
  678. package/src/primitives/utils/layers.ts +4 -0
  679. package/src/primitives/utils/propsWithoutDefaults.ts +8 -0
  680. package/src/primitives/utils/useBodyScrollLock.ts +29 -0
  681. package/src/primitives/utils/useFocusGuards.ts +10 -0
  682. package/src/primitives/utils/useGraceArea.ts +85 -0
  683. package/src/primitives/utils/useHideOthers.ts +18 -0
  684. package/src/primitives/utils/useIsUsingKeyboard.ts +25 -0
  685. package/src/primitives/utils/useLocale.ts +7 -0
  686. package/src/primitives/utils/useVModel.ts +8 -3
  687. package/src/singletons.ts +1 -1
@@ -0,0 +1,113 @@
1
+ import { arrowNavigation } from '../arrow-navigation'
2
+ import { isEqual } from '../value'
3
+
4
+ export type AcceptableInputValue = string | number | bigint | Record<string, any>
5
+ export type TagsInputDirection = 'ltr' | 'rtl'
6
+
7
+ export function tagsInputDisplayValue(value: AcceptableInputValue) {
8
+ return value.toString()
9
+ }
10
+
11
+ export type TagsInputAddResult<T> =
12
+ { added: true; value: T[]; payload: T } | { added: false; payload: T; duplicate: boolean }
13
+
14
+ export function addTagsInputValue<T extends AcceptableInputValue>(
15
+ model: T[] | null | undefined,
16
+ text: string,
17
+ options: {
18
+ duplicate: boolean
19
+ max: number
20
+ defaultValue: T[]
21
+ convertValue?: (value: string) => T
22
+ },
23
+ ): TagsInputAddResult<T> {
24
+ const array = Array.isArray(model) ? [...model] : []
25
+ const modelIsObject = array.length > 0 && typeof array[0] === 'object'
26
+ const defaultIsObject = array.length > 0 && typeof options.defaultValue[0] === 'object'
27
+ if ((modelIsObject || defaultIsObject) && typeof options.convertValue !== 'function')
28
+ throw new Error('You must provide a `convertValue` function when using objects as values.')
29
+ const payload = options.convertValue ? options.convertValue(text) : (text as T)
30
+ if (array.length >= options.max && !!options.max)
31
+ return { added: false, payload, duplicate: false }
32
+ if (options.duplicate || !array.includes(payload))
33
+ return { added: true, value: [...array, payload], payload }
34
+ return { added: false, payload, duplicate: true }
35
+ }
36
+
37
+ export function removeTagsInputValue<T>(model: T[], index: number) {
38
+ return model.filter((_, i) => i !== index)
39
+ }
40
+
41
+ export function tagsInputValueIndex<T>(model: T[], value: unknown) {
42
+ return model.findIndex(item => isEqual(item, value))
43
+ }
44
+
45
+ export interface TagsInputKeydownResult {
46
+ select?: { element: HTMLElement | undefined }
47
+ remove?: HTMLElement
48
+ preventDefault: boolean
49
+ }
50
+
51
+ export function tagsInputKeydown(
52
+ event: KeyboardEvent,
53
+ state: {
54
+ caretAtStart: boolean
55
+ items: HTMLElement[]
56
+ selected: HTMLElement | undefined
57
+ dir: TagsInputDirection
58
+ },
59
+ ): TagsInputKeydownResult | undefined {
60
+ const { items, selected, caretAtStart, dir } = state
61
+ if (!items.length) return
62
+ const lastTag = items.at(-1)
63
+ switch (event.key) {
64
+ case 'Delete':
65
+ case 'Backspace': {
66
+ if (!caretAtStart) return
67
+ if (selected) {
68
+ const index = items.findIndex(item => item === selected)
69
+ return {
70
+ remove: selected,
71
+ select: { element: selected === lastTag ? items.at(index - 1) : items.at(index + 1) },
72
+ preventDefault: true,
73
+ }
74
+ }
75
+ if (event.key === 'Backspace') return { select: { element: lastTag }, preventDefault: true }
76
+ return
77
+ }
78
+ case 'Home':
79
+ case 'End':
80
+ case 'ArrowRight':
81
+ case 'ArrowLeft': {
82
+ const isArrowRight =
83
+ (event.key === 'ArrowRight' && dir === 'ltr') ||
84
+ (event.key === 'ArrowLeft' && dir === 'rtl')
85
+ if (!caretAtStart) return
86
+ if (!isArrowRight && !selected) return { select: { element: lastTag }, preventDefault: true }
87
+ if (isArrowRight && lastTag && selected === lastTag)
88
+ return { select: { element: undefined }, preventDefault: true }
89
+ if (selected) {
90
+ const element = arrowNavigation(event, selected, undefined, {
91
+ itemsArray: items,
92
+ loop: false,
93
+ dir,
94
+ })
95
+ return { select: element ? { element } : undefined, preventDefault: true }
96
+ }
97
+ return
98
+ }
99
+ case 'ArrowUp':
100
+ case 'ArrowDown':
101
+ return selected ? { preventDefault: true } : undefined
102
+ default:
103
+ return { select: { element: undefined }, preventDefault: false }
104
+ }
105
+ }
106
+
107
+ export function matchesTagsInputDelimiter(delimiter: string | RegExp, data: string) {
108
+ return delimiter === data || (delimiter instanceof RegExp && delimiter.test(data))
109
+ }
110
+
111
+ export function splitTagsInputPaste(value: string, delimiter: string | RegExp) {
112
+ return delimiter ? value.split(delimiter) : [value]
113
+ }
@@ -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 Radix UI:
24
+ MIT License
25
+
26
+ Copyright (c) 2022 WorkOS
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,106 @@
1
+ import { getTabbableCandidates } from '../focus-scope'
2
+
3
+ export const TOAST_SWIPE_START = 'toast.swipeStart'
4
+ export const TOAST_SWIPE_MOVE = 'toast.swipeMove'
5
+ export const TOAST_SWIPE_CANCEL = 'toast.swipeCancel'
6
+ export const TOAST_SWIPE_END = 'toast.swipeEnd'
7
+ export const VIEWPORT_PAUSE = 'toast.viewportPause'
8
+ export const VIEWPORT_RESUME = 'toast.viewportResume'
9
+
10
+ export type SwipeDirection = 'up' | 'down' | 'left' | 'right'
11
+
12
+ export interface SwipeDetail {
13
+ originalEvent: PointerEvent
14
+ delta: { x: number; y: number }
15
+ }
16
+
17
+ export type SwipeEvent = CustomEvent<SwipeDetail> & { currentTarget: HTMLElement }
18
+
19
+ export function dispatchSwipeEvent(
20
+ name: string,
21
+ target: EventTarget,
22
+ handler: ((event: SwipeEvent) => void) | undefined,
23
+ detail: SwipeDetail,
24
+ ) {
25
+ const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail })
26
+ if (handler) target.addEventListener(name, handler as unknown as EventListener, { once: true })
27
+ target.dispatchEvent(event)
28
+ }
29
+
30
+ export function isDeltaInDirection(
31
+ delta: { x: number; y: number },
32
+ direction: SwipeDirection,
33
+ threshold = 0,
34
+ ) {
35
+ const deltaX = Math.abs(delta.x)
36
+ const deltaY = Math.abs(delta.y)
37
+ const isDeltaX = deltaX > deltaY
38
+ if (direction === 'left' || direction === 'right') return isDeltaX && deltaX > threshold
39
+ return !isDeltaX && deltaY > threshold
40
+ }
41
+
42
+ export function swipeDelta(
43
+ start: { x: number; y: number },
44
+ point: { clientX: number; clientY: number },
45
+ direction: SwipeDirection,
46
+ ) {
47
+ const x = point.clientX - start.x
48
+ const y = point.clientY - start.y
49
+ const isHorizontalSwipe = ['left', 'right'].includes(direction)
50
+ const clamp = ['left', 'up'].includes(direction) ? Math.min : Math.max
51
+ return {
52
+ x,
53
+ y,
54
+ delta: { x: isHorizontalSwipe ? clamp(0, x) : 0, y: !isHorizontalSwipe ? clamp(0, y) : 0 },
55
+ }
56
+ }
57
+
58
+ export function swipeStartBuffer(pointerType: string) {
59
+ return pointerType === 'touch' ? 10 : 2
60
+ }
61
+
62
+ function isHTMLElement(node: Node): node is HTMLElement {
63
+ return node.nodeType === node.ELEMENT_NODE
64
+ }
65
+
66
+ export function getAnnounceTextContent(container: HTMLElement, prefix: 'reka' | 'radix') {
67
+ const textContent: string[] = []
68
+ const childNodes = Array.from(container.childNodes)
69
+ childNodes.forEach(node => {
70
+ if (node.nodeType === node.TEXT_NODE && node.textContent) textContent.push(node.textContent)
71
+ if (isHTMLElement(node)) {
72
+ const isHidden = node.ariaHidden || node.hidden || node.style.display === 'none'
73
+ const isExcluded = node.dataset[`${prefix}ToastAnnounceExclude`] === ''
74
+ if (!isHidden) {
75
+ if (isExcluded) {
76
+ const altText = node.dataset[`${prefix}ToastAnnounceAlt`]
77
+ if (altText) textContent.push(altText)
78
+ } else textContent.push(...getAnnounceTextContent(node, prefix))
79
+ }
80
+ }
81
+ })
82
+ return textContent
83
+ }
84
+
85
+ export function hotkeyMessage(hotkey: string[]) {
86
+ return hotkey.join('+').replace(/Key/g, '').replace(/Digit/g, '')
87
+ }
88
+
89
+ export function viewportLabel(label: string | ((hotkey: string) => string), hotkey: string) {
90
+ return typeof label === 'string' ? label.replace('{hotkey}', hotkey) : label(hotkey)
91
+ }
92
+
93
+ export function sortTabbableCandidates(
94
+ toasts: HTMLElement[],
95
+ tabbingDirection: 'forwards' | 'backwards',
96
+ ) {
97
+ const tabbableCandidates = toasts.map(toastNode => {
98
+ const toastTabbableCandidates = [toastNode, ...getTabbableCandidates(toastNode)]
99
+ return tabbingDirection === 'forwards'
100
+ ? toastTabbableCandidates
101
+ : toastTabbableCandidates.reverse()
102
+ })
103
+ return (
104
+ tabbingDirection === 'forwards' ? tabbableCandidates.reverse() : tabbableCandidates
105
+ ).flat()
106
+ }
@@ -0,0 +1,21 @@
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.
@@ -0,0 +1,248 @@
1
+ import { handleAndDispatchCustomEvent } from '../dismissable-layer'
2
+ import { findValuesBetween, type ListboxSelectionBehavior } from '../listbox'
3
+ import type { FocusIntent } from '../roving-focus'
4
+
5
+ export type TreeValue = Record<string, any>
6
+
7
+ export interface FlattenedItem<T> {
8
+ _id: string
9
+ index: number
10
+ value: T
11
+ level: number
12
+ hasChildren: boolean
13
+ parentItem?: T
14
+ bind: {
15
+ value: T
16
+ level: number
17
+ 'aria-setsize': number
18
+ 'aria-posinset': number
19
+ }
20
+ }
21
+
22
+ export interface TreeAccessors<T> {
23
+ getKey: (value: T) => string
24
+ getChildren: (value: T) => T[] | undefined
25
+ }
26
+
27
+ export const TREE_SELECT = 'tree.select'
28
+ export const TREE_TOGGLE = 'tree.toggle'
29
+
30
+ export const TREE_KEY_TO_INTENT: Record<string, FocusIntent> = {
31
+ ArrowLeft: 'prev',
32
+ ArrowUp: 'prev',
33
+ ArrowRight: 'next',
34
+ ArrowDown: 'next',
35
+ PageUp: 'first',
36
+ Home: 'first',
37
+ PageDown: 'last',
38
+ End: 'last',
39
+ }
40
+
41
+ export function defaultTreeChildren<T extends TreeValue>(value: T) {
42
+ return value.children as T[] | undefined
43
+ }
44
+
45
+ export function flatten<U, T extends { children?: any[] }>(items: T[]): U[] {
46
+ return items.reduce((acc: any[], item: T) => {
47
+ acc.push(item)
48
+ if (item.children) acc.push(...flatten(item.children))
49
+ return acc
50
+ }, [])
51
+ }
52
+
53
+ export function flattenTree<T>(
54
+ items: T[],
55
+ accessors: TreeAccessors<T>,
56
+ expanded: string[],
57
+ level = 1,
58
+ parentItem?: T,
59
+ ): FlattenedItem<T>[] {
60
+ return items.reduce((acc: FlattenedItem<T>[], item: T, index: number) => {
61
+ const key = accessors.getKey(item)
62
+ const children = accessors.getChildren(item)
63
+ acc.push({
64
+ _id: key,
65
+ value: item,
66
+ index,
67
+ level,
68
+ parentItem,
69
+ hasChildren: !!children,
70
+ bind: {
71
+ value: item,
72
+ level,
73
+ 'aria-setsize': items.length,
74
+ 'aria-posinset': index + 1,
75
+ },
76
+ })
77
+ if (children && expanded.includes(key))
78
+ acc.push(...flattenTree(children, accessors, expanded, level + 1, item))
79
+ return acc
80
+ }, [])
81
+ }
82
+
83
+ export function treeSelectedKeys<T>(
84
+ model: unknown,
85
+ multiple: boolean,
86
+ getKey: (value: T) => string,
87
+ ) {
88
+ if (multiple && Array.isArray(model)) return model.map(item => getKey(item as T))
89
+ return [getKey((model ?? {}) as T)]
90
+ }
91
+
92
+ export interface TreeSelectionOptions<T> extends TreeAccessors<T> {
93
+ multiple: boolean
94
+ selectionBehavior: ListboxSelectionBehavior
95
+ propagateSelect: boolean
96
+ bubbleSelect: boolean
97
+ flattened: FlattenedItem<T>[]
98
+ }
99
+
100
+ function bubbleSelection<T>(
101
+ item: FlattenedItem<T>,
102
+ model: T[],
103
+ options: TreeSelectionOptions<T>,
104
+ ): T[] {
105
+ const { getKey, getChildren, flattened } = options
106
+ if (item.parentItem == null || !options.multiple) return model
107
+ const parentItem = flattened.find(
108
+ entry => item.parentItem != null && getKey(entry.value) === getKey(item.parentItem),
109
+ )
110
+ if (parentItem == null) return model
111
+ const all = getChildren(parentItem.value)?.every(child =>
112
+ model.find(value => getKey(value) === getKey(child)),
113
+ )
114
+ const next = all
115
+ ? [...model, parentItem.value]
116
+ : model.filter(value => getKey(value) !== getKey(parentItem.value))
117
+ return bubbleSelection(parentItem, next, options)
118
+ }
119
+
120
+ export function nextTreeSelection<T>(
121
+ model: unknown,
122
+ value: T,
123
+ options: TreeSelectionOptions<T>,
124
+ ): { value: unknown; anchor: boolean } {
125
+ const { getKey, getChildren, multiple, selectionBehavior } = options
126
+ const condition = (base: unknown) => getKey((base ?? {}) as T) === getKey(value)
127
+ const exist = multiple && Array.isArray(model) ? model.findIndex(condition) !== -1 : undefined
128
+ let next: unknown
129
+ let anchor = false
130
+ if (multiple && Array.isArray(model)) {
131
+ if (selectionBehavior === 'replace') {
132
+ next = [value]
133
+ anchor = true
134
+ } else {
135
+ const index = model.findIndex(item => condition(item))
136
+ next = index !== -1 ? model.filter((_, i) => i !== index) : [...model, value]
137
+ }
138
+ } else if (selectionBehavior === 'replace') next = { ...value }
139
+ else if (!Array.isArray(model) && condition(model)) next = undefined
140
+ else next = { ...value }
141
+
142
+ if (options.bubbleSelect && multiple && Array.isArray(next)) {
143
+ const item = options.flattened.find(entry => getKey(entry.value) === getKey(value))
144
+ if (item != null) next = bubbleSelection(item, next as T[], options)
145
+ }
146
+
147
+ if (options.propagateSelect && multiple && Array.isArray(next)) {
148
+ const children = flatten<T, any>((getChildren(value) ?? []) as any[])
149
+ next = exist
150
+ ? (next as T[]).filter(
151
+ item => !children.some(child => getKey((item ?? {}) as T) === getKey(child)),
152
+ )
153
+ : [...(next as T[]), ...children]
154
+ }
155
+
156
+ return { value: next, anchor }
157
+ }
158
+
159
+ export function treeRangeValues(
160
+ intent: FocusIntent | undefined,
161
+ current: Element | null,
162
+ entries: { ref: HTMLElement; value?: unknown }[],
163
+ options: unknown[],
164
+ state: { firstValue: unknown; multiple: boolean; model: unknown },
165
+ ): unknown[] | null | undefined {
166
+ if (!state.firstValue || !state.multiple || !Array.isArray(state.model)) return
167
+ const lastValue = entries
168
+ .filter(item => item.ref.dataset.disabled !== '')
169
+ .find(item => item.ref === current)?.value
170
+ if (!lastValue) return
171
+ switch (intent) {
172
+ case 'prev':
173
+ case 'next':
174
+ return findValuesBetween(options, state.firstValue, lastValue)
175
+ case 'first':
176
+ return findValuesBetween(options, state.firstValue, options[0])
177
+ case 'last':
178
+ return findValuesBetween(options, state.firstValue, options.at(-1))
179
+ }
180
+ return null
181
+ }
182
+
183
+ export function toggleTreeExpanded(expanded: string[], key: string) {
184
+ return expanded.includes(key) ? expanded.filter(item => item !== key) : [...expanded, key]
185
+ }
186
+
187
+ export function treeIndeterminate<T>(input: {
188
+ value: T
189
+ model: unknown
190
+ isSelected: boolean
191
+ hasChildren: boolean
192
+ bubbleSelect: boolean
193
+ propagateSelect: boolean
194
+ getKey: (value: T) => string
195
+ getChildren: (value: T) => T[] | undefined
196
+ }) {
197
+ const { model, getKey } = input
198
+ if (!input.hasChildren || !Array.isArray(model)) return undefined
199
+ const found = (child: T) => model.find(item => getKey(item as T) === getKey(child))
200
+ if (input.bubbleSelect) {
201
+ const children = flatten<T, any>((input.getChildren(input.value) || []) as any[])
202
+ return children.some(found) && !children.every(found)
203
+ }
204
+ if (input.propagateSelect && input.isSelected) {
205
+ const children = flatten<T, any>((input.getChildren(input.value) || []) as any[])
206
+ return !children.every(found)
207
+ }
208
+ return undefined
209
+ }
210
+
211
+ function indent(element: HTMLElement) {
212
+ return Number(element.getAttribute('data-indent'))
213
+ }
214
+
215
+ export function treeChildTarget(collection: HTMLElement[], current: Element | null, level: number) {
216
+ const index = collection.indexOf(current as HTMLElement)
217
+ return collection.slice(index).find(element => indent(element) === level + 1)
218
+ }
219
+
220
+ export function treeParentTarget(
221
+ collection: HTMLElement[],
222
+ current: Element | null,
223
+ level: number,
224
+ ) {
225
+ const index = collection.indexOf(current as HTMLElement)
226
+ return collection
227
+ .slice(0, index)
228
+ .reverse()
229
+ .find(element => indent(element) === level - 1)
230
+ }
231
+
232
+ export interface TreeItemEventDetail<T> {
233
+ originalEvent: Event
234
+ value?: T
235
+ isExpanded: boolean
236
+ isSelected: boolean
237
+ }
238
+
239
+ export type TreeItemSelectEvent<T> = CustomEvent<TreeItemEventDetail<T>>
240
+ export type TreeItemToggleEvent<T> = CustomEvent<TreeItemEventDetail<T>>
241
+
242
+ export function dispatchTreeItemEvent<T>(
243
+ name: typeof TREE_SELECT | typeof TREE_TOGGLE,
244
+ handler: (event: CustomEvent<TreeItemEventDetail<T>>) => void,
245
+ detail: TreeItemEventDetail<T>,
246
+ ) {
247
+ handleAndDispatchCustomEvent<CustomEvent<TreeItemEventDetail<T>>>(name, handler, detail)
248
+ }
@@ -11,6 +11,7 @@
11
11
  @import './data-table.css';
12
12
  @import './timeline.css';
13
13
  @import './stepper.css';
14
+ @import './tour.css';
14
15
  @import './float-button.css';
15
16
  @import './line-clamp.css';
16
17
  @import './pin-input.css';
@@ -0,0 +1,29 @@
1
+ @keyframes hn-tour-hole-in {
2
+ from {
3
+ clip-path: var(--hn-tour-hole-origin);
4
+ }
5
+ }
6
+
7
+ @keyframes hn-tour-hole-out {
8
+ from {
9
+ clip-path: var(--hn-tour-hole);
10
+ }
11
+ to {
12
+ clip-path: var(--hn-tour-hole-origin);
13
+ }
14
+ }
15
+
16
+ @utility hn-tour-mask {
17
+ transition: clip-path var(--hn-duration-base) var(--hn-ease-move);
18
+
19
+ &[data-state='open'][data-hn-tour-hole='shown'] {
20
+ animation:
21
+ hn-fade-in var(--hn-duration-base) var(--hn-ease-enter),
22
+ hn-tour-hole-in var(--hn-duration-base) var(--hn-ease-enter);
23
+ }
24
+ &[data-state='open'][data-hn-tour-hole='hidden'] {
25
+ animation:
26
+ hn-fade-in var(--hn-duration-base) var(--hn-ease-enter),
27
+ hn-tour-hole-out var(--hn-duration-exit) var(--hn-ease-exit);
28
+ }
29
+ }
@@ -2,7 +2,7 @@ import { tv, type VariantProps } from '../lib/tv'
2
2
 
3
3
  export const navLink = tv({
4
4
  base: [
5
- 'hn-interactive hn-state-layer hn-press-none relative isolate flex cursor-pointer items-center',
5
+ 'hn-interactive hn-state-layer hn-press-none relative isolate flex min-w-0 cursor-pointer items-center',
6
6
  'data-disabled:pointer-events-none data-disabled:opacity-50',
7
7
  'h-9 gap-[var(--hn-control-gap)] rounded-md ps-2.5 pe-2 text-sm select-none',
8
8
  '[&_svg]:size-4 [&_svg]:shrink-0',
@@ -17,5 +17,9 @@ export const navLink = tv({
17
17
  })
18
18
 
19
19
  export const navLinkLabel = tv({
20
- base: 'hn-sidebar-label shrink-0 whitespace-nowrap',
20
+ base: 'hn-sidebar-label min-w-0 truncate',
21
+ })
22
+
23
+ export const navLinkTrailing = tv({
24
+ base: 'hn-sidebar-label ms-auto flex shrink-0 items-center',
21
25
  })
@@ -0,0 +1,29 @@
1
+ import { tv } from '../lib/tv'
2
+
3
+ export const tourMask = tv({ base: 'hn-scrim hn-tour-mask' })
4
+
5
+ export const tourBlocker = tv({ base: 'fixed z-(--hn-z-overlay)' })
6
+
7
+ export const tourCard = tv({
8
+ base: 'relative z-(--hn-z-overlay) flex w-80 max-w-[calc(100vw-2rem)] flex-col gap-3 overflow-visible p-4 shadow-lg outline-none',
9
+ })
10
+
11
+ export const tourCentered = tv({
12
+ base: 'pointer-events-none fixed inset-0 z-(--hn-z-overlay) grid place-items-center p-4 [&>*]:pointer-events-auto',
13
+ })
14
+
15
+ export const tourBeacon = tv({
16
+ base: 'hn-focus-ring fixed z-(--hn-z-overlay) size-4 -translate-x-1/2 -translate-y-1/2 cursor-pointer rounded-full',
17
+ })
18
+
19
+ export const tourBeaconPulse = tv({
20
+ base: 'hn-ping bg-accent pointer-events-none absolute inset-0 rounded-full',
21
+ })
22
+
23
+ export const tourBeaconDot = tv({
24
+ base: 'bg-accent ring-surface pointer-events-none relative block size-full rounded-full ring-2',
25
+ })
26
+
27
+ export const tourHeader = tv({ base: 'flex items-start gap-2' })
28
+
29
+ export const tourFooter = tv({ base: 'flex items-center gap-2' })