vectis-ui 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (508) hide show
  1. package/dist/components/VAccordion/VAccordion.css +1 -1
  2. package/dist/components/VAccordion/VAccordion.d.ts +6 -5
  3. package/dist/components/VAccordion/VAccordion.js.map +1 -1
  4. package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
  5. package/dist/components/VAccordion/VAccordionItem.css +1 -1
  6. package/dist/components/VAccordion/VAccordionItem.d.ts +1 -1
  7. package/dist/components/VAccordion/VAccordionItem.js.map +1 -1
  8. package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  9. package/dist/components/VAlert/VAlert.css +2 -0
  10. package/dist/components/VAlert/VAlert.d.ts +73 -0
  11. package/dist/components/VAlert/VAlert.js +9 -0
  12. package/dist/components/VAlert/VAlert.js.map +1 -0
  13. package/dist/components/VAlert/VAlert.vue_vue_type_script_setup_true_lang.js +96 -0
  14. package/dist/components/VAlert/VAlert.vue_vue_type_script_setup_true_lang.js.map +1 -0
  15. package/dist/components/VAvatar/VAvatar.d.ts +2 -2
  16. package/dist/components/VAvatar/VAvatarGroup.d.ts +1 -1
  17. package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js +8 -8
  18. package/dist/components/VBadge/VBadge.d.ts +3 -3
  19. package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js +9 -9
  20. package/dist/components/VButton/VButton.d.ts +4 -4
  21. package/dist/components/VButton/VButtonGroup.css +1 -1
  22. package/dist/components/VButton/VButtonGroup.d.ts +2 -2
  23. package/dist/components/VButton/VButtonGroup.js.map +1 -1
  24. package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  25. package/dist/components/VCalendar/VCalendar.css +1 -1
  26. package/dist/components/VCalendar/VCalendar.d.ts +7 -1
  27. package/dist/components/VCalendar/VCalendar.js.map +1 -1
  28. package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js +20 -18
  29. package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  30. package/dist/components/VCalendar/VCalendarEvent.js.map +1 -1
  31. package/dist/components/VCalendar/VCalendarEvent.vue_vue_type_script_setup_true_lang.js.map +1 -1
  32. package/dist/components/VCalendar/VCalendarMonth.css +1 -1
  33. package/dist/components/VCalendar/VCalendarMonth.d.ts +2 -2
  34. package/dist/components/VCalendar/VCalendarMonth.js.map +1 -1
  35. package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js.map +1 -1
  36. package/dist/components/VCalendar/VCalendarTimeGrid.css +1 -1
  37. package/dist/components/VCalendar/VCalendarTimeGrid.d.ts +3 -3
  38. package/dist/components/VCalendar/VCalendarTimeGrid.js.map +1 -1
  39. package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js.map +1 -1
  40. package/dist/components/VCalendar/VCalendarYear.css +1 -1
  41. package/dist/components/VCalendar/VCalendarYear.js.map +1 -1
  42. package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js.map +1 -1
  43. package/dist/components/VCalendar/gesture.d.ts +1 -16
  44. package/dist/components/VCalendar/gesture.js +1 -1
  45. package/dist/components/VCalendar/gesture.js.map +1 -1
  46. package/dist/components/VCalendar/types.d.ts +2 -0
  47. package/dist/components/VCard/VCard.css +2 -0
  48. package/dist/components/VCard/VCard.d.ts +87 -0
  49. package/dist/components/VCard/VCard.js +9 -0
  50. package/dist/components/VCard/VCard.js.map +1 -0
  51. package/dist/components/VCard/VCard.vue_vue_type_script_setup_true_lang.js +103 -0
  52. package/dist/components/VCard/VCard.vue_vue_type_script_setup_true_lang.js.map +1 -0
  53. package/dist/components/VCarousel/VCarousel.d.ts +1 -1
  54. package/dist/components/VCarousel/VCarousel.js.map +1 -1
  55. package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js +18 -18
  56. package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  57. package/dist/components/VCheckbox/VCheckMark.css +2 -0
  58. package/dist/components/VCheckbox/VCheckMark.js +9 -0
  59. package/dist/components/VCheckbox/VCheckMark.js.map +1 -0
  60. package/dist/components/VCheckbox/VCheckMark.vue_vue_type_script_setup_true_lang.js +33 -0
  61. package/dist/components/VCheckbox/VCheckMark.vue_vue_type_script_setup_true_lang.js.map +1 -0
  62. package/dist/components/VCheckbox/VCheckbox.css +1 -1
  63. package/dist/components/VCheckbox/VCheckbox.d.ts +8 -3
  64. package/dist/components/VCheckbox/VCheckbox.js.map +1 -1
  65. package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js +54 -69
  66. package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  67. package/dist/components/VChip/VChip.d.ts +6 -6
  68. package/dist/components/VChip/VChip.js.map +1 -1
  69. package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js +26 -26
  70. package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  71. package/dist/components/VColorInput/VColorInput.css +2 -0
  72. package/dist/components/VColorInput/VColorInput.d.ts +113 -0
  73. package/dist/components/VColorInput/VColorInput.js +9 -0
  74. package/dist/components/VColorInput/VColorInput.js.map +1 -0
  75. package/dist/components/VColorInput/VColorInput.vue_vue_type_script_setup_true_lang.js +230 -0
  76. package/dist/components/VColorInput/VColorInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  77. package/dist/components/VColorPicker/VColorPicker.css +2 -0
  78. package/dist/components/VColorPicker/VColorPicker.d.ts +67 -0
  79. package/dist/components/VColorPicker/VColorPicker.js +9 -0
  80. package/dist/components/VColorPicker/VColorPicker.js.map +1 -0
  81. package/dist/components/VColorPicker/VColorPicker.vue_vue_type_script_setup_true_lang.js +390 -0
  82. package/dist/components/VColorPicker/VColorPicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
  83. package/dist/components/VColorPicker/color.d.ts +42 -0
  84. package/dist/components/VColorPicker/color.js +158 -0
  85. package/dist/components/VColorPicker/color.js.map +1 -0
  86. package/dist/components/VCombobox/VCombobox.css +1 -1
  87. package/dist/components/VCombobox/VCombobox.d.ts +46 -60
  88. package/dist/components/VCombobox/VCombobox.js.map +1 -1
  89. package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js +271 -372
  90. package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  91. package/dist/components/VCommandPalette/VCommandPalette.css +2 -0
  92. package/dist/components/VCommandPalette/VCommandPalette.d.ts +163 -0
  93. package/dist/components/VCommandPalette/VCommandPalette.js +9 -0
  94. package/dist/components/VCommandPalette/VCommandPalette.js.map +1 -0
  95. package/dist/components/VCommandPalette/VCommandPalette.vue_vue_type_script_setup_true_lang.js +321 -0
  96. package/dist/components/VCommandPalette/VCommandPalette.vue_vue_type_script_setup_true_lang.js.map +1 -0
  97. package/dist/components/VCommandPalette/VCommandPaletteItem.css +2 -0
  98. package/dist/components/VCommandPalette/VCommandPaletteItem.d.ts +38 -0
  99. package/dist/components/VCommandPalette/VCommandPaletteItem.js +9 -0
  100. package/dist/components/VCommandPalette/VCommandPaletteItem.js.map +1 -0
  101. package/dist/components/VCommandPalette/VCommandPaletteItem.vue_vue_type_script_setup_true_lang.js +69 -0
  102. package/dist/components/VCommandPalette/VCommandPaletteItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
  103. package/dist/components/VContextMenu/VContextMenu.css +2 -0
  104. package/dist/components/VContextMenu/VContextMenu.d.ts +66 -0
  105. package/dist/components/VContextMenu/VContextMenu.js +9 -0
  106. package/dist/components/VContextMenu/VContextMenu.js.map +1 -0
  107. package/dist/components/VContextMenu/VContextMenu.vue_vue_type_script_setup_true_lang.js +148 -0
  108. package/dist/components/VContextMenu/VContextMenu.vue_vue_type_script_setup_true_lang.js.map +1 -0
  109. package/dist/components/VDataTable/VDataTable.css +1 -1
  110. package/dist/components/VDataTable/VDataTable.d.ts +41 -16
  111. package/dist/components/VDataTable/VDataTable.js.map +1 -1
  112. package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js +307 -195
  113. package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  114. package/dist/components/VDateInput/VDateInput.d.ts +27 -7
  115. package/dist/components/VDateInput/VDateInput.js.map +1 -1
  116. package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js +170 -162
  117. package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  118. package/dist/components/VDatePicker/VDatePicker.d.ts +3 -3
  119. package/dist/components/VDatePicker/VDatePicker.js.map +1 -1
  120. package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js +228 -227
  121. package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  122. package/dist/components/VDatePicker/keyboard.d.ts +7 -7
  123. package/dist/components/VDatePicker/keyboard.js +8 -6
  124. package/dist/components/VDatePicker/keyboard.js.map +1 -1
  125. package/dist/components/VDatePicker/names.js +16 -20
  126. package/dist/components/VDatePicker/names.js.map +1 -1
  127. package/dist/components/VDialog/VDialog.d.ts +2 -4
  128. package/dist/components/VDialog/VDialog.js.map +1 -1
  129. package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js +46 -77
  130. package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  131. package/dist/components/VDrawer/VDrawer.css +2 -0
  132. package/dist/components/VDrawer/VDrawer.d.ts +102 -0
  133. package/dist/components/VDrawer/VDrawer.js +9 -0
  134. package/dist/components/VDrawer/VDrawer.js.map +1 -0
  135. package/dist/components/VDrawer/VDrawer.vue_vue_type_script_setup_true_lang.js +128 -0
  136. package/dist/components/VDrawer/VDrawer.vue_vue_type_script_setup_true_lang.js.map +1 -0
  137. package/dist/components/VEmptyState/VEmptyState.css +2 -0
  138. package/dist/components/VEmptyState/VEmptyState.d.ts +43 -0
  139. package/dist/components/VEmptyState/VEmptyState.js +9 -0
  140. package/dist/components/VEmptyState/VEmptyState.js.map +1 -0
  141. package/dist/components/VEmptyState/VEmptyState.vue_vue_type_script_setup_true_lang.js +48 -0
  142. package/dist/components/VEmptyState/VEmptyState.vue_vue_type_script_setup_true_lang.js.map +1 -0
  143. package/dist/components/VField/VField.css +2 -0
  144. package/dist/components/VField/VField.d.ts +84 -0
  145. package/dist/components/VField/VField.js +9 -0
  146. package/dist/components/VField/VField.js.map +1 -0
  147. package/dist/components/VField/VField.vue_vue_type_script_setup_true_lang.js +99 -0
  148. package/dist/components/VField/VField.vue_vue_type_script_setup_true_lang.js.map +1 -0
  149. package/dist/components/VField/VFieldAnnouncer.d.ts +7 -0
  150. package/dist/components/VField/VFieldAnnouncer.js +7 -0
  151. package/dist/components/VField/VFieldAnnouncer.js.map +1 -0
  152. package/dist/components/VField/VFieldAnnouncer.vue_vue_type_script_setup_true_lang.js +19 -0
  153. package/dist/components/VField/VFieldAnnouncer.vue_vue_type_script_setup_true_lang.js.map +1 -0
  154. package/dist/components/VField/VFieldMessage.d.ts +11 -0
  155. package/dist/components/VField/VFieldMessage.js +7 -0
  156. package/dist/components/VField/VFieldMessage.js.map +1 -0
  157. package/dist/components/VField/VFieldMessage.vue_vue_type_script_setup_true_lang.js +32 -0
  158. package/dist/components/VField/VFieldMessage.vue_vue_type_script_setup_true_lang.js.map +1 -0
  159. package/dist/components/VFieldset/VFieldset.css +2 -0
  160. package/dist/components/VFieldset/VFieldset.d.ts +52 -0
  161. package/dist/components/VFieldset/VFieldset.js +9 -0
  162. package/dist/components/VFieldset/VFieldset.js.map +1 -0
  163. package/dist/components/VFieldset/VFieldset.vue_vue_type_script_setup_true_lang.js +63 -0
  164. package/dist/components/VFieldset/VFieldset.vue_vue_type_script_setup_true_lang.js.map +1 -0
  165. package/dist/components/VFileInput/VFileInput.css +1 -1
  166. package/dist/components/VFileInput/VFileInput.d.ts +31 -7
  167. package/dist/components/VFileInput/VFileInput.js.map +1 -1
  168. package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js +168 -161
  169. package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  170. package/dist/components/VFilePicker/VFilePicker.d.ts +4 -4
  171. package/dist/components/VHotkeys/VHotkeys.css +1 -1
  172. package/dist/components/VHotkeys/VHotkeys.js.map +1 -1
  173. package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js +27 -30
  174. package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js.map +1 -1
  175. package/dist/components/VHotkeys/platform.d.ts +2 -0
  176. package/dist/components/VHotkeys/platform.js +24 -5
  177. package/dist/components/VHotkeys/platform.js.map +1 -1
  178. package/dist/components/VHoverCard/VHoverCard.css +2 -0
  179. package/dist/components/VHoverCard/VHoverCard.d.ts +62 -0
  180. package/dist/components/VHoverCard/VHoverCard.js +9 -0
  181. package/dist/components/VHoverCard/VHoverCard.js.map +1 -0
  182. package/dist/components/VHoverCard/VHoverCard.vue_vue_type_script_setup_true_lang.js +97 -0
  183. package/dist/components/VHoverCard/VHoverCard.vue_vue_type_script_setup_true_lang.js.map +1 -0
  184. package/dist/components/VIcon/icons/add.d.ts +5 -0
  185. package/dist/components/VIcon/icons/add.js +9 -0
  186. package/dist/components/VIcon/icons/add.js.map +1 -0
  187. package/dist/components/VIcon/icons/colorize.d.ts +5 -0
  188. package/dist/components/VIcon/icons/colorize.js +9 -0
  189. package/dist/components/VIcon/icons/colorize.js.map +1 -0
  190. package/dist/components/VIcon/icons/inbox.d.ts +5 -0
  191. package/dist/components/VIcon/icons/inbox.js +9 -0
  192. package/dist/components/VIcon/icons/inbox.js.map +1 -0
  193. package/dist/components/VIcon/icons/index.d.ts +42 -2
  194. package/dist/components/VIcon/icons/index.js +88 -72
  195. package/dist/components/VIcon/icons/index.js.map +1 -1
  196. package/dist/components/VIcon/icons/names.d.ts +2 -2
  197. package/dist/components/VIcon/icons/names.js +1 -1
  198. package/dist/components/VIcon/icons/names.js.map +1 -1
  199. package/dist/components/VIcon/icons/open_in_new.d.ts +5 -0
  200. package/dist/components/VIcon/icons/open_in_new.js +9 -0
  201. package/dist/components/VIcon/icons/open_in_new.js.map +1 -0
  202. package/dist/components/VIcon/icons/priority_high.d.ts +5 -0
  203. package/dist/components/VIcon/icons/priority_high.js +9 -0
  204. package/dist/components/VIcon/icons/priority_high.js.map +1 -0
  205. package/dist/components/VIcon/icons/remove.d.ts +5 -0
  206. package/dist/components/VIcon/icons/remove.js +9 -0
  207. package/dist/components/VIcon/icons/remove.js.map +1 -0
  208. package/dist/components/VIcon/icons/search_off.d.ts +5 -0
  209. package/dist/components/VIcon/icons/search_off.js +9 -0
  210. package/dist/components/VIcon/icons/search_off.js.map +1 -0
  211. package/dist/components/VIcon/icons/star.d.ts +5 -0
  212. package/dist/components/VIcon/icons/star.js +9 -0
  213. package/dist/components/VIcon/icons/star.js.map +1 -0
  214. package/dist/components/VIconButton/VIconButton.d.ts +4 -4
  215. package/dist/components/VInput/VInput.css +1 -1
  216. package/dist/components/VInput/VInput.d.ts +51 -2
  217. package/dist/components/VInput/VInput.js.map +1 -1
  218. package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js +129 -106
  219. package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  220. package/dist/components/VInput/VInputGroup.css +1 -1
  221. package/dist/components/VInput/VInputGroup.d.ts +20 -0
  222. package/dist/components/VInput/VInputGroup.js.map +1 -1
  223. package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js +50 -51
  224. package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  225. package/dist/components/VInputOTP/VInputOTP.css +1 -1
  226. package/dist/components/VInputOTP/VInputOTP.d.ts +27 -4
  227. package/dist/components/VInputOTP/VInputOTP.js.map +1 -1
  228. package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js +131 -113
  229. package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js.map +1 -1
  230. package/dist/components/VLink/VLink.css +2 -0
  231. package/dist/components/VLink/VLink.d.ts +53 -0
  232. package/dist/components/VLink/VLink.js +9 -0
  233. package/dist/components/VLink/VLink.js.map +1 -0
  234. package/dist/components/VLink/VLink.vue_vue_type_script_setup_true_lang.js +58 -0
  235. package/dist/components/VLink/VLink.vue_vue_type_script_setup_true_lang.js.map +1 -0
  236. package/dist/components/VListbox/VListboxChevron.css +2 -0
  237. package/dist/components/VListbox/VListboxChevron.d.ts +12 -0
  238. package/dist/components/VListbox/VListboxChevron.js +9 -0
  239. package/dist/components/VListbox/VListboxChevron.js.map +1 -0
  240. package/dist/components/VListbox/VListboxChevron.vue_vue_type_script_setup_true_lang.js +25 -0
  241. package/dist/components/VListbox/VListboxChevron.vue_vue_type_script_setup_true_lang.js.map +1 -0
  242. package/dist/components/VListbox/VListboxGroup.css +2 -0
  243. package/dist/components/VListbox/VListboxGroup.d.ts +27 -0
  244. package/dist/components/VListbox/VListboxGroup.js +9 -0
  245. package/dist/components/VListbox/VListboxGroup.js.map +1 -0
  246. package/dist/components/VListbox/VListboxGroup.vue_vue_type_script_setup_true_lang.js +21 -0
  247. package/dist/components/VListbox/VListboxGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
  248. package/dist/components/VListbox/VListboxOption.css +2 -0
  249. package/dist/components/{VCombobox/VComboboxOption.d.ts → VListbox/VListboxOption.d.ts} +4 -4
  250. package/dist/components/VListbox/VListboxOption.js +9 -0
  251. package/dist/components/VListbox/VListboxOption.js.map +1 -0
  252. package/dist/components/{VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js → VListbox/VListboxOption.vue_vue_type_script_setup_true_lang.js} +6 -6
  253. package/dist/components/VListbox/VListboxOption.vue_vue_type_script_setup_true_lang.js.map +1 -0
  254. package/dist/components/VListbox/VListboxPanel.css +2 -0
  255. package/dist/components/VListbox/VListboxPanel.d.ts +59 -0
  256. package/dist/components/VListbox/VListboxPanel.js +9 -0
  257. package/dist/components/VListbox/VListboxPanel.js.map +1 -0
  258. package/dist/components/VListbox/VListboxPanel.vue_vue_type_script_setup_true_lang.js +123 -0
  259. package/dist/components/VListbox/VListboxPanel.vue_vue_type_script_setup_true_lang.js.map +1 -0
  260. package/dist/components/VListbox/VListboxSeparator.css +2 -0
  261. package/dist/components/VListbox/VListboxSeparator.d.ts +3 -0
  262. package/dist/components/VListbox/VListboxSeparator.js +9 -0
  263. package/dist/components/VListbox/VListboxSeparator.js.map +1 -0
  264. package/dist/components/{VCombobox/VComboboxSeparator.vue_vue_type_script_setup_true_lang.js → VListbox/VListboxSeparator.vue_vue_type_script_setup_true_lang.js} +4 -4
  265. package/dist/components/VListbox/VListboxSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -0
  266. package/dist/components/VListbox/VListboxValues.css +2 -0
  267. package/dist/components/VListbox/VListboxValues.d.ts +52 -0
  268. package/dist/components/VListbox/VListboxValues.js +9 -0
  269. package/dist/components/VListbox/VListboxValues.js.map +1 -0
  270. package/dist/components/VListbox/VListboxValues.vue_vue_type_script_setup_true_lang.js +103 -0
  271. package/dist/components/VListbox/VListboxValues.vue_vue_type_script_setup_true_lang.js.map +1 -0
  272. package/dist/components/VMenu/VMenu.d.ts +1 -1
  273. package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js +9 -9
  274. package/dist/components/VMenu/VMenuItem.d.ts +1 -1
  275. package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js +16 -16
  276. package/dist/components/VMenu/VMenuPanel.d.ts +2 -2
  277. package/dist/components/VMenu/VMenuPanel.js.map +1 -1
  278. package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js +7 -7
  279. package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  280. package/dist/components/VMeter/VMeter.css +2 -0
  281. package/dist/components/VMeter/VMeter.d.ts +77 -0
  282. package/dist/components/VMeter/VMeter.js +9 -0
  283. package/dist/components/VMeter/VMeter.js.map +1 -0
  284. package/dist/components/VMeter/VMeter.vue_vue_type_script_setup_true_lang.js +113 -0
  285. package/dist/components/VMeter/VMeter.vue_vue_type_script_setup_true_lang.js.map +1 -0
  286. package/dist/components/VNumberInput/VNumberInput.css +2 -0
  287. package/dist/components/VNumberInput/VNumberInput.d.ts +114 -0
  288. package/dist/components/VNumberInput/VNumberInput.js +9 -0
  289. package/dist/components/VNumberInput/VNumberInput.js.map +1 -0
  290. package/dist/components/VNumberInput/VNumberInput.vue_vue_type_script_setup_true_lang.js +251 -0
  291. package/dist/components/VNumberInput/VNumberInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  292. package/dist/components/VNumberInput/number.d.ts +30 -0
  293. package/dist/components/VNumberInput/number.js +38 -0
  294. package/dist/components/VNumberInput/number.js.map +1 -0
  295. package/dist/components/VPagination/VPagination.d.ts +1 -1
  296. package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js +76 -76
  297. package/dist/components/VProgressCircular/VProgressCircular.d.ts +2 -2
  298. package/dist/components/VProgressLinear/VProgressLinear.css +1 -1
  299. package/dist/components/VProgressLinear/VProgressLinear.d.ts +10 -7
  300. package/dist/components/VProgressLinear/VProgressLinear.js.map +1 -1
  301. package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js +52 -34
  302. package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js.map +1 -1
  303. package/dist/components/VRadio/VRadio.d.ts +8 -3
  304. package/dist/components/VRadio/VRadio.js.map +1 -1
  305. package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js +52 -46
  306. package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js.map +1 -1
  307. package/dist/components/VRating/VRating.css +2 -0
  308. package/dist/components/VRating/VRating.d.ts +92 -0
  309. package/dist/components/VRating/VRating.js +9 -0
  310. package/dist/components/VRating/VRating.js.map +1 -0
  311. package/dist/components/VRating/VRating.vue_vue_type_script_setup_true_lang.js +158 -0
  312. package/dist/components/VRating/VRating.vue_vue_type_script_setup_true_lang.js.map +1 -0
  313. package/dist/components/VResizable/VResizable.css +2 -0
  314. package/dist/components/VResizable/VResizable.d.ts +50 -0
  315. package/dist/components/VResizable/VResizable.js +9 -0
  316. package/dist/components/VResizable/VResizable.js.map +1 -0
  317. package/dist/components/VResizable/VResizable.vue_vue_type_script_setup_true_lang.js +225 -0
  318. package/dist/components/VResizable/VResizable.vue_vue_type_script_setup_true_lang.js.map +1 -0
  319. package/dist/components/VResizable/VResizablePanel.css +2 -0
  320. package/dist/components/VResizable/VResizablePanel.d.ts +60 -0
  321. package/dist/components/VResizable/VResizablePanel.js +9 -0
  322. package/dist/components/VResizable/VResizablePanel.js.map +1 -0
  323. package/dist/components/VResizable/VResizablePanel.vue_vue_type_script_setup_true_lang.js +83 -0
  324. package/dist/components/VResizable/VResizablePanel.vue_vue_type_script_setup_true_lang.js.map +1 -0
  325. package/dist/components/VResizable/context.d.ts +24 -0
  326. package/dist/components/VResizable/context.js +6 -0
  327. package/dist/components/VResizable/context.js.map +1 -0
  328. package/dist/components/VResizable/layout.d.ts +28 -0
  329. package/dist/components/VResizable/layout.js +41 -0
  330. package/dist/components/VResizable/layout.js.map +1 -0
  331. package/dist/components/VSelect/VSelect.css +2 -0
  332. package/dist/components/VSelect/VSelect.d.ts +193 -0
  333. package/dist/components/VSelect/VSelect.js +9 -0
  334. package/dist/components/VSelect/VSelect.js.map +1 -0
  335. package/dist/components/VSelect/VSelect.vue_vue_type_script_setup_true_lang.js +424 -0
  336. package/dist/components/VSelect/VSelect.vue_vue_type_script_setup_true_lang.js.map +1 -0
  337. package/dist/components/VSeparator/VSeparator.js.map +1 -1
  338. package/dist/components/VSeparator/VSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
  339. package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js +8 -8
  340. package/dist/components/VSideNavigation/VSideNavigationItem.d.ts +2 -2
  341. package/dist/components/VSideNavigation/VSideNavigationItem.js.map +1 -1
  342. package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js +3 -3
  343. package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  344. package/dist/components/VSkeletonLoader/VSkeletonLoader.d.ts +3 -3
  345. package/dist/components/VSlider/VSlider.css +1 -1
  346. package/dist/components/VSlider/VSlider.d.ts +34 -8
  347. package/dist/components/VSlider/VSlider.js.map +1 -1
  348. package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js +236 -215
  349. package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js.map +1 -1
  350. package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js +4 -4
  351. package/dist/components/VSnackbar/state.js.map +1 -1
  352. package/dist/components/VSplitButton/VSplitButton.css +2 -0
  353. package/dist/components/VSplitButton/VSplitButton.d.ts +114 -0
  354. package/dist/components/VSplitButton/VSplitButton.js +9 -0
  355. package/dist/components/VSplitButton/VSplitButton.js.map +1 -0
  356. package/dist/components/VSplitButton/VSplitButton.vue_vue_type_script_setup_true_lang.js +148 -0
  357. package/dist/components/VSplitButton/VSplitButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
  358. package/dist/components/VStepper/VStepper.css +2 -0
  359. package/dist/components/VStepper/VStepper.d.ts +73 -0
  360. package/dist/components/VStepper/VStepper.js +9 -0
  361. package/dist/components/VStepper/VStepper.js.map +1 -0
  362. package/dist/components/VStepper/VStepper.vue_vue_type_script_setup_true_lang.js +96 -0
  363. package/dist/components/VStepper/VStepper.vue_vue_type_script_setup_true_lang.js.map +1 -0
  364. package/dist/components/VSwitch/VSwitch.d.ts +8 -3
  365. package/dist/components/VSwitch/VSwitch.js.map +1 -1
  366. package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js +53 -47
  367. package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js.map +1 -1
  368. package/dist/components/VTabs/VTab.css +1 -1
  369. package/dist/components/VTabs/VTab.d.ts +1 -1
  370. package/dist/components/VTabs/VTab.js.map +1 -1
  371. package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js.map +1 -1
  372. package/dist/components/VTabs/VTabs.css +1 -1
  373. package/dist/components/VTabs/VTabs.d.ts +13 -5
  374. package/dist/components/VTabs/VTabs.js.map +1 -1
  375. package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js +20 -20
  376. package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
  377. package/dist/components/VTextarea/VTextarea.css +1 -1
  378. package/dist/components/VTextarea/VTextarea.d.ts +22 -2
  379. package/dist/components/VTextarea/VTextarea.js.map +1 -1
  380. package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js +108 -100
  381. package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js.map +1 -1
  382. package/dist/components/VTimeInput/VTimeInput.d.ts +27 -7
  383. package/dist/components/VTimeInput/VTimeInput.js.map +1 -1
  384. package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js +187 -171
  385. package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  386. package/dist/components/VTimePicker/VTimePicker.d.ts +2 -2
  387. package/dist/components/VTimePicker/VTimePicker.js.map +1 -1
  388. package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js +15 -15
  389. package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  390. package/dist/components/VTimeline/VTimeline.css +2 -0
  391. package/dist/components/VTimeline/VTimeline.d.ts +59 -0
  392. package/dist/components/VTimeline/VTimeline.js +9 -0
  393. package/dist/components/VTimeline/VTimeline.js.map +1 -0
  394. package/dist/components/VTimeline/VTimeline.vue_vue_type_script_setup_true_lang.js +53 -0
  395. package/dist/components/VTimeline/VTimeline.vue_vue_type_script_setup_true_lang.js.map +1 -0
  396. package/dist/components/VTimeline/VTimelineItem.css +2 -0
  397. package/dist/components/VTimeline/VTimelineItem.d.ts +48 -0
  398. package/dist/components/VTimeline/VTimelineItem.js +9 -0
  399. package/dist/components/VTimeline/VTimelineItem.js.map +1 -0
  400. package/dist/components/VTimeline/VTimelineItem.vue_vue_type_script_setup_true_lang.js +70 -0
  401. package/dist/components/VTimeline/VTimelineItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
  402. package/dist/components/VTimeline/context.d.ts +11 -0
  403. package/dist/components/VTimeline/context.js +6 -0
  404. package/dist/components/VTimeline/context.js.map +1 -0
  405. package/dist/components/VTimeline/datetime.d.ts +8 -0
  406. package/dist/components/VTimeline/datetime.js +36 -0
  407. package/dist/components/VTimeline/datetime.js.map +1 -0
  408. package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js +8 -8
  409. package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js +12 -12
  410. package/dist/components/VToggle/VToggle.d.ts +4 -4
  411. package/dist/components/VToggle/VToggleItem.d.ts +1 -1
  412. package/dist/components/VTooltip/VTooltip.d.ts +8 -2
  413. package/dist/components/VTooltip/VTooltip.js.map +1 -1
  414. package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js +45 -43
  415. package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  416. package/dist/components/VTreeView/VTreeView.css +2 -0
  417. package/dist/components/VTreeView/VTreeView.d.ts +112 -0
  418. package/dist/components/VTreeView/VTreeView.js +9 -0
  419. package/dist/components/VTreeView/VTreeView.js.map +1 -0
  420. package/dist/components/VTreeView/VTreeView.vue_vue_type_script_setup_true_lang.js +321 -0
  421. package/dist/components/VTreeView/VTreeView.vue_vue_type_script_setup_true_lang.js.map +1 -0
  422. package/dist/components/VTypography/VTypography.d.ts +1 -1
  423. package/dist/components/VVirtualList/VVirtualList.css +2 -0
  424. package/dist/components/VVirtualList/VVirtualList.d.ts +78 -0
  425. package/dist/components/VVirtualList/VVirtualList.js +9 -0
  426. package/dist/components/VVirtualList/VVirtualList.js.map +1 -0
  427. package/dist/components/VVirtualList/VVirtualList.vue_vue_type_script_setup_true_lang.js +114 -0
  428. package/dist/components/VVirtualList/VVirtualList.vue_vue_type_script_setup_true_lang.js.map +1 -0
  429. package/dist/composables/useChoice.d.ts +28 -0
  430. package/dist/composables/useChoice.js +28 -0
  431. package/dist/composables/useChoice.js.map +1 -0
  432. package/dist/composables/useDebouncedSearch.d.ts +17 -0
  433. package/dist/composables/useDebouncedSearch.js +18 -0
  434. package/dist/composables/useDebouncedSearch.js.map +1 -0
  435. package/dist/composables/useEscapeDismiss.d.ts +8 -0
  436. package/dist/composables/useEscapeDismiss.js +16 -0
  437. package/dist/composables/useEscapeDismiss.js.map +1 -0
  438. package/dist/composables/useFieldIds.d.ts +2 -1
  439. package/dist/composables/useFieldIds.js +7 -6
  440. package/dist/composables/useFieldIds.js.map +1 -1
  441. package/dist/composables/useFieldPanel.d.ts +1 -0
  442. package/dist/composables/useFieldPanel.js +52 -42
  443. package/dist/composables/useFieldPanel.js.map +1 -1
  444. package/dist/composables/useFileField.d.ts +1 -3
  445. package/dist/composables/useFileField.js +48 -50
  446. package/dist/composables/useFileField.js.map +1 -1
  447. package/dist/composables/useHotkeyListener.d.ts +17 -0
  448. package/dist/composables/useHotkeyListener.js +26 -0
  449. package/dist/composables/useHotkeyListener.js.map +1 -0
  450. package/dist/composables/useIconClickHandlers.d.ts +2 -10
  451. package/dist/composables/useIconClickHandlers.js +1 -1
  452. package/dist/composables/useIconClickHandlers.js.map +1 -1
  453. package/dist/{components/VCombobox/infiniteScroll.d.ts → composables/useInfiniteScroll.d.ts} +6 -0
  454. package/dist/{components/VCombobox/infiniteScroll.js → composables/useInfiniteScroll.js} +7 -7
  455. package/dist/composables/useInfiniteScroll.js.map +1 -0
  456. package/dist/composables/useListbox.d.ts +132 -0
  457. package/dist/composables/useListbox.js +227 -0
  458. package/dist/composables/useListbox.js.map +1 -0
  459. package/dist/composables/useModalDialog.d.ts +28 -0
  460. package/dist/composables/useModalDialog.js +60 -0
  461. package/dist/composables/useModalDialog.js.map +1 -0
  462. package/dist/composables/useRootAttrs.d.ts +2 -3
  463. package/dist/composables/useRootAttrs.js.map +1 -1
  464. package/dist/composables/useVirtualList.d.ts +46 -0
  465. package/dist/composables/useVirtualList.js +145 -0
  466. package/dist/composables/useVirtualList.js.map +1 -0
  467. package/dist/i18n/en.js +50 -0
  468. package/dist/i18n/en.js.map +1 -1
  469. package/dist/i18n/fr.js +50 -0
  470. package/dist/i18n/fr.js.map +1 -1
  471. package/dist/i18n/types.d.ts +103 -2
  472. package/dist/icons.js +45 -37
  473. package/dist/index.d.ts +49 -3
  474. package/dist/index.js +80 -56
  475. package/dist/styles.css +1 -1
  476. package/dist/tokens/index.d.ts +43 -0
  477. package/dist/tokens/semantic.d.ts +42 -0
  478. package/dist/tokens/semantic.js +43 -1
  479. package/dist/tokens/semantic.js.map +1 -1
  480. package/dist/tokens/themes/dark.d.ts +1 -0
  481. package/dist/tokens/themes/dark.js +1 -0
  482. package/dist/tokens/themes/dark.js.map +1 -1
  483. package/dist/tokens.json +215 -1
  484. package/dist/types.d.ts +57 -4
  485. package/dist/utils/arrowNav.js.map +1 -1
  486. package/dist/utils/attrs.d.ts +9 -0
  487. package/dist/utils/attrs.js +14 -0
  488. package/dist/utils/attrs.js.map +1 -0
  489. package/dist/utils/date.d.ts +1 -0
  490. package/dist/utils/date.js +2 -2
  491. package/dist/utils/date.js.map +1 -1
  492. package/package.json +1 -1
  493. package/dist/components/VCombobox/VComboboxGroup.css +0 -2
  494. package/dist/components/VCombobox/VComboboxGroup.d.ts +0 -17
  495. package/dist/components/VCombobox/VComboboxGroup.js +0 -9
  496. package/dist/components/VCombobox/VComboboxGroup.js.map +0 -1
  497. package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js +0 -21
  498. package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js.map +0 -1
  499. package/dist/components/VCombobox/VComboboxOption.css +0 -2
  500. package/dist/components/VCombobox/VComboboxOption.js +0 -9
  501. package/dist/components/VCombobox/VComboboxOption.js.map +0 -1
  502. package/dist/components/VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js.map +0 -1
  503. package/dist/components/VCombobox/VComboboxSeparator.css +0 -2
  504. package/dist/components/VCombobox/VComboboxSeparator.js +0 -9
  505. package/dist/components/VCombobox/VComboboxSeparator.js.map +0 -1
  506. package/dist/components/VCombobox/VComboboxSeparator.vue_vue_type_script_setup_true_lang.js.map +0 -1
  507. package/dist/components/VCombobox/infiniteScroll.js.map +0 -1
  508. /package/dist/components/{VCombobox/VComboboxSeparator.d.ts → VCheckbox/VCheckMark.d.ts} +0 -0
@@ -0,0 +1,113 @@
1
+ import { ColorFormat, ColorSwatch } from '../VColorPicker/VColorPicker.js';
2
+ import { FieldLabelPosition } from '../VField/VField.js';
3
+ /** The height of the field: 32, 40 or 48 pixels. */
4
+ export type ColorInputSize = 'sm' | 'md' | 'lg';
5
+ /** Where the picker opens relative to the field. */
6
+ export type ColorInputPlacement = 'bottom' | 'bottom-start' | 'bottom-end' | 'top' | 'top-start' | 'top-end';
7
+ interface ColorInputProps {
8
+ /**
9
+ * How the value is written: `#rrggbb`, `rgb()`, `hsl()` or `oklch()`. The field accepts all
10
+ * four, and rewrites what was typed in this one when the reader leaves it.
11
+ */
12
+ format?: ColorFormat;
13
+ /** Offers an opacity track, and writes the alpha into the value when it is below 1. */
14
+ alpha?: boolean;
15
+ /** Preset colours, offered as swatches in the picker. */
16
+ swatches?: ColorSwatch[];
17
+ /** Hides the picker's eyedropper button. */
18
+ hideEyeDropper?: boolean;
19
+ /** The label above the field. */
20
+ label?: string;
21
+ /** A line of help under the field. */
22
+ hint?: string;
23
+ /**
24
+ * A message saying what is wrong with the value, shown in place of the hint. It marks the
25
+ * field invalid, is read along with it, and is announced when it appears or changes.
26
+ */
27
+ error?: string;
28
+ /** Marks the field as required: an asterisk follows the label, and the field is `required`. */
29
+ required?: boolean;
30
+ /** Hides the label visually. It still names the field for assistive technology. */
31
+ hideLabel?: boolean;
32
+ /**
33
+ * Where the label sits: above the field (`top`, the default), or at its start, in a column of
34
+ * its own, moving back above when there is not room for both.
35
+ */
36
+ labelPosition?: FieldLabelPosition;
37
+ /** What the field says while empty. */
38
+ placeholder?: string;
39
+ /** The height of the field: 32, 40 or 48 pixels. */
40
+ size?: ColorInputSize;
41
+ /** Takes 4px off the height. */
42
+ compact?: boolean;
43
+ /** Makes the field unusable. */
44
+ disabled?: boolean;
45
+ /** Shows the colour without letting it change: nothing can be typed, and there is no picker. */
46
+ readonly?: boolean;
47
+ /** Marks the field as invalid, for a rule of your own. */
48
+ invalid?: boolean;
49
+ /** Offers a cross that empties the value. */
50
+ clearable?: boolean;
51
+ /** What that cross does, in words. It falls back to the design system dictionary. */
52
+ clearLabel?: string;
53
+ /**
54
+ * What the swatch at the start of the field does, in words. It falls back to the design
55
+ * system dictionary.
56
+ */
57
+ pickerLabel?: string;
58
+ /** Where the picker opens relative to the field. */
59
+ placement?: ColorInputPlacement;
60
+ }
61
+ type __VLS_Props = ColorInputProps;
62
+ type __VLS_Slots = {
63
+ /** Controls of your own inside the field, placed before the clear cross. */
64
+ 'value-end'?(): unknown;
65
+ };
66
+ type __VLS_ModelProps = {
67
+ /** The colour, written in `format`, or `null` when the field is empty. */
68
+ modelValue?: string | null;
69
+ };
70
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
71
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
72
+ /** Moves the focus to the text field. */
73
+ focus: (options?: FocusOptions) => void | undefined;
74
+ /** Selects what the field is showing. */
75
+ select: () => void | undefined;
76
+ /** The real `<input>` behind the field. */
77
+ el: import('vue').ComputedRef<HTMLInputElement | null>;
78
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
79
+ clear: () => any;
80
+ "update:modelValue": (value: string | null) => any;
81
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
82
+ onClear?: (() => any) | undefined;
83
+ "onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
84
+ }>, {
85
+ label: string;
86
+ placeholder: string;
87
+ alpha: boolean;
88
+ format: ColorFormat;
89
+ swatches: ColorSwatch[];
90
+ pickerLabel: string;
91
+ error: string;
92
+ size: ColorInputSize;
93
+ compact: boolean;
94
+ disabled: boolean;
95
+ required: boolean;
96
+ placement: ColorInputPlacement;
97
+ invalid: boolean;
98
+ hint: string;
99
+ hideLabel: boolean;
100
+ labelPosition: FieldLabelPosition;
101
+ readonly: boolean;
102
+ clearable: boolean;
103
+ clearLabel: string;
104
+ hideEyeDropper: boolean;
105
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
106
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
107
+ declare const _default: typeof __VLS_export;
108
+ export default _default;
109
+ type __VLS_WithSlots<T, S> = T & {
110
+ new (): {
111
+ $slots: S;
112
+ };
113
+ };
@@ -0,0 +1,9 @@
1
+ import './VColorInput.css';
2
+ import e from "./VColorInput.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/VColorInput/VColorInput.vue
5
+ var t = e;
6
+ //#endregion
7
+ export { t as default };
8
+
9
+ //# sourceMappingURL=VColorInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VColorInput.js","names":[],"sources":["../../../src/components/VColorInput/VColorInput.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @a11y @core\n/**\n * Compose VInput with VColorPicker. The colour is typed into the field in any format, and the\n * swatch at its start opens the picker in a panel; a text input cannot use popovertarget, so the\n * manual panel bridge handles opening, dismissal and focus transfer into the picker.\n */\nimport { computed, inject, ref, watch } from 'vue'\n\nimport VColorPicker from '../VColorPicker/VColorPicker.vue'\nimport type { ColorFormat, ColorSwatch } from '../VColorPicker/VColorPicker.vue'\nimport { formatColor, parseColor } from '../VColorPicker/color'\nimport type { FieldLabelPosition } from '../VField/VField.vue'\nimport VInput from '../VInput/VInput.vue'\nimport { inputGroupKey } from '../VInput/context'\nimport VPopover from '../VPopover/VPopover.vue'\nimport { canClear } from '../../composables/useClearable'\nimport { useControlShape } from '../../composables/useControlShape'\nimport { useFieldPanel } from '../../composables/useFieldPanel'\nimport { useRootAttrs } from '../../composables/useRootAttrs'\nimport { useMessages } from '../../i18n/state'\n\n/** The height of the field: 32, 40 or 48 pixels. */\nexport type ColorInputSize = 'sm' | 'md' | 'lg'\n\n/** Where the picker opens relative to the field. */\nexport type ColorInputPlacement =\n 'bottom' | 'bottom-start' | 'bottom-end' | 'top' | 'top-start' | 'top-end'\n\ninterface ColorInputProps {\n /**\n * How the value is written: `#rrggbb`, `rgb()`, `hsl()` or `oklch()`. The field accepts all\n * four, and rewrites what was typed in this one when the reader leaves it.\n */\n format?: ColorFormat\n /** Offers an opacity track, and writes the alpha into the value when it is below 1. */\n alpha?: boolean\n /** Preset colours, offered as swatches in the picker. */\n swatches?: ColorSwatch[]\n /** Hides the picker's eyedropper button. */\n hideEyeDropper?: boolean\n /** The label above the field. */\n label?: string\n /** A line of help under the field. */\n hint?: string\n /**\n * A message saying what is wrong with the value, shown in place of the hint. It marks the\n * field invalid, is read along with it, and is announced when it appears or changes.\n */\n error?: string\n /** Marks the field as required: an asterisk follows the label, and the field is `required`. */\n required?: boolean\n /** Hides the label visually. It still names the field for assistive technology. */\n hideLabel?: boolean\n /**\n * Where the label sits: above the field (`top`, the default), or at its start, in a column of\n * its own, moving back above when there is not room for both.\n */\n labelPosition?: FieldLabelPosition\n /** What the field says while empty. */\n placeholder?: string\n /** The height of the field: 32, 40 or 48 pixels. */\n size?: ColorInputSize\n /** Takes 4px off the height. */\n compact?: boolean\n /** Makes the field unusable. */\n disabled?: boolean\n /** Shows the colour without letting it change: nothing can be typed, and there is no picker. */\n readonly?: boolean\n /** Marks the field as invalid, for a rule of your own. */\n invalid?: boolean\n /** Offers a cross that empties the value. */\n clearable?: boolean\n /** What that cross does, in words. It falls back to the design system dictionary. */\n clearLabel?: string\n /**\n * What the swatch at the start of the field does, in words. It falls back to the design\n * system dictionary.\n */\n pickerLabel?: string\n /** Where the picker opens relative to the field. */\n placement?: ColorInputPlacement\n}\n\nconst props = withDefaults(defineProps<ColorInputProps>(), {\n format: 'hex',\n alpha: false,\n swatches: undefined,\n hideEyeDropper: false,\n label: undefined,\n hint: undefined,\n error: undefined,\n required: false,\n hideLabel: false,\n labelPosition: 'top',\n placeholder: undefined,\n size: 'md',\n compact: false,\n disabled: false,\n readonly: false,\n invalid: false,\n clearable: false,\n clearLabel: undefined,\n pickerLabel: undefined,\n placement: 'bottom-start',\n})\n\n/** The colour, written in `format`, or `null` when the field is empty. */\nconst model = defineModel<string | null>({ default: null })\n\nconst emit = defineEmits<{\n /** The clear cross emptied the field. The value has already been reset. */\n clear: []\n}>()\n\ndefineSlots<{\n /** Controls of your own inside the field, placed before the clear cross. */\n 'value-end'?(): unknown\n}>()\n\n// `class` and `style` stay on the wrapper; everything else goes down to the text field, which a\n// consumer's label points at and what assistive technology deals with.\ndefineOptions({ inheritAttrs: false })\nconst { rootClass, rootStyle, forwardedAttrs } = useRootAttrs()\n\nconst m = useMessages()\n\nconst rootEl = ref<HTMLElement | null>(null)\nconst panelRef = ref<InstanceType<typeof VPopover> | null>(null)\nconst inputRef = ref<InstanceType<typeof VInput> | null>(null)\nconst pickerRef = ref<InstanceType<typeof VColorPicker> | null>(null)\n\n// A VInputGroup joins several controls into one object, so the shape of this field is the\n// row's decision rather than its own (VInput/context.ts).\nconst group = inject(inputGroupKey, null)\nconst {\n size: resolvedSize,\n compact: resolvedCompact,\n disabled: resolvedDisabled,\n} = useControlShape(props, group)\n\nconst hasPanel = computed(() => !props.readonly)\n\nconst {\n open,\n panelId,\n popupAttrs,\n closeAndFocus,\n focusField,\n toggleFromIcon,\n onFocusout,\n onKeydown,\n onPanelMousedown,\n} = useFieldPanel({\n rootEl,\n panelRef,\n field: inputRef,\n disabled: () => resolvedDisabled.value || !hasPanel.value,\n focusInPanel: () => pickerRef.value?.focus(),\n})\n\nconst inputAttrs = popupAttrs(\n () => forwardedAttrs.value,\n () => hasPanel.value,\n)\n\n/** What the field shows: the value, or what is being typed until the reader leaves. */\nconst fieldText = ref('')\nwatch(model, (value) => (fieldText.value = value ?? ''), { immediate: true })\n\nconst parsed = computed(() => parseColor(model.value))\n\n/** The colour the swatch shows, with the opacity it has. */\nconst swatchColor = computed(() =>\n parsed.value ? formatColor(parsed.value, 'rgb', props.alpha) : undefined,\n)\n\n/**\n * Takes what was typed, in any of the four formats, and rewrites it in `format`. Anything that\n * is not a colour puts the field back as it was.\n */\nfunction commitField() {\n const text = fieldText.value.trim()\n if (!text) {\n model.value = null\n return\n }\n const color = parseColor(text)\n if (!color) {\n fieldText.value = model.value ?? ''\n return\n }\n const next = formatColor(color, props.format, props.alpha)\n model.value = next\n // The same value written again changes nothing, so the watcher would leave the text as typed.\n fieldText.value = next\n}\n\n// @keyboard\n// Enter takes the value and stays in the field; without it, the panel bridge would open the\n// picker. The down arrow remains the way into the picker.\nfunction onFieldKeydown(event: KeyboardEvent) {\n if (event.key !== 'Enter') return\n event.preventDefault()\n commitField()\n}\n\n// @keyboard\n// Enter on a track or a swatch is done with choosing: the panel closes and the focus returns to\n// the field. A button's Enter is left alone, being its click.\nfunction onPickerKeydown(event: KeyboardEvent) {\n if (event.key !== 'Enter' || !(event.target as HTMLElement).matches('input')) return\n event.preventDefault()\n closeAndFocus()\n}\n\nconst clearVisible = computed(() =>\n canClear(props, resolvedDisabled.value, !!model.value || !!fieldText.value),\n)\n\nfunction clearValue() {\n model.value = null\n fieldText.value = ''\n focusField()\n emit('clear')\n}\n\ndefineExpose({\n /** Moves the focus to the text field. */\n focus: (options?: FocusOptions) => inputRef.value?.focus(options),\n /** Selects what the field is showing. */\n select: () => inputRef.value?.select(),\n /** The real `<input>` behind the field. */\n el: computed(() => inputRef.value?.el ?? null),\n})\n</script>\n\n<template>\n <div\n ref=\"rootEl\"\n class=\"v-color-input\"\n :class=\"rootClass\"\n :style=\"rootStyle\"\n :data-open=\"open ? '' : undefined\"\n :data-disabled=\"resolvedDisabled ? '' : undefined\"\n @focusout=\"onFocusout\"\n @keydown=\"onKeydown\"\n >\n <VInput\n ref=\"inputRef\"\n v-model=\"fieldText\"\n class=\"v-color-input-field\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n v-bind=\"inputAttrs\"\n :readonly=\"readonly\"\n :label=\"label\"\n :hint=\"hint\"\n :error=\"error\"\n :required=\"required\"\n :hide-label=\"hideLabel\"\n :label-position=\"labelPosition\"\n :placeholder=\"placeholder\"\n :size=\"resolvedSize\"\n :compact=\"resolvedCompact\"\n :disabled=\"resolvedDisabled\"\n :invalid=\"invalid\"\n :clearable=\"clearable\"\n :clear-visible=\"clearVisible\"\n :clear-label=\"clearLabel ?? m.colorInput.clear\"\n @clear=\"clearValue\"\n @change=\"commitField\"\n @keydown=\"onFieldKeydown\"\n >\n <template #start>\n <button\n v-if=\"hasPanel\"\n type=\"button\"\n class=\"v-field-action v-color-input-swatch\"\n :aria-label=\"pickerLabel ?? m.colorInput.openPicker\"\n :disabled=\"resolvedDisabled\"\n @click=\"toggleFromIcon\"\n >\n <span class=\"v-color-input-chip\" :style=\"{ '--color-input-chip': swatchColor }\" />\n </button>\n <span v-else class=\"v-color-input-swatch\" aria-hidden=\"true\">\n <span class=\"v-color-input-chip\" :style=\"{ '--color-input-chip': swatchColor }\" />\n </span>\n </template>\n <template v-if=\"$slots['value-end']\" #value-end><slot name=\"value-end\" /></template>\n </VInput>\n\n <VPopover\n v-if=\"hasPanel\"\n :id=\"panelId\"\n ref=\"panelRef\"\n v-model:open=\"open\"\n mode=\"manual\"\n anchor=\"--color-input-anchor\"\n :placement=\"placement\"\n role=\"dialog\"\n :aria-label=\"label ?? m.colorInput.pickerLabel\"\n class=\"v-color-input-panel\"\n @mousedown=\"onPanelMousedown\"\n >\n <VColorPicker\n ref=\"pickerRef\"\n v-model=\"model\"\n :format=\"format\"\n :alpha=\"alpha\"\n :swatches=\"swatches\"\n :hide-eye-dropper=\"hideEyeDropper\"\n hide-input\n @keydown=\"onPickerKeydown\"\n />\n </VPopover>\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n .v-color-input {\n anchor-scope: --color-input-anchor;\n display: block;\n inline-size: 100%;\n font-family: var(--vectis-text-family);\n }\n\n /*\n * Anchored to the field's box rather than the wrapper, which also holds the label and the\n * hint: the panel then covers whichever of the two it lands on.\n */\n .v-color-input .v-input-field {\n anchor-name: --color-input-anchor;\n }\n\n /* A colour is written left to right in every language, as in VColorPicker's own field. */\n .v-color-input .v-input-control {\n direction: ltr;\n font-variant-numeric: tabular-nums;\n }\n\n .v-color-input .v-input-control:dir(rtl) {\n text-align: right;\n }\n\n /* The read-only swatch, which is no button and takes none of `.v-field-action`. */\n span.v-color-input-swatch {\n display: inline-flex;\n flex: none;\n }\n\n /*\n * The checkerboard shows through a translucent colour, drawn in the theme's own surface and\n * border colours; an empty field shows it alone. Forced colours leave the chip untouched: it\n * is the value, not the theme's paint. As on VColorPicker's swatches, the edge is a\n * translucent border shading the colour that runs under it, the checkerboard stopping inside:\n * an opaque ring would leave a pale fringe on the antialiased pixels.\n */\n .v-color-input-chip {\n inline-size: var(--vectis-icon-size);\n block-size: var(--vectis-icon-size);\n border: 1px solid var(--vectis-color-border-on-fill);\n border-radius: var(--vectis-radius-interactive);\n background:\n linear-gradient(var(--color-input-chip, transparent), var(--color-input-chip, transparent))\n border-box,\n repeating-conic-gradient(var(--vectis-color-border) 0 25%, var(--vectis-color-surface) 0 50%)\n 0 0 / var(--vectis-control-size-color-picker-checker)\n var(--vectis-control-size-color-picker-checker) padding-box;\n forced-color-adjust: none;\n }\n\n .v-color-input[data-disabled] .v-color-input-chip {\n opacity: 0.5;\n }\n\n /*\n * `position-anchor` and the chrome come from VPopover; the panel's own padding is cancelled,\n * VColorPicker padding itself as the date and time pickers do.\n */\n .v-popover-panel.v-color-input-panel {\n inline-size: max-content;\n padding: 0;\n }\n}\n</style>\n"],"mappings":""}
@@ -0,0 +1,230 @@
1
+ import { useMessages as e } from "../../i18n/state.js";
2
+ import t from "../VPopover/VPopover.js";
3
+ import { useControlShape as n } from "../../composables/useControlShape.js";
4
+ import { useRootAttrs as r } from "../../composables/useRootAttrs.js";
5
+ import { canClear as i } from "../../composables/useClearable.js";
6
+ import { inputGroupKey as a } from "../VInput/context.js";
7
+ import ee from "../VInput/VInput.js";
8
+ import { useFieldPanel as te } from "../../composables/useFieldPanel.js";
9
+ import { formatColor as o, parseColor as s } from "../VColorPicker/color.js";
10
+ import c from "../VColorPicker/VColorPicker.js";
11
+ import { computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as m, createVNode as h, defineComponent as g, inject as _, isRef as v, mergeModels as y, mergeProps as b, normalizeClass as x, normalizeStyle as S, openBlock as C, ref as w, renderSlot as ne, unref as T, useModel as re, watch as ie, withCtx as E } from "vue";
12
+ //#region src/components/VColorInput/VColorInput.vue?vue&type=script&setup=true&lang.ts
13
+ var ae = ["data-open", "data-disabled"], oe = ["aria-label", "disabled"], se = {
14
+ key: 1,
15
+ class: "v-color-input-swatch",
16
+ "aria-hidden": "true"
17
+ }, D = /*@__PURE__*/ g({
18
+ inheritAttrs: !1,
19
+ __name: "VColorInput",
20
+ props: /*@__PURE__*/ y({
21
+ format: { default: "hex" },
22
+ alpha: {
23
+ type: Boolean,
24
+ default: !1
25
+ },
26
+ swatches: { default: void 0 },
27
+ hideEyeDropper: {
28
+ type: Boolean,
29
+ default: !1
30
+ },
31
+ label: { default: void 0 },
32
+ hint: { default: void 0 },
33
+ error: { default: void 0 },
34
+ required: {
35
+ type: Boolean,
36
+ default: !1
37
+ },
38
+ hideLabel: {
39
+ type: Boolean,
40
+ default: !1
41
+ },
42
+ labelPosition: { default: "top" },
43
+ placeholder: { default: void 0 },
44
+ size: { default: "md" },
45
+ compact: {
46
+ type: Boolean,
47
+ default: !1
48
+ },
49
+ disabled: {
50
+ type: Boolean,
51
+ default: !1
52
+ },
53
+ readonly: {
54
+ type: Boolean,
55
+ default: !1
56
+ },
57
+ invalid: {
58
+ type: Boolean,
59
+ default: !1
60
+ },
61
+ clearable: {
62
+ type: Boolean,
63
+ default: !1
64
+ },
65
+ clearLabel: { default: void 0 },
66
+ pickerLabel: { default: void 0 },
67
+ placement: { default: "bottom-start" }
68
+ }, {
69
+ modelValue: { default: null },
70
+ modelModifiers: {}
71
+ }),
72
+ emits: /*@__PURE__*/ y(["clear"], ["update:modelValue"]),
73
+ setup(g, { expose: y, emit: D }) {
74
+ let O = g, k = re(g, "modelValue"), A = D, { rootClass: j, rootStyle: M, forwardedAttrs: N } = r(), P = e(), F = w(null), I = w(null), L = w(null), R = w(null), { size: z, compact: B, disabled: V } = n(O, _(a, null)), H = l(() => !O.readonly), { open: U, panelId: W, popupAttrs: G, closeAndFocus: K, focusField: ce, toggleFromIcon: q, onFocusout: J, onKeydown: Y, onPanelMousedown: le } = te({
75
+ rootEl: F,
76
+ panelRef: I,
77
+ field: L,
78
+ disabled: () => V.value || !H.value,
79
+ focusInPanel: () => R.value?.focus()
80
+ }), ue = G(() => N.value, () => H.value), X = w("");
81
+ ie(k, (e) => X.value = e ?? "", { immediate: !0 });
82
+ let Z = l(() => s(k.value)), Q = l(() => Z.value ? o(Z.value, "rgb", O.alpha) : void 0);
83
+ function $() {
84
+ let e = X.value.trim();
85
+ if (!e) {
86
+ k.value = null;
87
+ return;
88
+ }
89
+ let t = s(e);
90
+ if (!t) {
91
+ X.value = k.value ?? "";
92
+ return;
93
+ }
94
+ let n = o(t, O.format, O.alpha);
95
+ k.value = n, X.value = n;
96
+ }
97
+ function de(e) {
98
+ e.key === "Enter" && (e.preventDefault(), $());
99
+ }
100
+ function fe(e) {
101
+ e.key !== "Enter" || !e.target.matches("input") || (e.preventDefault(), K());
102
+ }
103
+ let pe = l(() => i(O, V.value, !!k.value || !!X.value));
104
+ function me() {
105
+ k.value = null, X.value = "", ce(), A("clear");
106
+ }
107
+ return y({
108
+ focus: (e) => L.value?.focus(e),
109
+ select: () => L.value?.select(),
110
+ el: l(() => L.value?.el ?? null)
111
+ }), (e, n) => (C(), f("div", {
112
+ ref_key: "rootEl",
113
+ ref: F,
114
+ class: x(["v-color-input", T(j)]),
115
+ style: S(T(M)),
116
+ "data-open": T(U) ? "" : void 0,
117
+ "data-disabled": T(V) ? "" : void 0,
118
+ onFocusout: n[4] ||= (...e) => T(J) && T(J)(...e),
119
+ onKeydown: n[5] ||= (...e) => T(Y) && T(Y)(...e)
120
+ }, [h(ee, b({
121
+ ref_key: "inputRef",
122
+ ref: L,
123
+ modelValue: X.value,
124
+ "onUpdate:modelValue": n[1] ||= (e) => X.value = e,
125
+ class: "v-color-input-field",
126
+ autocomplete: "off",
127
+ spellcheck: "false"
128
+ }, T(ue), {
129
+ readonly: g.readonly,
130
+ label: g.label,
131
+ hint: g.hint,
132
+ error: g.error,
133
+ required: g.required,
134
+ "hide-label": g.hideLabel,
135
+ "label-position": g.labelPosition,
136
+ placeholder: g.placeholder,
137
+ size: T(z),
138
+ compact: T(B),
139
+ disabled: T(V),
140
+ invalid: g.invalid,
141
+ clearable: g.clearable,
142
+ "clear-visible": pe.value,
143
+ "clear-label": g.clearLabel ?? T(P).colorInput.clear,
144
+ onClear: me,
145
+ onChange: $,
146
+ onKeydown: de
147
+ }), m({
148
+ start: E(() => [H.value ? (C(), f("button", {
149
+ key: 0,
150
+ type: "button",
151
+ class: "v-field-action v-color-input-swatch",
152
+ "aria-label": g.pickerLabel ?? T(P).colorInput.openPicker,
153
+ disabled: T(V),
154
+ onClick: n[0] ||= (...e) => T(q) && T(q)(...e)
155
+ }, [p("span", {
156
+ class: "v-color-input-chip",
157
+ style: S({ "--color-input-chip": Q.value })
158
+ }, null, 4)], 8, oe)) : (C(), f("span", se, [p("span", {
159
+ class: "v-color-input-chip",
160
+ style: S({ "--color-input-chip": Q.value })
161
+ }, null, 4)]))]),
162
+ _: 2
163
+ }, [e.$slots["value-end"] ? {
164
+ name: "value-end",
165
+ fn: E(() => [ne(e.$slots, "value-end")]),
166
+ key: "0"
167
+ } : void 0]), 1040, [
168
+ "modelValue",
169
+ "readonly",
170
+ "label",
171
+ "hint",
172
+ "error",
173
+ "required",
174
+ "hide-label",
175
+ "label-position",
176
+ "placeholder",
177
+ "size",
178
+ "compact",
179
+ "disabled",
180
+ "invalid",
181
+ "clearable",
182
+ "clear-visible",
183
+ "clear-label"
184
+ ]), H.value ? (C(), u(t, {
185
+ key: 0,
186
+ id: T(W),
187
+ ref_key: "panelRef",
188
+ ref: I,
189
+ open: T(U),
190
+ "onUpdate:open": n[3] ||= (e) => v(U) ? U.value = e : null,
191
+ mode: "manual",
192
+ anchor: "--color-input-anchor",
193
+ placement: g.placement,
194
+ role: "dialog",
195
+ "aria-label": g.label ?? T(P).colorInput.pickerLabel,
196
+ class: "v-color-input-panel",
197
+ onMousedown: T(le)
198
+ }, {
199
+ default: E(() => [h(c, {
200
+ ref_key: "pickerRef",
201
+ ref: R,
202
+ modelValue: k.value,
203
+ "onUpdate:modelValue": n[2] ||= (e) => k.value = e,
204
+ format: g.format,
205
+ alpha: g.alpha,
206
+ swatches: g.swatches,
207
+ "hide-eye-dropper": g.hideEyeDropper,
208
+ "hide-input": "",
209
+ onKeydown: fe
210
+ }, null, 8, [
211
+ "modelValue",
212
+ "format",
213
+ "alpha",
214
+ "swatches",
215
+ "hide-eye-dropper"
216
+ ])]),
217
+ _: 1
218
+ }, 8, [
219
+ "id",
220
+ "open",
221
+ "placement",
222
+ "aria-label",
223
+ "onMousedown"
224
+ ])) : d("", !0)], 46, ae));
225
+ }
226
+ });
227
+ //#endregion
228
+ export { D as default };
229
+
230
+ //# sourceMappingURL=VColorInput.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VColorInput.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/VColorInput/VColorInput.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @a11y @core\n/**\n * Compose VInput with VColorPicker. The colour is typed into the field in any format, and the\n * swatch at its start opens the picker in a panel; a text input cannot use popovertarget, so the\n * manual panel bridge handles opening, dismissal and focus transfer into the picker.\n */\nimport { computed, inject, ref, watch } from 'vue'\n\nimport VColorPicker from '../VColorPicker/VColorPicker.vue'\nimport type { ColorFormat, ColorSwatch } from '../VColorPicker/VColorPicker.vue'\nimport { formatColor, parseColor } from '../VColorPicker/color'\nimport type { FieldLabelPosition } from '../VField/VField.vue'\nimport VInput from '../VInput/VInput.vue'\nimport { inputGroupKey } from '../VInput/context'\nimport VPopover from '../VPopover/VPopover.vue'\nimport { canClear } from '../../composables/useClearable'\nimport { useControlShape } from '../../composables/useControlShape'\nimport { useFieldPanel } from '../../composables/useFieldPanel'\nimport { useRootAttrs } from '../../composables/useRootAttrs'\nimport { useMessages } from '../../i18n/state'\n\n/** The height of the field: 32, 40 or 48 pixels. */\nexport type ColorInputSize = 'sm' | 'md' | 'lg'\n\n/** Where the picker opens relative to the field. */\nexport type ColorInputPlacement =\n 'bottom' | 'bottom-start' | 'bottom-end' | 'top' | 'top-start' | 'top-end'\n\ninterface ColorInputProps {\n /**\n * How the value is written: `#rrggbb`, `rgb()`, `hsl()` or `oklch()`. The field accepts all\n * four, and rewrites what was typed in this one when the reader leaves it.\n */\n format?: ColorFormat\n /** Offers an opacity track, and writes the alpha into the value when it is below 1. */\n alpha?: boolean\n /** Preset colours, offered as swatches in the picker. */\n swatches?: ColorSwatch[]\n /** Hides the picker's eyedropper button. */\n hideEyeDropper?: boolean\n /** The label above the field. */\n label?: string\n /** A line of help under the field. */\n hint?: string\n /**\n * A message saying what is wrong with the value, shown in place of the hint. It marks the\n * field invalid, is read along with it, and is announced when it appears or changes.\n */\n error?: string\n /** Marks the field as required: an asterisk follows the label, and the field is `required`. */\n required?: boolean\n /** Hides the label visually. It still names the field for assistive technology. */\n hideLabel?: boolean\n /**\n * Where the label sits: above the field (`top`, the default), or at its start, in a column of\n * its own, moving back above when there is not room for both.\n */\n labelPosition?: FieldLabelPosition\n /** What the field says while empty. */\n placeholder?: string\n /** The height of the field: 32, 40 or 48 pixels. */\n size?: ColorInputSize\n /** Takes 4px off the height. */\n compact?: boolean\n /** Makes the field unusable. */\n disabled?: boolean\n /** Shows the colour without letting it change: nothing can be typed, and there is no picker. */\n readonly?: boolean\n /** Marks the field as invalid, for a rule of your own. */\n invalid?: boolean\n /** Offers a cross that empties the value. */\n clearable?: boolean\n /** What that cross does, in words. It falls back to the design system dictionary. */\n clearLabel?: string\n /**\n * What the swatch at the start of the field does, in words. It falls back to the design\n * system dictionary.\n */\n pickerLabel?: string\n /** Where the picker opens relative to the field. */\n placement?: ColorInputPlacement\n}\n\nconst props = withDefaults(defineProps<ColorInputProps>(), {\n format: 'hex',\n alpha: false,\n swatches: undefined,\n hideEyeDropper: false,\n label: undefined,\n hint: undefined,\n error: undefined,\n required: false,\n hideLabel: false,\n labelPosition: 'top',\n placeholder: undefined,\n size: 'md',\n compact: false,\n disabled: false,\n readonly: false,\n invalid: false,\n clearable: false,\n clearLabel: undefined,\n pickerLabel: undefined,\n placement: 'bottom-start',\n})\n\n/** The colour, written in `format`, or `null` when the field is empty. */\nconst model = defineModel<string | null>({ default: null })\n\nconst emit = defineEmits<{\n /** The clear cross emptied the field. The value has already been reset. */\n clear: []\n}>()\n\ndefineSlots<{\n /** Controls of your own inside the field, placed before the clear cross. */\n 'value-end'?(): unknown\n}>()\n\n// `class` and `style` stay on the wrapper; everything else goes down to the text field, which a\n// consumer's label points at and what assistive technology deals with.\ndefineOptions({ inheritAttrs: false })\nconst { rootClass, rootStyle, forwardedAttrs } = useRootAttrs()\n\nconst m = useMessages()\n\nconst rootEl = ref<HTMLElement | null>(null)\nconst panelRef = ref<InstanceType<typeof VPopover> | null>(null)\nconst inputRef = ref<InstanceType<typeof VInput> | null>(null)\nconst pickerRef = ref<InstanceType<typeof VColorPicker> | null>(null)\n\n// A VInputGroup joins several controls into one object, so the shape of this field is the\n// row's decision rather than its own (VInput/context.ts).\nconst group = inject(inputGroupKey, null)\nconst {\n size: resolvedSize,\n compact: resolvedCompact,\n disabled: resolvedDisabled,\n} = useControlShape(props, group)\n\nconst hasPanel = computed(() => !props.readonly)\n\nconst {\n open,\n panelId,\n popupAttrs,\n closeAndFocus,\n focusField,\n toggleFromIcon,\n onFocusout,\n onKeydown,\n onPanelMousedown,\n} = useFieldPanel({\n rootEl,\n panelRef,\n field: inputRef,\n disabled: () => resolvedDisabled.value || !hasPanel.value,\n focusInPanel: () => pickerRef.value?.focus(),\n})\n\nconst inputAttrs = popupAttrs(\n () => forwardedAttrs.value,\n () => hasPanel.value,\n)\n\n/** What the field shows: the value, or what is being typed until the reader leaves. */\nconst fieldText = ref('')\nwatch(model, (value) => (fieldText.value = value ?? ''), { immediate: true })\n\nconst parsed = computed(() => parseColor(model.value))\n\n/** The colour the swatch shows, with the opacity it has. */\nconst swatchColor = computed(() =>\n parsed.value ? formatColor(parsed.value, 'rgb', props.alpha) : undefined,\n)\n\n/**\n * Takes what was typed, in any of the four formats, and rewrites it in `format`. Anything that\n * is not a colour puts the field back as it was.\n */\nfunction commitField() {\n const text = fieldText.value.trim()\n if (!text) {\n model.value = null\n return\n }\n const color = parseColor(text)\n if (!color) {\n fieldText.value = model.value ?? ''\n return\n }\n const next = formatColor(color, props.format, props.alpha)\n model.value = next\n // The same value written again changes nothing, so the watcher would leave the text as typed.\n fieldText.value = next\n}\n\n// @keyboard\n// Enter takes the value and stays in the field; without it, the panel bridge would open the\n// picker. The down arrow remains the way into the picker.\nfunction onFieldKeydown(event: KeyboardEvent) {\n if (event.key !== 'Enter') return\n event.preventDefault()\n commitField()\n}\n\n// @keyboard\n// Enter on a track or a swatch is done with choosing: the panel closes and the focus returns to\n// the field. A button's Enter is left alone, being its click.\nfunction onPickerKeydown(event: KeyboardEvent) {\n if (event.key !== 'Enter' || !(event.target as HTMLElement).matches('input')) return\n event.preventDefault()\n closeAndFocus()\n}\n\nconst clearVisible = computed(() =>\n canClear(props, resolvedDisabled.value, !!model.value || !!fieldText.value),\n)\n\nfunction clearValue() {\n model.value = null\n fieldText.value = ''\n focusField()\n emit('clear')\n}\n\ndefineExpose({\n /** Moves the focus to the text field. */\n focus: (options?: FocusOptions) => inputRef.value?.focus(options),\n /** Selects what the field is showing. */\n select: () => inputRef.value?.select(),\n /** The real `<input>` behind the field. */\n el: computed(() => inputRef.value?.el ?? null),\n})\n</script>\n\n<template>\n <div\n ref=\"rootEl\"\n class=\"v-color-input\"\n :class=\"rootClass\"\n :style=\"rootStyle\"\n :data-open=\"open ? '' : undefined\"\n :data-disabled=\"resolvedDisabled ? '' : undefined\"\n @focusout=\"onFocusout\"\n @keydown=\"onKeydown\"\n >\n <VInput\n ref=\"inputRef\"\n v-model=\"fieldText\"\n class=\"v-color-input-field\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n v-bind=\"inputAttrs\"\n :readonly=\"readonly\"\n :label=\"label\"\n :hint=\"hint\"\n :error=\"error\"\n :required=\"required\"\n :hide-label=\"hideLabel\"\n :label-position=\"labelPosition\"\n :placeholder=\"placeholder\"\n :size=\"resolvedSize\"\n :compact=\"resolvedCompact\"\n :disabled=\"resolvedDisabled\"\n :invalid=\"invalid\"\n :clearable=\"clearable\"\n :clear-visible=\"clearVisible\"\n :clear-label=\"clearLabel ?? m.colorInput.clear\"\n @clear=\"clearValue\"\n @change=\"commitField\"\n @keydown=\"onFieldKeydown\"\n >\n <template #start>\n <button\n v-if=\"hasPanel\"\n type=\"button\"\n class=\"v-field-action v-color-input-swatch\"\n :aria-label=\"pickerLabel ?? m.colorInput.openPicker\"\n :disabled=\"resolvedDisabled\"\n @click=\"toggleFromIcon\"\n >\n <span class=\"v-color-input-chip\" :style=\"{ '--color-input-chip': swatchColor }\" />\n </button>\n <span v-else class=\"v-color-input-swatch\" aria-hidden=\"true\">\n <span class=\"v-color-input-chip\" :style=\"{ '--color-input-chip': swatchColor }\" />\n </span>\n </template>\n <template v-if=\"$slots['value-end']\" #value-end><slot name=\"value-end\" /></template>\n </VInput>\n\n <VPopover\n v-if=\"hasPanel\"\n :id=\"panelId\"\n ref=\"panelRef\"\n v-model:open=\"open\"\n mode=\"manual\"\n anchor=\"--color-input-anchor\"\n :placement=\"placement\"\n role=\"dialog\"\n :aria-label=\"label ?? m.colorInput.pickerLabel\"\n class=\"v-color-input-panel\"\n @mousedown=\"onPanelMousedown\"\n >\n <VColorPicker\n ref=\"pickerRef\"\n v-model=\"model\"\n :format=\"format\"\n :alpha=\"alpha\"\n :swatches=\"swatches\"\n :hide-eye-dropper=\"hideEyeDropper\"\n hide-input\n @keydown=\"onPickerKeydown\"\n />\n </VPopover>\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n .v-color-input {\n anchor-scope: --color-input-anchor;\n display: block;\n inline-size: 100%;\n font-family: var(--vectis-text-family);\n }\n\n /*\n * Anchored to the field's box rather than the wrapper, which also holds the label and the\n * hint: the panel then covers whichever of the two it lands on.\n */\n .v-color-input .v-input-field {\n anchor-name: --color-input-anchor;\n }\n\n /* A colour is written left to right in every language, as in VColorPicker's own field. */\n .v-color-input .v-input-control {\n direction: ltr;\n font-variant-numeric: tabular-nums;\n }\n\n .v-color-input .v-input-control:dir(rtl) {\n text-align: right;\n }\n\n /* The read-only swatch, which is no button and takes none of `.v-field-action`. */\n span.v-color-input-swatch {\n display: inline-flex;\n flex: none;\n }\n\n /*\n * The checkerboard shows through a translucent colour, drawn in the theme's own surface and\n * border colours; an empty field shows it alone. Forced colours leave the chip untouched: it\n * is the value, not the theme's paint. As on VColorPicker's swatches, the edge is a\n * translucent border shading the colour that runs under it, the checkerboard stopping inside:\n * an opaque ring would leave a pale fringe on the antialiased pixels.\n */\n .v-color-input-chip {\n inline-size: var(--vectis-icon-size);\n block-size: var(--vectis-icon-size);\n border: 1px solid var(--vectis-color-border-on-fill);\n border-radius: var(--vectis-radius-interactive);\n background:\n linear-gradient(var(--color-input-chip, transparent), var(--color-input-chip, transparent))\n border-box,\n repeating-conic-gradient(var(--vectis-color-border) 0 25%, var(--vectis-color-surface) 0 50%)\n 0 0 / var(--vectis-control-size-color-picker-checker)\n var(--vectis-control-size-color-picker-checker) padding-box;\n forced-color-adjust: none;\n }\n\n .v-color-input[data-disabled] .v-color-input-chip {\n opacity: 0.5;\n }\n\n /*\n * `position-anchor` and the chrome come from VPopover; the panel's own padding is cancelled,\n * VColorPicker padding itself as the date and time pickers do.\n */\n .v-popover-panel.v-color-input-panel {\n inline-size: max-content;\n padding: 0;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoFA,IAAM,IAAQ,GAwBR,IAAQ,GAA0B,GAAA,YAAkB,GAEpD,IAAO,GAaP,EAAE,cAAW,cAAW,sBAAmB,EAAa,GAExD,IAAI,EAAY,GAEhB,IAAS,EAAwB,IAAI,GACrC,IAAW,EAA0C,IAAI,GACzD,IAAW,EAAwC,IAAI,GACvD,IAAY,EAA8C,IAAI,GAK9D,EACJ,MAAM,GACN,SAAS,GACT,UAAU,MACR,EAAgB,GALN,EAAO,GAAe,IAKT,CAAK,GAE1B,IAAW,QAAe,CAAC,EAAM,QAAQ,GAEzC,EACJ,SACA,YACA,eACA,kBACA,gBACA,mBACA,eACA,cACA,yBACE,GAAc;GAChB;GACA;GACA,OAAO;GACP,gBAAgB,EAAiB,SAAS,CAAC,EAAS;GACpD,oBAAoB,EAAU,OAAO,MAAM;EAC7C,CAAC,GAEK,KAAa,QACX,EAAe,aACf,EAAS,KACjB,GAGM,IAAY,EAAI,EAAE;EACxB,GAAM,IAAQ,MAAW,EAAU,QAAQ,KAAS,IAAK,EAAE,WAAW,GAAK,CAAC;EAE5E,IAAM,IAAS,QAAe,EAAW,EAAM,KAAK,CAAC,GAG/C,IAAc,QAClB,EAAO,QAAQ,EAAY,EAAO,OAAO,OAAO,EAAM,KAAK,IAAI,KAAA,CACjE;EAMA,SAAS,IAAc;GACrB,IAAM,IAAO,EAAU,MAAM,KAAK;GAClC,IAAI,CAAC,GAAM;IACT,EAAM,QAAQ;IACd;GACF;GACA,IAAM,IAAQ,EAAW,CAAI;GAC7B,IAAI,CAAC,GAAO;IACV,EAAU,QAAQ,EAAM,SAAS;IACjC;GACF;GACA,IAAM,IAAO,EAAY,GAAO,EAAM,QAAQ,EAAM,KAAK;GAGzD,AAFA,EAAM,QAAQ,GAEd,EAAU,QAAQ;EACpB;EAKA,SAAS,GAAe,GAAsB;GACxC,EAAM,QAAQ,YAClB,EAAM,eAAe,GACrB,EAAY;EACd;EAKA,SAAS,GAAgB,GAAsB;GACzC,EAAM,QAAQ,WAAW,CAAE,EAAM,OAAuB,QAAQ,OAAO,MAC3E,EAAM,eAAe,GACrB,EAAc;EAChB;EAEA,IAAM,KAAe,QACnB,EAAS,GAAO,EAAiB,OAAO,CAAC,CAAC,EAAM,SAAS,CAAC,CAAC,EAAU,KAAK,CAC5E;EAEA,SAAS,KAAa;GAIpB,AAHA,EAAM,QAAQ,MACd,EAAU,QAAQ,IAClB,GAAW,GACX,EAAK,OAAO;EACd;SAEA,EAAa;GAEX,QAAQ,MAA2B,EAAS,OAAO,MAAM,CAAO;GAEhE,cAAc,EAAS,OAAO,OAAO;GAErC,IAAI,QAAe,EAAS,OAAO,MAAM,IAAI;EAC/C,CAAC,mBAIC,EA8EM,OAAA;YA7EA;GAAJ,KAAI;GACJ,OAAK,EAAA,CAAC,iBACE,EAAA,CAAA,CAAS,CAAA;GAChB,OAAK,EAAE,EAAA,CAAA,CAAS;GAChB,aAAW,EAAA,CAAA,IAAI,KAAQ,KAAA;GACvB,iBAAe,EAAA,CAAA,IAAgB,KAAQ,KAAA;GACvC,YAAQ,AAAA,EAAA,QAAA,GAAA,MAAE,EAAA,CAAA,KAAA,EAAA,CAAA,CAAA,CAAA,GAAA,CAAA;GACV,WAAO,AAAA,EAAA,QAAA,GAAA,MAAE,EAAA,CAAA,KAAA,EAAA,CAAA,CAAA,CAAA,GAAA,CAAA;MAEV,EA0CS,IA1CT,EA0CS;YAzCH;GAAJ,KAAI;eACK,EAAA;4CAAS,QAAA;GAClB,OAAM;GACN,cAAa;GACb,YAAW;KACH,EAAA,EAAA,GAAU;GACjB,UAAU,EAAA;GACV,OAAO,EAAA;GACP,MAAM,EAAA;GACN,OAAO,EAAA;GACP,UAAU,EAAA;GACV,cAAY,EAAA;GACZ,kBAAgB,EAAA;GAChB,aAAa,EAAA;GACb,MAAM,EAAA,CAAA;GACN,SAAS,EAAA,CAAA;GACT,UAAU,EAAA,CAAA;GACV,SAAS,EAAA;GACT,WAAW,EAAA;GACX,iBAAe,GAAA;GACf,eAAa,EAAA,cAAc,EAAA,CAAA,CAAC,CAAC,WAAW;GACxC,SAAO;GACP,UAAQ;GACR,WAAS;;GAEC,OAAK,QAMpB,CAJc,EAAA,SAAA,EAAA,GADR,EASS,UAAA;;IAPP,MAAK;IACL,OAAM;IACL,cAAY,EAAA,eAAe,EAAA,CAAA,CAAC,CAAC,WAAW;IACxC,UAAU,EAAA,CAAA;IACV,SAAK,AAAA,EAAA,QAAA,GAAA,MAAE,EAAA,CAAA,KAAA,EAAA,CAAA,CAAA,CAAA,GAAA,CAAA;OAER,EAAkF,QAAA;IAA5E,OAAM;IAAsB,OAAK,EAAA,EAAA,sBAA0B,EAAA,MAAW,CAAA;iCAE9E,EAEO,QAFP,IAEO,CADL,EAAkF,QAAA;IAA5E,OAAM;IAAsB,OAAK,EAAA,EAAA,sBAA0B,EAAA,MAAW,CAAA;;;MAGhEA,EAAAA,OAAM,eAAA;SAAgB;eAAmC,CAAzB,GAAyB,EAAA,QAAA,WAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;MAInE,EAAA,SAAA,EAAA,GADR,EAuBW,GAAA;;GArBR,IAAI,EAAA,CAAA;YACD;GAAJ,KAAI;GACI,MAAM,EAAA,CAAA;6CAAI,QAAA,IAAA;GAClB,MAAK;GACL,QAAO;GACN,WAAW,EAAA;GACZ,MAAK;GACJ,cAAY,EAAA,SAAS,EAAA,CAAA,CAAC,CAAC,WAAW;GACnC,OAAM;GACL,aAAW,EAAA,EAAA;;oBAWV,CATF,EASE,GAAA;aARI;IAAJ,KAAI;gBACK,EAAA;6CAAK,QAAA;IACb,QAAQ,EAAA;IACR,OAAO,EAAA;IACP,UAAU,EAAA;IACV,oBAAkB,EAAA;IACnB,cAAA;IACC,WAAS"}
@@ -0,0 +1,2 @@
1
+ @layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
2
+ @layer vectis.components{.v-color-picker{--color-picker-checker: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);--color-picker-thumb:var(--vectis-control-size-color-picker-thumb);gap:var(--vectis-space-3);inline-size:var(--vectis-control-size-color-picker-width);max-inline-size:100%;padding:var(--vectis-space-3);color:var(--vectis-color-text);font-family:var(--vectis-text-family);flex-direction:column;display:inline-flex}.v-color-picker-area,.v-color-picker-track,.v-color-picker-preview,.v-color-picker-chip{forced-color-adjust:none;direction:ltr}.v-color-picker-area{block-size:var(--vectis-control-size-color-picker-area);border-radius:var(--vectis-radius-interactive);background:linear-gradient(to top, black, transparent), linear-gradient(to right, white, transparent), hsl(var(--color-picker-hue) 100% 50%);cursor:crosshair;touch-action:none;position:relative}.v-color-picker-thumb{inline-size:var(--color-picker-thumb);block-size:var(--color-picker-thumb);border-radius:var(--vectis-radius-pill);background:var(--color-picker-opaque);pointer-events:none;border:2px solid #fff;position:absolute;inset-block-start:calc((1 - var(--color-picker-v)) * 100%);inset-inline-start:calc(var(--color-picker-s) * 100%);translate:-50% -50%;box-shadow:0 0 0 1px #0006,inset 0 0 0 1px #0006}.v-color-picker-area:has(.v-hidden-input:focus-visible) .v-color-picker-thumb{outline:var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);outline-offset:var(--vectis-focus-ring-offset)}.v-color-picker-controls{align-items:center;gap:var(--vectis-space-2);display:flex}.v-color-picker-preview{inline-size:var(--vectis-control-size-color-picker-preview);block-size:var(--vectis-control-size-color-picker-preview);border-radius:var(--vectis-radius-pill);border:1px solid var(--vectis-color-border-on-fill);background:linear-gradient(var(--color-picker-color), var(--color-picker-color)) border-box, var(--color-picker-checker) padding-box;flex:none}.v-color-picker-tracks{gap:var(--vectis-space-3);flex-direction:column;flex:1;min-inline-size:0;display:flex}.v-color-picker-track{inline-size:100%;block-size:var(--vectis-control-size-color-picker-track);border-radius:var(--vectis-radius-pill);appearance:none;cursor:pointer;margin:0;display:block}.v-color-picker-hue{--color-picker-track-thumb:hsl(var(--color-picker-hue) 100% 50%);background:linear-gradient(90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.v-color-picker-alpha{--color-picker-track-thumb:var(--color-picker-color);background:linear-gradient(to right, transparent, var(--color-picker-opaque)), var(--color-picker-checker)}.v-color-picker-track::-webkit-slider-thumb{appearance:none;inline-size:var(--color-picker-thumb);block-size:var(--color-picker-thumb);border-radius:var(--vectis-radius-pill);background:linear-gradient(var(--color-picker-track-thumb), var(--color-picker-track-thumb)), var(--color-picker-checker);border:2px solid #fff;box-shadow:0 0 0 1px #0006,inset 0 0 0 1px #0006}.v-color-picker-track::-moz-range-thumb{box-sizing:border-box;inline-size:var(--color-picker-thumb);block-size:var(--color-picker-thumb);border-radius:var(--vectis-radius-pill);background:linear-gradient(var(--color-picker-track-thumb), var(--color-picker-track-thumb)), var(--color-picker-checker);border:2px solid #fff;box-shadow:0 0 0 1px #0006,inset 0 0 0 1px #0006}.v-color-picker-track:focus-visible{outline:var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);outline-offset:var(--vectis-focus-ring-offset)}.v-color-picker-fields{gap:var(--vectis-space-2);display:flex}.v-color-picker-fields .v-color-picker-format{inline-size:var(--vectis-control-size-color-picker-format);flex:none}.v-color-picker-value{flex:1;min-inline-size:0}.v-color-picker-value .v-input-control{font-variant-numeric:tabular-nums;direction:ltr}.v-color-picker-value .v-input-control:dir(rtl){text-align:right}.v-color-picker-swatches{gap:var(--vectis-space-2);border:0;flex-wrap:wrap;min-inline-size:0;margin:0;padding:0;display:flex}.v-color-picker-swatch{cursor:pointer;display:inline-flex;position:relative}.v-color-picker-chip{inline-size:var(--vectis-control-size-color-picker-swatch);block-size:var(--vectis-control-size-color-picker-swatch);border-radius:var(--vectis-radius-interactive);border:1px solid var(--vectis-color-border-on-fill);background:linear-gradient(var(--color-picker-swatch), var(--color-picker-swatch)) border-box, var(--color-picker-checker) padding-box}.v-color-picker-swatch .v-hidden-input:checked+.v-color-picker-chip{outline:2px solid var(--vectis-color-text);outline-offset:1px}.v-color-picker-swatch .v-hidden-input:focus-visible+.v-color-picker-chip{outline:var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);outline-offset:var(--vectis-focus-ring-offset)}.v-color-picker[data-disabled] :is(.v-color-picker-area,.v-color-picker-preview,.v-color-picker-track,.v-color-picker-chip){opacity:.5}.v-color-picker[data-disabled] :is(.v-color-picker-area,.v-color-picker-track,.v-color-picker-swatch){cursor:not-allowed}.v-color-picker[data-readonly] :is(.v-color-picker-area,.v-color-picker-track,.v-color-picker-swatch){cursor:default}}
@@ -0,0 +1,67 @@
1
+ import { ColorFormat } from './color.js';
2
+ export type { ColorFormat } from './color.js';
3
+ /** A preset colour: the colour alone, or the colour and the words that name it. */
4
+ export type ColorSwatch = string | {
5
+ color: string;
6
+ label: string;
7
+ };
8
+ interface ColorPickerProps {
9
+ /**
10
+ * How the value is written: `#rrggbb`, `rgb()`, `hsl()` or `oklch()`. The text field accepts
11
+ * all four whatever this says.
12
+ */
13
+ format?: ColorFormat;
14
+ /** Offers an opacity track, and writes the alpha into the value when it is below 1. */
15
+ alpha?: boolean;
16
+ /** Preset colours, offered as a row of swatches under the picker. */
17
+ swatches?: ColorSwatch[];
18
+ /**
19
+ * Hides the text field and its format menu. VColorInput does, its own field playing that
20
+ * part.
21
+ */
22
+ hideInput?: boolean;
23
+ /**
24
+ * Hides the eyedropper button, shown otherwise wherever the browser offers the `EyeDropper`
25
+ * API.
26
+ */
27
+ hideEyeDropper?: boolean;
28
+ /** Makes the picker unusable. */
29
+ disabled?: boolean;
30
+ /**
31
+ * Shows the colour without letting it be changed. The controls stay focusable and announce
32
+ * their values, which separates it from `disabled`, and the value is still submitted.
33
+ */
34
+ readonly?: boolean;
35
+ /** What the picker is called. It falls back to the design system dictionary. */
36
+ label?: string;
37
+ /** The name the value is sent under in a form. */
38
+ name?: string;
39
+ }
40
+ type __VLS_Props = ColorPickerProps;
41
+ type __VLS_ModelProps = {
42
+ /** The colour, written in `format`, or `null` when none has been chosen. */
43
+ modelValue?: string | null;
44
+ };
45
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
46
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {
47
+ /** Moves the focus to the saturation-brightness area. */
48
+ focus: (options?: FocusOptions) => void | undefined;
49
+ /** The root element. */
50
+ el: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
51
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
52
+ "update:modelValue": (value: string | null) => any;
53
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
54
+ "onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
55
+ }>, {
56
+ label: string;
57
+ alpha: boolean;
58
+ format: ColorFormat;
59
+ swatches: ColorSwatch[];
60
+ name: string;
61
+ disabled: boolean;
62
+ readonly: boolean;
63
+ hideInput: boolean;
64
+ hideEyeDropper: boolean;
65
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
66
+ declare const _default: typeof __VLS_export;
67
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import './VColorPicker.css';
2
+ import e from "./VColorPicker.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/VColorPicker/VColorPicker.vue
5
+ var t = e;
6
+ //#endregion
7
+ export { t as default };
8
+
9
+ //# sourceMappingURL=VColorPicker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VColorPicker.js","names":[],"sources":["../../../src/components/VColorPicker/VColorPicker.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @keyboard @a11y @core\n/**\n * A colour picker built from native ranges: the hue and alpha tracks are `<input type=\"range\">`,\n * and the saturation-brightness area holds two hidden ones, one per axis, which assistive\n * technology adjusts on its own. JavaScript adds the pointer on the area and its two-axis arrow\n * keys, which no native control offers.\n */\nimport { computed, onMounted, ref, useId, watch } from 'vue'\n\nimport VIconButton from '../VIconButton/VIconButton.vue'\nimport VInput from '../VInput/VInput.vue'\nimport VSelect from '../VSelect/VSelect.vue'\nimport { colorize as colorizeIcon } from '../VIcon/icons/colorize'\nimport { useAriaLabel } from '../../composables/useAriaLabel'\nimport { useLocale, useMessages } from '../../i18n/state'\nimport { clamp } from '../../utils/number'\nimport { COLOR_FORMATS, formatColor, hsvToRgb, parseColor, rgbToHsv, sameColor } from './color'\nimport type { ColorFormat, Hsva, Rgba } from './color'\n\nexport type { ColorFormat } from './color'\n\n/** A preset colour: the colour alone, or the colour and the words that name it. */\nexport type ColorSwatch = string | { color: string; label: string }\n\ninterface ColorPickerProps {\n /**\n * How the value is written: `#rrggbb`, `rgb()`, `hsl()` or `oklch()`. The text field accepts\n * all four whatever this says.\n */\n format?: ColorFormat\n /** Offers an opacity track, and writes the alpha into the value when it is below 1. */\n alpha?: boolean\n /** Preset colours, offered as a row of swatches under the picker. */\n swatches?: ColorSwatch[]\n /**\n * Hides the text field and its format menu. VColorInput does, its own field playing that\n * part.\n */\n hideInput?: boolean\n /**\n * Hides the eyedropper button, shown otherwise wherever the browser offers the `EyeDropper`\n * API.\n */\n hideEyeDropper?: boolean\n /** Makes the picker unusable. */\n disabled?: boolean\n /**\n * Shows the colour without letting it be changed. The controls stay focusable and announce\n * their values, which separates it from `disabled`, and the value is still submitted.\n */\n readonly?: boolean\n /** What the picker is called. It falls back to the design system dictionary. */\n label?: string\n /** The name the value is sent under in a form. */\n name?: string\n}\n\nconst props = withDefaults(defineProps<ColorPickerProps>(), {\n format: 'hex',\n alpha: false,\n swatches: undefined,\n hideInput: false,\n hideEyeDropper: false,\n disabled: false,\n readonly: false,\n label: undefined,\n name: undefined,\n})\n\n/** The colour, written in `format`, or `null` when none has been chosen. */\nconst model = defineModel<string | null>({ default: null })\n\nconst m = useMessages()\nconst locale = useLocale()\nconst ariaLabel = useAriaLabel(() => props.label ?? m.value.colorPicker.label)\n\n/** What the picker shows. With no colour yet, it rests on black, which writes nothing. */\nconst hsva = ref<Hsva>({ h: 0, s: 0, v: 0, a: 1 })\nconst rgba = computed(() => hsvToRgb(hsva.value))\n\n// @core\n// The value last written, so that its echo through the model is not parsed back: hex rounds the\n// channels, and a grey has no hue, so reading it back would move the thumbs under the pointer.\nlet written: string | null = null\n\nwatch(\n model,\n (value) => {\n if (value === written) return\n const parsed = parseColor(value)\n if (parsed) hsva.value = rgbToHsv(props.alpha ? parsed : { ...parsed, a: 1 }, hsva.value.h)\n },\n { immediate: true },\n)\n\nfunction write(next: Hsva) {\n hsva.value = next\n written = formatColor(hsvToRgb(next), props.format, props.alpha)\n model.value = written\n}\n\nfunction writeRgba(next: Rgba) {\n write(rgbToHsv(props.alpha ? next : { ...next, a: 1 }, hsva.value.h))\n}\n\nconst percent = computed(() => new Intl.NumberFormat(locale.value, { style: 'percent' }))\nconst degrees = computed(\n () =>\n new Intl.NumberFormat(locale.value, { style: 'unit', unit: 'degree', unitDisplay: 'narrow' }),\n)\n\n/** Both axes in words: read on either of the area's inputs, whichever one has the focus. */\nconst areaValueText = computed(() =>\n m.value.colorPicker.areaValue(\n percent.value.format(Math.round(hsva.value.s * 100) / 100),\n percent.value.format(Math.round(hsva.value.v * 100) / 100),\n ),\n)\n\nconst areaEl = ref<HTMLElement | null>(null)\nconst saturationEl = ref<HTMLInputElement | null>(null)\n\nfunction moveTo(event: PointerEvent) {\n const rect = areaEl.value!.getBoundingClientRect()\n write({\n ...hsva.value,\n s: clamp((event.clientX - rect.left) / rect.width, 0, 1),\n v: clamp(1 - (event.clientY - rect.top) / rect.height, 0, 1),\n })\n}\n\n/** The pointer dragging the area's thumb, if one is. */\nlet dragging: number | null = null\n\nfunction onAreaPointerdown(event: PointerEvent) {\n if (props.disabled || event.button !== 0) return\n // The focus is moved by hand, without the scroll a default focus on mousedown could cause.\n event.preventDefault()\n saturationEl.value?.focus({ preventScroll: true })\n if (props.readonly) return\n dragging = event.pointerId\n // @fallback\n // Capture keeps the drag going outside the area; synthetic events may not reference a\n // capturable pointer.\n try {\n areaEl.value!.setPointerCapture(event.pointerId)\n } catch {\n /* Synthetic pointers cannot be captured. */\n }\n moveTo(event)\n}\n\nfunction onAreaPointermove(event: PointerEvent) {\n if (event.pointerId === dragging) moveTo(event)\n}\n\nfunction onAreaPointerup(event: PointerEvent) {\n if (event.pointerId === dragging) dragging = null\n}\n\n// @keyboard\n/**\n * Both inputs of the area answer the same keys: the horizontal arrows and Home/End move the\n * saturation, the vertical arrows and PageUp/PageDown the brightness. Natively each input would\n * move its own axis on every arrow.\n */\nfunction onAreaKeydown(event: KeyboardEvent) {\n if (props.readonly) return\n const step = event.shiftKey ? 10 : 1\n const moves: Record<string, [axis: 's' | 'v', delta: number]> = {\n ArrowLeft: ['s', -step],\n ArrowRight: ['s', step],\n ArrowDown: ['v', -step],\n ArrowUp: ['v', step],\n PageDown: ['v', -10],\n PageUp: ['v', 10],\n Home: ['s', -100],\n End: ['s', 100],\n }\n const move = moves[event.key]\n if (!move) return\n event.preventDefault()\n const [axis, delta] = move\n write({ ...hsva.value, [axis]: clamp((Math.round(hsva.value[axis] * 100) + delta) / 100, 0, 1) })\n}\n\n/** What a native range reports on its own: a drag on a track, or assistive technology. */\nfunction onRangeInput(channel: keyof Hsva, scale: number, event: Event) {\n const el = event.target as HTMLInputElement\n // @core\n // A range has no native `readonly`: the move it has already made is put back.\n if (props.readonly) {\n el.value = String(Math.round(hsva.value[channel] * scale))\n return\n }\n write({ ...hsva.value, [channel]: Number(el.value) / scale })\n}\n\n/** A read-only swatch refuses the click, which is what checks a radio, arrows included. */\nfunction onSwatchClick(event: MouseEvent) {\n if (props.readonly) event.preventDefault()\n}\n\nconst shownFormat = ref<ColorFormat>(props.format)\nwatch(\n () => props.format,\n (format) => (shownFormat.value = format),\n)\n\nconst formatOptions = COLOR_FORMATS.map((format) => ({\n value: format,\n label: format.toUpperCase(),\n}))\n\n/** The text field's own copy, rewritten whenever the colour changes from elsewhere. */\nconst fieldText = ref('')\nwatch(\n [rgba, shownFormat, () => props.alpha, () => model.value === null],\n () => {\n fieldText.value =\n model.value === null ? '' : formatColor(rgba.value, shownFormat.value, props.alpha)\n },\n { immediate: true },\n)\n\n/** Takes what was typed, in any of the four formats, or puts the field back as it was. */\nfunction commitField() {\n const text = fieldText.value.trim()\n if (!text) {\n written = null\n model.value = null\n return\n }\n const parsed = parseColor(text)\n if (parsed) writeRgba(parsed)\n else fieldText.value = formatColor(rgba.value, shownFormat.value, props.alpha)\n}\n\nfunction onFieldKeydown(event: KeyboardEvent) {\n if (event.key !== 'Enter') return\n event.preventDefault()\n commitField()\n}\n\nconst items = computed(() =>\n (props.swatches ?? []).map((swatch) => {\n const color = typeof swatch === 'string' ? swatch : swatch.color\n return {\n color,\n label: typeof swatch === 'string' ? swatch : swatch.label,\n rgba: parseColor(color),\n }\n }),\n)\n\n// @core\n// The swatches are native radios, so the arrow keys move between them. Their name only groups\n// them: they are tied to a form that does not exist so that no enclosing form sends them, the\n// picker's value going through its own hidden input.\nconst swatchGroup = useId()\n\ninterface EyeDropperResult {\n sRGBHex: string\n}\n\n/** The EyeDropper API, which TypeScript's DOM library does not describe yet. */\ntype EyeDropperConstructor = new () => { open: () => Promise<EyeDropperResult> }\n\n// @fallback\n// Detected once mounted, never on the server: the button simply does not exist elsewhere.\nconst eyeDropper = ref<EyeDropperConstructor | null>(null)\nonMounted(() => {\n eyeDropper.value =\n (window as unknown as { EyeDropper?: EyeDropperConstructor }).EyeDropper ?? null\n})\n\nasync function pickFromScreen() {\n if (!eyeDropper.value) return\n try {\n const { sRGBHex } = await new eyeDropper.value().open()\n const picked = parseColor(sRGBHex)\n // The screen has no transparency: the opacity already chosen is kept.\n if (picked) writeRgba({ ...picked, a: hsva.value.a })\n } catch {\n // Escape cancels the eyedropper by rejecting the promise: nothing to report.\n }\n}\n\nconst opaque = computed(() => formatColor({ ...rgba.value, a: 1 }, 'rgb'))\n\nconst rootStyle = computed(() => ({\n '--color-picker-hue': String(hsva.value.h),\n '--color-picker-opaque': opaque.value,\n '--color-picker-color': formatColor(rgba.value, 'rgb', props.alpha),\n '--color-picker-s': String(hsva.value.s),\n '--color-picker-v': String(hsva.value.v),\n}))\n\nconst rootEl = ref<HTMLElement | null>(null)\n\ndefineExpose({\n /** Moves the focus to the saturation-brightness area. */\n focus: (options?: FocusOptions) => saturationEl.value?.focus(options),\n /** The root element. */\n el: rootEl,\n})\n</script>\n\n<template>\n <div\n ref=\"rootEl\"\n class=\"v-color-picker\"\n role=\"group\"\n :aria-label=\"ariaLabel\"\n :data-disabled=\"disabled ? '' : undefined\"\n :data-readonly=\"readonly ? '' : undefined\"\n :style=\"rootStyle\"\n >\n <div\n ref=\"areaEl\"\n class=\"v-color-picker-area\"\n @pointerdown=\"onAreaPointerdown\"\n @pointermove=\"onAreaPointermove\"\n @pointerup=\"onAreaPointerup\"\n @pointercancel=\"onAreaPointerup\"\n >\n <input\n ref=\"saturationEl\"\n type=\"range\"\n class=\"v-hidden-input\"\n min=\"0\"\n max=\"100\"\n :value=\"Math.round(hsva.s * 100)\"\n :aria-label=\"m.colorPicker.saturation\"\n :aria-valuetext=\"areaValueText\"\n :aria-readonly=\"readonly || undefined\"\n :disabled=\"disabled\"\n @input=\"onRangeInput('s', 100, $event)\"\n @keydown=\"onAreaKeydown\"\n />\n <!-- Out of the tab order: one stop for the area, whose arrows move both axes. -->\n <input\n type=\"range\"\n class=\"v-hidden-input\"\n tabindex=\"-1\"\n min=\"0\"\n max=\"100\"\n :value=\"Math.round(hsva.v * 100)\"\n :aria-label=\"m.colorPicker.brightness\"\n :aria-valuetext=\"areaValueText\"\n :aria-readonly=\"readonly || undefined\"\n :disabled=\"disabled\"\n @input=\"onRangeInput('v', 100, $event)\"\n @keydown=\"onAreaKeydown\"\n />\n <span class=\"v-color-picker-thumb\" aria-hidden=\"true\" />\n </div>\n\n <div class=\"v-color-picker-controls\">\n <VIconButton\n v-if=\"eyeDropper && !hideEyeDropper\"\n class=\"v-color-picker-eye-dropper\"\n :icon=\"colorizeIcon\"\n :label=\"m.colorPicker.eyeDropper\"\n size=\"sm\"\n :disabled=\"disabled || readonly\"\n @click=\"pickFromScreen\"\n />\n <span class=\"v-color-picker-preview\" aria-hidden=\"true\" />\n <div class=\"v-color-picker-tracks\">\n <input\n type=\"range\"\n class=\"v-color-picker-track v-color-picker-hue\"\n min=\"0\"\n max=\"360\"\n :value=\"Math.round(hsva.h)\"\n :aria-label=\"m.colorPicker.hue\"\n :aria-valuetext=\"degrees.format(Math.round(hsva.h))\"\n :aria-readonly=\"readonly || undefined\"\n :disabled=\"disabled\"\n @input=\"onRangeInput('h', 1, $event)\"\n />\n <input\n v-if=\"alpha\"\n type=\"range\"\n class=\"v-color-picker-track v-color-picker-alpha\"\n min=\"0\"\n max=\"100\"\n :value=\"Math.round(hsva.a * 100)\"\n :aria-label=\"m.colorPicker.alpha\"\n :aria-valuetext=\"percent.format(Math.round(hsva.a * 100) / 100)\"\n :aria-readonly=\"readonly || undefined\"\n :disabled=\"disabled\"\n @input=\"onRangeInput('a', 100, $event)\"\n />\n </div>\n </div>\n\n <div v-if=\"!hideInput\" class=\"v-color-picker-fields\">\n <VSelect\n :model-value=\"shownFormat\"\n class=\"v-color-picker-format\"\n :options=\"formatOptions\"\n size=\"sm\"\n :aria-label=\"m.colorPicker.format\"\n :disabled=\"disabled\"\n @update:model-value=\"shownFormat = $event as ColorFormat\"\n />\n <VInput\n v-model=\"fieldText\"\n class=\"v-color-picker-value\"\n size=\"sm\"\n :aria-label=\"m.colorPicker.value\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n @change=\"commitField\"\n @keydown=\"onFieldKeydown\"\n />\n </div>\n\n <fieldset\n v-if=\"items.length\"\n class=\"v-color-picker-swatches\"\n :aria-label=\"m.colorPicker.swatches\"\n :disabled=\"disabled\"\n >\n <label\n v-for=\"item in items\"\n :key=\"item.color\"\n class=\"v-color-picker-swatch\"\n :style=\"{ '--color-picker-swatch': item.color }\"\n >\n <input\n type=\"radio\"\n class=\"v-hidden-input\"\n :name=\"swatchGroup\"\n :form=\"`${swatchGroup}-none`\"\n :value=\"item.color\"\n :checked=\"model !== null && sameColor(item.rgba, rgba, alpha)\"\n :aria-disabled=\"readonly || undefined\"\n @click=\"onSwatchClick\"\n @change=\"item.rgba && writeRgba(item.rgba)\"\n />\n <span class=\"v-color-picker-chip\" />\n <span class=\"v-visually-hidden\">{{ item.label }}</span>\n </label>\n </fieldset>\n\n <input v-if=\"name && model\" type=\"hidden\" :name=\"name\" :value=\"model\" />\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n .v-color-picker {\n /*\n * The checkerboard that shows through a translucent colour. It is drawn in the theme's own\n * surface and border colours, so it reads as \"transparent\" in both themes.\n */\n --color-picker-checker: repeating-conic-gradient(\n var(--vectis-color-border) 0 25%,\n var(--vectis-color-surface) 0 50%\n )\n 0 0 / var(--vectis-control-size-color-picker-checker)\n var(--vectis-control-size-color-picker-checker);\n --color-picker-thumb: var(--vectis-control-size-color-picker-thumb);\n\n display: inline-flex;\n flex-direction: column;\n gap: var(--vectis-space-3);\n inline-size: var(--vectis-control-size-color-picker-width);\n max-inline-size: 100%;\n padding: var(--vectis-space-3);\n color: var(--vectis-color-text);\n font-family: var(--vectis-text-family);\n }\n\n /*\n * The colour content (area, tracks, preview, swatches) is the value itself, not the theme's\n * paint: it is never mirrored in right-to-left text, and forced colours leave it untouched.\n * Its gradients run between literal black and white, the ends of the colour model.\n */\n\n /*\n * The edge of the preview and the swatches is a translucent border over the colour, which it\n * shades rather than covers: an opaque grey ring left a pale fringe on the antialiased pixels.\n * The colour runs under the border and the checkerboard stops inside it, so no square of the\n * checkerboard shows through those pixels either.\n */\n .v-color-picker-area,\n .v-color-picker-track,\n .v-color-picker-preview,\n .v-color-picker-chip {\n direction: ltr;\n forced-color-adjust: none;\n }\n\n .v-color-picker-area {\n position: relative;\n block-size: var(--vectis-control-size-color-picker-area);\n border-radius: var(--vectis-radius-interactive);\n background:\n linear-gradient(to top, black, transparent), linear-gradient(to right, white, transparent),\n hsl(var(--color-picker-hue) 100% 50%);\n cursor: crosshair;\n touch-action: none;\n }\n\n /*\n * Every thumb carries a light ring and a dark one, whatever the theme: it sits on colours of\n * any lightness, against which a single themed ring would vanish.\n */\n .v-color-picker-thumb {\n position: absolute;\n inset-inline-start: calc(var(--color-picker-s) * 100%);\n inset-block-start: calc((1 - var(--color-picker-v)) * 100%);\n inline-size: var(--color-picker-thumb);\n block-size: var(--color-picker-thumb);\n border: 2px solid white;\n border-radius: var(--vectis-radius-pill);\n background: var(--color-picker-opaque);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 0.4),\n inset 0 0 0 1px rgb(0 0 0 / 0.4);\n translate: -50% -50%;\n pointer-events: none;\n }\n\n .v-color-picker-area:has(.v-hidden-input:focus-visible) .v-color-picker-thumb {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: var(--vectis-focus-ring-offset);\n }\n\n .v-color-picker-controls {\n display: flex;\n align-items: center;\n gap: var(--vectis-space-2);\n }\n\n .v-color-picker-preview {\n flex: none;\n inline-size: var(--vectis-control-size-color-picker-preview);\n block-size: var(--vectis-control-size-color-picker-preview);\n border-radius: var(--vectis-radius-pill);\n border: 1px solid var(--vectis-color-border-on-fill);\n background:\n linear-gradient(var(--color-picker-color), var(--color-picker-color)) border-box,\n var(--color-picker-checker) padding-box;\n }\n\n .v-color-picker-tracks {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: var(--vectis-space-3);\n min-inline-size: 0;\n }\n\n .v-color-picker-track {\n display: block;\n inline-size: 100%;\n block-size: var(--vectis-control-size-color-picker-track);\n margin: 0;\n border-radius: var(--vectis-radius-pill);\n appearance: none;\n cursor: pointer;\n }\n\n .v-color-picker-hue {\n --color-picker-track-thumb: hsl(var(--color-picker-hue) 100% 50%);\n background: linear-gradient(\n to right,\n hsl(0 100% 50%),\n hsl(60 100% 50%),\n hsl(120 100% 50%),\n hsl(180 100% 50%),\n hsl(240 100% 50%),\n hsl(300 100% 50%),\n hsl(360 100% 50%)\n );\n }\n\n .v-color-picker-alpha {\n --color-picker-track-thumb: var(--color-picker-color);\n background:\n linear-gradient(to right, transparent, var(--color-picker-opaque)),\n var(--color-picker-checker);\n }\n\n /*\n * The two vendor pseudo-elements stay in two separate rules: a selector list holding one a\n * browser does not know is dropped whole.\n */\n .v-color-picker-track::-webkit-slider-thumb {\n appearance: none;\n inline-size: var(--color-picker-thumb);\n block-size: var(--color-picker-thumb);\n border: 2px solid white;\n border-radius: var(--vectis-radius-pill);\n background:\n linear-gradient(var(--color-picker-track-thumb), var(--color-picker-track-thumb)),\n var(--color-picker-checker);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 0.4),\n inset 0 0 0 1px rgb(0 0 0 / 0.4);\n }\n\n .v-color-picker-track::-moz-range-thumb {\n box-sizing: border-box;\n inline-size: var(--color-picker-thumb);\n block-size: var(--color-picker-thumb);\n border: 2px solid white;\n border-radius: var(--vectis-radius-pill);\n background:\n linear-gradient(var(--color-picker-track-thumb), var(--color-picker-track-thumb)),\n var(--color-picker-checker);\n box-shadow:\n 0 0 0 1px rgb(0 0 0 / 0.4),\n inset 0 0 0 1px rgb(0 0 0 / 0.4);\n }\n\n .v-color-picker-track:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: var(--vectis-focus-ring-offset);\n }\n\n .v-color-picker-fields {\n display: flex;\n gap: var(--vectis-space-2);\n }\n\n /* Qualified to outweigh the full width VSelect takes by default. */\n .v-color-picker-fields .v-color-picker-format {\n flex: none;\n inline-size: var(--vectis-control-size-color-picker-format);\n }\n\n .v-color-picker-value {\n flex: 1;\n min-inline-size: 0;\n }\n\n /*\n * A colour is written left to right in every language: in right-to-left text the bidi\n * algorithm would move the `#` of `#f59e0b` to the end. The field keeps its right alignment.\n */\n .v-color-picker-value .v-input-control {\n direction: ltr;\n font-variant-numeric: tabular-nums;\n }\n\n .v-color-picker-value .v-input-control:dir(rtl) {\n text-align: right;\n }\n\n .v-color-picker-swatches {\n display: flex;\n flex-wrap: wrap;\n gap: var(--vectis-space-2);\n min-inline-size: 0;\n margin: 0;\n padding: 0;\n border: 0;\n }\n\n .v-color-picker-swatch {\n position: relative;\n display: inline-flex;\n cursor: pointer;\n }\n\n .v-color-picker-chip {\n inline-size: var(--vectis-control-size-color-picker-swatch);\n block-size: var(--vectis-control-size-color-picker-swatch);\n border-radius: var(--vectis-radius-interactive);\n border: 1px solid var(--vectis-color-border-on-fill);\n background:\n linear-gradient(var(--color-picker-swatch), var(--color-picker-swatch)) border-box,\n var(--color-picker-checker) padding-box;\n }\n\n /* An outline rather than a shadow marks the chosen swatch: forced colours keep outlines. */\n .v-color-picker-swatch .v-hidden-input:checked + .v-color-picker-chip {\n outline: 2px solid var(--vectis-color-text);\n outline-offset: 1px;\n }\n\n .v-color-picker-swatch .v-hidden-input:focus-visible + .v-color-picker-chip {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: var(--vectis-focus-ring-offset);\n }\n\n /* Colour content is media, which may fade; the text controls take the disabled tokens. */\n .v-color-picker[data-disabled]\n :is(\n .v-color-picker-area,\n .v-color-picker-preview,\n .v-color-picker-track,\n .v-color-picker-chip\n ) {\n opacity: 0.5;\n }\n\n .v-color-picker[data-disabled]\n :is(.v-color-picker-area, .v-color-picker-track, .v-color-picker-swatch) {\n cursor: not-allowed;\n }\n\n /* A read-only picker is still read, so it keeps the ordinary cursor, as VTimePicker does. */\n .v-color-picker[data-readonly]\n :is(.v-color-picker-area, .v-color-picker-track, .v-color-picker-swatch) {\n cursor: default;\n }\n}\n</style>\n"],"mappings":""}