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,25 +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, vModelCheckbox as _, watchEffect as v, withDirectives as y } from "vue";
1
+ import e from "./VCheckMark.js";
2
+ import t from "../VField/VFieldAnnouncer.js";
3
+ import n from "../VField/VFieldMessage.js";
4
+ import { useChoice as r } from "../../composables/useChoice.js";
5
+ import { createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, mergeModels as u, mergeProps as d, normalizeClass as f, normalizeStyle as p, openBlock as m, renderSlot as h, toDisplayString as g, unref as _, useModel as v, vModelCheckbox as y, watchEffect as b, withDirectives as x } from "vue";
4
6
  //#region src/components/VCheckbox/VCheckbox.vue?vue&type=script&setup=true&lang.ts
5
- var b = [
7
+ var S = [
6
8
  "data-label-position",
7
9
  "data-spread",
8
10
  "data-readonly"
9
- ], x = { class: "v-choice-row" }, S = [
11
+ ], C = { class: "v-choice-row" }, w = [
10
12
  "aria-invalid",
11
13
  "aria-readonly",
12
14
  "disabled",
13
15
  "aria-describedby"
14
- ], C = {
16
+ ], T = {
15
17
  key: 0,
16
18
  class: "v-checkbox-label v-choice-label"
17
- }, w = ["id"], T = /*@__PURE__*/ o({
19
+ }, E = /*@__PURE__*/ l({
18
20
  inheritAttrs: !1,
19
21
  __name: "VCheckbox",
20
- props: /*@__PURE__*/ s({
22
+ props: /*@__PURE__*/ u({
21
23
  label: { default: void 0 },
22
24
  hint: { default: void 0 },
25
+ error: { default: void 0 },
23
26
  indeterminate: {
24
27
  type: Boolean,
25
28
  default: !1
@@ -49,70 +52,52 @@ var b = [
49
52
  modelModifiers: {}
50
53
  }),
51
54
  emits: ["update:modelValue"],
52
- setup(o, { expose: s }) {
53
- let T = o, { attrs: E, rootClass: D, rootStyle: O, forwardedAttrs: k } = e(), { hintId: A, describedBy: j } = t(E, () => !!T.hint), M = g(o, "modelValue"), N = f(null);
54
- function P() {
55
- N.value && (N.value.indeterminate = T.indeterminate);
55
+ setup(l, { expose: u }) {
56
+ let E = l, { rootClass: D, rootStyle: O, forwardedAttrs: k, hintId: A, errorId: j, describedBy: M, inputEl: N, refuseWhenReadonly: P, exposed: F } = r(E), I = v(l, "modelValue");
57
+ function L() {
58
+ N.value && (N.value.indeterminate = E.indeterminate);
56
59
  }
57
- v(P, { flush: "post" });
58
- function F(e) {
59
- T.readonly && e.preventDefault();
60
- }
61
- return s({
62
- focus: (e) => N.value?.focus(e),
63
- el: N
64
- }), (e, t) => (d(), r("span", {
65
- class: l(["v-checkbox v-choice", h(D)]),
66
- style: u(h(O)),
67
- "data-label-position": o.labelPosition,
68
- "data-spread": o.spread ? "" : void 0,
69
- "data-readonly": o.readonly ? "" : void 0
70
- }, [i("label", x, [
71
- y(i("input", c({
72
- ref_key: "inputEl",
73
- ref: N,
74
- "onUpdate:modelValue": t[0] ||= (e) => M.value = e,
75
- type: "checkbox",
76
- class: "v-checkbox-input v-hidden-input",
77
- "aria-invalid": o.invalid || void 0,
78
- "aria-readonly": o.readonly || void 0
79
- }, h(k), {
80
- disabled: o.disabled,
81
- "aria-describedby": h(j),
82
- onClick: F,
83
- onChange: P
84
- }), null, 16, S), [[_, M.value]]),
85
- t[1] ||= i("span", {
86
- class: "v-checkbox-box",
87
- "aria-hidden": "true"
88
- }, [i("svg", {
89
- class: "v-checkbox-mark",
90
- viewBox: "0 0 12 12"
91
- }, [i("path", {
92
- class: "v-checkbox-mark-check",
93
- d: "M2.5 6.5l2.5 2.5 4.5-5.5",
94
- fill: "none",
95
- stroke: "currentcolor",
96
- "stroke-width": "1.75",
97
- "stroke-linecap": "round",
98
- "stroke-linejoin": "round"
99
- }), i("path", {
100
- class: "v-checkbox-mark-dash",
101
- d: "M3 6h6",
102
- fill: "none",
103
- stroke: "currentcolor",
104
- "stroke-width": "1.75",
105
- "stroke-linecap": "round"
106
- })])], -1),
107
- e.$slots.default || o.label ? (d(), r("span", C, [p(e.$slots, "default", {}, () => [a(m(o.label), 1)])])) : n("", !0)
108
- ]), o.hint ? (d(), r("span", {
109
- key: 0,
110
- id: h(A),
111
- class: "v-checkbox-hint v-choice-hint"
112
- }, m(o.hint), 9, w)) : n("", !0)], 14, b));
60
+ return b(L, { flush: "post" }), u(F), (r, u) => (m(), a("span", {
61
+ class: f(["v-checkbox v-choice", _(D)]),
62
+ style: p(_(O)),
63
+ "data-label-position": l.labelPosition,
64
+ "data-spread": l.spread ? "" : void 0,
65
+ "data-readonly": l.readonly ? "" : void 0
66
+ }, [
67
+ o("label", C, [
68
+ x(o("input", d({
69
+ ref_key: "inputEl",
70
+ ref: N,
71
+ "onUpdate:modelValue": u[0] ||= (e) => I.value = e,
72
+ type: "checkbox",
73
+ class: "v-checkbox-input v-hidden-input",
74
+ "aria-invalid": l.invalid || !!l.error || void 0,
75
+ "aria-readonly": l.readonly || void 0
76
+ }, _(k), {
77
+ disabled: l.disabled,
78
+ "aria-describedby": _(M),
79
+ onClick: u[1] ||= (...e) => _(P) && _(P)(...e),
80
+ onChange: L
81
+ }), null, 16, w), [[y, I.value]]),
82
+ c(e),
83
+ r.$slots.default || l.label ? (m(), a("span", T, [h(r.$slots, "default", {}, () => [s(g(l.label), 1)])])) : i("", !0)
84
+ ]),
85
+ c(n, {
86
+ hint: l.hint,
87
+ error: l.error,
88
+ "hint-id": _(A),
89
+ "error-id": _(j)
90
+ }, null, 8, [
91
+ "hint",
92
+ "error",
93
+ "hint-id",
94
+ "error-id"
95
+ ]),
96
+ c(t, { text: l.error }, null, 8, ["text"])
97
+ ], 14, S));
113
98
  }
114
99
  });
115
100
  //#endregion
116
- export { T as default };
101
+ export { E as default };
117
102
 
118
103
  //# sourceMappingURL=VCheckbox.vue_vue_type_script_setup_true_lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VCheckbox.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/VCheckbox/VCheckbox.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Retain the native checkbox for focus, forms and validity. Keep hints outside its label and\n * synchronize indeterminate after rendering.\n */\n\nimport { ref, watchEffect } from 'vue'\n\nimport { useFieldIds } from '../../composables/useFieldIds'\nimport { useRootAttrs } from '../../composables/useRootAttrs'\n\n/** Which side of the box the label sits on. */\nexport type CheckboxLabelPosition = 'start' | 'end'\n\ninterface CheckboxProps {\n /** The text beside the box, 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 checkbox for assistive technology,\n * so it is read out after the label rather than as part of it.\n */\n hint?: string\n /** Shows the box as partially checked, a dash instead of a tick. */\n indeterminate?: boolean\n /** Which side of the box the label sits on. */\n labelPosition?: CheckboxLabelPosition\n /**\n * Pushes the label and the box to opposite ends of the line, the row taking the\n * full width available. This is the usual shape for a list of settings.\n */\n spread?: boolean\n /**\n * Marks the field as invalid, which colours the box and tells assistive technology\n * so. Use it for a rule the browser cannot check by itself; native validity is\n * already handled without it.\n */\n invalid?: boolean\n /** Makes the checkbox unusable, greyed out through the colour tokens. */\n disabled?: boolean\n /**\n * Shows the state without allowing it to be changed. The checkbox can still be\n * focused, is announced as read-only and is still submitted with its form; a click\n * or the Space key simply changes nothing.\n */\n readonly?: boolean\n}\n\nconst props = withDefaults(defineProps<CheckboxProps>(), {\n label: undefined,\n hint: undefined,\n indeterminate: false,\n labelPosition: 'end',\n spread: false,\n invalid: false,\n disabled: false,\n readonly: false,\n})\n\n// @a11y\n// The root element is a layout box, so the attributes the consumer passes must be\n// redirected: `name`, `value`, `required` and the aria-* belong on the input, and left on\n// the wrapper they would take part in neither the form nor the accessibility tree.\ndefineOptions({ inheritAttrs: false })\nconst { attrs, rootClass, rootStyle, forwardedAttrs } = useRootAttrs()\nconst { hintId, describedBy } = useFieldIds(attrs, () => !!props.hint)\n\n/**\n * Whether the box is ticked. It starts unticked. `indeterminate` is a separate prop: the\n * dash is a third appearance, never a third value of this one.\n */\nconst model = defineModel<boolean>({ default: false })\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// @ssr @core\n// The effect alone is not enough. Activating a checkbox CLEARS the property as part of the\n// gesture, and the prop it reads has not moved, so nothing re-runs it and the dash never comes\n// back.\nfunction syncIndeterminate() {\n if (inputEl.value) inputEl.value.indeterminate = props.indeterminate\n}\n\nwatchEffect(syncIndeterminate, { flush: 'post' })\n\n// @core\n// The native `readonly` attribute does nothing on a checkbox. Cancelling the click is what\n// refuses the change: the browser then puts `checked` and `indeterminate` back as they were and\n// fires no `change`, so the v-model never hears of it.\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 checkbox.\ndefineExpose({\n /** Moves the focus to the real checkbox. */\n focus: (options?: FocusOptions) => inputEl.value?.focus(options),\n /** The real `<input type=\"checkbox\">`, for what `focus` does not cover. */\n el: inputEl,\n})\n</script>\n\n<template>\n <span\n class=\"v-checkbox 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 <!--\n `aria-describedby` comes after the forwarded attributes, which lets the aggregated list,\n the consumer's references plus the hint, replace theirs.\n -->\n <input\n ref=\"inputEl\"\n v-model=\"model\"\n type=\"checkbox\"\n class=\"v-checkbox-input v-hidden-input\"\n :aria-invalid=\"invalid || undefined\"\n :aria-readonly=\"readonly || undefined\"\n v-bind=\"forwardedAttrs\"\n :disabled=\"disabled\"\n :aria-describedby=\"describedBy\"\n @click=\"refuseWhenReadonly\"\n @change=\"syncIndeterminate\"\n />\n <span class=\"v-checkbox-box\" aria-hidden=\"true\">\n <svg class=\"v-checkbox-mark\" viewBox=\"0 0 12 12\">\n <path\n class=\"v-checkbox-mark-check\"\n d=\"M2.5 6.5l2.5 2.5 4.5-5.5\"\n fill=\"none\"\n stroke=\"currentcolor\"\n stroke-width=\"1.75\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n class=\"v-checkbox-mark-dash\"\n d=\"M3 6h6\"\n fill=\"none\"\n stroke=\"currentcolor\"\n stroke-width=\"1.75\"\n stroke-linecap=\"round\"\n />\n </svg>\n </span>\n <span v-if=\"$slots.default || label\" class=\"v-checkbox-label v-choice-label\">\n <slot>{{ label }}</slot>\n </span>\n </label>\n <span v-if=\"hint\" :id=\"hintId\" class=\"v-checkbox-hint v-choice-hint\">{{ hint }}</span>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * A pill override on --vectis-radius-interactive would otherwise turn the box into a disc,\n * and a round checkbox reads as a radio.\n */\n .v-checkbox-box {\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: min(\n var(--vectis-radius-interactive),\n calc(var(--vectis-control-size-check) / 4)\n );\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-checkbox-mark {\n width: var(--vectis-control-size-check-mark);\n height: var(--vectis-control-size-check-mark);\n }\n\n .v-checkbox-mark-check,\n .v-checkbox-mark-dash {\n opacity: 0;\n transition: opacity var(--vectis-duration-fast) var(--vectis-ease-default);\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-checkbox:not([data-readonly])\n .v-choice-row:hover\n .v-checkbox-input:not(:disabled, :checked, :indeterminate, :user-invalid, [aria-invalid='true'])\n + .v-checkbox-box {\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-checkbox-input:is(:checked, :indeterminate) + .v-checkbox-box {\n background: var(--vectis-color-accent);\n border-color: var(--vectis-color-accent);\n }\n\n .v-checkbox:not([data-readonly])\n .v-choice-row:hover\n .v-checkbox-input:not(:disabled, :user-invalid, [aria-invalid='true']):is(\n :checked,\n :indeterminate\n )\n + .v-checkbox-box {\n background: var(--vectis-color-accent-hover);\n border-color: var(--vectis-color-accent-hover);\n }\n\n /*\n * The mark takes the surface colour, which contrasts with that fill in both themes, where\n * white would vanish against the light grey of the dark theme. `:where()` keeps both rules at\n * the weight of the states they sit between.\n */\n :where(.v-checkbox[data-readonly]) .v-checkbox-input + .v-checkbox-box {\n background: var(--vectis-color-surface-sunken);\n border-color: var(--vectis-color-border);\n }\n\n :where(.v-checkbox[data-readonly])\n .v-checkbox-input:is(:checked, :indeterminate)\n + .v-checkbox-box {\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-checkbox-input:user-invalid + .v-checkbox-box,\n .v-checkbox-input[aria-invalid='true'] + .v-checkbox-box {\n border-color: var(--vectis-color-danger);\n }\n\n .v-checkbox-input:disabled + .v-checkbox-box {\n background: var(--vectis-color-surface-muted);\n border-color: var(--vectis-color-border);\n color: var(--vectis-color-text-subtle);\n }\n\n /*\n * The two rules below are (0,4,0) and `checked` and `indeterminate` are INDEPENDENT DOM\n * properties, so a box can be both at once. Nothing but the source order decides what such a\n * box shows: the second rule hides the tick and the dash wins.\n */\n .v-checkbox-input:checked + .v-checkbox-box .v-checkbox-mark-check {\n opacity: 1;\n }\n\n .v-checkbox-input:indeterminate + .v-checkbox-box .v-checkbox-mark-check {\n opacity: 0;\n }\n\n .v-checkbox-input:indeterminate + .v-checkbox-box .v-checkbox-mark-dash {\n opacity: 1;\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-checkbox-input.v-checkbox-input.v-checkbox-input.v-checkbox-input.v-checkbox-input:is(\n :checked,\n :indeterminate\n ):not(:disabled)\n + .v-checkbox-box {\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-checkbox-box,\n .v-checkbox-mark-check,\n .v-checkbox-mark-dash {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+CA,IAAM,IAAQ,GAgBR,EAAE,UAAO,cAAW,cAAW,sBAAmB,EAAa,GAC/D,EAAE,WAAQ,mBAAgB,EAAY,SAAa,CAAC,CAAC,EAAM,IAAI,GAM/D,IAAQ,EAAoB,GAAA,YAAmB,GAO/C,IAAU,EAA6B,IAAI;EAMjD,SAAS,IAAoB;GAC3B,AAAI,EAAQ,UAAO,EAAQ,MAAM,gBAAgB,EAAM;EACzD;EAEA,EAAY,GAAmB,EAAE,OAAO,OAAO,CAAC;EAMhD,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,EAoDO,QAAA;GAnDL,OAAK,EAAA,CAAC,uBACE,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,EA0CQ,SA1CR,GA0CQ;KArCN,EAYE,SAZF,EAYE;aAXI;IAAJ,KAAI;6CACU,QAAA;IACd,MAAK;IACL,OAAM;IACL,gBAAc,EAAA,WAAW,KAAA;IACzB,iBAAe,EAAA,YAAY,KAAA;MACpB,EAAA,CAAA,GAAc;IACrB,UAAU,EAAA;IACV,oBAAkB,EAAA,CAAA;IAClB,SAAO;IACP,UAAQ;0BATA,EAAA,KAAK,CAAA,CAAA;YAWhB,EAoBO,QAAA;IApBD,OAAM;IAAiB,eAAY;OACvC,EAkBM,OAAA;IAlBD,OAAM;IAAkB,SAAQ;OACnC,EAQE,QAAA;IAPA,OAAM;IACN,GAAE;IACF,MAAK;IACL,QAAO;IACP,gBAAa;IACb,kBAAe;IACf,mBAAgB;OAElB,EAOE,QAAA;IANA,OAAM;IACN,GAAE;IACF,MAAK;IACL,QAAO;IACP,gBAAa;IACb,kBAAe;;GAITA,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,EAAsF,QAAA;;GAAnE,IAAI,EAAA,CAAA;GAAQ,OAAM;OAAmC,EAAA,IAAI,GAAA,GAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,GAAA,IAAA,CAAA"}
1
+ {"version":3,"file":"VCheckbox.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/VCheckbox/VCheckbox.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Retain the native checkbox for focus, forms and validity. Keep hints outside its label and\n * synchronize indeterminate after rendering.\n */\n\nimport { watchEffect } from 'vue'\n\nimport VFieldAnnouncer from '../VField/VFieldAnnouncer.vue'\nimport VFieldMessage from '../VField/VFieldMessage.vue'\nimport VCheckMark from './VCheckMark.vue'\n\nimport { useChoice } from '../../composables/useChoice'\n\n/** Which side of the box the label sits on. */\nexport type CheckboxLabelPosition = 'start' | 'end'\n\ninterface CheckboxProps {\n /** The text beside the box, 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 checkbox for assistive technology,\n * 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 /** Shows the box as partially checked, a dash instead of a tick. */\n indeterminate?: boolean\n /** Which side of the box the label sits on. */\n labelPosition?: CheckboxLabelPosition\n /**\n * Pushes the label and the box to opposite ends of the line, the row taking the\n * full width available. This is the usual shape for a list of settings.\n */\n spread?: boolean\n /**\n * Marks the field as invalid, which colours the box and tells assistive technology\n * so. Use it for a rule the browser cannot check by itself; native validity is\n * already handled without it.\n */\n invalid?: boolean\n /** Makes the checkbox unusable, greyed out through the colour tokens. */\n disabled?: boolean\n /**\n * Shows the state without allowing it to be changed. The checkbox can still be\n * focused, is announced as read-only and is still submitted with its form; a click\n * or the Space key simply changes nothing.\n */\n readonly?: boolean\n}\n\nconst props = withDefaults(defineProps<CheckboxProps>(), {\n label: undefined,\n hint: undefined,\n error: undefined,\n indeterminate: false,\n labelPosition: 'end',\n spread: false,\n invalid: false,\n disabled: false,\n readonly: false,\n})\n\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 * Whether the box is ticked. It starts unticked. `indeterminate` is a separate prop: the\n * dash is a third appearance, never a third value of this one.\n */\nconst model = defineModel<boolean>({ default: false })\n\ndefineSlots<{\n /** The label, when it needs more than the `label` prop's text. It is clickable. */\n default?(): unknown\n}>()\n\n// @ssr @core\n// The effect alone is not enough. Activating a checkbox CLEARS the property as part of the\n// gesture, and the prop it reads has not moved, so nothing re-runs it and the dash never comes\n// back.\nfunction syncIndeterminate() {\n if (inputEl.value) inputEl.value.indeterminate = props.indeterminate\n}\n\nwatchEffect(syncIndeterminate, { flush: 'post' })\n\ndefineExpose(exposed)\n</script>\n\n<template>\n <span\n class=\"v-checkbox 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 <!--\n `aria-describedby` comes after the forwarded attributes, which lets the aggregated list,\n the consumer's references plus the hint, replace theirs.\n -->\n <input\n ref=\"inputEl\"\n v-model=\"model\"\n type=\"checkbox\"\n class=\"v-checkbox-input v-hidden-input\"\n :aria-invalid=\"invalid || !!error || undefined\"\n :aria-readonly=\"readonly || undefined\"\n v-bind=\"forwardedAttrs\"\n :disabled=\"disabled\"\n :aria-describedby=\"describedBy\"\n @click=\"refuseWhenReadonly\"\n @change=\"syncIndeterminate\"\n />\n <VCheckMark />\n <span v-if=\"$slots.default || label\" class=\"v-checkbox-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 /*\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-checkbox:not([data-readonly])\n .v-choice-row:hover\n .v-checkbox-input:not(:disabled, :checked, :indeterminate, :user-invalid, [aria-invalid='true'])\n + .v-check-mark {\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-checkbox-input:is(:checked, :indeterminate) + .v-check-mark {\n background: var(--vectis-color-accent);\n border-color: var(--vectis-color-accent);\n }\n\n .v-checkbox:not([data-readonly])\n .v-choice-row:hover\n .v-checkbox-input:not(:disabled, :user-invalid, [aria-invalid='true']):is(\n :checked,\n :indeterminate\n )\n + .v-check-mark {\n background: var(--vectis-color-accent-hover);\n border-color: var(--vectis-color-accent-hover);\n }\n\n /*\n * The mark takes the surface colour, which contrasts with that fill in both themes, where\n * white would vanish against the light grey of the dark theme. `:where()` keeps both rules at\n * the weight of the states they sit between.\n */\n :where(.v-checkbox[data-readonly]) .v-checkbox-input + .v-check-mark {\n background: var(--vectis-color-surface-sunken);\n border-color: var(--vectis-color-border);\n }\n\n :where(.v-checkbox[data-readonly])\n .v-checkbox-input:is(:checked, :indeterminate)\n + .v-check-mark {\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-checkbox-input:user-invalid + .v-check-mark,\n .v-checkbox-input[aria-invalid='true'] + .v-check-mark {\n border-color: var(--vectis-color-danger);\n }\n\n .v-checkbox-input:disabled + .v-check-mark {\n background: var(--vectis-color-surface-muted);\n border-color: var(--vectis-color-border);\n color: var(--vectis-color-text-subtle);\n }\n\n /*\n * The two rules below are (0,4,0) and `checked` and `indeterminate` are INDEPENDENT DOM\n * properties, so a box can be both at once. Nothing but the source order decides what such a\n * box shows: the second rule hides the tick and the dash wins.\n */\n .v-checkbox-input:checked + .v-check-mark .v-check-mark-tick {\n opacity: 1;\n }\n\n .v-checkbox-input:indeterminate + .v-check-mark .v-check-mark-tick {\n opacity: 0;\n }\n\n .v-checkbox-input:indeterminate + .v-check-mark .v-check-mark-dash {\n opacity: 1;\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-checkbox-input.v-checkbox-input.v-checkbox-input.v-checkbox-input.v-checkbox-input:is(\n :checked,\n :indeterminate\n ):not(:disabled)\n + .v-check-mark {\n forced-color-adjust: none;\n background: Highlight;\n border-color: Highlight;\n color: HighlightText;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDA,IAAM,IAAQ,GAaR,EACJ,cACA,cACA,mBACA,WACA,YACA,gBACA,YACA,uBACA,eACE,EAAU,CAAK,GAMb,IAAQ,EAAoB,GAAA,YAAmB;EAWrD,SAAS,IAAoB;GAC3B,AAAI,EAAQ,UAAO,EAAQ,MAAM,gBAAgB,EAAM;EACzD;SAEA,EAAY,GAAmB,EAAE,OAAO,OAAO,CAAC,GAEhD,EAAa,CAAO,mBAIlB,EAiCO,QAAA;GAhCL,OAAK,EAAA,CAAC,uBACE,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,EAsBQ,SAtBR,GAsBQ;MAjBN,EAYE,SAZF,EAYE;cAXI;KAAJ,KAAI;8CACU,QAAA;KACd,MAAK;KACL,OAAM;KACL,gBAAc,EAAA,WAAO,CAAA,CAAM,EAAA,SAAS,KAAA;KACpC,iBAAe,EAAA,YAAY,KAAA;OACpB,EAAA,CAAA,GAAc;KACrB,UAAU,EAAA;KACV,oBAAkB,EAAA,CAAA;KAClB,SAAK,AAAA,EAAA,QAAA,GAAA,MAAE,EAAA,CAAA,KAAA,EAAA,CAAA,CAAA,CAAA,GAAA,CAAA;KACP,UAAQ;2BATA,EAAA,KAAK,CAAA,CAAA;IAWhB,EAAc,CAAA;IACFA,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"}
@@ -104,20 +104,20 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
104
104
  size: ChipSize;
105
105
  variant: ChipVariant;
106
106
  tone: ChipTone;
107
+ color: string;
108
+ shape: ChipShape;
107
109
  compact: boolean;
110
+ clickable: boolean;
108
111
  href: string;
109
- disabled: boolean;
112
+ selectable: boolean;
113
+ checkIcon: IconSource;
110
114
  iconStart: IconSource;
111
115
  iconEnd: IconSource;
112
116
  iconFilled: boolean;
113
- shape: ChipShape;
114
- color: string;
115
- clickable: boolean;
116
- selectable: boolean;
117
- checkIcon: IconSource;
118
117
  dismissible: boolean;
119
118
  dismissIcon: IconSource;
120
119
  dismissLabel: string;
120
+ disabled: boolean;
121
121
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
122
122
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
123
123
  declare const _default: typeof __VLS_export;
@@ -1 +1 @@
1
- {"version":3,"file":"VChip.js","names":[],"sources":["../../../src/components/VChip/VChip.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @a11y\n/**\n * Choose native links or buttons for chip actions. Dismissal is a sibling button because nested\n * buttons are invalid and inaccessible; inert links need a JS bridge.\n */\n\nimport { computed, onMounted, ref, useAttrs } from 'vue'\nimport type { StyleValue, VNode } from 'vue'\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\n// Neither import may be named after a prop (`check`, `checkIcon`): every top-level binding of a\n// `<script setup>` reaches the template, where it shadows the prop of that name.\nimport { check as checkMark } from '../VIcon/icons/check'\nimport { close as closeIcon } from '../VIcon/icons/close'\nimport type { IconSource } from '../VIcon/types'\nimport { useMessages } from '../../i18n/state'\n\nimport { useInertLink } from '../../composables/useInertLink'\nimport { useRootAttrs } from '../../composables/useRootAttrs'\nimport { customColorStyle } from '../../utils/css'\nimport { isDev } from '../../utils/env'\nimport { flattenSlot } from '../../utils/vnode'\n\n/** How much visual weight the chip carries. */\nexport type ChipVariant = 'soft' | 'solid' | 'outline'\n\n/** What the chip means, in colour. */\nexport type ChipTone = 'neutral' | 'accent' | 'danger' | 'success' | 'warning'\n\n/** The silhouette: softly rounded, or a full pill. */\nexport type ChipShape = 'chip' | 'pill'\n\n/** The height of the chip: 24 or 32 pixels. */\nexport type ChipSize = 'xs' | 'sm'\n\ninterface ChipProps {\n /**\n * How strongly the chip is painted: a tinted background, the full colour, or a\n * border alone.\n */\n variant?: ChipVariant\n /**\n * What the chip means, expressed as a colour: `neutral` by default, then `accent` for\n * something singled out and `danger`/ `success`/ `warning` for a state being reported.\n */\n tone?: ChipTone\n /** A colour of your own (hex, CSS name or `oklch()`), which REPLACES the tone. */\n color?: string\n /** The silhouette: softly rounded corners, or a full pill. */\n shape?: ChipShape\n /** The height of the chip. */\n size?: ChipSize\n /** Takes 4px off the height, leaving the padding, the text and the icons as they are. */\n compact?: boolean\n /** Makes the chip a button that reacts to clicks, without holding a state. */\n clickable?: boolean\n /**\n * Where the chip leads, which makes it a link. A disabled link is made inert by\n * hand.\n */\n href?: string\n /**\n * Makes the chip something that stays chosen, bound to `v-model:selected`. It wins\n * over `href` and `clickable`.\n */\n selectable?: boolean\n /**\n * Shows a tick before the label while the chip is selected. It REPLACES whatever\n * start icon was given, so the two are never shown together.\n */\n check?: boolean\n /** The icon of that tick, a built-in check mark by default. `iconFilled` does not reach it. */\n checkIcon?: IconSource\n /** An icon before the label. The `#start` slot replaces it. */\n iconStart?: IconSource\n /** An icon after the label. The `#end` slot replaces it. */\n iconEnd?: IconSource\n /**\n * Renders `iconStart` and `iconEnd` in their filled form (the font's `FILL` axis). It has\n * no effect on the `#start`/`#end` slots, whose icons the consumer builds, nor on the tick\n * or the removal cross.\n */\n iconFilled?: boolean\n /**\n * Adds a button that asks for the chip to be removed. It only EMITS that request:\n * actually taking the chip away is the consumer's decision.\n */\n dismissible?: boolean\n /** The icon of that removal button. */\n dismissIcon?: IconSource\n /**\n * What the removal button does, in words. It falls back to the design system\n * dictionary.\n */\n dismissLabel?: string\n /** Makes the chip unusable, greyed out through the colour tokens. */\n disabled?: boolean\n}\n\nconst props = withDefaults(defineProps<ChipProps>(), {\n variant: 'soft',\n tone: 'neutral',\n color: undefined,\n shape: 'chip',\n size: 'xs',\n compact: false,\n clickable: false,\n href: undefined,\n selectable: false,\n check: false,\n checkIcon: () => checkMark,\n iconStart: undefined,\n iconEnd: undefined,\n iconFilled: false,\n dismissible: false,\n dismissIcon: () => closeIcon,\n dismissLabel: undefined,\n disabled: false,\n})\n\nconst m = useMessages()\nconst resolvedDismissLabel = computed(() => props.dismissLabel ?? m.value.common.dismiss)\n\n/**\n * Whether the chip is selected, which is also what makes it selectable at all: binding this\n * turns it into a toggle button and takes precedence over `href` and `clickable`. It starts\n * unselected.\n */\nconst selected = defineModel<boolean>('selected', { default: false })\n\ndefineEmits<{\n /** The removal button was pressed. The chip is still there: removing it is up to you. */\n dismiss: []\n}>()\n\nconst slots = defineSlots<{\n /** The label. It may be left out entirely, which gives a chip made of icons alone. */\n default?(): unknown\n /** Content before the label, which takes the place of `iconStart`. */\n start?(): unknown\n /** Content after the label, which takes the place of `iconEnd`. */\n end?(): unknown\n}>()\n\ndefineOptions({ inheritAttrs: false })\n\n// The wrapper-root split: the pill is the box a consumer positions, and the ACTION is the\n// element that is focused, named and clicked, so everything else goes there.\nconst { rootClass, rootStyle: consumerStyle, forwardedAttrs } = useRootAttrs()\n\n/* A selectable chip is therefore never a link, whatever `href` says. */\nconst {\n isLink,\n isInertLink,\n linkHref,\n attrs: actionAttrs,\n} = useInertLink({\n href: () => (props.selectable ? undefined : props.href),\n inert: () => props.disabled,\n attrs: () => forwardedAttrs.value,\n})\nconst actionTag = computed(() =>\n props.selectable ? 'button' : isLink.value ? 'a' : props.clickable ? 'button' : 'span',\n)\n\nconst rootStyle = computed<StyleValue>(() => [customColorStyle(props.color), consumerStyle.value])\n\nconst actionEl = ref<HTMLElement | null>(null)\n\nconst showCheck = computed(() => props.check && props.selectable && selected.value)\n\n// A function read by the template, never a `computed`: `slots` is not reactive, so a computed\n// would keep its first answer while a slot behind a `v-if` comes and goes.\n/**\n * An icon and no label at all: the chip becomes a square, as wide as it is tall. The default\n * slot is asked what it RENDERS, not whether it was passed: a wrapper forwarding an empty\n * label still hands one down.\n */\nfunction iconOnly() {\n return (\n flattenSlot(slots.default?.() as VNode[] | undefined).length === 0 &&\n !!(slots.start || slots.end || props.iconStart || props.iconEnd)\n )\n}\n\n// @devwarn\n// A chip drawn with an icon alone has no accessible name: the icon is decorative, so a\n// clickable, selectable or linked one is announced as a bare button or link. Nothing fails\n// visibly, hence the message.\nif (isDev) {\n const attrs = useAttrs()\n onMounted(() => {\n if (\n actionTag.value !== 'span' &&\n actionEl.value?.parentElement?.hasAttribute('data-icon-only') &&\n attrs['aria-label'] === undefined &&\n attrs['aria-labelledby'] === undefined\n ) {\n console.warn(\n '[VChip] a chip made of an icon alone has no accessible name: set aria-label or aria-labelledby on it.',\n )\n }\n })\n}\n\n// A template ref on the chip reaches the pill, a layout box; the element that is focused,\n// named and clicked is the action inside it.\ndefineExpose({\n /** Moves the focus to the chip's action: its button or link. */\n focus: (options?: FocusOptions) => actionEl.value?.focus(options),\n /** The action element, which is also where the consumer's attributes land. */\n el: actionEl,\n})\n</script>\n\n<template>\n <span\n :class=\"['v-chip v-control v-tone v-variant', rootClass]\"\n :style=\"rootStyle\"\n :data-variant=\"variant\"\n :data-tone=\"tone\"\n :data-custom=\"color !== undefined ? '' : undefined\"\n :data-shape=\"shape\"\n :data-size=\"size\"\n :data-compact=\"compact ? '' : undefined\"\n :data-selected=\"selectable && selected ? '' : undefined\"\n :data-disabled=\"disabled ? '' : undefined\"\n :data-icon-only=\"iconOnly() ? '' : undefined\"\n >\n <component\n :is=\"actionTag\"\n ref=\"actionEl\"\n :aria-disabled=\"isInertLink ? 'true' : undefined\"\n :aria-pressed=\"selectable ? selected : undefined\"\n v-bind=\"actionAttrs\"\n class=\"v-chip-action\"\n :type=\"actionTag === 'button' ? 'button' : undefined\"\n :href=\"linkHref\"\n :disabled=\"actionTag === 'button' ? disabled : undefined\"\n @click=\"selectable && !disabled && (selected = !selected)\"\n >\n <VIcon v-if=\"showCheck\" v-bind=\"iconProps(checkIcon)\" />\n <slot v-else name=\"start\">\n <VIcon v-if=\"iconStart\" v-bind=\"iconProps(iconStart)\" :filled=\"iconFilled\" />\n </slot>\n <slot />\n <slot name=\"end\">\n <VIcon v-if=\"iconEnd\" v-bind=\"iconProps(iconEnd)\" :filled=\"iconFilled\" />\n </slot>\n </component>\n <button\n v-if=\"dismissible\"\n type=\"button\"\n class=\"v-chip-dismiss\"\n :aria-label=\"resolvedDismissLabel\"\n :disabled=\"disabled\"\n @click=\"$emit('dismiss')\"\n >\n <VIcon v-bind=\"iconProps(dismissIcon)\" />\n </button>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /* The height comes from the shared size class set on this element. The scale itself\n holds five steps; the component's type restricts it to the two smallest, a chip\n larger than that being a button. */\n .v-chip {\n display: inline-flex;\n align-items: center;\n block-size: var(--control-height);\n border: 1px solid transparent;\n border-radius: var(--vectis-radius-chip);\n font-family: var(--vectis-text-family);\n font-size: var(--control-font-size);\n font-weight: var(--vectis-text-control-weight);\n line-height: var(--vectis-text-control-leading);\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 color var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-chip[data-shape='pill'] {\n border-radius: var(--vectis-radius-pill);\n }\n\n /* The tone table itself lives in styles/tones.css, in a layer below the components.\n All five tones are taken exactly as they come; the only values redefined here are\n those of a custom colour, and they win over the shared table by LAYER rather than\n by order, so no bundling can change the outcome. */\n\n /* A custom colour replaces the tone entirely. The shared table derives the four values\n every adopter reads (styles/tones.css, `.v-tone[data-custom]`); the chip adds the\n three only it paints, its hover and active steps and its outline, from the same colour\n mixed with the theme's own text and surface. */\n .v-chip[data-custom] {\n --tone-bg-solid-hover: color-mix(in oklab, var(--custom-color), var(--vectis-color-text) 8%);\n --tone-bg-solid-active: color-mix(in oklab, var(--custom-color), var(--vectis-color-text) 14%);\n --tone-border-soft: color-mix(in oklab, var(--custom-color), var(--vectis-color-surface) 60%);\n }\n\n /*\n * It COMPOUNDS `.v-variant`: the variant table weighs (0,2,0) like this rule and lives in\n * another sheet, so at equal specificity the winner would be whichever one the consumer's\n * bundler put last. At (0,3,0) it wins by construction.\n */\n .v-variant.v-chip[data-selected] {\n background: var(--tone-bg-solid);\n color: var(--tone-text-solid);\n border-color: transparent;\n }\n\n /* Hovering and pressing are conditioned on the ACTION being a real control, which\n buys two things at once: a chip that merely displays a value never lights up, and\n hovering the removal button does not repaint the whole chip as though it were\n about to be activated. */\n /* The same steps as VButton's, rule for rule: an outline sits on the soft surface while\n hovered and one tint further when pressed, and that tint is where a soft chip starts\n on hover. Held in each sheet rather than in `variants.css`, which every consumer\n downloads whether or not it renders a single button or chip. */\n .v-chip[data-variant='outline']:not([data-disabled], [data-selected]):has(\n :is(button, a).v-chip-action:hover\n ) {\n background: var(--tone-bg-soft);\n }\n\n .v-chip[data-variant='outline']:not([data-disabled], [data-selected]):has(\n :is(button, a).v-chip-action:active\n ),\n .v-chip[data-variant='soft']:not([data-disabled], [data-selected]):has(\n :is(button, a).v-chip-action:hover\n ) {\n background: color-mix(in oklab, var(--tone-bg-soft), var(--tone-text-tinted) 8%);\n }\n\n .v-chip[data-variant='soft']:not([data-disabled], [data-selected]):has(\n :is(button, a).v-chip-action:active\n ) {\n background: color-mix(in oklab, var(--tone-bg-soft), var(--tone-text-tinted) 14%);\n }\n\n .v-chip[data-variant='solid']:not([data-disabled]):has(:is(button, a).v-chip-action:hover),\n .v-chip[data-selected]:not([data-disabled]):has(:is(button, a).v-chip-action:hover) {\n background: var(--tone-bg-solid-hover);\n }\n\n .v-chip[data-variant='solid']:not([data-disabled]):has(:is(button, a).v-chip-action:active),\n .v-chip[data-selected]:not([data-disabled]):has(:is(button, a).v-chip-action:active) {\n background: var(--tone-bg-solid-active);\n }\n\n .v-chip-action {\n display: inline-flex;\n align-items: center;\n gap: var(--control-gap);\n block-size: 100%;\n padding-block: 0;\n padding-inline: var(--control-padding-inline);\n border: none;\n background: transparent;\n color: inherit;\n font: inherit;\n border-radius: inherit;\n text-decoration: none;\n cursor: default;\n }\n\n /* With an icon and no label the action becomes square, its width taken from its own\n height through the ratio rather than from a new measurement to keep in step. */\n .v-chip[data-icon-only] .v-chip-action {\n aspect-ratio: 1;\n justify-content: center;\n padding-inline: 0;\n }\n\n :is(button, a).v-chip-action {\n cursor: pointer;\n }\n\n :is(button, a).v-chip-action: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 /*\n * That matters because the cross is drawn from the icon font here, and a glyph from a font is\n * real text, to which the contrast rule applies.\n */\n .v-chip-dismiss {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n inline-size: var(--control-action-size);\n block-size: var(--control-action-size);\n margin-inline: calc(var(--vectis-space-1) * -1) var(--vectis-space-1);\n padding: 0;\n border: none;\n background: transparent;\n color: inherit;\n border-radius: var(--vectis-radius-pill);\n cursor: pointer;\n flex: none;\n }\n\n .v-chip-dismiss:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: calc(-1 * var(--vectis-focus-ring-width));\n }\n\n /*\n * A disabled chip greys out through the colour tokens, which makes it follow the dark theme\n * without a rule of its own.\n */\n .v-variant.v-chip[data-disabled] {\n background: var(--vectis-color-surface-muted);\n color: var(--vectis-color-text-subtle);\n border-color: transparent;\n }\n\n .v-variant.v-chip[data-disabled][data-variant='outline'] {\n background: transparent;\n border-color: var(--vectis-color-border);\n }\n\n .v-chip[data-disabled] :is(:is(button, a).v-chip-action, .v-chip-dismiss) {\n cursor: not-allowed;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-chip {\n transition: none;\n }\n }\n\n /*\n * The class is repeated to reach (0,6,0). The variant, hover and active rules reach (0,5,0),\n * and with the forcing turned off any of them that still won would paint its tone over the\n * selection, with HighlightText on top of it.\n */\n @media (forced-colors: active) {\n .v-chip.v-chip.v-chip.v-chip[data-selected]:not([data-disabled]) {\n forced-color-adjust: none;\n background-color: Highlight;\n color: HighlightText;\n border-color: Highlight;\n outline-color: CanvasText;\n }\n }\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"VChip.js","names":[],"sources":["../../../src/components/VChip/VChip.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @a11y\n/**\n * Choose native links or buttons for chip actions. Dismissal is a sibling button because nested\n * buttons are invalid and inaccessible; inert links need a JS bridge.\n */\n\nimport { computed, onMounted, ref, useAttrs } from 'vue'\nimport type { StyleValue, VNode } from 'vue'\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\n// Neither import may be named after a prop (`check`, `checkIcon`): every top-level binding of a\n// `<script setup>` reaches the template, where it shadows the prop of that name.\nimport { check as checkMark } from '../VIcon/icons/check'\nimport { close as closeIcon } from '../VIcon/icons/close'\nimport type { IconSource } from '../VIcon/types'\nimport { useMessages } from '../../i18n/state'\n\nimport { useInertLink } from '../../composables/useInertLink'\nimport { useRootAttrs } from '../../composables/useRootAttrs'\nimport { customColorStyle } from '../../utils/css'\nimport { isDev } from '../../utils/env'\nimport { flattenSlot } from '../../utils/vnode'\n\n/** How much visual weight the chip carries. */\nexport type ChipVariant = 'soft' | 'solid' | 'outline'\n\n/** What the chip means, in colour. */\nexport type ChipTone = 'neutral' | 'accent' | 'danger' | 'success' | 'warning'\n\n/** The silhouette: softly rounded, or a full pill. */\nexport type ChipShape = 'chip' | 'pill'\n\n/** The height of the chip: 24 or 32 pixels. */\nexport type ChipSize = 'xs' | 'sm'\n\ninterface ChipProps {\n /**\n * How strongly the chip is painted: a tinted background, the full colour, or a\n * border alone.\n */\n variant?: ChipVariant\n /**\n * What the chip means, expressed as a colour: `neutral` by default, then `accent` for\n * something singled out and `danger`/ `success`/ `warning` for a state being reported.\n */\n tone?: ChipTone\n /** A colour of your own (hex, CSS name or `oklch()`), which REPLACES the tone. */\n color?: string\n /** The silhouette: softly rounded corners, or a full pill. */\n shape?: ChipShape\n /** The height of the chip. */\n size?: ChipSize\n /** Takes 4px off the height, leaving the padding, the text and the icons as they are. */\n compact?: boolean\n /** Makes the chip a button that reacts to clicks, without holding a state. */\n clickable?: boolean\n /**\n * Where the chip leads, which makes it a link. A disabled link is made inert by\n * hand.\n */\n href?: string\n /**\n * Makes the chip something that stays chosen, bound to `v-model:selected`. It wins\n * over `href` and `clickable`.\n */\n selectable?: boolean\n /**\n * Shows a tick before the label while the chip is selected. It REPLACES whatever\n * start icon was given, so the two are never shown together.\n */\n check?: boolean\n /** The icon of that tick, a built-in check mark by default. `iconFilled` does not reach it. */\n checkIcon?: IconSource\n /** An icon before the label. The `#start` slot replaces it. */\n iconStart?: IconSource\n /** An icon after the label. The `#end` slot replaces it. */\n iconEnd?: IconSource\n /**\n * Renders `iconStart` and `iconEnd` in their filled form (the font's `FILL` axis). It has\n * no effect on the `#start`/`#end` slots, whose icons the consumer builds, nor on the tick\n * or the removal cross.\n */\n iconFilled?: boolean\n /**\n * Adds a button that asks for the chip to be removed. It only EMITS that request:\n * actually taking the chip away is the consumer's decision.\n */\n dismissible?: boolean\n /** The icon of that removal button. */\n dismissIcon?: IconSource\n /**\n * What the removal button does, in words. It falls back to the design system\n * dictionary.\n */\n dismissLabel?: string\n /** Makes the chip unusable, greyed out through the colour tokens. */\n disabled?: boolean\n}\n\nconst props = withDefaults(defineProps<ChipProps>(), {\n variant: 'soft',\n tone: 'neutral',\n color: undefined,\n shape: 'chip',\n size: 'xs',\n compact: false,\n clickable: false,\n href: undefined,\n selectable: false,\n check: false,\n checkIcon: () => checkMark,\n iconStart: undefined,\n iconEnd: undefined,\n iconFilled: false,\n dismissible: false,\n dismissIcon: () => closeIcon,\n dismissLabel: undefined,\n disabled: false,\n})\n\nconst m = useMessages()\nconst resolvedDismissLabel = computed(() => props.dismissLabel ?? m.value.common.dismiss)\n\n/**\n * Whether the chip is selected, which is also what makes it selectable at all: binding this\n * turns it into a toggle button and takes precedence over `href` and `clickable`. It starts\n * unselected.\n */\nconst selected = defineModel<boolean>('selected', { default: false })\n\ndefineEmits<{\n /** The removal button was pressed. The chip is still there: removing it is up to you. */\n dismiss: []\n}>()\n\nconst slots = defineSlots<{\n /** The label. It may be left out entirely, which gives a chip made of icons alone. */\n default?(): unknown\n /** Content before the label, which takes the place of `iconStart`. */\n start?(): unknown\n /** Content after the label, which takes the place of `iconEnd`. */\n end?(): unknown\n}>()\n\ndefineOptions({ inheritAttrs: false })\n\n// The wrapper-root split: the pill is the box a consumer positions, and the ACTION is the\n// element that is focused, named and clicked, so everything else goes there.\nconst { rootClass, rootStyle: consumerStyle, forwardedAttrs } = useRootAttrs()\n\n/* A selectable chip is therefore never a link, whatever `href` says. */\nconst {\n isLink,\n isInertLink,\n linkHref,\n attrs: actionAttrs,\n} = useInertLink({\n href: () => (props.selectable ? undefined : props.href),\n inert: () => props.disabled,\n attrs: () => forwardedAttrs.value,\n})\nconst actionTag = computed(() =>\n props.selectable ? 'button' : isLink.value ? 'a' : props.clickable ? 'button' : 'span',\n)\n\nconst rootStyle = computed<StyleValue>(() => [customColorStyle(props.color), consumerStyle.value])\n\nconst actionEl = ref<HTMLElement | null>(null)\n\nconst showCheck = computed(() => props.check && props.selectable && selected.value)\n\n// A function read by the template, never a `computed`: `slots` is not reactive, so a computed\n// would keep its first answer while a slot behind a `v-if` comes and goes.\n/**\n * An icon and no label at all: the chip becomes a square, as wide as it is tall. The default\n * slot is asked what it RENDERS, not whether it was passed: a wrapper forwarding an empty\n * label still hands one down.\n */\nfunction iconOnly() {\n return (\n flattenSlot(slots.default?.() as VNode[] | undefined).length === 0 &&\n !!(slots.start || slots.end || props.iconStart || props.iconEnd)\n )\n}\n\n// @devwarn\n// A chip drawn with an icon alone has no accessible name: the icon is decorative, so a\n// clickable, selectable or linked one is announced as a bare button or link. Nothing fails\n// visibly, hence the message.\nif (isDev) {\n const attrs = useAttrs()\n onMounted(() => {\n if (\n actionTag.value !== 'span' &&\n actionEl.value?.parentElement?.hasAttribute('data-icon-only') &&\n attrs['aria-label'] === undefined &&\n attrs['aria-labelledby'] === undefined\n ) {\n console.warn(\n '[VChip] a chip made of an icon alone has no accessible name: set aria-label or aria-labelledby on it.',\n )\n }\n })\n}\n\n// A template ref on the chip reaches the pill, a layout box; the element that is focused,\n// named and clicked is the action inside it.\ndefineExpose({\n /** Moves the focus to the chip's action: its button or link. */\n focus: (options?: FocusOptions) => actionEl.value?.focus(options),\n /** The action element, which is also where the consumer's attributes land. */\n el: actionEl,\n})\n</script>\n\n<template>\n <span\n :class=\"['v-chip v-control v-tone v-variant', rootClass]\"\n :style=\"rootStyle\"\n :data-variant=\"variant\"\n :data-tone=\"tone\"\n :data-custom=\"color !== undefined ? '' : undefined\"\n :data-shape=\"shape\"\n :data-size=\"size\"\n :data-compact=\"compact ? '' : undefined\"\n :data-selected=\"selectable && selected ? '' : undefined\"\n :data-disabled=\"disabled ? '' : undefined\"\n :data-icon-only=\"iconOnly() ? '' : undefined\"\n >\n <component\n :is=\"actionTag\"\n ref=\"actionEl\"\n :aria-disabled=\"isInertLink ? 'true' : undefined\"\n :aria-pressed=\"selectable ? selected : undefined\"\n v-bind=\"actionAttrs\"\n class=\"v-chip-action\"\n :type=\"actionTag === 'button' ? 'button' : undefined\"\n :href=\"linkHref\"\n :disabled=\"actionTag === 'button' ? disabled : undefined\"\n @click=\"selectable && !disabled && (selected = !selected)\"\n >\n <VIcon v-if=\"showCheck\" v-bind=\"iconProps(checkIcon)\" />\n <slot v-else name=\"start\">\n <VIcon v-if=\"iconStart\" v-bind=\"iconProps(iconStart)\" :filled=\"iconFilled\" />\n </slot>\n <slot />\n <slot name=\"end\">\n <VIcon v-if=\"iconEnd\" v-bind=\"iconProps(iconEnd)\" :filled=\"iconFilled\" />\n </slot>\n </component>\n <button\n v-if=\"dismissible\"\n type=\"button\"\n class=\"v-chip-dismiss\"\n :aria-label=\"resolvedDismissLabel\"\n :disabled=\"disabled\"\n @click=\"$emit('dismiss')\"\n >\n <VIcon v-bind=\"iconProps(dismissIcon)\" />\n </button>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /* The height comes from the shared size class set on this element. The scale itself\n holds five steps; the component's type restricts it to the two smallest, a chip\n larger than that being a button. */\n .v-chip {\n display: inline-flex;\n align-items: center;\n block-size: var(--control-height);\n border: 1px solid transparent;\n border-radius: var(--vectis-radius-chip);\n font-family: var(--vectis-text-family);\n font-size: var(--control-font-size);\n font-weight: var(--vectis-text-control-weight);\n line-height: var(--vectis-text-control-leading);\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 color var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-chip[data-shape='pill'] {\n border-radius: var(--vectis-radius-pill);\n }\n\n /* The tone table itself lives in styles/tones.css, in a layer below the components.\n All five tones are taken exactly as they come; the only values redefined here are\n those of a custom colour, and they win over the shared table by LAYER rather than\n by order, so no bundling can change the outcome. */\n\n /* A custom colour replaces the tone entirely. The shared table derives the four values\n every adopter reads (styles/tones.css, `.v-tone[data-custom]`); the chip adds the\n three only it paints, its hover and active steps and its outline, from the same colour\n mixed with the theme's own text and surface. */\n .v-chip[data-custom] {\n --tone-bg-solid-hover: color-mix(in oklab, var(--custom-color), var(--vectis-color-text) 8%);\n --tone-bg-solid-active: color-mix(in oklab, var(--custom-color), var(--vectis-color-text) 14%);\n --tone-border-soft: color-mix(in oklab, var(--custom-color), var(--vectis-color-surface) 60%);\n }\n\n /*\n * It COMPOUNDS `.v-variant`: the variant table weighs (0,2,0) like this rule and lives in\n * another sheet, so at equal specificity the winner would be whichever one the consumer's\n * bundler put last. At (0,3,0) it wins by construction.\n */\n .v-variant.v-chip[data-selected] {\n background: var(--tone-bg-solid);\n color: var(--tone-text-solid);\n border-color: transparent;\n }\n\n /* Hovering and pressing are conditioned on the ACTION being a real control, which\n buys two things at once: a chip that merely displays a value never lights up, and\n hovering the removal button does not repaint the whole chip as though it were\n about to be activated. */\n /* The same steps as VButton's, rule for rule: an outline sits on the soft surface while\n hovered and one tint further when pressed, and that tint is where a soft chip starts\n on hover. Held in each sheet rather than in `variants.css`, which every consumer\n downloads whether or not it renders a single button or chip. */\n .v-chip[data-variant='outline']:not([data-disabled], [data-selected]):has(\n :is(button, a).v-chip-action:hover\n ) {\n background: var(--tone-bg-soft);\n }\n\n .v-chip[data-variant='outline']:not([data-disabled], [data-selected]):has(\n :is(button, a).v-chip-action:active\n ),\n .v-chip[data-variant='soft']:not([data-disabled], [data-selected]):has(\n :is(button, a).v-chip-action:hover\n ) {\n background: color-mix(in oklab, var(--tone-bg-soft), var(--tone-text-tinted) 8%);\n }\n\n .v-chip[data-variant='soft']:not([data-disabled], [data-selected]):has(\n :is(button, a).v-chip-action:active\n ) {\n background: color-mix(in oklab, var(--tone-bg-soft), var(--tone-text-tinted) 14%);\n }\n\n .v-chip[data-variant='solid']:not([data-disabled]):has(:is(button, a).v-chip-action:hover),\n .v-chip[data-selected]:not([data-disabled]):has(:is(button, a).v-chip-action:hover) {\n background: var(--tone-bg-solid-hover);\n }\n\n .v-chip[data-variant='solid']:not([data-disabled]):has(:is(button, a).v-chip-action:active),\n .v-chip[data-selected]:not([data-disabled]):has(:is(button, a).v-chip-action:active) {\n background: var(--tone-bg-solid-active);\n }\n\n .v-chip-action {\n display: inline-flex;\n align-items: center;\n gap: var(--control-gap);\n block-size: 100%;\n padding-block: 0;\n padding-inline: var(--control-padding-inline);\n border: none;\n background: transparent;\n color: inherit;\n font: inherit;\n border-radius: inherit;\n text-decoration: none;\n cursor: default;\n }\n\n /* With an icon and no label the action becomes square, its width taken from its own\n height through the ratio rather than from a new measurement to keep in step. */\n .v-chip[data-icon-only] .v-chip-action {\n aspect-ratio: 1;\n justify-content: center;\n padding-inline: 0;\n }\n\n :is(button, a).v-chip-action {\n cursor: pointer;\n }\n\n :is(button, a).v-chip-action: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 /*\n * The cross inherits the chip's text colour rather than a muted one: drawn from the icon font,\n * it is real text, to which the text contrast rule applies.\n */\n .v-chip-dismiss {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n inline-size: var(--control-action-size);\n block-size: var(--control-action-size);\n margin-inline: calc(var(--vectis-space-1) * -1) var(--vectis-space-1);\n padding: 0;\n border: none;\n background: transparent;\n color: inherit;\n border-radius: var(--vectis-radius-pill);\n cursor: pointer;\n flex: none;\n }\n\n .v-chip-dismiss:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: calc(-1 * var(--vectis-focus-ring-width));\n }\n\n /*\n * A disabled chip greys out through the colour tokens, which makes it follow the dark theme\n * without a rule of its own.\n */\n .v-variant.v-chip[data-disabled] {\n background: var(--vectis-color-surface-muted);\n color: var(--vectis-color-text-subtle);\n border-color: transparent;\n }\n\n .v-variant.v-chip[data-disabled][data-variant='outline'] {\n background: transparent;\n border-color: var(--vectis-color-border);\n }\n\n .v-chip[data-disabled] :is(:is(button, a).v-chip-action, .v-chip-dismiss) {\n cursor: not-allowed;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-chip {\n transition: none;\n }\n }\n\n /*\n * The class is repeated to reach (0,6,0). The variant, hover and active rules reach (0,5,0),\n * and with the forcing turned off any of them that still won would paint its tone over the\n * selection, with HighlightText on top of it.\n */\n @media (forced-colors: active) {\n .v-chip.v-chip.v-chip.v-chip[data-selected]:not([data-disabled]) {\n forced-color-adjust: none;\n background-color: Highlight;\n color: HighlightText;\n border-color: Highlight;\n outline-color: CanvasText;\n }\n }\n}\n</style>\n"],"mappings":""}
@@ -3,11 +3,11 @@ import { useMessages as t } from "../../i18n/state.js";
3
3
  import { iconProps as n } from "../VIcon/iconProps.js";
4
4
  import { customColorStyle as r } from "../../utils/css.js";
5
5
  import i from "../VIcon/VIcon.js";
6
- import { useInertLink as a } from "../../composables/useInertLink.js";
7
- import { useRootAttrs as o } from "../../composables/useRootAttrs.js";
8
- import { close as s } from "../VIcon/icons/close.js";
9
- import { flattenSlot as c } from "../../utils/vnode.js";
10
- import { check as l } from "../VIcon/icons/check.js";
6
+ import { flattenSlot as a } from "../../utils/vnode.js";
7
+ import { useInertLink as o } from "../../composables/useInertLink.js";
8
+ import { useRootAttrs as s } from "../../composables/useRootAttrs.js";
9
+ import { check as c } from "../VIcon/icons/check.js";
10
+ import { close as l } from "../VIcon/icons/close.js";
11
11
  import { computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createVNode as m, defineComponent as h, guardReactiveProps as g, mergeModels as _, mergeProps as v, normalizeClass as y, normalizeProps as b, normalizeStyle as x, onMounted as S, openBlock as C, ref as w, renderSlot as T, resolveDynamicComponent as E, unref as D, useAttrs as O, useModel as k, useSlots as A, withCtx as j } from "vue";
12
12
  //#region src/components/VChip/VChip.vue?vue&type=script&setup=true&lang.ts
13
13
  var M = [
@@ -46,7 +46,7 @@ var M = [
46
46
  type: Boolean,
47
47
  default: !1
48
48
  },
49
- checkIcon: { default: () => l },
49
+ checkIcon: { default: () => c },
50
50
  iconStart: { default: void 0 },
51
51
  iconEnd: { default: void 0 },
52
52
  iconFilled: {
@@ -57,7 +57,7 @@ var M = [
57
57
  type: Boolean,
58
58
  default: !1
59
59
  },
60
- dismissIcon: { default: () => s },
60
+ dismissIcon: { default: () => l },
61
61
  dismissLabel: { default: void 0 },
62
62
  disabled: {
63
63
  type: Boolean,
@@ -71,14 +71,14 @@ var M = [
71
71
  selectedModifiers: {}
72
72
  }),
73
73
  emits: /*@__PURE__*/ _(["dismiss"], ["update:selected"]),
74
- setup(s, { expose: l }) {
75
- let h = s, _ = t(), P = u(() => h.dismissLabel ?? _.value.common.dismiss), F = k(s, "selected"), I = A(), { rootClass: L, rootStyle: R, forwardedAttrs: z } = o(), { isLink: B, isInertLink: V, linkHref: H, attrs: U } = a({
74
+ setup(c, { expose: l }) {
75
+ let h = c, _ = t(), P = u(() => h.dismissLabel ?? _.value.common.dismiss), F = k(c, "selected"), I = A(), { rootClass: L, rootStyle: R, forwardedAttrs: z } = s(), { isLink: B, isInertLink: V, linkHref: H, attrs: U } = o({
76
76
  href: () => h.selectable ? void 0 : h.href,
77
77
  inert: () => h.disabled,
78
78
  attrs: () => z.value
79
79
  }), W = u(() => h.selectable ? "button" : B.value ? "a" : h.clickable ? "button" : "span"), G = u(() => [r(h.color), R.value]), K = w(null), q = u(() => h.check && h.selectable && F.value);
80
80
  function J() {
81
- return c(I.default?.()).length === 0 && !!(I.start || I.end || h.iconStart || h.iconEnd);
81
+ return a(I.default?.()).length === 0 && !!(I.start || I.end || h.iconStart || h.iconEnd);
82
82
  }
83
83
  if (e) {
84
84
  let e = O();
@@ -92,31 +92,31 @@ var M = [
92
92
  }), (e, t) => (C(), p("span", {
93
93
  class: y(["v-chip v-control v-tone v-variant", D(L)]),
94
94
  style: x(G.value),
95
- "data-variant": s.variant,
96
- "data-tone": s.tone,
97
- "data-custom": s.color === void 0 ? void 0 : "",
98
- "data-shape": s.shape,
99
- "data-size": s.size,
100
- "data-compact": s.compact ? "" : void 0,
101
- "data-selected": s.selectable && F.value ? "" : void 0,
102
- "data-disabled": s.disabled ? "" : void 0,
95
+ "data-variant": c.variant,
96
+ "data-tone": c.tone,
97
+ "data-custom": c.color === void 0 ? void 0 : "",
98
+ "data-shape": c.shape,
99
+ "data-size": c.size,
100
+ "data-compact": c.compact ? "" : void 0,
101
+ "data-selected": c.selectable && F.value ? "" : void 0,
102
+ "data-disabled": c.disabled ? "" : void 0,
103
103
  "data-icon-only": J() ? "" : void 0
104
104
  }, [(C(), d(E(W.value), v({
105
105
  ref_key: "actionEl",
106
106
  ref: K,
107
107
  "aria-disabled": D(V) ? "true" : void 0,
108
- "aria-pressed": s.selectable ? F.value : void 0
108
+ "aria-pressed": c.selectable ? F.value : void 0
109
109
  }, D(U), {
110
110
  class: "v-chip-action",
111
111
  type: W.value === "button" ? "button" : void 0,
112
112
  href: D(H),
113
- disabled: W.value === "button" ? s.disabled : void 0,
114
- onClick: t[0] ||= (e) => s.selectable && !s.disabled && (F.value = !F.value)
113
+ disabled: W.value === "button" ? c.disabled : void 0,
114
+ onClick: t[0] ||= (e) => c.selectable && !c.disabled && (F.value = !F.value)
115
115
  }), {
116
116
  default: j(() => [
117
- q.value ? (C(), d(i, b(v({ key: 0 }, D(n)(s.checkIcon))), null, 16)) : T(e.$slots, "start", {}, () => [s.iconStart ? (C(), d(i, v({ key: 0 }, D(n)(s.iconStart), { filled: s.iconFilled }), null, 16, ["filled"])) : f("", !0)], void 0, 1),
117
+ q.value ? (C(), d(i, b(v({ key: 0 }, D(n)(c.checkIcon))), null, 16)) : T(e.$slots, "start", {}, () => [c.iconStart ? (C(), d(i, v({ key: 0 }, D(n)(c.iconStart), { filled: c.iconFilled }), null, 16, ["filled"])) : f("", !0)], void 0, 1),
118
118
  T(e.$slots, "default"),
119
- T(e.$slots, "end", {}, () => [s.iconEnd ? (C(), d(i, v({ key: 0 }, D(n)(s.iconEnd), { filled: s.iconFilled }), null, 16, ["filled"])) : f("", !0)])
119
+ T(e.$slots, "end", {}, () => [c.iconEnd ? (C(), d(i, v({ key: 0 }, D(n)(c.iconEnd), { filled: c.iconFilled }), null, 16, ["filled"])) : f("", !0)])
120
120
  ]),
121
121
  _: 3
122
122
  }, 16, [
@@ -125,14 +125,14 @@ var M = [
125
125
  "type",
126
126
  "href",
127
127
  "disabled"
128
- ])), s.dismissible ? (C(), p("button", {
128
+ ])), c.dismissible ? (C(), p("button", {
129
129
  key: 0,
130
130
  type: "button",
131
131
  class: "v-chip-dismiss",
132
132
  "aria-label": P.value,
133
- disabled: s.disabled,
133
+ disabled: c.disabled,
134
134
  onClick: t[1] ||= (t) => e.$emit("dismiss")
135
- }, [m(i, b(g(D(n)(s.dismissIcon))), null, 16)], 8, N)) : f("", !0)], 14, M));
135
+ }, [m(i, b(g(D(n)(c.dismissIcon))), null, 16)], 8, N)) : f("", !0)], 14, M));
136
136
  }
137
137
  });
138
138
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"VChip.vue_vue_type_script_setup_true_lang.js","names":["$emit"],"sources":["../../../src/components/VChip/VChip.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @a11y\n/**\n * Choose native links or buttons for chip actions. Dismissal is a sibling button because nested\n * buttons are invalid and inaccessible; inert links need a JS bridge.\n */\n\nimport { computed, onMounted, ref, useAttrs } from 'vue'\nimport type { StyleValue, VNode } from 'vue'\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\n// Neither import may be named after a prop (`check`, `checkIcon`): every top-level binding of a\n// `<script setup>` reaches the template, where it shadows the prop of that name.\nimport { check as checkMark } from '../VIcon/icons/check'\nimport { close as closeIcon } from '../VIcon/icons/close'\nimport type { IconSource } from '../VIcon/types'\nimport { useMessages } from '../../i18n/state'\n\nimport { useInertLink } from '../../composables/useInertLink'\nimport { useRootAttrs } from '../../composables/useRootAttrs'\nimport { customColorStyle } from '../../utils/css'\nimport { isDev } from '../../utils/env'\nimport { flattenSlot } from '../../utils/vnode'\n\n/** How much visual weight the chip carries. */\nexport type ChipVariant = 'soft' | 'solid' | 'outline'\n\n/** What the chip means, in colour. */\nexport type ChipTone = 'neutral' | 'accent' | 'danger' | 'success' | 'warning'\n\n/** The silhouette: softly rounded, or a full pill. */\nexport type ChipShape = 'chip' | 'pill'\n\n/** The height of the chip: 24 or 32 pixels. */\nexport type ChipSize = 'xs' | 'sm'\n\ninterface ChipProps {\n /**\n * How strongly the chip is painted: a tinted background, the full colour, or a\n * border alone.\n */\n variant?: ChipVariant\n /**\n * What the chip means, expressed as a colour: `neutral` by default, then `accent` for\n * something singled out and `danger`/ `success`/ `warning` for a state being reported.\n */\n tone?: ChipTone\n /** A colour of your own (hex, CSS name or `oklch()`), which REPLACES the tone. */\n color?: string\n /** The silhouette: softly rounded corners, or a full pill. */\n shape?: ChipShape\n /** The height of the chip. */\n size?: ChipSize\n /** Takes 4px off the height, leaving the padding, the text and the icons as they are. */\n compact?: boolean\n /** Makes the chip a button that reacts to clicks, without holding a state. */\n clickable?: boolean\n /**\n * Where the chip leads, which makes it a link. A disabled link is made inert by\n * hand.\n */\n href?: string\n /**\n * Makes the chip something that stays chosen, bound to `v-model:selected`. It wins\n * over `href` and `clickable`.\n */\n selectable?: boolean\n /**\n * Shows a tick before the label while the chip is selected. It REPLACES whatever\n * start icon was given, so the two are never shown together.\n */\n check?: boolean\n /** The icon of that tick, a built-in check mark by default. `iconFilled` does not reach it. */\n checkIcon?: IconSource\n /** An icon before the label. The `#start` slot replaces it. */\n iconStart?: IconSource\n /** An icon after the label. The `#end` slot replaces it. */\n iconEnd?: IconSource\n /**\n * Renders `iconStart` and `iconEnd` in their filled form (the font's `FILL` axis). It has\n * no effect on the `#start`/`#end` slots, whose icons the consumer builds, nor on the tick\n * or the removal cross.\n */\n iconFilled?: boolean\n /**\n * Adds a button that asks for the chip to be removed. It only EMITS that request:\n * actually taking the chip away is the consumer's decision.\n */\n dismissible?: boolean\n /** The icon of that removal button. */\n dismissIcon?: IconSource\n /**\n * What the removal button does, in words. It falls back to the design system\n * dictionary.\n */\n dismissLabel?: string\n /** Makes the chip unusable, greyed out through the colour tokens. */\n disabled?: boolean\n}\n\nconst props = withDefaults(defineProps<ChipProps>(), {\n variant: 'soft',\n tone: 'neutral',\n color: undefined,\n shape: 'chip',\n size: 'xs',\n compact: false,\n clickable: false,\n href: undefined,\n selectable: false,\n check: false,\n checkIcon: () => checkMark,\n iconStart: undefined,\n iconEnd: undefined,\n iconFilled: false,\n dismissible: false,\n dismissIcon: () => closeIcon,\n dismissLabel: undefined,\n disabled: false,\n})\n\nconst m = useMessages()\nconst resolvedDismissLabel = computed(() => props.dismissLabel ?? m.value.common.dismiss)\n\n/**\n * Whether the chip is selected, which is also what makes it selectable at all: binding this\n * turns it into a toggle button and takes precedence over `href` and `clickable`. It starts\n * unselected.\n */\nconst selected = defineModel<boolean>('selected', { default: false })\n\ndefineEmits<{\n /** The removal button was pressed. The chip is still there: removing it is up to you. */\n dismiss: []\n}>()\n\nconst slots = defineSlots<{\n /** The label. It may be left out entirely, which gives a chip made of icons alone. */\n default?(): unknown\n /** Content before the label, which takes the place of `iconStart`. */\n start?(): unknown\n /** Content after the label, which takes the place of `iconEnd`. */\n end?(): unknown\n}>()\n\ndefineOptions({ inheritAttrs: false })\n\n// The wrapper-root split: the pill is the box a consumer positions, and the ACTION is the\n// element that is focused, named and clicked, so everything else goes there.\nconst { rootClass, rootStyle: consumerStyle, forwardedAttrs } = useRootAttrs()\n\n/* A selectable chip is therefore never a link, whatever `href` says. */\nconst {\n isLink,\n isInertLink,\n linkHref,\n attrs: actionAttrs,\n} = useInertLink({\n href: () => (props.selectable ? undefined : props.href),\n inert: () => props.disabled,\n attrs: () => forwardedAttrs.value,\n})\nconst actionTag = computed(() =>\n props.selectable ? 'button' : isLink.value ? 'a' : props.clickable ? 'button' : 'span',\n)\n\nconst rootStyle = computed<StyleValue>(() => [customColorStyle(props.color), consumerStyle.value])\n\nconst actionEl = ref<HTMLElement | null>(null)\n\nconst showCheck = computed(() => props.check && props.selectable && selected.value)\n\n// A function read by the template, never a `computed`: `slots` is not reactive, so a computed\n// would keep its first answer while a slot behind a `v-if` comes and goes.\n/**\n * An icon and no label at all: the chip becomes a square, as wide as it is tall. The default\n * slot is asked what it RENDERS, not whether it was passed: a wrapper forwarding an empty\n * label still hands one down.\n */\nfunction iconOnly() {\n return (\n flattenSlot(slots.default?.() as VNode[] | undefined).length === 0 &&\n !!(slots.start || slots.end || props.iconStart || props.iconEnd)\n )\n}\n\n// @devwarn\n// A chip drawn with an icon alone has no accessible name: the icon is decorative, so a\n// clickable, selectable or linked one is announced as a bare button or link. Nothing fails\n// visibly, hence the message.\nif (isDev) {\n const attrs = useAttrs()\n onMounted(() => {\n if (\n actionTag.value !== 'span' &&\n actionEl.value?.parentElement?.hasAttribute('data-icon-only') &&\n attrs['aria-label'] === undefined &&\n attrs['aria-labelledby'] === undefined\n ) {\n console.warn(\n '[VChip] a chip made of an icon alone has no accessible name: set aria-label or aria-labelledby on it.',\n )\n }\n })\n}\n\n// A template ref on the chip reaches the pill, a layout box; the element that is focused,\n// named and clicked is the action inside it.\ndefineExpose({\n /** Moves the focus to the chip's action: its button or link. */\n focus: (options?: FocusOptions) => actionEl.value?.focus(options),\n /** The action element, which is also where the consumer's attributes land. */\n el: actionEl,\n})\n</script>\n\n<template>\n <span\n :class=\"['v-chip v-control v-tone v-variant', rootClass]\"\n :style=\"rootStyle\"\n :data-variant=\"variant\"\n :data-tone=\"tone\"\n :data-custom=\"color !== undefined ? '' : undefined\"\n :data-shape=\"shape\"\n :data-size=\"size\"\n :data-compact=\"compact ? '' : undefined\"\n :data-selected=\"selectable && selected ? '' : undefined\"\n :data-disabled=\"disabled ? '' : undefined\"\n :data-icon-only=\"iconOnly() ? '' : undefined\"\n >\n <component\n :is=\"actionTag\"\n ref=\"actionEl\"\n :aria-disabled=\"isInertLink ? 'true' : undefined\"\n :aria-pressed=\"selectable ? selected : undefined\"\n v-bind=\"actionAttrs\"\n class=\"v-chip-action\"\n :type=\"actionTag === 'button' ? 'button' : undefined\"\n :href=\"linkHref\"\n :disabled=\"actionTag === 'button' ? disabled : undefined\"\n @click=\"selectable && !disabled && (selected = !selected)\"\n >\n <VIcon v-if=\"showCheck\" v-bind=\"iconProps(checkIcon)\" />\n <slot v-else name=\"start\">\n <VIcon v-if=\"iconStart\" v-bind=\"iconProps(iconStart)\" :filled=\"iconFilled\" />\n </slot>\n <slot />\n <slot name=\"end\">\n <VIcon v-if=\"iconEnd\" v-bind=\"iconProps(iconEnd)\" :filled=\"iconFilled\" />\n </slot>\n </component>\n <button\n v-if=\"dismissible\"\n type=\"button\"\n class=\"v-chip-dismiss\"\n :aria-label=\"resolvedDismissLabel\"\n :disabled=\"disabled\"\n @click=\"$emit('dismiss')\"\n >\n <VIcon v-bind=\"iconProps(dismissIcon)\" />\n </button>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /* The height comes from the shared size class set on this element. The scale itself\n holds five steps; the component's type restricts it to the two smallest, a chip\n larger than that being a button. */\n .v-chip {\n display: inline-flex;\n align-items: center;\n block-size: var(--control-height);\n border: 1px solid transparent;\n border-radius: var(--vectis-radius-chip);\n font-family: var(--vectis-text-family);\n font-size: var(--control-font-size);\n font-weight: var(--vectis-text-control-weight);\n line-height: var(--vectis-text-control-leading);\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 color var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-chip[data-shape='pill'] {\n border-radius: var(--vectis-radius-pill);\n }\n\n /* The tone table itself lives in styles/tones.css, in a layer below the components.\n All five tones are taken exactly as they come; the only values redefined here are\n those of a custom colour, and they win over the shared table by LAYER rather than\n by order, so no bundling can change the outcome. */\n\n /* A custom colour replaces the tone entirely. The shared table derives the four values\n every adopter reads (styles/tones.css, `.v-tone[data-custom]`); the chip adds the\n three only it paints, its hover and active steps and its outline, from the same colour\n mixed with the theme's own text and surface. */\n .v-chip[data-custom] {\n --tone-bg-solid-hover: color-mix(in oklab, var(--custom-color), var(--vectis-color-text) 8%);\n --tone-bg-solid-active: color-mix(in oklab, var(--custom-color), var(--vectis-color-text) 14%);\n --tone-border-soft: color-mix(in oklab, var(--custom-color), var(--vectis-color-surface) 60%);\n }\n\n /*\n * It COMPOUNDS `.v-variant`: the variant table weighs (0,2,0) like this rule and lives in\n * another sheet, so at equal specificity the winner would be whichever one the consumer's\n * bundler put last. At (0,3,0) it wins by construction.\n */\n .v-variant.v-chip[data-selected] {\n background: var(--tone-bg-solid);\n color: var(--tone-text-solid);\n border-color: transparent;\n }\n\n /* Hovering and pressing are conditioned on the ACTION being a real control, which\n buys two things at once: a chip that merely displays a value never lights up, and\n hovering the removal button does not repaint the whole chip as though it were\n about to be activated. */\n /* The same steps as VButton's, rule for rule: an outline sits on the soft surface while\n hovered and one tint further when pressed, and that tint is where a soft chip starts\n on hover. Held in each sheet rather than in `variants.css`, which every consumer\n downloads whether or not it renders a single button or chip. */\n .v-chip[data-variant='outline']:not([data-disabled], [data-selected]):has(\n :is(button, a).v-chip-action:hover\n ) {\n background: var(--tone-bg-soft);\n }\n\n .v-chip[data-variant='outline']:not([data-disabled], [data-selected]):has(\n :is(button, a).v-chip-action:active\n ),\n .v-chip[data-variant='soft']:not([data-disabled], [data-selected]):has(\n :is(button, a).v-chip-action:hover\n ) {\n background: color-mix(in oklab, var(--tone-bg-soft), var(--tone-text-tinted) 8%);\n }\n\n .v-chip[data-variant='soft']:not([data-disabled], [data-selected]):has(\n :is(button, a).v-chip-action:active\n ) {\n background: color-mix(in oklab, var(--tone-bg-soft), var(--tone-text-tinted) 14%);\n }\n\n .v-chip[data-variant='solid']:not([data-disabled]):has(:is(button, a).v-chip-action:hover),\n .v-chip[data-selected]:not([data-disabled]):has(:is(button, a).v-chip-action:hover) {\n background: var(--tone-bg-solid-hover);\n }\n\n .v-chip[data-variant='solid']:not([data-disabled]):has(:is(button, a).v-chip-action:active),\n .v-chip[data-selected]:not([data-disabled]):has(:is(button, a).v-chip-action:active) {\n background: var(--tone-bg-solid-active);\n }\n\n .v-chip-action {\n display: inline-flex;\n align-items: center;\n gap: var(--control-gap);\n block-size: 100%;\n padding-block: 0;\n padding-inline: var(--control-padding-inline);\n border: none;\n background: transparent;\n color: inherit;\n font: inherit;\n border-radius: inherit;\n text-decoration: none;\n cursor: default;\n }\n\n /* With an icon and no label the action becomes square, its width taken from its own\n height through the ratio rather than from a new measurement to keep in step. */\n .v-chip[data-icon-only] .v-chip-action {\n aspect-ratio: 1;\n justify-content: center;\n padding-inline: 0;\n }\n\n :is(button, a).v-chip-action {\n cursor: pointer;\n }\n\n :is(button, a).v-chip-action: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 /*\n * That matters because the cross is drawn from the icon font here, and a glyph from a font is\n * real text, to which the contrast rule applies.\n */\n .v-chip-dismiss {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n inline-size: var(--control-action-size);\n block-size: var(--control-action-size);\n margin-inline: calc(var(--vectis-space-1) * -1) var(--vectis-space-1);\n padding: 0;\n border: none;\n background: transparent;\n color: inherit;\n border-radius: var(--vectis-radius-pill);\n cursor: pointer;\n flex: none;\n }\n\n .v-chip-dismiss:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: calc(-1 * var(--vectis-focus-ring-width));\n }\n\n /*\n * A disabled chip greys out through the colour tokens, which makes it follow the dark theme\n * without a rule of its own.\n */\n .v-variant.v-chip[data-disabled] {\n background: var(--vectis-color-surface-muted);\n color: var(--vectis-color-text-subtle);\n border-color: transparent;\n }\n\n .v-variant.v-chip[data-disabled][data-variant='outline'] {\n background: transparent;\n border-color: var(--vectis-color-border);\n }\n\n .v-chip[data-disabled] :is(:is(button, a).v-chip-action, .v-chip-dismiss) {\n cursor: not-allowed;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-chip {\n transition: none;\n }\n }\n\n /*\n * The class is repeated to reach (0,6,0). The variant, hover and active rules reach (0,5,0),\n * and with the forcing turned off any of them that still won would paint its tone over the\n * selection, with HighlightText on top of it.\n */\n @media (forced-colors: active) {\n .v-chip.v-chip.v-chip.v-chip[data-selected]:not([data-disabled]) {\n forced-color-adjust: none;\n background-color: Highlight;\n color: HighlightText;\n border-color: Highlight;\n outline-color: CanvasText;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqGA,IAAM,IAAQ,GAqBR,IAAI,EAAY,GAChB,IAAuB,QAAe,EAAM,gBAAgB,EAAE,MAAM,OAAO,OAAO,GAOlF,IAAW,EAAoB,GAAC,UAA8B,GAO9D,IAAQ,EAAA,GAaR,EAAE,cAAW,WAAW,GAAe,sBAAmB,EAAa,GAGvE,EACJ,WACA,gBACA,aACA,OAAO,MACL,EAAa;GACf,YAAa,EAAM,aAAa,KAAA,IAAY,EAAM;GAClD,aAAa,EAAM;GACnB,aAAa,EAAe;EAC9B,CAAC,GACK,IAAY,QAChB,EAAM,aAAa,WAAW,EAAO,QAAQ,MAAM,EAAM,YAAY,WAAW,MAClF,GAEM,IAAY,QAA2B,CAAC,EAAiB,EAAM,KAAK,GAAG,EAAc,KAAK,CAAC,GAE3F,IAAW,EAAwB,IAAI,GAEvC,IAAY,QAAe,EAAM,SAAS,EAAM,cAAc,EAAS,KAAK;EASlF,SAAS,IAAW;GAClB,OACE,EAAY,EAAM,UAAU,CAAwB,CAAC,CAAC,WAAW,KACjE,CAAC,EAAE,EAAM,SAAS,EAAM,OAAO,EAAM,aAAa,EAAM;EAE5D;EAMA,IAAI,GAAO;GACT,IAAM,IAAQ,EAAS;GACvB,QAAgB;IACd,AACE,EAAU,UAAU,UACpB,EAAS,OAAO,eAAe,aAAa,gBAAgB,KAC5D,EAAM,kBAAkB,KAAA,KACxB,EAAM,uBAAuB,KAAA,KAE7B,QAAQ,KACN,uGACF;GAEJ,CAAC;EACH;SAIA,EAAa;GAEX,QAAQ,MAA2B,EAAS,OAAO,MAAM,CAAO;GAEhE,IAAI;EACN,CAAC,mBAIC,EA4CO,QAAA;GA3CJ,OAAK,EAAA,CAAA,qCAAwC,EAAA,CAAA,CAAS,CAAA;GACtD,OAAK,EAAE,EAAA,KAAS;GAChB,gBAAc,EAAA;GACd,aAAW,EAAA;GACX,eAAa,EAAA,UAAU,KAAA,IAAiB,KAAA,IAAR;GAChC,cAAY,EAAA;GACZ,aAAW,EAAA;GACX,gBAAc,EAAA,UAAO,KAAQ,KAAA;GAC7B,iBAAe,EAAA,cAAc,EAAA,QAAQ,KAAQ,KAAA;GAC7C,iBAAe,EAAA,WAAQ,KAAQ,KAAA;GAC/B,kBAAgB,EAAQ,IAAA,KAAU,KAAA;YAEnC,EAoBY,EAnBL,EAAA,KAAS,GADhB,EAoBY;YAlBN;GAAJ,KAAI;GACH,iBAAe,EAAA,CAAA,IAAW,SAAY,KAAA;GACtC,gBAAc,EAAA,aAAa,EAAA,QAAW,KAAA;KAC/B,EAAA,CAAA,GAAW;GACnB,OAAM;GACL,MAAM,EAAA,UAAS,WAAA,WAA2B,KAAA;GAC1C,MAAM,EAAA,CAAA;GACN,UAAU,EAAA,UAAS,WAAgB,EAAA,WAAW,KAAA;GAC9C,SAAK,AAAA,EAAA,QAAA,MAAE,EAAA,cAAU,CAAK,EAAA,aAAa,EAAA,QAAQ,CAAI,EAAA;;oBAEQ;IAA3C,EAAA,SAAA,EAAA,GAAb,EAAwD,GAAA,EAAA,EAAA,EAAA,KAAA,EAAA,GAAxB,EAAA,CAAA,CAAS,CAAC,EAAA,SAAS,CAAA,CAAA,GAAA,MAAA,EAAA,KACnD,EAEO,EAAA,QAAA,SAAA,CAAA,SAAA,CADQ,EAAA,aAAA,EAAA,GAAb,EAA6E,GAA7E,EAA6E,EAAA,KAAA,EAAA,GAA7C,EAAA,CAAA,CAAS,CAAC,EAAA,SAAS,GAAA,EAAI,QAAQ,EAAA,WAAU,CAAA,GAAA,MAAA,IAAA,CAAA,QAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,GAAA,KAAA,GAAA,CAAA;IAE3E,EAAQ,EAAA,QAAA,SAAA;IACR,EAEO,EAAA,QAAA,OAAA,CAAA,SAAA,CADQ,EAAA,WAAA,EAAA,GAAb,EAAyE,GAAzE,EAAyE,EAAA,KAAA,EAAA,GAA3C,EAAA,CAAA,CAAS,CAAC,EAAA,OAAO,GAAA,EAAI,QAAQ,EAAA,WAAU,CAAA,GAAA,MAAA,IAAA,CAAA,QAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,CAAA;;;;;;;;;OAIjE,EAAA,eAAA,EAAA,GADR,EASS,UAAA;;GAPP,MAAK;GACL,OAAM;GACL,cAAY,EAAA;GACZ,UAAU,EAAA;GACV,SAAK,AAAA,EAAA,QAAA,MAAEA,EAAAA,MAAK,SAAA;MAEb,EAAyC,GAAA,EAAA,EAA1B,EAAA,CAAA,CAAS,CAAC,EAAA,WAAW,CAAA,CAAA,GAAA,MAAA,EAAA,CAAA,GAAA,GAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,GAAA,IAAA,CAAA"}
1
+ {"version":3,"file":"VChip.vue_vue_type_script_setup_true_lang.js","names":["$emit"],"sources":["../../../src/components/VChip/VChip.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @a11y\n/**\n * Choose native links or buttons for chip actions. Dismissal is a sibling button because nested\n * buttons are invalid and inaccessible; inert links need a JS bridge.\n */\n\nimport { computed, onMounted, ref, useAttrs } from 'vue'\nimport type { StyleValue, VNode } from 'vue'\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\n// Neither import may be named after a prop (`check`, `checkIcon`): every top-level binding of a\n// `<script setup>` reaches the template, where it shadows the prop of that name.\nimport { check as checkMark } from '../VIcon/icons/check'\nimport { close as closeIcon } from '../VIcon/icons/close'\nimport type { IconSource } from '../VIcon/types'\nimport { useMessages } from '../../i18n/state'\n\nimport { useInertLink } from '../../composables/useInertLink'\nimport { useRootAttrs } from '../../composables/useRootAttrs'\nimport { customColorStyle } from '../../utils/css'\nimport { isDev } from '../../utils/env'\nimport { flattenSlot } from '../../utils/vnode'\n\n/** How much visual weight the chip carries. */\nexport type ChipVariant = 'soft' | 'solid' | 'outline'\n\n/** What the chip means, in colour. */\nexport type ChipTone = 'neutral' | 'accent' | 'danger' | 'success' | 'warning'\n\n/** The silhouette: softly rounded, or a full pill. */\nexport type ChipShape = 'chip' | 'pill'\n\n/** The height of the chip: 24 or 32 pixels. */\nexport type ChipSize = 'xs' | 'sm'\n\ninterface ChipProps {\n /**\n * How strongly the chip is painted: a tinted background, the full colour, or a\n * border alone.\n */\n variant?: ChipVariant\n /**\n * What the chip means, expressed as a colour: `neutral` by default, then `accent` for\n * something singled out and `danger`/ `success`/ `warning` for a state being reported.\n */\n tone?: ChipTone\n /** A colour of your own (hex, CSS name or `oklch()`), which REPLACES the tone. */\n color?: string\n /** The silhouette: softly rounded corners, or a full pill. */\n shape?: ChipShape\n /** The height of the chip. */\n size?: ChipSize\n /** Takes 4px off the height, leaving the padding, the text and the icons as they are. */\n compact?: boolean\n /** Makes the chip a button that reacts to clicks, without holding a state. */\n clickable?: boolean\n /**\n * Where the chip leads, which makes it a link. A disabled link is made inert by\n * hand.\n */\n href?: string\n /**\n * Makes the chip something that stays chosen, bound to `v-model:selected`. It wins\n * over `href` and `clickable`.\n */\n selectable?: boolean\n /**\n * Shows a tick before the label while the chip is selected. It REPLACES whatever\n * start icon was given, so the two are never shown together.\n */\n check?: boolean\n /** The icon of that tick, a built-in check mark by default. `iconFilled` does not reach it. */\n checkIcon?: IconSource\n /** An icon before the label. The `#start` slot replaces it. */\n iconStart?: IconSource\n /** An icon after the label. The `#end` slot replaces it. */\n iconEnd?: IconSource\n /**\n * Renders `iconStart` and `iconEnd` in their filled form (the font's `FILL` axis). It has\n * no effect on the `#start`/`#end` slots, whose icons the consumer builds, nor on the tick\n * or the removal cross.\n */\n iconFilled?: boolean\n /**\n * Adds a button that asks for the chip to be removed. It only EMITS that request:\n * actually taking the chip away is the consumer's decision.\n */\n dismissible?: boolean\n /** The icon of that removal button. */\n dismissIcon?: IconSource\n /**\n * What the removal button does, in words. It falls back to the design system\n * dictionary.\n */\n dismissLabel?: string\n /** Makes the chip unusable, greyed out through the colour tokens. */\n disabled?: boolean\n}\n\nconst props = withDefaults(defineProps<ChipProps>(), {\n variant: 'soft',\n tone: 'neutral',\n color: undefined,\n shape: 'chip',\n size: 'xs',\n compact: false,\n clickable: false,\n href: undefined,\n selectable: false,\n check: false,\n checkIcon: () => checkMark,\n iconStart: undefined,\n iconEnd: undefined,\n iconFilled: false,\n dismissible: false,\n dismissIcon: () => closeIcon,\n dismissLabel: undefined,\n disabled: false,\n})\n\nconst m = useMessages()\nconst resolvedDismissLabel = computed(() => props.dismissLabel ?? m.value.common.dismiss)\n\n/**\n * Whether the chip is selected, which is also what makes it selectable at all: binding this\n * turns it into a toggle button and takes precedence over `href` and `clickable`. It starts\n * unselected.\n */\nconst selected = defineModel<boolean>('selected', { default: false })\n\ndefineEmits<{\n /** The removal button was pressed. The chip is still there: removing it is up to you. */\n dismiss: []\n}>()\n\nconst slots = defineSlots<{\n /** The label. It may be left out entirely, which gives a chip made of icons alone. */\n default?(): unknown\n /** Content before the label, which takes the place of `iconStart`. */\n start?(): unknown\n /** Content after the label, which takes the place of `iconEnd`. */\n end?(): unknown\n}>()\n\ndefineOptions({ inheritAttrs: false })\n\n// The wrapper-root split: the pill is the box a consumer positions, and the ACTION is the\n// element that is focused, named and clicked, so everything else goes there.\nconst { rootClass, rootStyle: consumerStyle, forwardedAttrs } = useRootAttrs()\n\n/* A selectable chip is therefore never a link, whatever `href` says. */\nconst {\n isLink,\n isInertLink,\n linkHref,\n attrs: actionAttrs,\n} = useInertLink({\n href: () => (props.selectable ? undefined : props.href),\n inert: () => props.disabled,\n attrs: () => forwardedAttrs.value,\n})\nconst actionTag = computed(() =>\n props.selectable ? 'button' : isLink.value ? 'a' : props.clickable ? 'button' : 'span',\n)\n\nconst rootStyle = computed<StyleValue>(() => [customColorStyle(props.color), consumerStyle.value])\n\nconst actionEl = ref<HTMLElement | null>(null)\n\nconst showCheck = computed(() => props.check && props.selectable && selected.value)\n\n// A function read by the template, never a `computed`: `slots` is not reactive, so a computed\n// would keep its first answer while a slot behind a `v-if` comes and goes.\n/**\n * An icon and no label at all: the chip becomes a square, as wide as it is tall. The default\n * slot is asked what it RENDERS, not whether it was passed: a wrapper forwarding an empty\n * label still hands one down.\n */\nfunction iconOnly() {\n return (\n flattenSlot(slots.default?.() as VNode[] | undefined).length === 0 &&\n !!(slots.start || slots.end || props.iconStart || props.iconEnd)\n )\n}\n\n// @devwarn\n// A chip drawn with an icon alone has no accessible name: the icon is decorative, so a\n// clickable, selectable or linked one is announced as a bare button or link. Nothing fails\n// visibly, hence the message.\nif (isDev) {\n const attrs = useAttrs()\n onMounted(() => {\n if (\n actionTag.value !== 'span' &&\n actionEl.value?.parentElement?.hasAttribute('data-icon-only') &&\n attrs['aria-label'] === undefined &&\n attrs['aria-labelledby'] === undefined\n ) {\n console.warn(\n '[VChip] a chip made of an icon alone has no accessible name: set aria-label or aria-labelledby on it.',\n )\n }\n })\n}\n\n// A template ref on the chip reaches the pill, a layout box; the element that is focused,\n// named and clicked is the action inside it.\ndefineExpose({\n /** Moves the focus to the chip's action: its button or link. */\n focus: (options?: FocusOptions) => actionEl.value?.focus(options),\n /** The action element, which is also where the consumer's attributes land. */\n el: actionEl,\n})\n</script>\n\n<template>\n <span\n :class=\"['v-chip v-control v-tone v-variant', rootClass]\"\n :style=\"rootStyle\"\n :data-variant=\"variant\"\n :data-tone=\"tone\"\n :data-custom=\"color !== undefined ? '' : undefined\"\n :data-shape=\"shape\"\n :data-size=\"size\"\n :data-compact=\"compact ? '' : undefined\"\n :data-selected=\"selectable && selected ? '' : undefined\"\n :data-disabled=\"disabled ? '' : undefined\"\n :data-icon-only=\"iconOnly() ? '' : undefined\"\n >\n <component\n :is=\"actionTag\"\n ref=\"actionEl\"\n :aria-disabled=\"isInertLink ? 'true' : undefined\"\n :aria-pressed=\"selectable ? selected : undefined\"\n v-bind=\"actionAttrs\"\n class=\"v-chip-action\"\n :type=\"actionTag === 'button' ? 'button' : undefined\"\n :href=\"linkHref\"\n :disabled=\"actionTag === 'button' ? disabled : undefined\"\n @click=\"selectable && !disabled && (selected = !selected)\"\n >\n <VIcon v-if=\"showCheck\" v-bind=\"iconProps(checkIcon)\" />\n <slot v-else name=\"start\">\n <VIcon v-if=\"iconStart\" v-bind=\"iconProps(iconStart)\" :filled=\"iconFilled\" />\n </slot>\n <slot />\n <slot name=\"end\">\n <VIcon v-if=\"iconEnd\" v-bind=\"iconProps(iconEnd)\" :filled=\"iconFilled\" />\n </slot>\n </component>\n <button\n v-if=\"dismissible\"\n type=\"button\"\n class=\"v-chip-dismiss\"\n :aria-label=\"resolvedDismissLabel\"\n :disabled=\"disabled\"\n @click=\"$emit('dismiss')\"\n >\n <VIcon v-bind=\"iconProps(dismissIcon)\" />\n </button>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /* The height comes from the shared size class set on this element. The scale itself\n holds five steps; the component's type restricts it to the two smallest, a chip\n larger than that being a button. */\n .v-chip {\n display: inline-flex;\n align-items: center;\n block-size: var(--control-height);\n border: 1px solid transparent;\n border-radius: var(--vectis-radius-chip);\n font-family: var(--vectis-text-family);\n font-size: var(--control-font-size);\n font-weight: var(--vectis-text-control-weight);\n line-height: var(--vectis-text-control-leading);\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 color var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-chip[data-shape='pill'] {\n border-radius: var(--vectis-radius-pill);\n }\n\n /* The tone table itself lives in styles/tones.css, in a layer below the components.\n All five tones are taken exactly as they come; the only values redefined here are\n those of a custom colour, and they win over the shared table by LAYER rather than\n by order, so no bundling can change the outcome. */\n\n /* A custom colour replaces the tone entirely. The shared table derives the four values\n every adopter reads (styles/tones.css, `.v-tone[data-custom]`); the chip adds the\n three only it paints, its hover and active steps and its outline, from the same colour\n mixed with the theme's own text and surface. */\n .v-chip[data-custom] {\n --tone-bg-solid-hover: color-mix(in oklab, var(--custom-color), var(--vectis-color-text) 8%);\n --tone-bg-solid-active: color-mix(in oklab, var(--custom-color), var(--vectis-color-text) 14%);\n --tone-border-soft: color-mix(in oklab, var(--custom-color), var(--vectis-color-surface) 60%);\n }\n\n /*\n * It COMPOUNDS `.v-variant`: the variant table weighs (0,2,0) like this rule and lives in\n * another sheet, so at equal specificity the winner would be whichever one the consumer's\n * bundler put last. At (0,3,0) it wins by construction.\n */\n .v-variant.v-chip[data-selected] {\n background: var(--tone-bg-solid);\n color: var(--tone-text-solid);\n border-color: transparent;\n }\n\n /* Hovering and pressing are conditioned on the ACTION being a real control, which\n buys two things at once: a chip that merely displays a value never lights up, and\n hovering the removal button does not repaint the whole chip as though it were\n about to be activated. */\n /* The same steps as VButton's, rule for rule: an outline sits on the soft surface while\n hovered and one tint further when pressed, and that tint is where a soft chip starts\n on hover. Held in each sheet rather than in `variants.css`, which every consumer\n downloads whether or not it renders a single button or chip. */\n .v-chip[data-variant='outline']:not([data-disabled], [data-selected]):has(\n :is(button, a).v-chip-action:hover\n ) {\n background: var(--tone-bg-soft);\n }\n\n .v-chip[data-variant='outline']:not([data-disabled], [data-selected]):has(\n :is(button, a).v-chip-action:active\n ),\n .v-chip[data-variant='soft']:not([data-disabled], [data-selected]):has(\n :is(button, a).v-chip-action:hover\n ) {\n background: color-mix(in oklab, var(--tone-bg-soft), var(--tone-text-tinted) 8%);\n }\n\n .v-chip[data-variant='soft']:not([data-disabled], [data-selected]):has(\n :is(button, a).v-chip-action:active\n ) {\n background: color-mix(in oklab, var(--tone-bg-soft), var(--tone-text-tinted) 14%);\n }\n\n .v-chip[data-variant='solid']:not([data-disabled]):has(:is(button, a).v-chip-action:hover),\n .v-chip[data-selected]:not([data-disabled]):has(:is(button, a).v-chip-action:hover) {\n background: var(--tone-bg-solid-hover);\n }\n\n .v-chip[data-variant='solid']:not([data-disabled]):has(:is(button, a).v-chip-action:active),\n .v-chip[data-selected]:not([data-disabled]):has(:is(button, a).v-chip-action:active) {\n background: var(--tone-bg-solid-active);\n }\n\n .v-chip-action {\n display: inline-flex;\n align-items: center;\n gap: var(--control-gap);\n block-size: 100%;\n padding-block: 0;\n padding-inline: var(--control-padding-inline);\n border: none;\n background: transparent;\n color: inherit;\n font: inherit;\n border-radius: inherit;\n text-decoration: none;\n cursor: default;\n }\n\n /* With an icon and no label the action becomes square, its width taken from its own\n height through the ratio rather than from a new measurement to keep in step. */\n .v-chip[data-icon-only] .v-chip-action {\n aspect-ratio: 1;\n justify-content: center;\n padding-inline: 0;\n }\n\n :is(button, a).v-chip-action {\n cursor: pointer;\n }\n\n :is(button, a).v-chip-action: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 /*\n * The cross inherits the chip's text colour rather than a muted one: drawn from the icon font,\n * it is real text, to which the text contrast rule applies.\n */\n .v-chip-dismiss {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n inline-size: var(--control-action-size);\n block-size: var(--control-action-size);\n margin-inline: calc(var(--vectis-space-1) * -1) var(--vectis-space-1);\n padding: 0;\n border: none;\n background: transparent;\n color: inherit;\n border-radius: var(--vectis-radius-pill);\n cursor: pointer;\n flex: none;\n }\n\n .v-chip-dismiss:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: calc(-1 * var(--vectis-focus-ring-width));\n }\n\n /*\n * A disabled chip greys out through the colour tokens, which makes it follow the dark theme\n * without a rule of its own.\n */\n .v-variant.v-chip[data-disabled] {\n background: var(--vectis-color-surface-muted);\n color: var(--vectis-color-text-subtle);\n border-color: transparent;\n }\n\n .v-variant.v-chip[data-disabled][data-variant='outline'] {\n background: transparent;\n border-color: var(--vectis-color-border);\n }\n\n .v-chip[data-disabled] :is(:is(button, a).v-chip-action, .v-chip-dismiss) {\n cursor: not-allowed;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-chip {\n transition: none;\n }\n }\n\n /*\n * The class is repeated to reach (0,6,0). The variant, hover and active rules reach (0,5,0),\n * and with the forcing turned off any of them that still won would paint its tone over the\n * selection, with HighlightText on top of it.\n */\n @media (forced-colors: active) {\n .v-chip.v-chip.v-chip.v-chip[data-selected]:not([data-disabled]) {\n forced-color-adjust: none;\n background-color: Highlight;\n color: HighlightText;\n border-color: Highlight;\n outline-color: CanvasText;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqGA,IAAM,IAAQ,GAqBR,IAAI,EAAY,GAChB,IAAuB,QAAe,EAAM,gBAAgB,EAAE,MAAM,OAAO,OAAO,GAOlF,IAAW,EAAoB,GAAC,UAA8B,GAO9D,IAAQ,EAAA,GAaR,EAAE,cAAW,WAAW,GAAe,sBAAmB,EAAa,GAGvE,EACJ,WACA,gBACA,aACA,OAAO,MACL,EAAa;GACf,YAAa,EAAM,aAAa,KAAA,IAAY,EAAM;GAClD,aAAa,EAAM;GACnB,aAAa,EAAe;EAC9B,CAAC,GACK,IAAY,QAChB,EAAM,aAAa,WAAW,EAAO,QAAQ,MAAM,EAAM,YAAY,WAAW,MAClF,GAEM,IAAY,QAA2B,CAAC,EAAiB,EAAM,KAAK,GAAG,EAAc,KAAK,CAAC,GAE3F,IAAW,EAAwB,IAAI,GAEvC,IAAY,QAAe,EAAM,SAAS,EAAM,cAAc,EAAS,KAAK;EASlF,SAAS,IAAW;GAClB,OACE,EAAY,EAAM,UAAU,CAAwB,CAAC,CAAC,WAAW,KACjE,CAAC,EAAE,EAAM,SAAS,EAAM,OAAO,EAAM,aAAa,EAAM;EAE5D;EAMA,IAAI,GAAO;GACT,IAAM,IAAQ,EAAS;GACvB,QAAgB;IACd,AACE,EAAU,UAAU,UACpB,EAAS,OAAO,eAAe,aAAa,gBAAgB,KAC5D,EAAM,kBAAkB,KAAA,KACxB,EAAM,uBAAuB,KAAA,KAE7B,QAAQ,KACN,uGACF;GAEJ,CAAC;EACH;SAIA,EAAa;GAEX,QAAQ,MAA2B,EAAS,OAAO,MAAM,CAAO;GAEhE,IAAI;EACN,CAAC,mBAIC,EA4CO,QAAA;GA3CJ,OAAK,EAAA,CAAA,qCAAwC,EAAA,CAAA,CAAS,CAAA;GACtD,OAAK,EAAE,EAAA,KAAS;GAChB,gBAAc,EAAA;GACd,aAAW,EAAA;GACX,eAAa,EAAA,UAAU,KAAA,IAAiB,KAAA,IAAR;GAChC,cAAY,EAAA;GACZ,aAAW,EAAA;GACX,gBAAc,EAAA,UAAO,KAAQ,KAAA;GAC7B,iBAAe,EAAA,cAAc,EAAA,QAAQ,KAAQ,KAAA;GAC7C,iBAAe,EAAA,WAAQ,KAAQ,KAAA;GAC/B,kBAAgB,EAAQ,IAAA,KAAU,KAAA;YAEnC,EAoBY,EAnBL,EAAA,KAAS,GADhB,EAoBY;YAlBN;GAAJ,KAAI;GACH,iBAAe,EAAA,CAAA,IAAW,SAAY,KAAA;GACtC,gBAAc,EAAA,aAAa,EAAA,QAAW,KAAA;KAC/B,EAAA,CAAA,GAAW;GACnB,OAAM;GACL,MAAM,EAAA,UAAS,WAAA,WAA2B,KAAA;GAC1C,MAAM,EAAA,CAAA;GACN,UAAU,EAAA,UAAS,WAAgB,EAAA,WAAW,KAAA;GAC9C,SAAK,AAAA,EAAA,QAAA,MAAE,EAAA,cAAU,CAAK,EAAA,aAAa,EAAA,QAAQ,CAAI,EAAA;;oBAEQ;IAA3C,EAAA,SAAA,EAAA,GAAb,EAAwD,GAAA,EAAA,EAAA,EAAA,KAAA,EAAA,GAAxB,EAAA,CAAA,CAAS,CAAC,EAAA,SAAS,CAAA,CAAA,GAAA,MAAA,EAAA,KACnD,EAEO,EAAA,QAAA,SAAA,CAAA,SAAA,CADQ,EAAA,aAAA,EAAA,GAAb,EAA6E,GAA7E,EAA6E,EAAA,KAAA,EAAA,GAA7C,EAAA,CAAA,CAAS,CAAC,EAAA,SAAS,GAAA,EAAI,QAAQ,EAAA,WAAU,CAAA,GAAA,MAAA,IAAA,CAAA,QAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,GAAA,KAAA,GAAA,CAAA;IAE3E,EAAQ,EAAA,QAAA,SAAA;IACR,EAEO,EAAA,QAAA,OAAA,CAAA,SAAA,CADQ,EAAA,WAAA,EAAA,GAAb,EAAyE,GAAzE,EAAyE,EAAA,KAAA,EAAA,GAA3C,EAAA,CAAA,CAAS,CAAC,EAAA,OAAO,GAAA,EAAI,QAAQ,EAAA,WAAU,CAAA,GAAA,MAAA,IAAA,CAAA,QAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,CAAA;;;;;;;;;OAIjE,EAAA,eAAA,EAAA,GADR,EASS,UAAA;;GAPP,MAAK;GACL,OAAM;GACL,cAAY,EAAA;GACZ,UAAU,EAAA;GACV,SAAK,AAAA,EAAA,QAAA,MAAEA,EAAAA,MAAK,SAAA;MAEb,EAAyC,GAAA,EAAA,EAA1B,EAAA,CAAA,CAAS,CAAC,EAAA,WAAW,CAAA,CAAA,GAAA,MAAA,EAAA,CAAA,GAAA,GAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,GAAA,IAAA,CAAA"}
@@ -0,0 +1,2 @@
1
+ @layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
2
+ @layer vectis.components{.v-color-input{anchor-scope:--color-input-anchor;inline-size:100%;font-family:var(--vectis-text-family);display:block}.v-color-input .v-input-field{anchor-name:--color-input-anchor}.v-color-input .v-input-control{font-variant-numeric:tabular-nums;direction:ltr}.v-color-input .v-input-control:dir(rtl){text-align:right}span.v-color-input-swatch{flex:none;display:inline-flex}.v-color-input-chip{inline-size:var(--vectis-icon-size);block-size:var(--vectis-icon-size);border:1px solid var(--vectis-color-border-on-fill);border-radius:var(--vectis-radius-interactive);background:linear-gradient(var(--color-input-chip,transparent), var(--color-input-chip,transparent)) border-box, repeating-conic-gradient(var(--vectis-color-border) 0 25%, var(--vectis-color-surface) 0 50%) 0 0 / var(--vectis-control-size-color-picker-checker) var(--vectis-control-size-color-picker-checker) padding-box;forced-color-adjust:none}.v-color-input[data-disabled] .v-color-input-chip{opacity:.5}.v-popover-panel.v-color-input-panel{inline-size:max-content;padding:0}}