vectis-ui 0.14.0 → 0.16.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 (442) hide show
  1. package/dist/components/VAccordion/VAccordion.css +1 -1
  2. package/dist/components/VAccordion/VAccordion.d.ts +0 -6
  3. package/dist/components/VAccordion/VAccordion.js.map +1 -1
  4. package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js +3 -8
  5. package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
  6. package/dist/components/VAccordion/VAccordionItem.js.map +1 -1
  7. package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  8. package/dist/components/VAccordion/context.js.map +1 -1
  9. package/dist/components/VAlert/VAlert.js.map +1 -1
  10. package/dist/components/VAlert/VAlert.vue_vue_type_script_setup_true_lang.js.map +1 -1
  11. package/dist/components/VAvatar/VAvatar.d.ts +0 -3
  12. package/dist/components/VAvatar/VAvatar.js.map +1 -1
  13. package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js +21 -27
  14. package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  15. package/dist/components/VAvatar/VAvatarGroup.d.ts +0 -6
  16. package/dist/components/VAvatar/VAvatarGroup.js.map +1 -1
  17. package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js +5 -19
  18. package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  19. package/dist/components/VAvatar/context.d.ts +0 -1
  20. package/dist/components/VAvatar/context.js.map +1 -1
  21. package/dist/components/VBadge/VBadge.js.map +1 -1
  22. package/dist/components/VBadge/VBadge.vue_vue_type_script_setup_true_lang.js +1 -1
  23. package/dist/components/VBadge/VBadge.vue_vue_type_script_setup_true_lang.js.map +1 -1
  24. package/dist/components/VBreadcrumb/VBreadcrumb.js.map +1 -1
  25. package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js.map +1 -1
  26. package/dist/components/VButton/VButton.d.ts +0 -6
  27. package/dist/components/VButton/VButton.js.map +1 -1
  28. package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js +11 -17
  29. package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  30. package/dist/components/VButton/VButtonGroup.d.ts +0 -6
  31. package/dist/components/VButton/VButtonGroup.js.map +1 -1
  32. package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js +0 -7
  33. package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  34. package/dist/components/VButton/context.d.ts +0 -2
  35. package/dist/components/VButton/context.js.map +1 -1
  36. package/dist/components/VCalendar/VCalendar.js.map +1 -1
  37. package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  38. package/dist/components/VCalendar/VCalendarEvent.js.map +1 -1
  39. package/dist/components/VCalendar/VCalendarEvent.vue_vue_type_script_setup_true_lang.js.map +1 -1
  40. package/dist/components/VCalendar/VCalendarMonth.js.map +1 -1
  41. package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js +5 -17
  42. package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js.map +1 -1
  43. package/dist/components/VCalendar/VCalendarTimeGrid.js.map +1 -1
  44. package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js +19 -31
  45. package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js.map +1 -1
  46. package/dist/components/VCalendar/VCalendarYear.js.map +1 -1
  47. package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js.map +1 -1
  48. package/dist/components/VCalendar/color.js.map +1 -1
  49. package/dist/components/VCalendar/edgeStep.js +1 -5
  50. package/dist/components/VCalendar/edgeStep.js.map +1 -1
  51. package/dist/components/VCalendar/gesture.js +4 -12
  52. package/dist/components/VCalendar/gesture.js.map +1 -1
  53. package/dist/components/VCalendar/keyboard.js.map +1 -1
  54. package/dist/components/VCalendar/layout.js +8 -12
  55. package/dist/components/VCalendar/layout.js.map +1 -1
  56. package/dist/components/VCalendar/timeGrid.js +5 -5
  57. package/dist/components/VCalendar/timeGrid.js.map +1 -1
  58. package/dist/components/VCard/VCard.js.map +1 -1
  59. package/dist/components/VCard/VCard.vue_vue_type_script_setup_true_lang.js.map +1 -1
  60. package/dist/components/VCarousel/VCarousel.js.map +1 -1
  61. package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  62. package/dist/components/VCarousel/VCarouselItem.js.map +1 -1
  63. package/dist/components/VCarousel/VCarouselItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  64. package/dist/components/VCarousel/context.js.map +1 -1
  65. package/dist/components/VCheckbox/VCheckMark.js.map +1 -1
  66. package/dist/components/VCheckbox/VCheckMark.vue_vue_type_script_setup_true_lang.js.map +1 -1
  67. package/dist/components/VCheckbox/VCheckbox.js.map +1 -1
  68. package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  69. package/dist/components/VChip/VChip.d.ts +0 -3
  70. package/dist/components/VChip/VChip.js.map +1 -1
  71. package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js +0 -6
  72. package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  73. package/dist/components/VColorInput/VColorInput.d.ts +0 -3
  74. package/dist/components/VColorInput/VColorInput.js.map +1 -1
  75. package/dist/components/VColorInput/VColorInput.vue_vue_type_script_setup_true_lang.js +3 -9
  76. package/dist/components/VColorInput/VColorInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  77. package/dist/components/VColorPicker/VColorPicker.js.map +1 -1
  78. package/dist/components/VColorPicker/VColorPicker.vue_vue_type_script_setup_true_lang.js +1 -5
  79. package/dist/components/VColorPicker/VColorPicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  80. package/dist/components/VColorPicker/color.js.map +1 -1
  81. package/dist/components/VCombobox/VCombobox.d.ts +0 -3
  82. package/dist/components/VCombobox/VCombobox.js.map +1 -1
  83. package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js +100 -119
  84. package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  85. package/dist/components/VCommandPalette/VCommandPalette.js.map +1 -1
  86. package/dist/components/VCommandPalette/VCommandPalette.vue_vue_type_script_setup_true_lang.js +0 -1
  87. package/dist/components/VCommandPalette/VCommandPalette.vue_vue_type_script_setup_true_lang.js.map +1 -1
  88. package/dist/components/VCommandPalette/VCommandPaletteItem.js.map +1 -1
  89. package/dist/components/VCommandPalette/VCommandPaletteItem.vue_vue_type_script_setup_true_lang.js +1 -5
  90. package/dist/components/VCommandPalette/VCommandPaletteItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  91. package/dist/components/VContextMenu/VContextMenu.d.ts +0 -3
  92. package/dist/components/VContextMenu/VContextMenu.js.map +1 -1
  93. package/dist/components/VContextMenu/VContextMenu.vue_vue_type_script_setup_true_lang.js +3 -11
  94. package/dist/components/VContextMenu/VContextMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  95. package/dist/components/VDataTable/VDataTable.css +1 -1
  96. package/dist/components/VDataTable/VDataTable.d.ts +0 -2
  97. package/dist/components/VDataTable/VDataTable.js.map +1 -1
  98. package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js +69 -88
  99. package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  100. package/dist/components/VDateInput/VDateInput.d.ts +0 -3
  101. package/dist/components/VDateInput/VDateInput.js.map +1 -1
  102. package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js +5 -10
  103. package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  104. package/dist/components/VDateInput/mask.js.map +1 -1
  105. package/dist/components/VDatePicker/VDatePicker.js.map +1 -1
  106. package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js +2 -1
  107. package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  108. package/dist/components/VDatePicker/keyboard.js.map +1 -1
  109. package/dist/components/VDatePicker/names.js.map +1 -1
  110. package/dist/components/VDialog/VDialog.js.map +1 -1
  111. package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  112. package/dist/components/VDialog/VDialogAlert.js.map +1 -1
  113. package/dist/components/VDialog/VDialogAlert.vue_vue_type_script_setup_true_lang.js.map +1 -1
  114. package/dist/components/VDrawer/VDrawer.js.map +1 -1
  115. package/dist/components/VDrawer/VDrawer.vue_vue_type_script_setup_true_lang.js.map +1 -1
  116. package/dist/components/VEmptyState/VEmptyState.js.map +1 -1
  117. package/dist/components/VEmptyState/VEmptyState.vue_vue_type_script_setup_true_lang.js.map +1 -1
  118. package/dist/components/VField/VField.js.map +1 -1
  119. package/dist/components/VField/VField.vue_vue_type_script_setup_true_lang.js.map +1 -1
  120. package/dist/components/VField/VFieldAnnouncer.js.map +1 -1
  121. package/dist/components/VField/VFieldAnnouncer.vue_vue_type_script_setup_true_lang.js.map +1 -1
  122. package/dist/components/VField/VFieldMessage.js.map +1 -1
  123. package/dist/components/VField/VFieldMessage.vue_vue_type_script_setup_true_lang.js.map +1 -1
  124. package/dist/components/VFieldset/VFieldset.js.map +1 -1
  125. package/dist/components/VFieldset/VFieldset.vue_vue_type_script_setup_true_lang.js.map +1 -1
  126. package/dist/components/VFileInput/VFileInput.d.ts +0 -5
  127. package/dist/components/VFileInput/VFileInput.js.map +1 -1
  128. package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js +54 -65
  129. package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  130. package/dist/components/VFileInput/truncate.js.map +1 -1
  131. package/dist/components/VFilePicker/VFilePicker.js.map +1 -1
  132. package/dist/components/VFilePicker/VFilePicker.vue_vue_type_script_setup_true_lang.js +1 -1
  133. package/dist/components/VFilePicker/VFilePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  134. package/dist/components/VFilePicker/fileKind.js.map +1 -1
  135. package/dist/components/VHotkeys/VHotkeys.d.ts +0 -3
  136. package/dist/components/VHotkeys/VHotkeys.js.map +1 -1
  137. package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js +0 -6
  138. package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js.map +1 -1
  139. package/dist/components/VHotkeys/platform.js +1 -1
  140. package/dist/components/VHotkeys/platform.js.map +1 -1
  141. package/dist/components/VHoverCard/VHoverCard.js.map +1 -1
  142. package/dist/components/VHoverCard/VHoverCard.vue_vue_type_script_setup_true_lang.js +2 -12
  143. package/dist/components/VHoverCard/VHoverCard.vue_vue_type_script_setup_true_lang.js.map +1 -1
  144. package/dist/components/VIcon/VIcon.js.map +1 -1
  145. package/dist/components/VIcon/VIcon.vue_vue_type_script_setup_true_lang.js.map +1 -1
  146. package/dist/components/VIcon/iconProps.js.map +1 -1
  147. package/dist/components/VIcon/icons/add.js.map +1 -1
  148. package/dist/components/VIcon/icons/arrow_downward.js.map +1 -1
  149. package/dist/components/VIcon/icons/arrow_downward_alt.js.map +1 -1
  150. package/dist/components/VIcon/icons/arrow_drop_down.js.map +1 -1
  151. package/dist/components/VIcon/icons/arrow_drop_up.js.map +1 -1
  152. package/dist/components/VIcon/icons/arrow_left_alt.js.map +1 -1
  153. package/dist/components/VIcon/icons/arrow_right_alt.js.map +1 -1
  154. package/dist/components/VIcon/icons/arrow_upward.js.map +1 -1
  155. package/dist/components/VIcon/icons/arrow_upward_alt.js.map +1 -1
  156. package/dist/components/VIcon/icons/attach_file.js.map +1 -1
  157. package/dist/components/VIcon/icons/audio_file.js.map +1 -1
  158. package/dist/components/VIcon/icons/calendar_today.js.map +1 -1
  159. package/dist/components/VIcon/icons/check.js.map +1 -1
  160. package/dist/components/VIcon/icons/check_circle.js.map +1 -1
  161. package/dist/components/VIcon/icons/chevron_left.js.map +1 -1
  162. package/dist/components/VIcon/icons/chevron_right.js.map +1 -1
  163. package/dist/components/VIcon/icons/close.js.map +1 -1
  164. package/dist/components/VIcon/icons/cloud_upload.js.map +1 -1
  165. package/dist/components/VIcon/icons/code.js.map +1 -1
  166. package/dist/components/VIcon/icons/colorize.js.map +1 -1
  167. package/dist/components/VIcon/icons/description.js.map +1 -1
  168. package/dist/components/VIcon/icons/error.js.map +1 -1
  169. package/dist/components/VIcon/icons/expand_less.js.map +1 -1
  170. package/dist/components/VIcon/icons/expand_more.js.map +1 -1
  171. package/dist/components/VIcon/icons/first_page.js.map +1 -1
  172. package/dist/components/VIcon/icons/folder_zip.js.map +1 -1
  173. package/dist/components/VIcon/icons/image.js.map +1 -1
  174. package/dist/components/VIcon/icons/inbox.js.map +1 -1
  175. package/dist/components/VIcon/icons/index.js.map +1 -1
  176. package/dist/components/VIcon/icons/info.js.map +1 -1
  177. package/dist/components/VIcon/icons/last_page.js.map +1 -1
  178. package/dist/components/VIcon/icons/more_horiz.js.map +1 -1
  179. package/dist/components/VIcon/icons/names.js.map +1 -1
  180. package/dist/components/VIcon/icons/notifications.js.map +1 -1
  181. package/dist/components/VIcon/icons/open_in_new.js.map +1 -1
  182. package/dist/components/VIcon/icons/picture_as_pdf.js.map +1 -1
  183. package/dist/components/VIcon/icons/priority_high.js.map +1 -1
  184. package/dist/components/VIcon/icons/remove.js.map +1 -1
  185. package/dist/components/VIcon/icons/schedule.js.map +1 -1
  186. package/dist/components/VIcon/icons/search.js.map +1 -1
  187. package/dist/components/VIcon/icons/search_off.js.map +1 -1
  188. package/dist/components/VIcon/icons/star.js.map +1 -1
  189. package/dist/components/VIcon/icons/swap_vert.js.map +1 -1
  190. package/dist/components/VIcon/icons/table_chart.js.map +1 -1
  191. package/dist/components/VIcon/icons/video_file.js.map +1 -1
  192. package/dist/components/VIcon/icons/viewBox.js.map +1 -1
  193. package/dist/components/VIcon/icons/warning.js.map +1 -1
  194. package/dist/components/VIcon/resolver.js.map +1 -1
  195. package/dist/components/VIconButton/VIconButton.d.ts +0 -3
  196. package/dist/components/VIconButton/VIconButton.js.map +1 -1
  197. package/dist/components/VIconButton/VIconButton.vue_vue_type_script_setup_true_lang.js +0 -6
  198. package/dist/components/VIconButton/VIconButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  199. package/dist/components/VInput/VInput.css +1 -1
  200. package/dist/components/VInput/VInput.d.ts +0 -3
  201. package/dist/components/VInput/VInput.js.map +1 -1
  202. package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js +2 -8
  203. package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  204. package/dist/components/VInput/VInputGroup.d.ts +0 -3
  205. package/dist/components/VInput/VInputGroup.js.map +1 -1
  206. package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js +0 -7
  207. package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  208. package/dist/components/VInput/context.d.ts +0 -2
  209. package/dist/components/VInput/context.js.map +1 -1
  210. package/dist/components/VInputOTP/VInputOTP.d.ts +0 -3
  211. package/dist/components/VInputOTP/VInputOTP.js.map +1 -1
  212. package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js +2 -14
  213. package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js.map +1 -1
  214. package/dist/components/VLink/VLink.js.map +1 -1
  215. package/dist/components/VLink/VLink.vue_vue_type_script_setup_true_lang.js.map +1 -1
  216. package/dist/components/VListbox/VListboxChevron.js.map +1 -1
  217. package/dist/components/VListbox/VListboxChevron.vue_vue_type_script_setup_true_lang.js.map +1 -1
  218. package/dist/components/VListbox/VListboxGroup.js.map +1 -1
  219. package/dist/components/VListbox/VListboxGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  220. package/dist/components/VListbox/VListboxOption.js.map +1 -1
  221. package/dist/components/VListbox/VListboxOption.vue_vue_type_script_setup_true_lang.js.map +1 -1
  222. package/dist/components/VListbox/VListboxPanel.d.ts +0 -3
  223. package/dist/components/VListbox/VListboxPanel.js.map +1 -1
  224. package/dist/components/VListbox/VListboxPanel.vue_vue_type_script_setup_true_lang.js +0 -6
  225. package/dist/components/VListbox/VListboxPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  226. package/dist/components/VListbox/VListboxSeparator.js.map +1 -1
  227. package/dist/components/VListbox/VListboxSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
  228. package/dist/components/VListbox/VListboxValues.js.map +1 -1
  229. package/dist/components/VListbox/VListboxValues.vue_vue_type_script_setup_true_lang.js +4 -14
  230. package/dist/components/VListbox/VListboxValues.vue_vue_type_script_setup_true_lang.js.map +1 -1
  231. package/dist/components/VMenu/VMenu.d.ts +0 -3
  232. package/dist/components/VMenu/VMenu.js.map +1 -1
  233. package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js +0 -6
  234. package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  235. package/dist/components/VMenu/VMenuGroup.js.map +1 -1
  236. package/dist/components/VMenu/VMenuGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  237. package/dist/components/VMenu/VMenuItem.js.map +1 -1
  238. package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js +6 -12
  239. package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  240. package/dist/components/VMenu/VMenuPanel.d.ts +0 -3
  241. package/dist/components/VMenu/VMenuPanel.js.map +1 -1
  242. package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js +9 -16
  243. package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  244. package/dist/components/VMenu/VMenuSeparator.js.map +1 -1
  245. package/dist/components/VMenu/VMenuSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
  246. package/dist/components/VMenu/context.js.map +1 -1
  247. package/dist/components/VMeter/VMeter.js.map +1 -1
  248. package/dist/components/VMeter/VMeter.vue_vue_type_script_setup_true_lang.js.map +1 -1
  249. package/dist/components/VNumberInput/VNumberInput.d.ts +0 -3
  250. package/dist/components/VNumberInput/VNumberInput.js.map +1 -1
  251. package/dist/components/VNumberInput/VNumberInput.vue_vue_type_script_setup_true_lang.js +85 -90
  252. package/dist/components/VNumberInput/VNumberInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  253. package/dist/components/VNumberInput/number.js.map +1 -1
  254. package/dist/components/VPagination/VPagination.d.ts +0 -3
  255. package/dist/components/VPagination/VPagination.js.map +1 -1
  256. package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js +0 -6
  257. package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
  258. package/dist/components/VPopover/VPopover.js.map +1 -1
  259. package/dist/components/VPopover/VPopover.vue_vue_type_script_setup_true_lang.js.map +1 -1
  260. package/dist/components/VProgressCircular/VProgressCircular.js.map +1 -1
  261. package/dist/components/VProgressCircular/VProgressCircular.vue_vue_type_script_setup_true_lang.js.map +1 -1
  262. package/dist/components/VProgressLinear/VProgressLinear.js.map +1 -1
  263. package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js.map +1 -1
  264. package/dist/components/VRadio/VRadio.js.map +1 -1
  265. package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js.map +1 -1
  266. package/dist/components/VRating/VRating.js.map +1 -1
  267. package/dist/components/VRating/VRating.vue_vue_type_script_setup_true_lang.js.map +1 -1
  268. package/dist/components/VResizable/VResizable.js.map +1 -1
  269. package/dist/components/VResizable/VResizable.vue_vue_type_script_setup_true_lang.js +8 -6
  270. package/dist/components/VResizable/VResizable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  271. package/dist/components/VResizable/VResizablePanel.js.map +1 -1
  272. package/dist/components/VResizable/VResizablePanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  273. package/dist/components/VResizable/context.js.map +1 -1
  274. package/dist/components/VResizable/layout.js.map +1 -1
  275. package/dist/components/VSelect/VSelect.d.ts +0 -3
  276. package/dist/components/VSelect/VSelect.js.map +1 -1
  277. package/dist/components/VSelect/VSelect.vue_vue_type_script_setup_true_lang.js +80 -90
  278. package/dist/components/VSelect/VSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  279. package/dist/components/VSeparator/VSeparator.js.map +1 -1
  280. package/dist/components/VSeparator/VSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
  281. package/dist/components/VSideNavigation/VSideNavigation.d.ts +0 -6
  282. package/dist/components/VSideNavigation/VSideNavigation.js.map +1 -1
  283. package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js +2 -11
  284. package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js.map +1 -1
  285. package/dist/components/VSideNavigation/VSideNavigationGroup.js.map +1 -1
  286. package/dist/components/VSideNavigation/VSideNavigationGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  287. package/dist/components/VSideNavigation/VSideNavigationItem.js.map +1 -1
  288. package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js +1 -5
  289. package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  290. package/dist/components/VSideNavigation/VSideNavigationSeparator.js.map +1 -1
  291. package/dist/components/VSideNavigation/context.js.map +1 -1
  292. package/dist/components/VSkeletonLoader/VSkeletonLoader.d.ts +0 -3
  293. package/dist/components/VSkeletonLoader/VSkeletonLoader.js.map +1 -1
  294. package/dist/components/VSkeletonLoader/VSkeletonLoader.vue_vue_type_script_setup_true_lang.js +0 -6
  295. package/dist/components/VSkeletonLoader/VSkeletonLoader.vue_vue_type_script_setup_true_lang.js.map +1 -1
  296. package/dist/components/VSlider/VSlider.js.map +1 -1
  297. package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js +107 -112
  298. package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js.map +1 -1
  299. package/dist/components/VSnackbar/VSnackbar.js.map +1 -1
  300. package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  301. package/dist/components/VSnackbar/state.js.map +1 -1
  302. package/dist/components/VSpinner/VSpinner.js.map +1 -1
  303. package/dist/components/VSpinner/VSpinner.vue_vue_type_script_setup_true_lang.js.map +1 -1
  304. package/dist/components/VSplitButton/VSplitButton.d.ts +0 -3
  305. package/dist/components/VSplitButton/VSplitButton.js.map +1 -1
  306. package/dist/components/VSplitButton/VSplitButton.vue_vue_type_script_setup_true_lang.js +0 -6
  307. package/dist/components/VSplitButton/VSplitButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  308. package/dist/components/VStepper/VStepper.js.map +1 -1
  309. package/dist/components/VStepper/VStepper.vue_vue_type_script_setup_true_lang.js.map +1 -1
  310. package/dist/components/VSwitch/VSwitch.js.map +1 -1
  311. package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js.map +1 -1
  312. package/dist/components/VTabs/VTab.js.map +1 -1
  313. package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js +0 -2
  314. package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js.map +1 -1
  315. package/dist/components/VTabs/VTabPanel.js.map +1 -1
  316. package/dist/components/VTabs/VTabPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  317. package/dist/components/VTabs/VTabs.css +1 -1
  318. package/dist/components/VTabs/VTabs.d.ts +0 -3
  319. package/dist/components/VTabs/VTabs.js.map +1 -1
  320. package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js +2 -15
  321. package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
  322. package/dist/components/VTabs/context.d.ts +0 -2
  323. package/dist/components/VTabs/context.js.map +1 -1
  324. package/dist/components/VTextarea/VTextarea.d.ts +0 -6
  325. package/dist/components/VTextarea/VTextarea.js.map +1 -1
  326. package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js +0 -6
  327. package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js.map +1 -1
  328. package/dist/components/VTimeInput/VTimeInput.d.ts +0 -3
  329. package/dist/components/VTimeInput/VTimeInput.js.map +1 -1
  330. package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js +197 -204
  331. package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  332. package/dist/components/VTimeInput/search.js.map +1 -1
  333. package/dist/components/VTimePicker/VTimePicker.js.map +1 -1
  334. package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js +9 -9
  335. package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  336. package/dist/components/VTimePicker/limits.js.map +1 -1
  337. package/dist/components/VTimeline/VTimeline.js.map +1 -1
  338. package/dist/components/VTimeline/VTimeline.vue_vue_type_script_setup_true_lang.js.map +1 -1
  339. package/dist/components/VTimeline/VTimelineItem.js.map +1 -1
  340. package/dist/components/VTimeline/VTimelineItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  341. package/dist/components/VTimeline/context.js.map +1 -1
  342. package/dist/components/VTimeline/datetime.js.map +1 -1
  343. package/dist/components/VToast/VToast.js.map +1 -1
  344. package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js.map +1 -1
  345. package/dist/components/VToast/VToaster.js.map +1 -1
  346. package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js +1 -1
  347. package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js.map +1 -1
  348. package/dist/components/VToast/state.js.map +1 -1
  349. package/dist/components/VToggle/VToggle.d.ts +0 -3
  350. package/dist/components/VToggle/VToggle.js.map +1 -1
  351. package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js +1 -13
  352. package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js.map +1 -1
  353. package/dist/components/VToggle/VToggleItem.js.map +1 -1
  354. package/dist/components/VToggle/VToggleItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  355. package/dist/components/VToggle/context.js.map +1 -1
  356. package/dist/components/VTooltip/VTooltip.js.map +1 -1
  357. package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  358. package/dist/components/VTreeView/VTreeView.js.map +1 -1
  359. package/dist/components/VTreeView/VTreeView.vue_vue_type_script_setup_true_lang.js +1 -5
  360. package/dist/components/VTreeView/VTreeView.vue_vue_type_script_setup_true_lang.js.map +1 -1
  361. package/dist/components/VTypography/VTypography.js.map +1 -1
  362. package/dist/components/VTypography/VTypography.vue_vue_type_script_setup_true_lang.js.map +1 -1
  363. package/dist/components/VVirtualList/VVirtualList.js.map +1 -1
  364. package/dist/components/VVirtualList/VVirtualList.vue_vue_type_script_setup_true_lang.js.map +1 -1
  365. package/dist/composables/useAriaLabel.js.map +1 -1
  366. package/dist/composables/useChoice.js.map +1 -1
  367. package/dist/composables/useClearable.js.map +1 -1
  368. package/dist/composables/useControlShape.d.ts +1 -5
  369. package/dist/composables/useControlShape.js +0 -1
  370. package/dist/composables/useControlShape.js.map +1 -1
  371. package/dist/composables/useDebouncedSearch.js.map +1 -1
  372. package/dist/composables/useDetailsOpen.js.map +1 -1
  373. package/dist/composables/useEscapeDismiss.js.map +1 -1
  374. package/dist/composables/useFieldIds.js.map +1 -1
  375. package/dist/composables/useFieldPanel.js +3 -7
  376. package/dist/composables/useFieldPanel.js.map +1 -1
  377. package/dist/composables/useFileDrop.js.map +1 -1
  378. package/dist/composables/useFileField.js +2 -2
  379. package/dist/composables/useFileField.js.map +1 -1
  380. package/dist/composables/useFocusoutDismiss.js.map +1 -1
  381. package/dist/composables/useHotkeyListener.js.map +1 -1
  382. package/dist/composables/useIconClickHandlers.js.map +1 -1
  383. package/dist/composables/useInertLink.js.map +1 -1
  384. package/dist/composables/useInfiniteScroll.js +2 -2
  385. package/dist/composables/useInfiniteScroll.js.map +1 -1
  386. package/dist/composables/useListbox.d.ts +0 -1
  387. package/dist/composables/useListbox.js +4 -10
  388. package/dist/composables/useListbox.js.map +1 -1
  389. package/dist/composables/useLiveAnnouncer.js.map +1 -1
  390. package/dist/composables/useMaskedField.js +28 -48
  391. package/dist/composables/useMaskedField.js.map +1 -1
  392. package/dist/composables/useModalDialog.js +1 -1
  393. package/dist/composables/useModalDialog.js.map +1 -1
  394. package/dist/composables/usePopover.js +1 -1
  395. package/dist/composables/usePopover.js.map +1 -1
  396. package/dist/composables/useProgressValue.js.map +1 -1
  397. package/dist/composables/useRootAttrs.js.map +1 -1
  398. package/dist/composables/useSlotNodes.js.map +1 -1
  399. package/dist/composables/useTextLimit.js.map +1 -1
  400. package/dist/composables/useTimer.js.map +1 -1
  401. package/dist/composables/useTypeahead.js.map +1 -1
  402. package/dist/composables/useVirtualList.js.map +1 -1
  403. package/dist/i18n/en.js.map +1 -1
  404. package/dist/i18n/fr.js.map +1 -1
  405. package/dist/i18n/state.js.map +1 -1
  406. package/dist/styles.css +1 -1
  407. package/dist/tokens/css.js.map +1 -1
  408. package/dist/tokens/index.d.ts +3 -0
  409. package/dist/tokens/index.js.map +1 -1
  410. package/dist/tokens/primitives.js.map +1 -1
  411. package/dist/tokens/semantic.d.ts +3 -0
  412. package/dist/tokens/semantic.js +6 -5
  413. package/dist/tokens/semantic.js.map +1 -1
  414. package/dist/tokens/themes/dark.js.map +1 -1
  415. package/dist/tokens/types.js.map +1 -1
  416. package/dist/tokens.json +12 -5
  417. package/dist/types.d.ts +0 -2
  418. package/dist/utils/array.js.map +1 -1
  419. package/dist/utils/arrowNav.js.map +1 -1
  420. package/dist/utils/attrs.js.map +1 -1
  421. package/dist/utils/chip.d.ts +4 -6
  422. package/dist/utils/chip.js +8 -5
  423. package/dist/utils/chip.js.map +1 -1
  424. package/dist/utils/clock.js +3 -1
  425. package/dist/utils/clock.js.map +1 -1
  426. package/dist/utils/css.js +1 -1
  427. package/dist/utils/css.js.map +1 -1
  428. package/dist/utils/date.js.map +1 -1
  429. package/dist/utils/direction.js.map +1 -1
  430. package/dist/utils/env.js.map +1 -1
  431. package/dist/utils/file.js +13 -31
  432. package/dist/utils/file.js.map +1 -1
  433. package/dist/utils/focus.js.map +1 -1
  434. package/dist/utils/hostWarns.js.map +1 -1
  435. package/dist/utils/ids.js.map +1 -1
  436. package/dist/utils/matcher.js.map +1 -1
  437. package/dist/utils/memo.js.map +1 -1
  438. package/dist/utils/number.js.map +1 -1
  439. package/dist/utils/text.js.map +1 -1
  440. package/dist/utils/time.js.map +1 -1
  441. package/dist/utils/vnode.js.map +1 -1
  442. package/package.json +19 -19
@@ -1 +1 @@
1
- {"version":3,"file":"VInputOTP.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VInputOTP/VInputOTP.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @keyboard @core\n/**\n * Coordinate character inputs because HTML has no segmented code field. JavaScript filters\n * values, distributes paste and moves focus; pattern literals stay outside the model.\n */\n\nimport { computed, ref, useAttrs, watch } from 'vue'\nimport VField from '../VField/VField.vue'\nimport type { FieldLabelPosition } from '../VField/VField.vue'\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport type { IconSource } from '../VIcon/types'\n\nimport { partitionAttrs } from '../../utils/attrs'\nimport { isDev } from '../../utils/env'\n\nimport { useMessages } from '../../i18n/state'\n\n/** The height of the boxes: 32, 40 or 48 pixels. */\nexport type InputOTPSize = 'sm' | 'md' | 'lg'\n\n/** Which characters the code is made of. */\nexport type InputOTPFormat = 'numeric' | 'alpha' | 'alphanumeric'\n\ninterface InputOTPProps {\n /** How many boxes the code has. It is ignored as soon as a `pattern` is given. */\n length?: number\n /**\n * Which characters the code is made of. It filters what can be typed or pasted, and\n * decides which keyboard a phone offers.\n */\n format?: InputOTPFormat\n /**\n * The shape of the code: each `#` is a box to fill, and every other character is a separator\n * shown between the boxes without ever being part of the value, as in `'GT-###'` or\n * `'###.###.###'`.\n */\n pattern?: string\n /** An icon drawn in place of every separator of the pattern. */\n separatorIcon?: IconSource\n /** The size of the boxes: 32, 40 or 48 pixels. */\n size?: InputOTPSize\n /** Takes 4px off the boxes, leaving the text and the icons as they are. */\n compact?: boolean\n /** Makes every box unusable, greyed out through the colour tokens. */\n disabled?: boolean\n /**\n * Shows the code without letting it be changed. The boxes keep their focus and the code can\n * still be selected and copied, which separates it from `disabled`.\n */\n readonly?: boolean\n /** Marks the code as wrong, which colours the boxes and tells assistive technology so. */\n invalid?: boolean\n /**\n * The label above the boxes, which names the row. Without it, the row is named by its\n * `aria-label` or by the design system dictionary.\n */\n label?: string\n /**\n * A line of help under the boxes: where the code was sent, how long it lasts. It is\n * tied to the row for assistive technology, 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 code as required: an asterisk follows the label, and the hidden input a form reads\n * is `required`.\n */\n required?: boolean\n /** Hides the label visually. It still names the row for assistive technology. */\n hideLabel?: boolean\n /**\n * Where the label sits: above the boxes (`top`, the default), or at their start, in a column\n * of its own, moving back above when there is not room for both.\n */\n labelPosition?: FieldLabelPosition\n}\n\nconst props = withDefaults(defineProps<InputOTPProps>(), {\n length: 6,\n format: 'numeric',\n pattern: undefined,\n separatorIcon: undefined,\n size: 'md',\n compact: false,\n disabled: false,\n readonly: false,\n invalid: false,\n label: undefined,\n hint: undefined,\n error: undefined,\n required: false,\n hideLabel: false,\n labelPosition: 'top',\n})\n\nconst m = useMessages()\n\n// @a11y\n/*\n * `aria-describedby` is a list, and the hint is appended to whatever the consumer already\n * pointed at instead of replacing it; left to the fallthrough, their value would land last and\n * take the hint out of the announcement with nothing to show for it.\n */\ndefineOptions({ inheritAttrs: false })\n\nconst attrs = useAttrs()\n\n// What the FORM reads goes on the hidden native input, and everything else on the group:\n// on the group a `name` submits nothing and `required` validates nothing, silently.\nconst NATIVE_ONLY = ['name', 'form']\nconst split = computed(() => partitionAttrs(attrs, NATIVE_ONLY))\nconst groupAttrs = computed(() => split.value.rest)\nconst nativeAttrs = computed(() => split.value.picked)\n// @a11y\n// The row has no visible label to be named by when a consumer gives none or names it\n// themselves (VField's group mode): the dictionary names it then.\nfunction rowLabel(fieldProps: Record<string, unknown>): string | undefined {\n if (fieldProps['aria-labelledby']) return undefined\n return (fieldProps['aria-label'] as string | undefined) ?? m.value.inputOTP.label\n}\n\nconst isInvalid = computed(() => props.invalid || !!props.error)\n\n/**\n * The code as one string, without the separators: a `GT-###` template still yields three\n * characters. It is empty to begin with, and shorter than the full length while it is being\n * typed.\n */\nconst model = defineModel<string>({ default: '' })\n\nconst emit = defineEmits<{\n /**\n * Emitted the moment the code BECOMES complete, carrying it. Retyping a character of a\n * complete code with the same one does not emit it again.\n */\n complete: [code: string]\n}>()\n\ntype Cell = { type: 'slot'; slotIndex: number } | { type: 'literal'; char: string }\n\nconst cells = computed<Cell[]>(() => {\n if (props.pattern?.includes('#')) {\n let slotIndex = 0\n return [...props.pattern].map((char): Cell =>\n char === '#' ? { type: 'slot', slotIndex: slotIndex++ } : { type: 'literal', char },\n )\n }\n return Array.from({ length: props.length }, (_, i) => ({ type: 'slot', slotIndex: i }))\n})\nconst slotCount = computed(() => cells.value.filter((cell) => cell.type === 'slot').length)\n\n// @devwarn\nif (isDev) {\n if (props.pattern && !props.pattern.includes('#'))\n console.warn(\"[VInputOTP] pattern without '#' — falling back to `length`.\")\n}\n\nconst filters: Record<InputOTPFormat, RegExp> = {\n numeric: /[^0-9]/g,\n alpha: /[^A-Z]/g,\n alphanumeric: /[^A-Z0-9]/g,\n}\n\n/**\n * Keeps only what the format allows. Outside a numeric code the text is put in\n * capitals first, so that the value has a single canonical form whichever case the\n * reader typed or pasted.\n */\nfunction sanitize(text: string) {\n const upper = props.format === 'numeric' ? text : text.toUpperCase()\n return upper.replace(filters[props.format], '')\n}\n\nconst rootEl = ref<HTMLElement | null>(null)\nconst digits = ref<string[]>([])\n\n// @keyboard\n// Read the rendered order on demand; changing a pattern can move or replace its input cells.\nfunction inputAt(slot: number) {\n return rootEl.value?.querySelectorAll<HTMLInputElement>('.v-input-otp-input')[slot]\n}\n\nfunction syncFromModel(value: string) {\n // A value longer than the row is simply shown cut short, and one holding characters the\n // format refuses is shown filtered; but the model is not rewritten to match: writing back\n // here would feed the watcher below and the two would keep correcting each other.\n const clean = sanitize(value)\n digits.value = Array.from({ length: slotCount.value }, (_, i) => clean[i] ?? '')\n}\nsyncFromModel(model.value)\nwatch([model, slotCount], ([value, count]) => {\n if (value !== digits.value.join('') || digits.value.length !== count) syncFromModel(value)\n})\n\n/** The first empty box, or -1 once the code is complete. Every box before it is filled. */\nconst firstEmpty = () => digits.value.findIndex((d) => !d)\n\n/** The furthest box the focus may reach: the first empty one, or the last of a full code. */\nfunction reachable() {\n const empty = firstEmpty()\n return empty === -1 ? slotCount.value - 1 : empty\n}\n\n/** Takes a character out and moves the following ones back, so no gap is left behind. */\nfunction removeAt(slot: number) {\n digits.value.splice(slot, 1)\n digits.value.push('')\n}\n\nfunction focusBox(slot: number) {\n const el = inputAt(slot)\n el?.focus()\n // Selected, so the next keystroke REPLACES the character: a box that already has the\n // focus receives no focus event to select it.\n el?.select()\n}\n\nfunction commit() {\n const code = digits.value.join('')\n const previous = model.value\n model.value = code\n // Only when the code CHANGES into a full one: retyping a character of a complete code\n // must not submit it a second time for a consumer listening to `complete`.\n if (code.length === slotCount.value && code !== previous) emit('complete', code)\n}\n\n// @core\n/**\n * Spreads a run of characters across the boxes, starting from the one that received them. It\n * returns the last box it filled, so the caller knows where to put the focus, and `null` when\n * nothing in the text was usable.\n */\nfunction distribute(raw: string, startSlot: number): number | null {\n const allCells = cells.value\n let start = allCells.findIndex((cell) => cell.type === 'slot' && cell.slotIndex === startSlot)\n const chars = [...raw]\n // Never for ONE character: a `G` typed into the first box of `GT-###` is the code's first\n // character, not the separator, and swallowing it would make such a code impossible to type.\n if (chars.length > 1) while (start > 0 && allCells[start - 1]?.type === 'literal') start--\n let charIndex = 0\n let lastFilled: number | null = null\n for (const cell of allCells.slice(start)) {\n if (charIndex >= chars.length) break\n if (cell.type === 'literal') {\n if (chars[charIndex]?.toUpperCase() === cell.char.toUpperCase()) charIndex++\n continue\n }\n let char = ''\n while (charIndex < chars.length && !char) {\n char = sanitize(chars[charIndex] ?? '')\n charIndex++\n }\n if (!char) break\n digits.value[cell.slotIndex] = char\n lastFilled = cell.slotIndex\n }\n return lastFilled\n}\n\n// @keyboard @core\n// Separate inputs into something that types like one field; spreading the characters is the\n// core behaviour underneath it.\nfunction onInput(slotIndex: number, event: Event) {\n const el = event.target as HTMLInputElement\n const empty = firstEmpty()\n const filled = empty === -1 || slotIndex < empty\n\n // A filled box whose character was not selected receives the new one NEXT to it. What\n // was inserted is what lies just before the caret, and it is what counts.\n const previous = digits.value[slotIndex] ?? ''\n let raw = el.value\n const inserted = raw.length - previous.length\n if (previous && inserted > 0 && el.selectionStart !== null) {\n raw = raw.slice(Math.max(0, el.selectionStart - inserted), el.selectionStart)\n }\n\n // The same path serves a single keystroke and a pasted code: both are spread from this box\n // onwards; or from the first empty box, when this one lies past it.\n const lastFilled = distribute(raw, filled ? slotIndex : empty)\n if (lastFilled === null) {\n // Either the box was emptied, or nothing typed was valid for this format. A filled box\n // loses its character and the ones after it close the gap.\n if (filled) removeAt(slotIndex)\n el.value = digits.value[slotIndex] ?? ''\n commit()\n return\n }\n // Written by hand: when the characters went to another box, this one's value is still\n // '' in the render, and the patch would leave the typed character on screen.\n el.value = digits.value[slotIndex] ?? ''\n focusBox(Math.min(lastFilled + 1, slotCount.value - 1))\n commit()\n}\n\n// @keyboard\n// Sends the focus there instead: a pointer landing on box 5 of a two-character code types into\n// box 3.\nfunction onFocus(slotIndex: number, event: FocusEvent) {\n const empty = firstEmpty()\n if (empty !== -1 && slotIndex > empty) inputAt(empty)?.focus()\n else (event.target as HTMLInputElement).select()\n}\n\n// @keyboard\nfunction onKeydown(slotIndex: number, event: KeyboardEvent) {\n const last = reachable()\n let target: number | null = null\n switch (event.key) {\n case 'Backspace':\n // A read-only box refuses its own edits natively, but this erases ANOTHER box, which\n // nothing native guards.\n if (props.readonly || props.disabled || digits.value[slotIndex] || slotIndex === 0) return\n removeAt(slotIndex - 1)\n commit()\n target = slotIndex - 1\n break\n case 'ArrowLeft':\n if (slotIndex > 0) target = slotIndex - 1\n break\n case 'ArrowRight':\n if (slotIndex < last) target = slotIndex + 1\n break\n case 'Home':\n target = 0\n break\n case 'End':\n target = last\n break\n }\n if (target === null) return\n event.preventDefault()\n focusBox(target)\n}\n\ndefineExpose({\n /** Moves the focus to the first empty box, or to the last one when the code is complete. */\n focus: (options?: FocusOptions) => inputAt(reachable())?.focus(options),\n /** Selects the box the focus is on, as clicking into one already does. */\n select: () => {\n const active = rootEl.value?.querySelector<HTMLInputElement>('.v-input-otp-input:focus')\n ;(active ?? inputAt(0))?.select()\n },\n /** The row itself, for what neither of the two above covers. */\n el: rootEl,\n})\n</script>\n\n<template>\n <VField\n v-bind=\"groupAttrs\"\n class=\"v-input-otp\"\n :label=\"label\"\n :hint=\"hint\"\n :error=\"error\"\n :required=\"required\"\n :disabled=\"disabled\"\n :hide-label=\"hideLabel\"\n :label-position=\"labelPosition\"\n group\n >\n <template #default=\"{ fieldProps }\">\n <div\n ref=\"rootEl\"\n v-bind=\"fieldProps\"\n class=\"v-input-otp-group v-control\"\n role=\"group\"\n :aria-label=\"rowLabel(fieldProps)\"\n :data-invalid=\"isInvalid ? '' : undefined\"\n :data-size=\"size\"\n :data-compact=\"compact ? '' : undefined\"\n :data-disabled=\"disabled ? '' : undefined\"\n :data-readonly=\"readonly ? '' : undefined\"\n >\n <div class=\"v-input-otp-boxes\">\n <template v-for=\"(cell, i) in cells\" :key=\"i\">\n <input\n v-if=\"cell.type === 'slot'\"\n type=\"text\"\n class=\"v-input-otp-input\"\n :inputmode=\"format === 'numeric' ? 'numeric' : 'text'\"\n :autocomplete=\"cell.slotIndex === 0 ? 'one-time-code' : 'off'\"\n :value=\"digits[cell.slotIndex]\"\n :disabled=\"disabled\"\n :readonly=\"readonly || undefined\"\n :aria-label=\"m.inputOTP.slot(cell.slotIndex + 1, slotCount)\"\n :aria-invalid=\"isInvalid || undefined\"\n @input=\"onInput(cell.slotIndex, $event)\"\n @keydown=\"onKeydown(cell.slotIndex, $event)\"\n @focus=\"onFocus(cell.slotIndex, $event)\"\n />\n <!-- A separator from the pattern: shown, never focusable, and never part of the\n value. It is hidden from screen readers, each box already announcing its\n own position in the code. -->\n <span v-else class=\"v-input-otp-literal\" aria-hidden=\"true\">\n <VIcon v-if=\"separatorIcon\" v-bind=\"iconProps(separatorIcon)\" />\n <template v-else>{{ cell.char }}</template>\n </span>\n </template>\n </div>\n\n <!--\n Out of the tab order and hidden from assistive technology, the boxes being the control; a\n browser focusing it to report an invalid code is sent on to the box to fill.\n -->\n <input\n v-bind=\"nativeAttrs\"\n class=\"v-input-otp-native v-visually-hidden\"\n type=\"text\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n autocomplete=\"off\"\n :value=\"model\"\n :pattern=\"`.{${slotCount}}`\"\n :required=\"required || undefined\"\n :disabled=\"disabled\"\n :readonly=\"readonly || undefined\"\n @focus=\"focusBox(reachable())\"\n />\n </div>\n </template>\n </VField>\n</template>\n\n<style>\n@layer vectis.components {\n /* Its own width rather than the line's, so that a start label stays next to the boxes. */\n .v-input-otp.v-field {\n display: inline-flex;\n align-items: start;\n }\n\n .v-input-otp-group {\n /*\n * The heights and the icon context come from the shared v-control class\n * (styles/control-size.css). The type is the one thing kept local, and set one or\n * two steps above the other fields: a single character has a whole square to\n * itself, and at the usual field size it would look lost in it.\n */\n --input-otp-font-size: var(--vectis-font-size-lg);\n }\n\n /* A code reads left to right in every language, like the HH:MM of VTimeInput: mirrored\n under `dir=\"rtl\"`, the arrows would walk against the boxes and a `GT-###` pattern would\n be drawn backwards. */\n .v-input-otp-boxes {\n direction: ltr;\n display: flex;\n align-items: center;\n gap: var(--control-gap);\n }\n\n .v-input-otp-input {\n /* The boxes are square: reading the same variable for both dimensions is what\n makes the size and the density scale them together. */\n width: var(--control-height);\n height: var(--control-height);\n text-align: center;\n background: var(--vectis-color-surface);\n color: var(--vectis-color-text);\n border: 1px solid var(--vectis-color-border-strong);\n border-radius: var(--vectis-radius-interactive);\n font-family: var(--vectis-text-family-code);\n font-size: var(--input-otp-font-size);\n transition:\n border-color var(--vectis-duration-fast) var(--vectis-ease-default),\n box-shadow var(--vectis-duration-fast) var(--vectis-ease-default),\n background-color var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n /*\n * The states follow VInput's, in VInput's order: read-only, hover, focus, invalid, disabled.\n * Read-only, focus, invalid and disabled all weigh (0,2,0), so the source order arbitrates\n * between them and read-only has to come first, or it would repaint the focus and error\n * borders grey.\n */\n .v-input-otp-group[data-readonly] .v-input-otp-input {\n background: var(--vectis-color-surface-sunken);\n border-color: var(--vectis-color-border);\n }\n\n /* The hover weighs (0,5,0) and keeps itself off a focused, invalid or disabled box\n through its own `:not()`, as VInput's does. */\n .v-input-otp-group:not([data-invalid]) .v-input-otp-input:hover:not(:focus, :disabled) {\n border-color: color-mix(\n in oklab,\n var(--vectis-color-border-strong),\n var(--vectis-color-text) 15%\n );\n }\n\n /*\n * `:focus` rather than `:focus-visible`, like any text field, which shows its focus when\n * clicked into too. The transparent outline is the safety net for Windows forced colours,\n * which drop box-shadows entirely.\n */\n .v-input-otp-input:focus {\n border-color: var(--vectis-color-accent);\n box-shadow: 0 0 0 1px var(--vectis-color-accent);\n outline: var(--vectis-focus-ring-width) solid transparent;\n }\n\n .v-input-otp-group[data-invalid] .v-input-otp-input {\n border-color: var(--vectis-color-danger);\n }\n\n .v-input-otp-group[data-invalid] .v-input-otp-input:focus {\n box-shadow: 0 0 0 1px var(--vectis-color-danger);\n }\n\n .v-input-otp-literal {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: var(--vectis-color-text-muted);\n font-family: var(--vectis-text-family-code);\n font-size: var(--input-otp-font-size);\n user-select: none;\n }\n\n /*\n * A disabled row greys out through the colour tokens and never through opacity, the same\n * treatment as VInput; `text-muted` inside the box, where `text-subtle` would fall under\n * 4.5:1 against `surface-muted`, and `text-subtle` for what sits on the page.\n */\n .v-input-otp-group[data-disabled] .v-input-otp-input {\n background: var(--vectis-color-surface-muted);\n color: var(--vectis-color-text-muted);\n border-color: var(--vectis-color-border);\n cursor: not-allowed;\n }\n\n .v-input-otp-group[data-disabled] .v-input-otp-literal {\n color: var(--vectis-color-text-subtle);\n }\n\n /* Of the whole size scale, only the raised type is restated here; the dimensions\n themselves come from v-control. */\n .v-input-otp-group[data-size='sm'] {\n --input-otp-font-size: var(--vectis-font-size-md);\n }\n\n .v-input-otp-group[data-size='lg'] {\n --input-otp-font-size: var(--vectis-font-size-xl);\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-input-otp-input {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoFA,IAAM,IAAQ,GAkBR,IAAI,EAAY,GAUhB,IAAQ,EAAS,GAIjB,IAAc,CAAC,QAAQ,MAAM,GAC7B,IAAQ,QAAe,EAAe,GAAO,CAAW,CAAC,GACzD,IAAa,QAAe,EAAM,MAAM,IAAI,GAC5C,IAAc,QAAe,EAAM,MAAM,MAAM;EAIrD,SAAS,EAAS,GAAyD;GACrE,OAAW,oBACf,OAAQ,EAAW,iBAAwC,EAAE,MAAM,SAAS;EAC9E;EAEA,IAAM,IAAY,QAAe,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AAQ,EAAK,WAAW,CAAM;4BAKxC,EAGO,QAHP,GAGO,CAFQ,EAAA,iBAAA,EAAA,GAAb,EAAgE,GAAhE,EAAgE;;;MAA5B,EAAA,CAAA,CAAS,CAAC,EAAA,aAAa,CAAA,GAAA,MAAA,EAAA,MAAA,EAAA,GAC3D,EAA2C,GAAA,EAAA,KAAA,EAAA,GAAA,CAAA,EAAA,EAAvB,EAAK,IAAI,GAAA,CAAA,CAAA,GAAA,EAAA,EAAA,CAAA,EAAA,GAAA,EAAA,cASnC,EAaE,SAbF,EACU,EAYR,OAZmB;IACnB,OAAM;IACN,MAAK;IACL,UAAS;IACT,eAAY;IACZ,cAAa;IACZ,OAAO,EAAA;IACP,SAAO,KAAO,EAAA,MAAS;IACvB,UAAU,EAAA,YAAY,KAAA;IACtB,UAAU,EAAA;IACV,UAAU,EAAA,YAAY,KAAA;IACtB,SAAK,AAAA,EAAA,QAAA,MAAE,EAAS,EAAS,CAAA"}
1
+ {"version":3,"file":"VInputOTP.vue_vue_type_script_setup_true_lang.js","names":["_useModel","_openBlock","_createBlock","VField","_mergeProps","_withCtx","_createElementVNode","_createElementBlock","_Fragment","_renderList","_unref","VIcon","_createTextVNode","_toDisplayString","VIcon_default","VField_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","VInputOTP_vue_vue_type_script_setup_true_lang_default","\"modelValue\"","\"modelModifiers\"","__expose","__emit","props","__props","m","useMessages","attrs","useAttrs","NATIVE_ONLY","split","computed","partitionAttrs","groupAttrs","nativeAttrs","rowLabel","fieldProps","isInvalid","model","useModel","emit","cells","slotIndex","char","i","slotCount","cell","isDev","filters","sanitize","text","rootEl","ref","digits","inputAt","slot","syncFromModel","clean","value","watch","count","firstEmpty","d","reachable","empty","removeAt","focusBox","el","commit","code","previous","distribute","allCells","start","startSlot","chars","raw","charIndex","lastFilled","onInput","event","filled","inserted","onFocus","onKeydown","last","target","options","openBlock","createBlock","mergeProps","withCtx","createElementVNode","createElementBlock","Fragment","renderList","unref","$event","iconProps","createTextVNode","toDisplayString","_cache"],"sources":["../../../src/components/VInputOTP/VInputOTP.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @keyboard @core\n/**\n * Coordinate character inputs because HTML has no segmented code field. JavaScript filters\n * values, distributes paste and moves focus; pattern literals stay outside the model.\n */\n\nimport { computed, ref, useAttrs, watch } from 'vue'\nimport VField from '../VField/VField.vue'\nimport type { FieldLabelPosition } from '../VField/VField.vue'\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport type { IconSource } from '../VIcon/types'\n\nimport { partitionAttrs } from '../../utils/attrs'\nimport { isDev } from '../../utils/env'\n\nimport { useMessages } from '../../i18n/state'\n\n/** The height of the boxes: 32, 40 or 48 pixels. */\nexport type InputOTPSize = 'sm' | 'md' | 'lg'\n\n/** Which characters the code is made of. */\nexport type InputOTPFormat = 'numeric' | 'alpha' | 'alphanumeric'\n\ninterface InputOTPProps {\n /** How many boxes the code has. It is ignored as soon as a `pattern` is given. */\n length?: number\n /**\n * Which characters the code is made of. It filters what can be typed or pasted, and\n * decides which keyboard a phone offers.\n */\n format?: InputOTPFormat\n /**\n * The shape of the code: each `#` is a box to fill, and every other character is a separator\n * shown between the boxes without ever being part of the value, as in `'GT-###'` or\n * `'###.###.###'`.\n */\n pattern?: string\n /** An icon drawn in place of every separator of the pattern. */\n separatorIcon?: IconSource\n /** The size of the boxes: 32, 40 or 48 pixels. */\n size?: InputOTPSize\n /** Makes every box unusable, greyed out through the colour tokens. */\n disabled?: boolean\n /**\n * Shows the code without letting it be changed. The boxes keep their focus and the code can\n * still be selected and copied, which separates it from `disabled`.\n */\n readonly?: boolean\n /** Marks the code as wrong, which colours the boxes and tells assistive technology so. */\n invalid?: boolean\n /**\n * The label above the boxes, which names the row. Without it, the row is named by its\n * `aria-label` or by the design system dictionary.\n */\n label?: string\n /**\n * A line of help under the boxes: where the code was sent, how long it lasts. It is\n * tied to the row for assistive technology, 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 code as required: an asterisk follows the label, and the hidden input a form reads\n * is `required`.\n */\n required?: boolean\n /** Hides the label visually. It still names the row for assistive technology. */\n hideLabel?: boolean\n /**\n * Where the label sits: above the boxes (`top`, the default), or at their start, in a column\n * of its own, moving back above when there is not room for both.\n */\n labelPosition?: FieldLabelPosition\n}\n\nconst props = withDefaults(defineProps<InputOTPProps>(), {\n length: 6,\n format: 'numeric',\n pattern: undefined,\n separatorIcon: undefined,\n size: 'md',\n disabled: false,\n readonly: false,\n invalid: false,\n label: undefined,\n hint: undefined,\n error: undefined,\n required: false,\n hideLabel: false,\n labelPosition: 'top',\n})\n\nconst m = useMessages()\n\n// @a11y\n/*\n * `aria-describedby` is a list, and the hint is appended to whatever the consumer already\n * pointed at instead of replacing it; left to the fallthrough, their value would land last and\n * take the hint out of the announcement with nothing to show for it.\n */\ndefineOptions({ inheritAttrs: false })\n\nconst attrs = useAttrs()\n\n// What the FORM reads goes on the hidden native input, and everything else on the group:\n// on the group a `name` submits nothing and `required` validates nothing, silently.\nconst NATIVE_ONLY = ['name', 'form']\nconst split = computed(() => partitionAttrs(attrs, NATIVE_ONLY))\nconst groupAttrs = computed(() => split.value.rest)\nconst nativeAttrs = computed(() => split.value.picked)\n// @a11y\n// The row has no visible label to be named by when a consumer gives none or names it\n// themselves (VField's group mode): the dictionary names it then.\nfunction rowLabel(fieldProps: Record<string, unknown>): string | undefined {\n if (fieldProps['aria-labelledby']) return undefined\n return (fieldProps['aria-label'] as string | undefined) ?? m.value.inputOTP.label\n}\n\nconst isInvalid = computed(() => props.invalid || !!props.error)\n\n/**\n * The code as one string, without the separators: a `GT-###` template still yields three\n * characters. It is empty to begin with, and shorter than the full length while it is being\n * typed.\n */\nconst model = defineModel<string>({ default: '' })\n\nconst emit = defineEmits<{\n /**\n * Emitted the moment the code BECOMES complete, carrying it. Retyping a character of a\n * complete code with the same one does not emit it again.\n */\n complete: [code: string]\n}>()\n\ntype Cell = { type: 'slot'; slotIndex: number } | { type: 'literal'; char: string }\n\nconst cells = computed<Cell[]>(() => {\n if (props.pattern?.includes('#')) {\n let slotIndex = 0\n return [...props.pattern].map((char): Cell =>\n char === '#' ? { type: 'slot', slotIndex: slotIndex++ } : { type: 'literal', char },\n )\n }\n return Array.from({ length: props.length }, (_, i) => ({ type: 'slot', slotIndex: i }))\n})\nconst slotCount = computed(() => cells.value.filter((cell) => cell.type === 'slot').length)\n\n// @devwarn\nif (isDev) {\n if (props.pattern && !props.pattern.includes('#'))\n console.warn(\"[VInputOTP] pattern without '#' — falling back to `length`.\")\n}\n\nconst filters: Record<InputOTPFormat, RegExp> = {\n numeric: /[^0-9]/g,\n alpha: /[^A-Z]/g,\n alphanumeric: /[^A-Z0-9]/g,\n}\n\n/**\n * Keeps only what the format allows. Outside a numeric code the text is put in\n * capitals first, so that the value has a single canonical form whichever case the\n * reader typed or pasted.\n */\nfunction sanitize(text: string) {\n const upper = props.format === 'numeric' ? text : text.toUpperCase()\n return upper.replace(filters[props.format], '')\n}\n\nconst rootEl = ref<HTMLElement | null>(null)\nconst digits = ref<string[]>([])\n\n// @keyboard\n// Read the rendered order on demand; changing a pattern can move or replace its input cells.\nfunction inputAt(slot: number) {\n return rootEl.value?.querySelectorAll<HTMLInputElement>('.v-input-otp-input')[slot]\n}\n\nfunction syncFromModel(value: string) {\n // A value longer than the row is simply shown cut short, and one holding characters the\n // format refuses is shown filtered; but the model is not rewritten to match: writing back\n // here would feed the watcher below and the two would keep correcting each other.\n const clean = sanitize(value)\n digits.value = Array.from({ length: slotCount.value }, (_, i) => clean[i] ?? '')\n}\nsyncFromModel(model.value)\nwatch([model, slotCount], ([value, count]) => {\n if (value !== digits.value.join('') || digits.value.length !== count) syncFromModel(value)\n})\n\n/** The first empty box, or -1 once the code is complete. Every box before it is filled. */\nconst firstEmpty = () => digits.value.findIndex((d) => !d)\n\n/** The furthest box the focus may reach: the first empty one, or the last of a full code. */\nfunction reachable() {\n const empty = firstEmpty()\n return empty === -1 ? slotCount.value - 1 : empty\n}\n\n/** Takes a character out and moves the following ones back, so no gap is left behind. */\nfunction removeAt(slot: number) {\n digits.value.splice(slot, 1)\n digits.value.push('')\n}\n\nfunction focusBox(slot: number) {\n const el = inputAt(slot)\n el?.focus()\n // Selected, so the next keystroke REPLACES the character: a box that already has the\n // focus receives no focus event to select it.\n el?.select()\n}\n\nfunction commit() {\n const code = digits.value.join('')\n const previous = model.value\n model.value = code\n // Only when the code CHANGES into a full one: retyping a character of a complete code\n // must not submit it a second time for a consumer listening to `complete`.\n if (code.length === slotCount.value && code !== previous) emit('complete', code)\n}\n\n// @core\n/**\n * Spreads a run of characters across the boxes, starting from the one that received them. It\n * returns the last box it filled, so the caller knows where to put the focus, and `null` when\n * nothing in the text was usable.\n */\nfunction distribute(raw: string, startSlot: number): number | null {\n const allCells = cells.value\n let start = allCells.findIndex((cell) => cell.type === 'slot' && cell.slotIndex === startSlot)\n const chars = [...raw]\n // Never for ONE character: a `G` typed into the first box of `GT-###` is the code's first\n // character, not the separator, and swallowing it would make such a code impossible to type.\n if (chars.length > 1) while (start > 0 && allCells[start - 1]?.type === 'literal') start--\n let charIndex = 0\n let lastFilled: number | null = null\n for (const cell of allCells.slice(start)) {\n if (charIndex >= chars.length) break\n if (cell.type === 'literal') {\n if (chars[charIndex]?.toUpperCase() === cell.char.toUpperCase()) charIndex++\n continue\n }\n let char = ''\n while (charIndex < chars.length && !char) {\n char = sanitize(chars[charIndex] ?? '')\n charIndex++\n }\n if (!char) break\n digits.value[cell.slotIndex] = char\n lastFilled = cell.slotIndex\n }\n return lastFilled\n}\n\n// @keyboard @core\n// Separate inputs into something that types like one field; spreading the characters is the\n// core behaviour underneath it.\nfunction onInput(slotIndex: number, event: Event) {\n const el = event.target as HTMLInputElement\n const empty = firstEmpty()\n const filled = empty === -1 || slotIndex < empty\n\n // A filled box whose character was not selected receives the new one NEXT to it. What\n // was inserted is what lies just before the caret, and it is what counts.\n const previous = digits.value[slotIndex] ?? ''\n let raw = el.value\n const inserted = raw.length - previous.length\n if (previous && inserted > 0 && el.selectionStart !== null) {\n raw = raw.slice(Math.max(0, el.selectionStart - inserted), el.selectionStart)\n }\n\n // The same path serves a single keystroke and a pasted code: both are spread from this box\n // onwards; or from the first empty box, when this one lies past it.\n const lastFilled = distribute(raw, filled ? slotIndex : empty)\n if (lastFilled === null) {\n // Either the box was emptied, or nothing typed was valid for this format. A filled box\n // loses its character and the ones after it close the gap.\n if (filled) removeAt(slotIndex)\n el.value = digits.value[slotIndex] ?? ''\n commit()\n return\n }\n // Written by hand: when the characters went to another box, this one's value is still\n // '' in the render, and the patch would leave the typed character on screen.\n el.value = digits.value[slotIndex] ?? ''\n focusBox(Math.min(lastFilled + 1, slotCount.value - 1))\n commit()\n}\n\n// @keyboard\n// Sends the focus there instead: a pointer landing on box 5 of a two-character code types into\n// box 3.\nfunction onFocus(slotIndex: number, event: FocusEvent) {\n const empty = firstEmpty()\n if (empty !== -1 && slotIndex > empty) inputAt(empty)?.focus()\n else (event.target as HTMLInputElement).select()\n}\n\n// @keyboard\nfunction onKeydown(slotIndex: number, event: KeyboardEvent) {\n const last = reachable()\n let target: number | null = null\n switch (event.key) {\n case 'Backspace':\n // A read-only box refuses its own edits natively, but this erases ANOTHER box, which\n // nothing native guards.\n if (props.readonly || props.disabled || digits.value[slotIndex] || slotIndex === 0) return\n removeAt(slotIndex - 1)\n commit()\n target = slotIndex - 1\n break\n case 'ArrowLeft':\n if (slotIndex > 0) target = slotIndex - 1\n break\n case 'ArrowRight':\n if (slotIndex < last) target = slotIndex + 1\n break\n case 'Home':\n target = 0\n break\n case 'End':\n target = last\n break\n }\n if (target === null) return\n event.preventDefault()\n focusBox(target)\n}\n\ndefineExpose({\n /** Moves the focus to the first empty box, or to the last one when the code is complete. */\n focus: (options?: FocusOptions) => inputAt(reachable())?.focus(options),\n /** Selects the box the focus is on, as clicking into one already does. */\n select: () => {\n const active = rootEl.value?.querySelector<HTMLInputElement>('.v-input-otp-input:focus')\n ;(active ?? inputAt(0))?.select()\n },\n /** The row itself, for what neither of the two above covers. */\n el: rootEl,\n})\n</script>\n\n<template>\n <VField\n v-bind=\"groupAttrs\"\n class=\"v-input-otp\"\n :label=\"label\"\n :hint=\"hint\"\n :error=\"error\"\n :required=\"required\"\n :disabled=\"disabled\"\n :hide-label=\"hideLabel\"\n :label-position=\"labelPosition\"\n group\n >\n <template #default=\"{ fieldProps }\">\n <div\n ref=\"rootEl\"\n v-bind=\"fieldProps\"\n class=\"v-input-otp-group v-control\"\n role=\"group\"\n :aria-label=\"rowLabel(fieldProps)\"\n :data-invalid=\"isInvalid ? '' : undefined\"\n :data-size=\"size\"\n :data-disabled=\"disabled ? '' : undefined\"\n :data-readonly=\"readonly ? '' : undefined\"\n >\n <div class=\"v-input-otp-boxes\">\n <template v-for=\"(cell, i) in cells\" :key=\"i\">\n <input\n v-if=\"cell.type === 'slot'\"\n type=\"text\"\n class=\"v-input-otp-input\"\n :inputmode=\"format === 'numeric' ? 'numeric' : 'text'\"\n :autocomplete=\"cell.slotIndex === 0 ? 'one-time-code' : 'off'\"\n :value=\"digits[cell.slotIndex]\"\n :disabled=\"disabled\"\n :readonly=\"readonly || undefined\"\n :aria-label=\"m.inputOTP.slot(cell.slotIndex + 1, slotCount)\"\n :aria-invalid=\"isInvalid || undefined\"\n @input=\"onInput(cell.slotIndex, $event)\"\n @keydown=\"onKeydown(cell.slotIndex, $event)\"\n @focus=\"onFocus(cell.slotIndex, $event)\"\n />\n <!-- A separator from the pattern: shown, never focusable, and never part of the\n value. It is hidden from screen readers, each box already announcing its\n own position in the code. -->\n <span v-else class=\"v-input-otp-literal\" aria-hidden=\"true\">\n <VIcon v-if=\"separatorIcon\" v-bind=\"iconProps(separatorIcon)\" />\n <template v-else>{{ cell.char }}</template>\n </span>\n </template>\n </div>\n\n <!--\n Out of the tab order and hidden from assistive technology, the boxes being the control; a\n browser focusing it to report an invalid code is sent on to the box to fill.\n -->\n <input\n v-bind=\"nativeAttrs\"\n class=\"v-input-otp-native v-visually-hidden\"\n type=\"text\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n autocomplete=\"off\"\n :value=\"model\"\n :pattern=\"`.{${slotCount}}`\"\n :required=\"required || undefined\"\n :disabled=\"disabled\"\n :readonly=\"readonly || undefined\"\n @focus=\"focusBox(reachable())\"\n />\n </div>\n </template>\n </VField>\n</template>\n\n<style>\n@layer vectis.components {\n /* Its own width rather than the line's, so that a start label stays next to the boxes. */\n .v-input-otp.v-field {\n display: inline-flex;\n align-items: start;\n }\n\n .v-input-otp-group {\n /*\n * The heights and the icon context come from the shared v-control class\n * (styles/control-size.css). The type is the one thing kept local, and set one or\n * two steps above the other fields: a single character has a whole square to\n * itself, and at the usual field size it would look lost in it.\n */\n --input-otp-font-size: var(--vectis-font-size-lg);\n }\n\n /* A code reads left to right in every language, like the HH:MM of VTimeInput: mirrored\n under `dir=\"rtl\"`, the arrows would walk against the boxes and a `GT-###` pattern would\n be drawn backwards. */\n .v-input-otp-boxes {\n direction: ltr;\n display: flex;\n align-items: center;\n gap: var(--control-gap);\n }\n\n .v-input-otp-input {\n /* The boxes are square: reading the same variable for both dimensions is what\n makes the size and the density scale them together. */\n width: var(--control-height);\n height: var(--control-height);\n text-align: center;\n background: var(--vectis-color-surface);\n color: var(--vectis-color-text);\n border: 1px solid var(--vectis-color-border-strong);\n border-radius: var(--vectis-radius-interactive);\n font-family: var(--vectis-text-family-code);\n font-size: var(--input-otp-font-size);\n transition:\n border-color var(--vectis-duration-fast) var(--vectis-ease-default),\n box-shadow var(--vectis-duration-fast) var(--vectis-ease-default),\n background-color var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n /*\n * The states follow VInput's, in VInput's order: read-only, hover, focus, invalid, disabled.\n * Read-only, focus, invalid and disabled all weigh (0,2,0), so the source order arbitrates\n * between them and read-only has to come first, or it would repaint the focus and error\n * borders grey.\n */\n .v-input-otp-group[data-readonly] .v-input-otp-input {\n background: var(--vectis-color-surface-sunken);\n border-color: var(--vectis-color-border);\n }\n\n /* The hover weighs (0,5,0) and keeps itself off a focused, invalid or disabled box\n through its own `:not()`, as VInput's does. */\n .v-input-otp-group:not([data-invalid]) .v-input-otp-input:hover:not(:focus, :disabled) {\n border-color: color-mix(\n in oklab,\n var(--vectis-color-border-strong),\n var(--vectis-color-text) 15%\n );\n }\n\n /*\n * `:focus` rather than `:focus-visible`, like any text field, which shows its focus when\n * clicked into too. The transparent outline is the safety net for Windows forced colours,\n * which drop box-shadows entirely.\n */\n .v-input-otp-input:focus {\n border-color: var(--vectis-color-accent);\n box-shadow: 0 0 0 1px var(--vectis-color-accent);\n outline: var(--vectis-focus-ring-width) solid transparent;\n }\n\n .v-input-otp-group[data-invalid] .v-input-otp-input {\n border-color: var(--vectis-color-danger);\n }\n\n .v-input-otp-group[data-invalid] .v-input-otp-input:focus {\n box-shadow: 0 0 0 1px var(--vectis-color-danger);\n }\n\n .v-input-otp-literal {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: var(--vectis-color-text-muted);\n font-family: var(--vectis-text-family-code);\n font-size: var(--input-otp-font-size);\n user-select: none;\n }\n\n /*\n * A disabled row greys out through the colour tokens and never through opacity, the same\n * treatment as VInput; `text-muted` inside the box, where `text-subtle` would fall under\n * 4.5:1 against `surface-muted`, and `text-subtle` for what sits on the page.\n */\n .v-input-otp-group[data-disabled] .v-input-otp-input {\n background: var(--vectis-color-surface-muted);\n color: var(--vectis-color-text-muted);\n border-color: var(--vectis-color-border);\n cursor: not-allowed;\n }\n\n .v-input-otp-group[data-disabled] .v-input-otp-literal {\n color: var(--vectis-color-text-subtle);\n }\n\n /* Of the whole size scale, only the raised type is restated here; the dimensions\n themselves come from v-control. */\n .v-input-otp-group[data-size='sm'] {\n --input-otp-font-size: var(--vectis-font-size-md);\n }\n\n .v-input-otp-group[data-size='lg'] {\n --input-ot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AvBI,EAAAC,EAAAoC,EAAK,IAAI,GAAA,CAAA,CAAA,GAAA,EAAA,EAAA,CAAA,EAAA,GAAA,EAAA,EASnC3C,GAAAA,GAAAA,EAAAA,CAAAA,GAAAA,EAaE,SAbFF,EACUiC,EAYR,OAZmB;IACnB,OAAM;IACN,MAAK;IACL,UAAS;IACT,eAAY;IACZ,cAAa;IACZ,OAAOI,EAAA;IACP,SAAO,KAAOO,EAAA,MAAS;IACvB,UAAUrB,EAAA,YAAY,KAAA;IACtB,UAAUA,EAAA;IACV,UAAUA,EAAA,YAAY,KAAA;IACtB,SAAK,AAAA6E,EAAA,QAAA,MAAEnC,EAASH,EAAS,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"VLink.js","names":[],"sources":["../../../src/components/VLink/VLink.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @a11y @core\n/**\n * A native link painted in a tone. It takes its size from the text around it. An external link\n * opens in a new tab and says so, with an icon and words for assistive technology.\n */\nimport { computed, useAttrs } from 'vue'\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { open_in_new as openInNewIcon } from '../VIcon/icons/open_in_new'\nimport type { IconSource } from '../VIcon/types'\nimport { useInertLink } from '../../composables/useInertLink'\nimport { useMessages } from '../../i18n/state'\n\n/**\n * The colour of the link. `neutral` takes the colour of the text; `inherit` takes the colour of\n * the parent and turns to the accent on hover.\n */\nexport type LinkTone = 'accent' | 'neutral' | 'danger' | 'success' | 'warning' | 'inherit'\n\n/** When the link is underlined: always, on hover and focus only, or never. */\nexport type LinkUnderline = 'always' | 'hover' | 'none'\n\ninterface LinkProps {\n /** Where the link goes. */\n href: string\n /**\n * The colour of the link. `neutral` takes the colour of the text; `inherit` takes the colour of\n * the parent, muted text for instance, and turns to the accent on hover.\n */\n tone?: LinkTone\n /**\n * When the link is underlined. Keep `always` inside running text, where colour alone does not\n * tell a link apart; `hover` and `none` suit menus and lists of links.\n */\n underline?: LinkUnderline\n /**\n * Opens the link in a new tab, with `rel=\"noopener noreferrer\"`, and says so: an icon, and\n * words for screen readers. A `target=\"_blank\"` passed as an attribute says so too.\n */\n external?: boolean\n /** The icon marking an external link: an icon name, or an explicit render. */\n externalIcon?: IconSource\n /** Removes the icon of an external link. Screen readers still hear that it opens a new tab. */\n hideExternalIcon?: boolean\n /** Makes the link unusable: its address is removed and it is marked `aria-disabled`. */\n disabled?: boolean\n}\n\n// The attributes are bound by hand: on a disabled link, useInertLink drops the click listeners.\ndefineOptions({ inheritAttrs: false })\n\nconst props = withDefaults(defineProps<LinkProps>(), {\n tone: 'accent',\n underline: 'always',\n external: false,\n externalIcon: () => openInNewIcon,\n hideExternalIcon: false,\n disabled: false,\n})\n\ndefineSlots<{\n /** The text of the link. */\n default(): unknown\n}>()\n\nconst attrs = useAttrs()\nconst m = useMessages()\n\nconst link = useInertLink({\n href: () => props.href,\n inert: () => props.disabled,\n attrs: () => attrs,\n})\n\nconst newTab = computed(() => props.external || attrs.target === '_blank')\n</script>\n\n<template>\n <!-- `target` and `rel` come before the forwarded attributes, which may replace them. -->\n <a\n class=\"v-link v-tone\"\n :data-tone=\"tone\"\n :data-underline=\"underline\"\n :target=\"external ? '_blank' : undefined\"\n :rel=\"external ? 'noopener noreferrer' : undefined\"\n :aria-disabled=\"link.isInertLink.value ? 'true' : undefined\"\n v-bind=\"link.attrs.value\"\n :href=\"link.linkHref.value\"\n ><slot /><template v-if=\"newTab\"\n ><VIcon\n v-if=\"!hideExternalIcon\"\n class=\"v-link-external\"\n v-bind=\"iconProps(externalIcon)\"\n mirrored\n /><span class=\"v-visually-hidden\">{{ m.link.newTab }}</span></template\n ></a\n >\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * The size, weight and line height are the surrounding text's. The icon follows that size too,\n * whatever icon size an ancestor sets.\n */\n .v-link {\n --vectis-icon-size: 1em;\n\n border-radius: var(--vectis-radius-xs);\n color: var(--tone-text-tinted);\n text-decoration-line: none;\n text-decoration-color: color-mix(in oklab, currentcolor 50%, transparent);\n cursor: pointer;\n transition: text-decoration-color var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-link[data-underline='always'],\n .v-link[data-underline='hover']:is(:hover, :focus-visible) {\n text-decoration-line: underline;\n }\n\n .v-link:hover {\n text-decoration-color: currentcolor;\n }\n\n /* No tone table: the link blends into its sentence, and only the hover singles it out. */\n .v-link[data-tone='inherit'] {\n color: inherit;\n }\n\n /* A disabled link keeps its subtle colour: the rule further down would lose to this one. */\n .v-link[data-tone='inherit']:hover:not([aria-disabled='true']) {\n color: var(--vectis-color-accent-text);\n }\n\n .v-link:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: var(--vectis-focus-ring-offset);\n }\n\n .v-link-external {\n margin-inline-start: var(--vectis-space-1);\n vertical-align: middle;\n }\n\n .v-link[aria-disabled='true'] {\n color: var(--vectis-color-text-subtle);\n text-decoration-color: currentcolor;\n cursor: not-allowed;\n }\n\n @media (forced-colors: active) {\n .v-link[aria-disabled='true'] {\n color: GrayText;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-link {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"VLink.js","names":["_sfc_main","VLink_vue_vue_type_script_setup_true_lang_default","VLink_default"],"sources":["../../../src/components/VLink/VLink.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @a11y @core\n/**\n * A native link painted in a tone. It takes its size from the text around it. An external link\n * opens in a new tab and says so, with an icon and words for assistive technology.\n */\nimport { computed, useAttrs } from 'vue'\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { open_in_new as openInNewIcon } from '../VIcon/icons/open_in_new'\nimport type { IconSource } from '../VIcon/types'\nimport { useInertLink } from '../../composables/useInertLink'\nimport { useMessages } from '../../i18n/state'\n\n/**\n * The colour of the link. `neutral` takes the colour of the text; `inherit` takes the colour of\n * the parent and turns to the accent on hover.\n */\nexport type LinkTone = 'accent' | 'neutral' | 'danger' | 'success' | 'warning' | 'inherit'\n\n/** When the link is underlined: always, on hover and focus only, or never. */\nexport type LinkUnderline = 'always' | 'hover' | 'none'\n\ninterface LinkProps {\n /** Where the link goes. */\n href: string\n /**\n * The colour of the link. `neutral` takes the colour of the text; `inherit` takes the colour of\n * the parent, muted text for instance, and turns to the accent on hover.\n */\n tone?: LinkTone\n /**\n * When the link is underlined. Keep `always` inside running text, where colour alone does not\n * tell a link apart; `hover` and `none` suit menus and lists of links.\n */\n underline?: LinkUnderline\n /**\n * Opens the link in a new tab, with `rel=\"noopener noreferrer\"`, and says so: an icon, and\n * words for screen readers. A `target=\"_blank\"` passed as an attribute says so too.\n */\n external?: boolean\n /** The icon marking an external link: an icon name, or an explicit render. */\n externalIcon?: IconSource\n /** Removes the icon of an external link. Screen readers still hear that it opens a new tab. */\n hideExternalIcon?: boolean\n /** Makes the link unusable: its address is removed and it is marked `aria-disabled`. */\n disabled?: boolean\n}\n\n// The attributes are bound by hand: on a disabled link, useInertLink drops the click listeners.\ndefineOptions({ inheritAttrs: false })\n\nconst props = withDefaults(defineProps<LinkProps>(), {\n tone: 'accent',\n underline: 'always',\n external: false,\n externalIcon: () => openInNewIcon,\n hideExternalIcon: false,\n disabled: false,\n})\n\ndefineSlots<{\n /** The text of the link. */\n default(): unknown\n}>()\n\nconst attrs = useAttrs()\nconst m = useMessages()\n\nconst link = useInertLink({\n href: () => props.href,\n inert: () => props.disabled,\n attrs: () => attrs,\n})\n\nconst newTab = computed(() => props.external || attrs.target === '_blank')\n</script>\n\n<template>\n <!-- `target` and `rel` come before the forwarded attributes, which may replace them. -->\n <a\n class=\"v-link v-tone\"\n :data-tone=\"tone\"\n :data-underline=\"underline\"\n :target=\"external ? '_blank' : undefined\"\n :rel=\"external ? 'noopener noreferrer' : undefined\"\n :aria-disabled=\"link.isInertLink.value ? 'true' : undefined\"\n v-bind=\"link.attrs.value\"\n :href=\"link.linkHref.value\"\n ><slot /><template v-if=\"newTab\"\n ><VIcon\n v-if=\"!hideExternalIcon\"\n class=\"v-link-external\"\n v-bind=\"iconProps(externalIcon)\"\n mirrored\n /><span class=\"v-visually-hidden\">{{ m.link.newTab }}</span></template\n ></a\n >\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * The size, weight and line height are the surrounding text's. The icon follows that size too,\n * whatever icon size an ancestor sets.\n */\n .v-link {\n --vectis-icon-size: 1em;\n\n border-radius: var(--vectis-radius-xs);\n color: var(--tone-text-tinted);\n text-decoration-line: none;\n text-decoration-color: color-mix(in oklab, currentcolor 50%, transparent);\n cursor: pointer;\n transition: text-decoration-color var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-link[data-underline='always'],\n .v-link[data-underline='hover']:is(:hover, :focus-visible) {\n text-decoration-line: underline;\n }\n\n .v-link:hover {\n text-decoration-color: currentcolor;\n }\n\n /* No tone table: the link blends into its sentence, and only the hover singles it out. */\n .v-link[data-tone='inherit'] {\n color: inherit;\n }\n\n /* A disabled link keeps its subtle colour: the rule further down would lose to this one. */\n .v-link[data-tone='inherit']:hover:not([aria-disabled='true']) {\n color: var(--vectis-color-accent-text);\n }\n\n .v-link:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: var(--vectis-focus-ring-offset);\n }\n\n .v-link-external {\n margin-inline-start: var(--vectis-space-1);\n vertical-align: middle;\n }\n\n .v-link[aria-disabled='true'] {\n color: var(--vectis-color-text-subtle);\n text-decoration-color: currentcolor;\n cursor: not-allowed;\n }\n\n @media (forced-colors: active) {\n .v-link[aria-disabled='true'] {\n color: GrayText;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-link {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"VLink.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VLink/VLink.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @a11y @core\n/**\n * A native link painted in a tone. It takes its size from the text around it. An external link\n * opens in a new tab and says so, with an icon and words for assistive technology.\n */\nimport { computed, useAttrs } from 'vue'\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { open_in_new as openInNewIcon } from '../VIcon/icons/open_in_new'\nimport type { IconSource } from '../VIcon/types'\nimport { useInertLink } from '../../composables/useInertLink'\nimport { useMessages } from '../../i18n/state'\n\n/**\n * The colour of the link. `neutral` takes the colour of the text; `inherit` takes the colour of\n * the parent and turns to the accent on hover.\n */\nexport type LinkTone = 'accent' | 'neutral' | 'danger' | 'success' | 'warning' | 'inherit'\n\n/** When the link is underlined: always, on hover and focus only, or never. */\nexport type LinkUnderline = 'always' | 'hover' | 'none'\n\ninterface LinkProps {\n /** Where the link goes. */\n href: string\n /**\n * The colour of the link. `neutral` takes the colour of the text; `inherit` takes the colour of\n * the parent, muted text for instance, and turns to the accent on hover.\n */\n tone?: LinkTone\n /**\n * When the link is underlined. Keep `always` inside running text, where colour alone does not\n * tell a link apart; `hover` and `none` suit menus and lists of links.\n */\n underline?: LinkUnderline\n /**\n * Opens the link in a new tab, with `rel=\"noopener noreferrer\"`, and says so: an icon, and\n * words for screen readers. A `target=\"_blank\"` passed as an attribute says so too.\n */\n external?: boolean\n /** The icon marking an external link: an icon name, or an explicit render. */\n externalIcon?: IconSource\n /** Removes the icon of an external link. Screen readers still hear that it opens a new tab. */\n hideExternalIcon?: boolean\n /** Makes the link unusable: its address is removed and it is marked `aria-disabled`. */\n disabled?: boolean\n}\n\n// The attributes are bound by hand: on a disabled link, useInertLink drops the click listeners.\ndefineOptions({ inheritAttrs: false })\n\nconst props = withDefaults(defineProps<LinkProps>(), {\n tone: 'accent',\n underline: 'always',\n external: false,\n externalIcon: () => openInNewIcon,\n hideExternalIcon: false,\n disabled: false,\n})\n\ndefineSlots<{\n /** The text of the link. */\n default(): unknown\n}>()\n\nconst attrs = useAttrs()\nconst m = useMessages()\n\nconst link = useInertLink({\n href: () => props.href,\n inert: () => props.disabled,\n attrs: () => attrs,\n})\n\nconst newTab = computed(() => props.external || attrs.target === '_blank')\n</script>\n\n<template>\n <!-- `target` and `rel` come before the forwarded attributes, which may replace them. -->\n <a\n class=\"v-link v-tone\"\n :data-tone=\"tone\"\n :data-underline=\"underline\"\n :target=\"external ? '_blank' : undefined\"\n :rel=\"external ? 'noopener noreferrer' : undefined\"\n :aria-disabled=\"link.isInertLink.value ? 'true' : undefined\"\n v-bind=\"link.attrs.value\"\n :href=\"link.linkHref.value\"\n ><slot /><template v-if=\"newTab\"\n ><VIcon\n v-if=\"!hideExternalIcon\"\n class=\"v-link-external\"\n v-bind=\"iconProps(externalIcon)\"\n mirrored\n /><span class=\"v-visually-hidden\">{{ m.link.newTab }}</span></template\n ></a\n >\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * The size, weight and line height are the surrounding text's. The icon follows that size too,\n * whatever icon size an ancestor sets.\n */\n .v-link {\n --vectis-icon-size: 1em;\n\n border-radius: var(--vectis-radius-xs);\n color: var(--tone-text-tinted);\n text-decoration-line: none;\n text-decoration-color: color-mix(in oklab, currentcolor 50%, transparent);\n cursor: pointer;\n transition: text-decoration-color var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-link[data-underline='always'],\n .v-link[data-underline='hover']:is(:hover, :focus-visible) {\n text-decoration-line: underline;\n }\n\n .v-link:hover {\n text-decoration-color: currentcolor;\n }\n\n /* No tone table: the link blends into its sentence, and only the hover singles it out. */\n .v-link[data-tone='inherit'] {\n color: inherit;\n }\n\n /* A disabled link keeps its subtle colour: the rule further down would lose to this one. */\n .v-link[data-tone='inherit']:hover:not([aria-disabled='true']) {\n color: var(--vectis-color-accent-text);\n }\n\n .v-link:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: var(--vectis-focus-ring-offset);\n }\n\n .v-link-external {\n margin-inline-start: var(--vectis-space-1);\n vertical-align: middle;\n }\n\n .v-link[aria-disabled='true'] {\n color: var(--vectis-color-text-subtle);\n text-decoration-color: currentcolor;\n cursor: not-allowed;\n }\n\n @media (forced-colors: active) {\n .v-link[aria-disabled='true'] {\n color: GrayText;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-link {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqDA,IAAM,IAAQ,GAcR,IAAQ,EAAS,GACjB,IAAI,EAAY,GAEhB,IAAO,EAAa;GACxB,YAAY,EAAM;GAClB,aAAa,EAAM;GACnB,aAAa;EACf,CAAC,GAEK,IAAS,QAAe,EAAM,YAAY,EAAM,WAAW,QAAQ;yBAKvE,EAiBC,KAjBD,EAiBC;GAhBC,OAAM;GACL,aAAW,EAAA;GACX,kBAAgB,EAAA;GAChB,QAAQ,EAAA,WAAQ,WAAc,KAAA;GAC9B,KAAK,EAAA,WAAQ,wBAA2B,KAAA;GACxC,iBAAe,EAAA,CAAA,CAAI,CAAC,YAAY,QAAK,SAAY,KAAA;KAC1C,EAAA,CAAA,CAAI,CAAC,MAAM,OAAK,EACvB,MAAM,EAAA,CAAA,CAAI,CAAC,SAAS,MAAA,CAAA,GAAA,CACpB,EAAQ,EAAA,QAAA,SAAA,GAAgB,EAAA,SAAA,EAAA,GAAhB,EAOR,GAAA,EAAA,KAAA,EAAA,GAAA,CALU,EAAA,mBAGC,EAAA,IAAA,EAAA,KAHD,EAAA,GADR,EAKC,GALD,EAKC;;GAHA,OAAM;KACE,EAAA,CAAA,CAAS,CAAC,EAAA,YAAY,GAAA,EAC9B,UAAA,GAAQ,CAAA,GAAA,MAAA,EAAA,IACR,EAA0D,QAA1D,GAA0D,EAAvB,EAAA,CAAA,CAAC,CAAC,KAAK,MAAM,GAAA,CAAA,CAAA,GAAA,EAAA,KAAA,EAAA,IAAA,EAAA,CAAA,GAAA,IAAA,CAAA"}
1
+ {"version":3,"file":"VLink.vue_vue_type_script_setup_true_lang.js","names":["openInNewIcon","_openBlock","_createElementBlock","_mergeProps","_unref","_renderSlot","_Fragment","_createBlock","VIcon","_createCommentVNode","_createElementVNode","_toDisplayString","VIcon_default","_hoisted_1","_hoisted_2","VLink_vue_vue_type_script_setup_true_lang_default","open_in_new","props","__props","attrs","useAttrs","m","useMessages","link","useInertLink","newTab","computed","openBlock","createElementBlock","mergeProps","unref","renderSlot","_ctx","Fragment","createCommentVNode","createBlock","iconProps","createElementVNode","toDisplayString"],"sources":["../../../src/components/VLink/VLink.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @a11y @core\n/**\n * A native link painted in a tone. It takes its size from the text around it. An external link\n * opens in a new tab and says so, with an icon and words for assistive technology.\n */\nimport { computed, useAttrs } from 'vue'\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { open_in_new as openInNewIcon } from '../VIcon/icons/open_in_new'\nimport type { IconSource } from '../VIcon/types'\nimport { useInertLink } from '../../composables/useInertLink'\nimport { useMessages } from '../../i18n/state'\n\n/**\n * The colour of the link. `neutral` takes the colour of the text; `inherit` takes the colour of\n * the parent and turns to the accent on hover.\n */\nexport type LinkTone = 'accent' | 'neutral' | 'danger' | 'success' | 'warning' | 'inherit'\n\n/** When the link is underlined: always, on hover and focus only, or never. */\nexport type LinkUnderline = 'always' | 'hover' | 'none'\n\ninterface LinkProps {\n /** Where the link goes. */\n href: string\n /**\n * The colour of the link. `neutral` takes the colour of the text; `inherit` takes the colour of\n * the parent, muted text for instance, and turns to the accent on hover.\n */\n tone?: LinkTone\n /**\n * When the link is underlined. Keep `always` inside running text, where colour alone does not\n * tell a link apart; `hover` and `none` suit menus and lists of links.\n */\n underline?: LinkUnderline\n /**\n * Opens the link in a new tab, with `rel=\"noopener noreferrer\"`, and says so: an icon, and\n * words for screen readers. A `target=\"_blank\"` passed as an attribute says so too.\n */\n external?: boolean\n /** The icon marking an external link: an icon name, or an explicit render. */\n externalIcon?: IconSource\n /** Removes the icon of an external link. Screen readers still hear that it opens a new tab. */\n hideExternalIcon?: boolean\n /** Makes the link unusable: its address is removed and it is marked `aria-disabled`. */\n disabled?: boolean\n}\n\n// The attributes are bound by hand: on a disabled link, useInertLink drops the click listeners.\ndefineOptions({ inheritAttrs: false })\n\nconst props = withDefaults(defineProps<LinkProps>(), {\n tone: 'accent',\n underline: 'always',\n external: false,\n externalIcon: () => openInNewIcon,\n hideExternalIcon: false,\n disabled: false,\n})\n\ndefineSlots<{\n /** The text of the link. */\n default(): unknown\n}>()\n\nconst attrs = useAttrs()\nconst m = useMessages()\n\nconst link = useInertLink({\n href: () => props.href,\n inert: () => props.disabled,\n attrs: () => attrs,\n})\n\nconst newTab = computed(() => props.external || attrs.target === '_blank')\n</script>\n\n<template>\n <!-- `target` and `rel` come before the forwarded attributes, which may replace them. -->\n <a\n class=\"v-link v-tone\"\n :data-tone=\"tone\"\n :data-underline=\"underline\"\n :target=\"external ? '_blank' : undefined\"\n :rel=\"external ? 'noopener noreferrer' : undefined\"\n :aria-disabled=\"link.isInertLink.value ? 'true' : undefined\"\n v-bind=\"link.attrs.value\"\n :href=\"link.linkHref.value\"\n ><slot /><template v-if=\"newTab\"\n ><VIcon\n v-if=\"!hideExternalIcon\"\n class=\"v-link-external\"\n v-bind=\"iconProps(externalIcon)\"\n mirrored\n /><span class=\"v-visually-hidden\">{{ m.link.newTab }}</span></template\n ></a\n >\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * The size, weight and line height are the surrounding text's. The icon follows that size too,\n * whatever icon size an ancestor sets.\n */\n .v-link {\n --vectis-icon-size: 1em;\n\n border-radius: var(--vectis-radius-xs);\n color: var(--tone-text-tinted);\n text-decoration-line: none;\n text-decoration-color: color-mix(in oklab, currentcolor 50%, transparent);\n cursor: pointer;\n transition: text-decoration-color var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-link[data-underline='always'],\n .v-link[data-underline='hover']:is(:hover, :focus-visible) {\n text-decoration-line: underline;\n }\n\n .v-link:hover {\n text-decoration-color: currentcolor;\n }\n\n /* No tone table: the link blends into its sentence, and only the hover singles it out. */\n .v-link[data-tone='inherit'] {\n color: inherit;\n }\n\n /* A disabled link keeps its subtle colour: the rule further down would lose to this one. */\n .v-link[data-tone='inherit']:hover:not([aria-disabled='true']) {\n color: var(--vectis-color-accent-text);\n }\n\n .v-link:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: var(--vectis-focus-ring-offset);\n }\n\n .v-link-external {\n margin-inline-start: var(--vectis-space-1);\n vertical-align: middle;\n }\n\n .v-link[aria-disabled='true'] {\n color: var(--vectis-color-text-subtle);\n text-decoration-color: currentcolor;\n cursor: not-allowed;\n }\n\n @media (forced-colors: active) {\n .v-link[aria-disabled='true'] {\n color: GrayText;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-link {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqDA,IAAMiB,IAAQC,GAcRC,IAAQC,EAAS,GACjBC,IAAIC,EAAY,GAEhBC,IAAOC,EAAa;GACxB,YAAYP,EAAM;GAClB,aAAaA,EAAM;GACnB,aAAaE;EACf,CAAC,GAEKM,IAASC,QAAeT,EAAM,YAAYE,EAAM,WAAW,QAAQ;oBAKvElB,EAAA,GAAAC,EAiBC,KAjBDC,EAiBC;GAhBC,OAAM;GACL,aAAWe,EAAA;GACX,kBAAgBA,EAAA;GAChB,QAAQA,EAAA,WAAQ,WAAc,KAAA;GAC9B,KAAKA,EAAA,WAAQ,wBAA2B,KAAA;GACxC,iBAAed,EAAAmB,CAAA,CAAI,CAAC,YAAY,QAAK,SAAY,KAAA;EAC1C,GAAAnB,EAAAmB,CAAA,CAAI,CAAC,MAAM,OAAK,EACvB,MAAMnB,EAAAmB,CAAA,CAAI,CAAC,SAAS,MAAA,CAAA,GAAA,CACpBlB,EAAQ2B,EAAA,QAAA,SAAA,GAAgBP,EAAA,SAAhBxB,EAAA,GAAAC,EAORI,GAAA,EAAA,KAAA,EAAA,GAAA,CALUY,EAAA,mBAGCgB,EAAA,IAAA,EAAA,KAJTjC,EAAA,GAAAM,EAKCC,GALDL,EAKC;;GAHA,OAAM;EACE,GAAAC,EAAAgC,CAAA,CAAS,CAAClB,EAAA,YAAY,GAAA,EAC9B,UAAA,GAAQ,CAAA,GAAA,MAAA,EAAA,IACRR,EAA0D,QAA1DI,GAA0DH,EAAvBP,EAAAiB,CAAA,CAAC,CAAC,KAAK,MAAM,GAAA,CAAA,CAAA,GAAA,EAAA,KAAAa,EAAA,IAAA,EAAA,CAAA,GAAA,IAAArB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"VListboxChevron.js","names":[],"sources":["../../../src/components/VListbox/VListboxChevron.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Draw the chevron at the end of a field owning a listbox, turned while the list is open. It is\n * decorative: the field itself says whether the list is expanded.\n */\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport type { IconSource } from '../VIcon/types'\n\ninterface ListboxChevronProps {\n /** The icon to draw. */\n icon: IconSource\n /** Whether the list is open. */\n open?: boolean\n}\n\nwithDefaults(defineProps<ListboxChevronProps>(), { open: false })\n</script>\n\n<template>\n <!-- `.v-input-icon-end` lets VInput pin it to the end of the field and reserve its room. -->\n <VIcon\n v-bind=\"iconProps(icon)\"\n class=\"v-listbox-chevron v-input-icon-end\"\n :data-open=\"open ? '' : undefined\"\n aria-hidden=\"true\"\n />\n</template>\n\n<style>\n@layer vectis.components {\n .v-listbox-chevron {\n color: var(--vectis-color-text-muted);\n transition: rotate var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-listbox-chevron[data-open] {\n rotate: 180deg;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-listbox-chevron {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"VListboxChevron.js","names":["_sfc_main","VListboxChevron_vue_vue_type_script_setup_true_lang_default","VListboxChevron_default"],"sources":["../../../src/components/VListbox/VListboxChevron.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Draw the chevron at the end of a field owning a listbox, turned while the list is open. It is\n * decorative: the field itself says whether the list is expanded.\n */\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport type { IconSource } from '../VIcon/types'\n\ninterface ListboxChevronProps {\n /** The icon to draw. */\n icon: IconSource\n /** Whether the list is open. */\n open?: boolean\n}\n\nwithDefaults(defineProps<ListboxChevronProps>(), { open: false })\n</script>\n\n<template>\n <!-- `.v-input-icon-end` lets VInput pin it to the end of the field and reserve its room. -->\n <VIcon\n v-bind=\"iconProps(icon)\"\n class=\"v-listbox-chevron v-input-icon-end\"\n :data-open=\"open ? '' : undefined\"\n aria-hidden=\"true\"\n />\n</template>\n\n<style>\n@layer vectis.components {\n .v-listbox-chevron {\n color: var(--vectis-color-text-muted);\n transition: rotate var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-listbox-chevron[data-open] {\n rotate: 180deg;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-listbox-chevron {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"VListboxChevron.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VListbox/VListboxChevron.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Draw the chevron at the end of a field owning a listbox, turned while the list is open. It is\n * decorative: the field itself says whether the list is expanded.\n */\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport type { IconSource } from '../VIcon/types'\n\ninterface ListboxChevronProps {\n /** The icon to draw. */\n icon: IconSource\n /** Whether the list is open. */\n open?: boolean\n}\n\nwithDefaults(defineProps<ListboxChevronProps>(), { open: false })\n</script>\n\n<template>\n <!-- `.v-input-icon-end` lets VInput pin it to the end of the field and reserve its room. -->\n <VIcon\n v-bind=\"iconProps(icon)\"\n class=\"v-listbox-chevron v-input-icon-end\"\n :data-open=\"open ? '' : undefined\"\n aria-hidden=\"true\"\n />\n</template>\n\n<style>\n@layer vectis.components {\n .v-listbox-chevron {\n color: var(--vectis-color-text-muted);\n transition: rotate var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-listbox-chevron[data-open] {\n rotate: 180deg;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-listbox-chevron {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;yBAqBE,EAKE,GALF,EACU,EAIR,CAAA,CAJiB,CAAC,EAAA,IAAI,GAAA;GACtB,OAAM;GACL,aAAW,EAAA,OAAI,KAAQ,KAAA;GACxB,eAAY"}
1
+ {"version":3,"file":"VListboxChevron.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","VIcon","_mergeProps","_unref","VIcon_default","VListboxChevron_vue_vue_type_script_setup_true_lang_default","openBlock","createBlock","mergeProps","unref","iconProps","__props"],"sources":["../../../src/components/VListbox/VListboxChevron.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Draw the chevron at the end of a field owning a listbox, turned while the list is open. It is\n * decorative: the field itself says whether the list is expanded.\n */\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport type { IconSource } from '../VIcon/types'\n\ninterface ListboxChevronProps {\n /** The icon to draw. */\n icon: IconSource\n /** Whether the list is open. */\n open?: boolean\n}\n\nwithDefaults(defineProps<ListboxChevronProps>(), { open: false })\n</script>\n\n<template>\n <!-- `.v-input-icon-end` lets VInput pin it to the end of the field and reserve its room. -->\n <VIcon\n v-bind=\"iconProps(icon)\"\n class=\"v-listbox-chevron v-input-icon-end\"\n :data-open=\"open ? '' : undefined\"\n aria-hidden=\"true\"\n />\n</template>\n\n<style>\n@layer vectis.components {\n .v-listbox-chevron {\n color: var(--vectis-color-text-muted);\n transition: rotate var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-listbox-chevron[data-open] {\n rotate: 180deg;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-listbox-chevron {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;oBAqBEA,EAAA,GAAAC,EAKEC,GALFC,EACUC,EAIRO,CAAA,CAJiB,CAACC,EAAA,IAAI,GAAA;GACtB,OAAM;GACL,aAAWA,EAAA,OAAI,KAAQ,KAAA;GACxB,eAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"VListboxGroup.js","names":[],"sources":["../../../src/components/VListbox/VListboxGroup.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Group generated options under their accessible label; groups and options are the listbox's\n * permitted children. The panel renders the heading among the group's rows, so the virtual mode\n * can measure it and leave it out like any other row.\n */\n\ninterface ListboxGroupProps {\n /** The name of the block. */\n label: string\n /**\n * The id of the heading rendered inside the group, which then names it. Without one, the\n * heading is out of the rendered window and the name is given as `aria-label`.\n */\n labelId?: string\n}\n\ndefineProps<ListboxGroupProps>()\n\ndefineSlots<{\n /** The heading and the options belonging to this block. */\n default(): unknown\n}>()\n</script>\n\n<template>\n <div\n role=\"group\"\n class=\"v-listbox-group\"\n :aria-labelledby=\"labelId\"\n :aria-label=\"labelId ? undefined : label\"\n >\n <slot />\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * It refuses to shrink, where a menu group has no need to: this panel is a column of bounded\n * height that scrolls, and a block left free to shrink would be squashed to make its content\n * fit; the same reason the state rows and the foot of the list refuse it too. Its gap matches\n * the panel's, which the virtual mode relies on to size the space standing for hidden rows.\n */\n .v-listbox-group {\n display: flex;\n flex: none;\n flex-direction: column;\n gap: var(--vectis-space-1);\n }\n\n /* The heading is a row of the panel: it is not something that can be chosen. */\n .v-listbox-group-label {\n display: flex;\n flex: none;\n align-items: center;\n min-block-size: var(--control-height);\n padding-block: var(--vectis-space-1);\n padding-inline: var(--control-padding-inline);\n font-size: var(--vectis-text-overline-size);\n font-weight: var(--vectis-text-overline-weight);\n letter-spacing: var(--vectis-text-overline-tracking);\n color: var(--vectis-color-text-muted);\n }\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"VListboxGroup.js","names":["_sfc_main","VListboxGroup_vue_vue_type_script_setup_true_lang_default","VListboxGroup_default"],"sources":["../../../src/components/VListbox/VListboxGroup.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Group generated options under their accessible label; groups and options are the listbox's\n * permitted children. The panel renders the heading among the group's rows, so the virtual mode\n * can measure it and leave it out like any other row.\n */\n\ninterface ListboxGroupProps {\n /** The name of the block. */\n label: string\n /**\n * The id of the heading rendered inside the group, which then names it. Without one, the\n * heading is out of the rendered window and the name is given as `aria-label`.\n */\n labelId?: string\n}\n\ndefineProps<ListboxGroupProps>()\n\ndefineSlots<{\n /** The heading and the options belonging to this block. */\n default(): unknown\n}>()\n</script>\n\n<template>\n <div\n role=\"group\"\n class=\"v-listbox-group\"\n :aria-labelledby=\"labelId\"\n :aria-label=\"labelId ? undefined : label\"\n >\n <slot />\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * It refuses to shrink, where a menu group has no need to: this panel is a column of bounded\n * height that scrolls, and a block left free to shrink would be squashed to make its content\n * fit; the same reason the state rows and the foot of the list refuse it too. Its gap matches\n * the panel's, which the virtual mode relies on to size the space standing for hidden rows.\n */\n .v-listbox-group {\n display: flex;\n flex: none;\n flex-direction: column;\n gap: var(--vectis-space-1);\n }\n\n /* The heading is a row of the panel: it is not something that can be chosen. */\n .v-listbox-group-label {\n display: flex;\n flex: none;\n align-items: center;\n min-block-size: var(--control-height);\n padding-block: var(--vectis-space-1);\n padding-inline: var(--control-padding-inline);\n font-size: var(--vectis-text-overline-size);\n font-weight: var(--vectis-text-overline-weight);\n letter-spacing: var(--vectis-text-overline-tracking);\n color: var(--vectis-color-text-muted);\n }\n}\n</style>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"VListboxGroup.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VListbox/VListboxGroup.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Group generated options under their accessible label; groups and options are the listbox's\n * permitted children. The panel renders the heading among the group's rows, so the virtual mode\n * can measure it and leave it out like any other row.\n */\n\ninterface ListboxGroupProps {\n /** The name of the block. */\n label: string\n /**\n * The id of the heading rendered inside the group, which then names it. Without one, the\n * heading is out of the rendered window and the name is given as `aria-label`.\n */\n labelId?: string\n}\n\ndefineProps<ListboxGroupProps>()\n\ndefineSlots<{\n /** The heading and the options belonging to this block. */\n default(): unknown\n}>()\n</script>\n\n<template>\n <div\n role=\"group\"\n class=\"v-listbox-group\"\n :aria-labelledby=\"labelId\"\n :aria-label=\"labelId ? undefined : label\"\n >\n <slot />\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * It refuses to shrink, where a menu group has no need to: this panel is a column of bounded\n * height that scrolls, and a block left free to shrink would be squashed to make its content\n * fit; the same reason the state rows and the foot of the list refuse it too. Its gap matches\n * the panel's, which the virtual mode relies on to size the space standing for hidden rows.\n */\n .v-listbox-group {\n display: flex;\n flex: none;\n flex-direction: column;\n gap: var(--vectis-space-1);\n }\n\n /* The heading is a row of the panel: it is not something that can be chosen. */\n .v-listbox-group-label {\n display: flex;\n flex: none;\n align-items: center;\n min-block-size: var(--control-height);\n padding-block: var(--vectis-space-1);\n padding-inline: var(--control-padding-inline);\n font-size: var(--vectis-text-overline-size);\n font-weight: var(--vectis-text-overline-weight);\n letter-spacing: var(--vectis-text-overline-tracking);\n color: var(--vectis-color-text-muted);\n }\n}\n</style>\n"],"mappings":";;;;;;;;;yBA0BE,EAOM,OAAA;GANJ,MAAK;GACL,OAAM;GACL,mBAAiB,EAAA;GACjB,cAAY,EAAA,UAAU,KAAA,IAAY,EAAA;MAEnC,EAAQ,EAAA,QAAA,SAAA,CAAA,GAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"VListboxGroup.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_renderSlot","_hoisted_1","VListboxGroup_vue_vue_type_script_setup_true_lang_default","openBlock","createElementBlock","__props","renderSlot","_ctx"],"sources":["../../../src/components/VListbox/VListboxGroup.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Group generated options under their accessible label; groups and options are the listbox's\n * permitted children. The panel renders the heading among the group's rows, so the virtual mode\n * can measure it and leave it out like any other row.\n */\n\ninterface ListboxGroupProps {\n /** The name of the block. */\n label: string\n /**\n * The id of the heading rendered inside the group, which then names it. Without one, the\n * heading is out of the rendered window and the name is given as `aria-label`.\n */\n labelId?: string\n}\n\ndefineProps<ListboxGroupProps>()\n\ndefineSlots<{\n /** The heading and the options belonging to this block. */\n default(): unknown\n}>()\n</script>\n\n<template>\n <div\n role=\"group\"\n class=\"v-listbox-group\"\n :aria-labelledby=\"labelId\"\n :aria-label=\"labelId ? undefined : label\"\n >\n <slot />\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * It refuses to shrink, where a menu group has no need to: this panel is a column of bounded\n * height that scrolls, and a block left free to shrink would be squashed to make its content\n * fit; the same reason the state rows and the foot of the list refuse it too. Its gap matches\n * the panel's, which the virtual mode relies on to size the space standing for hidden rows.\n */\n .v-listbox-group {\n display: flex;\n flex: none;\n flex-direction: column;\n gap: var(--vectis-space-1);\n }\n\n /* The heading is a row of the panel: it is not something that can be chosen. */\n .v-listbox-group-label {\n display: flex;\n flex: none;\n align-items: center;\n min-block-size: var(--control-height);\n padding-block: var(--vectis-space-1);\n padding-inline: var(--control-padding-inline);\n font-size: var(--vectis-text-overline-size);\n font-weight: var(--vectis-text-overline-weight);\n letter-spacing: var(--vectis-text-overline-tracking);\n color: var(--vectis-color-text-muted);\n }\n}\n</style>\n"],"mappings":";;;;;;;;;oBA0BEA,EAAA,GAAAC,EAOM,OAAA;GANJ,MAAK;GACL,OAAM;GACL,mBAAiBM,EAAA;GACjB,cAAYA,EAAA,UAAU,KAAA,IAAYA,EAAA;EAEnCL,GAAAA,CAAAA,EAAQO,EAAA,QAAA,SAAA,CAAA,GAAA,GAAAN,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"VListboxOption.js","names":[],"sources":["../../../src/components/VListbox/VListboxOption.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Options use aria-disabled while field focus stays on aria-activedescendant; do not apply\n * native disabling to the active-descendant target.\n */\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { check as checkIcon } from '../VIcon/icons/check'\nimport type { IconSource } from '../VIcon/types'\n\ninterface ListboxOptionProps {\n /** An icon before the label: an icon name, or an explicit render. */\n icon?: IconSource\n /** Marks the option as one of the chosen ones, which also draws the tick. */\n selected?: boolean\n /** Marks the option as the one currently highlighted. The field decides this. */\n active?: boolean\n /** Shows the option without allowing it to be chosen. */\n disabled?: boolean\n}\n\nconst props = withDefaults(defineProps<ListboxOptionProps>(), {\n icon: undefined,\n selected: false,\n active: false,\n disabled: false,\n})\n\nconst emit = defineEmits<{\n /** The option was clicked. What that does to the selection is the field's business. */\n select: []\n}>()\n\ndefineSlots<{\n /** What the row shows. */\n default?(): unknown\n}>()\n\nfunction onClick() {\n if (props.disabled) return\n emit('select')\n}\n</script>\n\n<template>\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"v-listbox-option\"\n :aria-selected=\"selected\"\n :aria-disabled=\"disabled ? 'true' : undefined\"\n :data-active=\"active ? '' : undefined\"\n @click=\"onClick\"\n >\n <VIcon v-if=\"icon\" v-bind=\"iconProps(icon)\" />\n <span class=\"v-listbox-option-label\"><slot /></span>\n <VIcon v-if=\"selected\" :name=\"checkIcon\" class=\"v-listbox-option-check\" />\n </button>\n</template>\n\n<style>\n@layer vectis.components {\n .v-listbox-option {\n /*\n * Every dimension is inherited from the panel, which carries the shared size class, and the\n * icons follow through the same inheritance. The type is composite, exactly as in a menu\n * row: the SIZE comes from the scale, the line height stays that of body text; a unitless\n * ratio, so it follows the size; and the weight stays regular, since a row may wrap.\n */\n display: flex;\n align-items: center;\n gap: var(--control-gap);\n width: 100%;\n min-height: var(--control-height);\n padding: var(--vectis-space-1) var(--control-padding-inline);\n border: none;\n background: transparent;\n color: var(--vectis-color-text);\n border-radius: min(var(--vectis-radius-interactive), calc(var(--control-height) / 2));\n font-family: inherit;\n font-size: var(--control-font-size);\n line-height: var(--vectis-text-body-md-leading);\n text-align: start;\n cursor: pointer;\n }\n\n /* The zero minimum is what allows a long label to be compressed at all: a flex item\n otherwise refuses to shrink below its own content. */\n .v-listbox-option-label {\n flex: 1;\n min-inline-size: 0;\n }\n\n /* A row is highlighted by the pointer resting on it, or by being the current one. There\n is deliberately no focus rule: the focus never arrives here, it stays in the field. */\n .v-listbox-option:hover:not([aria-disabled='true']),\n .v-listbox-option[data-active] {\n background: var(--vectis-color-surface-muted);\n outline: none;\n }\n\n .v-listbox-option[aria-selected='true'] {\n color: var(--vectis-color-accent-text);\n }\n\n /*\n * Matched on the ARIA state and not on the native one, which this component deliberately\n * never sets; see the introduction.\n */\n .v-listbox-option[aria-disabled='true'] {\n background: transparent;\n color: var(--vectis-color-text-subtle);\n cursor: not-allowed;\n }\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"VListboxOption.js","names":["_sfc_main","VListboxOption_vue_vue_type_script_setup_true_lang_default","VListboxOption_default"],"sources":["../../../src/components/VListbox/VListboxOption.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Options use aria-disabled while field focus stays on aria-activedescendant; do not apply\n * native disabling to the active-descendant target.\n */\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { check as checkIcon } from '../VIcon/icons/check'\nimport type { IconSource } from '../VIcon/types'\n\ninterface ListboxOptionProps {\n /** An icon before the label: an icon name, or an explicit render. */\n icon?: IconSource\n /** Marks the option as one of the chosen ones, which also draws the tick. */\n selected?: boolean\n /** Marks the option as the one currently highlighted. The field decides this. */\n active?: boolean\n /** Shows the option without allowing it to be chosen. */\n disabled?: boolean\n}\n\nconst props = withDefaults(defineProps<ListboxOptionProps>(), {\n icon: undefined,\n selected: false,\n active: false,\n disabled: false,\n})\n\nconst emit = defineEmits<{\n /** The option was clicked. What that does to the selection is the field's business. */\n select: []\n}>()\n\ndefineSlots<{\n /** What the row shows. */\n default?(): unknown\n}>()\n\nfunction onClick() {\n if (props.disabled) return\n emit('select')\n}\n</script>\n\n<template>\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"v-listbox-option\"\n :aria-selected=\"selected\"\n :aria-disabled=\"disabled ? 'true' : undefined\"\n :data-active=\"active ? '' : undefined\"\n @click=\"onClick\"\n >\n <VIcon v-if=\"icon\" v-bind=\"iconProps(icon)\" />\n <span class=\"v-listbox-option-label\"><slot /></span>\n <VIcon v-if=\"selected\" :name=\"checkIcon\" class=\"v-listbox-option-check\" />\n </button>\n</template>\n\n<style>\n@layer vectis.components {\n .v-listbox-option {\n /*\n * Every dimension is inherited from the panel, which carries the shared size class, and the\n * icons follow through the same inheritance. The type is composite, exactly as in a menu\n * row: the SIZE comes from the scale, the line height stays that of body text; a unitless\n * ratio, so it follows the size; and the weight stays regular, since a row may wrap.\n */\n display: flex;\n align-items: center;\n gap: var(--control-gap);\n width: 100%;\n min-height: var(--control-height);\n padding: var(--vectis-space-1) var(--control-padding-inline);\n border: none;\n background: transparent;\n color: var(--vectis-color-text);\n border-radius: min(var(--vectis-radius-interactive), calc(var(--control-height) / 2));\n font-family: inherit;\n font-size: var(--control-font-size);\n line-height: var(--vectis-text-body-md-leading);\n text-align: start;\n cursor: pointer;\n }\n\n /* The zero minimum is what allows a long label to be compressed at all: a flex item\n otherwise refuses to shrink below its own content. */\n .v-listbox-option-label {\n flex: 1;\n min-inline-size: 0;\n }\n\n /* A row is highlighted by the pointer resting on it, or by being the current one. There\n is deliberately no focus rule: the focus never arrives here, it stays in the field. */\n .v-listbox-option:hover:not([aria-disabled='true']),\n .v-listbox-option[data-active] {\n background: var(--vectis-color-surface-muted);\n outline: none;\n }\n\n .v-listbox-option[aria-selected='true'] {\n color: var(--vectis-color-accent-text);\n }\n\n /*\n * Matched on the ARIA state and not on the native one, which this component deliberately\n * never sets; see the introduction.\n */\n .v-listbox-option[aria-disabled='true'] {\n background: transparent;\n color: var(--vectis-color-text-subtle);\n cursor: not-allowed;\n }\n}\n</style>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"VListboxOption.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VListbox/VListboxOption.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Options use aria-disabled while field focus stays on aria-activedescendant; do not apply\n * native disabling to the active-descendant target.\n */\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { check as checkIcon } from '../VIcon/icons/check'\nimport type { IconSource } from '../VIcon/types'\n\ninterface ListboxOptionProps {\n /** An icon before the label: an icon name, or an explicit render. */\n icon?: IconSource\n /** Marks the option as one of the chosen ones, which also draws the tick. */\n selected?: boolean\n /** Marks the option as the one currently highlighted. The field decides this. */\n active?: boolean\n /** Shows the option without allowing it to be chosen. */\n disabled?: boolean\n}\n\nconst props = withDefaults(defineProps<ListboxOptionProps>(), {\n icon: undefined,\n selected: false,\n active: false,\n disabled: false,\n})\n\nconst emit = defineEmits<{\n /** The option was clicked. What that does to the selection is the field's business. */\n select: []\n}>()\n\ndefineSlots<{\n /** What the row shows. */\n default?(): unknown\n}>()\n\nfunction onClick() {\n if (props.disabled) return\n emit('select')\n}\n</script>\n\n<template>\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"v-listbox-option\"\n :aria-selected=\"selected\"\n :aria-disabled=\"disabled ? 'true' : undefined\"\n :data-active=\"active ? '' : undefined\"\n @click=\"onClick\"\n >\n <VIcon v-if=\"icon\" v-bind=\"iconProps(icon)\" />\n <span class=\"v-listbox-option-label\"><slot /></span>\n <VIcon v-if=\"selected\" :name=\"checkIcon\" class=\"v-listbox-option-check\" />\n </button>\n</template>\n\n<style>\n@layer vectis.components {\n .v-listbox-option {\n /*\n * Every dimension is inherited from the panel, which carries the shared size class, and the\n * icons follow through the same inheritance. The type is composite, exactly as in a menu\n * row: the SIZE comes from the scale, the line height stays that of body text; a unitless\n * ratio, so it follows the size; and the weight stays regular, since a row may wrap.\n */\n display: flex;\n align-items: center;\n gap: var(--control-gap);\n width: 100%;\n min-height: var(--control-height);\n padding: var(--vectis-space-1) var(--control-padding-inline);\n border: none;\n background: transparent;\n color: var(--vectis-color-text);\n border-radius: min(var(--vectis-radius-interactive), calc(var(--control-height) / 2));\n font-family: inherit;\n font-size: var(--control-font-size);\n line-height: var(--vectis-text-body-md-leading);\n text-align: start;\n cursor: pointer;\n }\n\n /* The zero minimum is what allows a long label to be compressed at all: a flex item\n otherwise refuses to shrink below its own content. */\n .v-listbox-option-label {\n flex: 1;\n min-inline-size: 0;\n }\n\n /* A row is highlighted by the pointer resting on it, or by being the current one. There\n is deliberately no focus rule: the focus never arrives here, it stays in the field. */\n .v-listbox-option:hover:not([aria-disabled='true']),\n .v-listbox-option[data-active] {\n background: var(--vectis-color-surface-muted);\n outline: none;\n }\n\n .v-listbox-option[aria-selected='true'] {\n color: var(--vectis-color-accent-text);\n }\n\n /*\n * Matched on the ARIA state and not on the native one, which this component deliberately\n * never sets; see the introduction.\n */\n .v-listbox-option[aria-disabled='true'] {\n background: transparent;\n color: var(--vectis-color-text-subtle);\n cursor: not-allowed;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBA,IAAM,IAAQ,GAOR,IAAO;EAUb,SAAS,IAAU;GACb,EAAM,YACV,EAAK,QAAQ;EACf;yBAIE,EAaS,UAAA;GAZP,MAAK;GACL,MAAK;GACL,UAAS;GACT,OAAM;GACL,iBAAe,EAAA;GACf,iBAAe,EAAA,WAAQ,SAAY,KAAA;GACnC,eAAa,EAAA,SAAM,KAAQ,KAAA;GACpB;;GAEK,EAAA,QAAA,EAAA,GAAb,EAA8C,GAAA,EAAA,EAAA,EAAA,KAAA,EAAA,GAAnB,EAAA,CAAA,CAAS,CAAC,EAAA,IAAI,CAAA,CAAA,GAAA,MAAA,EAAA,KAAA,EAAA,IAAA,EAAA;GACzC,EAAoD,QAApD,GAAoD,CAAf,EAAQ,EAAA,QAAA,SAAA,CAAA,CAAA;GAChC,EAAA,YAAA,EAAA,GAAb,EAA0E,GAAA;;IAAlD,MAAM,EAAA,CAAA;IAAW,OAAM"}
1
+ {"version":3,"file":"VListboxOption.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_createBlock","VIcon","_normalizeProps","_mergeProps","_unref","_createCommentVNode","_createElementVNode","_renderSlot","checkIcon","VIcon_default","_hoisted_1","_hoisted_2","VListboxOption_vue_vue_type_script_setup_true_lang_default","__emit","props","__props","emit","onClick","openBlock","createElementBlock","createBlock","normalizeProps","mergeProps","unref","iconProps","createCommentVNode","createElementVNode","renderSlot","_ctx","check"],"sources":["../../../src/components/VListbox/VListboxOption.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Options use aria-disabled while field focus stays on aria-activedescendant; do not apply\n * native disabling to the active-descendant target.\n */\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { check as checkIcon } from '../VIcon/icons/check'\nimport type { IconSource } from '../VIcon/types'\n\ninterface ListboxOptionProps {\n /** An icon before the label: an icon name, or an explicit render. */\n icon?: IconSource\n /** Marks the option as one of the chosen ones, which also draws the tick. */\n selected?: boolean\n /** Marks the option as the one currently highlighted. The field decides this. */\n active?: boolean\n /** Shows the option without allowing it to be chosen. */\n disabled?: boolean\n}\n\nconst props = withDefaults(defineProps<ListboxOptionProps>(), {\n icon: undefined,\n selected: false,\n active: false,\n disabled: false,\n})\n\nconst emit = defineEmits<{\n /** The option was clicked. What that does to the selection is the field's business. */\n select: []\n}>()\n\ndefineSlots<{\n /** What the row shows. */\n default?(): unknown\n}>()\n\nfunction onClick() {\n if (props.disabled) return\n emit('select')\n}\n</script>\n\n<template>\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"v-listbox-option\"\n :aria-selected=\"selected\"\n :aria-disabled=\"disabled ? 'true' : undefined\"\n :data-active=\"active ? '' : undefined\"\n @click=\"onClick\"\n >\n <VIcon v-if=\"icon\" v-bind=\"iconProps(icon)\" />\n <span class=\"v-listbox-option-label\"><slot /></span>\n <VIcon v-if=\"selected\" :name=\"checkIcon\" class=\"v-listbox-option-check\" />\n </button>\n</template>\n\n<style>\n@layer vectis.components {\n .v-listbox-option {\n /*\n * Every dimension is inherited from the panel, which carries the shared size class, and the\n * icons follow through the same inheritance. The type is composite, exactly as in a menu\n * row: the SIZE comes from the scale, the line height stays that of body text; a unitless\n * ratio, so it follows the size; and the weight stays regular, since a row may wrap.\n */\n display: flex;\n align-items: center;\n gap: var(--control-gap);\n width: 100%;\n min-height: var(--control-height);\n padding: var(--vectis-space-1) var(--control-padding-inline);\n border: none;\n background: transparent;\n color: var(--vectis-color-text);\n border-radius: min(var(--vectis-radius-interactive), calc(var(--control-height) / 2));\n font-family: inherit;\n font-size: var(--control-font-size);\n line-height: var(--vectis-text-body-md-leading);\n text-align: start;\n cursor: pointer;\n }\n\n /* The zero minimum is what allows a long label to be compressed at all: a flex item\n otherwise refuses to shrink below its own content. */\n .v-listbox-option-label {\n flex: 1;\n min-inline-size: 0;\n }\n\n /* A row is highlighted by the pointer resting on it, or by being the current one. There\n is deliberately no focus rule: the focus never arrives here, it stays in the field. */\n .v-listbox-option:hover:not([aria-disabled='true']),\n .v-listbox-option[data-active] {\n background: var(--vectis-color-surface-muted);\n outline: none;\n }\n\n .v-listbox-option[aria-selected='true'] {\n color: var(--vectis-color-accent-text);\n }\n\n /*\n * Matched on the ARIA state and not on the native one, which this component deliberately\n * never sets; see the introduction.\n */\n .v-listbox-option[aria-disabled='true'] {\n background: transparent;\n color: var(--vectis-color-text-subtle);\n cursor: not-allowed;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBA,IAAMgB,IAAQC,GAORC,IAAOH;EAUb,SAASI,IAAU;GACjB,AAAIH,EAAM,YACVE,EAAK,QAAQ;EACf;oBAIElB,EAAA,GAAAC,EAaS,UAAA;GAZP,MAAK;GACL,MAAK;GACL,UAAS;GACT,OAAM;GACL,iBAAegB,EAAA;GACf,iBAAeA,EAAA,WAAQ,SAAY,KAAA;GACnC,eAAaA,EAAA,SAAM,KAAQ,KAAA;GACpB;;GAEKA,EAAA,QAAbjB,EAAA,GAAAE,EAA8CC,GAAAC,EAAAC,EAAA,EAAA,KAAA,EAAA,GAAnBC,EAAAoB,CAAA,CAAS,CAACT,EAAA,IAAI,CAAA,CAAA,GAAA,MAAA,EAAA,KAAAU,EAAA,IAAA,EAAA;GACzCnB,EAAoD,QAApDK,GAAoD,CAAfJ,EAAQqB,EAAA,QAAA,SAAA,CAAA,CAAA;GAChCb,EAAA,YAAbjB,EAAA,GAAAE,EAA0EC,GAAA;;IAAlD,MAAMG,EAAAI,CAAA;IAAW,OAAM"}
@@ -10,8 +10,6 @@ interface ListboxPanelProps {
10
10
  placement: PopoverPlacement;
11
11
  /** The size the options take, the field's own. */
12
12
  size: 'sm' | 'md' | 'lg';
13
- /** The field's reduced density. */
14
- compact?: boolean;
15
13
  /** Several options can be chosen. */
16
14
  multiple?: boolean;
17
15
  /** Only the rows near the visible part of the panel are rendered. */
@@ -45,7 +43,6 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
45
43
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
46
44
  onHighlight?: ((row: ListboxRenderedOption) => any) | undefined;
47
45
  }>, {
48
- compact: boolean;
49
46
  multiple: boolean;
50
47
  virtual: boolean;
51
48
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"VListboxPanel.js","names":[],"sources":["../../../src/components/VListbox/VListboxPanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @a11y\n/**\n * Render the floating listbox of VCombobox and VSelect from the rows `useListbox` works out. The\n * panel carries both the listbox role and the scrolling: the virtual window, the scrolling of the\n * highlighted option and the observer watching for the end of the list all rely on it, so no\n * wrapper may come between them.\n */\nimport { computed, ref } from 'vue'\n\nimport type { Listbox, ListboxBlock, ListboxRenderedOption } from '../../composables/useListbox'\nimport type { ListboxOption, ListboxOptionSlotProps } from '../../types'\nimport VPopover, { type PopoverPlacement } from '../VPopover/VPopover.vue'\nimport VListboxGroup from './VListboxGroup.vue'\nimport VListboxOption from './VListboxOption.vue'\nimport VListboxSeparator from './VListboxSeparator.vue'\n\ninterface ListboxPanelProps {\n /** The panel's id, which the field points at through `aria-controls`. */\n id: string\n /** The CSS anchor name the owner sets on its field, which the panel opens against. */\n anchor: string\n /** Where the panel opens relative to the field. */\n placement: PopoverPlacement\n /** The size the options take, the field's own. */\n size: 'sm' | 'md' | 'lg'\n /** The field's reduced density. */\n compact?: boolean\n /** Several options can be chosen. */\n multiple?: boolean\n /** Only the rows near the visible part of the panel are rendered. */\n virtual?: boolean\n /** The rows to render. */\n blocks: ListboxBlock[]\n /** Measures a rendered row, in the virtual mode. */\n measure: Listbox['measureRow']\n}\n\nwithDefaults(defineProps<ListboxPanelProps>(), {\n compact: false,\n multiple: false,\n virtual: false,\n})\n\n/** Whether the panel is showing. */\nconst open = defineModel<boolean>('open', { default: false })\n\nconst emit = defineEmits<{\n /** An option was clicked. What that does to the selection is the field's business. */\n select: [option: ListboxOption]\n /** The pointer moved over an option, which should become the highlighted one. */\n highlight: [row: ListboxRenderedOption]\n}>()\n\ndefineSlots<{\n /** What a row shows, in place of the plain label. */\n option?(props: ListboxOptionSlotProps): unknown\n /** Rows of the owner's own after the options: an empty state, a loading foot. */\n default?(): unknown\n}>()\n\nconst popoverRef = ref<InstanceType<typeof VPopover> | null>(null)\n\n// @a11y\n/*\n * The focus must never leave the field. Without cancelling the press, clicking an option takes\n * the focus off the field, the field's focusout closes the panel before the click is turned into\n * a selection, and choosing with the mouse stops working entirely.\n */\nfunction onMousedown(event: MouseEvent) {\n event.preventDefault()\n}\n\ndefineExpose({\n /** The panel element, which scrolls. */\n el: computed(() => popoverRef.value?.el ?? null),\n})\n</script>\n\n<template>\n <VPopover\n :id=\"id\"\n ref=\"popoverRef\"\n v-model:open=\"open\"\n mode=\"manual\"\n :anchor=\"anchor\"\n match-trigger\n :placement=\"placement\"\n role=\"listbox\"\n class=\"v-listbox-panel v-control\"\n :data-size=\"size\"\n :data-compact=\"compact ? '' : undefined\"\n :aria-multiselectable=\"multiple ? 'true' : undefined\"\n :data-virtual=\"virtual ? '' : undefined\"\n @mousedown=\"onMousedown\"\n >\n <template v-for=\"block in blocks\" :key=\"block.key\">\n <div\n v-if=\"block.kind === 'spacer'\"\n class=\"v-listbox-spacer\"\n aria-hidden=\"true\"\n :style=\"{ blockSize: `${block.size}px` }\"\n />\n\n <VListboxSeparator\n v-else-if=\"block.kind === 'separator'\"\n :ref=\"virtual ? (el) => measure(el, block.at) : undefined\"\n />\n\n <VListboxGroup\n v-else-if=\"block.kind === 'group'\"\n :label=\"block.label\"\n :label-id=\"block.labelId\"\n >\n <template v-for=\"child in block.children\" :key=\"child.key\">\n <div\n v-if=\"child.kind === 'spacer'\"\n class=\"v-listbox-spacer\"\n aria-hidden=\"true\"\n :style=\"{ blockSize: `${child.size}px` }\"\n />\n <span\n v-else-if=\"child.kind === 'heading'\"\n :id=\"child.id\"\n :ref=\"virtual ? (el) => measure(el, child.at) : undefined\"\n class=\"v-listbox-group-label\"\n >{{ child.label }}</span\n >\n <VListboxOption\n v-else-if=\"child.kind === 'option'\"\n :ref=\"virtual ? (el) => measure(el, child.at) : undefined\"\n v-bind=\"child.row\"\n @select=\"emit('select', child.option)\"\n @pointermove=\"emit('highlight', child)\"\n >\n <slot name=\"option\" v-bind=\"child.slot\">{{ child.option.label }}</slot>\n </VListboxOption>\n </template>\n </VListboxGroup>\n\n <VListboxOption\n v-else-if=\"block.kind === 'option'\"\n :ref=\"virtual ? (el) => measure(el, block.at) : undefined\"\n v-bind=\"block.row\"\n @select=\"emit('select', block.option)\"\n @pointermove=\"emit('highlight', block)\"\n >\n <slot name=\"option\" v-bind=\"block.slot\">{{ block.option.label }}</slot>\n </VListboxOption>\n </template>\n\n <slot />\n </VPopover>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * VPopover brings the floating element, its open state, its anchoring, its placement and its\n * surface. The shared size class lets the options and the owner's state rows read their\n * dimensions from the panel with no size table here; the owner sets the maximum height.\n */\n .v-listbox-panel {\n overflow: auto;\n }\n\n /* The virtual mode corrects the scroll itself when a row above the view changes height. */\n .v-listbox-panel[data-virtual] {\n overflow-anchor: none;\n }\n\n .v-listbox-spacer {\n flex: none;\n }\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"VListboxPanel.js","names":["_sfc_main","VListboxPanel_vue_vue_type_script_setup_true_lang_default","VListboxPanel_default"],"sources":["../../../src/components/VListbox/VListboxPanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @a11y\n/**\n * Render the floating listbox of VCombobox and VSelect from the rows `useListbox` works out. The\n * panel carries both the listbox role and the scrolling: the virtual window, the scrolling of the\n * highlighted option and the observer watching for the end of the list all rely on it, so no\n * wrapper may come between them.\n */\nimport { computed, ref } from 'vue'\n\nimport type { Listbox, ListboxBlock, ListboxRenderedOption } from '../../composables/useListbox'\nimport type { ListboxOption, ListboxOptionSlotProps } from '../../types'\nimport VPopover, { type PopoverPlacement } from '../VPopover/VPopover.vue'\nimport VListboxGroup from './VListboxGroup.vue'\nimport VListboxOption from './VListboxOption.vue'\nimport VListboxSeparator from './VListboxSeparator.vue'\n\ninterface ListboxPanelProps {\n /** The panel's id, which the field points at through `aria-controls`. */\n id: string\n /** The CSS anchor name the owner sets on its field, which the panel opens against. */\n anchor: string\n /** Where the panel opens relative to the field. */\n placement: PopoverPlacement\n /** The size the options take, the field's own. */\n size: 'sm' | 'md' | 'lg'\n /** Several options can be chosen. */\n multiple?: boolean\n /** Only the rows near the visible part of the panel are rendered. */\n virtual?: boolean\n /** The rows to render. */\n blocks: ListboxBlock[]\n /** Measures a rendered row, in the virtual mode. */\n measure: Listbox['measureRow']\n}\n\nwithDefaults(defineProps<ListboxPanelProps>(), {\n multiple: false,\n virtual: false,\n})\n\n/** Whether the panel is showing. */\nconst open = defineModel<boolean>('open', { default: false })\n\nconst emit = defineEmits<{\n /** An option was clicked. What that does to the selection is the field's business. */\n select: [option: ListboxOption]\n /** The pointer moved over an option, which should become the highlighted one. */\n highlight: [row: ListboxRenderedOption]\n}>()\n\ndefineSlots<{\n /** What a row shows, in place of the plain label. */\n option?(props: ListboxOptionSlotProps): unknown\n /** Rows of the owner's own after the options: an empty state, a loading foot. */\n default?(): unknown\n}>()\n\nconst popoverRef = ref<InstanceType<typeof VPopover> | null>(null)\n\n// @a11y\n/*\n * The focus must never leave the field. Without cancelling the press, clicking an option takes\n * the focus off the field, the field's focusout closes the panel before the click is turned into\n * a selection, and choosing with the mouse stops working entirely.\n */\nfunction onMousedown(event: MouseEvent) {\n event.preventDefault()\n}\n\ndefineExpose({\n /** The panel element, which scrolls. */\n el: computed(() => popoverRef.value?.el ?? null),\n})\n</script>\n\n<template>\n <VPopover\n :id=\"id\"\n ref=\"popoverRef\"\n v-model:open=\"open\"\n mode=\"manual\"\n :anchor=\"anchor\"\n match-trigger\n :placement=\"placement\"\n role=\"listbox\"\n class=\"v-listbox-panel v-control\"\n :data-size=\"size\"\n :aria-multiselectable=\"multiple ? 'true' : undefined\"\n :data-virtual=\"virtual ? '' : undefined\"\n @mousedown=\"onMousedown\"\n >\n <template v-for=\"block in blocks\" :key=\"block.key\">\n <div\n v-if=\"block.kind === 'spacer'\"\n class=\"v-listbox-spacer\"\n aria-hidden=\"true\"\n :style=\"{ blockSize: `${block.size}px` }\"\n />\n\n <VListboxSeparator\n v-else-if=\"block.kind === 'separator'\"\n :ref=\"virtual ? (el) => measure(el, block.at) : undefined\"\n />\n\n <VListboxGroup\n v-else-if=\"block.kind === 'group'\"\n :label=\"block.label\"\n :label-id=\"block.labelId\"\n >\n <template v-for=\"child in block.children\" :key=\"child.key\">\n <div\n v-if=\"child.kind === 'spacer'\"\n class=\"v-listbox-spacer\"\n aria-hidden=\"true\"\n :style=\"{ blockSize: `${child.size}px` }\"\n />\n <span\n v-else-if=\"child.kind === 'heading'\"\n :id=\"child.id\"\n :ref=\"virtual ? (el) => measure(el, child.at) : undefined\"\n class=\"v-listbox-group-label\"\n >{{ child.label }}</span\n >\n <VListboxOption\n v-else-if=\"child.kind === 'option'\"\n :ref=\"virtual ? (el) => measure(el, child.at) : undefined\"\n v-bind=\"child.row\"\n @select=\"emit('select', child.option)\"\n @pointermove=\"emit('highlight', child)\"\n >\n <slot name=\"option\" v-bind=\"child.slot\">{{ child.option.label }}</slot>\n </VListboxOption>\n </template>\n </VListboxGroup>\n\n <VListboxOption\n v-else-if=\"block.kind === 'option'\"\n :ref=\"virtual ? (el) => measure(el, block.at) : undefined\"\n v-bind=\"block.row\"\n @select=\"emit('select', block.option)\"\n @pointermove=\"emit('highlight', block)\"\n >\n <slot name=\"option\" v-bind=\"block.slot\">{{ block.option.label }}</slot>\n </VListboxOption>\n </template>\n\n <slot />\n </VPopover>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * VPopover brings the floating element, its open state, its anchoring, its placement and its\n * surface. The shared size class lets the options and the owner's state rows read their\n * dimensions from the panel with no size table here; the owner sets the maximum height.\n */\n .v-listbox-panel {\n overflow: auto;\n }\n\n /* The virtual mode corrects the scroll itself when a row above the view changes height. */\n .v-listbox-panel[data-virtual] {\n overflow-anchor: none;\n }\n\n .v-listbox-spacer {\n flex: none;\n }\n}\n</style>\n"],"mappings":""}
@@ -11,10 +11,6 @@ var x = ["id"], S = /*@__PURE__*/ u({
11
11
  anchor: {},
12
12
  placement: {},
13
13
  size: {},
14
- compact: {
15
- type: Boolean,
16
- default: !1
17
- },
18
14
  multiple: {
19
15
  type: Boolean,
20
16
  default: !1
@@ -51,7 +47,6 @@ var x = ["id"], S = /*@__PURE__*/ u({
51
47
  role: "listbox",
52
48
  class: "v-listbox-panel v-control",
53
49
  "data-size": u.size,
54
- "data-compact": u.compact ? "" : void 0,
55
50
  "aria-multiselectable": u.multiple ? "true" : void 0,
56
51
  "data-virtual": u.virtual ? "" : void 0,
57
52
  onMousedown: E
@@ -111,7 +106,6 @@ var x = ["id"], S = /*@__PURE__*/ u({
111
106
  "anchor",
112
107
  "placement",
113
108
  "data-size",
114
- "data-compact",
115
109
  "aria-multiselectable",
116
110
  "data-virtual"
117
111
  ]));
@@ -1 +1 @@
1
- {"version":3,"file":"VListboxPanel.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VListbox/VListboxPanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @a11y\n/**\n * Render the floating listbox of VCombobox and VSelect from the rows `useListbox` works out. The\n * panel carries both the listbox role and the scrolling: the virtual window, the scrolling of the\n * highlighted option and the observer watching for the end of the list all rely on it, so no\n * wrapper may come between them.\n */\nimport { computed, ref } from 'vue'\n\nimport type { Listbox, ListboxBlock, ListboxRenderedOption } from '../../composables/useListbox'\nimport type { ListboxOption, ListboxOptionSlotProps } from '../../types'\nimport VPopover, { type PopoverPlacement } from '../VPopover/VPopover.vue'\nimport VListboxGroup from './VListboxGroup.vue'\nimport VListboxOption from './VListboxOption.vue'\nimport VListboxSeparator from './VListboxSeparator.vue'\n\ninterface ListboxPanelProps {\n /** The panel's id, which the field points at through `aria-controls`. */\n id: string\n /** The CSS anchor name the owner sets on its field, which the panel opens against. */\n anchor: string\n /** Where the panel opens relative to the field. */\n placement: PopoverPlacement\n /** The size the options take, the field's own. */\n size: 'sm' | 'md' | 'lg'\n /** The field's reduced density. */\n compact?: boolean\n /** Several options can be chosen. */\n multiple?: boolean\n /** Only the rows near the visible part of the panel are rendered. */\n virtual?: boolean\n /** The rows to render. */\n blocks: ListboxBlock[]\n /** Measures a rendered row, in the virtual mode. */\n measure: Listbox['measureRow']\n}\n\nwithDefaults(defineProps<ListboxPanelProps>(), {\n compact: false,\n multiple: false,\n virtual: false,\n})\n\n/** Whether the panel is showing. */\nconst open = defineModel<boolean>('open', { default: false })\n\nconst emit = defineEmits<{\n /** An option was clicked. What that does to the selection is the field's business. */\n select: [option: ListboxOption]\n /** The pointer moved over an option, which should become the highlighted one. */\n highlight: [row: ListboxRenderedOption]\n}>()\n\ndefineSlots<{\n /** What a row shows, in place of the plain label. */\n option?(props: ListboxOptionSlotProps): unknown\n /** Rows of the owner's own after the options: an empty state, a loading foot. */\n default?(): unknown\n}>()\n\nconst popoverRef = ref<InstanceType<typeof VPopover> | null>(null)\n\n// @a11y\n/*\n * The focus must never leave the field. Without cancelling the press, clicking an option takes\n * the focus off the field, the field's focusout closes the panel before the click is turned into\n * a selection, and choosing with the mouse stops working entirely.\n */\nfunction onMousedown(event: MouseEvent) {\n event.preventDefault()\n}\n\ndefineExpose({\n /** The panel element, which scrolls. */\n el: computed(() => popoverRef.value?.el ?? null),\n})\n</script>\n\n<template>\n <VPopover\n :id=\"id\"\n ref=\"popoverRef\"\n v-model:open=\"open\"\n mode=\"manual\"\n :anchor=\"anchor\"\n match-trigger\n :placement=\"placement\"\n role=\"listbox\"\n class=\"v-listbox-panel v-control\"\n :data-size=\"size\"\n :data-compact=\"compact ? '' : undefined\"\n :aria-multiselectable=\"multiple ? 'true' : undefined\"\n :data-virtual=\"virtual ? '' : undefined\"\n @mousedown=\"onMousedown\"\n >\n <template v-for=\"block in blocks\" :key=\"block.key\">\n <div\n v-if=\"block.kind === 'spacer'\"\n class=\"v-listbox-spacer\"\n aria-hidden=\"true\"\n :style=\"{ blockSize: `${block.size}px` }\"\n />\n\n <VListboxSeparator\n v-else-if=\"block.kind === 'separator'\"\n :ref=\"virtual ? (el) => measure(el, block.at) : undefined\"\n />\n\n <VListboxGroup\n v-else-if=\"block.kind === 'group'\"\n :label=\"block.label\"\n :label-id=\"block.labelId\"\n >\n <template v-for=\"child in block.children\" :key=\"child.key\">\n <div\n v-if=\"child.kind === 'spacer'\"\n class=\"v-listbox-spacer\"\n aria-hidden=\"true\"\n :style=\"{ blockSize: `${child.size}px` }\"\n />\n <span\n v-else-if=\"child.kind === 'heading'\"\n :id=\"child.id\"\n :ref=\"virtual ? (el) => measure(el, child.at) : undefined\"\n class=\"v-listbox-group-label\"\n >{{ child.label }}</span\n >\n <VListboxOption\n v-else-if=\"child.kind === 'option'\"\n :ref=\"virtual ? (el) => measure(el, child.at) : undefined\"\n v-bind=\"child.row\"\n @select=\"emit('select', child.option)\"\n @pointermove=\"emit('highlight', child)\"\n >\n <slot name=\"option\" v-bind=\"child.slot\">{{ child.option.label }}</slot>\n </VListboxOption>\n </template>\n </VListboxGroup>\n\n <VListboxOption\n v-else-if=\"block.kind === 'option'\"\n :ref=\"virtual ? (el) => measure(el, block.at) : undefined\"\n v-bind=\"block.row\"\n @select=\"emit('select', block.option)\"\n @pointermove=\"emit('highlight', block)\"\n >\n <slot name=\"option\" v-bind=\"block.slot\">{{ block.option.label }}</slot>\n </VListboxOption>\n </template>\n\n <slot />\n </VPopover>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * VPopover brings the floating element, its open state, its anchoring, its placement and its\n * surface. The shared size class lets the options and the owner's state rows read their\n * dimensions from the panel with no size table here; the owner sets the maximum height.\n */\n .v-listbox-panel {\n overflow: auto;\n }\n\n /* The virtual mode corrects the scroll itself when a row above the view changes height. */\n .v-listbox-panel[data-virtual] {\n overflow-anchor: none;\n }\n\n .v-listbox-spacer {\n flex: none;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CA,IAAM,IAAO,EAAoB,GAAC,MAA0B,GAEtD,IAAO,GAcP,IAAa,EAA0C,IAAI;EAQjE,SAAS,EAAY,GAAmB;GACtC,EAAM,eAAe;EACvB;SAEA,EAAa,EAEX,IAAI,QAAe,EAAW,OAA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A,EAAA,GADvB,EAQiB,GARjB,EAQiB;;;KANd,KAAK,EAAA,WAAW,MAAO,EAAA,QAAQ,GAAI,EAAM,EAAE,IAAI,KAAA;wBACxC,EAAM,KAAG;KAChB,WAAM,MAAE,EAAI,UAAW,EAAM,MAAM;KACnC,gBAAW,MAAE,EAAI,aAAc,CAAK;;sBAEkC,CAAvE,EAAuE,EAAA,QAAA,UAAvE,EAAuE,EAAA,SAAA,GAAA,GAA3C,EAAM,IAAI,SAAiC,CAAA,EAAA,EAA5B,EAAM,OAAO,KAAK,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;sCAMtD,EAAM,SAAI,YAAA,EAAA,GADvB,EAQiB,GARjB,EAQiB;;;IANd,KAAK,EAAA,WAAW,MAAO,EAAA,QAAQ,GAAI,EAAM,EAAE,IAAI,KAAA;uBACxC,EAAM,KAAG;IAChB,WAAM,MAAE,EAAI,UAAW,EAAM,MAAM;IACnC,gBAAW,MAAE,EAAI,aAAc,CAAK;;qBAEkC,CAAvE,EAAuE,EAAA,QAAA,UAAvE,EAAuE,EAAA,SAAA,GAAA,GAA3C,EAAM,IAAI,SAAiC,CAAA,EAAA,EAA5B,EAAM,OAAO,KAAK,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;wEAIjE,EAAQ,EAAA,QAAA,SAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"VListboxPanel.vue_vue_type_script_setup_true_lang.js","names":["_useModel","_openBlock","_createBlock","VPopover","_withCtx","_createElementBlock","_Fragment","_renderList","_normalizeStyle","VListboxSeparator","VListboxGroup","_toDisplayString","VListboxOption","_mergeProps","_renderSlot","_createTextVNode","_createCommentVNode","VPopover_default","VListboxGroup_default","VListboxOption_default","VListboxSeparator_default","_hoisted_1","VListboxPanel_vue_vue_type_script_setup_true_lang_default","\"open\"","\"openModifiers\"","__expose","__emit","open","useModel","__props","emit","popoverRef","ref","onMousedown","computed","openBlock","createBlock","_cache","$event","withCtx","createElementBlock","Fragment","renderList","block","normalizeStyle","el","child","toDisplayString","mergeProps","renderSlot","_ctx","createTextVNode","createCommentVNode"],"sources":["../../../src/components/VListbox/VListboxPanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @a11y\n/**\n * Render the floating listbox of VCombobox and VSelect from the rows `useListbox` works out. The\n * panel carries both the listbox role and the scrolling: the virtual window, the scrolling of the\n * highlighted option and the observer watching for the end of the list all rely on it, so no\n * wrapper may come between them.\n */\nimport { computed, ref } from 'vue'\n\nimport type { Listbox, ListboxBlock, ListboxRenderedOption } from '../../composables/useListbox'\nimport type { ListboxOption, ListboxOptionSlotProps } from '../../types'\nimport VPopover, { type PopoverPlacement } from '../VPopover/VPopover.vue'\nimport VListboxGroup from './VListboxGroup.vue'\nimport VListboxOption from './VListboxOption.vue'\nimport VListboxSeparator from './VListboxSeparator.vue'\n\ninterface ListboxPanelProps {\n /** The panel's id, which the field points at through `aria-controls`. */\n id: string\n /** The CSS anchor name the owner sets on its field, which the panel opens against. */\n anchor: string\n /** Where the panel opens relative to the field. */\n placement: PopoverPlacement\n /** The size the options take, the field's own. */\n size: 'sm' | 'md' | 'lg'\n /** Several options can be chosen. */\n multiple?: boolean\n /** Only the rows near the visible part of the panel are rendered. */\n virtual?: boolean\n /** The rows to render. */\n blocks: ListboxBlock[]\n /** Measures a rendered row, in the virtual mode. */\n measure: Listbox['measureRow']\n}\n\nwithDefaults(defineProps<ListboxPanelProps>(), {\n multiple: false,\n virtual: false,\n})\n\n/** Whether the panel is showing. */\nconst open = defineModel<boolean>('open', { default: false })\n\nconst emit = defineEmits<{\n /** An option was clicked. What that does to the selection is the field's business. */\n select: [option: ListboxOption]\n /** The pointer moved over an option, which should become the highlighted one. */\n highlight: [row: ListboxRenderedOption]\n}>()\n\ndefineSlots<{\n /** What a row shows, in place of the plain label. */\n option?(props: ListboxOptionSlotProps): unknown\n /** Rows of the owner's own after the options: an empty state, a loading foot. */\n default?(): unknown\n}>()\n\nconst popoverRef = ref<InstanceType<typeof VPopover> | null>(null)\n\n// @a11y\n/*\n * The focus must never leave the field. Without cancelling the press, clicking an option takes\n * the focus off the field, the field's focusout closes the panel before the click is turned into\n * a selection, and choosing with the mouse stops working entirely.\n */\nfunction onMousedown(event: MouseEvent) {\n event.preventDefault()\n}\n\ndefineExpose({\n /** The panel element, which scrolls. */\n el: computed(() => popoverRef.value?.el ?? null),\n})\n</script>\n\n<template>\n <VPopover\n :id=\"id\"\n ref=\"popoverRef\"\n v-model:open=\"open\"\n mode=\"manual\"\n :anchor=\"anchor\"\n match-trigger\n :placement=\"placement\"\n role=\"listbox\"\n class=\"v-listbox-panel v-control\"\n :data-size=\"size\"\n :aria-multiselectable=\"multiple ? 'true' : undefined\"\n :data-virtual=\"virtual ? '' : undefined\"\n @mousedown=\"onMousedown\"\n >\n <template v-for=\"block in blocks\" :key=\"block.key\">\n <div\n v-if=\"block.kind === 'spacer'\"\n class=\"v-listbox-spacer\"\n aria-hidden=\"true\"\n :style=\"{ blockSize: `${block.size}px` }\"\n />\n\n <VListboxSeparator\n v-else-if=\"block.kind === 'separator'\"\n :ref=\"virtual ? (el) => measure(el, block.at) : undefined\"\n />\n\n <VListboxGroup\n v-else-if=\"block.kind === 'group'\"\n :label=\"block.label\"\n :label-id=\"block.labelId\"\n >\n <template v-for=\"child in block.children\" :key=\"child.key\">\n <div\n v-if=\"child.kind === 'spacer'\"\n class=\"v-listbox-spacer\"\n aria-hidden=\"true\"\n :style=\"{ blockSize: `${child.size}px` }\"\n />\n <span\n v-else-if=\"child.kind === 'heading'\"\n :id=\"child.id\"\n :ref=\"virtual ? (el) => measure(el, child.at) : undefined\"\n class=\"v-listbox-group-label\"\n >{{ child.label }}</span\n >\n <VListboxOption\n v-else-if=\"child.kind === 'option'\"\n :ref=\"virtual ? (el) => measure(el, child.at) : undefined\"\n v-bind=\"child.row\"\n @select=\"emit('select', child.option)\"\n @pointermove=\"emit('highlight', child)\"\n >\n <slot name=\"option\" v-bind=\"child.slot\">{{ child.option.label }}</slot>\n </VListboxOption>\n </template>\n </VListboxGroup>\n\n <VListboxOption\n v-else-if=\"block.kind === 'option'\"\n :ref=\"virtual ? (el) => measure(el, block.at) : undefined\"\n v-bind=\"block.row\"\n @select=\"emit('select', block.option)\"\n @pointermove=\"emit('highlight', block)\"\n >\n <slot name=\"option\" v-bind=\"block.slot\">{{ block.option.label }}</slot>\n </VListboxOption>\n </template>\n\n <slot />\n </VPopover>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * VPopover brings the floating element, its open state, its anchoring, its placement and its\n * surface. The shared size class lets the options and the owner's state rows read their\n * dimensions from the panel with no size table here; the owner sets the maximum height.\n */\n .v-listbox-panel {\n overflow: auto;\n }\n\n /* The virtual mode corrects the scroll itself when a row above the view changes height. */\n .v-listbox-panel[data-virtual] {\n overflow-anchor: none;\n }\n\n .v-listbox-spacer {\n flex: none;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0CA,IAAM2B,IAAO3B,EAAoB6B,GAAC,MAA0B,GAEtDC,IAAOJ,GAcPK,IAAaC,EAA0C,IAAI;EAQjE,SAASC,EAAY,GAAmB;GACtC,EAAM,eAAe;EACvB;SAEAR,EAAa,EAEX,IAAIS,QAAeH,EAAW,OAAO,MAAM,IAAI,EACjD,CAAC,cAIC9B,EAAA,GAAAC,EAuEWC,GAAA;GAtER,IAAI0B,EAAA;GACD,SAAA;GAAJ,KAAIE;GACI,MAAMJ,EAAA;GAAA,iBAAA,AAAAU,EAAA,QAAA,MAAA,EAAI,QAAAC;GAClB,MAAK;GACJ,QAAQT,EAAA;GACT,iBAAA;GACC,WAAWA,EAAA;GACZ,MAAK;GACL,OAAM;GACL,aAAWA,EAAA;GACX,wBAAsBA,EAAA,WAAQ,SAAY,KAAA;GAC1C,gBAAcA,EAAA,UAAO,KAAQ,KAAA;GAClB;;GAEF,SAAAzB,QAAuB,EAAjCH,EAAA,EAAA,GAAAI,EAqDWC,GAAA,MAAAC,EArDesB,EAAA,SAAT,OAAuB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ChB,WAAM,MAAEhB,EAAI,UAAWgB,EAAM,MAAM;KACnC,gBAAW,MAAEhB,EAAI,aAAcgB,CAAK;;KAErC,SAAA1C,QAAuE,CAAvEU,EAAuEoC,EAAA,QAAA,UAAvErC,EAAuE,EAAA,SAAA,GAAA,GAA3CiC,EAAM,IAAI,SAAiC,CAA5B/B,EAAAJ,EAAAmC,EAAM,OAAO,KAAK,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;GAMtD,GAAA,MAAA,CAAA,SAAA,UAAA,CAAA,KAAAH,EAAM,SAAI,YADvB1C,EAAA,GAAAC,EAQiBU,GARjBC,EAQiB;;;IANd,KAAKgB,EAAA,WAAW,MAAOA,EAAA,QAAQgB,GAAIF,EAAM,EAAE,IAAI,KAAA;GACxC,GAAA,EAAA,SAAA,GAAA,GAAAA,EAAM,KAAG;IAChB,WAAM,MAAEb,EAAI,UAAWa,EAAM,MAAM;IACnC,gBAAW,MAAEb,EAAI,aAAca,CAAK;;IAErC,SAAAvC,QAAuE,CAAvEU,EAAuEoC,EAAA,QAAA,UAAvErC,EAAuE,EAAA,SAAA,GAAA,GAA3C8B,EAAM,IAAI,SAAiC,CAA5B5B,EAAAJ,EAAAgC,EAAM,OAAO,KAAK,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;8DAIjE7B,GAAAA,GAAAA,IAAAA,EAAQoC,EAAA,QAAA,SAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"VListboxSeparator.js","names":[],"sources":["../../../src/components/VListbox/VListboxSeparator.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Use presentation semantics for separators: a listbox owns only options and groups, unlike a\n * menu.\n */\nimport VSeparator from '../VSeparator/VSeparator.vue'\n</script>\n\n<template>\n <VSeparator role=\"presentation\" class=\"v-listbox-separator\" />\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * The selector compounds both classes because `.v-separator` sets `margin: 0` from a sheet of\n * its own: at equal specificity the winner would be whichever of the two the consumer's\n * bundler happens to put last. The space above and below comes from the panel's own gap, so\n * no margin is added here.\n */\n .v-separator.v-listbox-separator {\n margin-inline: calc(-1 * var(--vectis-space-1));\n }\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"VListboxSeparator.js","names":["_sfc_main","VListboxSeparator_vue_vue_type_script_setup_true_lang_default","VListboxSeparator_default"],"sources":["../../../src/components/VListbox/VListboxSeparator.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Use presentation semantics for separators: a listbox owns only options and groups, unlike a\n * menu.\n */\nimport VSeparator from '../VSeparator/VSeparator.vue'\n</script>\n\n<template>\n <VSeparator role=\"presentation\" class=\"v-listbox-separator\" />\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * The selector compounds both classes because `.v-separator` sets `margin: 0` from a sheet of\n * its own: at equal specificity the winner would be whichever of the two the consumer's\n * bundler happens to put last. The space above and below comes from the panel's own gap, so\n * no margin is added here.\n */\n .v-separator.v-listbox-separator {\n margin-inline: calc(-1 * var(--vectis-space-1));\n }\n}\n</style>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"VListboxSeparator.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VListbox/VListboxSeparator.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Use presentation semantics for separators: a listbox owns only options and groups, unlike a\n * menu.\n */\nimport VSeparator from '../VSeparator/VSeparator.vue'\n</script>\n\n<template>\n <VSeparator role=\"presentation\" class=\"v-listbox-separator\" />\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * The selector compounds both classes because `.v-separator` sets `margin: 0` from a sheet of\n * its own: at equal specificity the winner would be whichever of the two the consumer's\n * bundler happens to put last. The space above and below comes from the panel's own gap, so\n * no margin is added here.\n */\n .v-separator.v-listbox-separator {\n margin-inline: calc(-1 * var(--vectis-space-1));\n }\n}\n</style>\n"],"mappings":";;;;;;yBASE,EAA8D,GAAA;GAAlD,MAAK;GAAe,OAAM"}
1
+ {"version":3,"file":"VListboxSeparator.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","VSeparator","VSeparator_default","VListboxSeparator_vue_vue_type_script_setup_true_lang_default","openBlock","createBlock"],"sources":["../../../src/components/VListbox/VListboxSeparator.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Use presentation semantics for separators: a listbox owns only options and groups, unlike a\n * menu.\n */\nimport VSeparator from '../VSeparator/VSeparator.vue'\n</script>\n\n<template>\n <VSeparator role=\"presentation\" class=\"v-listbox-separator\" />\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * The selector compounds both classes because `.v-separator` sets `margin: 0` from a sheet of\n * its own: at equal specificity the winner would be whichever of the two the consumer's\n * bundler happens to put last. The space above and below comes from the panel's own gap, so\n * no margin is added here.\n */\n .v-separator.v-listbox-separator {\n margin-inline: calc(-1 * var(--vectis-space-1));\n }\n}\n</style>\n"],"mappings":";;;;;;oBASEA,EAAA,GAAAC,EAA8DC,GAAA;GAAlD,MAAK;GAAe,OAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"VListboxValues.js","names":[],"sources":["../../../src/components/VListbox/VListboxValues.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Render the values of a multiple VCombobox or VSelect inside its field: one chip each, or their\n * labels on one line, with the values beyond `max` summed up as \"+X\" while the field is folded.\n * It renders siblings rather than a wrapper, so the chips wrap as items of the field itself.\n */\nimport { computed } from 'vue'\n\nimport VChip from '../VChip/VChip.vue'\nimport type { ChipScale } from '../../utils/chip'\nimport type {\n ItemValue,\n ListboxChipSlotProps,\n ListboxOption,\n ListboxOverflowSlotProps,\n} from '../../types'\nimport { useMessages } from '../../i18n/state'\n\ninterface ListboxValuesProps {\n /** Every chosen value, in order. */\n values: ItemValue[]\n /** One chip per value, or the labels joined by commas. */\n display: 'chip' | 'text'\n /** How many values to show while folded; 0 or none shows them all. */\n max?: number\n /** Whether the field is folded, the only state in which `max` applies. */\n collapsed?: boolean\n /** Rephrases the \"+X\". */\n overflowText?: (count: number) => string\n /** The chips' scale inside the field. */\n scale: ChipScale\n /** Whether each chip offers a cross. */\n removable?: boolean\n /** Greys the chips out. */\n disabled?: boolean\n /** Hides the line of labels from assistive technology, for a field that speaks its value. */\n hideText?: boolean\n /** The label of a value. */\n labelOf: (value: ItemValue) => string\n /** The option holding a value. */\n optionOf: (value: ItemValue) => ListboxOption | undefined\n}\n\nconst props = withDefaults(defineProps<ListboxValuesProps>(), {\n max: undefined,\n collapsed: false,\n overflowText: undefined,\n removable: false,\n disabled: false,\n hideText: false,\n})\n\nconst emit = defineEmits<{\n /** A chip's cross was pressed. */\n remove: [value: ItemValue]\n}>()\n\ndefineSlots<{\n /** Replaces the chip standing for one value. */\n chip?(props: ListboxChipSlotProps): unknown\n /** Replaces the \"+X\" standing for the values beyond `max`. */\n overflow?(props: ListboxOverflowSlotProps): unknown\n}>()\n\nconst m = useMessages()\n\n// Unfolded, the reader is working on the selection, and every value must be there to be seen\n// and taken back. `max: 0` means no limit, as on VAvatarGroup: a truthiness test, never\n// `!= null`, which would hide every value.\nconst shown = computed(() =>\n props.collapsed && props.max ? props.values.slice(0, props.max) : props.values,\n)\nconst overflowCount = computed(() => props.values.length - shown.value.length)\n\n// Digits and a plus sign stay out of the dictionary, as VAvatarGroup's \"+N\" does: rephrasing\n// goes through `overflowText` or the `#overflow` slot.\nconst overflowLabel = computed(() =>\n props.overflowText ? props.overflowText(overflowCount.value) : `+${overflowCount.value}`,\n)\n\n// The comma is universal punctuation rather than a word, so it stays out of the dictionary,\n// as in VFileInput's own text display.\nconst text = computed(() =>\n props.display === 'text' ? shown.value.map(props.labelOf).join(', ') : '',\n)\n</script>\n\n<template>\n <span v-if=\"text\" class=\"v-listbox-text\" :aria-hidden=\"hideText ? 'true' : undefined\">{{\n text\n }}</span>\n <!-- A box of its own beside the line rather than the end of it: the labels are what the\n ellipsis cuts, and the count of what they do not show must survive it. -->\n <span\n v-if=\"display === 'text' && overflowCount > 0\"\n class=\"v-listbox-overflow\"\n :aria-hidden=\"hideText ? 'true' : undefined\"\n >\n <slot name=\"overflow\" :count=\"overflowCount\" :size=\"scale.size\" :compact=\"scale.compact\">{{\n overflowLabel\n }}</slot>\n </span>\n <template v-for=\"value in display === 'chip' ? shown : []\" :key=\"value\">\n <slot\n name=\"chip\"\n :value=\"value\"\n :option=\"optionOf(value)\"\n :label=\"labelOf(value)\"\n :remove=\"() => emit('remove', value)\"\n :size=\"scale.size\"\n :compact=\"scale.compact\"\n >\n <VChip\n tone=\"accent\"\n :size=\"scale.size\"\n :compact=\"scale.compact\"\n :dismissible=\"removable && !disabled\"\n :dismiss-label=\"m.common.remove(labelOf(value))\"\n :disabled=\"disabled\"\n @dismiss=\"emit('remove', value)\"\n >{{ labelOf(value) }}</VChip\n >\n </slot>\n </template>\n <!-- Not wrapped, unlike the text display's counter: a box around an inline-flex chip opens a\n line box, whose strut makes the field taller than its chips. Neutral and not dismissible,\n so it reads as a summary rather than one more value. -->\n <slot\n v-if=\"display === 'chip' && overflowCount > 0\"\n name=\"overflow\"\n :count=\"overflowCount\"\n :size=\"scale.size\"\n :compact=\"scale.compact\"\n >\n <VChip\n class=\"v-listbox-overflow-chip\"\n tone=\"neutral\"\n :size=\"scale.size\"\n :compact=\"scale.compact\"\n :disabled=\"disabled\"\n >{{ overflowLabel }}</VChip\n >\n </slot>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * The line shrinks before anything else in the field, and the zero minimum is what lets it:\n * an unbroken line otherwise has the whole of its text as its minimum width.\n */\n .v-listbox-text {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n /* The \"+X\" after a line of text never shrinks: the line gives way instead. */\n .v-listbox-overflow {\n flex: none;\n white-space: nowrap;\n color: var(--vectis-color-text-muted);\n }\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"VListboxValues.js","names":["_sfc_main","VListboxValues_vue_vue_type_script_setup_true_lang_default","VListboxValues_default"],"sources":["../../../src/components/VListbox/VListboxValues.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Render the values of a multiple VCombobox or VSelect inside its field: one chip each, or their\n * labels on one line, with the values beyond `max` summed up as \"+X\" while the field is folded.\n * It renders siblings rather than a wrapper, so the chips wrap as items of the field itself.\n */\nimport { computed } from 'vue'\n\nimport VChip from '../VChip/VChip.vue'\nimport type { ChipScale } from '../../utils/chip'\nimport type {\n ItemValue,\n ListboxChipSlotProps,\n ListboxOption,\n ListboxOverflowSlotProps,\n} from '../../types'\nimport { useMessages } from '../../i18n/state'\n\ninterface ListboxValuesProps {\n /** Every chosen value, in order. */\n values: ItemValue[]\n /** One chip per value, or the labels joined by commas. */\n display: 'chip' | 'text'\n /** How many values to show while folded; 0 or none shows them all. */\n max?: number\n /** Whether the field is folded, the only state in which `max` applies. */\n collapsed?: boolean\n /** Rephrases the \"+X\". */\n overflowText?: (count: number) => string\n /** The chips' scale inside the field. */\n scale: ChipScale\n /** Whether each chip offers a cross. */\n removable?: boolean\n /** Greys the chips out. */\n disabled?: boolean\n /** Hides the line of labels from assistive technology, for a field that speaks its value. */\n hideText?: boolean\n /** The label of a value. */\n labelOf: (value: ItemValue) => string\n /** The option holding a value. */\n optionOf: (value: ItemValue) => ListboxOption | undefined\n}\n\nconst props = withDefaults(defineProps<ListboxValuesProps>(), {\n max: undefined,\n collapsed: false,\n overflowText: undefined,\n removable: false,\n disabled: false,\n hideText: false,\n})\n\nconst emit = defineEmits<{\n /** A chip's cross was pressed. */\n remove: [value: ItemValue]\n}>()\n\ndefineSlots<{\n /** Replaces the chip standing for one value. */\n chip?(props: ListboxChipSlotProps): unknown\n /** Replaces the \"+X\" standing for the values beyond `max`. */\n overflow?(props: ListboxOverflowSlotProps): unknown\n}>()\n\nconst m = useMessages()\n\n// Unfolded, the reader is working on the selection, and every value must be there to be seen\n// and taken back. `max: 0` means no limit, as on VAvatarGroup: a truthiness test, never\n// `!= null`, which would hide every value.\nconst shown = computed(() =>\n props.collapsed && props.max ? props.values.slice(0, props.max) : props.values,\n)\nconst overflowCount = computed(() => props.values.length - shown.value.length)\n\n// Digits and a plus sign stay out of the dictionary, as VAvatarGroup's \"+N\" does: rephrasing\n// goes through `overflowText` or the `#overflow` slot.\nconst overflowLabel = computed(() =>\n props.overflowText ? props.overflowText(overflowCount.value) : `+${overflowCount.value}`,\n)\n\n// The comma is universal punctuation rather than a word, so it stays out of the dictionary,\n// as in VFileInput's own text display.\nconst text = computed(() =>\n props.display === 'text' ? shown.value.map(props.labelOf).join(', ') : '',\n)\n</script>\n\n<template>\n <span v-if=\"text\" class=\"v-listbox-text\" :aria-hidden=\"hideText ? 'true' : undefined\">{{\n text\n }}</span>\n <!-- A box of its own beside the line rather than the end of it: the labels are what the\n ellipsis cuts, and the count of what they do not show must survive it. -->\n <span\n v-if=\"display === 'text' && overflowCount > 0\"\n class=\"v-listbox-overflow\"\n :aria-hidden=\"hideText ? 'true' : undefined\"\n >\n <slot name=\"overflow\" :count=\"overflowCount\" :size=\"scale.size\">{{ overflowLabel }}</slot>\n </span>\n <template v-for=\"value in display === 'chip' ? shown : []\" :key=\"value\">\n <slot\n name=\"chip\"\n :value=\"value\"\n :option=\"optionOf(value)\"\n :label=\"labelOf(value)\"\n :remove=\"() => emit('remove', value)\"\n :size=\"scale.size\"\n >\n <VChip\n tone=\"accent\"\n :size=\"scale.size\"\n :dismissible=\"removable && !disabled\"\n :dismiss-label=\"m.common.remove(labelOf(value))\"\n :disabled=\"disabled\"\n @dismiss=\"emit('remove', value)\"\n >{{ labelOf(value) }}</VChip\n >\n </slot>\n </template>\n <!-- Not wrapped, unlike the text display's counter: a box around an inline-flex chip opens a\n line box, whose strut makes the field taller than its chips. Neutral and not dismissible,\n so it reads as a summary rather than one more value. -->\n <slot\n v-if=\"display === 'chip' && overflowCount > 0\"\n name=\"overflow\"\n :count=\"overflowCount\"\n :size=\"scale.size\"\n >\n <VChip class=\"v-listbox-overflow-chip\" tone=\"neutral\" :size=\"scale.size\" :disabled=\"disabled\">{{\n overflowLabel\n }}</VChip>\n </slot>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * The line shrinks before anything else in the field, and the zero minimum is what lets it:\n * an unbroken line otherwise has the whole of its text as its minimum width.\n */\n .v-listbox-text {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n /* The \"+X\" after a line of text never shrinks: the line gives way instead. */\n .v-listbox-overflow {\n flex: none;\n white-space: nowrap;\n color: var(--vectis-color-text-muted);\n }\n}\n</style>\n"],"mappings":""}
@@ -47,20 +47,17 @@ var h = ["aria-hidden"], g = ["aria-hidden"], _ = /*@__PURE__*/ c({
47
47
  "aria-hidden": c.hideText ? "true" : void 0
48
48
  }, [d(e.$slots, "overflow", {
49
49
  count: S.value,
50
- size: c.scale.size,
51
- compact: c.scale.compact
50
+ size: c.scale.size
52
51
  }, () => [o(f(C.value), 1)])], 8, g)) : i("", !0),
53
52
  (l(!0), a(n, null, u(c.display === "chip" ? x.value : [], (n) => d(e.$slots, "chip", {
54
53
  value: n,
55
54
  option: c.optionOf(n),
56
55
  label: c.labelOf(n),
57
56
  remove: () => y("remove", n),
58
- size: c.scale.size,
59
- compact: c.scale.compact
57
+ size: c.scale.size
60
58
  }, () => [s(t, {
61
59
  tone: "accent",
62
60
  size: c.scale.size,
63
- compact: c.scale.compact,
64
61
  dismissible: c.removable && !c.disabled,
65
62
  "dismiss-label": p(b).common.remove(c.labelOf(n)),
66
63
  disabled: c.disabled,
@@ -70,7 +67,6 @@ var h = ["aria-hidden"], g = ["aria-hidden"], _ = /*@__PURE__*/ c({
70
67
  _: 2
71
68
  }, 1032, [
72
69
  "size",
73
- "compact",
74
70
  "dismissible",
75
71
  "dismiss-label",
76
72
  "disabled",
@@ -78,22 +74,16 @@ var h = ["aria-hidden"], g = ["aria-hidden"], _ = /*@__PURE__*/ c({
78
74
  ])], void 0, n)), 128)),
79
75
  c.display === "chip" && S.value > 0 ? d(e.$slots, "overflow", {
80
76
  count: S.value,
81
- size: c.scale.size,
82
- compact: c.scale.compact
77
+ size: c.scale.size
83
78
  }, () => [s(t, {
84
79
  class: "v-listbox-overflow-chip",
85
80
  tone: "neutral",
86
81
  size: c.scale.size,
87
- compact: c.scale.compact,
88
82
  disabled: c.disabled
89
83
  }, {
90
84
  default: m(() => [o(f(C.value), 1)]),
91
85
  _: 1
92
- }, 8, [
93
- "size",
94
- "compact",
95
- "disabled"
96
- ])], void 0, 2) : i("", !0)
86
+ }, 8, ["size", "disabled"])], void 0, 2) : i("", !0)
97
87
  ], 64));
98
88
  }
99
89
  });