vectis-ui 0.12.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 (508) 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 -16
  111. package/dist/components/VDataTable/VDataTable.js.map +1 -1
  112. package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js +307 -195
  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.d.ts +1 -1
  296. package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js +76 -76
  297. package/dist/components/VProgressCircular/VProgressCircular.d.ts +2 -2
  298. package/dist/components/VProgressLinear/VProgressLinear.css +1 -1
  299. package/dist/components/VProgressLinear/VProgressLinear.d.ts +10 -7
  300. package/dist/components/VProgressLinear/VProgressLinear.js.map +1 -1
  301. package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js +52 -34
  302. package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js.map +1 -1
  303. package/dist/components/VRadio/VRadio.d.ts +8 -3
  304. package/dist/components/VRadio/VRadio.js.map +1 -1
  305. package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js +52 -46
  306. package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js.map +1 -1
  307. package/dist/components/VRating/VRating.css +2 -0
  308. package/dist/components/VRating/VRating.d.ts +92 -0
  309. package/dist/components/VRating/VRating.js +9 -0
  310. package/dist/components/VRating/VRating.js.map +1 -0
  311. package/dist/components/VRating/VRating.vue_vue_type_script_setup_true_lang.js +158 -0
  312. package/dist/components/VRating/VRating.vue_vue_type_script_setup_true_lang.js.map +1 -0
  313. package/dist/components/VResizable/VResizable.css +2 -0
  314. package/dist/components/VResizable/VResizable.d.ts +50 -0
  315. package/dist/components/VResizable/VResizable.js +9 -0
  316. package/dist/components/VResizable/VResizable.js.map +1 -0
  317. package/dist/components/VResizable/VResizable.vue_vue_type_script_setup_true_lang.js +225 -0
  318. package/dist/components/VResizable/VResizable.vue_vue_type_script_setup_true_lang.js.map +1 -0
  319. package/dist/components/VResizable/VResizablePanel.css +2 -0
  320. package/dist/components/VResizable/VResizablePanel.d.ts +60 -0
  321. package/dist/components/VResizable/VResizablePanel.js +9 -0
  322. package/dist/components/VResizable/VResizablePanel.js.map +1 -0
  323. package/dist/components/VResizable/VResizablePanel.vue_vue_type_script_setup_true_lang.js +83 -0
  324. package/dist/components/VResizable/VResizablePanel.vue_vue_type_script_setup_true_lang.js.map +1 -0
  325. package/dist/components/VResizable/context.d.ts +24 -0
  326. package/dist/components/VResizable/context.js +6 -0
  327. package/dist/components/VResizable/context.js.map +1 -0
  328. package/dist/components/VResizable/layout.d.ts +28 -0
  329. package/dist/components/VResizable/layout.js +41 -0
  330. package/dist/components/VResizable/layout.js.map +1 -0
  331. package/dist/components/VSelect/VSelect.css +2 -0
  332. package/dist/components/VSelect/VSelect.d.ts +193 -0
  333. package/dist/components/VSelect/VSelect.js +9 -0
  334. package/dist/components/VSelect/VSelect.js.map +1 -0
  335. package/dist/components/VSelect/VSelect.vue_vue_type_script_setup_true_lang.js +424 -0
  336. package/dist/components/VSelect/VSelect.vue_vue_type_script_setup_true_lang.js.map +1 -0
  337. package/dist/components/VSeparator/VSeparator.js.map +1 -1
  338. package/dist/components/VSeparator/VSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
  339. package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js +8 -8
  340. package/dist/components/VSideNavigation/VSideNavigationItem.d.ts +2 -2
  341. package/dist/components/VSideNavigation/VSideNavigationItem.js.map +1 -1
  342. package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js +3 -3
  343. package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  344. package/dist/components/VSkeletonLoader/VSkeletonLoader.d.ts +3 -3
  345. package/dist/components/VSlider/VSlider.css +1 -1
  346. package/dist/components/VSlider/VSlider.d.ts +34 -8
  347. package/dist/components/VSlider/VSlider.js.map +1 -1
  348. package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js +236 -215
  349. package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js.map +1 -1
  350. package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js +4 -4
  351. package/dist/components/VSnackbar/state.js.map +1 -1
  352. package/dist/components/VSplitButton/VSplitButton.css +2 -0
  353. package/dist/components/VSplitButton/VSplitButton.d.ts +114 -0
  354. package/dist/components/VSplitButton/VSplitButton.js +9 -0
  355. package/dist/components/VSplitButton/VSplitButton.js.map +1 -0
  356. package/dist/components/VSplitButton/VSplitButton.vue_vue_type_script_setup_true_lang.js +148 -0
  357. package/dist/components/VSplitButton/VSplitButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
  358. package/dist/components/VStepper/VStepper.css +2 -0
  359. package/dist/components/VStepper/VStepper.d.ts +73 -0
  360. package/dist/components/VStepper/VStepper.js +9 -0
  361. package/dist/components/VStepper/VStepper.js.map +1 -0
  362. package/dist/components/VStepper/VStepper.vue_vue_type_script_setup_true_lang.js +96 -0
  363. package/dist/components/VStepper/VStepper.vue_vue_type_script_setup_true_lang.js.map +1 -0
  364. package/dist/components/VSwitch/VSwitch.d.ts +8 -3
  365. package/dist/components/VSwitch/VSwitch.js.map +1 -1
  366. package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js +53 -47
  367. package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js.map +1 -1
  368. package/dist/components/VTabs/VTab.css +1 -1
  369. package/dist/components/VTabs/VTab.d.ts +1 -1
  370. package/dist/components/VTabs/VTab.js.map +1 -1
  371. package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js.map +1 -1
  372. package/dist/components/VTabs/VTabs.css +1 -1
  373. package/dist/components/VTabs/VTabs.d.ts +13 -5
  374. package/dist/components/VTabs/VTabs.js.map +1 -1
  375. package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js +20 -20
  376. package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
  377. package/dist/components/VTextarea/VTextarea.css +1 -1
  378. package/dist/components/VTextarea/VTextarea.d.ts +22 -2
  379. package/dist/components/VTextarea/VTextarea.js.map +1 -1
  380. package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js +108 -100
  381. package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js.map +1 -1
  382. package/dist/components/VTimeInput/VTimeInput.d.ts +27 -7
  383. package/dist/components/VTimeInput/VTimeInput.js.map +1 -1
  384. package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js +187 -171
  385. package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  386. package/dist/components/VTimePicker/VTimePicker.d.ts +2 -2
  387. package/dist/components/VTimePicker/VTimePicker.js.map +1 -1
  388. package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js +15 -15
  389. package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  390. package/dist/components/VTimeline/VTimeline.css +2 -0
  391. package/dist/components/VTimeline/VTimeline.d.ts +59 -0
  392. package/dist/components/VTimeline/VTimeline.js +9 -0
  393. package/dist/components/VTimeline/VTimeline.js.map +1 -0
  394. package/dist/components/VTimeline/VTimeline.vue_vue_type_script_setup_true_lang.js +53 -0
  395. package/dist/components/VTimeline/VTimeline.vue_vue_type_script_setup_true_lang.js.map +1 -0
  396. package/dist/components/VTimeline/VTimelineItem.css +2 -0
  397. package/dist/components/VTimeline/VTimelineItem.d.ts +48 -0
  398. package/dist/components/VTimeline/VTimelineItem.js +9 -0
  399. package/dist/components/VTimeline/VTimelineItem.js.map +1 -0
  400. package/dist/components/VTimeline/VTimelineItem.vue_vue_type_script_setup_true_lang.js +70 -0
  401. package/dist/components/VTimeline/VTimelineItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
  402. package/dist/components/VTimeline/context.d.ts +11 -0
  403. package/dist/components/VTimeline/context.js +6 -0
  404. package/dist/components/VTimeline/context.js.map +1 -0
  405. package/dist/components/VTimeline/datetime.d.ts +8 -0
  406. package/dist/components/VTimeline/datetime.js +36 -0
  407. package/dist/components/VTimeline/datetime.js.map +1 -0
  408. package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js +8 -8
  409. package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js +12 -12
  410. package/dist/components/VToggle/VToggle.d.ts +4 -4
  411. package/dist/components/VToggle/VToggleItem.d.ts +1 -1
  412. package/dist/components/VTooltip/VTooltip.d.ts +8 -2
  413. package/dist/components/VTooltip/VTooltip.js.map +1 -1
  414. package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js +45 -43
  415. package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  416. package/dist/components/VTreeView/VTreeView.css +2 -0
  417. package/dist/components/VTreeView/VTreeView.d.ts +112 -0
  418. package/dist/components/VTreeView/VTreeView.js +9 -0
  419. package/dist/components/VTreeView/VTreeView.js.map +1 -0
  420. package/dist/components/VTreeView/VTreeView.vue_vue_type_script_setup_true_lang.js +321 -0
  421. package/dist/components/VTreeView/VTreeView.vue_vue_type_script_setup_true_lang.js.map +1 -0
  422. package/dist/components/VTypography/VTypography.d.ts +1 -1
  423. package/dist/components/VVirtualList/VVirtualList.css +2 -0
  424. package/dist/components/VVirtualList/VVirtualList.d.ts +78 -0
  425. package/dist/components/VVirtualList/VVirtualList.js +9 -0
  426. package/dist/components/VVirtualList/VVirtualList.js.map +1 -0
  427. package/dist/components/VVirtualList/VVirtualList.vue_vue_type_script_setup_true_lang.js +114 -0
  428. package/dist/components/VVirtualList/VVirtualList.vue_vue_type_script_setup_true_lang.js.map +1 -0
  429. package/dist/composables/useChoice.d.ts +28 -0
  430. package/dist/composables/useChoice.js +28 -0
  431. package/dist/composables/useChoice.js.map +1 -0
  432. package/dist/composables/useDebouncedSearch.d.ts +17 -0
  433. package/dist/composables/useDebouncedSearch.js +18 -0
  434. package/dist/composables/useDebouncedSearch.js.map +1 -0
  435. package/dist/composables/useEscapeDismiss.d.ts +8 -0
  436. package/dist/composables/useEscapeDismiss.js +16 -0
  437. package/dist/composables/useEscapeDismiss.js.map +1 -0
  438. package/dist/composables/useFieldIds.d.ts +2 -1
  439. package/dist/composables/useFieldIds.js +7 -6
  440. package/dist/composables/useFieldIds.js.map +1 -1
  441. package/dist/composables/useFieldPanel.d.ts +1 -0
  442. package/dist/composables/useFieldPanel.js +52 -42
  443. package/dist/composables/useFieldPanel.js.map +1 -1
  444. package/dist/composables/useFileField.d.ts +1 -3
  445. package/dist/composables/useFileField.js +48 -50
  446. package/dist/composables/useFileField.js.map +1 -1
  447. package/dist/composables/useHotkeyListener.d.ts +17 -0
  448. package/dist/composables/useHotkeyListener.js +26 -0
  449. package/dist/composables/useHotkeyListener.js.map +1 -0
  450. package/dist/composables/useIconClickHandlers.d.ts +2 -10
  451. package/dist/composables/useIconClickHandlers.js +1 -1
  452. package/dist/composables/useIconClickHandlers.js.map +1 -1
  453. package/dist/{components/VCombobox/infiniteScroll.d.ts → composables/useInfiniteScroll.d.ts} +6 -0
  454. package/dist/{components/VCombobox/infiniteScroll.js → composables/useInfiniteScroll.js} +7 -7
  455. package/dist/composables/useInfiniteScroll.js.map +1 -0
  456. package/dist/composables/useListbox.d.ts +132 -0
  457. package/dist/composables/useListbox.js +227 -0
  458. package/dist/composables/useListbox.js.map +1 -0
  459. package/dist/composables/useModalDialog.d.ts +28 -0
  460. package/dist/composables/useModalDialog.js +60 -0
  461. package/dist/composables/useModalDialog.js.map +1 -0
  462. package/dist/composables/useRootAttrs.d.ts +2 -3
  463. package/dist/composables/useRootAttrs.js.map +1 -1
  464. package/dist/composables/useVirtualList.d.ts +46 -0
  465. package/dist/composables/useVirtualList.js +145 -0
  466. package/dist/composables/useVirtualList.js.map +1 -0
  467. package/dist/i18n/en.js +50 -0
  468. package/dist/i18n/en.js.map +1 -1
  469. package/dist/i18n/fr.js +50 -0
  470. package/dist/i18n/fr.js.map +1 -1
  471. package/dist/i18n/types.d.ts +103 -2
  472. package/dist/icons.js +45 -37
  473. package/dist/index.d.ts +49 -3
  474. package/dist/index.js +80 -56
  475. package/dist/styles.css +1 -1
  476. package/dist/tokens/index.d.ts +43 -0
  477. package/dist/tokens/semantic.d.ts +42 -0
  478. package/dist/tokens/semantic.js +43 -1
  479. package/dist/tokens/semantic.js.map +1 -1
  480. package/dist/tokens/themes/dark.d.ts +1 -0
  481. package/dist/tokens/themes/dark.js +1 -0
  482. package/dist/tokens/themes/dark.js.map +1 -1
  483. package/dist/tokens.json +215 -1
  484. package/dist/types.d.ts +57 -4
  485. package/dist/utils/arrowNav.js.map +1 -1
  486. package/dist/utils/attrs.d.ts +9 -0
  487. package/dist/utils/attrs.js +14 -0
  488. package/dist/utils/attrs.js.map +1 -0
  489. package/dist/utils/date.d.ts +1 -0
  490. package/dist/utils/date.js +2 -2
  491. package/dist/utils/date.js.map +1 -1
  492. package/package.json +1 -1
  493. package/dist/components/VCombobox/VComboboxGroup.css +0 -2
  494. package/dist/components/VCombobox/VComboboxGroup.d.ts +0 -17
  495. package/dist/components/VCombobox/VComboboxGroup.js +0 -9
  496. package/dist/components/VCombobox/VComboboxGroup.js.map +0 -1
  497. package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js +0 -21
  498. package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js.map +0 -1
  499. package/dist/components/VCombobox/VComboboxOption.css +0 -2
  500. package/dist/components/VCombobox/VComboboxOption.js +0 -9
  501. package/dist/components/VCombobox/VComboboxOption.js.map +0 -1
  502. package/dist/components/VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js.map +0 -1
  503. package/dist/components/VCombobox/VComboboxSeparator.css +0 -2
  504. package/dist/components/VCombobox/VComboboxSeparator.js +0 -9
  505. package/dist/components/VCombobox/VComboboxSeparator.js.map +0 -1
  506. package/dist/components/VCombobox/VComboboxSeparator.vue_vue_type_script_setup_true_lang.js.map +0 -1
  507. package/dist/components/VCombobox/infiniteScroll.js.map +0 -1
  508. /package/dist/components/{VCombobox/VComboboxSeparator.d.ts → VCheckbox/VCheckMark.d.ts} +0 -0
@@ -0,0 +1,60 @@
1
+ import { ResizableLength } from './VResizable.js';
2
+ interface ResizablePanelProps {
3
+ /** Which panel this is among its siblings, set by VResizable. Do not set it yourself. */
4
+ index?: number;
5
+ /**
6
+ * The starting size in percent, used when the group's v-model gives none. Panels without one
7
+ * share what is left equally.
8
+ */
9
+ defaultSize?: number;
10
+ /** The smallest size: a number in percent, or a CSS length such as `200px` or `12rem`. */
11
+ minSize?: ResizableLength;
12
+ /** The largest size: a number in percent, or a CSS length. */
13
+ maxSize?: ResizableLength;
14
+ /**
15
+ * Lets the panel collapse: dragged past the middle of its minimum, or with Enter on its
16
+ * handle.
17
+ */
18
+ collapsible?: boolean;
19
+ /**
20
+ * The size of the collapsed panel, in percent or as a CSS length such as the width of an icon
21
+ * rail. At 0, the default, its content is hidden.
22
+ */
23
+ collapsedSize?: ResizableLength;
24
+ /**
25
+ * What the panel is called. It names the handle that resizes it; the dictionary's "Panel 2"
26
+ * otherwise.
27
+ */
28
+ label?: string;
29
+ }
30
+ type __VLS_Props = ResizablePanelProps;
31
+ type __VLS_Slots = {
32
+ /** The panel's content. */
33
+ default(): unknown;
34
+ };
35
+ type __VLS_ModelProps = {
36
+ /** Whether the panel is collapsed. It only takes effect on a `collapsible` panel. */
37
+ 'collapsed'?: boolean;
38
+ };
39
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
40
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
41
+ "update:collapsed": (value: boolean) => any;
42
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
43
+ "onUpdate:collapsed"?: ((value: boolean) => any) | undefined;
44
+ }>, {
45
+ label: string;
46
+ index: number;
47
+ defaultSize: number;
48
+ minSize: ResizableLength;
49
+ maxSize: ResizableLength;
50
+ collapsible: boolean;
51
+ collapsedSize: ResizableLength;
52
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
53
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
54
+ declare const _default: typeof __VLS_export;
55
+ export default _default;
56
+ type __VLS_WithSlots<T, S> = T & {
57
+ new (): {
58
+ $slots: S;
59
+ };
60
+ };
@@ -0,0 +1,9 @@
1
+ import './VResizablePanel.css';
2
+ import e from "./VResizablePanel.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/VResizable/VResizablePanel.vue
5
+ var t = e;
6
+ //#endregion
7
+ export { t as default };
8
+
9
+ //# sourceMappingURL=VResizablePanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VResizablePanel.js","names":[],"sources":["../../../src/components/VResizable/VResizablePanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The group hands each panel its share of the space as a `flex-grow` weight. The panel writes its\n * own limits in CSS as well, so a length limit holds before any script runs and while the window\n * is resized.\n */\n\nimport { computed, inject, onBeforeUnmount, ref, useAttrs, useId, watch } from 'vue'\n\nimport { isDev } from '../../utils/env'\nimport { resizableKey } from './context'\nimport type { ResizableLength } from './VResizable.vue'\n\ninterface ResizablePanelProps {\n /** Which panel this is among its siblings, set by VResizable. Do not set it yourself. */\n index?: number\n /**\n * The starting size in percent, used when the group's v-model gives none. Panels without one\n * share what is left equally.\n */\n defaultSize?: number\n /** The smallest size: a number in percent, or a CSS length such as `200px` or `12rem`. */\n minSize?: ResizableLength\n /** The largest size: a number in percent, or a CSS length. */\n maxSize?: ResizableLength\n /**\n * Lets the panel collapse: dragged past the middle of its minimum, or with Enter on its\n * handle.\n */\n collapsible?: boolean\n /**\n * The size of the collapsed panel, in percent or as a CSS length such as the width of an icon\n * rail. At 0, the default, its content is hidden.\n */\n collapsedSize?: ResizableLength\n /**\n * What the panel is called. It names the handle that resizes it; the dictionary's \"Panel 2\"\n * otherwise.\n */\n label?: string\n}\n\nconst props = withDefaults(defineProps<ResizablePanelProps>(), {\n index: 0,\n defaultSize: undefined,\n minSize: 0,\n maxSize: undefined,\n collapsible: false,\n collapsedSize: 0,\n label: undefined,\n})\n\n/** Whether the panel is collapsed. It only takes effect on a `collapsible` panel. */\nconst collapsed = defineModel<boolean>('collapsed', { default: false })\n\ndefineSlots<{\n /** The panel's content. */\n default(): unknown\n}>()\n\nconst group = inject(resizableKey, null)\nconst attrs = useAttrs()\nconst id = useId()\nconst el = ref<HTMLElement | null>(null)\n\nconst isCollapsed = computed(() => props.collapsible && collapsed.value)\n\nconst cssLength = (length: ResizableLength) => (typeof length === 'number' ? `${length}%` : length)\n\n/** A collapsed size of zero leaves nothing to read, so the content is hidden, focus included. */\nconst hidesContent = computed(\n () => isCollapsed.value && Number.parseFloat(String(props.collapsedSize)) === 0,\n)\n\n// @core\n/*\n * The value the group last wrote, so the watcher below tells the group's own writes from the\n * consumer's. Only the consumer's ask the group to make room.\n */\nlet fromGroup: boolean | undefined\n\ngroup?.register(id, {\n get index() {\n return props.index\n },\n get el() {\n return el.value\n },\n get minSize() {\n return props.minSize\n },\n get maxSize() {\n return props.maxSize\n },\n get collapsible() {\n return props.collapsible\n },\n get collapsedSize() {\n return props.collapsedSize\n },\n get collapsed() {\n return isCollapsed.value\n },\n setCollapsed(value) {\n if (collapsed.value === value) return\n fromGroup = value\n collapsed.value = value\n },\n})\nonBeforeUnmount(() => group?.unregister(id))\n\nwatch(collapsed, (value) => {\n const own = value === fromGroup\n fromGroup = undefined\n if (!own && props.collapsible) group?.toggle(props.index, value)\n})\n\n// @devwarn\nif (isDev) {\n if (!group) console.warn('[VResizablePanel] Place it directly inside a VResizable.')\n watch(\n () => collapsed.value && !props.collapsible,\n (wrong) => {\n if (wrong) console.warn('[VResizablePanel] `collapsed` has no effect without `collapsible`.')\n },\n { immediate: true },\n )\n}\n\n// Every variable is set, even to its default, so that a nested group's panel never inherits\n// the limits of the panel it sits in.\nconst style = computed(() => ({\n '--resizable-panel-size': String(group?.sizeAt(props.index) ?? 1),\n '--resizable-panel-min': cssLength(props.minSize),\n '--resizable-panel-max': props.maxSize === undefined ? 'none' : cssLength(props.maxSize),\n '--resizable-panel-collapsed': cssLength(props.collapsedSize),\n}))\n</script>\n\n<template>\n <div\n :id=\"(attrs.id as string | undefined) ?? id\"\n ref=\"el\"\n class=\"v-resizable-panel\"\n :data-collapsed=\"isCollapsed ? '' : undefined\"\n :data-hidden=\"hidesContent ? '' : undefined\"\n :style=\"style\"\n >\n <slot />\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * The basis is the size itself, padding and border included, so a padded panel still takes its\n * exact share. Growing by the same weight spreads any space left over, such as that of a\n * collapsed sibling, in proportion; the 1px handles are shrunk off the same way.\n */\n .v-resizable-panel {\n box-sizing: border-box;\n flex: var(--resizable-panel-size) var(--resizable-panel-size)\n calc(var(--resizable-panel-size) * 1%);\n overflow: auto;\n }\n\n .v-resizable[data-orientation='horizontal'] > .v-resizable-panel {\n min-inline-size: var(--resizable-panel-min);\n max-inline-size: var(--resizable-panel-max);\n }\n\n .v-resizable[data-orientation='vertical'] > .v-resizable-panel {\n min-block-size: var(--resizable-panel-min);\n max-block-size: var(--resizable-panel-max);\n }\n\n .v-resizable[data-orientation] > .v-resizable-panel[data-collapsed] {\n flex: 0 0 var(--resizable-panel-collapsed);\n min-inline-size: 0;\n max-inline-size: none;\n min-block-size: 0;\n max-block-size: none;\n }\n\n /* Removed from the layout as well, or its padding would keep the panel open. */\n .v-resizable-panel[data-hidden] {\n display: none;\n }\n}\n</style>\n"],"mappings":""}
@@ -0,0 +1,83 @@
1
+ import { isDev as e } from "../../utils/env.js";
2
+ import { resizableKey as t } from "./context.js";
3
+ import { computed as n, createElementBlock as r, defineComponent as i, inject as a, mergeModels as o, normalizeStyle as s, onBeforeUnmount as c, openBlock as l, ref as u, renderSlot as d, unref as f, useAttrs as p, useId as m, useModel as h, watch as g } from "vue";
4
+ //#region src/components/VResizable/VResizablePanel.vue?vue&type=script&setup=true&lang.ts
5
+ var _ = [
6
+ "id",
7
+ "data-collapsed",
8
+ "data-hidden"
9
+ ], v = /*@__PURE__*/ i({
10
+ __name: "VResizablePanel",
11
+ props: /*@__PURE__*/ o({
12
+ index: { default: 0 },
13
+ defaultSize: { default: void 0 },
14
+ minSize: { default: 0 },
15
+ maxSize: { default: void 0 },
16
+ collapsible: {
17
+ type: Boolean,
18
+ default: !1
19
+ },
20
+ collapsedSize: { default: 0 },
21
+ label: { default: void 0 }
22
+ }, {
23
+ collapsed: {
24
+ type: Boolean,
25
+ default: !1
26
+ },
27
+ collapsedModifiers: {}
28
+ }),
29
+ emits: ["update:collapsed"],
30
+ setup(i) {
31
+ let o = i, v = h(i, "collapsed"), y = a(t, null), b = p(), x = m(), S = u(null), C = n(() => o.collapsible && v.value), w = (e) => typeof e == "number" ? `${e}%` : e, T = n(() => C.value && Number.parseFloat(String(o.collapsedSize)) === 0), E;
32
+ y?.register(x, {
33
+ get index() {
34
+ return o.index;
35
+ },
36
+ get el() {
37
+ return S.value;
38
+ },
39
+ get minSize() {
40
+ return o.minSize;
41
+ },
42
+ get maxSize() {
43
+ return o.maxSize;
44
+ },
45
+ get collapsible() {
46
+ return o.collapsible;
47
+ },
48
+ get collapsedSize() {
49
+ return o.collapsedSize;
50
+ },
51
+ get collapsed() {
52
+ return C.value;
53
+ },
54
+ setCollapsed(e) {
55
+ v.value !== e && (E = e, v.value = e);
56
+ }
57
+ }), c(() => y?.unregister(x)), g(v, (e) => {
58
+ let t = e === E;
59
+ E = void 0, !t && o.collapsible && y?.toggle(o.index, e);
60
+ }), e && (y || console.warn("[VResizablePanel] Place it directly inside a VResizable."), g(() => v.value && !o.collapsible, (e) => {
61
+ e && console.warn("[VResizablePanel] `collapsed` has no effect without `collapsible`.");
62
+ }, { immediate: !0 }));
63
+ let D = n(() => ({
64
+ "--resizable-panel-size": String(y?.sizeAt(o.index) ?? 1),
65
+ "--resizable-panel-min": w(o.minSize),
66
+ "--resizable-panel-max": o.maxSize === void 0 ? "none" : w(o.maxSize),
67
+ "--resizable-panel-collapsed": w(o.collapsedSize)
68
+ }));
69
+ return (e, t) => (l(), r("div", {
70
+ id: f(b).id ?? f(x),
71
+ ref_key: "el",
72
+ ref: S,
73
+ class: "v-resizable-panel",
74
+ "data-collapsed": C.value ? "" : void 0,
75
+ "data-hidden": T.value ? "" : void 0,
76
+ style: s(D.value)
77
+ }, [d(e.$slots, "default")], 12, _));
78
+ }
79
+ });
80
+ //#endregion
81
+ export { v as default };
82
+
83
+ //# sourceMappingURL=VResizablePanel.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VResizablePanel.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VResizable/VResizablePanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The group hands each panel its share of the space as a `flex-grow` weight. The panel writes its\n * own limits in CSS as well, so a length limit holds before any script runs and while the window\n * is resized.\n */\n\nimport { computed, inject, onBeforeUnmount, ref, useAttrs, useId, watch } from 'vue'\n\nimport { isDev } from '../../utils/env'\nimport { resizableKey } from './context'\nimport type { ResizableLength } from './VResizable.vue'\n\ninterface ResizablePanelProps {\n /** Which panel this is among its siblings, set by VResizable. Do not set it yourself. */\n index?: number\n /**\n * The starting size in percent, used when the group's v-model gives none. Panels without one\n * share what is left equally.\n */\n defaultSize?: number\n /** The smallest size: a number in percent, or a CSS length such as `200px` or `12rem`. */\n minSize?: ResizableLength\n /** The largest size: a number in percent, or a CSS length. */\n maxSize?: ResizableLength\n /**\n * Lets the panel collapse: dragged past the middle of its minimum, or with Enter on its\n * handle.\n */\n collapsible?: boolean\n /**\n * The size of the collapsed panel, in percent or as a CSS length such as the width of an icon\n * rail. At 0, the default, its content is hidden.\n */\n collapsedSize?: ResizableLength\n /**\n * What the panel is called. It names the handle that resizes it; the dictionary's \"Panel 2\"\n * otherwise.\n */\n label?: string\n}\n\nconst props = withDefaults(defineProps<ResizablePanelProps>(), {\n index: 0,\n defaultSize: undefined,\n minSize: 0,\n maxSize: undefined,\n collapsible: false,\n collapsedSize: 0,\n label: undefined,\n})\n\n/** Whether the panel is collapsed. It only takes effect on a `collapsible` panel. */\nconst collapsed = defineModel<boolean>('collapsed', { default: false })\n\ndefineSlots<{\n /** The panel's content. */\n default(): unknown\n}>()\n\nconst group = inject(resizableKey, null)\nconst attrs = useAttrs()\nconst id = useId()\nconst el = ref<HTMLElement | null>(null)\n\nconst isCollapsed = computed(() => props.collapsible && collapsed.value)\n\nconst cssLength = (length: ResizableLength) => (typeof length === 'number' ? `${length}%` : length)\n\n/** A collapsed size of zero leaves nothing to read, so the content is hidden, focus included. */\nconst hidesContent = computed(\n () => isCollapsed.value && Number.parseFloat(String(props.collapsedSize)) === 0,\n)\n\n// @core\n/*\n * The value the group last wrote, so the watcher below tells the group's own writes from the\n * consumer's. Only the consumer's ask the group to make room.\n */\nlet fromGroup: boolean | undefined\n\ngroup?.register(id, {\n get index() {\n return props.index\n },\n get el() {\n return el.value\n },\n get minSize() {\n return props.minSize\n },\n get maxSize() {\n return props.maxSize\n },\n get collapsible() {\n return props.collapsible\n },\n get collapsedSize() {\n return props.collapsedSize\n },\n get collapsed() {\n return isCollapsed.value\n },\n setCollapsed(value) {\n if (collapsed.value === value) return\n fromGroup = value\n collapsed.value = value\n },\n})\nonBeforeUnmount(() => group?.unregister(id))\n\nwatch(collapsed, (value) => {\n const own = value === fromGroup\n fromGroup = undefined\n if (!own && props.collapsible) group?.toggle(props.index, value)\n})\n\n// @devwarn\nif (isDev) {\n if (!group) console.warn('[VResizablePanel] Place it directly inside a VResizable.')\n watch(\n () => collapsed.value && !props.collapsible,\n (wrong) => {\n if (wrong) console.warn('[VResizablePanel] `collapsed` has no effect without `collapsible`.')\n },\n { immediate: true },\n )\n}\n\n// Every variable is set, even to its default, so that a nested group's panel never inherits\n// the limits of the panel it sits in.\nconst style = computed(() => ({\n '--resizable-panel-size': String(group?.sizeAt(props.index) ?? 1),\n '--resizable-panel-min': cssLength(props.minSize),\n '--resizable-panel-max': props.maxSize === undefined ? 'none' : cssLength(props.maxSize),\n '--resizable-panel-collapsed': cssLength(props.collapsedSize),\n}))\n</script>\n\n<template>\n <div\n :id=\"(attrs.id as string | undefined) ?? id\"\n ref=\"el\"\n class=\"v-resizable-panel\"\n :data-collapsed=\"isCollapsed ? '' : undefined\"\n :data-hidden=\"hidesContent ? '' : undefined\"\n :style=\"style\"\n >\n <slot />\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * The basis is the size itself, padding and border included, so a padded panel still takes its\n * exact share. Growing by the same weight spreads any space left over, such as that of a\n * collapsed sibling, in proportion; the 1px handles are shrunk off the same way.\n */\n .v-resizable-panel {\n box-sizing: border-box;\n flex: var(--resizable-panel-size) var(--resizable-panel-size)\n calc(var(--resizable-panel-size) * 1%);\n overflow: auto;\n }\n\n .v-resizable[data-orientation='horizontal'] > .v-resizable-panel {\n min-inline-size: var(--resizable-panel-min);\n max-inline-size: var(--resizable-panel-max);\n }\n\n .v-resizable[data-orientation='vertical'] > .v-resizable-panel {\n min-block-size: var(--resizable-panel-min);\n max-block-size: var(--resizable-panel-max);\n }\n\n .v-resizable[data-orientation] > .v-resizable-panel[data-collapsed] {\n flex: 0 0 var(--resizable-panel-collapsed);\n min-inline-size: 0;\n max-inline-size: none;\n min-block-size: 0;\n max-block-size: none;\n }\n\n /* Removed from the layout as well, or its padding would keep the panel open. */\n .v-resizable-panel[data-hidden] {\n display: none;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0CA,IAAM,IAAQ,GAWR,IAAY,EAAoB,GAAC,WAA+B,GAOhE,IAAQ,EAAO,GAAc,IAAI,GACjC,IAAQ,EAAS,GACjB,IAAK,EAAM,GACX,IAAK,EAAwB,IAAI,GAEjC,IAAc,QAAe,EAAM,eAAe,EAAU,KAAK,GAEjE,KAAa,MAA6B,OAAO,KAAW,WAAW,GAAG,EAAO,KAAK,GAGtF,IAAe,QACb,EAAY,SAAS,OAAO,WAAW,OAAO,EAAM,aAAa,CAAC,MAAM,CAChF,GAOI;EAuCJ,AArCA,GAAO,SAAS,GAAI;GAClB,IAAI,QAAQ;IACV,OAAO,EAAM;GACf;GACA,IAAI,KAAK;IACP,OAAO,EAAG;GACZ;GACA,IAAI,UAAU;IACZ,OAAO,EAAM;GACf;GACA,IAAI,UAAU;IACZ,OAAO,EAAM;GACf;GACA,IAAI,cAAc;IAChB,OAAO,EAAM;GACf;GACA,IAAI,gBAAgB;IAClB,OAAO,EAAM;GACf;GACA,IAAI,YAAY;IACd,OAAO,EAAY;GACrB;GACA,aAAa,GAAO;IACd,EAAU,UAAU,MACxB,IAAY,GACZ,EAAU,QAAQ;GACpB;EACF,CAAC,GACD,QAAsB,GAAO,WAAW,CAAE,CAAC,GAE3C,EAAM,IAAY,MAAU;GAC1B,IAAM,IAAM,MAAU;GAEtB,AADA,IAAY,KAAA,GACR,CAAC,KAAO,EAAM,eAAa,GAAO,OAAO,EAAM,OAAO,CAAK;EACjE,CAAC,GAGG,MACG,KAAO,QAAQ,KAAK,0DAA0D,GACnF,QACQ,EAAU,SAAS,CAAC,EAAM,cAC/B,MAAU;GACT,AAAI,KAAO,QAAQ,KAAK,oEAAoE;EAC9F,GACA,EAAE,WAAW,GAAK,CACpB;EAKF,IAAM,IAAQ,SAAgB;GAC5B,0BAA0B,OAAO,GAAO,OAAO,EAAM,KAAK,KAAK,CAAC;GAChE,yBAAyB,EAAU,EAAM,OAAO;GAChD,yBAAyB,EAAM,YAAY,KAAA,IAAY,SAAS,EAAU,EAAM,OAAO;GACvF,+BAA+B,EAAU,EAAM,aAAa;EAC9D,EAAE;yBAIA,EASM,OAAA;GARH,IAAK,EAAA,CAAA,CAAK,CAAC,MAA6B,EAAA,CAAA;YACrC;GAAJ,KAAI;GACJ,OAAM;GACL,kBAAgB,EAAA,QAAW,KAAQ,KAAA;GACnC,eAAa,EAAA,QAAY,KAAQ,KAAA;GACjC,OAAK,EAAE,EAAA,KAAK;MAEb,EAAQ,EAAA,QAAA,SAAA,CAAA,GAAA,IAAA,CAAA"}
@@ -0,0 +1,24 @@
1
+ import { InjectionKey } from 'vue';
2
+ import { ResizableOrientation, ResizableLength } from './VResizable.js';
3
+ export interface ResizablePanelEntry {
4
+ /** Which panel this is among its siblings. */
5
+ readonly index: number;
6
+ readonly el: HTMLElement | null;
7
+ readonly minSize: ResizableLength;
8
+ readonly maxSize: ResizableLength | undefined;
9
+ readonly collapsible: boolean;
10
+ readonly collapsedSize: ResizableLength;
11
+ readonly collapsed: boolean;
12
+ /** Writes the panel's collapsed model on behalf of the group. */
13
+ setCollapsed: (value: boolean) => void;
14
+ }
15
+ export interface ResizableContext {
16
+ readonly orientation: ResizableOrientation;
17
+ /** The size of a panel in percent, used as its `flex-grow` weight. */
18
+ sizeAt: (index: number) => number;
19
+ register: (id: string, entry: ResizablePanelEntry) => void;
20
+ unregister: (id: string) => void;
21
+ /** Collapses or reopens a panel whose collapsed model was changed from outside the group. */
22
+ toggle: (index: number, collapsed: boolean) => void;
23
+ }
24
+ export declare const resizableKey: InjectionKey<ResizableContext>;
@@ -0,0 +1,6 @@
1
+ //#region src/components/VResizable/context.ts
2
+ var e = Symbol("v-resizable");
3
+ //#endregion
4
+ export { e as resizableKey };
5
+
6
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","names":[],"sources":["../../../src/components/VResizable/context.ts"],"sourcesContent":["/**\n * Panels register what the group needs when it measures and moves them: their element, their\n * limits and their collapsed model. Positions come from the group, which clones each panel's\n * VNode with its `index` while rendering.\n */\n\nimport type { InjectionKey } from 'vue'\n\nimport type { ResizableOrientation, ResizableLength } from './VResizable.vue'\n\nexport interface ResizablePanelEntry {\n /** Which panel this is among its siblings. */\n readonly index: number\n readonly el: HTMLElement | null\n readonly minSize: ResizableLength\n readonly maxSize: ResizableLength | undefined\n readonly collapsible: boolean\n readonly collapsedSize: ResizableLength\n readonly collapsed: boolean\n /** Writes the panel's collapsed model on behalf of the group. */\n setCollapsed: (value: boolean) => void\n}\n\nexport interface ResizableContext {\n readonly orientation: ResizableOrientation\n /** The size of a panel in percent, used as its `flex-grow` weight. */\n sizeAt: (index: number) => number\n register: (id: string, entry: ResizablePanelEntry) => void\n unregister: (id: string) => void\n /** Collapses or reopens a panel whose collapsed model was changed from outside the group. */\n toggle: (index: number, collapsed: boolean) => void\n}\n\nexport const resizableKey: InjectionKey<ResizableContext> = Symbol('v-resizable')\n"],"mappings":";AAiCA,IAAa,IAA+C,OAAO,aAAa"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Panel sizes are percentages of the space the panels share, summing to 100. These functions are
3
+ * pure: the component measures the DOM and converts CSS lengths before calling them.
4
+ */
5
+ /** The limits of one panel, already converted to percentages. */
6
+ export interface PanelLimits {
7
+ min: number;
8
+ max: number;
9
+ collapsible: boolean;
10
+ collapsedSize: number;
11
+ }
12
+ export declare const isCollapsedAt: (size: number, limits: PanelLimits) => boolean;
13
+ /**
14
+ * The starting sizes: each panel's `defaultSize` where given, the rest shared equally. Sizes that
15
+ * do not add up to 100 are scaled to.
16
+ */
17
+ export declare function defaultSizes(defaults: (number | undefined)[]): number[];
18
+ /**
19
+ * Moves handle `handle`, which sits between panels `handle` and `handle + 1`, so that the panel
20
+ * before it grows by `delta` (or shrinks, when negative). The space is taken from the panels on
21
+ * the other side, nearest first, each down to its minimum; and given to the panels on this side,
22
+ * nearest first, each up to its maximum.
23
+ *
24
+ * `snap` places the collapse point of the two neighbours between their collapsed size and their
25
+ * minimum: 0.5 for a pointer, which must travel half that distance, 1 for the keyboard, which
26
+ * collapses or reopens on the first press.
27
+ */
28
+ export declare function resizeAt(base: readonly number[], handle: number, delta: number, limits: readonly PanelLimits[], snap?: number): number[];
@@ -0,0 +1,41 @@
1
+ //#region src/components/VResizable/layout.ts
2
+ var e = .01, t = (t, n) => n.collapsible && t <= n.collapsedSize + e, n = (e) => Math.round(e * 1e3) / 1e3;
3
+ function r(e) {
4
+ let t = e.reduce((e, t) => e + (t ?? 0), 0), r = e.filter((e) => e === void 0).length, i = r ? Math.max(0, 100 - t) / r : 0, a = e.map((e) => e ?? i), o = a.reduce((e, t) => e + t, 0);
5
+ return o ? a.map((e) => n(e / o * 100)) : e.map(() => n(100 / (e.length || 1)));
6
+ }
7
+ function i(r, i, a, o, s = .5) {
8
+ if (Math.abs(a) < e) return [...r];
9
+ let c = a > 0, l = c ? i : i + 1, u = c ? -1 : 1, d = c ? i + 1 : i, f = c ? 1 : -1, p = (e) => e >= 0 && e < r.length, m = Math.abs(a), h = o[l], g = t(r[l], h), _ = Math.max(0, h.min - h.collapsedSize);
10
+ if (g) {
11
+ if (m < _ * (1 - s) - e) return [...r];
12
+ m = Math.max(m, _);
13
+ }
14
+ let v = 0;
15
+ for (let e = l; p(e); e += u) e !== l && t(r[e], o[e]) || (v += Math.max(0, o[e].max - r[e]));
16
+ m = Math.min(m, v);
17
+ let y = [...r], b = 0;
18
+ for (let n = d; p(n) && m - b > e; n += f) {
19
+ let i = o[n], a = r[n];
20
+ if (t(a, i)) continue;
21
+ let c = a - (m - b);
22
+ if (c < i.min) {
23
+ let t = i.collapsedSize + (i.min - i.collapsedSize) * s;
24
+ c = i.collapsible && n === d && c < t - e && b + a - i.collapsedSize <= v + e ? i.collapsedSize : i.min;
25
+ }
26
+ c = Math.min(c, a), b += a - c, y[n] = c;
27
+ }
28
+ if (g && b < _ - e) return [...r];
29
+ let x = b;
30
+ for (let n = l; p(n) && x > e; n += u) {
31
+ let e = o[n];
32
+ if (n !== l && t(r[n], e)) continue;
33
+ let i = y[n], a = Math.min(e.max, i + x);
34
+ x -= a - i, y[n] = a;
35
+ }
36
+ return x > e ? [...r] : y.map(n);
37
+ }
38
+ //#endregion
39
+ export { r as defaultSizes, t as isCollapsedAt, i as resizeAt };
40
+
41
+ //# sourceMappingURL=layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.js","names":[],"sources":["../../../src/components/VResizable/layout.ts"],"sourcesContent":["// @core\n/**\n * Panel sizes are percentages of the space the panels share, summing to 100. These functions are\n * pure: the component measures the DOM and converts CSS lengths before calling them.\n */\n\n/** The limits of one panel, already converted to percentages. */\nexport interface PanelLimits {\n min: number\n max: number\n collapsible: boolean\n collapsedSize: number\n}\n\n/** Below this difference two sizes are equal, which absorbs the rounding of written sizes. */\nconst EPSILON = 0.01\n\nexport const isCollapsedAt = (size: number, limits: PanelLimits) =>\n limits.collapsible && size <= limits.collapsedSize + EPSILON\n\n/** Rounds a written size so the model does not carry floating-point noise. */\nconst roundSize = (size: number) => Math.round(size * 1000) / 1000\n\n/**\n * The starting sizes: each panel's `defaultSize` where given, the rest shared equally. Sizes that\n * do not add up to 100 are scaled to.\n */\nexport function defaultSizes(defaults: (number | undefined)[]): number[] {\n const given = defaults.reduce<number>((sum, size) => sum + (size ?? 0), 0)\n const free = defaults.filter((size) => size === undefined).length\n const share = free ? Math.max(0, 100 - given) / free : 0\n const sizes = defaults.map((size) => size ?? share)\n const total = sizes.reduce((sum, size) => sum + size, 0)\n if (!total) return defaults.map(() => roundSize(100 / (defaults.length || 1)))\n return sizes.map((size) => roundSize((size / total) * 100))\n}\n\n/**\n * Moves handle `handle`, which sits between panels `handle` and `handle + 1`, so that the panel\n * before it grows by `delta` (or shrinks, when negative). The space is taken from the panels on\n * the other side, nearest first, each down to its minimum; and given to the panels on this side,\n * nearest first, each up to its maximum.\n *\n * `snap` places the collapse point of the two neighbours between their collapsed size and their\n * minimum: 0.5 for a pointer, which must travel half that distance, 1 for the keyboard, which\n * collapses or reopens on the first press.\n */\nexport function resizeAt(\n base: readonly number[],\n handle: number,\n delta: number,\n limits: readonly PanelLimits[],\n snap = 0.5,\n): number[] {\n if (Math.abs(delta) < EPSILON) return [...base]\n const growing = delta > 0\n const growFirst = growing ? handle : handle + 1\n const growStep = growing ? -1 : 1\n const shrinkFirst = growing ? handle + 1 : handle\n const shrinkStep = growing ? 1 : -1\n const inRange = (i: number) => i >= 0 && i < base.length\n\n let want = Math.abs(delta)\n\n // A collapsed neighbour stays shut until the pull passes its collapse point, then opens at\n // its minimum at once: a panel narrower than its minimum is a state no rule allows.\n const opener = limits[growFirst]!\n const opening = isCollapsedAt(base[growFirst]!, opener)\n const openGap = Math.max(0, opener.min - opener.collapsedSize)\n if (opening) {\n if (want < openGap * (1 - snap) - EPSILON) return [...base]\n want = Math.max(want, openGap)\n }\n\n // A collapsed panel further away is not reopened by a drag that only passes by.\n let room = 0\n for (let i = growFirst; inRange(i); i += growStep) {\n if (i !== growFirst && isCollapsedAt(base[i]!, limits[i]!)) continue\n room += Math.max(0, limits[i]!.max - base[i]!)\n }\n want = Math.min(want, room)\n\n const next = [...base]\n let taken = 0\n for (let i = shrinkFirst; inRange(i) && want - taken > EPSILON; i += shrinkStep) {\n const lim = limits[i]!\n const size = base[i]!\n if (isCollapsedAt(size, lim)) continue\n let target = size - (want - taken)\n if (target < lim.min) {\n const collapsePoint = lim.collapsedSize + (lim.min - lim.collapsedSize) * snap\n const canCollapse =\n lim.collapsible &&\n i === shrinkFirst &&\n target < collapsePoint - EPSILON &&\n taken + size - lim.collapsedSize <= room + EPSILON\n target = canCollapse ? lim.collapsedSize : lim.min\n }\n target = Math.min(target, size)\n taken += size - target\n next[i] = target\n }\n\n if (opening && taken < openGap - EPSILON) return [...base]\n\n let left = taken\n for (let i = growFirst; inRange(i) && left > EPSILON; i += growStep) {\n const lim = limits[i]!\n if (i !== growFirst && isCollapsedAt(base[i]!, lim)) continue\n const size = next[i]!\n const target = Math.min(lim.max, size + left)\n left -= target - size\n next[i] = target\n }\n if (left > EPSILON) return [...base]\n\n return next.map(roundSize)\n}\n"],"mappings":";AAeA,IAAM,IAAU,KAEH,KAAiB,GAAc,MAC1C,EAAO,eAAe,KAAQ,EAAO,gBAAgB,GAGjD,KAAa,MAAiB,KAAK,MAAM,IAAO,GAAI,IAAI;AAM9D,SAAgB,EAAa,GAA4C;CACvE,IAAM,IAAQ,EAAS,QAAgB,GAAK,MAAS,KAAO,KAAQ,IAAI,CAAC,GACnE,IAAO,EAAS,QAAQ,MAAS,MAAS,KAAA,CAAS,CAAC,CAAC,QACrD,IAAQ,IAAO,KAAK,IAAI,GAAG,MAAM,CAAK,IAAI,IAAO,GACjD,IAAQ,EAAS,KAAK,MAAS,KAAQ,CAAK,GAC5C,IAAQ,EAAM,QAAQ,GAAK,MAAS,IAAM,GAAM,CAAC;CAEvD,OADK,IACE,EAAM,KAAK,MAAS,EAAW,IAAO,IAAS,GAAG,CAAC,IADvC,EAAS,UAAU,EAAU,OAAO,EAAS,UAAU,EAAE,CAAC;AAE/E;AAYA,SAAgB,EACd,GACA,GACA,GACA,GACA,IAAO,IACG;CACV,IAAI,KAAK,IAAI,CAAK,IAAI,GAAS,OAAO,CAAC,GAAG,CAAI;CAC9C,IAAM,IAAU,IAAQ,GAClB,IAAY,IAAU,IAAS,IAAS,GACxC,IAAW,IAAU,KAAK,GAC1B,IAAc,IAAU,IAAS,IAAI,GACrC,IAAa,IAAU,IAAI,IAC3B,KAAW,MAAc,KAAK,KAAK,IAAI,EAAK,QAE9C,IAAO,KAAK,IAAI,CAAK,GAInB,IAAS,EAAO,IAChB,IAAU,EAAc,EAAK,IAAa,CAAM,GAChD,IAAU,KAAK,IAAI,GAAG,EAAO,MAAM,EAAO,aAAa;CAC7D,IAAI,GAAS;EACX,IAAI,IAAO,KAAW,IAAI,KAAQ,GAAS,OAAO,CAAC,GAAG,CAAI;EAC1D,IAAO,KAAK,IAAI,GAAM,CAAO;CAC/B;CAGA,IAAI,IAAO;CACX,KAAK,IAAI,IAAI,GAAW,EAAQ,CAAC,GAAG,KAAK,GACnC,MAAM,KAAa,EAAc,EAAK,IAAK,EAAO,EAAG,MACzD,KAAQ,KAAK,IAAI,GAAG,EAAO,EAAE,CAAE,MAAM,EAAK,EAAG;CAE/C,IAAO,KAAK,IAAI,GAAM,CAAI;CAE1B,IAAM,IAAO,CAAC,GAAG,CAAI,GACjB,IAAQ;CACZ,KAAK,IAAI,IAAI,GAAa,EAAQ,CAAC,KAAK,IAAO,IAAQ,GAAS,KAAK,GAAY;EAC/E,IAAM,IAAM,EAAO,IACb,IAAO,EAAK;EAClB,IAAI,EAAc,GAAM,CAAG,GAAG;EAC9B,IAAI,IAAS,KAAQ,IAAO;EAC5B,IAAI,IAAS,EAAI,KAAK;GACpB,IAAM,IAAgB,EAAI,iBAAiB,EAAI,MAAM,EAAI,iBAAiB;GAM1E,IAJE,EAAI,eACJ,MAAM,KACN,IAAS,IAAgB,KACzB,IAAQ,IAAO,EAAI,iBAAiB,IAAO,IACtB,EAAI,gBAAgB,EAAI;EACjD;EAGA,AAFA,IAAS,KAAK,IAAI,GAAQ,CAAI,GAC9B,KAAS,IAAO,GAChB,EAAK,KAAK;CACZ;CAEA,IAAI,KAAW,IAAQ,IAAU,GAAS,OAAO,CAAC,GAAG,CAAI;CAEzD,IAAI,IAAO;CACX,KAAK,IAAI,IAAI,GAAW,EAAQ,CAAC,KAAK,IAAO,GAAS,KAAK,GAAU;EACnE,IAAM,IAAM,EAAO;EACnB,IAAI,MAAM,KAAa,EAAc,EAAK,IAAK,CAAG,GAAG;EACrD,IAAM,IAAO,EAAK,IACZ,IAAS,KAAK,IAAI,EAAI,KAAK,IAAO,CAAI;EAE5C,AADA,KAAQ,IAAS,GACjB,EAAK,KAAK;CACZ;CAGA,OAFI,IAAO,IAAgB,CAAC,GAAG,CAAI,IAE5B,EAAK,IAAI,CAAS;AAC3B"}
@@ -0,0 +1,2 @@
1
+ @layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
2
+ @layer vectis.components{.v-select{anchor-scope:--select-anchor;width:100%;font-family:var(--vectis-text-family)}.v-select-control{display:block}.v-select-control .v-input-field{anchor-name:--select-anchor}.v-select-panel{max-block-size:var(--vectis-control-size-select-list-max-block)}.v-select-trigger{text-align:start;cursor:pointer;align-items:center;display:flex}.v-select[data-multiple] .v-select-trigger{flex:1 1 0}.v-select-value,.v-select-placeholder{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.v-select-placeholder{color:var(--vectis-color-text-subtle)}.v-select-spinner{color:var(--vectis-color-text-muted)}.v-select:has(.v-listbox-text){min-inline-size:0}}
@@ -0,0 +1,193 @@
1
+ import { IconSource } from '../VIcon/types.js';
2
+ import { FieldLabelPosition } from '../VField/VField.js';
3
+ import { ItemValue, ListboxGroup, ListboxItem, ListboxChipSlotProps, ListboxOption, ListboxOptionSlotProps, ListboxOverflowSlotProps, ListboxSeparator } from '../../types.js';
4
+ /** One thing that can be chosen. */
5
+ export type SelectOption = ListboxOption;
6
+ /** A named block of options, the equivalent of a native `<optgroup>`. */
7
+ export type SelectGroup = ListboxGroup;
8
+ /** A rule drawn between two blocks of options, purely decorative. */
9
+ export type SelectSeparator = ListboxSeparator;
10
+ /** Anything the list may hold: an option, a named block, or a separator. */
11
+ export type SelectItem = ListboxItem;
12
+ /** Where the list opens relative to the field. */
13
+ export type SelectPlacement = 'bottom' | 'bottom-start' | 'bottom-end' | 'top' | 'top-start' | 'top-end';
14
+ /** The height of the field: 32, 40 or 48 pixels. */
15
+ export type SelectSize = 'sm' | 'md' | 'lg';
16
+ /**
17
+ * How the chosen values are shown in a multiple field: one chip each, or their labels
18
+ * joined by commas.
19
+ */
20
+ export type SelectDisplay = 'chip' | 'text';
21
+ /** What the `#option` slot receives. */
22
+ export type SelectOptionSlotProps = ListboxOptionSlotProps;
23
+ /** What the `#chip` slot receives. */
24
+ export type SelectChipSlotProps = ListboxChipSlotProps;
25
+ /** What the `#overflow` slot receives. */
26
+ export type SelectOverflowSlotProps = ListboxOverflowSlotProps;
27
+ interface SelectProps {
28
+ /**
29
+ * What the list offers. An entry may be an option, a named block of options, or a
30
+ * separator; a plain list of options remains perfectly valid.
31
+ */
32
+ options: SelectItem[];
33
+ /**
34
+ * Allows several values to be chosen, which makes the value a list and shows what has been
35
+ * chosen inside the field, as chips or as text depending on `display`. The list then stays
36
+ * open while options are toggled.
37
+ */
38
+ multiple?: boolean;
39
+ /**
40
+ * How the chosen values are shown when several can be chosen: one dismissible chip each, or
41
+ * their labels joined by commas on a single line, cut short with an ellipsis when they run
42
+ * out of room.
43
+ */
44
+ display?: SelectDisplay;
45
+ /**
46
+ * How many chosen values to show while the field is not focused, before the rest are summed
47
+ * up as "+X". Left out, or set to 0, every value is shown.
48
+ */
49
+ max?: number;
50
+ /**
51
+ * Rephrases the "+X" standing for the values beyond `max`, "+5 products" for instance.
52
+ * It receives the number of values being hidden.
53
+ */
54
+ overflowText?: (count: number) => string;
55
+ /** The label above the field, tied to it so that clicking it focuses the field. */
56
+ label?: string;
57
+ /**
58
+ * A line of help under the field. It is tied to the field for assistive technology,
59
+ * so it is read out along with the label.
60
+ */
61
+ hint?: string;
62
+ /**
63
+ * A message saying what is wrong with the value, shown in place of the hint so that the field
64
+ * does not grow. It marks the field invalid, is read along with it, and is announced when it
65
+ * appears or changes.
66
+ */
67
+ error?: string;
68
+ /**
69
+ * Marks the field as required: an asterisk follows the label, the combobox is announced as
70
+ * required, and the hidden `<select>` a form reads is `required`.
71
+ */
72
+ required?: boolean;
73
+ /** Hides the label visually. It still names the field for assistive technology. */
74
+ hideLabel?: boolean;
75
+ /**
76
+ * Where the label sits: above the field (`top`, the default), or at its start, in a column of
77
+ * its own, moving back above when there is not room for both.
78
+ */
79
+ labelPosition?: FieldLabelPosition;
80
+ /** The height of the field: 32, 40 or 48 pixels. */
81
+ size?: SelectSize;
82
+ /** Takes 4px off the height, as everywhere else in the design system. */
83
+ compact?: boolean;
84
+ /** What the field says while nothing is chosen. */
85
+ placeholder?: string;
86
+ /** Makes the field unusable, greyed out through the colour tokens. Its value is not submitted. */
87
+ disabled?: boolean;
88
+ /**
89
+ * Shows what has been chosen without letting it be changed: the field stays focusable and its
90
+ * value is submitted, but the list never opens, the chips lose their crosses and no clear
91
+ * cross is offered.
92
+ */
93
+ readonly?: boolean;
94
+ /** Marks the field as invalid, for a rule of your own. */
95
+ invalid?: boolean;
96
+ /**
97
+ * An icon inside the field, at the start, before the chips when several values can
98
+ * be chosen. It is decorative by default and becomes a real button as soon as a
99
+ * `@click:icon-start` listener is attached, in which case it needs `iconStartLabel`.
100
+ */
101
+ iconStart?: IconSource;
102
+ /** What the start icon does, in words, once it is clickable. */
103
+ iconStartLabel?: string;
104
+ /**
105
+ * The chevron at the end of the field, which turns as the list opens: an icon name, or an
106
+ * explicit render.
107
+ */
108
+ expandIcon?: IconSource;
109
+ /**
110
+ * Says that the options are being loaded: a spinner takes the chevron's place. The list still
111
+ * opens.
112
+ */
113
+ loading?: boolean;
114
+ /** What the spinner is announced as. It falls back to the design system dictionary. */
115
+ loadingText?: string;
116
+ /** Offers a cross that empties the selection. */
117
+ clearable?: boolean;
118
+ /** What that cross does, in words. It falls back to the design system dictionary. */
119
+ clearLabel?: string;
120
+ /** Where the list opens relative to the field. */
121
+ placement?: SelectPlacement;
122
+ }
123
+ type __VLS_Props = SelectProps;
124
+ type __VLS_Slots = {
125
+ /**
126
+ * Content at the start of the field, rendered after the chips standing for the chosen
127
+ * values rather than in their place.
128
+ */
129
+ start?(): unknown;
130
+ /**
131
+ * Controls of your own inside the field, placed before the ones the field owns: the clear
132
+ * cross and the chevron.
133
+ */
134
+ 'value-end'?(): unknown;
135
+ /** What a row of the list shows, in place of the plain label: a subtitle, an avatar, a badge. */
136
+ option?(props: SelectOptionSlotProps): unknown;
137
+ /** Replaces the chip standing for one chosen value. */
138
+ chip?(props: SelectChipSlotProps): unknown;
139
+ /** Replaces the "+X" standing for the values beyond `max`. */
140
+ overflow?(props: SelectOverflowSlotProps): unknown;
141
+ };
142
+ type __VLS_ModelProps = {
143
+ /** The chosen option's `value`, `''` while nothing is chosen, or the list of them when `multiple` is set. */
144
+ modelValue?: ItemValue | ItemValue[];
145
+ };
146
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
147
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
148
+ /** Moves the focus to the field. */
149
+ focus: (options?: FocusOptions) => void | undefined;
150
+ /** The button that acts as the combobox. */
151
+ el: import('vue').Ref<HTMLButtonElement | null, HTMLButtonElement | null>;
152
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
153
+ clear: () => any;
154
+ "update:modelValue": (value: ItemValue | ItemValue[]) => any;
155
+ "click:icon-start": (event: MouseEvent) => any;
156
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
157
+ onClear?: (() => any) | undefined;
158
+ "onUpdate:modelValue"?: ((value: ItemValue | ItemValue[]) => any) | undefined;
159
+ "onClick:icon-start"?: ((event: MouseEvent) => any) | undefined;
160
+ }>, {
161
+ loading: boolean;
162
+ label: string;
163
+ placeholder: string;
164
+ error: string;
165
+ size: SelectSize;
166
+ compact: boolean;
167
+ iconStart: IconSource;
168
+ disabled: boolean;
169
+ required: boolean;
170
+ multiple: boolean;
171
+ display: SelectDisplay;
172
+ placement: SelectPlacement;
173
+ invalid: boolean;
174
+ hint: string;
175
+ hideLabel: boolean;
176
+ labelPosition: FieldLabelPosition;
177
+ readonly: boolean;
178
+ iconStartLabel: string;
179
+ loadingText: string;
180
+ clearable: boolean;
181
+ clearLabel: string;
182
+ max: number;
183
+ expandIcon: IconSource;
184
+ overflowText: (count: number) => string;
185
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
186
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
187
+ declare const _default: typeof __VLS_export;
188
+ export default _default;
189
+ type __VLS_WithSlots<T, S> = T & {
190
+ new (): {
191
+ $slots: S;
192
+ };
193
+ };
@@ -0,0 +1,9 @@
1
+ import './VSelect.css';
2
+ import e from "./VSelect.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/VSelect/VSelect.vue
5
+ var t = e;
6
+ //#endregion
7
+ export { t as default };
8
+
9
+ //# sourceMappingURL=VSelect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VSelect.js","names":[],"sources":["../../../src/components/VSelect/VSelect.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @keyboard @a11y @core\n/**\n * A select-only combobox: a native button keeps DOM focus and moves aria-activedescendant through\n * the options, since a native `<select>` cannot draw its list with the design system on every\n * engine. A hidden native `<select>` carries the value into forms, with its constraint\n * validation, autofill and reset.\n */\n\nimport { computed, inject, onBeforeUnmount, onMounted, ref, useId, watch } from 'vue'\n\nimport { expand_more as expandMoreIcon } from '../VIcon/icons/expand_more'\nimport type { IconSource } from '../VIcon/types'\nimport type { FieldLabelPosition } from '../VField/VField.vue'\nimport VInput from '../VInput/VInput.vue'\nimport { inputGroupKey } from '../VInput/context'\nimport VListboxChevron from '../VListbox/VListboxChevron.vue'\nimport VListboxPanel from '../VListbox/VListboxPanel.vue'\nimport VListboxValues from '../VListbox/VListboxValues.vue'\nimport VSpinner from '../VSpinner/VSpinner.vue'\n\nimport type {\n ItemValue,\n ListboxGroup,\n ListboxItem,\n ListboxChipSlotProps,\n ListboxOption,\n ListboxOptionSlotProps,\n ListboxOverflowSlotProps,\n ListboxSeparator,\n} from '../../types'\nimport { toggleValue } from '../../utils/array'\nimport { partitionAttrs } from '../../utils/attrs'\nimport { chipScaleFor } from '../../utils/chip'\nimport { createNormalizedCache, normalizeText } from '../../utils/text'\n\nimport { canClear } from '../../composables/useClearable'\nimport { useControlShape } from '../../composables/useControlShape'\nimport { useFocusoutDismiss } from '../../composables/useFocusoutDismiss'\nimport { iconStartListener } from '../../composables/useIconClickHandlers'\nimport { selectionOf, useListbox } from '../../composables/useListbox'\nimport { useRootAttrs } from '../../composables/useRootAttrs'\nimport { useTimer } from '../../composables/useTimer'\nimport { useMessages } from '../../i18n/state'\n\n/** One thing that can be chosen. */\nexport type SelectOption = ListboxOption\n\n/** A named block of options, the equivalent of a native `<optgroup>`. */\nexport type SelectGroup = ListboxGroup\n\n/** A rule drawn between two blocks of options, purely decorative. */\nexport type SelectSeparator = ListboxSeparator\n\n/** Anything the list may hold: an option, a named block, or a separator. */\nexport type SelectItem = ListboxItem\n\n/** Where the list opens relative to the field. */\nexport type SelectPlacement =\n 'bottom' | 'bottom-start' | 'bottom-end' | 'top' | 'top-start' | 'top-end'\n\n/** The height of the field: 32, 40 or 48 pixels. */\nexport type SelectSize = 'sm' | 'md' | 'lg'\n\n/**\n * How the chosen values are shown in a multiple field: one chip each, or their labels\n * joined by commas.\n */\nexport type SelectDisplay = 'chip' | 'text'\n\n/** What the `#option` slot receives. */\nexport type SelectOptionSlotProps = ListboxOptionSlotProps\n\n/** What the `#chip` slot receives. */\nexport type SelectChipSlotProps = ListboxChipSlotProps\n\n/** What the `#overflow` slot receives. */\nexport type SelectOverflowSlotProps = ListboxOverflowSlotProps\n\ninterface SelectProps {\n /**\n * What the list offers. An entry may be an option, a named block of options, or a\n * separator; a plain list of options remains perfectly valid.\n */\n options: SelectItem[]\n /**\n * Allows several values to be chosen, which makes the value a list and shows what has been\n * chosen inside the field, as chips or as text depending on `display`. The list then stays\n * open while options are toggled.\n */\n multiple?: boolean\n /**\n * How the chosen values are shown when several can be chosen: one dismissible chip each, or\n * their labels joined by commas on a single line, cut short with an ellipsis when they run\n * out of room.\n */\n display?: SelectDisplay\n /**\n * How many chosen values to show while the field is not focused, before the rest are summed\n * up as \"+X\". Left out, or set to 0, every value is shown.\n */\n max?: number\n /**\n * Rephrases the \"+X\" standing for the values beyond `max`, \"+5 products\" for instance.\n * It receives the number of values being hidden.\n */\n overflowText?: (count: number) => string\n /** The label above the field, tied to it so that clicking it focuses the field. */\n label?: string\n /**\n * A line of help under the field. It is tied to the field for assistive technology,\n * so it is read out along with the label.\n */\n hint?: string\n /**\n * A message saying what is wrong with the value, shown in place of the hint so that the field\n * does not grow. It marks the field invalid, is read along with it, and is announced when it\n * appears or changes.\n */\n error?: string\n /**\n * Marks the field as required: an asterisk follows the label, the combobox is announced as\n * required, and the hidden `<select>` a form reads is `required`.\n */\n required?: boolean\n /** Hides the label visually. It still names the field for assistive technology. */\n hideLabel?: boolean\n /**\n * Where the label sits: above the field (`top`, the default), or at its start, in a column of\n * its own, moving back above when there is not room for both.\n */\n labelPosition?: FieldLabelPosition\n /** The height of the field: 32, 40 or 48 pixels. */\n size?: SelectSize\n /** Takes 4px off the height, as everywhere else in the design system. */\n compact?: boolean\n /** What the field says while nothing is chosen. */\n placeholder?: string\n /** Makes the field unusable, greyed out through the colour tokens. Its value is not submitted. */\n disabled?: boolean\n /**\n * Shows what has been chosen without letting it be changed: the field stays focusable and its\n * value is submitted, but the list never opens, the chips lose their crosses and no clear\n * cross is offered.\n */\n readonly?: boolean\n /** Marks the field as invalid, for a rule of your own. */\n invalid?: boolean\n /**\n * An icon inside the field, at the start, before the chips when several values can\n * be chosen. It is decorative by default and becomes a real button as soon as a\n * `@click:icon-start` listener is attached, in which case it needs `iconStartLabel`.\n */\n iconStart?: IconSource\n /** What the start icon does, in words, once it is clickable. */\n iconStartLabel?: string\n /**\n * The chevron at the end of the field, which turns as the list opens: an icon name, or an\n * explicit render.\n */\n expandIcon?: IconSource\n /**\n * Says that the options are being loaded: a spinner takes the chevron's place. The list still\n * opens.\n */\n loading?: boolean\n /** What the spinner is announced as. It falls back to the design system dictionary. */\n loadingText?: string\n /** Offers a cross that empties the selection. */\n clearable?: boolean\n /** What that cross does, in words. It falls back to the design system dictionary. */\n clearLabel?: string\n /** Where the list opens relative to the field. */\n placement?: SelectPlacement\n}\n\nconst props = withDefaults(defineProps<SelectProps>(), {\n multiple: false,\n display: 'chip',\n max: undefined,\n overflowText: undefined,\n label: undefined,\n hint: undefined,\n error: undefined,\n required: false,\n hideLabel: false,\n labelPosition: 'top',\n size: 'md',\n compact: false,\n placeholder: undefined,\n disabled: false,\n readonly: false,\n invalid: false,\n iconStart: undefined,\n iconStartLabel: undefined,\n expandIcon: () => expandMoreIcon,\n loading: false,\n loadingText: undefined,\n clearable: false,\n clearLabel: undefined,\n placement: 'bottom-start',\n})\n\nconst m = useMessages()\nconst resolvedClearLabel = computed(() => props.clearLabel ?? m.value.select.clear)\n\nconst emit = defineEmits<{\n /** The clear cross emptied the selection. */\n clear: []\n /** The start icon was clicked. Attaching this listener is what makes it a button. */\n 'click:icon-start': [event: MouseEvent]\n}>()\n\ndefineSlots<{\n /**\n * Content at the start of the field, rendered after the chips standing for the chosen\n * values rather than in their place.\n */\n start?(): unknown\n /**\n * Controls of your own inside the field, placed before the ones the field owns: the clear\n * cross and the chevron.\n */\n 'value-end'?(): unknown\n /** What a row of the list shows, in place of the plain label: a subtitle, an avatar, a badge. */\n option?(props: SelectOptionSlotProps): unknown\n /** Replaces the chip standing for one chosen value. */\n chip?(props: SelectChipSlotProps): unknown\n /** Replaces the \"+X\" standing for the values beyond `max`. */\n overflow?(props: SelectOverflowSlotProps): unknown\n}>()\n\nconst group = inject(inputGroupKey, null)\nconst {\n size: resolvedSize,\n compact: resolvedCompact,\n disabled: resolvedDisabled,\n} = useControlShape(props, group)\n\nconst chipScale = computed(() => chipScaleFor(resolvedSize.value, resolvedCompact.value))\n\n/** The chosen option's `value`, `''` while nothing is chosen, or the list of them when `multiple` is set. */\nconst model = defineModel<ItemValue | ItemValue[]>({ default: '' })\n\n// `class` and `style` stay on the wrapper; the form attributes go to the hidden `<select>`, which\n// is what a form reads; everything else goes down to the button, the element assistive\n// technology treats as the combobox.\ndefineOptions({ inheritAttrs: false })\nconst { rootClass, rootStyle, forwardedAttrs } = useRootAttrs()\n\nconst NATIVE_ONLY = ['name', 'form', 'autocomplete']\nconst split = computed(() => partitionAttrs(forwardedAttrs.value, NATIVE_ONLY))\nconst nativeAttrs = computed(() => split.value.picked)\n\n// Declared as this component's own event, `click:icon-start` is out of `$attrs`, so the\n// listener is relayed to the field by hand; and only when the consumer wrote one.\nconst iconStartClick = iconStartListener((event) => emit('click:icon-start', event))\nconst fieldAttrs = computed(() => ({ ...split.value.rest, ...iconStartClick }))\n\nconst rootEl = ref<HTMLElement | null>(null)\nconst triggerEl = ref<HTMLButtonElement | null>(null)\nconst nativeEl = ref<HTMLSelectElement | null>(null)\nconst panelRef = ref<InstanceType<typeof VListboxPanel> | null>(null)\nconst optionsId = useId()\n\nconst open = ref(false)\nconst focused = ref(false)\n\nconst selectedValues = computed(() => selectionOf(model.value, props.multiple))\n\nconst {\n allOptions,\n visible,\n optionOf,\n labelOf,\n remember,\n activeIndex,\n optionId,\n highlightFirst,\n highlightLast,\n highlightSelected,\n move,\n page,\n hover,\n blocks,\n measureRow,\n} = useListbox({\n items: () => props.options,\n selected: () => selectedValues.value,\n open: () => open.value,\n id: optionsId,\n panelEl: () => panelRef.value?.el ?? null,\n virtual: () => false,\n size: () => resolvedSize.value,\n compact: () => resolvedCompact.value,\n})\n\n// @a11y\n// What the button says, which assistive technology reads as the combobox's value: the chosen\n// label, or every chosen label when the chips beside it show them.\nconst valueText = computed(() => selectedValues.value.map(labelOf).join(', '))\n\nconst textDisplay = computed(() => props.multiple && props.display === 'text')\n\n// Folded, the values beyond `max` are summed up; under the focus, every value is there to be\n// seen and taken back.\nconst collapsed = computed(() => props.multiple && !focused.value && !open.value)\n\nconst clearVisible = computed(() =>\n canClear(props, resolvedDisabled.value, selectedValues.value.length > 0),\n)\n\n/** Whether the hidden `<select>` failed validation since the value last changed. */\nconst nativeInvalid = ref(false)\n\nfunction openPanel() {\n if (resolvedDisabled.value || props.readonly || open.value) return\n open.value = true\n highlightSelected()\n}\n\nfunction closePanel() {\n if (!open.value) return\n open.value = false\n activeIndex.value = -1\n}\n\nfunction togglePanel() {\n if (open.value) closePanel()\n else openPanel()\n}\n\nconst onFocusout = useFocusoutDismiss(rootEl, () => {\n focused.value = false\n closePanel()\n})\n\nfunction choose(option: SelectOption) {\n if (option.disabled || props.readonly || resolvedDisabled.value) return\n remember(option)\n if (props.multiple) {\n model.value = toggleValue(selectedValues.value, option.value)\n } else {\n // Choosing the option already chosen (Tab without moving, for one) changes nothing.\n if (model.value !== option.value) model.value = option.value\n closePanel()\n }\n}\n\nfunction chooseActive() {\n const option = visible.value[activeIndex.value]\n if (option) choose(option)\n}\n\nfunction removeValue(value: ItemValue) {\n if (!props.multiple || props.readonly || resolvedDisabled.value) return\n model.value = selectedValues.value.filter((v) => v !== value)\n // The cross disappears along with its chip, so the focus would fall back to the page.\n triggerEl.value?.focus()\n}\n\n/** The cross was pressed. It disappears with the selection, so the focus goes back to the button. */\nfunction onClear() {\n model.value = props.multiple ? [] : ''\n triggerEl.value?.focus()\n emit('clear')\n}\n\nconst normalizedOf = createNormalizedCache<SelectOption>()\nlet typed = ''\nconst typeTimer = useTimer()\n\n// @keyboard\n/*\n * Typing a label's first letters highlights it, as a native list does: the letters typed within\n * half a second add up to a prefix, and the same letter repeated cycles through the options it\n * starts.\n */\nfunction typeahead(key: string) {\n typed += normalizeText(key)\n typeTimer.start(() => (typed = ''), 500)\n const list = visible.value\n if (list.length === 0) return\n const cycling = [...typed].every((char) => char === typed[0])\n const needle = cycling ? typed[0]! : typed\n // A new prefix may match the highlighted option itself; a cycle moves on from it.\n const from = activeIndex.value + (typed.length === 1 || cycling ? 1 : 0)\n for (let step = 0; step < list.length; step++) {\n const index = (Math.max(from, 0) + step) % list.length\n const option = list[index]!\n if (!option.disabled && normalizedOf(option, option.label).startsWith(needle)) {\n activeIndex.value = index\n return\n }\n }\n}\n\nconst printable = (event: KeyboardEvent) =>\n event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey\n\n// @keyboard\n// The keys of the select-only combobox pattern. Enter and Space are consumed on the closed button\n// too, so the click they would synthesise does not toggle the list a second time.\nfunction onKeydown(event: KeyboardEvent) {\n if (!open.value) {\n switch (event.key) {\n case 'ArrowDown':\n case 'ArrowUp':\n case 'Enter':\n case ' ':\n event.preventDefault()\n openPanel()\n return\n case 'Home':\n event.preventDefault()\n openPanel()\n if (open.value) highlightFirst()\n return\n case 'End':\n event.preventDefault()\n openPanel()\n if (open.value) highlightLast()\n return\n }\n if (printable(event)) {\n openPanel()\n if (open.value) typeahead(event.key)\n }\n return\n }\n\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault()\n move(1)\n break\n case 'ArrowUp':\n event.preventDefault()\n if (event.altKey) {\n chooseActive()\n closePanel()\n } else move(-1)\n break\n case 'Home':\n event.preventDefault()\n highlightFirst()\n break\n case 'End':\n event.preventDefault()\n highlightLast()\n break\n case 'PageDown':\n event.preventDefault()\n page(10)\n break\n case 'PageUp':\n event.preventDefault()\n page(-10)\n break\n case ' ':\n event.preventDefault()\n // While letters are being typed, a space belongs to the prefix: \"New York\".\n if (typed) typeahead(' ')\n else chooseActive()\n break\n case 'Enter':\n event.preventDefault()\n chooseActive()\n break\n case 'Escape':\n // Consumed only when it closes the list, so a surrounding VDialog stays open.\n event.preventDefault()\n closePanel()\n break\n case 'Tab':\n // Leaving a single list takes the highlighted option, as the pattern prescribes.\n if (!props.multiple) chooseActive()\n closePanel()\n break\n default:\n if (printable(event)) typeahead(event.key)\n }\n}\n\nconst interactive = 'a, button, input, select, textarea, [tabindex]'\n\n// @core\n/*\n * The rest of the field is not focusable, so pressing it would hand the focus to the page: the\n * root's `focusout` then closes the list, and the click that follows reopens it.\n */\nfunction onControlMousedown(event: MouseEvent) {\n const target = event.target as Element\n if (target.closest('.v-input-field') && !target.closest(interactive)) event.preventDefault()\n}\n\n/**\n * A click anywhere in the box of the field toggles the list, as one on the button does. The\n * field's own controls keep their clicks, and the label's reaches the button by itself.\n */\nfunction onControlClick(event: MouseEvent) {\n const target = event.target as Element\n if (resolvedDisabled.value || !target.closest('.v-input-field') || target.closest(interactive))\n return\n triggerEl.value?.focus()\n togglePanel()\n}\n\n/*\n * The hidden `<select>` is written by hand rather than through `selected` bindings: a form reset\n * changes it behind the virtual DOM's back, which would then consider unchanged options already\n * in the right state.\n */\nfunction syncNative() {\n const el = nativeEl.value\n if (!el) return\n for (const option of el.options) {\n option.selected = option.value !== '' && wantedValues.value.has(option.value)\n }\n if (!props.multiple && selectedValues.value.length === 0) el.value = ''\n}\n\nconst wantedValues = computed(() => new Set(selectedValues.value.map(String)))\n\nwatch([selectedValues, allOptions], syncNative, { flush: 'post' })\n\n// A choice that satisfies the constraint clears the error the last submission raised; one that\n// does not raises it again, `checkValidity` firing `invalid`.\nwatch(\n selectedValues,\n () => {\n if (nativeInvalid.value) nativeInvalid.value = !nativeEl.value?.checkValidity()\n },\n { flush: 'post' },\n)\n\n/** Autofill writes the hidden `<select>`; the strings it holds are read back as option values. */\nfunction onNativeChange() {\n const el = nativeEl.value\n if (!el) return\n const values = [...el.selectedOptions]\n .map((native) => allOptions.value.find((option) => String(option.value) === native.value))\n .filter((option): option is SelectOption => option !== undefined)\n .map((option) => option.value)\n model.value = props.multiple ? values : (values[0] ?? '')\n}\n\n// @core\n// A form reset restores the value the field was created with. The browser resets the hidden\n// `<select>` after the event, so it is rewritten on the next task.\nlet initial: ItemValue | ItemValue[] = ''\nlet formEl: HTMLFormElement | null = null\n\nfunction onFormReset() {\n model.value = Array.isArray(initial) ? [...initial] : initial\n nativeInvalid.value = false\n setTimeout(syncNative)\n}\n\nonMounted(() => {\n initial = Array.isArray(model.value) ? [...model.value] : model.value\n syncNative()\n formEl = nativeEl.value?.form ?? null\n formEl?.addEventListener('reset', onFormReset)\n})\n\nonBeforeUnmount(() => formEl?.removeEventListener('reset', onFormReset))\n\ndefineExpose({\n /** Moves the focus to the field. */\n focus: (options?: FocusOptions) => triggerEl.value?.focus(options),\n /** The button that acts as the combobox. */\n el: triggerEl,\n})\n</script>\n\n<template>\n <div\n ref=\"rootEl\"\n class=\"v-select\"\n :class=\"rootClass\"\n :style=\"[{ '--chip-height': chipScale.height }, rootStyle]\"\n :data-size=\"resolvedSize\"\n :data-multiple=\"multiple ? '' : undefined\"\n :data-open=\"open ? '' : undefined\"\n @focusin=\"focused = true\"\n @focusout=\"onFocusout\"\n >\n <div class=\"v-select-control\" @mousedown=\"onControlMousedown\" @click=\"onControlClick\">\n <VInput\n class=\"v-input-end-pinned\"\n :class=\"{ 'v-input-chips': multiple && !textDisplay }\"\n v-bind=\"fieldAttrs\"\n :label=\"label\"\n :hint=\"hint\"\n :error=\"error\"\n :required=\"required\"\n :hide-label=\"hideLabel\"\n :label-position=\"labelPosition\"\n :size=\"resolvedSize\"\n :compact=\"resolvedCompact\"\n :invalid=\"invalid || nativeInvalid\"\n :disabled=\"resolvedDisabled\"\n :readonly=\"readonly\"\n :icon-start=\"iconStart\"\n :icon-start-label=\"iconStartLabel\"\n :clearable=\"clearable\"\n :clear-visible=\"clearVisible\"\n :clear-label=\"resolvedClearLabel\"\n @clear=\"onClear\"\n >\n <template v-if=\"multiple || $slots.start\" #start>\n <VListboxValues\n v-if=\"multiple\"\n :values=\"selectedValues\"\n :display=\"display\"\n :max=\"max\"\n :collapsed=\"collapsed\"\n :overflow-text=\"overflowText\"\n :scale=\"chipScale\"\n :removable=\"!readonly\"\n :disabled=\"resolvedDisabled\"\n hide-text\n :label-of=\"labelOf\"\n :option-of=\"optionOf\"\n @remove=\"removeValue\"\n >\n <template v-if=\"$slots.chip\" #chip=\"chipProps\">\n <slot name=\"chip\" v-bind=\"chipProps\" />\n </template>\n <template v-if=\"$slots.overflow\" #overflow=\"overflowProps\">\n <slot name=\"overflow\" v-bind=\"overflowProps\" />\n </template>\n </VListboxValues>\n <slot name=\"start\" />\n </template>\n\n <template #control=\"{ controlProps }\">\n <button\n ref=\"triggerEl\"\n type=\"button\"\n role=\"combobox\"\n :aria-expanded=\"open\"\n :aria-controls=\"optionsId\"\n :aria-activedescendant=\"open && activeIndex >= 0 ? optionId(activeIndex) : undefined\"\n :aria-required=\"required || undefined\"\n :aria-readonly=\"readonly || undefined\"\n v-bind=\"controlProps\"\n class=\"v-select-trigger\"\n @click=\"togglePanel\"\n @keydown=\"onKeydown\"\n >\n <span\n v-if=\"valueText\"\n class=\"v-select-value\"\n :class=\"{ 'v-visually-hidden': multiple }\"\n >{{ valueText }}</span\n >\n <span v-else-if=\"placeholder\" class=\"v-select-placeholder\">{{ placeholder }}</span>\n </button>\n <!--\n Out of the tab order and hidden from screen readers, it leaves the button as the\n single stop and the single announcement. Its options mirror the flat list: a form\n needs no groups.\n -->\n <select\n ref=\"nativeEl\"\n v-bind=\"nativeAttrs\"\n class=\"v-select-native v-hidden-input\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n :multiple=\"multiple || undefined\"\n :required=\"required || undefined\"\n :disabled=\"resolvedDisabled || undefined\"\n @change=\"onNativeChange\"\n @focus=\"triggerEl?.focus()\"\n @invalid=\"nativeInvalid = true\"\n >\n <option v-if=\"!multiple\" value=\"\" />\n <option\n v-for=\"(option, index) in allOptions\"\n :key=\"index\"\n :value=\"String(option.value)\"\n :disabled=\"option.disabled\"\n >\n {{ option.label }}\n </option>\n </select>\n </template>\n\n <template v-if=\"$slots['value-end']\" #value-end><slot name=\"value-end\" /></template>\n\n <!-- The spinner takes the chevron's place: the field sizes either as an icon. -->\n <template #end>\n <VSpinner v-if=\"loading\" class=\"v-select-spinner v-input-icon-end\" :label=\"loadingText\" />\n <VListboxChevron v-else :icon=\"expandIcon\" :open=\"open\" />\n </template>\n </VInput>\n </div>\n\n <VListboxPanel\n :id=\"optionsId\"\n ref=\"panelRef\"\n v-model:open=\"open\"\n anchor=\"--select-anchor\"\n :placement=\"placement\"\n class=\"v-select-panel\"\n :size=\"resolvedSize\"\n :compact=\"resolvedCompact\"\n :multiple=\"multiple\"\n :blocks=\"blocks\"\n :measure=\"measureRow\"\n @select=\"choose\"\n @highlight=\"hover\"\n >\n <template v-if=\"$slots.option\" #option=\"slotProps\">\n <slot name=\"option\" v-bind=\"slotProps\" />\n </template>\n </VListboxPanel>\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n .v-select {\n /*\n * Declared on the root, the common ancestor of the field and the panel; a panel drawn above\n * the page remains a descendant of it in the document.\n */\n anchor-scope: --select-anchor;\n width: 100%;\n font-family: var(--vectis-text-family);\n }\n\n .v-select-control {\n display: block;\n }\n\n /* The panel opens against the box of the field, not against its label and hint. */\n .v-select-control .v-input-field {\n anchor-name: --select-anchor;\n }\n\n .v-select-panel {\n max-block-size: var(--vectis-control-size-select-list-max-block);\n }\n\n /*\n * VInput's `.v-input-control` gives the button the input's box: it fills the field and draws\n * no border of its own, the field drawing the focus around it.\n */\n .v-select-trigger {\n display: flex;\n align-items: center;\n text-align: start;\n cursor: pointer;\n }\n\n /*\n * Beside chips the button takes what is left of the last row, down to nothing, rather than\n * wrapping onto a row of its own.\n */\n .v-select[data-multiple] .v-select-trigger {\n flex: 1 1 0;\n }\n\n .v-select-value,\n .v-select-placeholder {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .v-select-placeholder {\n color: var(--vectis-color-text-subtle);\n }\n\n .v-select-spinner {\n color: var(--vectis-color-text-muted);\n }\n\n /*\n * An unbroken line has the whole of its text as its min-content width; without this, a grid\n * track or a flex row sized `auto` widens to fit every label and the ellipsis never shows.\n */\n .v-select:has(.v-listbox-text) {\n min-inline-size: 0;\n }\n}\n</style>\n"],"mappings":""}