vectis-ui 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (511) hide show
  1. package/dist/components/VAccordion/VAccordion.css +1 -1
  2. package/dist/components/VAccordion/VAccordion.d.ts +6 -5
  3. package/dist/components/VAccordion/VAccordion.js.map +1 -1
  4. package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
  5. package/dist/components/VAccordion/VAccordionItem.css +1 -1
  6. package/dist/components/VAccordion/VAccordionItem.d.ts +1 -1
  7. package/dist/components/VAccordion/VAccordionItem.js.map +1 -1
  8. package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  9. package/dist/components/VAlert/VAlert.css +2 -0
  10. package/dist/components/VAlert/VAlert.d.ts +73 -0
  11. package/dist/components/VAlert/VAlert.js +9 -0
  12. package/dist/components/VAlert/VAlert.js.map +1 -0
  13. package/dist/components/VAlert/VAlert.vue_vue_type_script_setup_true_lang.js +96 -0
  14. package/dist/components/VAlert/VAlert.vue_vue_type_script_setup_true_lang.js.map +1 -0
  15. package/dist/components/VAvatar/VAvatar.d.ts +2 -2
  16. package/dist/components/VAvatar/VAvatarGroup.d.ts +1 -1
  17. package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js +8 -8
  18. package/dist/components/VBadge/VBadge.d.ts +3 -3
  19. package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js +9 -9
  20. package/dist/components/VButton/VButton.d.ts +4 -4
  21. package/dist/components/VButton/VButtonGroup.css +1 -1
  22. package/dist/components/VButton/VButtonGroup.d.ts +2 -2
  23. package/dist/components/VButton/VButtonGroup.js.map +1 -1
  24. package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  25. package/dist/components/VCalendar/VCalendar.css +1 -1
  26. package/dist/components/VCalendar/VCalendar.d.ts +7 -1
  27. package/dist/components/VCalendar/VCalendar.js.map +1 -1
  28. package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js +20 -18
  29. package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  30. package/dist/components/VCalendar/VCalendarEvent.js.map +1 -1
  31. package/dist/components/VCalendar/VCalendarEvent.vue_vue_type_script_setup_true_lang.js.map +1 -1
  32. package/dist/components/VCalendar/VCalendarMonth.css +1 -1
  33. package/dist/components/VCalendar/VCalendarMonth.d.ts +2 -2
  34. package/dist/components/VCalendar/VCalendarMonth.js.map +1 -1
  35. package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js.map +1 -1
  36. package/dist/components/VCalendar/VCalendarTimeGrid.css +1 -1
  37. package/dist/components/VCalendar/VCalendarTimeGrid.d.ts +3 -3
  38. package/dist/components/VCalendar/VCalendarTimeGrid.js.map +1 -1
  39. package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js.map +1 -1
  40. package/dist/components/VCalendar/VCalendarYear.css +1 -1
  41. package/dist/components/VCalendar/VCalendarYear.js.map +1 -1
  42. package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js.map +1 -1
  43. package/dist/components/VCalendar/gesture.d.ts +1 -16
  44. package/dist/components/VCalendar/gesture.js +1 -1
  45. package/dist/components/VCalendar/gesture.js.map +1 -1
  46. package/dist/components/VCalendar/types.d.ts +2 -0
  47. package/dist/components/VCard/VCard.css +2 -0
  48. package/dist/components/VCard/VCard.d.ts +87 -0
  49. package/dist/components/VCard/VCard.js +9 -0
  50. package/dist/components/VCard/VCard.js.map +1 -0
  51. package/dist/components/VCard/VCard.vue_vue_type_script_setup_true_lang.js +103 -0
  52. package/dist/components/VCard/VCard.vue_vue_type_script_setup_true_lang.js.map +1 -0
  53. package/dist/components/VCarousel/VCarousel.d.ts +1 -1
  54. package/dist/components/VCarousel/VCarousel.js.map +1 -1
  55. package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js +18 -18
  56. package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  57. package/dist/components/VCheckbox/VCheckMark.css +2 -0
  58. package/dist/components/VCheckbox/VCheckMark.js +9 -0
  59. package/dist/components/VCheckbox/VCheckMark.js.map +1 -0
  60. package/dist/components/VCheckbox/VCheckMark.vue_vue_type_script_setup_true_lang.js +33 -0
  61. package/dist/components/VCheckbox/VCheckMark.vue_vue_type_script_setup_true_lang.js.map +1 -0
  62. package/dist/components/VCheckbox/VCheckbox.css +1 -1
  63. package/dist/components/VCheckbox/VCheckbox.d.ts +8 -3
  64. package/dist/components/VCheckbox/VCheckbox.js.map +1 -1
  65. package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js +54 -69
  66. package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  67. package/dist/components/VChip/VChip.d.ts +6 -6
  68. package/dist/components/VChip/VChip.js.map +1 -1
  69. package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js +26 -26
  70. package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  71. package/dist/components/VColorInput/VColorInput.css +2 -0
  72. package/dist/components/VColorInput/VColorInput.d.ts +113 -0
  73. package/dist/components/VColorInput/VColorInput.js +9 -0
  74. package/dist/components/VColorInput/VColorInput.js.map +1 -0
  75. package/dist/components/VColorInput/VColorInput.vue_vue_type_script_setup_true_lang.js +230 -0
  76. package/dist/components/VColorInput/VColorInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  77. package/dist/components/VColorPicker/VColorPicker.css +2 -0
  78. package/dist/components/VColorPicker/VColorPicker.d.ts +67 -0
  79. package/dist/components/VColorPicker/VColorPicker.js +9 -0
  80. package/dist/components/VColorPicker/VColorPicker.js.map +1 -0
  81. package/dist/components/VColorPicker/VColorPicker.vue_vue_type_script_setup_true_lang.js +390 -0
  82. package/dist/components/VColorPicker/VColorPicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
  83. package/dist/components/VColorPicker/color.d.ts +42 -0
  84. package/dist/components/VColorPicker/color.js +158 -0
  85. package/dist/components/VColorPicker/color.js.map +1 -0
  86. package/dist/components/VCombobox/VCombobox.css +1 -1
  87. package/dist/components/VCombobox/VCombobox.d.ts +46 -60
  88. package/dist/components/VCombobox/VCombobox.js.map +1 -1
  89. package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js +271 -372
  90. package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  91. package/dist/components/VCommandPalette/VCommandPalette.css +2 -0
  92. package/dist/components/VCommandPalette/VCommandPalette.d.ts +163 -0
  93. package/dist/components/VCommandPalette/VCommandPalette.js +9 -0
  94. package/dist/components/VCommandPalette/VCommandPalette.js.map +1 -0
  95. package/dist/components/VCommandPalette/VCommandPalette.vue_vue_type_script_setup_true_lang.js +321 -0
  96. package/dist/components/VCommandPalette/VCommandPalette.vue_vue_type_script_setup_true_lang.js.map +1 -0
  97. package/dist/components/VCommandPalette/VCommandPaletteItem.css +2 -0
  98. package/dist/components/VCommandPalette/VCommandPaletteItem.d.ts +38 -0
  99. package/dist/components/VCommandPalette/VCommandPaletteItem.js +9 -0
  100. package/dist/components/VCommandPalette/VCommandPaletteItem.js.map +1 -0
  101. package/dist/components/VCommandPalette/VCommandPaletteItem.vue_vue_type_script_setup_true_lang.js +69 -0
  102. package/dist/components/VCommandPalette/VCommandPaletteItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
  103. package/dist/components/VContextMenu/VContextMenu.css +2 -0
  104. package/dist/components/VContextMenu/VContextMenu.d.ts +66 -0
  105. package/dist/components/VContextMenu/VContextMenu.js +9 -0
  106. package/dist/components/VContextMenu/VContextMenu.js.map +1 -0
  107. package/dist/components/VContextMenu/VContextMenu.vue_vue_type_script_setup_true_lang.js +148 -0
  108. package/dist/components/VContextMenu/VContextMenu.vue_vue_type_script_setup_true_lang.js.map +1 -0
  109. package/dist/components/VDataTable/VDataTable.css +1 -1
  110. package/dist/components/VDataTable/VDataTable.d.ts +41 -23
  111. package/dist/components/VDataTable/VDataTable.js.map +1 -1
  112. package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js +291 -186
  113. package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  114. package/dist/components/VDateInput/VDateInput.d.ts +27 -7
  115. package/dist/components/VDateInput/VDateInput.js.map +1 -1
  116. package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js +170 -162
  117. package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  118. package/dist/components/VDatePicker/VDatePicker.d.ts +3 -3
  119. package/dist/components/VDatePicker/VDatePicker.js.map +1 -1
  120. package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js +228 -227
  121. package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  122. package/dist/components/VDatePicker/keyboard.d.ts +7 -7
  123. package/dist/components/VDatePicker/keyboard.js +8 -6
  124. package/dist/components/VDatePicker/keyboard.js.map +1 -1
  125. package/dist/components/VDatePicker/names.js +16 -20
  126. package/dist/components/VDatePicker/names.js.map +1 -1
  127. package/dist/components/VDialog/VDialog.d.ts +2 -4
  128. package/dist/components/VDialog/VDialog.js.map +1 -1
  129. package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js +46 -77
  130. package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  131. package/dist/components/VDrawer/VDrawer.css +2 -0
  132. package/dist/components/VDrawer/VDrawer.d.ts +102 -0
  133. package/dist/components/VDrawer/VDrawer.js +9 -0
  134. package/dist/components/VDrawer/VDrawer.js.map +1 -0
  135. package/dist/components/VDrawer/VDrawer.vue_vue_type_script_setup_true_lang.js +128 -0
  136. package/dist/components/VDrawer/VDrawer.vue_vue_type_script_setup_true_lang.js.map +1 -0
  137. package/dist/components/VEmptyState/VEmptyState.css +2 -0
  138. package/dist/components/VEmptyState/VEmptyState.d.ts +43 -0
  139. package/dist/components/VEmptyState/VEmptyState.js +9 -0
  140. package/dist/components/VEmptyState/VEmptyState.js.map +1 -0
  141. package/dist/components/VEmptyState/VEmptyState.vue_vue_type_script_setup_true_lang.js +48 -0
  142. package/dist/components/VEmptyState/VEmptyState.vue_vue_type_script_setup_true_lang.js.map +1 -0
  143. package/dist/components/VField/VField.css +2 -0
  144. package/dist/components/VField/VField.d.ts +84 -0
  145. package/dist/components/VField/VField.js +9 -0
  146. package/dist/components/VField/VField.js.map +1 -0
  147. package/dist/components/VField/VField.vue_vue_type_script_setup_true_lang.js +99 -0
  148. package/dist/components/VField/VField.vue_vue_type_script_setup_true_lang.js.map +1 -0
  149. package/dist/components/VField/VFieldAnnouncer.d.ts +7 -0
  150. package/dist/components/VField/VFieldAnnouncer.js +7 -0
  151. package/dist/components/VField/VFieldAnnouncer.js.map +1 -0
  152. package/dist/components/VField/VFieldAnnouncer.vue_vue_type_script_setup_true_lang.js +19 -0
  153. package/dist/components/VField/VFieldAnnouncer.vue_vue_type_script_setup_true_lang.js.map +1 -0
  154. package/dist/components/VField/VFieldMessage.d.ts +11 -0
  155. package/dist/components/VField/VFieldMessage.js +7 -0
  156. package/dist/components/VField/VFieldMessage.js.map +1 -0
  157. package/dist/components/VField/VFieldMessage.vue_vue_type_script_setup_true_lang.js +32 -0
  158. package/dist/components/VField/VFieldMessage.vue_vue_type_script_setup_true_lang.js.map +1 -0
  159. package/dist/components/VFieldset/VFieldset.css +2 -0
  160. package/dist/components/VFieldset/VFieldset.d.ts +52 -0
  161. package/dist/components/VFieldset/VFieldset.js +9 -0
  162. package/dist/components/VFieldset/VFieldset.js.map +1 -0
  163. package/dist/components/VFieldset/VFieldset.vue_vue_type_script_setup_true_lang.js +63 -0
  164. package/dist/components/VFieldset/VFieldset.vue_vue_type_script_setup_true_lang.js.map +1 -0
  165. package/dist/components/VFileInput/VFileInput.css +1 -1
  166. package/dist/components/VFileInput/VFileInput.d.ts +31 -7
  167. package/dist/components/VFileInput/VFileInput.js.map +1 -1
  168. package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js +168 -161
  169. package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  170. package/dist/components/VFilePicker/VFilePicker.d.ts +4 -4
  171. package/dist/components/VHotkeys/VHotkeys.css +1 -1
  172. package/dist/components/VHotkeys/VHotkeys.js.map +1 -1
  173. package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js +27 -30
  174. package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js.map +1 -1
  175. package/dist/components/VHotkeys/platform.d.ts +2 -0
  176. package/dist/components/VHotkeys/platform.js +24 -5
  177. package/dist/components/VHotkeys/platform.js.map +1 -1
  178. package/dist/components/VHoverCard/VHoverCard.css +2 -0
  179. package/dist/components/VHoverCard/VHoverCard.d.ts +62 -0
  180. package/dist/components/VHoverCard/VHoverCard.js +9 -0
  181. package/dist/components/VHoverCard/VHoverCard.js.map +1 -0
  182. package/dist/components/VHoverCard/VHoverCard.vue_vue_type_script_setup_true_lang.js +97 -0
  183. package/dist/components/VHoverCard/VHoverCard.vue_vue_type_script_setup_true_lang.js.map +1 -0
  184. package/dist/components/VIcon/icons/add.d.ts +5 -0
  185. package/dist/components/VIcon/icons/add.js +9 -0
  186. package/dist/components/VIcon/icons/add.js.map +1 -0
  187. package/dist/components/VIcon/icons/colorize.d.ts +5 -0
  188. package/dist/components/VIcon/icons/colorize.js +9 -0
  189. package/dist/components/VIcon/icons/colorize.js.map +1 -0
  190. package/dist/components/VIcon/icons/inbox.d.ts +5 -0
  191. package/dist/components/VIcon/icons/inbox.js +9 -0
  192. package/dist/components/VIcon/icons/inbox.js.map +1 -0
  193. package/dist/components/VIcon/icons/index.d.ts +42 -2
  194. package/dist/components/VIcon/icons/index.js +88 -72
  195. package/dist/components/VIcon/icons/index.js.map +1 -1
  196. package/dist/components/VIcon/icons/names.d.ts +2 -2
  197. package/dist/components/VIcon/icons/names.js +1 -1
  198. package/dist/components/VIcon/icons/names.js.map +1 -1
  199. package/dist/components/VIcon/icons/open_in_new.d.ts +5 -0
  200. package/dist/components/VIcon/icons/open_in_new.js +9 -0
  201. package/dist/components/VIcon/icons/open_in_new.js.map +1 -0
  202. package/dist/components/VIcon/icons/priority_high.d.ts +5 -0
  203. package/dist/components/VIcon/icons/priority_high.js +9 -0
  204. package/dist/components/VIcon/icons/priority_high.js.map +1 -0
  205. package/dist/components/VIcon/icons/remove.d.ts +5 -0
  206. package/dist/components/VIcon/icons/remove.js +9 -0
  207. package/dist/components/VIcon/icons/remove.js.map +1 -0
  208. package/dist/components/VIcon/icons/search_off.d.ts +5 -0
  209. package/dist/components/VIcon/icons/search_off.js +9 -0
  210. package/dist/components/VIcon/icons/search_off.js.map +1 -0
  211. package/dist/components/VIcon/icons/star.d.ts +5 -0
  212. package/dist/components/VIcon/icons/star.js +9 -0
  213. package/dist/components/VIcon/icons/star.js.map +1 -0
  214. package/dist/components/VIconButton/VIconButton.d.ts +4 -4
  215. package/dist/components/VInput/VInput.css +1 -1
  216. package/dist/components/VInput/VInput.d.ts +51 -2
  217. package/dist/components/VInput/VInput.js.map +1 -1
  218. package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js +129 -106
  219. package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  220. package/dist/components/VInput/VInputGroup.css +1 -1
  221. package/dist/components/VInput/VInputGroup.d.ts +20 -0
  222. package/dist/components/VInput/VInputGroup.js.map +1 -1
  223. package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js +50 -51
  224. package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  225. package/dist/components/VInputOTP/VInputOTP.css +1 -1
  226. package/dist/components/VInputOTP/VInputOTP.d.ts +27 -4
  227. package/dist/components/VInputOTP/VInputOTP.js.map +1 -1
  228. package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js +131 -113
  229. package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js.map +1 -1
  230. package/dist/components/VLink/VLink.css +2 -0
  231. package/dist/components/VLink/VLink.d.ts +53 -0
  232. package/dist/components/VLink/VLink.js +9 -0
  233. package/dist/components/VLink/VLink.js.map +1 -0
  234. package/dist/components/VLink/VLink.vue_vue_type_script_setup_true_lang.js +58 -0
  235. package/dist/components/VLink/VLink.vue_vue_type_script_setup_true_lang.js.map +1 -0
  236. package/dist/components/VListbox/VListboxChevron.css +2 -0
  237. package/dist/components/VListbox/VListboxChevron.d.ts +12 -0
  238. package/dist/components/VListbox/VListboxChevron.js +9 -0
  239. package/dist/components/VListbox/VListboxChevron.js.map +1 -0
  240. package/dist/components/VListbox/VListboxChevron.vue_vue_type_script_setup_true_lang.js +25 -0
  241. package/dist/components/VListbox/VListboxChevron.vue_vue_type_script_setup_true_lang.js.map +1 -0
  242. package/dist/components/VListbox/VListboxGroup.css +2 -0
  243. package/dist/components/VListbox/VListboxGroup.d.ts +27 -0
  244. package/dist/components/VListbox/VListboxGroup.js +9 -0
  245. package/dist/components/VListbox/VListboxGroup.js.map +1 -0
  246. package/dist/components/VListbox/VListboxGroup.vue_vue_type_script_setup_true_lang.js +21 -0
  247. package/dist/components/VListbox/VListboxGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
  248. package/dist/components/VListbox/VListboxOption.css +2 -0
  249. package/dist/components/{VCombobox/VComboboxOption.d.ts → VListbox/VListboxOption.d.ts} +4 -4
  250. package/dist/components/VListbox/VListboxOption.js +9 -0
  251. package/dist/components/VListbox/VListboxOption.js.map +1 -0
  252. package/dist/components/{VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js → VListbox/VListboxOption.vue_vue_type_script_setup_true_lang.js} +6 -6
  253. package/dist/components/VListbox/VListboxOption.vue_vue_type_script_setup_true_lang.js.map +1 -0
  254. package/dist/components/VListbox/VListboxPanel.css +2 -0
  255. package/dist/components/VListbox/VListboxPanel.d.ts +59 -0
  256. package/dist/components/VListbox/VListboxPanel.js +9 -0
  257. package/dist/components/VListbox/VListboxPanel.js.map +1 -0
  258. package/dist/components/VListbox/VListboxPanel.vue_vue_type_script_setup_true_lang.js +123 -0
  259. package/dist/components/VListbox/VListboxPanel.vue_vue_type_script_setup_true_lang.js.map +1 -0
  260. package/dist/components/VListbox/VListboxSeparator.css +2 -0
  261. package/dist/components/VListbox/VListboxSeparator.d.ts +3 -0
  262. package/dist/components/VListbox/VListboxSeparator.js +9 -0
  263. package/dist/components/VListbox/VListboxSeparator.js.map +1 -0
  264. package/dist/components/{VCombobox/VComboboxSeparator.vue_vue_type_script_setup_true_lang.js → VListbox/VListboxSeparator.vue_vue_type_script_setup_true_lang.js} +4 -4
  265. package/dist/components/VListbox/VListboxSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -0
  266. package/dist/components/VListbox/VListboxValues.css +2 -0
  267. package/dist/components/VListbox/VListboxValues.d.ts +52 -0
  268. package/dist/components/VListbox/VListboxValues.js +9 -0
  269. package/dist/components/VListbox/VListboxValues.js.map +1 -0
  270. package/dist/components/VListbox/VListboxValues.vue_vue_type_script_setup_true_lang.js +103 -0
  271. package/dist/components/VListbox/VListboxValues.vue_vue_type_script_setup_true_lang.js.map +1 -0
  272. package/dist/components/VMenu/VMenu.d.ts +1 -1
  273. package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js +9 -9
  274. package/dist/components/VMenu/VMenuItem.d.ts +1 -1
  275. package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js +16 -16
  276. package/dist/components/VMenu/VMenuPanel.d.ts +2 -2
  277. package/dist/components/VMenu/VMenuPanel.js.map +1 -1
  278. package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js +7 -7
  279. package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  280. package/dist/components/VMeter/VMeter.css +2 -0
  281. package/dist/components/VMeter/VMeter.d.ts +77 -0
  282. package/dist/components/VMeter/VMeter.js +9 -0
  283. package/dist/components/VMeter/VMeter.js.map +1 -0
  284. package/dist/components/VMeter/VMeter.vue_vue_type_script_setup_true_lang.js +113 -0
  285. package/dist/components/VMeter/VMeter.vue_vue_type_script_setup_true_lang.js.map +1 -0
  286. package/dist/components/VNumberInput/VNumberInput.css +2 -0
  287. package/dist/components/VNumberInput/VNumberInput.d.ts +114 -0
  288. package/dist/components/VNumberInput/VNumberInput.js +9 -0
  289. package/dist/components/VNumberInput/VNumberInput.js.map +1 -0
  290. package/dist/components/VNumberInput/VNumberInput.vue_vue_type_script_setup_true_lang.js +251 -0
  291. package/dist/components/VNumberInput/VNumberInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  292. package/dist/components/VNumberInput/number.d.ts +30 -0
  293. package/dist/components/VNumberInput/number.js +38 -0
  294. package/dist/components/VNumberInput/number.js.map +1 -0
  295. package/dist/components/VPagination/VPagination.css +1 -1
  296. package/dist/components/VPagination/VPagination.d.ts +4 -12
  297. package/dist/components/VPagination/VPagination.js.map +1 -1
  298. package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js +89 -96
  299. package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
  300. package/dist/components/VProgressCircular/VProgressCircular.d.ts +2 -2
  301. package/dist/components/VProgressLinear/VProgressLinear.css +1 -1
  302. package/dist/components/VProgressLinear/VProgressLinear.d.ts +10 -7
  303. package/dist/components/VProgressLinear/VProgressLinear.js.map +1 -1
  304. package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js +52 -34
  305. package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js.map +1 -1
  306. package/dist/components/VRadio/VRadio.d.ts +8 -3
  307. package/dist/components/VRadio/VRadio.js.map +1 -1
  308. package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js +52 -46
  309. package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js.map +1 -1
  310. package/dist/components/VRating/VRating.css +2 -0
  311. package/dist/components/VRating/VRating.d.ts +92 -0
  312. package/dist/components/VRating/VRating.js +9 -0
  313. package/dist/components/VRating/VRating.js.map +1 -0
  314. package/dist/components/VRating/VRating.vue_vue_type_script_setup_true_lang.js +158 -0
  315. package/dist/components/VRating/VRating.vue_vue_type_script_setup_true_lang.js.map +1 -0
  316. package/dist/components/VResizable/VResizable.css +2 -0
  317. package/dist/components/VResizable/VResizable.d.ts +50 -0
  318. package/dist/components/VResizable/VResizable.js +9 -0
  319. package/dist/components/VResizable/VResizable.js.map +1 -0
  320. package/dist/components/VResizable/VResizable.vue_vue_type_script_setup_true_lang.js +225 -0
  321. package/dist/components/VResizable/VResizable.vue_vue_type_script_setup_true_lang.js.map +1 -0
  322. package/dist/components/VResizable/VResizablePanel.css +2 -0
  323. package/dist/components/VResizable/VResizablePanel.d.ts +60 -0
  324. package/dist/components/VResizable/VResizablePanel.js +9 -0
  325. package/dist/components/VResizable/VResizablePanel.js.map +1 -0
  326. package/dist/components/VResizable/VResizablePanel.vue_vue_type_script_setup_true_lang.js +83 -0
  327. package/dist/components/VResizable/VResizablePanel.vue_vue_type_script_setup_true_lang.js.map +1 -0
  328. package/dist/components/VResizable/context.d.ts +24 -0
  329. package/dist/components/VResizable/context.js +6 -0
  330. package/dist/components/VResizable/context.js.map +1 -0
  331. package/dist/components/VResizable/layout.d.ts +28 -0
  332. package/dist/components/VResizable/layout.js +41 -0
  333. package/dist/components/VResizable/layout.js.map +1 -0
  334. package/dist/components/VSelect/VSelect.css +2 -0
  335. package/dist/components/VSelect/VSelect.d.ts +193 -0
  336. package/dist/components/VSelect/VSelect.js +9 -0
  337. package/dist/components/VSelect/VSelect.js.map +1 -0
  338. package/dist/components/VSelect/VSelect.vue_vue_type_script_setup_true_lang.js +424 -0
  339. package/dist/components/VSelect/VSelect.vue_vue_type_script_setup_true_lang.js.map +1 -0
  340. package/dist/components/VSeparator/VSeparator.js.map +1 -1
  341. package/dist/components/VSeparator/VSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
  342. package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js +8 -8
  343. package/dist/components/VSideNavigation/VSideNavigationItem.d.ts +2 -2
  344. package/dist/components/VSideNavigation/VSideNavigationItem.js.map +1 -1
  345. package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js +3 -3
  346. package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  347. package/dist/components/VSkeletonLoader/VSkeletonLoader.d.ts +3 -3
  348. package/dist/components/VSlider/VSlider.css +1 -1
  349. package/dist/components/VSlider/VSlider.d.ts +34 -8
  350. package/dist/components/VSlider/VSlider.js.map +1 -1
  351. package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js +236 -215
  352. package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js.map +1 -1
  353. package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js +4 -4
  354. package/dist/components/VSnackbar/state.js.map +1 -1
  355. package/dist/components/VSplitButton/VSplitButton.css +2 -0
  356. package/dist/components/VSplitButton/VSplitButton.d.ts +114 -0
  357. package/dist/components/VSplitButton/VSplitButton.js +9 -0
  358. package/dist/components/VSplitButton/VSplitButton.js.map +1 -0
  359. package/dist/components/VSplitButton/VSplitButton.vue_vue_type_script_setup_true_lang.js +148 -0
  360. package/dist/components/VSplitButton/VSplitButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
  361. package/dist/components/VStepper/VStepper.css +2 -0
  362. package/dist/components/VStepper/VStepper.d.ts +73 -0
  363. package/dist/components/VStepper/VStepper.js +9 -0
  364. package/dist/components/VStepper/VStepper.js.map +1 -0
  365. package/dist/components/VStepper/VStepper.vue_vue_type_script_setup_true_lang.js +96 -0
  366. package/dist/components/VStepper/VStepper.vue_vue_type_script_setup_true_lang.js.map +1 -0
  367. package/dist/components/VSwitch/VSwitch.d.ts +8 -3
  368. package/dist/components/VSwitch/VSwitch.js.map +1 -1
  369. package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js +53 -47
  370. package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js.map +1 -1
  371. package/dist/components/VTabs/VTab.css +1 -1
  372. package/dist/components/VTabs/VTab.d.ts +1 -1
  373. package/dist/components/VTabs/VTab.js.map +1 -1
  374. package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js.map +1 -1
  375. package/dist/components/VTabs/VTabs.css +1 -1
  376. package/dist/components/VTabs/VTabs.d.ts +13 -5
  377. package/dist/components/VTabs/VTabs.js.map +1 -1
  378. package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js +20 -20
  379. package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
  380. package/dist/components/VTextarea/VTextarea.css +1 -1
  381. package/dist/components/VTextarea/VTextarea.d.ts +22 -2
  382. package/dist/components/VTextarea/VTextarea.js.map +1 -1
  383. package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js +108 -100
  384. package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js.map +1 -1
  385. package/dist/components/VTimeInput/VTimeInput.d.ts +27 -7
  386. package/dist/components/VTimeInput/VTimeInput.js.map +1 -1
  387. package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js +187 -171
  388. package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  389. package/dist/components/VTimePicker/VTimePicker.d.ts +2 -2
  390. package/dist/components/VTimePicker/VTimePicker.js.map +1 -1
  391. package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js +15 -15
  392. package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  393. package/dist/components/VTimeline/VTimeline.css +2 -0
  394. package/dist/components/VTimeline/VTimeline.d.ts +59 -0
  395. package/dist/components/VTimeline/VTimeline.js +9 -0
  396. package/dist/components/VTimeline/VTimeline.js.map +1 -0
  397. package/dist/components/VTimeline/VTimeline.vue_vue_type_script_setup_true_lang.js +53 -0
  398. package/dist/components/VTimeline/VTimeline.vue_vue_type_script_setup_true_lang.js.map +1 -0
  399. package/dist/components/VTimeline/VTimelineItem.css +2 -0
  400. package/dist/components/VTimeline/VTimelineItem.d.ts +48 -0
  401. package/dist/components/VTimeline/VTimelineItem.js +9 -0
  402. package/dist/components/VTimeline/VTimelineItem.js.map +1 -0
  403. package/dist/components/VTimeline/VTimelineItem.vue_vue_type_script_setup_true_lang.js +70 -0
  404. package/dist/components/VTimeline/VTimelineItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
  405. package/dist/components/VTimeline/context.d.ts +11 -0
  406. package/dist/components/VTimeline/context.js +6 -0
  407. package/dist/components/VTimeline/context.js.map +1 -0
  408. package/dist/components/VTimeline/datetime.d.ts +8 -0
  409. package/dist/components/VTimeline/datetime.js +36 -0
  410. package/dist/components/VTimeline/datetime.js.map +1 -0
  411. package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js +8 -8
  412. package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js +12 -12
  413. package/dist/components/VToggle/VToggle.d.ts +4 -4
  414. package/dist/components/VToggle/VToggleItem.d.ts +1 -1
  415. package/dist/components/VTooltip/VTooltip.d.ts +8 -2
  416. package/dist/components/VTooltip/VTooltip.js.map +1 -1
  417. package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js +45 -43
  418. package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  419. package/dist/components/VTreeView/VTreeView.css +2 -0
  420. package/dist/components/VTreeView/VTreeView.d.ts +112 -0
  421. package/dist/components/VTreeView/VTreeView.js +9 -0
  422. package/dist/components/VTreeView/VTreeView.js.map +1 -0
  423. package/dist/components/VTreeView/VTreeView.vue_vue_type_script_setup_true_lang.js +321 -0
  424. package/dist/components/VTreeView/VTreeView.vue_vue_type_script_setup_true_lang.js.map +1 -0
  425. package/dist/components/VTypography/VTypography.d.ts +1 -1
  426. package/dist/components/VVirtualList/VVirtualList.css +2 -0
  427. package/dist/components/VVirtualList/VVirtualList.d.ts +78 -0
  428. package/dist/components/VVirtualList/VVirtualList.js +9 -0
  429. package/dist/components/VVirtualList/VVirtualList.js.map +1 -0
  430. package/dist/components/VVirtualList/VVirtualList.vue_vue_type_script_setup_true_lang.js +114 -0
  431. package/dist/components/VVirtualList/VVirtualList.vue_vue_type_script_setup_true_lang.js.map +1 -0
  432. package/dist/composables/useChoice.d.ts +28 -0
  433. package/dist/composables/useChoice.js +28 -0
  434. package/dist/composables/useChoice.js.map +1 -0
  435. package/dist/composables/useDebouncedSearch.d.ts +17 -0
  436. package/dist/composables/useDebouncedSearch.js +18 -0
  437. package/dist/composables/useDebouncedSearch.js.map +1 -0
  438. package/dist/composables/useEscapeDismiss.d.ts +8 -0
  439. package/dist/composables/useEscapeDismiss.js +16 -0
  440. package/dist/composables/useEscapeDismiss.js.map +1 -0
  441. package/dist/composables/useFieldIds.d.ts +2 -1
  442. package/dist/composables/useFieldIds.js +7 -6
  443. package/dist/composables/useFieldIds.js.map +1 -1
  444. package/dist/composables/useFieldPanel.d.ts +1 -0
  445. package/dist/composables/useFieldPanel.js +52 -42
  446. package/dist/composables/useFieldPanel.js.map +1 -1
  447. package/dist/composables/useFileField.d.ts +1 -3
  448. package/dist/composables/useFileField.js +48 -50
  449. package/dist/composables/useFileField.js.map +1 -1
  450. package/dist/composables/useHotkeyListener.d.ts +17 -0
  451. package/dist/composables/useHotkeyListener.js +26 -0
  452. package/dist/composables/useHotkeyListener.js.map +1 -0
  453. package/dist/composables/useIconClickHandlers.d.ts +2 -10
  454. package/dist/composables/useIconClickHandlers.js +1 -1
  455. package/dist/composables/useIconClickHandlers.js.map +1 -1
  456. package/dist/{components/VCombobox/infiniteScroll.d.ts → composables/useInfiniteScroll.d.ts} +6 -0
  457. package/dist/{components/VCombobox/infiniteScroll.js → composables/useInfiniteScroll.js} +7 -7
  458. package/dist/composables/useInfiniteScroll.js.map +1 -0
  459. package/dist/composables/useListbox.d.ts +132 -0
  460. package/dist/composables/useListbox.js +227 -0
  461. package/dist/composables/useListbox.js.map +1 -0
  462. package/dist/composables/useModalDialog.d.ts +28 -0
  463. package/dist/composables/useModalDialog.js +60 -0
  464. package/dist/composables/useModalDialog.js.map +1 -0
  465. package/dist/composables/useRootAttrs.d.ts +2 -3
  466. package/dist/composables/useRootAttrs.js.map +1 -1
  467. package/dist/composables/useVirtualList.d.ts +46 -0
  468. package/dist/composables/useVirtualList.js +145 -0
  469. package/dist/composables/useVirtualList.js.map +1 -0
  470. package/dist/i18n/en.js +50 -0
  471. package/dist/i18n/en.js.map +1 -1
  472. package/dist/i18n/fr.js +50 -0
  473. package/dist/i18n/fr.js.map +1 -1
  474. package/dist/i18n/types.d.ts +103 -2
  475. package/dist/icons.js +45 -37
  476. package/dist/index.d.ts +50 -4
  477. package/dist/index.js +80 -56
  478. package/dist/styles.css +1 -1
  479. package/dist/tokens/index.d.ts +43 -0
  480. package/dist/tokens/semantic.d.ts +42 -0
  481. package/dist/tokens/semantic.js +43 -1
  482. package/dist/tokens/semantic.js.map +1 -1
  483. package/dist/tokens/themes/dark.d.ts +1 -0
  484. package/dist/tokens/themes/dark.js +1 -0
  485. package/dist/tokens/themes/dark.js.map +1 -1
  486. package/dist/tokens.json +215 -1
  487. package/dist/types.d.ts +57 -4
  488. package/dist/utils/arrowNav.js.map +1 -1
  489. package/dist/utils/attrs.d.ts +9 -0
  490. package/dist/utils/attrs.js +14 -0
  491. package/dist/utils/attrs.js.map +1 -0
  492. package/dist/utils/date.d.ts +1 -0
  493. package/dist/utils/date.js +2 -2
  494. package/dist/utils/date.js.map +1 -1
  495. package/package.json +1 -1
  496. package/dist/components/VCombobox/VComboboxGroup.css +0 -2
  497. package/dist/components/VCombobox/VComboboxGroup.d.ts +0 -17
  498. package/dist/components/VCombobox/VComboboxGroup.js +0 -9
  499. package/dist/components/VCombobox/VComboboxGroup.js.map +0 -1
  500. package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js +0 -21
  501. package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js.map +0 -1
  502. package/dist/components/VCombobox/VComboboxOption.css +0 -2
  503. package/dist/components/VCombobox/VComboboxOption.js +0 -9
  504. package/dist/components/VCombobox/VComboboxOption.js.map +0 -1
  505. package/dist/components/VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js.map +0 -1
  506. package/dist/components/VCombobox/VComboboxSeparator.css +0 -2
  507. package/dist/components/VCombobox/VComboboxSeparator.js +0 -9
  508. package/dist/components/VCombobox/VComboboxSeparator.js.map +0 -1
  509. package/dist/components/VCombobox/VComboboxSeparator.vue_vue_type_script_setup_true_lang.js.map +0 -1
  510. package/dist/components/VCombobox/infiniteScroll.js.map +0 -1
  511. /package/dist/components/{VCombobox/VComboboxSeparator.d.ts → VCheckbox/VCheckMark.d.ts} +0 -0
@@ -0,0 +1,92 @@
1
+ import { IconSource } from '../VIcon/types.js';
2
+ /** The size of the icons: 20, 24 or 32 pixels. */
3
+ export type RatingSize = 'sm' | 'md' | 'lg';
4
+ /** The colour of the filled icons. */
5
+ export type RatingTone = 'accent' | 'warning' | 'danger' | 'success' | 'neutral';
6
+ interface RatingProps {
7
+ /** How many icons, and the highest value. */
8
+ max?: number;
9
+ /**
10
+ * The name of the group, shown as its legend. Without it, the group is named from the design
11
+ * system dictionary.
12
+ */
13
+ label?: string;
14
+ /** Hides the label visually. It still names the group for assistive technology. */
15
+ hideLabel?: boolean;
16
+ /** A line of help under the icons, read along with the group's name. */
17
+ hint?: string;
18
+ /**
19
+ * A message saying what is wrong, shown in place of the hint and read along with the group's
20
+ * name. It is announced when it appears or changes.
21
+ */
22
+ error?: string;
23
+ /**
24
+ * Marks the rating as invalid, which colours the icons and tells assistive technology so. It
25
+ * is for a rule the browser cannot check by itself.
26
+ */
27
+ invalid?: boolean;
28
+ /** Requires a rating before the form is sent. An asterisk follows the label. */
29
+ required?: boolean;
30
+ /** The name the value is sent under in a form. */
31
+ name?: string;
32
+ /**
33
+ * Lets the rating go back to none: clicking the current value again clears it, and a "No
34
+ * rating" choice comes first for the keyboard.
35
+ */
36
+ clearable?: boolean;
37
+ /**
38
+ * Shows the value without letting it change. The icons become a single image, and a fractional
39
+ * value fills part of an icon.
40
+ */
41
+ readonly?: boolean;
42
+ /** Makes the rating unusable. */
43
+ disabled?: boolean;
44
+ /** The size of the icons. */
45
+ size?: RatingSize;
46
+ /** The colour of the filled icons. */
47
+ tone?: RatingTone;
48
+ /**
49
+ * A colour of your own for the filled icons (hex, CSS name or `oklch()`), which replaces the
50
+ * tone. Its contrast with the background is yours to check.
51
+ */
52
+ color?: string;
53
+ /**
54
+ * The icon: an icon name, or an explicit render. An empty one is drawn in outline and a filled
55
+ * one with the icon's filled form.
56
+ */
57
+ icon?: IconSource;
58
+ }
59
+ type __VLS_Props = RatingProps;
60
+ type __VLS_ModelProps = {
61
+ /** The rating, from 1 to `max`, or `null` when there is none. Read-only, it may be fractional. */
62
+ modelValue?: number | null;
63
+ };
64
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
65
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {
66
+ /** Moves the focus to the checked radio, or to the first icon when there is no rating. */
67
+ focus: (options?: FocusOptions) => void | undefined;
68
+ /** The `<fieldset>`, which also receives the consumer's attributes. */
69
+ el: import('vue').ComputedRef<HTMLFieldSetElement | null>;
70
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
71
+ "update:modelValue": (value: number | null) => any;
72
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
73
+ "onUpdate:modelValue"?: ((value: number | null) => any) | undefined;
74
+ }>, {
75
+ label: string;
76
+ error: string;
77
+ name: string;
78
+ size: RatingSize;
79
+ tone: RatingTone;
80
+ color: string;
81
+ disabled: boolean;
82
+ required: boolean;
83
+ icon: IconSource;
84
+ invalid: boolean;
85
+ hint: string;
86
+ hideLabel: boolean;
87
+ readonly: boolean;
88
+ clearable: boolean;
89
+ max: number;
90
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
91
+ declare const _default: typeof __VLS_export;
92
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import './VRating.css';
2
+ import e from "./VRating.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/VRating/VRating.vue
5
+ var t = e;
6
+ //#endregion
7
+ export { t as default };
8
+
9
+ //# sourceMappingURL=VRating.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VRating.js","names":[],"sources":["../../../src/components/VRating/VRating.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @a11y @core\n/**\n * A rating chosen among native radios, one per icon, grouped in a `<fieldset>`: the browser\n * provides the arrow keys, form submission and `required`. Read-only, the icons become one image\n * whose name says the value, which may then be fractional.\n */\nimport { computed, ref, useAttrs, useId } from 'vue'\n\nimport VFieldset from '../VFieldset/VFieldset.vue'\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { star as starIcon } from '../VIcon/icons/star'\nimport type { IconSource } from '../VIcon/types'\nimport { useLocale, useMessages } from '../../i18n/state'\nimport { customColorStyle } from '../../utils/css'\nimport { clamp } from '../../utils/number'\n\n/** The size of the icons: 20, 24 or 32 pixels. */\nexport type RatingSize = 'sm' | 'md' | 'lg'\n\n/** The colour of the filled icons. */\nexport type RatingTone = 'accent' | 'warning' | 'danger' | 'success' | 'neutral'\n\ninterface RatingProps {\n /** How many icons, and the highest value. */\n max?: number\n /**\n * The name of the group, shown as its legend. Without it, the group is named from the design\n * system dictionary.\n */\n label?: string\n /** Hides the label visually. It still names the group for assistive technology. */\n hideLabel?: boolean\n /** A line of help under the icons, read along with the group's name. */\n hint?: string\n /**\n * A message saying what is wrong, shown in place of the hint and read along with the group's\n * name. It is announced when it appears or changes.\n */\n error?: string\n /**\n * Marks the rating as invalid, which colours the icons and tells assistive technology so. It\n * is for a rule the browser cannot check by itself.\n */\n invalid?: boolean\n /** Requires a rating before the form is sent. An asterisk follows the label. */\n required?: boolean\n /** The name the value is sent under in a form. */\n name?: string\n /**\n * Lets the rating go back to none: clicking the current value again clears it, and a \"No\n * rating\" choice comes first for the keyboard.\n */\n clearable?: boolean\n /**\n * Shows the value without letting it change. The icons become a single image, and a fractional\n * value fills part of an icon.\n */\n readonly?: boolean\n /** Makes the rating unusable. */\n disabled?: boolean\n /** The size of the icons. */\n size?: RatingSize\n /** The colour of the filled icons. */\n tone?: RatingTone\n /**\n * A colour of your own for the filled icons (hex, CSS name or `oklch()`), which replaces the\n * tone. Its contrast with the background is yours to check.\n */\n color?: string\n /**\n * The icon: an icon name, or an explicit render. An empty one is drawn in outline and a filled\n * one with the icon's filled form.\n */\n icon?: IconSource\n}\n\n// The consumer's `aria-describedby` is merged with the hint and error references, and the\n// merged list is bound after the other attributes, which fallthrough would overwrite.\ndefineOptions({ inheritAttrs: false })\n\nconst props = withDefaults(defineProps<RatingProps>(), {\n max: 5,\n label: undefined,\n hideLabel: false,\n hint: undefined,\n error: undefined,\n invalid: false,\n required: false,\n name: undefined,\n clearable: false,\n readonly: false,\n disabled: false,\n size: 'md',\n tone: 'accent',\n color: undefined,\n icon: () => starIcon,\n})\n\n/** The rating, from 1 to `max`, or `null` when there is none. Read-only, it may be fractional. */\nconst model = defineModel<number | null>({ default: null })\n\nconst attrs = useAttrs()\nconst m = useMessages()\nconst locale = useLocale()\n\nconst isInvalid = computed(() => props.invalid || !!props.error)\n\n// Radios group by name, so the group needs one even when the form does not.\nconst uid = useId()\nconst groupName = computed(() => props.name ?? uid)\n\nconst values = computed(() => Array.from({ length: props.max }, (_, index) => index + 1))\n\nconst numberFormat = computed(\n () => new Intl.NumberFormat(locale.value, { maximumFractionDigits: 1 }),\n)\n\nconst valueText = computed(() =>\n m.value.rating.value(\n numberFormat.value.format(clamp(model.value ?? 0, 0, props.max)),\n numberFormat.value.format(props.max),\n ),\n)\n\n/** How much of the icon for `value` is filled, from 0 to 1. */\nfunction fill(value: number): number {\n return clamp((model.value ?? 0) - (value - 1), 0, 1)\n}\n\n// @core\n// A click on the checked radio fires no change; it clears instead. Only a pointer click does:\n// the keyboard reaches \"No rating\" with the arrows, and Space must not undo a choice.\nfunction onClick(value: number, event: MouseEvent) {\n if (props.clearable && model.value === value && event.detail > 0) model.value = null\n}\n\nconst fieldset = ref<InstanceType<typeof VFieldset> | null>(null)\nconst rootEl = computed(() => fieldset.value?.el ?? null)\n\ndefineExpose({\n /** Moves the focus to the checked radio, or to the first icon when there is no rating. */\n focus: (options?: FocusOptions) =>\n (\n rootEl.value?.querySelector<HTMLInputElement>('.v-rating-item input:checked') ??\n rootEl.value?.querySelector<HTMLInputElement>('.v-rating-item input')\n )?.focus(options),\n /** The `<fieldset>`, which also receives the consumer's attributes. */\n el: rootEl,\n})\n</script>\n\n<template>\n <VFieldset\n ref=\"fieldset\"\n class=\"v-rating v-tone\"\n :data-tone=\"tone\"\n :data-custom=\"color !== undefined ? '' : undefined\"\n :style=\"customColorStyle(color)\"\n :data-size=\"size\"\n :data-readonly=\"readonly ? '' : undefined\"\n :data-invalid=\"isInvalid ? '' : undefined\"\n :disabled=\"disabled\"\n :aria-label=\"label ? undefined : m.rating.label\"\n v-bind=\"attrs\"\n :legend=\"label\"\n :hint=\"hint\"\n :error=\"error\"\n :required=\"required\"\n :hide-legend=\"hideLabel\"\n >\n <span v-if=\"readonly\" class=\"v-rating-items\" role=\"img\" :aria-label=\"valueText\">\n <span\n v-for=\"value in values\"\n :key=\"value\"\n class=\"v-rating-item\"\n :style=\"{ '--rating-value': fill(value) }\"\n >\n <span class=\"v-rating-icon\">\n <VIcon class=\"v-rating-empty\" v-bind=\"iconProps(icon)\" />\n <VIcon class=\"v-rating-filled\" v-bind=\"iconProps(icon)\" filled />\n </span>\n </span>\n </span>\n\n <span v-else class=\"v-rating-items\">\n <label v-if=\"clearable\" class=\"v-rating-clear\">\n <input\n type=\"radio\"\n class=\"v-hidden-input\"\n :name=\"groupName\"\n value=\"\"\n :checked=\"model === null\"\n @change=\"model = null\"\n />\n <span class=\"v-visually-hidden\">{{ m.rating.empty }}</span>\n </label>\n <label\n v-for=\"value in values\"\n :key=\"value\"\n class=\"v-rating-item\"\n :style=\"{ '--rating-value': fill(value) }\"\n >\n <input\n type=\"radio\"\n class=\"v-hidden-input\"\n :name=\"groupName\"\n :value=\"value\"\n :checked=\"model === value\"\n :required=\"required\"\n :aria-invalid=\"isInvalid ? 'true' : undefined\"\n @change=\"model = value\"\n @click=\"onClick(value, $event)\"\n />\n <span class=\"v-rating-icon\">\n <VIcon class=\"v-rating-empty\" v-bind=\"iconProps(icon)\" />\n <VIcon class=\"v-rating-filled\" v-bind=\"iconProps(icon)\" filled />\n </span>\n <span class=\"v-visually-hidden\">{{\n m.rating.value(numberFormat.format(value), numberFormat.format(max))\n }}</span>\n </label>\n </span>\n <input v-if=\"readonly && name && model !== null\" type=\"hidden\" :name=\"name\" :value=\"model\" />\n </VFieldset>\n</template>\n\n<style>\n@layer vectis.components {\n .v-rating[data-size='sm'] {\n --vectis-icon-size: var(--vectis-control-size-rating-sm);\n }\n\n .v-rating[data-size='md'] {\n --vectis-icon-size: var(--vectis-control-size-rating-md);\n }\n\n .v-rating[data-size='lg'] {\n --vectis-icon-size: var(--vectis-control-size-rating-lg);\n }\n\n /* Positioned: it holds the hidden \"No rating\" radio, which has no box of its own. */\n .v-rating-items {\n position: relative;\n display: inline-flex;\n border-radius: var(--vectis-radius-interactive);\n }\n\n /* The padding widens the target around the icon: 24px at the smallest size. */\n .v-rating-item {\n --rating-shown: var(--rating-value);\n\n position: relative;\n display: inline-flex;\n padding: calc(var(--vectis-space-1) / 2);\n }\n\n label.v-rating-item {\n cursor: pointer;\n }\n\n /*\n * Hovering previews the rating: the hovered icon and those before it fill, the others empty.\n * The value is read from `--rating-value`, written inline, into `--rating-shown`, which these\n * rules can override where the inline style could not be.\n */\n /* The emptying rule weighs (0,1,0) and the filling one (0,3,1), which wins where both match. */\n :where(.v-rating:not(:disabled) .v-rating-items:has(label.v-rating-item:hover)) > .v-rating-item {\n --rating-shown: 0;\n }\n\n :where(.v-rating:not(:disabled)) label.v-rating-item:is(:hover, :has(~ .v-rating-item:hover)) {\n --rating-shown: 1;\n }\n\n .v-rating-icon {\n display: inline-grid;\n border-radius: var(--vectis-radius-xs);\n }\n\n .v-rating-icon > .v-icon {\n grid-area: 1 / 1;\n }\n\n .v-rating-empty {\n color: var(--vectis-color-border-strong);\n }\n\n /* The filled icon is clipped from the end, so a fraction fills the start of the icon. */\n .v-rating-filled {\n color: var(--tone-bg-solid);\n clip-path: inset(0 calc((1 - var(--rating-shown)) * 100%) 0 0);\n }\n\n .v-rating-filled:dir(rtl) {\n clip-path: inset(0 0 0 calc((1 - var(--rating-shown)) * 100%));\n }\n\n .v-rating-item .v-hidden-input:focus-visible + .v-rating-icon {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: var(--vectis-focus-ring-offset);\n }\n\n /* \"No rating\" has no icon of its own: its focus rings the whole row. */\n .v-rating-items:has(.v-rating-clear .v-hidden-input:focus-visible) {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: var(--vectis-focus-ring-offset);\n }\n\n .v-rating[data-invalid] .v-rating-empty {\n color: var(--vectis-color-danger);\n }\n\n .v-rating:disabled .v-rating-empty {\n color: var(--vectis-color-border);\n }\n\n .v-rating:disabled .v-rating-filled {\n color: var(--vectis-color-text-subtle);\n }\n\n .v-rating:disabled label.v-rating-item {\n cursor: not-allowed;\n }\n\n @media (forced-colors: active) {\n .v-rating-filled {\n color: Highlight;\n }\n\n .v-rating:disabled .v-rating-filled {\n color: GrayText;\n }\n }\n}\n</style>\n"],"mappings":""}
@@ -0,0 +1,158 @@
1
+ import { useLocale as e, useMessages as t } from "../../i18n/state.js";
2
+ import { iconProps as n } from "../VIcon/iconProps.js";
3
+ import { customColorStyle as r } from "../../utils/css.js";
4
+ import i from "../VIcon/VIcon.js";
5
+ import { clamp as a } from "../../utils/number.js";
6
+ import o from "../VFieldset/VFieldset.js";
7
+ import { star as s } from "../VIcon/icons/star.js";
8
+ import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createVNode as m, defineComponent as h, mergeModels as g, mergeProps as _, normalizeStyle as v, openBlock as y, ref as b, renderList as x, toDisplayString as S, unref as C, useAttrs as w, useId as T, useModel as E, withCtx as D } from "vue";
9
+ //#region src/components/VRating/VRating.vue?vue&type=script&setup=true&lang.ts
10
+ var O = ["aria-label"], k = { class: "v-rating-icon" }, A = {
11
+ key: 1,
12
+ class: "v-rating-items"
13
+ }, j = {
14
+ key: 0,
15
+ class: "v-rating-clear"
16
+ }, M = ["name", "checked"], N = { class: "v-visually-hidden" }, P = [
17
+ "name",
18
+ "value",
19
+ "checked",
20
+ "required",
21
+ "aria-invalid",
22
+ "onChange",
23
+ "onClick"
24
+ ], F = { class: "v-rating-icon" }, I = { class: "v-visually-hidden" }, L = ["name", "value"], R = /*@__PURE__*/ h({
25
+ inheritAttrs: !1,
26
+ __name: "VRating",
27
+ props: /*@__PURE__*/ g({
28
+ max: { default: 5 },
29
+ label: { default: void 0 },
30
+ hideLabel: {
31
+ type: Boolean,
32
+ default: !1
33
+ },
34
+ hint: { default: void 0 },
35
+ error: { default: void 0 },
36
+ invalid: {
37
+ type: Boolean,
38
+ default: !1
39
+ },
40
+ required: {
41
+ type: Boolean,
42
+ default: !1
43
+ },
44
+ name: { default: void 0 },
45
+ clearable: {
46
+ type: Boolean,
47
+ default: !1
48
+ },
49
+ readonly: {
50
+ type: Boolean,
51
+ default: !1
52
+ },
53
+ disabled: {
54
+ type: Boolean,
55
+ default: !1
56
+ },
57
+ size: { default: "md" },
58
+ tone: { default: "accent" },
59
+ color: { default: void 0 },
60
+ icon: { default: () => s }
61
+ }, {
62
+ modelValue: { default: null },
63
+ modelModifiers: {}
64
+ }),
65
+ emits: ["update:modelValue"],
66
+ setup(s, { expose: h }) {
67
+ let g = s, R = E(s, "modelValue"), z = w(), B = t(), V = e(), H = l(() => g.invalid || !!g.error), U = T(), W = l(() => g.name ?? U), G = l(() => Array.from({ length: g.max }, (e, t) => t + 1)), K = l(() => new Intl.NumberFormat(V.value, { maximumFractionDigits: 1 })), q = l(() => B.value.rating.value(K.value.format(a(R.value ?? 0, 0, g.max)), K.value.format(g.max)));
68
+ function J(e) {
69
+ return a((R.value ?? 0) - (e - 1), 0, 1);
70
+ }
71
+ function Y(e, t) {
72
+ g.clearable && R.value === e && t.detail > 0 && (R.value = null);
73
+ }
74
+ let X = b(null), Z = l(() => X.value?.el ?? null);
75
+ return h({
76
+ focus: (e) => (Z.value?.querySelector(".v-rating-item input:checked") ?? Z.value?.querySelector(".v-rating-item input"))?.focus(e),
77
+ el: Z
78
+ }), (e, t) => (y(), u(o, _({
79
+ ref_key: "fieldset",
80
+ ref: X,
81
+ class: "v-rating v-tone",
82
+ "data-tone": s.tone,
83
+ "data-custom": s.color === void 0 ? void 0 : "",
84
+ style: C(r)(s.color),
85
+ "data-size": s.size,
86
+ "data-readonly": s.readonly ? "" : void 0,
87
+ "data-invalid": H.value ? "" : void 0,
88
+ disabled: s.disabled,
89
+ "aria-label": s.label ? void 0 : C(B).rating.label
90
+ }, C(z), {
91
+ legend: s.label,
92
+ hint: s.hint,
93
+ error: s.error,
94
+ required: s.required,
95
+ "hide-legend": s.hideLabel
96
+ }), {
97
+ default: D(() => [s.readonly ? (y(), f("span", {
98
+ key: 0,
99
+ class: "v-rating-items",
100
+ role: "img",
101
+ "aria-label": q.value
102
+ }, [(y(!0), f(c, null, x(G.value, (e) => (y(), f("span", {
103
+ key: e,
104
+ class: "v-rating-item",
105
+ style: v({ "--rating-value": J(e) })
106
+ }, [p("span", k, [m(i, _({ class: "v-rating-empty" }, { ref_for: !0 }, C(n)(s.icon)), null, 16), m(i, _({ class: "v-rating-filled" }, { ref_for: !0 }, C(n)(s.icon), { filled: "" }), null, 16)])], 4))), 128))], 8, O)) : (y(), f("span", A, [s.clearable ? (y(), f("label", j, [p("input", {
107
+ type: "radio",
108
+ class: "v-hidden-input",
109
+ name: W.value,
110
+ value: "",
111
+ checked: R.value === null,
112
+ onChange: t[0] ||= (e) => R.value = null
113
+ }, null, 40, M), p("span", N, S(C(B).rating.empty), 1)])) : d("", !0), (y(!0), f(c, null, x(G.value, (e) => (y(), f("label", {
114
+ key: e,
115
+ class: "v-rating-item",
116
+ style: v({ "--rating-value": J(e) })
117
+ }, [
118
+ p("input", {
119
+ type: "radio",
120
+ class: "v-hidden-input",
121
+ name: W.value,
122
+ value: e,
123
+ checked: R.value === e,
124
+ required: s.required,
125
+ "aria-invalid": H.value ? "true" : void 0,
126
+ onChange: (t) => R.value = e,
127
+ onClick: (t) => Y(e, t)
128
+ }, null, 40, P),
129
+ p("span", F, [m(i, _({ class: "v-rating-empty" }, { ref_for: !0 }, C(n)(s.icon)), null, 16), m(i, _({ class: "v-rating-filled" }, { ref_for: !0 }, C(n)(s.icon), { filled: "" }), null, 16)]),
130
+ p("span", I, S(C(B).rating.value(K.value.format(e), K.value.format(s.max))), 1)
131
+ ], 4))), 128))])), s.readonly && s.name && R.value !== null ? (y(), f("input", {
132
+ key: 2,
133
+ type: "hidden",
134
+ name: s.name,
135
+ value: R.value
136
+ }, null, 8, L)) : d("", !0)]),
137
+ _: 1
138
+ }, 16, [
139
+ "data-tone",
140
+ "data-custom",
141
+ "style",
142
+ "data-size",
143
+ "data-readonly",
144
+ "data-invalid",
145
+ "disabled",
146
+ "aria-label",
147
+ "legend",
148
+ "hint",
149
+ "error",
150
+ "required",
151
+ "hide-legend"
152
+ ]));
153
+ }
154
+ });
155
+ //#endregion
156
+ export { R as default };
157
+
158
+ //# sourceMappingURL=VRating.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VRating.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VRating/VRating.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @a11y @core\n/**\n * A rating chosen among native radios, one per icon, grouped in a `<fieldset>`: the browser\n * provides the arrow keys, form submission and `required`. Read-only, the icons become one image\n * whose name says the value, which may then be fractional.\n */\nimport { computed, ref, useAttrs, useId } from 'vue'\n\nimport VFieldset from '../VFieldset/VFieldset.vue'\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { star as starIcon } from '../VIcon/icons/star'\nimport type { IconSource } from '../VIcon/types'\nimport { useLocale, useMessages } from '../../i18n/state'\nimport { customColorStyle } from '../../utils/css'\nimport { clamp } from '../../utils/number'\n\n/** The size of the icons: 20, 24 or 32 pixels. */\nexport type RatingSize = 'sm' | 'md' | 'lg'\n\n/** The colour of the filled icons. */\nexport type RatingTone = 'accent' | 'warning' | 'danger' | 'success' | 'neutral'\n\ninterface RatingProps {\n /** How many icons, and the highest value. */\n max?: number\n /**\n * The name of the group, shown as its legend. Without it, the group is named from the design\n * system dictionary.\n */\n label?: string\n /** Hides the label visually. It still names the group for assistive technology. */\n hideLabel?: boolean\n /** A line of help under the icons, read along with the group's name. */\n hint?: string\n /**\n * A message saying what is wrong, shown in place of the hint and read along with the group's\n * name. It is announced when it appears or changes.\n */\n error?: string\n /**\n * Marks the rating as invalid, which colours the icons and tells assistive technology so. It\n * is for a rule the browser cannot check by itself.\n */\n invalid?: boolean\n /** Requires a rating before the form is sent. An asterisk follows the label. */\n required?: boolean\n /** The name the value is sent under in a form. */\n name?: string\n /**\n * Lets the rating go back to none: clicking the current value again clears it, and a \"No\n * rating\" choice comes first for the keyboard.\n */\n clearable?: boolean\n /**\n * Shows the value without letting it change. The icons become a single image, and a fractional\n * value fills part of an icon.\n */\n readonly?: boolean\n /** Makes the rating unusable. */\n disabled?: boolean\n /** The size of the icons. */\n size?: RatingSize\n /** The colour of the filled icons. */\n tone?: RatingTone\n /**\n * A colour of your own for the filled icons (hex, CSS name or `oklch()`), which replaces the\n * tone. Its contrast with the background is yours to check.\n */\n color?: string\n /**\n * The icon: an icon name, or an explicit render. An empty one is drawn in outline and a filled\n * one with the icon's filled form.\n */\n icon?: IconSource\n}\n\n// The consumer's `aria-describedby` is merged with the hint and error references, and the\n// merged list is bound after the other attributes, which fallthrough would overwrite.\ndefineOptions({ inheritAttrs: false })\n\nconst props = withDefaults(defineProps<RatingProps>(), {\n max: 5,\n label: undefined,\n hideLabel: false,\n hint: undefined,\n error: undefined,\n invalid: false,\n required: false,\n name: undefined,\n clearable: false,\n readonly: false,\n disabled: false,\n size: 'md',\n tone: 'accent',\n color: undefined,\n icon: () => starIcon,\n})\n\n/** The rating, from 1 to `max`, or `null` when there is none. Read-only, it may be fractional. */\nconst model = defineModel<number | null>({ default: null })\n\nconst attrs = useAttrs()\nconst m = useMessages()\nconst locale = useLocale()\n\nconst isInvalid = computed(() => props.invalid || !!props.error)\n\n// Radios group by name, so the group needs one even when the form does not.\nconst uid = useId()\nconst groupName = computed(() => props.name ?? uid)\n\nconst values = computed(() => Array.from({ length: props.max }, (_, index) => index + 1))\n\nconst numberFormat = computed(\n () => new Intl.NumberFormat(locale.value, { maximumFractionDigits: 1 }),\n)\n\nconst valueText = computed(() =>\n m.value.rating.value(\n numberFormat.value.format(clamp(model.value ?? 0, 0, props.max)),\n numberFormat.value.format(props.max),\n ),\n)\n\n/** How much of the icon for `value` is filled, from 0 to 1. */\nfunction fill(value: number): number {\n return clamp((model.value ?? 0) - (value - 1), 0, 1)\n}\n\n// @core\n// A click on the checked radio fires no change; it clears instead. Only a pointer click does:\n// the keyboard reaches \"No rating\" with the arrows, and Space must not undo a choice.\nfunction onClick(value: number, event: MouseEvent) {\n if (props.clearable && model.value === value && event.detail > 0) model.value = null\n}\n\nconst fieldset = ref<InstanceType<typeof VFieldset> | null>(null)\nconst rootEl = computed(() => fieldset.value?.el ?? null)\n\ndefineExpose({\n /** Moves the focus to the checked radio, or to the first icon when there is no rating. */\n focus: (options?: FocusOptions) =>\n (\n rootEl.value?.querySelector<HTMLInputElement>('.v-rating-item input:checked') ??\n rootEl.value?.querySelector<HTMLInputElement>('.v-rating-item input')\n )?.focus(options),\n /** The `<fieldset>`, which also receives the consumer's attributes. */\n el: rootEl,\n})\n</script>\n\n<template>\n <VFieldset\n ref=\"fieldset\"\n class=\"v-rating v-tone\"\n :data-tone=\"tone\"\n :data-custom=\"color !== undefined ? '' : undefined\"\n :style=\"customColorStyle(color)\"\n :data-size=\"size\"\n :data-readonly=\"readonly ? '' : undefined\"\n :data-invalid=\"isInvalid ? '' : undefined\"\n :disabled=\"disabled\"\n :aria-label=\"label ? undefined : m.rating.label\"\n v-bind=\"attrs\"\n :legend=\"label\"\n :hint=\"hint\"\n :error=\"error\"\n :required=\"required\"\n :hide-legend=\"hideLabel\"\n >\n <span v-if=\"readonly\" class=\"v-rating-items\" role=\"img\" :aria-label=\"valueText\">\n <span\n v-for=\"value in values\"\n :key=\"value\"\n class=\"v-rating-item\"\n :style=\"{ '--rating-value': fill(value) }\"\n >\n <span class=\"v-rating-icon\">\n <VIcon class=\"v-rating-empty\" v-bind=\"iconProps(icon)\" />\n <VIcon class=\"v-rating-filled\" v-bind=\"iconProps(icon)\" filled />\n </span>\n </span>\n </span>\n\n <span v-else class=\"v-rating-items\">\n <label v-if=\"clearable\" class=\"v-rating-clear\">\n <input\n type=\"radio\"\n class=\"v-hidden-input\"\n :name=\"groupName\"\n value=\"\"\n :checked=\"model === null\"\n @change=\"model = null\"\n />\n <span class=\"v-visually-hidden\">{{ m.rating.empty }}</span>\n </label>\n <label\n v-for=\"value in values\"\n :key=\"value\"\n class=\"v-rating-item\"\n :style=\"{ '--rating-value': fill(value) }\"\n >\n <input\n type=\"radio\"\n class=\"v-hidden-input\"\n :name=\"groupName\"\n :value=\"value\"\n :checked=\"model === value\"\n :required=\"required\"\n :aria-invalid=\"isInvalid ? 'true' : undefined\"\n @change=\"model = value\"\n @click=\"onClick(value, $event)\"\n />\n <span class=\"v-rating-icon\">\n <VIcon class=\"v-rating-empty\" v-bind=\"iconProps(icon)\" />\n <VIcon class=\"v-rating-filled\" v-bind=\"iconProps(icon)\" filled />\n </span>\n <span class=\"v-visually-hidden\">{{\n m.rating.value(numberFormat.format(value), numberFormat.format(max))\n }}</span>\n </label>\n </span>\n <input v-if=\"readonly && name && model !== null\" type=\"hidden\" :name=\"name\" :value=\"model\" />\n </VFieldset>\n</template>\n\n<style>\n@layer vectis.components {\n .v-rating[data-size='sm'] {\n --vectis-icon-size: var(--vectis-control-size-rating-sm);\n }\n\n .v-rating[data-size='md'] {\n --vectis-icon-size: var(--vectis-control-size-rating-md);\n }\n\n .v-rating[data-size='lg'] {\n --vectis-icon-size: var(--vectis-control-size-rating-lg);\n }\n\n /* Positioned: it holds the hidden \"No rating\" radio, which has no box of its own. */\n .v-rating-items {\n position: relative;\n display: inline-flex;\n border-radius: var(--vectis-radius-interactive);\n }\n\n /* The padding widens the target around the icon: 24px at the smallest size. */\n .v-rating-item {\n --rating-shown: var(--rating-value);\n\n position: relative;\n display: inline-flex;\n padding: calc(var(--vectis-space-1) / 2);\n }\n\n label.v-rating-item {\n cursor: pointer;\n }\n\n /*\n * Hovering previews the rating: the hovered icon and those before it fill, the others empty.\n * The value is read from `--rating-value`, written inline, into `--rating-shown`, which these\n * rules can override where the inline style could not be.\n */\n /* The emptying rule weighs (0,1,0) and the filling one (0,3,1), which wins where both match. */\n :where(.v-rating:not(:disabled) .v-rating-items:has(label.v-rating-item:hover)) > .v-rating-item {\n --rating-shown: 0;\n }\n\n :where(.v-rating:not(:disabled)) label.v-rating-item:is(:hover, :has(~ .v-rating-item:hover)) {\n --rating-shown: 1;\n }\n\n .v-rating-icon {\n display: inline-grid;\n border-radius: var(--vectis-radius-xs);\n }\n\n .v-rating-icon > .v-icon {\n grid-area: 1 / 1;\n }\n\n .v-rating-empty {\n color: var(--vectis-color-border-strong);\n }\n\n /* The filled icon is clipped from the end, so a fraction fills the start of the icon. */\n .v-rating-filled {\n color: var(--tone-bg-solid);\n clip-path: inset(0 calc((1 - var(--rating-shown)) * 100%) 0 0);\n }\n\n .v-rating-filled:dir(rtl) {\n clip-path: inset(0 0 0 calc((1 - var(--rating-shown)) * 100%));\n }\n\n .v-rating-item .v-hidden-input:focus-visible + .v-rating-icon {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: var(--vectis-focus-ring-offset);\n }\n\n /* \"No rating\" has no icon of its own: its focus rings the whole row. */\n .v-rating-items:has(.v-rating-clear .v-hidden-input:focus-visible) {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: var(--vectis-focus-ring-offset);\n }\n\n .v-rating[data-invalid] .v-rating-empty {\n color: var(--vectis-color-danger);\n }\n\n .v-rating:disabled .v-rating-empty {\n color: var(--vectis-color-border);\n }\n\n .v-rating:disabled .v-rating-filled {\n color: var(--vectis-color-text-subtle);\n }\n\n .v-rating:disabled label.v-rating-item {\n cursor: not-allowed;\n }\n\n @media (forced-colors: active) {\n .v-rating-filled {\n color: Highlight;\n }\n\n .v-rating:disabled .v-rating-filled {\n color: GrayText;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkFA,IAAM,IAAQ,GAmBR,IAAQ,EAA0B,GAAA,YAAkB,GAEpD,IAAQ,EAAS,GACjB,IAAI,EAAY,GAChB,IAAS,EAAU,GAEnB,IAAY,QAAe,EAAM,WAAW,CAAC,CAAC,EAAM,KAAK,GAGzD,IAAM,EAAM,GACZ,IAAY,QAAe,EAAM,QAAQ,CAAG,GAE5C,IAAS,QAAe,MAAM,KAAK,EAAE,QAAQ,EAAM,IAAI,IAAI,GAAG,MAAU,IAAQ,CAAC,CAAC,GAElF,IAAe,QACb,IAAI,KAAK,aAAa,EAAO,OAAO,EAAE,uBAAuB,EAAE,CAAC,CACxE,GAEM,IAAY,QAChB,EAAE,MAAM,OAAO,MACb,EAAa,MAAM,OAAO,EAAM,EAAM,SAAS,GAAG,GAAG,EAAM,GAAG,CAAC,GAC/D,EAAa,MAAM,OAAO,EAAM,GAAG,CACrC,CACF;EAGA,SAAS,EAAK,GAAuB;GACnC,OAAO,GAAO,EAAM,SAAS,MAAM,IAAQ,IAAI,GAAG,CAAC;EACrD;EAKA,SAAS,EAAQ,GAAe,GAAmB;GACjD,AAAI,EAAM,aAAa,EAAM,UAAU,KAAS,EAAM,SAAS,MAAG,EAAM,QAAQ;EAClF;EAEA,IAAM,IAAW,EAA2C,IAAI,GAC1D,IAAS,QAAe,EAAS,OAAO,MAAM,IAAI;SAExD,EAAa;GAEX,QAAQ,OAEJ,EAAO,OAAO,cAAgC,8BAA8B,KAC5E,EAAO,OAAO,cAAgC,sBAAsB,EAAA,EACnE,MAAM,CAAO;GAElB,IAAI;EACN,CAAC,mBAIC,EAuEY,GAvEZ,EAuEY;YAtEN;GAAJ,KAAI;GACJ,OAAM;GACL,aAAW,EAAA;GACX,eAAa,EAAA,UAAU,KAAA,IAAiB,KAAA,IAAR;GAChC,OAAO,EAAA,CAAA,CAAgB,CAAC,EAAA,KAAK;GAC7B,aAAW,EAAA;GACX,iBAAe,EAAA,WAAQ,KAAQ,KAAA;GAC/B,gBAAc,EAAA,QAAS,KAAQ,KAAA;GAC/B,UAAU,EAAA;GACV,cAAY,EAAA,QAAQ,KAAA,IAAY,EAAA,CAAA,CAAC,CAAC,OAAO;KAClC,EAAA,CAAA,GAAK;GACZ,QAAQ,EAAA;GACR,MAAM,EAAA;GACN,OAAO,EAAA;GACP,UAAU,EAAA;GACV,eAAa,EAAA;;oBAcP,CAZK,EAAA,YAAA,EAAA,GAAZ,EAYO,QAAA;;IAZe,OAAM;IAAiB,MAAK;IAAO,cAAY,EAAA;eACnE,EAUO,GAAA,MAAA,EATW,EAAA,QAAT,YADT,EAUO,QAAA;IARJ,KAAK;IACN,OAAM;IACL,OAAK,EAAA,EAAA,kBAAsB,EAAK,CAAK,EAAA,CAAA;OAEtC,EAGO,QAHP,GAGO,CAFL,EAAyD,GAAzD,EAAyD,EAAlD,OAAM,iBAAgB,GAAA,EAAA,SAAA,GAAA,GAAS,EAAA,CAAA,CAAS,CAAC,EAAA,IAAI,CAAA,GAAA,MAAA,EAAA,GACpD,EAAiE,GAAjE,EAAiE,EAA1D,OAAM,kBAAiB,GAAA,EAAA,SAAA,GAAA,GAAS,EAAA,CAAA,CAAS,CAAC,EAAA,IAAI,GAAA,EAAG,QAAA,GAAM,CAAA,GAAA,MAAA,EAAA,CAAA,CAAA,CAAA,GAAA,CAAA,4BAKpE,EAqCO,QArCP,GAqCO,CApCQ,EAAA,aAAA,EAAA,GAAb,EAUQ,SAVR,GAUQ,CATN,EAOE,SAAA;IANA,MAAK;IACL,OAAM;IACL,MAAM,EAAA;IACP,OAAM;IACL,SAAS,EAAA,UAAK;IACd,UAAM,AAAA,EAAA,QAAA,MAAE,EAAA,QAAK;oBAEhB,EAA2D,QAA3D,GAA2D,EAAxB,EAAA,CAAA,CAAC,CAAC,OAAO,KAAK,GAAA,CAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA,IAAA,EAAA,EAAA,GAEnD,EAwBQ,GAAA,MAAA,EAvBU,EAAA,QAAT,YADT,EAwBQ,SAAA;IAtBL,KAAK;IACN,OAAM;IACL,OAAK,EAAA,EAAA,kBAAsB,EAAK,CAAK,EAAA,CAAA;;IAEtC,EAUE,SAAA;KATA,MAAK;KACL,OAAM;KACL,MAAM,EAAA;KACC;KACP,SAAS,EAAA,UAAU;KACnB,UAAU,EAAA;KACV,gBAAc,EAAA,QAAS,SAAY,KAAA;KACnC,WAAM,MAAE,EAAA,QAAQ;KAChB,UAAK,MAAE,EAAQ,GAAO,CAAM;;IAE/B,EAGO,QAHP,GAGO,CAFL,EAAyD,GAAzD,EAAyD,EAAlD,OAAM,iBAAgB,GAAA,EAAA,SAAA,GAAA,GAAS,EAAA,CAAA,CAAS,CAAC,EAAA,IAAI,CAAA,GAAA,MAAA,EAAA,GACpD,EAAiE,GAAjE,EAAiE,EAA1D,OAAM,kBAAiB,GAAA,EAAA,SAAA,GAAA,GAAS,EAAA,CAAA,CAAS,CAAC,EAAA,IAAI,GAAA,EAAG,QAAA,GAAM,CAAA,GAAA,MAAA,EAAA,CAAA,CAAA;IAEhE,EAES,QAFT,GAES,EADP,EAAA,CAAA,CAAC,CAAC,OAAO,MAAM,EAAA,MAAa,OAAO,CAAK,GAAG,EAAA,MAAa,OAAO,EAAA,GAAG,CAAA,CAAA,GAAA,CAAA;sBAI3D,EAAA,YAAY,EAAA,QAAQ,EAAA,UAAK,QAAA,EAAA,GAAtC,EAA6F,SAAA;;IAA5C,MAAK;IAAU,MAAM,EAAA;IAAO,OAAO,EAAA"}
@@ -0,0 +1,2 @@
1
+ @layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
2
+ @layer vectis.components{.v-resizable{--resizable-hit:var(--vectis-control-size-resizable-hit);display:flex}.v-resizable[data-orientation=vertical]{flex-direction:column}.v-resizable[data-dragging]{-webkit-user-select:none;user-select:none}.v-resizable-handle{z-index:1;border:0 solid var(--vectis-color-border);touch-action:none;transition:border-color var(--vectis-duration-fast) var(--vectis-ease-default), box-shadow var(--vectis-duration-fast) var(--vectis-ease-default);flex:none;justify-content:center;align-items:center;display:flex;position:relative}.v-resizable-handle:before{content:"";position:absolute}.v-resizable[data-orientation=horizontal]>.v-resizable-handle{cursor:col-resize;border-inline-start-width:1px;inline-size:0}.v-resizable[data-orientation=horizontal]>.v-resizable-handle:before{inset-block:0;inset-inline:calc(var(--resizable-hit) / -2)}.v-resizable[data-orientation=vertical]>.v-resizable-handle{cursor:row-resize;border-block-start-width:1px;block-size:0}.v-resizable[data-orientation=vertical]>.v-resizable-handle:before{inset-inline:0;inset-block:calc(var(--resizable-hit) / -2)}.v-resizable[data-dragging][data-orientation=horizontal]{cursor:col-resize}.v-resizable[data-dragging][data-orientation=vertical]{cursor:row-resize}.v-resizable-handle:is(:hover,[data-active]):not([aria-disabled]){border-color:var(--vectis-color-accent);box-shadow:0 0 0 1px var(--vectis-color-accent)}.v-resizable-handle:focus-visible{outline:var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);outline-offset:var(--vectis-focus-ring-offset)}.v-resizable-grip{border-radius:var(--vectis-radius-pill);background:var(--vectis-color-border-strong);transition:background-color var(--vectis-duration-fast) var(--vectis-ease-default);border:1px solid #0000;flex:none}.v-resizable[data-orientation=horizontal]>.v-resizable-handle>.v-resizable-grip{inline-size:var(--vectis-control-size-resizable-grip-thickness);block-size:var(--vectis-control-size-resizable-grip-length)}.v-resizable[data-orientation=vertical]>.v-resizable-handle>.v-resizable-grip{inline-size:var(--vectis-control-size-resizable-grip-length);block-size:var(--vectis-control-size-resizable-grip-thickness)}.v-resizable-handle:is(:hover,[data-active]):not([aria-disabled]) .v-resizable-grip{background:var(--vectis-color-accent)}.v-resizable-handle[aria-disabled]{cursor:default}.v-resizable-handle[aria-disabled] .v-resizable-grip{background:var(--vectis-color-border)}@media (forced-colors:active){.v-resizable-handle:is(:hover,[data-active]):not([aria-disabled]){border-color:highlight}}@media (prefers-reduced-motion:reduce){.v-resizable-handle,.v-resizable-grip{transition:none}}}
@@ -0,0 +1,50 @@
1
+ /** Which way the panels are laid out: side by side, or stacked. */
2
+ export type ResizableOrientation = 'horizontal' | 'vertical';
3
+ /** A panel limit: a number in percent of the group, or a CSS length such as `240px`. */
4
+ export type ResizableLength = number | string;
5
+ interface ResizableProps {
6
+ /**
7
+ * `horizontal` puts the panels side by side, following the direction of the text; `vertical`
8
+ * stacks them, and the group then needs a height.
9
+ */
10
+ orientation?: ResizableOrientation;
11
+ /** Fixes the sizes: the handles can neither be dragged nor focused. */
12
+ disabled?: boolean;
13
+ /** Draws a grip in the middle of every handle, which makes it easier to find. */
14
+ grip?: boolean;
15
+ /** How far an arrow key moves a handle, in percent of the group. */
16
+ step?: number;
17
+ }
18
+ type __VLS_Props = ResizableProps;
19
+ type __VLS_Slots = {
20
+ /** The `<VResizablePanel>`s, two or more. A handle is placed between each pair. */
21
+ default(): unknown;
22
+ };
23
+ type __VLS_ModelProps = {
24
+ /**
25
+ * The size of each panel, in percent of the space they share, adding up to 100. Left unbound,
26
+ * the panels start from their `defaultSize`.
27
+ */
28
+ modelValue?: number[];
29
+ };
30
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
31
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
32
+ change: (sizes: number[]) => any;
33
+ "update:modelValue": (value: number[] | undefined) => any;
34
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
35
+ onChange?: ((sizes: number[]) => any) | undefined;
36
+ "onUpdate:modelValue"?: ((value: number[] | undefined) => any) | undefined;
37
+ }>, {
38
+ disabled: boolean;
39
+ orientation: ResizableOrientation;
40
+ grip: boolean;
41
+ step: number;
42
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
43
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
44
+ declare const _default: typeof __VLS_export;
45
+ export default _default;
46
+ type __VLS_WithSlots<T, S> = T & {
47
+ new (): {
48
+ $slots: S;
49
+ };
50
+ };
@@ -0,0 +1,9 @@
1
+ import './VResizable.css';
2
+ import e from "./VResizable.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/VResizable/VResizable.vue
5
+ var t = e;
6
+ //#endregion
7
+ export { t as default };
8
+
9
+ //# sourceMappingURL=VResizable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VResizable.js","names":[],"sources":["../../../src/components/VResizable/VResizable.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * No native element resizes siblings, so each handle follows the APG window splitter: a focusable\n * `separator` carrying the size of its primary panel, moved with the arrow keys or dragged under\n * pointer capture. Sizes are percentages rendered as `flex-grow` weights, which needs no\n * measurement on the server.\n */\n\nimport {\n cloneVNode,\n computed,\n onMounted,\n provide,\n ref,\n shallowReactive,\n shallowRef,\n useId,\n watchEffect,\n type FunctionalComponent,\n type VNode,\n} from 'vue'\n\nimport { useSlotNodes } from '../../composables/useSlotNodes'\nimport { useMessages } from '../../i18n/state'\nimport { isRtl } from '../../utils/direction'\nimport { isDev } from '../../utils/env'\nimport { clamp } from '../../utils/number'\nimport { resizableKey, type ResizablePanelEntry } from './context'\nimport { defaultSizes, isCollapsedAt, resizeAt, type PanelLimits } from './layout'\nimport VResizablePanel from './VResizablePanel.vue'\n\n/** Which way the panels are laid out: side by side, or stacked. */\nexport type ResizableOrientation = 'horizontal' | 'vertical'\n\n/** A panel limit: a number in percent of the group, or a CSS length such as `240px`. */\nexport type ResizableLength = number | string\n\ninterface ResizableProps {\n /**\n * `horizontal` puts the panels side by side, following the direction of the text; `vertical`\n * stacks them, and the group then needs a height.\n */\n orientation?: ResizableOrientation\n /** Fixes the sizes: the handles can neither be dragged nor focused. */\n disabled?: boolean\n /** Draws a grip in the middle of every handle, which makes it easier to find. */\n grip?: boolean\n /** How far an arrow key moves a handle, in percent of the group. */\n step?: number\n}\n\nconst props = withDefaults(defineProps<ResizableProps>(), {\n orientation: 'horizontal',\n disabled: false,\n grip: false,\n step: 5,\n})\n\n/**\n * The size of each panel, in percent of the space they share, adding up to 100. Left unbound,\n * the panels start from their `defaultSize`.\n */\nconst model = defineModel<number[]>()\n\nconst emit = defineEmits<{\n /**\n * The sizes have settled: a handle was released, moved with a key, or a panel collapsed or\n * reopened. Save them here rather than on every `update:modelValue` of a drag.\n */\n change: [sizes: number[]]\n}>()\n\ndefineSlots<{\n /** The `<VResizablePanel>`s, two or more. A handle is placed between each pair. */\n default(): unknown\n}>()\n\nconst m = useMessages()\nconst baseId = useId()\nconst rootEl = ref<HTMLElement | null>(null)\nconst horizontal = computed(() => props.orientation === 'horizontal')\n\n// @ssr\n/*\n * The panels are read from the slot's VNodes, never from a registry fed at mount, which would\n * render no handle on the server. Cloning gives each panel its position and the id its handle\n * points at (the VCarousel idiom).\n */\nconst nodes = useSlotNodes()\nconst panels = computed(() => nodes.value.filter((node) => node.type === VResizablePanel))\n\nconst nodeProp = (node: VNode, camel: string, kebab: string): unknown =>\n node.props?.[camel] ?? node.props?.[kebab]\n\nconst panelId = (node: VNode, index: number) =>\n (node.props?.id as string | undefined) ?? `${baseId}-panel-${index}`\n\nconst defaults = computed(() =>\n defaultSizes(\n panels.value.map((node) => {\n const size = nodeProp(node, 'defaultSize', 'default-size')\n return size === undefined || size === null ? undefined : Number(size)\n }),\n ),\n)\n\nconst sizes = computed(() =>\n model.value?.length === panels.value.length ? model.value : defaults.value,\n)\n\nconst entries = shallowReactive(new Map<string, ResizablePanelEntry>())\nconst entryAt = (index: number) => {\n for (const entry of entries.values()) if (entry.index === index) return entry\n return undefined\n}\n\n/** Restored when a collapsed panel reopens: its size when it collapsed, by panel. */\nconst restoreSizes = new WeakMap<ResizablePanelEntry, number>()\n\n// @core\n/*\n * CSS lengths are converted at each interaction, against the space the panels share at that\n * moment. The pixels are cached so that the ARIA values can be derived reactively.\n */\nconst space = ref(0)\nconst pixels = shallowReactive(new Map<string, number>())\n\nconst lengthKey = (length: string) => `${props.orientation}:${length}`\n\nfunction percentOf(length: ResizableLength | undefined): number | undefined {\n if (length === undefined) return undefined\n if (typeof length === 'number') return length\n if (length.trim().endsWith('%')) return Number.parseFloat(length)\n const px = pixels.get(lengthKey(length))\n return px === undefined || !space.value ? undefined : (px / space.value) * 100\n}\n\nconst limits = computed<PanelLimits[]>(() =>\n panels.value.map((_, index) => {\n const entry = entryAt(index)\n const min = clamp(percentOf(entry?.minSize) ?? 0, 0, 100)\n return {\n min,\n max: clamp(percentOf(entry?.maxSize) ?? 100, min, 100),\n collapsible: !!entry?.collapsible,\n collapsedSize: clamp(percentOf(entry?.collapsedSize) ?? 0, 0, min),\n }\n }),\n)\n\n/**\n * The sizes as laid out: a collapsed panel keeps its collapsed size, and the others share the\n * rest in proportion to their weights, as `flex-grow` distributes it. `before` gives one panel\n * back the collapsed state it had before its model changed.\n */\nfunction layoutOf(before?: { index: number; collapsed: boolean }) {\n const fixed = sizes.value.map((_, i) =>\n (i === before?.index ? before.collapsed : entryAt(i)?.collapsed)\n ? limits.value[i]!.collapsedSize\n : undefined,\n )\n const fixedTotal = fixed.reduce<number>((sum, size) => sum + (size ?? 0), 0)\n const weights = sizes.value.reduce((sum, size, i) => sum + (fixed[i] === undefined ? size : 0), 0)\n return sizes.value.map(\n (size, i) => fixed[i] ?? (weights ? (size / weights) * (100 - fixedTotal) : 0),\n )\n}\n\nconst layout = computed(() => layoutOf())\n\nfunction lengthInPixels(root: HTMLElement, length: string): number {\n const probe = document.createElement('div')\n probe.style.position = 'absolute'\n probe.style.visibility = 'hidden'\n probe.style.setProperty(horizontal.value ? 'width' : 'height', length)\n root.append(probe)\n const rect = probe.getBoundingClientRect()\n probe.remove()\n return horizontal.value ? rect.width : rect.height\n}\n\n/**\n * Measures the panels as they are drawn, which accounts for CSS limits that the weights alone do\n * not show, and refreshes the converted lengths. It falls back to the computed layout when\n * nothing can be measured.\n */\nfunction measure(before?: { index: number; collapsed: boolean }): number[] {\n const root = rootEl.value\n const rects = panels.value.map((_, i) => entryAt(i)?.el?.getBoundingClientRect())\n const extents = rects.map((rect) => (rect ? (horizontal.value ? rect.width : rect.height) : 0))\n const total = extents.reduce((sum, extent) => sum + extent, 0)\n if (!root || !total || rects.some((rect) => !rect)) return layoutOf(before)\n for (const entry of entries.values())\n for (const length of [entry.minSize, entry.maxSize, entry.collapsedSize])\n if (typeof length === 'string' && !length.trim().endsWith('%'))\n pixels.set(lengthKey(length), lengthInPixels(root, length))\n space.value = total\n const laidOut = layoutOf(before)\n // Within two pixels, the difference is the 1px lines shrunk off the panels: the computed sizes\n // are kept, so the model does not fill with measurement noise. Beyond, CSS limits are at work.\n const drawn = extents.every((extent, i) => Math.abs(extent - (laidOut[i]! * total) / 100) < 2)\n return drawn ? laidOut : extents.map((extent) => (extent / total) * 100)\n}\n\nonMounted(measure)\n\nconst sameSizes = (a: readonly number[], b: readonly number[]) =>\n a.length === b.length && a.every((size, i) => Math.abs(size - b[i]!) < 0.01)\n\n/** Writes new sizes and the collapsed state they imply, remembering what collapsing panels had. */\nfunction apply(next: number[], base: readonly number[]) {\n if (!sameSizes(next, sizes.value)) model.value = next\n next.forEach((size, i) => {\n const entry = entryAt(i)\n const lim = limits.value[i]!\n if (!entry || !lim.collapsible) return\n const now = isCollapsedAt(size, lim)\n if (now && !isCollapsedAt(base[i]!, lim)) restoreSizes.set(entry, base[i]!)\n entry.setCollapsed(now)\n })\n}\n\nfunction commit(next: number[], base: readonly number[]) {\n apply(next, base)\n if (!sameSizes(next, base)) emit('change', next)\n}\n\n/**\n * The size a reopened panel returns to: the one it had when it collapsed, or its starting size,\n * within its limits.\n */\nfunction reopenSize(index: number) {\n const entry = entryAt(index)\n const lim = limits.value[index]!\n const remembered = entry && restoreSizes.get(entry)\n return clamp(remembered ?? defaults.value[index]!, lim.min, lim.max)\n}\n\n/** Collapses or reopens a panel through the handle after it, or before it for the last one. */\nfunction sizesWithCollapsed(index: number, collapse: boolean, base: readonly number[]) {\n const lim = limits.value[index]!\n const growth = (collapse ? lim.collapsedSize : reopenSize(index)) - base[index]!\n return index < base.length - 1\n ? resizeAt(base, index, growth, limits.value, 1)\n : resizeAt(base, index - 1, -growth, limits.value, 1)\n}\n\n/**\n * The panel a handle reports on and collapses: the one before it, unless only the one after it\n * can collapse, as for a sidebar on the end side.\n */\nfunction primaryOf(handle: number) {\n const before = limits.value[handle]\n const after = limits.value[handle + 1]\n return !before?.collapsible && after?.collapsible ? handle + 1 : handle\n}\n\nprovide(resizableKey, {\n get orientation() {\n return props.orientation\n },\n sizeAt: (index) => sizes.value[index] ?? 1,\n register: (id, entry) => entries.set(id, entry),\n unregister: (id) => entries.delete(id),\n // Called from the panel's pre-flush watcher: the DOM still shows the panel as it was.\n toggle(index, collapse) {\n const base = measure({ index, collapsed: !collapse })\n const lim = limits.value[index]\n if (!lim || isCollapsedAt(base[index]!, lim) === collapse) return\n commit(sizesWithCollapsed(index, collapse, base), base)\n },\n})\n\n// @keyboard\n/*\n * The arrows that run along the group move its handles, following the direction of the text.\n * Home and End give the primary panel its smallest and largest size, and Enter collapses or\n * reopens it, as the APG window splitter describes.\n */\nfunction onKeydown(handle: number, event: KeyboardEvent) {\n if (props.disabled) return\n const base = measure()\n const primary = primaryOf(handle)\n const lim = limits.value[primary]!\n // Positive when the primary panel grows, negative when it shrinks.\n const primarySign = primary === handle ? 1 : -1\n const rtl = horizontal.value && isRtl(rootEl.value)\n const back = horizontal.value ? (rtl ? 'ArrowRight' : 'ArrowLeft') : 'ArrowUp'\n const forth = horizontal.value ? (rtl ? 'ArrowLeft' : 'ArrowRight') : 'ArrowDown'\n let next: number[]\n if (event.key === back) next = resizeAt(base, handle, -props.step, limits.value, 1)\n else if (event.key === forth) next = resizeAt(base, handle, props.step, limits.value, 1)\n else if (event.key === 'Home') {\n const lowest = lim.collapsible ? lim.collapsedSize : lim.min\n next = resizeAt(base, handle, (lowest - base[primary]!) * primarySign, limits.value, 1)\n } else if (event.key === 'End')\n next = resizeAt(base, handle, (lim.max - base[primary]!) * primarySign, limits.value, 1)\n else if (event.key === 'Enter' && lim.collapsible)\n next = sizesWithCollapsed(primary, !isCollapsedAt(base[primary]!, lim), base)\n else return\n event.preventDefault()\n commit(next, base)\n}\n\ninterface Drag {\n handle: number\n pointerId: number\n origin: number\n base: number[]\n sign: number\n last: number[]\n}\n\nconst drag = shallowRef<Drag | null>(null)\n\nconst coordinate = (event: PointerEvent) => (horizontal.value ? event.clientX : event.clientY)\n\nfunction onPointerdown(handle: number, event: PointerEvent) {\n // A second pointer pressed during a drag is ignored, which leaves one finger in charge.\n if (props.disabled || event.button !== 0 || drag.value) return\n const el = event.currentTarget as HTMLElement\n const base = measure()\n if (!space.value) return\n // Prevented so that no text gets selected; the focus a press would give is given back.\n event.preventDefault()\n el.focus({ preventScroll: true })\n // @fallback\n // Synthetic pointer events have no pointer to capture; the drag then follows the handle only.\n try {\n el.setPointerCapture(event.pointerId)\n } catch {\n /* Synthetic pointers cannot be captured. */\n }\n drag.value = {\n handle,\n pointerId: event.pointerId,\n origin: coordinate(event),\n base,\n sign: horizontal.value && isRtl(rootEl.value) ? -1 : 1,\n last: base,\n }\n}\n\nfunction onPointermove(event: PointerEvent) {\n const state = drag.value\n if (!state || state.pointerId !== event.pointerId) return\n const delta = ((coordinate(event) - state.origin) / space.value) * 100 * state.sign\n state.last = resizeAt(state.base, state.handle, delta, limits.value)\n apply(state.last, state.base)\n}\n\nfunction onPointerEnd(event: PointerEvent) {\n const state = drag.value\n if (!state || state.pointerId !== event.pointerId) return\n drag.value = null\n if (!sameSizes(state.last, state.base)) emit('change', state.last)\n}\n\nconst handles = computed(() =>\n panels.value.slice(1).map((_, handle) => {\n const primary = primaryOf(handle)\n const node = panels.value[primary]!\n const lim = limits.value[primary]!\n return {\n controls: panelId(node, primary),\n label:\n (nodeProp(node, 'label', 'label') as string | undefined) ??\n m.value.resizable.panel(primary + 1),\n now: Math.round(layout.value[primary] ?? 0),\n min: Math.round(lim.collapsible ? lim.collapsedSize : lim.min),\n max: Math.round(lim.max),\n }\n }),\n)\n\n/** Renders a captured panel VNode, which `<component :is>` cannot do. */\nconst PanelNode: FunctionalComponent<{ node: VNode; index: number }> = ({ node, index }) =>\n cloneVNode(node, { index, id: panelId(node, index) })\n\n// @devwarn\nif (isDev) {\n watchEffect(() => {\n if (nodes.value.length !== panels.value.length)\n console.warn('[VResizable] Only VResizablePanel children are rendered.')\n if (model.value && model.value.length !== panels.value.length)\n console.warn(\n `[VResizable] The v-model holds ${model.value.length} sizes for ${panels.value.length} panels; the default sizes are used.`,\n )\n })\n}\n</script>\n\n<template>\n <div\n ref=\"rootEl\"\n class=\"v-resizable\"\n :data-orientation=\"orientation\"\n :data-disabled=\"disabled ? '' : undefined\"\n :data-dragging=\"drag ? '' : undefined\"\n >\n <template v-for=\"(node, index) in panels\" :key=\"node.key ?? index\">\n <!--\n A horizontal group is divided by vertical lines. `aria-orientation` is only written when\n it differs from the separator's implicit horizontal, as on VSeparator.\n -->\n <div\n v-if=\"index > 0\"\n class=\"v-resizable-handle\"\n role=\"separator\"\n :tabindex=\"disabled ? undefined : 0\"\n :aria-orientation=\"horizontal ? 'vertical' : undefined\"\n :aria-label=\"handles[index - 1]!.label\"\n :aria-controls=\"handles[index - 1]!.controls\"\n :aria-valuenow=\"handles[index - 1]!.now\"\n :aria-valuemin=\"handles[index - 1]!.min\"\n :aria-valuemax=\"handles[index - 1]!.max\"\n :aria-disabled=\"disabled || undefined\"\n :data-active=\"drag?.handle === index - 1 ? '' : undefined\"\n @keydown=\"onKeydown(index - 1, $event)\"\n @pointerdown=\"onPointerdown(index - 1, $event)\"\n @pointermove=\"onPointermove\"\n @pointerup=\"onPointerEnd\"\n @pointercancel=\"onPointerEnd\"\n @lostpointercapture=\"onPointerEnd\"\n >\n <span v-if=\"grip\" class=\"v-resizable-grip\" aria-hidden=\"true\" />\n </div>\n <PanelNode :node=\"node\" :index=\"index\" />\n </template>\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n .v-resizable {\n --resizable-hit: var(--vectis-control-size-resizable-hit);\n display: flex;\n }\n\n .v-resizable[data-orientation='vertical'] {\n flex-direction: column;\n }\n\n .v-resizable[data-dragging] {\n user-select: none;\n }\n\n .v-resizable-handle {\n position: relative;\n z-index: 1;\n flex: none;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 0 solid var(--vectis-color-border);\n touch-action: none;\n transition:\n border-color var(--vectis-duration-fast) var(--vectis-ease-default),\n box-shadow var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n /* The strip that catches the pointer, wider than the 1px line it is centred on. */\n .v-resizable-handle::before {\n content: '';\n position: absolute;\n }\n\n /* The content box stays empty so the line is exactly 1px: the grip overflows it, centred. */\n .v-resizable[data-orientation='horizontal'] > .v-resizable-handle {\n inline-size: 0;\n border-inline-start-width: 1px;\n cursor: col-resize;\n }\n\n .v-resizable[data-orientation='horizontal'] > .v-resizable-handle::before {\n inset-block: 0;\n inset-inline: calc(var(--resizable-hit) / -2);\n }\n\n .v-resizable[data-orientation='vertical'] > .v-resizable-handle {\n block-size: 0;\n border-block-start-width: 1px;\n cursor: row-resize;\n }\n\n .v-resizable[data-orientation='vertical'] > .v-resizable-handle::before {\n inset-inline: 0;\n inset-block: calc(var(--resizable-hit) / -2);\n }\n\n .v-resizable[data-dragging][data-orientation='horizontal'] {\n cursor: col-resize;\n }\n\n .v-resizable[data-dragging][data-orientation='vertical'] {\n cursor: row-resize;\n }\n\n .v-resizable-handle:is(:hover, [data-active]):not([aria-disabled]) {\n border-color: var(--vectis-color-accent);\n box-shadow: 0 0 0 1px var(--vectis-color-accent);\n }\n\n .v-resizable-handle:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: var(--vectis-focus-ring-offset);\n }\n\n .v-resizable-grip {\n flex: none;\n border: 1px solid transparent;\n border-radius: var(--vectis-radius-pill);\n background: var(--vectis-color-border-strong);\n transition: background-color var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-resizable[data-orientation='horizontal'] > .v-resizable-handle > .v-resizable-grip {\n inline-size: var(--vectis-control-size-resizable-grip-thickness);\n block-size: var(--vectis-control-size-resizable-grip-length);\n }\n\n .v-resizable[data-orientation='vertical'] > .v-resizable-handle > .v-resizable-grip {\n inline-size: var(--vectis-control-size-resizable-grip-length);\n block-size: var(--vectis-control-size-resizable-grip-thickness);\n }\n\n .v-resizable-handle:is(:hover, [data-active]):not([aria-disabled]) .v-resizable-grip {\n background: var(--vectis-color-accent);\n }\n\n .v-resizable-handle[aria-disabled] {\n cursor: default;\n }\n\n .v-resizable-handle[aria-disabled] .v-resizable-grip {\n background: var(--vectis-color-border);\n }\n\n @media (forced-colors: active) {\n .v-resizable-handle:is(:hover, [data-active]):not([aria-disabled]) {\n border-color: Highlight;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-resizable-handle,\n .v-resizable-grip {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":""}