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":"VTimePicker.js","names":[],"sources":["../../../src/components/VTimePicker/VTimePicker.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, ref } from 'vue'\n\nimport VButton from '../VButton/VButton.vue'\nimport VToggle from '../VToggle/VToggle.vue'\nimport type { ToggleModelValue } from '../VToggle/VToggle.vue'\nimport VToggleItem from '../VToggle/VToggleItem.vue'\nimport {\n DIAL_INNER_THRESHOLD,\n angleToIndex,\n dialIndexToHour24,\n distanceFraction,\n formatTime,\n hour24ToDial,\n hourCycleFor,\n parseTime,\n snapMinute,\n to12h,\n to24h,\n} from '../../utils/time'\nimport type { HourFormat, Meridiem } from '../../utils/time'\nimport { pad2 } from '../../utils/text'\nimport { useLocale, useMessages } from '../../i18n/state'\n\n// @a11y @keyboard @core\n/**\n * A clock shown directly in the page, for choosing a time. It is the hour-and-minute\n * counterpart of VDatePicker: VTimeInput does no more than dress it in a text field and a\n * popover, and it is perfectly usable on its own.\n *\n * It is read in three parts. Two large numerals at the top say what has been chosen so\n * far, and switch between adjusting the hour and adjusting the minutes; on a 12-hour clock\n * the choice between morning and afternoon sits beside them, since it is read as part of\n * that same time. Below them is the face itself, where one points at a time rather than\n * stepping through it.\n *\n * Nothing native covers choosing a value by pointing at an angle, so the JavaScript does\n * two things: it turns a point on the face into a time — measuring the face once, then\n * pure trigonometry that lives in `utils/time` — and it implements the keyboard of a\n * slider, the arrows and the Home, End and Page keys.\n *\n * Everything one SEES is CSS: the numerals are placed around the circle, and the hand is\n * turned, from a single unitless fraction of a turn written inline.\n *\n * There is exactly ONE focusable element on the face, and it is announced as a slider. The\n * numerals are visual markers hidden from screen readers, reached by the pointer's angle\n * rather than one cell at a time — which is why the whole spoken value has to be carried\n * by that one element.\n */\nexport type TimePickerFormat = HourFormat\n\n/** Which of the two halves of a time is being adjusted. */\nexport type TimePickerStep = 'hour' | 'minute'\n\ninterface TimePickerProps {\n /**\n * Whether the face shows a 12- or a 24-hour clock. Left out, the reader's language\n * decides, which is almost always what one wants.\n */\n format?: TimePickerFormat\n /**\n * A BCP 47 locale, which decides the clock. It TAKES PRECEDENCE over the design\n * system's global locale and falls back to it — which is why it has no literal default:\n * `undefined` has to stay recognizable for the global locale to have its chance.\n */\n locale?: string\n /** The interval the minutes snap to, both when dragging and with the arrow keys. */\n minuteStep?: number\n}\n\nconst props = withDefaults(defineProps<TimePickerProps>(), {\n format: undefined,\n locale: undefined,\n minuteStep: 1,\n})\n\n/**\n * The time, always as a 24-hour \"HH:mm\" string whatever clock is displayed. A consumer\n * therefore never has to know which clock the reader's language uses.\n *\n * With no value at all the clock shows midnight. It is deliberately NOT the current time:\n * reading the clock while rendering would make a page drawn on a server disagree with the\n * same page in the browser. A component that wants to open on the current time sets it\n * from a handler — which is exactly what VTimeInput does.\n */\nconst model = defineModel<string | null>({ default: null })\n\nconst emit = defineEmits<{\n /**\n * The reader has finished: the minutes were settled from the KEYBOARD. Releasing the\n * pointer does not count — on a clock face, letting go of the hand is how one stops\n * adjusting it, not how one confirms.\n */\n confirm: []\n}>()\n\ndefineSlots<{\n /** A strip at the foot of the clock — the place for actions such as Cancel and OK. */\n footer?(): unknown\n}>()\n\nconst m = useMessages()\nconst vectisLocale = useLocale()\n/* The prop wins, and the design system's global locale is what it falls back to. */\nconst resolvedLocale = computed(() => props.locale ?? vectisLocale.value)\nconst resolvedFormat = computed<TimePickerFormat>(\n () => props.format ?? hourCycleFor(resolvedLocale.value),\n)\n\n/** Which of the two is being adjusted. It starts on the hour and moves on by itself. */\nconst step = ref<TimePickerStep>('hour')\n\nconst parts = computed(() => parseTime(model.value) ?? { hour: 0, minute: 0 })\nconst hour = computed(() => parts.value.hour)\nconst minute = computed(() => parts.value.minute)\n\nfunction setHour(value: number) {\n model.value = formatTime(value, minute.value)\n}\n\nfunction setMinute(value: number) {\n model.value = formatTime(hour.value, value)\n}\n\n// @a11y\n/*\n * Which step the clock is on is otherwise carried by the face's own name alone, and a\n * change of name is not reliably announced. A politely announced region says it a second\n * time. The wording has no prop: the dictionary is where it is changed.\n *\n * It is written HERE, by the function the reader's own gestures go through, rather than by\n * a watcher on the step: putting the clock back on the hour between two openings — what\n * `reset` does — must stay silent, and a watcher could not tell the two apart.\n */\nconst liveMessage = ref('')\n\nfunction setStep(next: TimePickerStep) {\n step.value = next\n liveMessage.value =\n next === 'minute' ? m.value.timePicker.minuteStep : m.value.timePicker.hourStep\n}\n\n/** One numeral on the face. */\ninterface DialCell {\n key: string\n /** What is printed. */\n label: string\n /** Where it sits, as a fraction of a full turn from twelve o'clock. */\n turn: number\n /** Which of the two circles it belongs to, a 24-hour face having an inner one. */\n ring: 'outer' | 'inner'\n /** Whether it is the value currently being pointed at. */\n selected: boolean\n}\n\nconst cells = computed<DialCell[]>(() => {\n if (step.value === 'minute') {\n // Only twelve markers are printed, one every five minutes — sixty numerals would be\n // unreadable — while dragging remains accurate to the minute.\n return Array.from({ length: 12 }, (_, i) => ({\n key: `m-${i}`,\n label: pad2(i * 5),\n turn: i / 12,\n ring: 'outer' as const,\n selected: minute.value === i * 5,\n }))\n }\n const outer: DialCell[] = Array.from({ length: 12 }, (_, i) => {\n const hour24 = dialIndexToHour24(i, 'outer')\n return {\n key: `o-${i}`,\n label: String(i === 0 ? 12 : i),\n turn: i / 12,\n ring: 'outer' as const,\n selected:\n resolvedFormat.value === '24h'\n ? hour.value === hour24\n : to12h(hour.value).hour === (i === 0 ? 12 : i),\n }\n })\n if (resolvedFormat.value === '12h') return outer\n const inner: DialCell[] = Array.from({ length: 12 }, (_, i) => {\n const hour24 = dialIndexToHour24(i, 'inner')\n return {\n key: `i-${i}`,\n label: pad2(hour24),\n turn: i / 12,\n ring: 'inner' as const,\n selected: hour.value === hour24,\n }\n })\n return [...outer, ...inner]\n})\n\nconst handTurn = computed(() => {\n if (step.value === 'minute') return minute.value / 60\n const index =\n resolvedFormat.value === '24h' ? hour24ToDial(hour.value).index : to12h(hour.value).hour % 12\n return index / 12\n})\n\nconst handRing = computed(() =>\n step.value === 'hour' && resolvedFormat.value === '24h' ? hour24ToDial(hour.value).ring : 'outer',\n)\n\n/**\n * Whether the hand points at a minute that has no marker of its own. The tip is then\n * drawn small: at full size it would cover the two neighbouring markers and read as\n * pointing at neither.\n */\nconst handMinor = computed(() => step.value === 'minute' && minute.value % 5 !== 0)\n\n/** The hour as the two large numerals show it, on whichever clock is displayed. */\nconst displayHourText = computed(() =>\n pad2(resolvedFormat.value === '12h' ? to12h(hour.value).hour : hour.value),\n)\n\n/**\n * Which half of the day is chosen while NO time is set at all. The AM/PM control always\n * needs a value — it refuses to have none — and \"nothing\" is not one.\n *\n * It starts at AM rather than at whatever the current time happens to be, which keeps the\n * component's first render identical on a server and in a browser, and its tests free of\n * a clock.\n */\nconst pendingMeridiem = ref<Meridiem>('AM')\n\n/**\n * The half of the day in force: the value's own once there is one, the remembered choice\n * until then. Every hour written on a 12-hour face goes through it — without which a\n * reader who picks PM on an empty clock and then an hour would get the morning back, the\n * value having no half-day of its own to read.\n */\nconst currentMeridiem = computed<Meridiem>(() =>\n model.value ? to12h(hour.value).meridiem : pendingMeridiem.value,\n)\n\nconst meridiemModel = computed<ToggleModelValue>({\n get: () => currentMeridiem.value,\n set: (value) => {\n const meridiem: Meridiem = value === 'PM' ? 'PM' : 'AM'\n pendingMeridiem.value = meridiem\n // With no time set there is nothing to convert, so the choice is simply REMEMBERED\n // and applies to the first time chosen.\n if (model.value) setHour(to24h(to12h(hour.value).hour, meridiem))\n },\n})\n\n// @a11y — the entire spoken value of the face. The numerals are hidden from screen\n// readers, so these four attributes are the ONLY thing assistive technology has: what the\n// value is, what its bounds are, and how to say it.\nconst ariaValueNow = computed(() => {\n if (step.value === 'minute') return minute.value\n return resolvedFormat.value === '12h' ? to12h(hour.value).hour : hour.value\n})\nconst ariaValueMin = computed(() =>\n step.value === 'minute' ? 0 : resolvedFormat.value === '12h' ? 1 : 0,\n)\nconst ariaValueMax = computed(() =>\n step.value === 'minute' ? 59 : resolvedFormat.value === '12h' ? 12 : 23,\n)\nconst ariaValueText = computed(() =>\n step.value === 'minute'\n ? m.value.timePicker.minutesValue(minute.value)\n : m.value.timePicker.hoursValue(ariaValueNow.value),\n)\n\n/**\n * A step has been settled: after the hour come the minutes, and after the minutes the\n * whole thing is confirmed — but by KEYBOARD only, for the reason given on the emit.\n */\nfunction settleStep(via: 'pointer' | 'keyboard') {\n if (step.value === 'hour') setStep('minute')\n else if (via === 'keyboard') emit('confirm')\n}\n\n// Pointing at the face, by click or by drag.\nconst faceEl = ref<HTMLElement | null>(null)\nconst dragging = ref(false)\n\nfunction applyPoint(event: PointerEvent) {\n const face = faceEl.value\n if (!face) return\n // Measuring the face is safe here: this runs from a handler, hence in a browser, never\n // during a render.\n const rect = face.getBoundingClientRect()\n const dx = event.clientX - (rect.left + rect.width / 2)\n const dy = event.clientY - (rect.top + rect.height / 2)\n if (step.value === 'minute') {\n setMinute(snapMinute(angleToIndex(dx, dy, 60), props.minuteStep))\n return\n }\n const index = angleToIndex(dx, dy, 12)\n if (resolvedFormat.value === '24h') {\n const ring = distanceFraction(dx, dy, rect.width / 2) < DIAL_INNER_THRESHOLD ? 'inner' : 'outer'\n setHour(dialIndexToHour24(index, ring))\n } else {\n setHour(to24h(index === 0 ? 12 : index, currentMeridiem.value))\n }\n}\n\nfunction onPointerdown(event: PointerEvent) {\n // Capturing the pointer is what keeps the drag alive when it wanders off the face.\n //\n // @fallback — it is wrapped because a pointer event fired by a TEST refers to no real\n // pointer, and the call then throws. Failing to capture merely means the drag stops at\n // the edge, which no test is checking.\n try {\n faceEl.value?.setPointerCapture(event.pointerId)\n } catch {\n /* a synthetic pointer: nothing to capture */\n }\n dragging.value = true\n applyPoint(event)\n}\n\nfunction onPointermove(event: PointerEvent) {\n if (dragging.value) applyPoint(event)\n}\n\nfunction onPointerup() {\n if (!dragging.value) return\n dragging.value = false\n settleStep('pointer')\n}\n\nfunction onPointercancel() {\n dragging.value = false\n}\n\n// @keyboard @a11y — the keyboard a slider is expected to have.\nfunction moveHour(delta: number) {\n if (resolvedFormat.value === '24h') {\n setHour((hour.value + delta + 24) % 24)\n return\n }\n // On a 12-hour face the hours cycle from 1 to 12 WITHIN the current half of the day:\n // passing midday is done on the AM/PM control, not by walking the hand past twelve.\n const hour12 = to12h(hour.value).hour\n setHour(to24h(((hour12 - 1 + delta + 12) % 12) + 1, currentMeridiem.value))\n}\n\nfunction onKeydown(event: KeyboardEvent) {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault()\n settleStep('keyboard')\n return\n }\n // The arrows are NOT flipped in a right-to-left page: a clock face is never mirrored —\n // clockwise means the same thing everywhere — so forward stays forward.\n const delta =\n event.key === 'ArrowUp' || event.key === 'ArrowRight'\n ? 1\n : event.key === 'ArrowDown' || event.key === 'ArrowLeft'\n ? -1\n : 0\n if (step.value === 'hour') {\n if (delta) moveHour(delta)\n else if (event.key === 'Home')\n setHour(resolvedFormat.value === '12h' ? to24h(1, currentMeridiem.value) : 0)\n else if (event.key === 'End')\n setHour(resolvedFormat.value === '12h' ? to24h(12, currentMeridiem.value) : 23)\n else return\n event.preventDefault()\n return\n }\n if (delta) setMinute(snapMinute(minute.value + delta * props.minuteStep, props.minuteStep))\n else if (event.key === 'PageUp') setMinute(snapMinute(minute.value + 5, props.minuteStep))\n else if (event.key === 'PageDown') setMinute(snapMinute(minute.value - 5, props.minuteStep))\n else if (event.key === 'Home') setMinute(0)\n else if (event.key === 'End') setMinute(snapMinute(60 - props.minuteStep, props.minuteStep))\n else return\n event.preventDefault()\n}\n\ndefineExpose({\n /** Moves the focus onto the clock face, which is what the arrow keys drive. */\n focus: (options?: FocusOptions) => faceEl.value?.focus(options),\n /**\n * Puts the clock back on the hour and clears the announcement, WITHOUT announcing\n * anything itself. A component holding this one in a panel calls it as the panel opens\n * and closes, so that every visit starts on the hour.\n */\n reset: () => {\n step.value = 'hour'\n liveMessage.value = ''\n },\n})\n</script>\n\n<template>\n <div class=\"v-time-picker\" :data-step=\"step\">\n <!-- The two large numerals switch between adjusting the hour and the minutes. The one\n being adjusted takes the accent tone, which on a quiet button shows as the colour\n of the numeral rather than as a filled background.\n\n The choice of half-day sits beside them, on the same row: it is read as part of\n the time itself rather than as a property of the face. On a 24-hour clock there\n is no such choice, and the row then holds the numerals alone. -->\n <div class=\"v-time-picker-header\">\n <div class=\"v-time-picker-time\">\n <VButton\n class=\"v-time-picker-cell\"\n variant=\"ghost\"\n size=\"lg\"\n :tone=\"step === 'hour' ? 'accent' : 'neutral'\"\n :aria-pressed=\"step === 'hour' ? 'true' : 'false'\"\n :aria-label=\"m.timePicker.selectHour\"\n @click=\"setStep('hour')\"\n >\n {{ displayHourText }}\n </VButton>\n <span class=\"v-time-picker-sep\" aria-hidden=\"true\">:</span>\n <VButton\n class=\"v-time-picker-cell\"\n variant=\"ghost\"\n size=\"lg\"\n :tone=\"step === 'minute' ? 'accent' : 'neutral'\"\n :aria-pressed=\"step === 'minute' ? 'true' : 'false'\"\n :aria-label=\"m.timePicker.selectMinute\"\n @click=\"setStep('minute')\"\n >\n {{ pad2(minute) }}\n </VButton>\n </div>\n\n <VToggle\n v-if=\"resolvedFormat === '12h'\"\n v-model=\"meridiemModel\"\n class=\"v-time-picker-meridiem\"\n mandatory\n variant=\"outline\"\n orientation=\"vertical\"\n size=\"sm\"\n :label=\"m.timePicker.meridiem\"\n >\n <VToggleItem value=\"AM\" :label=\"m.timePicker.am\" />\n <VToggleItem value=\"PM\" :label=\"m.timePicker.pm\" />\n </VToggle>\n </div>\n\n <div\n ref=\"faceEl\"\n role=\"slider\"\n tabindex=\"0\"\n class=\"v-time-picker-face\"\n :aria-label=\"step === 'hour' ? m.timePicker.hour : m.timePicker.minutes\"\n :aria-valuemin=\"ariaValueMin\"\n :aria-valuemax=\"ariaValueMax\"\n :aria-valuenow=\"ariaValueNow\"\n :aria-valuetext=\"ariaValueText\"\n :data-dragging=\"dragging ? '' : undefined\"\n @pointerdown=\"onPointerdown\"\n @pointermove=\"onPointermove\"\n @pointerup=\"onPointerup\"\n @pointercancel=\"onPointercancel\"\n @keydown=\"onKeydown\"\n >\n <div\n class=\"v-time-picker-hand\"\n aria-hidden=\"true\"\n :data-ring=\"handRing\"\n :data-minor=\"handMinor ? '' : undefined\"\n :style=\"{ '--dial-turn': String(handTurn) }\"\n />\n <span class=\"v-time-picker-center\" aria-hidden=\"true\" />\n <span\n v-for=\"cell in cells\"\n :key=\"cell.key\"\n class=\"v-time-picker-number\"\n aria-hidden=\"true\"\n :data-ring=\"cell.ring\"\n :data-selected=\"cell.selected ? '' : undefined\"\n :style=\"{ '--dial-turn': String(cell.turn) }\"\n >{{ cell.label }}</span\n >\n </div>\n\n <div class=\"v-visually-hidden\" aria-live=\"polite\">{{ liveMessage }}</div>\n\n <div v-if=\"$slots.footer\" class=\"v-time-picker-footer\"><slot name=\"footer\" /></div>\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n .v-time-picker {\n display: flex;\n flex-direction: column;\n gap: var(--vectis-space-4);\n width: max-content;\n font-family: var(--vectis-text-family);\n color: var(--vectis-color-text);\n }\n\n /* The numerals and the choice of half-day on one row, the second beside the first. The\n gap is logical, so the control follows the reading direction; the numerals inside it\n stay in a group of their own, which is what keeps the direction they force off it.\n\n The centring is what places the row whether or not that control is rendered — a\n 24-hour clock has none, and the numerals then come out centred on their own. */\n .v-time-picker-header {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--vectis-space-3);\n }\n\n /* A time written in figures always reads hours then minutes, in every language. Forcing\n the direction here is what stops bidirectional reordering from swapping the two in a\n right-to-left page. */\n .v-time-picker-time {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--vectis-space-2);\n direction: ltr;\n }\n\n /* The two large numerals are ordinary quiet buttons. What is overridden here is the\n \"large numeral\" look alone — the width and the type; the height, the states, the\n focus ring and the transitions all come from the button itself.\n\n The selector is qualified by an attribute that button always renders, which is what\n makes it win whatever order the two sheets end up in. */\n .v-time-picker-cell[data-size] {\n width: var(--control-height);\n font-size: var(--vectis-text-heading-1-size);\n font-weight: var(--vectis-text-heading-2-weight);\n /* Figures of equal width, so that going from \"11\" to \"00\" does not shift the cell. */\n font-variant-numeric: tabular-nums;\n }\n\n .v-time-picker-sep {\n font-size: var(--vectis-text-heading-2-size);\n color: var(--vectis-color-text);\n user-select: none;\n }\n\n .v-time-picker-meridiem {\n flex: none;\n }\n\n .v-time-picker-face {\n position: relative;\n /* The row above is wider than the face as soon as the half-day control is rendered,\n and the column is only as wide as its widest child: without this the clock would\n hang at the start edge of that row instead of under the middle of it. The face\n itself stays physical — a clock is never mirrored. */\n align-self: center;\n inline-size: var(--vectis-control-size-time-picker-dial);\n block-size: var(--vectis-control-size-time-picker-dial);\n border-radius: var(--vectis-radius-pill);\n background: var(--vectis-color-surface-muted);\n /* Dragging across the face IS how one chooses, so it must do nothing else: no\n scrolling under a finger, and no selecting the numerals as text. */\n touch-action: none;\n user-select: none;\n cursor: pointer;\n /* How far from the centre the numerals sit — the outer circle. The numerals and the\n hand both read it, and the inner circle redefines it for itself.\n\n TRAP — this is coupled to the threshold that decides which of the two circles a\n point belongs to, in `utils/time`. Changing one without the other makes the face\n answer with the wrong ring, and no test can catch it: the unit tests measure\n nothing. */\n --dial-radius: calc(\n var(--vectis-control-size-time-picker-dial) / 2 -\n var(--vectis-control-size-time-picker-number) / 2\n );\n }\n\n .v-time-picker-face:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: var(--vectis-focus-ring-offset);\n }\n\n /*\n * The numerals are placed around the circle by CSS trigonometry, from the fraction of a\n * turn each one was given — no coordinates are computed in code.\n *\n * The properties used are PHYSICAL on purpose, where the rest of the design system\n * prefers logical ones: a clock face is never mirrored, clockwise meaning the same thing\n * in every language.\n */\n .v-time-picker-number {\n position: absolute;\n left: calc(50% + var(--dial-radius) * sin(var(--dial-turn) * 1turn));\n top: calc(50% - var(--dial-radius) * cos(var(--dial-turn) * 1turn));\n translate: -50% -50%;\n inline-size: var(--vectis-control-size-time-picker-number);\n block-size: var(--vectis-control-size-time-picker-number);\n display: grid;\n place-items: center;\n border-radius: var(--vectis-radius-pill);\n /* The outer circle is set at the large body size: these numerals are read at arm's\n length on a phone, not scanned like a label. */\n font-size: var(--vectis-text-body-lg-size);\n color: var(--vectis-color-text);\n /* Above the hand, so that the numeral being pointed at reads ON its dot rather than\n being covered by it. */\n z-index: 1;\n pointer-events: none;\n }\n\n .v-time-picker-number[data-ring='inner'],\n .v-time-picker-hand[data-ring='inner'] {\n --dial-radius: calc(\n var(--vectis-control-size-time-picker-dial) / 2 -\n var(--vectis-control-size-time-picker-number) * 1.5\n );\n }\n\n .v-time-picker-number[data-ring='inner'] {\n font-size: var(--vectis-text-body-md-size);\n color: var(--vectis-color-text-muted);\n }\n\n .v-time-picker-number[data-selected] {\n color: var(--vectis-color-text-on-accent);\n }\n\n /*\n * The hand: a stroke anchored at the centre and turned by the same fraction of a turn.\n *\n * TRAP — the rotation is deliberately NOT animated. Going from 55 minutes to 0 takes the\n * angle from nearly a full turn back to none, and an interpolation would sweep the hand\n * all the way round anticlockwise. That is an accepted departure from the Material\n * design it follows otherwise.\n */\n .v-time-picker-hand {\n position: absolute;\n left: calc(50% - var(--vectis-control-size-time-picker-hand) / 2);\n bottom: 50%;\n inline-size: var(--vectis-control-size-time-picker-hand);\n block-size: var(--dial-radius);\n background: var(--vectis-color-accent);\n transform-origin: 50% 100%;\n rotate: calc(var(--dial-turn) * 1turn);\n }\n\n /* The dot at the tip of the hand. It is exactly the size of a numeral's cell, so it\n covers the one being pointed at — whose text turns to the colour that reads on it. */\n .v-time-picker-hand::before {\n content: '';\n position: absolute;\n top: 0;\n left: 50%;\n translate: -50% -50%;\n inline-size: var(--vectis-control-size-time-picker-number);\n block-size: var(--vectis-control-size-time-picker-number);\n border-radius: var(--vectis-radius-pill);\n background: var(--vectis-color-accent);\n /* The ONE thing animated on the hand: the dot changing size between its two forms. It\n interpolates between two bounded values and can therefore never take a wrong path,\n unlike the rotation above. */\n transition:\n inline-size var(--vectis-duration-fast) var(--vectis-ease-default),\n block-size var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n /*\n * On a minute with no marker of its own, the dot covers no numeral and at full size\n * would spill onto both neighbours, reading as pointing at neither. Shrunk, it becomes\n * the precise marker itself — which is also why the pale centre Material draws inside it\n * is dropped here: at this size it would turn the dot into a ring.\n *\n * TRAP — only the DOT's own size changes. Redefining the numeral size variable here\n * would also move the radius derived from it, and with it the hand's length and the\n * position of both circles.\n */\n .v-time-picker-hand[data-minor]::before {\n inline-size: var(--vectis-control-size-time-picker-hand-minor);\n block-size: var(--vectis-control-size-time-picker-hand-minor);\n }\n\n .v-time-picker-center {\n position: absolute;\n left: 50%;\n top: 50%;\n translate: -50% -50%;\n inline-size: var(--vectis-control-size-time-picker-center);\n block-size: var(--vectis-control-size-time-picker-center);\n border-radius: var(--vectis-radius-pill);\n background: var(--vectis-color-accent);\n }\n\n .v-time-picker-footer {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: var(--vectis-space-2);\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-time-picker-hand::before {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":""}
@@ -0,0 +1,257 @@
1
+ import { useLocale as e, useMessages as t } from "../../i18n/state.js";
2
+ import n from "../VButton/VButton.js";
3
+ import r from "../VToggle/VToggle.js";
4
+ import i from "../VToggle/VToggleItem.js";
5
+ import { pad2 as a } from "../../utils/text.js";
6
+ import { angleToIndex as o, dialIndexToHour24 as s, distanceFraction as ee, formatTime as c, hour24ToDial as l, hourCycleFor as u, parseTime as d, snapMinute as f, to12h as p, to24h as m } from "../../utils/time.js";
7
+ import { Fragment as te, computed as h, createBlock as ne, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createTextVNode as y, createVNode as b, defineComponent as x, mergeModels as S, normalizeStyle as C, openBlock as w, ref as T, renderList as re, renderSlot as ie, toDisplayString as E, unref as D, useModel as ae, withCtx as O } from "vue";
8
+ //#region src/components/VTimePicker/VTimePicker.vue?vue&type=script&setup=true&lang.ts
9
+ var k = ["data-step"], A = { class: "v-time-picker-header" }, oe = { class: "v-time-picker-time" }, se = [
10
+ "aria-label",
11
+ "aria-valuemin",
12
+ "aria-valuemax",
13
+ "aria-valuenow",
14
+ "aria-valuetext",
15
+ "data-dragging"
16
+ ], ce = ["data-ring", "data-minor"], le = ["data-ring", "data-selected"], ue = {
17
+ class: "v-visually-hidden",
18
+ "aria-live": "polite"
19
+ }, de = {
20
+ key: 0,
21
+ class: "v-time-picker-footer"
22
+ }, j = /*@__PURE__*/ x({
23
+ __name: "VTimePicker",
24
+ props: /*@__PURE__*/ S({
25
+ format: { default: void 0 },
26
+ locale: { default: void 0 },
27
+ minuteStep: { default: 1 }
28
+ }, {
29
+ modelValue: { default: null },
30
+ modelModifiers: {}
31
+ }),
32
+ emits: /*@__PURE__*/ S(["confirm"], ["update:modelValue"]),
33
+ setup(x, { expose: S, emit: j }) {
34
+ let M = x, N = ae(x, "modelValue"), P = j, F = t(), fe = e(), I = h(() => M.locale ?? fe.value), L = h(() => M.format ?? u(I.value)), R = T("hour"), z = h(() => d(N.value) ?? {
35
+ hour: 0,
36
+ minute: 0
37
+ }), B = h(() => z.value.hour), V = h(() => z.value.minute);
38
+ function H(e) {
39
+ N.value = c(e, V.value);
40
+ }
41
+ function U(e) {
42
+ N.value = c(B.value, e);
43
+ }
44
+ let W = T("");
45
+ function G(e) {
46
+ R.value = e, W.value = e === "minute" ? F.value.timePicker.minuteStep : F.value.timePicker.hourStep;
47
+ }
48
+ let pe = h(() => {
49
+ if (R.value === "minute") return Array.from({ length: 12 }, (e, t) => ({
50
+ key: `m-${t}`,
51
+ label: a(t * 5),
52
+ turn: t / 12,
53
+ ring: "outer",
54
+ selected: V.value === t * 5
55
+ }));
56
+ let e = Array.from({ length: 12 }, (e, t) => {
57
+ let n = s(t, "outer");
58
+ return {
59
+ key: `o-${t}`,
60
+ label: String(t === 0 ? 12 : t),
61
+ turn: t / 12,
62
+ ring: "outer",
63
+ selected: L.value === "24h" ? B.value === n : p(B.value).hour === (t === 0 ? 12 : t)
64
+ };
65
+ });
66
+ if (L.value === "12h") return e;
67
+ let t = Array.from({ length: 12 }, (e, t) => {
68
+ let n = s(t, "inner");
69
+ return {
70
+ key: `i-${t}`,
71
+ label: a(n),
72
+ turn: t / 12,
73
+ ring: "inner",
74
+ selected: B.value === n
75
+ };
76
+ });
77
+ return [...e, ...t];
78
+ }), me = h(() => R.value === "minute" ? V.value / 60 : (L.value === "24h" ? l(B.value).index : p(B.value).hour % 12) / 12), he = h(() => R.value === "hour" && L.value === "24h" ? l(B.value).ring : "outer"), ge = h(() => R.value === "minute" && V.value % 5 != 0), _e = h(() => a(L.value === "12h" ? p(B.value).hour : B.value)), K = T("AM"), q = h(() => N.value ? p(B.value).meridiem : K.value), J = h({
79
+ get: () => q.value,
80
+ set: (e) => {
81
+ let t = e === "PM" ? "PM" : "AM";
82
+ K.value = t, N.value && H(m(p(B.value).hour, t));
83
+ }
84
+ }), Y = h(() => R.value === "minute" ? V.value : L.value === "12h" ? p(B.value).hour : B.value), ve = h(() => R.value === "minute" ? 0 : +(L.value === "12h")), ye = h(() => R.value === "minute" ? 59 : L.value === "12h" ? 12 : 23), be = h(() => R.value === "minute" ? F.value.timePicker.minutesValue(V.value) : F.value.timePicker.hoursValue(Y.value));
85
+ function X(e) {
86
+ R.value === "hour" ? G("minute") : e === "keyboard" && P("confirm");
87
+ }
88
+ let Z = T(null), Q = T(!1);
89
+ function $(e) {
90
+ let t = Z.value;
91
+ if (!t) return;
92
+ let n = t.getBoundingClientRect(), r = e.clientX - (n.left + n.width / 2), i = e.clientY - (n.top + n.height / 2);
93
+ if (R.value === "minute") {
94
+ U(f(o(r, i, 60), M.minuteStep));
95
+ return;
96
+ }
97
+ let a = o(r, i, 12);
98
+ L.value === "24h" ? H(s(a, ee(r, i, n.width / 2) < .625 ? "inner" : "outer")) : H(m(a === 0 ? 12 : a, q.value));
99
+ }
100
+ function xe(e) {
101
+ try {
102
+ Z.value?.setPointerCapture(e.pointerId);
103
+ } catch {}
104
+ Q.value = !0, $(e);
105
+ }
106
+ function Se(e) {
107
+ Q.value && $(e);
108
+ }
109
+ function Ce() {
110
+ Q.value && (Q.value = !1, X("pointer"));
111
+ }
112
+ function we() {
113
+ Q.value = !1;
114
+ }
115
+ function Te(e) {
116
+ if (L.value === "24h") {
117
+ H((B.value + e + 24) % 24);
118
+ return;
119
+ }
120
+ let t = p(B.value).hour;
121
+ H(m((t - 1 + e + 12) % 12 + 1, q.value));
122
+ }
123
+ function Ee(e) {
124
+ if (e.key === "Enter" || e.key === " ") {
125
+ e.preventDefault(), X("keyboard");
126
+ return;
127
+ }
128
+ let t = e.key === "ArrowUp" || e.key === "ArrowRight" ? 1 : e.key === "ArrowDown" || e.key === "ArrowLeft" ? -1 : 0;
129
+ if (R.value === "hour") {
130
+ if (t) Te(t);
131
+ else if (e.key === "Home") H(L.value === "12h" ? m(1, q.value) : 0);
132
+ else if (e.key === "End") H(L.value === "12h" ? m(12, q.value) : 23);
133
+ else return;
134
+ e.preventDefault();
135
+ return;
136
+ }
137
+ if (t) U(f(V.value + t * M.minuteStep, M.minuteStep));
138
+ else if (e.key === "PageUp") U(f(V.value + 5, M.minuteStep));
139
+ else if (e.key === "PageDown") U(f(V.value - 5, M.minuteStep));
140
+ else if (e.key === "Home") U(0);
141
+ else if (e.key === "End") U(f(60 - M.minuteStep, M.minuteStep));
142
+ else return;
143
+ e.preventDefault();
144
+ }
145
+ return S({
146
+ focus: (e) => Z.value?.focus(e),
147
+ reset: () => {
148
+ R.value = "hour", W.value = "";
149
+ }
150
+ }), (e, t) => (w(), _("div", {
151
+ class: "v-time-picker",
152
+ "data-step": R.value
153
+ }, [
154
+ v("div", A, [v("div", oe, [
155
+ b(n, {
156
+ class: "v-time-picker-cell",
157
+ variant: "ghost",
158
+ size: "lg",
159
+ tone: R.value === "hour" ? "accent" : "neutral",
160
+ "aria-pressed": R.value === "hour" ? "true" : "false",
161
+ "aria-label": D(F).timePicker.selectHour,
162
+ onClick: t[0] ||= (e) => G("hour")
163
+ }, {
164
+ default: O(() => [y(E(_e.value), 1)]),
165
+ _: 1
166
+ }, 8, [
167
+ "tone",
168
+ "aria-pressed",
169
+ "aria-label"
170
+ ]),
171
+ t[3] ||= v("span", {
172
+ class: "v-time-picker-sep",
173
+ "aria-hidden": "true"
174
+ }, ":", -1),
175
+ b(n, {
176
+ class: "v-time-picker-cell",
177
+ variant: "ghost",
178
+ size: "lg",
179
+ tone: R.value === "minute" ? "accent" : "neutral",
180
+ "aria-pressed": R.value === "minute" ? "true" : "false",
181
+ "aria-label": D(F).timePicker.selectMinute,
182
+ onClick: t[1] ||= (e) => G("minute")
183
+ }, {
184
+ default: O(() => [y(E(D(a)(V.value)), 1)]),
185
+ _: 1
186
+ }, 8, [
187
+ "tone",
188
+ "aria-pressed",
189
+ "aria-label"
190
+ ])
191
+ ]), L.value === "12h" ? (w(), ne(r, {
192
+ key: 0,
193
+ modelValue: J.value,
194
+ "onUpdate:modelValue": t[2] ||= (e) => J.value = e,
195
+ class: "v-time-picker-meridiem",
196
+ mandatory: "",
197
+ variant: "outline",
198
+ orientation: "vertical",
199
+ size: "sm",
200
+ label: D(F).timePicker.meridiem
201
+ }, {
202
+ default: O(() => [b(i, {
203
+ value: "AM",
204
+ label: D(F).timePicker.am
205
+ }, null, 8, ["label"]), b(i, {
206
+ value: "PM",
207
+ label: D(F).timePicker.pm
208
+ }, null, 8, ["label"])]),
209
+ _: 1
210
+ }, 8, ["modelValue", "label"])) : g("", !0)]),
211
+ v("div", {
212
+ ref_key: "faceEl",
213
+ ref: Z,
214
+ role: "slider",
215
+ tabindex: "0",
216
+ class: "v-time-picker-face",
217
+ "aria-label": R.value === "hour" ? D(F).timePicker.hour : D(F).timePicker.minutes,
218
+ "aria-valuemin": ve.value,
219
+ "aria-valuemax": ye.value,
220
+ "aria-valuenow": Y.value,
221
+ "aria-valuetext": be.value,
222
+ "data-dragging": Q.value ? "" : void 0,
223
+ onPointerdown: xe,
224
+ onPointermove: Se,
225
+ onPointerup: Ce,
226
+ onPointercancel: we,
227
+ onKeydown: Ee
228
+ }, [
229
+ v("div", {
230
+ class: "v-time-picker-hand",
231
+ "aria-hidden": "true",
232
+ "data-ring": he.value,
233
+ "data-minor": ge.value ? "" : void 0,
234
+ style: C({ "--dial-turn": String(me.value) })
235
+ }, null, 12, ce),
236
+ t[4] ||= v("span", {
237
+ class: "v-time-picker-center",
238
+ "aria-hidden": "true"
239
+ }, null, -1),
240
+ (w(!0), _(te, null, re(pe.value, (e) => (w(), _("span", {
241
+ key: e.key,
242
+ class: "v-time-picker-number",
243
+ "aria-hidden": "true",
244
+ "data-ring": e.ring,
245
+ "data-selected": e.selected ? "" : void 0,
246
+ style: C({ "--dial-turn": String(e.turn) })
247
+ }, E(e.label), 13, le))), 128))
248
+ ], 40, se),
249
+ v("div", ue, E(W.value), 1),
250
+ e.$slots.footer ? (w(), _("div", de, [ie(e.$slots, "footer")])) : g("", !0)
251
+ ], 8, k));
252
+ }
253
+ });
254
+ //#endregion
255
+ export { j as default };
256
+
257
+ //# sourceMappingURL=VTimePicker.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VTimePicker.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/VTimePicker/VTimePicker.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, ref } from 'vue'\n\nimport VButton from '../VButton/VButton.vue'\nimport VToggle from '../VToggle/VToggle.vue'\nimport type { ToggleModelValue } from '../VToggle/VToggle.vue'\nimport VToggleItem from '../VToggle/VToggleItem.vue'\nimport {\n DIAL_INNER_THRESHOLD,\n angleToIndex,\n dialIndexToHour24,\n distanceFraction,\n formatTime,\n hour24ToDial,\n hourCycleFor,\n parseTime,\n snapMinute,\n to12h,\n to24h,\n} from '../../utils/time'\nimport type { HourFormat, Meridiem } from '../../utils/time'\nimport { pad2 } from '../../utils/text'\nimport { useLocale, useMessages } from '../../i18n/state'\n\n// @a11y @keyboard @core\n/**\n * A clock shown directly in the page, for choosing a time. It is the hour-and-minute\n * counterpart of VDatePicker: VTimeInput does no more than dress it in a text field and a\n * popover, and it is perfectly usable on its own.\n *\n * It is read in three parts. Two large numerals at the top say what has been chosen so\n * far, and switch between adjusting the hour and adjusting the minutes; on a 12-hour clock\n * the choice between morning and afternoon sits beside them, since it is read as part of\n * that same time. Below them is the face itself, where one points at a time rather than\n * stepping through it.\n *\n * Nothing native covers choosing a value by pointing at an angle, so the JavaScript does\n * two things: it turns a point on the face into a time — measuring the face once, then\n * pure trigonometry that lives in `utils/time` — and it implements the keyboard of a\n * slider, the arrows and the Home, End and Page keys.\n *\n * Everything one SEES is CSS: the numerals are placed around the circle, and the hand is\n * turned, from a single unitless fraction of a turn written inline.\n *\n * There is exactly ONE focusable element on the face, and it is announced as a slider. The\n * numerals are visual markers hidden from screen readers, reached by the pointer's angle\n * rather than one cell at a time — which is why the whole spoken value has to be carried\n * by that one element.\n */\nexport type TimePickerFormat = HourFormat\n\n/** Which of the two halves of a time is being adjusted. */\nexport type TimePickerStep = 'hour' | 'minute'\n\ninterface TimePickerProps {\n /**\n * Whether the face shows a 12- or a 24-hour clock. Left out, the reader's language\n * decides, which is almost always what one wants.\n */\n format?: TimePickerFormat\n /**\n * A BCP 47 locale, which decides the clock. It TAKES PRECEDENCE over the design\n * system's global locale and falls back to it — which is why it has no literal default:\n * `undefined` has to stay recognizable for the global locale to have its chance.\n */\n locale?: string\n /** The interval the minutes snap to, both when dragging and with the arrow keys. */\n minuteStep?: number\n}\n\nconst props = withDefaults(defineProps<TimePickerProps>(), {\n format: undefined,\n locale: undefined,\n minuteStep: 1,\n})\n\n/**\n * The time, always as a 24-hour \"HH:mm\" string whatever clock is displayed. A consumer\n * therefore never has to know which clock the reader's language uses.\n *\n * With no value at all the clock shows midnight. It is deliberately NOT the current time:\n * reading the clock while rendering would make a page drawn on a server disagree with the\n * same page in the browser. A component that wants to open on the current time sets it\n * from a handler — which is exactly what VTimeInput does.\n */\nconst model = defineModel<string | null>({ default: null })\n\nconst emit = defineEmits<{\n /**\n * The reader has finished: the minutes were settled from the KEYBOARD. Releasing the\n * pointer does not count — on a clock face, letting go of the hand is how one stops\n * adjusting it, not how one confirms.\n */\n confirm: []\n}>()\n\ndefineSlots<{\n /** A strip at the foot of the clock — the place for actions such as Cancel and OK. */\n footer?(): unknown\n}>()\n\nconst m = useMessages()\nconst vectisLocale = useLocale()\n/* The prop wins, and the design system's global locale is what it falls back to. */\nconst resolvedLocale = computed(() => props.locale ?? vectisLocale.value)\nconst resolvedFormat = computed<TimePickerFormat>(\n () => props.format ?? hourCycleFor(resolvedLocale.value),\n)\n\n/** Which of the two is being adjusted. It starts on the hour and moves on by itself. */\nconst step = ref<TimePickerStep>('hour')\n\nconst parts = computed(() => parseTime(model.value) ?? { hour: 0, minute: 0 })\nconst hour = computed(() => parts.value.hour)\nconst minute = computed(() => parts.value.minute)\n\nfunction setHour(value: number) {\n model.value = formatTime(value, minute.value)\n}\n\nfunction setMinute(value: number) {\n model.value = formatTime(hour.value, value)\n}\n\n// @a11y\n/*\n * Which step the clock is on is otherwise carried by the face's own name alone, and a\n * change of name is not reliably announced. A politely announced region says it a second\n * time. The wording has no prop: the dictionary is where it is changed.\n *\n * It is written HERE, by the function the reader's own gestures go through, rather than by\n * a watcher on the step: putting the clock back on the hour between two openings — what\n * `reset` does — must stay silent, and a watcher could not tell the two apart.\n */\nconst liveMessage = ref('')\n\nfunction setStep(next: TimePickerStep) {\n step.value = next\n liveMessage.value =\n next === 'minute' ? m.value.timePicker.minuteStep : m.value.timePicker.hourStep\n}\n\n/** One numeral on the face. */\ninterface DialCell {\n key: string\n /** What is printed. */\n label: string\n /** Where it sits, as a fraction of a full turn from twelve o'clock. */\n turn: number\n /** Which of the two circles it belongs to, a 24-hour face having an inner one. */\n ring: 'outer' | 'inner'\n /** Whether it is the value currently being pointed at. */\n selected: boolean\n}\n\nconst cells = computed<DialCell[]>(() => {\n if (step.value === 'minute') {\n // Only twelve markers are printed, one every five minutes — sixty numerals would be\n // unreadable — while dragging remains accurate to the minute.\n return Array.from({ length: 12 }, (_, i) => ({\n key: `m-${i}`,\n label: pad2(i * 5),\n turn: i / 12,\n ring: 'outer' as const,\n selected: minute.value === i * 5,\n }))\n }\n const outer: DialCell[] = Array.from({ length: 12 }, (_, i) => {\n const hour24 = dialIndexToHour24(i, 'outer')\n return {\n key: `o-${i}`,\n label: String(i === 0 ? 12 : i),\n turn: i / 12,\n ring: 'outer' as const,\n selected:\n resolvedFormat.value === '24h'\n ? hour.value === hour24\n : to12h(hour.value).hour === (i === 0 ? 12 : i),\n }\n })\n if (resolvedFormat.value === '12h') return outer\n const inner: DialCell[] = Array.from({ length: 12 }, (_, i) => {\n const hour24 = dialIndexToHour24(i, 'inner')\n return {\n key: `i-${i}`,\n label: pad2(hour24),\n turn: i / 12,\n ring: 'inner' as const,\n selected: hour.value === hour24,\n }\n })\n return [...outer, ...inner]\n})\n\nconst handTurn = computed(() => {\n if (step.value === 'minute') return minute.value / 60\n const index =\n resolvedFormat.value === '24h' ? hour24ToDial(hour.value).index : to12h(hour.value).hour % 12\n return index / 12\n})\n\nconst handRing = computed(() =>\n step.value === 'hour' && resolvedFormat.value === '24h' ? hour24ToDial(hour.value).ring : 'outer',\n)\n\n/**\n * Whether the hand points at a minute that has no marker of its own. The tip is then\n * drawn small: at full size it would cover the two neighbouring markers and read as\n * pointing at neither.\n */\nconst handMinor = computed(() => step.value === 'minute' && minute.value % 5 !== 0)\n\n/** The hour as the two large numerals show it, on whichever clock is displayed. */\nconst displayHourText = computed(() =>\n pad2(resolvedFormat.value === '12h' ? to12h(hour.value).hour : hour.value),\n)\n\n/**\n * Which half of the day is chosen while NO time is set at all. The AM/PM control always\n * needs a value — it refuses to have none — and \"nothing\" is not one.\n *\n * It starts at AM rather than at whatever the current time happens to be, which keeps the\n * component's first render identical on a server and in a browser, and its tests free of\n * a clock.\n */\nconst pendingMeridiem = ref<Meridiem>('AM')\n\n/**\n * The half of the day in force: the value's own once there is one, the remembered choice\n * until then. Every hour written on a 12-hour face goes through it — without which a\n * reader who picks PM on an empty clock and then an hour would get the morning back, the\n * value having no half-day of its own to read.\n */\nconst currentMeridiem = computed<Meridiem>(() =>\n model.value ? to12h(hour.value).meridiem : pendingMeridiem.value,\n)\n\nconst meridiemModel = computed<ToggleModelValue>({\n get: () => currentMeridiem.value,\n set: (value) => {\n const meridiem: Meridiem = value === 'PM' ? 'PM' : 'AM'\n pendingMeridiem.value = meridiem\n // With no time set there is nothing to convert, so the choice is simply REMEMBERED\n // and applies to the first time chosen.\n if (model.value) setHour(to24h(to12h(hour.value).hour, meridiem))\n },\n})\n\n// @a11y — the entire spoken value of the face. The numerals are hidden from screen\n// readers, so these four attributes are the ONLY thing assistive technology has: what the\n// value is, what its bounds are, and how to say it.\nconst ariaValueNow = computed(() => {\n if (step.value === 'minute') return minute.value\n return resolvedFormat.value === '12h' ? to12h(hour.value).hour : hour.value\n})\nconst ariaValueMin = computed(() =>\n step.value === 'minute' ? 0 : resolvedFormat.value === '12h' ? 1 : 0,\n)\nconst ariaValueMax = computed(() =>\n step.value === 'minute' ? 59 : resolvedFormat.value === '12h' ? 12 : 23,\n)\nconst ariaValueText = computed(() =>\n step.value === 'minute'\n ? m.value.timePicker.minutesValue(minute.value)\n : m.value.timePicker.hoursValue(ariaValueNow.value),\n)\n\n/**\n * A step has been settled: after the hour come the minutes, and after the minutes the\n * whole thing is confirmed — but by KEYBOARD only, for the reason given on the emit.\n */\nfunction settleStep(via: 'pointer' | 'keyboard') {\n if (step.value === 'hour') setStep('minute')\n else if (via === 'keyboard') emit('confirm')\n}\n\n// Pointing at the face, by click or by drag.\nconst faceEl = ref<HTMLElement | null>(null)\nconst dragging = ref(false)\n\nfunction applyPoint(event: PointerEvent) {\n const face = faceEl.value\n if (!face) return\n // Measuring the face is safe here: this runs from a handler, hence in a browser, never\n // during a render.\n const rect = face.getBoundingClientRect()\n const dx = event.clientX - (rect.left + rect.width / 2)\n const dy = event.clientY - (rect.top + rect.height / 2)\n if (step.value === 'minute') {\n setMinute(snapMinute(angleToIndex(dx, dy, 60), props.minuteStep))\n return\n }\n const index = angleToIndex(dx, dy, 12)\n if (resolvedFormat.value === '24h') {\n const ring = distanceFraction(dx, dy, rect.width / 2) < DIAL_INNER_THRESHOLD ? 'inner' : 'outer'\n setHour(dialIndexToHour24(index, ring))\n } else {\n setHour(to24h(index === 0 ? 12 : index, currentMeridiem.value))\n }\n}\n\nfunction onPointerdown(event: PointerEvent) {\n // Capturing the pointer is what keeps the drag alive when it wanders off the face.\n //\n // @fallback — it is wrapped because a pointer event fired by a TEST refers to no real\n // pointer, and the call then throws. Failing to capture merely means the drag stops at\n // the edge, which no test is checking.\n try {\n faceEl.value?.setPointerCapture(event.pointerId)\n } catch {\n /* a synthetic pointer: nothing to capture */\n }\n dragging.value = true\n applyPoint(event)\n}\n\nfunction onPointermove(event: PointerEvent) {\n if (dragging.value) applyPoint(event)\n}\n\nfunction onPointerup() {\n if (!dragging.value) return\n dragging.value = false\n settleStep('pointer')\n}\n\nfunction onPointercancel() {\n dragging.value = false\n}\n\n// @keyboard @a11y — the keyboard a slider is expected to have.\nfunction moveHour(delta: number) {\n if (resolvedFormat.value === '24h') {\n setHour((hour.value + delta + 24) % 24)\n return\n }\n // On a 12-hour face the hours cycle from 1 to 12 WITHIN the current half of the day:\n // passing midday is done on the AM/PM control, not by walking the hand past twelve.\n const hour12 = to12h(hour.value).hour\n setHour(to24h(((hour12 - 1 + delta + 12) % 12) + 1, currentMeridiem.value))\n}\n\nfunction onKeydown(event: KeyboardEvent) {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault()\n settleStep('keyboard')\n return\n }\n // The arrows are NOT flipped in a right-to-left page: a clock face is never mirrored —\n // clockwise means the same thing everywhere — so forward stays forward.\n const delta =\n event.key === 'ArrowUp' || event.key === 'ArrowRight'\n ? 1\n : event.key === 'ArrowDown' || event.key === 'ArrowLeft'\n ? -1\n : 0\n if (step.value === 'hour') {\n if (delta) moveHour(delta)\n else if (event.key === 'Home')\n setHour(resolvedFormat.value === '12h' ? to24h(1, currentMeridiem.value) : 0)\n else if (event.key === 'End')\n setHour(resolvedFormat.value === '12h' ? to24h(12, currentMeridiem.value) : 23)\n else return\n event.preventDefault()\n return\n }\n if (delta) setMinute(snapMinute(minute.value + delta * props.minuteStep, props.minuteStep))\n else if (event.key === 'PageUp') setMinute(snapMinute(minute.value + 5, props.minuteStep))\n else if (event.key === 'PageDown') setMinute(snapMinute(minute.value - 5, props.minuteStep))\n else if (event.key === 'Home') setMinute(0)\n else if (event.key === 'End') setMinute(snapMinute(60 - props.minuteStep, props.minuteStep))\n else return\n event.preventDefault()\n}\n\ndefineExpose({\n /** Moves the focus onto the clock face, which is what the arrow keys drive. */\n focus: (options?: FocusOptions) => faceEl.value?.focus(options),\n /**\n * Puts the clock back on the hour and clears the announcement, WITHOUT announcing\n * anything itself. A component holding this one in a panel calls it as the panel opens\n * and closes, so that every visit starts on the hour.\n */\n reset: () => {\n step.value = 'hour'\n liveMessage.value = ''\n },\n})\n</script>\n\n<template>\n <div class=\"v-time-picker\" :data-step=\"step\">\n <!-- The two large numerals switch between adjusting the hour and the minutes. The one\n being adjusted takes the accent tone, which on a quiet button shows as the colour\n of the numeral rather than as a filled background.\n\n The choice of half-day sits beside them, on the same row: it is read as part of\n the time itself rather than as a property of the face. On a 24-hour clock there\n is no such choice, and the row then holds the numerals alone. -->\n <div class=\"v-time-picker-header\">\n <div class=\"v-time-picker-time\">\n <VButton\n class=\"v-time-picker-cell\"\n variant=\"ghost\"\n size=\"lg\"\n :tone=\"step === 'hour' ? 'accent' : 'neutral'\"\n :aria-pressed=\"step === 'hour' ? 'true' : 'false'\"\n :aria-label=\"m.timePicker.selectHour\"\n @click=\"setStep('hour')\"\n >\n {{ displayHourText }}\n </VButton>\n <span class=\"v-time-picker-sep\" aria-hidden=\"true\">:</span>\n <VButton\n class=\"v-time-picker-cell\"\n variant=\"ghost\"\n size=\"lg\"\n :tone=\"step === 'minute' ? 'accent' : 'neutral'\"\n :aria-pressed=\"step === 'minute' ? 'true' : 'false'\"\n :aria-label=\"m.timePicker.selectMinute\"\n @click=\"setStep('minute')\"\n >\n {{ pad2(minute) }}\n </VButton>\n </div>\n\n <VToggle\n v-if=\"resolvedFormat === '12h'\"\n v-model=\"meridiemModel\"\n class=\"v-time-picker-meridiem\"\n mandatory\n variant=\"outline\"\n orientation=\"vertical\"\n size=\"sm\"\n :label=\"m.timePicker.meridiem\"\n >\n <VToggleItem value=\"AM\" :label=\"m.timePicker.am\" />\n <VToggleItem value=\"PM\" :label=\"m.timePicker.pm\" />\n </VToggle>\n </div>\n\n <div\n ref=\"faceEl\"\n role=\"slider\"\n tabindex=\"0\"\n class=\"v-time-picker-face\"\n :aria-label=\"step === 'hour' ? m.timePicker.hour : m.timePicker.minutes\"\n :aria-valuemin=\"ariaValueMin\"\n :aria-valuemax=\"ariaValueMax\"\n :aria-valuenow=\"ariaValueNow\"\n :aria-valuetext=\"ariaValueText\"\n :data-dragging=\"dragging ? '' : undefined\"\n @pointerdown=\"onPointerdown\"\n @pointermove=\"onPointermove\"\n @pointerup=\"onPointerup\"\n @pointercancel=\"onPointercancel\"\n @keydown=\"onKeydown\"\n >\n <div\n class=\"v-time-picker-hand\"\n aria-hidden=\"true\"\n :data-ring=\"handRing\"\n :data-minor=\"handMinor ? '' : undefined\"\n :style=\"{ '--dial-turn': String(handTurn) }\"\n />\n <span class=\"v-time-picker-center\" aria-hidden=\"true\" />\n <span\n v-for=\"cell in cells\"\n :key=\"cell.key\"\n class=\"v-time-picker-number\"\n aria-hidden=\"true\"\n :data-ring=\"cell.ring\"\n :data-selected=\"cell.selected ? '' : undefined\"\n :style=\"{ '--dial-turn': String(cell.turn) }\"\n >{{ cell.label }}</span\n >\n </div>\n\n <div class=\"v-visually-hidden\" aria-live=\"polite\">{{ liveMessage }}</div>\n\n <div v-if=\"$slots.footer\" class=\"v-time-picker-footer\"><slot name=\"footer\" /></div>\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n .v-time-picker {\n display: flex;\n flex-direction: column;\n gap: var(--vectis-space-4);\n width: max-content;\n font-family: var(--vectis-text-family);\n color: var(--vectis-color-text);\n }\n\n /* The numerals and the choice of half-day on one row, the second beside the first. The\n gap is logical, so the control follows the reading direction; the numerals inside it\n stay in a group of their own, which is what keeps the direction they force off it.\n\n The centring is what places the row whether or not that control is rendered — a\n 24-hour clock has none, and the numerals then come out centred on their own. */\n .v-time-picker-header {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--vectis-space-3);\n }\n\n /* A time written in figures always reads hours then minutes, in every language. Forcing\n the direction here is what stops bidirectional reordering from swapping the two in a\n right-to-left page. */\n .v-time-picker-time {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--vectis-space-2);\n direction: ltr;\n }\n\n /* The two large numerals are ordinary quiet buttons. What is overridden here is the\n \"large numeral\" look alone — the width and the type; the height, the states, the\n focus ring and the transitions all come from the button itself.\n\n The selector is qualified by an attribute that button always renders, which is what\n makes it win whatever order the two sheets end up in. */\n .v-time-picker-cell[data-size] {\n width: var(--control-height);\n font-size: var(--vectis-text-heading-1-size);\n font-weight: var(--vectis-text-heading-2-weight);\n /* Figures of equal width, so that going from \"11\" to \"00\" does not shift the cell. */\n font-variant-numeric: tabular-nums;\n }\n\n .v-time-picker-sep {\n font-size: var(--vectis-text-heading-2-size);\n color: var(--vectis-color-text);\n user-select: none;\n }\n\n .v-time-picker-meridiem {\n flex: none;\n }\n\n .v-time-picker-face {\n position: relative;\n /* The row above is wider than the face as soon as the half-day control is rendered,\n and the column is only as wide as its widest child: without this the clock would\n hang at the start edge of that row instead of under the middle of it. The face\n itself stays physical — a clock is never mirrored. */\n align-self: center;\n inline-size: var(--vectis-control-size-time-picker-dial);\n block-size: var(--vectis-control-size-time-picker-dial);\n border-radius: var(--vectis-radius-pill);\n background: var(--vectis-color-surface-muted);\n /* Dragging across the face IS how one chooses, so it must do nothing else: no\n scrolling under a finger, and no selecting the numerals as text. */\n touch-action: none;\n user-select: none;\n cursor: pointer;\n /* How far from the centre the numerals sit — the outer circle. The numerals and the\n hand both read it, and the inner circle redefines it for itself.\n\n TRAP — this is coupled to the threshold that decides which of the two circles a\n point belongs to, in `utils/time`. Changing one without the other makes the face\n answer with the wrong ring, and no test can catch it: the unit tests measure\n nothing. */\n --dial-radius: calc(\n var(--vectis-control-size-time-picker-dial) / 2 -\n var(--vectis-control-size-time-picker-number) / 2\n );\n }\n\n .v-time-picker-face:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: var(--vectis-focus-ring-offset);\n }\n\n /*\n * The numerals are placed around the circle by CSS trigonometry, from the fraction of a\n * turn each one was given — no coordinates are computed in code.\n *\n * The properties used are PHYSICAL on purpose, where the rest of the design system\n * prefers logical ones: a clock face is never mirrored, clockwise meaning the same thing\n * in every language.\n */\n .v-time-picker-number {\n position: absolute;\n left: calc(50% + var(--dial-radius) * sin(var(--dial-turn) * 1turn));\n top: calc(50% - var(--dial-radius) * cos(var(--dial-turn) * 1turn));\n translate: -50% -50%;\n inline-size: var(--vectis-control-size-time-picker-number);\n block-size: var(--vectis-control-size-time-picker-number);\n display: grid;\n place-items: center;\n border-radius: var(--vectis-radius-pill);\n /* The outer circle is set at the large body size: these numerals are read at arm's\n length on a phone, not scanned like a label. */\n font-size: var(--vectis-text-body-lg-size);\n color: var(--vectis-color-text);\n /* Above the hand, so that the numeral being pointed at reads ON its dot rather than\n being covered by it. */\n z-index: 1;\n pointer-events: none;\n }\n\n .v-time-picker-number[data-ring='inner'],\n .v-time-picker-hand[data-ring='inner'] {\n --dial-radius: calc(\n var(--vectis-control-size-time-picker-dial) / 2 -\n var(--vectis-control-size-time-picker-number) * 1.5\n );\n }\n\n .v-time-picker-number[data-ring='inner'] {\n font-size: var(--vectis-text-body-md-size);\n color: var(--vectis-color-text-muted);\n }\n\n .v-time-picker-number[data-selected] {\n color: var(--vectis-color-text-on-accent);\n }\n\n /*\n * The hand: a stroke anchored at the centre and turned by the same fraction of a turn.\n *\n * TRAP — the rotation is deliberately NOT animated. Going from 55 minutes to 0 takes the\n * angle from nearly a full turn back to none, and an interpolation would sweep the hand\n * all the way round anticlockwise. That is an accepted departure from the Material\n * design it follows otherwise.\n */\n .v-time-picker-hand {\n position: absolute;\n left: calc(50% - var(--vectis-control-size-time-picker-hand) / 2);\n bottom: 50%;\n inline-size: var(--vectis-control-size-time-picker-hand);\n block-size: var(--dial-radius);\n background: var(--vectis-color-accent);\n transform-origin: 50% 100%;\n rotate: calc(var(--dial-turn) * 1turn);\n }\n\n /* The dot at the tip of the hand. It is exactly the size of a numeral's cell, so it\n covers the one being pointed at — whose text turns to the colour that reads on it. */\n .v-time-picker-hand::before {\n content: '';\n position: absolute;\n top: 0;\n left: 50%;\n translate: -50% -50%;\n inline-size: var(--vectis-control-size-time-picker-number);\n block-size: var(--vectis-control-size-time-picker-number);\n border-radius: var(--vectis-radius-pill);\n background: var(--vectis-color-accent);\n /* The ONE thing animated on the hand: the dot changing size between its two forms. It\n interpolates between two bounded values and can therefore never take a wrong path,\n unlike the rotation above. */\n transition:\n inline-size var(--vectis-duration-fast) var(--vectis-ease-default),\n block-size var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n /*\n * On a minute with no marker of its own, the dot covers no numeral and at full size\n * would spill onto both neighbours, reading as pointing at neither. Shrunk, it becomes\n * the precise marker itself — which is also why the pale centre Material draws inside it\n * is dropped here: at this size it would turn the dot into a ring.\n *\n * TRAP — only the DOT's own size changes. Redefining the numeral size variable here\n * would also move the radius derived from it, and with it the hand's length and the\n * position of both circles.\n */\n .v-time-picker-hand[data-minor]::before {\n inline-size: var(--vectis-control-size-time-picker-hand-minor);\n block-size: var(--vectis-control-size-time-picker-hand-minor);\n }\n\n .v-time-picker-center {\n position: absolute;\n left: 50%;\n top: 50%;\n translate: -50% -50%;\n inline-size: var(--vectis-control-size-time-picker-center);\n block-size: var(--vectis-control-size-time-picker-center);\n border-radius: var(--vectis-radius-pill);\n background: var(--vectis-color-accent);\n }\n\n .v-time-picker-footer {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: var(--vectis-space-2);\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-time-picker-hand::before {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ @layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
2
+ @layer vectis.components{.v-toast{padding:var(--vectis-space-3) var(--vectis-space-4);width:var(--toast-width,var(--vectis-control-size-toast-width));max-width:calc(100vw - 2 * var(--vectis-space-4));--toast-accent:var(--tone-text-tinted);align-items:flex-start}.v-toast[data-tone=neutral]{--tone-bg-soft:var(--vectis-color-surface-overlay);--tone-border-soft:var(--vectis-color-border);--toast-accent:var(--vectis-color-text)}.v-toast[data-variant=soft]{background:var(--tone-bg-soft);border:1px solid var(--tone-border-soft);color:var(--vectis-color-text)}.v-toast[data-variant=soft] .v-toast-icon,.v-toast[data-variant=soft] .v-toast-title{color:var(--toast-accent)}.v-toast[data-variant=soft] .v-toast-message{color:var(--vectis-color-text-muted)}.v-toast[data-variant=solid]{background:var(--tone-bg-solid);color:var(--tone-text-solid)}.v-toast[data-variant=soft] .v-toast-close[data-tone]{--tone-text-tinted:var(--toast-accent);--tone-bg-soft:color-mix(in oklab, var(--toast-accent), transparent 88%)}.v-toast[data-variant=solid] .v-toast-close[data-tone]{--tone-text-tinted:currentcolor;--tone-bg-soft:color-mix(in oklab, currentcolor, transparent 85%)}.v-toast-icon{--vectis-icon-size:var(--vectis-icon-size-md);margin-block:calc((var(--banner-line) - var(--vectis-icon-size-md)) / 2)}.v-toast-body{overflow-wrap:anywhere;flex:1;min-width:0}.v-toast-title{font-weight:var(--vectis-font-weight-semibold);margin-block-end:var(--vectis-space-1)}.v-toast-close{--toast-close-height:var(--vectis-control-height-sm);margin-block:calc((var(--banner-line) - var(--toast-close-height)) / 2);margin-inline-end:calc(-1 * var(--vectis-space-2))}}
@@ -0,0 +1,24 @@
1
+ import { ToastItem } from './state.js';
2
+ /**
3
+ * The card one notification is drawn on. It holds no state and decides nothing: the
4
+ * VToaster renders it, and it is internal to the component — never exported.
5
+ *
6
+ * How insistently it is announced follows its tone. A failure or a warning interrupts
7
+ * whatever a screen reader is saying; anything else waits for a pause. There is a
8
+ * known trade-off in the polite case: some screen readers miss the FIRST notification
9
+ * of a stack, because the region that announces it comes into existence already
10
+ * holding its text. The interruptive ones are always announced.
11
+ */
12
+ type __VLS_Props = {
13
+ /** The notification to draw, with all its options already resolved. */
14
+ item: ToastItem;
15
+ /** What the close cross does, in words. */
16
+ closeLabel: string;
17
+ };
18
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
19
+ close: (id: number) => any;
20
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
21
+ onClose?: ((id: number) => any) | undefined;
22
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import './VToast.css';
2
+ import e from "./VToast.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/VToast/VToast.vue
5
+ var t = e;
6
+ //#endregion
7
+ export { t as default };
8
+
9
+ //# sourceMappingURL=VToast.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VToast.js","names":[],"sources":["../../../src/components/VToast/VToast.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { check_circle as checkCircleIcon } from '../VIcon/icons/check_circle'\nimport { close as closeIcon } from '../VIcon/icons/close'\nimport { error as errorIcon } from '../VIcon/icons/error'\nimport { info as infoIcon } from '../VIcon/icons/info'\nimport { notifications as notificationsIcon } from '../VIcon/icons/notifications'\nimport { warning as warningIcon } from '../VIcon/icons/warning'\nimport type { IconSource } from '../VIcon/types'\nimport VIconButton from '../VIconButton/VIconButton.vue'\nimport type { ToastItem, ToastTone } from './state'\n\n// @a11y\n/**\n * The card one notification is drawn on. It holds no state and decides nothing: the\n * VToaster renders it, and it is internal to the component — never exported.\n *\n * How insistently it is announced follows its tone. A failure or a warning interrupts\n * whatever a screen reader is saying; anything else waits for a pause. There is a\n * known trade-off in the polite case: some screen readers miss the FIRST notification\n * of a stack, because the region that announces it comes into existence already\n * holding its text. The interruptive ones are always announced.\n */\nconst props = defineProps<{\n /** The notification to draw, with all its options already resolved. */\n item: ToastItem\n /** What the close cross does, in words. */\n closeLabel: string\n}>()\n\nconst emit = defineEmits<{\n /**\n * The reader asked for this notification to go. The card removes nothing itself —\n * the queue belongs to the VToaster.\n */\n close: [id: number]\n}>()\n\nconst role = computed(() =>\n props.item.tone === 'danger' || props.item.tone === 'warning' ? 'alert' : 'status',\n)\n\nconst DEFAULT_ICONS: Record<ToastTone, IconSource> = {\n neutral: notificationsIcon,\n accent: infoIcon,\n success: checkCircleIcon,\n danger: errorIcon,\n warning: warningIcon,\n}\n\n/**\n * The icon to draw: the one the notification asked for, or failing that the one its\n * tone brings. Asking for `false` means no icon at all.\n */\nconst icon = computed(() =>\n props.item.icon === false\n ? undefined\n : iconProps(props.item.icon ?? DEFAULT_ICONS[props.item.tone]),\n)\n</script>\n\n<template>\n <div\n class=\"v-banner v-toast v-tone\"\n :data-tone=\"item.tone\"\n :data-variant=\"item.variant\"\n :role=\"role\"\n :style=\"item.width ? { '--toast-width': item.width } : undefined\"\n >\n <VIcon v-if=\"icon\" class=\"v-toast-icon\" v-bind=\"icon\" />\n <div class=\"v-toast-body\">\n <p v-if=\"item.title\" class=\"v-toast-title\">{{ item.title }}</p>\n <p class=\"v-toast-message\">{{ item.message }}</p>\n </div>\n <VIconButton\n v-if=\"item.closable\"\n class=\"v-toast-close\"\n :label=\"closeLabel\"\n size=\"sm\"\n @click=\"emit('close', item.id)\"\n >\n <VIcon :name=\"closeIcon\" />\n </VIconButton>\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n /* The box, the decoration, the typography and the entry motion come from the shared\n `.v-banner` class set on this same element — the chassis this card has in common\n with the snackbar, in `styles/banner.css`. What stays here is what the two\n genuinely differ on: the alignment, the padding, the width, and the whole of the tone\n painting.\n `--banner-line`, the one-line alignment unit both use, is defined there. */\n .v-toast {\n /* A notification hooks its icon and its cross to the FIRST line of the message: it\n may carry a title and several lines, and the eye reads the icon against the text it\n introduces, not against the middle of a paragraph. The `--banner-line` margins are\n what make that identical to centring on a single line. (VSnackbar centres instead —\n one short sentence, and a control that would sit in a corner otherwise.) */\n align-items: flex-start;\n padding: var(--vectis-space-3) var(--vectis-space-4);\n width: var(--toast-width, var(--vectis-control-size-toast-width));\n /* On a narrow screen the card is never wider than the viewport, the stack's own\n margins deducted. */\n max-width: calc(100vw - 2 * var(--vectis-space-4));\n }\n\n /* The tone table itself lives in styles/tones.css, in a layer below the components,\n and is shared with VButton and VChip. The rules below read that shared contract\n directly rather than restating any of its colours.\n\n One local name survives, and for a precise reason: the close cross rebinds the\n tone's text colour inside its own subtree further down, so pointing this variable\n at that one would turn into a self-reference. It is resolved here, on the card, so\n that the cross inherits a value already computed rather than recomputing it in a\n context where it no longer means the same thing. */\n .v-toast {\n --toast-accent: var(--tone-text-tinted);\n }\n\n /* The neutral tone is overridden here, and for the soft variant only. A notification\n floats above the page rather than sitting in it, so it takes the overlay\n background and the plain border that goes with it, where the shared table assumes\n a surface within the page.\n\n The solid pair is deliberately left alone: its text and surface inversion is\n canonical across the design system. This block sits one layer above the table, so\n it wins whatever order the two sheets end up in. */\n .v-toast[data-tone='neutral'] {\n --tone-bg-soft: var(--vectis-color-surface-overlay);\n --tone-border-soft: var(--vectis-color-border);\n --toast-accent: var(--vectis-color-text);\n }\n\n .v-toast[data-variant='soft'] {\n background: var(--tone-bg-soft);\n border: 1px solid var(--tone-border-soft);\n color: var(--vectis-color-text);\n }\n\n .v-toast[data-variant='soft'] .v-toast-icon,\n .v-toast[data-variant='soft'] .v-toast-title {\n color: var(--toast-accent);\n }\n\n .v-toast[data-variant='soft'] .v-toast-message {\n color: var(--vectis-color-text-muted);\n }\n\n .v-toast[data-variant='solid'] {\n background: var(--tone-bg-solid);\n color: var(--tone-text-solid);\n }\n\n /*\n * The close cross is an ordinary neutral button, recoloured by rebinding the very\n * variables its own tone table reads. These rules win over that table TWICE — they\n * are more specific AND they sit in a layer above it — so no sheet order can change\n * the outcome.\n *\n * On a tinted card the cross takes the tone's own accent; on a fully coloured one it\n * takes the surrounding text colour, which is the only thing guaranteed to be\n * readable against that background.\n */\n .v-toast[data-variant='soft'] .v-toast-close[data-tone] {\n --tone-text-tinted: var(--toast-accent);\n --tone-bg-soft: color-mix(in oklab, var(--toast-accent), transparent 88%);\n }\n\n .v-toast[data-variant='solid'] .v-toast-close[data-tone] {\n --tone-text-tinted: currentcolor;\n --tone-bg-soft: color-mix(in oklab, currentcolor, transparent 85%);\n }\n\n .v-toast-icon {\n --vectis-icon-size: var(--vectis-icon-size-md);\n margin-block: calc((var(--banner-line) - var(--vectis-icon-size-md)) / 2);\n }\n\n .v-toast-body {\n flex: 1;\n min-width: 0;\n /* A message may hold something with nowhere to break — a URL, an identifier — and\n it has to wrap anyway rather than widen the card. */\n overflow-wrap: anywhere;\n }\n\n .v-toast-title {\n margin-block-end: var(--vectis-space-1);\n /* The heavier weight marks the title against its own message, which is emphasis\n rather than a typographic role — hence a font token read directly. */\n font-weight: var(--vectis-font-weight-semibold);\n }\n\n .v-toast-close {\n /* TRAP — this restates the size the template gives that button, small. The height the\n button computes for itself lives inside its own subtree, out of reach from here, so\n the two are written in two places and must be changed together — dropping `compact`\n from the template without dropping the subtraction here is the exact bug this\n comment exists for. */\n --toast-close-height: var(--vectis-control-height-sm);\n /* The cross is taller than a line of text, so this margin comes out negative —\n which is also what stops it from pushing the card's padding open. The unit it is\n measured against is the one-line height `.v-banner` defines. */\n margin-block: calc((var(--banner-line) - var(--toast-close-height)) / 2);\n /* The same inline pull-back as VSnackbar's action: both are a `sm` ghost control sitting\n at the end of a `--vectis-space-4` gutter, and a reader seeing a toast and a snackbar\n on one page would read two different gutters as a misalignment rather than as two\n components. Keep the two in step. */\n margin-inline-end: calc(-1 * var(--vectis-space-2));\n }\n}\n</style>\n"],"mappings":""}
@@ -0,0 +1,62 @@
1
+ import e from "../VIcon/VIcon.js";
2
+ import { iconProps as t } from "../VIcon/iconProps.js";
3
+ import n from "../VIconButton/VIconButton.js";
4
+ import { close as r } from "../VIcon/icons/close.js";
5
+ import { check_circle as i } from "../VIcon/icons/check_circle.js";
6
+ import { error as a } from "../VIcon/icons/error.js";
7
+ import { info as o } from "../VIcon/icons/info.js";
8
+ import { notifications as s } from "../VIcon/icons/notifications.js";
9
+ import { warning as c } from "../VIcon/icons/warning.js";
10
+ import { computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createVNode as m, defineComponent as h, mergeProps as g, normalizeStyle as _, openBlock as v, toDisplayString as y, unref as b, withCtx as x } from "vue";
11
+ //#region src/components/VToast/VToast.vue?vue&type=script&setup=true&lang.ts
12
+ var S = [
13
+ "data-tone",
14
+ "data-variant",
15
+ "role"
16
+ ], C = { class: "v-toast-body" }, w = {
17
+ key: 0,
18
+ class: "v-toast-title"
19
+ }, T = { class: "v-toast-message" }, E = /*@__PURE__*/ h({
20
+ __name: "VToast",
21
+ props: {
22
+ item: {},
23
+ closeLabel: {}
24
+ },
25
+ emits: ["close"],
26
+ setup(h, { emit: E }) {
27
+ let D = h, O = E, k = l(() => D.item.tone === "danger" || D.item.tone === "warning" ? "alert" : "status"), A = {
28
+ neutral: s,
29
+ accent: o,
30
+ success: i,
31
+ danger: a,
32
+ warning: c
33
+ }, j = l(() => D.item.icon === !1 ? void 0 : t(D.item.icon ?? A[D.item.tone]));
34
+ return (t, i) => (v(), f("div", {
35
+ class: "v-banner v-toast v-tone",
36
+ "data-tone": h.item.tone,
37
+ "data-variant": h.item.variant,
38
+ role: k.value,
39
+ style: _(h.item.width ? { "--toast-width": h.item.width } : void 0)
40
+ }, [
41
+ j.value ? (v(), u(e, g({
42
+ key: 0,
43
+ class: "v-toast-icon"
44
+ }, j.value), null, 16)) : d("", !0),
45
+ p("div", C, [h.item.title ? (v(), f("p", w, y(h.item.title), 1)) : d("", !0), p("p", T, y(h.item.message), 1)]),
46
+ h.item.closable ? (v(), u(n, {
47
+ key: 1,
48
+ class: "v-toast-close",
49
+ label: h.closeLabel,
50
+ size: "sm",
51
+ onClick: i[0] ||= (e) => O("close", h.item.id)
52
+ }, {
53
+ default: x(() => [m(e, { name: b(r) }, null, 8, ["name"])]),
54
+ _: 1
55
+ }, 8, ["label"])) : d("", !0)
56
+ ], 12, S));
57
+ }
58
+ });
59
+ //#endregion
60
+ export { E as default };
61
+
62
+ //# sourceMappingURL=VToast.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VToast.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VToast/VToast.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { check_circle as checkCircleIcon } from '../VIcon/icons/check_circle'\nimport { close as closeIcon } from '../VIcon/icons/close'\nimport { error as errorIcon } from '../VIcon/icons/error'\nimport { info as infoIcon } from '../VIcon/icons/info'\nimport { notifications as notificationsIcon } from '../VIcon/icons/notifications'\nimport { warning as warningIcon } from '../VIcon/icons/warning'\nimport type { IconSource } from '../VIcon/types'\nimport VIconButton from '../VIconButton/VIconButton.vue'\nimport type { ToastItem, ToastTone } from './state'\n\n// @a11y\n/**\n * The card one notification is drawn on. It holds no state and decides nothing: the\n * VToaster renders it, and it is internal to the component — never exported.\n *\n * How insistently it is announced follows its tone. A failure or a warning interrupts\n * whatever a screen reader is saying; anything else waits for a pause. There is a\n * known trade-off in the polite case: some screen readers miss the FIRST notification\n * of a stack, because the region that announces it comes into existence already\n * holding its text. The interruptive ones are always announced.\n */\nconst props = defineProps<{\n /** The notification to draw, with all its options already resolved. */\n item: ToastItem\n /** What the close cross does, in words. */\n closeLabel: string\n}>()\n\nconst emit = defineEmits<{\n /**\n * The reader asked for this notification to go. The card removes nothing itself —\n * the queue belongs to the VToaster.\n */\n close: [id: number]\n}>()\n\nconst role = computed(() =>\n props.item.tone === 'danger' || props.item.tone === 'warning' ? 'alert' : 'status',\n)\n\nconst DEFAULT_ICONS: Record<ToastTone, IconSource> = {\n neutral: notificationsIcon,\n accent: infoIcon,\n success: checkCircleIcon,\n danger: errorIcon,\n warning: warningIcon,\n}\n\n/**\n * The icon to draw: the one the notification asked for, or failing that the one its\n * tone brings. Asking for `false` means no icon at all.\n */\nconst icon = computed(() =>\n props.item.icon === false\n ? undefined\n : iconProps(props.item.icon ?? DEFAULT_ICONS[props.item.tone]),\n)\n</script>\n\n<template>\n <div\n class=\"v-banner v-toast v-tone\"\n :data-tone=\"item.tone\"\n :data-variant=\"item.variant\"\n :role=\"role\"\n :style=\"item.width ? { '--toast-width': item.width } : undefined\"\n >\n <VIcon v-if=\"icon\" class=\"v-toast-icon\" v-bind=\"icon\" />\n <div class=\"v-toast-body\">\n <p v-if=\"item.title\" class=\"v-toast-title\">{{ item.title }}</p>\n <p class=\"v-toast-message\">{{ item.message }}</p>\n </div>\n <VIconButton\n v-if=\"item.closable\"\n class=\"v-toast-close\"\n :label=\"closeLabel\"\n size=\"sm\"\n @click=\"emit('close', item.id)\"\n >\n <VIcon :name=\"closeIcon\" />\n </VIconButton>\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n /* The box, the decoration, the typography and the entry motion come from the shared\n `.v-banner` class set on this same element — the chassis this card has in common\n with the snackbar, in `styles/banner.css`. What stays here is what the two\n genuinely differ on: the alignment, the padding, the width, and the whole of the tone\n painting.\n `--banner-line`, the one-line alignment unit both use, is defined there. */\n .v-toast {\n /* A notification hooks its icon and its cross to the FIRST line of the message: it\n may carry a title and several lines, and the eye reads the icon against the text it\n introduces, not against the middle of a paragraph. The `--banner-line` margins are\n what make that identical to centring on a single line. (VSnackbar centres instead —\n one short sentence, and a control that would sit in a corner otherwise.) */\n align-items: flex-start;\n padding: var(--vectis-space-3) var(--vectis-space-4);\n width: var(--toast-width, var(--vectis-control-size-toast-width));\n /* On a narrow screen the card is never wider than the viewport, the stack's own\n margins deducted. */\n max-width: calc(100vw - 2 * var(--vectis-space-4));\n }\n\n /* The tone table itself lives in styles/tones.css, in a layer below the components,\n and is shared with VButton and VChip. The rules below read that shared contract\n directly rather than restating any of its colours.\n\n One local name survives, and for a precise reason: the close cross rebinds the\n tone's text colour inside its own subtree further down, so pointing this variable\n at that one would turn into a self-reference. It is resolved here, on the card, so\n that the cross inherits a value already computed rather than recomputing it in a\n context where it no longer means the same thing. */\n .v-toast {\n --toast-accent: var(--tone-text-tinted);\n }\n\n /* The neutral tone is overridden here, and for the soft variant only. A notification\n floats above the page rather than sitting in it, so it takes the overlay\n background and the plain border that goes with it, where the shared table assumes\n a surface within the page.\n\n The solid pair is deliberately left alone: its text and surface inversion is\n canonical across the design system. This block sits one layer above the table, so\n it wins whatever order the two sheets end up in. */\n .v-toast[data-tone='neutral'] {\n --tone-bg-soft: var(--vectis-color-surface-overlay);\n --tone-border-soft: var(--vectis-color-border);\n --toast-accent: var(--vectis-color-text);\n }\n\n .v-toast[data-variant='soft'] {\n background: var(--tone-bg-soft);\n border: 1px solid var(--tone-border-soft);\n color: var(--vectis-color-text);\n }\n\n .v-toast[data-variant='soft'] .v-toast-icon,\n .v-toast[data-variant='soft'] .v-toast-title {\n color: var(--toast-accent);\n }\n\n .v-toast[data-variant='soft'] .v-toast-message {\n color: var(--vectis-color-text-muted);\n }\n\n .v-toast[data-variant='solid'] {\n background: var(--tone-bg-solid);\n color: var(--tone-text-solid);\n }\n\n /*\n * The close cross is an ordinary neutral button, recoloured by rebinding the very\n * variables its own tone table reads. These rules win over that table TWICE — they\n * are more specific AND they sit in a layer above it — so no sheet order can change\n * the outcome.\n *\n * On a tinted card the cross takes the tone's own accent; on a fully coloured one it\n * takes the surrounding text colour, which is the only thing guaranteed to be\n * readable against that background.\n */\n .v-toast[data-variant='soft'] .v-toast-close[data-tone] {\n --tone-text-tinted: var(--toast-accent);\n --tone-bg-soft: color-mix(in oklab, var(--toast-accent), transparent 88%);\n }\n\n .v-toast[data-variant='solid'] .v-toast-close[data-tone] {\n --tone-text-tinted: currentcolor;\n --tone-bg-soft: color-mix(in oklab, currentcolor, transparent 85%);\n }\n\n .v-toast-icon {\n --vectis-icon-size: var(--vectis-icon-size-md);\n margin-block: calc((var(--banner-line) - var(--vectis-icon-size-md)) / 2);\n }\n\n .v-toast-body {\n flex: 1;\n min-width: 0;\n /* A message may hold something with nowhere to break — a URL, an identifier — and\n it has to wrap anyway rather than widen the card. */\n overflow-wrap: anywhere;\n }\n\n .v-toast-title {\n margin-block-end: var(--vectis-space-1);\n /* The heavier weight marks the title against its own message, which is emphasis\n rather than a typographic role — hence a font token read directly. */\n font-weight: var(--vectis-font-weight-semibold);\n }\n\n .v-toast-close {\n /* TRAP — this restates the size the template gives that button, small. The height the\n button computes for itself lives inside its own subtree, out of reach from here, so\n the two are written in two places and must be changed together — dropping `compact`\n from the template without dropping the subtraction here is the exact bug this\n comment exists for. */\n --toast-close-height: var(--vectis-control-height-sm);\n /* The cross is taller than a line of text, so this margin comes out negative —\n which is also what stops it from pushing the card's padding open. The unit it is\n measured against is the one-line height `.v-banner` defines. */\n margin-block: calc((var(--banner-line) - var(--toast-close-height)) / 2);\n /* The same inline pull-back as VSnackbar's action: both are a `sm` ghost control sitting\n at the end of a `--vectis-space-4` gutter, and a reader seeing a toast and a snackbar\n on one page would read two different gutters as a misalignment rather than as two\n components. Keep the two in step. */\n margin-inline-end: calc(-1 * var(--vectis-space-2));\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;EA0BA,IAAM,IAAQ,GAOR,IAAO,GAQP,IAAO,QACX,EAAM,KAAK,SAAS,YAAY,EAAM,KAAK,SAAS,YAAY,UAAU,QAC5E,GAEM,IAA+C;GACnD,SAAS;GACT,QAAQ;GACR,SAAS;GACT,QAAQ;GACC;EACX,GAMM,IAAO,QACX,EAAM,KAAK,SAAS,KAChB,KAAA,IACA,EAAU,EAAM,KAAK,QAAQ,EAAc,EAAM,KAAK,KAAK,CACjE;yBAIE,EAqBM,OAAA;GApBJ,OAAM;GACL,aAAW,EAAA,KAAK;GAChB,gBAAc,EAAA,KAAK;GACnB,MAAM,EAAA;GACN,OAAK,EAAE,EAAA,KAAK,QAAK,EAAA,iBAAsB,EAAA,KAAK,MAAK,IAAK,KAAA,CAAS;;GAEnD,EAAA,SAAA,EAAA,GAAb,EAAwD,GAAxD,EAAwD;;IAArC,OAAM;MAAuB,EAAA,KAAI,GAAA,MAAA,EAAA,KAAA,EAAA,IAAA,EAAA;GACpD,EAGM,OAHN,GAGM,CAFK,EAAA,KAAK,SAAA,EAAA,GAAd,EAA+D,KAA/D,GAA+D,EAAjB,EAAA,KAAK,KAAK,GAAA,CAAA,KAAA,EAAA,IAAA,EAAA,GACxD,EAAiD,KAAjD,GAAiD,EAAnB,EAAA,KAAK,OAAO,GAAA,CAAA,CAAA,CAAA;GAGpC,EAAA,KAAK,YAAA,EAAA,GADb,EAQc,GAAA;;IANZ,OAAM;IACL,OAAO,EAAA;IACR,MAAK;IACJ,SAAK,AAAA,EAAA,QAAA,MAAE,EAAI,SAAU,EAAA,KAAK,EAAE;;qBAEF,CAA3B,EAA2B,GAAA,EAAnB,MAAM,EAAA,CAAA,EAAS,GAAA,MAAA,GAAA,CAAA,MAAA,CAAA,CAAA,CAAA"}
@@ -0,0 +1,2 @@
1
+ @layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
2
+ @layer vectis.components{.v-toast-stack{gap:var(--vectis-space-3);background:0 0;border:none;flex-direction:column;width:fit-content;margin:0;padding:0;display:flex;overflow:visible}.v-toast-stack[data-placement^=top-]{top:var(--vectis-space-4);--banner-enter-y:calc(-1 * var(--vectis-space-4));flex-direction:column-reverse}.v-toast-stack[data-placement^=bottom-]{bottom:var(--vectis-space-4);--banner-enter-y:var(--vectis-space-4)}.v-toast-stack[data-placement$=-left]{left:var(--vectis-space-4)}.v-toast-stack[data-placement$=-right]{right:var(--vectis-space-4)}.v-toast-stack[data-placement$=-center]{margin-inline:auto;left:0;right:0}.v-toast-stack{opacity:1;transition:opacity var(--vectis-duration-base) var(--vectis-ease-default), overlay var(--vectis-duration-base) allow-discrete, display var(--vectis-duration-base) allow-discrete}.v-toast-stack:not(:popover-open){opacity:0}@starting-style{.v-toast-stack:popover-open{opacity:0}}@media (prefers-reduced-motion:reduce){.v-toast-stack{transition:none}}}
@@ -0,0 +1,42 @@
1
+ import { ToastPlacement } from './state.js';
2
+ /**
3
+ * Where notifications appear. It is mounted ONCE, at the root of the application, and
4
+ * from then on any call to `toast()` shows up here.
5
+ *
6
+ * It renders one container per corner of the screen rather than one floating box per
7
+ * notification, and each container simply stacks its notifications with CSS. The
8
+ * reason is that these boxes are drawn above the whole page, at fixed coordinates and
9
+ * anchored to nothing: individually they would all land on the same spot, and keeping
10
+ * them apart would mean measuring and offsetting each one in code. The six containers
11
+ * exist at all times — empty, they cost nothing and the browser does not display them.
12
+ *
13
+ * The JavaScript covers three things the platform does not: putting the queue and the
14
+ * containers in step, since drawing above the page can only be asked for by calling a
15
+ * method; the timers that dismiss a notification when its time is up; and pausing
16
+ * those timers while the pointer rests on a stack, so that something disappearing on a
17
+ * clock can be held in place long enough to read (WCAG 2.2.1).
18
+ */
19
+ interface ToasterProps {
20
+ /** Which corner notifications appear in, unless one of them asks for another. */
21
+ placement?: ToastPlacement;
22
+ /**
23
+ * How long a notification stays, in milliseconds, unless it asks for something else.
24
+ * A notification given 0 stays until it is dismissed.
25
+ */
26
+ duration?: number;
27
+ /** What the close cross does, in words. It falls back to the design system dictionary. */
28
+ closeLabel?: string;
29
+ /**
30
+ * What screen readers announce for the notification areas themselves, which are
31
+ * landmarks of the page. It falls back to the design system dictionary.
32
+ */
33
+ label?: string;
34
+ }
35
+ declare const __VLS_export: import('vue').DefineComponent<ToasterProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ToasterProps> & Readonly<{}>, {
36
+ label: string;
37
+ placement: ToastPlacement;
38
+ duration: number;
39
+ closeLabel: string;
40
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
41
+ declare const _default: typeof __VLS_export;
42
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import './VToaster.css';
2
+ import e from "./VToaster.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/VToast/VToaster.vue
5
+ var t = e;
6
+ //#endregion
7
+ export { t as default };
8
+
9
+ //# sourceMappingURL=VToaster.js.map