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
@@ -36,10 +36,6 @@ var N = [
36
36
  selectedVariant: { default: "solid" },
37
37
  tone: { default: "accent" },
38
38
  size: { default: "md" },
39
- compact: {
40
- type: Boolean,
41
- default: !1
42
- },
43
39
  elevated: {
44
40
  type: Boolean,
45
41
  default: !1
@@ -225,7 +221,6 @@ var N = [
225
221
  detached: u.detached,
226
222
  bordered: u.bordered,
227
223
  size: u.size,
228
- compact: u.compact || void 0,
229
224
  elevated: u.elevated || void 0
230
225
  }, {
231
226
  default: M(() => [
@@ -284,7 +279,6 @@ var N = [
284
279
  "detached",
285
280
  "bordered",
286
281
  "size",
287
- "compact",
288
282
  "elevated"
289
283
  ])], 40, N));
290
284
  }
@@ -1 +1 @@
1
- {"version":3,"file":"VPagination.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VPagination/VPagination.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @keyboard @core\n/**\n * Native buttons activate pages. JavaScript builds bounded page windows and provides roving\n * keyboard navigation.\n */\nimport { computed, h, nextTick, ref } from 'vue'\nimport type { FunctionalComponent } from 'vue'\n\nimport VButton from '../VButton/VButton.vue'\nimport VButtonGroup from '../VButton/VButtonGroup.vue'\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { chevron_left as chevronLeftIcon } from '../VIcon/icons/chevron_left'\nimport { chevron_right as chevronRightIcon } from '../VIcon/icons/chevron_right'\nimport { first_page as firstPageIcon } from '../VIcon/icons/first_page'\nimport { last_page as lastPageIcon } from '../VIcon/icons/last_page'\nimport { more_horiz as moreHorizIcon } from '../VIcon/icons/more_horiz'\nimport type { IconSource } from '../VIcon/types'\nimport VIconButton from '../VIconButton/VIconButton.vue'\n\nimport { arrowNavigate, navigableItems } from '../../utils/arrowNav'\nimport { clamp } from '../../utils/number'\nimport { resolveMatcher } from '../../utils/matcher'\n\nimport { useAriaLabel } from '../../composables/useAriaLabel'\nimport { useMessages } from '../../i18n/state'\n\n/** How the pages that are not the current one are drawn. */\nexport type PaginationItemVariant = 'ghost' | 'outline'\n\n/** How the current page is drawn. */\nexport type PaginationSelectedVariant = 'solid' | 'soft' | 'ghost'\n\n/** The colour of the current page. */\nexport type PaginationTone = 'accent' | 'neutral' | 'danger'\n\n/** The height of the pills, from the scale every control shares. */\nexport type PaginationSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n\n/** Where the row sits in the width it is given. */\nexport type PaginationAlign = 'start' | 'center' | 'end'\n\n/** Whether the previous and next controls are rendered, and what they show. */\nexport type PaginationControls = false | 'icon' | 'text' | 'both'\n\n/**\n * Which pages cannot be reached, given either as a list of page numbers or as a function\n * answering that question for a page.\n */\nexport type PaginationMatcher = number[] | ((page: number) => boolean)\n\ninterface PaginationProps {\n /**\n * How many pages there are in all. It is 1 by default, which renders a single page: the\n * real count almost always has to be given.\n */\n length?: number\n /**\n * How many slots to render, ellipses counted among them, so the row keeps exactly the same\n * width whichever page is current. Below 5, the row drops the bounds and the ellipses and\n * shows that many consecutive pages around the current one. At 0, no page is rendered and the\n * controls alone remain. Left out, every page is rendered.\n */\n totalVisible?: number\n\n /**\n * Separates the buttons instead of joining them into one segmented control. It is the\n * word VButtonGroup and VToggle use for the same question, in the same direction.\n */\n detached?: boolean\n /**\n * Draws a line between the joined buttons, so the row reads as segments rather than as one\n * frame, on the terms of VButtonGroup's own `bordered`. It has no effect under `detached`.\n */\n bordered?: boolean\n /**\n * How the pages OTHER than the current one, and the controls, are drawn. It is named for the\n * ITEMS because that is what it paints: on VTabs and VDataTable `variant` names the\n * decoration of the frame instead.\n */\n itemVariant?: PaginationItemVariant\n /**\n * How the current page is drawn, in the row's tone: filled, tinted, or the colour of its\n * text alone. The same choice as VToggle's `selectedVariant`.\n */\n selectedVariant?: PaginationSelectedVariant\n /** The colour the current page takes. The other pages and the controls stay neutral. */\n tone?: PaginationTone\n /** The height of the buttons, from the scale shared by every control. */\n size?: PaginationSize\n /** Takes 4px off the height of every button. */\n compact?: boolean\n /** Raises the row off the page, on the terms of VButton's own `elevated`. */\n elevated?: boolean\n /** Where the row sits in the width it is given. */\n align?: PaginationAlign\n\n /**\n * The previous and next buttons on either side of the pages: what they show, or `false` to\n * leave them out.\n */\n controls?: PaginationControls\n /** The icon of the previous control: an icon name, or an explicit render. */\n prevIcon?: IconSource\n /** The icon of the next control: an icon name, or an explicit render. */\n nextIcon?: IconSource\n /**\n * The wording of the previous control, used both as its visible text and as what\n * screen readers announce. It falls back to the design system dictionary.\n */\n prevText?: string\n /**\n * The wording of the next control, used both as its visible text and as what screen\n * readers announce. It falls back to the design system dictionary.\n */\n nextText?: string\n /**\n * Adds first and last page controls outside the previous and next ones, drawn the way\n * `controls` draws those. It has no effect when `controls` is `false`.\n */\n edgeControls?: boolean\n /** The icon of the first page control: an icon name, or an explicit render. */\n firstIcon?: IconSource\n /** The icon of the last page control: an icon name, or an explicit render. */\n lastIcon?: IconSource\n /**\n * The wording of the first page control, used both as its visible text and as what\n * screen readers announce. It falls back to the design system dictionary.\n */\n firstText?: string\n /**\n * The wording of the last page control, used both as its visible text and as what\n * screen readers announce. It falls back to the design system dictionary.\n */\n lastText?: string\n\n /** Makes the whole component unusable. */\n disabled?: boolean\n /**\n * Which pages cannot be reached, as a list or as a function. The previous and next\n * controls step OVER them rather than stopping at one.\n */\n disabledPages?: PaginationMatcher\n\n /**\n * What screen readers announce for the navigation itself. It falls back to the\n * design system dictionary.\n */\n label?: string\n /**\n * How a page is announced. A pill shows a bare number, which alone means nothing to\n * a screen reader: this is what turns it into \"Page 3\". It falls back to the design\n * system dictionary.\n */\n pageLabel?: (page: number) => string\n /** The address of a page. Left out, they are buttons. */\n href?: (page: number) => string\n}\n\nconst props = withDefaults(defineProps<PaginationProps>(), {\n length: 1,\n totalVisible: undefined,\n detached: false,\n bordered: false,\n itemVariant: 'outline',\n selectedVariant: 'solid',\n tone: 'accent',\n size: 'md',\n compact: false,\n elevated: false,\n align: 'start',\n controls: 'icon',\n prevIcon: () => chevronLeftIcon,\n nextIcon: () => chevronRightIcon,\n prevText: undefined,\n nextText: undefined,\n edgeControls: false,\n firstIcon: () => firstPageIcon,\n lastIcon: () => lastPageIcon,\n firstText: undefined,\n lastText: undefined,\n disabled: false,\n disabledPages: undefined,\n label: undefined,\n pageLabel: undefined,\n href: undefined,\n})\n\nconst emit = defineEmits<{\n /**\n * A page was chosen from the row, a pill or a control, with the click that chose it. It comes\n * before the model changes, so under `href` a single-page application calls\n * `preventDefault()` on the event and hands the address to its router instead of letting the\n * browser load it.\n */\n navigate: [page: number, event: MouseEvent]\n}>()\n\n// The prop wins over the dictionary, and above both, a consumer's own aria-label or\n// aria-labelledby still wins; that arbitration is what `useAriaLabel` is for.\nconst m = useMessages()\nconst ariaLabel = useAriaLabel(() => props.label ?? m.value.pagination.label)\nconst resolvedPrevText = computed(() => props.prevText ?? m.value.pagination.previous)\nconst resolvedNextText = computed(() => props.nextText ?? m.value.pagination.next)\nconst resolvedFirstText = computed(() => props.firstText ?? m.value.pagination.first)\nconst resolvedLastText = computed(() => props.lastText ?? m.value.pagination.last)\n\n/** The page being shown, counted from 1. It starts on the first. */\nconst page = defineModel<number>({ default: 1 })\n\n/** One slot in the row: either a page, or the ellipsis standing for those left out. */\ntype PaginationItem = { kind: 'page'; key: string; page: number } | { kind: 'gap'; key: string }\n\n// A length or a model that is not a whole number (`NaN` while a page size is still loading,\n// a computed `2.5`) is brought back to a page that exists, or no pill would ever match it.\nconst total = computed(() => Math.max(Math.trunc(props.length) || 1, 1))\nconst currentPage = computed(() => clamp(Math.round(page.value) || 1, 1, total.value))\n\nconst isPageDisabled = computed(() => resolveMatcher(props.disabledPages))\n\n// @a11y\n// A pill shows nothing but a number, which on its own tells a screen reader\n// nothing at all; this is what has it announced as \"Page 3\".\nfunction pageLabelFor(n: number): string {\n return props.pageLabel ? props.pageLabel(n) : m.value.pagination.page(n)\n}\n\n/** Works out which slots the row holds. */\nconst items = computed<PaginationItem[]>(() => {\n const count = total.value\n const current = currentPage.value\n\n const pageItem = (n: number): PaginationItem => ({ kind: 'page', key: `page-${n}`, page: n })\n const pages = (from: number, to: number): PaginationItem[] => {\n const out: PaginationItem[] = []\n for (let n = from; n <= to; n++) out.push(pageItem(n))\n return out\n }\n // Keyed by the side it stands on, never by the page it follows: there is at most one\n // ellipsis per side, and the left one always comes after the first page while the right\n // one always comes before the last. A key derived from the window would change on every\n // navigation, so the right-hand ellipsis would be destroyed and rebuilt each time the\n // window slid, for a node that never changes.\n const gap = (side: 'start' | 'end'): PaginationItem => ({ kind: 'gap', key: `gap-${side}` })\n\n // With no limit given, nothing is left out. At 0 the row holds the controls alone.\n const limit = Math.trunc(props.totalVisible ?? count)\n const visible = Number.isNaN(limit) ? count : Math.max(limit, 0)\n if (visible === 0) return []\n if (visible >= count) return pages(1, count)\n\n // Below five slots there is no room for the first page, an ellipsis, the current page,\n // another ellipsis and the last: the row is a plain window of consecutive pages, held\n // against the bounds so it keeps the same number of slots.\n if (visible < 5) {\n const from = clamp(current - Math.floor((visible - 1) / 2), 1, count - visible + 1)\n return pages(from, from + visible - 1)\n }\n\n const start = current - Math.floor((visible - 5) / 2)\n const end = start + (visible - 5)\n\n // The window is stretched to the bound instead, which both avoids that and keeps the number\n // of slots exactly the same.\n if (start <= 3) return [...pages(1, visible - 2), gap('end'), pageItem(count)]\n if (end >= count - 2) return [pageItem(1), gap('start'), ...pages(count - visible + 3, count)]\n return [pageItem(1), gap('start'), ...pages(start, end), gap('end'), pageItem(count)]\n})\n\n/**\n * Where a control leads: the nearest page in that direction that can actually be reached,\n * disabled ones being stepped over rather than stopped at. Answering `undefined` means there is\n * none left, which disables the control; and that single answer also covers being on the first\n * or the last page, with no separate test for the ends.\n */\nfunction step(direction: -1 | 1): number | undefined {\n for (let n = currentPage.value + direction; n >= 1 && n <= total.value; n += direction) {\n if (!isPageDisabled.value(n)) return n\n }\n return undefined\n}\n\n/**\n * Where a first or last control leads: the reachable page farthest in that direction. It is\n * `undefined` exactly when `step` is, so each edge control disables itself with its neighbour.\n */\nfunction leap(direction: -1 | 1): number | undefined {\n const end = direction < 0 ? 1 : total.value\n for (let n = end; n !== currentPage.value; n -= direction) {\n if (!isPageDisabled.value(n)) return n\n }\n return undefined\n}\n\nconst firstTarget = computed(() => leap(-1))\nconst prevTarget = computed(() => step(-1))\nconst nextTarget = computed(() => step(1))\nconst lastTarget = computed(() => leap(1))\n\nfunction goTo(n: number | undefined) {\n if (n === undefined) return\n page.value = clamp(n, 1, total.value)\n}\n\n/** The address a pill or a control links to, or `undefined` when the row is made of buttons. */\nfunction hrefFor(n: number): string | undefined {\n return props.href?.(n)\n}\n\n// @core\n/*\n * A link clicked with a modifier held (Ctrl or Cmd for a new tab, Shift for a window, Alt for a\n * download) opens somewhere ELSE: the page on screen stays where it is, so the model must not\n * move. The test the routers themselves make before taking a click over.\n */\nfunction opensElsewhere(event: MouseEvent): boolean {\n return (\n props.href !== undefined &&\n (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)\n )\n}\n\nfunction choose(event: MouseEvent, n: number | undefined) {\n if (n === undefined || opensElsewhere(event)) return\n emit('navigate', n, event)\n goTo(n)\n}\n\nfunction isUnusable(el: HTMLElement): boolean {\n return el.matches(':disabled, [aria-disabled=\"true\"]')\n}\n\n// @a11y\n/*\n * The previous and next controls disable themselves once no page is left in their direction,\n * and a focused button that becomes disabled hands the focus to <body>: a keyboard reader\n * pressing \"Next page\" on the second to last page would be sent back to the top of the document\n * by the next Tab. The focus goes to the page just reached instead, the current page being\n * always rendered. A row without pages hands it to the nearest control still usable, the one\n * before it first.\n */\nasync function goFromControl(event: MouseEvent, n: number | undefined) {\n const control = event.currentTarget as HTMLElement\n const hadFocus = control === document.activeElement\n choose(event, n)\n if (!hadFocus) return\n await nextTick()\n const nav = navEl.value\n if (!nav || !isUnusable(control)) return\n const current = nav.querySelector<HTMLElement>('[aria-current=\"page\"]')\n if (current) return current.focus()\n const usable = [...nav.querySelectorAll<HTMLElement>(':is(button, a[href]):not(:disabled)')]\n const before = usable.filter(\n (el) => control.compareDocumentPosition(el) & Node.DOCUMENT_POSITION_PRECEDING,\n )\n ;(before.at(-1) ?? usable[0])?.focus()\n}\n\ntype ControlSide = 'first' | 'prev' | 'next' | 'last'\n\n/*\n * The four controls, written once: they differ only by their direction and reach, and template\n * blocks drifting apart on the next change is exactly what this avoids. A functional component\n * because they sit at either end of the row, with the pages in between, where a `v-for` over\n * descriptors could not put them.\n */\nconst PageControl: FunctionalComponent<{ side: ControlSide }> = ({ side }) => {\n const { label, icon, target } = {\n first: { label: resolvedFirstText.value, icon: props.firstIcon, target: firstTarget.value },\n prev: { label: resolvedPrevText.value, icon: props.prevIcon, target: prevTarget.value },\n next: { label: resolvedNextText.value, icon: props.nextIcon, target: nextTarget.value },\n last: { label: resolvedLastText.value, icon: props.lastIcon, target: lastTarget.value },\n }[side]\n const disabled = props.disabled || target === undefined\n const common = {\n class: 'v-pagination-control',\n 'data-side': side,\n variant: props.itemVariant,\n disabled,\n href: hrefFor(target ?? currentPage.value),\n rel: props.href && !disabled ? side : undefined,\n onClick: (event: MouseEvent) => goFromControl(event, target),\n }\n const glyph = () => h(VIcon, { ...iconProps(icon), mirrored: true })\n if (props.controls === 'icon') return h(VIconButton, { ...common, label }, glyph)\n const backward = side === 'first' || side === 'prev'\n return h(\n VButton,\n { ...common, tone: 'neutral' },\n {\n ...(props.controls === 'both' ? { [backward ? 'start' : 'end']: glyph } : {}),\n default: () => h('span', { class: 'v-pagination-control-label' }, label),\n },\n )\n}\n\nconst navEl = ref<HTMLElement | null>(null)\n\n// @keyboard @a11y\n/** The arrow keys, through the shared implementation in `utils/arrowNav`. */\nfunction onKeydown(event: KeyboardEvent) {\n const nav = navEl.value\n if (!nav) return\n arrowNavigate(event, nav, () =>\n navigableItems(nav, '.v-pagination-page:not(:disabled, [aria-disabled=\"true\"])'),\n )\n}\n\n// The pills are rendered by a VButtonGroup inside the nav, so a template ref reaches none of\n// them. `focus` goes to the current page.\ndefineExpose({\n // Two queries, not one selector list: a list matches in DOM order, which would hand the\n // focus to the previous control ahead of the current page. `a[href]` because an inert link\n // has lost its address, and with it the ability to take the focus.\n /** Moves the focus to the current page, or to the first control that can take it. */\n focus: (options?: FocusOptions) =>\n (\n navEl.value?.querySelector<HTMLElement>(\n '[aria-current=\"page\"]:is(button, a[href]):not(:disabled)',\n ) ?? navEl.value?.querySelector<HTMLElement>(':is(button, a[href]):not(:disabled)')\n )?.focus(options),\n /** The `<nav>` element, which is also where the consumer's attributes land. */\n el: navEl,\n})\n</script>\n\n<template>\n <nav\n ref=\"navEl\"\n class=\"v-pagination\"\n :aria-label=\"ariaLabel\"\n :data-align=\"align\"\n :data-item-variant=\"itemVariant\"\n @keydown=\"onKeydown\"\n >\n <!-- The row is a VButtonGroup either way: joined it merges the borders of its DIRECT\n button children, and detached it spaces them, which is all this prop asks of it.\n That is why there is no list markup wrapping the pills, and why the ellipsis is\n itself an inert button rather than a plain span: anything else between two pills\n would break the seam. -->\n <!--\n `|| undefined` keeps the group opinion-free when the row does not ask, `undefined` being\n what means \"no opinion\" there where `false` is an order. The size is always an opinion,\n the pagination having a default of its own.\n -->\n <VButtonGroup\n class=\"v-pagination-items\"\n :detached=\"detached\"\n :bordered=\"bordered\"\n :size=\"size\"\n :compact=\"compact || undefined\"\n :elevated=\"elevated || undefined\"\n >\n <PageControl v-if=\"controls && edgeControls\" side=\"first\" />\n <PageControl v-if=\"controls\" side=\"prev\" />\n\n <template v-for=\"item in items\" :key=\"item.key\">\n <VButton\n v-if=\"item.kind === 'page'\"\n class=\"v-pagination-page\"\n :variant=\"item.page === currentPage ? selectedVariant : itemVariant\"\n :tone=\"item.page === currentPage ? tone : 'neutral'\"\n :disabled=\"disabled || isPageDisabled(item.page)\"\n :aria-label=\"pageLabelFor(item.page)\"\n :aria-current=\"item.page === currentPage ? 'page' : undefined\"\n :href=\"hrefFor(item.page)\"\n @click=\"choose($event, item.page)\"\n >\n {{ item.page }}\n </VButton>\n <!--\n The ellipsis is a disabled icon-only button rather than a span: being a button, it\n keeps the joined row's seam continuous and follows the size and density like\n everything else. Disabling it takes it out of the tab order, and it is hidden from\n screen readers, which have the page numbers themselves; which is also why it is a\n VButton and not a VIconButton, whose required label would name something nobody can\n reach.\n -->\n <VButton\n v-else\n class=\"v-pagination-ellipsis\"\n aria-hidden=\"true\"\n data-icon-only\n :variant=\"itemVariant\"\n tone=\"neutral\"\n disabled\n >\n <template #start>\n <VIcon :name=\"moreHorizIcon\" />\n </template>\n </VButton>\n </template>\n\n <PageControl v-if=\"controls\" side=\"next\" />\n <PageControl v-if=\"controls && edgeControls\" side=\"last\" />\n </VButtonGroup>\n </nav>\n</template>\n\n<style>\n@layer vectis.components {\n .v-pagination {\n display: flex;\n }\n\n .v-pagination[data-align='center'] {\n justify-content: center;\n }\n\n .v-pagination[data-align='end'] {\n justify-content: flex-end;\n }\n\n /*\n * Qualified by an attribute VButton always renders, which makes both of these beat that\n * button's own padding and its own transition whatever order the two sheets end up in; the\n * VIconButton idiom.\n */\n .v-pagination-page[data-size] {\n /* A one-digit pill is square, and widens by itself past that. The height variable\n is set by the shared size class on this very element, so this single rule covers\n all five sizes and their compact forms. */\n min-inline-size: var(--control-height);\n padding-inline: var(--vectis-space-2);\n\n /*\n * The highlight changes instantly, and this must not be \"restored for consistency\". VButton\n * fades `background-color` over `--vectis-duration-fast`, which is right for a button that\n * stays put and wrong here: truncation SHIFTS its window, so from one page to the next the\n * highlight keeps its slot but changes ELEMENT, and the outgoing and incoming pills are\n * both half-tinted for a few frames; read as a flicker, with nothing in the console.\n */\n transition: none;\n }\n\n /* The ellipsis is a disabled button only as a technical device; to the reader it is\n not a control that has been turned off, so it does not take the forbidden\n cursor. Qualified like the pills: VButton's disabled cursor weighs (0,2,0), and a bare\n class loses to it whatever the sheet order. */\n .v-pagination-ellipsis[data-size] {\n cursor: default;\n }\n\n /*\n * A disabled page or control greys its outline to a different token, hence a variable the\n * second rule changes. VToggle's `--toggle-frame` is the same device.\n */\n .v-pagination[data-item-variant='outline'] {\n --pagination-frame: var(--vectis-color-border-strong);\n }\n\n .v-pagination[data-item-variant='outline'] > * > :is(:disabled, [aria-disabled='true']) {\n --pagination-frame: var(--vectis-color-border);\n }\n\n .v-pagination[data-item-variant='outline']\n > *\n > .v-pagination-page[aria-current='page']:is([data-variant='soft'], [data-variant='ghost']) {\n border-color: var(--pagination-frame);\n }\n\n /*\n * The class is repeated to reach (0,6,0). The variant, hover and active rules reach (0,5,0),\n * and with the forcing turned off any of them that still won would paint its tone over the\n * selection, with HighlightText on top of it.\n */\n @media (forced-colors: active) {\n .v-pagination-page.v-pagination-page.v-pagination-page.v-pagination-page[aria-current='page']:not(\n :disabled,\n [aria-disabled='true']\n ) {\n forced-color-adjust: none;\n background-color: Highlight;\n color: HighlightText;\n border-color: Highlight;\n outline-color: CanvasText;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgKA,IAAM,IAAQ,GA6BR,IAAO,GAYP,IAAI,EAAY,GAChB,IAAY,QAAmB,EAAM,SAAS,EAAE,MAAM,WAAW,KAAK,GACtE,KAAmB,QAAe,EAAM,YAAY,EAAE,MAAM,WAAW,QAAQ,GAC/E,KAAmB,QAAe,EAAM,YAAY,EAAE,MAAM,WAAW,IAAI,GAC3E,IAAoB,QAAe,EAAM,aAAa,EAAE,MAAM,WAAW,KAAK,GAC9E,IAAmB,QAAe,EAAM,YAAY,EAAE,MAAM,WAAW,IAAI,GAG3E,IAAO,EAAmB,GAAA,YAAe,GAOzC,IAAQ,QAAe,KAAK,IAAI,KAAK,MAAM,EAAM,MAAM,KAAK,GAAG,CAAC,CAAC,GACjE,IAAc,QAAe,EAAM,KAAK,MAAM,EAAK,KAAK,KAAK,GAAG,GAAG,EAAM,KAAK,CAAC,GAE/E,IAAiB,QAAe,EAAe,EAAM,aAAa,CAAC;EAKzE,SAAS,EAAa,GAAmB;GACvC,OAAO,EAAM,YAAY,EAAM,UAAU,CAAC,IAAI,EAAE,MAAM,WAAW,KAAK,CAAC;EACzE;EAGA,IAAM,IAAQ,QAAiC;GAC7C,IAAM,IAAQ,EAAM,OACd,IAAU,EAAY,OAEtB,KAAY,OAA+B;IAAE,MAAM;IAAQ,KAAK,QAAQ;IAAK,MAAM;GAAE,IACrF,KAAS,GAAc,MAAiC;IAC5D,IAAM,IAAwB,CAAC;IAC/B,KAAK,IAAI,IAAI,GAAM,KAAK,GAAI,KAAK,EAAI,KAAK,EAAS,CAAC,CAAC;IACrD,OAAO;GACT,GAMM,KAAO,OAA2C;IAAE,MAAM;IAAO,KAAK,OAAO;GAAO,IAGpF,IAAQ,KAAK,MAAM,EAAM,gBAAgB,CAAK,GAC9C,IAAU,OAAO,MAAM,CAAK,IAAI,IAAQ,KAAK,IAAI,GAAO,CAAC;GAC/D,IAAI,MAAY,GAAG,OAAO,CAAC;GAC3B,IAAI,KAAW,GAAO,OAAO,EAAM,GAAG,CAAK;GAK3C,IAAI,IAAU,GAAG;IACf,IAAM,IAAO,EAAM,IAAU,KAAK,OAAO,IAAU,KAAK,CAAC,GAAG,GAAG,IAAQ,IAAU,CAAC;IAClF,OAAO,EAAM,GAAM,IAAO,IAAU,CAAC;GACvC;GAEA,IAAM,IAAQ,IAAU,KAAK,OAAO,IAAU,KAAK,CAAC,GAC9C,IAAM,KAAS,IAAU;GAM/B,OAFI,KAAS,IAAU;IAAC,GAAG,EAAM,GAAG,IAAU,CAAC;IAAG,EAAI,KAAK;IAAG,EAAS,CAAK;GAAC,IACzE,KAAO,IAAQ,IAAU;IAAC,EAAS,CAAC;IAAG,EAAI,OAAO;IAAG,GAAG,EAAM,IAAQ,IAAU,GAAG,CAAK;GAAC,IACtF;IAAC,EAAS,CAAC;IAAG,EAAI,OAAO;IAAG,GAAG,EAAM,GAAO,CAAG;IAAG,EAAI,KAAK;IAAG,EAAS,CAAK;GAAC;EACtF,CAAC;EAQD,SAAS,EAAK,GAAuC;GACnD,KAAK,IAAI,IAAI,EAAY,QAAQ,GAAW,KAAK,KAAK,KAAK,EAAM,OAAO,KAAK,GAC3E,IAAI,CAAC,EAAe,MAAM,CAAC,GAAG,OAAO;EAGzC;EAMA,SAAS,EAAK,GAAuC;GACnD,IAAM,IAAM,IAAY,IAAI,IAAI,EAAM;GACtC,KAAK,IAAI,IAAI,GAAK,MAAM,EAAY,OAAO,KAAK,GAC9C,IAAI,CAAC,EAAe,MAAM,CAAC,GAAG,OAAO;EAGzC;EAEA,IAAM,IAAc,QAAe,EAAK,EAAE,CAAC,GACrC,IAAa,QAAe,EAAK,EAAE,CAAC,GACpC,IAAa,QAAe,EAAK,CAAC,CAAC,GACnC,IAAa,QAAe,EAAK,CAAC,CAAC;EAEzC,SAAS,EAAK,GAAuB;GAC/B,MAAM,KAAA,MACV,EAAK,QAAQ,EAAM,GAAG,GAAG,EAAM,KAAK;EACtC;EAGA,SAAS,EAAQ,GAA+B;GAC9C,OAAO,EAAM,OAAO,CAAC;EACvB;EAQA,SAAS,GAAe,GAA4B;GAClD,OACE,EAAM,SAAS,KAAA,MACd,EAAM,WAAW,KAAK,EAAM,WAAW,EAAM,WAAW,EAAM,YAAY,EAAM;EAErF;EAEA,SAAS,EAAO,GAAmB,GAAuB;GACpD,MAAM,KAAA,KAAa,GAAe,CAAK,MAC3C,EAAK,YAAY,GAAG,CAAK,GACzB,EAAK,CAAC;EACR;EAEA,SAAS,GAAW,GAA0B;GAC5C,OAAO,EAAG,QAAQ,qCAAmC;EACvD;EAWA,eAAe,GAAc,GAAmB,GAAuB;GACrE,IAAM,IAAU,EAAM,eAChB,IAAW,MAAY,SAAS;GAEtC,IADA,EAAO,GAAO,CAAC,GACX,CAAC,GAAU;GACf,MAAM,GAAS;GACf,IAAM,IAAM,EAAM;GAClB,IAAI,CAAC,KAAO,CAAC,GAAW,CAAO,GAAG;GAClC,IAAM,IAAU,EAAI,cAA2B,yBAAuB;GACtE,IAAI,GAAS,OAAO,EAAQ,MAAM;GAClC,IAAM,IAAS,CAAC,GAAG,EAAI,iBAA8B,qCAAqC,CAAC;GAI1F,CAHc,EAAO,QACnB,MAAO,EAAQ,wBAAwB,CAAE,IAAI,KAAK,2BAEnD,CAAA,CAAO,GAAG,EAAE,KAAK,EAAO,GAAA,EAAK,MAAM;EACvC;EAUA,IAAM,KAA2D,EAAE,cAAW;GAC5E,IAAM,EAAE,UAAO,SAAM,cAAW;IAC9B,OAAO;KAAE,OAAO,EAAkB;KAAO,MAAM,EAAM;KAAW,QAAQ,EAAY;IAAM;IAC1F,MAAM;KAAE,OAAO,GAAiB;KAAO,MAAM,EAAM;KAAU,QAAQ,EAAW;IAAM;IACtF,MAAM;KAAE,OAAO,GAAiB;KAAO,MAAM,EAAM;KAAU,QAAQ,EAAW;IAAM;IACtF,MAAM;KAAE,OAAO,EAAiB;KAAO,MAAM,EAAM;KAAU,QAAQ,EAAW;IAAM;GACxF,EAAE,IACI,IAAW,EAAM,YAAY,MAAW,KAAA,GACxC,IAAS;IACb,OAAO;IACP,aAAa;IACb,SAAS,EAAM;IACf;IACA,MAAM,EAAQ,KAAU,EAAY,KAAK;IACzC,KAAK,EAAM,QAAQ,CAAC,IAAW,IAAO,KAAA;IACtC,UAAU,MAAsB,GAAc,GAAO,CAAM;GAC7D,GACM,UAAc,EAAE,GAAO;IAAE,GAAG,EAAU,CAAI;IAAG,UAAU;GAAK,CAAC;GACnE,IAAI,EAAM,aAAa,QAAQ,OAAO,EAAE,GAAa;IAAE,GAAG;IAAQ;GAAM,GAAG,CAAK;GAChF,IAAM,IAAW,MAAS,WAAW,MAAS;GAC9C,OAAO,EACL,GACA;IAAE,GAAG;IAAQ,MAAM;GAAU,GAC7B;IACE,GAAI,EAAM,aAAa,SAAS,GAAG,IAAW,UAAU,QAAQ,EAAM,IAAI,CAAC;IAC3E,eAAe,EAAE,QAAQ,EAAE,OAAO,6BAA6B,GAAG,CAAK;GACzE,CACF;EACF,GAEM,IAAQ,EAAwB,IAAI;EAI1C,SAAS,GAAU,GAAsB;GACvC,IAAM,IAAM,EAAM;GACb,KACL,EAAc,GAAO,SACnB,EAAe,GAAK,6DAA2D,CACjF;EACF;SAIA,EAAa;GAKX,QAAQ,OAEJ,EAAM,OAAO,cACX,4DACF,KAAK,EAAM,OAAO,cAA2B,qCAAqC,EAAA,EACjF,MAAM,CAAO;GAElB,IAAI;EACN,CAAC,mBAIC,EAqEM,OAAA;YApEA;GAAJ,KAAI;GACJ,OAAM;GACL,cAAY,EAAA,CAAA;GACZ,cAAY,EAAA;GACZ,qBAAmB,EAAA;GACV;MAYV,EAkDe,GAAA;GAjDb,OAAM;GACL,UAAU,EAAA;GACV,UAAU,EAAA;GACV,MAAM,EAAA;GACN,SAAS,EAAA,WAAW,KAAA;GACpB,UAAU,EAAA,YAAY,KAAA;;oBAEqC;IAAzC,EAAA,YAAY,EAAA,gBAAA,EAAA,GAA/B,EAA4D,GAAA;;KAAf,MAAK;;IAC/B,EAAA,YAAA,EAAA,GAAnB,EAA2C,GAAA;;KAAd,MAAK;;YAElC,EAmCW,GAAA,MAAA,EAnCc,EAAA,QAAR,wBAAqB,EAAK,IAAA,GAAA,CAEjC,EAAK,SAAI,UAAA,EAAA,GADjB,EAYU,GAAA;;KAVR,OAAM;KACL,SAAS,EAAK,SAAS,EAAA,QAAc,EAAA,kBAAkB,EAAA;KACvD,MAAM,EAAK,SAAS,EAAA,QAAc,EAAA,OAAI;KACtC,UAAU,EAAA,YAAY,EAAA,MAAe,EAAK,IAAI;KAC9C,cAAY,EAAa,EAAK,IAAI;KAClC,gBAAc,EAAK,SAAS,EAAA,QAAW,SAAY,KAAA;KACnD,MAAM,EAAQ,EAAK,IAAI;KACvB,UAAK,MAAE,EAAO,GAAQ,EAAK,IAAI;;sBAEjB,CAAA,EAAA,EAAZ,EAAK,IAAI,GAAA,CAAA,CAAA,CAAA;;;;;;;;;;gBAUd,EAYU,GAAA;;KAVR,OAAM;KACN,eAAY;KACZ,kBAAA;KACC,SAAS,EAAA;KACV,MAAK;KACL,UAAA;;KAEW,OAAK,QACiB,CAA/B,EAA+B,GAAA,EAAvB,MAAM,EAAA,CAAA,EAAa,GAAA,MAAA,GAAA,CAAA,MAAA,CAAA,CAAA,CAAA;;;IAKd,EAAA,YAAA,EAAA,GAAnB,EAA2C,GAAA;;KAAd,MAAK;;IACf,EAAA,YAAY,EAAA,gBAAA,EAAA,GAA/B,EAA2D,GAAA;;KAAd,MAAK"}
1
+ {"version":3,"file":"VPagination.vue_vue_type_script_setup_true_lang.js","names":["chevronLeftIcon","chevronRightIcon","firstPageIcon","lastPageIcon","_useModel","VIcon","VIconButton","VButton","_openBlock","_createElementBlock","_unref","_createVNode","VButtonGroup","_withCtx","_createBlock","_createCommentVNode","_Fragment","_renderList","_createTextVNode","_toDisplayString","moreHorizIcon","VIcon_default","VButton_default","VIconButton_default","VButtonGroup_default","_hoisted_1","VPagination_vue_vue_type_script_setup_true_lang_default","chevron_left","chevron_right","first_page","last_page","\"modelValue\"","\"modelModifiers\"","__expose","__emit","props","__props","emit","m","useMessages","ariaLabel","useAriaLabel","resolvedPrevText","computed","resolvedNextText","resolvedFirstText","resolvedLastText","page","useModel","total","currentPage","clamp","isPageDisabled","resolveMatcher","pageLabelFor","n","items","count","current","pageItem","pages","out","from","to","gap","side","limit","visible","start","end","step","direction","leap","firstTarget","prevTarget","nextTarget","lastTarget","goTo","hrefFor","opensElsewhere","event","choose","isUnusable","el","goFromControl","control","hadFocus","nextTick","nav","navEl","usable","PageControl","disabled","target","common","glyph","h","iconProps","icon","backward","label","ref","onKeydown","arrowNavigate","navigableItems","options","openBlock","createElementBlock","unref","createVNode","withCtx","createBlock","createCommentVNode","Fragment","renderList","item","$event","createTextVNode","toDisplayString","more_horiz"],"sources":["../../../src/components/VPagination/VPagination.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @keyboard @core\n/**\n * Native buttons activate pages. JavaScript builds bounded page windows and provides roving\n * keyboard navigation.\n */\nimport { computed, h, nextTick, ref } from 'vue'\nimport type { FunctionalComponent } from 'vue'\n\nimport VButton from '../VButton/VButton.vue'\nimport VButtonGroup from '../VButton/VButtonGroup.vue'\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { chevron_left as chevronLeftIcon } from '../VIcon/icons/chevron_left'\nimport { chevron_right as chevronRightIcon } from '../VIcon/icons/chevron_right'\nimport { first_page as firstPageIcon } from '../VIcon/icons/first_page'\nimport { last_page as lastPageIcon } from '../VIcon/icons/last_page'\nimport { more_horiz as moreHorizIcon } from '../VIcon/icons/more_horiz'\nimport type { IconSource } from '../VIcon/types'\nimport VIconButton from '../VIconButton/VIconButton.vue'\n\nimport { arrowNavigate, navigableItems } from '../../utils/arrowNav'\nimport { clamp } from '../../utils/number'\nimport { resolveMatcher } from '../../utils/matcher'\n\nimport { useAriaLabel } from '../../composables/useAriaLabel'\nimport { useMessages } from '../../i18n/state'\n\n/** How the pages that are not the current one are drawn. */\nexport type PaginationItemVariant = 'ghost' | 'outline'\n\n/** How the current page is drawn. */\nexport type PaginationSelectedVariant = 'solid' | 'soft' | 'ghost'\n\n/** The colour of the current page. */\nexport type PaginationTone = 'accent' | 'neutral' | 'danger'\n\n/** The height of the pills, from the scale every control shares. */\nexport type PaginationSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n\n/** Where the row sits in the width it is given. */\nexport type PaginationAlign = 'start' | 'center' | 'end'\n\n/** Whether the previous and next controls are rendered, and what they show. */\nexport type PaginationControls = false | 'icon' | 'text' | 'both'\n\n/**\n * Which pages cannot be reached, given either as a list of page numbers or as a function\n * answering that question for a page.\n */\nexport type PaginationMatcher = number[] | ((page: number) => boolean)\n\ninterface PaginationProps {\n /**\n * How many pages there are in all. It is 1 by default, which renders a single page: the\n * real count almost always has to be given.\n */\n length?: number\n /**\n * How many slots to render, ellipses counted among them, so the row keeps exactly the same\n * width whichever page is current. Below 5, the row drops the bounds and the ellipses and\n * shows that many consecutive pages around the current one. At 0, no page is rendered and the\n * controls alone remain. Left out, every page is rendered.\n */\n totalVisible?: number\n\n /**\n * Separates the buttons instead of joining them into one segmented control. It is the\n * word VButtonGroup and VToggle use for the same question, in the same direction.\n */\n detached?: boolean\n /**\n * Draws a line between the joined buttons, so the row reads as segments rather than as one\n * frame, on the terms of VButtonGroup's own `bordered`. It has no effect under `detached`.\n */\n bordered?: boolean\n /**\n * How the pages OTHER than the current one, and the controls, are drawn. It is named for the\n * ITEMS because that is what it paints: on VTabs and VDataTable `variant` names the\n * decoration of the frame instead.\n */\n itemVariant?: PaginationItemVariant\n /**\n * How the current page is drawn, in the row's tone: filled, tinted, or the colour of its\n * text alone. The same choice as VToggle's `selectedVariant`.\n */\n selectedVariant?: PaginationSelectedVariant\n /** The colour the current page takes. The other pages and the controls stay neutral. */\n tone?: PaginationTone\n /** The height of the buttons, from the scale shared by every control. */\n size?: PaginationSize\n /** Raises the row off the page, on the terms of VButton's own `elevated`. */\n elevated?: boolean\n /** Where the row sits in the width it is given. */\n align?: PaginationAlign\n\n /**\n * The previous and next buttons on either side of the pages: what they show, or `false` to\n * leave them out.\n */\n controls?: PaginationControls\n /** The icon of the previous control: an icon name, or an explicit render. */\n prevIcon?: IconSource\n /** The icon of the next control: an icon name, or an explicit render. */\n nextIcon?: IconSource\n /**\n * The wording of the previous control, used both as its visible text and as what\n * screen readers announce. It falls back to the design system dictionary.\n */\n prevText?: string\n /**\n * The wording of the next control, used both as its visible text and as what screen\n * readers announce. It falls back to the design system dictionary.\n */\n nextText?: string\n /**\n * Adds first and last page controls outside the previous and next ones, drawn the way\n * `controls` draws those. It has no effect when `controls` is `false`.\n */\n edgeControls?: boolean\n /** The icon of the first page control: an icon name, or an explicit render. */\n firstIcon?: IconSource\n /** The icon of the last page control: an icon name, or an explicit render. */\n lastIcon?: IconSource\n /**\n * The wording of the first page control, used both as its visible text and as what\n * screen readers announce. It falls back to the design system dictionary.\n */\n firstText?: string\n /**\n * The wording of the last page control, used both as its visible text and as what\n * screen readers announce. It falls back to the design system dictionary.\n */\n lastText?: string\n\n /** Makes the whole component unusable. */\n disabled?: boolean\n /**\n * Which pages cannot be reached, as a list or as a function. The previous and next\n * controls step OVER them rather than stopping at one.\n */\n disabledPages?: PaginationMatcher\n\n /**\n * What screen readers announce for the navigation itself. It falls back to the\n * design system dictionary.\n */\n label?: string\n /**\n * How a page is announced. A pill shows a bare number, which alone means nothing to\n * a screen reader: this is what turns it into \"Page 3\". It falls back to the design\n * system dictionary.\n */\n pageLabel?: (page: number) => string\n /** The address of a page. Left out, they are buttons. */\n href?: (page: number) => string\n}\n\nconst props = withDefaults(defineProps<PaginationProps>(), {\n length: 1,\n totalVisible: undefined,\n detached: false,\n bordered: false,\n itemVariant: 'outline',\n selectedVariant: 'solid',\n tone: 'accent',\n size: 'md',\n elevated: false,\n align: 'start',\n controls: 'icon',\n prevIcon: () => chevronLeftIcon,\n nextIcon: () => chevronRightIcon,\n prevText: undefined,\n nextText: undefined,\n edgeControls: false,\n firstIcon: () => firstPageIcon,\n lastIcon: () => lastPageIcon,\n firstText: undefined,\n lastText: undefined,\n disabled: false,\n disabledPages: undefined,\n label: undefined,\n pageLabel: undefined,\n href: undefined,\n})\n\nconst emit = defineEmits<{\n /**\n * A page was chosen from the row, a pill or a control, with the click that chose it. It comes\n * before the model changes, so under `href` a single-page application calls\n * `preventDefault()` on the event and hands the address to its router instead of letting the\n * browser load it.\n */\n navigate: [page: number, event: MouseEvent]\n}>()\n\n// The prop wins over the dictionary, and above both, a consumer's own aria-label or\n// aria-labelledby still wins; that arbitration is what `useAriaLabel` is for.\nconst m = useMessages()\nconst ariaLabel = useAriaLabel(() => props.label ?? m.value.pagination.label)\nconst resolvedPrevText = computed(() => props.prevText ?? m.value.pagination.previous)\nconst resolvedNextText = computed(() => props.nextText ?? m.value.pagination.next)\nconst resolvedFirstText = computed(() => props.firstText ?? m.value.pagination.first)\nconst resolvedLastText = computed(() => props.lastText ?? m.value.pagination.last)\n\n/** The page being shown, counted from 1. It starts on the first. */\nconst page = defineModel<number>({ default: 1 })\n\n/** One slot in the row: either a page, or the ellipsis standing for those left out. */\ntype PaginationItem = { kind: 'page'; key: string; page: number } | { kind: 'gap'; key: string }\n\n// A length or a model that is not a whole number (`NaN` while a page size is still loading,\n// a computed `2.5`) is brought back to a page that exists, or no pill would ever match it.\nconst total = computed(() => Math.max(Math.trunc(props.length) || 1, 1))\nconst currentPage = computed(() => clamp(Math.round(page.value) || 1, 1, total.value))\n\nconst isPageDisabled = computed(() => resolveMatcher(props.disabledPages))\n\n// @a11y\n// A pill shows nothing but a number, which on its own tells a screen reader\n// nothing at all; this is what has it announced as \"Page 3\".\nfunction pageLabelFor(n: number): string {\n return props.pageLabel ? props.pageLabel(n) : m.value.pagination.page(n)\n}\n\n/** Works out which slots the row holds. */\nconst items = computed<PaginationItem[]>(() => {\n const count = total.value\n const current = currentPage.value\n\n const pageItem = (n: number): PaginationItem => ({ kind: 'page', key: `page-${n}`, page: n })\n const pages = (from: number, to: number): PaginationItem[] => {\n const out: PaginationItem[] = []\n for (let n = from; n <= to; n++) out.push(pageItem(n))\n return out\n }\n // Keyed by the side it stands on, never by the page it follows: there is at most one\n // ellipsis per side, and the left one always comes after the first page while the right\n // one always comes before the last. A key derived from the window would change on every\n // navigation, so the right-hand ellipsis would be destroyed and rebuilt each time the\n // window slid, for a node that never changes.\n const gap = (side: 'start' | 'end'): PaginationItem => ({ kind: 'gap', key: `gap-${side}` })\n\n // With no limit given, nothing is left out. At 0 the row holds the controls alone.\n const limit = Math.trunc(props.totalVisible ?? count)\n const visible = Number.isNaN(limit) ? count : Math.max(limit, 0)\n if (visible === 0) return []\n if (visible >= count) return pages(1, count)\n\n // Below five slots there is no room for the first page, an ellipsis, the current page,\n // another ellipsis and the last: the row is a plain window of consecutive pages, held\n // against the bounds so it keeps the same number of slots.\n if (visible < 5) {\n const from = clamp(current - Math.floor((visible - 1) / 2), 1, count - visible + 1)\n return pages(from, from + visible - 1)\n }\n\n const start = current - Math.floor((visible - 5) / 2)\n const end = start + (visible - 5)\n\n // The window is stretched to the bound instead, which both avoids that and keeps the number\n // of slots exactly the same.\n if (start <= 3) return [...pages(1, visible - 2), gap('end'), pageItem(count)]\n if (end >= count - 2) return [pageItem(1), gap('start'), ...pages(count - visible + 3, count)]\n return [pageItem(1), gap('start'), ...pages(start, end), gap('end'), pageItem(count)]\n})\n\n/**\n * Where a control leads: the nearest page in that direction that can actually be reached,\n * disabled ones being stepped over rather than stopped at. Answering `undefined` means there is\n * none left, which disables the control; and that single answer also covers being on the first\n * or the last page, with no separate test for the ends.\n */\nfunction step(direction: -1 | 1): number | undefined {\n for (let n = currentPage.value + direction; n >= 1 && n <= total.value; n += direction) {\n if (!isPageDisabled.value(n)) return n\n }\n return undefined\n}\n\n/**\n * Where a first or last control leads: the reachable page farthest in that direction. It is\n * `undefined` exactly when `step` is, so each edge control disables itself with its neighbour.\n */\nfunction leap(direction: -1 | 1): number | undefined {\n const end = direction < 0 ? 1 : total.value\n for (let n = end; n !== currentPage.value; n -= direction) {\n if (!isPageDisabled.value(n)) return n\n }\n return undefined\n}\n\nconst firstTarget = computed(() => leap(-1))\nconst prevTarget = computed(() => step(-1))\nconst nextTarget = computed(() => step(1))\nconst lastTarget = computed(() => leap(1))\n\nfunction goTo(n: number | undefined) {\n if (n === undefined) return\n page.value = clamp(n, 1, total.value)\n}\n\n/** The address a pill or a control links to, or `undefined` when the row is made of buttons. */\nfunction hrefFor(n: number): string | undefined {\n return props.href?.(n)\n}\n\n// @core\n/*\n * A link clicked with a modifier held (Ctrl or Cmd for a new tab, Shift for a window, Alt for a\n * download) opens somewhere ELSE: the page on screen stays where it is, so the model must not\n * move. The test the routers themselves make before taking a click over.\n */\nfunction opensElsewhere(event: MouseEvent): boolean {\n return (\n props.href !== undefined &&\n (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)\n )\n}\n\nfunction choose(event: MouseEvent, n: number | undefined) {\n if (n === undefined || opensElsewhere(event)) return\n emit('navigate', n, event)\n goTo(n)\n}\n\nfunction isUnusable(el: HTMLElement): boolean {\n return el.matches(':disabled, [aria-disabled=\"true\"]')\n}\n\n// @a11y\n/*\n * The previous and next controls disable themselves once no page is left in their direction,\n * and a focused button that becomes disabled hands the focus to <body>: a keyboard reader\n * pressing \"Next page\" on the second to last page would be sent back to the top of the document\n * by the next Tab. The focus goes to the page just reached instead, the current page being\n * always rendered. A row without pages hands it to the nearest control still usable, the one\n * before it first.\n */\nasync function goFromControl(event: MouseEvent, n: number | undefined) {\n const control = event.currentTarget as HTMLElement\n const hadFocus = control === document.activeElement\n choose(event, n)\n if (!hadFocus) return\n await nextTick()\n const nav = navEl.value\n if (!nav || !isUnusable(control)) return\n const current = nav.querySelector<HTMLElement>('[aria-current=\"page\"]')\n if (current) return current.focus()\n const usable = [...nav.querySelectorAll<HTMLElement>(':is(button, a[href]):not(:disabled)')]\n const before = usable.filter(\n (el) => control.compareDocumentPosition(el) & Node.DOCUMENT_POSITION_PRECEDING,\n )\n ;(before.at(-1) ?? usable[0])?.focus()\n}\n\ntype ControlSide = 'first' | 'prev' | 'next' | 'last'\n\n/*\n * The four controls, written once: they differ only by their direction and reach, and template\n * blocks drifting apart on the next change is exactly what this avoids. A functional component\n * because they sit at either end of the row, with the pages in between, where a `v-for` over\n * descriptors could not put them.\n */\nconst PageControl: FunctionalComponent<{ side: ControlSide }> = ({ side }) => {\n const { label, icon, target } = {\n first: { label: resolvedFirstText.value, icon: props.firstIcon, target: firstTarget.value },\n prev: { label: resolvedPrevText.value, icon: props.prevIcon, target: prevTarget.value },\n next: { label: resolvedNextText.value, icon: props.nextIcon, target: nextTarget.value },\n last: { label: resolvedLastText.value, icon: props.lastIcon, target: lastTarget.value },\n }[side]\n const disabled = props.disabled || target === undefined\n const common = {\n class: 'v-pagination-control',\n 'data-side': side,\n variant: props.itemVariant,\n disabled,\n href: hrefFor(target ?? currentPage.value),\n rel: props.href && !disabled ? side : undefined,\n onClick: (event: MouseEvent) => goFromControl(event, target),\n }\n const glyph = () => h(VIcon, { ...iconProps(icon), mirrored: true })\n if (props.controls === 'icon') return h(VIconButton, { ...common, label }, glyph)\n const backward = side === 'first' || side === 'prev'\n return h(\n VButton,\n { ...common, tone: 'neutral' },\n {\n ...(props.controls === 'both' ? { [backward ? 'start' : 'end']: glyph } : {}),\n default: () => h('span', { class: 'v-pagination-control-label' }, label),\n },\n )\n}\n\nconst navEl = ref<HTMLElement | null>(null)\n\n// @keyboard @a11y\n/** The arrow keys, through the shared implementation in `utils/arrowNav`. */\nfunction onKeydown(event: KeyboardEvent) {\n const nav = navEl.value\n if (!nav) return\n arrowNavigate(event, nav, () =>\n navigableItems(nav, '.v-pagination-page:not(:disabled, [aria-disabled=\"true\"])'),\n )\n}\n\n// The pills are rendered by a VButtonGroup inside the nav, so a template ref reaches none of\n// them. `focus` goes to the current page.\ndefineExpose({\n // Two queries, not one selector list: a list matches in DOM order, which would hand the\n // focus to the previous control ahead of the current page. `a[href]` because an inert link\n // has lost its address, and with it the ability to take the focus.\n /** Moves the focus to the current page, or to the first control that can take it. */\n focus: (options?: FocusOptions) =>\n (\n navEl.value?.querySelector<HTMLElement>(\n '[aria-current=\"page\"]:is(button, a[href]):not(:disabled)',\n ) ?? navEl.value?.querySelector<HTMLElement>(':is(button, a[href]):not(:disabled)')\n )?.focus(options),\n /** The `<nav>` element, which is also where the consumer's attributes land. */\n el: navEl,\n})\n</script>\n\n<template>\n <nav\n ref=\"navEl\"\n class=\"v-pagination\"\n :aria-label=\"ariaLabel\"\n :data-align=\"align\"\n :data-item-variant=\"itemVariant\"\n @keydown=\"onKeydown\"\n >\n <!-- The row is a VButtonGroup either way: joined it merges the borders of its DIRECT\n button children, and detached it spaces them, which is all this prop asks of it.\n That is why there is no list markup wrapping the pills, and why the ellipsis is\n itself an inert button rather than a plain span: anything else between two pills\n would break the seam. -->\n <!--\n `|| undefined` keeps the group opinion-free when the row does not ask, `undefined` being\n what means \"no opinion\" there where `false` is an order. The size is always an opinion,\n the pagination having a default of its own.\n -->\n <VButtonGroup\n class=\"v-pagination-items\"\n :detached=\"detached\"\n :bordered=\"bordered\"\n :size=\"size\"\n :elevated=\"elevated || undefined\"\n >\n <PageControl v-if=\"controls && edgeControls\" side=\"first\" />\n <PageControl v-if=\"controls\" side=\"prev\" />\n\n <template v-for=\"item in items\" :key=\"item.key\">\n <VButton\n v-if=\"item.kind === 'page'\"\n class=\"v-pagination-page\"\n :variant=\"item.page === currentPage ? selectedVariant : itemVariant\"\n :tone=\"item.page === currentPage ? tone : 'neutral'\"\n :disabled=\"disabled || isPageDisabled(item.page)\"\n :aria-label=\"pageLabelFor(item.page)\"\n :aria-current=\"item.page === currentPage ? 'page' : undefined\"\n :href=\"hrefFor(item.page)\"\n @click=\"choose($event, item.page)\"\n >\n {{ item.page }}\n </VButton>\n <!--\n The ellipsis is a disabled icon-only button rather than a span: being a button, it\n keeps the joined row's seam continuous and follows the size and density like\n everything else. Disabling it takes it out of the tab order, and it is hidden from\n screen readers, which have the page numbers themselves; which is also why it is a\n VButton and not a VIconButton, whose required label would name something nobody can\n reach.\n -->\n <VButton\n v-else\n class=\"v-pagination-ellipsis\"\n aria-hidden=\"true\"\n data-icon-only\n :variant=\"itemVariant\"\n tone=\"neutral\"\n disabled\n >\n <template #start>\n <VIcon :name=\"moreHorizIcon\" />\n </template>\n </VButton>\n </template>\n\n <PageControl v-if=\"controls\" side=\"next\" />\n <PageControl v-if=\"controls && edgeControls\" side=\"last\" />\n </VButtonGroup>\n </nav>\n</template>\n\n<style>\n@layer vectis.components {\n .v-pagination {\n display: flex;\n }\n\n .v-pagination[data-align='center'] {\n justify-content: center;\n }\n\n .v-pagination[data-align='end'] {\n justify-content: flex-end;\n }\n\n /*\n * Qualified by an attribute VButton always renders, which makes both of these beat that\n * button's own padding and its own transition whatever order the two sheets end up in; the\n * VIconButton idiom.\n */\n .v-pagination-page[data-size] {\n /* A one-digit pill is square, and widens by itself past that. The height variable\n is set by the shared size class on this very element, so this single rule covers\n all five sizes in either density. */\n min-inline-size: var(--control-height);\n padding-inline: var(--vectis-space-2);\n\n /*\n * The highlight changes instantly, and this must not be \"restored for consistency\". VButton\n * fades `background-color` over `--vectis-duration-fast`, which is right for a button that\n * stays put and wrong here: truncation SHIFTS its window, so from one page to the next the\n * highlight keeps its slot but changes ELEMENT, and the outgoing and incoming pills are\n * both half-tinted for a few frames; read as a flicker, with nothing in the console.\n */\n transition: none;\n }\n\n /* The ellipsis is a disabled button only as a technical device; to the reader it is\n not a control that has been turned off, so it does not take the forbidden\n cursor. Qualified like the pills: VButton's disabled cursor weighs (0,2,0), and a bare\n class loses to it whatever the sheet order. */\n .v-pagination-ellipsis[data-size] {\n cursor: default;\n }\n\n /*\n * A disabled page or control greys its outline to a different token, hence a variable the\n * second rule changes. VToggle's `--toggle-frame` is the same device.\n */\n .v-pagination[data-item-variant='outline'] {\n --pagination-frame: var(--vectis-color-border-strong);\n }\n\n .v-pagination[data-item-variant='outline'] > * > :is(:disabled, [aria-disabled='true']) {\n --pagination-frame: var(--vectis-color-border);\n }\n\n .v-pagination[data-item-variant='outline']\n > *\n > .v-pagination-page[aria-current='page']:is([data-variant='soft'], [data-variant='ghost']) {\n border-color: var(--pagination-frame);\n }\n\n /*\n * The class is repeated to reach (0,6,0). The variant, hover and active rules reach (0,5,0),\n * and with the forcing turned off any of them that still won would paint its tone over the\n * selection, with HighlightText on top of it.\n */\n @media (forced-colors: active) {\n .v-pagination-page.v-pagination-page.v-pagination-page.v-pagination-page[aria-current='page']:not(\n :disabled,\n [aria-disabled='true']\n ) {\n forced-color-adjust: none;\n background-color: Highlight;\n color: HighlightText;\n border-color: Highlight;\n outline-color: CanvasText;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8JA,IAAMmC,IAAQC,GA4BRC,IAAOH,GAYPI,IAAIC,EAAY,GAChBC,IAAYC,QAAmBN,EAAM,SAASG,EAAE,MAAM,WAAW,KAAK,GACtEI,KAAmBC,QAAeR,EAAM,YAAYG,EAAE,MAAM,WAAW,QAAQ,GAC/EM,KAAmBD,QAAeR,EAAM,YAAYG,EAAE,MAAM,WAAW,IAAI,GAC3EO,IAAoBF,QAAeR,EAAM,aAAaG,EAAE,MAAM,WAAW,KAAK,GAC9EQ,IAAmBH,QAAeR,EAAM,YAAYG,EAAE,MAAM,WAAW,IAAI,GAG3ES,IAAO3C,EAAmBgC,GAAA,YAAe,GAOzCa,IAAQN,QAAe,KAAK,IAAI,KAAK,MAAMR,EAAM,MAAM,KAAK,GAAG,CAAC,CAAC,GACjEe,IAAcP,QAAeQ,EAAM,KAAK,MAAMJ,EAAK,KAAK,KAAK,GAAG,GAAGE,EAAM,KAAK,CAAC,GAE/EG,IAAiBT,QAAeU,EAAelB,EAAM,aAAa,CAAC;EAKzE,SAASmB,EAAa,GAAmB;GACvC,OAAOnB,EAAM,YAAYA,EAAM,UAAUoB,CAAC,IAAIjB,EAAE,MAAM,WAAW,KAAKiB,CAAC;EACzE;EAGA,IAAMC,IAAQb,QAAiC;GAC7C,IAAMc,IAAQR,EAAM,OACdS,IAAUR,EAAY,OAEtBS,KAAY,OAA+B;IAAE,MAAM;IAAQ,KAAK,QAAQJ;IAAK,MAAMA;GAAE,IACrFK,KAAS,GAAc,MAAiC;IAC5D,IAAMC,IAAwB,CAAC;IAC/B,KAAK,IAAIN,IAAIO,GAAMP,KAAKQ,GAAI,KAAK,EAAI,KAAKJ,EAASJ,CAAC,CAAC;IACrD,OAAOM;GACT,GAMMG,KAAO,OAA2C;IAAE,MAAM;IAAO,KAAK,OAAOC;GAAO,IAGpFC,IAAQ,KAAK,MAAM/B,EAAM,gBAAgBsB,CAAK,GAC9CU,IAAU,OAAO,MAAMD,CAAK,IAAIT,IAAQ,KAAK,IAAIS,GAAO,CAAC;GAC/D,IAAIC,MAAY,GAAG,OAAO,CAAC;GAC3B,IAAIA,KAAWV,GAAO,OAAOG,EAAM,GAAGH,CAAK;GAK3C,IAAIU,IAAU,GAAG;IACf,IAAML,IAAOX,EAAMO,IAAU,KAAK,OAAOS,IAAU,KAAK,CAAC,GAAG,GAAGV,IAAQU,IAAU,CAAC;IAClF,OAAOP,EAAME,GAAMA,IAAOK,IAAU,CAAC;GACvC;GAEA,IAAMC,IAAQV,IAAU,KAAK,OAAOS,IAAU,KAAK,CAAC,GAC9CE,IAAMD,KAASD,IAAU;GAM/B,OAFIC,KAAS,IAAU;IAAC,GAAGR,EAAM,GAAGO,IAAU,CAAC;IAAGH,EAAI,KAAK;IAAGL,EAASF,CAAK;GAAC,IACzEY,KAAOZ,IAAQ,IAAU;IAACE,EAAS,CAAC;IAAGK,EAAI,OAAO;IAAG,GAAGJ,EAAMH,IAAQU,IAAU,GAAGV,CAAK;GAAC,IACtF;IAACE,EAAS,CAAC;IAAGK,EAAI,OAAO;IAAG,GAAGJ,EAAMQ,GAAOC,CAAG;IAAGL,EAAI,KAAK;IAAGL,EAASF,CAAK;GAAC;EACtF,CAAC;EAQD,SAASa,EAAK,GAAuC;GACnD,KAAK,IAAIf,IAAIL,EAAY,QAAQqB,GAAWhB,KAAK,KAAKA,KAAKN,EAAM,OAAO,KAAKsB,GAC3E,IAAI,CAACnB,EAAe,MAAMG,CAAC,GAAG,OAAOA;EAGzC;EAMA,SAASiB,EAAK,GAAuC;GACnD,IAAMH,IAAME,IAAY,IAAI,IAAItB,EAAM;GACtC,KAAK,IAAI,IAAIoB,GAAK,MAAMnB,EAAY,OAAO,KAAKqB,GAC9C,IAAI,CAACnB,EAAe,MAAM,CAAC,GAAG,OAAO;EAGzC;EAEA,IAAMqB,IAAc9B,QAAe6B,EAAK,EAAE,CAAC,GACrCE,IAAa/B,QAAe2B,EAAK,EAAE,CAAC,GACpCK,IAAahC,QAAe2B,EAAK,CAAC,CAAC,GACnCM,IAAajC,QAAe6B,EAAK,CAAC,CAAC;EAEzC,SAASK,EAAK,GAAuB;GACnC,AAAItB,MAAM,KAAA,MACV,EAAK,QAAQJ,EAAMI,GAAG,GAAGN,EAAM,KAAK;EACtC;EAGA,SAAS6B,EAAQ,GAA+B;GAC9C,OAAO3C,EAAM,OAAOoB,CAAC;EACvB;EAQA,SAASwB,GAAe,GAA4B;GAClD,OACE5C,EAAM,SAAS,KAAA,MACd6C,EAAM,WAAW,KAAKA,EAAM,WAAWA,EAAM,WAAWA,EAAM,YAAYA,EAAM;EAErF;EAEA,SAASC,EAAO,GAAmB,GAAuB;GACxD,AAAI1B,MAAM,KAAA,KAAawB,GAAeC,CAAK,MAC3C3C,EAAK,YAAYkB,GAAGyB,CAAK,GACzBH,EAAKtB,CAAC;EACR;EAEA,SAAS2B,GAAW,GAA0B;GAC5C,OAAOC,EAAG,QAAQ,qCAAmC;EACvD;EAWA,eAAeC,GAAc,GAAmB,GAAuB;GACrE,IAAMC,IAAUL,EAAM,eAChBM,IAAWD,MAAY,SAAS;GAEtC,IADAJ,EAAOD,GAAOzB,CAAC,GACX,CAAC+B,GAAU;GACf,MAAMC,GAAS;GACf,IAAMC,IAAMC,EAAM;GAClB,IAAI,CAACD,KAAO,CAACN,GAAWG,CAAO,GAAG;GAClC,IAAM3B,IAAU8B,EAAI,cAA2B,yBAAuB;GACtE,IAAI9B,GAAS,OAAOA,EAAQ,MAAM;GAClC,IAAMgC,IAAS,CAAC,GAAGF,EAAI,iBAA8B,qCAAqC,CAAC;GAI1F,CAHcE,EAAO,QACnB,MAAOL,EAAQ,wBAAwBF,CAAE,IAAI,KAAK,2BAEnD,CAAA,CAAO,GAAG,EAAE,KAAKO,EAAO,GAAA,EAAK,MAAM;EACvC;EAUA,IAAMC,KAA2D,EAAE,cAAW;GAC5E,IAAM,EAAE,UAAO,SAAM,cAAW;IAC9B,OAAO;KAAE,OAAO9C,EAAkB;KAAO,MAAMV,EAAM;KAAW,QAAQsC,EAAY;IAAM;IAC1F,MAAM;KAAE,OAAO/B,GAAiB;KAAO,MAAMP,EAAM;KAAU,QAAQuC,EAAW;IAAM;IACtF,MAAM;KAAE,OAAO9B,GAAiB;KAAO,MAAMT,EAAM;KAAU,QAAQwC,EAAW;IAAM;IACtF,MAAM;KAAE,OAAO7B,EAAiB;KAAO,MAAMX,EAAM;KAAU,QAAQyC,EAAW;IAAM;GACxF,EAAEX,IACI2B,IAAWzD,EAAM,YAAY0D,MAAW,KAAA,GACxCC,IAAS;IACb,OAAO;IACP,aAAa7B;IACb,SAAS9B,EAAM;IACf;IACA,MAAM2C,EAAQe,KAAU3C,EAAY,KAAK;IACzC,KAAKf,EAAM,QAAQ,CAACyD,IAAW3B,IAAO,KAAA;IACtC,UAAU,MAAsBmB,GAAcJ,GAAOa,CAAM;GAC7D,GACME,UAAcC,EAAE3F,GAAO;IAAE,GAAG4F,EAAUC,CAAI;IAAG,UAAU;GAAK,CAAC;GACnE,IAAI/D,EAAM,aAAa,QAAQ,OAAO6D,EAAE1F,GAAa;IAAE,GAAGwF;IAAQ;GAAM,GAAGC,CAAK;GAChF,IAAMI,IAAWlC,MAAS,WAAWA,MAAS;GAC9C,OAAO+B,EACLzF,GACA;IAAE,GAAGuF;IAAQ,MAAM;GAAU,GAC7B;IACE,GAAI3D,EAAM,aAAa,SAAS,GAAGgE,IAAW,UAAU,QAAQJ,EAAM,IAAI,CAAC;IAC3E,eAAeC,EAAE,QAAQ,EAAE,OAAO,6BAA6B,GAAGI,CAAK;GACzE,CACF;EACF,GAEMX,IAAQY,EAAwB,IAAI;EAI1C,SAASC,GAAU,GAAsB;GACvC,IAAMd,IAAMC,EAAM;GAClB,AAAKD,KACLe,EAAcvB,GAAOQ,SACnBgB,EAAehB,GAAK,6DAA2D,CACjF;EACF;SAIAvD,EAAa;GAKX,QAAQ,OAEJwD,EAAM,OAAO,cACX,4DACF,KAAKA,EAAM,OAAO,cAA2B,qCAAqC,EAAA,EACjF,MAAMgB,CAAO;GAElB,IAAIhB;EACN,CAAC,cAICjF,EAAA,GAAAC,EAoEM,OAAA;GAnEA,SAAA;GAAJ,KAAIgF;GACJ,OAAM;GACL,cAAY/E,EAAA8B,CAAA;GACZ,cAAYJ,EAAA;GACZ,qBAAmBA,EAAA;GACV;EAYVzB,GAAAA,CAAAA,EAiDeC,GAAA;GAhDb,OAAM;GACL,UAAUwB,EAAA;GACV,UAAUA,EAAA;GACV,MAAMA,EAAA;GACN,UAAUA,EAAA,YAAY,KAAA;;GAEvB,SAAAvB,QAA4D;IAAzCuB,EAAA,YAAYA,EAAA,gBAA/B5B,EAAA,GAAAM,EAA4D6E,GAAA;;KAAf,MAAK;;IAC/BvD,EAAA,YAAnB5B,EAAA,GAAAM,EAA2C6E,GAAA;;KAAd,MAAK;;KAElCnF,EAAA,EAAA,GAAAC,EAmCWO,GAAA,MAAAC,EAnCcuC,EAAA,QAAR,OAAqBkD,EAAA,GAAAC,EAAAM,GAAA,EAAA,KAAAE,EAAK,IAAA,GAAA,CAEjCA,EAAK,SAAI,UADjB3G,EAAA,GAAAM,EAYUP,GAAA;;KAVR,OAAM;KACL,SAAS4G,EAAK,SAASjE,EAAA,QAAcd,EAAA,kBAAkBA,EAAA;KACvD,MAAM+E,EAAK,SAASjE,EAAA,QAAcd,EAAA,OAAI;KACtC,UAAUA,EAAA,YAAYgB,EAAA,MAAe+D,EAAK,IAAI;KAC9C,cAAY7D,EAAa6D,EAAK,IAAI;KAClC,gBAAcA,EAAK,SAASjE,EAAA,QAAW,SAAY,KAAA;KACnD,MAAM4B,EAAQqC,EAAK,IAAI;KACvB,UAAK,MAAElC,EAAOmC,GAAQD,EAAK,IAAI;;KAEhC,SAAAtG,QAAe,CAAZK,EAAAC,EAAAgG,EAAK,IAAI,GAAA,CAAA,CAAA,CAAA;;;;;;;;;;IAUd3G,CAAAA,MAAAA,EAAA,GAAAM,EAYUP,GAAA;;KAVR,OAAM;KACN,eAAY;KACZ,kBAAA;KACC,SAAS6B,EAAA;KACV,MAAK;KACL,UAAA;;KAEW,OAAKvB,QACiB,CAA/BF,EAA+BN,GAAA,EAAvB,MAAMK,EAAAU,CAAA,EAAa,GAAA,MAAA,GAAA,CAAA,MAAA,CAAA,CAAA,CAAA;;;IAKdgB,EAAA,YAAnB5B,EAAA,GAAAM,EAA2C6E,GAAA;;KAAd,MAAK;;IACfvD,EAAA,YAAYA,EAAA,gBAA/B5B,EAAA,GAAAM,EAA2D6E,GAAA;;KAAd,MAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"VPopover.js","names":[],"sources":["../../../src/components/VPopover/VPopover.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @core\n/**\n * Bridge native popover state to v-model while CSS anchors the panel. Roles, keyboard handling\n * and dismissal policy belong to the consuming widget.\n */\nimport { computed, ref, useId } from 'vue'\n\nimport { usePopover, usePopoverModel } from '../../composables/usePopover'\n\nexport type PopoverPlacement =\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n\n/**\n * What the trigger has to carry for the browser to open the panel and for assistive technology\n * to know what it controls.\n */\nexport type PopoverTriggerProps = {\n popovertarget: string\n 'aria-expanded': boolean\n 'aria-controls': string\n}\n\n/** Whether the browser dismisses the panel on its own. */\nexport type PopoverMode = 'auto' | 'manual'\n\ninterface PopoverProps {\n /**\n * The id of the panel, which the trigger points at. One is generated when none is\n * given, so this is only needed to tie the panel to something outside the\n * component.\n */\n id?: string\n /**\n * Where the panel is placed relative to its trigger. The browser flips it to the\n * opposite side by itself when there is not enough room.\n */\n placement?: PopoverPlacement\n /** How the panel closes. */\n mode?: PopoverMode\n /**\n * The name of an anchor the consumer has set on its own control, written as a CSS\n * dashed identifier such as `--tooltip-anchor`. Supplying it replaces the internal\n * wrapper, which is the required route as soon as the trigger is a text input,\n * where the browser's own `popovertarget` attribute is not allowed.\n */\n anchor?: string\n /**\n * Strips the panel of the design system's surface: no background, no border, no\n * shadow and no rounded corners. It is what a panel whose content brings its own\n * asks for, as VDatePicker does.\n */\n bare?: boolean\n /** Stops the panel being narrower than whatever it is anchored to. */\n matchTrigger?: boolean\n}\n\nconst props = withDefaults(defineProps<PopoverProps>(), {\n id: undefined,\n placement: 'bottom-start',\n mode: 'auto',\n anchor: undefined,\n bare: false,\n matchTrigger: false,\n})\n\n/**\n * Whether the panel is showing. Setting it opens and closes the panel; a consumer needing the\n * change to be synchronous uses the exposed `show`/ `close` instead, which VTooltip and the\n * pickers do.\n */\nconst open = defineModel<boolean>('open', { default: false })\n\ndefineSlots<{\n /**\n * The element that opens the panel. Bind the `triggerProps` it receives onto a\n * button of your own: that is what wires the two together.\n */\n trigger?(props: { triggerProps: PopoverTriggerProps }): unknown\n /** What the panel contains. */\n default(): unknown\n}>()\n\n/*\n * Everything the consumer passes; the ARIA role, the aria-*, the data-*, class, style and the\n * listeners; goes on the PANEL rather than on the anchoring wrapper, because the panel is what\n * the consumer is really describing and styling. This is a deliberate departure from the design\n * system's usual wrapper pattern, which keeps class and style on the root; `useRootAttrs`\n * therefore does not apply here.\n */\ndefineOptions({ inheritAttrs: false })\n\nconst panelEl = ref<HTMLElement | null>(null)\nconst generatedId = useId()\nconst panelId = computed(() => props.id ?? generatedId)\n\n// The invariant to respect here: `shown` is fed by the panel's own events and never assigned by\n// hand, so the browser stays the source of truth; it can close the panel without asking us.\nconst { shown, syncShown, show, hide } = usePopover(panelEl)\n\nconst triggerProps = computed<PopoverTriggerProps>(() => ({\n popovertarget: panelId.value,\n 'aria-expanded': open.value,\n 'aria-controls': panelId.value,\n}))\n\n// Set the anchor explicitly in both trigger modes; an unset custom property would inherit an\n// ancestor popover's anchor.\nconst panelStyle = computed(() => ({\n '--popover-anchor-name': props.anchor ?? '--popover-anchor',\n}))\n\nfunction onToggle(event: Event) {\n syncShown(event)\n open.value = shown.value\n}\n\nusePopoverModel(open, () => shown.value, show, hide)\n\n// The imperative counterpart of `v-model:open`, for a consumer whose opening must be\n// SYNCHRONOUS: the model would insert a tick, which is exactly what VTooltip's delay and\n// the pickers' focus frame cannot afford.\ndefineExpose({\n /** Opens the panel at once, without waiting for the model to come round. */\n show,\n /** Closes it at once. Safe to call on a panel that is already closed. */\n close: hide,\n /** The panel element itself, which is the popover. */\n el: panelEl,\n})\n</script>\n\n<template>\n <span class=\"v-popover\" :data-trigger=\"$slots.trigger ? '' : undefined\">\n <slot name=\"trigger\" :trigger-props=\"triggerProps\" />\n <div\n :id=\"panelId\"\n ref=\"panelEl\"\n :popover=\"mode\"\n class=\"v-overlay v-popover-panel v-floating\"\n :class=\"{ 'v-panel': !bare }\"\n :data-placement=\"placement\"\n :data-match-trigger=\"matchTrigger ? '' : undefined\"\n :style=\"panelStyle\"\n v-bind=\"$attrs\"\n @beforetoggle=\"syncShown\"\n @toggle=\"onToggle\"\n >\n <slot />\n </div>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * Without a trigger the wrapper has nothing to wrap, so `display: contents` takes it out of\n * the layout entirely; the panel is positioned against the viewport and does not depend on\n * it. Left as an empty inline-block it would still create a line box, and therefore add\n * height, inside every component using this route.\n */\n .v-popover {\n display: contents;\n }\n\n /*\n * With a trigger the wrapper must generate a box, since that box is the ANCHOR; which is why\n * `display: contents` stops at the rule above. It is FLEX rather than inline-block, the\n * `.v-badge-host` and `.v-tooltip` form: both are inline-level atomic boxes, so text flows\n * around them identically, but an inline-block opens an inline formatting context for the\n * trigger, which then lands on a line box and adds the strut's descender to the wrapper.\n */\n .v-popover[data-trigger] {\n display: inline-flex;\n align-items: center;\n anchor-name: --popover-anchor;\n /*\n * Without the confinement every panel on the page would attach itself to the last wrapper\n * carrying this name.\n */\n anchor-scope: --popover-anchor;\n }\n\n /*\n * Widths, heights and overflow differ from one consumer to the next, and since each component\n * ships its own stylesheet, a declaration here would sit at equal specificity with theirs;\n * leaving the winner to whichever order the consumer's bundler happens to produce.\n */\n .v-popover-panel {\n position-anchor: var(--popover-anchor-name);\n }\n\n /*\n * `:where()` keeps this at (0,1,0). A bare consumer restyles its panel through the\n * `.v-popover-panel.v-x-panel` compound (VTooltip), at (0,2,0), which must win; a (0,2,0)\n * rule here would tie with it across two sheets.\n */\n .v-popover-panel:where(:not(.v-panel)) {\n border: none;\n padding: 0;\n background: none;\n color: inherit;\n overflow: visible;\n }\n\n /*\n * It is written here rather than in each consumer because `anchor-size()` resolves against\n * `position-anchor`, which is the declaration above; the same reason the anchoring itself\n * lives here. A minimum beats a maximum, so a consumer's own `max-inline-size` does not clamp\n * it: a trigger wider than the ceiling widens the panel past it, which is intended.\n */\n .v-popover-panel[data-match-trigger] {\n min-inline-size: anchor-size(width);\n }\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"VPopover.js","names":["_sfc_main","VPopover_vue_vue_type_script_setup_true_lang_default","VPopover_default"],"sources":["../../../src/components/VPopover/VPopover.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @core\n/**\n * Bridge native popover state to v-model while CSS anchors the panel. Roles, keyboard handling\n * and dismissal policy belong to the consuming widget.\n */\nimport { computed, ref, useId } from 'vue'\n\nimport { usePopover, usePopoverModel } from '../../composables/usePopover'\n\nexport type PopoverPlacement =\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n\n/**\n * What the trigger has to carry for the browser to open the panel and for assistive technology\n * to know what it controls.\n */\nexport type PopoverTriggerProps = {\n popovertarget: string\n 'aria-expanded': boolean\n 'aria-controls': string\n}\n\n/** Whether the browser dismisses the panel on its own. */\nexport type PopoverMode = 'auto' | 'manual'\n\ninterface PopoverProps {\n /**\n * The id of the panel, which the trigger points at. One is generated when none is\n * given, so this is only needed to tie the panel to something outside the\n * component.\n */\n id?: string\n /**\n * Where the panel is placed relative to its trigger. The browser flips it to the\n * opposite side by itself when there is not enough room.\n */\n placement?: PopoverPlacement\n /** How the panel closes. */\n mode?: PopoverMode\n /**\n * The name of an anchor the consumer has set on its own control, written as a CSS\n * dashed identifier such as `--tooltip-anchor`. Supplying it replaces the internal\n * wrapper, which is the required route as soon as the trigger is a text input,\n * where the browser's own `popovertarget` attribute is not allowed.\n */\n anchor?: string\n /**\n * Strips the panel of the design system's surface: no background, no border, no\n * shadow and no rounded corners. It is what a panel whose content brings its own\n * asks for, as VDatePicker does.\n */\n bare?: boolean\n /** Stops the panel being narrower than whatever it is anchored to. */\n matchTrigger?: boolean\n}\n\nconst props = withDefaults(defineProps<PopoverProps>(), {\n id: undefined,\n placement: 'bottom-start',\n mode: 'auto',\n anchor: undefined,\n bare: false,\n matchTrigger: false,\n})\n\n/**\n * Whether the panel is showing. Setting it opens and closes the panel; a consumer needing the\n * change to be synchronous uses the exposed `show`/ `close` instead, which VTooltip and the\n * pickers do.\n */\nconst open = defineModel<boolean>('open', { default: false })\n\ndefineSlots<{\n /**\n * The element that opens the panel. Bind the `triggerProps` it receives onto a\n * button of your own: that is what wires the two together.\n */\n trigger?(props: { triggerProps: PopoverTriggerProps }): unknown\n /** What the panel contains. */\n default(): unknown\n}>()\n\n/*\n * Everything the consumer passes; the ARIA role, the aria-*, the data-*, class, style and the\n * listeners; goes on the PANEL rather than on the anchoring wrapper, because the panel is what\n * the consumer is really describing and styling. This is a deliberate departure from the design\n * system's usual wrapper pattern, which keeps class and style on the root; `useRootAttrs`\n * therefore does not apply here.\n */\ndefineOptions({ inheritAttrs: false })\n\nconst panelEl = ref<HTMLElement | null>(null)\nconst generatedId = useId()\nconst panelId = computed(() => props.id ?? generatedId)\n\n// The invariant to respect here: `shown` is fed by the panel's own events and never assigned by\n// hand, so the browser stays the source of truth; it can close the panel without asking us.\nconst { shown, syncShown, show, hide } = usePopover(panelEl)\n\nconst triggerProps = computed<PopoverTriggerProps>(() => ({\n popovertarget: panelId.value,\n 'aria-expanded': open.value,\n 'aria-controls': panelId.value,\n}))\n\n// Set the anchor explicitly in both trigger modes; an unset custom property would inherit an\n// ancestor popover's anchor.\nconst panelStyle = computed(() => ({\n '--popover-anchor-name': props.anchor ?? '--popover-anchor',\n}))\n\nfunction onToggle(event: Event) {\n syncShown(event)\n open.value = shown.value\n}\n\nusePopoverModel(open, () => shown.value, show, hide)\n\n// The imperative counterpart of `v-model:open`, for a consumer whose opening must be\n// SYNCHRONOUS: the model would insert a tick, which is exactly what VTooltip's delay and\n// the pickers' focus frame cannot afford.\ndefineExpose({\n /** Opens the panel at once, without waiting for the model to come round. */\n show,\n /** Closes it at once. Safe to call on a panel that is already closed. */\n close: hide,\n /** The panel element itself, which is the popover. */\n el: panelEl,\n})\n</script>\n\n<template>\n <span class=\"v-popover\" :data-trigger=\"$slots.trigger ? '' : undefined\">\n <slot name=\"trigger\" :trigger-props=\"triggerProps\" />\n <div\n :id=\"panelId\"\n ref=\"panelEl\"\n :popover=\"mode\"\n class=\"v-overlay v-popover-panel v-floating\"\n :class=\"{ 'v-panel': !bare }\"\n :data-placement=\"placement\"\n :data-match-trigger=\"matchTrigger ? '' : undefined\"\n :style=\"panelStyle\"\n v-bind=\"$attrs\"\n @beforetoggle=\"syncShown\"\n @toggle=\"onToggle\"\n >\n <slot />\n </div>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * Without a trigger the wrapper has nothing to wrap, so `display: contents` takes it out of\n * the layout entirely; the panel is positioned against the viewport and does not depend on\n * it. Left as an empty inline-block it would still create a line box, and therefore add\n * height, inside every component using this route.\n */\n .v-popover {\n display: contents;\n }\n\n /*\n * With a trigger the wrapper must generate a box, since that box is the ANCHOR; which is why\n * `display: contents` stops at the rule above. It is FLEX rather than inline-block, the\n * `.v-badge-host` and `.v-tooltip` form: both are inline-level atomic boxes, so text flows\n * around them identically, but an inline-block opens an inline formatting context for the\n * trigger, which then lands on a line box and adds the strut's descender to the wrapper.\n */\n .v-popover[data-trigger] {\n display: inline-flex;\n align-items: center;\n anchor-name: --popover-anchor;\n /*\n * Without the confinement every panel on the page would attach itself to the last wrapper\n * carrying this name.\n */\n anchor-scope: --popover-anchor;\n }\n\n /*\n * Widths, heights and overflow differ from one consumer to the next, and since each component\n * ships its own stylesheet, a declaration here would sit at equal specificity with theirs;\n * leaving the winner to whichever order the consumer's bundler happens to produce.\n */\n .v-popover-panel {\n position-anchor: var(--popover-anchor-name);\n }\n\n /*\n * `:where()` keeps this at (0,1,0). A bare consumer restyles its panel through the\n * `.v-popover-panel.v-x-panel` compound (VTooltip), at (0,2,0), which must win; a (0,2,0)\n * rule here would tie with it across two sheets.\n */\n .v-popover-panel:where(:not(.v-panel)) {\n border: none;\n padding: 0;\n background: none;\n color: inherit;\n overflow: visible;\n }\n\n /*\n * It is written here rather than in each consumer because `anchor-size()` resolves against\n * `position-anchor`, which is the declaration above; the same reason the anchoring itself\n * lives here. A minimum beats a maximum, so a consumer's own `max-inline-size` does not clamp\n * it: a trigger wider than the ceiling widens the panel past it, which is intended.\n */\n .v-popover-panel[data-match-trigger] {\n min-inline-size: anchor-size(width);\n }\n}\n</style>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"VPopover.vue_vue_type_script_setup_true_lang.js","names":["$slots","$attrs"],"sources":["../../../src/components/VPopover/VPopover.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @core\n/**\n * Bridge native popover state to v-model while CSS anchors the panel. Roles, keyboard handling\n * and dismissal policy belong to the consuming widget.\n */\nimport { computed, ref, useId } from 'vue'\n\nimport { usePopover, usePopoverModel } from '../../composables/usePopover'\n\nexport type PopoverPlacement =\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n\n/**\n * What the trigger has to carry for the browser to open the panel and for assistive technology\n * to know what it controls.\n */\nexport type PopoverTriggerProps = {\n popovertarget: string\n 'aria-expanded': boolean\n 'aria-controls': string\n}\n\n/** Whether the browser dismisses the panel on its own. */\nexport type PopoverMode = 'auto' | 'manual'\n\ninterface PopoverProps {\n /**\n * The id of the panel, which the trigger points at. One is generated when none is\n * given, so this is only needed to tie the panel to something outside the\n * component.\n */\n id?: string\n /**\n * Where the panel is placed relative to its trigger. The browser flips it to the\n * opposite side by itself when there is not enough room.\n */\n placement?: PopoverPlacement\n /** How the panel closes. */\n mode?: PopoverMode\n /**\n * The name of an anchor the consumer has set on its own control, written as a CSS\n * dashed identifier such as `--tooltip-anchor`. Supplying it replaces the internal\n * wrapper, which is the required route as soon as the trigger is a text input,\n * where the browser's own `popovertarget` attribute is not allowed.\n */\n anchor?: string\n /**\n * Strips the panel of the design system's surface: no background, no border, no\n * shadow and no rounded corners. It is what a panel whose content brings its own\n * asks for, as VDatePicker does.\n */\n bare?: boolean\n /** Stops the panel being narrower than whatever it is anchored to. */\n matchTrigger?: boolean\n}\n\nconst props = withDefaults(defineProps<PopoverProps>(), {\n id: undefined,\n placement: 'bottom-start',\n mode: 'auto',\n anchor: undefined,\n bare: false,\n matchTrigger: false,\n})\n\n/**\n * Whether the panel is showing. Setting it opens and closes the panel; a consumer needing the\n * change to be synchronous uses the exposed `show`/ `close` instead, which VTooltip and the\n * pickers do.\n */\nconst open = defineModel<boolean>('open', { default: false })\n\ndefineSlots<{\n /**\n * The element that opens the panel. Bind the `triggerProps` it receives onto a\n * button of your own: that is what wires the two together.\n */\n trigger?(props: { triggerProps: PopoverTriggerProps }): unknown\n /** What the panel contains. */\n default(): unknown\n}>()\n\n/*\n * Everything the consumer passes; the ARIA role, the aria-*, the data-*, class, style and the\n * listeners; goes on the PANEL rather than on the anchoring wrapper, because the panel is what\n * the consumer is really describing and styling. This is a deliberate departure from the design\n * system's usual wrapper pattern, which keeps class and style on the root; `useRootAttrs`\n * therefore does not apply here.\n */\ndefineOptions({ inheritAttrs: false })\n\nconst panelEl = ref<HTMLElement | null>(null)\nconst generatedId = useId()\nconst panelId = computed(() => props.id ?? generatedId)\n\n// The invariant to respect here: `shown` is fed by the panel's own events and never assigned by\n// hand, so the browser stays the source of truth; it can close the panel without asking us.\nconst { shown, syncShown, show, hide } = usePopover(panelEl)\n\nconst triggerProps = computed<PopoverTriggerProps>(() => ({\n popovertarget: panelId.value,\n 'aria-expanded': open.value,\n 'aria-controls': panelId.value,\n}))\n\n// Set the anchor explicitly in both trigger modes; an unset custom property would inherit an\n// ancestor popover's anchor.\nconst panelStyle = computed(() => ({\n '--popover-anchor-name': props.anchor ?? '--popover-anchor',\n}))\n\nfunction onToggle(event: Event) {\n syncShown(event)\n open.value = shown.value\n}\n\nusePopoverModel(open, () => shown.value, show, hide)\n\n// The imperative counterpart of `v-model:open`, for a consumer whose opening must be\n// SYNCHRONOUS: the model would insert a tick, which is exactly what VTooltip's delay and\n// the pickers' focus frame cannot afford.\ndefineExpose({\n /** Opens the panel at once, without waiting for the model to come round. */\n show,\n /** Closes it at once. Safe to call on a panel that is already closed. */\n close: hide,\n /** The panel element itself, which is the popover. */\n el: panelEl,\n})\n</script>\n\n<template>\n <span class=\"v-popover\" :data-trigger=\"$slots.trigger ? '' : undefined\">\n <slot name=\"trigger\" :trigger-props=\"triggerProps\" />\n <div\n :id=\"panelId\"\n ref=\"panelEl\"\n :popover=\"mode\"\n class=\"v-overlay v-popover-panel v-floating\"\n :class=\"{ 'v-panel': !bare }\"\n :data-placement=\"placement\"\n :data-match-trigger=\"matchTrigger ? '' : undefined\"\n :style=\"panelStyle\"\n v-bind=\"$attrs\"\n @beforetoggle=\"syncShown\"\n @toggle=\"onToggle\"\n >\n <slot />\n </div>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * Without a trigger the wrapper has nothing to wrap, so `display: contents` takes it out of\n * the layout entirely; the panel is positioned against the viewport and does not depend on\n * it. Left as an empty inline-block it would still create a line box, and therefore add\n * height, inside every component using this route.\n */\n .v-popover {\n display: contents;\n }\n\n /*\n * With a trigger the wrapper must generate a box, since that box is the ANCHOR; which is why\n * `display: contents` stops at the rule above. It is FLEX rather than inline-block, the\n * `.v-badge-host` and `.v-tooltip` form: both are inline-level atomic boxes, so text flows\n * around them identically, but an inline-block opens an inline formatting context for the\n * trigger, which then lands on a line box and adds the strut's descender to the wrapper.\n */\n .v-popover[data-trigger] {\n display: inline-flex;\n align-items: center;\n anchor-name: --popover-anchor;\n /*\n * Without the confinement every panel on the page would attach itself to the last wrapper\n * carrying this name.\n */\n anchor-scope: --popover-anchor;\n }\n\n /*\n * Widths, heights and overflow differ from one consumer to the next, and since each component\n * ships its own stylesheet, a declaration here would sit at equal specificity with theirs;\n * leaving the winner to whichever order the consumer's bundler happens to produce.\n */\n .v-popover-panel {\n position-anchor: var(--popover-anchor-name);\n }\n\n /*\n * `:where()` keeps this at (0,1,0). A bare consumer restyles its panel through the\n * `.v-popover-panel.v-x-panel` compound (VTooltip), at (0,2,0), which must win; a (0,2,0)\n * rule here would tie with it across two sheets.\n */\n .v-popover-panel:where(:not(.v-panel)) {\n border: none;\n padding: 0;\n background: none;\n color: inherit;\n overflow: visible;\n }\n\n /*\n * It is written here rather than in each consumer because `anchor-size()` resolves against\n * `position-anchor`, which is the declaration above; the same reason the anchoring itself\n * lives here. A minimum beats a maximum, so a consumer's own `max-inline-size` does not clamp\n * it: a trigger wider than the ceiling widens the panel past it, which is intended.\n */\n .v-popover-panel[data-match-trigger] {\n min-inline-size: anchor-size(width);\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoEA,IAAM,IAAQ,GAcR,IAAO,EAAoB,GAAC,MAA0B,GAqBtD,IAAU,EAAwB,IAAI,GACtC,IAAc,EAAM,GACpB,IAAU,QAAe,EAAM,MAAM,CAAW,GAIhD,EAAE,UAAO,cAAW,SAAM,YAAS,EAAW,CAAO,GAErD,IAAe,SAAqC;GACxD,eAAe,EAAQ;GACvB,iBAAiB,EAAK;GACtB,iBAAiB,EAAQ;EAC3B,EAAE,GAII,IAAa,SAAgB,EACjC,yBAAyB,EAAM,UAAU,mBAC3C,EAAE;EAEF,SAAS,EAAS,GAAc;GAE9B,AADA,EAAU,CAAK,GACf,EAAK,QAAQ,EAAM;EACrB;SAEA,EAAgB,SAAY,EAAM,OAAO,GAAM,CAAI,GAKnD,EAAa;GAEX;GAEA,OAAO;GAEP,IAAI;EACN,CAAC,mBAIC,EAiBO,QAAA;GAjBD,OAAM;GAAa,gBAAcA,EAAAA,OAAO,UAAO,KAAQ,KAAA;MAC3D,EAAqD,EAAA,QAAA,WAAA,EAA/B,cAAe,EAAA,MAAY,CAAA,GACjD,EAcM,OAdN,EAcM;GAbH,IAAI,EAAA;YACD;GAAJ,KAAI;GACH,SAAS,EAAA;GACV,OAAK,CAAC,wCAAsC,EAAA,WAAA,CACtB,EAAA,KAAI,CAAA;GACzB,kBAAgB,EAAA;GAChB,sBAAoB,EAAA,eAAY,KAAQ,KAAA;GACxC,OAAO,EAAA;KACAC,EAAAA,QAAM;GACb,gBAAY,AAAA,EAAA,QAAA,GAAA,MAAE,EAAA,CAAA,KAAA,EAAA,CAAA,CAAA,CAAA,GAAA,CAAA;GACN;OAET,EAAQ,EAAA,QAAA,SAAA,CAAA,GAAA,IAAA,CAAA,CAAA,GAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"VPopover.vue_vue_type_script_setup_true_lang.js","names":["$slots","$attrs","_useModel","_openBlock","_createElementBlock","_renderSlot","_createElementVNode","_mergeProps","_unref","_hoisted_1","_hoisted_2","VPopover_vue_vue_type_script_setup_true_lang_default","\"open\"","\"openModifiers\"","__expose","props","__props","open","useModel","panelEl","ref","generatedId","useId","panelId","computed","usePopover","triggerProps","panelStyle","onToggle","syncShown","event","shown","usePopoverModel","show","hide","openBlock","createElementBlock","_ctx","renderSlot","createElementVNode","mergeProps","_cache","args","unref"],"sources":["../../../src/components/VPopover/VPopover.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @core\n/**\n * Bridge native popover state to v-model while CSS anchors the panel. Roles, keyboard handling\n * and dismissal policy belong to the consuming widget.\n */\nimport { computed, ref, useId } from 'vue'\n\nimport { usePopover, usePopoverModel } from '../../composables/usePopover'\n\nexport type PopoverPlacement =\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n\n/**\n * What the trigger has to carry for the browser to open the panel and for assistive technology\n * to know what it controls.\n */\nexport type PopoverTriggerProps = {\n popovertarget: string\n 'aria-expanded': boolean\n 'aria-controls': string\n}\n\n/** Whether the browser dismisses the panel on its own. */\nexport type PopoverMode = 'auto' | 'manual'\n\ninterface PopoverProps {\n /**\n * The id of the panel, which the trigger points at. One is generated when none is\n * given, so this is only needed to tie the panel to something outside the\n * component.\n */\n id?: string\n /**\n * Where the panel is placed relative to its trigger. The browser flips it to the\n * opposite side by itself when there is not enough room.\n */\n placement?: PopoverPlacement\n /** How the panel closes. */\n mode?: PopoverMode\n /**\n * The name of an anchor the consumer has set on its own control, written as a CSS\n * dashed identifier such as `--tooltip-anchor`. Supplying it replaces the internal\n * wrapper, which is the required route as soon as the trigger is a text input,\n * where the browser's own `popovertarget` attribute is not allowed.\n */\n anchor?: string\n /**\n * Strips the panel of the design system's surface: no background, no border, no\n * shadow and no rounded corners. It is what a panel whose content brings its own\n * asks for, as VDatePicker does.\n */\n bare?: boolean\n /** Stops the panel being narrower than whatever it is anchored to. */\n matchTrigger?: boolean\n}\n\nconst props = withDefaults(defineProps<PopoverProps>(), {\n id: undefined,\n placement: 'bottom-start',\n mode: 'auto',\n anchor: undefined,\n bare: false,\n matchTrigger: false,\n})\n\n/**\n * Whether the panel is showing. Setting it opens and closes the panel; a consumer needing the\n * change to be synchronous uses the exposed `show`/ `close` instead, which VTooltip and the\n * pickers do.\n */\nconst open = defineModel<boolean>('open', { default: false })\n\ndefineSlots<{\n /**\n * The element that opens the panel. Bind the `triggerProps` it receives onto a\n * button of your own: that is what wires the two together.\n */\n trigger?(props: { triggerProps: PopoverTriggerProps }): unknown\n /** What the panel contains. */\n default(): unknown\n}>()\n\n/*\n * Everything the consumer passes; the ARIA role, the aria-*, the data-*, class, style and the\n * listeners; goes on the PANEL rather than on the anchoring wrapper, because the panel is what\n * the consumer is really describing and styling. This is a deliberate departure from the design\n * system's usual wrapper pattern, which keeps class and style on the root; `useRootAttrs`\n * therefore does not apply here.\n */\ndefineOptions({ inheritAttrs: false })\n\nconst panelEl = ref<HTMLElement | null>(null)\nconst generatedId = useId()\nconst panelId = computed(() => props.id ?? generatedId)\n\n// The invariant to respect here: `shown` is fed by the panel's own events and never assigned by\n// hand, so the browser stays the source of truth; it can close the panel without asking us.\nconst { shown, syncShown, show, hide } = usePopover(panelEl)\n\nconst triggerProps = computed<PopoverTriggerProps>(() => ({\n popovertarget: panelId.value,\n 'aria-expanded': open.value,\n 'aria-controls': panelId.value,\n}))\n\n// Set the anchor explicitly in both trigger modes; an unset custom property would inherit an\n// ancestor popover's anchor.\nconst panelStyle = computed(() => ({\n '--popover-anchor-name': props.anchor ?? '--popover-anchor',\n}))\n\nfunction onToggle(event: Event) {\n syncShown(event)\n open.value = shown.value\n}\n\nusePopoverModel(open, () => shown.value, show, hide)\n\n// The imperative counterpart of `v-model:open`, for a consumer whose opening must be\n// SYNCHRONOUS: the model would insert a tick, which is exactly what VTooltip's delay and\n// the pickers' focus frame cannot afford.\ndefineExpose({\n /** Opens the panel at once, without waiting for the model to come round. */\n show,\n /** Closes it at once. Safe to call on a panel that is already closed. */\n close: hide,\n /** The panel element itself, which is the popover. */\n el: panelEl,\n})\n</script>\n\n<template>\n <span class=\"v-popover\" :data-trigger=\"$slots.trigger ? '' : undefined\">\n <slot name=\"trigger\" :trigger-props=\"triggerProps\" />\n <div\n :id=\"panelId\"\n ref=\"panelEl\"\n :popover=\"mode\"\n class=\"v-overlay v-popover-panel v-floating\"\n :class=\"{ 'v-panel': !bare }\"\n :data-placement=\"placement\"\n :data-match-trigger=\"matchTrigger ? '' : undefined\"\n :style=\"panelStyle\"\n v-bind=\"$attrs\"\n @beforetoggle=\"syncShown\"\n @toggle=\"onToggle\"\n >\n <slot />\n </div>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * Without a trigger the wrapper has nothing to wrap, so `display: contents` takes it out of\n * the layout entirely; the panel is positioned against the viewport and does not depend on\n * it. Left as an empty inline-block it would still create a line box, and therefore add\n * height, inside every component using this route.\n */\n .v-popover {\n display: contents;\n }\n\n /*\n * With a trigger the wrapper must generate a box, since that box is the ANCHOR; which is why\n * `display: contents` stops at the rule above. It is FLEX rather than inline-block, the\n * `.v-badge-host` and `.v-tooltip` form: both are inline-level atomic boxes, so text flows\n * around them identically, but an inline-block opens an inline formatting context for the\n * trigger, which then lands on a line box and adds the strut's descender to the wrapper.\n */\n .v-popover[data-trigger] {\n display: inline-flex;\n align-items: center;\n anchor-name: --popover-anchor;\n /*\n * Without the confinement every panel on the page would attach itself to the last wrapper\n * carrying this name.\n */\n anchor-scope: --popover-anchor;\n }\n\n /*\n * Widths, heights and overflow differ from one consumer to the next, and since each component\n * ships its own stylesheet, a declaration here would sit at equal specificity with theirs;\n * leaving the winner to whichever order the consumer's bundler happens to produce.\n */\n .v-popover-panel {\n position-anchor: var(--popover-anchor-name);\n }\n\n /*\n * `:where()` keeps this at (0,1,0). A bare consumer restyles its panel through the\n * `.v-popover-panel.v-x-panel` compound (VTooltip), at (0,2,0), which must win; a (0,2,0)\n * rule here would tie with it across two sheets.\n */\n .v-popover-panel:where(:not(.v-panel)) {\n border: none;\n padding: 0;\n background: none;\n color: inherit;\n overflow: visible;\n }\n\n /*\n * It is written here rather than in each consumer because `anchor-size()` resolves against\n * `position-anchor`, which is the declaration above; the same reason the anchoring itself\n * lives here. A minimum beats a maximum, so a consumer's own `max-inline-size` does not clamp\n * it: a trigger wider than the ceiling widens the panel past it, which is intended.\n */\n .v-popover-panel[data-match-trigger] {\n min-inline-size: anchor-size(width);\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoEA,IAAMe,IAAQC,GAcRC,IAAOf,EAAoBc,GAAC,MAA0B,GAqBtDG,IAAUC,EAAwB,IAAI,GACtCC,IAAcC,EAAM,GACpBC,IAAUC,QAAeT,EAAM,MAAMM,CAAW,GAIhD,EAAE,UAAO,cAAW,SAAM,YAASI,EAAWN,CAAO,GAErDO,IAAeF,SAAqC;GACxD,eAAeD,EAAQ;GACvB,iBAAiBN,EAAK;GACtB,iBAAiBM,EAAQ;EAC3B,EAAE,GAIII,IAAaH,SAAgB,EACjC,yBAAyBT,EAAM,UAAU,mBAC3C,EAAE;EAEF,SAASa,EAAS,GAAc;GAE9B,AADAC,EAAUC,CAAK,GACf,EAAK,QAAQC,EAAM;EACrB;SAEAC,EAAgBf,SAAYc,EAAM,OAAOE,GAAMC,CAAI,GAKnDpB,EAAa;GAEX;GAEA,OAAOoB;GAEP,IAAIf;EACN,CAAC,cAIChB,EAAA,GAAAC,EAiBO,QAAA;GAjBD,OAAM;GAAa,gBAAcJ,EAAAA,OAAO,UAAO,KAAQ,KAAA;EAC3DK,GAAAA,CAAAA,EAAqDgC,EAAA,QAAA,WAAA,EAA/B,cAAeX,EAAA,MAAY,CAAA,GACjDpB,EAcM,OAdNC,EAcM;GAbH,IAAIgB,EAAA;GACD,SAAA;GAAJ,KAAIJ;GACH,SAASH,EAAA;GACV,OAAK,CAAC,wCAAsC,EAAA,WAAA,CACtBA,EAAA,KAAI,CAAA;GACzB,kBAAgBA,EAAA;GAChB,sBAAoBA,EAAA,eAAY,KAAQ,KAAA;GACxC,OAAOW,EAAA;EACA1B,GAAAA,EAAAA,QAAM;GACb,gBAAY,AAAAwC,EAAA,QAAE,GAAAC,MAAAlC,EAAAqB,CAAA,KAAArB,EAAAqB,CAAA,CAAA,CAAA,GAAAa,CAAA;GACN;EAETrC,CAAAA,GAAAA,CAAAA,EAAQgC,EAAA,QAAA,SAAA,CAAA,GAAA,IAAA3B,CAAA,CAAA,GAAA,GAAAD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"VProgressCircular.js","names":[],"sources":["../../../src/components/VProgressCircular/VProgressCircular.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * CSS draws the progress arc. JavaScript normalizes values shared by geometry, slots and\n * progressbar ARIA attributes.\n */\nimport { useAriaLabel } from '../../composables/useAriaLabel'\nimport { useProgressValue } from '../../composables/useProgressValue'\nimport { useMessages } from '../../i18n/state'\nimport { px } from '../../utils/css'\n\n/** What the progress means, in colour. */\nexport type ProgressCircularTone = 'neutral' | 'accent' | 'danger' | 'success' | 'warning'\n\n/** How the arc ends. */\nexport type ProgressCircularShape = 'rounded' | 'square'\n\n/** What the default slot receives. */\nexport interface ProgressCircularSlotProps {\n /** The value, brought back into the range. */\n value: number\n /** The bound, zero or more. */\n max: number\n /** How far along it is, as a percentage and unrounded. */\n percent: number\n}\n\ninterface ProgressCircularProps {\n /** How far along it is. Anything outside the range is brought back into it. */\n value?: number\n /**\n * What is progressing, in words, for screen readers. It draws nothing on screen, and falls\n * back to the design system dictionary; an `aria-label` or `aria-labelledby` of your own\n * takes precedence over it.\n */\n label?: string\n /** What counts as finished. The other end is always zero. */\n max?: number\n indeterminate?: boolean\n /** What the progress means, expressed as a colour. */\n tone?: ProgressCircularTone\n /**\n * A colour of your own (hex, CSS name or `oklch()`), which replaces the tone. The\n * unfilled ring's shade is derived from it against the theme, so it follows the light\n * and the dark one.\n */\n color?: string\n /** The diameter, always in PIXELS: `96` and `'96'` both give 96px. */\n size?: number | string\n /** How thick the ring is, always in PIXELS: `8` and `'8'` both give 8px. */\n thickness?: number | string\n /** Whether the ends of the drawn arc are rounded or cut square. */\n shape?: ProgressCircularShape\n /**\n * Writes the percentage in the middle of the ring. It is ignored while the progress is\n * unmeasurable, there being no figure to write.\n */\n showValue?: boolean\n}\n\nconst props = withDefaults(defineProps<ProgressCircularProps>(), {\n value: 0,\n label: undefined,\n max: 100,\n indeterminate: false,\n tone: 'accent',\n color: undefined,\n size: undefined,\n thickness: undefined,\n shape: 'rounded',\n showValue: false,\n})\n\ndefineSlots<{\n /**\n * What to put in the middle of the ring instead of the percentage: a count of files,\n * an icon, a shortened figure.\n */\n default?(props: ProgressCircularSlotProps): unknown\n}>()\n\n/* The percent sign, and the non-breaking space French puts before it where English puts\n nothing, are a convention of the language: they belong in the dictionary rather than\n in this file. Any other format goes through the slot above. */\nconst m = useMessages()\n\nconst {\n max: normalizedMax,\n clamped,\n fraction,\n percent,\n roundedPercent,\n} = useProgressValue(\n () => props.value,\n () => props.max,\n)\n\n// @a11y\n// The canonical cascade: a consumer's `aria-labelledby`, then their `aria-label`, then the\n// `label` prop, then the dictionary. An indicator takes no name from the text inside it, so\n// without the last step it would have none at all.\nconst ariaLabel = useAriaLabel(() => props.label ?? m.value.progress.label)\n</script>\n\n<template>\n <span\n class=\"v-progress-circular v-tone\"\n role=\"progressbar\"\n :aria-label=\"ariaLabel\"\n :data-tone=\"tone\"\n :data-custom=\"color !== undefined ? '' : undefined\"\n :data-shape=\"shape\"\n :data-indeterminate=\"indeterminate ? '' : undefined\"\n :aria-valuenow=\"indeterminate ? undefined : clamped\"\n aria-valuemin=\"0\"\n :aria-valuemax=\"normalizedMax\"\n :style=\"{\n '--fill-fraction': String(fraction),\n '--custom-color': color,\n '--progress-diameter': px(size),\n '--progress-thickness': px(thickness),\n }\"\n >\n <svg class=\"v-progress-circular-svg\" aria-hidden=\"true\">\n <circle class=\"v-progress-circular-track\" pathLength=\"100\" />\n <circle class=\"v-progress-circular-bar\" pathLength=\"100\" />\n </svg>\n <span v-if=\"!indeterminate && (showValue || $slots.default)\" class=\"v-progress-circular-label\">\n <slot :value=\"clamped\" :max=\"normalizedMax\" :percent=\"percent\">\n {{ m.progress.percent(roundedPercent) }}\n </slot>\n </span>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * The two dimensions are declared here as defaults, on the very element the props write to\n * inline; which makes an explicit size or thickness always win.\n */\n .v-progress-circular {\n --progress-diameter: var(--vectis-control-size-progress-circular-diameter);\n --progress-thickness: var(--vectis-control-size-progress-circular-thickness);\n /* Arc and track are the tone's solid and soft colours, read from the shared table\n (`.v-tone`, set in the template). No text colour is taken from it: the figure sits\n in the hole of the ring, against the page, in the ordinary text colour. */\n --progress-fill: var(--tone-bg-solid);\n --progress-track: var(--tone-bg-soft);\n display: inline-grid;\n inline-size: var(--progress-diameter);\n block-size: var(--progress-diameter);\n vertical-align: middle;\n }\n\n .v-progress-circular-svg,\n .v-progress-circular-label {\n grid-area: 1 / 1;\n }\n\n .v-progress-circular-svg {\n inline-size: 100%;\n block-size: 100%;\n /* Turns the ring so that it starts at twelve o'clock rather than at three. It is\n written as its own property and not as a transform, so that it COMPOSES with the\n spinning of the unmeasurable mode instead of being overwritten by it. */\n rotate: -90deg;\n }\n\n /*\n * In a right-to-left page the ring fills the other way round, following the reading\n * direction. These individual properties are applied in a fixed order; move, turn, then\n * mirror; so the mirroring is taken into account before the quarter turn above.\n */\n .v-progress-circular:dir(rtl) .v-progress-circular-svg {\n scale: 1 -1;\n }\n\n /*\n * Percentages are avoided deliberately: a radius given as a percentage is resolved against a\n * normalized diagonal rather than against the width, and there is no reason to expose the\n * component to that when the diameter is always a length to begin with.\n */\n .v-progress-circular-track,\n .v-progress-circular-bar {\n cx: calc(var(--progress-diameter) / 2);\n cy: calc(var(--progress-diameter) / 2);\n /* A thickness as large as the diameter would give a NEGATIVE radius, which is an\n error in SVG: the circle would simply not be drawn. The floor degrades that case\n to a radius of zero instead. */\n r: max(0px, calc((var(--progress-diameter) - var(--progress-thickness)) / 2));\n fill: none;\n stroke-width: var(--progress-thickness);\n }\n\n .v-progress-circular-track {\n stroke: var(--progress-track);\n }\n\n .v-progress-circular-bar {\n stroke: var(--progress-fill);\n stroke-linecap: round;\n stroke-dasharray: 100;\n stroke-dashoffset: calc(100 - 100 * var(--fill-fraction));\n transition: stroke-dashoffset var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n .v-progress-circular[data-shape='square'] .v-progress-circular-bar {\n stroke-linecap: butt;\n }\n\n .v-progress-circular-label {\n display: flex;\n align-items: center;\n justify-content: center;\n /*\n * This centres the BOX itself in its cell, and it is not redundant with the centring above.\n * The maximum width below stops the box from being stretched to fill the cell, and a\n * stretch that cannot apply falls back to the START edge: the figure would end up against\n * the side of the ring.\n */\n place-self: center;\n max-inline-size: calc(var(--progress-diameter) - var(--progress-thickness) * 2);\n color: var(--vectis-color-text);\n font-family: var(--vectis-text-family);\n /*\n * Sized as a fraction of the diameter so it stays in proportion at every size; the same\n * tolerance already granted to VSpinner's stroke; with a floor at the smallest type token,\n * below which it would be unreadable.\n */\n font-size: max(var(--vectis-text-caption-size), calc(var(--progress-diameter) / 4));\n font-weight: var(--vectis-text-control-weight);\n line-height: var(--vectis-text-control-leading);\n text-align: center;\n }\n\n /*\n * Their periods are deliberately not multiples of one another; were the arc to restart on\n * every rotation, the pair would repeat the same picture over and over and read as a\n * mechanical beat. At 1s and 1.5s they only realign every third turn; the slowed-down pair\n * below is 3s and 5s, so every fifth.\n */\n .v-progress-circular[data-indeterminate] .v-progress-circular-svg {\n animation: v-progress-circular-spin var(--vectis-duration-1000) linear infinite;\n }\n\n .v-progress-circular[data-indeterminate] .v-progress-circular-bar {\n animation: v-progress-circular-dash var(--vectis-duration-1500) var(--vectis-ease-default)\n infinite;\n transition: none;\n }\n\n /* The turn of the whole ring. VSpinner writes the same one under its own name: shared\n in the core sheet it cost every consumer the bytes, where the two copies only meet in\n an application that loads both components. */\n @keyframes v-progress-circular-spin {\n to {\n transform: rotate(1turn);\n }\n }\n\n @keyframes v-progress-circular-dash {\n 0% {\n stroke-dasharray: 5 100;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 70 100;\n stroke-dashoffset: -20;\n }\n\n 100% {\n stroke-dasharray: 5 100;\n stroke-dashoffset: -100;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-progress-circular-bar {\n transition: none;\n }\n\n .v-progress-circular[data-indeterminate] .v-progress-circular-svg {\n animation-duration: var(--vectis-duration-3000);\n }\n\n .v-progress-circular[data-indeterminate] .v-progress-circular-bar {\n animation-duration: var(--vectis-duration-5000);\n }\n }\n\n /* An SVG keeps its authored colours under Windows forced colours, so the ring would\n stay pale indigo on a system palette. It is drawn in the system colours instead: the\n remaining part in GrayText, the progress in Highlight. */\n @media (forced-colors: active) {\n .v-progress-circular {\n forced-color-adjust: none;\n }\n\n .v-progress-circular-track {\n stroke: GrayText;\n }\n\n .v-progress-circular-bar {\n stroke: Highlight;\n }\n\n .v-progress-circular-label {\n color: CanvasText;\n }\n }\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"VProgressCircular.js","names":["_sfc_main","VProgressCircular_vue_vue_type_script_setup_true_lang_default","VProgressCircular_default"],"sources":["../../../src/components/VProgressCircular/VProgressCircular.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * CSS draws the progress arc. JavaScript normalizes values shared by geometry, slots and\n * progressbar ARIA attributes.\n */\nimport { useAriaLabel } from '../../composables/useAriaLabel'\nimport { useProgressValue } from '../../composables/useProgressValue'\nimport { useMessages } from '../../i18n/state'\nimport { px } from '../../utils/css'\n\n/** What the progress means, in colour. */\nexport type ProgressCircularTone = 'neutral' | 'accent' | 'danger' | 'success' | 'warning'\n\n/** How the arc ends. */\nexport type ProgressCircularShape = 'rounded' | 'square'\n\n/** What the default slot receives. */\nexport interface ProgressCircularSlotProps {\n /** The value, brought back into the range. */\n value: number\n /** The bound, zero or more. */\n max: number\n /** How far along it is, as a percentage and unrounded. */\n percent: number\n}\n\ninterface ProgressCircularProps {\n /** How far along it is. Anything outside the range is brought back into it. */\n value?: number\n /**\n * What is progressing, in words, for screen readers. It draws nothing on screen, and falls\n * back to the design system dictionary; an `aria-label` or `aria-labelledby` of your own\n * takes precedence over it.\n */\n label?: string\n /** What counts as finished. The other end is always zero. */\n max?: number\n indeterminate?: boolean\n /** What the progress means, expressed as a colour. */\n tone?: ProgressCircularTone\n /**\n * A colour of your own (hex, CSS name or `oklch()`), which replaces the tone. The\n * unfilled ring's shade is derived from it against the theme, so it follows the light\n * and the dark one.\n */\n color?: string\n /** The diameter, always in PIXELS: `96` and `'96'` both give 96px. */\n size?: number | string\n /** How thick the ring is, always in PIXELS: `8` and `'8'` both give 8px. */\n thickness?: number | string\n /** Whether the ends of the drawn arc are rounded or cut square. */\n shape?: ProgressCircularShape\n /**\n * Writes the percentage in the middle of the ring. It is ignored while the progress is\n * unmeasurable, there being no figure to write.\n */\n showValue?: boolean\n}\n\nconst props = withDefaults(defineProps<ProgressCircularProps>(), {\n value: 0,\n label: undefined,\n max: 100,\n indeterminate: false,\n tone: 'accent',\n color: undefined,\n size: undefined,\n thickness: undefined,\n shape: 'rounded',\n showValue: false,\n})\n\ndefineSlots<{\n /**\n * What to put in the middle of the ring instead of the percentage: a count of files,\n * an icon, a shortened figure.\n */\n default?(props: ProgressCircularSlotProps): unknown\n}>()\n\n/* The percent sign, and the non-breaking space French puts before it where English puts\n nothing, are a convention of the language: they belong in the dictionary rather than\n in this file. Any other format goes through the slot above. */\nconst m = useMessages()\n\nconst {\n max: normalizedMax,\n clamped,\n fraction,\n percent,\n roundedPercent,\n} = useProgressValue(\n () => props.value,\n () => props.max,\n)\n\n// @a11y\n// The canonical cascade: a consumer's `aria-labelledby`, then their `aria-label`, then the\n// `label` prop, then the dictionary. An indicator takes no name from the text inside it, so\n// without the last step it would have none at all.\nconst ariaLabel = useAriaLabel(() => props.label ?? m.value.progress.label)\n</script>\n\n<template>\n <span\n class=\"v-progress-circular v-tone\"\n role=\"progressbar\"\n :aria-label=\"ariaLabel\"\n :data-tone=\"tone\"\n :data-custom=\"color !== undefined ? '' : undefined\"\n :data-shape=\"shape\"\n :data-indeterminate=\"indeterminate ? '' : undefined\"\n :aria-valuenow=\"indeterminate ? undefined : clamped\"\n aria-valuemin=\"0\"\n :aria-valuemax=\"normalizedMax\"\n :style=\"{\n '--fill-fraction': String(fraction),\n '--custom-color': color,\n '--progress-diameter': px(size),\n '--progress-thickness': px(thickness),\n }\"\n >\n <svg class=\"v-progress-circular-svg\" aria-hidden=\"true\">\n <circle class=\"v-progress-circular-track\" pathLength=\"100\" />\n <circle class=\"v-progress-circular-bar\" pathLength=\"100\" />\n </svg>\n <span v-if=\"!indeterminate && (showValue || $slots.default)\" class=\"v-progress-circular-label\">\n <slot :value=\"clamped\" :max=\"normalizedMax\" :percent=\"percent\">\n {{ m.progress.percent(roundedPercent) }}\n </slot>\n </span>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * The two dimensions are declared here as defaults, on the very element the props write to\n * inline; which makes an explicit size or thickness always win.\n */\n .v-progress-circular {\n --progress-diameter: var(--vectis-control-size-progress-circular-diameter);\n --progress-thickness: var(--vectis-control-size-progress-circular-thickness);\n /* Arc and track are the tone's solid and soft colours, read from the shared table\n (`.v-tone`, set in the template). No text colour is taken from it: the figure sits\n in the hole of the ring, against the page, in the ordinary text colour. */\n --progress-fill: var(--tone-bg-solid);\n --progress-track: var(--tone-bg-soft);\n display: inline-grid;\n inline-size: var(--progress-diameter);\n block-size: var(--progress-diameter);\n vertical-align: middle;\n }\n\n .v-progress-circular-svg,\n .v-progress-circular-label {\n grid-area: 1 / 1;\n }\n\n .v-progress-circular-svg {\n inline-size: 100%;\n block-size: 100%;\n /* Turns the ring so that it starts at twelve o'clock rather than at three. It is\n written as its own property and not as a transform, so that it COMPOSES with the\n spinning of the unmeasurable mode instead of being overwritten by it. */\n rotate: -90deg;\n }\n\n /*\n * In a right-to-left page the ring fills the other way round, following the reading\n * direction. These individual properties are applied in a fixed order; move, turn, then\n * mirror; so the mirroring is taken into account before the quarter turn above.\n */\n .v-progress-circular:dir(rtl) .v-progress-circular-svg {\n scale: 1 -1;\n }\n\n /*\n * Percentages are avoided deliberately: a radius given as a percentage is resolved against a\n * normalized diagonal rather than against the width, and there is no reason to expose the\n * component to that when the diameter is always a length to begin with.\n */\n .v-progress-circular-track,\n .v-progress-circular-bar {\n cx: calc(var(--progress-diameter) / 2);\n cy: calc(var(--progress-diameter) / 2);\n /* A thickness as large as the diameter would give a NEGATIVE radius, which is an\n error in SVG: the circle would simply not be drawn. The floor degrades that case\n to a radius of zero instead. */\n r: max(0px, calc((var(--progress-diameter) - var(--progress-thickness)) / 2));\n fill: none;\n stroke-width: var(--progress-thickness);\n }\n\n .v-progress-circular-track {\n stroke: var(--progress-track);\n }\n\n .v-progress-circular-bar {\n stroke: var(--progress-fill);\n stroke-linecap: round;\n stroke-dasharray: 100;\n stroke-dashoffset: calc(100 - 100 * var(--fill-fraction));\n transition: stroke-dashoffset var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n .v-progress-circular[data-shape='square'] .v-progress-circular-bar {\n stroke-linecap: butt;\n }\n\n .v-progress-circular-label {\n display: flex;\n align-items: center;\n justify-content: center;\n /*\n * This centres the BOX itself in its cell, and it is not redundant with the centring above.\n * The maximum width below stops the box from being stretched to fill the cell, and a\n * stretch that cannot apply falls back to the START edge: the figure would end up against\n * the side of the ring.\n */\n place-self: center;\n max-inline-size: calc(var(--progress-diameter) - var(--progress-thickness) * 2);\n color: var(--vectis-color-text);\n font-family: var(--vectis-text-family);\n /*\n * Sized as a fraction of the diameter so it stays in proportion at every size; the same\n * tolerance already granted to VSpinner's stroke; with a floor at the smallest type token,\n * below which it would be unreadable.\n */\n font-size: max(var(--vectis-text-caption-size), calc(var(--progress-diameter) / 4));\n font-weight: var(--vectis-text-control-weight);\n line-height: var(--vectis-text-control-leading);\n text-align: center;\n }\n\n /*\n * Their periods are deliberately not multiples of one another; were the arc to restart on\n * every rotation, the pair would repeat the same picture over and over and read as a\n * mechanical beat. At 1s and 1.5s they only realign every third turn; the slowed-down pair\n * below is 3s and 5s, so every fifth.\n */\n .v-progress-circular[data-indeterminate] .v-progress-circular-svg {\n animation: v-progress-circular-spin var(--vectis-duration-1000) linear infinite;\n }\n\n .v-progress-circular[data-indeterminate] .v-progress-circular-bar {\n animation: v-progress-circular-dash var(--vectis-duration-1500) var(--vectis-ease-default)\n infinite;\n transition: none;\n }\n\n /* The turn of the whole ring. VSpinner writes the same one under its own name: shared\n in the core sheet it cost every consumer the bytes, where the two copies only meet in\n an application that loads both components. */\n @keyframes v-progress-circular-spin {\n to {\n transform: rotate(1turn);\n }\n }\n\n @keyframes v-progress-circular-dash {\n 0% {\n stroke-dasharray: 5 100;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 70 100;\n stroke-dashoffset: -20;\n }\n\n 100% {\n stroke-dasharray: 5 100;\n stroke-dashoffset: -100;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-progress-circular-bar {\n transition: none;\n }\n\n .v-progress-circular[data-indeterminate] .v-progress-circular-svg {\n animation-duration: var(--vectis-duration-3000);\n }\n\n .v-progress-circular[data-indeterminate] .v-progress-circular-bar {\n animation-duration: var(--vectis-duration-5000);\n }\n }\n\n /* An SVG keeps its authored colours under Windows forced colours, so the ring would\n stay pale indigo on a system palette. It is drawn in the system colours instead: the\n remaining part in GrayText, the progress in Highlight. */\n @media (forced-colors: active) {\n .v-progress-circular {\n forced-color-adjust: none;\n }\n\n .v-progress-circular-track {\n stroke: GrayText;\n }\n\n .v-progress-circular-bar {\n stroke: Highlight;\n }\n\n .v-progress-circular-label {\n color: CanvasText;\n }\n }\n}\n</style>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"VProgressCircular.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/VProgressCircular/VProgressCircular.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * CSS draws the progress arc. JavaScript normalizes values shared by geometry, slots and\n * progressbar ARIA attributes.\n */\nimport { useAriaLabel } from '../../composables/useAriaLabel'\nimport { useProgressValue } from '../../composables/useProgressValue'\nimport { useMessages } from '../../i18n/state'\nimport { px } from '../../utils/css'\n\n/** What the progress means, in colour. */\nexport type ProgressCircularTone = 'neutral' | 'accent' | 'danger' | 'success' | 'warning'\n\n/** How the arc ends. */\nexport type ProgressCircularShape = 'rounded' | 'square'\n\n/** What the default slot receives. */\nexport interface ProgressCircularSlotProps {\n /** The value, brought back into the range. */\n value: number\n /** The bound, zero or more. */\n max: number\n /** How far along it is, as a percentage and unrounded. */\n percent: number\n}\n\ninterface ProgressCircularProps {\n /** How far along it is. Anything outside the range is brought back into it. */\n value?: number\n /**\n * What is progressing, in words, for screen readers. It draws nothing on screen, and falls\n * back to the design system dictionary; an `aria-label` or `aria-labelledby` of your own\n * takes precedence over it.\n */\n label?: string\n /** What counts as finished. The other end is always zero. */\n max?: number\n indeterminate?: boolean\n /** What the progress means, expressed as a colour. */\n tone?: ProgressCircularTone\n /**\n * A colour of your own (hex, CSS name or `oklch()`), which replaces the tone. The\n * unfilled ring's shade is derived from it against the theme, so it follows the light\n * and the dark one.\n */\n color?: string\n /** The diameter, always in PIXELS: `96` and `'96'` both give 96px. */\n size?: number | string\n /** How thick the ring is, always in PIXELS: `8` and `'8'` both give 8px. */\n thickness?: number | string\n /** Whether the ends of the drawn arc are rounded or cut square. */\n shape?: ProgressCircularShape\n /**\n * Writes the percentage in the middle of the ring. It is ignored while the progress is\n * unmeasurable, there being no figure to write.\n */\n showValue?: boolean\n}\n\nconst props = withDefaults(defineProps<ProgressCircularProps>(), {\n value: 0,\n label: undefined,\n max: 100,\n indeterminate: false,\n tone: 'accent',\n color: undefined,\n size: undefined,\n thickness: undefined,\n shape: 'rounded',\n showValue: false,\n})\n\ndefineSlots<{\n /**\n * What to put in the middle of the ring instead of the percentage: a count of files,\n * an icon, a shortened figure.\n */\n default?(props: ProgressCircularSlotProps): unknown\n}>()\n\n/* The percent sign, and the non-breaking space French puts before it where English puts\n nothing, are a convention of the language: they belong in the dictionary rather than\n in this file. Any other format goes through the slot above. */\nconst m = useMessages()\n\nconst {\n max: normalizedMax,\n clamped,\n fraction,\n percent,\n roundedPercent,\n} = useProgressValue(\n () => props.value,\n () => props.max,\n)\n\n// @a11y\n// The canonical cascade: a consumer's `aria-labelledby`, then their `aria-label`, then the\n// `label` prop, then the dictionary. An indicator takes no name from the text inside it, so\n// without the last step it would have none at all.\nconst ariaLabel = useAriaLabel(() => props.label ?? m.value.progress.label)\n</script>\n\n<template>\n <span\n class=\"v-progress-circular v-tone\"\n role=\"progressbar\"\n :aria-label=\"ariaLabel\"\n :data-tone=\"tone\"\n :data-custom=\"color !== undefined ? '' : undefined\"\n :data-shape=\"shape\"\n :data-indeterminate=\"indeterminate ? '' : undefined\"\n :aria-valuenow=\"indeterminate ? undefined : clamped\"\n aria-valuemin=\"0\"\n :aria-valuemax=\"normalizedMax\"\n :style=\"{\n '--fill-fraction': String(fraction),\n '--custom-color': color,\n '--progress-diameter': px(size),\n '--progress-thickness': px(thickness),\n }\"\n >\n <svg class=\"v-progress-circular-svg\" aria-hidden=\"true\">\n <circle class=\"v-progress-circular-track\" pathLength=\"100\" />\n <circle class=\"v-progress-circular-bar\" pathLength=\"100\" />\n </svg>\n <span v-if=\"!indeterminate && (showValue || $slots.default)\" class=\"v-progress-circular-label\">\n <slot :value=\"clamped\" :max=\"normalizedMax\" :percent=\"percent\">\n {{ m.progress.percent(roundedPercent) }}\n </slot>\n </span>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * The two dimensions are declared here as defaults, on the very element the props write to\n * inline; which makes an explicit size or thickness always win.\n */\n .v-progress-circular {\n --progress-diameter: var(--vectis-control-size-progress-circular-diameter);\n --progress-thickness: var(--vectis-control-size-progress-circular-thickness);\n /* Arc and track are the tone's solid and soft colours, read from the shared table\n (`.v-tone`, set in the template). No text colour is taken from it: the figure sits\n in the hole of the ring, against the page, in the ordinary text colour. */\n --progress-fill: var(--tone-bg-solid);\n --progress-track: var(--tone-bg-soft);\n display: inline-grid;\n inline-size: var(--progress-diameter);\n block-size: var(--progress-diameter);\n vertical-align: middle;\n }\n\n .v-progress-circular-svg,\n .v-progress-circular-label {\n grid-area: 1 / 1;\n }\n\n .v-progress-circular-svg {\n inline-size: 100%;\n block-size: 100%;\n /* Turns the ring so that it starts at twelve o'clock rather than at three. It is\n written as its own property and not as a transform, so that it COMPOSES with the\n spinning of the unmeasurable mode instead of being overwritten by it. */\n rotate: -90deg;\n }\n\n /*\n * In a right-to-left page the ring fills the other way round, following the reading\n * direction. These individual properties are applied in a fixed order; move, turn, then\n * mirror; so the mirroring is taken into account before the quarter turn above.\n */\n .v-progress-circular:dir(rtl) .v-progress-circular-svg {\n scale: 1 -1;\n }\n\n /*\n * Percentages are avoided deliberately: a radius given as a percentage is resolved against a\n * normalized diagonal rather than against the width, and there is no reason to expose the\n * component to that when the diameter is always a length to begin with.\n */\n .v-progress-circular-track,\n .v-progress-circular-bar {\n cx: calc(var(--progress-diameter) / 2);\n cy: calc(var(--progress-diameter) / 2);\n /* A thickness as large as the diameter would give a NEGATIVE radius, which is an\n error in SVG: the circle would simply not be drawn. The floor degrades that case\n to a radius of zero instead. */\n r: max(0px, calc((var(--progress-diameter) - var(--progress-thickness)) / 2));\n fill: none;\n stroke-width: var(--progress-thickness);\n }\n\n .v-progress-circular-track {\n stroke: var(--progress-track);\n }\n\n .v-progress-circular-bar {\n stroke: var(--progress-fill);\n stroke-linecap: round;\n stroke-dasharray: 100;\n stroke-dashoffset: calc(100 - 100 * var(--fill-fraction));\n transition: stroke-dashoffset var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n .v-progress-circular[data-shape='square'] .v-progress-circular-bar {\n stroke-linecap: butt;\n }\n\n .v-progress-circular-label {\n display: flex;\n align-items: center;\n justify-content: center;\n /*\n * This centres the BOX itself in its cell, and it is not redundant with the centring above.\n * The maximum width below stops the box from being stretched to fill the cell, and a\n * stretch that cannot apply falls back to the START edge: the figure would end up against\n * the side of the ring.\n */\n place-self: center;\n max-inline-size: calc(var(--progress-diameter) - var(--progress-thickness) * 2);\n color: var(--vectis-color-text);\n font-family: var(--vectis-text-family);\n /*\n * Sized as a fraction of the diameter so it stays in proportion at every size; the same\n * tolerance already granted to VSpinner's stroke; with a floor at the smallest type token,\n * below which it would be unreadable.\n */\n font-size: max(var(--vectis-text-caption-size), calc(var(--progress-diameter) / 4));\n font-weight: var(--vectis-text-control-weight);\n line-height: var(--vectis-text-control-leading);\n text-align: center;\n }\n\n /*\n * Their periods are deliberately not multiples of one another; were the arc to restart on\n * every rotation, the pair would repeat the same picture over and over and read as a\n * mechanical beat. At 1s and 1.5s they only realign every third turn; the slowed-down pair\n * below is 3s and 5s, so every fifth.\n */\n .v-progress-circular[data-indeterminate] .v-progress-circular-svg {\n animation: v-progress-circular-spin var(--vectis-duration-1000) linear infinite;\n }\n\n .v-progress-circular[data-indeterminate] .v-progress-circular-bar {\n animation: v-progress-circular-dash var(--vectis-duration-1500) var(--vectis-ease-default)\n infinite;\n transition: none;\n }\n\n /* The turn of the whole ring. VSpinner writes the same one under its own name: shared\n in the core sheet it cost every consumer the bytes, where the two copies only meet in\n an application that loads both components. */\n @keyframes v-progress-circular-spin {\n to {\n transform: rotate(1turn);\n }\n }\n\n @keyframes v-progress-circular-dash {\n 0% {\n stroke-dasharray: 5 100;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 70 100;\n stroke-dashoffset: -20;\n }\n\n 100% {\n stroke-dasharray: 5 100;\n stroke-dashoffset: -100;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-progress-circular-bar {\n transition: none;\n }\n\n .v-progress-circular[data-indeterminate] .v-progress-circular-svg {\n animation-duration: var(--vectis-duration-3000);\n }\n\n .v-progress-circular[data-indeterminate] .v-progress-circular-bar {\n animation-duration: var(--vectis-duration-5000);\n }\n }\n\n /* An SVG keeps its authored colours under Windows forced colours, so the ring would\n stay pale indigo on a system palette. It is drawn in the system colours instead: the\n remaining part in GrayText, the progress in Highlight. */\n @media (forced-colors: active) {\n .v-progress-circular {\n forced-color-adjust: none;\n }\n\n .v-progress-circular-track {\n stroke: GrayText;\n }\n\n .v-progress-circular-bar {\n stroke: Highlight;\n }\n\n .v-progress-circular-label {\n color: CanvasText;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2DA,IAAM,IAAQ,GAwBR,IAAI,EAAY,GAEhB,EACJ,KAAK,GACL,YACA,aACA,YACA,sBACE,QACI,EAAM,aACN,EAAM,GACd,GAMM,IAAY,QAAmB,EAAM,SAAS,EAAE,MAAM,SAAS,KAAK;yBAIxE,EA2BO,QAAA;GA1BL,OAAM;GACN,MAAK;GACJ,cAAY,EAAA,CAAA;GACZ,aAAW,EAAA;GACX,eAAa,EAAA,UAAU,KAAA,IAAiB,KAAA,IAAR;GAChC,cAAY,EAAA;GACZ,sBAAoB,EAAA,gBAAa,KAAQ,KAAA;GACzC,iBAAe,EAAA,gBAAgB,KAAA,IAAY,EAAA,CAAA;GAC5C,iBAAc;GACb,iBAAe,EAAA,CAAA;GACf,OAAK,EAAA;uBAA6B,OAAO,EAAA,CAAA,CAAQ;sBAA2B,EAAA;2BAAoC,EAAA,CAAA,CAAE,CAAC,EAAA,IAAI;4BAAiC,EAAA,CAAA,CAAE,CAAC,EAAA,SAAS;;eAOrK,EAGM,OAAA;GAHD,OAAM;GAA0B,eAAY;MAC/C,EAA6D,UAAA;GAArD,OAAM;GAA4B,YAAW;MACrD,EAA2D,UAAA;GAAnD,OAAM;GAA0B,YAAW;aAExC,EAAA,kBAAkB,EAAA,aAAaA,EAAAA,OAAO,YAAA,EAAA,GAAnD,EAIO,QAJP,GAIO,CAHL,EAEO,EAAA,QAAA,WAAA;GAFA,OAAO,EAAA,CAAA;GAAU,KAAK,EAAA,CAAA;GAAgB,SAAS,EAAA,CAAA;WAE/C,CAAA,EAAA,EADF,EAAA,CAAA,CAAC,CAAC,SAAS,QAAQ,EAAA,CAAA,CAAc,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,GAAA,IAAA,CAAA"}
1
+ {"version":3,"file":"VProgressCircular.vue_vue_type_script_setup_true_lang.js","names":["$slots","_openBlock","_createElementBlock","_unref","_normalizeStyle","_createElementVNode","_renderSlot","_createTextVNode","_toDisplayString","_createCommentVNode","_hoisted_1","_hoisted_2","VProgressCircular_vue_vue_type_script_setup_true_lang_default","props","__props","m","useMessages","normalizedMax","useProgressValue","ariaLabel","useAriaLabel","openBlock","createElementBlock","unref","clamped","normalizeStyle","fraction","px","_cache","createElementVNode","_ctx","renderSlot","percent","createTextVNode","toDisplayString","roundedPercent","createCommentVNode"],"sources":["../../../src/components/VProgressCircular/VProgressCircular.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * CSS draws the progress arc. JavaScript normalizes values shared by geometry, slots and\n * progressbar ARIA attributes.\n */\nimport { useAriaLabel } from '../../composables/useAriaLabel'\nimport { useProgressValue } from '../../composables/useProgressValue'\nimport { useMessages } from '../../i18n/state'\nimport { px } from '../../utils/css'\n\n/** What the progress means, in colour. */\nexport type ProgressCircularTone = 'neutral' | 'accent' | 'danger' | 'success' | 'warning'\n\n/** How the arc ends. */\nexport type ProgressCircularShape = 'rounded' | 'square'\n\n/** What the default slot receives. */\nexport interface ProgressCircularSlotProps {\n /** The value, brought back into the range. */\n value: number\n /** The bound, zero or more. */\n max: number\n /** How far along it is, as a percentage and unrounded. */\n percent: number\n}\n\ninterface ProgressCircularProps {\n /** How far along it is. Anything outside the range is brought back into it. */\n value?: number\n /**\n * What is progressing, in words, for screen readers. It draws nothing on screen, and falls\n * back to the design system dictionary; an `aria-label` or `aria-labelledby` of your own\n * takes precedence over it.\n */\n label?: string\n /** What counts as finished. The other end is always zero. */\n max?: number\n indeterminate?: boolean\n /** What the progress means, expressed as a colour. */\n tone?: ProgressCircularTone\n /**\n * A colour of your own (hex, CSS name or `oklch()`), which replaces the tone. The\n * unfilled ring's shade is derived from it against the theme, so it follows the light\n * and the dark one.\n */\n color?: string\n /** The diameter, always in PIXELS: `96` and `'96'` both give 96px. */\n size?: number | string\n /** How thick the ring is, always in PIXELS: `8` and `'8'` both give 8px. */\n thickness?: number | string\n /** Whether the ends of the drawn arc are rounded or cut square. */\n shape?: ProgressCircularShape\n /**\n * Writes the percentage in the middle of the ring. It is ignored while the progress is\n * unmeasurable, there being no figure to write.\n */\n showValue?: boolean\n}\n\nconst props = withDefaults(defineProps<ProgressCircularProps>(), {\n value: 0,\n label: undefined,\n max: 100,\n indeterminate: false,\n tone: 'accent',\n color: undefined,\n size: undefined,\n thickness: undefined,\n shape: 'rounded',\n showValue: false,\n})\n\ndefineSlots<{\n /**\n * What to put in the middle of the ring instead of the percentage: a count of files,\n * an icon, a shortened figure.\n */\n default?(props: ProgressCircularSlotProps): unknown\n}>()\n\n/* The percent sign, and the non-breaking space French puts before it where English puts\n nothing, are a convention of the language: they belong in the dictionary rather than\n in this file. Any other format goes through the slot above. */\nconst m = useMessages()\n\nconst {\n max: normalizedMax,\n clamped,\n fraction,\n percent,\n roundedPercent,\n} = useProgressValue(\n () => props.value,\n () => props.max,\n)\n\n// @a11y\n// The canonical cascade: a consumer's `aria-labelledby`, then their `aria-label`, then the\n// `label` prop, then the dictionary. An indicator takes no name from the text inside it, so\n// without the last step it would have none at all.\nconst ariaLabel = useAriaLabel(() => props.label ?? m.value.progress.label)\n</script>\n\n<template>\n <span\n class=\"v-progress-circular v-tone\"\n role=\"progressbar\"\n :aria-label=\"ariaLabel\"\n :data-tone=\"tone\"\n :data-custom=\"color !== undefined ? '' : undefined\"\n :data-shape=\"shape\"\n :data-indeterminate=\"indeterminate ? '' : undefined\"\n :aria-valuenow=\"indeterminate ? undefined : clamped\"\n aria-valuemin=\"0\"\n :aria-valuemax=\"normalizedMax\"\n :style=\"{\n '--fill-fraction': String(fraction),\n '--custom-color': color,\n '--progress-diameter': px(size),\n '--progress-thickness': px(thickness),\n }\"\n >\n <svg class=\"v-progress-circular-svg\" aria-hidden=\"true\">\n <circle class=\"v-progress-circular-track\" pathLength=\"100\" />\n <circle class=\"v-progress-circular-bar\" pathLength=\"100\" />\n </svg>\n <span v-if=\"!indeterminate && (showValue || $slots.default)\" class=\"v-progress-circular-label\">\n <slot :value=\"clamped\" :max=\"normalizedMax\" :percent=\"percent\">\n {{ m.progress.percent(roundedPercent) }}\n </slot>\n </span>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * The two dimensions are declared here as defaults, on the very element the props write to\n * inline; which makes an explicit size or thickness always win.\n */\n .v-progress-circular {\n --progress-diameter: var(--vectis-control-size-progress-circular-diameter);\n --progress-thickness: var(--vectis-control-size-progress-circular-thickness);\n /* Arc and track are the tone's solid and soft colours, read from the shared table\n (`.v-tone`, set in the template). No text colour is taken from it: the figure sits\n in the hole of the ring, against the page, in the ordinary text colour. */\n --progress-fill: var(--tone-bg-solid);\n --progress-track: var(--tone-bg-soft);\n display: inline-grid;\n inline-size: var(--progress-diameter);\n block-size: var(--progress-diameter);\n vertical-align: middle;\n }\n\n .v-progress-circular-svg,\n .v-progress-circular-label {\n grid-area: 1 / 1;\n }\n\n .v-progress-circular-svg {\n inline-size: 100%;\n block-size: 100%;\n /* Turns the ring so that it starts at twelve o'clock rather than at three. It is\n written as its own property and not as a transform, so that it COMPOSES with the\n spinning of the unmeasurable mode instead of being overwritten by it. */\n rotate: -90deg;\n }\n\n /*\n * In a right-to-left page the ring fills the other way round, following the reading\n * direction. These individual properties are applied in a fixed order; move, turn, then\n * mirror; so the mirroring is taken into account before the quarter turn above.\n */\n .v-progress-circular:dir(rtl) .v-progress-circular-svg {\n scale: 1 -1;\n }\n\n /*\n * Percentages are avoided deliberately: a radius given as a percentage is resolved against a\n * normalized diagonal rather than against the width, and there is no reason to expose the\n * component to that when the diameter is always a length to begin with.\n */\n .v-progress-circular-track,\n .v-progress-circular-bar {\n cx: calc(var(--progress-diameter) / 2);\n cy: calc(var(--progress-diameter) / 2);\n /* A thickness as large as the diameter would give a NEGATIVE radius, which is an\n error in SVG: the circle would simply not be drawn. The floor degrades that case\n to a radius of zero instead. */\n r: max(0px, calc((var(--progress-diameter) - var(--progress-thickness)) / 2));\n fill: none;\n stroke-width: var(--progress-thickness);\n }\n\n .v-progress-circular-track {\n stroke: var(--progress-track);\n }\n\n .v-progress-circular-bar {\n stroke: var(--progress-fill);\n stroke-linecap: round;\n stroke-dasharray: 100;\n stroke-dashoffset: calc(100 - 100 * var(--fill-fraction));\n transition: stroke-dashoffset var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n .v-progress-circular[data-shape='square'] .v-progress-circular-bar {\n stroke-linecap: butt;\n }\n\n .v-progress-circular-label {\n display: flex;\n align-items: center;\n justify-content: center;\n /*\n * This centres the BOX itself in its cell, and it is not redundant with the centring above.\n * The maximum width below stops the box from being stretched to fill the cell, and a\n * stretch that cannot apply falls back to the START edge: the figure would end up against\n * the side of the ring.\n */\n place-self: center;\n max-inline-size: calc(var(--progress-diameter) - var(--progress-thickness) * 2);\n color: var(--vectis-color-text);\n font-family: var(--vectis-text-family);\n /*\n * Sized as a fraction of the diameter so it stays in proportion at every size; the same\n * tolerance already granted to VSpinner's stroke; with a floor at the smallest type token,\n * below which it would be unreadable.\n */\n font-size: max(var(--vectis-text-caption-size), calc(var(--progress-diameter) / 4));\n font-weight: var(--vectis-text-control-weight);\n line-height: var(--vectis-text-control-leading);\n text-align: center;\n }\n\n /*\n * Their periods are deliberately not multiples of one another; were the arc to restart on\n * every rotation, the pair would repeat the same picture over and over and read as a\n * mechanical beat. At 1s and 1.5s they only realign every third turn; the slowed-down pair\n * below is 3s and 5s, so every fifth.\n */\n .v-progress-circular[data-indeterminate] .v-progress-circular-svg {\n animation: v-progress-circular-spin var(--vectis-duration-1000) linear infinite;\n }\n\n .v-progress-circular[data-indeterminate] .v-progress-circular-bar {\n animation: v-progress-circular-dash var(--vectis-duration-1500) var(--vectis-ease-default)\n infinite;\n transition: none;\n }\n\n /* The turn of the whole ring. VSpinner writes the same one under its own name: shared\n in the core sheet it cost every consumer the bytes, where the two copies only meet in\n an application that loads both components. */\n @keyframes v-progress-circular-spin {\n to {\n transform: rotate(1turn);\n }\n }\n\n @keyframes v-progress-circular-dash {\n 0% {\n stroke-dasharray: 5 100;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 70 100;\n stroke-dashoffset: -20;\n }\n\n 100% {\n stroke-dasharray: 5 100;\n stroke-dashoffset: -100;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-progress-circular-bar {\n transition: none;\n }\n\n .v-progress-circular[data-indeterminate] .v-progress-circular-svg {\n animation-duration: var(--vectis-duration-3000);\n }\n\n .v-progress-circular[data-indeterminate] .v-progress-circular-bar {\n animation-duration: var(--vectis-duration-5000);\n }\n }\n\n /* An SVG keeps its authored colours under Windows forced colours, so the ring would\n stay pale indigo on a system palette. It is drawn in the system colours instead: the\n remaining part in GrayText, the progress in Highlight. */\n @media (forced-colors: active) {\n .v-progress-circular {\n forced-color-adjust: none;\n }\n\n .v-progress-circular-track {\n stroke: GrayText;\n }\n\n .v-progress-circular-bar {\n stroke: Highlight;\n }\n\n .v-progress-circular-label {\n color: CanvasText;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2DA,IAAMa,IAAQC,GAwBRC,IAAIC,EAAY,GAEhB,EACJ,KAAKC,GACL,YACA,aACA,YACA,sBACEC,QACIL,EAAM,aACNA,EAAM,GACd,GAMMM,IAAYC,QAAmBP,EAAM,SAASE,EAAE,MAAM,SAAS,KAAK;oBAIxEd,EAAA,GAAAC,EA2BO,QAAA;GA1BL,OAAM;GACN,MAAK;GACJ,cAAYC,EAAAgB,CAAA;GACZ,aAAWL,EAAA;GACX,eAAaA,EAAA,UAAU,KAAA,IAAiB,KAAA,IAAR;GAChC,cAAYA,EAAA;GACZ,sBAAoBA,EAAA,gBAAa,KAAQ,KAAA;GACzC,iBAAeA,EAAA,gBAAgB,KAAA,IAAYX,EAAAqB,CAAA;GAC5C,iBAAc;GACb,iBAAerB,EAAAc,CAAA;GACf,OAAKb,EAAA;IAA6B,mBAAA,OAAOD,EAAAuB,CAAA,CAAQ;IAA2B,kBAAAZ,EAAA;IAAoC,uBAAAX,EAAAwB,CAAA,CAAE,CAACb,EAAA,IAAI;IAAiC,wBAAAX,EAAAwB,CAAA,CAAE,CAACb,EAAA,SAAS;;EAOrK,GAAA,CAAA,AAAAc,EAAA,OAAAvB,EAGM,OAAA;GAHD,OAAM;GAA0B,eAAY;EAC/CA,GAAAA,CAAAA,EAA6D,UAAA;GAArD,OAAM;GAA4B,YAAW;EACrDA,CAAAA,GAAAA,EAA2D,UAAA;GAAnD,OAAM;GAA0B,YAAW;EAExC,CAAA,CAAA,GAAA,EAAA,GAAA,CAAAS,EAAA,kBAAkBA,EAAA,aAAad,EAAAA,OAAO,YAAnDC,EAAA,GAAAC,EAIO,QAJPS,GAIO,CAHLL,EAEOwB,EAAA,QAAA,WAAA;GAFA,OAAO3B,EAAAqB,CAAA;GAAU,KAAKrB,EAAAc,CAAA;GAAgB,SAASd,EAAA6B,CAAA;EAAtD,SAEO,CADFzB,EAAAC,EAAAL,EAAAY,CAAA,CAAC,CAAC,SAAS,QAAQZ,EAAAgC,CAAA,CAAc,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAAC,EAAA,IAAA,EAAA,CAAA,GAAA,IAAA1B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"VProgressLinear.js","names":[],"sources":["../../../src/components/VProgressLinear/VProgressLinear.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * CSS draws the fill. JavaScript normalizes values shared by geometry, slots and progressbar\n * ARIA attributes.\n */\nimport { computed, useId } from 'vue'\n\nimport { useAriaLabel } from '../../composables/useAriaLabel'\nimport { useProgressValue } from '../../composables/useProgressValue'\nimport { useRootAttrs } from '../../composables/useRootAttrs'\nimport { useMessages } from '../../i18n/state'\nimport { px } from '../../utils/css'\n\n/** What the progress means, in colour. */\nexport type ProgressLinearTone = 'neutral' | 'accent' | 'danger' | 'success' | 'warning'\n\n/** How the track and the fill end. */\nexport type ProgressLinearShape = 'rounded' | 'square'\n\n/** Where the value sits along the bar. */\nexport type ProgressLinearValuePosition = 'start' | 'center' | 'end'\n\n/** Which way the bar fills. */\nexport type ProgressLinearOrientation = 'horizontal' | 'vertical'\n\n/** What the default slot receives. */\nexport interface ProgressLinearSlotProps {\n /** The value, brought back into the range. */\n value: number\n /** The bound, zero or more. */\n max: number\n /** How far along it is, as a percentage and unrounded. */\n percent: number\n}\n\ninterface ProgressLinearProps {\n /** How far along it is. Anything outside the range is brought back into it. */\n value?: number\n /**\n * What is progressing, shown above the bar and naming it for screen readers. Without it, the\n * bar is named from the design system dictionary; an `aria-label` or `aria-labelledby` of your\n * own takes precedence.\n */\n label?: string\n /** Hides the label visually. It still names the bar for screen readers. */\n hideLabel?: boolean\n /** What counts as finished. The other end is always zero. */\n max?: number\n /** Shows progress that cannot be measured, such as a server that reports no percentage. */\n indeterminate?: boolean\n /** What the progress means, expressed as a colour. */\n tone?: ProgressLinearTone\n /**\n * A colour of your own (hex, CSS name or `oklch()`), which replaces the tone. The\n * track's own shade is derived from it against the theme, so it follows the light and\n * the dark one.\n */\n color?: string\n /**\n * How thick the bar is, always in PIXELS: `12` and `'12'` both give 12px. It is 4px by\n * default, and showing text inside a bar that thin needs an explicit thickness.\n */\n thickness?: number | string\n /** Whether the ends of the bar are rounded or square. */\n shape?: ProgressLinearShape\n /**\n * Writes the percentage inside the bar. It is ignored while the progress is\n * unmeasurable, there being no figure to write.\n */\n showValue?: boolean\n /**\n * Where that text sits along the bar. On a vertical bar the start is the zero end,\n * hence the bottom.\n */\n valuePosition?: ProgressLinearValuePosition\n /** Turns the bar upright, filling from the bottom up. */\n orientation?: ProgressLinearOrientation\n}\n\nconst props = withDefaults(defineProps<ProgressLinearProps>(), {\n value: 0,\n label: undefined,\n hideLabel: false,\n max: 100,\n indeterminate: false,\n tone: 'accent',\n color: undefined,\n thickness: undefined,\n shape: 'rounded',\n showValue: false,\n valuePosition: 'center',\n orientation: 'horizontal',\n})\n\ndefineSlots<{\n /** What to write inside the bar instead of the percentage. */\n default?(props: ProgressLinearSlotProps): unknown\n}>()\n\n/* The percent sign, and the non-breaking space French puts before it where English puts\n nothing, are a convention of the language: they belong in the dictionary rather than\n in this file. Any other format goes through the slot above. */\nconst m = useMessages()\n\nconst {\n max: normalizedMax,\n clamped,\n fraction,\n percent,\n roundedPercent,\n} = useProgressValue(\n () => props.value,\n () => props.max,\n)\n\n// The root is a layout box holding the label and the bar: `class` and `style` stay on it, with\n// the tone and the custom properties the bar inherits, and every other attribute goes to the bar.\ndefineOptions({ inheritAttrs: false })\nconst { attrs, rootClass, rootStyle, forwardedAttrs } = useRootAttrs()\n\n// @a11y\n// A visible label names the bar by reference, unless the consumer named it themselves; without\n// one, the dictionary does. An indicator takes no name from the text inside it.\nconst labelId = useId()\nconst ariaLabel = useAriaLabel(() => (props.label ? undefined : m.value.progress.label))\nconst labelledBy = computed(() =>\n props.label && attrs['aria-label'] == null && attrs['aria-labelledby'] == null\n ? labelId\n : undefined,\n)\n</script>\n\n<template>\n <div\n class=\"v-progress-linear-field v-tone\"\n :class=\"rootClass\"\n :data-tone=\"tone\"\n :data-custom=\"color !== undefined ? '' : undefined\"\n :data-orientation=\"orientation\"\n :style=\"[{ '--custom-color': color, '--progress-thickness': px(thickness) }, rootStyle]\"\n >\n <span\n v-if=\"label\"\n :id=\"labelId\"\n class=\"v-progress-linear-label\"\n :class=\"{ 'v-visually-hidden': hideLabel }\"\n >{{ label }}</span\n >\n <div\n class=\"v-progress-linear\"\n role=\"progressbar\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n v-bind=\"forwardedAttrs\"\n :data-shape=\"shape\"\n :data-orientation=\"orientation\"\n :data-value-position=\"valuePosition\"\n :data-indeterminate=\"indeterminate ? '' : undefined\"\n :aria-valuenow=\"indeterminate ? undefined : clamped\"\n aria-valuemin=\"0\"\n :aria-valuemax=\"normalizedMax\"\n :style=\"{ '--fill-fraction': String(fraction) }\"\n >\n <span class=\"v-progress-linear-fill\" />\n <!--\n The same text twice, each copy cut at the fill's edge so that the two complete\n each other exactly: the first in the ordinary text colour over the empty track,\n the second over the filled part, coloured to contrast with it. The second is\n hidden from screen readers, being a duplicate of text already there.\n -->\n <template v-if=\"!indeterminate && (showValue || $slots.default)\">\n <span class=\"v-progress-linear-text\">\n <slot :value=\"clamped\" :max=\"normalizedMax\" :percent=\"percent\">\n {{ m.progress.percent(roundedPercent) }}\n </slot>\n </span>\n <span class=\"v-progress-linear-text\" data-on-fill aria-hidden=\"true\">\n <slot :value=\"clamped\" :max=\"normalizedMax\" :percent=\"percent\">\n {{ m.progress.percent(roundedPercent) }}\n </slot>\n </span>\n </template>\n </div>\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * The root holds the label and the bar, and declares what the bar reads, so a consumer's style\n * on it (outside our layers) overrides the thickness and the colours. The bar takes the whole\n * length available: sizing it is the consumer's business, through the parent or a width of\n * their own on the root.\n */\n .v-progress-linear-field {\n --progress-thickness: var(--vectis-control-size-progress-linear-thickness);\n /* Fill, track and the text over the fill are the tone's solid, soft and on-solid\n colours, read from the shared table (`.v-tone`, set in the template). */\n --progress-fill: var(--tone-bg-solid);\n --progress-track: var(--tone-bg-soft);\n --progress-text-fallback: var(--tone-text-solid);\n display: flex;\n flex-direction: column;\n gap: var(--vectis-space-1);\n }\n\n .v-progress-linear-label {\n color: var(--vectis-color-text);\n font-family: var(--vectis-text-family);\n font-size: var(--vectis-text-label-size);\n font-weight: var(--vectis-text-label-weight);\n line-height: var(--vectis-text-label-leading);\n }\n\n /* The element IS the track. */\n .v-progress-linear {\n position: relative;\n display: block;\n inline-size: 100%;\n block-size: var(--progress-thickness);\n border-radius: var(--vectis-radius-pill);\n background: var(--progress-track);\n font-family: var(--vectis-text-family);\n font-size: var(--vectis-text-caption-size);\n font-weight: var(--vectis-text-control-weight);\n line-height: var(--vectis-text-control-leading);\n }\n\n .v-progress-linear[data-shape='square'] {\n border-radius: 0;\n }\n\n .v-progress-linear-fill {\n position: absolute;\n inset-block: 0;\n inset-inline-start: 0;\n inline-size: calc(100% * var(--fill-fraction));\n border-radius: inherit;\n background: var(--progress-fill);\n /*\n * The fill is animated by changing its LENGTH, which the browser has to lay out again on\n * every frame. Scaling it would be cheaper, but a scale is physical: it would have to be\n * undone for the vertical orientation and again for a right-to-left page, where a logical\n * length simply works.\n */\n transition: inline-size var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n /*\n * The two copies are COMPLEMENTARY and never superimposed: this one is cut OUT of the filled\n * part, the other cut TO it, so every letter is painted exactly once. Removing either clip\n * raises no error and stays invisible for as long as both copies resolve to the same colour,\n * which happens wherever the adaptive colour function is unsupported.\n */\n .v-progress-linear-text {\n /*\n * The two insets of the cut: one on the edge the fill grows FROM, one on the edge it grows\n * towards. They are named after those roles rather than after physical sides, so the three\n * geometry rules further down; horizontal, right-to-left, vertical; all read the same pair.\n */\n --progress-clip-start: calc(100% * var(--fill-fraction));\n --progress-clip-end: -100vmax;\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n padding-inline: var(--vectis-space-2);\n color: var(--vectis-color-text);\n /*\n * The large negative inset on the two sides that do not carry the cut is what stops text\n * taller or wider than the bar from being cropped by its own clip.\n */\n clip-path: inset(-100vmax var(--progress-clip-end) -100vmax var(--progress-clip-start));\n /* The same duration and easing as the fill's own length, or the colour boundary\n would drift away from the fill's edge for the length of the transition. */\n transition: clip-path var(--vectis-duration-base) var(--vectis-ease-default);\n /* The bar itself is turned on its side in vertical mode; the text is put back\n upright here, since a label read sideways is not the point. */\n writing-mode: horizontal-tb;\n white-space: nowrap;\n pointer-events: none;\n }\n\n .v-progress-linear[data-value-position='start'] .v-progress-linear-text {\n justify-content: start;\n }\n\n .v-progress-linear[data-value-position='end'] .v-progress-linear-text {\n justify-content: end;\n }\n\n .v-progress-linear-text[data-on-fill] {\n /* The exact complement of the copy above: the cut moves to the other end of the\n axis, so the two together cover the whole bar and overlap nowhere. */\n --progress-clip-start: -100vmax;\n --progress-clip-end: calc(100% * (1 - var(--fill-fraction)));\n /*\n * The per-tone fallback colour. The adaptive one cannot simply be written as a second\n * declaration after it: because that declaration contains a var(), a browser with no\n * support does not reject it at parse time; it would win the cascade and only then turn\n * invalid, which resets the colour to inherited and leaves the fallback never applied.\n */\n color: var(--progress-text-fallback);\n }\n\n /* Where the adaptive colour function exists, the text picks black or white against\n whatever colour the fill ended up with. */\n @supports (color: contrast-color(red)) {\n .v-progress-linear-text[data-on-fill] {\n color: contrast-color(var(--progress-fill));\n }\n }\n\n /*\n * In a right-to-left page the fill grows from the right, so the two insets change physical\n * sides; the variables themselves keep their meaning.\n */\n .v-progress-linear:dir(rtl) .v-progress-linear-text {\n clip-path: inset(-100vmax var(--progress-clip-start) -100vmax var(--progress-clip-end));\n }\n\n /*\n * Putting zero at the bottom is not done by reversing the direction, which would also apply\n * to the text of the two copies: bidirectional reordering would then display \"50 %\" as \"%\n * 50\". The fill is anchored to the far end of the axis instead.\n */\n /*\n * Upright, the root carries the length, so a consumer's height on it sets the bar's: the bar\n * takes whatever the label leaves, its own inline size being the physical height.\n */\n .v-progress-linear-field[data-orientation='vertical'] {\n align-items: flex-start;\n block-size: var(--vectis-control-size-progress-linear-length);\n }\n\n .v-progress-linear[data-orientation='vertical'] {\n flex: 1 1 0;\n writing-mode: vertical-lr;\n inline-size: auto;\n }\n\n .v-progress-linear[data-orientation='vertical'] .v-progress-linear-fill {\n inset-inline-start: auto;\n inset-inline-end: 0;\n }\n\n /*\n * A right-to-left page reverses the inline axis of a vertical writing mode too: `vertical-lr`\n * then runs from the bottom up, so the far end anchored above is the TOP. The fill goes back\n * to the start of the axis, which is now the bottom.\n */\n .v-progress-linear[data-orientation='vertical']:dir(rtl) .v-progress-linear-fill {\n inset-inline-start: 0;\n inset-inline-end: auto;\n }\n\n .v-progress-linear[data-orientation='vertical'] .v-progress-linear-text {\n flex-direction: column-reverse;\n padding-inline: 0;\n padding-block: var(--vectis-space-2);\n }\n\n /*\n * The second selector is what neutralizes it, and it is written that way on purpose: it is\n * one step MORE specific than that rule, where the first selector alone would merely tie with\n * it and win by source order; a far more fragile arrangement.\n */\n .v-progress-linear[data-orientation='vertical'] .v-progress-linear-text,\n .v-progress-linear[data-orientation='vertical']:dir(rtl) .v-progress-linear-text {\n clip-path: inset(var(--progress-clip-end) -100vmax var(--progress-clip-start) -100vmax);\n }\n\n /*\n * At each extreme it is exactly flush with the edge without ever pulling away from it, which\n * makes the loop invisible and keeps the track from ever looking empty; no second bar is\n * needed. The easing carries the whole impression: a gradual entry, a quick crossing, a\n * damped exit.\n */\n .v-progress-linear[data-indeterminate] {\n overflow: hidden;\n }\n\n .v-progress-linear[data-indeterminate] .v-progress-linear-fill {\n /* The starting position is derived from this size, and the two must stay tied: that\n is what has the bar begin exactly off the track rather than half on it. */\n --progress-bar: 40%;\n /*\n * The anchoring is put back at the start of the axis, vertical case included; where a\n * measurable progress anchors at the far end instead.\n */\n inset-inline-start: 0;\n inset-inline-end: auto;\n inline-size: var(--progress-bar);\n /* The transition of a measurable progress has no place here: switching to this mode\n would otherwise be animated as the bar growing to its new size. */\n transition: none;\n animation: v-progress-linear-indeterminate var(--vectis-duration-1500) var(--vectis-ease-in-out)\n infinite;\n }\n\n @keyframes v-progress-linear-indeterminate {\n from {\n inset-inline-start: calc(-1 * var(--progress-bar));\n }\n\n to {\n inset-inline-start: 100%;\n }\n }\n\n /*\n * The same keyframes are simply read backwards, which changes nothing else BECAUSE the easing\n * curve is symmetric; an asymmetric one would need a second set of keyframes. A horizontal\n * right-to-left page needs nothing: the logical inset already follows the reading direction.\n */\n .v-progress-linear[data-orientation='vertical'][data-indeterminate] .v-progress-linear-fill {\n animation-direction: reverse;\n }\n\n /* On a right-to-left page the vertical axis already runs upwards (see the trap above),\n so the keyframes are read forwards again. */\n .v-progress-linear[data-orientation='vertical'][data-indeterminate]:dir(rtl)\n .v-progress-linear-fill {\n animation-direction: normal;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-progress-linear-fill,\n .v-progress-linear-text {\n transition: none;\n }\n\n .v-progress-linear[data-indeterminate] .v-progress-linear-fill {\n animation-duration: var(--vectis-duration-5000);\n }\n }\n\n /* `forced-color-adjust` inherits, so both copies of the text are given their colour here too. */\n @media (forced-colors: active) {\n .v-progress-linear {\n forced-color-adjust: none;\n background: Canvas;\n box-shadow: inset 0 0 0 var(--vectis-control-border-width) CanvasText;\n }\n\n .v-progress-linear-fill {\n background: Highlight;\n }\n\n .v-progress-linear-text {\n color: CanvasText;\n }\n\n .v-progress-linear-text[data-on-fill] {\n color: HighlightText;\n }\n }\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"VProgressLinear.js","names":["_sfc_main","VProgressLinear_vue_vue_type_script_setup_true_lang_default","VProgressLinear_default"],"sources":["../../../src/components/VProgressLinear/VProgressLinear.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * CSS draws the fill. JavaScript normalizes values shared by geometry, slots and progressbar\n * ARIA attributes.\n */\nimport { computed, useId } from 'vue'\n\nimport { useAriaLabel } from '../../composables/useAriaLabel'\nimport { useProgressValue } from '../../composables/useProgressValue'\nimport { useRootAttrs } from '../../composables/useRootAttrs'\nimport { useMessages } from '../../i18n/state'\nimport { px } from '../../utils/css'\n\n/** What the progress means, in colour. */\nexport type ProgressLinearTone = 'neutral' | 'accent' | 'danger' | 'success' | 'warning'\n\n/** How the track and the fill end. */\nexport type ProgressLinearShape = 'rounded' | 'square'\n\n/** Where the value sits along the bar. */\nexport type ProgressLinearValuePosition = 'start' | 'center' | 'end'\n\n/** Which way the bar fills. */\nexport type ProgressLinearOrientation = 'horizontal' | 'vertical'\n\n/** What the default slot receives. */\nexport interface ProgressLinearSlotProps {\n /** The value, brought back into the range. */\n value: number\n /** The bound, zero or more. */\n max: number\n /** How far along it is, as a percentage and unrounded. */\n percent: number\n}\n\ninterface ProgressLinearProps {\n /** How far along it is. Anything outside the range is brought back into it. */\n value?: number\n /**\n * What is progressing, shown above the bar and naming it for screen readers. Without it, the\n * bar is named from the design system dictionary; an `aria-label` or `aria-labelledby` of your\n * own takes precedence.\n */\n label?: string\n /** Hides the label visually. It still names the bar for screen readers. */\n hideLabel?: boolean\n /** What counts as finished. The other end is always zero. */\n max?: number\n /** Shows progress that cannot be measured, such as a server that reports no percentage. */\n indeterminate?: boolean\n /** What the progress means, expressed as a colour. */\n tone?: ProgressLinearTone\n /**\n * A colour of your own (hex, CSS name or `oklch()`), which replaces the tone. The\n * track's own shade is derived from it against the theme, so it follows the light and\n * the dark one.\n */\n color?: string\n /**\n * How thick the bar is, always in PIXELS: `12` and `'12'` both give 12px. It is 4px by\n * default, and showing text inside a bar that thin needs an explicit thickness.\n */\n thickness?: number | string\n /** Whether the ends of the bar are rounded or square. */\n shape?: ProgressLinearShape\n /**\n * Writes the percentage inside the bar. It is ignored while the progress is\n * unmeasurable, there being no figure to write.\n */\n showValue?: boolean\n /**\n * Where that text sits along the bar. On a vertical bar the start is the zero end,\n * hence the bottom.\n */\n valuePosition?: ProgressLinearValuePosition\n /** Turns the bar upright, filling from the bottom up. */\n orientation?: ProgressLinearOrientation\n}\n\nconst props = withDefaults(defineProps<ProgressLinearProps>(), {\n value: 0,\n label: undefined,\n hideLabel: false,\n max: 100,\n indeterminate: false,\n tone: 'accent',\n color: undefined,\n thickness: undefined,\n shape: 'rounded',\n showValue: false,\n valuePosition: 'center',\n orientation: 'horizontal',\n})\n\ndefineSlots<{\n /** What to write inside the bar instead of the percentage. */\n default?(props: ProgressLinearSlotProps): unknown\n}>()\n\n/* The percent sign, and the non-breaking space French puts before it where English puts\n nothing, are a convention of the language: they belong in the dictionary rather than\n in this file. Any other format goes through the slot above. */\nconst m = useMessages()\n\nconst {\n max: normalizedMax,\n clamped,\n fraction,\n percent,\n roundedPercent,\n} = useProgressValue(\n () => props.value,\n () => props.max,\n)\n\n// The root is a layout box holding the label and the bar: `class` and `style` stay on it, with\n// the tone and the custom properties the bar inherits, and every other attribute goes to the bar.\ndefineOptions({ inheritAttrs: false })\nconst { attrs, rootClass, rootStyle, forwardedAttrs } = useRootAttrs()\n\n// @a11y\n// A visible label names the bar by reference, unless the consumer named it themselves; without\n// one, the dictionary does. An indicator takes no name from the text inside it.\nconst labelId = useId()\nconst ariaLabel = useAriaLabel(() => (props.label ? undefined : m.value.progress.label))\nconst labelledBy = computed(() =>\n props.label && attrs['aria-label'] == null && attrs['aria-labelledby'] == null\n ? labelId\n : undefined,\n)\n</script>\n\n<template>\n <div\n class=\"v-progress-linear-field v-tone\"\n :class=\"rootClass\"\n :data-tone=\"tone\"\n :data-custom=\"color !== undefined ? '' : undefined\"\n :data-orientation=\"orientation\"\n :style=\"[{ '--custom-color': color, '--progress-thickness': px(thickness) }, rootStyle]\"\n >\n <span\n v-if=\"label\"\n :id=\"labelId\"\n class=\"v-progress-linear-label\"\n :class=\"{ 'v-visually-hidden': hideLabel }\"\n >{{ label }}</span\n >\n <div\n class=\"v-progress-linear\"\n role=\"progressbar\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n v-bind=\"forwardedAttrs\"\n :data-shape=\"shape\"\n :data-orientation=\"orientation\"\n :data-value-position=\"valuePosition\"\n :data-indeterminate=\"indeterminate ? '' : undefined\"\n :aria-valuenow=\"indeterminate ? undefined : clamped\"\n aria-valuemin=\"0\"\n :aria-valuemax=\"normalizedMax\"\n :style=\"{ '--fill-fraction': String(fraction) }\"\n >\n <span class=\"v-progress-linear-fill\" />\n <!--\n The same text twice, each copy cut at the fill's edge so that the two complete\n each other exactly: the first in the ordinary text colour over the empty track,\n the second over the filled part, coloured to contrast with it. The second is\n hidden from screen readers, being a duplicate of text already there.\n -->\n <template v-if=\"!indeterminate && (showValue || $slots.default)\">\n <span class=\"v-progress-linear-text\">\n <slot :value=\"clamped\" :max=\"normalizedMax\" :percent=\"percent\">\n {{ m.progress.percent(roundedPercent) }}\n </slot>\n </span>\n <span class=\"v-progress-linear-text\" data-on-fill aria-hidden=\"true\">\n <slot :value=\"clamped\" :max=\"normalizedMax\" :percent=\"percent\">\n {{ m.progress.percent(roundedPercent) }}\n </slot>\n </span>\n </template>\n </div>\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * The root holds the label and the bar, and declares what the bar reads, so a consumer's style\n * on it (outside our layers) overrides the thickness and the colours. The bar takes the whole\n * length available: sizing it is the consumer's business, through the parent or a width of\n * their own on the root.\n */\n .v-progress-linear-field {\n --progress-thickness: var(--vectis-control-size-progress-linear-thickness);\n /* Fill, track and the text over the fill are the tone's solid, soft and on-solid\n colours, read from the shared table (`.v-tone`, set in the template). */\n --progress-fill: var(--tone-bg-solid);\n --progress-track: var(--tone-bg-soft);\n --progress-text-fallback: var(--tone-text-solid);\n display: flex;\n flex-direction: column;\n gap: var(--vectis-space-1);\n }\n\n .v-progress-linear-label {\n color: var(--vectis-color-text);\n font-family: var(--vectis-text-family);\n font-size: var(--vectis-text-label-size);\n font-weight: var(--vectis-text-label-weight);\n line-height: var(--vectis-text-label-leading);\n }\n\n /* The element IS the track. */\n .v-progress-linear {\n position: relative;\n display: block;\n inline-size: 100%;\n block-size: var(--progress-thickness);\n border-radius: var(--vectis-radius-pill);\n background: var(--progress-track);\n font-family: var(--vectis-text-family);\n font-size: var(--vectis-text-caption-size);\n font-weight: var(--vectis-text-control-weight);\n line-height: var(--vectis-text-control-leading);\n }\n\n .v-progress-linear[data-shape='square'] {\n border-radius: 0;\n }\n\n .v-progress-linear-fill {\n position: absolute;\n inset-block: 0;\n inset-inline-start: 0;\n inline-size: calc(100% * var(--fill-fraction));\n border-radius: inherit;\n background: var(--progress-fill);\n /*\n * The fill is animated by changing its LENGTH, which the browser has to lay out again on\n * every frame. Scaling it would be cheaper, but a scale is physical: it would have to be\n * undone for the vertical orientation and again for a right-to-left page, where a logical\n * length simply works.\n */\n transition: inline-size var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n /*\n * The two copies are COMPLEMENTARY and never superimposed: this one is cut OUT of the filled\n * part, the other cut TO it, so every letter is painted exactly once. Removing either clip\n * raises no error and stays invisible for as long as both copies resolve to the same colour,\n * which happens wherever the adaptive colour function is unsupported.\n */\n .v-progress-linear-text {\n /*\n * The two insets of the cut: one on the edge the fill grows FROM, one on the edge it grows\n * towards. They are named after those roles rather than after physical sides, so the three\n * geometry rules further down; horizontal, right-to-left, vertical; all read the same pair.\n */\n --progress-clip-start: calc(100% * var(--fill-fraction));\n --progress-clip-end: -100vmax;\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n padding-inline: var(--vectis-space-2);\n color: var(--vectis-color-text);\n /*\n * The large negative inset on the two sides that do not carry the cut is what stops text\n * taller or wider than the bar from being cropped by its own clip.\n */\n clip-path: inset(-100vmax var(--progress-clip-end) -100vmax var(--progress-clip-start));\n /* The same duration and easing as the fill's own length, or the colour boundary\n would drift away from the fill's edge for the length of the transition. */\n transition: clip-path var(--vectis-duration-base) var(--vectis-ease-default);\n /* The bar itself is turned on its side in vertical mode; the text is put back\n upright here, since a label read sideways is not the point. */\n writing-mode: horizontal-tb;\n white-space: nowrap;\n pointer-events: none;\n }\n\n .v-progress-linear[data-value-position='start'] .v-progress-linear-text {\n justify-content: start;\n }\n\n .v-progress-linear[data-value-position='end'] .v-progress-linear-text {\n justify-content: end;\n }\n\n .v-progress-linear-text[data-on-fill] {\n /* The exact complement of the copy above: the cut moves to the other end of the\n axis, so the two together cover the whole bar and overlap nowhere. */\n --progress-clip-start: -100vmax;\n --progress-clip-end: calc(100% * (1 - var(--fill-fraction)));\n /*\n * The per-tone fallback colour. The adaptive one cannot simply be written as a second\n * declaration after it: because that declaration contains a var(), a browser with no\n * support does not reject it at parse time; it would win the cascade and only then turn\n * invalid, which resets the colour to inherited and leaves the fallback never applied.\n */\n color: var(--progress-text-fallback);\n }\n\n /* Where the adaptive colour function exists, the text picks black or white against\n whatever colour the fill ended up with. */\n @supports (color: contrast-color(red)) {\n .v-progress-linear-text[data-on-fill] {\n color: contrast-color(var(--progress-fill));\n }\n }\n\n /*\n * In a right-to-left page the fill grows from the right, so the two insets change physical\n * sides; the variables themselves keep their meaning.\n */\n .v-progress-linear:dir(rtl) .v-progress-linear-text {\n clip-path: inset(-100vmax var(--progress-clip-start) -100vmax var(--progress-clip-end));\n }\n\n /*\n * Putting zero at the bottom is not done by reversing the direction, which would also apply\n * to the text of the two copies: bidirectional reordering would then display \"50 %\" as \"%\n * 50\". The fill is anchored to the far end of the axis instead.\n */\n /*\n * Upright, the root carries the length, so a consumer's height on it sets the bar's: the bar\n * takes whatever the label leaves, its own inline size being the physical height.\n */\n .v-progress-linear-field[data-orientation='vertical'] {\n align-items: flex-start;\n block-size: var(--vectis-control-size-progress-linear-length);\n }\n\n .v-progress-linear[data-orientation='vertical'] {\n flex: 1 1 0;\n writing-mode: vertical-lr;\n inline-size: auto;\n }\n\n .v-progress-linear[data-orientation='vertical'] .v-progress-linear-fill {\n inset-inline-start: auto;\n inset-inline-end: 0;\n }\n\n /*\n * A right-to-left page reverses the inline axis of a vertical writing mode too: `vertical-lr`\n * then runs from the bottom up, so the far end anchored above is the TOP. The fill goes back\n * to the start of the axis, which is now the bottom.\n */\n .v-progress-linear[data-orientation='vertical']:dir(rtl) .v-progress-linear-fill {\n inset-inline-start: 0;\n inset-inline-end: auto;\n }\n\n .v-progress-linear[data-orientation='vertical'] .v-progress-linear-text {\n flex-direction: column-reverse;\n padding-inline: 0;\n padding-block: var(--vectis-space-2);\n }\n\n /*\n * The second selector is what neutralizes it, and it is written that way on purpose: it is\n * one step MORE specific than that rule, where the first selector alone would merely tie with\n * it and win by source order; a far more fragile arrangement.\n */\n .v-progress-linear[data-orientation='vertical'] .v-progress-linear-text,\n .v-progress-linear[data-orientation='vertical']:dir(rtl) .v-progress-linear-text {\n clip-path: inset(var(--progress-clip-end) -100vmax var(--progress-clip-start) -100vmax);\n }\n\n /*\n * At each extreme it is exactly flush with the edge without ever pulling away from it, which\n * makes the loop invisible and keeps the track from ever looking empty; no second bar is\n * needed. The easing carries the whole impression: a gradual entry, a quick crossing, a\n * damped exit.\n */\n .v-progress-linear[data-indeterminate] {\n overflow: hidden;\n }\n\n .v-progress-linear[data-indeterminate] .v-progress-linear-fill {\n /* The starting position is derived from this size, and the two must stay tied: that\n is what has the bar begin exactly off the track rather than half on it. */\n --progress-bar: 40%;\n /*\n * The anchoring is put back at the start of the axis, vertical case included; where a\n * measurable progress anchors at the far end instead.\n */\n inset-inline-start: 0;\n inset-inline-end: auto;\n inline-size: var(--progress-bar);\n /* The transition of a measurable progress has no place here: switching to this mode\n would otherwise be animated as the bar growing to its new size. */\n transition: none;\n animation: v-progress-linear-indeterminate var(--vectis-duration-1500) var(--vectis-ease-in-out)\n infinite;\n }\n\n @keyframes v-progress-linear-indeterminate {\n from {\n inset-inline-start: calc(-1 * var(--progress-bar));\n }\n\n to {\n inset-inline-start: 100%;\n }\n }\n\n /*\n * The same keyframes are simply read backwards, which changes nothing else BECAUSE the easing\n * curve is symmetric; an asymmetric one would need a second set of keyframes. A horizontal\n * right-to-left page needs nothing: the logical inset already follows the reading direction.\n */\n .v-progress-linear[data-orientation='vertical'][data-indeterminate] .v-progress-linear-fill {\n animation-direction: reverse;\n }\n\n /* On a right-to-left page the vertical axis already runs upwards (see the trap above),\n so the keyframes are read forwards again. */\n .v-progress-linear[data-orientation='vertical'][data-indeterminate]:dir(rtl)\n .v-progress-linear-fill {\n animation-direction: normal;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-progress-linear-fill,\n .v-progress-linear-text {\n transition: none;\n }\n\n .v-progress-linear[data-indeterminate] .v-progress-linear-fill {\n animation-duration: var(--vectis-duration-5000);\n }\n }\n\n /* `forced-color-adjust` inherits, so both copies of the text are given their colour here too. */\n @media (forced-colors: active) {\n .v-progress-linear {\n forced-color-adjust: none;\n background: Canvas;\n box-shadow: inset 0 0 0 var(--vectis-control-border-width) CanvasText;\n }\n\n .v-progress-linear-fill {\n background: Highlight;\n }\n\n .v-progress-linear-text {\n color: CanvasText;\n }\n\n .v-progress-linear-text[data-on-fill] {\n color: HighlightText;\n }\n }\n}\n</style>\n"],"mappings":""}