@hina-ui/vue 1.7.6 → 1.7.7

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 (688) hide show
  1. package/dist/index.js +6723 -198
  2. package/dist/index.js.map +1 -1
  3. package/dist/shared/lib/float-button.ts +14 -0
  4. package/dist/shared/primitives/accordion/LICENSE +21 -0
  5. package/dist/shared/primitives/accordion/index.ts +34 -0
  6. package/dist/shared/primitives/arrow-navigation/LICENSE +21 -0
  7. package/dist/shared/primitives/arrow-navigation/index.ts +90 -0
  8. package/dist/shared/primitives/body-scroll-lock/LICENSE +21 -0
  9. package/dist/shared/primitives/body-scroll-lock/index.ts +115 -0
  10. package/dist/shared/primitives/checkbox/LICENSE +21 -0
  11. package/dist/shared/primitives/checkbox/index.ts +23 -0
  12. package/dist/shared/primitives/collapsible/LICENSE +21 -0
  13. package/dist/shared/primitives/collapsible/index.ts +31 -0
  14. package/dist/shared/primitives/collection/LICENSE +21 -0
  15. package/dist/shared/primitives/collection/index.ts +19 -0
  16. package/dist/shared/primitives/dismissable-layer/LICENSE +21 -0
  17. package/dist/shared/primitives/dismissable-layer/index.ts +203 -0
  18. package/dist/shared/primitives/focus-guards/LICENSE +21 -0
  19. package/dist/shared/primitives/focus-guards/index.ts +24 -0
  20. package/dist/shared/primitives/focus-scope/LICENSE +21 -0
  21. package/dist/shared/primitives/focus-scope/index.ts +216 -0
  22. package/dist/shared/primitives/label/LICENSE +21 -0
  23. package/dist/shared/primitives/label/index.ts +4 -0
  24. package/dist/shared/primitives/pagination/LICENSE +21 -0
  25. package/dist/shared/primitives/pagination/index.ts +99 -0
  26. package/dist/shared/primitives/pin-input/LICENSE +21 -0
  27. package/dist/shared/primitives/pin-input/index.ts +126 -0
  28. package/dist/shared/primitives/presence/LICENSE +21 -0
  29. package/dist/shared/primitives/presence/index.ts +135 -0
  30. package/dist/shared/primitives/progress/LICENSE +21 -0
  31. package/dist/shared/primitives/progress/index.ts +41 -0
  32. package/dist/shared/primitives/radio-group/LICENSE +21 -0
  33. package/dist/shared/primitives/radio-group/index.ts +46 -0
  34. package/dist/shared/primitives/rating/LICENSE +21 -0
  35. package/dist/shared/primitives/rating/index.ts +37 -0
  36. package/dist/shared/primitives/roving-focus/LICENSE +21 -0
  37. package/dist/shared/primitives/roving-focus/index.ts +44 -0
  38. package/dist/shared/primitives/separator/LICENSE +21 -0
  39. package/dist/shared/primitives/separator/index.ts +14 -0
  40. package/dist/shared/primitives/size/LICENSE +21 -0
  41. package/dist/shared/primitives/size/index.ts +19 -0
  42. package/dist/shared/primitives/slider/LICENSE +21 -0
  43. package/dist/shared/primitives/slider/index.ts +183 -0
  44. package/dist/shared/primitives/splitter/LICENSE +21 -0
  45. package/dist/shared/primitives/splitter/arrays.ts +6 -0
  46. package/dist/shared/primitives/splitter/assert.ts +9 -0
  47. package/dist/shared/primitives/splitter/calculate.ts +139 -0
  48. package/dist/shared/primitives/splitter/callPanelCallbacks.ts +40 -0
  49. package/dist/shared/primitives/splitter/compare.ts +13 -0
  50. package/dist/shared/primitives/splitter/constants.ts +1 -0
  51. package/dist/shared/primitives/splitter/debounce.ts +10 -0
  52. package/dist/shared/primitives/splitter/dom.ts +64 -0
  53. package/dist/shared/primitives/splitter/events.ts +29 -0
  54. package/dist/shared/primitives/splitter/flags.ts +4 -0
  55. package/dist/shared/primitives/splitter/layout.ts +153 -0
  56. package/dist/shared/primitives/splitter/pivot.ts +10 -0
  57. package/dist/shared/primitives/splitter/rects.ts +24 -0
  58. package/dist/shared/primitives/splitter/registry.ts +231 -0
  59. package/dist/shared/primitives/splitter/resizePanel.ts +30 -0
  60. package/dist/shared/primitives/splitter/stackingOrder.ts +88 -0
  61. package/dist/shared/primitives/splitter/storage.ts +95 -0
  62. package/dist/shared/primitives/splitter/style.ts +95 -0
  63. package/dist/shared/primitives/splitter/types.ts +48 -0
  64. package/dist/shared/primitives/splitter/units.ts +123 -0
  65. package/dist/shared/primitives/splitter/validation.ts +55 -0
  66. package/dist/shared/primitives/stepper/LICENSE +21 -0
  67. package/dist/shared/primitives/stepper/index.ts +58 -0
  68. package/dist/shared/primitives/tabs/LICENSE +21 -0
  69. package/dist/shared/primitives/tabs/index.ts +18 -0
  70. package/dist/shared/primitives/toggle/LICENSE +21 -0
  71. package/dist/shared/primitives/toggle/index.ts +5 -0
  72. package/dist/shared/primitives/value/LICENSE +21 -0
  73. package/dist/shared/primitives/value/index.ts +80 -0
  74. package/dist/shared/primitives/visually-hidden/LICENSE +21 -0
  75. package/dist/shared/primitives/visually-hidden/index.ts +25 -0
  76. package/dist/shared/styles/float-button.css +20 -6
  77. package/dist/shared/variants/panel.ts +5 -0
  78. package/dist/types/shared/src/lib/float-button.d.ts +15 -0
  79. package/dist/types/shared/src/lib/float-button.d.ts.map +1 -0
  80. package/dist/types/shared/src/primitives/accordion/index.d.ts +9 -0
  81. package/dist/types/shared/src/primitives/accordion/index.d.ts.map +1 -0
  82. package/dist/types/shared/src/primitives/arrow-navigation/index.d.ts +12 -0
  83. package/dist/types/shared/src/primitives/arrow-navigation/index.d.ts.map +1 -0
  84. package/dist/types/shared/src/primitives/checkbox/index.d.ts +6 -0
  85. package/dist/types/shared/src/primitives/checkbox/index.d.ts.map +1 -0
  86. package/dist/types/shared/src/primitives/collapsible/index.d.ts +12 -0
  87. package/dist/types/shared/src/primitives/collapsible/index.d.ts.map +1 -0
  88. package/dist/types/shared/src/primitives/collection/index.d.ts +6 -0
  89. package/dist/types/shared/src/primitives/collection/index.d.ts.map +1 -0
  90. package/dist/types/shared/src/primitives/dismissable-layer/index.d.ts +41 -0
  91. package/dist/types/shared/src/primitives/dismissable-layer/index.d.ts.map +1 -0
  92. package/dist/types/shared/src/primitives/focus-scope/index.d.ts +51 -0
  93. package/dist/types/shared/src/primitives/focus-scope/index.d.ts.map +1 -0
  94. package/dist/types/shared/src/primitives/label/index.d.ts +2 -0
  95. package/dist/types/shared/src/primitives/label/index.d.ts.map +1 -0
  96. package/dist/types/shared/src/primitives/pagination/index.d.ts +17 -0
  97. package/dist/types/shared/src/primitives/pagination/index.d.ts.map +1 -0
  98. package/dist/types/shared/src/primitives/pin-input/index.d.ts +31 -0
  99. package/dist/types/shared/src/primitives/pin-input/index.d.ts.map +1 -0
  100. package/dist/types/shared/src/primitives/presence/index.d.ts +14 -0
  101. package/dist/types/shared/src/primitives/presence/index.d.ts.map +1 -0
  102. package/dist/types/shared/src/primitives/progress/index.d.ts +10 -0
  103. package/dist/types/shared/src/primitives/progress/index.d.ts.map +1 -0
  104. package/dist/types/shared/src/primitives/radio-group/index.d.ts +12 -0
  105. package/dist/types/shared/src/primitives/radio-group/index.d.ts.map +1 -0
  106. package/dist/types/shared/src/primitives/rating/index.d.ts +8 -0
  107. package/dist/types/shared/src/primitives/rating/index.d.ts.map +1 -0
  108. package/dist/types/shared/src/primitives/roving-focus/index.d.ts +13 -0
  109. package/dist/types/shared/src/primitives/roving-focus/index.d.ts.map +1 -0
  110. package/dist/types/shared/src/primitives/separator/index.d.ts +10 -0
  111. package/dist/types/shared/src/primitives/separator/index.d.ts.map +1 -0
  112. package/dist/types/shared/src/primitives/size/index.d.ts +7 -0
  113. package/dist/types/shared/src/primitives/size/index.d.ts.map +1 -0
  114. package/dist/types/shared/src/primitives/slider/index.d.ts +60 -0
  115. package/dist/types/shared/src/primitives/slider/index.d.ts.map +1 -0
  116. package/dist/types/shared/src/primitives/splitter/arrays.d.ts +2 -0
  117. package/dist/types/shared/src/primitives/splitter/arrays.d.ts.map +1 -0
  118. package/dist/types/shared/src/primitives/splitter/assert.d.ts +2 -0
  119. package/dist/types/shared/src/primitives/splitter/assert.d.ts.map +1 -0
  120. package/dist/types/shared/src/primitives/splitter/calculate.d.ts +15 -0
  121. package/dist/types/shared/src/primitives/splitter/calculate.d.ts.map +1 -0
  122. package/dist/types/shared/src/primitives/splitter/callPanelCallbacks.d.ts +3 -0
  123. package/dist/types/shared/src/primitives/splitter/callPanelCallbacks.d.ts.map +1 -0
  124. package/dist/types/shared/src/primitives/splitter/compare.d.ts +3 -0
  125. package/dist/types/shared/src/primitives/splitter/compare.d.ts.map +1 -0
  126. package/dist/types/shared/src/primitives/splitter/constants.d.ts +2 -0
  127. package/dist/types/shared/src/primitives/splitter/constants.d.ts.map +1 -0
  128. package/dist/types/shared/src/primitives/splitter/debounce.d.ts +2 -0
  129. package/dist/types/shared/src/primitives/splitter/debounce.d.ts.map +1 -0
  130. package/dist/types/shared/src/primitives/splitter/dom.d.ts +8 -0
  131. package/dist/types/shared/src/primitives/splitter/dom.d.ts.map +1 -0
  132. package/dist/types/shared/src/primitives/splitter/events.d.ts +10 -0
  133. package/dist/types/shared/src/primitives/splitter/events.d.ts.map +1 -0
  134. package/dist/types/shared/src/primitives/splitter/flags.d.ts +5 -0
  135. package/dist/types/shared/src/primitives/splitter/flags.d.ts.map +1 -0
  136. package/dist/types/shared/src/primitives/splitter/layout.d.ts +10 -0
  137. package/dist/types/shared/src/primitives/splitter/layout.d.ts.map +1 -0
  138. package/dist/types/shared/src/primitives/splitter/pivot.d.ts +2 -0
  139. package/dist/types/shared/src/primitives/splitter/pivot.d.ts.map +1 -0
  140. package/dist/types/shared/src/primitives/splitter/rects.d.ts +8 -0
  141. package/dist/types/shared/src/primitives/splitter/rects.d.ts.map +1 -0
  142. package/dist/types/shared/src/primitives/splitter/registry.d.ts +5 -0
  143. package/dist/types/shared/src/primitives/splitter/registry.d.ts.map +1 -0
  144. package/dist/types/shared/src/primitives/splitter/resizePanel.d.ts +7 -0
  145. package/dist/types/shared/src/primitives/splitter/resizePanel.d.ts.map +1 -0
  146. package/dist/types/shared/src/primitives/splitter/stackingOrder.d.ts +2 -0
  147. package/dist/types/shared/src/primitives/splitter/stackingOrder.d.ts.map +1 -0
  148. package/dist/types/shared/src/primitives/splitter/storage.d.ts +9 -0
  149. package/dist/types/shared/src/primitives/splitter/storage.d.ts.map +1 -0
  150. package/dist/types/shared/src/primitives/splitter/style.d.ts +21 -0
  151. package/dist/types/shared/src/primitives/splitter/style.d.ts.map +1 -0
  152. package/dist/types/shared/src/primitives/splitter/types.d.ts +42 -0
  153. package/dist/types/shared/src/primitives/splitter/types.d.ts.map +1 -0
  154. package/dist/types/shared/src/primitives/splitter/units.d.ts +13 -0
  155. package/dist/types/shared/src/primitives/splitter/units.d.ts.map +1 -0
  156. package/dist/types/shared/src/primitives/splitter/validation.d.ts +6 -0
  157. package/dist/types/shared/src/primitives/splitter/validation.d.ts.map +1 -0
  158. package/dist/types/shared/src/primitives/stepper/index.d.ts +21 -0
  159. package/dist/types/shared/src/primitives/stepper/index.d.ts.map +1 -0
  160. package/dist/types/shared/src/primitives/tabs/index.d.ts +7 -0
  161. package/dist/types/shared/src/primitives/tabs/index.d.ts.map +1 -0
  162. package/dist/types/shared/src/primitives/toggle/index.d.ts +3 -0
  163. package/dist/types/shared/src/primitives/toggle/index.d.ts.map +1 -0
  164. package/dist/types/shared/src/primitives/value/index.d.ts +15 -0
  165. package/dist/types/shared/src/primitives/value/index.d.ts.map +1 -0
  166. package/dist/types/shared/src/primitives/visually-hidden/index.d.ts +19 -0
  167. package/dist/types/shared/src/primitives/visually-hidden/index.d.ts.map +1 -0
  168. package/dist/types/shared/src/variants/panel.d.ts +13 -1
  169. package/dist/types/shared/src/variants/panel.d.ts.map +1 -1
  170. package/dist/types/vue/src/components/accordion/Accordion.vue.d.ts.map +1 -1
  171. package/dist/types/vue/src/components/breadcrumb/BreadcrumbItem.vue.d.ts +2 -2
  172. package/dist/types/vue/src/components/breadcrumb/BreadcrumbItem.vue.d.ts.map +1 -1
  173. package/dist/types/vue/src/components/button/Button.vue.d.ts +2 -2
  174. package/dist/types/vue/src/components/button/Button.vue.d.ts.map +1 -1
  175. package/dist/types/vue/src/components/card/Card.vue.d.ts +2 -2
  176. package/dist/types/vue/src/components/card/Card.vue.d.ts.map +1 -1
  177. package/dist/types/vue/src/components/carousel/composables/useCarousel.d.ts +1 -1
  178. package/dist/types/vue/src/components/chip/Chip.vue.d.ts +1 -1
  179. package/dist/types/vue/src/components/chip/Chip.vue.d.ts.map +1 -1
  180. package/dist/types/vue/src/components/chip/composables/useChipRoot.d.ts +2 -2
  181. package/dist/types/vue/src/components/chip/composables/useChipRoot.d.ts.map +1 -1
  182. package/dist/types/vue/src/components/collapsible/Collapsible.vue.d.ts.map +1 -1
  183. package/dist/types/vue/src/components/data-list/DataList.vue.d.ts +2 -2
  184. package/dist/types/vue/src/components/data-table/DataTable.vue.d.ts +2 -2
  185. package/dist/types/vue/src/components/float-button/FloatButton.vue.d.ts +1 -1
  186. package/dist/types/vue/src/components/float-button/FloatButton.vue.d.ts.map +1 -1
  187. package/dist/types/vue/src/components/float-button/types.d.ts +3 -2
  188. package/dist/types/vue/src/components/float-button/types.d.ts.map +1 -1
  189. package/dist/types/vue/src/components/heading/Heading.vue.d.ts.map +1 -1
  190. package/dist/types/vue/src/components/icon-button/IconButton.vue.d.ts +2 -2
  191. package/dist/types/vue/src/components/icon-button/IconButton.vue.d.ts.map +1 -1
  192. package/dist/types/vue/src/components/image/Image.vue.d.ts.map +1 -1
  193. package/dist/types/vue/src/components/indicator/Indicator.vue.d.ts +2 -2
  194. package/dist/types/vue/src/components/indicator/Indicator.vue.d.ts.map +1 -1
  195. package/dist/types/vue/src/components/link/Link.vue.d.ts +2 -2
  196. package/dist/types/vue/src/components/link/Link.vue.d.ts.map +1 -1
  197. package/dist/types/vue/src/components/multi-select/MultiSelect.vue.d.ts.map +1 -1
  198. package/dist/types/vue/src/components/nav-link/NavLink.vue.d.ts +9 -5
  199. package/dist/types/vue/src/components/nav-link/NavLink.vue.d.ts.map +1 -1
  200. package/dist/types/vue/src/components/nav-link/NavLinkChild.d.ts +27 -0
  201. package/dist/types/vue/src/components/nav-link/NavLinkChild.d.ts.map +1 -0
  202. package/dist/types/vue/src/components/navigation-menu/NavigationMenuLink.vue.d.ts +2 -2
  203. package/dist/types/vue/src/components/navigation-menu/NavigationMenuLink.vue.d.ts.map +1 -1
  204. package/dist/types/vue/src/components/pagination/PaginationControl.vue.d.ts.map +1 -1
  205. package/dist/types/vue/src/components/prev-next/PrevNextLink.vue.d.ts +2 -2
  206. package/dist/types/vue/src/components/prev-next/PrevNextLink.vue.d.ts.map +1 -1
  207. package/dist/types/vue/src/components/prose/Prose.vue.d.ts +2 -2
  208. package/dist/types/vue/src/components/prose/Prose.vue.d.ts.map +1 -1
  209. package/dist/types/vue/src/components/section/Section.vue.d.ts.map +1 -1
  210. package/dist/types/vue/src/components/segmented-control/SegmentedControl.vue.d.ts.map +1 -1
  211. package/dist/types/vue/src/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  212. package/dist/types/vue/src/components/sidebar/context.d.ts +2 -0
  213. package/dist/types/vue/src/components/sidebar/context.d.ts.map +1 -1
  214. package/dist/types/vue/src/components/slider/SliderHandle.vue.d.ts.map +1 -1
  215. package/dist/types/vue/src/components/split-button/SplitButton.vue.d.ts +1 -1
  216. package/dist/types/vue/src/components/split-button/types.d.ts +1 -1
  217. package/dist/types/vue/src/components/split-button/types.d.ts.map +1 -1
  218. package/dist/types/vue/src/components/tag/Tag.vue.d.ts +2 -2
  219. package/dist/types/vue/src/components/tag/Tag.vue.d.ts.map +1 -1
  220. package/dist/types/vue/src/components/text/Text.vue.d.ts +2 -2
  221. package/dist/types/vue/src/components/text/Text.vue.d.ts.map +1 -1
  222. package/dist/types/vue/src/components/time/Time.vue.d.ts +2 -0
  223. package/dist/types/vue/src/components/time/Time.vue.d.ts.map +1 -1
  224. package/dist/types/vue/src/components/toast/Toaster.vue.d.ts.map +1 -1
  225. package/dist/types/vue/src/components/toggle/Toggle.vue.d.ts.map +1 -1
  226. package/dist/types/vue/src/components/toolbar/ToolbarControl.vue.d.ts +1 -1
  227. package/dist/types/vue/src/components/toolbar/ToolbarLink.vue.d.ts +1 -1
  228. package/dist/types/vue/src/components/toolbar/ToolbarToggleGroup.vue.d.ts.map +1 -1
  229. package/dist/types/vue/src/components/toolbar/types.d.ts +1 -1
  230. package/dist/types/vue/src/components/toolbar/types.d.ts.map +1 -1
  231. package/dist/types/vue/src/components/virtual-list/composables/useVirtualList.d.ts +1 -1
  232. package/dist/types/vue/src/components/visually-hidden/VisuallyHidden.vue.d.ts +2 -2
  233. package/dist/types/vue/src/components/visually-hidden/VisuallyHidden.vue.d.ts.map +1 -1
  234. package/dist/types/vue/src/lib/useDirection.d.ts +2 -2
  235. package/dist/types/vue/src/lib/useDirection.d.ts.map +1 -1
  236. package/dist/types/vue/src/primitives/accordion/AccordionContent.d.ts +40 -0
  237. package/dist/types/vue/src/primitives/accordion/AccordionContent.d.ts.map +1 -0
  238. package/dist/types/vue/src/primitives/accordion/AccordionHeader.d.ts +33 -0
  239. package/dist/types/vue/src/primitives/accordion/AccordionHeader.d.ts.map +1 -0
  240. package/dist/types/vue/src/primitives/accordion/AccordionItem.d.ts +61 -0
  241. package/dist/types/vue/src/primitives/accordion/AccordionItem.d.ts.map +1 -0
  242. package/dist/types/vue/src/primitives/accordion/AccordionRoot.d.ts +122 -0
  243. package/dist/types/vue/src/primitives/accordion/AccordionRoot.d.ts.map +1 -0
  244. package/dist/types/vue/src/primitives/accordion/AccordionTrigger.d.ts +30 -0
  245. package/dist/types/vue/src/primitives/accordion/AccordionTrigger.d.ts.map +1 -0
  246. package/dist/types/vue/src/primitives/accordion/context.d.ts +27 -0
  247. package/dist/types/vue/src/primitives/accordion/context.d.ts.map +1 -0
  248. package/dist/types/vue/src/primitives/accordion/index.d.ts +7 -0
  249. package/dist/types/vue/src/primitives/accordion/index.d.ts.map +1 -0
  250. package/dist/types/vue/src/primitives/aspect-ratio/AspectRatio.d.ts +42 -0
  251. package/dist/types/vue/src/primitives/aspect-ratio/AspectRatio.d.ts.map +1 -0
  252. package/dist/types/vue/src/primitives/aspect-ratio/index.d.ts +2 -0
  253. package/dist/types/vue/src/primitives/aspect-ratio/index.d.ts.map +1 -0
  254. package/dist/types/vue/src/primitives/checkbox/CheckboxGroupRoot.d.ts +121 -0
  255. package/dist/types/vue/src/primitives/checkbox/CheckboxGroupRoot.d.ts.map +1 -0
  256. package/dist/types/vue/src/primitives/checkbox/CheckboxRoot.d.ts +127 -0
  257. package/dist/types/vue/src/primitives/checkbox/CheckboxRoot.d.ts.map +1 -0
  258. package/dist/types/vue/src/primitives/checkbox/context.d.ts +14 -0
  259. package/dist/types/vue/src/primitives/checkbox/context.d.ts.map +1 -0
  260. package/dist/types/vue/src/primitives/checkbox/index.d.ts +4 -0
  261. package/dist/types/vue/src/primitives/checkbox/index.d.ts.map +1 -0
  262. package/dist/types/vue/src/primitives/collapsible/CollapsibleContent.d.ts +45 -0
  263. package/dist/types/vue/src/primitives/collapsible/CollapsibleContent.d.ts.map +1 -0
  264. package/dist/types/vue/src/primitives/collapsible/CollapsibleRoot.d.ts +81 -0
  265. package/dist/types/vue/src/primitives/collapsible/CollapsibleRoot.d.ts.map +1 -0
  266. package/dist/types/vue/src/primitives/collapsible/CollapsibleTrigger.d.ts +33 -0
  267. package/dist/types/vue/src/primitives/collapsible/CollapsibleTrigger.d.ts.map +1 -0
  268. package/dist/types/vue/src/primitives/collapsible/context.d.ts +10 -0
  269. package/dist/types/vue/src/primitives/collapsible/context.d.ts.map +1 -0
  270. package/dist/types/vue/src/primitives/collapsible/index.d.ts +5 -0
  271. package/dist/types/vue/src/primitives/collapsible/index.d.ts.map +1 -0
  272. package/dist/types/vue/src/primitives/collection/index.d.ts +28 -0
  273. package/dist/types/vue/src/primitives/collection/index.d.ts.map +1 -0
  274. package/dist/types/vue/src/primitives/number-field/NumberFieldDecrement.vue.d.ts +2 -2
  275. package/dist/types/vue/src/primitives/number-field/NumberFieldDecrement.vue.d.ts.map +1 -1
  276. package/dist/types/vue/src/primitives/number-field/NumberFieldIncrement.vue.d.ts +2 -2
  277. package/dist/types/vue/src/primitives/number-field/NumberFieldIncrement.vue.d.ts.map +1 -1
  278. package/dist/types/vue/src/primitives/number-field/NumberFieldInput.vue.d.ts +2 -2
  279. package/dist/types/vue/src/primitives/number-field/NumberFieldInput.vue.d.ts.map +1 -1
  280. package/dist/types/vue/src/primitives/number-field/NumberFieldRoot.vue.d.ts +2 -2
  281. package/dist/types/vue/src/primitives/number-field/NumberFieldRoot.vue.d.ts.map +1 -1
  282. package/dist/types/vue/src/primitives/pagination/PaginationEdge.d.ts +111 -0
  283. package/dist/types/vue/src/primitives/pagination/PaginationEdge.d.ts.map +1 -0
  284. package/dist/types/vue/src/primitives/pagination/PaginationList.d.ts +30 -0
  285. package/dist/types/vue/src/primitives/pagination/PaginationList.d.ts.map +1 -0
  286. package/dist/types/vue/src/primitives/pagination/PaginationListItem.d.ts +42 -0
  287. package/dist/types/vue/src/primitives/pagination/PaginationListItem.d.ts.map +1 -0
  288. package/dist/types/vue/src/primitives/pagination/PaginationRoot.d.ts +114 -0
  289. package/dist/types/vue/src/primitives/pagination/PaginationRoot.d.ts.map +1 -0
  290. package/dist/types/vue/src/primitives/pagination/context.d.ts +11 -0
  291. package/dist/types/vue/src/primitives/pagination/context.d.ts.map +1 -0
  292. package/dist/types/vue/src/primitives/pagination/index.d.ts +6 -0
  293. package/dist/types/vue/src/primitives/pagination/index.d.ts.map +1 -0
  294. package/dist/types/vue/src/primitives/pin-input/PinInputInput.d.ts +52 -0
  295. package/dist/types/vue/src/primitives/pin-input/PinInputInput.d.ts.map +1 -0
  296. package/dist/types/vue/src/primitives/pin-input/PinInputRoot.d.ts +149 -0
  297. package/dist/types/vue/src/primitives/pin-input/PinInputRoot.d.ts.map +1 -0
  298. package/dist/types/vue/src/primitives/pin-input/context.d.ts +20 -0
  299. package/dist/types/vue/src/primitives/pin-input/context.d.ts.map +1 -0
  300. package/dist/types/vue/src/primitives/pin-input/index.d.ts +4 -0
  301. package/dist/types/vue/src/primitives/pin-input/index.d.ts.map +1 -0
  302. package/dist/types/vue/src/primitives/presence/Presence.d.ts +31 -0
  303. package/dist/types/vue/src/primitives/presence/Presence.d.ts.map +1 -0
  304. package/dist/types/vue/src/primitives/presence/index.d.ts +3 -0
  305. package/dist/types/vue/src/primitives/presence/index.d.ts.map +1 -0
  306. package/dist/types/vue/src/primitives/presence/usePresence.d.ts +5 -0
  307. package/dist/types/vue/src/primitives/presence/usePresence.d.ts.map +1 -0
  308. package/dist/types/vue/src/primitives/primitive/Primitive.d.ts +31 -0
  309. package/dist/types/vue/src/primitives/primitive/Primitive.d.ts.map +1 -0
  310. package/dist/types/vue/src/primitives/primitive/Slot.d.ts +6 -0
  311. package/dist/types/vue/src/primitives/primitive/Slot.d.ts.map +1 -0
  312. package/dist/types/vue/src/primitives/primitive/index.d.ts +3 -0
  313. package/dist/types/vue/src/primitives/primitive/index.d.ts.map +1 -0
  314. package/dist/types/vue/src/primitives/progress/ProgressIndicator.vue.d.ts +14 -0
  315. package/dist/types/vue/src/primitives/progress/ProgressIndicator.vue.d.ts.map +1 -0
  316. package/dist/types/vue/src/primitives/progress/ProgressRoot.vue.d.ts +33 -0
  317. package/dist/types/vue/src/primitives/progress/ProgressRoot.vue.d.ts.map +1 -0
  318. package/dist/types/vue/src/primitives/progress/context.d.ts +9 -0
  319. package/dist/types/vue/src/primitives/progress/context.d.ts.map +1 -0
  320. package/dist/types/vue/src/primitives/progress/index.d.ts +4 -0
  321. package/dist/types/vue/src/primitives/progress/index.d.ts.map +1 -0
  322. package/dist/types/vue/src/primitives/radio-group/Radio.d.ts +88 -0
  323. package/dist/types/vue/src/primitives/radio-group/Radio.d.ts.map +1 -0
  324. package/dist/types/vue/src/primitives/radio-group/RadioGroupIndicator.d.ts +43 -0
  325. package/dist/types/vue/src/primitives/radio-group/RadioGroupIndicator.d.ts.map +1 -0
  326. package/dist/types/vue/src/primitives/radio-group/RadioGroupItem.d.ts +85 -0
  327. package/dist/types/vue/src/primitives/radio-group/RadioGroupItem.d.ts.map +1 -0
  328. package/dist/types/vue/src/primitives/radio-group/RadioGroupRoot.d.ts +119 -0
  329. package/dist/types/vue/src/primitives/radio-group/RadioGroupRoot.d.ts.map +1 -0
  330. package/dist/types/vue/src/primitives/radio-group/context.d.ts +19 -0
  331. package/dist/types/vue/src/primitives/radio-group/context.d.ts.map +1 -0
  332. package/dist/types/vue/src/primitives/radio-group/index.d.ts +5 -0
  333. package/dist/types/vue/src/primitives/radio-group/index.d.ts.map +1 -0
  334. package/dist/types/vue/src/primitives/rating/RatingItem.d.ts +42 -0
  335. package/dist/types/vue/src/primitives/rating/RatingItem.d.ts.map +1 -0
  336. package/dist/types/vue/src/primitives/rating/RatingItemIndicator.d.ts +39 -0
  337. package/dist/types/vue/src/primitives/rating/RatingItemIndicator.d.ts.map +1 -0
  338. package/dist/types/vue/src/primitives/rating/RatingRoot.d.ts +159 -0
  339. package/dist/types/vue/src/primitives/rating/RatingRoot.d.ts.map +1 -0
  340. package/dist/types/vue/src/primitives/rating/context.d.ts +16 -0
  341. package/dist/types/vue/src/primitives/rating/context.d.ts.map +1 -0
  342. package/dist/types/vue/src/primitives/rating/index.d.ts +5 -0
  343. package/dist/types/vue/src/primitives/rating/index.d.ts.map +1 -0
  344. package/dist/types/vue/src/primitives/roving-focus/RovingFocusGroup.vue.d.ts +38 -0
  345. package/dist/types/vue/src/primitives/roving-focus/RovingFocusGroup.vue.d.ts.map +1 -0
  346. package/dist/types/vue/src/primitives/roving-focus/RovingFocusItem.vue.d.ts +21 -0
  347. package/dist/types/vue/src/primitives/roving-focus/RovingFocusItem.vue.d.ts.map +1 -0
  348. package/dist/types/vue/src/primitives/roving-focus/context.d.ts +15 -0
  349. package/dist/types/vue/src/primitives/roving-focus/context.d.ts.map +1 -0
  350. package/dist/types/vue/src/primitives/roving-focus/index.d.ts +4 -0
  351. package/dist/types/vue/src/primitives/roving-focus/index.d.ts.map +1 -0
  352. package/dist/types/vue/src/primitives/separator/Separator.vue.d.ts +19 -0
  353. package/dist/types/vue/src/primitives/separator/Separator.vue.d.ts.map +1 -0
  354. package/dist/types/vue/src/primitives/separator/index.d.ts +2 -0
  355. package/dist/types/vue/src/primitives/separator/index.d.ts.map +1 -0
  356. package/dist/types/vue/src/primitives/slider/SliderImpl.d.ts +36 -0
  357. package/dist/types/vue/src/primitives/slider/SliderImpl.d.ts.map +1 -0
  358. package/dist/types/vue/src/primitives/slider/SliderOrientation.d.ts +91 -0
  359. package/dist/types/vue/src/primitives/slider/SliderOrientation.d.ts.map +1 -0
  360. package/dist/types/vue/src/primitives/slider/SliderRoot.d.ts +187 -0
  361. package/dist/types/vue/src/primitives/slider/SliderRoot.d.ts.map +1 -0
  362. package/dist/types/vue/src/primitives/slider/SliderThumb.d.ts +33 -0
  363. package/dist/types/vue/src/primitives/slider/SliderThumb.d.ts.map +1 -0
  364. package/dist/types/vue/src/primitives/slider/SliderTrack.d.ts +33 -0
  365. package/dist/types/vue/src/primitives/slider/SliderTrack.d.ts.map +1 -0
  366. package/dist/types/vue/src/primitives/slider/context.d.ts +22 -0
  367. package/dist/types/vue/src/primitives/slider/context.d.ts.map +1 -0
  368. package/dist/types/vue/src/primitives/slider/index.d.ts +5 -0
  369. package/dist/types/vue/src/primitives/slider/index.d.ts.map +1 -0
  370. package/dist/types/vue/src/primitives/splitter/SplitterGroup.d.ts +90 -0
  371. package/dist/types/vue/src/primitives/splitter/SplitterGroup.d.ts.map +1 -0
  372. package/dist/types/vue/src/primitives/splitter/SplitterPanel.d.ts +113 -0
  373. package/dist/types/vue/src/primitives/splitter/SplitterPanel.d.ts.map +1 -0
  374. package/dist/types/vue/src/primitives/splitter/SplitterResizeHandle.d.ts +85 -0
  375. package/dist/types/vue/src/primitives/splitter/SplitterResizeHandle.d.ts.map +1 -0
  376. package/dist/types/vue/src/primitives/splitter/behaviors.d.ts +22 -0
  377. package/dist/types/vue/src/primitives/splitter/behaviors.d.ts.map +1 -0
  378. package/dist/types/vue/src/primitives/splitter/context.d.ts +23 -0
  379. package/dist/types/vue/src/primitives/splitter/context.d.ts.map +1 -0
  380. package/dist/types/vue/src/primitives/splitter/index.d.ts +6 -0
  381. package/dist/types/vue/src/primitives/splitter/index.d.ts.map +1 -0
  382. package/dist/types/vue/src/primitives/stepper/StepperItem.d.ts +63 -0
  383. package/dist/types/vue/src/primitives/stepper/StepperItem.d.ts.map +1 -0
  384. package/dist/types/vue/src/primitives/stepper/StepperParts.d.ts +130 -0
  385. package/dist/types/vue/src/primitives/stepper/StepperParts.d.ts.map +1 -0
  386. package/dist/types/vue/src/primitives/stepper/StepperRoot.d.ts +91 -0
  387. package/dist/types/vue/src/primitives/stepper/StepperRoot.d.ts.map +1 -0
  388. package/dist/types/vue/src/primitives/stepper/StepperTrigger.d.ts +33 -0
  389. package/dist/types/vue/src/primitives/stepper/StepperTrigger.d.ts.map +1 -0
  390. package/dist/types/vue/src/primitives/stepper/context.d.ts +23 -0
  391. package/dist/types/vue/src/primitives/stepper/context.d.ts.map +1 -0
  392. package/dist/types/vue/src/primitives/stepper/index.d.ts +6 -0
  393. package/dist/types/vue/src/primitives/stepper/index.d.ts.map +1 -0
  394. package/dist/types/vue/src/primitives/switch/SwitchRoot.d.ts +133 -0
  395. package/dist/types/vue/src/primitives/switch/SwitchRoot.d.ts.map +1 -0
  396. package/dist/types/vue/src/primitives/switch/index.d.ts +2 -0
  397. package/dist/types/vue/src/primitives/switch/index.d.ts.map +1 -0
  398. package/dist/types/vue/src/primitives/tabs/TabsContent.d.ts +50 -0
  399. package/dist/types/vue/src/primitives/tabs/TabsContent.d.ts.map +1 -0
  400. package/dist/types/vue/src/primitives/tabs/TabsList.d.ts +42 -0
  401. package/dist/types/vue/src/primitives/tabs/TabsList.d.ts.map +1 -0
  402. package/dist/types/vue/src/primitives/tabs/TabsRoot.d.ts +101 -0
  403. package/dist/types/vue/src/primitives/tabs/TabsRoot.d.ts.map +1 -0
  404. package/dist/types/vue/src/primitives/tabs/TabsTrigger.d.ts +55 -0
  405. package/dist/types/vue/src/primitives/tabs/TabsTrigger.d.ts.map +1 -0
  406. package/dist/types/vue/src/primitives/tabs/context.d.ts +19 -0
  407. package/dist/types/vue/src/primitives/tabs/context.d.ts.map +1 -0
  408. package/dist/types/vue/src/primitives/tabs/index.d.ts +6 -0
  409. package/dist/types/vue/src/primitives/tabs/index.d.ts.map +1 -0
  410. package/dist/types/vue/src/primitives/toggle/Toggle.d.ts +91 -0
  411. package/dist/types/vue/src/primitives/toggle/Toggle.d.ts.map +1 -0
  412. package/dist/types/vue/src/primitives/toggle/index.d.ts +2 -0
  413. package/dist/types/vue/src/primitives/toggle/index.d.ts.map +1 -0
  414. package/dist/types/vue/src/primitives/toggle-group/ToggleGroupItem.d.ts +53 -0
  415. package/dist/types/vue/src/primitives/toggle-group/ToggleGroupItem.d.ts.map +1 -0
  416. package/dist/types/vue/src/primitives/toggle-group/ToggleGroupRoot.d.ts +141 -0
  417. package/dist/types/vue/src/primitives/toggle-group/ToggleGroupRoot.d.ts.map +1 -0
  418. package/dist/types/vue/src/primitives/toggle-group/context.d.ts +16 -0
  419. package/dist/types/vue/src/primitives/toggle-group/context.d.ts.map +1 -0
  420. package/dist/types/vue/src/primitives/toggle-group/index.d.ts +4 -0
  421. package/dist/types/vue/src/primitives/toggle-group/index.d.ts.map +1 -0
  422. package/dist/types/vue/src/primitives/toolbar/ToolbarButton.d.ts +43 -0
  423. package/dist/types/vue/src/primitives/toolbar/ToolbarButton.d.ts.map +1 -0
  424. package/dist/types/vue/src/primitives/toolbar/ToolbarRoot.d.ts +63 -0
  425. package/dist/types/vue/src/primitives/toolbar/ToolbarRoot.d.ts.map +1 -0
  426. package/dist/types/vue/src/primitives/toolbar/ToolbarToggleGroup.d.ts +135 -0
  427. package/dist/types/vue/src/primitives/toolbar/ToolbarToggleGroup.d.ts.map +1 -0
  428. package/dist/types/vue/src/primitives/toolbar/ToolbarToggleItem.d.ts +50 -0
  429. package/dist/types/vue/src/primitives/toolbar/ToolbarToggleItem.d.ts.map +1 -0
  430. package/dist/types/vue/src/primitives/toolbar/context.d.ts +9 -0
  431. package/dist/types/vue/src/primitives/toolbar/context.d.ts.map +1 -0
  432. package/dist/types/vue/src/primitives/toolbar/index.d.ts +6 -0
  433. package/dist/types/vue/src/primitives/toolbar/index.d.ts.map +1 -0
  434. package/dist/types/vue/src/primitives/utils/config.d.ts +2 -0
  435. package/dist/types/vue/src/primitives/utils/config.d.ts.map +1 -0
  436. package/dist/types/vue/src/primitives/utils/createContext.d.ts +2 -0
  437. package/dist/types/vue/src/primitives/utils/createContext.d.ts.map +1 -0
  438. package/dist/types/vue/src/primitives/utils/renderSlotFragments.d.ts +3 -0
  439. package/dist/types/vue/src/primitives/utils/renderSlotFragments.d.ts.map +1 -0
  440. package/dist/types/vue/src/primitives/utils/types.d.ts +2 -0
  441. package/dist/types/vue/src/primitives/utils/types.d.ts.map +1 -0
  442. package/dist/types/vue/src/primitives/utils/useComposing.d.ts +8 -0
  443. package/dist/types/vue/src/primitives/utils/useComposing.d.ts.map +1 -0
  444. package/dist/types/vue/src/primitives/utils/useDirection.d.ts +4 -0
  445. package/dist/types/vue/src/primitives/utils/useDirection.d.ts.map +1 -0
  446. package/dist/types/vue/src/primitives/utils/useEmitAsProps.d.ts +2 -0
  447. package/dist/types/vue/src/primitives/utils/useEmitAsProps.d.ts.map +1 -0
  448. package/dist/types/vue/src/primitives/utils/useFormControl.d.ts +4 -0
  449. package/dist/types/vue/src/primitives/utils/useFormControl.d.ts.map +1 -0
  450. package/dist/types/vue/src/primitives/utils/useForwardExpose.d.ts +7 -0
  451. package/dist/types/vue/src/primitives/utils/useForwardExpose.d.ts.map +1 -0
  452. package/dist/types/vue/src/primitives/utils/useForwardProps.d.ts +3 -0
  453. package/dist/types/vue/src/primitives/utils/useForwardProps.d.ts.map +1 -0
  454. package/dist/types/vue/src/primitives/utils/useForwardPropsEmits.d.ts +3 -0
  455. package/dist/types/vue/src/primitives/utils/useForwardPropsEmits.d.ts.map +1 -0
  456. package/dist/types/vue/src/primitives/utils/useForwardScopeId.d.ts +2 -0
  457. package/dist/types/vue/src/primitives/utils/useForwardScopeId.d.ts.map +1 -0
  458. package/dist/types/vue/src/primitives/utils/useId.d.ts +2 -0
  459. package/dist/types/vue/src/primitives/utils/useId.d.ts.map +1 -0
  460. package/dist/types/vue/src/primitives/utils/useNonce.d.ts +3 -0
  461. package/dist/types/vue/src/primitives/utils/useNonce.d.ts.map +1 -0
  462. package/dist/types/vue/src/primitives/utils/useSingleOrMultipleValue.d.ts +12 -0
  463. package/dist/types/vue/src/primitives/utils/useSingleOrMultipleValue.d.ts.map +1 -0
  464. package/dist/types/vue/src/primitives/utils/useSize.d.ts +7 -0
  465. package/dist/types/vue/src/primitives/utils/useSize.d.ts.map +1 -0
  466. package/dist/types/vue/src/primitives/visually-hidden/VisuallyHidden.vue.d.ts +19 -0
  467. package/dist/types/vue/src/primitives/visually-hidden/VisuallyHidden.vue.d.ts.map +1 -0
  468. package/dist/types/vue/src/primitives/visually-hidden/VisuallyHiddenInput.d.ts +2 -2
  469. package/dist/types/vue/src/primitives/visually-hidden/VisuallyHiddenInput.d.ts.map +1 -1
  470. package/dist/types/vue/src/primitives/visually-hidden/VisuallyHiddenInputBubble.vue.d.ts +1 -1
  471. package/dist/types/vue/src/primitives/visually-hidden/VisuallyHiddenInputBubble.vue.d.ts.map +1 -1
  472. package/dist/types/vue/src/primitives/visually-hidden/index.d.ts +3 -0
  473. package/dist/types/vue/src/primitives/visually-hidden/index.d.ts.map +1 -0
  474. package/package.json +1 -1
  475. package/src/components/accordion/Accordion.vue +2 -1
  476. package/src/components/accordion/AccordionContent.vue +1 -1
  477. package/src/components/accordion/AccordionItem.vue +1 -1
  478. package/src/components/accordion/AccordionTrigger.vue +3 -3
  479. package/src/components/aspect-ratio/AspectRatio.vue +1 -1
  480. package/src/components/breadcrumb/BreadcrumbItem.vue +2 -1
  481. package/src/components/button/Button.vue +2 -1
  482. package/src/components/card/Card.vue +2 -1
  483. package/src/components/checkbox/Checkbox.vue +1 -1
  484. package/src/components/checkbox-group/CheckboxGroup.vue +1 -1
  485. package/src/components/chip/Chip.vue +2 -1
  486. package/src/components/chip/composables/useChipRoot.ts +1 -1
  487. package/src/components/collapsible/Collapsible.vue +2 -1
  488. package/src/components/collapsible/CollapsibleContent.vue +1 -1
  489. package/src/components/collapsible/CollapsibleTrigger.vue +2 -2
  490. package/src/components/divider/Divider.vue +1 -1
  491. package/src/components/float-button/FloatButton.vue +4 -11
  492. package/src/components/float-button/types.ts +3 -2
  493. package/src/components/heading/Heading.vue +1 -1
  494. package/src/components/icon-button/IconButton.vue +2 -1
  495. package/src/components/image/Image.vue +1 -1
  496. package/src/components/indicator/Indicator.vue +2 -1
  497. package/src/components/input/InputAction.vue +1 -1
  498. package/src/components/link/Link.vue +2 -1
  499. package/src/components/multi-select/MultiSelect.vue +4 -1
  500. package/src/components/nav-link/NavLink.vue +33 -4
  501. package/src/components/nav-link/NavLinkChild.ts +57 -0
  502. package/src/components/navigation-menu/NavigationMenuLink.vue +1 -1
  503. package/src/components/pagination/Pagination.vue +1 -1
  504. package/src/components/pagination/PaginationContent.vue +1 -1
  505. package/src/components/pagination/PaginationControl.vue +6 -1
  506. package/src/components/pagination/PaginationPage.vue +1 -1
  507. package/src/components/panel/Panel.vue +1 -1
  508. package/src/components/pin-input/PinInput.vue +1 -1
  509. package/src/components/prev-next/PrevNextLink.vue +2 -1
  510. package/src/components/progress/Progress.vue +1 -1
  511. package/src/components/prose/Prose.vue +2 -1
  512. package/src/components/radio-group/RadioGroup.vue +1 -1
  513. package/src/components/range-slider/RangeSlider.vue +1 -1
  514. package/src/components/rating/Rating.vue +1 -1
  515. package/src/components/ring-progress/RingProgress.vue +1 -1
  516. package/src/components/section/Section.vue +13 -2
  517. package/src/components/segmented-control/SegmentedControl.vue +2 -1
  518. package/src/components/sidebar/Sidebar.vue +2 -1
  519. package/src/components/sidebar/context.ts +9 -0
  520. package/src/components/slider/Slider.vue +1 -1
  521. package/src/components/slider/SliderHandle.vue +2 -1
  522. package/src/components/split-button/types.ts +1 -1
  523. package/src/components/splitter/Splitter.vue +1 -1
  524. package/src/components/splitter/SplitterHandle.vue +1 -1
  525. package/src/components/splitter/SplitterPanel.vue +1 -1
  526. package/src/components/statistic/Statistic.vue +2 -2
  527. package/src/components/stepper/Stepper.vue +1 -1
  528. package/src/components/stepper/StepperStep.vue +1 -1
  529. package/src/components/switch/Switch.vue +1 -1
  530. package/src/components/tabs/Tabs.vue +1 -1
  531. package/src/components/tabs/TabsContent.vue +1 -1
  532. package/src/components/tabs/TabsList.vue +1 -1
  533. package/src/components/tabs/TabsTrigger.vue +1 -1
  534. package/src/components/tag/Tag.vue +2 -1
  535. package/src/components/text/Text.vue +2 -1
  536. package/src/components/time/Time.vue +22 -5
  537. package/src/components/toast/Toaster.vue +1 -0
  538. package/src/components/toggle/Toggle.vue +2 -1
  539. package/src/components/toolbar/Toolbar.vue +1 -1
  540. package/src/components/toolbar/ToolbarButton.vue +1 -1
  541. package/src/components/toolbar/ToolbarLink.vue +1 -1
  542. package/src/components/toolbar/ToolbarSeparator.vue +1 -1
  543. package/src/components/toolbar/ToolbarToggleGroup.vue +2 -1
  544. package/src/components/toolbar/ToolbarToggleItem.vue +1 -1
  545. package/src/components/toolbar/types.ts +1 -1
  546. package/src/components/visually-hidden/VisuallyHidden.vue +4 -18
  547. package/src/lib/useDirection.ts +2 -1
  548. package/src/primitives/accordion/AccordionContent.ts +47 -0
  549. package/src/primitives/accordion/AccordionHeader.ts +35 -0
  550. package/src/primitives/accordion/AccordionItem.ts +83 -0
  551. package/src/primitives/accordion/AccordionRoot.ts +75 -0
  552. package/src/primitives/accordion/AccordionTrigger.ts +55 -0
  553. package/src/primitives/accordion/LICENSE +44 -0
  554. package/src/primitives/accordion/context.ts +34 -0
  555. package/src/primitives/accordion/index.ts +11 -0
  556. package/src/primitives/aspect-ratio/AspectRatio.ts +47 -0
  557. package/src/primitives/aspect-ratio/LICENSE +44 -0
  558. package/src/primitives/aspect-ratio/index.ts +1 -0
  559. package/src/primitives/checkbox/CheckboxGroupRoot.ts +93 -0
  560. package/src/primitives/checkbox/CheckboxRoot.ts +170 -0
  561. package/src/primitives/checkbox/LICENSE +44 -0
  562. package/src/primitives/checkbox/context.ts +20 -0
  563. package/src/primitives/checkbox/index.ts +8 -0
  564. package/src/primitives/collapsible/CollapsibleContent.ts +124 -0
  565. package/src/primitives/collapsible/CollapsibleRoot.ts +63 -0
  566. package/src/primitives/collapsible/CollapsibleTrigger.ts +43 -0
  567. package/src/primitives/collapsible/LICENSE +44 -0
  568. package/src/primitives/collapsible/context.ts +13 -0
  569. package/src/primitives/collapsible/index.ts +12 -0
  570. package/src/primitives/collection/LICENSE +44 -0
  571. package/src/primitives/collection/index.ts +82 -0
  572. package/src/primitives/number-field/NumberFieldDecrement.vue +2 -3
  573. package/src/primitives/number-field/NumberFieldIncrement.vue +2 -3
  574. package/src/primitives/number-field/NumberFieldInput.vue +2 -3
  575. package/src/primitives/number-field/NumberFieldRoot.vue +3 -3
  576. package/src/primitives/pagination/LICENSE +44 -0
  577. package/src/primitives/pagination/PaginationEdge.ts +77 -0
  578. package/src/primitives/pagination/PaginationList.ts +46 -0
  579. package/src/primitives/pagination/PaginationListItem.ts +61 -0
  580. package/src/primitives/pagination/PaginationRoot.ts +73 -0
  581. package/src/primitives/pagination/context.ts +14 -0
  582. package/src/primitives/pagination/index.ts +15 -0
  583. package/src/primitives/pin-input/LICENSE +44 -0
  584. package/src/primitives/pin-input/PinInputInput.ts +218 -0
  585. package/src/primitives/pin-input/PinInputRoot.ts +136 -0
  586. package/src/primitives/pin-input/context.ts +24 -0
  587. package/src/primitives/pin-input/index.ts +3 -0
  588. package/src/primitives/presence/LICENSE +44 -0
  589. package/src/primitives/presence/Presence.ts +70 -0
  590. package/src/primitives/presence/index.ts +2 -0
  591. package/src/primitives/presence/usePresence.ts +28 -0
  592. package/src/primitives/primitive/LICENSE +44 -0
  593. package/src/primitives/primitive/Primitive.ts +45 -0
  594. package/src/primitives/primitive/Slot.ts +22 -0
  595. package/src/primitives/primitive/index.ts +2 -0
  596. package/src/primitives/progress/LICENSE +44 -0
  597. package/src/primitives/progress/ProgressIndicator.vue +24 -0
  598. package/src/primitives/progress/ProgressRoot.vue +95 -0
  599. package/src/primitives/progress/context.ts +12 -0
  600. package/src/primitives/progress/index.ts +7 -0
  601. package/src/primitives/radio-group/LICENSE +44 -0
  602. package/src/primitives/radio-group/Radio.ts +110 -0
  603. package/src/primitives/radio-group/RadioGroupIndicator.ts +54 -0
  604. package/src/primitives/radio-group/RadioGroupItem.ts +116 -0
  605. package/src/primitives/radio-group/RadioGroupRoot.ts +108 -0
  606. package/src/primitives/radio-group/context.ts +25 -0
  607. package/src/primitives/radio-group/index.ts +9 -0
  608. package/src/primitives/rating/LICENSE +44 -0
  609. package/src/primitives/rating/RatingItem.ts +35 -0
  610. package/src/primitives/rating/RatingItemIndicator.ts +87 -0
  611. package/src/primitives/rating/RatingRoot.ts +111 -0
  612. package/src/primitives/rating/context.ts +22 -0
  613. package/src/primitives/rating/index.ts +9 -0
  614. package/src/primitives/roving-focus/LICENSE +44 -0
  615. package/src/primitives/roving-focus/RovingFocusGroup.vue +125 -0
  616. package/src/primitives/roving-focus/RovingFocusItem.vue +99 -0
  617. package/src/primitives/roving-focus/context.ts +18 -0
  618. package/src/primitives/roving-focus/index.ts +7 -0
  619. package/src/primitives/separator/LICENSE +44 -0
  620. package/src/primitives/separator/Separator.vue +26 -0
  621. package/src/primitives/separator/index.ts +1 -0
  622. package/src/primitives/slider/LICENSE +44 -0
  623. package/src/primitives/slider/SliderImpl.ts +66 -0
  624. package/src/primitives/slider/SliderOrientation.ts +100 -0
  625. package/src/primitives/slider/SliderRoot.ts +214 -0
  626. package/src/primitives/slider/SliderThumb.ts +139 -0
  627. package/src/primitives/slider/SliderTrack.ts +37 -0
  628. package/src/primitives/slider/context.ts +31 -0
  629. package/src/primitives/slider/index.ts +8 -0
  630. package/src/primitives/splitter/LICENSE +44 -0
  631. package/src/primitives/splitter/SplitterGroup.ts +642 -0
  632. package/src/primitives/splitter/SplitterPanel.ts +170 -0
  633. package/src/primitives/splitter/SplitterResizeHandle.ts +170 -0
  634. package/src/primitives/splitter/behaviors.ts +173 -0
  635. package/src/primitives/splitter/context.ts +33 -0
  636. package/src/primitives/splitter/index.ts +13 -0
  637. package/src/primitives/stepper/LICENSE +44 -0
  638. package/src/primitives/stepper/StepperItem.ts +68 -0
  639. package/src/primitives/stepper/StepperParts.ts +103 -0
  640. package/src/primitives/stepper/StepperRoot.ts +171 -0
  641. package/src/primitives/stepper/StepperTrigger.ts +119 -0
  642. package/src/primitives/stepper/context.ts +29 -0
  643. package/src/primitives/stepper/index.ts +17 -0
  644. package/src/primitives/switch/LICENSE +44 -0
  645. package/src/primitives/switch/SwitchRoot.ts +151 -0
  646. package/src/primitives/switch/index.ts +6 -0
  647. package/src/primitives/tabs/LICENSE +44 -0
  648. package/src/primitives/tabs/TabsContent.ts +94 -0
  649. package/src/primitives/tabs/TabsList.ts +52 -0
  650. package/src/primitives/tabs/TabsRoot.ts +99 -0
  651. package/src/primitives/tabs/TabsTrigger.ts +97 -0
  652. package/src/primitives/tabs/context.ts +22 -0
  653. package/src/primitives/tabs/index.ts +5 -0
  654. package/src/primitives/toggle/LICENSE +44 -0
  655. package/src/primitives/toggle/Toggle.ts +116 -0
  656. package/src/primitives/toggle/index.ts +1 -0
  657. package/src/primitives/toggle-group/LICENSE +44 -0
  658. package/src/primitives/toggle-group/ToggleGroupItem.ts +80 -0
  659. package/src/primitives/toggle-group/ToggleGroupRoot.ts +113 -0
  660. package/src/primitives/toggle-group/context.ts +19 -0
  661. package/src/primitives/toggle-group/index.ts +7 -0
  662. package/src/primitives/toolbar/LICENSE +44 -0
  663. package/src/primitives/toolbar/ToolbarButton.ts +44 -0
  664. package/src/primitives/toolbar/ToolbarRoot.ts +53 -0
  665. package/src/primitives/toolbar/ToolbarToggleGroup.ts +69 -0
  666. package/src/primitives/toolbar/ToolbarToggleItem.ts +43 -0
  667. package/src/primitives/toolbar/context.ts +12 -0
  668. package/src/primitives/toolbar/index.ts +9 -0
  669. package/src/primitives/utils/config.ts +1 -0
  670. package/src/primitives/utils/createContext.ts +34 -0
  671. package/src/primitives/utils/renderSlotFragments.ts +8 -0
  672. package/src/primitives/utils/types.ts +1 -0
  673. package/src/primitives/utils/useComposing.ts +44 -0
  674. package/src/primitives/utils/useDirection.ts +9 -0
  675. package/src/primitives/utils/useEmitAsProps.ts +13 -0
  676. package/src/primitives/utils/useFormControl.ts +6 -0
  677. package/src/primitives/utils/useForwardExpose.ts +78 -0
  678. package/src/primitives/utils/useForwardProps.ts +29 -0
  679. package/src/primitives/utils/useForwardPropsEmits.ts +12 -0
  680. package/src/primitives/utils/useForwardScopeId.ts +6 -0
  681. package/src/primitives/utils/useId.ts +9 -0
  682. package/src/primitives/utils/useNonce.ts +7 -0
  683. package/src/primitives/utils/useSingleOrMultipleValue.ts +36 -0
  684. package/src/primitives/utils/useSize.ts +25 -0
  685. package/src/primitives/visually-hidden/VisuallyHidden.vue +30 -0
  686. package/src/primitives/visually-hidden/VisuallyHiddenInput.ts +1 -1
  687. package/src/primitives/visually-hidden/VisuallyHiddenInputBubble.vue +2 -2
  688. package/src/primitives/visually-hidden/index.ts +2 -0
@@ -0,0 +1,126 @@
1
+ import { arrowNavigation } from '../arrow-navigation'
2
+
3
+ export type PinInputValue = Array<string | number | undefined>
4
+
5
+ const NUMBER = /^\d*$/
6
+ const NON_NUMBER = /\D/g
7
+ const NAVIGATION_KEYS = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End']
8
+
9
+ export function pinInputValues(value: unknown): PinInputValue {
10
+ return Array.isArray(value) ? [...value] : []
11
+ }
12
+
13
+ export function isPinInputComplete(values: PinInputValue, count: number, numeric: boolean) {
14
+ return values.filter(value => !!value || (numeric && value === 0)).length === count
15
+ }
16
+
17
+ export function stripPinNonNumbers(value: string) {
18
+ return value.replace(NON_NUMBER, '')
19
+ }
20
+
21
+ function removeTrailingEmptyStrings(values: PinInputValue) {
22
+ while (values.length && values[values.length - 1] === '') values.pop()
23
+ return values
24
+ }
25
+
26
+ export function setPinValueAt(
27
+ current: PinInputValue,
28
+ index: number,
29
+ value: string,
30
+ numeric: boolean,
31
+ ) {
32
+ const values = [...current]
33
+ if (numeric) {
34
+ const number = +value
35
+ if (value === '' || Number.isNaN(number)) delete values[index]
36
+ else values[index] = number
37
+ } else values[index] = value
38
+ return removeTrailingEmptyStrings(values)
39
+ }
40
+
41
+ export function spreadPinValue(
42
+ current: PinInputValue,
43
+ characters: string,
44
+ index: number,
45
+ count: number,
46
+ numeric: boolean,
47
+ ) {
48
+ const values = [...current]
49
+ const start = characters.length >= count ? 0 : index
50
+ const end = Math.min(start + characters.length, count)
51
+ const filled: number[] = []
52
+ for (let at = start; at < end; at++) {
53
+ const character = characters[at - start]!
54
+ if (numeric) {
55
+ const number = Number.parseInt(character)
56
+ if (Number.isNaN(number)) continue
57
+ values[at] = number
58
+ } else values[at] = character
59
+ filled.push(at)
60
+ }
61
+ return { values, filled, end }
62
+ }
63
+
64
+ export type PinTextAction =
65
+ | { kind: 'clear' }
66
+ | { kind: 'filter'; value: string }
67
+ | { kind: 'spread'; characters: string }
68
+ | { kind: 'single'; character: string }
69
+
70
+ export function resolvePinComposition(value: string, numeric: boolean): PinTextAction {
71
+ const text = numeric ? stripPinNonNumbers(value) : value
72
+ if (numeric && !text) return { kind: 'clear' }
73
+ if (text.length > 1) return { kind: 'spread', characters: text }
74
+ return { kind: 'single', character: text }
75
+ }
76
+
77
+ export function resolvePinInput(
78
+ data: string | null | undefined,
79
+ value: string,
80
+ numeric: boolean,
81
+ ): PinTextAction {
82
+ if ((data?.length ?? 0) > 1) return { kind: 'spread', characters: value }
83
+ if (numeric && !NUMBER.test(value)) return { kind: 'filter', value: stripPinNonNumbers(value) }
84
+ return { kind: 'single', character: data || value.slice(-1) }
85
+ }
86
+
87
+ export function resolvePinPaste(text: string, numeric: boolean) {
88
+ return numeric ? stripPinNonNumbers(text) : text
89
+ }
90
+
91
+ export function pinFocusRedirect(values: PinInputValue, count: number, index: number) {
92
+ for (let at = 0; at < count; at++)
93
+ if (values[at] === '' || values[at] === undefined) return at < index ? at : -1
94
+ return -1
95
+ }
96
+
97
+ export function isPinNavigationKey(key: string) {
98
+ return NAVIGATION_KEYS.includes(key)
99
+ }
100
+
101
+ export function navigatePin(
102
+ event: KeyboardEvent,
103
+ current: HTMLElement | null,
104
+ inputs: HTMLElement[],
105
+ dir: 'ltr' | 'rtl',
106
+ ) {
107
+ arrowNavigation(event, current, undefined, {
108
+ itemsArray: inputs,
109
+ focus: true,
110
+ loop: false,
111
+ arrowKeyOptions: 'horizontal',
112
+ dir,
113
+ })
114
+ }
115
+
116
+ export function pinPlaceholder(
117
+ element: HTMLInputElement,
118
+ active: Element | null,
119
+ placeholder: string,
120
+ ) {
121
+ element.placeholder = !element.value && element === active ? '' : placeholder
122
+ }
123
+
124
+ export function pinInputLabel(index: number, count: number) {
125
+ return `pin input ${index + 1} of ${count}`
126
+ }
@@ -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,135 @@
1
+ export type PresenceState = 'mounted' | 'unmountSuspended' | 'unmounted'
2
+ type PresenceEvent = 'MOUNT' | 'UNMOUNT' | 'ANIMATION_OUT' | 'ANIMATION_END'
3
+ type PresenceTransition = 'enter' | 'after-enter' | 'leave' | 'after-leave'
4
+
5
+ const MACHINE: Record<PresenceState, Partial<Record<PresenceEvent, PresenceState>>> = {
6
+ mounted: { UNMOUNT: 'unmounted', ANIMATION_OUT: 'unmountSuspended' },
7
+ unmountSuspended: { MOUNT: 'mounted', ANIMATION_END: 'unmounted' },
8
+ unmounted: { MOUNT: 'mounted' },
9
+ }
10
+
11
+ export function getAnimationName(node?: HTMLElement | null) {
12
+ return node ? getComputedStyle(node).animationName || 'none' : 'none'
13
+ }
14
+
15
+ export interface PresenceController {
16
+ readonly state: PresenceState
17
+ readonly present: boolean
18
+ setNode: (node: HTMLElement | null | undefined) => void
19
+ update: (present: boolean, previous: boolean | undefined) => void
20
+ dispose: () => void
21
+ }
22
+
23
+ export interface PresenceOptions {
24
+ fillForwards?: boolean
25
+ }
26
+
27
+ export function createPresence(
28
+ initial: boolean,
29
+ onStateChange: (state: PresenceState) => void,
30
+ { fillForwards = true }: PresenceOptions = {},
31
+ ): PresenceController {
32
+ let state: PresenceState = initial ? 'mounted' : 'unmounted'
33
+ let present = initial
34
+ let node: HTMLElement | null | undefined
35
+ let styles: CSSStyleDeclaration | undefined
36
+ let previousAnimationName = 'none'
37
+ let timeout: number | undefined
38
+
39
+ const ownerWindow = () => node?.ownerDocument.defaultView ?? globalThis.window
40
+
41
+ function send(event: PresenceEvent) {
42
+ const next = MACHINE[state][event]
43
+ if (!next || next === state) return
44
+ state = next
45
+ previousAnimationName = state === 'mounted' ? getAnimationName(node) : 'none'
46
+ onStateChange(state)
47
+ }
48
+
49
+ function emit(name: PresenceTransition) {
50
+ node?.dispatchEvent(new CustomEvent(name, { bubbles: false, cancelable: false }))
51
+ }
52
+
53
+ function handleAnimationStart(event: AnimationEvent) {
54
+ if (event.target === node) previousAnimationName = getAnimationName(node)
55
+ }
56
+
57
+ function handleAnimationEnd(event: AnimationEvent) {
58
+ if (!node || event.target !== node) return
59
+ const current = getAnimationName(node)
60
+ if (current.includes(CSS.escape(event.animationName))) {
61
+ emit(state === 'mounted' ? 'after-enter' : 'after-leave')
62
+ send('ANIMATION_END')
63
+ if (fillForwards && !present) {
64
+ const element = node
65
+ const fillMode = element.style.animationFillMode
66
+ element.style.animationFillMode = 'forwards'
67
+ timeout = ownerWindow()?.setTimeout(() => {
68
+ if (element.style.animationFillMode === 'forwards')
69
+ element.style.animationFillMode = fillMode
70
+ })
71
+ }
72
+ }
73
+ if (current === 'none') send('ANIMATION_END')
74
+ }
75
+
76
+ function detach(element: HTMLElement) {
77
+ element.removeEventListener('animationstart', handleAnimationStart)
78
+ element.removeEventListener('animationcancel', handleAnimationEnd)
79
+ element.removeEventListener('animationend', handleAnimationEnd)
80
+ }
81
+
82
+ return {
83
+ get state() {
84
+ return state
85
+ },
86
+ get present() {
87
+ return state === 'mounted' || state === 'unmountSuspended'
88
+ },
89
+ setNode(next) {
90
+ if (next === node) return
91
+ const previous = node
92
+ node = next
93
+ if (next) {
94
+ styles = getComputedStyle(next)
95
+ next.addEventListener('animationstart', handleAnimationStart)
96
+ next.addEventListener('animationcancel', handleAnimationEnd)
97
+ next.addEventListener('animationend', handleAnimationEnd)
98
+ } else {
99
+ send('ANIMATION_END')
100
+ if (timeout !== undefined) ownerWindow()?.clearTimeout(timeout)
101
+ }
102
+ if (previous) detach(previous)
103
+ },
104
+ update(current, previous) {
105
+ present = current
106
+ if (previous === current) return
107
+ const previousName = previousAnimationName
108
+ const currentName = getAnimationName(node)
109
+ if (current) {
110
+ send('MOUNT')
111
+ emit('enter')
112
+ if (currentName === 'none') emit('after-enter')
113
+ } else if (
114
+ currentName === 'none' ||
115
+ currentName === 'undefined' ||
116
+ styles?.display === 'none'
117
+ ) {
118
+ send('UNMOUNT')
119
+ emit('leave')
120
+ emit('after-leave')
121
+ } else if (previous && previousName !== currentName) {
122
+ send('ANIMATION_OUT')
123
+ emit('leave')
124
+ } else {
125
+ send('UNMOUNT')
126
+ emit('after-leave')
127
+ }
128
+ },
129
+ dispose() {
130
+ if (node) detach(node)
131
+ if (timeout !== undefined) ownerWindow()?.clearTimeout(timeout)
132
+ node = undefined
133
+ },
134
+ }
135
+ }
@@ -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,41 @@
1
+ export const DEFAULT_PROGRESS_MAX = 100
2
+
3
+ export type ProgressState = 'indeterminate' | 'complete' | 'loading'
4
+
5
+ export function isNumber(value: unknown): value is number {
6
+ return typeof value === 'number'
7
+ }
8
+
9
+ export function isValidProgressMax(max: unknown): max is number {
10
+ return isNumber(max) && !Number.isNaN(max) && max > 0
11
+ }
12
+
13
+ export function isValidProgressValue(
14
+ value: unknown,
15
+ max: number,
16
+ ): value is number | null | undefined {
17
+ return value == null || (isNumber(value) && !Number.isNaN(value) && value <= max && value >= 0)
18
+ }
19
+
20
+ export function progressValueError(value: unknown) {
21
+ return `Invalid prop \`value\` of value \`${value}\` supplied to \`ProgressRoot\`. The \`value\` prop must be:
22
+ - a positive number
23
+ - less than the value passed to \`max\` (or ${DEFAULT_PROGRESS_MAX} if no \`max\` prop is set)
24
+ - \`null\` or \`undefined\` if the progress is indeterminate.
25
+
26
+ Defaulting to \`null\`.`
27
+ }
28
+
29
+ export function progressMaxError(max: unknown) {
30
+ return `Invalid prop \`max\` of value \`${max}\` supplied to \`ProgressRoot\`. Only numbers greater than 0 are valid max values. Defaulting to \`${DEFAULT_PROGRESS_MAX}\`.`
31
+ }
32
+
33
+ export function progressState(value: number | null | undefined, max: number): ProgressState {
34
+ if (value == null) return 'indeterminate'
35
+ if (value === max) return 'complete'
36
+ return 'loading'
37
+ }
38
+
39
+ export function defaultProgressLabel(value: number | null | undefined, max: number) {
40
+ return isNumber(value) ? `${Math.round((value / max) * DEFAULT_PROGRESS_MAX)}%` : undefined
41
+ }
@@ -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,46 @@
1
+ import { handleAndDispatchCustomEvent } from '../dismissable-layer'
2
+
3
+ export const RADIO_SELECT = 'radio.select'
4
+
5
+ const ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight']
6
+
7
+ export interface RadioSelectDetail<T = unknown, E extends Event = Event> {
8
+ originalEvent: E
9
+ value: T
10
+ }
11
+
12
+ export type RadioSelectEvent<T = unknown, E extends Event = Event> = CustomEvent<
13
+ RadioSelectDetail<T, E>
14
+ >
15
+
16
+ export function dispatchRadioSelect<T, E extends Event>(
17
+ event: E,
18
+ value: T,
19
+ callback: (event: RadioSelectEvent<T, E>) => void,
20
+ ) {
21
+ handleAndDispatchCustomEvent<RadioSelectEvent<T, E>>(RADIO_SELECT, callback, {
22
+ originalEvent: event,
23
+ value,
24
+ })
25
+ }
26
+
27
+ export function trackArrowKeys(target: Window) {
28
+ let pressed = false
29
+ const down = (event: KeyboardEvent) => {
30
+ if (ARROW_KEYS.includes(event.key)) pressed = true
31
+ }
32
+ const up = () => {
33
+ pressed = false
34
+ }
35
+ target.addEventListener('keydown', down)
36
+ target.addEventListener('keyup', up)
37
+ return {
38
+ get pressed() {
39
+ return pressed
40
+ },
41
+ dispose() {
42
+ target.removeEventListener('keydown', down)
43
+ target.removeEventListener('keyup', up)
44
+ },
45
+ }
46
+ }
@@ -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,37 @@
1
+ export function ratingItems(length: number) {
2
+ return Array.from({ length }, (_, index) => index + 1)
3
+ }
4
+
5
+ export function ratingSteps(item: number, stepSize: number) {
6
+ const start = item - 1
7
+ const count = Math.ceil((item - start) / stepSize)
8
+ return Array.from({ length: count }, (_, index) =>
9
+ Number((start + (index + 1) * stepSize).toFixed(2)),
10
+ )
11
+ }
12
+
13
+ export function nextRating(clearable: boolean, current: number | undefined, rating: number) {
14
+ return clearable && current === rating ? 0 : rating
15
+ }
16
+
17
+ export function isRatingStepActive(step: number, hovered: number, value: number | undefined) {
18
+ return (hovered > 0 && step <= hovered) || (hovered === 0 && step <= (value ?? Number.NaN))
19
+ }
20
+
21
+ export function isRatingStepVisible(
22
+ focused: boolean,
23
+ stepSize: number,
24
+ step: number,
25
+ hovered: number,
26
+ value: number | undefined,
27
+ ) {
28
+ return focused || stepSize === 1 || step % 1 === 0 || step === hovered || step === value
29
+ }
30
+
31
+ export function ratingStepWidth(step: number) {
32
+ return `${(step % 1 || 1) * 100}%`
33
+ }
34
+
35
+ export function ratingStepZIndex(steps: number[], step: number) {
36
+ return steps.length - steps.indexOf(step)
37
+ }
@@ -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,44 @@
1
+ import { getActiveElement } from '../focus-scope'
2
+
3
+ export type Orientation = 'horizontal' | 'vertical'
4
+ export type Direction = 'ltr' | 'rtl'
5
+ export type FocusIntent = 'first' | 'last' | 'prev' | 'next'
6
+
7
+ export const ENTRY_FOCUS = 'rovingFocusGroup.onEntryFocus'
8
+ export const ENTRY_FOCUS_OPTIONS = { bubbles: false, cancelable: true }
9
+
10
+ const KEY_TO_INTENT: Record<string, FocusIntent> = {
11
+ ArrowLeft: 'prev',
12
+ ArrowUp: 'prev',
13
+ ArrowRight: 'next',
14
+ ArrowDown: 'next',
15
+ PageUp: 'first',
16
+ Home: 'first',
17
+ PageDown: 'last',
18
+ End: 'last',
19
+ }
20
+
21
+ export function getDirectionAwareKey(key: string, dir?: Direction) {
22
+ if (dir !== 'rtl') return key
23
+ return key === 'ArrowLeft' ? 'ArrowRight' : key === 'ArrowRight' ? 'ArrowLeft' : key
24
+ }
25
+
26
+ export function getFocusIntent(event: KeyboardEvent, orientation?: Orientation, dir?: Direction) {
27
+ const key = getDirectionAwareKey(event.key, dir)
28
+ if (orientation === 'vertical' && (key === 'ArrowLeft' || key === 'ArrowRight')) return undefined
29
+ if (orientation === 'horizontal' && (key === 'ArrowUp' || key === 'ArrowDown')) return undefined
30
+ return KEY_TO_INTENT[key]
31
+ }
32
+
33
+ export function focusFirstCandidate(candidates: HTMLElement[], preventScroll = false) {
34
+ const previous = getActiveElement()
35
+ for (const candidate of candidates) {
36
+ if (candidate === previous) return
37
+ candidate.focus({ preventScroll })
38
+ if (getActiveElement() !== previous) return
39
+ }
40
+ }
41
+
42
+ export function wrapArray<T>(array: T[], startIndex: number) {
43
+ return array.map((_, index) => array[(startIndex + index) % array.length]!)
44
+ }
@@ -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,14 @@
1
+ export type SeparatorOrientation = 'horizontal' | 'vertical'
2
+
3
+ export function separatorOrientation(orientation: unknown): SeparatorOrientation {
4
+ return orientation === 'vertical' ? 'vertical' : 'horizontal'
5
+ }
6
+
7
+ export function separatorSemantics(orientation: SeparatorOrientation, decorative?: boolean) {
8
+ return decorative
9
+ ? { role: 'none' as const }
10
+ : {
11
+ 'aria-orientation': orientation === 'vertical' ? orientation : undefined,
12
+ role: 'separator' as const,
13
+ }
14
+ }
@@ -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,19 @@
1
+ export interface Size {
2
+ width: number
3
+ height: number
4
+ }
5
+
6
+ export function measureSize(element: HTMLElement): Size {
7
+ return { width: element.offsetWidth, height: element.offsetHeight }
8
+ }
9
+
10
+ export function observeSize(element: HTMLElement, onChange: (size: Size) => void) {
11
+ const observer = new ResizeObserver(entries => {
12
+ if (!Array.isArray(entries) || !entries.length) return
13
+ const entry = entries[0]!
14
+ const border = Array.isArray(entry.borderBoxSize) ? entry.borderBoxSize[0] : entry.borderBoxSize
15
+ onChange(border ? { width: border.inlineSize, height: border.blockSize } : measureSize(element))
16
+ })
17
+ observer.observe(element, { box: 'border-box' })
18
+ return () => observer.disconnect()
19
+ }
@@ -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.