vectis-ui 0.1.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 (676) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +27 -0
  3. package/README.md +354 -0
  4. package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
  5. package/dist/components/VAccordion/VAccordion.css +2 -0
  6. package/dist/components/VAccordion/VAccordion.d.ts +59 -0
  7. package/dist/components/VAccordion/VAccordion.js +9 -0
  8. package/dist/components/VAccordion/VAccordion.js.map +1 -0
  9. package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js +42 -0
  10. package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js.map +1 -0
  11. package/dist/components/VAccordion/VAccordionItem.css +2 -0
  12. package/dist/components/VAccordion/VAccordionItem.d.ts +64 -0
  13. package/dist/components/VAccordion/VAccordionItem.js +9 -0
  14. package/dist/components/VAccordion/VAccordionItem.js.map +1 -0
  15. package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js +70 -0
  16. package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
  17. package/dist/components/VAccordion/context.d.ts +18 -0
  18. package/dist/components/VAccordion/context.js +6 -0
  19. package/dist/components/VAccordion/context.js.map +1 -0
  20. package/dist/components/VAvatar/VAvatar.css +2 -0
  21. package/dist/components/VAvatar/VAvatar.d.ts +68 -0
  22. package/dist/components/VAvatar/VAvatar.js +9 -0
  23. package/dist/components/VAvatar/VAvatar.js.map +1 -0
  24. package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js +87 -0
  25. package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js.map +1 -0
  26. package/dist/components/VAvatar/VAvatarGroup.css +2 -0
  27. package/dist/components/VAvatar/VAvatarGroup.d.ts +59 -0
  28. package/dist/components/VAvatar/VAvatarGroup.js +9 -0
  29. package/dist/components/VAvatar/VAvatarGroup.js.map +1 -0
  30. package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js +43 -0
  31. package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
  32. package/dist/components/VAvatar/context.d.ts +17 -0
  33. package/dist/components/VAvatar/context.js +6 -0
  34. package/dist/components/VAvatar/context.js.map +1 -0
  35. package/dist/components/VBadge/VBadge.css +2 -0
  36. package/dist/components/VBadge/VBadge.d.ts +74 -0
  37. package/dist/components/VBadge/VBadge.js +9 -0
  38. package/dist/components/VBadge/VBadge.js.map +1 -0
  39. package/dist/components/VBadge/VBadge.vue_vue_type_script_setup_true_lang.js +40 -0
  40. package/dist/components/VBadge/VBadge.vue_vue_type_script_setup_true_lang.js.map +1 -0
  41. package/dist/components/VBreadcrumb/VBreadcrumb.css +2 -0
  42. package/dist/components/VBreadcrumb/VBreadcrumb.d.ts +68 -0
  43. package/dist/components/VBreadcrumb/VBreadcrumb.js +9 -0
  44. package/dist/components/VBreadcrumb/VBreadcrumb.js.map +1 -0
  45. package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js +70 -0
  46. package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js.map +1 -0
  47. package/dist/components/VButton/VButton.css +2 -0
  48. package/dist/components/VButton/VButton.d.ts +88 -0
  49. package/dist/components/VButton/VButton.js +9 -0
  50. package/dist/components/VButton/VButton.js.map +1 -0
  51. package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js +86 -0
  52. package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
  53. package/dist/components/VButton/VButtonGroup.css +2 -0
  54. package/dist/components/VButton/VButtonGroup.d.ts +32 -0
  55. package/dist/components/VButton/VButtonGroup.js +9 -0
  56. package/dist/components/VButton/VButtonGroup.js.map +1 -0
  57. package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js +17 -0
  58. package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
  59. package/dist/components/VCalendar/VCalendar.css +2 -0
  60. package/dist/components/VCalendar/VCalendar.d.ts +129 -0
  61. package/dist/components/VCalendar/VCalendar.js +9 -0
  62. package/dist/components/VCalendar/VCalendar.js.map +1 -0
  63. package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js +374 -0
  64. package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js.map +1 -0
  65. package/dist/components/VCalendar/VCalendarEvent.css +2 -0
  66. package/dist/components/VCalendar/VCalendarEvent.d.ts +71 -0
  67. package/dist/components/VCalendar/VCalendarEvent.js +9 -0
  68. package/dist/components/VCalendar/VCalendarEvent.js.map +1 -0
  69. package/dist/components/VCalendar/VCalendarEvent.vue_vue_type_script_setup_true_lang.js +106 -0
  70. package/dist/components/VCalendar/VCalendarEvent.vue_vue_type_script_setup_true_lang.js.map +1 -0
  71. package/dist/components/VCalendar/VCalendarMonth.css +2 -0
  72. package/dist/components/VCalendar/VCalendarMonth.d.ts +60 -0
  73. package/dist/components/VCalendar/VCalendarMonth.js +9 -0
  74. package/dist/components/VCalendar/VCalendarMonth.js.map +1 -0
  75. package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js +342 -0
  76. package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js.map +1 -0
  77. package/dist/components/VCalendar/VCalendarTimeGrid.css +2 -0
  78. package/dist/components/VCalendar/VCalendarTimeGrid.d.ts +85 -0
  79. package/dist/components/VCalendar/VCalendarTimeGrid.js +9 -0
  80. package/dist/components/VCalendar/VCalendarTimeGrid.js.map +1 -0
  81. package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js +621 -0
  82. package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js.map +1 -0
  83. package/dist/components/VCalendar/VCalendarYear.css +2 -0
  84. package/dist/components/VCalendar/VCalendarYear.d.ts +31 -0
  85. package/dist/components/VCalendar/VCalendarYear.js +9 -0
  86. package/dist/components/VCalendar/VCalendarYear.js.map +1 -0
  87. package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js +76 -0
  88. package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js.map +1 -0
  89. package/dist/components/VCalendar/color.d.ts +9 -0
  90. package/dist/components/VCalendar/color.js +9 -0
  91. package/dist/components/VCalendar/color.js.map +1 -0
  92. package/dist/components/VCalendar/edgeStep.d.ts +38 -0
  93. package/dist/components/VCalendar/edgeStep.js +28 -0
  94. package/dist/components/VCalendar/edgeStep.js.map +1 -0
  95. package/dist/components/VCalendar/keyboard.d.ts +78 -0
  96. package/dist/components/VCalendar/keyboard.js +86 -0
  97. package/dist/components/VCalendar/keyboard.js.map +1 -0
  98. package/dist/components/VCalendar/layout.d.ts +355 -0
  99. package/dist/components/VCalendar/layout.js +292 -0
  100. package/dist/components/VCalendar/layout.js.map +1 -0
  101. package/dist/components/VCalendar/types.d.ts +78 -0
  102. package/dist/components/VCarousel/VCarousel.css +2 -0
  103. package/dist/components/VCarousel/VCarousel.d.ts +241 -0
  104. package/dist/components/VCarousel/VCarousel.js +9 -0
  105. package/dist/components/VCarousel/VCarousel.js.map +1 -0
  106. package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js +262 -0
  107. package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js.map +1 -0
  108. package/dist/components/VCarousel/VCarouselItem.d.ts +41 -0
  109. package/dist/components/VCarousel/VCarouselItem.js +7 -0
  110. package/dist/components/VCarousel/VCarouselItem.js.map +1 -0
  111. package/dist/components/VCarousel/VCarouselItem.vue_vue_type_script_setup_true_lang.js +25 -0
  112. package/dist/components/VCarousel/VCarouselItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
  113. package/dist/components/VCarousel/context.d.ts +23 -0
  114. package/dist/components/VCarousel/context.js +6 -0
  115. package/dist/components/VCarousel/context.js.map +1 -0
  116. package/dist/components/VCheckbox/VCheckbox.css +2 -0
  117. package/dist/components/VCheckbox/VCheckbox.d.ts +63 -0
  118. package/dist/components/VCheckbox/VCheckbox.js +9 -0
  119. package/dist/components/VCheckbox/VCheckbox.js.map +1 -0
  120. package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js +83 -0
  121. package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js.map +1 -0
  122. package/dist/components/VChip/VChip.css +2 -0
  123. package/dist/components/VChip/VChip.d.ts +120 -0
  124. package/dist/components/VChip/VChip.js +9 -0
  125. package/dist/components/VChip/VChip.js.map +1 -0
  126. package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js +118 -0
  127. package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js.map +1 -0
  128. package/dist/components/VCombobox/VCombobox.css +2 -0
  129. package/dist/components/VCombobox/VCombobox.d.ts +183 -0
  130. package/dist/components/VCombobox/VCombobox.js +9 -0
  131. package/dist/components/VCombobox/VCombobox.js.map +1 -0
  132. package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js +428 -0
  133. package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js.map +1 -0
  134. package/dist/components/VCombobox/VComboboxGroup.css +2 -0
  135. package/dist/components/VCombobox/VComboboxGroup.d.ts +26 -0
  136. package/dist/components/VCombobox/VComboboxGroup.js +9 -0
  137. package/dist/components/VCombobox/VComboboxGroup.js.map +1 -0
  138. package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js +21 -0
  139. package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
  140. package/dist/components/VCombobox/VComboboxOption.css +2 -0
  141. package/dist/components/VCombobox/VComboboxOption.d.ts +48 -0
  142. package/dist/components/VCombobox/VComboboxOption.js +9 -0
  143. package/dist/components/VCombobox/VComboboxOption.js.map +1 -0
  144. package/dist/components/VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js +56 -0
  145. package/dist/components/VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js.map +1 -0
  146. package/dist/components/VCombobox/VComboboxSeparator.css +2 -0
  147. package/dist/components/VCombobox/VComboboxSeparator.d.ts +3 -0
  148. package/dist/components/VCombobox/VComboboxSeparator.js +9 -0
  149. package/dist/components/VCombobox/VComboboxSeparator.js.map +1 -0
  150. package/dist/components/VCombobox/VComboboxSeparator.vue_vue_type_script_setup_true_lang.js +16 -0
  151. package/dist/components/VCombobox/VComboboxSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -0
  152. package/dist/components/VCombobox/infiniteScroll.d.ts +22 -0
  153. package/dist/components/VCombobox/infiniteScroll.js +28 -0
  154. package/dist/components/VCombobox/infiniteScroll.js.map +1 -0
  155. package/dist/components/VDataTable/VDataTable.css +2 -0
  156. package/dist/components/VDataTable/VDataTable.d.ts +214 -0
  157. package/dist/components/VDataTable/VDataTable.js +9 -0
  158. package/dist/components/VDataTable/VDataTable.js.map +1 -0
  159. package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js +396 -0
  160. package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -0
  161. package/dist/components/VDateInput/VDateInput.css +2 -0
  162. package/dist/components/VDateInput/VDateInput.d.ts +152 -0
  163. package/dist/components/VDateInput/VDateInput.js +9 -0
  164. package/dist/components/VDateInput/VDateInput.js.map +1 -0
  165. package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js +324 -0
  166. package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  167. package/dist/components/VDatePicker/VDatePicker.css +2 -0
  168. package/dist/components/VDatePicker/VDatePicker.d.ts +143 -0
  169. package/dist/components/VDatePicker/VDatePicker.js +9 -0
  170. package/dist/components/VDatePicker/VDatePicker.js.map +1 -0
  171. package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js +454 -0
  172. package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
  173. package/dist/components/VDatePicker/keyboard.d.ts +56 -0
  174. package/dist/components/VDatePicker/keyboard.js +26 -0
  175. package/dist/components/VDatePicker/keyboard.js.map +1 -0
  176. package/dist/components/VDialog/VDialog.css +2 -0
  177. package/dist/components/VDialog/VDialog.d.ts +96 -0
  178. package/dist/components/VDialog/VDialog.js +9 -0
  179. package/dist/components/VDialog/VDialog.js.map +1 -0
  180. package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js +134 -0
  181. package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js.map +1 -0
  182. package/dist/components/VDialog/VDialogAlert.d.ts +67 -0
  183. package/dist/components/VDialog/VDialogAlert.js +7 -0
  184. package/dist/components/VDialog/VDialogAlert.js.map +1 -0
  185. package/dist/components/VDialog/VDialogAlert.vue_vue_type_script_setup_true_lang.js +60 -0
  186. package/dist/components/VDialog/VDialogAlert.vue_vue_type_script_setup_true_lang.js.map +1 -0
  187. package/dist/components/VFileInput/VFileInput.css +2 -0
  188. package/dist/components/VFileInput/VFileInput.d.ts +156 -0
  189. package/dist/components/VFileInput/VFileInput.js +9 -0
  190. package/dist/components/VFileInput/VFileInput.js.map +1 -0
  191. package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js +244 -0
  192. package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  193. package/dist/components/VFileInput/truncate.d.ts +29 -0
  194. package/dist/components/VFileInput/truncate.js +10 -0
  195. package/dist/components/VFileInput/truncate.js.map +1 -0
  196. package/dist/components/VFilePicker/VFilePicker.css +2 -0
  197. package/dist/components/VFilePicker/VFilePicker.d.ts +203 -0
  198. package/dist/components/VFilePicker/VFilePicker.js +9 -0
  199. package/dist/components/VFilePicker/VFilePicker.js.map +1 -0
  200. package/dist/components/VFilePicker/VFilePicker.vue_vue_type_script_setup_true_lang.js +266 -0
  201. package/dist/components/VFilePicker/VFilePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
  202. package/dist/components/VFilePicker/fileKind.d.ts +29 -0
  203. package/dist/components/VFilePicker/fileKind.js +91 -0
  204. package/dist/components/VFilePicker/fileKind.js.map +1 -0
  205. package/dist/components/VHotkeys/VHotkeys.css +2 -0
  206. package/dist/components/VHotkeys/VHotkeys.d.ts +100 -0
  207. package/dist/components/VHotkeys/VHotkeys.js +9 -0
  208. package/dist/components/VHotkeys/VHotkeys.js.map +1 -0
  209. package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js +76 -0
  210. package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js.map +1 -0
  211. package/dist/components/VHotkeys/platform.d.ts +82 -0
  212. package/dist/components/VHotkeys/platform.js +115 -0
  213. package/dist/components/VHotkeys/platform.js.map +1 -0
  214. package/dist/components/VIcon/VIcon.css +2 -0
  215. package/dist/components/VIcon/VIcon.d.ts +57 -0
  216. package/dist/components/VIcon/VIcon.js +9 -0
  217. package/dist/components/VIcon/VIcon.js.map +1 -0
  218. package/dist/components/VIcon/VIcon.vue_vue_type_script_setup_true_lang.js +99 -0
  219. package/dist/components/VIcon/VIcon.vue_vue_type_script_setup_true_lang.js.map +1 -0
  220. package/dist/components/VIcon/iconProps.d.ts +30 -0
  221. package/dist/components/VIcon/iconProps.js +6 -0
  222. package/dist/components/VIcon/iconProps.js.map +1 -0
  223. package/dist/components/VIcon/icons/arrow_downward.d.ts +5 -0
  224. package/dist/components/VIcon/icons/arrow_downward.js +9 -0
  225. package/dist/components/VIcon/icons/arrow_downward.js.map +1 -0
  226. package/dist/components/VIcon/icons/arrow_downward_alt.d.ts +5 -0
  227. package/dist/components/VIcon/icons/arrow_downward_alt.js +9 -0
  228. package/dist/components/VIcon/icons/arrow_downward_alt.js.map +1 -0
  229. package/dist/components/VIcon/icons/arrow_drop_down.d.ts +5 -0
  230. package/dist/components/VIcon/icons/arrow_drop_down.js +9 -0
  231. package/dist/components/VIcon/icons/arrow_drop_down.js.map +1 -0
  232. package/dist/components/VIcon/icons/arrow_drop_up.d.ts +5 -0
  233. package/dist/components/VIcon/icons/arrow_drop_up.js +9 -0
  234. package/dist/components/VIcon/icons/arrow_drop_up.js.map +1 -0
  235. package/dist/components/VIcon/icons/arrow_left_alt.d.ts +5 -0
  236. package/dist/components/VIcon/icons/arrow_left_alt.js +9 -0
  237. package/dist/components/VIcon/icons/arrow_left_alt.js.map +1 -0
  238. package/dist/components/VIcon/icons/arrow_right_alt.d.ts +5 -0
  239. package/dist/components/VIcon/icons/arrow_right_alt.js +9 -0
  240. package/dist/components/VIcon/icons/arrow_right_alt.js.map +1 -0
  241. package/dist/components/VIcon/icons/arrow_upward.d.ts +5 -0
  242. package/dist/components/VIcon/icons/arrow_upward.js +9 -0
  243. package/dist/components/VIcon/icons/arrow_upward.js.map +1 -0
  244. package/dist/components/VIcon/icons/arrow_upward_alt.d.ts +5 -0
  245. package/dist/components/VIcon/icons/arrow_upward_alt.js +9 -0
  246. package/dist/components/VIcon/icons/arrow_upward_alt.js.map +1 -0
  247. package/dist/components/VIcon/icons/attach_file.d.ts +5 -0
  248. package/dist/components/VIcon/icons/attach_file.js +9 -0
  249. package/dist/components/VIcon/icons/attach_file.js.map +1 -0
  250. package/dist/components/VIcon/icons/audio_file.d.ts +5 -0
  251. package/dist/components/VIcon/icons/audio_file.js +9 -0
  252. package/dist/components/VIcon/icons/audio_file.js.map +1 -0
  253. package/dist/components/VIcon/icons/calendar_today.d.ts +5 -0
  254. package/dist/components/VIcon/icons/calendar_today.js +9 -0
  255. package/dist/components/VIcon/icons/calendar_today.js.map +1 -0
  256. package/dist/components/VIcon/icons/check.d.ts +5 -0
  257. package/dist/components/VIcon/icons/check.js +9 -0
  258. package/dist/components/VIcon/icons/check.js.map +1 -0
  259. package/dist/components/VIcon/icons/check_circle.d.ts +5 -0
  260. package/dist/components/VIcon/icons/check_circle.js +9 -0
  261. package/dist/components/VIcon/icons/check_circle.js.map +1 -0
  262. package/dist/components/VIcon/icons/chevron_left.d.ts +5 -0
  263. package/dist/components/VIcon/icons/chevron_left.js +9 -0
  264. package/dist/components/VIcon/icons/chevron_left.js.map +1 -0
  265. package/dist/components/VIcon/icons/chevron_right.d.ts +5 -0
  266. package/dist/components/VIcon/icons/chevron_right.js +9 -0
  267. package/dist/components/VIcon/icons/chevron_right.js.map +1 -0
  268. package/dist/components/VIcon/icons/close.d.ts +5 -0
  269. package/dist/components/VIcon/icons/close.js +9 -0
  270. package/dist/components/VIcon/icons/close.js.map +1 -0
  271. package/dist/components/VIcon/icons/cloud_upload.d.ts +5 -0
  272. package/dist/components/VIcon/icons/cloud_upload.js +9 -0
  273. package/dist/components/VIcon/icons/cloud_upload.js.map +1 -0
  274. package/dist/components/VIcon/icons/code.d.ts +5 -0
  275. package/dist/components/VIcon/icons/code.js +9 -0
  276. package/dist/components/VIcon/icons/code.js.map +1 -0
  277. package/dist/components/VIcon/icons/description.d.ts +5 -0
  278. package/dist/components/VIcon/icons/description.js +9 -0
  279. package/dist/components/VIcon/icons/description.js.map +1 -0
  280. package/dist/components/VIcon/icons/error.d.ts +5 -0
  281. package/dist/components/VIcon/icons/error.js +9 -0
  282. package/dist/components/VIcon/icons/error.js.map +1 -0
  283. package/dist/components/VIcon/icons/expand_less.d.ts +5 -0
  284. package/dist/components/VIcon/icons/expand_less.js +9 -0
  285. package/dist/components/VIcon/icons/expand_less.js.map +1 -0
  286. package/dist/components/VIcon/icons/expand_more.d.ts +5 -0
  287. package/dist/components/VIcon/icons/expand_more.js +9 -0
  288. package/dist/components/VIcon/icons/expand_more.js.map +1 -0
  289. package/dist/components/VIcon/icons/folder_zip.d.ts +5 -0
  290. package/dist/components/VIcon/icons/folder_zip.js +9 -0
  291. package/dist/components/VIcon/icons/folder_zip.js.map +1 -0
  292. package/dist/components/VIcon/icons/image.d.ts +5 -0
  293. package/dist/components/VIcon/icons/image.js +9 -0
  294. package/dist/components/VIcon/icons/image.js.map +1 -0
  295. package/dist/components/VIcon/icons/index.d.ts +183 -0
  296. package/dist/components/VIcon/icons/index.js +77 -0
  297. package/dist/components/VIcon/icons/index.js.map +1 -0
  298. package/dist/components/VIcon/icons/info.d.ts +5 -0
  299. package/dist/components/VIcon/icons/info.js +9 -0
  300. package/dist/components/VIcon/icons/info.js.map +1 -0
  301. package/dist/components/VIcon/icons/more_horiz.d.ts +5 -0
  302. package/dist/components/VIcon/icons/more_horiz.js +9 -0
  303. package/dist/components/VIcon/icons/more_horiz.js.map +1 -0
  304. package/dist/components/VIcon/icons/names.d.ts +11 -0
  305. package/dist/components/VIcon/icons/names.js +5 -0
  306. package/dist/components/VIcon/icons/names.js.map +1 -0
  307. package/dist/components/VIcon/icons/notifications.d.ts +5 -0
  308. package/dist/components/VIcon/icons/notifications.js +9 -0
  309. package/dist/components/VIcon/icons/notifications.js.map +1 -0
  310. package/dist/components/VIcon/icons/picture_as_pdf.d.ts +5 -0
  311. package/dist/components/VIcon/icons/picture_as_pdf.js +9 -0
  312. package/dist/components/VIcon/icons/picture_as_pdf.js.map +1 -0
  313. package/dist/components/VIcon/icons/schedule.d.ts +5 -0
  314. package/dist/components/VIcon/icons/schedule.js +9 -0
  315. package/dist/components/VIcon/icons/schedule.js.map +1 -0
  316. package/dist/components/VIcon/icons/search.d.ts +5 -0
  317. package/dist/components/VIcon/icons/search.js +9 -0
  318. package/dist/components/VIcon/icons/search.js.map +1 -0
  319. package/dist/components/VIcon/icons/swap_vert.d.ts +5 -0
  320. package/dist/components/VIcon/icons/swap_vert.js +9 -0
  321. package/dist/components/VIcon/icons/swap_vert.js.map +1 -0
  322. package/dist/components/VIcon/icons/table_chart.d.ts +5 -0
  323. package/dist/components/VIcon/icons/table_chart.js +9 -0
  324. package/dist/components/VIcon/icons/table_chart.js.map +1 -0
  325. package/dist/components/VIcon/icons/video_file.d.ts +5 -0
  326. package/dist/components/VIcon/icons/video_file.js +9 -0
  327. package/dist/components/VIcon/icons/video_file.js.map +1 -0
  328. package/dist/components/VIcon/icons/viewBox.d.ts +6 -0
  329. package/dist/components/VIcon/icons/viewBox.js +6 -0
  330. package/dist/components/VIcon/icons/viewBox.js.map +1 -0
  331. package/dist/components/VIcon/icons/warning.d.ts +5 -0
  332. package/dist/components/VIcon/icons/warning.js +9 -0
  333. package/dist/components/VIcon/icons/warning.js.map +1 -0
  334. package/dist/components/VIcon/resolver.d.ts +76 -0
  335. package/dist/components/VIcon/resolver.js +35 -0
  336. package/dist/components/VIcon/resolver.js.map +1 -0
  337. package/dist/components/VIcon/types.d.ts +77 -0
  338. package/dist/components/VIconButton/VIconButton.css +2 -0
  339. package/dist/components/VIconButton/VIconButton.d.ts +66 -0
  340. package/dist/components/VIconButton/VIconButton.js +9 -0
  341. package/dist/components/VIconButton/VIconButton.js.map +1 -0
  342. package/dist/components/VIconButton/VIconButton.vue_vue_type_script_setup_true_lang.js +70 -0
  343. package/dist/components/VIconButton/VIconButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
  344. package/dist/components/VInput/VInput.css +2 -0
  345. package/dist/components/VInput/VInput.d.ts +152 -0
  346. package/dist/components/VInput/VInput.js +9 -0
  347. package/dist/components/VInput/VInput.js.map +1 -0
  348. package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js +185 -0
  349. package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  350. package/dist/components/VInputOTP/VInputOTP.css +2 -0
  351. package/dist/components/VInputOTP/VInputOTP.d.ts +76 -0
  352. package/dist/components/VInputOTP/VInputOTP.js +9 -0
  353. package/dist/components/VInputOTP/VInputOTP.js.map +1 -0
  354. package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js +149 -0
  355. package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js.map +1 -0
  356. package/dist/components/VMenu/VMenu.d.ts +91 -0
  357. package/dist/components/VMenu/VMenu.js +7 -0
  358. package/dist/components/VMenu/VMenu.js.map +1 -0
  359. package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js +73 -0
  360. package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js.map +1 -0
  361. package/dist/components/VMenu/VMenuGroup.css +2 -0
  362. package/dist/components/VMenu/VMenuGroup.d.ts +22 -0
  363. package/dist/components/VMenu/VMenuGroup.js +9 -0
  364. package/dist/components/VMenu/VMenuGroup.js.map +1 -0
  365. package/dist/components/VMenu/VMenuGroup.vue_vue_type_script_setup_true_lang.js +21 -0
  366. package/dist/components/VMenu/VMenuGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
  367. package/dist/components/VMenu/VMenuItem.css +2 -0
  368. package/dist/components/VMenu/VMenuItem.d.ts +85 -0
  369. package/dist/components/VMenu/VMenuItem.js +9 -0
  370. package/dist/components/VMenu/VMenuItem.js.map +1 -0
  371. package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js +121 -0
  372. package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
  373. package/dist/components/VMenu/VMenuPanel.css +2 -0
  374. package/dist/components/VMenu/VMenuPanel.d.ts +91 -0
  375. package/dist/components/VMenu/VMenuPanel.js +9 -0
  376. package/dist/components/VMenu/VMenuPanel.js.map +1 -0
  377. package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js +103 -0
  378. package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js.map +1 -0
  379. package/dist/components/VMenu/VMenuSeparator.css +2 -0
  380. package/dist/components/VMenu/VMenuSeparator.d.ts +3 -0
  381. package/dist/components/VMenu/VMenuSeparator.js +9 -0
  382. package/dist/components/VMenu/VMenuSeparator.js.map +1 -0
  383. package/dist/components/VMenu/VMenuSeparator.vue_vue_type_script_setup_true_lang.js +13 -0
  384. package/dist/components/VMenu/VMenuSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -0
  385. package/dist/components/VMenu/context.d.ts +33 -0
  386. package/dist/components/VMenu/context.js +9 -0
  387. package/dist/components/VMenu/context.js.map +1 -0
  388. package/dist/components/VPagination/VPagination.css +2 -0
  389. package/dist/components/VPagination/VPagination.d.ts +103 -0
  390. package/dist/components/VPagination/VPagination.js +9 -0
  391. package/dist/components/VPagination/VPagination.js.map +1 -0
  392. package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js +270 -0
  393. package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js.map +1 -0
  394. package/dist/components/VPopover/VPopover.css +2 -0
  395. package/dist/components/VPopover/VPopover.d.ts +82 -0
  396. package/dist/components/VPopover/VPopover.js +9 -0
  397. package/dist/components/VPopover/VPopover.js.map +1 -0
  398. package/dist/components/VPopover/VPopover.vue_vue_type_script_setup_true_lang.js +65 -0
  399. package/dist/components/VPopover/VPopover.vue_vue_type_script_setup_true_lang.js.map +1 -0
  400. package/dist/components/VProgressCircular/VProgressCircular.css +2 -0
  401. package/dist/components/VProgressCircular/VProgressCircular.d.ts +60 -0
  402. package/dist/components/VProgressCircular/VProgressCircular.js +9 -0
  403. package/dist/components/VProgressCircular/VProgressCircular.js.map +1 -0
  404. package/dist/components/VProgressCircular/VProgressCircular.vue_vue_type_script_setup_true_lang.js +74 -0
  405. package/dist/components/VProgressCircular/VProgressCircular.vue_vue_type_script_setup_true_lang.js.map +1 -0
  406. package/dist/components/VProgressLinear/VProgressLinear.css +2 -0
  407. package/dist/components/VProgressLinear/VProgressLinear.d.ts +74 -0
  408. package/dist/components/VProgressLinear/VProgressLinear.js +9 -0
  409. package/dist/components/VProgressLinear/VProgressLinear.js.map +1 -0
  410. package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js +74 -0
  411. package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js.map +1 -0
  412. package/dist/components/VRadio/VRadio.css +2 -0
  413. package/dist/components/VRadio/VRadio.d.ts +58 -0
  414. package/dist/components/VRadio/VRadio.js +9 -0
  415. package/dist/components/VRadio/VRadio.js.map +1 -0
  416. package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js +60 -0
  417. package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js.map +1 -0
  418. package/dist/components/VSeparator/VSeparator.css +2 -0
  419. package/dist/components/VSeparator/VSeparator.d.ts +23 -0
  420. package/dist/components/VSeparator/VSeparator.js +9 -0
  421. package/dist/components/VSeparator/VSeparator.js.map +1 -0
  422. package/dist/components/VSeparator/VSeparator.vue_vue_type_script_setup_true_lang.js +17 -0
  423. package/dist/components/VSeparator/VSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -0
  424. package/dist/components/VSideNavigation/VSideNavigation.css +2 -0
  425. package/dist/components/VSideNavigation/VSideNavigation.d.ts +64 -0
  426. package/dist/components/VSideNavigation/VSideNavigation.js +9 -0
  427. package/dist/components/VSideNavigation/VSideNavigation.js.map +1 -0
  428. package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js +67 -0
  429. package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js.map +1 -0
  430. package/dist/components/VSideNavigation/VSideNavigationGroup.css +2 -0
  431. package/dist/components/VSideNavigation/VSideNavigationGroup.d.ts +33 -0
  432. package/dist/components/VSideNavigation/VSideNavigationGroup.js +9 -0
  433. package/dist/components/VSideNavigation/VSideNavigationGroup.js.map +1 -0
  434. package/dist/components/VSideNavigation/VSideNavigationGroup.vue_vue_type_script_setup_true_lang.js +20 -0
  435. package/dist/components/VSideNavigation/VSideNavigationGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
  436. package/dist/components/VSideNavigation/VSideNavigationItem.css +2 -0
  437. package/dist/components/VSideNavigation/VSideNavigationItem.d.ts +103 -0
  438. package/dist/components/VSideNavigation/VSideNavigationItem.js +9 -0
  439. package/dist/components/VSideNavigation/VSideNavigationItem.js.map +1 -0
  440. package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js +154 -0
  441. package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
  442. package/dist/components/VSideNavigation/VSideNavigationSeparator.css +2 -0
  443. package/dist/components/VSideNavigation/VSideNavigationSeparator.d.ts +3 -0
  444. package/dist/components/VSideNavigation/VSideNavigationSeparator.js +17 -0
  445. package/dist/components/VSideNavigation/VSideNavigationSeparator.js.map +1 -0
  446. package/dist/components/VSideNavigation/context.d.ts +37 -0
  447. package/dist/components/VSideNavigation/context.js +6 -0
  448. package/dist/components/VSideNavigation/context.js.map +1 -0
  449. package/dist/components/VSkeletonLoader/VSkeletonLoader.css +2 -0
  450. package/dist/components/VSkeletonLoader/VSkeletonLoader.d.ts +75 -0
  451. package/dist/components/VSkeletonLoader/VSkeletonLoader.js +9 -0
  452. package/dist/components/VSkeletonLoader/VSkeletonLoader.js.map +1 -0
  453. package/dist/components/VSkeletonLoader/VSkeletonLoader.vue_vue_type_script_setup_true_lang.js +61 -0
  454. package/dist/components/VSkeletonLoader/VSkeletonLoader.vue_vue_type_script_setup_true_lang.js.map +1 -0
  455. package/dist/components/VSlider/VSlider.css +2 -0
  456. package/dist/components/VSlider/VSlider.d.ts +82 -0
  457. package/dist/components/VSlider/VSlider.js +9 -0
  458. package/dist/components/VSlider/VSlider.js.map +1 -0
  459. package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js +220 -0
  460. package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js.map +1 -0
  461. package/dist/components/VSnackbar/VSnackbar.css +2 -0
  462. package/dist/components/VSnackbar/VSnackbar.d.ts +51 -0
  463. package/dist/components/VSnackbar/VSnackbar.js +9 -0
  464. package/dist/components/VSnackbar/VSnackbar.js.map +1 -0
  465. package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js +83 -0
  466. package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js.map +1 -0
  467. package/dist/components/VSnackbar/state.d.ts +92 -0
  468. package/dist/components/VSnackbar/state.js +18 -0
  469. package/dist/components/VSnackbar/state.js.map +1 -0
  470. package/dist/components/VSpinner/VSpinner.css +2 -0
  471. package/dist/components/VSpinner/VSpinner.d.ts +21 -0
  472. package/dist/components/VSpinner/VSpinner.js +9 -0
  473. package/dist/components/VSpinner/VSpinner.js.map +1 -0
  474. package/dist/components/VSpinner/VSpinner.vue_vue_type_script_setup_true_lang.js +25 -0
  475. package/dist/components/VSpinner/VSpinner.vue_vue_type_script_setup_true_lang.js.map +1 -0
  476. package/dist/components/VSwitch/VSwitch.css +2 -0
  477. package/dist/components/VSwitch/VSwitch.d.ts +46 -0
  478. package/dist/components/VSwitch/VSwitch.js +9 -0
  479. package/dist/components/VSwitch/VSwitch.js.map +1 -0
  480. package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js +51 -0
  481. package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js.map +1 -0
  482. package/dist/components/VTabs/VTab.css +2 -0
  483. package/dist/components/VTabs/VTab.d.ts +42 -0
  484. package/dist/components/VTabs/VTab.js +9 -0
  485. package/dist/components/VTabs/VTab.js.map +1 -0
  486. package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js +66 -0
  487. package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js.map +1 -0
  488. package/dist/components/VTabs/VTabPanel.css +2 -0
  489. package/dist/components/VTabs/VTabPanel.d.ts +34 -0
  490. package/dist/components/VTabs/VTabPanel.js +9 -0
  491. package/dist/components/VTabs/VTabPanel.js.map +1 -0
  492. package/dist/components/VTabs/VTabPanel.vue_vue_type_script_setup_true_lang.js +34 -0
  493. package/dist/components/VTabs/VTabPanel.vue_vue_type_script_setup_true_lang.js.map +1 -0
  494. package/dist/components/VTabs/VTabs.css +2 -0
  495. package/dist/components/VTabs/VTabs.d.ts +107 -0
  496. package/dist/components/VTabs/VTabs.js +9 -0
  497. package/dist/components/VTabs/VTabs.js.map +1 -0
  498. package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js +199 -0
  499. package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js.map +1 -0
  500. package/dist/components/VTabs/context.d.ts +43 -0
  501. package/dist/components/VTabs/context.js +6 -0
  502. package/dist/components/VTabs/context.js.map +1 -0
  503. package/dist/components/VTextarea/VTextarea.css +2 -0
  504. package/dist/components/VTextarea/VTextarea.d.ts +140 -0
  505. package/dist/components/VTextarea/VTextarea.js +9 -0
  506. package/dist/components/VTextarea/VTextarea.js.map +1 -0
  507. package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js +187 -0
  508. package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js.map +1 -0
  509. package/dist/components/VTimeInput/VTimeInput.css +2 -0
  510. package/dist/components/VTimeInput/VTimeInput.d.ts +112 -0
  511. package/dist/components/VTimeInput/VTimeInput.js +9 -0
  512. package/dist/components/VTimeInput/VTimeInput.js.map +1 -0
  513. package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js +385 -0
  514. package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  515. package/dist/components/VTimePicker/VTimePicker.css +2 -0
  516. package/dist/components/VTimePicker/VTimePicker.d.ts +89 -0
  517. package/dist/components/VTimePicker/VTimePicker.js +9 -0
  518. package/dist/components/VTimePicker/VTimePicker.js.map +1 -0
  519. package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js +257 -0
  520. package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
  521. package/dist/components/VToast/VToast.css +2 -0
  522. package/dist/components/VToast/VToast.d.ts +24 -0
  523. package/dist/components/VToast/VToast.js +9 -0
  524. package/dist/components/VToast/VToast.js.map +1 -0
  525. package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js +62 -0
  526. package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js.map +1 -0
  527. package/dist/components/VToast/VToaster.css +2 -0
  528. package/dist/components/VToast/VToaster.d.ts +42 -0
  529. package/dist/components/VToast/VToaster.js +9 -0
  530. package/dist/components/VToast/VToaster.js.map +1 -0
  531. package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js +112 -0
  532. package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js.map +1 -0
  533. package/dist/components/VToast/state.d.ts +74 -0
  534. package/dist/components/VToast/state.js +25 -0
  535. package/dist/components/VToast/state.js.map +1 -0
  536. package/dist/components/VToggle/VToggle.css +2 -0
  537. package/dist/components/VToggle/VToggle.d.ts +84 -0
  538. package/dist/components/VToggle/VToggle.js +9 -0
  539. package/dist/components/VToggle/VToggle.js.map +1 -0
  540. package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js +103 -0
  541. package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js.map +1 -0
  542. package/dist/components/VToggle/VToggleItem.css +2 -0
  543. package/dist/components/VToggle/VToggleItem.d.ts +35 -0
  544. package/dist/components/VToggle/VToggleItem.js +9 -0
  545. package/dist/components/VToggle/VToggleItem.js.map +1 -0
  546. package/dist/components/VToggle/VToggleItem.vue_vue_type_script_setup_true_lang.js +51 -0
  547. package/dist/components/VToggle/VToggleItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
  548. package/dist/components/VToggle/context.d.ts +37 -0
  549. package/dist/components/VToggle/context.js +6 -0
  550. package/dist/components/VToggle/context.js.map +1 -0
  551. package/dist/components/VTooltip/VTooltip.css +2 -0
  552. package/dist/components/VTooltip/VTooltip.d.ts +76 -0
  553. package/dist/components/VTooltip/VTooltip.js +9 -0
  554. package/dist/components/VTooltip/VTooltip.js.map +1 -0
  555. package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js +50 -0
  556. package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -0
  557. package/dist/components/VTypography/VTypography.css +2 -0
  558. package/dist/components/VTypography/VTypography.d.ts +46 -0
  559. package/dist/components/VTypography/VTypography.js +9 -0
  560. package/dist/components/VTypography/VTypography.js.map +1 -0
  561. package/dist/components/VTypography/VTypography.vue_vue_type_script_setup_true_lang.js +49 -0
  562. package/dist/components/VTypography/VTypography.vue_vue_type_script_setup_true_lang.js.map +1 -0
  563. package/dist/composables/useAriaLabel.d.ts +19 -0
  564. package/dist/composables/useAriaLabel.js +10 -0
  565. package/dist/composables/useAriaLabel.js.map +1 -0
  566. package/dist/composables/useFieldIds.d.ts +21 -0
  567. package/dist/composables/useFieldIds.js +14 -0
  568. package/dist/composables/useFieldIds.js.map +1 -0
  569. package/dist/composables/useFieldPanel.d.ts +61 -0
  570. package/dist/composables/useFieldPanel.js +39 -0
  571. package/dist/composables/useFieldPanel.js.map +1 -0
  572. package/dist/composables/useFileDrop.d.ts +30 -0
  573. package/dist/composables/useFileDrop.js +28 -0
  574. package/dist/composables/useFileDrop.js.map +1 -0
  575. package/dist/composables/useFileField.d.ts +36 -0
  576. package/dist/composables/useFileField.js +45 -0
  577. package/dist/composables/useFileField.js.map +1 -0
  578. package/dist/composables/useFocusoutDismiss.d.ts +17 -0
  579. package/dist/composables/useFocusoutDismiss.js +11 -0
  580. package/dist/composables/useFocusoutDismiss.js.map +1 -0
  581. package/dist/composables/useIconClickHandlers.d.ts +27 -0
  582. package/dist/composables/useIconClickHandlers.js +13 -0
  583. package/dist/composables/useIconClickHandlers.js.map +1 -0
  584. package/dist/composables/useMaskedField.d.ts +65 -0
  585. package/dist/composables/useMaskedField.js +54 -0
  586. package/dist/composables/useMaskedField.js.map +1 -0
  587. package/dist/composables/usePopover.d.ts +7 -0
  588. package/dist/composables/usePopover.js +24 -0
  589. package/dist/composables/usePopover.js.map +1 -0
  590. package/dist/composables/useProgressValue.d.ts +13 -0
  591. package/dist/composables/useProgressValue.js +14 -0
  592. package/dist/composables/useProgressValue.js.map +1 -0
  593. package/dist/composables/useRootAttrs.d.ts +34 -0
  594. package/dist/composables/useRootAttrs.js +15 -0
  595. package/dist/composables/useRootAttrs.js.map +1 -0
  596. package/dist/composables/useTextLimit.d.ts +31 -0
  597. package/dist/composables/useTextLimit.js +19 -0
  598. package/dist/composables/useTextLimit.js.map +1 -0
  599. package/dist/composables/useTimer.d.ts +18 -0
  600. package/dist/composables/useTimer.js +19 -0
  601. package/dist/composables/useTimer.js.map +1 -0
  602. package/dist/i18n/en.d.ts +10 -0
  603. package/dist/i18n/en.js +179 -0
  604. package/dist/i18n/en.js.map +1 -0
  605. package/dist/i18n/fr.d.ts +18 -0
  606. package/dist/i18n/fr.js +179 -0
  607. package/dist/i18n/fr.js.map +1 -0
  608. package/dist/i18n/state.d.ts +64 -0
  609. package/dist/i18n/state.js +40 -0
  610. package/dist/i18n/state.js.map +1 -0
  611. package/dist/i18n/types.d.ts +345 -0
  612. package/dist/icons.d.ts +16 -0
  613. package/dist/icons.js +38 -0
  614. package/dist/index.d.ts +90 -0
  615. package/dist/index.js +64 -0
  616. package/dist/styles.css +1 -0
  617. package/dist/tokens/css.d.ts +25 -0
  618. package/dist/tokens/css.js +29 -0
  619. package/dist/tokens/css.js.map +1 -0
  620. package/dist/tokens/index.d.ts +370 -0
  621. package/dist/tokens/index.js +15 -0
  622. package/dist/tokens/index.js.map +1 -0
  623. package/dist/tokens/primitives.d.ts +101 -0
  624. package/dist/tokens/primitives.js +166 -0
  625. package/dist/tokens/primitives.js.map +1 -0
  626. package/dist/tokens/semantic.d.ts +236 -0
  627. package/dist/tokens/semantic.js +219 -0
  628. package/dist/tokens/semantic.js.map +1 -0
  629. package/dist/tokens/themes/dark.d.ts +49 -0
  630. package/dist/tokens/themes/dark.js +53 -0
  631. package/dist/tokens/themes/dark.js.map +1 -0
  632. package/dist/tokens/types.d.ts +38 -0
  633. package/dist/tokens/types.js +16 -0
  634. package/dist/tokens/types.js.map +1 -0
  635. package/dist/tokens.json +1516 -0
  636. package/dist/utils/array.d.ts +10 -0
  637. package/dist/utils/array.js +8 -0
  638. package/dist/utils/array.js.map +1 -0
  639. package/dist/utils/arrowNav.d.ts +27 -0
  640. package/dist/utils/arrowNav.js +26 -0
  641. package/dist/utils/arrowNav.js.map +1 -0
  642. package/dist/utils/chip.d.ts +26 -0
  643. package/dist/utils/chip.js +13 -0
  644. package/dist/utils/chip.js.map +1 -0
  645. package/dist/utils/css.d.ts +19 -0
  646. package/dist/utils/css.js +13 -0
  647. package/dist/utils/css.js.map +1 -0
  648. package/dist/utils/date.d.ts +199 -0
  649. package/dist/utils/date.js +225 -0
  650. package/dist/utils/date.js.map +1 -0
  651. package/dist/utils/direction.d.ts +18 -0
  652. package/dist/utils/direction.js +8 -0
  653. package/dist/utils/direction.js.map +1 -0
  654. package/dist/utils/env.d.ts +10 -0
  655. package/dist/utils/file.d.ts +95 -0
  656. package/dist/utils/file.js +70 -0
  657. package/dist/utils/file.js.map +1 -0
  658. package/dist/utils/focus.d.ts +24 -0
  659. package/dist/utils/focus.js +13 -0
  660. package/dist/utils/focus.js.map +1 -0
  661. package/dist/utils/matcher.d.ts +13 -0
  662. package/dist/utils/matcher.js +11 -0
  663. package/dist/utils/matcher.js.map +1 -0
  664. package/dist/utils/number.d.ts +9 -0
  665. package/dist/utils/number.js +8 -0
  666. package/dist/utils/number.js.map +1 -0
  667. package/dist/utils/text.d.ts +19 -0
  668. package/dist/utils/text.js +12 -0
  669. package/dist/utils/text.js.map +1 -0
  670. package/dist/utils/time.d.ts +138 -0
  671. package/dist/utils/time.js +123 -0
  672. package/dist/utils/time.js.map +1 -0
  673. package/dist/utils/vnode.d.ts +21 -0
  674. package/dist/utils/vnode.js +14 -0
  675. package/dist/utils/vnode.js.map +1 -0
  676. package/package.json +114 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VToaster.js","names":[],"sources":["../../../src/components/VToast/VToaster.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'\n\nimport { usePopover } from '../../composables/usePopover'\nimport VToast from './VToast.vue'\nimport { dismissToast, toasts, type ToastItem, type ToastPlacement } from './state'\n\nimport { useAriaLabel } from '../../composables/useAriaLabel'\nimport { useMessages } from '../../i18n/state'\n\n// @a11y @core\n/**\n * Where notifications appear. It is mounted ONCE, at the root of the application, and\n * from then on any call to `toast()` shows up here.\n *\n * It renders one container per corner of the screen rather than one floating box per\n * notification, and each container simply stacks its notifications with CSS. The\n * reason is that these boxes are drawn above the whole page, at fixed coordinates and\n * anchored to nothing: individually they would all land on the same spot, and keeping\n * them apart would mean measuring and offsetting each one in code. The six containers\n * exist at all times — empty, they cost nothing and the browser does not display them.\n *\n * The JavaScript covers three things the platform does not: putting the queue and the\n * containers in step, since drawing above the page can only be asked for by calling a\n * method; the timers that dismiss a notification when its time is up; and pausing\n * those timers while the pointer rests on a stack, so that something disappearing on a\n * clock can be held in place long enough to read (WCAG 2.2.1).\n */\ninterface ToasterProps {\n /** Which corner notifications appear in, unless one of them asks for another. */\n placement?: ToastPlacement\n /**\n * How long a notification stays, in milliseconds, unless it asks for something else.\n * A notification given 0 stays until it is dismissed.\n */\n duration?: number\n /** What the close cross does, in words. It falls back to the design system dictionary. */\n closeLabel?: string\n /**\n * What screen readers announce for the notification areas themselves, which are\n * landmarks of the page. It falls back to the design system dictionary.\n */\n label?: string\n}\n\nconst props = withDefaults(defineProps<ToasterProps>(), {\n placement: 'bottom-right',\n duration: 5000,\n closeLabel: undefined,\n label: undefined,\n})\n\nconst m = useMessages()\nconst ariaLabel = useAriaLabel(() => props.label ?? m.value.toaster.label)\nconst resolvedCloseLabel = computed(() => props.closeLabel ?? m.value.common.close)\n\nconst PLACEMENTS: ToastPlacement[] = [\n 'top-left',\n 'top-center',\n 'top-right',\n 'bottom-left',\n 'bottom-center',\n 'bottom-right',\n]\n\n/**\n * The queue sorted into the corner each notification actually belongs to: the one it\n * asked for, or failing that the one set on this component.\n */\nconst groups = computed(() => {\n const map = new Map<ToastPlacement, ToastItem[]>()\n for (const item of toasts) {\n const placement = item.placement ?? props.placement\n const list = map.get(placement)\n if (list) list.push(item)\n else map.set(placement, [item])\n }\n return map\n})\n\n/*\n * One instance of the popover plumbing PER corner. Each carries its own element, its\n * own open state — fed by that element's events — and the guards that make opening and\n * closing safe to call twice: asking the browser to show an already-shown popover\n * throws.\n *\n * The containers being permanent, this runs once and never again.\n */\nconst stacks = new Map(\n PLACEMENTS.map((placement) => {\n const el = ref<HTMLElement | null>(null)\n return [placement, { el, ...usePopover(el) }] as const\n }),\n)\n\nfunction setStackEl(placement: ToastPlacement, el: unknown) {\n const stack = stacks.get(placement)\n if (stack) stack.el.value = (el as HTMLElement | null) ?? null\n}\n\nfunction syncStack(placement: ToastPlacement, event: Event) {\n stacks.get(placement)?.syncShown(event)\n}\n\n/* The running countdowns, and the notifications already given one — a notification is\n armed once and only once, however many times the queue changes around it. */\nconst timers = new Map<number, ReturnType<typeof setTimeout>>()\nconst armed = new Set<number>()\n/* The corners the pointer is currently resting on, whose countdowns are suspended. */\nconst paused = new Set<ToastPlacement>()\n\nfunction effectivePlacement(item: ToastItem): ToastPlacement {\n return item.placement ?? props.placement\n}\n\nfunction startTimer(item: ToastItem) {\n const duration = item.duration ?? props.duration\n if (duration <= 0 || timers.has(item.id)) return\n timers.set(\n item.id,\n setTimeout(() => {\n timers.delete(item.id)\n dismissToast(item.id)\n }, duration),\n )\n}\n\n// @core\n/**\n * Brings the page into line with the queue: it starts the countdown of every\n * notification that has just arrived, throws away the countdowns of those that have\n * gone, and then shows the corners holding something while hiding the empty ones.\n *\n * It runs once on mount — which is what makes a notification raised before this\n * component existed appear all the same — and after that on every change to the queue.\n */\nfunction sync() {\n const alive = new Set(toasts.map((item) => item.id))\n for (const [id, timer] of timers) {\n if (!alive.has(id)) {\n clearTimeout(timer)\n timers.delete(id)\n }\n }\n for (const id of armed) if (!alive.has(id)) armed.delete(id)\n for (const item of toasts) {\n if (armed.has(item.id)) continue\n armed.add(item.id)\n if (!paused.has(effectivePlacement(item))) startTimer(item)\n }\n\n // Showing and hiding are safe to call on a container already in that state, the\n // guards living in the popover plumbing — so there is no need to remember which\n // corners are currently open.\n for (const placement of PLACEMENTS) {\n const stack = stacks.get(placement)\n if (!stack?.el.value) continue\n if ((groups.value.get(placement)?.length ?? 0) > 0) stack.show()\n else stack.hide()\n }\n}\n\n/*\n * Watching the grouped queue covers a change to the notifications AND a change to the\n * default corner. The `post` timing is load-bearing: the notification must already be\n * in the page before its container is told to show itself.\n */\nwatch(groups, sync, { flush: 'post' })\n// @ssr — a watcher does not run during the server render, so a notification raised\n// before this component mounted would never be picked up. Running the same\n// synchronization on mount is what brings it in.\nonMounted(sync)\n\n// @a11y — WCAG 2.2.1: something that disappears on a clock has to be holdable, or a\n// slow reader simply never finishes it.\n/*\n * Resting the pointer on a corner suspends its countdowns. Leaving restarts them from\n * the FULL duration rather than from what was left: simpler, and more generous to the\n * reader who has just interrupted themselves.\n */\nfunction pause(placement: ToastPlacement) {\n paused.add(placement)\n for (const item of toasts) {\n if (effectivePlacement(item) !== placement) continue\n const timer = timers.get(item.id)\n if (timer !== undefined) {\n clearTimeout(timer)\n timers.delete(item.id)\n }\n }\n}\n\nfunction resume(placement: ToastPlacement) {\n paused.delete(placement)\n for (const item of toasts) {\n if (effectivePlacement(item) === placement) startTimer(item)\n }\n}\n\n/* The queue lives outside this component and survives it being unmounted and mounted\n again; only the countdowns are cleared here, and they are started afresh next time. */\nonBeforeUnmount(() => {\n for (const timer of timers.values()) clearTimeout(timer)\n timers.clear()\n})\n</script>\n\n<template>\n <div\n v-for=\"p in PLACEMENTS\"\n :key=\"p\"\n :ref=\"(el) => setStackEl(p, el)\"\n class=\"v-overlay v-toast-stack\"\n popover=\"manual\"\n :data-placement=\"p\"\n role=\"region\"\n :aria-label=\"ariaLabel\"\n @pointerenter=\"pause(p)\"\n @pointerleave=\"resume(p)\"\n @beforetoggle=\"syncStack(p, $event)\"\n @toggle=\"syncStack(p, $event)\"\n >\n <VToast\n v-for=\"item in groups.get(p) ?? []\"\n :key=\"item.id\"\n :item=\"item\"\n :close-label=\"resolvedCloseLabel\"\n @close=\"dismissToast($event)\"\n />\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n /* The fixed positioning and the guard hiding a closed container come from the shared\n `.v-overlay` class, set on this same element. What stays here is the browser's own\n popover decoration to undo — its border, its padding, its opaque background — and\n the stack's own layout. */\n .v-toast-stack {\n margin: 0;\n border: none;\n padding: 0;\n background: transparent;\n overflow: visible;\n width: fit-content;\n display: flex;\n flex-direction: column;\n gap: var(--vectis-space-3);\n }\n\n /*\n * These coordinates are deliberately PHYSICAL rather than logical: a notification\n * appears at a place on the screen, and that place does not flip with the reading\n * direction — the operating system's own notifications behave the same way.\n */\n .v-toast-stack[data-placement^='top-'] {\n top: var(--vectis-space-4);\n /* The newest notification should sit nearest the screen edge. The queue only ever\n grows at the end, so the stack is simply drawn in reverse. */\n flex-direction: column-reverse;\n /* The direction each card slides in from, read by `.v-banner` in styles/banner.css\n — the stack is the only thing that knows which edge of the screen it sits on. */\n --banner-enter-y: calc(-1 * var(--vectis-space-4));\n }\n\n .v-toast-stack[data-placement^='bottom-'] {\n bottom: var(--vectis-space-4);\n --banner-enter-y: var(--vectis-space-4);\n }\n\n .v-toast-stack[data-placement$='-left'] {\n left: var(--vectis-space-4);\n }\n\n .v-toast-stack[data-placement$='-right'] {\n right: var(--vectis-space-4);\n }\n\n .v-toast-stack[data-placement$='-center'] {\n left: 0;\n right: 0;\n margin-inline: auto;\n }\n\n /* The stack fades in and out. Animating an element that is being added to or removed\n from the page needs the two `allow-discrete` declarations and the starting values\n below; a browser missing either simply shows and hides it at once. */\n .v-toast-stack {\n opacity: 1;\n transition:\n opacity var(--vectis-duration-base) var(--vectis-ease-default),\n overlay var(--vectis-duration-base) allow-discrete,\n display var(--vectis-duration-base) allow-discrete;\n }\n\n .v-toast-stack:not(:popover-open) {\n opacity: 0;\n }\n\n @starting-style {\n .v-toast-stack:popover-open {\n opacity: 0;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-toast-stack {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":""}
@@ -0,0 +1,112 @@
1
+ import { useMessages as e } from "../../i18n/state.js";
2
+ import { usePopover as t } from "../../composables/usePopover.js";
3
+ import { useAriaLabel as n } from "../../composables/useAriaLabel.js";
4
+ import r from "./VToast.js";
5
+ import { dismissToast as i, toasts as a } from "./state.js";
6
+ import { Fragment as o, computed as s, createBlock as c, createElementBlock as l, createElementVNode as u, defineComponent as d, onBeforeUnmount as f, onMounted as p, openBlock as m, ref as h, renderList as g, unref as _, watch as v } from "vue";
7
+ //#region src/components/VToast/VToaster.vue?vue&type=script&setup=true&lang.ts
8
+ var y = [
9
+ "data-placement",
10
+ "aria-label",
11
+ "onPointerenter",
12
+ "onPointerleave",
13
+ "onBeforetoggle",
14
+ "onToggle"
15
+ ], b = /*@__PURE__*/ d({
16
+ __name: "VToaster",
17
+ props: {
18
+ placement: { default: "bottom-right" },
19
+ duration: { default: 5e3 },
20
+ closeLabel: { default: void 0 },
21
+ label: { default: void 0 }
22
+ },
23
+ setup(d) {
24
+ let b = d, x = e(), S = n(() => b.label ?? x.value.toaster.label), C = s(() => b.closeLabel ?? x.value.common.close), w = [
25
+ "top-left",
26
+ "top-center",
27
+ "top-right",
28
+ "bottom-left",
29
+ "bottom-center",
30
+ "bottom-right"
31
+ ], T = s(() => {
32
+ let e = /* @__PURE__ */ new Map();
33
+ for (let t of a) {
34
+ let n = t.placement ?? b.placement, r = e.get(n);
35
+ r ? r.push(t) : e.set(n, [t]);
36
+ }
37
+ return e;
38
+ }), E = new Map(w.map((e) => {
39
+ let n = h(null);
40
+ return [e, {
41
+ el: n,
42
+ ...t(n)
43
+ }];
44
+ }));
45
+ function D(e, t) {
46
+ let n = E.get(e);
47
+ n && (n.el.value = t ?? null);
48
+ }
49
+ function O(e, t) {
50
+ E.get(e)?.syncShown(t);
51
+ }
52
+ let k = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Set(), j = /* @__PURE__ */ new Set();
53
+ function M(e) {
54
+ return e.placement ?? b.placement;
55
+ }
56
+ function N(e) {
57
+ let t = e.duration ?? b.duration;
58
+ t <= 0 || k.has(e.id) || k.set(e.id, setTimeout(() => {
59
+ k.delete(e.id), i(e.id);
60
+ }, t));
61
+ }
62
+ function P() {
63
+ let e = new Set(a.map((e) => e.id));
64
+ for (let [t, n] of k) e.has(t) || (clearTimeout(n), k.delete(t));
65
+ for (let t of A) e.has(t) || A.delete(t);
66
+ for (let e of a) A.has(e.id) || (A.add(e.id), j.has(M(e)) || N(e));
67
+ for (let e of w) {
68
+ let t = E.get(e);
69
+ t?.el.value && ((T.value.get(e)?.length ?? 0) > 0 ? t.show() : t.hide());
70
+ }
71
+ }
72
+ v(T, P, { flush: "post" }), p(P);
73
+ function F(e) {
74
+ j.add(e);
75
+ for (let t of a) {
76
+ if (M(t) !== e) continue;
77
+ let n = k.get(t.id);
78
+ n !== void 0 && (clearTimeout(n), k.delete(t.id));
79
+ }
80
+ }
81
+ function I(e) {
82
+ j.delete(e);
83
+ for (let t of a) M(t) === e && N(t);
84
+ }
85
+ return f(() => {
86
+ for (let e of k.values()) clearTimeout(e);
87
+ k.clear();
88
+ }), (e, t) => (m(), l(o, null, g(w, (e) => u("div", {
89
+ key: e,
90
+ ref_for: !0,
91
+ ref: (t) => D(e, t),
92
+ class: "v-overlay v-toast-stack",
93
+ popover: "manual",
94
+ "data-placement": e,
95
+ role: "region",
96
+ "aria-label": _(S),
97
+ onPointerenter: (t) => F(e),
98
+ onPointerleave: (t) => I(e),
99
+ onBeforetoggle: (t) => O(e, t),
100
+ onToggle: (t) => O(e, t)
101
+ }, [(m(!0), l(o, null, g(T.value.get(e) ?? [], (e) => (m(), c(r, {
102
+ key: e.id,
103
+ item: e,
104
+ "close-label": C.value,
105
+ onClose: t[0] ||= (e) => _(i)(e)
106
+ }, null, 8, ["item", "close-label"]))), 128))], 40, y)), 64));
107
+ }
108
+ });
109
+ //#endregion
110
+ export { b as default };
111
+
112
+ //# sourceMappingURL=VToaster.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VToaster.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VToast/VToaster.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'\n\nimport { usePopover } from '../../composables/usePopover'\nimport VToast from './VToast.vue'\nimport { dismissToast, toasts, type ToastItem, type ToastPlacement } from './state'\n\nimport { useAriaLabel } from '../../composables/useAriaLabel'\nimport { useMessages } from '../../i18n/state'\n\n// @a11y @core\n/**\n * Where notifications appear. It is mounted ONCE, at the root of the application, and\n * from then on any call to `toast()` shows up here.\n *\n * It renders one container per corner of the screen rather than one floating box per\n * notification, and each container simply stacks its notifications with CSS. The\n * reason is that these boxes are drawn above the whole page, at fixed coordinates and\n * anchored to nothing: individually they would all land on the same spot, and keeping\n * them apart would mean measuring and offsetting each one in code. The six containers\n * exist at all times — empty, they cost nothing and the browser does not display them.\n *\n * The JavaScript covers three things the platform does not: putting the queue and the\n * containers in step, since drawing above the page can only be asked for by calling a\n * method; the timers that dismiss a notification when its time is up; and pausing\n * those timers while the pointer rests on a stack, so that something disappearing on a\n * clock can be held in place long enough to read (WCAG 2.2.1).\n */\ninterface ToasterProps {\n /** Which corner notifications appear in, unless one of them asks for another. */\n placement?: ToastPlacement\n /**\n * How long a notification stays, in milliseconds, unless it asks for something else.\n * A notification given 0 stays until it is dismissed.\n */\n duration?: number\n /** What the close cross does, in words. It falls back to the design system dictionary. */\n closeLabel?: string\n /**\n * What screen readers announce for the notification areas themselves, which are\n * landmarks of the page. It falls back to the design system dictionary.\n */\n label?: string\n}\n\nconst props = withDefaults(defineProps<ToasterProps>(), {\n placement: 'bottom-right',\n duration: 5000,\n closeLabel: undefined,\n label: undefined,\n})\n\nconst m = useMessages()\nconst ariaLabel = useAriaLabel(() => props.label ?? m.value.toaster.label)\nconst resolvedCloseLabel = computed(() => props.closeLabel ?? m.value.common.close)\n\nconst PLACEMENTS: ToastPlacement[] = [\n 'top-left',\n 'top-center',\n 'top-right',\n 'bottom-left',\n 'bottom-center',\n 'bottom-right',\n]\n\n/**\n * The queue sorted into the corner each notification actually belongs to: the one it\n * asked for, or failing that the one set on this component.\n */\nconst groups = computed(() => {\n const map = new Map<ToastPlacement, ToastItem[]>()\n for (const item of toasts) {\n const placement = item.placement ?? props.placement\n const list = map.get(placement)\n if (list) list.push(item)\n else map.set(placement, [item])\n }\n return map\n})\n\n/*\n * One instance of the popover plumbing PER corner. Each carries its own element, its\n * own open state — fed by that element's events — and the guards that make opening and\n * closing safe to call twice: asking the browser to show an already-shown popover\n * throws.\n *\n * The containers being permanent, this runs once and never again.\n */\nconst stacks = new Map(\n PLACEMENTS.map((placement) => {\n const el = ref<HTMLElement | null>(null)\n return [placement, { el, ...usePopover(el) }] as const\n }),\n)\n\nfunction setStackEl(placement: ToastPlacement, el: unknown) {\n const stack = stacks.get(placement)\n if (stack) stack.el.value = (el as HTMLElement | null) ?? null\n}\n\nfunction syncStack(placement: ToastPlacement, event: Event) {\n stacks.get(placement)?.syncShown(event)\n}\n\n/* The running countdowns, and the notifications already given one — a notification is\n armed once and only once, however many times the queue changes around it. */\nconst timers = new Map<number, ReturnType<typeof setTimeout>>()\nconst armed = new Set<number>()\n/* The corners the pointer is currently resting on, whose countdowns are suspended. */\nconst paused = new Set<ToastPlacement>()\n\nfunction effectivePlacement(item: ToastItem): ToastPlacement {\n return item.placement ?? props.placement\n}\n\nfunction startTimer(item: ToastItem) {\n const duration = item.duration ?? props.duration\n if (duration <= 0 || timers.has(item.id)) return\n timers.set(\n item.id,\n setTimeout(() => {\n timers.delete(item.id)\n dismissToast(item.id)\n }, duration),\n )\n}\n\n// @core\n/**\n * Brings the page into line with the queue: it starts the countdown of every\n * notification that has just arrived, throws away the countdowns of those that have\n * gone, and then shows the corners holding something while hiding the empty ones.\n *\n * It runs once on mount — which is what makes a notification raised before this\n * component existed appear all the same — and after that on every change to the queue.\n */\nfunction sync() {\n const alive = new Set(toasts.map((item) => item.id))\n for (const [id, timer] of timers) {\n if (!alive.has(id)) {\n clearTimeout(timer)\n timers.delete(id)\n }\n }\n for (const id of armed) if (!alive.has(id)) armed.delete(id)\n for (const item of toasts) {\n if (armed.has(item.id)) continue\n armed.add(item.id)\n if (!paused.has(effectivePlacement(item))) startTimer(item)\n }\n\n // Showing and hiding are safe to call on a container already in that state, the\n // guards living in the popover plumbing — so there is no need to remember which\n // corners are currently open.\n for (const placement of PLACEMENTS) {\n const stack = stacks.get(placement)\n if (!stack?.el.value) continue\n if ((groups.value.get(placement)?.length ?? 0) > 0) stack.show()\n else stack.hide()\n }\n}\n\n/*\n * Watching the grouped queue covers a change to the notifications AND a change to the\n * default corner. The `post` timing is load-bearing: the notification must already be\n * in the page before its container is told to show itself.\n */\nwatch(groups, sync, { flush: 'post' })\n// @ssr — a watcher does not run during the server render, so a notification raised\n// before this component mounted would never be picked up. Running the same\n// synchronization on mount is what brings it in.\nonMounted(sync)\n\n// @a11y — WCAG 2.2.1: something that disappears on a clock has to be holdable, or a\n// slow reader simply never finishes it.\n/*\n * Resting the pointer on a corner suspends its countdowns. Leaving restarts them from\n * the FULL duration rather than from what was left: simpler, and more generous to the\n * reader who has just interrupted themselves.\n */\nfunction pause(placement: ToastPlacement) {\n paused.add(placement)\n for (const item of toasts) {\n if (effectivePlacement(item) !== placement) continue\n const timer = timers.get(item.id)\n if (timer !== undefined) {\n clearTimeout(timer)\n timers.delete(item.id)\n }\n }\n}\n\nfunction resume(placement: ToastPlacement) {\n paused.delete(placement)\n for (const item of toasts) {\n if (effectivePlacement(item) === placement) startTimer(item)\n }\n}\n\n/* The queue lives outside this component and survives it being unmounted and mounted\n again; only the countdowns are cleared here, and they are started afresh next time. */\nonBeforeUnmount(() => {\n for (const timer of timers.values()) clearTimeout(timer)\n timers.clear()\n})\n</script>\n\n<template>\n <div\n v-for=\"p in PLACEMENTS\"\n :key=\"p\"\n :ref=\"(el) => setStackEl(p, el)\"\n class=\"v-overlay v-toast-stack\"\n popover=\"manual\"\n :data-placement=\"p\"\n role=\"region\"\n :aria-label=\"ariaLabel\"\n @pointerenter=\"pause(p)\"\n @pointerleave=\"resume(p)\"\n @beforetoggle=\"syncStack(p, $event)\"\n @toggle=\"syncStack(p, $event)\"\n >\n <VToast\n v-for=\"item in groups.get(p) ?? []\"\n :key=\"item.id\"\n :item=\"item\"\n :close-label=\"resolvedCloseLabel\"\n @close=\"dismissToast($event)\"\n />\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n /* The fixed positioning and the guard hiding a closed container come from the shared\n `.v-overlay` class, set on this same element. What stays here is the browser's own\n popover decoration to undo — its border, its padding, its opaque background — and\n the stack's own layout. */\n .v-toast-stack {\n margin: 0;\n border: none;\n padding: 0;\n background: transparent;\n overflow: visible;\n width: fit-content;\n display: flex;\n flex-direction: column;\n gap: var(--vectis-space-3);\n }\n\n /*\n * These coordinates are deliberately PHYSICAL rather than logical: a notification\n * appears at a place on the screen, and that place does not flip with the reading\n * direction — the operating system's own notifications behave the same way.\n */\n .v-toast-stack[data-placement^='top-'] {\n top: var(--vectis-space-4);\n /* The newest notification should sit nearest the screen edge. The queue only ever\n grows at the end, so the stack is simply drawn in reverse. */\n flex-direction: column-reverse;\n /* The direction each card slides in from, read by `.v-banner` in styles/banner.css\n — the stack is the only thing that knows which edge of the screen it sits on. */\n --banner-enter-y: calc(-1 * var(--vectis-space-4));\n }\n\n .v-toast-stack[data-placement^='bottom-'] {\n bottom: var(--vectis-space-4);\n --banner-enter-y: var(--vectis-space-4);\n }\n\n .v-toast-stack[data-placement$='-left'] {\n left: var(--vectis-space-4);\n }\n\n .v-toast-stack[data-placement$='-right'] {\n right: var(--vectis-space-4);\n }\n\n .v-toast-stack[data-placement$='-center'] {\n left: 0;\n right: 0;\n margin-inline: auto;\n }\n\n /* The stack fades in and out. Animating an element that is being added to or removed\n from the page needs the two `allow-discrete` declarations and the starting values\n below; a browser missing either simply shows and hides it at once. */\n .v-toast-stack {\n opacity: 1;\n transition:\n opacity var(--vectis-duration-base) var(--vectis-ease-default),\n overlay var(--vectis-duration-base) allow-discrete,\n display var(--vectis-duration-base) allow-discrete;\n }\n\n .v-toast-stack:not(:popover-open) {\n opacity: 0;\n }\n\n @starting-style {\n .v-toast-stack:popover-open {\n opacity: 0;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-toast-stack {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;EA6CA,IAAM,IAAQ,GAOR,IAAI,EAAY,GAChB,IAAY,QAAmB,EAAM,SAAS,EAAE,MAAM,QAAQ,KAAK,GACnE,IAAqB,QAAe,EAAM,cAAc,EAAE,MAAM,OAAO,KAAK,GAE5E,IAA+B;GACnC;GACA;GACA;GACA;GACA;GACA;EACF,GAMM,IAAS,QAAe;GAC5B,IAAM,oBAAM,IAAI,IAAiC;GACjD,KAAK,IAAM,KAAQ,GAAQ;IACzB,IAAM,IAAY,EAAK,aAAa,EAAM,WACpC,IAAO,EAAI,IAAI,CAAS;IAC9B,AAAI,IAAM,EAAK,KAAK,CAAI,IACnB,EAAI,IAAI,GAAW,CAAC,CAAI,CAAC;GAChC;GACA,OAAO;EACT,CAAC,GAUK,IAAS,IAAI,IACjB,EAAW,KAAK,MAAc;GAC5B,IAAM,IAAK,EAAwB,IAAI;GACvC,OAAO,CAAC,GAAW;IAAE;IAAI,GAAG,EAAW,CAAE;GAAE,CAAC;EAC9C,CAAC,CACH;EAEA,SAAS,EAAW,GAA2B,GAAa;GAC1D,IAAM,IAAQ,EAAO,IAAI,CAAS;GAClC,AAAI,MAAO,EAAM,GAAG,QAAS,KAA6B;EAC5D;EAEA,SAAS,EAAU,GAA2B,GAAc;GAC1D,EAAO,IAAI,CAAS,CAAC,EAAE,UAAU,CAAK;EACxC;EAIA,IAAM,oBAAS,IAAI,IAA2C,GACxD,oBAAQ,IAAI,IAAY,GAExB,oBAAS,IAAI,IAAoB;EAEvC,SAAS,EAAmB,GAAiC;GAC3D,OAAO,EAAK,aAAa,EAAM;EACjC;EAEA,SAAS,EAAW,GAAiB;GACnC,IAAM,IAAW,EAAK,YAAY,EAAM;GACpC,KAAY,KAAK,EAAO,IAAI,EAAK,EAAE,KACvC,EAAO,IACL,EAAK,IACL,iBAAiB;IAEf,AADA,EAAO,OAAO,EAAK,EAAE,GACrB,EAAa,EAAK,EAAE;GACtB,GAAG,CAAQ,CACb;EACF;EAWA,SAAS,IAAO;GACd,IAAM,IAAQ,IAAI,IAAI,EAAO,KAAK,MAAS,EAAK,EAAE,CAAC;GACnD,KAAK,IAAM,CAAC,GAAI,MAAU,GACxB,AAAK,EAAM,IAAI,CAAE,MACf,aAAa,CAAK,GAClB,EAAO,OAAO,CAAE;GAGpB,KAAK,IAAM,KAAM,GAAO,AAAK,EAAM,IAAI,CAAE,KAAG,EAAM,OAAO,CAAE;GAC3D,KAAK,IAAM,KAAQ,GACb,EAAM,IAAI,EAAK,EAAE,MACrB,EAAM,IAAI,EAAK,EAAE,GACZ,EAAO,IAAI,EAAmB,CAAI,CAAC,KAAG,EAAW,CAAI;GAM5D,KAAK,IAAM,KAAa,GAAY;IAClC,IAAM,IAAQ,EAAO,IAAI,CAAS;IAC7B,GAAO,GAAG,WACV,EAAO,MAAM,IAAI,CAAS,CAAC,EAAE,UAAU,KAAK,IAAG,EAAM,KAAK,IAC1D,EAAM,KAAK;GAClB;EACF;EAWA,AAJA,EAAM,GAAQ,GAAM,EAAE,OAAO,OAAO,CAAC,GAIrC,EAAU,CAAI;EASd,SAAS,EAAM,GAA2B;GACxC,EAAO,IAAI,CAAS;GACpB,KAAK,IAAM,KAAQ,GAAQ;IACzB,IAAI,EAAmB,CAAI,MAAM,GAAW;IAC5C,IAAM,IAAQ,EAAO,IAAI,EAAK,EAAE;IAChC,AAAI,MAAU,KAAA,MACZ,aAAa,CAAK,GAClB,EAAO,OAAO,EAAK,EAAE;GAEzB;EACF;EAEA,SAAS,EAAO,GAA2B;GACzC,EAAO,OAAO,CAAS;GACvB,KAAK,IAAM,KAAQ,GACjB,AAAI,EAAmB,CAAI,MAAM,KAAW,EAAW,CAAI;EAE/D;SAIA,QAAsB;GACpB,KAAK,IAAM,KAAS,EAAO,OAAO,GAAG,aAAa,CAAK;GACvD,EAAO,MAAM;EACf,CAAC,mBAIC,EAqBM,GAAA,MAAA,EApBQ,IAAL,MADT,EAqBM,OAAA;GAnBH,KAAK;;GACL,MAAM,MAAO,EAAW,GAAG,CAAE;GAC9B,OAAM;GACN,SAAQ;GACP,kBAAgB;GACjB,MAAK;GACJ,cAAY,EAAA,CAAA;GACZ,iBAAY,MAAE,EAAM,CAAC;GACrB,iBAAY,MAAE,EAAO,CAAC;GACtB,iBAAY,MAAE,EAAU,GAAG,CAAM;GACjC,WAAM,MAAE,EAAU,GAAG,CAAM;cAE5B,EAME,GAAA,MAAA,EALe,EAAA,MAAO,IAAI,CAAC,KAAA,CAAA,IAApB,YADT,EAME,GAAA;GAJC,KAAK,EAAK;GACJ;GACN,eAAa,EAAA;GACb,SAAK,AAAA,EAAA,QAAA,MAAE,EAAA,CAAA,CAAY,CAAC,CAAM"}
@@ -0,0 +1,74 @@
1
+ import { IconSource } from '../VIcon/types.js';
2
+ /**
3
+ * The queue of notifications waiting to be shown. Nothing in HTML covers this, so it
4
+ * is code by necessity.
5
+ *
6
+ * The queue is held at module level rather than inside a component, and that is the
7
+ * whole point: `toast()` can then be called from ANYWHERE — a component, a store, an
8
+ * error handler in an API layer — without anything having to be passed down to it.
9
+ * The price is a contract to respect: since module state is shared by every request a
10
+ * server handles, `toast()` must only ever be called in the browser, from a handler or
11
+ * when a request comes back, and never while a page is being rendered on the server.
12
+ *
13
+ * The only thing that touches the DOM, and the only thing that arms the timers, is the
14
+ * mounted VToaster.
15
+ */
16
+ export type ToastTone = 'neutral' | 'accent' | 'success' | 'danger' | 'warning';
17
+ export type ToastPlacement = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
18
+ /** Everything one can say when raising a notification. */
19
+ export interface ToastOptions {
20
+ /** What the notification says. */
21
+ message: string;
22
+ /** A short heading above the message, when the message alone needs framing. */
23
+ title?: string;
24
+ /** What the notification means, expressed as a colour, and which icon it takes by default. */
25
+ tone?: ToastTone;
26
+ /** How strongly it is painted: a tinted background with a border, or the full colour. */
27
+ variant?: 'soft' | 'solid';
28
+ /**
29
+ * The icon to show. Left out, the tone brings its own; `false` removes it
30
+ * altogether.
31
+ */
32
+ icon?: IconSource | false;
33
+ /**
34
+ * How long it stays, in milliseconds. Setting it to 0 keeps it until it is
35
+ * dismissed by hand, and leaving it out takes the duration set on the VToaster.
36
+ */
37
+ duration?: number;
38
+ /** Which corner it appears in. Left out, it takes the one set on the VToaster. */
39
+ placement?: ToastPlacement;
40
+ /** Shows the close cross. */
41
+ closable?: boolean;
42
+ /**
43
+ * How wide it is, as a CSS length. It is never allowed past the width of the
44
+ * viewport, margins included.
45
+ */
46
+ width?: string;
47
+ }
48
+ /**
49
+ * A notification once it is in the queue, with the choices the caller left out filled
50
+ * in and an id of its own. Internal: it is what VToaster renders.
51
+ */
52
+ export interface ToastItem extends ToastOptions {
53
+ id: number;
54
+ tone: ToastTone;
55
+ variant: 'soft' | 'solid';
56
+ closable: boolean;
57
+ }
58
+ /** The queue itself. It is internal, read only by VToaster, and not public API. */
59
+ export declare const toasts: import('vue').Reactive<ToastItem[]>;
60
+ /**
61
+ * Raises a notification, and hands back an id that `dismissToast` can use to take it
62
+ * away again before its time.
63
+ *
64
+ * The two defaults that belong to the VToaster — where notifications appear and how
65
+ * long they stay — are deliberately NOT resolved here: they are read when the
66
+ * notification is rendered, so the toaster remains the single source of truth for its
67
+ * own settings.
68
+ */
69
+ export declare function toast(options: ToastOptions): number;
70
+ /**
71
+ * Takes a notification away by its id, or clears every one of them when called with
72
+ * no argument.
73
+ */
74
+ export declare function dismissToast(id?: number): void;
@@ -0,0 +1,25 @@
1
+ import { reactive as e } from "vue";
2
+ //#region src/components/VToast/state.ts
3
+ var t = e([]), n = 0;
4
+ function r(e) {
5
+ let r = n++;
6
+ return t.push({
7
+ tone: "neutral",
8
+ variant: "soft",
9
+ closable: !0,
10
+ ...e,
11
+ id: r
12
+ }), r;
13
+ }
14
+ function i(e) {
15
+ if (e === void 0) {
16
+ t.length = 0;
17
+ return;
18
+ }
19
+ let n = t.findIndex((t) => t.id === e);
20
+ n !== -1 && t.splice(n, 1);
21
+ }
22
+ //#endregion
23
+ export { i as dismissToast, r as toast, t as toasts };
24
+
25
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","names":[],"sources":["../../../src/components/VToast/state.ts"],"sourcesContent":["import { reactive } from 'vue'\n\nimport type { IconSource } from '../VIcon/types'\n\n// @ssr @core\n/**\n * The queue of notifications waiting to be shown. Nothing in HTML covers this, so it\n * is code by necessity.\n *\n * The queue is held at module level rather than inside a component, and that is the\n * whole point: `toast()` can then be called from ANYWHERE — a component, a store, an\n * error handler in an API layer — without anything having to be passed down to it.\n * The price is a contract to respect: since module state is shared by every request a\n * server handles, `toast()` must only ever be called in the browser, from a handler or\n * when a request comes back, and never while a page is being rendered on the server.\n *\n * The only thing that touches the DOM, and the only thing that arms the timers, is the\n * mounted VToaster.\n */\n\nexport type ToastTone = 'neutral' | 'accent' | 'success' | 'danger' | 'warning'\n\nexport type ToastPlacement =\n 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'\n\n/** Everything one can say when raising a notification. */\nexport interface ToastOptions {\n /** What the notification says. */\n message: string\n /** A short heading above the message, when the message alone needs framing. */\n title?: string\n /** What the notification means, expressed as a colour, and which icon it takes by default. */\n tone?: ToastTone\n /** How strongly it is painted: a tinted background with a border, or the full colour. */\n variant?: 'soft' | 'solid'\n /**\n * The icon to show. Left out, the tone brings its own; `false` removes it\n * altogether.\n */\n icon?: IconSource | false\n /**\n * How long it stays, in milliseconds. Setting it to 0 keeps it until it is\n * dismissed by hand, and leaving it out takes the duration set on the VToaster.\n */\n duration?: number\n /** Which corner it appears in. Left out, it takes the one set on the VToaster. */\n placement?: ToastPlacement\n /** Shows the close cross. */\n closable?: boolean\n /**\n * How wide it is, as a CSS length. It is never allowed past the width of the\n * viewport, margins included.\n */\n width?: string\n}\n\n/**\n * A notification once it is in the queue, with the choices the caller left out filled\n * in and an id of its own. Internal: it is what VToaster renders.\n */\nexport interface ToastItem extends ToastOptions {\n id: number\n tone: ToastTone\n variant: 'soft' | 'solid'\n closable: boolean\n}\n\n/** The queue itself. It is internal, read only by VToaster, and not public API. */\nexport const toasts = reactive<ToastItem[]>([])\n\nlet nextId = 0\n\n/**\n * Raises a notification, and hands back an id that `dismissToast` can use to take it\n * away again before its time.\n *\n * The two defaults that belong to the VToaster — where notifications appear and how\n * long they stay — are deliberately NOT resolved here: they are read when the\n * notification is rendered, so the toaster remains the single source of truth for its\n * own settings.\n */\nexport function toast(options: ToastOptions): number {\n const id = nextId++\n toasts.push({ tone: 'neutral', variant: 'soft', closable: true, ...options, id })\n return id\n}\n\n/**\n * Takes a notification away by its id, or clears every one of them when called with\n * no argument.\n */\nexport function dismissToast(id?: number): void {\n if (id === undefined) {\n toasts.length = 0\n return\n }\n const index = toasts.findIndex((item) => item.id === id)\n if (index !== -1) toasts.splice(index, 1)\n}\n"],"mappings":";;AAoEA,IAAa,IAAS,EAAsB,CAAC,CAAC,GAE1C,IAAS;AAWb,SAAgB,EAAM,GAA+B;CACnD,IAAM,IAAK;CAEX,OADA,EAAO,KAAK;EAAE,MAAM;EAAW,SAAS;EAAQ,UAAU;EAAM,GAAG;EAAS;CAAG,CAAC,GACzE;AACT;AAMA,SAAgB,EAAa,GAAmB;CAC9C,IAAI,MAAO,KAAA,GAAW;EACpB,EAAO,SAAS;EAChB;CACF;CACA,IAAM,IAAQ,EAAO,WAAW,MAAS,EAAK,OAAO,CAAE;CACvD,AAAI,MAAU,MAAI,EAAO,OAAO,GAAO,CAAC;AAC1C"}
@@ -0,0 +1,2 @@
1
+ @layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
2
+ @layer vectis.components{.v-toggle:not(.v-button-group){align-items:center;gap:var(--vectis-space-1);display:inline-flex}.v-toggle:not(.v-button-group)[data-orientation=vertical]{flex-direction:column;align-items:stretch}}
@@ -0,0 +1,84 @@
1
+ export type ToggleValue = string | number;
2
+ /**
3
+ * What the v-model holds, which follows `multiple`: one value or nothing when a single
4
+ * choice is allowed, and a list of them when several are.
5
+ */
6
+ export type ToggleModelValue = ToggleValue | ToggleValue[] | null;
7
+ export type ToggleVariant = 'ghost' | 'outline';
8
+ export type ToggleTone = 'accent' | 'neutral' | 'danger';
9
+ export type ToggleSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
10
+ export type ToggleOrientation = 'horizontal' | 'vertical';
11
+ interface ToggleProps {
12
+ /** Allows several items to be chosen at once, which makes the v-model a list. */
13
+ multiple?: boolean;
14
+ /**
15
+ * Refuses to let the last chosen item be given up, so that something is always
16
+ * selected once something has been. It is a guard and nothing more: it selects
17
+ * nothing on its own at the start.
18
+ */
19
+ mandatory?: boolean;
20
+ /**
21
+ * Joins the items into one segmented control. Turning it off leaves them as separate
22
+ * buttons with a gap between them.
23
+ */
24
+ attached?: boolean;
25
+ /** Whether the items run across the page or down it. */
26
+ orientation?: ToggleOrientation;
27
+ /**
28
+ * How the UNSELECTED items are drawn. A selected item is always filled, whatever
29
+ * this says.
30
+ */
31
+ variant?: ToggleVariant;
32
+ /** The colour a selected item takes. The others stay neutral. */
33
+ tone?: ToggleTone;
34
+ /** The height of the items, from the scale shared by every control. */
35
+ size?: ToggleSize;
36
+ /** Takes 4px off the height of every item. */
37
+ compact?: boolean;
38
+ /** Makes the whole group unusable. */
39
+ disabled?: boolean;
40
+ /**
41
+ * Draws the selected item's icon in its filled form, a common way of reinforcing
42
+ * that it is the one in effect.
43
+ */
44
+ selectedIconFilled?: boolean;
45
+ /**
46
+ * What screen readers announce for the group — "Text alignment", "Filters". It is
47
+ * strongly recommended: no default could say what a group of buttons is for.
48
+ */
49
+ label?: string;
50
+ }
51
+ type __VLS_Props = ToggleProps;
52
+ type __VLS_Slots = {
53
+ /** The items of the group. */
54
+ default(): unknown;
55
+ };
56
+ type __VLS_ModelProps = {
57
+ modelValue?: ToggleModelValue;
58
+ };
59
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
60
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
61
+ "update:modelValue": (value: ToggleModelValue) => any;
62
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
63
+ "onUpdate:modelValue"?: ((value: ToggleModelValue) => any) | undefined;
64
+ }>, {
65
+ label: string;
66
+ size: ToggleSize;
67
+ variant: ToggleVariant;
68
+ tone: ToggleTone;
69
+ orientation: ToggleOrientation;
70
+ compact: boolean;
71
+ disabled: boolean;
72
+ attached: boolean;
73
+ multiple: boolean;
74
+ mandatory: boolean;
75
+ selectedIconFilled: boolean;
76
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
77
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
78
+ declare const _default: typeof __VLS_export;
79
+ export default _default;
80
+ type __VLS_WithSlots<T, S> = T & {
81
+ new (): {
82
+ $slots: S;
83
+ };
84
+ };
@@ -0,0 +1,9 @@
1
+ import './VToggle.css';
2
+ import e from "./VToggle.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/VToggle/VToggle.vue
5
+ var t = e;
6
+ //#endregion
7
+ export { t as default };
8
+
9
+ //# sourceMappingURL=VToggle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VToggle.js","names":[],"sources":["../../../src/components/VToggle/VToggle.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @keyboard @core\n/**\n * A row of buttons where one — or several — stay pressed: choosing a text alignment,\n * a view, a set of filters. A single v-model holds what is chosen.\n *\n * Every item is a VButton, the selected one filled and the others quiet, and by\n * default the whole row is joined into one segmented control. Nothing about hovering,\n * focusing or disabling is written here: it all comes from VButton.\n *\n * The JavaScript covers the two things HTML has no answer for: what a click does to\n * the selection — toggling it off, or refusing to when the last choice may not be\n * given up — and moving between the items with the arrow keys.\n */\nimport { provide } from 'vue'\n\nimport VButtonGroup from '../VButton/VButtonGroup.vue'\nimport { toggleKey } from './context'\n\nimport { toggleValue } from '../../utils/array'\nimport { arrowNavigate, navigableItems } from '../../utils/arrowNav'\n\nimport { useAriaLabel } from '../../composables/useAriaLabel'\n\nexport type ToggleValue = string | number\n/**\n * What the v-model holds, which follows `multiple`: one value or nothing when a single\n * choice is allowed, and a list of them when several are.\n */\nexport type ToggleModelValue = ToggleValue | ToggleValue[] | null\nexport type ToggleVariant = 'ghost' | 'outline'\nexport type ToggleTone = 'accent' | 'neutral' | 'danger'\nexport type ToggleSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'\nexport type ToggleOrientation = 'horizontal' | 'vertical'\n\ninterface ToggleProps {\n /** Allows several items to be chosen at once, which makes the v-model a list. */\n multiple?: boolean\n /**\n * Refuses to let the last chosen item be given up, so that something is always\n * selected once something has been. It is a guard and nothing more: it selects\n * nothing on its own at the start.\n */\n mandatory?: boolean\n /**\n * Joins the items into one segmented control. Turning it off leaves them as separate\n * buttons with a gap between them.\n */\n attached?: boolean\n /** Whether the items run across the page or down it. */\n orientation?: ToggleOrientation\n /**\n * How the UNSELECTED items are drawn. A selected item is always filled, whatever\n * this says.\n */\n variant?: ToggleVariant\n /** The colour a selected item takes. The others stay neutral. */\n tone?: ToggleTone\n /** The height of the items, from the scale shared by every control. */\n size?: ToggleSize\n /** Takes 4px off the height of every item. */\n compact?: boolean\n /** Makes the whole group unusable. */\n disabled?: boolean\n /**\n * Draws the selected item's icon in its filled form, a common way of reinforcing\n * that it is the one in effect.\n */\n selectedIconFilled?: boolean\n /**\n * What screen readers announce for the group — \"Text alignment\", \"Filters\". It is\n * strongly recommended: no default could say what a group of buttons is for.\n */\n label?: string\n}\n\nconst props = withDefaults(defineProps<ToggleProps>(), {\n multiple: false,\n mandatory: false,\n attached: true,\n orientation: 'horizontal',\n variant: 'ghost',\n tone: 'accent',\n size: 'md',\n compact: false,\n disabled: false,\n selectedIconFilled: false,\n label: undefined,\n})\n\ndefineSlots<{\n /** The items of the group. */\n default(): unknown\n}>()\n\nconst model = defineModel<ToggleModelValue>({ default: null })\n\nconst ariaLabel = useAriaLabel(() => props.label)\n\nfunction isSelected(value: ToggleValue): boolean {\n return props.multiple\n ? Array.isArray(model.value) && model.value.includes(value)\n : model.value === value\n}\n\n/*\n * What a click does to the selection.\n *\n * With several choices allowed, the list is NEVER changed in place: each write\n * produces a new one. That is what makes a consumer's own watchers and computed values\n * notice; mutating the existing list would leave some of them silent. A model still\n * holding a single value, or nothing, is treated as an empty list rather than\n * refused.\n *\n * There is no check for the disabled state here, and none is needed: a disabled button\n * emits no click at all.\n */\nfunction select(value: ToggleValue) {\n if (props.multiple) {\n const current = Array.isArray(model.value) ? model.value : []\n if (props.mandatory && current.length === 1 && current.includes(value)) return\n model.value = toggleValue(current, value)\n return\n }\n if (model.value === value) {\n if (!props.mandatory) model.value = null\n return\n }\n model.value = value\n}\n\nprovide(toggleKey, {\n isSelected,\n select,\n get variant() {\n return props.variant\n },\n get tone() {\n return props.tone\n },\n get size() {\n return props.size\n },\n get compact() {\n return props.compact\n },\n get disabled() {\n return props.disabled\n },\n get selectedIconFilled() {\n return props.selectedIconFilled\n },\n})\n\n// @keyboard @a11y\n/*\n * The arrow keys, through the shared implementation in `utils/arrowNav`.\n *\n * Every visible item stays a stop in the tab order here — the VPagination model. The\n * single-stop treatment is reserved for the patterns that require it, a row of tabs or\n * a radio group, and a group of buttons is neither. Disabled items are really disabled\n * buttons, which the selector leaves out.\n *\n * The container is read from the event rather than kept as a reference, because the\n * root is rendered dynamically: a reference would hand back sometimes a plain element,\n * sometimes a component instance.\n */\nfunction onKeydown(event: KeyboardEvent) {\n const group = event.currentTarget as HTMLElement\n arrowNavigate(event, group, navigableItems(group, '.v-toggle-item:not(:disabled)'), {\n vertical: props.orientation === 'vertical',\n })\n}\n</script>\n\n<template>\n <!-- Joined, the row is a VButtonGroup, which merges the borders of its DIRECT\n button children — which is why an item renders the button as its own root, with\n no wrapper in between.\n\n The orientation is passed through ONE key or the other, never both: an\n attribute bound to `undefined` would still be forwarded and would overwrite the\n one VButtonGroup sets for itself. So the group receives a prop, and the plain\n container an attribute.\n\n The role is needed for the plain container, and simply repeats what\n VButtonGroup already sets when the row is joined. -->\n <component\n :is=\"attached ? VButtonGroup : 'div'\"\n v-bind=\"attached ? { orientation } : { 'data-orientation': orientation }\"\n class=\"v-toggle\"\n role=\"group\"\n :aria-label=\"ariaLabel\"\n @keydown=\"onKeydown\"\n >\n <slot />\n </component>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * These rules are for the separated row alone, and the exclusion is what makes that\n * true: when the row is joined, the root carries BOTH classes at once. Without it,\n * the centring here and the stretching VButtonGroup declares would collide at equal\n * specificity, and the winner would be decided by whichever sheet the consumer's\n * bundler put last.\n */\n .v-toggle:not(.v-button-group) {\n display: inline-flex;\n align-items: center;\n gap: var(--vectis-space-1);\n }\n\n .v-toggle:not(.v-button-group)[data-orientation='vertical'] {\n flex-direction: column;\n align-items: stretch;\n }\n}\n</style>\n"],"mappings":""}
@@ -0,0 +1,103 @@
1
+ import e from "../VButton/VButtonGroup.js";
2
+ import { arrowNavigate as t, navigableItems as n } from "../../utils/arrowNav.js";
3
+ import { useAriaLabel as r } from "../../composables/useAriaLabel.js";
4
+ import { toggleKey as i } from "./context.js";
5
+ import { toggleValue as a } from "../../utils/array.js";
6
+ import { createBlock as o, defineComponent as s, mergeModels as c, mergeProps as l, openBlock as u, provide as d, renderSlot as f, resolveDynamicComponent as p, unref as m, useModel as h, withCtx as g } from "vue";
7
+ //#region src/components/VToggle/VToggle.vue?vue&type=script&setup=true&lang.ts
8
+ var _ = /*@__PURE__*/ s({
9
+ __name: "VToggle",
10
+ props: /*@__PURE__*/ c({
11
+ multiple: {
12
+ type: Boolean,
13
+ default: !1
14
+ },
15
+ mandatory: {
16
+ type: Boolean,
17
+ default: !1
18
+ },
19
+ attached: {
20
+ type: Boolean,
21
+ default: !0
22
+ },
23
+ orientation: { default: "horizontal" },
24
+ variant: { default: "ghost" },
25
+ tone: { default: "accent" },
26
+ size: { default: "md" },
27
+ compact: {
28
+ type: Boolean,
29
+ default: !1
30
+ },
31
+ disabled: {
32
+ type: Boolean,
33
+ default: !1
34
+ },
35
+ selectedIconFilled: {
36
+ type: Boolean,
37
+ default: !1
38
+ },
39
+ label: { default: void 0 }
40
+ }, {
41
+ modelValue: { default: null },
42
+ modelModifiers: {}
43
+ }),
44
+ emits: ["update:modelValue"],
45
+ setup(s) {
46
+ let c = s, _ = h(s, "modelValue"), v = r(() => c.label);
47
+ function y(e) {
48
+ return c.multiple ? Array.isArray(_.value) && _.value.includes(e) : _.value === e;
49
+ }
50
+ function b(e) {
51
+ if (c.multiple) {
52
+ let t = Array.isArray(_.value) ? _.value : [];
53
+ if (c.mandatory && t.length === 1 && t.includes(e)) return;
54
+ _.value = a(t, e);
55
+ return;
56
+ }
57
+ if (_.value === e) {
58
+ c.mandatory || (_.value = null);
59
+ return;
60
+ }
61
+ _.value = e;
62
+ }
63
+ d(i, {
64
+ isSelected: y,
65
+ select: b,
66
+ get variant() {
67
+ return c.variant;
68
+ },
69
+ get tone() {
70
+ return c.tone;
71
+ },
72
+ get size() {
73
+ return c.size;
74
+ },
75
+ get compact() {
76
+ return c.compact;
77
+ },
78
+ get disabled() {
79
+ return c.disabled;
80
+ },
81
+ get selectedIconFilled() {
82
+ return c.selectedIconFilled;
83
+ }
84
+ });
85
+ function x(e) {
86
+ let r = e.currentTarget;
87
+ t(e, r, n(r, ".v-toggle-item:not(:disabled)"), { vertical: c.orientation === "vertical" });
88
+ }
89
+ return (t, n) => (u(), o(p(s.attached ? e : "div"), l(s.attached ? { orientation: s.orientation } : { "data-orientation": s.orientation }, {
90
+ class: "v-toggle",
91
+ role: "group",
92
+ "aria-label": m(v),
93
+ onKeydown: x
94
+ }), {
95
+ default: g(() => [f(t.$slots, "default")]),
96
+ _: 3
97
+ }, 16, ["aria-label"]));
98
+ }
99
+ });
100
+ //#endregion
101
+ export { _ as default };
102
+
103
+ //# sourceMappingURL=VToggle.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VToggle.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VToggle/VToggle.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @keyboard @core\n/**\n * A row of buttons where one — or several — stay pressed: choosing a text alignment,\n * a view, a set of filters. A single v-model holds what is chosen.\n *\n * Every item is a VButton, the selected one filled and the others quiet, and by\n * default the whole row is joined into one segmented control. Nothing about hovering,\n * focusing or disabling is written here: it all comes from VButton.\n *\n * The JavaScript covers the two things HTML has no answer for: what a click does to\n * the selection — toggling it off, or refusing to when the last choice may not be\n * given up — and moving between the items with the arrow keys.\n */\nimport { provide } from 'vue'\n\nimport VButtonGroup from '../VButton/VButtonGroup.vue'\nimport { toggleKey } from './context'\n\nimport { toggleValue } from '../../utils/array'\nimport { arrowNavigate, navigableItems } from '../../utils/arrowNav'\n\nimport { useAriaLabel } from '../../composables/useAriaLabel'\n\nexport type ToggleValue = string | number\n/**\n * What the v-model holds, which follows `multiple`: one value or nothing when a single\n * choice is allowed, and a list of them when several are.\n */\nexport type ToggleModelValue = ToggleValue | ToggleValue[] | null\nexport type ToggleVariant = 'ghost' | 'outline'\nexport type ToggleTone = 'accent' | 'neutral' | 'danger'\nexport type ToggleSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'\nexport type ToggleOrientation = 'horizontal' | 'vertical'\n\ninterface ToggleProps {\n /** Allows several items to be chosen at once, which makes the v-model a list. */\n multiple?: boolean\n /**\n * Refuses to let the last chosen item be given up, so that something is always\n * selected once something has been. It is a guard and nothing more: it selects\n * nothing on its own at the start.\n */\n mandatory?: boolean\n /**\n * Joins the items into one segmented control. Turning it off leaves them as separate\n * buttons with a gap between them.\n */\n attached?: boolean\n /** Whether the items run across the page or down it. */\n orientation?: ToggleOrientation\n /**\n * How the UNSELECTED items are drawn. A selected item is always filled, whatever\n * this says.\n */\n variant?: ToggleVariant\n /** The colour a selected item takes. The others stay neutral. */\n tone?: ToggleTone\n /** The height of the items, from the scale shared by every control. */\n size?: ToggleSize\n /** Takes 4px off the height of every item. */\n compact?: boolean\n /** Makes the whole group unusable. */\n disabled?: boolean\n /**\n * Draws the selected item's icon in its filled form, a common way of reinforcing\n * that it is the one in effect.\n */\n selectedIconFilled?: boolean\n /**\n * What screen readers announce for the group — \"Text alignment\", \"Filters\". It is\n * strongly recommended: no default could say what a group of buttons is for.\n */\n label?: string\n}\n\nconst props = withDefaults(defineProps<ToggleProps>(), {\n multiple: false,\n mandatory: false,\n attached: true,\n orientation: 'horizontal',\n variant: 'ghost',\n tone: 'accent',\n size: 'md',\n compact: false,\n disabled: false,\n selectedIconFilled: false,\n label: undefined,\n})\n\ndefineSlots<{\n /** The items of the group. */\n default(): unknown\n}>()\n\nconst model = defineModel<ToggleModelValue>({ default: null })\n\nconst ariaLabel = useAriaLabel(() => props.label)\n\nfunction isSelected(value: ToggleValue): boolean {\n return props.multiple\n ? Array.isArray(model.value) && model.value.includes(value)\n : model.value === value\n}\n\n/*\n * What a click does to the selection.\n *\n * With several choices allowed, the list is NEVER changed in place: each write\n * produces a new one. That is what makes a consumer's own watchers and computed values\n * notice; mutating the existing list would leave some of them silent. A model still\n * holding a single value, or nothing, is treated as an empty list rather than\n * refused.\n *\n * There is no check for the disabled state here, and none is needed: a disabled button\n * emits no click at all.\n */\nfunction select(value: ToggleValue) {\n if (props.multiple) {\n const current = Array.isArray(model.value) ? model.value : []\n if (props.mandatory && current.length === 1 && current.includes(value)) return\n model.value = toggleValue(current, value)\n return\n }\n if (model.value === value) {\n if (!props.mandatory) model.value = null\n return\n }\n model.value = value\n}\n\nprovide(toggleKey, {\n isSelected,\n select,\n get variant() {\n return props.variant\n },\n get tone() {\n return props.tone\n },\n get size() {\n return props.size\n },\n get compact() {\n return props.compact\n },\n get disabled() {\n return props.disabled\n },\n get selectedIconFilled() {\n return props.selectedIconFilled\n },\n})\n\n// @keyboard @a11y\n/*\n * The arrow keys, through the shared implementation in `utils/arrowNav`.\n *\n * Every visible item stays a stop in the tab order here — the VPagination model. The\n * single-stop treatment is reserved for the patterns that require it, a row of tabs or\n * a radio group, and a group of buttons is neither. Disabled items are really disabled\n * buttons, which the selector leaves out.\n *\n * The container is read from the event rather than kept as a reference, because the\n * root is rendered dynamically: a reference would hand back sometimes a plain element,\n * sometimes a component instance.\n */\nfunction onKeydown(event: KeyboardEvent) {\n const group = event.currentTarget as HTMLElement\n arrowNavigate(event, group, navigableItems(group, '.v-toggle-item:not(:disabled)'), {\n vertical: props.orientation === 'vertical',\n })\n}\n</script>\n\n<template>\n <!-- Joined, the row is a VButtonGroup, which merges the borders of its DIRECT\n button children — which is why an item renders the button as its own root, with\n no wrapper in between.\n\n The orientation is passed through ONE key or the other, never both: an\n attribute bound to `undefined` would still be forwarded and would overwrite the\n one VButtonGroup sets for itself. So the group receives a prop, and the plain\n container an attribute.\n\n The role is needed for the plain container, and simply repeats what\n VButtonGroup already sets when the row is joined. -->\n <component\n :is=\"attached ? VButtonGroup : 'div'\"\n v-bind=\"attached ? { orientation } : { 'data-orientation': orientation }\"\n class=\"v-toggle\"\n role=\"group\"\n :aria-label=\"ariaLabel\"\n @keydown=\"onKeydown\"\n >\n <slot />\n </component>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * These rules are for the separated row alone, and the exclusion is what makes that\n * true: when the row is joined, the root carries BOTH classes at once. Without it,\n * the centring here and the stretching VButtonGroup declares would collide at equal\n * specificity, and the winner would be decided by whichever sheet the consumer's\n * bundler put last.\n */\n .v-toggle:not(.v-button-group) {\n display: inline-flex;\n align-items: center;\n gap: var(--vectis-space-1);\n }\n\n .v-toggle:not(.v-button-group)[data-orientation='vertical'] {\n flex-direction: column;\n align-items: stretch;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4EA,IAAM,IAAQ,GAmBR,IAAQ,EAA6B,GAAA,YAAkB,GAEvD,IAAY,QAAmB,EAAM,KAAK;EAEhD,SAAS,EAAW,GAA6B;GAC/C,OAAO,EAAM,WACT,MAAM,QAAQ,EAAM,KAAK,KAAK,EAAM,MAAM,SAAS,CAAK,IACxD,EAAM,UAAU;EACtB;EAcA,SAAS,EAAO,GAAoB;GAClC,IAAI,EAAM,UAAU;IAClB,IAAM,IAAU,MAAM,QAAQ,EAAM,KAAK,IAAI,EAAM,QAAQ,CAAC;IAC5D,IAAI,EAAM,aAAa,EAAQ,WAAW,KAAK,EAAQ,SAAS,CAAK,GAAG;IACxE,EAAM,QAAQ,EAAY,GAAS,CAAK;IACxC;GACF;GACA,IAAI,EAAM,UAAU,GAAO;IACzB,AAAK,EAAM,cAAW,EAAM,QAAQ;IACpC;GACF;GACA,EAAM,QAAQ;EAChB;EAEA,EAAQ,GAAW;GACjB;GACA;GACA,IAAI,UAAU;IACZ,OAAO,EAAM;GACf;GACA,IAAI,OAAO;IACT,OAAO,EAAM;GACf;GACA,IAAI,OAAO;IACT,OAAO,EAAM;GACf;GACA,IAAI,UAAU;IACZ,OAAO,EAAM;GACf;GACA,IAAI,WAAW;IACb,OAAO,EAAM;GACf;GACA,IAAI,qBAAqB;IACvB,OAAO,EAAM;GACf;EACF,CAAC;EAeD,SAAS,EAAU,GAAsB;GACvC,IAAM,IAAQ,EAAM;GACpB,EAAc,GAAO,GAAO,EAAe,GAAO,+BAA+B,GAAG,EAClF,UAAU,EAAM,gBAAgB,WAClC,CAAC;EACH;yBAeE,EASY,EARL,EAAA,WAAW,IAAY,KAAA,GAD9B,EAEU,EAOE,WAPM,EAAA,aAAK,EAAA,YAAW,IAAA,EAAA,oBAA2B,EAAA,YAAW,GAAA;GACtE,OAAM;GACN,MAAK;GACJ,cAAY,EAAA,CAAA;GACH;;oBAEF,CAAR,EAAQ,EAAA,QAAA,SAAA,CAAA,CAAA"}
@@ -0,0 +1,2 @@
1
+ @layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
2
+ @layer vectis.components{.v-toggle-item[data-size][data-icon-only]{min-inline-size:var(--control-height);padding-inline:0}}
@@ -0,0 +1,35 @@
1
+ import { IconSource } from '../VIcon/types.js';
2
+ import { ToggleValue } from './VToggle.js';
3
+ interface ToggleItemProps {
4
+ /**
5
+ * What choosing this item means. It is what the group's v-model holds when the item
6
+ * is selected, and it must be unique within the group.
7
+ */
8
+ value: ToggleValue;
9
+ /** The visible label. The default slot replaces it. */
10
+ label?: string;
11
+ /** An icon before the label: an icon name, or an explicit render. */
12
+ icon?: IconSource;
13
+ /**
14
+ * Makes this item unusable: it no longer responds, the arrow keys skip over it, and
15
+ * it greys out through the colour tokens.
16
+ */
17
+ disabled?: boolean;
18
+ }
19
+ type __VLS_Slots = {
20
+ /** The content of the item, replacing the `label` prop. */
21
+ default?(): unknown;
22
+ };
23
+ declare const __VLS_base: import('vue').DefineComponent<ToggleItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ToggleItemProps> & Readonly<{}>, {
24
+ label: string;
25
+ disabled: boolean;
26
+ icon: IconSource;
27
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
28
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
29
+ declare const _default: typeof __VLS_export;
30
+ export default _default;
31
+ type __VLS_WithSlots<T, S> = T & {
32
+ new (): {
33
+ $slots: S;
34
+ };
35
+ };
@@ -0,0 +1,9 @@
1
+ import './VToggleItem.css';
2
+ import e from "./VToggleItem.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/VToggle/VToggleItem.vue
5
+ var t = e;
6
+ //#endregion
7
+ export { t as default };
8
+
9
+ //# sourceMappingURL=VToggleItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VToggleItem.js","names":[],"sources":["../../../src/components/VToggle/VToggleItem.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * One item of a VToggle. It IS a VButton — the colour, the size, the focus ring and\n * the disabled state all come from there — and what this component adds is the one\n * attribute saying whether the button is currently pressed.\n *\n * That button is also this component's own root element, with nothing wrapped around\n * it, which is what lets the group merge the borders of neighbouring items: it only\n * joins its DIRECT children.\n *\n * Used outside a VToggle it still renders perfectly well, simply never selected, the\n * same way a tab does outside its row.\n */\nimport { computed, inject, useSlots } from 'vue'\n\nimport VButton from '../VButton/VButton.vue'\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport type { IconSource } from '../VIcon/types'\nimport { toggleKey } from './context'\nimport type { ToggleValue } from './VToggle.vue'\n\ninterface ToggleItemProps {\n /**\n * What choosing this item means. It is what the group's v-model holds when the item\n * is selected, and it must be unique within the group.\n */\n value: ToggleValue\n /** The visible label. The default slot replaces it. */\n label?: string\n /** An icon before the label: an icon name, or an explicit render. */\n icon?: IconSource\n /**\n * Makes this item unusable: it no longer responds, the arrow keys skip over it, and\n * it greys out through the colour tokens.\n */\n disabled?: boolean\n}\n\nconst props = withDefaults(defineProps<ToggleItemProps>(), {\n label: undefined,\n icon: undefined,\n disabled: false,\n})\n\ndefineSlots<{\n /** The content of the item, replacing the `label` prop. */\n default?(): unknown\n}>()\n\nconst slots = useSlots()\nconst toggle = inject(toggleKey, null)\n\nconst selected = computed(() => toggle != null && toggle.isSelected(props.value))\n\n/** An icon and no label at all: the item becomes a square, like a VIconButton. */\nconst iconOnly = computed(() => Boolean(props.icon) && !props.label && !slots.default)\n</script>\n\n<template>\n <!-- The pressed state is always rendered, false included: it is its PRESENCE that\n makes a screen reader announce the button as one that stays pressed, and an\n attribute appearing only when true would leave the unselected items announced\n as ordinary buttons.\n\n The filled form is asked of the icon directly, because VButton's own icon\n options have no effect on an icon handed to it through a slot. -->\n <VButton\n class=\"v-toggle-item\"\n :aria-pressed=\"selected ? 'true' : 'false'\"\n :variant=\"selected ? 'solid' : (toggle?.variant ?? 'ghost')\"\n :tone=\"selected ? (toggle?.tone ?? 'accent') : 'neutral'\"\n :size=\"toggle?.size ?? 'md'\"\n :compact=\"toggle?.compact ?? false\"\n :disabled=\"disabled || toggle?.disabled\"\n :data-icon-only=\"iconOnly ? '' : undefined\"\n @click=\"toggle?.select(value)\"\n >\n <template v-if=\"icon\" #start>\n <VIcon v-bind=\"iconProps(icon)\" :filled=\"selected && (toggle?.selectedIconFilled ?? false)\" />\n </template>\n <slot v-if=\"!iconOnly\">{{ label }}</slot>\n </VButton>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * An item reduced to its icon becomes a square, like a VIconButton. The selector is\n * qualified by an attribute VButton always renders, which is what makes it beat that\n * button's own padding whatever order the two sheets end up in.\n */\n .v-toggle-item[data-size][data-icon-only] {\n padding-inline: 0;\n min-inline-size: var(--control-height);\n }\n}\n</style>\n"],"mappings":""}
@@ -0,0 +1,51 @@
1
+ import e from "../VIcon/VIcon.js";
2
+ import { iconProps as t } from "../VIcon/iconProps.js";
3
+ import n from "../VButton/VButton.js";
4
+ import { toggleKey as r } from "./context.js";
5
+ import { computed as i, createBlock as a, createCommentVNode as o, createSlots as s, createTextVNode as c, createVNode as l, defineComponent as u, inject as d, mergeProps as f, openBlock as p, renderSlot as m, toDisplayString as h, unref as g, useSlots as _, withCtx as v } from "vue";
6
+ //#region src/components/VToggle/VToggleItem.vue?vue&type=script&setup=true&lang.ts
7
+ var y = /*@__PURE__*/ u({
8
+ __name: "VToggleItem",
9
+ props: {
10
+ value: {},
11
+ label: { default: void 0 },
12
+ icon: { default: void 0 },
13
+ disabled: {
14
+ type: Boolean,
15
+ default: !1
16
+ }
17
+ },
18
+ setup(u) {
19
+ let y = u, b = _(), x = d(r, null), S = i(() => x != null && x.isSelected(y.value)), C = i(() => !!y.icon && !y.label && !b.default);
20
+ return (r, i) => (p(), a(n, {
21
+ class: "v-toggle-item",
22
+ "aria-pressed": S.value ? "true" : "false",
23
+ variant: S.value ? "solid" : g(x)?.variant ?? "ghost",
24
+ tone: S.value ? g(x)?.tone ?? "accent" : "neutral",
25
+ size: g(x)?.size ?? "md",
26
+ compact: g(x)?.compact ?? !1,
27
+ disabled: u.disabled || g(x)?.disabled,
28
+ "data-icon-only": C.value ? "" : void 0,
29
+ onClick: i[0] ||= (e) => g(x)?.select(u.value)
30
+ }, s({
31
+ default: v(() => [C.value ? o("", !0) : m(r.$slots, "default", {}, () => [c(h(u.label), 1)], void 0, 0)]),
32
+ _: 2
33
+ }, [u.icon ? {
34
+ name: "start",
35
+ fn: v(() => [l(e, f(g(t)(u.icon), { filled: S.value && (g(x)?.selectedIconFilled ?? !1) }), null, 16, ["filled"])]),
36
+ key: "0"
37
+ } : void 0]), 1032, [
38
+ "aria-pressed",
39
+ "variant",
40
+ "tone",
41
+ "size",
42
+ "compact",
43
+ "disabled",
44
+ "data-icon-only"
45
+ ]));
46
+ }
47
+ });
48
+ //#endregion
49
+ export { y as default };
50
+
51
+ //# sourceMappingURL=VToggleItem.vue_vue_type_script_setup_true_lang.js.map