vectis-ui 0.1.0 → 0.8.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 (475) hide show
  1. package/README.md +40 -6
  2. package/dist/components/VAccordion/VAccordion.css +1 -1
  3. package/dist/components/VAccordion/VAccordion.d.ts +9 -16
  4. package/dist/components/VAccordion/VAccordion.js.map +1 -1
  5. package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js +3 -3
  6. package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
  7. package/dist/components/VAccordion/VAccordionItem.css +1 -1
  8. package/dist/components/VAccordion/VAccordionItem.d.ts +33 -19
  9. package/dist/components/VAccordion/VAccordionItem.js.map +1 -1
  10. package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js +50 -38
  11. package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  12. package/dist/components/VAccordion/context.d.ts +1 -8
  13. package/dist/components/VAccordion/context.js.map +1 -1
  14. package/dist/components/VAvatar/VAvatar.css +1 -1
  15. package/dist/components/VAvatar/VAvatar.d.ts +44 -29
  16. package/dist/components/VAvatar/VAvatar.js.map +1 -1
  17. package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js +38 -35
  18. package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  19. package/dist/components/VAvatar/VAvatarGroup.d.ts +5 -16
  20. package/dist/components/VAvatar/VAvatarGroup.js.map +1 -1
  21. package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js +7 -7
  22. package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  23. package/dist/components/VAvatar/context.d.ts +6 -10
  24. package/dist/components/VAvatar/context.js.map +1 -1
  25. package/dist/components/VBadge/VBadge.css +1 -1
  26. package/dist/components/VBadge/VBadge.d.ts +31 -10
  27. package/dist/components/VBadge/VBadge.js.map +1 -1
  28. package/dist/components/VBadge/VBadge.vue_vue_type_script_setup_true_lang.js +39 -24
  29. package/dist/components/VBadge/VBadge.vue_vue_type_script_setup_true_lang.js.map +1 -1
  30. package/dist/components/VBreadcrumb/VBreadcrumb.css +1 -1
  31. package/dist/components/VBreadcrumb/VBreadcrumb.d.ts +4 -17
  32. package/dist/components/VBreadcrumb/VBreadcrumb.js.map +1 -1
  33. package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js +23 -25
  34. package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js.map +1 -1
  35. package/dist/components/VButton/VButton.css +1 -1
  36. package/dist/components/VButton/VButton.d.ts +30 -10
  37. package/dist/components/VButton/VButton.js.map +1 -1
  38. package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js +39 -30
  39. package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  40. package/dist/components/VButton/VButtonGroup.css +1 -1
  41. package/dist/components/VButton/VButtonGroup.d.ts +76 -13
  42. package/dist/components/VButton/VButtonGroup.js.map +1 -1
  43. package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js +74 -8
  44. package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  45. package/dist/components/VButton/context.d.ts +30 -0
  46. package/dist/components/VButton/context.js +6 -0
  47. package/dist/components/VButton/context.js.map +1 -0
  48. package/dist/components/VCalendar/VCalendar.css +1 -1
  49. package/dist/components/VCalendar/VCalendar.d.ts +50 -36
  50. package/dist/components/VCalendar/VCalendar.js.map +1 -1
  51. package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js +99 -85
  52. package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  53. package/dist/components/VCalendar/VCalendarEvent.css +1 -1
  54. package/dist/components/VCalendar/VCalendarEvent.d.ts +5 -11
  55. package/dist/components/VCalendar/VCalendarEvent.js.map +1 -1
  56. package/dist/components/VCalendar/VCalendarEvent.vue_vue_type_script_setup_true_lang.js +7 -1
  57. package/dist/components/VCalendar/VCalendarEvent.vue_vue_type_script_setup_true_lang.js.map +1 -1
  58. package/dist/components/VCalendar/VCalendarMonth.css +1 -1
  59. package/dist/components/VCalendar/VCalendarMonth.d.ts +10 -13
  60. package/dist/components/VCalendar/VCalendarMonth.js.map +1 -1
  61. package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js +183 -244
  62. package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js.map +1 -1
  63. package/dist/components/VCalendar/VCalendarTimeGrid.css +1 -1
  64. package/dist/components/VCalendar/VCalendarTimeGrid.d.ts +15 -20
  65. package/dist/components/VCalendar/VCalendarTimeGrid.js.map +1 -1
  66. package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js +385 -448
  67. package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js.map +1 -1
  68. package/dist/components/VCalendar/VCalendarYear.css +1 -1
  69. package/dist/components/VCalendar/VCalendarYear.js.map +1 -1
  70. package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js +53 -49
  71. package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js.map +1 -1
  72. package/dist/components/VCalendar/gesture.d.ts +158 -0
  73. package/dist/components/VCalendar/gesture.js +170 -0
  74. package/dist/components/VCalendar/gesture.js.map +1 -0
  75. package/dist/components/VCalendar/keyboard.d.ts +9 -3
  76. package/dist/components/VCalendar/keyboard.js +2 -6
  77. package/dist/components/VCalendar/keyboard.js.map +1 -1
  78. package/dist/components/VCalendar/layout.d.ts +67 -54
  79. package/dist/components/VCalendar/layout.js +77 -69
  80. package/dist/components/VCalendar/layout.js.map +1 -1
  81. package/dist/components/VCalendar/timeGrid.d.ts +55 -0
  82. package/dist/components/VCalendar/timeGrid.js +71 -0
  83. package/dist/components/VCalendar/timeGrid.js.map +1 -0
  84. package/dist/components/VCalendar/types.d.ts +41 -16
  85. package/dist/components/VCarousel/VCarousel.css +1 -1
  86. package/dist/components/VCarousel/VCarousel.d.ts +21 -41
  87. package/dist/components/VCarousel/VCarousel.js.map +1 -1
  88. package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js +157 -129
  89. package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  90. package/dist/components/VCarousel/VCarouselItem.d.ts +0 -17
  91. package/dist/components/VCarousel/VCarouselItem.js.map +1 -1
  92. package/dist/components/VCarousel/VCarouselItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  93. package/dist/components/VCarousel/context.d.ts +0 -12
  94. package/dist/components/VCarousel/context.js.map +1 -1
  95. package/dist/components/VCheckbox/VCheckbox.css +1 -1
  96. package/dist/components/VCheckbox/VCheckbox.d.ts +31 -16
  97. package/dist/components/VCheckbox/VCheckbox.js.map +1 -1
  98. package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js +62 -29
  99. package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  100. package/dist/components/VChip/VChip.css +1 -1
  101. package/dist/components/VChip/VChip.d.ts +36 -26
  102. package/dist/components/VChip/VChip.js.map +1 -1
  103. package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js +57 -48
  104. package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  105. package/dist/components/VCombobox/VCombobox.css +1 -1
  106. package/dist/components/VCombobox/VCombobox.d.ts +127 -31
  107. package/dist/components/VCombobox/VCombobox.js.map +1 -1
  108. package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js +336 -247
  109. package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  110. package/dist/components/VCombobox/VComboboxGroup.css +1 -1
  111. package/dist/components/VCombobox/VComboboxGroup.d.ts +0 -9
  112. package/dist/components/VCombobox/VComboboxGroup.js.map +1 -1
  113. package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js +1 -1
  114. package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  115. package/dist/components/VCombobox/VComboboxOption.css +1 -1
  116. package/dist/components/VCombobox/VComboboxOption.d.ts +0 -15
  117. package/dist/components/VCombobox/VComboboxOption.js.map +1 -1
  118. package/dist/components/VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js +4 -4
  119. package/dist/components/VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js.map +1 -1
  120. package/dist/components/VCombobox/VComboboxSeparator.js.map +1 -1
  121. package/dist/components/VCombobox/VComboboxSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
  122. package/dist/components/VCombobox/infiniteScroll.js.map +1 -1
  123. package/dist/components/VDataTable/VDataTable.css +1 -1
  124. package/dist/components/VDataTable/VDataTable.d.ts +50 -28
  125. package/dist/components/VDataTable/VDataTable.js.map +1 -1
  126. package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js +183 -194
  127. package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  128. package/dist/components/VDateInput/VDateInput.css +1 -1
  129. package/dist/components/VDateInput/VDateInput.d.ts +90 -42
  130. package/dist/components/VDateInput/VDateInput.js.map +1 -1
  131. package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js +159 -191
  132. package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  133. package/dist/components/VDatePicker/VDatePicker.css +1 -1
  134. package/dist/components/VDatePicker/VDatePicker.d.ts +61 -30
  135. package/dist/components/VDatePicker/VDatePicker.js.map +1 -1
  136. package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js +243 -221
  137. package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  138. package/dist/components/VDialog/VDialog.css +1 -1
  139. package/dist/components/VDialog/VDialog.d.ts +45 -33
  140. package/dist/components/VDialog/VDialog.js.map +1 -1
  141. package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js +65 -64
  142. package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  143. package/dist/components/VDialog/VDialogAlert.d.ts +24 -20
  144. package/dist/components/VDialog/VDialogAlert.js.map +1 -1
  145. package/dist/components/VDialog/VDialogAlert.vue_vue_type_script_setup_true_lang.js +36 -25
  146. package/dist/components/VDialog/VDialogAlert.vue_vue_type_script_setup_true_lang.js.map +1 -1
  147. package/dist/components/VFileInput/VFileInput.css +1 -1
  148. package/dist/components/VFileInput/VFileInput.d.ts +78 -26
  149. package/dist/components/VFileInput/VFileInput.js.map +1 -1
  150. package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js +144 -132
  151. package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  152. package/dist/components/VFilePicker/VFilePicker.css +1 -1
  153. package/dist/components/VFilePicker/VFilePicker.d.ts +47 -30
  154. package/dist/components/VFilePicker/VFilePicker.js.map +1 -1
  155. package/dist/components/VFilePicker/VFilePicker.vue_vue_type_script_setup_true_lang.js +166 -163
  156. package/dist/components/VFilePicker/VFilePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  157. package/dist/components/VFilePicker/fileKind.d.ts +2 -27
  158. package/dist/components/VFilePicker/fileKind.js +9 -8
  159. package/dist/components/VFilePicker/fileKind.js.map +1 -1
  160. package/dist/components/VHotkeys/VHotkeys.css +1 -1
  161. package/dist/components/VHotkeys/VHotkeys.d.ts +8 -30
  162. package/dist/components/VHotkeys/VHotkeys.js.map +1 -1
  163. package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js +4 -4
  164. package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js.map +1 -1
  165. package/dist/components/VHotkeys/platform.js.map +1 -1
  166. package/dist/components/VIcon/VIcon.css +1 -1
  167. package/dist/components/VIcon/VIcon.d.ts +15 -6
  168. package/dist/components/VIcon/VIcon.js.map +1 -1
  169. package/dist/components/VIcon/VIcon.vue_vue_type_script_setup_true_lang.js +45 -37
  170. package/dist/components/VIcon/VIcon.vue_vue_type_script_setup_true_lang.js.map +1 -1
  171. package/dist/components/VIcon/iconProps.js.map +1 -1
  172. package/dist/components/VIcon/icons/index.d.ts +1 -1
  173. package/dist/components/VIcon/icons/index.js.map +1 -1
  174. package/dist/components/VIcon/icons/names.d.ts +1 -1
  175. package/dist/components/VIcon/icons/names.js.map +1 -1
  176. package/dist/components/VIcon/resolver.d.ts +3 -3
  177. package/dist/components/VIcon/resolver.js.map +1 -1
  178. package/dist/components/VIcon/types.d.ts +12 -12
  179. package/dist/components/VIconButton/VIconButton.css +1 -1
  180. package/dist/components/VIconButton/VIconButton.d.ts +28 -11
  181. package/dist/components/VIconButton/VIconButton.js.map +1 -1
  182. package/dist/components/VIconButton/VIconButton.vue_vue_type_script_setup_true_lang.js +26 -20
  183. package/dist/components/VIconButton/VIconButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  184. package/dist/components/VInput/VInput.css +1 -1
  185. package/dist/components/VInput/VInput.d.ts +26 -7
  186. package/dist/components/VInput/VInput.js.map +1 -1
  187. package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js +86 -75
  188. package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  189. package/dist/components/VInput/VInputGroup.css +2 -0
  190. package/dist/components/VInput/VInputGroup.d.ts +47 -0
  191. package/dist/components/VInput/VInputGroup.js +9 -0
  192. package/dist/components/VInput/VInputGroup.js.map +1 -0
  193. package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js +80 -0
  194. package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
  195. package/dist/components/VInput/context.d.ts +11 -0
  196. package/dist/components/VInput/context.js +6 -0
  197. package/dist/components/VInput/context.js.map +1 -0
  198. package/dist/components/VInputOTP/VInputOTP.css +1 -1
  199. package/dist/components/VInputOTP/VInputOTP.d.ts +37 -22
  200. package/dist/components/VInputOTP/VInputOTP.js.map +1 -1
  201. package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js +98 -61
  202. package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js.map +1 -1
  203. package/dist/components/VMenu/VMenu.d.ts +23 -30
  204. package/dist/components/VMenu/VMenu.js.map +1 -1
  205. package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js +31 -27
  206. package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  207. package/dist/components/VMenu/VMenuGroup.css +1 -1
  208. package/dist/components/VMenu/VMenuGroup.d.ts +12 -8
  209. package/dist/components/VMenu/VMenuGroup.js.map +1 -1
  210. package/dist/components/VMenu/VMenuGroup.vue_vue_type_script_setup_true_lang.js +11 -11
  211. package/dist/components/VMenu/VMenuGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  212. package/dist/components/VMenu/VMenuItem.css +1 -1
  213. package/dist/components/VMenu/VMenuItem.d.ts +11 -19
  214. package/dist/components/VMenu/VMenuItem.js.map +1 -1
  215. package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js +65 -57
  216. package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  217. package/dist/components/VMenu/VMenuPanel.d.ts +14 -30
  218. package/dist/components/VMenu/VMenuPanel.js.map +1 -1
  219. package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js +43 -44
  220. package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  221. package/dist/components/VMenu/context.d.ts +2 -6
  222. package/dist/components/VMenu/context.js.map +1 -1
  223. package/dist/components/VPagination/VPagination.css +1 -1
  224. package/dist/components/VPagination/VPagination.d.ts +60 -22
  225. package/dist/components/VPagination/VPagination.js.map +1 -1
  226. package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js +113 -161
  227. package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
  228. package/dist/components/VPopover/VPopover.css +1 -1
  229. package/dist/components/VPopover/VPopover.d.ts +26 -7
  230. package/dist/components/VPopover/VPopover.js.map +1 -1
  231. package/dist/components/VPopover/VPopover.vue_vue_type_script_setup_true_lang.js +43 -37
  232. package/dist/components/VPopover/VPopover.vue_vue_type_script_setup_true_lang.js.map +1 -1
  233. package/dist/components/VProgressCircular/VProgressCircular.css +1 -1
  234. package/dist/components/VProgressCircular/VProgressCircular.d.ts +15 -4
  235. package/dist/components/VProgressCircular/VProgressCircular.js.map +1 -1
  236. package/dist/components/VProgressCircular/VProgressCircular.vue_vue_type_script_setup_true_lang.js +32 -30
  237. package/dist/components/VProgressCircular/VProgressCircular.vue_vue_type_script_setup_true_lang.js.map +1 -1
  238. package/dist/components/VProgressLinear/VProgressLinear.css +1 -1
  239. package/dist/components/VProgressLinear/VProgressLinear.d.ts +23 -8
  240. package/dist/components/VProgressLinear/VProgressLinear.js.map +1 -1
  241. package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js +34 -32
  242. package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js.map +1 -1
  243. package/dist/components/VRadio/VRadio.css +1 -1
  244. package/dist/components/VRadio/VRadio.d.ts +36 -18
  245. package/dist/components/VRadio/VRadio.js.map +1 -1
  246. package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js +55 -26
  247. package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js.map +1 -1
  248. package/dist/components/VSeparator/VSeparator.d.ts +4 -2
  249. package/dist/components/VSeparator/VSeparator.js.map +1 -1
  250. package/dist/components/VSeparator/VSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
  251. package/dist/components/VSideNavigation/VSideNavigation.css +1 -1
  252. package/dist/components/VSideNavigation/VSideNavigation.d.ts +5 -19
  253. package/dist/components/VSideNavigation/VSideNavigation.js.map +1 -1
  254. package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js +5 -5
  255. package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js.map +1 -1
  256. package/dist/components/VSideNavigation/VSideNavigationGroup.css +1 -1
  257. package/dist/components/VSideNavigation/VSideNavigationGroup.d.ts +9 -17
  258. package/dist/components/VSideNavigation/VSideNavigationGroup.js.map +1 -1
  259. package/dist/components/VSideNavigation/VSideNavigationGroup.vue_vue_type_script_setup_true_lang.js +2 -2
  260. package/dist/components/VSideNavigation/VSideNavigationGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  261. package/dist/components/VSideNavigation/VSideNavigationItem.css +1 -1
  262. package/dist/components/VSideNavigation/VSideNavigationItem.d.ts +22 -30
  263. package/dist/components/VSideNavigation/VSideNavigationItem.js.map +1 -1
  264. package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js +77 -87
  265. package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  266. package/dist/components/VSideNavigation/context.d.ts +0 -14
  267. package/dist/components/VSideNavigation/context.js.map +1 -1
  268. package/dist/components/VSkeletonLoader/VSkeletonLoader.css +1 -1
  269. package/dist/components/VSkeletonLoader/VSkeletonLoader.d.ts +9 -9
  270. package/dist/components/VSkeletonLoader/VSkeletonLoader.js.map +1 -1
  271. package/dist/components/VSkeletonLoader/VSkeletonLoader.vue_vue_type_script_setup_true_lang.js.map +1 -1
  272. package/dist/components/VSlider/VSlider.css +1 -1
  273. package/dist/components/VSlider/VSlider.d.ts +52 -27
  274. package/dist/components/VSlider/VSlider.js.map +1 -1
  275. package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js +202 -118
  276. package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js.map +1 -1
  277. package/dist/components/VSnackbar/VSnackbar.css +1 -1
  278. package/dist/components/VSnackbar/VSnackbar.d.ts +0 -23
  279. package/dist/components/VSnackbar/VSnackbar.js.map +1 -1
  280. package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js +38 -38
  281. package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  282. package/dist/components/VSnackbar/state.d.ts +0 -27
  283. package/dist/components/VSnackbar/state.js.map +1 -1
  284. package/dist/components/VSpinner/VSpinner.css +1 -1
  285. package/dist/components/VSpinner/VSpinner.d.ts +6 -6
  286. package/dist/components/VSpinner/VSpinner.js.map +1 -1
  287. package/dist/components/VSpinner/VSpinner.vue_vue_type_script_setup_true_lang.js +10 -9
  288. package/dist/components/VSpinner/VSpinner.vue_vue_type_script_setup_true_lang.js.map +1 -1
  289. package/dist/components/VSwitch/VSwitch.css +1 -1
  290. package/dist/components/VSwitch/VSwitch.d.ts +35 -13
  291. package/dist/components/VSwitch/VSwitch.js.map +1 -1
  292. package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js +62 -21
  293. package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js.map +1 -1
  294. package/dist/components/VTabs/VTab.css +1 -1
  295. package/dist/components/VTabs/VTab.d.ts +12 -12
  296. package/dist/components/VTabs/VTab.js.map +1 -1
  297. package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js +36 -24
  298. package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js.map +1 -1
  299. package/dist/components/VTabs/VTabPanel.d.ts +2 -10
  300. package/dist/components/VTabs/VTabPanel.js.map +1 -1
  301. package/dist/components/VTabs/VTabPanel.vue_vue_type_script_setup_true_lang.js +4 -4
  302. package/dist/components/VTabs/VTabPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  303. package/dist/components/VTabs/VTabs.css +1 -1
  304. package/dist/components/VTabs/VTabs.d.ts +27 -18
  305. package/dist/components/VTabs/VTabs.js.map +1 -1
  306. package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js +92 -81
  307. package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
  308. package/dist/components/VTabs/context.d.ts +9 -19
  309. package/dist/components/VTabs/context.js +1 -1
  310. package/dist/components/VTabs/context.js.map +1 -1
  311. package/dist/components/VTextarea/VTextarea.css +1 -1
  312. package/dist/components/VTextarea/VTextarea.d.ts +34 -6
  313. package/dist/components/VTextarea/VTextarea.js.map +1 -1
  314. package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js +91 -74
  315. package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js.map +1 -1
  316. package/dist/components/VTimeInput/VTimeInput.css +1 -1
  317. package/dist/components/VTimeInput/VTimeInput.d.ts +123 -33
  318. package/dist/components/VTimeInput/VTimeInput.js.map +1 -1
  319. package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js +294 -291
  320. package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  321. package/dist/components/VTimeInput/search.d.ts +24 -0
  322. package/dist/components/VTimeInput/search.js +22 -0
  323. package/dist/components/VTimeInput/search.js.map +1 -0
  324. package/dist/components/VTimePicker/VTimePicker.css +1 -1
  325. package/dist/components/VTimePicker/VTimePicker.d.ts +51 -30
  326. package/dist/components/VTimePicker/VTimePicker.js.map +1 -1
  327. package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js +216 -151
  328. package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  329. package/dist/components/VTimePicker/limits.d.ts +88 -0
  330. package/dist/components/VTimePicker/limits.js +70 -0
  331. package/dist/components/VTimePicker/limits.js.map +1 -0
  332. package/dist/components/VToast/VToast.css +1 -1
  333. package/dist/components/VToast/VToast.d.ts +0 -10
  334. package/dist/components/VToast/VToast.js.map +1 -1
  335. package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js +10 -10
  336. package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js.map +1 -1
  337. package/dist/components/VToast/VToaster.css +1 -1
  338. package/dist/components/VToast/VToaster.d.ts +0 -17
  339. package/dist/components/VToast/VToaster.js.map +1 -1
  340. package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js +29 -28
  341. package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js.map +1 -1
  342. package/dist/components/VToast/state.d.ts +10 -19
  343. package/dist/components/VToast/state.js +1 -1
  344. package/dist/components/VToast/state.js.map +1 -1
  345. package/dist/components/VToggle/VToggle.css +1 -1
  346. package/dist/components/VToggle/VToggle.d.ts +56 -11
  347. package/dist/components/VToggle/VToggle.js.map +1 -1
  348. package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js +80 -46
  349. package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js.map +1 -1
  350. package/dist/components/VToggle/VToggleItem.d.ts +16 -2
  351. package/dist/components/VToggle/VToggleItem.js +0 -2
  352. package/dist/components/VToggle/VToggleItem.js.map +1 -1
  353. package/dist/components/VToggle/VToggleItem.vue_vue_type_script_setup_true_lang.js +23 -15
  354. package/dist/components/VToggle/VToggleItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  355. package/dist/components/VToggle/context.d.ts +4 -24
  356. package/dist/components/VToggle/context.js.map +1 -1
  357. package/dist/components/VTooltip/VTooltip.css +1 -1
  358. package/dist/components/VTooltip/VTooltip.d.ts +9 -33
  359. package/dist/components/VTooltip/VTooltip.js.map +1 -1
  360. package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js +28 -24
  361. package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  362. package/dist/components/VTypography/VTypography.js.map +1 -1
  363. package/dist/components/VTypography/VTypography.vue_vue_type_script_setup_true_lang.js.map +1 -1
  364. package/dist/composables/useAriaLabel.d.ts +0 -17
  365. package/dist/composables/useAriaLabel.js.map +1 -1
  366. package/dist/composables/useClearable.d.ts +42 -0
  367. package/dist/composables/useClearable.js +19 -0
  368. package/dist/composables/useClearable.js.map +1 -0
  369. package/dist/composables/useControlShape.d.ts +22 -0
  370. package/dist/composables/useControlShape.js +13 -0
  371. package/dist/composables/useControlShape.js.map +1 -0
  372. package/dist/composables/useDetailsOpen.d.ts +22 -0
  373. package/dist/composables/useDetailsOpen.js +21 -0
  374. package/dist/composables/useDetailsOpen.js.map +1 -0
  375. package/dist/composables/useFieldIds.d.ts +0 -15
  376. package/dist/composables/useFieldIds.js +8 -7
  377. package/dist/composables/useFieldIds.js.map +1 -1
  378. package/dist/composables/useFieldPanel.d.ts +21 -18
  379. package/dist/composables/useFieldPanel.js +43 -23
  380. package/dist/composables/useFieldPanel.js.map +1 -1
  381. package/dist/composables/useFileDrop.d.ts +0 -22
  382. package/dist/composables/useFileDrop.js.map +1 -1
  383. package/dist/composables/useFileField.d.ts +45 -17
  384. package/dist/composables/useFileField.js +40 -20
  385. package/dist/composables/useFileField.js.map +1 -1
  386. package/dist/composables/useFocusoutDismiss.d.ts +0 -15
  387. package/dist/composables/useFocusoutDismiss.js.map +1 -1
  388. package/dist/composables/useIconClickHandlers.d.ts +29 -14
  389. package/dist/composables/useIconClickHandlers.js +15 -5
  390. package/dist/composables/useIconClickHandlers.js.map +1 -1
  391. package/dist/composables/useInertLink.d.ts +20 -0
  392. package/dist/composables/useInertLink.js +23 -0
  393. package/dist/composables/useInertLink.js.map +1 -0
  394. package/dist/composables/useMaskedField.d.ts +33 -10
  395. package/dist/composables/useMaskedField.js +45 -1
  396. package/dist/composables/useMaskedField.js.map +1 -1
  397. package/dist/composables/usePopover.d.ts +15 -1
  398. package/dist/composables/usePopover.js +23 -8
  399. package/dist/composables/usePopover.js.map +1 -1
  400. package/dist/composables/useProgressValue.d.ts +5 -8
  401. package/dist/composables/useProgressValue.js +6 -3
  402. package/dist/composables/useProgressValue.js.map +1 -1
  403. package/dist/composables/useRootAttrs.d.ts +12 -19
  404. package/dist/composables/useRootAttrs.js.map +1 -1
  405. package/dist/composables/useTimer.d.ts +8 -10
  406. package/dist/composables/useTimer.js.map +1 -1
  407. package/dist/i18n/en.d.ts +2 -10
  408. package/dist/i18n/en.js +18 -19
  409. package/dist/i18n/en.js.map +1 -1
  410. package/dist/i18n/fr.d.ts +2 -18
  411. package/dist/i18n/fr.js +18 -19
  412. package/dist/i18n/fr.js.map +1 -1
  413. package/dist/i18n/state.d.ts +44 -47
  414. package/dist/i18n/state.js +20 -17
  415. package/dist/i18n/state.js.map +1 -1
  416. package/dist/i18n/types.d.ts +53 -44
  417. package/dist/icons.d.ts +3 -3
  418. package/dist/index.d.ts +43 -17
  419. package/dist/index.js +45 -44
  420. package/dist/styles.css +1 -1
  421. package/dist/tokens/css.js.map +1 -1
  422. package/dist/tokens/index.d.ts +5 -1
  423. package/dist/tokens/primitives.js.map +1 -1
  424. package/dist/tokens/semantic.d.ts +5 -1
  425. package/dist/tokens/semantic.js +6 -2
  426. package/dist/tokens/semantic.js.map +1 -1
  427. package/dist/tokens/themes/dark.js.map +1 -1
  428. package/dist/tokens/types.d.ts +7 -15
  429. package/dist/tokens/types.js.map +1 -1
  430. package/dist/tokens.json +25 -5
  431. package/dist/types.d.ts +24 -0
  432. package/dist/utils/array.d.ts +3 -6
  433. package/dist/utils/array.js.map +1 -1
  434. package/dist/utils/arrowNav.d.ts +17 -17
  435. package/dist/utils/arrowNav.js +5 -3
  436. package/dist/utils/arrowNav.js.map +1 -1
  437. package/dist/utils/chip.d.ts +11 -15
  438. package/dist/utils/chip.js.map +1 -1
  439. package/dist/utils/css.d.ts +22 -11
  440. package/dist/utils/css.js +5 -2
  441. package/dist/utils/css.js.map +1 -1
  442. package/dist/utils/date.d.ts +42 -19
  443. package/dist/utils/date.js +97 -98
  444. package/dist/utils/date.js.map +1 -1
  445. package/dist/utils/direction.d.ts +6 -12
  446. package/dist/utils/direction.js.map +1 -1
  447. package/dist/utils/env.d.ts +5 -6
  448. package/dist/utils/file.d.ts +46 -58
  449. package/dist/utils/file.js +43 -36
  450. package/dist/utils/file.js.map +1 -1
  451. package/dist/utils/focus.d.ts +8 -17
  452. package/dist/utils/focus.js.map +1 -1
  453. package/dist/utils/hostWarns.d.ts +12 -0
  454. package/dist/utils/hostWarns.js +6 -0
  455. package/dist/utils/hostWarns.js.map +1 -0
  456. package/dist/utils/ids.d.ts +10 -0
  457. package/dist/utils/ids.js +8 -0
  458. package/dist/utils/ids.js.map +1 -0
  459. package/dist/utils/matcher.d.ts +5 -9
  460. package/dist/utils/matcher.js.map +1 -1
  461. package/dist/utils/memo.d.ts +12 -0
  462. package/dist/utils/memo.js +9 -0
  463. package/dist/utils/memo.js.map +1 -0
  464. package/dist/utils/number.d.ts +3 -4
  465. package/dist/utils/number.js.map +1 -1
  466. package/dist/utils/text.d.ts +20 -9
  467. package/dist/utils/text.js +17 -3
  468. package/dist/utils/text.js.map +1 -1
  469. package/dist/utils/time.d.ts +53 -61
  470. package/dist/utils/time.js +49 -45
  471. package/dist/utils/time.js.map +1 -1
  472. package/dist/utils/vnode.d.ts +8 -15
  473. package/dist/utils/vnode.js.map +1 -1
  474. package/package.json +6 -6
  475. package/dist/components/VToggle/VToggleItem.css +0 -2
@@ -1,50 +1,54 @@
1
1
  import e from "../VPopover/VPopover.js";
2
2
  import { useTimer as t } from "../../composables/useTimer.js";
3
- import { createElementBlock as n, createTextVNode as r, createVNode as i, defineComponent as a, openBlock as o, ref as s, renderSlot as c, toDisplayString as l, unref as u, useId as d, withCtx as f } from "vue";
3
+ import { isKeyboardFocus as n } from "../../utils/focus.js";
4
+ import { createElementBlock as r, createTextVNode as i, createVNode as a, defineComponent as o, openBlock as s, ref as c, renderSlot as l, toDisplayString as u, unref as d, useId as f, withCtx as p } from "vue";
4
5
  //#region src/components/VTooltip/VTooltip.vue?vue&type=script&setup=true&lang.ts
5
- var p = /*@__PURE__*/ a({
6
+ var m = /*@__PURE__*/ o({
6
7
  __name: "VTooltip",
7
8
  props: {
8
9
  text: { default: void 0 },
9
10
  placement: { default: "top" },
10
11
  delay: { default: 300 }
11
12
  },
12
- setup(a) {
13
- let p = a, m = d(), h = s(null), g = t();
14
- function _(e = !1) {
15
- g.start(() => h.value?.show(), e ? 0 : p.delay);
13
+ setup(o) {
14
+ let m = o, h = f(), g = c(null), _ = t();
15
+ function v(e = !1) {
16
+ _.start(() => g.value?.show(), e ? 0 : m.delay);
16
17
  }
17
- function v() {
18
- g.cancel(), h.value?.hide();
18
+ function y() {
19
+ _.cancel(), g.value?.close();
19
20
  }
20
- function y(e) {
21
- e.key === "Escape" && v();
21
+ function b(e) {
22
+ n(e.target) && v(!0);
22
23
  }
23
- return (t, s) => (o(), n("span", {
24
+ function x(e) {
25
+ e.key === "Escape" && y();
26
+ }
27
+ return (t, n) => (s(), r("span", {
24
28
  class: "v-tooltip",
25
- onPointerenter: s[0] ||= (e) => _(),
26
- onPointerleave: v,
27
- onPointerdown: v,
28
- onFocusin: s[1] ||= (e) => _(!0),
29
- onFocusout: v,
30
- onKeydown: y
31
- }, [c(t.$slots, "default", { triggerProps: { "aria-describedby": u(m) } }), i(e, {
32
- id: u(m),
29
+ onPointerenter: n[0] ||= (e) => v(),
30
+ onPointerleave: y,
31
+ onPointerdown: y,
32
+ onFocusin: b,
33
+ onFocusout: y,
34
+ onKeydown: x
35
+ }, [l(t.$slots, "default", { triggerProps: { "aria-describedby": d(h) } }), a(e, {
36
+ id: d(h),
33
37
  ref_key: "popoverRef",
34
- ref: h,
38
+ ref: g,
35
39
  mode: "manual",
36
40
  anchor: "--tooltip-anchor",
37
- placement: a.placement,
38
- surface: !1,
41
+ placement: o.placement,
42
+ bare: "",
39
43
  role: "tooltip",
40
44
  class: "v-tooltip-panel"
41
45
  }, {
42
- default: f(() => [c(t.$slots, "content", {}, () => [r(l(a.text), 1)])]),
46
+ default: p(() => [l(t.$slots, "content", {}, () => [i(u(o.text), 1)])]),
43
47
  _: 3
44
48
  }, 8, ["id", "placement"])], 32));
45
49
  }
46
50
  });
47
51
  //#endregion
48
- export { p as default };
52
+ export { m as default };
49
53
 
50
54
  //# sourceMappingURL=VTooltip.vue_vue_type_script_setup_true_lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VTooltip.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VTooltip/VTooltip.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ref, useId } from 'vue'\n\nimport VPopover from '../VPopover/VPopover.vue'\n\nimport { useTimer } from '../../composables/useTimer'\n\n/**\n * A short explanation appearing beside an element when the pointer rests on it or\n * when it takes keyboard focus. It is built on VPopover, in the mode where nothing\n * closes by itself, since a tooltip has its own rules about when to appear and when\n * to go.\n *\n * Those rules are why there is JavaScript here at all: HTML has no stable way to say\n * \"show this after a short delay on hover or focus\" — the proposal for it is still\n * experimental — so the component handles the delay, the pointer, the focus, the press\n * on the trigger, and Escape, which must dismiss a tooltip without moving the focus\n * (WCAG 1.4.13).\n *\n * There are four ways out and each covers a case the others do not: the pointer leaves,\n * the focus leaves, Escape is pressed, or the trigger is PRESSED — that last one for a\n * trigger which opens a panel, where the tooltip would otherwise stand over what it just\n * opened. The template says which browser makes it necessary.\n *\n * The positioning is pure CSS and needs no generated identifier: the wrapper names\n * itself as the anchor and confines that name to its own subtree. The confinement is\n * essential — a visible panel sits in the top layer, which anchor resolution treats\n * as coming after the whole document, so without it every tooltip on the page would\n * attach to the last wrapper carrying the name.\n *\n * The wrapper stays here rather than being delegated to VPopover's trigger slot,\n * because a tooltip trigger is not a button that opens a panel — it would then toggle\n * on click — but an element the panel DESCRIBES.\n */\ntype Placement =\n 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'right'\n\ninterface TooltipProps {\n /** What the tooltip says. The `#content` slot replaces it when both are given. */\n text?: string\n /**\n * Which side of the element the tooltip appears on. The browser flips it to the\n * opposite side by itself when there is not enough room.\n */\n placement?: Placement\n /**\n * How long the pointer must rest on the element before the tooltip appears, in\n * milliseconds. Keyboard focus opens it at once — the intent is not in doubt there\n * — and a delay of 0 disables the wait entirely.\n */\n delay?: number\n}\n\nconst props = withDefaults(defineProps<TooltipProps>(), {\n text: undefined,\n placement: 'top',\n delay: 300,\n})\n\ndefineSlots<{\n /**\n * The element the tooltip describes. Bind the `triggerProps` it receives onto it —\n * that is what ties the two together for assistive technology — and make sure it is\n * something that can take focus, or keyboard users will never see the tooltip.\n */\n default(props: { triggerProps: { 'aria-describedby': string } }): unknown\n /**\n * Content richer than a plain string: formatting, a keyboard shortcut, an icon. It\n * must stay NON-interactive. The tooltip closes as soon as the pointer leaves the\n * element, so a link or a button inside could never be reached, and the description\n * is flattened to plain text for screen readers anyway. Content one can interact\n * with belongs in a panel that stays open, such as VMenu.\n */\n content?(): unknown\n}>()\n\nconst tooltipId = useId()\n// @a11y\n/*\n * The panel is opened and closed by calling it directly rather than through\n * `v-model:open`. Keyboard focus has to open it SYNCHRONOUSLY, and a model would go\n * through VPopover's watcher, hence through a tick. There is nothing lost either way:\n * a tooltip publishes no open state anyone needs to read.\n *\n * Calling twice is harmless — the guards for that live upstream in usePopover.\n */\nconst popoverRef = ref<InstanceType<typeof VPopover> | null>(null)\n\n// The delay before appearing. useTimer is what makes it re-armable and cancels it\n// when the component goes away.\nconst timer = useTimer()\n\n// @core\nfunction show(immediate = false) {\n // A delay of 0 runs the callback synchronously — the design system's convention,\n // and what lets keyboard focus share this code path without waiting a tick.\n timer.start(() => popoverRef.value?.show(), immediate ? 0 : props.delay)\n}\n\nfunction hide() {\n timer.cancel()\n popoverRef.value?.hide()\n}\n\n// @keyboard @a11y — Escape must dismiss a tooltip opened by hover or focus without\n// moving the focus anywhere (WCAG 1.4.13): content appearing on hover has to be\n// dismissible, for a magnifier user whose view it may be covering.\nfunction onKeydown(event: KeyboardEvent) {\n if (event.key === 'Escape') hide()\n}\n</script>\n\n<template>\n <!--\n TRAP — `pointerdown` is what stops a tooltip from surviving the click that acted on its\n trigger, and the case it really covers is a trigger that OPENS something: a menu, a\n dialog, a popover of any kind. The tooltip would then stand over what it opened, and\n none of the other three exits applies — the pointer has not left, the focus has not\n moved out on its own, and nobody pressed Escape.\n\n It looks redundant on Chromium and Firefox, where a click focuses the button and the\n panel then takes the focus, which fires this wrapper's `focusout`. Safari on macOS does\n NOT focus a button on click, so nothing leaves the wrapper and the tooltip stays up,\n behind the panel, until the pointer moves. Delete this line and that is the bug that\n comes back, on one browser only.\n\n It is `pointerdown` and not `click`, so the tooltip is gone BEFORE the panel appears\n rather than overlapping it for a frame. Keyboard activation sends no `pointerdown` at\n all, and needs none: focus moving into the panel closes the tooltip everywhere.\n -->\n <span\n class=\"v-tooltip\"\n @pointerenter=\"show()\"\n @pointerleave=\"hide\"\n @pointerdown=\"hide\"\n @focusin=\"show(true)\"\n @focusout=\"hide\"\n @keydown=\"onKeydown\"\n >\n <slot :trigger-props=\"{ 'aria-describedby': tooltipId }\" />\n <VPopover\n :id=\"tooltipId\"\n ref=\"popoverRef\"\n mode=\"manual\"\n anchor=\"--tooltip-anchor\"\n :placement=\"placement\"\n :surface=\"false\"\n role=\"tooltip\"\n class=\"v-tooltip-panel\"\n >\n <slot name=\"content\">{{ text }}</slot>\n </VPopover>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /* The wrapper is FLEX and not inline-block, for the same reason as `.v-badge-host`:\n both are inline-level atomic boxes, so the surrounding text flows identically, but\n an inline-block establishes an inline formatting context for the trigger — which\n then sits on a line box and adds the strut's descender to the wrapper's height.\n That is not only a couple of pixels in a flex row: this wrapper is also the ANCHOR,\n so the panel is offset by them too.\n\n `align-items: center` covers what is left. A wrapper stretched by a parent in\n `align-items: stretch` would otherwise stretch the trigger with it, where the\n inline-block form left it at its natural height. */\n .v-tooltip {\n display: inline-flex;\n align-items: center;\n anchor-name: --tooltip-anchor;\n /* Confining the name to this subtree is indispensable: a visible panel moves to\n the top layer, where anchor resolution treats it as coming after the whole\n document, so without it every tooltip would attach to the LAST wrapper carrying\n this name. */\n anchor-scope: --tooltip-anchor;\n }\n\n /* The anchoring itself comes from VPopover, through the `anchor` prop.\n\n The selector is written as a compound of two classes that both land on this same\n element, even though the panel class it guards against — `.v-panel` — is never\n present here, VTooltip asking for no surface. It is written that way so it cannot\n break the day that prop changes: at equal specificity the winner between two\n component sheets is decided by the order the consumer's bundler happens to\n produce, which is nobody's decision. */\n .v-popover-panel.v-tooltip-panel {\n width: max-content;\n max-width: min(18rem, calc(100vw - var(--vectis-space-8)));\n padding: var(--vectis-space-1) var(--vectis-space-2);\n /* The tooltip is painted against the page rather than with it: a dark surface in\n both themes, darker still in the dark one, so it reads as an overlay whatever\n it happens to cover. */\n background: var(--vectis-color-surface-inverse);\n color: var(--vectis-color-text-on-inverse);\n border: none;\n border-radius: var(--vectis-radius-sm);\n box-shadow: var(--vectis-shadow-sm);\n font-family: var(--vectis-text-family);\n font-size: var(--vectis-text-caption-size);\n line-height: var(--vectis-text-caption-leading);\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;EAqDA,IAAM,IAAQ,GAuBR,IAAY,EAAM,GAUlB,IAAa,EAA0C,IAAI,GAI3D,IAAQ,EAAS;EAGvB,SAAS,EAAK,IAAY,IAAO;GAG/B,EAAM,YAAY,EAAW,OAAO,KAAK,GAAG,IAAY,IAAI,EAAM,KAAK;EACzE;EAEA,SAAS,IAAO;GAEd,AADA,EAAM,OAAO,GACb,EAAW,OAAO,KAAK;EACzB;EAKA,SAAS,EAAU,GAAsB;GACvC,AAAI,EAAM,QAAQ,YAAU,EAAK;EACnC;yBAqBE,EAsBO,QAAA;GArBL,OAAM;GACL,gBAAY,AAAA,EAAA,QAAA,MAAE,EAAI;GAClB,gBAAc;GACd,eAAa;GACb,WAAO,AAAA,EAAA,QAAA,MAAE,EAAI,EAAA;GACb,YAAU;GACD;MAEV,EAA2D,EAAA,QAAA,WAAA,EAApD,cAAa,EAAA,oBAAwB,EAAA,CAAA,EAAS,EAAA,CAAA,GACrD,EAWW,GAAA;GAVR,IAAI,EAAA,CAAA;YACD;GAAJ,KAAI;GACJ,MAAK;GACL,QAAO;GACN,WAAW,EAAA;GACX,SAAS;GACV,MAAK;GACL,OAAM;;oBAEgC,CAAtC,EAAsC,EAAA,QAAA,WAAA,CAAA,SAAA,CAAA,EAAA,EAAd,EAAA,IAAI,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"VTooltip.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VTooltip/VTooltip.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A short explanation appearing beside an element on hover or keyboard focus. A VPopover in\n * `mode=\"manual\"`, a tooltip having its own rules about when to appear and when to go.\n *\n * Those rules are why there is JS here at all: HTML has no stable way to say \"show this\n * after a delay on hover or focus\", so the component handles the delay, the pointer, the\n * focus, a press on the trigger, and Escape — which must dismiss without moving the focus\n * (WCAG 1.4.13).\n *\n * Four ways out, each covering what the others do not: the pointer leaves, the focus leaves,\n * Escape, or the trigger is PRESSED — that last for a trigger opening a panel, where the\n * tooltip would otherwise stand over what it just opened.\n *\n * Positioning is pure CSS with no generated id: the wrapper names itself as the anchor and\n * confines that name to its own subtree. The confinement is essential — a shown panel moves\n * to the top layer, which anchor resolution treats as coming after the whole document, so\n * without it every tooltip would attach to the last wrapper named on the page.\n *\n * The wrapper stays HERE rather than going through VPopover's `#trigger`: a tooltip trigger\n * is not a `popovertarget` invoker, which would toggle on click, but an element the panel\n * DESCRIBES.\n */\n\nimport { ref, useId } from 'vue'\n\nimport VPopover from '../VPopover/VPopover.vue'\n\nimport { useTimer } from '../../composables/useTimer'\nimport { isKeyboardFocus } from '../../utils/focus'\n\n/** Which side of the element the tooltip appears on. */\nexport type TooltipPlacement =\n 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'right'\n\n/** What the described element has to carry: the link to the tooltip that describes it. */\nexport type TooltipTriggerProps = {\n 'aria-describedby': string\n}\n\ninterface TooltipProps {\n /** What the tooltip says. The `#content` slot replaces it when both are given. */\n text?: string\n /**\n * Which side of the element the tooltip appears on. The browser flips it to the\n * opposite side by itself when there is not enough room.\n */\n placement?: TooltipPlacement\n /**\n * How long the pointer must rest on the element before the tooltip appears, in\n * milliseconds. Keyboard focus opens it at once — the intent is not in doubt there\n * — and a delay of 0 disables the wait entirely.\n */\n delay?: number\n}\n\nconst props = withDefaults(defineProps<TooltipProps>(), {\n text: undefined,\n placement: 'top',\n delay: 300,\n})\n\ndefineSlots<{\n /**\n * The element the tooltip describes. Bind the `triggerProps` it receives onto it —\n * that is what ties the two together for assistive technology — and make sure it is\n * something that can take focus, or keyboard users will never see the tooltip.\n */\n default(props: { triggerProps: TooltipTriggerProps }): unknown\n /**\n * Content richer than a plain string: formatting, a keyboard shortcut, an icon. It\n * must stay NON-interactive. The tooltip closes as soon as the pointer leaves the\n * element, so a link or a button inside could never be reached, and the description\n * is flattened to plain text for screen readers anyway. Content one can interact\n * with belongs in a panel that stays open, such as VMenu.\n */\n content?(): unknown\n}>()\n\nconst tooltipId = useId()\n// @a11y\n/*\n * The panel is opened and closed by calling it directly rather than through\n * `v-model:open`. Keyboard focus has to open it SYNCHRONOUSLY, and a model would go\n * through VPopover's watcher, hence through a tick. There is nothing lost either way:\n * a tooltip publishes no open state anyone needs to read.\n *\n * Calling twice is harmless — the guards for that live upstream in usePopover.\n */\nconst popoverRef = ref<InstanceType<typeof VPopover> | null>(null)\n\n// The delay before appearing. useTimer is what makes it re-armable and cancels it\n// when the component goes away.\nconst timer = useTimer()\n\n// @core\nfunction show(immediate = false) {\n // A delay of 0 runs the callback synchronously — the design system's convention,\n // and what lets keyboard focus share this code path without waiting a tick.\n timer.start(() => popoverRef.value?.show(), immediate ? 0 : props.delay)\n}\n\nfunction hide() {\n timer.cancel()\n popoverRef.value?.close()\n}\n\n// @a11y\n/*\n * The tooltip belongs to the KEYBOARD focus, and a `focusin` says the focus arrived, never\n * how it got there. Three ways in are not a Tab: a click, which the pointer already covers\n * and which the `pointerdown` above has just closed the tooltip for; a tap, which no browser\n * agrees on; and a `focus()` from code — the one a closing panel hands back to the button\n * that opened it, which would raise a tooltip over a page the reader is no longer pointing\n * at. `:focus-visible` is the browser's own answer to the question, the same one VMenu asks\n * to decide where a menu's focus lands.\n *\n * The consequence to know: a tooltip never opens on a tap. Content a touch reader needs\n * cannot live here alone.\n */\nfunction onFocusIn(event: FocusEvent) {\n if (isKeyboardFocus(event.target)) show(true)\n}\n\n// @keyboard @a11y — Escape must dismiss a tooltip opened by hover or focus without\n// moving the focus anywhere (WCAG 1.4.13): content appearing on hover has to be\n// dismissible, for a magnifier user whose view it may be covering.\nfunction onKeydown(event: KeyboardEvent) {\n if (event.key === 'Escape') hide()\n}\n</script>\n\n<template>\n <!--\n TRAP — `pointerdown` is what stops a tooltip from surviving the click that acted on its\n trigger, and the case it really covers is a trigger that OPENS something: a menu, a\n dialog, a popover of any kind. The tooltip would then stand over what it opened, and\n none of the other three exits applies — the pointer has not left, the focus has not\n moved out on its own, and nobody pressed Escape.\n\n It looks redundant on Chromium and Firefox, where a click focuses the button and the\n panel then takes the focus, which fires this wrapper's `focusout`. Safari on macOS does\n NOT focus a button on click, so nothing leaves the wrapper and the tooltip stays up,\n behind the panel, until the pointer moves. Delete this line and that is the bug that\n comes back, on one browser only.\n\n It is `pointerdown` and not `click`, so the tooltip is gone BEFORE the panel appears\n rather than overlapping it for a frame. Keyboard activation sends no `pointerdown` at\n all, and needs none: focus moving into the panel closes the tooltip everywhere.\n -->\n <span\n class=\"v-tooltip\"\n @pointerenter=\"show()\"\n @pointerleave=\"hide\"\n @pointerdown=\"hide\"\n @focusin=\"onFocusIn\"\n @focusout=\"hide\"\n @keydown=\"onKeydown\"\n >\n <slot :trigger-props=\"{ 'aria-describedby': tooltipId }\" />\n <VPopover\n :id=\"tooltipId\"\n ref=\"popoverRef\"\n mode=\"manual\"\n anchor=\"--tooltip-anchor\"\n :placement=\"placement\"\n bare\n role=\"tooltip\"\n class=\"v-tooltip-panel\"\n >\n <slot name=\"content\">{{ text }}</slot>\n </VPopover>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /* The wrapper is FLEX and not inline-block, for the same reason as `.v-badge-host`:\n both are inline-level atomic boxes, so the surrounding text flows identically, but\n an inline-block establishes an inline formatting context for the trigger — which\n then sits on a line box and adds the strut's descender to the wrapper's height.\n That is not only a couple of pixels in a flex row: this wrapper is also the ANCHOR,\n so the panel is offset by them too.\n\n `align-items: center` covers what is left. A wrapper stretched by a parent in\n `align-items: stretch` would otherwise stretch the trigger with it, where the\n inline-block form left it at its natural height. */\n .v-tooltip {\n display: inline-flex;\n align-items: center;\n anchor-name: --tooltip-anchor;\n /* Confining the name to this subtree is indispensable: a visible panel moves to\n the top layer, where anchor resolution treats it as coming after the whole\n document, so without it every tooltip would attach to the LAST wrapper carrying\n this name. */\n anchor-scope: --tooltip-anchor;\n }\n\n /* The anchoring itself comes from VPopover, through the `anchor` prop.\n\n The selector is written as a compound of two classes that both land on this same\n element, even though the panel class it guards against — `.v-panel` — is never\n present here, VTooltip asking for a `bare` panel. It is written that way so it cannot\n break the day that prop changes: at equal specificity the winner between two\n component sheets is decided by the order the consumer's bundler happens to\n produce, which is nobody's decision. */\n .v-popover-panel.v-tooltip-panel {\n width: max-content;\n max-width: min(18rem, calc(100vw - var(--vectis-space-8)));\n padding: var(--vectis-space-1) var(--vectis-space-2);\n /* The tooltip is painted against the page rather than with it: a dark surface in\n both themes, darker still in the dark one, so it reads as an overlay whatever\n it happens to cover. */\n background: var(--vectis-color-surface-inverse);\n color: var(--vectis-color-text-on-inverse);\n border: none;\n /* The control radius capped at half the height of a ONE-line bubble, the row recipe\n of VSideNavigationItem: a tooltip wraps past its max-width, and under a pill\n override a two-line bubble would otherwise round to half of its own height. */\n border-radius: min(var(--vectis-radius-interactive), calc(0.5lh + var(--vectis-space-1)));\n box-shadow: var(--vectis-shadow-sm);\n font-family: var(--vectis-text-family);\n font-size: var(--vectis-text-caption-size);\n line-height: var(--vectis-text-caption-leading);\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;EAwDA,IAAM,IAAQ,GAuBR,IAAY,EAAM,GAUlB,IAAa,EAA0C,IAAI,GAI3D,IAAQ,EAAS;EAGvB,SAAS,EAAK,IAAY,IAAO;GAG/B,EAAM,YAAY,EAAW,OAAO,KAAK,GAAG,IAAY,IAAI,EAAM,KAAK;EACzE;EAEA,SAAS,IAAO;GAEd,AADA,EAAM,OAAO,GACb,EAAW,OAAO,MAAM;EAC1B;EAeA,SAAS,EAAU,GAAmB;GACpC,AAAI,EAAgB,EAAM,MAAM,KAAG,EAAK,EAAI;EAC9C;EAKA,SAAS,EAAU,GAAsB;GACvC,AAAI,EAAM,QAAQ,YAAU,EAAK;EACnC;yBAqBE,EAsBO,QAAA;GArBL,OAAM;GACL,gBAAY,AAAA,EAAA,QAAA,MAAE,EAAI;GAClB,gBAAc;GACd,eAAa;GACb,WAAS;GACT,YAAU;GACD;MAEV,EAA2D,EAAA,QAAA,WAAA,EAApD,cAAa,EAAA,oBAAwB,EAAA,CAAA,EAAS,EAAA,CAAA,GACrD,EAWW,GAAA;GAVR,IAAI,EAAA,CAAA;YACD;GAAJ,KAAI;GACJ,MAAK;GACL,QAAO;GACN,WAAW,EAAA;GACZ,MAAA;GACA,MAAK;GACL,OAAM;;oBAEgC,CAAtC,EAAsC,EAAA,QAAA,WAAA,CAAA,SAAA,CAAA,EAAA,EAAd,EAAA,IAAI,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"VTypography.js","names":[],"sources":["../../../src/components/VTypography/VTypography.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @core — the only JS is deriving the default tag from the variant.\n/**\n * The design system's text element. Rather than setting a size here and a weight\n * there, the writer names the ROLE the text plays — a heading, a caption, a label —\n * and `variant` applies the complete typographic recipe that goes with it: family,\n * size, weight, line height and letter spacing, all read from the semantic tokens.\n * `tone` does the same for colour.\n *\n * It renders a single element and adds no behaviour, so the attributes it is given\n * (id, for, aria-*…) land straight on that element. This is what lets it serve as a\n * real field label, with `as=\"label\"` and a `for`.\n */\nimport { computed } from 'vue'\n\nexport type TypographyVariant =\n | 'display'\n | 'heading-1'\n | 'heading-2'\n | 'heading-3'\n | 'heading-4'\n | 'subtitle'\n | 'body-xl'\n | 'body-lg'\n | 'body-md'\n | 'body-sm'\n | 'label'\n | 'caption'\n | 'overline'\n | 'code'\n\nexport type TypographyTone =\n 'default' | 'muted' | 'subtle' | 'accent' | 'danger' | 'success' | 'warning' | 'on-inverse'\n\ninterface TypographyProps {\n /**\n * The role this text plays, which selects a complete recipe of typographic\n * tokens — size, weight, line height and, where the role calls for it, letter\n * spacing and a monospaced family.\n */\n variant?: TypographyVariant\n /**\n * The HTML tag to render. Each variant already has a sensible default (h1 to h4,\n * p, span, code), so this is for the cases where the meaning and the look differ —\n * a subtitle that is really an `h2`, or a label attached to a field.\n */\n as?: string\n /**\n * The colour of the text. `default` sets none at all, so the text inherits from\n * whatever surrounds it — which is what lets the same component be used on an\n * inverted surface or inside a coloured toast.\n */\n tone?: TypographyTone\n /**\n * Cuts the text to one line and ends it with an ellipsis. The element needs a\n * width to be cut against — being a block, or a flex item — otherwise there is\n * nothing to overflow and the text simply stays whole.\n */\n truncate?: boolean\n}\n\nconst props = withDefaults(defineProps<TypographyProps>(), {\n variant: 'body-md',\n as: undefined,\n tone: 'default',\n truncate: false,\n})\n\ndefineSlots<{\n /** Text content. */\n default(): unknown\n}>()\n\n/**\n * The tag each variant renders when `as` says nothing — the one whose meaning\n * matches the role.\n */\nconst DEFAULT_TAGS: Record<TypographyVariant, string> = {\n display: 'p',\n 'heading-1': 'h1',\n 'heading-2': 'h2',\n 'heading-3': 'h3',\n 'heading-4': 'h4',\n subtitle: 'p',\n 'body-xl': 'p',\n 'body-lg': 'p',\n 'body-md': 'p',\n 'body-sm': 'p',\n label: 'span',\n caption: 'p',\n overline: 'span',\n code: 'code',\n}\n\nconst tag = computed(() => props.as ?? DEFAULT_TAGS[props.variant])\n</script>\n\n<template>\n <component\n :is=\"tag\"\n class=\"v-typography\"\n :data-variant=\"variant\"\n :data-tone=\"tone === 'default' ? undefined : tone\"\n :data-truncate=\"truncate ? '' : undefined\"\n >\n <slot />\n </component>\n</template>\n\n<style>\n@layer vectis.components {\n .v-typography {\n /* These two defaults are re-declared on every instance because custom properties\n INHERIT: nested inside a variant that sets letter spacing, or inside a `code`,\n a VTypography would otherwise pick up its ancestor's tracking and monospaced\n family. The [data-variant] blocks below, being more specific, still win. */\n --typography-family: var(--vectis-text-family);\n --typography-tracking: normal;\n\n margin: 0; /* the space around a text block belongs to the layout holding it */\n font-family: var(--typography-family);\n font-size: var(--typography-size);\n font-weight: var(--typography-weight);\n line-height: var(--typography-leading);\n letter-spacing: var(--typography-tracking);\n /* With the `default` tone no colour variable is set, and the fallback makes the\n text inherit — which is what allows the component to be dropped inside an\n already coloured context, an inverted surface or a tinted toast. */\n color: var(--typography-color, inherit);\n overflow-wrap: break-word;\n }\n\n .v-typography[data-variant='display'] {\n --typography-family: var(--vectis-text-family-heading);\n --typography-size: var(--vectis-text-display-size);\n --typography-weight: var(--vectis-text-display-weight);\n --typography-leading: var(--vectis-text-display-leading);\n --typography-tracking: var(--vectis-text-display-tracking);\n }\n\n .v-typography[data-variant='heading-1'] {\n --typography-family: var(--vectis-text-family-heading);\n --typography-size: var(--vectis-text-heading-1-size);\n --typography-weight: var(--vectis-text-heading-1-weight);\n --typography-leading: var(--vectis-text-heading-1-leading);\n --typography-tracking: var(--vectis-text-heading-1-tracking);\n }\n\n .v-typography[data-variant='heading-2'] {\n --typography-family: var(--vectis-text-family-heading);\n --typography-size: var(--vectis-text-heading-2-size);\n --typography-weight: var(--vectis-text-heading-2-weight);\n --typography-leading: var(--vectis-text-heading-2-leading);\n --typography-tracking: var(--vectis-text-heading-2-tracking);\n }\n\n .v-typography[data-variant='heading-3'] {\n --typography-family: var(--vectis-text-family-heading);\n --typography-size: var(--vectis-text-heading-3-size);\n --typography-weight: var(--vectis-text-heading-3-weight);\n --typography-leading: var(--vectis-text-heading-3-leading);\n }\n\n .v-typography[data-variant='heading-4'] {\n --typography-family: var(--vectis-text-family-heading);\n --typography-size: var(--vectis-text-heading-4-size);\n --typography-weight: var(--vectis-text-heading-4-weight);\n --typography-leading: var(--vectis-text-heading-4-leading);\n }\n\n .v-typography[data-variant='subtitle'] {\n --typography-size: var(--vectis-text-subtitle-size);\n --typography-weight: var(--vectis-text-subtitle-weight);\n --typography-leading: var(--vectis-text-subtitle-leading);\n }\n\n .v-typography[data-variant='body-xl'] {\n --typography-size: var(--vectis-text-body-xl-size);\n --typography-weight: var(--vectis-text-body-xl-weight);\n --typography-leading: var(--vectis-text-body-xl-leading);\n }\n\n .v-typography[data-variant='body-lg'] {\n --typography-size: var(--vectis-text-body-lg-size);\n --typography-weight: var(--vectis-text-body-lg-weight);\n --typography-leading: var(--vectis-text-body-lg-leading);\n }\n\n .v-typography[data-variant='body-md'] {\n --typography-size: var(--vectis-text-body-md-size);\n --typography-weight: var(--vectis-text-body-md-weight);\n --typography-leading: var(--vectis-text-body-md-leading);\n }\n\n .v-typography[data-variant='body-sm'] {\n --typography-size: var(--vectis-text-body-sm-size);\n --typography-weight: var(--vectis-text-body-sm-weight);\n --typography-leading: var(--vectis-text-body-sm-leading);\n }\n\n .v-typography[data-variant='label'] {\n --typography-size: var(--vectis-text-label-size);\n --typography-weight: var(--vectis-text-label-weight);\n --typography-leading: var(--vectis-text-label-leading);\n }\n\n .v-typography[data-variant='caption'] {\n --typography-size: var(--vectis-text-caption-size);\n --typography-weight: var(--vectis-text-caption-weight);\n --typography-leading: var(--vectis-text-caption-leading);\n }\n\n .v-typography[data-variant='overline'] {\n --typography-size: var(--vectis-text-overline-size);\n --typography-weight: var(--vectis-text-overline-weight);\n --typography-leading: var(--vectis-text-overline-leading);\n --typography-tracking: var(--vectis-text-overline-tracking);\n\n text-transform: uppercase;\n }\n\n .v-typography[data-variant='code'] {\n --typography-family: var(--vectis-text-family-code);\n --typography-size: var(--vectis-text-code-size);\n --typography-weight: var(--vectis-text-code-weight);\n --typography-leading: var(--vectis-text-code-leading);\n }\n\n /* There is deliberately no block for the `default` tone: leaving the colour\n variable unset is precisely what makes the text inherit. */\n .v-typography[data-tone='muted'] {\n --typography-color: var(--vectis-color-text-muted);\n }\n\n .v-typography[data-tone='subtle'] {\n --typography-color: var(--vectis-color-text-subtle);\n }\n\n .v-typography[data-tone='accent'] {\n --typography-color: var(--vectis-color-accent-text);\n }\n\n .v-typography[data-tone='danger'] {\n --typography-color: var(--vectis-color-danger-text);\n }\n\n .v-typography[data-tone='success'] {\n --typography-color: var(--vectis-color-success-text);\n }\n\n .v-typography[data-tone='warning'] {\n --typography-color: var(--vectis-color-warning-text);\n }\n\n .v-typography[data-tone='on-inverse'] {\n --typography-color: var(--vectis-color-text-on-inverse);\n }\n\n .v-typography[data-truncate] {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"VTypography.js","names":[],"sources":["../../../src/components/VTypography/VTypography.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @core — the only JS is deriving the default tag from the variant.\n/**\n * The design system's text element. Rather than setting a size here and a weight\n * there, the writer names the ROLE the text plays — a heading, a caption, a label —\n * and `variant` applies the complete typographic recipe that goes with it: family,\n * size, weight, line height and letter spacing, all read from the semantic tokens.\n * `tone` does the same for colour.\n *\n * It renders a single element and adds no behaviour, so the attributes it is given\n * (id, for, aria-*…) land straight on that element. This is what lets it serve as a\n * real field label, with `as=\"label\"` and a `for`.\n */\nimport { computed } from 'vue'\n\nexport type TypographyVariant =\n | 'display'\n | 'heading-1'\n | 'heading-2'\n | 'heading-3'\n | 'heading-4'\n | 'subtitle'\n | 'body-xl'\n | 'body-lg'\n | 'body-md'\n | 'body-sm'\n | 'label'\n | 'caption'\n | 'overline'\n | 'code'\n\nexport type TypographyTone =\n 'default' | 'muted' | 'subtle' | 'accent' | 'danger' | 'success' | 'warning' | 'on-inverse'\n\ninterface TypographyProps {\n /**\n * The role this text plays, which selects a complete recipe of typographic\n * tokens — size, weight, line height and, where the role calls for it, letter\n * spacing and a monospaced family.\n */\n variant?: TypographyVariant\n /**\n * The HTML tag to render. Each variant already has a sensible default (h1 to h4,\n * p, span, code), so this is for the cases where the meaning and the look differ —\n * a subtitle that is really an `h2`, or a label attached to a field.\n */\n as?: string\n /**\n * The colour of the text. `default` sets none at all, so the text inherits from\n * whatever surrounds it — which is what lets the same component be used on an\n * inverted surface or inside a coloured toast.\n */\n tone?: TypographyTone\n /**\n * Cuts the text to one line and ends it with an ellipsis. The element needs a\n * width to be cut against — being a block, or a flex item — otherwise there is\n * nothing to overflow and the text simply stays whole.\n */\n truncate?: boolean\n}\n\nconst props = withDefaults(defineProps<TypographyProps>(), {\n variant: 'body-md',\n as: undefined,\n tone: 'default',\n truncate: false,\n})\n\ndefineSlots<{\n /** Text content. */\n default(): unknown\n}>()\n\n/**\n * The tag each variant renders when `as` says nothing — the one whose meaning\n * matches the role.\n */\nconst DEFAULT_TAGS: Record<TypographyVariant, string> = {\n display: 'p',\n 'heading-1': 'h1',\n 'heading-2': 'h2',\n 'heading-3': 'h3',\n 'heading-4': 'h4',\n subtitle: 'p',\n 'body-xl': 'p',\n 'body-lg': 'p',\n 'body-md': 'p',\n 'body-sm': 'p',\n label: 'span',\n caption: 'p',\n overline: 'span',\n code: 'code',\n}\n\nconst tag = computed(() => props.as ?? DEFAULT_TAGS[props.variant])\n</script>\n\n<template>\n <component\n :is=\"tag\"\n class=\"v-typography\"\n :data-variant=\"variant\"\n :data-tone=\"tone === 'default' ? undefined : tone\"\n :data-truncate=\"truncate ? '' : undefined\"\n >\n <slot />\n </component>\n</template>\n\n<style>\n@layer vectis.components {\n .v-typography {\n /* These two defaults are re-declared on every instance because custom properties\n INHERIT: nested inside a variant that sets letter spacing, or inside a `code`,\n a VTypography would otherwise pick up its ancestor's tracking and monospaced\n family. The [data-variant] blocks below, being more specific, still win.\n\n Size, weight and leading need no such reset, and that is an INVARIANT rather than\n an oversight: every variant block sets all three, so none can be inherited. A new\n variant that leaves one out takes it from whichever VTypography encloses it — the\n same bug these two lines exist to prevent, one step further out. */\n --typography-family: var(--vectis-text-family);\n --typography-tracking: normal;\n\n margin: 0; /* the space around a text block belongs to the layout holding it */\n font-family: var(--typography-family);\n font-size: var(--typography-size);\n font-weight: var(--typography-weight);\n line-height: var(--typography-leading);\n letter-spacing: var(--typography-tracking);\n /* With the `default` tone no colour variable is set, and the fallback makes the\n text inherit — which is what allows the component to be dropped inside an\n already coloured context, an inverted surface or a tinted toast. */\n color: var(--typography-color, inherit);\n overflow-wrap: break-word;\n }\n\n .v-typography[data-variant='display'] {\n --typography-family: var(--vectis-text-family-heading);\n --typography-size: var(--vectis-text-display-size);\n --typography-weight: var(--vectis-text-display-weight);\n --typography-leading: var(--vectis-text-display-leading);\n --typography-tracking: var(--vectis-text-display-tracking);\n }\n\n .v-typography[data-variant='heading-1'] {\n --typography-family: var(--vectis-text-family-heading);\n --typography-size: var(--vectis-text-heading-1-size);\n --typography-weight: var(--vectis-text-heading-1-weight);\n --typography-leading: var(--vectis-text-heading-1-leading);\n --typography-tracking: var(--vectis-text-heading-1-tracking);\n }\n\n .v-typography[data-variant='heading-2'] {\n --typography-family: var(--vectis-text-family-heading);\n --typography-size: var(--vectis-text-heading-2-size);\n --typography-weight: var(--vectis-text-heading-2-weight);\n --typography-leading: var(--vectis-text-heading-2-leading);\n --typography-tracking: var(--vectis-text-heading-2-tracking);\n }\n\n .v-typography[data-variant='heading-3'] {\n --typography-family: var(--vectis-text-family-heading);\n --typography-size: var(--vectis-text-heading-3-size);\n --typography-weight: var(--vectis-text-heading-3-weight);\n --typography-leading: var(--vectis-text-heading-3-leading);\n }\n\n .v-typography[data-variant='heading-4'] {\n --typography-family: var(--vectis-text-family-heading);\n --typography-size: var(--vectis-text-heading-4-size);\n --typography-weight: var(--vectis-text-heading-4-weight);\n --typography-leading: var(--vectis-text-heading-4-leading);\n }\n\n .v-typography[data-variant='subtitle'] {\n --typography-size: var(--vectis-text-subtitle-size);\n --typography-weight: var(--vectis-text-subtitle-weight);\n --typography-leading: var(--vectis-text-subtitle-leading);\n }\n\n .v-typography[data-variant='body-xl'] {\n --typography-size: var(--vectis-text-body-xl-size);\n --typography-weight: var(--vectis-text-body-xl-weight);\n --typography-leading: var(--vectis-text-body-xl-leading);\n }\n\n .v-typography[data-variant='body-lg'] {\n --typography-size: var(--vectis-text-body-lg-size);\n --typography-weight: var(--vectis-text-body-lg-weight);\n --typography-leading: var(--vectis-text-body-lg-leading);\n }\n\n .v-typography[data-variant='body-md'] {\n --typography-size: var(--vectis-text-body-md-size);\n --typography-weight: var(--vectis-text-body-md-weight);\n --typography-leading: var(--vectis-text-body-md-leading);\n }\n\n .v-typography[data-variant='body-sm'] {\n --typography-size: var(--vectis-text-body-sm-size);\n --typography-weight: var(--vectis-text-body-sm-weight);\n --typography-leading: var(--vectis-text-body-sm-leading);\n }\n\n .v-typography[data-variant='label'] {\n --typography-size: var(--vectis-text-label-size);\n --typography-weight: var(--vectis-text-label-weight);\n --typography-leading: var(--vectis-text-label-leading);\n }\n\n .v-typography[data-variant='caption'] {\n --typography-size: var(--vectis-text-caption-size);\n --typography-weight: var(--vectis-text-caption-weight);\n --typography-leading: var(--vectis-text-caption-leading);\n }\n\n .v-typography[data-variant='overline'] {\n --typography-size: var(--vectis-text-overline-size);\n --typography-weight: var(--vectis-text-overline-weight);\n --typography-leading: var(--vectis-text-overline-leading);\n --typography-tracking: var(--vectis-text-overline-tracking);\n\n text-transform: uppercase;\n }\n\n .v-typography[data-variant='code'] {\n --typography-family: var(--vectis-text-family-code);\n --typography-size: var(--vectis-text-code-size);\n --typography-weight: var(--vectis-text-code-weight);\n --typography-leading: var(--vectis-text-code-leading);\n }\n\n /* There is deliberately no block for the `default` tone: leaving the colour\n variable unset is precisely what makes the text inherit. */\n .v-typography[data-tone='muted'] {\n --typography-color: var(--vectis-color-text-muted);\n }\n\n .v-typography[data-tone='subtle'] {\n --typography-color: var(--vectis-color-text-subtle);\n }\n\n .v-typography[data-tone='accent'] {\n --typography-color: var(--vectis-color-accent-text);\n }\n\n .v-typography[data-tone='danger'] {\n --typography-color: var(--vectis-color-danger-text);\n }\n\n .v-typography[data-tone='success'] {\n --typography-color: var(--vectis-color-success-text);\n }\n\n .v-typography[data-tone='warning'] {\n --typography-color: var(--vectis-color-warning-text);\n }\n\n .v-typography[data-tone='on-inverse'] {\n --typography-color: var(--vectis-color-text-on-inverse);\n }\n\n .v-typography[data-truncate] {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n</style>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"VTypography.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VTypography/VTypography.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @core — the only JS is deriving the default tag from the variant.\n/**\n * The design system's text element. Rather than setting a size here and a weight\n * there, the writer names the ROLE the text plays — a heading, a caption, a label —\n * and `variant` applies the complete typographic recipe that goes with it: family,\n * size, weight, line height and letter spacing, all read from the semantic tokens.\n * `tone` does the same for colour.\n *\n * It renders a single element and adds no behaviour, so the attributes it is given\n * (id, for, aria-*…) land straight on that element. This is what lets it serve as a\n * real field label, with `as=\"label\"` and a `for`.\n */\nimport { computed } from 'vue'\n\nexport type TypographyVariant =\n | 'display'\n | 'heading-1'\n | 'heading-2'\n | 'heading-3'\n | 'heading-4'\n | 'subtitle'\n | 'body-xl'\n | 'body-lg'\n | 'body-md'\n | 'body-sm'\n | 'label'\n | 'caption'\n | 'overline'\n | 'code'\n\nexport type TypographyTone =\n 'default' | 'muted' | 'subtle' | 'accent' | 'danger' | 'success' | 'warning' | 'on-inverse'\n\ninterface TypographyProps {\n /**\n * The role this text plays, which selects a complete recipe of typographic\n * tokens — size, weight, line height and, where the role calls for it, letter\n * spacing and a monospaced family.\n */\n variant?: TypographyVariant\n /**\n * The HTML tag to render. Each variant already has a sensible default (h1 to h4,\n * p, span, code), so this is for the cases where the meaning and the look differ —\n * a subtitle that is really an `h2`, or a label attached to a field.\n */\n as?: string\n /**\n * The colour of the text. `default` sets none at all, so the text inherits from\n * whatever surrounds it — which is what lets the same component be used on an\n * inverted surface or inside a coloured toast.\n */\n tone?: TypographyTone\n /**\n * Cuts the text to one line and ends it with an ellipsis. The element needs a\n * width to be cut against — being a block, or a flex item — otherwise there is\n * nothing to overflow and the text simply stays whole.\n */\n truncate?: boolean\n}\n\nconst props = withDefaults(defineProps<TypographyProps>(), {\n variant: 'body-md',\n as: undefined,\n tone: 'default',\n truncate: false,\n})\n\ndefineSlots<{\n /** Text content. */\n default(): unknown\n}>()\n\n/**\n * The tag each variant renders when `as` says nothing — the one whose meaning\n * matches the role.\n */\nconst DEFAULT_TAGS: Record<TypographyVariant, string> = {\n display: 'p',\n 'heading-1': 'h1',\n 'heading-2': 'h2',\n 'heading-3': 'h3',\n 'heading-4': 'h4',\n subtitle: 'p',\n 'body-xl': 'p',\n 'body-lg': 'p',\n 'body-md': 'p',\n 'body-sm': 'p',\n label: 'span',\n caption: 'p',\n overline: 'span',\n code: 'code',\n}\n\nconst tag = computed(() => props.as ?? DEFAULT_TAGS[props.variant])\n</script>\n\n<template>\n <component\n :is=\"tag\"\n class=\"v-typography\"\n :data-variant=\"variant\"\n :data-tone=\"tone === 'default' ? undefined : tone\"\n :data-truncate=\"truncate ? '' : undefined\"\n >\n <slot />\n </component>\n</template>\n\n<style>\n@layer vectis.components {\n .v-typography {\n /* These two defaults are re-declared on every instance because custom properties\n INHERIT: nested inside a variant that sets letter spacing, or inside a `code`,\n a VTypography would otherwise pick up its ancestor's tracking and monospaced\n family. The [data-variant] blocks below, being more specific, still win. */\n --typography-family: var(--vectis-text-family);\n --typography-tracking: normal;\n\n margin: 0; /* the space around a text block belongs to the layout holding it */\n font-family: var(--typography-family);\n font-size: var(--typography-size);\n font-weight: var(--typography-weight);\n line-height: var(--typography-leading);\n letter-spacing: var(--typography-tracking);\n /* With the `default` tone no colour variable is set, and the fallback makes the\n text inherit — which is what allows the component to be dropped inside an\n already coloured context, an inverted surface or a tinted toast. */\n color: var(--typography-color, inherit);\n overflow-wrap: break-word;\n }\n\n .v-typography[data-variant='display'] {\n --typography-family: var(--vectis-text-family-heading);\n --typography-size: var(--vectis-text-display-size);\n --typography-weight: var(--vectis-text-display-weight);\n --typography-leading: var(--vectis-text-display-leading);\n --typography-tracking: var(--vectis-text-display-tracking);\n }\n\n .v-typography[data-variant='heading-1'] {\n --typography-family: var(--vectis-text-family-heading);\n --typography-size: var(--vectis-text-heading-1-size);\n --typography-weight: var(--vectis-text-heading-1-weight);\n --typography-leading: var(--vectis-text-heading-1-leading);\n --typography-tracking: var(--vectis-text-heading-1-tracking);\n }\n\n .v-typography[data-variant='heading-2'] {\n --typography-family: var(--vectis-text-family-heading);\n --typography-size: var(--vectis-text-heading-2-size);\n --typography-weight: var(--vectis-text-heading-2-weight);\n --typography-leading: var(--vectis-text-heading-2-leading);\n --typography-tracking: var(--vectis-text-heading-2-tracking);\n }\n\n .v-typography[data-variant='heading-3'] {\n --typography-family: var(--vectis-text-family-heading);\n --typography-size: var(--vectis-text-heading-3-size);\n --typography-weight: var(--vectis-text-heading-3-weight);\n --typography-leading: var(--vectis-text-heading-3-leading);\n }\n\n .v-typography[data-variant='heading-4'] {\n --typography-family: var(--vectis-text-family-heading);\n --typography-size: var(--vectis-text-heading-4-size);\n --typography-weight: var(--vectis-text-heading-4-weight);\n --typography-leading: var(--vectis-text-heading-4-leading);\n }\n\n .v-typography[data-variant='subtitle'] {\n --typography-size: var(--vectis-text-subtitle-size);\n --typography-weight: var(--vectis-text-subtitle-weight);\n --typography-leading: var(--vectis-text-subtitle-leading);\n }\n\n .v-typography[data-variant='body-xl'] {\n --typography-size: var(--vectis-text-body-xl-size);\n --typography-weight: var(--vectis-text-body-xl-weight);\n --typography-leading: var(--vectis-text-body-xl-leading);\n }\n\n .v-typography[data-variant='body-lg'] {\n --typography-size: var(--vectis-text-body-lg-size);\n --typography-weight: var(--vectis-text-body-lg-weight);\n --typography-leading: var(--vectis-text-body-lg-leading);\n }\n\n .v-typography[data-variant='body-md'] {\n --typography-size: var(--vectis-text-body-md-size);\n --typography-weight: var(--vectis-text-body-md-weight);\n --typography-leading: var(--vectis-text-body-md-leading);\n }\n\n .v-typography[data-variant='body-sm'] {\n --typography-size: var(--vectis-text-body-sm-size);\n --typography-weight: var(--vectis-text-body-sm-weight);\n --typography-leading: var(--vectis-text-body-sm-leading);\n }\n\n .v-typography[data-variant='label'] {\n --typography-size: var(--vectis-text-label-size);\n --typography-weight: var(--vectis-text-label-weight);\n --typography-leading: var(--vectis-text-label-leading);\n }\n\n .v-typography[data-variant='caption'] {\n --typography-size: var(--vectis-text-caption-size);\n --typography-weight: var(--vectis-text-caption-weight);\n --typography-leading: var(--vectis-text-caption-leading);\n }\n\n .v-typography[data-variant='overline'] {\n --typography-size: var(--vectis-text-overline-size);\n --typography-weight: var(--vectis-text-overline-weight);\n --typography-leading: var(--vectis-text-overline-leading);\n --typography-tracking: var(--vectis-text-overline-tracking);\n\n text-transform: uppercase;\n }\n\n .v-typography[data-variant='code'] {\n --typography-family: var(--vectis-text-family-code);\n --typography-size: var(--vectis-text-code-size);\n --typography-weight: var(--vectis-text-code-weight);\n --typography-leading: var(--vectis-text-code-leading);\n }\n\n /* There is deliberately no block for the `default` tone: leaving the colour\n variable unset is precisely what makes the text inherit. */\n .v-typography[data-tone='muted'] {\n --typography-color: var(--vectis-color-text-muted);\n }\n\n .v-typography[data-tone='subtle'] {\n --typography-color: var(--vectis-color-text-subtle);\n }\n\n .v-typography[data-tone='accent'] {\n --typography-color: var(--vectis-color-accent-text);\n }\n\n .v-typography[data-tone='danger'] {\n --typography-color: var(--vectis-color-danger-text);\n }\n\n .v-typography[data-tone='success'] {\n --typography-color: var(--vectis-color-success-text);\n }\n\n .v-typography[data-tone='warning'] {\n --typography-color: var(--vectis-color-warning-text);\n }\n\n .v-typography[data-tone='on-inverse'] {\n --typography-color: var(--vectis-color-text-on-inverse);\n }\n\n .v-typography[data-truncate] {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;EA6DA,IAAM,IAAQ,GAgBR,IAAkD;GACtD,SAAS;GACT,aAAa;GACb,aAAa;GACb,aAAa;GACb,aAAa;GACb,UAAU;GACV,WAAW;GACX,WAAW;GACX,WAAW;GACX,WAAW;GACX,OAAO;GACP,SAAS;GACT,UAAU;GACV,MAAM;EACR,GAEM,IAAM,QAAe,EAAM,MAAM,EAAa,EAAM,QAAQ;yBAIhE,EAQY,EAPL,EAAA,KAAG,GAAA;GACR,OAAM;GACL,gBAAc,EAAA;GACd,aAAW,EAAA,SAAI,YAAiB,KAAA,IAAY,EAAA;GAC5C,iBAAe,EAAA,WAAQ,KAAQ,KAAA;;oBAExB,CAAR,EAAQ,EAAA,QAAA,SAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"VTypography.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VTypography/VTypography.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @core — the only JS is deriving the default tag from the variant.\n/**\n * The design system's text element. Rather than setting a size here and a weight\n * there, the writer names the ROLE the text plays — a heading, a caption, a label —\n * and `variant` applies the complete typographic recipe that goes with it: family,\n * size, weight, line height and letter spacing, all read from the semantic tokens.\n * `tone` does the same for colour.\n *\n * It renders a single element and adds no behaviour, so the attributes it is given\n * (id, for, aria-*…) land straight on that element. This is what lets it serve as a\n * real field label, with `as=\"label\"` and a `for`.\n */\nimport { computed } from 'vue'\n\nexport type TypographyVariant =\n | 'display'\n | 'heading-1'\n | 'heading-2'\n | 'heading-3'\n | 'heading-4'\n | 'subtitle'\n | 'body-xl'\n | 'body-lg'\n | 'body-md'\n | 'body-sm'\n | 'label'\n | 'caption'\n | 'overline'\n | 'code'\n\nexport type TypographyTone =\n 'default' | 'muted' | 'subtle' | 'accent' | 'danger' | 'success' | 'warning' | 'on-inverse'\n\ninterface TypographyProps {\n /**\n * The role this text plays, which selects a complete recipe of typographic\n * tokens — size, weight, line height and, where the role calls for it, letter\n * spacing and a monospaced family.\n */\n variant?: TypographyVariant\n /**\n * The HTML tag to render. Each variant already has a sensible default (h1 to h4,\n * p, span, code), so this is for the cases where the meaning and the look differ —\n * a subtitle that is really an `h2`, or a label attached to a field.\n */\n as?: string\n /**\n * The colour of the text. `default` sets none at all, so the text inherits from\n * whatever surrounds it — which is what lets the same component be used on an\n * inverted surface or inside a coloured toast.\n */\n tone?: TypographyTone\n /**\n * Cuts the text to one line and ends it with an ellipsis. The element needs a\n * width to be cut against — being a block, or a flex item — otherwise there is\n * nothing to overflow and the text simply stays whole.\n */\n truncate?: boolean\n}\n\nconst props = withDefaults(defineProps<TypographyProps>(), {\n variant: 'body-md',\n as: undefined,\n tone: 'default',\n truncate: false,\n})\n\ndefineSlots<{\n /** Text content. */\n default(): unknown\n}>()\n\n/**\n * The tag each variant renders when `as` says nothing — the one whose meaning\n * matches the role.\n */\nconst DEFAULT_TAGS: Record<TypographyVariant, string> = {\n display: 'p',\n 'heading-1': 'h1',\n 'heading-2': 'h2',\n 'heading-3': 'h3',\n 'heading-4': 'h4',\n subtitle: 'p',\n 'body-xl': 'p',\n 'body-lg': 'p',\n 'body-md': 'p',\n 'body-sm': 'p',\n label: 'span',\n caption: 'p',\n overline: 'span',\n code: 'code',\n}\n\nconst tag = computed(() => props.as ?? DEFAULT_TAGS[props.variant])\n</script>\n\n<template>\n <component\n :is=\"tag\"\n class=\"v-typography\"\n :data-variant=\"variant\"\n :data-tone=\"tone === 'default' ? undefined : tone\"\n :data-truncate=\"truncate ? '' : undefined\"\n >\n <slot />\n </component>\n</template>\n\n<style>\n@layer vectis.components {\n .v-typography {\n /* These two defaults are re-declared on every instance because custom properties\n INHERIT: nested inside a variant that sets letter spacing, or inside a `code`,\n a VTypography would otherwise pick up its ancestor's tracking and monospaced\n family. The [data-variant] blocks below, being more specific, still win.\n\n Size, weight and leading need no such reset, and that is an INVARIANT rather than\n an oversight: every variant block sets all three, so none can be inherited. A new\n variant that leaves one out takes it from whichever VTypography encloses it — the\n same bug these two lines exist to prevent, one step further out. */\n --typography-family: var(--vectis-text-family);\n --typography-tracking: normal;\n\n margin: 0; /* the space around a text block belongs to the layout holding it */\n font-family: var(--typography-family);\n font-size: var(--typography-size);\n font-weight: var(--typography-weight);\n line-height: var(--typography-leading);\n letter-spacing: var(--typography-tracking);\n /* With the `default` tone no colour variable is set, and the fallback makes the\n text inherit — which is what allows the component to be dropped inside an\n already coloured context, an inverted surface or a tinted toast. */\n color: var(--typography-color, inherit);\n overflow-wrap: break-word;\n }\n\n .v-typography[data-variant='display'] {\n --typography-family: var(--vectis-text-family-heading);\n --typography-size: var(--vectis-text-display-size);\n --typography-weight: var(--vectis-text-display-weight);\n --typography-leading: var(--vectis-text-display-leading);\n --typography-tracking: var(--vectis-text-display-tracking);\n }\n\n .v-typography[data-variant='heading-1'] {\n --typography-family: var(--vectis-text-family-heading);\n --typography-size: var(--vectis-text-heading-1-size);\n --typography-weight: var(--vectis-text-heading-1-weight);\n --typography-leading: var(--vectis-text-heading-1-leading);\n --typography-tracking: var(--vectis-text-heading-1-tracking);\n }\n\n .v-typography[data-variant='heading-2'] {\n --typography-family: var(--vectis-text-family-heading);\n --typography-size: var(--vectis-text-heading-2-size);\n --typography-weight: var(--vectis-text-heading-2-weight);\n --typography-leading: var(--vectis-text-heading-2-leading);\n --typography-tracking: var(--vectis-text-heading-2-tracking);\n }\n\n .v-typography[data-variant='heading-3'] {\n --typography-family: var(--vectis-text-family-heading);\n --typography-size: var(--vectis-text-heading-3-size);\n --typography-weight: var(--vectis-text-heading-3-weight);\n --typography-leading: var(--vectis-text-heading-3-leading);\n }\n\n .v-typography[data-variant='heading-4'] {\n --typography-family: var(--vectis-text-family-heading);\n --typography-size: var(--vectis-text-heading-4-size);\n --typography-weight: var(--vectis-text-heading-4-weight);\n --typography-leading: var(--vectis-text-heading-4-leading);\n }\n\n .v-typography[data-variant='subtitle'] {\n --typography-size: var(--vectis-text-subtitle-size);\n --typography-weight: var(--vectis-text-subtitle-weight);\n --typography-leading: var(--vectis-text-subtitle-leading);\n }\n\n .v-typography[data-variant='body-xl'] {\n --typography-size: var(--vectis-text-body-xl-size);\n --typography-weight: var(--vectis-text-body-xl-weight);\n --typography-leading: var(--vectis-text-body-xl-leading);\n }\n\n .v-typography[data-variant='body-lg'] {\n --typography-size: var(--vectis-text-body-lg-size);\n --typography-weight: var(--vectis-text-body-lg-weight);\n --typography-leading: var(--vectis-text-body-lg-leading);\n }\n\n .v-typography[data-variant='body-md'] {\n --typography-size: var(--vectis-text-body-md-size);\n --typography-weight: var(--vectis-text-body-md-weight);\n --typography-leading: var(--vectis-text-body-md-leading);\n }\n\n .v-typography[data-variant='body-sm'] {\n --typography-size: var(--vectis-text-body-sm-size);\n --typography-weight: var(--vectis-text-body-sm-weight);\n --typography-leading: var(--vectis-text-body-sm-leading);\n }\n\n .v-typography[data-variant='label'] {\n --typography-size: var(--vectis-text-label-size);\n --typography-weight: var(--vectis-text-label-weight);\n --typography-leading: var(--vectis-text-label-leading);\n }\n\n .v-typography[data-variant='caption'] {\n --typography-size: var(--vectis-text-caption-size);\n --typography-weight: var(--vectis-text-caption-weight);\n --typography-leading: var(--vectis-text-caption-leading);\n }\n\n .v-typography[data-variant='overline'] {\n --typography-size: var(--vectis-text-overline-size);\n --typography-weight: var(--vectis-text-overline-weight);\n --typography-leading: var(--vectis-text-overline-leading);\n --typography-tracking: var(--vectis-text-overline-tracking);\n\n text-transform: uppercase;\n }\n\n .v-typography[data-variant='code'] {\n --typography-family: var(--vectis-text-family-code);\n --typography-size: var(--vectis-text-code-size);\n --typography-weight: var(--vectis-text-code-weight);\n --typography-leading: var(--vectis-text-code-leading);\n }\n\n /* There is deliberately no block for the `default` tone: leaving the colour\n variable unset is precisely what makes the text inherit. */\n .v-typography[data-tone='muted'] {\n --typography-color: var(--vectis-color-text-muted);\n }\n\n .v-typography[data-tone='subtle'] {\n --typography-color: var(--vectis-color-text-subtle);\n }\n\n .v-typography[data-tone='accent'] {\n --typography-color: var(--vectis-color-accent-text);\n }\n\n .v-typography[data-tone='danger'] {\n --typography-color: var(--vectis-color-danger-text);\n }\n\n .v-typography[data-tone='success'] {\n --typography-color: var(--vectis-color-success-text);\n }\n\n .v-typography[data-tone='warning'] {\n --typography-color: var(--vectis-color-warning-text);\n }\n\n .v-typography[data-tone='on-inverse'] {\n --typography-color: var(--vectis-color-text-on-inverse);\n }\n\n .v-typography[data-truncate] {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;EA6DA,IAAM,IAAQ,GAgBR,IAAkD;GACtD,SAAS;GACT,aAAa;GACb,aAAa;GACb,aAAa;GACb,aAAa;GACb,UAAU;GACV,WAAW;GACX,WAAW;GACX,WAAW;GACX,WAAW;GACX,OAAO;GACP,SAAS;GACT,UAAU;GACV,MAAM;EACR,GAEM,IAAM,QAAe,EAAM,MAAM,EAAa,EAAM,QAAQ;yBAIhE,EAQY,EAPL,EAAA,KAAG,GAAA;GACR,OAAM;GACL,gBAAc,EAAA;GACd,aAAW,EAAA,SAAI,YAAiB,KAAA,IAAY,EAAA;GAC5C,iBAAe,EAAA,WAAQ,KAAQ,KAAA;;oBAExB,CAAR,EAAQ,EAAA,QAAA,SAAA,CAAA,CAAA"}
@@ -1,19 +1,2 @@
1
1
  import { ComputedRef } from 'vue';
2
- /**
3
- * Works out the name a screen reader announces for a container that has one: a row of
4
- * tabs, a group of buttons, a navigation area.
5
- *
6
- * A name can be given in three ways, and they are ranked. Pointing at another element
7
- * that already carries the text wins; an explicit name written on the component comes
8
- * next; the component's own `label` option is only the fallback. So that option is a
9
- * DEFAULT and nothing more — an explicit name replaces it, and pointing at another
10
- * element removes it altogether, since otherwise the element would carry two names at
11
- * once.
12
- *
13
- * This arbitration has to be done by hand as soon as a component both spreads the
14
- * attributes it was given and writes its own name in the same place: nothing would
15
- * choose between the two, and both would apply. Elsewhere Vue's normal attribute
16
- * fallthrough already lets the consumer's win, and all this does is drop a default that
17
- * has become redundant.
18
- */
19
2
  export declare function useAriaLabel(label: () => string | undefined): ComputedRef<string | undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"useAriaLabel.js","names":[],"sources":["../../src/composables/useAriaLabel.ts"],"sourcesContent":["import { computed, useAttrs, type ComputedRef } from 'vue'\n\n// @a11y\n/**\n * Works out the name a screen reader announces for a container that has one: a row of\n * tabs, a group of buttons, a navigation area.\n *\n * A name can be given in three ways, and they are ranked. Pointing at another element\n * that already carries the text wins; an explicit name written on the component comes\n * next; the component's own `label` option is only the fallback. So that option is a\n * DEFAULT and nothing more — an explicit name replaces it, and pointing at another\n * element removes it altogether, since otherwise the element would carry two names at\n * once.\n *\n * This arbitration has to be done by hand as soon as a component both spreads the\n * attributes it was given and writes its own name in the same place: nothing would\n * choose between the two, and both would apply. Elsewhere Vue's normal attribute\n * fallthrough already lets the consumer's win, and all this does is drop a default that\n * has become redundant.\n */\nexport function useAriaLabel(label: () => string | undefined): ComputedRef<string | undefined> {\n const attrs = useAttrs()\n return computed(() =>\n attrs['aria-labelledby'] !== undefined\n ? undefined\n : ((attrs['aria-label'] as string | undefined) ?? label()),\n )\n}\n"],"mappings":";;AAoBA,SAAgB,EAAa,GAAkE;CAC7F,IAAM,IAAQ,EAAS;CACvB,OAAO,QACL,EAAM,uBAAuB,KAAA,IAEvB,EAAM,iBAAwC,EAAM,IADtD,KAAA,CAEN;AACF"}
1
+ {"version":3,"file":"useAriaLabel.js","names":[],"sources":["../../src/composables/useAriaLabel.ts"],"sourcesContent":["// @a11y\n/**\n * The accessible name of a labelled container — a tablist, a group, a nav — resolved\n * `aria-labelledby` > consumer `aria-label` > the `label` prop.\n *\n * `label` is therefore only a default: `aria-label` replaces it, and `aria-labelledby`\n * removes it outright, or the element would carry two names at once.\n *\n * The arbitration is only NEEDED where a component both spreads `$attrs` and binds its own\n * `:aria-label` on the same element (VTabs, VToggle): nothing would choose, and both would\n * apply. Elsewhere fallthrough already lets the consumer win and this just drops a default\n * that has become redundant.\n */\n\nimport { computed, useAttrs, type ComputedRef } from 'vue'\n\nexport function useAriaLabel(label: () => string | undefined): ComputedRef<string | undefined> {\n const attrs = useAttrs()\n return computed(() =>\n attrs['aria-labelledby'] !== undefined\n ? undefined\n : ((attrs['aria-label'] as string | undefined) ?? label()),\n )\n}\n"],"mappings":";;AAgBA,SAAgB,EAAa,GAAkE;CAC7F,IAAM,IAAQ,EAAS;CACvB,OAAO,QACL,EAAM,uBAAuB,KAAA,IAEvB,EAAM,iBAAwC,EAAM,IADtD,KAAA,CAEN;AACF"}
@@ -0,0 +1,42 @@
1
+ import { ComputedRef, Ref } from 'vue';
2
+ interface ClearableOptions {
3
+ /** Whether the field offers a cross at all. */
4
+ clearable: () => boolean;
5
+ /**
6
+ * The consumer's EXPLICIT answer to "is there anything to clear?", which holds even on a
7
+ * read-only field: the value of a read-only date or time picker changes through its panel
8
+ * rather than by typing. Left undefined, the field answers for itself.
9
+ */
10
+ clearVisible: () => boolean | undefined;
11
+ /** Whether the field is unusable, the row it sits in taken into account. */
12
+ disabled: () => boolean;
13
+ /** Whether the field refuses to be typed into. */
14
+ readonly: () => boolean;
15
+ /** What the field currently holds, as text. */
16
+ text: () => string;
17
+ /** The real control, which the focus goes back to. */
18
+ controlEl: Ref<{
19
+ focus: () => void;
20
+ } | null>;
21
+ /** Empties the value and tells the consumer. */
22
+ onCleared: () => void;
23
+ }
24
+ /**
25
+ * Whether a field offers its cross: it asks for one, it can be used and changed, and it holds
26
+ * something. The fields composed on top of VInput — VCombobox, VDateInput, VTimeInput,
27
+ * VFileInput — hold their value somewhere other than the text, so they work out `filled`
28
+ * themselves and hand VInput the result as `clearVisible`; the other terms are the same for
29
+ * every field and are written here once.
30
+ *
31
+ * `disabled` is passed apart from the props because it is the value RESOLVED against the row
32
+ * the field sits in, which the prop alone is not.
33
+ */
34
+ export declare function canClear(props: {
35
+ clearable: boolean;
36
+ readonly: boolean;
37
+ }, disabled: boolean, filled: boolean): boolean;
38
+ export declare function useClearable(options: ClearableOptions): {
39
+ showClear: ComputedRef<boolean>;
40
+ onClear: () => void;
41
+ };
42
+ export {};
@@ -0,0 +1,19 @@
1
+ import { computed as e } from "vue";
2
+ //#region src/composables/useClearable.ts
3
+ function t(e, t, n) {
4
+ return e.clearable && !t && !e.readonly && n;
5
+ }
6
+ function n(t) {
7
+ let n = e(() => !t.clearable() || t.disabled() ? !1 : t.clearVisible() ?? (!t.readonly() && t.text().length > 0));
8
+ function r() {
9
+ t.onCleared(), t.controlEl.value?.focus();
10
+ }
11
+ return {
12
+ showClear: n,
13
+ onClear: r
14
+ };
15
+ }
16
+ //#endregion
17
+ export { t as canClear, n as useClearable };
18
+
19
+ //# sourceMappingURL=useClearable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useClearable.js","names":[],"sources":["../../src/composables/useClearable.ts"],"sourcesContent":["/**\n * The cross that empties a field, shared by VInput and VTextarea — and, through\n * `canClear`, the answer the fields composed on top of VInput give it.\n *\n * The two halves of it are one decision: WHEN the cross is shown, and what pressing it does.\n * They were written out in both components and had already started to drift — one asked\n * `props.disabled` where the other asked the value resolved against the row it sits in — which\n * is the kind of divergence nothing catches, the cross simply staying visible in a disabled\n * VInputGroup.\n *\n * The focus is the accessibility half and is not optional: the cross VANISHES the instant it\n * empties the field, so without that call the focus would be left on a button that no longer\n * exists and fall back to the top of the document.\n */\nimport { computed } from 'vue'\nimport type { ComputedRef, Ref } from 'vue'\n\ninterface ClearableOptions {\n /** Whether the field offers a cross at all. */\n clearable: () => boolean\n /**\n * The consumer's EXPLICIT answer to \"is there anything to clear?\", which holds even on a\n * read-only field: the value of a read-only date or time picker changes through its panel\n * rather than by typing. Left undefined, the field answers for itself.\n */\n clearVisible: () => boolean | undefined\n /** Whether the field is unusable, the row it sits in taken into account. */\n disabled: () => boolean\n /** Whether the field refuses to be typed into. */\n readonly: () => boolean\n /** What the field currently holds, as text. */\n text: () => string\n /** The real control, which the focus goes back to. */\n controlEl: Ref<{ focus: () => void } | null>\n /** Empties the value and tells the consumer. */\n onCleared: () => void\n}\n\n/**\n * Whether a field offers its cross: it asks for one, it can be used and changed, and it holds\n * something. The fields composed on top of VInput — VCombobox, VDateInput, VTimeInput,\n * VFileInput — hold their value somewhere other than the text, so they work out `filled`\n * themselves and hand VInput the result as `clearVisible`; the other terms are the same for\n * every field and are written here once.\n *\n * `disabled` is passed apart from the props because it is the value RESOLVED against the row\n * the field sits in, which the prop alone is not.\n */\nexport function canClear(\n props: { clearable: boolean; readonly: boolean },\n disabled: boolean,\n filled: boolean,\n): boolean {\n return props.clearable && !disabled && !props.readonly && filled\n}\n\nexport function useClearable(options: ClearableOptions): {\n showClear: ComputedRef<boolean>\n onClear: () => void\n} {\n // An explicit `clearVisible` replaces the read-only and the content terms together: a\n // composed field has already asked both through `canClear`.\n const showClear = computed(() => {\n if (!options.clearable() || options.disabled()) return false\n return options.clearVisible() ?? (!options.readonly() && options.text().length > 0)\n })\n\n function onClear() {\n options.onCleared()\n options.controlEl.value?.focus()\n }\n\n return { showClear, onClear }\n}\n"],"mappings":";;AAgDA,SAAgB,EACd,GACA,GACA,GACS;CACT,OAAO,EAAM,aAAa,CAAC,KAAY,CAAC,EAAM,YAAY;AAC5D;AAEA,SAAgB,EAAa,GAG3B;CAGA,IAAM,IAAY,QACZ,CAAC,EAAQ,UAAU,KAAK,EAAQ,SAAS,IAAU,KAChD,EAAQ,aAAa,MAAM,CAAC,EAAQ,SAAS,KAAK,EAAQ,KAAK,CAAC,CAAC,SAAS,EAClF;CAED,SAAS,IAAU;EAEjB,AADA,EAAQ,UAAU,GAClB,EAAQ,UAAU,OAAO,MAAM;CACjC;CAEA,OAAO;EAAE;EAAW;CAAQ;AAC9B"}
@@ -0,0 +1,22 @@
1
+ import { ComputedRef } from 'vue';
2
+ /** The three members every group context shares, whatever else it carries. */
3
+ interface ShapeContext<S> {
4
+ readonly size?: S;
5
+ readonly compact?: boolean;
6
+ readonly disabled?: boolean;
7
+ }
8
+ interface ShapeProps<S> {
9
+ readonly size: S;
10
+ readonly compact: boolean;
11
+ readonly disabled: boolean;
12
+ }
13
+ export interface ResolvedShape<S> {
14
+ /** The height, the row's if it named one. */
15
+ size: ComputedRef<S>;
16
+ /** The reduced density, the row's if it named one. */
17
+ compact: ComputedRef<boolean>;
18
+ /** Unusable as soon as EITHER the row or the control says so. */
19
+ disabled: ComputedRef<boolean>;
20
+ }
21
+ export declare function useControlShape<S>(props: ShapeProps<S>, group: ShapeContext<S> | null): ResolvedShape<S>;
22
+ export {};
@@ -0,0 +1,13 @@
1
+ import { computed as e } from "vue";
2
+ //#region src/composables/useControlShape.ts
3
+ function t(t, n) {
4
+ return {
5
+ size: e(() => n?.size ?? t.size),
6
+ compact: e(() => n?.compact ?? t.compact),
7
+ disabled: e(() => n?.disabled || t.disabled)
8
+ };
9
+ }
10
+ //#endregion
11
+ export { t as useControlShape };
12
+
13
+ //# sourceMappingURL=useControlShape.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useControlShape.js","names":[],"sources":["../../src/composables/useControlShape.ts"],"sourcesContent":["/**\n * The arbitration between a control and the row it sits in, resolved once.\n *\n * Seven components read a group context — VButton from a VButtonGroup, and the five fields\n * and VSlider's number fields from a VInputGroup — and each of them wrote the same three\n * computeds by hand. Two of the\n * three use `??` and the third uses `||`, and that asymmetry is the whole rule: `size` and\n * `compact` are the SHAPE of the control, which belongs to the row, while `disabled` is\n * CUMULATIVE, so a row switched off cannot have one of its segments opt back in. Written out\n * six times, one of the six was always going to end up with the wrong operator.\n *\n * It takes the injected context rather than the key so a component keeps its own typing: the\n * two contexts carry different sizes, and neither is `unknown` on the other side.\n */\nimport { computed } from 'vue'\nimport type { ComputedRef } from 'vue'\n\n/** The three members every group context shares, whatever else it carries. */\ninterface ShapeContext<S> {\n readonly size?: S\n readonly compact?: boolean\n readonly disabled?: boolean\n}\n\ninterface ShapeProps<S> {\n readonly size: S\n readonly compact: boolean\n readonly disabled: boolean\n}\n\nexport interface ResolvedShape<S> {\n /** The height, the row's if it named one. */\n size: ComputedRef<S>\n /** The reduced density, the row's if it named one. */\n compact: ComputedRef<boolean>\n /** Unusable as soon as EITHER the row or the control says so. */\n disabled: ComputedRef<boolean>\n}\n\nexport function useControlShape<S>(\n props: ShapeProps<S>,\n group: ShapeContext<S> | null,\n): ResolvedShape<S> {\n return {\n size: computed(() => group?.size ?? props.size),\n compact: computed(() => group?.compact ?? props.compact),\n disabled: computed(() => group?.disabled || props.disabled),\n }\n}\n"],"mappings":";;AAuCA,SAAgB,EACd,GACA,GACkB;CAClB,OAAO;EACL,MAAM,QAAe,GAAO,QAAQ,EAAM,IAAI;EAC9C,SAAS,QAAe,GAAO,WAAW,EAAM,OAAO;EACvD,UAAU,QAAe,GAAO,YAAY,EAAM,QAAQ;CAC5D;AACF"}
@@ -0,0 +1,22 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * The open state of a native `<details>`, shared by the design system's two consumers of one:
4
+ * VAccordionItem and VSideNavigationItem. Bind `openAttr` to `:open`, `onToggle` to `@toggle`
5
+ * and `onSummaryClick` to the `<summary>`'s `@click`.
6
+ *
7
+ * The element is the source of truth and the `v-model:open` is fed BY it. Left unbound (the
8
+ * model's `null`), the value handed to `:open` never changes, so Vue never patches the element
9
+ * back and the native toggling stays sovereign.
10
+ *
11
+ * `defaultOpen` is read ONCE, here, and never again: it is an initial state, so a prop changed
12
+ * later must not close a section the reader has opened. Read inside the computed instead, a
13
+ * parent re-rendering with another value would silently fold it.
14
+ */
15
+ export declare function useDetailsOpen(open: Ref<boolean | null>, options: {
16
+ defaultOpen: () => boolean;
17
+ disabled: () => boolean;
18
+ }): {
19
+ openAttr: import('vue').ComputedRef<true | undefined>;
20
+ onToggle: (event: Event) => void;
21
+ onSummaryClick: (event: MouseEvent) => void;
22
+ };
@@ -0,0 +1,21 @@
1
+ import { computed as e } from "vue";
2
+ //#region src/composables/useDetailsOpen.ts
3
+ function t(t, n) {
4
+ let r = n.defaultOpen(), i = e(() => (t.value ?? r) || void 0);
5
+ function a(e) {
6
+ let n = e.target.open;
7
+ t.value !== n && (t.value = n);
8
+ }
9
+ function o(e) {
10
+ n.disabled() && e.preventDefault();
11
+ }
12
+ return {
13
+ openAttr: i,
14
+ onToggle: a,
15
+ onSummaryClick: o
16
+ };
17
+ }
18
+ //#endregion
19
+ export { t as useDetailsOpen };
20
+
21
+ //# sourceMappingURL=useDetailsOpen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDetailsOpen.js","names":[],"sources":["../../src/composables/useDetailsOpen.ts"],"sourcesContent":["import { computed } from 'vue'\nimport type { Ref } from 'vue'\n\n/**\n * The open state of a native `<details>`, shared by the design system's two consumers of one:\n * VAccordionItem and VSideNavigationItem. Bind `openAttr` to `:open`, `onToggle` to `@toggle`\n * and `onSummaryClick` to the `<summary>`'s `@click`.\n *\n * The element is the source of truth and the `v-model:open` is fed BY it. Left unbound (the\n * model's `null`), the value handed to `:open` never changes, so Vue never patches the element\n * back and the native toggling stays sovereign.\n *\n * `defaultOpen` is read ONCE, here, and never again: it is an initial state, so a prop changed\n * later must not close a section the reader has opened. Read inside the computed instead, a\n * parent re-rendering with another value would silently fold it.\n */\nexport function useDetailsOpen(\n open: Ref<boolean | null>,\n options: { defaultOpen: () => boolean; disabled: () => boolean },\n) {\n const initial = options.defaultOpen()\n const openAttr = computed(() => (open.value ?? initial) || undefined)\n\n // @core\n // The toggle event does not bubble, which is convenient: listening on the element itself\n // cannot pick up a nested `<details>` opening inside it.\n function onToggle(event: Event) {\n const value = (event.target as HTMLDetailsElement).open\n if (open.value !== value) open.value = value\n }\n\n // @a11y @core\n /*\n * A `<summary>` has no `disabled` attribute, so cancelling the click is the only way to stop\n * a disabled section from folding. The keyboard needs nothing: the component takes the\n * summary out of the tab order. Deliberately not `pointer-events: none`, which would also\n * remove the forbidden cursor telling the reader why nothing happens.\n */\n function onSummaryClick(event: MouseEvent) {\n if (options.disabled()) event.preventDefault()\n }\n\n return { openAttr, onToggle, onSummaryClick }\n}\n"],"mappings":";;AAgBA,SAAgB,EACd,GACA,GACA;CACA,IAAM,IAAU,EAAQ,YAAY,GAC9B,IAAW,SAAgB,EAAK,SAAS,MAAY,KAAA,CAAS;CAKpE,SAAS,EAAS,GAAc;EAC9B,IAAM,IAAS,EAAM,OAA8B;EACnD,AAAI,EAAK,UAAU,MAAO,EAAK,QAAQ;CACzC;CASA,SAAS,EAAe,GAAmB;EACzC,AAAI,EAAQ,SAAS,KAAG,EAAM,eAAe;CAC/C;CAEA,OAAO;EAAE;EAAU;EAAU;CAAe;AAC9C"}
@@ -1,19 +1,4 @@
1
1
  import { ComputedRef } from 'vue';
2
- /**
3
- * The identifiers a wrapped field needs — the text input and the multi-line one. They
4
- * are what ties a label to its field and a field to the help text below it, so that
5
- * clicking the label focuses the field and a screen reader reads the hint out with it.
6
- *
7
- * Two points are worth knowing. An identifier the consumer supplies WINS over the one
8
- * generated here, or a label they wrote themselves outside the component would point at
9
- * nothing. And the link to the descriptive text is a LIST rather than a single value, so
10
- * the component's own hint is ADDED to whatever the consumer already pointed at instead
11
- * of replacing it.
12
- *
13
- * The generated identifiers come from Vue's own facility rather than a counter of our
14
- * own, which is what makes them identical in the page rendered on the server and in the
15
- * one the browser takes over.
16
- */
17
2
  export declare function useFieldIds(attrs: Record<string, unknown>, hasHint: () => boolean): {
18
3
  fieldId: ComputedRef<string>;
19
4
  hintId: string;
@@ -1,14 +1,15 @@
1
- import { computed as e, useId as t } from "vue";
1
+ import { joinIds as e } from "../utils/ids.js";
2
+ import { computed as t, useId as n } from "vue";
2
3
  //#region src/composables/useFieldIds.ts
3
- function n(n, r) {
4
- let i = t(), a = t();
4
+ function r(r, i) {
5
+ let a = n(), o = n();
5
6
  return {
6
- fieldId: e(() => n.id ?? i),
7
- hintId: a,
8
- describedBy: e(() => [n["aria-describedby"], r() ? a : void 0].filter(Boolean).join(" ") || void 0)
7
+ fieldId: t(() => r.id ?? a),
8
+ hintId: o,
9
+ describedBy: t(() => e(r["aria-describedby"], i() && o))
9
10
  };
10
11
  }
11
12
  //#endregion
12
- export { n as useFieldIds };
13
+ export { r as useFieldIds };
13
14
 
14
15
  //# sourceMappingURL=useFieldIds.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFieldIds.js","names":[],"sources":["../../src/composables/useFieldIds.ts"],"sourcesContent":["import { computed, useId, type ComputedRef } from 'vue'\n\n// @a11y @ssr\n/**\n * The identifiers a wrapped field needs — the text input and the multi-line one. They\n * are what ties a label to its field and a field to the help text below it, so that\n * clicking the label focuses the field and a screen reader reads the hint out with it.\n *\n * Two points are worth knowing. An identifier the consumer supplies WINS over the one\n * generated here, or a label they wrote themselves outside the component would point at\n * nothing. And the link to the descriptive text is a LIST rather than a single value, so\n * the component's own hint is ADDED to whatever the consumer already pointed at instead\n * of replacing it.\n *\n * The generated identifiers come from Vue's own facility rather than a counter of our\n * own, which is what makes them identical in the page rendered on the server and in the\n * one the browser takes over.\n */\nexport function useFieldIds(\n attrs: Record<string, unknown>,\n hasHint: () => boolean,\n): { fieldId: ComputedRef<string>; hintId: string; describedBy: ComputedRef<string | undefined> } {\n const uid = useId()\n const hintId = useId()\n\n return {\n fieldId: computed(() => (attrs.id as string | undefined) ?? uid),\n hintId,\n describedBy: computed(() => {\n const ids = [attrs['aria-describedby'] as string | undefined, hasHint() ? hintId : undefined]\n return ids.filter(Boolean).join(' ') || undefined\n }),\n }\n}\n"],"mappings":";;AAkBA,SAAgB,EACd,GACA,GACgG;CAChG,IAAM,IAAM,EAAM,GACZ,IAAS,EAAM;CAErB,OAAO;EACL,SAAS,QAAgB,EAAM,MAA6B,CAAG;EAC/D;EACA,aAAa,QAEJ,CADM,EAAM,qBAA2C,EAAQ,IAAI,IAAS,KAAA,CAC5E,CAAA,CAAI,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,KAAK,KAAA,CACzC;CACH;AACF"}
1
+ {"version":3,"file":"useFieldIds.js","names":[],"sources":["../../src/composables/useFieldIds.ts"],"sourcesContent":["// @a11y @ssr\n/**\n * The ids tying a wrapped field to its label and its hint — VInput and VTextarea, and the hint\n * of VCheckbox, VRadio and VSwitch.\n *\n * A consumer `id` WINS over the generated one, or a label they wrote outside the component\n * would point at nothing. `aria-describedby` is a space-separated LIST, so the component's\n * hint is APPENDED to whatever the consumer already pointed at rather than replacing it.\n *\n * Ids come from `useId()` rather than a counter of our own, which is what keeps them\n * identical across the server render and hydration.\n */\n\nimport { computed, useId, type ComputedRef } from 'vue'\n\nimport { joinIds } from '../utils/ids'\n\nexport function useFieldIds(\n attrs: Record<string, unknown>,\n hasHint: () => boolean,\n): { fieldId: ComputedRef<string>; hintId: string; describedBy: ComputedRef<string | undefined> } {\n const uid = useId()\n const hintId = useId()\n\n return {\n fieldId: computed(() => (attrs.id as string | undefined) ?? uid),\n hintId,\n describedBy: computed(() =>\n joinIds(attrs['aria-describedby'] as string | undefined, hasHint() && hintId),\n ),\n }\n}\n"],"mappings":";;;AAiBA,SAAgB,EACd,GACA,GACgG;CAChG,IAAM,IAAM,EAAM,GACZ,IAAS,EAAM;CAErB,OAAO;EACL,SAAS,QAAgB,EAAM,MAA6B,CAAG;EAC/D;EACA,aAAa,QACX,EAAQ,EAAM,qBAA2C,EAAQ,KAAK,CAAM,CAC9E;CACF;AACF"}
@@ -6,7 +6,7 @@ interface FocusableField {
6
6
  /** The least this needs of the panel: something it can open and close. */
7
7
  interface PanelControl {
8
8
  show: () => void;
9
- hide: () => void;
9
+ close: () => void;
10
10
  }
11
11
  export interface UseFieldPanelOptions {
12
12
  /** The component's root, against which "the focus has left" is judged. */
@@ -14,7 +14,7 @@ export interface UseFieldPanelOptions {
14
14
  /** The panel to open and close. */
15
15
  panelRef: Ref<PanelControl | null>;
16
16
  /** The field the focus returns to. */
17
- fieldEl: Ref<FocusableField | null>;
17
+ field: Ref<FocusableField | null>;
18
18
  /**
19
19
  * Whether opening is refused. It is the SINGLE cut-off point: every route in passes
20
20
  * through it, so a component never has to repeat the condition per handler.
@@ -27,32 +27,35 @@ export interface UseFieldPanelOptions {
27
27
  /** What it needs to do as the panel closes: clear an announcement, for instance. */
28
28
  onClose?: () => void;
29
29
  /**
30
- * Whether the focus should enter the panel when it opens. It does by default.
30
+ * Whether focusing the field opens the panel. It does not by default.
31
31
  *
32
- * A field one TYPES into says no: its panel opens without taking the caret, so typing
33
- * carries on and the down arrow remains the one explicit way in.
32
+ * A field one TYPES into says yes, and its panel then opens WITHOUT taking the caret, so
33
+ * typing carries on and the down arrow remains the one explicit way in. A click on such a
34
+ * field leaves the focus where it is for the same reason.
34
35
  */
35
- focusOnOpen?: () => boolean;
36
+ openOnFocus?: () => boolean;
36
37
  }
37
38
  /**
38
- * The shell shared by the date and the time picker: a field, and a panel below it that
39
- * nothing dismisses by itself. Neither component owns this — it belongs to both.
39
+ * The "field + `VPopover` in `mode="manual"`" shell of VDateInput and VTimeInput.
40
40
  *
41
- * A panel of that kind does NOTHING on its own: it does not close on a click outside, does
42
- * not take the focus, and does not hand it back. What follows is exactly that minimum,
43
- * and nothing more; whatever is particular to one component arrives through the three
44
- * callbacks above.
41
+ * A `manual` popover does nothing on its own: no light dismiss, no focus move, no focus
42
+ * return. This is exactly that minimum; what is particular to either component arrives
43
+ * through `onOpen`/`onClose`.
45
44
  *
46
- * TRAP — the panel is WRITTEN to directly and READ back through a model. The state here is
47
- * meant to be bound to the panel, which feeds it from its own events, but the opening
48
- * itself must stay synchronous: the frame scheduled to move the focus assumes the panel is
49
- * already open by the time it runs, and going through the model would put a tick in
50
- * between.
45
+ * TRAP — the panel is WRITTEN imperatively and READ back by model. Bind `open` as
46
+ * `v-model:open` so the DOM feeds it, but the write must stay synchronous: the `rAF` that
47
+ * moves focus assumes the panel is already open when it is armed, and the model would put
48
+ * a tick in between.
51
49
  */
52
50
  export declare function useFieldPanel(options: UseFieldPanelOptions): {
53
51
  open: Ref<boolean, boolean>;
52
+ panelId: string;
54
53
  openPanel: (moveFocus?: boolean) => void;
55
- closePanel: (refocus?: boolean) => void;
54
+ closePanel: () => void;
55
+ closeAndFocus: () => void;
56
+ focusField: () => void;
57
+ onFieldFocus: () => void;
58
+ toggleFromIcon: () => void;
56
59
  onControlClick: (event: MouseEvent) => void;
57
60
  onFocusout: (event: FocusEvent) => void;
58
61
  onKeydown: (event: KeyboardEvent) => void;