vectis-ui 0.12.0 → 0.14.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 (519) hide show
  1. package/dist/components/VAccordion/VAccordion.css +1 -1
  2. package/dist/components/VAccordion/VAccordion.d.ts +6 -5
  3. package/dist/components/VAccordion/VAccordion.js.map +1 -1
  4. package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
  5. package/dist/components/VAccordion/VAccordionItem.css +1 -1
  6. package/dist/components/VAccordion/VAccordionItem.d.ts +1 -1
  7. package/dist/components/VAccordion/VAccordionItem.js.map +1 -1
  8. package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  9. package/dist/components/VAlert/VAlert.css +2 -0
  10. package/dist/components/VAlert/VAlert.d.ts +73 -0
  11. package/dist/components/VAlert/VAlert.js +9 -0
  12. package/dist/components/VAlert/VAlert.js.map +1 -0
  13. package/dist/components/VAlert/VAlert.vue_vue_type_script_setup_true_lang.js +96 -0
  14. package/dist/components/VAlert/VAlert.vue_vue_type_script_setup_true_lang.js.map +1 -0
  15. package/dist/components/VAvatar/VAvatar.d.ts +2 -2
  16. package/dist/components/VAvatar/VAvatarGroup.d.ts +1 -1
  17. package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js +8 -8
  18. package/dist/components/VBadge/VBadge.d.ts +3 -3
  19. package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js +9 -9
  20. package/dist/components/VButton/VButton.d.ts +4 -4
  21. package/dist/components/VButton/VButtonGroup.css +1 -1
  22. package/dist/components/VButton/VButtonGroup.d.ts +2 -2
  23. package/dist/components/VButton/VButtonGroup.js.map +1 -1
  24. package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  25. package/dist/components/VCalendar/VCalendar.css +1 -1
  26. package/dist/components/VCalendar/VCalendar.d.ts +7 -1
  27. package/dist/components/VCalendar/VCalendar.js.map +1 -1
  28. package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js +20 -18
  29. package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  30. package/dist/components/VCalendar/VCalendarEvent.js.map +1 -1
  31. package/dist/components/VCalendar/VCalendarEvent.vue_vue_type_script_setup_true_lang.js.map +1 -1
  32. package/dist/components/VCalendar/VCalendarMonth.css +1 -1
  33. package/dist/components/VCalendar/VCalendarMonth.d.ts +2 -2
  34. package/dist/components/VCalendar/VCalendarMonth.js.map +1 -1
  35. package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js.map +1 -1
  36. package/dist/components/VCalendar/VCalendarTimeGrid.css +1 -1
  37. package/dist/components/VCalendar/VCalendarTimeGrid.d.ts +3 -3
  38. package/dist/components/VCalendar/VCalendarTimeGrid.js.map +1 -1
  39. package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js.map +1 -1
  40. package/dist/components/VCalendar/VCalendarYear.css +1 -1
  41. package/dist/components/VCalendar/VCalendarYear.js.map +1 -1
  42. package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js.map +1 -1
  43. package/dist/components/VCalendar/gesture.d.ts +1 -16
  44. package/dist/components/VCalendar/gesture.js +1 -1
  45. package/dist/components/VCalendar/gesture.js.map +1 -1
  46. package/dist/components/VCalendar/types.d.ts +2 -0
  47. package/dist/components/VCard/VCard.css +2 -0
  48. package/dist/components/VCard/VCard.d.ts +87 -0
  49. package/dist/components/VCard/VCard.js +9 -0
  50. package/dist/components/VCard/VCard.js.map +1 -0
  51. package/dist/components/VCard/VCard.vue_vue_type_script_setup_true_lang.js +103 -0
  52. package/dist/components/VCard/VCard.vue_vue_type_script_setup_true_lang.js.map +1 -0
  53. package/dist/components/VCarousel/VCarousel.d.ts +1 -1
  54. package/dist/components/VCarousel/VCarousel.js.map +1 -1
  55. package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js +18 -18
  56. package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  57. package/dist/components/VCheckbox/VCheckMark.css +2 -0
  58. package/dist/components/VCheckbox/VCheckMark.js +9 -0
  59. package/dist/components/VCheckbox/VCheckMark.js.map +1 -0
  60. package/dist/components/VCheckbox/VCheckMark.vue_vue_type_script_setup_true_lang.js +33 -0
  61. package/dist/components/VCheckbox/VCheckMark.vue_vue_type_script_setup_true_lang.js.map +1 -0
  62. package/dist/components/VCheckbox/VCheckbox.css +1 -1
  63. package/dist/components/VCheckbox/VCheckbox.d.ts +8 -3
  64. package/dist/components/VCheckbox/VCheckbox.js.map +1 -1
  65. package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js +54 -69
  66. package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  67. package/dist/components/VChip/VChip.d.ts +6 -6
  68. package/dist/components/VChip/VChip.js.map +1 -1
  69. package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js +26 -26
  70. package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  71. package/dist/components/VColorInput/VColorInput.css +2 -0
  72. package/dist/components/VColorInput/VColorInput.d.ts +113 -0
  73. package/dist/components/VColorInput/VColorInput.js +9 -0
  74. package/dist/components/VColorInput/VColorInput.js.map +1 -0
  75. package/dist/components/VColorInput/VColorInput.vue_vue_type_script_setup_true_lang.js +230 -0
  76. package/dist/components/VColorInput/VColorInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  77. package/dist/components/VColorPicker/VColorPicker.css +2 -0
  78. package/dist/components/VColorPicker/VColorPicker.d.ts +67 -0
  79. package/dist/components/VColorPicker/VColorPicker.js +9 -0
  80. package/dist/components/VColorPicker/VColorPicker.js.map +1 -0
  81. package/dist/components/VColorPicker/VColorPicker.vue_vue_type_script_setup_true_lang.js +390 -0
  82. package/dist/components/VColorPicker/VColorPicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
  83. package/dist/components/VColorPicker/color.d.ts +42 -0
  84. package/dist/components/VColorPicker/color.js +158 -0
  85. package/dist/components/VColorPicker/color.js.map +1 -0
  86. package/dist/components/VCombobox/VCombobox.css +1 -1
  87. package/dist/components/VCombobox/VCombobox.d.ts +46 -60
  88. package/dist/components/VCombobox/VCombobox.js.map +1 -1
  89. package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js +271 -372
  90. package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  91. package/dist/components/VCommandPalette/VCommandPalette.css +2 -0
  92. package/dist/components/VCommandPalette/VCommandPalette.d.ts +163 -0
  93. package/dist/components/VCommandPalette/VCommandPalette.js +9 -0
  94. package/dist/components/VCommandPalette/VCommandPalette.js.map +1 -0
  95. package/dist/components/VCommandPalette/VCommandPalette.vue_vue_type_script_setup_true_lang.js +321 -0
  96. package/dist/components/VCommandPalette/VCommandPalette.vue_vue_type_script_setup_true_lang.js.map +1 -0
  97. package/dist/components/VCommandPalette/VCommandPaletteItem.css +2 -0
  98. package/dist/components/VCommandPalette/VCommandPaletteItem.d.ts +38 -0
  99. package/dist/components/VCommandPalette/VCommandPaletteItem.js +9 -0
  100. package/dist/components/VCommandPalette/VCommandPaletteItem.js.map +1 -0
  101. package/dist/components/VCommandPalette/VCommandPaletteItem.vue_vue_type_script_setup_true_lang.js +69 -0
  102. package/dist/components/VCommandPalette/VCommandPaletteItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
  103. package/dist/components/VContextMenu/VContextMenu.css +2 -0
  104. package/dist/components/VContextMenu/VContextMenu.d.ts +66 -0
  105. package/dist/components/VContextMenu/VContextMenu.js +9 -0
  106. package/dist/components/VContextMenu/VContextMenu.js.map +1 -0
  107. package/dist/components/VContextMenu/VContextMenu.vue_vue_type_script_setup_true_lang.js +148 -0
  108. package/dist/components/VContextMenu/VContextMenu.vue_vue_type_script_setup_true_lang.js.map +1 -0
  109. package/dist/components/VDataTable/VDataTable.css +1 -1
  110. package/dist/components/VDataTable/VDataTable.d.ts +41 -16
  111. package/dist/components/VDataTable/VDataTable.js.map +1 -1
  112. package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js +307 -194
  113. package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  114. package/dist/components/VDateInput/VDateInput.d.ts +27 -7
  115. package/dist/components/VDateInput/VDateInput.js.map +1 -1
  116. package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js +170 -162
  117. package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  118. package/dist/components/VDatePicker/VDatePicker.d.ts +3 -3
  119. package/dist/components/VDatePicker/VDatePicker.js.map +1 -1
  120. package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js +228 -227
  121. package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  122. package/dist/components/VDatePicker/keyboard.d.ts +7 -7
  123. package/dist/components/VDatePicker/keyboard.js +8 -6
  124. package/dist/components/VDatePicker/keyboard.js.map +1 -1
  125. package/dist/components/VDatePicker/names.js +16 -20
  126. package/dist/components/VDatePicker/names.js.map +1 -1
  127. package/dist/components/VDialog/VDialog.d.ts +2 -4
  128. package/dist/components/VDialog/VDialog.js.map +1 -1
  129. package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js +46 -77
  130. package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  131. package/dist/components/VDrawer/VDrawer.css +2 -0
  132. package/dist/components/VDrawer/VDrawer.d.ts +102 -0
  133. package/dist/components/VDrawer/VDrawer.js +9 -0
  134. package/dist/components/VDrawer/VDrawer.js.map +1 -0
  135. package/dist/components/VDrawer/VDrawer.vue_vue_type_script_setup_true_lang.js +128 -0
  136. package/dist/components/VDrawer/VDrawer.vue_vue_type_script_setup_true_lang.js.map +1 -0
  137. package/dist/components/VEmptyState/VEmptyState.css +2 -0
  138. package/dist/components/VEmptyState/VEmptyState.d.ts +43 -0
  139. package/dist/components/VEmptyState/VEmptyState.js +9 -0
  140. package/dist/components/VEmptyState/VEmptyState.js.map +1 -0
  141. package/dist/components/VEmptyState/VEmptyState.vue_vue_type_script_setup_true_lang.js +48 -0
  142. package/dist/components/VEmptyState/VEmptyState.vue_vue_type_script_setup_true_lang.js.map +1 -0
  143. package/dist/components/VField/VField.css +2 -0
  144. package/dist/components/VField/VField.d.ts +84 -0
  145. package/dist/components/VField/VField.js +9 -0
  146. package/dist/components/VField/VField.js.map +1 -0
  147. package/dist/components/VField/VField.vue_vue_type_script_setup_true_lang.js +99 -0
  148. package/dist/components/VField/VField.vue_vue_type_script_setup_true_lang.js.map +1 -0
  149. package/dist/components/VField/VFieldAnnouncer.d.ts +7 -0
  150. package/dist/components/VField/VFieldAnnouncer.js +7 -0
  151. package/dist/components/VField/VFieldAnnouncer.js.map +1 -0
  152. package/dist/components/VField/VFieldAnnouncer.vue_vue_type_script_setup_true_lang.js +19 -0
  153. package/dist/components/VField/VFieldAnnouncer.vue_vue_type_script_setup_true_lang.js.map +1 -0
  154. package/dist/components/VField/VFieldMessage.d.ts +11 -0
  155. package/dist/components/VField/VFieldMessage.js +7 -0
  156. package/dist/components/VField/VFieldMessage.js.map +1 -0
  157. package/dist/components/VField/VFieldMessage.vue_vue_type_script_setup_true_lang.js +32 -0
  158. package/dist/components/VField/VFieldMessage.vue_vue_type_script_setup_true_lang.js.map +1 -0
  159. package/dist/components/VFieldset/VFieldset.css +2 -0
  160. package/dist/components/VFieldset/VFieldset.d.ts +52 -0
  161. package/dist/components/VFieldset/VFieldset.js +9 -0
  162. package/dist/components/VFieldset/VFieldset.js.map +1 -0
  163. package/dist/components/VFieldset/VFieldset.vue_vue_type_script_setup_true_lang.js +63 -0
  164. package/dist/components/VFieldset/VFieldset.vue_vue_type_script_setup_true_lang.js.map +1 -0
  165. package/dist/components/VFileInput/VFileInput.css +1 -1
  166. package/dist/components/VFileInput/VFileInput.d.ts +31 -7
  167. package/dist/components/VFileInput/VFileInput.js.map +1 -1
  168. package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js +168 -161
  169. package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  170. package/dist/components/VFilePicker/VFilePicker.d.ts +4 -4
  171. package/dist/components/VHotkeys/VHotkeys.css +1 -1
  172. package/dist/components/VHotkeys/VHotkeys.js.map +1 -1
  173. package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js +27 -30
  174. package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js.map +1 -1
  175. package/dist/components/VHotkeys/platform.d.ts +2 -0
  176. package/dist/components/VHotkeys/platform.js +24 -5
  177. package/dist/components/VHotkeys/platform.js.map +1 -1
  178. package/dist/components/VHoverCard/VHoverCard.css +2 -0
  179. package/dist/components/VHoverCard/VHoverCard.d.ts +62 -0
  180. package/dist/components/VHoverCard/VHoverCard.js +9 -0
  181. package/dist/components/VHoverCard/VHoverCard.js.map +1 -0
  182. package/dist/components/VHoverCard/VHoverCard.vue_vue_type_script_setup_true_lang.js +97 -0
  183. package/dist/components/VHoverCard/VHoverCard.vue_vue_type_script_setup_true_lang.js.map +1 -0
  184. package/dist/components/VIcon/icons/add.d.ts +5 -0
  185. package/dist/components/VIcon/icons/add.js +9 -0
  186. package/dist/components/VIcon/icons/add.js.map +1 -0
  187. package/dist/components/VIcon/icons/colorize.d.ts +5 -0
  188. package/dist/components/VIcon/icons/colorize.js +9 -0
  189. package/dist/components/VIcon/icons/colorize.js.map +1 -0
  190. package/dist/components/VIcon/icons/inbox.d.ts +5 -0
  191. package/dist/components/VIcon/icons/inbox.js +9 -0
  192. package/dist/components/VIcon/icons/inbox.js.map +1 -0
  193. package/dist/components/VIcon/icons/index.d.ts +42 -2
  194. package/dist/components/VIcon/icons/index.js +88 -72
  195. package/dist/components/VIcon/icons/index.js.map +1 -1
  196. package/dist/components/VIcon/icons/names.d.ts +2 -2
  197. package/dist/components/VIcon/icons/names.js +1 -1
  198. package/dist/components/VIcon/icons/names.js.map +1 -1
  199. package/dist/components/VIcon/icons/open_in_new.d.ts +5 -0
  200. package/dist/components/VIcon/icons/open_in_new.js +9 -0
  201. package/dist/components/VIcon/icons/open_in_new.js.map +1 -0
  202. package/dist/components/VIcon/icons/priority_high.d.ts +5 -0
  203. package/dist/components/VIcon/icons/priority_high.js +9 -0
  204. package/dist/components/VIcon/icons/priority_high.js.map +1 -0
  205. package/dist/components/VIcon/icons/remove.d.ts +5 -0
  206. package/dist/components/VIcon/icons/remove.js +9 -0
  207. package/dist/components/VIcon/icons/remove.js.map +1 -0
  208. package/dist/components/VIcon/icons/search_off.d.ts +5 -0
  209. package/dist/components/VIcon/icons/search_off.js +9 -0
  210. package/dist/components/VIcon/icons/search_off.js.map +1 -0
  211. package/dist/components/VIcon/icons/star.d.ts +5 -0
  212. package/dist/components/VIcon/icons/star.js +9 -0
  213. package/dist/components/VIcon/icons/star.js.map +1 -0
  214. package/dist/components/VIconButton/VIconButton.d.ts +4 -4
  215. package/dist/components/VInput/VInput.css +1 -1
  216. package/dist/components/VInput/VInput.d.ts +51 -2
  217. package/dist/components/VInput/VInput.js.map +1 -1
  218. package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js +129 -106
  219. package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  220. package/dist/components/VInput/VInputGroup.css +1 -1
  221. package/dist/components/VInput/VInputGroup.d.ts +20 -0
  222. package/dist/components/VInput/VInputGroup.js.map +1 -1
  223. package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js +50 -51
  224. package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  225. package/dist/components/VInputOTP/VInputOTP.css +1 -1
  226. package/dist/components/VInputOTP/VInputOTP.d.ts +27 -4
  227. package/dist/components/VInputOTP/VInputOTP.js.map +1 -1
  228. package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js +131 -113
  229. package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js.map +1 -1
  230. package/dist/components/VLink/VLink.css +2 -0
  231. package/dist/components/VLink/VLink.d.ts +53 -0
  232. package/dist/components/VLink/VLink.js +9 -0
  233. package/dist/components/VLink/VLink.js.map +1 -0
  234. package/dist/components/VLink/VLink.vue_vue_type_script_setup_true_lang.js +58 -0
  235. package/dist/components/VLink/VLink.vue_vue_type_script_setup_true_lang.js.map +1 -0
  236. package/dist/components/VListbox/VListboxChevron.css +2 -0
  237. package/dist/components/VListbox/VListboxChevron.d.ts +12 -0
  238. package/dist/components/VListbox/VListboxChevron.js +9 -0
  239. package/dist/components/VListbox/VListboxChevron.js.map +1 -0
  240. package/dist/components/VListbox/VListboxChevron.vue_vue_type_script_setup_true_lang.js +25 -0
  241. package/dist/components/VListbox/VListboxChevron.vue_vue_type_script_setup_true_lang.js.map +1 -0
  242. package/dist/components/VListbox/VListboxGroup.css +2 -0
  243. package/dist/components/VListbox/VListboxGroup.d.ts +27 -0
  244. package/dist/components/VListbox/VListboxGroup.js +9 -0
  245. package/dist/components/VListbox/VListboxGroup.js.map +1 -0
  246. package/dist/components/VListbox/VListboxGroup.vue_vue_type_script_setup_true_lang.js +21 -0
  247. package/dist/components/VListbox/VListboxGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
  248. package/dist/components/VListbox/VListboxOption.css +2 -0
  249. package/dist/components/{VCombobox/VComboboxOption.d.ts → VListbox/VListboxOption.d.ts} +4 -4
  250. package/dist/components/VListbox/VListboxOption.js +9 -0
  251. package/dist/components/VListbox/VListboxOption.js.map +1 -0
  252. package/dist/components/{VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js → VListbox/VListboxOption.vue_vue_type_script_setup_true_lang.js} +6 -6
  253. package/dist/components/VListbox/VListboxOption.vue_vue_type_script_setup_true_lang.js.map +1 -0
  254. package/dist/components/VListbox/VListboxPanel.css +2 -0
  255. package/dist/components/VListbox/VListboxPanel.d.ts +59 -0
  256. package/dist/components/VListbox/VListboxPanel.js +9 -0
  257. package/dist/components/VListbox/VListboxPanel.js.map +1 -0
  258. package/dist/components/VListbox/VListboxPanel.vue_vue_type_script_setup_true_lang.js +123 -0
  259. package/dist/components/VListbox/VListboxPanel.vue_vue_type_script_setup_true_lang.js.map +1 -0
  260. package/dist/components/VListbox/VListboxSeparator.css +2 -0
  261. package/dist/components/VListbox/VListboxSeparator.d.ts +3 -0
  262. package/dist/components/VListbox/VListboxSeparator.js +9 -0
  263. package/dist/components/VListbox/VListboxSeparator.js.map +1 -0
  264. package/dist/components/{VCombobox/VComboboxSeparator.vue_vue_type_script_setup_true_lang.js → VListbox/VListboxSeparator.vue_vue_type_script_setup_true_lang.js} +4 -4
  265. package/dist/components/VListbox/VListboxSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -0
  266. package/dist/components/VListbox/VListboxValues.css +2 -0
  267. package/dist/components/VListbox/VListboxValues.d.ts +52 -0
  268. package/dist/components/VListbox/VListboxValues.js +9 -0
  269. package/dist/components/VListbox/VListboxValues.js.map +1 -0
  270. package/dist/components/VListbox/VListboxValues.vue_vue_type_script_setup_true_lang.js +103 -0
  271. package/dist/components/VListbox/VListboxValues.vue_vue_type_script_setup_true_lang.js.map +1 -0
  272. package/dist/components/VMenu/VMenu.d.ts +1 -1
  273. package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js +9 -9
  274. package/dist/components/VMenu/VMenuItem.d.ts +1 -1
  275. package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js +16 -16
  276. package/dist/components/VMenu/VMenuPanel.d.ts +2 -2
  277. package/dist/components/VMenu/VMenuPanel.js.map +1 -1
  278. package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js +7 -7
  279. package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  280. package/dist/components/VMeter/VMeter.css +2 -0
  281. package/dist/components/VMeter/VMeter.d.ts +77 -0
  282. package/dist/components/VMeter/VMeter.js +9 -0
  283. package/dist/components/VMeter/VMeter.js.map +1 -0
  284. package/dist/components/VMeter/VMeter.vue_vue_type_script_setup_true_lang.js +113 -0
  285. package/dist/components/VMeter/VMeter.vue_vue_type_script_setup_true_lang.js.map +1 -0
  286. package/dist/components/VNumberInput/VNumberInput.css +2 -0
  287. package/dist/components/VNumberInput/VNumberInput.d.ts +114 -0
  288. package/dist/components/VNumberInput/VNumberInput.js +9 -0
  289. package/dist/components/VNumberInput/VNumberInput.js.map +1 -0
  290. package/dist/components/VNumberInput/VNumberInput.vue_vue_type_script_setup_true_lang.js +251 -0
  291. package/dist/components/VNumberInput/VNumberInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  292. package/dist/components/VNumberInput/number.d.ts +30 -0
  293. package/dist/components/VNumberInput/number.js +38 -0
  294. package/dist/components/VNumberInput/number.js.map +1 -0
  295. package/dist/components/VPagination/VPagination.d.ts +1 -1
  296. package/dist/components/VPagination/VPagination.js.map +1 -1
  297. package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js +77 -77
  298. package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
  299. package/dist/components/VProgressCircular/VProgressCircular.d.ts +2 -2
  300. package/dist/components/VProgressLinear/VProgressLinear.css +1 -1
  301. package/dist/components/VProgressLinear/VProgressLinear.d.ts +10 -7
  302. package/dist/components/VProgressLinear/VProgressLinear.js.map +1 -1
  303. package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js +52 -34
  304. package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js.map +1 -1
  305. package/dist/components/VRadio/VRadio.d.ts +8 -3
  306. package/dist/components/VRadio/VRadio.js.map +1 -1
  307. package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js +52 -46
  308. package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js.map +1 -1
  309. package/dist/components/VRating/VRating.css +2 -0
  310. package/dist/components/VRating/VRating.d.ts +92 -0
  311. package/dist/components/VRating/VRating.js +9 -0
  312. package/dist/components/VRating/VRating.js.map +1 -0
  313. package/dist/components/VRating/VRating.vue_vue_type_script_setup_true_lang.js +158 -0
  314. package/dist/components/VRating/VRating.vue_vue_type_script_setup_true_lang.js.map +1 -0
  315. package/dist/components/VResizable/VResizable.css +2 -0
  316. package/dist/components/VResizable/VResizable.d.ts +50 -0
  317. package/dist/components/VResizable/VResizable.js +9 -0
  318. package/dist/components/VResizable/VResizable.js.map +1 -0
  319. package/dist/components/VResizable/VResizable.vue_vue_type_script_setup_true_lang.js +225 -0
  320. package/dist/components/VResizable/VResizable.vue_vue_type_script_setup_true_lang.js.map +1 -0
  321. package/dist/components/VResizable/VResizablePanel.css +2 -0
  322. package/dist/components/VResizable/VResizablePanel.d.ts +60 -0
  323. package/dist/components/VResizable/VResizablePanel.js +9 -0
  324. package/dist/components/VResizable/VResizablePanel.js.map +1 -0
  325. package/dist/components/VResizable/VResizablePanel.vue_vue_type_script_setup_true_lang.js +83 -0
  326. package/dist/components/VResizable/VResizablePanel.vue_vue_type_script_setup_true_lang.js.map +1 -0
  327. package/dist/components/VResizable/context.d.ts +24 -0
  328. package/dist/components/VResizable/context.js +6 -0
  329. package/dist/components/VResizable/context.js.map +1 -0
  330. package/dist/components/VResizable/layout.d.ts +28 -0
  331. package/dist/components/VResizable/layout.js +41 -0
  332. package/dist/components/VResizable/layout.js.map +1 -0
  333. package/dist/components/VSelect/VSelect.css +2 -0
  334. package/dist/components/VSelect/VSelect.d.ts +193 -0
  335. package/dist/components/VSelect/VSelect.js +9 -0
  336. package/dist/components/VSelect/VSelect.js.map +1 -0
  337. package/dist/components/VSelect/VSelect.vue_vue_type_script_setup_true_lang.js +418 -0
  338. package/dist/components/VSelect/VSelect.vue_vue_type_script_setup_true_lang.js.map +1 -0
  339. package/dist/components/VSeparator/VSeparator.js.map +1 -1
  340. package/dist/components/VSeparator/VSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
  341. package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js +8 -8
  342. package/dist/components/VSideNavigation/VSideNavigationItem.d.ts +2 -2
  343. package/dist/components/VSideNavigation/VSideNavigationItem.js.map +1 -1
  344. package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js +3 -3
  345. package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  346. package/dist/components/VSkeletonLoader/VSkeletonLoader.d.ts +3 -3
  347. package/dist/components/VSlider/VSlider.css +1 -1
  348. package/dist/components/VSlider/VSlider.d.ts +34 -8
  349. package/dist/components/VSlider/VSlider.js.map +1 -1
  350. package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js +236 -215
  351. package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js.map +1 -1
  352. package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js +4 -4
  353. package/dist/components/VSnackbar/state.js.map +1 -1
  354. package/dist/components/VSplitButton/VSplitButton.css +2 -0
  355. package/dist/components/VSplitButton/VSplitButton.d.ts +114 -0
  356. package/dist/components/VSplitButton/VSplitButton.js +9 -0
  357. package/dist/components/VSplitButton/VSplitButton.js.map +1 -0
  358. package/dist/components/VSplitButton/VSplitButton.vue_vue_type_script_setup_true_lang.js +148 -0
  359. package/dist/components/VSplitButton/VSplitButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
  360. package/dist/components/VStepper/VStepper.css +2 -0
  361. package/dist/components/VStepper/VStepper.d.ts +73 -0
  362. package/dist/components/VStepper/VStepper.js +9 -0
  363. package/dist/components/VStepper/VStepper.js.map +1 -0
  364. package/dist/components/VStepper/VStepper.vue_vue_type_script_setup_true_lang.js +96 -0
  365. package/dist/components/VStepper/VStepper.vue_vue_type_script_setup_true_lang.js.map +1 -0
  366. package/dist/components/VSwitch/VSwitch.d.ts +8 -3
  367. package/dist/components/VSwitch/VSwitch.js.map +1 -1
  368. package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js +53 -47
  369. package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js.map +1 -1
  370. package/dist/components/VTabs/VTab.css +1 -1
  371. package/dist/components/VTabs/VTab.d.ts +1 -1
  372. package/dist/components/VTabs/VTab.js.map +1 -1
  373. package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js.map +1 -1
  374. package/dist/components/VTabs/VTabs.css +1 -1
  375. package/dist/components/VTabs/VTabs.d.ts +13 -5
  376. package/dist/components/VTabs/VTabs.js.map +1 -1
  377. package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js +20 -20
  378. package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
  379. package/dist/components/VTextarea/VTextarea.css +1 -1
  380. package/dist/components/VTextarea/VTextarea.d.ts +22 -2
  381. package/dist/components/VTextarea/VTextarea.js.map +1 -1
  382. package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js +108 -100
  383. package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js.map +1 -1
  384. package/dist/components/VTimeInput/VTimeInput.d.ts +27 -7
  385. package/dist/components/VTimeInput/VTimeInput.js.map +1 -1
  386. package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js +187 -171
  387. package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  388. package/dist/components/VTimePicker/VTimePicker.d.ts +2 -2
  389. package/dist/components/VTimePicker/VTimePicker.js.map +1 -1
  390. package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js +16 -16
  391. package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  392. package/dist/components/VTimeline/VTimeline.css +2 -0
  393. package/dist/components/VTimeline/VTimeline.d.ts +59 -0
  394. package/dist/components/VTimeline/VTimeline.js +9 -0
  395. package/dist/components/VTimeline/VTimeline.js.map +1 -0
  396. package/dist/components/VTimeline/VTimeline.vue_vue_type_script_setup_true_lang.js +53 -0
  397. package/dist/components/VTimeline/VTimeline.vue_vue_type_script_setup_true_lang.js.map +1 -0
  398. package/dist/components/VTimeline/VTimelineItem.css +2 -0
  399. package/dist/components/VTimeline/VTimelineItem.d.ts +48 -0
  400. package/dist/components/VTimeline/VTimelineItem.js +9 -0
  401. package/dist/components/VTimeline/VTimelineItem.js.map +1 -0
  402. package/dist/components/VTimeline/VTimelineItem.vue_vue_type_script_setup_true_lang.js +70 -0
  403. package/dist/components/VTimeline/VTimelineItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
  404. package/dist/components/VTimeline/context.d.ts +11 -0
  405. package/dist/components/VTimeline/context.js +6 -0
  406. package/dist/components/VTimeline/context.js.map +1 -0
  407. package/dist/components/VTimeline/datetime.d.ts +8 -0
  408. package/dist/components/VTimeline/datetime.js +36 -0
  409. package/dist/components/VTimeline/datetime.js.map +1 -0
  410. package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js +8 -8
  411. package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js +12 -12
  412. package/dist/components/VToggle/VToggle.d.ts +4 -4
  413. package/dist/components/VToggle/VToggle.js.map +1 -1
  414. package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js +1 -1
  415. package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js.map +1 -1
  416. package/dist/components/VToggle/VToggleItem.d.ts +1 -1
  417. package/dist/components/VTooltip/VTooltip.d.ts +8 -2
  418. package/dist/components/VTooltip/VTooltip.js.map +1 -1
  419. package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js +45 -43
  420. package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  421. package/dist/components/VTreeView/VTreeView.css +2 -0
  422. package/dist/components/VTreeView/VTreeView.d.ts +112 -0
  423. package/dist/components/VTreeView/VTreeView.js +9 -0
  424. package/dist/components/VTreeView/VTreeView.js.map +1 -0
  425. package/dist/components/VTreeView/VTreeView.vue_vue_type_script_setup_true_lang.js +317 -0
  426. package/dist/components/VTreeView/VTreeView.vue_vue_type_script_setup_true_lang.js.map +1 -0
  427. package/dist/components/VTypography/VTypography.d.ts +1 -1
  428. package/dist/components/VVirtualList/VVirtualList.css +2 -0
  429. package/dist/components/VVirtualList/VVirtualList.d.ts +78 -0
  430. package/dist/components/VVirtualList/VVirtualList.js +9 -0
  431. package/dist/components/VVirtualList/VVirtualList.js.map +1 -0
  432. package/dist/components/VVirtualList/VVirtualList.vue_vue_type_script_setup_true_lang.js +114 -0
  433. package/dist/components/VVirtualList/VVirtualList.vue_vue_type_script_setup_true_lang.js.map +1 -0
  434. package/dist/composables/useChoice.d.ts +28 -0
  435. package/dist/composables/useChoice.js +28 -0
  436. package/dist/composables/useChoice.js.map +1 -0
  437. package/dist/composables/useDebouncedSearch.d.ts +17 -0
  438. package/dist/composables/useDebouncedSearch.js +18 -0
  439. package/dist/composables/useDebouncedSearch.js.map +1 -0
  440. package/dist/composables/useEscapeDismiss.d.ts +8 -0
  441. package/dist/composables/useEscapeDismiss.js +16 -0
  442. package/dist/composables/useEscapeDismiss.js.map +1 -0
  443. package/dist/composables/useFieldIds.d.ts +2 -1
  444. package/dist/composables/useFieldIds.js +7 -6
  445. package/dist/composables/useFieldIds.js.map +1 -1
  446. package/dist/composables/useFieldPanel.d.ts +1 -0
  447. package/dist/composables/useFieldPanel.js +52 -42
  448. package/dist/composables/useFieldPanel.js.map +1 -1
  449. package/dist/composables/useFileField.d.ts +1 -3
  450. package/dist/composables/useFileField.js +48 -50
  451. package/dist/composables/useFileField.js.map +1 -1
  452. package/dist/composables/useHotkeyListener.d.ts +17 -0
  453. package/dist/composables/useHotkeyListener.js +29 -0
  454. package/dist/composables/useHotkeyListener.js.map +1 -0
  455. package/dist/composables/useIconClickHandlers.d.ts +2 -10
  456. package/dist/composables/useIconClickHandlers.js +1 -1
  457. package/dist/composables/useIconClickHandlers.js.map +1 -1
  458. package/dist/{components/VCombobox/infiniteScroll.d.ts → composables/useInfiniteScroll.d.ts} +6 -0
  459. package/dist/{components/VCombobox/infiniteScroll.js → composables/useInfiniteScroll.js} +9 -9
  460. package/dist/composables/useInfiniteScroll.js.map +1 -0
  461. package/dist/composables/useListbox.d.ts +132 -0
  462. package/dist/composables/useListbox.js +227 -0
  463. package/dist/composables/useListbox.js.map +1 -0
  464. package/dist/composables/useModalDialog.d.ts +28 -0
  465. package/dist/composables/useModalDialog.js +60 -0
  466. package/dist/composables/useModalDialog.js.map +1 -0
  467. package/dist/composables/useRootAttrs.d.ts +2 -3
  468. package/dist/composables/useRootAttrs.js.map +1 -1
  469. package/dist/composables/useTypeahead.d.ts +13 -0
  470. package/dist/composables/useTypeahead.js +23 -0
  471. package/dist/composables/useTypeahead.js.map +1 -0
  472. package/dist/composables/useVirtualList.d.ts +46 -0
  473. package/dist/composables/useVirtualList.js +145 -0
  474. package/dist/composables/useVirtualList.js.map +1 -0
  475. package/dist/i18n/en.js +50 -0
  476. package/dist/i18n/en.js.map +1 -1
  477. package/dist/i18n/fr.js +50 -0
  478. package/dist/i18n/fr.js.map +1 -1
  479. package/dist/i18n/state.d.ts +1 -1
  480. package/dist/i18n/state.js +17 -6
  481. package/dist/i18n/state.js.map +1 -1
  482. package/dist/i18n/types.d.ts +103 -2
  483. package/dist/icons.js +45 -37
  484. package/dist/index.d.ts +49 -3
  485. package/dist/index.js +80 -56
  486. package/dist/styles.css +1 -1
  487. package/dist/tokens/index.d.ts +43 -0
  488. package/dist/tokens/semantic.d.ts +42 -0
  489. package/dist/tokens/semantic.js +43 -1
  490. package/dist/tokens/semantic.js.map +1 -1
  491. package/dist/tokens/themes/dark.d.ts +1 -0
  492. package/dist/tokens/themes/dark.js +1 -0
  493. package/dist/tokens/themes/dark.js.map +1 -1
  494. package/dist/tokens.json +215 -1
  495. package/dist/types.d.ts +57 -4
  496. package/dist/utils/arrowNav.js.map +1 -1
  497. package/dist/utils/attrs.d.ts +9 -0
  498. package/dist/utils/attrs.js +14 -0
  499. package/dist/utils/attrs.js.map +1 -0
  500. package/dist/utils/date.d.ts +1 -0
  501. package/dist/utils/date.js +5 -4
  502. package/dist/utils/date.js.map +1 -1
  503. package/package.json +1 -1
  504. package/dist/components/VCombobox/VComboboxGroup.css +0 -2
  505. package/dist/components/VCombobox/VComboboxGroup.d.ts +0 -17
  506. package/dist/components/VCombobox/VComboboxGroup.js +0 -9
  507. package/dist/components/VCombobox/VComboboxGroup.js.map +0 -1
  508. package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js +0 -21
  509. package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js.map +0 -1
  510. package/dist/components/VCombobox/VComboboxOption.css +0 -2
  511. package/dist/components/VCombobox/VComboboxOption.js +0 -9
  512. package/dist/components/VCombobox/VComboboxOption.js.map +0 -1
  513. package/dist/components/VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js.map +0 -1
  514. package/dist/components/VCombobox/VComboboxSeparator.css +0 -2
  515. package/dist/components/VCombobox/VComboboxSeparator.js +0 -9
  516. package/dist/components/VCombobox/VComboboxSeparator.js.map +0 -1
  517. package/dist/components/VCombobox/VComboboxSeparator.vue_vue_type_script_setup_true_lang.js.map +0 -1
  518. package/dist/components/VCombobox/infiniteScroll.js.map +0 -1
  519. /package/dist/components/{VCombobox/VComboboxSeparator.d.ts → VCheckbox/VCheckMark.d.ts} +0 -0
@@ -1,28 +1,37 @@
1
1
  import { useMessages as e } from "../../i18n/state.js";
2
2
  import { px as t } from "../../utils/css.js";
3
3
  import { useAriaLabel as n } from "../../composables/useAriaLabel.js";
4
- import { useProgressValue as r } from "../../composables/useProgressValue.js";
5
- import { Fragment as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, defineComponent as l, normalizeStyle as u, openBlock as d, renderSlot as f, toDisplayString as p, unref as m } from "vue";
4
+ import { useRootAttrs as r } from "../../composables/useRootAttrs.js";
5
+ import { useProgressValue as i } from "../../composables/useProgressValue.js";
6
+ import { Fragment as a, computed as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, defineComponent as d, mergeProps as f, normalizeClass as p, normalizeStyle as m, openBlock as h, renderSlot as g, toDisplayString as _, unref as v, useId as y } from "vue";
6
7
  //#region src/components/VProgressLinear/VProgressLinear.vue?vue&type=script&setup=true&lang.ts
7
- var h = [
8
- "aria-label",
8
+ var b = [
9
9
  "data-tone",
10
10
  "data-custom",
11
+ "data-orientation"
12
+ ], x = ["id"], S = [
13
+ "aria-labelledby",
14
+ "aria-label",
11
15
  "data-shape",
12
16
  "data-orientation",
13
17
  "data-value-position",
14
18
  "data-indeterminate",
15
19
  "aria-valuenow",
16
20
  "aria-valuemax"
17
- ], g = { class: "v-progress-linear-text" }, _ = {
21
+ ], C = { class: "v-progress-linear-text" }, w = {
18
22
  class: "v-progress-linear-text",
19
23
  "data-on-fill": "",
20
24
  "aria-hidden": "true"
21
- }, v = /*@__PURE__*/ l({
25
+ }, T = /*@__PURE__*/ d({
26
+ inheritAttrs: !1,
22
27
  __name: "VProgressLinear",
23
28
  props: {
24
29
  value: { default: 0 },
25
30
  label: { default: void 0 },
31
+ hideLabel: {
32
+ type: Boolean,
33
+ default: !1
34
+ },
26
35
  max: { default: 100 },
27
36
  indeterminate: {
28
37
  type: Boolean,
@@ -39,38 +48,47 @@ var h = [
39
48
  valuePosition: { default: "center" },
40
49
  orientation: { default: "horizontal" }
41
50
  },
42
- setup(l) {
43
- let v = l, y = e(), { max: b, clamped: x, fraction: S, percent: C, roundedPercent: w } = r(() => v.value, () => v.max), T = n(() => v.label ?? y.value.progress.label);
44
- return (e, n) => (d(), o("div", {
45
- class: "v-progress-linear v-tone",
51
+ setup(d) {
52
+ let T = d, E = e(), { max: D, clamped: O, fraction: k, percent: A, roundedPercent: j } = i(() => T.value, () => T.max), { attrs: M, rootClass: N, rootStyle: P, forwardedAttrs: F } = r(), I = y(), L = n(() => T.label ? void 0 : E.value.progress.label), R = o(() => T.label && M["aria-label"] == null && M["aria-labelledby"] == null ? I : void 0);
53
+ return (e, n) => (h(), c("div", {
54
+ class: p(["v-progress-linear-field v-tone", v(N)]),
55
+ "data-tone": d.tone,
56
+ "data-custom": d.color === void 0 ? void 0 : "",
57
+ "data-orientation": d.orientation,
58
+ style: m([{
59
+ "--custom-color": d.color,
60
+ "--progress-thickness": v(t)(d.thickness)
61
+ }, v(P)])
62
+ }, [d.label ? (h(), c("span", {
63
+ key: 0,
64
+ id: v(I),
65
+ class: p(["v-progress-linear-label", { "v-visually-hidden": d.hideLabel }])
66
+ }, _(d.label), 11, x)) : s("", !0), l("div", f({
67
+ class: "v-progress-linear",
46
68
  role: "progressbar",
47
- "aria-label": m(T),
48
- "data-tone": l.tone,
49
- "data-custom": l.color === void 0 ? void 0 : "",
50
- "data-shape": l.shape,
51
- "data-orientation": l.orientation,
52
- "data-value-position": l.valuePosition,
53
- "data-indeterminate": l.indeterminate ? "" : void 0,
54
- "aria-valuenow": l.indeterminate ? void 0 : m(x),
69
+ "aria-labelledby": R.value,
70
+ "aria-label": v(L)
71
+ }, v(F), {
72
+ "data-shape": d.shape,
73
+ "data-orientation": d.orientation,
74
+ "data-value-position": d.valuePosition,
75
+ "data-indeterminate": d.indeterminate ? "" : void 0,
76
+ "aria-valuenow": d.indeterminate ? void 0 : v(O),
55
77
  "aria-valuemin": "0",
56
- "aria-valuemax": m(b),
57
- style: u({
58
- "--fill-fraction": String(m(S)),
59
- "--custom-color": l.color,
60
- "--progress-thickness": m(t)(l.thickness)
61
- })
62
- }, [n[0] ||= s("span", { class: "v-progress-linear-fill" }, null, -1), !l.indeterminate && (l.showValue || e.$slots.default) ? (d(), o(i, { key: 0 }, [s("span", g, [f(e.$slots, "default", {
63
- value: m(x),
64
- max: m(b),
65
- percent: m(C)
66
- }, () => [c(p(m(y).progress.percent(m(w))), 1)])]), s("span", _, [f(e.$slots, "default", {
67
- value: m(x),
68
- max: m(b),
69
- percent: m(C)
70
- }, () => [c(p(m(y).progress.percent(m(w))), 1)])])], 64)) : a("", !0)], 12, h));
78
+ "aria-valuemax": v(D),
79
+ style: { "--fill-fraction": String(v(k)) }
80
+ }), [n[0] ||= l("span", { class: "v-progress-linear-fill" }, null, -1), !d.indeterminate && (d.showValue || e.$slots.default) ? (h(), c(a, { key: 0 }, [l("span", C, [g(e.$slots, "default", {
81
+ value: v(O),
82
+ max: v(D),
83
+ percent: v(A)
84
+ }, () => [u(_(v(E).progress.percent(v(j))), 1)])]), l("span", w, [g(e.$slots, "default", {
85
+ value: v(O),
86
+ max: v(D),
87
+ percent: v(A)
88
+ }, () => [u(_(v(E).progress.percent(v(j))), 1)])])], 64)) : s("", !0)], 16, S)], 14, b));
71
89
  }
72
90
  });
73
91
  //#endregion
74
- export { v as default };
92
+ export { T as default };
75
93
 
76
94
  //# sourceMappingURL=VProgressLinear.vue_vue_type_script_setup_true_lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VProgressLinear.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"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 { 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 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, 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 /** It is what to use while waiting for 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 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// @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 <div\n class=\"v-progress-linear 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-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=\"{\n '--fill-fraction': String(fraction),\n '--custom-color': color,\n '--progress-thickness': px(thickness),\n }\"\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</template>\n\n<style>\n@layer vectis.components {\n /*\n * The element IS the track, and it takes the whole length available. Sizing it is the\n * consumer's business, through the parent or through a width of their own; a consumer's style\n * sits outside our layers and always wins.\n */\n .v-progress-linear {\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 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 .v-progress-linear[data-orientation='vertical'] {\n writing-mode: vertical-lr;\n inline-size: var(--vectis-control-size-progress-linear-length);\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0EA,IAAM,IAAQ,GAsBR,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,EAsCM,OAAA;GArCJ,OAAM;GACN,MAAK;GACJ,cAAY,EAAA,CAAA;GACZ,aAAW,EAAA;GACX,eAAa,EAAA,UAAU,KAAA,IAAiB,KAAA,IAAR;GAChC,cAAY,EAAA;GACZ,oBAAkB,EAAA;GAClB,uBAAqB,EAAA;GACrB,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;4BAAqC,EAAA,CAAA,CAAE,CAAC,EAAA,SAAS;;eAM9H,EAAuC,QAAA,EAAjC,OAAM,yBAAwB,GAAA,MAAA,EAAA,GAAA,CAOnB,EAAA,kBAAkB,EAAA,aAAaA,EAAAA,OAAO,YAAA,EAAA,GAAvD,EAWW,GAAA,EAAA,KAAA,EAAA,GAAA,CAVT,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,GAGxC,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,CAAA,GAAA,EAAA,KAAA,EAAA,IAAA,EAAA,CAAA,GAAA,IAAA,CAAA"}
1
+ {"version":3,"file":"VProgressLinear.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+EA,IAAM,IAAQ,GAuBR,IAAI,EAAY,GAEhB,EACJ,KAAK,GACL,YACA,aACA,YACA,sBACE,QACI,EAAM,aACN,EAAM,GACd,GAKM,EAAE,UAAO,cAAW,cAAW,sBAAmB,EAAa,GAK/D,IAAU,EAAM,GAChB,IAAY,QAAoB,EAAM,QAAQ,KAAA,IAAY,EAAE,MAAM,SAAS,KAAM,GACjF,IAAa,QACjB,EAAM,SAAS,EAAM,iBAAiB,QAAQ,EAAM,sBAAsB,OACtE,IACA,KAAA,CACN;yBAIE,EAkDM,OAAA;GAjDJ,OAAK,EAAA,CAAC,kCACE,EAAA,CAAA,CAAS,CAAA;GAChB,aAAW,EAAA;GACX,eAAa,EAAA,UAAU,KAAA,IAAiB,KAAA,IAAR;GAChC,oBAAkB,EAAA;GAClB,OAAK,EAAA,CAAA;IAAA,kBAAuB,EAAA;IAAK,wBAA0B,EAAA,CAAA,CAAE,CAAC,EAAA,SAAS;GAAA,GAAK,EAAA,CAAA,CAAS,CAAA;MAG9E,EAAA,SAAA,EAAA,GADR,EAMC,QAAA;;GAJE,IAAI,EAAA,CAAA;GACL,OAAK,EAAA,CAAC,2BAAyB,EAAA,qBACA,EAAA,UAAS,CAAA,CAAA;OACpC,EAAA,KAAK,GAAA,IAAA,CAAA,KAAA,EAAA,IAAA,EAAA,GAEX,EAkCM,OAlCN,EAkCM;GAjCJ,OAAM;GACN,MAAK;GACJ,mBAAiB,EAAA;GACjB,cAAY,EAAA,CAAA;KACL,EAAA,CAAA,GAAc;GACrB,cAAY,EAAA;GACZ,oBAAkB,EAAA;GAClB,uBAAqB,EAAA;GACrB,sBAAoB,EAAA,gBAAa,KAAQ,KAAA;GACzC,iBAAe,EAAA,gBAAgB,KAAA,IAAY,EAAA,CAAA;GAC5C,iBAAc;GACb,iBAAe,EAAA,CAAA;GACf,OAAK,EAAA,mBAAuB,OAAO,EAAA,CAAA,CAAQ,EAAA;gBAE5C,EAAuC,QAAA,EAAjC,OAAM,yBAAwB,GAAA,MAAA,EAAA,GAAA,CAOnB,EAAA,kBAAkB,EAAA,aAAaA,EAAAA,OAAO,YAAA,EAAA,GAAvD,EAWW,GAAA,EAAA,KAAA,EAAA,GAAA,CAVT,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,GAGxC,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,CAAA,GAAA,EAAA,KAAA,EAAA,IAAA,EAAA,CAAA,GAAA,IAAA,CAAA,CAAA,GAAA,IAAA,CAAA"}
@@ -14,6 +14,12 @@ interface RadioProps {
14
14
  * technology, so it is read out after the label rather than as part of it.
15
15
  */
16
16
  hint?: string;
17
+ /**
18
+ * A message saying what is wrong with the value, shown in place of the hint so that the field
19
+ * does not grow. It marks the field invalid, is read along with it, and is announced when it
20
+ * appears or changes.
21
+ */
22
+ error?: string;
17
23
  /** Which side of the dot the label sits on. */
18
24
  labelPosition?: RadioLabelPosition;
19
25
  /**
@@ -45,9 +51,7 @@ type __VLS_ModelProps = {
45
51
  };
46
52
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
47
53
  declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
48
- /** Moves the focus to the real radio button. */
49
54
  focus: (options?: FocusOptions) => void | undefined;
50
- /** The real `<input type="radio">`, for what `focus` does not cover. */
51
55
  el: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
52
56
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
53
57
  "update:modelValue": (value: ItemValue) => any;
@@ -55,11 +59,12 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
55
59
  "onUpdate:modelValue"?: ((value: ItemValue) => any) | undefined;
56
60
  }>, {
57
61
  label: string;
62
+ error: string;
58
63
  disabled: boolean;
59
64
  invalid: boolean;
60
65
  hint: string;
61
- readonly: boolean;
62
66
  labelPosition: RadioLabelPosition;
67
+ readonly: boolean;
63
68
  spread: boolean;
64
69
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
65
70
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1 +1 @@
1
- {"version":3,"file":"VRadio.js","names":[],"sources":["../../../src/components/VRadio/VRadio.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Retain the native radio for keyboard selection and forms. Its hint stays outside the label so\n * it does not become part of the accessible name.\n */\n\nimport { ref } from 'vue'\n\nimport { useFieldIds } from '../../composables/useFieldIds'\nimport { useRootAttrs } from '../../composables/useRootAttrs'\nimport type { ItemValue } from '../../types'\n\n/** Which side of the dot the label sits on. */\nexport type RadioLabelPosition = 'start' | 'end'\n\ninterface RadioProps {\n /**\n * What choosing this button means. The group's v-model holds the value of the\n * selected button, so this is what it becomes when this one is picked.\n */\n value: ItemValue\n /** The text beside the dot, which names it. The default slot replaces it. */\n label?: string\n /**\n * A line of help under the label. It is tied to the radio button for assistive\n * technology, so it is read out after the label rather than as part of it.\n */\n hint?: string\n /** Which side of the dot the label sits on. */\n labelPosition?: RadioLabelPosition\n /**\n * Pushes the label and the dot to opposite ends of the line, the row taking the\n * full width available.\n */\n spread?: boolean\n /**\n * Marks the field as invalid, which colours the dot and tells assistive technology\n * so. It is for a rule the browser cannot check by itself.\n */\n invalid?: boolean\n /** Makes this choice unusable, greyed out through the colour tokens. */\n disabled?: boolean\n /** Shows the selection without allowing it to be changed. */\n readonly?: boolean\n}\n\nconst props = withDefaults(defineProps<RadioProps>(), {\n label: undefined,\n hint: undefined,\n labelPosition: 'end',\n spread: false,\n invalid: false,\n disabled: false,\n readonly: false,\n})\n\n// @a11y\n// The browser's job, but it only groups inputs that share a `name`; so redirecting the\n// attributes is what makes the arrow keys work at all. The root being a layout box, `name` left\n// on it would reach nothing.\ndefineOptions({ inheritAttrs: false })\nconst { attrs, rootClass, rootStyle, forwardedAttrs } = useRootAttrs()\nconst { hintId, describedBy } = useFieldIds(attrs, () => !!props.hint)\n\n/**\n * The value selected in the group, shared by every radio carrying the same `name`. It is\n * empty until one is chosen, and a radio is selected when it matches its own `value`.\n */\nconst model = defineModel<ItemValue>({ default: '' })\n\ndefineSlots<{\n /** The label, when it needs more than the `label` prop's text. It is clickable. */\n default?(): unknown\n}>()\n\nconst inputEl = ref<HTMLInputElement | null>(null)\n\n// @core\n// The native `readonly` attribute does nothing on a radio button. Cancelling the click is what\n// refuses the selection: the browser puts the group's previous selection back and fires no\n// `change`.\nfunction refuseWhenReadonly(event: MouseEvent) {\n if (props.readonly) event.preventDefault()\n}\n\n// The root is a wrapper, so a template ref on the component reaches the layout box and not\n// the control: these two are the way to the real radio button.\ndefineExpose({\n /** Moves the focus to the real radio button. */\n focus: (options?: FocusOptions) => inputEl.value?.focus(options),\n /** The real `<input type=\"radio\">`, for what `focus` does not cover. */\n el: inputEl,\n})\n</script>\n\n<template>\n <span\n class=\"v-radio v-choice\"\n :class=\"rootClass\"\n :style=\"rootStyle\"\n :data-label-position=\"labelPosition\"\n :data-spread=\"spread ? '' : undefined\"\n :data-readonly=\"readonly ? '' : undefined\"\n >\n <label class=\"v-choice-row\">\n <input\n ref=\"inputEl\"\n v-model=\"model\"\n type=\"radio\"\n class=\"v-radio-input v-hidden-input\"\n :aria-invalid=\"invalid || undefined\"\n v-bind=\"forwardedAttrs\"\n :value=\"value\"\n :disabled=\"disabled\"\n :aria-describedby=\"describedBy\"\n @click=\"refuseWhenReadonly\"\n />\n <span class=\"v-radio-dot\" aria-hidden=\"true\" />\n <span v-if=\"$slots.default || label\" class=\"v-radio-label v-choice-label\">\n <slot>{{ label }}</slot>\n </span>\n </label>\n <span v-if=\"hint\" :id=\"hintId\" class=\"v-radio-hint v-choice-hint\">{{ hint }}</span>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /* The dot works exactly like VCheckbox's box, the accent filling it once the input is\n checked, with the small inner disc drawn as a pseudo-element in currentcolor so it\n follows whatever colour the state gives the ring's content. */\n .v-radio-dot {\n display: inline-grid;\n place-items: center;\n width: var(--vectis-control-size-check);\n height: var(--vectis-control-size-check);\n background: transparent;\n border: var(--vectis-control-border-width) solid var(--vectis-color-border-strong);\n border-radius: var(--vectis-radius-pill);\n color: var(--vectis-color-text-on-accent);\n transition:\n background-color var(--vectis-duration-fast) var(--vectis-ease-default),\n border-color var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-radio-dot::before {\n content: '';\n width: var(--vectis-control-size-check-dot);\n height: var(--vectis-control-size-check-dot);\n border-radius: var(--vectis-radius-pill);\n background: currentcolor;\n opacity: 0;\n transition: opacity var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-radio-input:checked + .v-radio-dot::before {\n opacity: 1;\n }\n\n /*\n * The states below weigh (0,3,0), bar the read-only base at (0,2,0), so their ORDER\n * arbitrates them: checked, read-only, invalid, then disabled last. The two hovers sit at\n * (0,7,0) and therefore beat every one of them on specificity, order or no order; which is\n * why they have to EXCLUDE by hand each state they must not repaint.\n */\n .v-radio:not([data-readonly])\n .v-choice-row:hover\n .v-radio-input:not(:disabled, :checked, :user-invalid, [aria-invalid='true'])\n + .v-radio-dot {\n border-color: color-mix(\n in oklab,\n var(--vectis-color-border-strong),\n var(--vectis-color-text) 15%\n );\n }\n\n .v-radio-input:checked + .v-radio-dot {\n background: var(--vectis-color-accent);\n border-color: var(--vectis-color-accent);\n }\n\n .v-radio:not([data-readonly])\n .v-choice-row:hover\n .v-radio-input:not(:disabled, :user-invalid, [aria-invalid='true']):checked\n + .v-radio-dot {\n background: var(--vectis-color-accent-hover);\n border-color: var(--vectis-color-accent-hover);\n }\n\n /*\n * The inner disc takes the surface colour, which contrasts with that fill in both themes,\n * where white would vanish against the light grey of the dark theme. `:where()` keeps both\n * rules at the weight of the states they sit between.\n */\n :where(.v-radio[data-readonly]) .v-radio-input + .v-radio-dot {\n background: var(--vectis-color-surface-sunken);\n border-color: var(--vectis-color-border);\n }\n\n :where(.v-radio[data-readonly]) .v-radio-input:checked + .v-radio-dot {\n background: var(--vectis-color-text-muted);\n border-color: var(--vectis-color-text-muted);\n color: var(--vectis-color-surface);\n }\n\n .v-radio-input:user-invalid + .v-radio-dot,\n .v-radio-input[aria-invalid='true'] + .v-radio-dot {\n border-color: var(--vectis-color-danger);\n }\n\n .v-radio-input:disabled + .v-radio-dot {\n background: var(--vectis-color-surface-muted);\n border-color: var(--vectis-color-border);\n color: var(--vectis-color-text-subtle);\n }\n\n @media (forced-colors: active) {\n /*\n * The class is repeated to (0,8,0) so the row's own hover rules, which reach (0,7,0),\n * cannot repaint it: `forced-color-adjust: none` takes the forcing off this element, and a\n * hover left winning would then paint its real grey over the system colour.\n */\n .v-radio-input.v-radio-input.v-radio-input.v-radio-input.v-radio-input:checked:not(:disabled)\n + .v-radio-dot {\n forced-color-adjust: none;\n background: Highlight;\n border-color: Highlight;\n color: HighlightText;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-radio-dot,\n .v-radio-dot::before {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"VRadio.js","names":[],"sources":["../../../src/components/VRadio/VRadio.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Retain the native radio for keyboard selection and forms. Its hint stays outside the label so\n * it does not become part of the accessible name.\n */\n\nimport VFieldAnnouncer from '../VField/VFieldAnnouncer.vue'\nimport VFieldMessage from '../VField/VFieldMessage.vue'\n\nimport { useChoice } from '../../composables/useChoice'\nimport type { ItemValue } from '../../types'\n\n/** Which side of the dot the label sits on. */\nexport type RadioLabelPosition = 'start' | 'end'\n\ninterface RadioProps {\n /**\n * What choosing this button means. The group's v-model holds the value of the\n * selected button, so this is what it becomes when this one is picked.\n */\n value: ItemValue\n /** The text beside the dot, which names it. The default slot replaces it. */\n label?: string\n /**\n * A line of help under the label. It is tied to the radio button for assistive\n * technology, so it is read out after the label rather than as part of it.\n */\n hint?: string\n /**\n * A message saying what is wrong with the value, shown in place of the hint so that the field\n * does not grow. It marks the field invalid, is read along with it, and is announced when it\n * appears or changes.\n */\n error?: string\n /** Which side of the dot the label sits on. */\n labelPosition?: RadioLabelPosition\n /**\n * Pushes the label and the dot to opposite ends of the line, the row taking the\n * full width available.\n */\n spread?: boolean\n /**\n * Marks the field as invalid, which colours the dot and tells assistive technology\n * so. It is for a rule the browser cannot check by itself.\n */\n invalid?: boolean\n /** Makes this choice unusable, greyed out through the colour tokens. */\n disabled?: boolean\n /** Shows the selection without allowing it to be changed. */\n readonly?: boolean\n}\n\nconst props = withDefaults(defineProps<RadioProps>(), {\n label: undefined,\n hint: undefined,\n error: undefined,\n labelPosition: 'end',\n spread: false,\n invalid: false,\n disabled: false,\n readonly: false,\n})\n\n// @a11y\n// The browser's job, but it only groups inputs that share a `name`; so redirecting the\n// attributes is what makes the arrow keys work at all. The root being a layout box, `name` left\n// on it would reach nothing.\ndefineOptions({ inheritAttrs: false })\nconst {\n rootClass,\n rootStyle,\n forwardedAttrs,\n hintId,\n errorId,\n describedBy,\n inputEl,\n refuseWhenReadonly,\n exposed,\n} = useChoice(props)\n\n/**\n * The value selected in the group, shared by every radio carrying the same `name`. It is\n * empty until one is chosen, and a radio is selected when it matches its own `value`.\n */\nconst model = defineModel<ItemValue>({ default: '' })\n\ndefineSlots<{\n /** The label, when it needs more than the `label` prop's text. It is clickable. */\n default?(): unknown\n}>()\n\ndefineExpose(exposed)\n</script>\n\n<template>\n <span\n class=\"v-radio v-choice\"\n :class=\"rootClass\"\n :style=\"rootStyle\"\n :data-label-position=\"labelPosition\"\n :data-spread=\"spread ? '' : undefined\"\n :data-readonly=\"readonly ? '' : undefined\"\n >\n <label class=\"v-choice-row\">\n <input\n ref=\"inputEl\"\n v-model=\"model\"\n type=\"radio\"\n class=\"v-radio-input v-hidden-input\"\n :aria-invalid=\"invalid || !!error || undefined\"\n v-bind=\"forwardedAttrs\"\n :value=\"value\"\n :disabled=\"disabled\"\n :aria-describedby=\"describedBy\"\n @click=\"refuseWhenReadonly\"\n />\n <span class=\"v-radio-dot\" aria-hidden=\"true\" />\n <span v-if=\"$slots.default || label\" class=\"v-radio-label v-choice-label\">\n <slot>{{ label }}</slot>\n </span>\n </label>\n <VFieldMessage :hint=\"hint\" :error=\"error\" :hint-id=\"hintId\" :error-id=\"errorId\" />\n <VFieldAnnouncer :text=\"error\" />\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /* The dot works exactly like VCheckbox's box, the accent filling it once the input is\n checked, with the small inner disc drawn as a pseudo-element in currentcolor so it\n follows whatever colour the state gives the ring's content. */\n .v-radio-dot {\n display: inline-grid;\n place-items: center;\n width: var(--vectis-control-size-check);\n height: var(--vectis-control-size-check);\n background: transparent;\n border: var(--vectis-control-border-width) solid var(--vectis-color-border-strong);\n border-radius: var(--vectis-radius-pill);\n color: var(--vectis-color-text-on-accent);\n transition:\n background-color var(--vectis-duration-fast) var(--vectis-ease-default),\n border-color var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-radio-dot::before {\n content: '';\n width: var(--vectis-control-size-check-dot);\n height: var(--vectis-control-size-check-dot);\n border-radius: var(--vectis-radius-pill);\n background: currentcolor;\n opacity: 0;\n transition: opacity var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-radio-input:checked + .v-radio-dot::before {\n opacity: 1;\n }\n\n /*\n * The states below weigh (0,3,0), bar the read-only base at (0,2,0), so their ORDER\n * arbitrates them: checked, read-only, invalid, then disabled last. The two hovers sit at\n * (0,7,0) and therefore beat every one of them on specificity, order or no order; which is\n * why they have to EXCLUDE by hand each state they must not repaint.\n */\n .v-radio:not([data-readonly])\n .v-choice-row:hover\n .v-radio-input:not(:disabled, :checked, :user-invalid, [aria-invalid='true'])\n + .v-radio-dot {\n border-color: color-mix(\n in oklab,\n var(--vectis-color-border-strong),\n var(--vectis-color-text) 15%\n );\n }\n\n .v-radio-input:checked + .v-radio-dot {\n background: var(--vectis-color-accent);\n border-color: var(--vectis-color-accent);\n }\n\n .v-radio:not([data-readonly])\n .v-choice-row:hover\n .v-radio-input:not(:disabled, :user-invalid, [aria-invalid='true']):checked\n + .v-radio-dot {\n background: var(--vectis-color-accent-hover);\n border-color: var(--vectis-color-accent-hover);\n }\n\n /*\n * The inner disc takes the surface colour, which contrasts with that fill in both themes,\n * where white would vanish against the light grey of the dark theme. `:where()` keeps both\n * rules at the weight of the states they sit between.\n */\n :where(.v-radio[data-readonly]) .v-radio-input + .v-radio-dot {\n background: var(--vectis-color-surface-sunken);\n border-color: var(--vectis-color-border);\n }\n\n :where(.v-radio[data-readonly]) .v-radio-input:checked + .v-radio-dot {\n background: var(--vectis-color-text-muted);\n border-color: var(--vectis-color-text-muted);\n color: var(--vectis-color-surface);\n }\n\n .v-radio-input:user-invalid + .v-radio-dot,\n .v-radio-input[aria-invalid='true'] + .v-radio-dot {\n border-color: var(--vectis-color-danger);\n }\n\n .v-radio-input:disabled + .v-radio-dot {\n background: var(--vectis-color-surface-muted);\n border-color: var(--vectis-color-border);\n color: var(--vectis-color-text-subtle);\n }\n\n @media (forced-colors: active) {\n /*\n * The class is repeated to (0,8,0) so the row's own hover rules, which reach (0,7,0),\n * cannot repaint it: `forced-color-adjust: none` takes the forcing off this element, and a\n * hover left winning would then paint its real grey over the system colour.\n */\n .v-radio-input.v-radio-input.v-radio-input.v-radio-input.v-radio-input:checked:not(:disabled)\n + .v-radio-dot {\n forced-color-adjust: none;\n background: Highlight;\n border-color: Highlight;\n color: HighlightText;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-radio-dot,\n .v-radio-dot::before {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":""}
@@ -1,26 +1,28 @@
1
- import { useRootAttrs as e } from "../../composables/useRootAttrs.js";
2
- import { useFieldIds as t } from "../../composables/useFieldIds.js";
3
- import { createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, defineComponent as o, mergeModels as s, mergeProps as c, normalizeClass as l, normalizeStyle as u, openBlock as d, ref as f, renderSlot as p, toDisplayString as m, unref as h, useModel as g, vModelRadio as _, withDirectives as v } from "vue";
1
+ import e from "../VField/VFieldAnnouncer.js";
2
+ import t from "../VField/VFieldMessage.js";
3
+ import { useChoice as n } from "../../composables/useChoice.js";
4
+ import { createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, mergeModels as l, mergeProps as u, normalizeClass as d, normalizeStyle as f, openBlock as p, renderSlot as m, toDisplayString as h, unref as g, useModel as _, vModelRadio as v, withDirectives as y } from "vue";
4
5
  //#region src/components/VRadio/VRadio.vue?vue&type=script&setup=true&lang.ts
5
- var y = [
6
+ var b = [
6
7
  "data-label-position",
7
8
  "data-spread",
8
9
  "data-readonly"
9
- ], b = { class: "v-choice-row" }, x = [
10
+ ], x = { class: "v-choice-row" }, S = [
10
11
  "aria-invalid",
11
12
  "value",
12
13
  "disabled",
13
14
  "aria-describedby"
14
- ], S = {
15
+ ], C = {
15
16
  key: 0,
16
17
  class: "v-radio-label v-choice-label"
17
- }, C = ["id"], w = /*@__PURE__*/ o({
18
+ }, w = /*@__PURE__*/ c({
18
19
  inheritAttrs: !1,
19
20
  __name: "VRadio",
20
- props: /*@__PURE__*/ s({
21
+ props: /*@__PURE__*/ l({
21
22
  value: {},
22
23
  label: { default: void 0 },
23
24
  hint: { default: void 0 },
25
+ error: { default: void 0 },
24
26
  labelPosition: { default: "end" },
25
27
  spread: {
26
28
  type: Boolean,
@@ -43,44 +45,48 @@ var y = [
43
45
  modelModifiers: {}
44
46
  }),
45
47
  emits: ["update:modelValue"],
46
- setup(o, { expose: s }) {
47
- let w = o, { attrs: T, rootClass: E, rootStyle: D, forwardedAttrs: O } = e(), { hintId: k, describedBy: A } = t(T, () => !!w.hint), j = g(o, "modelValue"), M = f(null);
48
- function N(e) {
49
- w.readonly && e.preventDefault();
50
- }
51
- return s({
52
- focus: (e) => M.value?.focus(e),
53
- el: M
54
- }), (e, t) => (d(), r("span", {
55
- class: l(["v-radio v-choice", h(E)]),
56
- style: u(h(D)),
57
- "data-label-position": o.labelPosition,
58
- "data-spread": o.spread ? "" : void 0,
59
- "data-readonly": o.readonly ? "" : void 0
60
- }, [i("label", b, [
61
- v(i("input", c({
62
- ref_key: "inputEl",
63
- ref: M,
64
- "onUpdate:modelValue": t[0] ||= (e) => j.value = e,
65
- type: "radio",
66
- class: "v-radio-input v-hidden-input",
67
- "aria-invalid": o.invalid || void 0
68
- }, h(O), {
69
- value: o.value,
70
- disabled: o.disabled,
71
- "aria-describedby": h(A),
72
- onClick: N
73
- }), null, 16, x), [[_, j.value]]),
74
- t[1] ||= i("span", {
75
- class: "v-radio-dot",
76
- "aria-hidden": "true"
77
- }, null, -1),
78
- e.$slots.default || o.label ? (d(), r("span", S, [p(e.$slots, "default", {}, () => [a(m(o.label), 1)])])) : n("", !0)
79
- ]), o.hint ? (d(), r("span", {
80
- key: 0,
81
- id: h(k),
82
- class: "v-radio-hint v-choice-hint"
83
- }, m(o.hint), 9, C)) : n("", !0)], 14, y));
48
+ setup(c, { expose: l }) {
49
+ let { rootClass: w, rootStyle: T, forwardedAttrs: E, hintId: D, errorId: O, describedBy: k, inputEl: A, refuseWhenReadonly: j, exposed: M } = n(c), N = _(c, "modelValue");
50
+ return l(M), (n, l) => (p(), i("span", {
51
+ class: d(["v-radio v-choice", g(w)]),
52
+ style: f(g(T)),
53
+ "data-label-position": c.labelPosition,
54
+ "data-spread": c.spread ? "" : void 0,
55
+ "data-readonly": c.readonly ? "" : void 0
56
+ }, [
57
+ a("label", x, [
58
+ y(a("input", u({
59
+ ref_key: "inputEl",
60
+ ref: A,
61
+ "onUpdate:modelValue": l[0] ||= (e) => N.value = e,
62
+ type: "radio",
63
+ class: "v-radio-input v-hidden-input",
64
+ "aria-invalid": c.invalid || !!c.error || void 0
65
+ }, g(E), {
66
+ value: c.value,
67
+ disabled: c.disabled,
68
+ "aria-describedby": g(k),
69
+ onClick: l[1] ||= (...e) => g(j) && g(j)(...e)
70
+ }), null, 16, S), [[v, N.value]]),
71
+ l[2] ||= a("span", {
72
+ class: "v-radio-dot",
73
+ "aria-hidden": "true"
74
+ }, null, -1),
75
+ n.$slots.default || c.label ? (p(), i("span", C, [m(n.$slots, "default", {}, () => [o(h(c.label), 1)])])) : r("", !0)
76
+ ]),
77
+ s(t, {
78
+ hint: c.hint,
79
+ error: c.error,
80
+ "hint-id": g(D),
81
+ "error-id": g(O)
82
+ }, null, 8, [
83
+ "hint",
84
+ "error",
85
+ "hint-id",
86
+ "error-id"
87
+ ]),
88
+ s(e, { text: c.error }, null, 8, ["text"])
89
+ ], 14, b));
84
90
  }
85
91
  });
86
92
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"VRadio.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/VRadio/VRadio.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Retain the native radio for keyboard selection and forms. Its hint stays outside the label so\n * it does not become part of the accessible name.\n */\n\nimport { ref } from 'vue'\n\nimport { useFieldIds } from '../../composables/useFieldIds'\nimport { useRootAttrs } from '../../composables/useRootAttrs'\nimport type { ItemValue } from '../../types'\n\n/** Which side of the dot the label sits on. */\nexport type RadioLabelPosition = 'start' | 'end'\n\ninterface RadioProps {\n /**\n * What choosing this button means. The group's v-model holds the value of the\n * selected button, so this is what it becomes when this one is picked.\n */\n value: ItemValue\n /** The text beside the dot, which names it. The default slot replaces it. */\n label?: string\n /**\n * A line of help under the label. It is tied to the radio button for assistive\n * technology, so it is read out after the label rather than as part of it.\n */\n hint?: string\n /** Which side of the dot the label sits on. */\n labelPosition?: RadioLabelPosition\n /**\n * Pushes the label and the dot to opposite ends of the line, the row taking the\n * full width available.\n */\n spread?: boolean\n /**\n * Marks the field as invalid, which colours the dot and tells assistive technology\n * so. It is for a rule the browser cannot check by itself.\n */\n invalid?: boolean\n /** Makes this choice unusable, greyed out through the colour tokens. */\n disabled?: boolean\n /** Shows the selection without allowing it to be changed. */\n readonly?: boolean\n}\n\nconst props = withDefaults(defineProps<RadioProps>(), {\n label: undefined,\n hint: undefined,\n labelPosition: 'end',\n spread: false,\n invalid: false,\n disabled: false,\n readonly: false,\n})\n\n// @a11y\n// The browser's job, but it only groups inputs that share a `name`; so redirecting the\n// attributes is what makes the arrow keys work at all. The root being a layout box, `name` left\n// on it would reach nothing.\ndefineOptions({ inheritAttrs: false })\nconst { attrs, rootClass, rootStyle, forwardedAttrs } = useRootAttrs()\nconst { hintId, describedBy } = useFieldIds(attrs, () => !!props.hint)\n\n/**\n * The value selected in the group, shared by every radio carrying the same `name`. It is\n * empty until one is chosen, and a radio is selected when it matches its own `value`.\n */\nconst model = defineModel<ItemValue>({ default: '' })\n\ndefineSlots<{\n /** The label, when it needs more than the `label` prop's text. It is clickable. */\n default?(): unknown\n}>()\n\nconst inputEl = ref<HTMLInputElement | null>(null)\n\n// @core\n// The native `readonly` attribute does nothing on a radio button. Cancelling the click is what\n// refuses the selection: the browser puts the group's previous selection back and fires no\n// `change`.\nfunction refuseWhenReadonly(event: MouseEvent) {\n if (props.readonly) event.preventDefault()\n}\n\n// The root is a wrapper, so a template ref on the component reaches the layout box and not\n// the control: these two are the way to the real radio button.\ndefineExpose({\n /** Moves the focus to the real radio button. */\n focus: (options?: FocusOptions) => inputEl.value?.focus(options),\n /** The real `<input type=\"radio\">`, for what `focus` does not cover. */\n el: inputEl,\n})\n</script>\n\n<template>\n <span\n class=\"v-radio v-choice\"\n :class=\"rootClass\"\n :style=\"rootStyle\"\n :data-label-position=\"labelPosition\"\n :data-spread=\"spread ? '' : undefined\"\n :data-readonly=\"readonly ? '' : undefined\"\n >\n <label class=\"v-choice-row\">\n <input\n ref=\"inputEl\"\n v-model=\"model\"\n type=\"radio\"\n class=\"v-radio-input v-hidden-input\"\n :aria-invalid=\"invalid || undefined\"\n v-bind=\"forwardedAttrs\"\n :value=\"value\"\n :disabled=\"disabled\"\n :aria-describedby=\"describedBy\"\n @click=\"refuseWhenReadonly\"\n />\n <span class=\"v-radio-dot\" aria-hidden=\"true\" />\n <span v-if=\"$slots.default || label\" class=\"v-radio-label v-choice-label\">\n <slot>{{ label }}</slot>\n </span>\n </label>\n <span v-if=\"hint\" :id=\"hintId\" class=\"v-radio-hint v-choice-hint\">{{ hint }}</span>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /* The dot works exactly like VCheckbox's box, the accent filling it once the input is\n checked, with the small inner disc drawn as a pseudo-element in currentcolor so it\n follows whatever colour the state gives the ring's content. */\n .v-radio-dot {\n display: inline-grid;\n place-items: center;\n width: var(--vectis-control-size-check);\n height: var(--vectis-control-size-check);\n background: transparent;\n border: var(--vectis-control-border-width) solid var(--vectis-color-border-strong);\n border-radius: var(--vectis-radius-pill);\n color: var(--vectis-color-text-on-accent);\n transition:\n background-color var(--vectis-duration-fast) var(--vectis-ease-default),\n border-color var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-radio-dot::before {\n content: '';\n width: var(--vectis-control-size-check-dot);\n height: var(--vectis-control-size-check-dot);\n border-radius: var(--vectis-radius-pill);\n background: currentcolor;\n opacity: 0;\n transition: opacity var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-radio-input:checked + .v-radio-dot::before {\n opacity: 1;\n }\n\n /*\n * The states below weigh (0,3,0), bar the read-only base at (0,2,0), so their ORDER\n * arbitrates them: checked, read-only, invalid, then disabled last. The two hovers sit at\n * (0,7,0) and therefore beat every one of them on specificity, order or no order; which is\n * why they have to EXCLUDE by hand each state they must not repaint.\n */\n .v-radio:not([data-readonly])\n .v-choice-row:hover\n .v-radio-input:not(:disabled, :checked, :user-invalid, [aria-invalid='true'])\n + .v-radio-dot {\n border-color: color-mix(\n in oklab,\n var(--vectis-color-border-strong),\n var(--vectis-color-text) 15%\n );\n }\n\n .v-radio-input:checked + .v-radio-dot {\n background: var(--vectis-color-accent);\n border-color: var(--vectis-color-accent);\n }\n\n .v-radio:not([data-readonly])\n .v-choice-row:hover\n .v-radio-input:not(:disabled, :user-invalid, [aria-invalid='true']):checked\n + .v-radio-dot {\n background: var(--vectis-color-accent-hover);\n border-color: var(--vectis-color-accent-hover);\n }\n\n /*\n * The inner disc takes the surface colour, which contrasts with that fill in both themes,\n * where white would vanish against the light grey of the dark theme. `:where()` keeps both\n * rules at the weight of the states they sit between.\n */\n :where(.v-radio[data-readonly]) .v-radio-input + .v-radio-dot {\n background: var(--vectis-color-surface-sunken);\n border-color: var(--vectis-color-border);\n }\n\n :where(.v-radio[data-readonly]) .v-radio-input:checked + .v-radio-dot {\n background: var(--vectis-color-text-muted);\n border-color: var(--vectis-color-text-muted);\n color: var(--vectis-color-surface);\n }\n\n .v-radio-input:user-invalid + .v-radio-dot,\n .v-radio-input[aria-invalid='true'] + .v-radio-dot {\n border-color: var(--vectis-color-danger);\n }\n\n .v-radio-input:disabled + .v-radio-dot {\n background: var(--vectis-color-surface-muted);\n border-color: var(--vectis-color-border);\n color: var(--vectis-color-text-subtle);\n }\n\n @media (forced-colors: active) {\n /*\n * The class is repeated to (0,8,0) so the row's own hover rules, which reach (0,7,0),\n * cannot repaint it: `forced-color-adjust: none` takes the forcing off this element, and a\n * hover left winning would then paint its real grey over the system colour.\n */\n .v-radio-input.v-radio-input.v-radio-input.v-radio-input.v-radio-input:checked:not(:disabled)\n + .v-radio-dot {\n forced-color-adjust: none;\n background: Highlight;\n border-color: Highlight;\n color: HighlightText;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-radio-dot,\n .v-radio-dot::before {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8CA,IAAM,IAAQ,GAeR,EAAE,UAAO,cAAW,cAAW,sBAAmB,EAAa,GAC/D,EAAE,WAAQ,mBAAgB,EAAY,SAAa,CAAC,CAAC,EAAM,IAAI,GAM/D,IAAQ,EAAsB,GAAA,YAAgB,GAO9C,IAAU,EAA6B,IAAI;EAMjD,SAAS,EAAmB,GAAmB;GAC7C,AAAI,EAAM,YAAU,EAAM,eAAe;EAC3C;SAIA,EAAa;GAEX,QAAQ,MAA2B,EAAQ,OAAO,MAAM,CAAO;GAE/D,IAAI;EACN,CAAC,mBAIC,EA2BO,QAAA;GA1BL,OAAK,EAAA,CAAC,oBACE,EAAA,CAAA,CAAS,CAAA;GAChB,OAAK,EAAE,EAAA,CAAA,CAAS;GAChB,uBAAqB,EAAA;GACrB,eAAa,EAAA,SAAM,KAAQ,KAAA;GAC3B,iBAAe,EAAA,WAAQ,KAAQ,KAAA;MAEhC,EAiBQ,SAjBR,GAiBQ;KAhBN,EAWE,SAXF,EAWE;aAVI;IAAJ,KAAI;6CACU,QAAA;IACd,MAAK;IACL,OAAM;IACL,gBAAc,EAAA,WAAW,KAAA;MAClB,EAAA,CAAA,GAAc;IACrB,OAAO,EAAA;IACP,UAAU,EAAA;IACV,oBAAkB,EAAA,CAAA;IAClB,SAAO;0BARC,EAAA,KAAK,CAAA,CAAA;YAUhB,EAA+C,QAAA;IAAzC,OAAM;IAAc,eAAY;;GAC1BA,EAAAA,OAAO,WAAW,EAAA,SAAA,EAAA,GAA9B,EAEO,QAFP,GAEO,CADL,EAAwB,EAAA,QAAA,WAAA,CAAA,SAAA,CAAA,EAAA,EAAf,EAAA,KAAK,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA;MAGN,EAAA,QAAA,EAAA,GAAZ,EAAmF,QAAA;;GAAhE,IAAI,EAAA,CAAA;GAAQ,OAAM;OAAgC,EAAA,IAAI,GAAA,GAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,GAAA,IAAA,CAAA"}
1
+ {"version":3,"file":"VRadio.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/VRadio/VRadio.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Retain the native radio for keyboard selection and forms. Its hint stays outside the label so\n * it does not become part of the accessible name.\n */\n\nimport VFieldAnnouncer from '../VField/VFieldAnnouncer.vue'\nimport VFieldMessage from '../VField/VFieldMessage.vue'\n\nimport { useChoice } from '../../composables/useChoice'\nimport type { ItemValue } from '../../types'\n\n/** Which side of the dot the label sits on. */\nexport type RadioLabelPosition = 'start' | 'end'\n\ninterface RadioProps {\n /**\n * What choosing this button means. The group's v-model holds the value of the\n * selected button, so this is what it becomes when this one is picked.\n */\n value: ItemValue\n /** The text beside the dot, which names it. The default slot replaces it. */\n label?: string\n /**\n * A line of help under the label. It is tied to the radio button for assistive\n * technology, so it is read out after the label rather than as part of it.\n */\n hint?: string\n /**\n * A message saying what is wrong with the value, shown in place of the hint so that the field\n * does not grow. It marks the field invalid, is read along with it, and is announced when it\n * appears or changes.\n */\n error?: string\n /** Which side of the dot the label sits on. */\n labelPosition?: RadioLabelPosition\n /**\n * Pushes the label and the dot to opposite ends of the line, the row taking the\n * full width available.\n */\n spread?: boolean\n /**\n * Marks the field as invalid, which colours the dot and tells assistive technology\n * so. It is for a rule the browser cannot check by itself.\n */\n invalid?: boolean\n /** Makes this choice unusable, greyed out through the colour tokens. */\n disabled?: boolean\n /** Shows the selection without allowing it to be changed. */\n readonly?: boolean\n}\n\nconst props = withDefaults(defineProps<RadioProps>(), {\n label: undefined,\n hint: undefined,\n error: undefined,\n labelPosition: 'end',\n spread: false,\n invalid: false,\n disabled: false,\n readonly: false,\n})\n\n// @a11y\n// The browser's job, but it only groups inputs that share a `name`; so redirecting the\n// attributes is what makes the arrow keys work at all. The root being a layout box, `name` left\n// on it would reach nothing.\ndefineOptions({ inheritAttrs: false })\nconst {\n rootClass,\n rootStyle,\n forwardedAttrs,\n hintId,\n errorId,\n describedBy,\n inputEl,\n refuseWhenReadonly,\n exposed,\n} = useChoice(props)\n\n/**\n * The value selected in the group, shared by every radio carrying the same `name`. It is\n * empty until one is chosen, and a radio is selected when it matches its own `value`.\n */\nconst model = defineModel<ItemValue>({ default: '' })\n\ndefineSlots<{\n /** The label, when it needs more than the `label` prop's text. It is clickable. */\n default?(): unknown\n}>()\n\ndefineExpose(exposed)\n</script>\n\n<template>\n <span\n class=\"v-radio v-choice\"\n :class=\"rootClass\"\n :style=\"rootStyle\"\n :data-label-position=\"labelPosition\"\n :data-spread=\"spread ? '' : undefined\"\n :data-readonly=\"readonly ? '' : undefined\"\n >\n <label class=\"v-choice-row\">\n <input\n ref=\"inputEl\"\n v-model=\"model\"\n type=\"radio\"\n class=\"v-radio-input v-hidden-input\"\n :aria-invalid=\"invalid || !!error || undefined\"\n v-bind=\"forwardedAttrs\"\n :value=\"value\"\n :disabled=\"disabled\"\n :aria-describedby=\"describedBy\"\n @click=\"refuseWhenReadonly\"\n />\n <span class=\"v-radio-dot\" aria-hidden=\"true\" />\n <span v-if=\"$slots.default || label\" class=\"v-radio-label v-choice-label\">\n <slot>{{ label }}</slot>\n </span>\n </label>\n <VFieldMessage :hint=\"hint\" :error=\"error\" :hint-id=\"hintId\" :error-id=\"errorId\" />\n <VFieldAnnouncer :text=\"error\" />\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /* The dot works exactly like VCheckbox's box, the accent filling it once the input is\n checked, with the small inner disc drawn as a pseudo-element in currentcolor so it\n follows whatever colour the state gives the ring's content. */\n .v-radio-dot {\n display: inline-grid;\n place-items: center;\n width: var(--vectis-control-size-check);\n height: var(--vectis-control-size-check);\n background: transparent;\n border: var(--vectis-control-border-width) solid var(--vectis-color-border-strong);\n border-radius: var(--vectis-radius-pill);\n color: var(--vectis-color-text-on-accent);\n transition:\n background-color var(--vectis-duration-fast) var(--vectis-ease-default),\n border-color var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-radio-dot::before {\n content: '';\n width: var(--vectis-control-size-check-dot);\n height: var(--vectis-control-size-check-dot);\n border-radius: var(--vectis-radius-pill);\n background: currentcolor;\n opacity: 0;\n transition: opacity var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-radio-input:checked + .v-radio-dot::before {\n opacity: 1;\n }\n\n /*\n * The states below weigh (0,3,0), bar the read-only base at (0,2,0), so their ORDER\n * arbitrates them: checked, read-only, invalid, then disabled last. The two hovers sit at\n * (0,7,0) and therefore beat every one of them on specificity, order or no order; which is\n * why they have to EXCLUDE by hand each state they must not repaint.\n */\n .v-radio:not([data-readonly])\n .v-choice-row:hover\n .v-radio-input:not(:disabled, :checked, :user-invalid, [aria-invalid='true'])\n + .v-radio-dot {\n border-color: color-mix(\n in oklab,\n var(--vectis-color-border-strong),\n var(--vectis-color-text) 15%\n );\n }\n\n .v-radio-input:checked + .v-radio-dot {\n background: var(--vectis-color-accent);\n border-color: var(--vectis-color-accent);\n }\n\n .v-radio:not([data-readonly])\n .v-choice-row:hover\n .v-radio-input:not(:disabled, :user-invalid, [aria-invalid='true']):checked\n + .v-radio-dot {\n background: var(--vectis-color-accent-hover);\n border-color: var(--vectis-color-accent-hover);\n }\n\n /*\n * The inner disc takes the surface colour, which contrasts with that fill in both themes,\n * where white would vanish against the light grey of the dark theme. `:where()` keeps both\n * rules at the weight of the states they sit between.\n */\n :where(.v-radio[data-readonly]) .v-radio-input + .v-radio-dot {\n background: var(--vectis-color-surface-sunken);\n border-color: var(--vectis-color-border);\n }\n\n :where(.v-radio[data-readonly]) .v-radio-input:checked + .v-radio-dot {\n background: var(--vectis-color-text-muted);\n border-color: var(--vectis-color-text-muted);\n color: var(--vectis-color-surface);\n }\n\n .v-radio-input:user-invalid + .v-radio-dot,\n .v-radio-input[aria-invalid='true'] + .v-radio-dot {\n border-color: var(--vectis-color-danger);\n }\n\n .v-radio-input:disabled + .v-radio-dot {\n background: var(--vectis-color-surface-muted);\n border-color: var(--vectis-color-border);\n color: var(--vectis-color-text-subtle);\n }\n\n @media (forced-colors: active) {\n /*\n * The class is repeated to (0,8,0) so the row's own hover rules, which reach (0,7,0),\n * cannot repaint it: `forced-color-adjust: none` takes the forcing off this element, and a\n * hover left winning would then paint its real grey over the system colour.\n */\n .v-radio-input.v-radio-input.v-radio-input.v-radio-input.v-radio-input:checked:not(:disabled)\n + .v-radio-dot {\n forced-color-adjust: none;\n background: Highlight;\n border-color: Highlight;\n color: HighlightText;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-radio-dot,\n .v-radio-dot::before {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoEA,IAAM,EACJ,cACA,cACA,mBACA,WACA,YACA,gBACA,YACA,uBACA,eACE,EAAU,CAAK,GAMb,IAAQ,EAAsB,GAAA,YAAgB;SAOpD,EAAa,CAAO,mBAIlB,EA4BO,QAAA;GA3BL,OAAK,EAAA,CAAC,oBACE,EAAA,CAAA,CAAS,CAAA;GAChB,OAAK,EAAE,EAAA,CAAA,CAAS;GAChB,uBAAqB,EAAA;GACrB,eAAa,EAAA,SAAM,KAAQ,KAAA;GAC3B,iBAAe,EAAA,WAAQ,KAAQ,KAAA;;GAEhC,EAiBQ,SAjBR,GAiBQ;MAhBN,EAWE,SAXF,EAWE;cAVI;KAAJ,KAAI;8CACU,QAAA;KACd,MAAK;KACL,OAAM;KACL,gBAAc,EAAA,WAAO,CAAA,CAAM,EAAA,SAAS,KAAA;OAC7B,EAAA,CAAA,GAAc;KACrB,OAAO,EAAA;KACP,UAAU,EAAA;KACV,oBAAkB,EAAA,CAAA;KAClB,SAAK,AAAA,EAAA,QAAA,GAAA,MAAE,EAAA,CAAA,KAAA,EAAA,CAAA,CAAA,CAAA,GAAA,CAAA;2BARC,EAAA,KAAK,CAAA,CAAA;aAUhB,EAA+C,QAAA;KAAzC,OAAM;KAAc,eAAY;;IAC1BA,EAAAA,OAAO,WAAW,EAAA,SAAA,EAAA,GAA9B,EAEO,QAFP,GAEO,CADL,EAAwB,EAAA,QAAA,WAAA,CAAA,SAAA,CAAA,EAAA,EAAf,EAAA,KAAK,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA;;GAGlB,EAAmF,GAAA;IAAnE,MAAM,EAAA;IAAO,OAAO,EAAA;IAAQ,WAAS,EAAA,CAAA;IAAS,YAAU,EAAA,CAAA;;;;;;;GACxE,EAAiC,GAAA,EAAf,MAAM,EAAA,MAAK,GAAA,MAAA,GAAA,CAAA,MAAA,CAAA"}
@@ -0,0 +1,2 @@
1
+ @layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
2
+ @layer vectis.components{.v-rating[data-size=sm]{--vectis-icon-size:var(--vectis-control-size-rating-sm)}.v-rating[data-size=md]{--vectis-icon-size:var(--vectis-control-size-rating-md)}.v-rating[data-size=lg]{--vectis-icon-size:var(--vectis-control-size-rating-lg)}.v-rating-items{border-radius:var(--vectis-radius-interactive);display:inline-flex;position:relative}.v-rating-item{--rating-shown:var(--rating-value);padding:calc(var(--vectis-space-1) / 2);display:inline-flex;position:relative}label.v-rating-item{cursor:pointer}:where(.v-rating:not(:disabled) .v-rating-items:has(label.v-rating-item:hover))>.v-rating-item{--rating-shown:0}:where(.v-rating:not(:disabled)) label.v-rating-item:is(:hover,:has(~.v-rating-item:hover)){--rating-shown:1}.v-rating-icon{border-radius:var(--vectis-radius-xs);display:inline-grid}.v-rating-icon>.v-icon{grid-area:1/1}.v-rating-empty{color:var(--vectis-color-border-strong)}.v-rating-filled{color:var(--tone-bg-solid);clip-path:inset(0 calc((1 - var(--rating-shown)) * 100%) 0 0)}.v-rating-filled:dir(rtl){clip-path:inset(0 0 0 calc((1 - var(--rating-shown)) * 100%))}.v-rating-item .v-hidden-input:focus-visible+.v-rating-icon,.v-rating-items:has(.v-rating-clear .v-hidden-input:focus-visible){outline:var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);outline-offset:var(--vectis-focus-ring-offset)}.v-rating[data-invalid] .v-rating-empty{color:var(--vectis-color-danger)}.v-rating:disabled .v-rating-empty{color:var(--vectis-color-border)}.v-rating:disabled .v-rating-filled{color:var(--vectis-color-text-subtle)}.v-rating:disabled label.v-rating-item{cursor:not-allowed}@media (forced-colors:active){.v-rating-filled{color:highlight}.v-rating:disabled .v-rating-filled{color:graytext}}}
@@ -0,0 +1,92 @@
1
+ import { IconSource } from '../VIcon/types.js';
2
+ /** The size of the icons: 20, 24 or 32 pixels. */
3
+ export type RatingSize = 'sm' | 'md' | 'lg';
4
+ /** The colour of the filled icons. */
5
+ export type RatingTone = 'accent' | 'warning' | 'danger' | 'success' | 'neutral';
6
+ interface RatingProps {
7
+ /** How many icons, and the highest value. */
8
+ max?: number;
9
+ /**
10
+ * The name of the group, shown as its legend. Without it, the group is named from the design
11
+ * system dictionary.
12
+ */
13
+ label?: string;
14
+ /** Hides the label visually. It still names the group for assistive technology. */
15
+ hideLabel?: boolean;
16
+ /** A line of help under the icons, read along with the group's name. */
17
+ hint?: string;
18
+ /**
19
+ * A message saying what is wrong, shown in place of the hint and read along with the group's
20
+ * name. It is announced when it appears or changes.
21
+ */
22
+ error?: string;
23
+ /**
24
+ * Marks the rating as invalid, which colours the icons and tells assistive technology so. It
25
+ * is for a rule the browser cannot check by itself.
26
+ */
27
+ invalid?: boolean;
28
+ /** Requires a rating before the form is sent. An asterisk follows the label. */
29
+ required?: boolean;
30
+ /** The name the value is sent under in a form. */
31
+ name?: string;
32
+ /**
33
+ * Lets the rating go back to none: clicking the current value again clears it, and a "No
34
+ * rating" choice comes first for the keyboard.
35
+ */
36
+ clearable?: boolean;
37
+ /**
38
+ * Shows the value without letting it change. The icons become a single image, and a fractional
39
+ * value fills part of an icon.
40
+ */
41
+ readonly?: boolean;
42
+ /** Makes the rating unusable. */
43
+ disabled?: boolean;
44
+ /** The size of the icons. */
45
+ size?: RatingSize;
46
+ /** The colour of the filled icons. */
47
+ tone?: RatingTone;
48
+ /**
49
+ * A colour of your own for the filled icons (hex, CSS name or `oklch()`), which replaces the
50
+ * tone. Its contrast with the background is yours to check.
51
+ */
52
+ color?: string;
53
+ /**
54
+ * The icon: an icon name, or an explicit render. An empty one is drawn in outline and a filled
55
+ * one with the icon's filled form.
56
+ */
57
+ icon?: IconSource;
58
+ }
59
+ type __VLS_Props = RatingProps;
60
+ type __VLS_ModelProps = {
61
+ /** The rating, from 1 to `max`, or `null` when there is none. Read-only, it may be fractional. */
62
+ modelValue?: number | null;
63
+ };
64
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
65
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {
66
+ /** Moves the focus to the checked radio, or to the first icon when there is no rating. */
67
+ focus: (options?: FocusOptions) => void | undefined;
68
+ /** The `<fieldset>`, which also receives the consumer's attributes. */
69
+ el: import('vue').ComputedRef<HTMLFieldSetElement | null>;
70
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
71
+ "update:modelValue": (value: number | null) => any;
72
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
73
+ "onUpdate:modelValue"?: ((value: number | null) => any) | undefined;
74
+ }>, {
75
+ label: string;
76
+ error: string;
77
+ name: string;
78
+ size: RatingSize;
79
+ tone: RatingTone;
80
+ color: string;
81
+ disabled: boolean;
82
+ required: boolean;
83
+ icon: IconSource;
84
+ invalid: boolean;
85
+ hint: string;
86
+ hideLabel: boolean;
87
+ readonly: boolean;
88
+ clearable: boolean;
89
+ max: number;
90
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
91
+ declare const _default: typeof __VLS_export;
92
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import './VRating.css';
2
+ import e from "./VRating.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/VRating/VRating.vue
5
+ var t = e;
6
+ //#endregion
7
+ export { t as default };
8
+
9
+ //# sourceMappingURL=VRating.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VRating.js","names":[],"sources":["../../../src/components/VRating/VRating.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @a11y @core\n/**\n * A rating chosen among native radios, one per icon, grouped in a `<fieldset>`: the browser\n * provides the arrow keys, form submission and `required`. Read-only, the icons become one image\n * whose name says the value, which may then be fractional.\n */\nimport { computed, ref, useAttrs, useId } from 'vue'\n\nimport VFieldset from '../VFieldset/VFieldset.vue'\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { star as starIcon } from '../VIcon/icons/star'\nimport type { IconSource } from '../VIcon/types'\nimport { useLocale, useMessages } from '../../i18n/state'\nimport { customColorStyle } from '../../utils/css'\nimport { clamp } from '../../utils/number'\n\n/** The size of the icons: 20, 24 or 32 pixels. */\nexport type RatingSize = 'sm' | 'md' | 'lg'\n\n/** The colour of the filled icons. */\nexport type RatingTone = 'accent' | 'warning' | 'danger' | 'success' | 'neutral'\n\ninterface RatingProps {\n /** How many icons, and the highest value. */\n max?: number\n /**\n * The name of the group, shown as its legend. Without it, the group is named from the design\n * system dictionary.\n */\n label?: string\n /** Hides the label visually. It still names the group for assistive technology. */\n hideLabel?: boolean\n /** A line of help under the icons, read along with the group's name. */\n hint?: string\n /**\n * A message saying what is wrong, shown in place of the hint and read along with the group's\n * name. It is announced when it appears or changes.\n */\n error?: string\n /**\n * Marks the rating as invalid, which colours the icons and tells assistive technology so. It\n * is for a rule the browser cannot check by itself.\n */\n invalid?: boolean\n /** Requires a rating before the form is sent. An asterisk follows the label. */\n required?: boolean\n /** The name the value is sent under in a form. */\n name?: string\n /**\n * Lets the rating go back to none: clicking the current value again clears it, and a \"No\n * rating\" choice comes first for the keyboard.\n */\n clearable?: boolean\n /**\n * Shows the value without letting it change. The icons become a single image, and a fractional\n * value fills part of an icon.\n */\n readonly?: boolean\n /** Makes the rating unusable. */\n disabled?: boolean\n /** The size of the icons. */\n size?: RatingSize\n /** The colour of the filled icons. */\n tone?: RatingTone\n /**\n * A colour of your own for the filled icons (hex, CSS name or `oklch()`), which replaces the\n * tone. Its contrast with the background is yours to check.\n */\n color?: string\n /**\n * The icon: an icon name, or an explicit render. An empty one is drawn in outline and a filled\n * one with the icon's filled form.\n */\n icon?: IconSource\n}\n\n// The consumer's `aria-describedby` is merged with the hint and error references, and the\n// merged list is bound after the other attributes, which fallthrough would overwrite.\ndefineOptions({ inheritAttrs: false })\n\nconst props = withDefaults(defineProps<RatingProps>(), {\n max: 5,\n label: undefined,\n hideLabel: false,\n hint: undefined,\n error: undefined,\n invalid: false,\n required: false,\n name: undefined,\n clearable: false,\n readonly: false,\n disabled: false,\n size: 'md',\n tone: 'accent',\n color: undefined,\n icon: () => starIcon,\n})\n\n/** The rating, from 1 to `max`, or `null` when there is none. Read-only, it may be fractional. */\nconst model = defineModel<number | null>({ default: null })\n\nconst attrs = useAttrs()\nconst m = useMessages()\nconst locale = useLocale()\n\nconst isInvalid = computed(() => props.invalid || !!props.error)\n\n// Radios group by name, so the group needs one even when the form does not.\nconst uid = useId()\nconst groupName = computed(() => props.name ?? uid)\n\nconst values = computed(() => Array.from({ length: props.max }, (_, index) => index + 1))\n\nconst numberFormat = computed(\n () => new Intl.NumberFormat(locale.value, { maximumFractionDigits: 1 }),\n)\n\nconst valueText = computed(() =>\n m.value.rating.value(\n numberFormat.value.format(clamp(model.value ?? 0, 0, props.max)),\n numberFormat.value.format(props.max),\n ),\n)\n\n/** How much of the icon for `value` is filled, from 0 to 1. */\nfunction fill(value: number): number {\n return clamp((model.value ?? 0) - (value - 1), 0, 1)\n}\n\n// @core\n// A click on the checked radio fires no change; it clears instead. Only a pointer click does:\n// the keyboard reaches \"No rating\" with the arrows, and Space must not undo a choice.\nfunction onClick(value: number, event: MouseEvent) {\n if (props.clearable && model.value === value && event.detail > 0) model.value = null\n}\n\nconst fieldset = ref<InstanceType<typeof VFieldset> | null>(null)\nconst rootEl = computed(() => fieldset.value?.el ?? null)\n\ndefineExpose({\n /** Moves the focus to the checked radio, or to the first icon when there is no rating. */\n focus: (options?: FocusOptions) =>\n (\n rootEl.value?.querySelector<HTMLInputElement>('.v-rating-item input:checked') ??\n rootEl.value?.querySelector<HTMLInputElement>('.v-rating-item input')\n )?.focus(options),\n /** The `<fieldset>`, which also receives the consumer's attributes. */\n el: rootEl,\n})\n</script>\n\n<template>\n <VFieldset\n ref=\"fieldset\"\n class=\"v-rating v-tone\"\n :data-tone=\"tone\"\n :data-custom=\"color !== undefined ? '' : undefined\"\n :style=\"customColorStyle(color)\"\n :data-size=\"size\"\n :data-readonly=\"readonly ? '' : undefined\"\n :data-invalid=\"isInvalid ? '' : undefined\"\n :disabled=\"disabled\"\n :aria-label=\"label ? undefined : m.rating.label\"\n v-bind=\"attrs\"\n :legend=\"label\"\n :hint=\"hint\"\n :error=\"error\"\n :required=\"required\"\n :hide-legend=\"hideLabel\"\n >\n <span v-if=\"readonly\" class=\"v-rating-items\" role=\"img\" :aria-label=\"valueText\">\n <span\n v-for=\"value in values\"\n :key=\"value\"\n class=\"v-rating-item\"\n :style=\"{ '--rating-value': fill(value) }\"\n >\n <span class=\"v-rating-icon\">\n <VIcon class=\"v-rating-empty\" v-bind=\"iconProps(icon)\" />\n <VIcon class=\"v-rating-filled\" v-bind=\"iconProps(icon)\" filled />\n </span>\n </span>\n </span>\n\n <span v-else class=\"v-rating-items\">\n <label v-if=\"clearable\" class=\"v-rating-clear\">\n <input\n type=\"radio\"\n class=\"v-hidden-input\"\n :name=\"groupName\"\n value=\"\"\n :checked=\"model === null\"\n @change=\"model = null\"\n />\n <span class=\"v-visually-hidden\">{{ m.rating.empty }}</span>\n </label>\n <label\n v-for=\"value in values\"\n :key=\"value\"\n class=\"v-rating-item\"\n :style=\"{ '--rating-value': fill(value) }\"\n >\n <input\n type=\"radio\"\n class=\"v-hidden-input\"\n :name=\"groupName\"\n :value=\"value\"\n :checked=\"model === value\"\n :required=\"required\"\n :aria-invalid=\"isInvalid ? 'true' : undefined\"\n @change=\"model = value\"\n @click=\"onClick(value, $event)\"\n />\n <span class=\"v-rating-icon\">\n <VIcon class=\"v-rating-empty\" v-bind=\"iconProps(icon)\" />\n <VIcon class=\"v-rating-filled\" v-bind=\"iconProps(icon)\" filled />\n </span>\n <span class=\"v-visually-hidden\">{{\n m.rating.value(numberFormat.format(value), numberFormat.format(max))\n }}</span>\n </label>\n </span>\n <input v-if=\"readonly && name && model !== null\" type=\"hidden\" :name=\"name\" :value=\"model\" />\n </VFieldset>\n</template>\n\n<style>\n@layer vectis.components {\n .v-rating[data-size='sm'] {\n --vectis-icon-size: var(--vectis-control-size-rating-sm);\n }\n\n .v-rating[data-size='md'] {\n --vectis-icon-size: var(--vectis-control-size-rating-md);\n }\n\n .v-rating[data-size='lg'] {\n --vectis-icon-size: var(--vectis-control-size-rating-lg);\n }\n\n /* Positioned: it holds the hidden \"No rating\" radio, which has no box of its own. */\n .v-rating-items {\n position: relative;\n display: inline-flex;\n border-radius: var(--vectis-radius-interactive);\n }\n\n /* The padding widens the target around the icon: 24px at the smallest size. */\n .v-rating-item {\n --rating-shown: var(--rating-value);\n\n position: relative;\n display: inline-flex;\n padding: calc(var(--vectis-space-1) / 2);\n }\n\n label.v-rating-item {\n cursor: pointer;\n }\n\n /*\n * Hovering previews the rating: the hovered icon and those before it fill, the others empty.\n * The value is read from `--rating-value`, written inline, into `--rating-shown`, which these\n * rules can override where the inline style could not be.\n */\n /* The emptying rule weighs (0,1,0) and the filling one (0,3,1), which wins where both match. */\n :where(.v-rating:not(:disabled) .v-rating-items:has(label.v-rating-item:hover)) > .v-rating-item {\n --rating-shown: 0;\n }\n\n :where(.v-rating:not(:disabled)) label.v-rating-item:is(:hover, :has(~ .v-rating-item:hover)) {\n --rating-shown: 1;\n }\n\n .v-rating-icon {\n display: inline-grid;\n border-radius: var(--vectis-radius-xs);\n }\n\n .v-rating-icon > .v-icon {\n grid-area: 1 / 1;\n }\n\n .v-rating-empty {\n color: var(--vectis-color-border-strong);\n }\n\n /* The filled icon is clipped from the end, so a fraction fills the start of the icon. */\n .v-rating-filled {\n color: var(--tone-bg-solid);\n clip-path: inset(0 calc((1 - var(--rating-shown)) * 100%) 0 0);\n }\n\n .v-rating-filled:dir(rtl) {\n clip-path: inset(0 0 0 calc((1 - var(--rating-shown)) * 100%));\n }\n\n .v-rating-item .v-hidden-input:focus-visible + .v-rating-icon {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: var(--vectis-focus-ring-offset);\n }\n\n /* \"No rating\" has no icon of its own: its focus rings the whole row. */\n .v-rating-items:has(.v-rating-clear .v-hidden-input:focus-visible) {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: var(--vectis-focus-ring-offset);\n }\n\n .v-rating[data-invalid] .v-rating-empty {\n color: var(--vectis-color-danger);\n }\n\n .v-rating:disabled .v-rating-empty {\n color: var(--vectis-color-border);\n }\n\n .v-rating:disabled .v-rating-filled {\n color: var(--vectis-color-text-subtle);\n }\n\n .v-rating:disabled label.v-rating-item {\n cursor: not-allowed;\n }\n\n @media (forced-colors: active) {\n .v-rating-filled {\n color: Highlight;\n }\n\n .v-rating:disabled .v-rating-filled {\n color: GrayText;\n }\n }\n}\n</style>\n"],"mappings":""}