vectis-ui 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (511) hide show
  1. package/dist/components/VAccordion/VAccordion.css +1 -1
  2. package/dist/components/VAccordion/VAccordion.d.ts +6 -5
  3. package/dist/components/VAccordion/VAccordion.js.map +1 -1
  4. package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
  5. package/dist/components/VAccordion/VAccordionItem.css +1 -1
  6. package/dist/components/VAccordion/VAccordionItem.d.ts +1 -1
  7. package/dist/components/VAccordion/VAccordionItem.js.map +1 -1
  8. package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  9. package/dist/components/VAlert/VAlert.css +2 -0
  10. package/dist/components/VAlert/VAlert.d.ts +73 -0
  11. package/dist/components/VAlert/VAlert.js +9 -0
  12. package/dist/components/VAlert/VAlert.js.map +1 -0
  13. package/dist/components/VAlert/VAlert.vue_vue_type_script_setup_true_lang.js +96 -0
  14. package/dist/components/VAlert/VAlert.vue_vue_type_script_setup_true_lang.js.map +1 -0
  15. package/dist/components/VAvatar/VAvatar.d.ts +2 -2
  16. package/dist/components/VAvatar/VAvatarGroup.d.ts +1 -1
  17. package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js +8 -8
  18. package/dist/components/VBadge/VBadge.d.ts +3 -3
  19. package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js +9 -9
  20. package/dist/components/VButton/VButton.d.ts +4 -4
  21. package/dist/components/VButton/VButtonGroup.css +1 -1
  22. package/dist/components/VButton/VButtonGroup.d.ts +2 -2
  23. package/dist/components/VButton/VButtonGroup.js.map +1 -1
  24. package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  25. package/dist/components/VCalendar/VCalendar.css +1 -1
  26. package/dist/components/VCalendar/VCalendar.d.ts +7 -1
  27. package/dist/components/VCalendar/VCalendar.js.map +1 -1
  28. package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js +20 -18
  29. package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  30. package/dist/components/VCalendar/VCalendarEvent.js.map +1 -1
  31. package/dist/components/VCalendar/VCalendarEvent.vue_vue_type_script_setup_true_lang.js.map +1 -1
  32. package/dist/components/VCalendar/VCalendarMonth.css +1 -1
  33. package/dist/components/VCalendar/VCalendarMonth.d.ts +2 -2
  34. package/dist/components/VCalendar/VCalendarMonth.js.map +1 -1
  35. package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js.map +1 -1
  36. package/dist/components/VCalendar/VCalendarTimeGrid.css +1 -1
  37. package/dist/components/VCalendar/VCalendarTimeGrid.d.ts +3 -3
  38. package/dist/components/VCalendar/VCalendarTimeGrid.js.map +1 -1
  39. package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js.map +1 -1
  40. package/dist/components/VCalendar/VCalendarYear.css +1 -1
  41. package/dist/components/VCalendar/VCalendarYear.js.map +1 -1
  42. package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js.map +1 -1
  43. package/dist/components/VCalendar/gesture.d.ts +1 -16
  44. package/dist/components/VCalendar/gesture.js +1 -1
  45. package/dist/components/VCalendar/gesture.js.map +1 -1
  46. package/dist/components/VCalendar/types.d.ts +2 -0
  47. package/dist/components/VCard/VCard.css +2 -0
  48. package/dist/components/VCard/VCard.d.ts +87 -0
  49. package/dist/components/VCard/VCard.js +9 -0
  50. package/dist/components/VCard/VCard.js.map +1 -0
  51. package/dist/components/VCard/VCard.vue_vue_type_script_setup_true_lang.js +103 -0
  52. package/dist/components/VCard/VCard.vue_vue_type_script_setup_true_lang.js.map +1 -0
  53. package/dist/components/VCarousel/VCarousel.d.ts +1 -1
  54. package/dist/components/VCarousel/VCarousel.js.map +1 -1
  55. package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js +18 -18
  56. package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  57. package/dist/components/VCheckbox/VCheckMark.css +2 -0
  58. package/dist/components/VCheckbox/VCheckMark.js +9 -0
  59. package/dist/components/VCheckbox/VCheckMark.js.map +1 -0
  60. package/dist/components/VCheckbox/VCheckMark.vue_vue_type_script_setup_true_lang.js +33 -0
  61. package/dist/components/VCheckbox/VCheckMark.vue_vue_type_script_setup_true_lang.js.map +1 -0
  62. package/dist/components/VCheckbox/VCheckbox.css +1 -1
  63. package/dist/components/VCheckbox/VCheckbox.d.ts +8 -3
  64. package/dist/components/VCheckbox/VCheckbox.js.map +1 -1
  65. package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js +54 -69
  66. package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  67. package/dist/components/VChip/VChip.d.ts +6 -6
  68. package/dist/components/VChip/VChip.js.map +1 -1
  69. package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js +26 -26
  70. package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  71. package/dist/components/VColorInput/VColorInput.css +2 -0
  72. package/dist/components/VColorInput/VColorInput.d.ts +113 -0
  73. package/dist/components/VColorInput/VColorInput.js +9 -0
  74. package/dist/components/VColorInput/VColorInput.js.map +1 -0
  75. package/dist/components/VColorInput/VColorInput.vue_vue_type_script_setup_true_lang.js +230 -0
  76. package/dist/components/VColorInput/VColorInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  77. package/dist/components/VColorPicker/VColorPicker.css +2 -0
  78. package/dist/components/VColorPicker/VColorPicker.d.ts +67 -0
  79. package/dist/components/VColorPicker/VColorPicker.js +9 -0
  80. package/dist/components/VColorPicker/VColorPicker.js.map +1 -0
  81. package/dist/components/VColorPicker/VColorPicker.vue_vue_type_script_setup_true_lang.js +390 -0
  82. package/dist/components/VColorPicker/VColorPicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
  83. package/dist/components/VColorPicker/color.d.ts +42 -0
  84. package/dist/components/VColorPicker/color.js +158 -0
  85. package/dist/components/VColorPicker/color.js.map +1 -0
  86. package/dist/components/VCombobox/VCombobox.css +1 -1
  87. package/dist/components/VCombobox/VCombobox.d.ts +46 -60
  88. package/dist/components/VCombobox/VCombobox.js.map +1 -1
  89. package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js +271 -372
  90. package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  91. package/dist/components/VCommandPalette/VCommandPalette.css +2 -0
  92. package/dist/components/VCommandPalette/VCommandPalette.d.ts +163 -0
  93. package/dist/components/VCommandPalette/VCommandPalette.js +9 -0
  94. package/dist/components/VCommandPalette/VCommandPalette.js.map +1 -0
  95. package/dist/components/VCommandPalette/VCommandPalette.vue_vue_type_script_setup_true_lang.js +321 -0
  96. package/dist/components/VCommandPalette/VCommandPalette.vue_vue_type_script_setup_true_lang.js.map +1 -0
  97. package/dist/components/VCommandPalette/VCommandPaletteItem.css +2 -0
  98. package/dist/components/VCommandPalette/VCommandPaletteItem.d.ts +38 -0
  99. package/dist/components/VCommandPalette/VCommandPaletteItem.js +9 -0
  100. package/dist/components/VCommandPalette/VCommandPaletteItem.js.map +1 -0
  101. package/dist/components/VCommandPalette/VCommandPaletteItem.vue_vue_type_script_setup_true_lang.js +69 -0
  102. package/dist/components/VCommandPalette/VCommandPaletteItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
  103. package/dist/components/VContextMenu/VContextMenu.css +2 -0
  104. package/dist/components/VContextMenu/VContextMenu.d.ts +66 -0
  105. package/dist/components/VContextMenu/VContextMenu.js +9 -0
  106. package/dist/components/VContextMenu/VContextMenu.js.map +1 -0
  107. package/dist/components/VContextMenu/VContextMenu.vue_vue_type_script_setup_true_lang.js +148 -0
  108. package/dist/components/VContextMenu/VContextMenu.vue_vue_type_script_setup_true_lang.js.map +1 -0
  109. package/dist/components/VDataTable/VDataTable.css +1 -1
  110. package/dist/components/VDataTable/VDataTable.d.ts +41 -23
  111. package/dist/components/VDataTable/VDataTable.js.map +1 -1
  112. package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js +291 -186
  113. package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  114. package/dist/components/VDateInput/VDateInput.d.ts +27 -7
  115. package/dist/components/VDateInput/VDateInput.js.map +1 -1
  116. package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js +170 -162
  117. package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  118. package/dist/components/VDatePicker/VDatePicker.d.ts +3 -3
  119. package/dist/components/VDatePicker/VDatePicker.js.map +1 -1
  120. package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js +228 -227
  121. package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  122. package/dist/components/VDatePicker/keyboard.d.ts +7 -7
  123. package/dist/components/VDatePicker/keyboard.js +8 -6
  124. package/dist/components/VDatePicker/keyboard.js.map +1 -1
  125. package/dist/components/VDatePicker/names.js +16 -20
  126. package/dist/components/VDatePicker/names.js.map +1 -1
  127. package/dist/components/VDialog/VDialog.d.ts +2 -4
  128. package/dist/components/VDialog/VDialog.js.map +1 -1
  129. package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js +46 -77
  130. package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  131. package/dist/components/VDrawer/VDrawer.css +2 -0
  132. package/dist/components/VDrawer/VDrawer.d.ts +102 -0
  133. package/dist/components/VDrawer/VDrawer.js +9 -0
  134. package/dist/components/VDrawer/VDrawer.js.map +1 -0
  135. package/dist/components/VDrawer/VDrawer.vue_vue_type_script_setup_true_lang.js +128 -0
  136. package/dist/components/VDrawer/VDrawer.vue_vue_type_script_setup_true_lang.js.map +1 -0
  137. package/dist/components/VEmptyState/VEmptyState.css +2 -0
  138. package/dist/components/VEmptyState/VEmptyState.d.ts +43 -0
  139. package/dist/components/VEmptyState/VEmptyState.js +9 -0
  140. package/dist/components/VEmptyState/VEmptyState.js.map +1 -0
  141. package/dist/components/VEmptyState/VEmptyState.vue_vue_type_script_setup_true_lang.js +48 -0
  142. package/dist/components/VEmptyState/VEmptyState.vue_vue_type_script_setup_true_lang.js.map +1 -0
  143. package/dist/components/VField/VField.css +2 -0
  144. package/dist/components/VField/VField.d.ts +84 -0
  145. package/dist/components/VField/VField.js +9 -0
  146. package/dist/components/VField/VField.js.map +1 -0
  147. package/dist/components/VField/VField.vue_vue_type_script_setup_true_lang.js +99 -0
  148. package/dist/components/VField/VField.vue_vue_type_script_setup_true_lang.js.map +1 -0
  149. package/dist/components/VField/VFieldAnnouncer.d.ts +7 -0
  150. package/dist/components/VField/VFieldAnnouncer.js +7 -0
  151. package/dist/components/VField/VFieldAnnouncer.js.map +1 -0
  152. package/dist/components/VField/VFieldAnnouncer.vue_vue_type_script_setup_true_lang.js +19 -0
  153. package/dist/components/VField/VFieldAnnouncer.vue_vue_type_script_setup_true_lang.js.map +1 -0
  154. package/dist/components/VField/VFieldMessage.d.ts +11 -0
  155. package/dist/components/VField/VFieldMessage.js +7 -0
  156. package/dist/components/VField/VFieldMessage.js.map +1 -0
  157. package/dist/components/VField/VFieldMessage.vue_vue_type_script_setup_true_lang.js +32 -0
  158. package/dist/components/VField/VFieldMessage.vue_vue_type_script_setup_true_lang.js.map +1 -0
  159. package/dist/components/VFieldset/VFieldset.css +2 -0
  160. package/dist/components/VFieldset/VFieldset.d.ts +52 -0
  161. package/dist/components/VFieldset/VFieldset.js +9 -0
  162. package/dist/components/VFieldset/VFieldset.js.map +1 -0
  163. package/dist/components/VFieldset/VFieldset.vue_vue_type_script_setup_true_lang.js +63 -0
  164. package/dist/components/VFieldset/VFieldset.vue_vue_type_script_setup_true_lang.js.map +1 -0
  165. package/dist/components/VFileInput/VFileInput.css +1 -1
  166. package/dist/components/VFileInput/VFileInput.d.ts +31 -7
  167. package/dist/components/VFileInput/VFileInput.js.map +1 -1
  168. package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js +168 -161
  169. package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  170. package/dist/components/VFilePicker/VFilePicker.d.ts +4 -4
  171. package/dist/components/VHotkeys/VHotkeys.css +1 -1
  172. package/dist/components/VHotkeys/VHotkeys.js.map +1 -1
  173. package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js +27 -30
  174. package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js.map +1 -1
  175. package/dist/components/VHotkeys/platform.d.ts +2 -0
  176. package/dist/components/VHotkeys/platform.js +24 -5
  177. package/dist/components/VHotkeys/platform.js.map +1 -1
  178. package/dist/components/VHoverCard/VHoverCard.css +2 -0
  179. package/dist/components/VHoverCard/VHoverCard.d.ts +62 -0
  180. package/dist/components/VHoverCard/VHoverCard.js +9 -0
  181. package/dist/components/VHoverCard/VHoverCard.js.map +1 -0
  182. package/dist/components/VHoverCard/VHoverCard.vue_vue_type_script_setup_true_lang.js +97 -0
  183. package/dist/components/VHoverCard/VHoverCard.vue_vue_type_script_setup_true_lang.js.map +1 -0
  184. package/dist/components/VIcon/icons/add.d.ts +5 -0
  185. package/dist/components/VIcon/icons/add.js +9 -0
  186. package/dist/components/VIcon/icons/add.js.map +1 -0
  187. package/dist/components/VIcon/icons/colorize.d.ts +5 -0
  188. package/dist/components/VIcon/icons/colorize.js +9 -0
  189. package/dist/components/VIcon/icons/colorize.js.map +1 -0
  190. package/dist/components/VIcon/icons/inbox.d.ts +5 -0
  191. package/dist/components/VIcon/icons/inbox.js +9 -0
  192. package/dist/components/VIcon/icons/inbox.js.map +1 -0
  193. package/dist/components/VIcon/icons/index.d.ts +42 -2
  194. package/dist/components/VIcon/icons/index.js +88 -72
  195. package/dist/components/VIcon/icons/index.js.map +1 -1
  196. package/dist/components/VIcon/icons/names.d.ts +2 -2
  197. package/dist/components/VIcon/icons/names.js +1 -1
  198. package/dist/components/VIcon/icons/names.js.map +1 -1
  199. package/dist/components/VIcon/icons/open_in_new.d.ts +5 -0
  200. package/dist/components/VIcon/icons/open_in_new.js +9 -0
  201. package/dist/components/VIcon/icons/open_in_new.js.map +1 -0
  202. package/dist/components/VIcon/icons/priority_high.d.ts +5 -0
  203. package/dist/components/VIcon/icons/priority_high.js +9 -0
  204. package/dist/components/VIcon/icons/priority_high.js.map +1 -0
  205. package/dist/components/VIcon/icons/remove.d.ts +5 -0
  206. package/dist/components/VIcon/icons/remove.js +9 -0
  207. package/dist/components/VIcon/icons/remove.js.map +1 -0
  208. package/dist/components/VIcon/icons/search_off.d.ts +5 -0
  209. package/dist/components/VIcon/icons/search_off.js +9 -0
  210. package/dist/components/VIcon/icons/search_off.js.map +1 -0
  211. package/dist/components/VIcon/icons/star.d.ts +5 -0
  212. package/dist/components/VIcon/icons/star.js +9 -0
  213. package/dist/components/VIcon/icons/star.js.map +1 -0
  214. package/dist/components/VIconButton/VIconButton.d.ts +4 -4
  215. package/dist/components/VInput/VInput.css +1 -1
  216. package/dist/components/VInput/VInput.d.ts +51 -2
  217. package/dist/components/VInput/VInput.js.map +1 -1
  218. package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js +129 -106
  219. package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  220. package/dist/components/VInput/VInputGroup.css +1 -1
  221. package/dist/components/VInput/VInputGroup.d.ts +20 -0
  222. package/dist/components/VInput/VInputGroup.js.map +1 -1
  223. package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js +50 -51
  224. package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  225. package/dist/components/VInputOTP/VInputOTP.css +1 -1
  226. package/dist/components/VInputOTP/VInputOTP.d.ts +27 -4
  227. package/dist/components/VInputOTP/VInputOTP.js.map +1 -1
  228. package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js +131 -113
  229. package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js.map +1 -1
  230. package/dist/components/VLink/VLink.css +2 -0
  231. package/dist/components/VLink/VLink.d.ts +53 -0
  232. package/dist/components/VLink/VLink.js +9 -0
  233. package/dist/components/VLink/VLink.js.map +1 -0
  234. package/dist/components/VLink/VLink.vue_vue_type_script_setup_true_lang.js +58 -0
  235. package/dist/components/VLink/VLink.vue_vue_type_script_setup_true_lang.js.map +1 -0
  236. package/dist/components/VListbox/VListboxChevron.css +2 -0
  237. package/dist/components/VListbox/VListboxChevron.d.ts +12 -0
  238. package/dist/components/VListbox/VListboxChevron.js +9 -0
  239. package/dist/components/VListbox/VListboxChevron.js.map +1 -0
  240. package/dist/components/VListbox/VListboxChevron.vue_vue_type_script_setup_true_lang.js +25 -0
  241. package/dist/components/VListbox/VListboxChevron.vue_vue_type_script_setup_true_lang.js.map +1 -0
  242. package/dist/components/VListbox/VListboxGroup.css +2 -0
  243. package/dist/components/VListbox/VListboxGroup.d.ts +27 -0
  244. package/dist/components/VListbox/VListboxGroup.js +9 -0
  245. package/dist/components/VListbox/VListboxGroup.js.map +1 -0
  246. package/dist/components/VListbox/VListboxGroup.vue_vue_type_script_setup_true_lang.js +21 -0
  247. package/dist/components/VListbox/VListboxGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
  248. package/dist/components/VListbox/VListboxOption.css +2 -0
  249. package/dist/components/{VCombobox/VComboboxOption.d.ts → VListbox/VListboxOption.d.ts} +4 -4
  250. package/dist/components/VListbox/VListboxOption.js +9 -0
  251. package/dist/components/VListbox/VListboxOption.js.map +1 -0
  252. package/dist/components/{VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js → VListbox/VListboxOption.vue_vue_type_script_setup_true_lang.js} +6 -6
  253. package/dist/components/VListbox/VListboxOption.vue_vue_type_script_setup_true_lang.js.map +1 -0
  254. package/dist/components/VListbox/VListboxPanel.css +2 -0
  255. package/dist/components/VListbox/VListboxPanel.d.ts +59 -0
  256. package/dist/components/VListbox/VListboxPanel.js +9 -0
  257. package/dist/components/VListbox/VListboxPanel.js.map +1 -0
  258. package/dist/components/VListbox/VListboxPanel.vue_vue_type_script_setup_true_lang.js +123 -0
  259. package/dist/components/VListbox/VListboxPanel.vue_vue_type_script_setup_true_lang.js.map +1 -0
  260. package/dist/components/VListbox/VListboxSeparator.css +2 -0
  261. package/dist/components/VListbox/VListboxSeparator.d.ts +3 -0
  262. package/dist/components/VListbox/VListboxSeparator.js +9 -0
  263. package/dist/components/VListbox/VListboxSeparator.js.map +1 -0
  264. package/dist/components/{VCombobox/VComboboxSeparator.vue_vue_type_script_setup_true_lang.js → VListbox/VListboxSeparator.vue_vue_type_script_setup_true_lang.js} +4 -4
  265. package/dist/components/VListbox/VListboxSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -0
  266. package/dist/components/VListbox/VListboxValues.css +2 -0
  267. package/dist/components/VListbox/VListboxValues.d.ts +52 -0
  268. package/dist/components/VListbox/VListboxValues.js +9 -0
  269. package/dist/components/VListbox/VListboxValues.js.map +1 -0
  270. package/dist/components/VListbox/VListboxValues.vue_vue_type_script_setup_true_lang.js +103 -0
  271. package/dist/components/VListbox/VListboxValues.vue_vue_type_script_setup_true_lang.js.map +1 -0
  272. package/dist/components/VMenu/VMenu.d.ts +1 -1
  273. package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js +9 -9
  274. package/dist/components/VMenu/VMenuItem.d.ts +1 -1
  275. package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js +16 -16
  276. package/dist/components/VMenu/VMenuPanel.d.ts +2 -2
  277. package/dist/components/VMenu/VMenuPanel.js.map +1 -1
  278. package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js +7 -7
  279. package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  280. package/dist/components/VMeter/VMeter.css +2 -0
  281. package/dist/components/VMeter/VMeter.d.ts +77 -0
  282. package/dist/components/VMeter/VMeter.js +9 -0
  283. package/dist/components/VMeter/VMeter.js.map +1 -0
  284. package/dist/components/VMeter/VMeter.vue_vue_type_script_setup_true_lang.js +113 -0
  285. package/dist/components/VMeter/VMeter.vue_vue_type_script_setup_true_lang.js.map +1 -0
  286. package/dist/components/VNumberInput/VNumberInput.css +2 -0
  287. package/dist/components/VNumberInput/VNumberInput.d.ts +114 -0
  288. package/dist/components/VNumberInput/VNumberInput.js +9 -0
  289. package/dist/components/VNumberInput/VNumberInput.js.map +1 -0
  290. package/dist/components/VNumberInput/VNumberInput.vue_vue_type_script_setup_true_lang.js +251 -0
  291. package/dist/components/VNumberInput/VNumberInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  292. package/dist/components/VNumberInput/number.d.ts +30 -0
  293. package/dist/components/VNumberInput/number.js +38 -0
  294. package/dist/components/VNumberInput/number.js.map +1 -0
  295. package/dist/components/VPagination/VPagination.css +1 -1
  296. package/dist/components/VPagination/VPagination.d.ts +4 -12
  297. package/dist/components/VPagination/VPagination.js.map +1 -1
  298. package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js +89 -96
  299. package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
  300. package/dist/components/VProgressCircular/VProgressCircular.d.ts +2 -2
  301. package/dist/components/VProgressLinear/VProgressLinear.css +1 -1
  302. package/dist/components/VProgressLinear/VProgressLinear.d.ts +10 -7
  303. package/dist/components/VProgressLinear/VProgressLinear.js.map +1 -1
  304. package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js +52 -34
  305. package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js.map +1 -1
  306. package/dist/components/VRadio/VRadio.d.ts +8 -3
  307. package/dist/components/VRadio/VRadio.js.map +1 -1
  308. package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js +52 -46
  309. package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js.map +1 -1
  310. package/dist/components/VRating/VRating.css +2 -0
  311. package/dist/components/VRating/VRating.d.ts +92 -0
  312. package/dist/components/VRating/VRating.js +9 -0
  313. package/dist/components/VRating/VRating.js.map +1 -0
  314. package/dist/components/VRating/VRating.vue_vue_type_script_setup_true_lang.js +158 -0
  315. package/dist/components/VRating/VRating.vue_vue_type_script_setup_true_lang.js.map +1 -0
  316. package/dist/components/VResizable/VResizable.css +2 -0
  317. package/dist/components/VResizable/VResizable.d.ts +50 -0
  318. package/dist/components/VResizable/VResizable.js +9 -0
  319. package/dist/components/VResizable/VResizable.js.map +1 -0
  320. package/dist/components/VResizable/VResizable.vue_vue_type_script_setup_true_lang.js +225 -0
  321. package/dist/components/VResizable/VResizable.vue_vue_type_script_setup_true_lang.js.map +1 -0
  322. package/dist/components/VResizable/VResizablePanel.css +2 -0
  323. package/dist/components/VResizable/VResizablePanel.d.ts +60 -0
  324. package/dist/components/VResizable/VResizablePanel.js +9 -0
  325. package/dist/components/VResizable/VResizablePanel.js.map +1 -0
  326. package/dist/components/VResizable/VResizablePanel.vue_vue_type_script_setup_true_lang.js +83 -0
  327. package/dist/components/VResizable/VResizablePanel.vue_vue_type_script_setup_true_lang.js.map +1 -0
  328. package/dist/components/VResizable/context.d.ts +24 -0
  329. package/dist/components/VResizable/context.js +6 -0
  330. package/dist/components/VResizable/context.js.map +1 -0
  331. package/dist/components/VResizable/layout.d.ts +28 -0
  332. package/dist/components/VResizable/layout.js +41 -0
  333. package/dist/components/VResizable/layout.js.map +1 -0
  334. package/dist/components/VSelect/VSelect.css +2 -0
  335. package/dist/components/VSelect/VSelect.d.ts +193 -0
  336. package/dist/components/VSelect/VSelect.js +9 -0
  337. package/dist/components/VSelect/VSelect.js.map +1 -0
  338. package/dist/components/VSelect/VSelect.vue_vue_type_script_setup_true_lang.js +424 -0
  339. package/dist/components/VSelect/VSelect.vue_vue_type_script_setup_true_lang.js.map +1 -0
  340. package/dist/components/VSeparator/VSeparator.js.map +1 -1
  341. package/dist/components/VSeparator/VSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
  342. package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js +8 -8
  343. package/dist/components/VSideNavigation/VSideNavigationItem.d.ts +2 -2
  344. package/dist/components/VSideNavigation/VSideNavigationItem.js.map +1 -1
  345. package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js +3 -3
  346. package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  347. package/dist/components/VSkeletonLoader/VSkeletonLoader.d.ts +3 -3
  348. package/dist/components/VSlider/VSlider.css +1 -1
  349. package/dist/components/VSlider/VSlider.d.ts +34 -8
  350. package/dist/components/VSlider/VSlider.js.map +1 -1
  351. package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js +236 -215
  352. package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js.map +1 -1
  353. package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js +4 -4
  354. package/dist/components/VSnackbar/state.js.map +1 -1
  355. package/dist/components/VSplitButton/VSplitButton.css +2 -0
  356. package/dist/components/VSplitButton/VSplitButton.d.ts +114 -0
  357. package/dist/components/VSplitButton/VSplitButton.js +9 -0
  358. package/dist/components/VSplitButton/VSplitButton.js.map +1 -0
  359. package/dist/components/VSplitButton/VSplitButton.vue_vue_type_script_setup_true_lang.js +148 -0
  360. package/dist/components/VSplitButton/VSplitButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
  361. package/dist/components/VStepper/VStepper.css +2 -0
  362. package/dist/components/VStepper/VStepper.d.ts +73 -0
  363. package/dist/components/VStepper/VStepper.js +9 -0
  364. package/dist/components/VStepper/VStepper.js.map +1 -0
  365. package/dist/components/VStepper/VStepper.vue_vue_type_script_setup_true_lang.js +96 -0
  366. package/dist/components/VStepper/VStepper.vue_vue_type_script_setup_true_lang.js.map +1 -0
  367. package/dist/components/VSwitch/VSwitch.d.ts +8 -3
  368. package/dist/components/VSwitch/VSwitch.js.map +1 -1
  369. package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js +53 -47
  370. package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js.map +1 -1
  371. package/dist/components/VTabs/VTab.css +1 -1
  372. package/dist/components/VTabs/VTab.d.ts +1 -1
  373. package/dist/components/VTabs/VTab.js.map +1 -1
  374. package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js.map +1 -1
  375. package/dist/components/VTabs/VTabs.css +1 -1
  376. package/dist/components/VTabs/VTabs.d.ts +13 -5
  377. package/dist/components/VTabs/VTabs.js.map +1 -1
  378. package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js +20 -20
  379. package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
  380. package/dist/components/VTextarea/VTextarea.css +1 -1
  381. package/dist/components/VTextarea/VTextarea.d.ts +22 -2
  382. package/dist/components/VTextarea/VTextarea.js.map +1 -1
  383. package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js +108 -100
  384. package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js.map +1 -1
  385. package/dist/components/VTimeInput/VTimeInput.d.ts +27 -7
  386. package/dist/components/VTimeInput/VTimeInput.js.map +1 -1
  387. package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js +187 -171
  388. package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  389. package/dist/components/VTimePicker/VTimePicker.d.ts +2 -2
  390. package/dist/components/VTimePicker/VTimePicker.js.map +1 -1
  391. package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js +15 -15
  392. package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  393. package/dist/components/VTimeline/VTimeline.css +2 -0
  394. package/dist/components/VTimeline/VTimeline.d.ts +59 -0
  395. package/dist/components/VTimeline/VTimeline.js +9 -0
  396. package/dist/components/VTimeline/VTimeline.js.map +1 -0
  397. package/dist/components/VTimeline/VTimeline.vue_vue_type_script_setup_true_lang.js +53 -0
  398. package/dist/components/VTimeline/VTimeline.vue_vue_type_script_setup_true_lang.js.map +1 -0
  399. package/dist/components/VTimeline/VTimelineItem.css +2 -0
  400. package/dist/components/VTimeline/VTimelineItem.d.ts +48 -0
  401. package/dist/components/VTimeline/VTimelineItem.js +9 -0
  402. package/dist/components/VTimeline/VTimelineItem.js.map +1 -0
  403. package/dist/components/VTimeline/VTimelineItem.vue_vue_type_script_setup_true_lang.js +70 -0
  404. package/dist/components/VTimeline/VTimelineItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
  405. package/dist/components/VTimeline/context.d.ts +11 -0
  406. package/dist/components/VTimeline/context.js +6 -0
  407. package/dist/components/VTimeline/context.js.map +1 -0
  408. package/dist/components/VTimeline/datetime.d.ts +8 -0
  409. package/dist/components/VTimeline/datetime.js +36 -0
  410. package/dist/components/VTimeline/datetime.js.map +1 -0
  411. package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js +8 -8
  412. package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js +12 -12
  413. package/dist/components/VToggle/VToggle.d.ts +4 -4
  414. package/dist/components/VToggle/VToggleItem.d.ts +1 -1
  415. package/dist/components/VTooltip/VTooltip.d.ts +8 -2
  416. package/dist/components/VTooltip/VTooltip.js.map +1 -1
  417. package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js +45 -43
  418. package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  419. package/dist/components/VTreeView/VTreeView.css +2 -0
  420. package/dist/components/VTreeView/VTreeView.d.ts +112 -0
  421. package/dist/components/VTreeView/VTreeView.js +9 -0
  422. package/dist/components/VTreeView/VTreeView.js.map +1 -0
  423. package/dist/components/VTreeView/VTreeView.vue_vue_type_script_setup_true_lang.js +321 -0
  424. package/dist/components/VTreeView/VTreeView.vue_vue_type_script_setup_true_lang.js.map +1 -0
  425. package/dist/components/VTypography/VTypography.d.ts +1 -1
  426. package/dist/components/VVirtualList/VVirtualList.css +2 -0
  427. package/dist/components/VVirtualList/VVirtualList.d.ts +78 -0
  428. package/dist/components/VVirtualList/VVirtualList.js +9 -0
  429. package/dist/components/VVirtualList/VVirtualList.js.map +1 -0
  430. package/dist/components/VVirtualList/VVirtualList.vue_vue_type_script_setup_true_lang.js +114 -0
  431. package/dist/components/VVirtualList/VVirtualList.vue_vue_type_script_setup_true_lang.js.map +1 -0
  432. package/dist/composables/useChoice.d.ts +28 -0
  433. package/dist/composables/useChoice.js +28 -0
  434. package/dist/composables/useChoice.js.map +1 -0
  435. package/dist/composables/useDebouncedSearch.d.ts +17 -0
  436. package/dist/composables/useDebouncedSearch.js +18 -0
  437. package/dist/composables/useDebouncedSearch.js.map +1 -0
  438. package/dist/composables/useEscapeDismiss.d.ts +8 -0
  439. package/dist/composables/useEscapeDismiss.js +16 -0
  440. package/dist/composables/useEscapeDismiss.js.map +1 -0
  441. package/dist/composables/useFieldIds.d.ts +2 -1
  442. package/dist/composables/useFieldIds.js +7 -6
  443. package/dist/composables/useFieldIds.js.map +1 -1
  444. package/dist/composables/useFieldPanel.d.ts +1 -0
  445. package/dist/composables/useFieldPanel.js +52 -42
  446. package/dist/composables/useFieldPanel.js.map +1 -1
  447. package/dist/composables/useFileField.d.ts +1 -3
  448. package/dist/composables/useFileField.js +48 -50
  449. package/dist/composables/useFileField.js.map +1 -1
  450. package/dist/composables/useHotkeyListener.d.ts +17 -0
  451. package/dist/composables/useHotkeyListener.js +26 -0
  452. package/dist/composables/useHotkeyListener.js.map +1 -0
  453. package/dist/composables/useIconClickHandlers.d.ts +2 -10
  454. package/dist/composables/useIconClickHandlers.js +1 -1
  455. package/dist/composables/useIconClickHandlers.js.map +1 -1
  456. package/dist/{components/VCombobox/infiniteScroll.d.ts → composables/useInfiniteScroll.d.ts} +6 -0
  457. package/dist/{components/VCombobox/infiniteScroll.js → composables/useInfiniteScroll.js} +7 -7
  458. package/dist/composables/useInfiniteScroll.js.map +1 -0
  459. package/dist/composables/useListbox.d.ts +132 -0
  460. package/dist/composables/useListbox.js +227 -0
  461. package/dist/composables/useListbox.js.map +1 -0
  462. package/dist/composables/useModalDialog.d.ts +28 -0
  463. package/dist/composables/useModalDialog.js +60 -0
  464. package/dist/composables/useModalDialog.js.map +1 -0
  465. package/dist/composables/useRootAttrs.d.ts +2 -3
  466. package/dist/composables/useRootAttrs.js.map +1 -1
  467. package/dist/composables/useVirtualList.d.ts +46 -0
  468. package/dist/composables/useVirtualList.js +145 -0
  469. package/dist/composables/useVirtualList.js.map +1 -0
  470. package/dist/i18n/en.js +50 -0
  471. package/dist/i18n/en.js.map +1 -1
  472. package/dist/i18n/fr.js +50 -0
  473. package/dist/i18n/fr.js.map +1 -1
  474. package/dist/i18n/types.d.ts +103 -2
  475. package/dist/icons.js +45 -37
  476. package/dist/index.d.ts +50 -4
  477. package/dist/index.js +80 -56
  478. package/dist/styles.css +1 -1
  479. package/dist/tokens/index.d.ts +43 -0
  480. package/dist/tokens/semantic.d.ts +42 -0
  481. package/dist/tokens/semantic.js +43 -1
  482. package/dist/tokens/semantic.js.map +1 -1
  483. package/dist/tokens/themes/dark.d.ts +1 -0
  484. package/dist/tokens/themes/dark.js +1 -0
  485. package/dist/tokens/themes/dark.js.map +1 -1
  486. package/dist/tokens.json +215 -1
  487. package/dist/types.d.ts +57 -4
  488. package/dist/utils/arrowNav.js.map +1 -1
  489. package/dist/utils/attrs.d.ts +9 -0
  490. package/dist/utils/attrs.js +14 -0
  491. package/dist/utils/attrs.js.map +1 -0
  492. package/dist/utils/date.d.ts +1 -0
  493. package/dist/utils/date.js +2 -2
  494. package/dist/utils/date.js.map +1 -1
  495. package/package.json +1 -1
  496. package/dist/components/VCombobox/VComboboxGroup.css +0 -2
  497. package/dist/components/VCombobox/VComboboxGroup.d.ts +0 -17
  498. package/dist/components/VCombobox/VComboboxGroup.js +0 -9
  499. package/dist/components/VCombobox/VComboboxGroup.js.map +0 -1
  500. package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js +0 -21
  501. package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js.map +0 -1
  502. package/dist/components/VCombobox/VComboboxOption.css +0 -2
  503. package/dist/components/VCombobox/VComboboxOption.js +0 -9
  504. package/dist/components/VCombobox/VComboboxOption.js.map +0 -1
  505. package/dist/components/VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js.map +0 -1
  506. package/dist/components/VCombobox/VComboboxSeparator.css +0 -2
  507. package/dist/components/VCombobox/VComboboxSeparator.js +0 -9
  508. package/dist/components/VCombobox/VComboboxSeparator.js.map +0 -1
  509. package/dist/components/VCombobox/VComboboxSeparator.vue_vue_type_script_setup_true_lang.js.map +0 -1
  510. package/dist/components/VCombobox/infiniteScroll.js.map +0 -1
  511. /package/dist/components/{VCombobox/VComboboxSeparator.d.ts → VCheckbox/VCheckMark.d.ts} +0 -0
@@ -4,22 +4,23 @@ import n from "../VIcon/VIcon.js";
4
4
  import r from "../VTypography/VTypography.js";
5
5
  import i from "../VIconButton/VIconButton.js";
6
6
  import { close as a } from "../VIcon/icons/close.js";
7
- import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, mergeModels as h, mergeProps as g, nextTick as _, onBeforeUnmount as v, openBlock as y, ref as b, renderSlot as x, toDisplayString as S, unref as C, useAttrs as w, useId as T, useModel as E, watch as D, withCtx as O } from "vue";
7
+ import { useModalDialog as o } from "../../composables/useModalDialog.js";
8
+ import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, mergeModels as g, mergeProps as _, openBlock as v, renderSlot as y, toDisplayString as b, unref as x, useId as S, useModel as C, withCtx as w } from "vue";
8
9
  //#region src/components/VDialog/VDialog.vue?vue&type=script&setup=true&lang.ts
9
- var k = [
10
+ var T = [
10
11
  "aria-labelledby",
11
12
  "aria-describedby",
12
13
  "role"
13
- ], A = { class: "v-dialog-header" }, j = { class: "v-dialog-titles" }, M = {
14
+ ], E = { class: "v-dialog-header" }, D = { class: "v-dialog-titles" }, O = {
14
15
  key: 0,
15
16
  class: "v-dialog-header-actions"
16
- }, N = { class: "v-dialog-scroll" }, P = { class: "v-dialog-body" }, F = {
17
+ }, k = { class: "v-dialog-scroll" }, A = { class: "v-dialog-body" }, j = {
17
18
  key: 0,
18
19
  class: "v-dialog-footer"
19
- }, I = /*@__PURE__*/ m({
20
+ }, M = /*@__PURE__*/ h({
20
21
  inheritAttrs: !1,
21
22
  __name: "VDialog",
22
- props: /*@__PURE__*/ h({
23
+ props: /*@__PURE__*/ g({
23
24
  title: { default: void 0 },
24
25
  subtitle: { default: void 0 },
25
26
  width: { default: void 0 },
@@ -45,111 +46,79 @@ var k = [
45
46
  openModifiers: {}
46
47
  }),
47
48
  emits: ["update:open"],
48
- setup(m, { expose: h }) {
49
- let I = m, L = e(), R = s(() => I.closeLabel ?? L.value.common.close), z = E(m, "open"), B = w(), V = b(null), H = T(), U = T(), W = s(() => I.persistentBackdrop ? I.persistentEscape ? "none" : "closerequest" : "any"), G = s(() => ({
50
- ...B,
51
- closedby: W.value
52
- }));
53
- function K() {
54
- return z.value = !0, _();
55
- }
56
- function q() {
57
- V.value?.close();
58
- }
59
- let J = s(() => ({
60
- onClick: K,
49
+ setup(h, { expose: g }) {
50
+ let M = h, N = e(), P = c(() => M.closeLabel ?? N.value.common.close), F = C(h, "open"), I = S(), L = S(), { dialogEl: R, rendered: z, rootAttrs: B, show: V, close: H, onClose: U, onCancel: W, onPointerdown: G, onBackdropClick: K } = o(F, {
51
+ persistentBackdrop: () => M.persistentBackdrop,
52
+ persistentEscape: () => M.persistentEscape
53
+ }), q = c(() => ({
54
+ onClick: V,
61
55
  "aria-haspopup": "dialog"
62
56
  }));
63
- D(z, (e) => {
64
- e || V.value?.close();
65
- }), D(V, (e) => e?.showModal(), { flush: "post" });
66
- function Y(e) {
67
- e.target === V.value && (z.value = !1);
68
- }
69
- v(() => {
70
- z.value &&= !1;
71
- });
72
- let X = () => !("closedBy" in HTMLDialogElement.prototype);
73
- function Z(e) {
74
- X() && W.value === "none" && e.preventDefault();
75
- }
76
- function Q(e) {
77
- let t = V.value?.getBoundingClientRect();
78
- return t ? e.clientX < t.left || e.clientX > t.right || e.clientY < t.top || e.clientY > t.bottom : !1;
79
- }
80
- let $ = !1;
81
- function ee(e) {
82
- $ = X() && e.target === V.value && Q(e);
83
- }
84
- function te(e) {
85
- let t = $ && e.target === V.value && Q(e);
86
- $ = !1, t && X() && W.value === "any" && q();
87
- }
88
- return h({
89
- show: K,
90
- close: q,
91
- el: V
92
- }), (e, s) => (y(), u(o, null, [x(e.$slots, "trigger", { triggerProps: J.value }), z.value ? (y(), u("dialog", g({
57
+ return g({
58
+ show: V,
59
+ close: H,
60
+ el: R
61
+ }), (e, o) => (v(), d(s, null, [y(e.$slots, "trigger", { triggerProps: q.value }), x(z) ? (v(), d("dialog", _({
93
62
  key: 0,
94
63
  ref_key: "dialogEl",
95
- ref: V,
96
- "aria-labelledby": m.title ? C(H) : void 0,
97
- "aria-describedby": m.subtitle ? C(U) : void 0
98
- }, G.value, {
64
+ ref: R,
65
+ "aria-labelledby": h.title ? x(I) : void 0,
66
+ "aria-describedby": h.subtitle ? x(L) : void 0
67
+ }, x(B), {
99
68
  class: "v-dialog",
100
- style: { "--dialog-width": C(t)(m.width) },
101
- role: m.role === "alertdialog" ? "alertdialog" : void 0,
102
- onClose: Y,
103
- onCancel: Z,
104
- onPointerdown: ee,
105
- onClick: te
69
+ style: { "--dialog-width": x(t)(h.width) },
70
+ role: h.role === "alertdialog" ? "alertdialog" : void 0,
71
+ onClose: o[0] ||= (...e) => x(U) && x(U)(...e),
72
+ onCancel: o[1] ||= (...e) => x(W) && x(W)(...e),
73
+ onPointerdown: o[2] ||= (...e) => x(G) && x(G)(...e),
74
+ onClick: o[3] ||= (...e) => x(K) && x(K)(...e)
106
75
  }), [
107
- d("header", A, [x(e.$slots, "header", {}, () => [d("div", j, [m.title ? (y(), c(r, {
76
+ f("header", E, [y(e.$slots, "header", {}, () => [f("div", D, [h.title ? (v(), l(r, {
108
77
  key: 0,
109
- id: C(H),
78
+ id: x(I),
110
79
  as: "h2",
111
80
  variant: "heading-3",
112
81
  class: "v-dialog-title"
113
82
  }, {
114
- default: O(() => [f(S(m.title), 1)]),
83
+ default: w(() => [p(b(h.title), 1)]),
115
84
  _: 1
116
- }, 8, ["id"])) : l("", !0), m.subtitle ? (y(), c(r, {
85
+ }, 8, ["id"])) : u("", !0), h.subtitle ? (v(), l(r, {
117
86
  key: 1,
118
- id: C(U),
87
+ id: x(L),
119
88
  variant: "subtitle",
120
89
  tone: "muted",
121
90
  class: "v-dialog-subtitle"
122
91
  }, {
123
- default: O(() => [f(S(m.subtitle), 1)]),
92
+ default: w(() => [p(b(h.subtitle), 1)]),
124
93
  _: 1
125
- }, 8, ["id"])) : l("", !0)])]), !m.hideClose || e.$slots["header-actions"] ? (y(), u("div", M, [x(e.$slots, "header-actions"), m.hideClose ? l("", !0) : (y(), c(i, {
94
+ }, 8, ["id"])) : u("", !0)])]), !h.hideClose || e.$slots["header-actions"] ? (v(), d("div", O, [y(e.$slots, "header-actions"), h.hideClose ? u("", !0) : (v(), l(i, {
126
95
  key: 0,
127
96
  class: "v-dialog-close",
128
- label: R.value,
97
+ label: P.value,
129
98
  variant: "ghost",
130
99
  tone: "neutral",
131
100
  size: "sm",
132
- onClick: q
101
+ onClick: x(H)
133
102
  }, {
134
- default: O(() => [p(n, { name: C(a) }, null, 8, ["name"])]),
103
+ default: w(() => [m(n, { name: x(a) }, null, 8, ["name"])]),
135
104
  _: 1
136
- }, 8, ["label"]))])) : l("", !0)]),
137
- d("div", N, [
138
- s[0] ||= d("span", {
105
+ }, 8, ["label", "onClick"]))])) : u("", !0)]),
106
+ f("div", k, [
107
+ o[4] ||= f("span", {
139
108
  class: "v-dialog-edge v-dialog-edge--top",
140
109
  "aria-hidden": "true"
141
110
  }, null, -1),
142
- d("div", P, [x(e.$slots, "default")]),
143
- s[1] ||= d("span", {
111
+ f("div", A, [y(e.$slots, "default")]),
112
+ o[5] ||= f("span", {
144
113
  class: "v-dialog-edge v-dialog-edge--bottom",
145
114
  "aria-hidden": "true"
146
115
  }, null, -1)
147
116
  ]),
148
- e.$slots.footer ? (y(), u("footer", F, [x(e.$slots, "footer")])) : l("", !0)
149
- ], 16, k)) : l("", !0)], 64));
117
+ e.$slots.footer ? (v(), d("footer", j, [y(e.$slots, "footer")])) : u("", !0)
118
+ ], 16, T)) : u("", !0)], 64));
150
119
  }
151
120
  });
152
121
  //#endregion
153
- export { I as default };
122
+ export { M as default };
154
123
 
155
124
  //# sourceMappingURL=VDialog.vue_vue_type_script_setup_true_lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VDialog.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/VDialog/VDialog.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @core\n/**\n * Native showModal supplies top-layer placement and modal focus. JavaScript bridges v-model to\n * imperative open/close and provides guarded dismissal where closedBy is absent.\n */\n\nimport { computed, nextTick, onBeforeUnmount, ref, useAttrs, useId, watch } from 'vue'\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { close as closeIcon } from '../VIcon/icons/close'\nimport VIconButton from '../VIconButton/VIconButton.vue'\nimport VTypography from '../VTypography/VTypography.vue'\nimport { useMessages } from '../../i18n/state'\nimport { cssSize } from '../../utils/css'\n\n/** How assistive technology announces the dialog. */\nexport type DialogRole = 'dialog' | 'alertdialog'\n\ninterface DialogProps {\n /**\n * The title of the dialog, which also names it for assistive technology. It is\n * ignored when the `#header` slot replaces the whole header.\n */\n title?: string\n /** A line under the title, explaining what the dialog is asking. */\n subtitle?: string\n /**\n * How wide the dialog is: a number is read as pixels, a string as any CSS length. Left out,\n * it takes the `--vectis-control-size-dialog-width` token, 400px by default.\n */\n width?: number | string\n /**\n * What kind of dialog this is. `alertdialog` is for one that must be answered\n * explicitly, and it makes screen readers announce it more insistently. VDialogAlert is\n * exactly that.\n */\n role?: DialogRole\n /**\n * Takes the close cross out of the header, leaving the reader with Escape, the\n * backdrop and whatever the footer offers.\n */\n hideClose?: boolean\n /** Stops a click outside the dialog from closing it. */\n persistentBackdrop?: boolean\n /**\n * Stops the Escape key from closing the dialog. Note that refusing Escape while the\n * backdrop still closes cannot be expressed natively, so both routes are then\n * allowed.\n */\n persistentEscape?: boolean\n /** What the close cross does, in words. It falls back to the design system dictionary. */\n closeLabel?: string\n}\n\nconst props = withDefaults(defineProps<DialogProps>(), {\n title: undefined,\n subtitle: undefined,\n width: undefined,\n role: 'dialog',\n hideClose: false,\n persistentBackdrop: false,\n persistentEscape: false,\n closeLabel: undefined,\n})\n\nconst m = useMessages()\nconst resolvedCloseLabel = computed(() => props.closeLabel ?? m.value.common.close)\n\n/** Whether the dialog is showing. */\nconst open = defineModel<boolean>('open', { default: false })\n\n/** What the trigger has to carry: the click that opens the dialog, and the fact that it does. */\nexport type DialogTriggerProps = {\n onClick: () => void\n 'aria-haspopup': 'dialog'\n}\n\ndefineSlots<{\n /** The body of the dialog. This is the part that scrolls when there is too much of it. */\n default(): unknown\n /** Replaces the title and subtitle block with content of your own. */\n header?(): unknown\n /** Extra controls in the header, placed before the close cross: a menu, a full-screen toggle. */\n 'header-actions'?(): unknown\n /** The buttons at the foot of the dialog. */\n footer?(): unknown\n /**\n * The button that opens the dialog. Bind the `triggerProps` it receives onto it. It stays\n * rendered always, unlike the dialog itself.\n */\n trigger?(props: { triggerProps: DialogTriggerProps }): unknown\n}>()\n\ndefineOptions({ inheritAttrs: false })\n\nconst attrs = useAttrs()\nconst dialogEl = ref<HTMLDialogElement | null>(null)\nconst titleId = useId()\nconst subtitleId = useId()\n\n/**\n * Which dismissals the browser itself accepts, declared as an attribute rather than handled in\n * code: everything, Escape alone, or nothing. One combination cannot be expressed that way; a\n * click outside allowed while Escape is not; and it falls back to allowing both.\n */\nconst closedby = computed(() =>\n props.persistentBackdrop ? (props.persistentEscape ? 'none' : 'closerequest') : 'any',\n)\n\n// @fallback\n// The `closedby` attribute is newer than the type definitions shipped with TypeScript, so\n// writing it directly in the template would be reported as an unknown attribute. Passing it\n// inside a bound object goes through the same path as any forwarded attribute, which is not\n// checked element by element.\nconst rootAttrs = computed(() => ({ ...attrs, closedby: closedby.value }))\n\nfunction show(): Promise<void> {\n open.value = true\n return nextTick()\n}\n\nfunction requestClose() {\n // Closing the element is enough: the browser then fires its own close event, which puts the\n // model back in step below.\n dialogEl.value?.close()\n}\n\nconst triggerProps = computed<DialogTriggerProps>(() => ({\n onClick: show,\n 'aria-haspopup': 'dialog',\n}))\n\n// Close before v-if removes the element so the browser restores the invoker's focus.\nwatch(open, (value) => {\n if (!value) dialogEl.value?.close()\n})\n\n// @ssr\n// Template refs become available after mounting, including when hydrating an open dialog.\nwatch(dialogEl, (dialog) => dialog?.showModal(), { flush: 'post' })\n\n// Ignore close events from replaced elements: the queued event from a quick close-and-reopen\n// must not close the new dialog.\nfunction onClose(event: Event) {\n if (event.target !== dialogEl.value) return\n open.value = false\n}\n\n// @core\n// An open dialog removed with its parent (a `v-if`, a route change) runs no close steps,\n// so no close event would come: the model is handed back closed here, or it stayed `true`\n// and the dialog reopened by itself the next time its parent was shown.\nonBeforeUnmount(() => {\n if (open.value) open.value = false\n})\n\n// @fallback\n/*\n * `closedby` is what applies `persistentBackdrop` and `persistentEscape`, and Safari does not\n * implement it: there Escape always closes and the backdrop never does. The two halves are\n * rebuilt below, and only where the attribute is unknown, so a browser that has it is never\n * second-guessed.\n */\nconst closedbyUnsupported = () => !('closedBy' in HTMLDialogElement.prototype)\n\nfunction onCancel(event: Event) {\n if (closedbyUnsupported() && closedby.value === 'none') event.preventDefault()\n}\n\n/**\n * Whether a point lies outside the dialog's box, which is where the backdrop is: a click on\n * the `::backdrop` is dispatched to the dialog element itself.\n */\nfunction outsideBox(event: MouseEvent) {\n const box = dialogEl.value?.getBoundingClientRect()\n if (!box) return false\n return (\n event.clientX < box.left ||\n event.clientX > box.right ||\n event.clientY < box.top ||\n event.clientY > box.bottom\n )\n}\n\n// A press that STARTED inside and ended on the backdrop (a text selection dragged past the\n// edge) is not a click on the backdrop, so the press is remembered, not only the release.\nlet pressedOnBackdrop = false\nfunction onPointerdown(event: PointerEvent) {\n pressedOnBackdrop = closedbyUnsupported() && event.target === dialogEl.value && outsideBox(event)\n}\nfunction onBackdropClick(event: MouseEvent) {\n const onBackdrop = pressedOnBackdrop && event.target === dialogEl.value && outsideBox(event)\n pressedOnBackdrop = false\n if (onBackdrop && closedbyUnsupported() && closedby.value === 'any') requestClose()\n}\n\ndefineExpose({\n /**\n * Opens the dialog, exactly as setting `open` does. The opening lands on the next tick,\n * once the element has been rendered: `el` is still null right after the call, and the\n * promise returned settles once the dialog is showing.\n */\n show,\n /**\n * Closes the dialog. It closes unconditionally, `persistentEscape` and\n * `persistentBackdrop` governing only the two routes the reader can take.\n */\n close: requestClose,\n /** The `<dialog>` element. It is null while closed: each opening builds a fresh one. */\n el: dialogEl,\n})\n</script>\n\n<template>\n <slot name=\"trigger\" :trigger-props=\"triggerProps\" />\n <dialog\n v-if=\"open\"\n ref=\"dialogEl\"\n :aria-labelledby=\"title ? titleId : undefined\"\n :aria-describedby=\"subtitle ? subtitleId : undefined\"\n v-bind=\"rootAttrs\"\n class=\"v-dialog\"\n :style=\"{ '--dialog-width': cssSize(width) }\"\n :role=\"role === 'alertdialog' ? 'alertdialog' : undefined\"\n @close=\"onClose\"\n @cancel=\"onCancel\"\n @pointerdown=\"onPointerdown\"\n @click=\"onBackdropClick\"\n >\n <!--\n The header and the footer stay put while only the body scrolls, so the scrollbar\n is confined to the body and never runs along them.\n\n The lines that appear under the header and above the footer once the body is\n scrolled are drawn by two sentinels stuck INSIDE the scrolling area, and not by\n the header and footer themselves: a container query can only style what is inside\n the container it asks about, never a sibling of it.\n -->\n <header class=\"v-dialog-header\">\n <slot name=\"header\">\n <div class=\"v-dialog-titles\">\n <VTypography\n v-if=\"title\"\n :id=\"titleId\"\n as=\"h2\"\n variant=\"heading-3\"\n class=\"v-dialog-title\"\n >\n {{ title }}\n </VTypography>\n <VTypography\n v-if=\"subtitle\"\n :id=\"subtitleId\"\n variant=\"subtitle\"\n tone=\"muted\"\n class=\"v-dialog-subtitle\"\n >\n {{ subtitle }}\n </VTypography>\n </div>\n </slot>\n <div v-if=\"!hideClose || $slots['header-actions']\" class=\"v-dialog-header-actions\">\n <slot name=\"header-actions\" />\n <VIconButton\n v-if=\"!hideClose\"\n class=\"v-dialog-close\"\n :label=\"resolvedCloseLabel\"\n variant=\"ghost\"\n tone=\"neutral\"\n size=\"sm\"\n @click=\"requestClose\"\n >\n <VIcon :name=\"closeIcon\" />\n </VIconButton>\n </div>\n </header>\n <div class=\"v-dialog-scroll\">\n <span class=\"v-dialog-edge v-dialog-edge--top\" aria-hidden=\"true\" />\n <div class=\"v-dialog-body\">\n <slot />\n </div>\n <span class=\"v-dialog-edge v-dialog-edge--bottom\" aria-hidden=\"true\" />\n </div>\n <footer v-if=\"$slots.footer\" class=\"v-dialog-footer\">\n <slot name=\"footer\" />\n </footer>\n </dialog>\n</template>\n\n<style>\n@layer vectis.components {\n .v-dialog {\n /*\n * The token is declared on the element rather than written as a `var()` fallback. A custom\n * property inherits, and a dialog opened from inside another one is its DOM descendant:\n * with a fallback, an alert confirming something in an 800px dialog would read that\n * dialog's inline width and open 800px wide itself, with no error anywhere.\n */\n --dialog-width: var(--vectis-control-size-dialog-width);\n inline-size: var(--dialog-width);\n max-inline-size: calc(100dvi - 2 * var(--vectis-space-4));\n max-block-size: calc(100dvb - 2 * var(--vectis-space-4));\n /*\n * Restore the modal's automatic margins in the component layer because the reset removes\n * native dialog centring.\n */\n margin: auto;\n /* The header and footer stay put while only the body scrolls, and hiding the\n overflow is what keeps the content inside the rounded corners. */\n display: flex;\n flex-direction: column;\n overflow: hidden;\n padding: 0;\n border: none;\n border-radius: var(--vectis-radius-overlay);\n background: var(--vectis-color-surface-overlay);\n color: var(--vectis-color-text);\n box-shadow: var(--vectis-shadow-xl);\n font-family: var(--vectis-text-family);\n }\n\n /*\n * An indispensable guard. The browser hides a closed dialog with a rule of its own, but any\n * display we declare above beats it; so without this, a closed dialog would sit in the page\n * at the top left, swallowing clicks.\n */\n .v-dialog:not([open]) {\n display: none;\n }\n\n /* Opening a modal puts the focus on the dialog itself. No ring is drawn around the\n whole thing for that: the focus a reader needs to see is the one on the controls\n inside. */\n .v-dialog:focus-visible {\n outline: none;\n }\n\n .v-dialog-scroll {\n /*\n * The zero minimum is load-bearing: without it a flex item refuses to shrink below its\n * content, and nothing would ever scroll.\n */\n flex: 1 1 auto;\n min-block-size: 0;\n overflow-y: auto;\n /* A wheel reaching the end of the content stops there rather than scrolling the page\n behind the modal. */\n overscroll-behavior: contain;\n display: flex;\n flex-direction: column;\n /*\n * This makes the box something its descendants can ask questions about; namely whether\n * there is content hidden above or below. It adds no containment of size.\n */\n container-type: scroll-state;\n }\n\n /*\n * The two sentinels: hairlines stuck to the top and the bottom of the scrolling area, and\n * descendants of it, which allows them to ask about its scroll state. Their negative margins\n * mean they occupy no space at all.\n */\n .v-dialog-edge {\n flex: none;\n block-size: 1px;\n position: sticky;\n background: transparent;\n }\n\n .v-dialog-edge--top {\n inset-block-start: 0;\n margin-block-end: -1px;\n }\n\n .v-dialog-edge--bottom {\n inset-block-end: 0;\n margin-block-start: -1px;\n }\n\n .v-dialog-header {\n flex: none;\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: var(--vectis-space-4);\n padding: var(--vectis-space-6) var(--vectis-space-6) var(--vectis-space-3);\n }\n\n .v-dialog-titles {\n display: flex;\n flex-direction: column;\n min-inline-size: 0;\n }\n\n /* The title and the subtitle are rendered by VTypography, which carries their type.\n Their classes remain as hooks, for a consumer's overrides and for the tests. */\n\n .v-dialog-header-actions {\n display: flex;\n align-items: center;\n gap: var(--vectis-space-1);\n /* The cross is a button, so it carries invisible padding of its own; pulling the\n row back by that amount is what makes the glyph line up with the header's edge\n rather than floating inside it. */\n margin-block-start: calc(-1 * var(--vectis-space-1));\n margin-inline-end: calc(-1 * var(--vectis-space-2));\n }\n\n .v-dialog-body {\n /* Short content is stretched to fill the space, so the footer stays at the bottom\n of the dialog rather than floating halfway up; long content keeps its natural\n height, overflows, and is what scrolls. */\n flex: 1 0 auto;\n padding: var(--vectis-space-1) var(--vectis-space-6) var(--vectis-space-3);\n font-size: var(--vectis-text-body-md-size);\n line-height: var(--vectis-text-body-md-leading);\n }\n\n .v-dialog-footer {\n flex: none;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-wrap: wrap;\n gap: var(--vectis-space-3);\n padding: var(--vectis-space-3) var(--vectis-space-6) var(--vectis-space-6);\n }\n\n /* Where it is missing the sentinels simply stay transparent, which is the intended fallback. */\n @container scroll-state(scrollable: top) {\n .v-dialog-edge--top {\n background: var(--vectis-color-border);\n }\n }\n\n @container scroll-state(scrollable: bottom) {\n .v-dialog-edge--bottom {\n background: var(--vectis-color-border);\n }\n }\n\n /*\n * The dialog animates on the way in and not on the way out. Since it is removed from the page\n * the moment it closes, there is nothing left to animate out; that is the price of the clean\n * slate the lazy rendering buys, and it also spares the extra declarations an exit animation\n * would need.\n */\n .v-dialog {\n transition:\n opacity var(--vectis-duration-base) var(--vectis-ease-default),\n transform var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n @starting-style {\n .v-dialog[open] {\n opacity: 0;\n transform: scale(0.97);\n }\n }\n\n .v-dialog::backdrop {\n background: var(--vectis-color-backdrop);\n transition: opacity var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n @starting-style {\n .v-dialog[open]::backdrop {\n opacity: 0;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-dialog,\n .v-dialog::backdrop {\n transition: none;\n }\n }\n\n /* An outline draws one without moving the layout by a pixel. */\n @media (forced-colors: active) {\n .v-dialog {\n outline: 1px solid CanvasText;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuDA,IAAM,IAAQ,GAWR,IAAI,EAAY,GAChB,IAAqB,QAAe,EAAM,cAAc,EAAE,MAAM,OAAO,KAAK,GAG5E,IAAO,EAAoB,GAAC,MAA0B,GA0BtD,IAAQ,EAAS,GACjB,IAAW,EAA8B,IAAI,GAC7C,IAAU,EAAM,GAChB,IAAa,EAAM,GAOnB,IAAW,QACf,EAAM,qBAAsB,EAAM,mBAAmB,SAAS,iBAAkB,KAClF,GAOM,IAAY,SAAgB;GAAE,GAAG;GAAO,UAAU,EAAS;EAAM,EAAE;EAEzE,SAAS,IAAsB;GAE7B,OADA,EAAK,QAAQ,IACN,EAAS;EAClB;EAEA,SAAS,IAAe;GAGtB,EAAS,OAAO,MAAM;EACxB;EAEA,IAAM,IAAe,SAAoC;GACvD,SAAS;GACT,iBAAiB;EACnB,EAAE;EASF,AANA,EAAM,IAAO,MAAU;GACrB,AAAK,KAAO,EAAS,OAAO,MAAM;EACpC,CAAC,GAID,EAAM,IAAW,MAAW,GAAQ,UAAU,GAAG,EAAE,OAAO,OAAO,CAAC;EAIlE,SAAS,EAAQ,GAAc;GACzB,EAAM,WAAW,EAAS,UAC9B,EAAK,QAAQ;EACf;EAMA,QAAsB;GACpB,AAAgB,EAAK,UAAQ;EAC/B,CAAC;EASD,IAAM,UAA4B,EAAE,cAAc,kBAAkB;EAEpE,SAAS,EAAS,GAAc;GAC9B,AAAI,EAAoB,KAAK,EAAS,UAAU,UAAQ,EAAM,eAAe;EAC/E;EAMA,SAAS,EAAW,GAAmB;GACrC,IAAM,IAAM,EAAS,OAAO,sBAAsB;GAElD,OADK,IAEH,EAAM,UAAU,EAAI,QACpB,EAAM,UAAU,EAAI,SACpB,EAAM,UAAU,EAAI,OACpB,EAAM,UAAU,EAAI,SALL;EAOnB;EAIA,IAAI,IAAoB;EACxB,SAAS,GAAc,GAAqB;GAC1C,IAAoB,EAAoB,KAAK,EAAM,WAAW,EAAS,SAAS,EAAW,CAAK;EAClG;EACA,SAAS,GAAgB,GAAmB;GAC1C,IAAM,IAAa,KAAqB,EAAM,WAAW,EAAS,SAAS,EAAW,CAAK;GAE3F,AADA,IAAoB,IAChB,KAAc,EAAoB,KAAK,EAAS,UAAU,SAAO,EAAa;EACpF;SAEA,EAAa;GAMX;GAKA,OAAO;GAEP,IAAI;EACN,CAAC,+BAIC,EAAqD,EAAA,QAAA,WAAA,EAA/B,cAAe,EAAA,MAAY,CAAA,GAEzC,EAAA,SAAA,EAAA,GADR,EAuES,UAvET,EAuES;;YArEH;GAAJ,KAAI;GACH,mBAAiB,EAAA,QAAQ,EAAA,CAAA,IAAU,KAAA;GACnC,oBAAkB,EAAA,WAAW,EAAA,CAAA,IAAa,KAAA;KACnC,EAAA,OAAS;GACjB,OAAM;GACL,OAAK,EAAA,kBAAsB,EAAA,CAAA,CAAO,CAAC,EAAA,KAAK,EAAA;GACxC,MAAM,EAAA,SAAI,gBAAA,gBAAqC,KAAA;GACxC;GACC;GACK;GACb,SAAO;;GAWR,EAqCS,UArCT,GAqCS,CApCP,EAqBO,EAAA,QAAA,UAAA,CAAA,SAAA,CApBL,EAmBM,OAnBN,GAmBM,CAjBI,EAAA,SAAA,EAAA,GADR,EAQc,GAAA;;IANX,IAAI,EAAA,CAAA;IACL,IAAG;IACH,SAAQ;IACR,OAAM;;qBAEK,CAAA,EAAA,EAAR,EAAA,KAAK,GAAA,CAAA,CAAA,CAAA;;+BAGF,EAAA,YAAA,EAAA,GADR,EAQc,GAAA;;IANX,IAAI,EAAA,CAAA;IACL,SAAQ;IACR,MAAK;IACL,OAAM;;qBAEQ,CAAA,EAAA,EAAX,EAAA,QAAQ,GAAA,CAAA,CAAA,CAAA;;oCAIL,EAAA,aAAaA,EAAAA,OAAM,qBAAA,EAAA,GAA/B,EAaM,OAbN,GAaM,CAZJ,EAA8B,EAAA,QAAA,gBAAA,GAErB,EAAA,yBAAA,EAAA,GADT,EAUc,GAAA;;IARZ,OAAM;IACL,OAAO,EAAA;IACR,SAAQ;IACR,MAAK;IACL,MAAK;IACJ,SAAO;;qBAEmB,CAA3B,EAA2B,GAAA,EAAnB,MAAM,EAAA,CAAA,EAAS,GAAA,MAAA,GAAA,CAAA,MAAA,CAAA,CAAA,CAAA;;;GAI7B,EAMM,OANN,GAMM;aALJ,EAAoE,QAAA;KAA9D,OAAM;KAAmC,eAAY;;IAC3D,EAEM,OAFN,GAEM,CADJ,EAAQ,EAAA,QAAA,SAAA,CAAA,CAAA;aAEV,EAAuE,QAAA;KAAjE,OAAM;KAAsC,eAAY;;;GAElDA,EAAAA,OAAO,UAAA,EAAA,GAArB,EAES,UAFT,GAES,CADP,EAAsB,EAAA,QAAA,QAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA"}
1
+ {"version":3,"file":"VDialog.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/VDialog/VDialog.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @core\n/** A native modal `<dialog>`, its model bridged by useModalDialog. */\n\nimport { computed, useId } from 'vue'\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { close as closeIcon } from '../VIcon/icons/close'\nimport VIconButton from '../VIconButton/VIconButton.vue'\nimport VTypography from '../VTypography/VTypography.vue'\nimport { useModalDialog } from '../../composables/useModalDialog'\nimport { useMessages } from '../../i18n/state'\nimport { cssSize } from '../../utils/css'\n\n/** How assistive technology announces the dialog. */\nexport type DialogRole = 'dialog' | 'alertdialog'\n\ninterface DialogProps {\n /**\n * The title of the dialog, which also names it for assistive technology. It is\n * ignored when the `#header` slot replaces the whole header.\n */\n title?: string\n /** A line under the title, explaining what the dialog is asking. */\n subtitle?: string\n /**\n * How wide the dialog is: a number is read as pixels, a string as any CSS length. Left out,\n * it takes the `--vectis-control-size-dialog-width` token, 400px by default.\n */\n width?: number | string\n /**\n * What kind of dialog this is. `alertdialog` is for one that must be answered\n * explicitly, and it makes screen readers announce it more insistently. VDialogAlert is\n * exactly that.\n */\n role?: DialogRole\n /**\n * Takes the close cross out of the header, leaving the reader with Escape, the\n * backdrop and whatever the footer offers.\n */\n hideClose?: boolean\n /** Stops a click outside the dialog from closing it. */\n persistentBackdrop?: boolean\n /**\n * Stops the Escape key from closing the dialog. Note that refusing Escape while the\n * backdrop still closes cannot be expressed natively, so both routes are then\n * allowed.\n */\n persistentEscape?: boolean\n /** What the close cross does, in words. It falls back to the design system dictionary. */\n closeLabel?: string\n}\n\nconst props = withDefaults(defineProps<DialogProps>(), {\n title: undefined,\n subtitle: undefined,\n width: undefined,\n role: 'dialog',\n hideClose: false,\n persistentBackdrop: false,\n persistentEscape: false,\n closeLabel: undefined,\n})\n\nconst m = useMessages()\nconst resolvedCloseLabel = computed(() => props.closeLabel ?? m.value.common.close)\n\n/** Whether the dialog is showing. */\nconst open = defineModel<boolean>('open', { default: false })\n\n/** What the trigger has to carry: the click that opens the dialog, and the fact that it does. */\nexport type DialogTriggerProps = {\n onClick: () => void\n 'aria-haspopup': 'dialog'\n}\n\ndefineSlots<{\n /** The body of the dialog. This is the part that scrolls when there is too much of it. */\n default(): unknown\n /** Replaces the title and subtitle block with content of your own. */\n header?(): unknown\n /** Extra controls in the header, placed before the close cross: a menu, a full-screen toggle. */\n 'header-actions'?(): unknown\n /** The buttons at the foot of the dialog. */\n footer?(): unknown\n /**\n * The button that opens the dialog. Bind the `triggerProps` it receives onto it. It stays\n * rendered always, unlike the dialog itself.\n */\n trigger?(props: { triggerProps: DialogTriggerProps }): unknown\n}>()\n\ndefineOptions({ inheritAttrs: false })\n\nconst titleId = useId()\nconst subtitleId = useId()\n\nconst {\n dialogEl,\n rendered,\n rootAttrs,\n show,\n close,\n onClose,\n onCancel,\n onPointerdown,\n onBackdropClick,\n} = useModalDialog(open, {\n persistentBackdrop: () => props.persistentBackdrop,\n persistentEscape: () => props.persistentEscape,\n})\n\nconst triggerProps = computed<DialogTriggerProps>(() => ({\n onClick: show,\n 'aria-haspopup': 'dialog',\n}))\n\ndefineExpose({\n /**\n * Opens the dialog, exactly as setting `open` does. The opening lands on the next tick,\n * once the element has been rendered: `el` is still null right after the call, and the\n * promise returned settles once the dialog is showing.\n */\n show,\n /**\n * Closes the dialog. It closes unconditionally, `persistentEscape` and\n * `persistentBackdrop` governing only the two routes the reader can take.\n */\n close,\n /** The `<dialog>` element. It is null while closed: each opening builds a fresh one. */\n el: dialogEl,\n})\n</script>\n\n<template>\n <slot name=\"trigger\" :trigger-props=\"triggerProps\" />\n <dialog\n v-if=\"rendered\"\n ref=\"dialogEl\"\n :aria-labelledby=\"title ? titleId : undefined\"\n :aria-describedby=\"subtitle ? subtitleId : undefined\"\n v-bind=\"rootAttrs\"\n class=\"v-dialog\"\n :style=\"{ '--dialog-width': cssSize(width) }\"\n :role=\"role === 'alertdialog' ? 'alertdialog' : undefined\"\n @close=\"onClose\"\n @cancel=\"onCancel\"\n @pointerdown=\"onPointerdown\"\n @click=\"onBackdropClick\"\n >\n <!--\n The header and the footer stay put while only the body scrolls, so the scrollbar\n is confined to the body and never runs along them.\n\n The lines that appear under the header and above the footer once the body is\n scrolled are drawn by two sentinels stuck INSIDE the scrolling area, and not by\n the header and footer themselves: a container query can only style what is inside\n the container it asks about, never a sibling of it.\n -->\n <header class=\"v-dialog-header\">\n <slot name=\"header\">\n <div class=\"v-dialog-titles\">\n <VTypography\n v-if=\"title\"\n :id=\"titleId\"\n as=\"h2\"\n variant=\"heading-3\"\n class=\"v-dialog-title\"\n >\n {{ title }}\n </VTypography>\n <VTypography\n v-if=\"subtitle\"\n :id=\"subtitleId\"\n variant=\"subtitle\"\n tone=\"muted\"\n class=\"v-dialog-subtitle\"\n >\n {{ subtitle }}\n </VTypography>\n </div>\n </slot>\n <div v-if=\"!hideClose || $slots['header-actions']\" class=\"v-dialog-header-actions\">\n <slot name=\"header-actions\" />\n <VIconButton\n v-if=\"!hideClose\"\n class=\"v-dialog-close\"\n :label=\"resolvedCloseLabel\"\n variant=\"ghost\"\n tone=\"neutral\"\n size=\"sm\"\n @click=\"close\"\n >\n <VIcon :name=\"closeIcon\" />\n </VIconButton>\n </div>\n </header>\n <div class=\"v-dialog-scroll\">\n <span class=\"v-dialog-edge v-dialog-edge--top\" aria-hidden=\"true\" />\n <div class=\"v-dialog-body\">\n <slot />\n </div>\n <span class=\"v-dialog-edge v-dialog-edge--bottom\" aria-hidden=\"true\" />\n </div>\n <footer v-if=\"$slots.footer\" class=\"v-dialog-footer\">\n <slot name=\"footer\" />\n </footer>\n </dialog>\n</template>\n\n<style>\n@layer vectis.components {\n .v-dialog {\n /*\n * The token is declared on the element rather than written as a `var()` fallback. A custom\n * property inherits, and a dialog opened from inside another one is its DOM descendant:\n * with a fallback, an alert confirming something in an 800px dialog would read that\n * dialog's inline width and open 800px wide itself, with no error anywhere.\n */\n --dialog-width: var(--vectis-control-size-dialog-width);\n inline-size: var(--dialog-width);\n max-inline-size: calc(100dvi - 2 * var(--vectis-space-4));\n max-block-size: calc(100dvb - 2 * var(--vectis-space-4));\n /*\n * Restore the modal's automatic margins in the component layer because the reset removes\n * native dialog centring.\n */\n margin: auto;\n /* The header and footer stay put while only the body scrolls, and hiding the\n overflow is what keeps the content inside the rounded corners. */\n display: flex;\n flex-direction: column;\n overflow: hidden;\n padding: 0;\n border: none;\n border-radius: var(--vectis-radius-overlay);\n background: var(--vectis-color-surface-overlay);\n color: var(--vectis-color-text);\n box-shadow: var(--vectis-shadow-xl);\n font-family: var(--vectis-text-family);\n }\n\n /*\n * An indispensable guard. The browser hides a closed dialog with a rule of its own, but any\n * display we declare above beats it; so without this, a closed dialog would sit in the page\n * at the top left, swallowing clicks.\n */\n .v-dialog:not([open]) {\n display: none;\n }\n\n /* Opening a modal puts the focus on the dialog itself. No ring is drawn around the\n whole thing for that: the focus a reader needs to see is the one on the controls\n inside. */\n .v-dialog:focus-visible {\n outline: none;\n }\n\n .v-dialog-scroll {\n /*\n * The zero minimum is load-bearing: without it a flex item refuses to shrink below its\n * content, and nothing would ever scroll.\n */\n flex: 1 1 auto;\n min-block-size: 0;\n overflow-y: auto;\n /* A wheel reaching the end of the content stops there rather than scrolling the page\n behind the modal. */\n overscroll-behavior: contain;\n display: flex;\n flex-direction: column;\n /*\n * This makes the box something its descendants can ask questions about; namely whether\n * there is content hidden above or below. It adds no containment of size.\n */\n container-type: scroll-state;\n }\n\n /*\n * The two sentinels: hairlines stuck to the top and the bottom of the scrolling area, and\n * descendants of it, which allows them to ask about its scroll state. Their negative margins\n * mean they occupy no space at all.\n */\n .v-dialog-edge {\n flex: none;\n block-size: 1px;\n position: sticky;\n background: transparent;\n }\n\n .v-dialog-edge--top {\n inset-block-start: 0;\n margin-block-end: -1px;\n }\n\n .v-dialog-edge--bottom {\n inset-block-end: 0;\n margin-block-start: -1px;\n }\n\n .v-dialog-header {\n flex: none;\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: var(--vectis-space-4);\n padding: var(--vectis-space-6) var(--vectis-space-6) var(--vectis-space-3);\n }\n\n .v-dialog-titles {\n display: flex;\n flex-direction: column;\n min-inline-size: 0;\n }\n\n /* The title and the subtitle are rendered by VTypography, which carries their type.\n Their classes remain as hooks, for a consumer's overrides and for the tests. */\n\n .v-dialog-header-actions {\n display: flex;\n align-items: center;\n gap: var(--vectis-space-1);\n /* The cross is a button, so it carries invisible padding of its own; pulling the\n row back by that amount is what makes the glyph line up with the header's edge\n rather than floating inside it. */\n margin-block-start: calc(-1 * var(--vectis-space-1));\n margin-inline-end: calc(-1 * var(--vectis-space-2));\n }\n\n .v-dialog-body {\n /* Short content is stretched to fill the space, so the footer stays at the bottom\n of the dialog rather than floating halfway up; long content keeps its natural\n height, overflows, and is what scrolls. */\n flex: 1 0 auto;\n padding: var(--vectis-space-1) var(--vectis-space-6) var(--vectis-space-3);\n font-size: var(--vectis-text-body-md-size);\n line-height: var(--vectis-text-body-md-leading);\n }\n\n .v-dialog-footer {\n flex: none;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-wrap: wrap;\n gap: var(--vectis-space-3);\n padding: var(--vectis-space-3) var(--vectis-space-6) var(--vectis-space-6);\n }\n\n /* Where it is missing the sentinels simply stay transparent, which is the intended fallback. */\n @container scroll-state(scrollable: top) {\n .v-dialog-edge--top {\n background: var(--vectis-color-border);\n }\n }\n\n @container scroll-state(scrollable: bottom) {\n .v-dialog-edge--bottom {\n background: var(--vectis-color-border);\n }\n }\n\n /*\n * The dialog animates on the way in and not on the way out. Since it is removed from the page\n * the moment it closes, there is nothing left to animate out; that is the price of the clean\n * slate the lazy rendering buys, and it also spares the extra declarations an exit animation\n * would need.\n */\n .v-dialog {\n transition:\n opacity var(--vectis-duration-base) var(--vectis-ease-default),\n transform var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n @starting-style {\n .v-dialog[open] {\n opacity: 0;\n transform: scale(0.97);\n }\n }\n\n .v-dialog::backdrop {\n background: var(--vectis-color-backdrop);\n transition: opacity var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n @starting-style {\n .v-dialog[open]::backdrop {\n opacity: 0;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-dialog,\n .v-dialog::backdrop {\n transition: none;\n }\n }\n\n /* An outline draws one without moving the layout by a pixel. */\n @media (forced-colors: active) {\n .v-dialog {\n outline: 1px solid CanvasText;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqDA,IAAM,IAAQ,GAWR,IAAI,EAAY,GAChB,IAAqB,QAAe,EAAM,cAAc,EAAE,MAAM,OAAO,KAAK,GAG5E,IAAO,EAAoB,GAAC,MAA0B,GA0BtD,IAAU,EAAM,GAChB,IAAa,EAAM,GAEnB,EACJ,aACA,aACA,cACA,SACA,OAAA,GACA,YACA,aACA,kBACA,uBACE,EAAe,GAAM;GACvB,0BAA0B,EAAM;GAChC,wBAAwB,EAAM;EAChC,CAAC,GAEK,IAAe,SAAoC;GACvD,SAAS;GACT,iBAAiB;EACnB,EAAE;SAEF,EAAa;GAMX;GAKA,OAAA;GAEA,IAAI;EACN,CAAC,+BAIC,EAAqD,EAAA,QAAA,WAAA,EAA/B,cAAe,EAAA,MAAY,CAAA,GAEzC,EAAA,CAAA,KAAA,EAAA,GADR,EAuES,UAvET,EAuES;;YArEH;GAAJ,KAAI;GACH,mBAAiB,EAAA,QAAQ,EAAA,CAAA,IAAU,KAAA;GACnC,oBAAkB,EAAA,WAAW,EAAA,CAAA,IAAa,KAAA;KACnC,EAAA,CAAA,GAAS;GACjB,OAAM;GACL,OAAK,EAAA,kBAAsB,EAAA,CAAA,CAAO,CAAC,EAAA,KAAK,EAAA;GACxC,MAAM,EAAA,SAAI,gBAAA,gBAAqC,KAAA;GAC/C,SAAK,AAAA,EAAA,QAAA,GAAA,MAAE,EAAA,CAAA,KAAA,EAAA,CAAA,CAAA,CAAA,GAAA,CAAA;GACP,UAAM,AAAA,EAAA,QAAA,GAAA,MAAE,EAAA,CAAA,KAAA,EAAA,CAAA,CAAA,CAAA,GAAA,CAAA;GACR,eAAW,AAAA,EAAA,QAAA,GAAA,MAAE,EAAA,CAAA,KAAA,EAAA,CAAA,CAAA,CAAA,GAAA,CAAA;GACb,SAAK,AAAA,EAAA,QAAA,GAAA,MAAE,EAAA,CAAA,KAAA,EAAA,CAAA,CAAA,CAAA,GAAA,CAAA;;GAWR,EAqCS,UArCT,GAqCS,CApCP,EAqBO,EAAA,QAAA,UAAA,CAAA,SAAA,CApBL,EAmBM,OAnBN,GAmBM,CAjBI,EAAA,SAAA,EAAA,GADR,EAQc,GAAA;;IANX,IAAI,EAAA,CAAA;IACL,IAAG;IACH,SAAQ;IACR,OAAM;;qBAEK,CAAA,EAAA,EAAR,EAAA,KAAK,GAAA,CAAA,CAAA,CAAA;;+BAGF,EAAA,YAAA,EAAA,GADR,EAQc,GAAA;;IANX,IAAI,EAAA,CAAA;IACL,SAAQ;IACR,MAAK;IACL,OAAM;;qBAEQ,CAAA,EAAA,EAAX,EAAA,QAAQ,GAAA,CAAA,CAAA,CAAA;;oCAIL,EAAA,aAAaA,EAAAA,OAAM,qBAAA,EAAA,GAA/B,EAaM,OAbN,GAaM,CAZJ,EAA8B,EAAA,QAAA,gBAAA,GAErB,EAAA,yBAAA,EAAA,GADT,EAUc,GAAA;;IARZ,OAAM;IACL,OAAO,EAAA;IACR,SAAQ;IACR,MAAK;IACL,MAAK;IACJ,SAAO,EAAA,CAAA;;qBAEmB,CAA3B,EAA2B,GAAA,EAAnB,MAAM,EAAA,CAAA,EAAS,GAAA,MAAA,GAAA,CAAA,MAAA,CAAA,CAAA,CAAA;;;GAI7B,EAMM,OANN,GAMM;aALJ,EAAoE,QAAA;KAA9D,OAAM;KAAmC,eAAY;;IAC3D,EAEM,OAFN,GAEM,CADJ,EAAQ,EAAA,QAAA,SAAA,CAAA,CAAA;aAEV,EAAuE,QAAA;KAAjE,OAAM;KAAsC,eAAY;;;GAElDA,EAAAA,OAAO,UAAA,EAAA,GAArB,EAES,UAFT,GAES,CADP,EAAsB,EAAA,QAAA,QAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA"}
@@ -0,0 +1,2 @@
1
+ @layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
2
+ @layer vectis.components{.v-drawer{--drawer-extent:var(--vectis-control-size-drawer-md);--drawer-offset:100% 0;background:var(--vectis-color-surface-overlay);block-size:auto;max-block-size:none;inline-size:auto;max-inline-size:none;color:var(--vectis-color-text);box-shadow:var(--vectis-shadow-xl);font-family:var(--vectis-text-family);transition:translate var(--vectis-duration-slow) var(--vectis-ease-out), display var(--vectis-duration-slow) allow-discrete, overlay var(--vectis-duration-slow) allow-discrete;border:none;flex-direction:column;margin:0;padding:0;display:flex;position:fixed;inset:0;overflow:hidden}.v-drawer[data-size=sm]{--drawer-extent:var(--vectis-control-size-drawer-sm)}.v-drawer[data-size=lg]{--drawer-extent:var(--vectis-control-size-drawer-lg)}.v-drawer[data-side=start],.v-drawer[data-side=end]{inline-size:var(--drawer-extent);max-inline-size:calc(100dvi - var(--vectis-space-12))}.v-drawer[data-side=top],.v-drawer[data-side=bottom]{block-size:var(--drawer-extent);max-block-size:calc(100dvb - var(--vectis-space-12))}.v-drawer[data-side=start]{--drawer-offset:-100% 0;border-start-end-radius:var(--vectis-radius-overlay);border-end-end-radius:var(--vectis-radius-overlay);inset-inline-end:auto}.v-drawer[data-side=end]{border-start-start-radius:var(--vectis-radius-overlay);border-end-start-radius:var(--vectis-radius-overlay);inset-inline-start:auto}.v-drawer[data-side=start]:dir(rtl){--drawer-offset:100% 0}.v-drawer[data-side=end]:dir(rtl){--drawer-offset:-100% 0}.v-drawer[data-side=top]{--drawer-offset:0 -100%;border-bottom-left-radius:var(--vectis-radius-overlay);border-bottom-right-radius:var(--vectis-radius-overlay);bottom:auto}.v-drawer[data-side=bottom]{--drawer-offset:0 100%;border-top-left-radius:var(--vectis-radius-overlay);border-top-right-radius:var(--vectis-radius-overlay);top:auto}.v-drawer:not([open]){translate:var(--drawer-offset);pointer-events:none;transition-timing-function:var(--vectis-ease-in);display:none}@starting-style{.v-drawer[open]{translate:var(--drawer-offset)}}.v-drawer::backdrop{background:var(--vectis-color-backdrop);transition:opacity var(--vectis-duration-slow) var(--vectis-ease-default), display var(--vectis-duration-slow) allow-discrete, overlay var(--vectis-duration-slow) allow-discrete}.v-drawer:not([open])::backdrop{opacity:0}@starting-style{.v-drawer[open]::backdrop{opacity:0}}.v-drawer:focus-visible{outline:none}.v-drawer-scroll{overscroll-behavior:contain;flex-direction:column;flex:auto;min-block-size:0;display:flex;overflow-y:auto;container-type:scroll-state}.v-drawer-edge{background:0 0;flex:none;block-size:1px;position:sticky}.v-drawer-edge--top{margin-block-end:-1px;inset-block-start:0}.v-drawer-edge--bottom{margin-block-start:-1px;inset-block-end:0}.v-drawer-header{justify-content:space-between;align-items:flex-start;gap:var(--vectis-space-4);padding:var(--vectis-space-6) var(--vectis-space-6) var(--vectis-space-3);flex:none;display:flex}.v-drawer-titles{flex-direction:column;min-inline-size:0;display:flex}.v-drawer-header-actions{align-items:center;gap:var(--vectis-space-1);margin-block-start:calc(-1 * var(--vectis-space-1));margin-inline-end:calc(-1 * var(--vectis-space-2));display:flex}.v-drawer-body{padding:var(--vectis-space-1) var(--vectis-space-6) var(--vectis-space-3);font-size:var(--vectis-text-body-md-size);line-height:var(--vectis-text-body-md-leading);flex:1 0 auto}.v-drawer-footer{justify-content:flex-end;align-items:center;gap:var(--vectis-space-3);padding:var(--vectis-space-3) var(--vectis-space-6) var(--vectis-space-6);flex-wrap:wrap;flex:none;display:flex}@container scroll-state(scrollable:top){.v-drawer-edge--top{background:var(--vectis-color-border)}}@container scroll-state(scrollable:bottom){.v-drawer-edge--bottom{background:var(--vectis-color-border)}}@media (prefers-reduced-motion:reduce){.v-drawer,.v-drawer::backdrop{transition:none}}@media (forced-colors:active){.v-drawer{outline:1px solid canvastext}}}
@@ -0,0 +1,102 @@
1
+ import { DialogTriggerProps } from '../VDialog/VDialog.js';
2
+ /** The edge the drawer comes from. `start` and `end` follow the writing direction. */
3
+ export type DrawerSide = 'start' | 'end' | 'top' | 'bottom';
4
+ /** The width of a drawer on a side, or the height of one at the top or bottom. */
5
+ export type DrawerSize = 'sm' | 'md' | 'lg';
6
+ interface DrawerProps {
7
+ /**
8
+ * The title of the drawer, which also names it for assistive technology. It is ignored when
9
+ * the `#header` slot replaces the whole header.
10
+ */
11
+ title?: string;
12
+ /** A line under the title. */
13
+ subtitle?: string;
14
+ /** The edge the drawer comes from. `start` and `end` follow the writing direction. */
15
+ side?: DrawerSide;
16
+ /**
17
+ * How far the drawer reaches into the page: its width on a side, its height at the top or
18
+ * bottom. Each step reads a `--vectis-control-size-drawer-*` token.
19
+ */
20
+ size?: DrawerSize;
21
+ /**
22
+ * A length replacing `size`: a number is read as pixels, a string as any CSS length. The
23
+ * drawer always leaves a strip of the page uncovered, which a click closes it through.
24
+ */
25
+ extent?: number | string;
26
+ /**
27
+ * Takes the close cross out of the header, leaving the reader with Escape, the backdrop and
28
+ * whatever the footer offers.
29
+ */
30
+ hideClose?: boolean;
31
+ /** Stops a click outside the drawer from closing it. */
32
+ persistentBackdrop?: boolean;
33
+ /**
34
+ * Stops the Escape key from closing the drawer. Refusing Escape while the backdrop still
35
+ * closes cannot be expressed natively, so both routes are then allowed.
36
+ */
37
+ persistentEscape?: boolean;
38
+ /** What the close cross does, in words. It falls back to the design system dictionary. */
39
+ closeLabel?: string;
40
+ }
41
+ type __VLS_Props = DrawerProps;
42
+ type __VLS_Slots = {
43
+ /** The body of the drawer. This is the part that scrolls when there is too much of it. */
44
+ default(): unknown;
45
+ /** Replaces the title and subtitle block with content of your own. */
46
+ header?(): unknown;
47
+ /** Extra controls in the header, placed before the close cross. */
48
+ 'header-actions'?(): unknown;
49
+ /** The buttons at the foot of the drawer. */
50
+ footer?(): unknown;
51
+ /**
52
+ * The button that opens the drawer. Bind the `triggerProps` it receives onto it. It stays
53
+ * rendered always, unlike the drawer itself.
54
+ */
55
+ trigger?(props: {
56
+ triggerProps: DialogTriggerProps;
57
+ }): unknown;
58
+ };
59
+ type __VLS_ModelProps = {
60
+ /** Whether the drawer is showing. */
61
+ 'open'?: boolean;
62
+ };
63
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
64
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
65
+ /**
66
+ * Opens the drawer, exactly as setting `open` does. The opening lands on the next tick: the
67
+ * promise returned settles once the drawer is showing.
68
+ */
69
+ show: () => Promise<void>;
70
+ /**
71
+ * Closes the drawer. It closes unconditionally, `persistentEscape` and `persistentBackdrop`
72
+ * governing only the two routes the reader can take.
73
+ */
74
+ close: () => void;
75
+ /**
76
+ * The `<dialog>` element. It is null while closed, once its exit has played: each opening
77
+ * from there builds a fresh one.
78
+ */
79
+ el: import('vue').Ref<HTMLDialogElement | null, HTMLDialogElement | null>;
80
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
81
+ "update:open": (value: boolean) => any;
82
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
83
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
84
+ }>, {
85
+ size: DrawerSize;
86
+ title: string;
87
+ subtitle: string;
88
+ side: DrawerSide;
89
+ hideClose: boolean;
90
+ closeLabel: string;
91
+ persistentBackdrop: boolean;
92
+ persistentEscape: boolean;
93
+ extent: number | string;
94
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
95
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
96
+ declare const _default: typeof __VLS_export;
97
+ export default _default;
98
+ type __VLS_WithSlots<T, S> = T & {
99
+ new (): {
100
+ $slots: S;
101
+ };
102
+ };
@@ -0,0 +1,9 @@
1
+ import './VDrawer.css';
2
+ import e from "./VDrawer.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/VDrawer/VDrawer.vue
5
+ var t = e;
6
+ //#endregion
7
+ export { t as default };
8
+
9
+ //# sourceMappingURL=VDrawer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VDrawer.js","names":[],"sources":["../../../src/components/VDrawer/VDrawer.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @core\n/**\n * A native modal `<dialog>` pinned to one edge of the viewport, its model bridged by\n * useModalDialog. It stays rendered through its exit, so it slides out as it slid in.\n */\n\nimport { computed, useId } from 'vue'\n\nimport type { DialogTriggerProps } from '../VDialog/VDialog.vue'\nimport VIcon from '../VIcon/VIcon.vue'\nimport { close as closeIcon } from '../VIcon/icons/close'\nimport VIconButton from '../VIconButton/VIconButton.vue'\nimport VTypography from '../VTypography/VTypography.vue'\nimport { useModalDialog } from '../../composables/useModalDialog'\nimport { useMessages } from '../../i18n/state'\nimport { cssSize } from '../../utils/css'\n\n/** The edge the drawer comes from. `start` and `end` follow the writing direction. */\nexport type DrawerSide = 'start' | 'end' | 'top' | 'bottom'\n\n/** The width of a drawer on a side, or the height of one at the top or bottom. */\nexport type DrawerSize = 'sm' | 'md' | 'lg'\n\ninterface DrawerProps {\n /**\n * The title of the drawer, which also names it for assistive technology. It is ignored when\n * the `#header` slot replaces the whole header.\n */\n title?: string\n /** A line under the title. */\n subtitle?: string\n /** The edge the drawer comes from. `start` and `end` follow the writing direction. */\n side?: DrawerSide\n /**\n * How far the drawer reaches into the page: its width on a side, its height at the top or\n * bottom. Each step reads a `--vectis-control-size-drawer-*` token.\n */\n size?: DrawerSize\n /**\n * A length replacing `size`: a number is read as pixels, a string as any CSS length. The\n * drawer always leaves a strip of the page uncovered, which a click closes it through.\n */\n extent?: number | string\n /**\n * Takes the close cross out of the header, leaving the reader with Escape, the backdrop and\n * whatever the footer offers.\n */\n hideClose?: boolean\n /** Stops a click outside the drawer from closing it. */\n persistentBackdrop?: boolean\n /**\n * Stops the Escape key from closing the drawer. Refusing Escape while the backdrop still\n * closes cannot be expressed natively, so both routes are then allowed.\n */\n persistentEscape?: boolean\n /** What the close cross does, in words. It falls back to the design system dictionary. */\n closeLabel?: string\n}\n\nconst props = withDefaults(defineProps<DrawerProps>(), {\n title: undefined,\n subtitle: undefined,\n side: 'end',\n size: 'md',\n extent: undefined,\n hideClose: false,\n persistentBackdrop: false,\n persistentEscape: false,\n closeLabel: undefined,\n})\n\nconst m = useMessages()\nconst resolvedCloseLabel = computed(() => props.closeLabel ?? m.value.common.close)\n\n/** Whether the drawer is showing. */\nconst open = defineModel<boolean>('open', { default: false })\n\ndefineSlots<{\n /** The body of the drawer. This is the part that scrolls when there is too much of it. */\n default(): unknown\n /** Replaces the title and subtitle block with content of your own. */\n header?(): unknown\n /** Extra controls in the header, placed before the close cross. */\n 'header-actions'?(): unknown\n /** The buttons at the foot of the drawer. */\n footer?(): unknown\n /**\n * The button that opens the drawer. Bind the `triggerProps` it receives onto it. It stays\n * rendered always, unlike the drawer itself.\n */\n trigger?(props: { triggerProps: DialogTriggerProps }): unknown\n}>()\n\ndefineOptions({ inheritAttrs: false })\n\nconst titleId = useId()\nconst subtitleId = useId()\n\nconst {\n dialogEl,\n rendered,\n rootAttrs,\n show,\n close,\n onClose,\n onCancel,\n onPointerdown,\n onBackdropClick,\n} = useModalDialog(open, {\n persistentBackdrop: () => props.persistentBackdrop,\n persistentEscape: () => props.persistentEscape,\n exitTransition: true,\n})\n\nconst triggerProps = computed<DialogTriggerProps>(() => ({\n onClick: show,\n 'aria-haspopup': 'dialog',\n}))\n\ndefineExpose({\n /**\n * Opens the drawer, exactly as setting `open` does. The opening lands on the next tick: the\n * promise returned settles once the drawer is showing.\n */\n show,\n /**\n * Closes the drawer. It closes unconditionally, `persistentEscape` and `persistentBackdrop`\n * governing only the two routes the reader can take.\n */\n close,\n /**\n * The `<dialog>` element. It is null while closed, once its exit has played: each opening\n * from there builds a fresh one.\n */\n el: dialogEl,\n})\n</script>\n\n<template>\n <slot name=\"trigger\" :trigger-props=\"triggerProps\" />\n <dialog\n v-if=\"rendered\"\n ref=\"dialogEl\"\n :aria-labelledby=\"title ? titleId : undefined\"\n :aria-describedby=\"subtitle ? subtitleId : undefined\"\n v-bind=\"rootAttrs\"\n class=\"v-drawer\"\n :data-side=\"side\"\n :data-size=\"size\"\n :style=\"{ '--drawer-extent': cssSize(extent) }\"\n @close=\"onClose\"\n @cancel=\"onCancel\"\n @pointerdown=\"onPointerdown\"\n @click=\"onBackdropClick\"\n >\n <!--\n As in VDialog, only the body scrolls, and the lines under the header and above the footer\n are drawn by sentinels stuck inside the scrolling area, which a scroll-state query reaches.\n -->\n <header class=\"v-drawer-header\">\n <slot name=\"header\">\n <div class=\"v-drawer-titles\">\n <VTypography\n v-if=\"title\"\n :id=\"titleId\"\n as=\"h2\"\n variant=\"heading-3\"\n class=\"v-drawer-title\"\n >\n {{ title }}\n </VTypography>\n <VTypography\n v-if=\"subtitle\"\n :id=\"subtitleId\"\n variant=\"subtitle\"\n tone=\"muted\"\n class=\"v-drawer-subtitle\"\n >\n {{ subtitle }}\n </VTypography>\n </div>\n </slot>\n <div v-if=\"!hideClose || $slots['header-actions']\" class=\"v-drawer-header-actions\">\n <slot name=\"header-actions\" />\n <VIconButton\n v-if=\"!hideClose\"\n class=\"v-drawer-close\"\n :label=\"resolvedCloseLabel\"\n variant=\"ghost\"\n tone=\"neutral\"\n size=\"sm\"\n @click=\"close\"\n >\n <VIcon :name=\"closeIcon\" />\n </VIconButton>\n </div>\n </header>\n <div class=\"v-drawer-scroll\">\n <span class=\"v-drawer-edge v-drawer-edge--top\" aria-hidden=\"true\" />\n <div class=\"v-drawer-body\">\n <slot />\n </div>\n <span class=\"v-drawer-edge v-drawer-edge--bottom\" aria-hidden=\"true\" />\n </div>\n <footer v-if=\"$slots.footer\" class=\"v-drawer-footer\">\n <slot name=\"footer\" />\n </footer>\n </dialog>\n</template>\n\n<style>\n@layer vectis.components {\n .v-drawer {\n /*\n * Declared on the element rather than as a `var()` fallback: a drawer opened from inside\n * another is its DOM descendant, and would otherwise inherit that drawer's inline extent.\n */\n --drawer-extent: var(--vectis-control-size-drawer-md);\n /* Where the drawer waits off screen, before it enters and after it leaves. */\n --drawer-offset: 100% 0;\n /*\n * Fixed explicitly rather than left to the modal's UA style: an engine without `overlay`\n * takes the drawer out of the top layer the moment it closes, and it must not fall back\n * into the page while it slides out.\n */\n position: fixed;\n inset: 0;\n margin: 0;\n inline-size: auto;\n block-size: auto;\n max-inline-size: none;\n max-block-size: none;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n padding: 0;\n border: none;\n background: var(--vectis-color-surface-overlay);\n color: var(--vectis-color-text);\n box-shadow: var(--vectis-shadow-xl);\n font-family: var(--vectis-text-family);\n /*\n * `display` and `overlay` switch at the END of the exit, which keeps the closed drawer\n * painted, and in the top layer, while it slides out.\n */\n transition:\n translate var(--vectis-duration-slow) var(--vectis-ease-out),\n display var(--vectis-duration-slow) allow-discrete,\n overlay var(--vectis-duration-slow) allow-discrete;\n }\n\n .v-drawer[data-size='sm'] {\n --drawer-extent: var(--vectis-control-size-drawer-sm);\n }\n\n .v-drawer[data-size='lg'] {\n --drawer-extent: var(--vectis-control-size-drawer-lg);\n }\n\n /* The uncovered strip keeps the backdrop within reach, to see the page and to close. */\n .v-drawer[data-side='start'],\n .v-drawer[data-side='end'] {\n inline-size: var(--drawer-extent);\n max-inline-size: calc(100dvi - var(--vectis-space-12));\n }\n\n .v-drawer[data-side='top'],\n .v-drawer[data-side='bottom'] {\n block-size: var(--drawer-extent);\n max-block-size: calc(100dvb - var(--vectis-space-12));\n }\n\n /* The corners against the viewport stay square; the two facing the page are rounded. */\n .v-drawer[data-side='start'] {\n --drawer-offset: -100% 0;\n inset-inline-end: auto;\n border-start-end-radius: var(--vectis-radius-overlay);\n border-end-end-radius: var(--vectis-radius-overlay);\n }\n\n .v-drawer[data-side='end'] {\n inset-inline-start: auto;\n border-start-start-radius: var(--vectis-radius-overlay);\n border-end-start-radius: var(--vectis-radius-overlay);\n }\n\n /* A translation is physical: in a right-to-left page the inline sides swap directions. */\n .v-drawer[data-side='start']:dir(rtl) {\n --drawer-offset: 100% 0;\n }\n\n .v-drawer[data-side='end']:dir(rtl) {\n --drawer-offset: -100% 0;\n }\n\n .v-drawer[data-side='top'] {\n --drawer-offset: 0 -100%;\n bottom: auto;\n border-bottom-left-radius: var(--vectis-radius-overlay);\n border-bottom-right-radius: var(--vectis-radius-overlay);\n }\n\n .v-drawer[data-side='bottom'] {\n --drawer-offset: 0 100%;\n top: auto;\n border-top-left-radius: var(--vectis-radius-overlay);\n border-top-right-radius: var(--vectis-radius-overlay);\n }\n\n /*\n * An indispensable guard: the display declared above beats the browser's own rule hiding a\n * closed dialog. Through the exit, the transition holds `display` back, and a closed drawer\n * sliding away lets clicks through to the page it uncovers.\n */\n .v-drawer:not([open]) {\n display: none;\n translate: var(--drawer-offset);\n pointer-events: none;\n transition-timing-function: var(--vectis-ease-in);\n }\n\n @starting-style {\n .v-drawer[open] {\n translate: var(--drawer-offset);\n }\n }\n\n .v-drawer::backdrop {\n background: var(--vectis-color-backdrop);\n transition:\n opacity var(--vectis-duration-slow) var(--vectis-ease-default),\n display var(--vectis-duration-slow) allow-discrete,\n overlay var(--vectis-duration-slow) allow-discrete;\n }\n\n .v-drawer:not([open])::backdrop {\n opacity: 0;\n }\n\n @starting-style {\n .v-drawer[open]::backdrop {\n opacity: 0;\n }\n }\n\n /* No ring around the whole drawer when opening focuses it: the controls inside show theirs. */\n .v-drawer:focus-visible {\n outline: none;\n }\n\n .v-drawer-scroll {\n /* The zero minimum lets the flex item shrink below its content, so that it scrolls. */\n flex: 1 1 auto;\n min-block-size: 0;\n overflow-y: auto;\n overscroll-behavior: contain;\n display: flex;\n flex-direction: column;\n container-type: scroll-state;\n }\n\n /* Negative margins make the sentinels occupy no space at all. */\n .v-drawer-edge {\n flex: none;\n block-size: 1px;\n position: sticky;\n background: transparent;\n }\n\n .v-drawer-edge--top {\n inset-block-start: 0;\n margin-block-end: -1px;\n }\n\n .v-drawer-edge--bottom {\n inset-block-end: 0;\n margin-block-start: -1px;\n }\n\n .v-drawer-header {\n flex: none;\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: var(--vectis-space-4);\n padding: var(--vectis-space-6) var(--vectis-space-6) var(--vectis-space-3);\n }\n\n .v-drawer-titles {\n display: flex;\n flex-direction: column;\n min-inline-size: 0;\n }\n\n .v-drawer-header-actions {\n display: flex;\n align-items: center;\n gap: var(--vectis-space-1);\n /* Pulled back by the cross's own padding, so its glyph lines up with the header's edge. */\n margin-block-start: calc(-1 * var(--vectis-space-1));\n margin-inline-end: calc(-1 * var(--vectis-space-2));\n }\n\n .v-drawer-body {\n /* Stretched when short, so the footer stays at the bottom of the drawer. */\n flex: 1 0 auto;\n padding: var(--vectis-space-1) var(--vectis-space-6) var(--vectis-space-3);\n font-size: var(--vectis-text-body-md-size);\n line-height: var(--vectis-text-body-md-leading);\n }\n\n .v-drawer-footer {\n flex: none;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-wrap: wrap;\n gap: var(--vectis-space-3);\n padding: var(--vectis-space-3) var(--vectis-space-6) var(--vectis-space-6);\n }\n\n /* Where scroll-state queries are missing, the sentinels simply stay transparent. */\n @container scroll-state(scrollable: top) {\n .v-drawer-edge--top {\n background: var(--vectis-color-border);\n }\n }\n\n @container scroll-state(scrollable: bottom) {\n .v-drawer-edge--bottom {\n background: var(--vectis-color-border);\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-drawer,\n .v-drawer::backdrop {\n transition: none;\n }\n }\n\n /* An outline draws one without moving the layout by a pixel. */\n @media (forced-colors: active) {\n .v-drawer {\n outline: 1px solid CanvasText;\n }\n }\n}\n</style>\n"],"mappings":""}
@@ -0,0 +1,128 @@
1
+ import { useMessages as e } from "../../i18n/state.js";
2
+ import { cssSize as t } from "../../utils/css.js";
3
+ import n from "../VIcon/VIcon.js";
4
+ import r from "../VTypography/VTypography.js";
5
+ import i from "../VIconButton/VIconButton.js";
6
+ import { close as a } from "../VIcon/icons/close.js";
7
+ import { useModalDialog as o } from "../../composables/useModalDialog.js";
8
+ import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, mergeModels as g, mergeProps as _, openBlock as v, renderSlot as y, toDisplayString as b, unref as x, useId as S, useModel as C, withCtx as w } from "vue";
9
+ //#region src/components/VDrawer/VDrawer.vue?vue&type=script&setup=true&lang.ts
10
+ var T = [
11
+ "aria-labelledby",
12
+ "aria-describedby",
13
+ "data-side",
14
+ "data-size"
15
+ ], E = { class: "v-drawer-header" }, D = { class: "v-drawer-titles" }, O = {
16
+ key: 0,
17
+ class: "v-drawer-header-actions"
18
+ }, k = { class: "v-drawer-scroll" }, A = { class: "v-drawer-body" }, j = {
19
+ key: 0,
20
+ class: "v-drawer-footer"
21
+ }, M = /*@__PURE__*/ h({
22
+ inheritAttrs: !1,
23
+ __name: "VDrawer",
24
+ props: /*@__PURE__*/ g({
25
+ title: { default: void 0 },
26
+ subtitle: { default: void 0 },
27
+ side: { default: "end" },
28
+ size: { default: "md" },
29
+ extent: { default: void 0 },
30
+ hideClose: {
31
+ type: Boolean,
32
+ default: !1
33
+ },
34
+ persistentBackdrop: {
35
+ type: Boolean,
36
+ default: !1
37
+ },
38
+ persistentEscape: {
39
+ type: Boolean,
40
+ default: !1
41
+ },
42
+ closeLabel: { default: void 0 }
43
+ }, {
44
+ open: {
45
+ type: Boolean,
46
+ default: !1
47
+ },
48
+ openModifiers: {}
49
+ }),
50
+ emits: ["update:open"],
51
+ setup(h, { expose: g }) {
52
+ let M = h, N = e(), P = c(() => M.closeLabel ?? N.value.common.close), F = C(h, "open"), I = S(), L = S(), { dialogEl: R, rendered: z, rootAttrs: B, show: V, close: H, onClose: U, onCancel: W, onPointerdown: G, onBackdropClick: K } = o(F, {
53
+ persistentBackdrop: () => M.persistentBackdrop,
54
+ persistentEscape: () => M.persistentEscape,
55
+ exitTransition: !0
56
+ }), q = c(() => ({
57
+ onClick: V,
58
+ "aria-haspopup": "dialog"
59
+ }));
60
+ return g({
61
+ show: V,
62
+ close: H,
63
+ el: R
64
+ }), (e, o) => (v(), d(s, null, [y(e.$slots, "trigger", { triggerProps: q.value }), x(z) ? (v(), d("dialog", _({
65
+ key: 0,
66
+ ref_key: "dialogEl",
67
+ ref: R,
68
+ "aria-labelledby": h.title ? x(I) : void 0,
69
+ "aria-describedby": h.subtitle ? x(L) : void 0
70
+ }, x(B), {
71
+ class: "v-drawer",
72
+ "data-side": h.side,
73
+ "data-size": h.size,
74
+ style: { "--drawer-extent": x(t)(h.extent) },
75
+ onClose: o[0] ||= (...e) => x(U) && x(U)(...e),
76
+ onCancel: o[1] ||= (...e) => x(W) && x(W)(...e),
77
+ onPointerdown: o[2] ||= (...e) => x(G) && x(G)(...e),
78
+ onClick: o[3] ||= (...e) => x(K) && x(K)(...e)
79
+ }), [
80
+ f("header", E, [y(e.$slots, "header", {}, () => [f("div", D, [h.title ? (v(), l(r, {
81
+ key: 0,
82
+ id: x(I),
83
+ as: "h2",
84
+ variant: "heading-3",
85
+ class: "v-drawer-title"
86
+ }, {
87
+ default: w(() => [p(b(h.title), 1)]),
88
+ _: 1
89
+ }, 8, ["id"])) : u("", !0), h.subtitle ? (v(), l(r, {
90
+ key: 1,
91
+ id: x(L),
92
+ variant: "subtitle",
93
+ tone: "muted",
94
+ class: "v-drawer-subtitle"
95
+ }, {
96
+ default: w(() => [p(b(h.subtitle), 1)]),
97
+ _: 1
98
+ }, 8, ["id"])) : u("", !0)])]), !h.hideClose || e.$slots["header-actions"] ? (v(), d("div", O, [y(e.$slots, "header-actions"), h.hideClose ? u("", !0) : (v(), l(i, {
99
+ key: 0,
100
+ class: "v-drawer-close",
101
+ label: P.value,
102
+ variant: "ghost",
103
+ tone: "neutral",
104
+ size: "sm",
105
+ onClick: x(H)
106
+ }, {
107
+ default: w(() => [m(n, { name: x(a) }, null, 8, ["name"])]),
108
+ _: 1
109
+ }, 8, ["label", "onClick"]))])) : u("", !0)]),
110
+ f("div", k, [
111
+ o[4] ||= f("span", {
112
+ class: "v-drawer-edge v-drawer-edge--top",
113
+ "aria-hidden": "true"
114
+ }, null, -1),
115
+ f("div", A, [y(e.$slots, "default")]),
116
+ o[5] ||= f("span", {
117
+ class: "v-drawer-edge v-drawer-edge--bottom",
118
+ "aria-hidden": "true"
119
+ }, null, -1)
120
+ ]),
121
+ e.$slots.footer ? (v(), d("footer", j, [y(e.$slots, "footer")])) : u("", !0)
122
+ ], 16, T)) : u("", !0)], 64));
123
+ }
124
+ });
125
+ //#endregion
126
+ export { M as default };
127
+
128
+ //# sourceMappingURL=VDrawer.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VDrawer.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/VDrawer/VDrawer.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @core\n/**\n * A native modal `<dialog>` pinned to one edge of the viewport, its model bridged by\n * useModalDialog. It stays rendered through its exit, so it slides out as it slid in.\n */\n\nimport { computed, useId } from 'vue'\n\nimport type { DialogTriggerProps } from '../VDialog/VDialog.vue'\nimport VIcon from '../VIcon/VIcon.vue'\nimport { close as closeIcon } from '../VIcon/icons/close'\nimport VIconButton from '../VIconButton/VIconButton.vue'\nimport VTypography from '../VTypography/VTypography.vue'\nimport { useModalDialog } from '../../composables/useModalDialog'\nimport { useMessages } from '../../i18n/state'\nimport { cssSize } from '../../utils/css'\n\n/** The edge the drawer comes from. `start` and `end` follow the writing direction. */\nexport type DrawerSide = 'start' | 'end' | 'top' | 'bottom'\n\n/** The width of a drawer on a side, or the height of one at the top or bottom. */\nexport type DrawerSize = 'sm' | 'md' | 'lg'\n\ninterface DrawerProps {\n /**\n * The title of the drawer, which also names it for assistive technology. It is ignored when\n * the `#header` slot replaces the whole header.\n */\n title?: string\n /** A line under the title. */\n subtitle?: string\n /** The edge the drawer comes from. `start` and `end` follow the writing direction. */\n side?: DrawerSide\n /**\n * How far the drawer reaches into the page: its width on a side, its height at the top or\n * bottom. Each step reads a `--vectis-control-size-drawer-*` token.\n */\n size?: DrawerSize\n /**\n * A length replacing `size`: a number is read as pixels, a string as any CSS length. The\n * drawer always leaves a strip of the page uncovered, which a click closes it through.\n */\n extent?: number | string\n /**\n * Takes the close cross out of the header, leaving the reader with Escape, the backdrop and\n * whatever the footer offers.\n */\n hideClose?: boolean\n /** Stops a click outside the drawer from closing it. */\n persistentBackdrop?: boolean\n /**\n * Stops the Escape key from closing the drawer. Refusing Escape while the backdrop still\n * closes cannot be expressed natively, so both routes are then allowed.\n */\n persistentEscape?: boolean\n /** What the close cross does, in words. It falls back to the design system dictionary. */\n closeLabel?: string\n}\n\nconst props = withDefaults(defineProps<DrawerProps>(), {\n title: undefined,\n subtitle: undefined,\n side: 'end',\n size: 'md',\n extent: undefined,\n hideClose: false,\n persistentBackdrop: false,\n persistentEscape: false,\n closeLabel: undefined,\n})\n\nconst m = useMessages()\nconst resolvedCloseLabel = computed(() => props.closeLabel ?? m.value.common.close)\n\n/** Whether the drawer is showing. */\nconst open = defineModel<boolean>('open', { default: false })\n\ndefineSlots<{\n /** The body of the drawer. This is the part that scrolls when there is too much of it. */\n default(): unknown\n /** Replaces the title and subtitle block with content of your own. */\n header?(): unknown\n /** Extra controls in the header, placed before the close cross. */\n 'header-actions'?(): unknown\n /** The buttons at the foot of the drawer. */\n footer?(): unknown\n /**\n * The button that opens the drawer. Bind the `triggerProps` it receives onto it. It stays\n * rendered always, unlike the drawer itself.\n */\n trigger?(props: { triggerProps: DialogTriggerProps }): unknown\n}>()\n\ndefineOptions({ inheritAttrs: false })\n\nconst titleId = useId()\nconst subtitleId = useId()\n\nconst {\n dialogEl,\n rendered,\n rootAttrs,\n show,\n close,\n onClose,\n onCancel,\n onPointerdown,\n onBackdropClick,\n} = useModalDialog(open, {\n persistentBackdrop: () => props.persistentBackdrop,\n persistentEscape: () => props.persistentEscape,\n exitTransition: true,\n})\n\nconst triggerProps = computed<DialogTriggerProps>(() => ({\n onClick: show,\n 'aria-haspopup': 'dialog',\n}))\n\ndefineExpose({\n /**\n * Opens the drawer, exactly as setting `open` does. The opening lands on the next tick: the\n * promise returned settles once the drawer is showing.\n */\n show,\n /**\n * Closes the drawer. It closes unconditionally, `persistentEscape` and `persistentBackdrop`\n * governing only the two routes the reader can take.\n */\n close,\n /**\n * The `<dialog>` element. It is null while closed, once its exit has played: each opening\n * from there builds a fresh one.\n */\n el: dialogEl,\n})\n</script>\n\n<template>\n <slot name=\"trigger\" :trigger-props=\"triggerProps\" />\n <dialog\n v-if=\"rendered\"\n ref=\"dialogEl\"\n :aria-labelledby=\"title ? titleId : undefined\"\n :aria-describedby=\"subtitle ? subtitleId : undefined\"\n v-bind=\"rootAttrs\"\n class=\"v-drawer\"\n :data-side=\"side\"\n :data-size=\"size\"\n :style=\"{ '--drawer-extent': cssSize(extent) }\"\n @close=\"onClose\"\n @cancel=\"onCancel\"\n @pointerdown=\"onPointerdown\"\n @click=\"onBackdropClick\"\n >\n <!--\n As in VDialog, only the body scrolls, and the lines under the header and above the footer\n are drawn by sentinels stuck inside the scrolling area, which a scroll-state query reaches.\n -->\n <header class=\"v-drawer-header\">\n <slot name=\"header\">\n <div class=\"v-drawer-titles\">\n <VTypography\n v-if=\"title\"\n :id=\"titleId\"\n as=\"h2\"\n variant=\"heading-3\"\n class=\"v-drawer-title\"\n >\n {{ title }}\n </VTypography>\n <VTypography\n v-if=\"subtitle\"\n :id=\"subtitleId\"\n variant=\"subtitle\"\n tone=\"muted\"\n class=\"v-drawer-subtitle\"\n >\n {{ subtitle }}\n </VTypography>\n </div>\n </slot>\n <div v-if=\"!hideClose || $slots['header-actions']\" class=\"v-drawer-header-actions\">\n <slot name=\"header-actions\" />\n <VIconButton\n v-if=\"!hideClose\"\n class=\"v-drawer-close\"\n :label=\"resolvedCloseLabel\"\n variant=\"ghost\"\n tone=\"neutral\"\n size=\"sm\"\n @click=\"close\"\n >\n <VIcon :name=\"closeIcon\" />\n </VIconButton>\n </div>\n </header>\n <div class=\"v-drawer-scroll\">\n <span class=\"v-drawer-edge v-drawer-edge--top\" aria-hidden=\"true\" />\n <div class=\"v-drawer-body\">\n <slot />\n </div>\n <span class=\"v-drawer-edge v-drawer-edge--bottom\" aria-hidden=\"true\" />\n </div>\n <footer v-if=\"$slots.footer\" class=\"v-drawer-footer\">\n <slot name=\"footer\" />\n </footer>\n </dialog>\n</template>\n\n<style>\n@layer vectis.components {\n .v-drawer {\n /*\n * Declared on the element rather than as a `var()` fallback: a drawer opened from inside\n * another is its DOM descendant, and would otherwise inherit that drawer's inline extent.\n */\n --drawer-extent: var(--vectis-control-size-drawer-md);\n /* Where the drawer waits off screen, before it enters and after it leaves. */\n --drawer-offset: 100% 0;\n /*\n * Fixed explicitly rather than left to the modal's UA style: an engine without `overlay`\n * takes the drawer out of the top layer the moment it closes, and it must not fall back\n * into the page while it slides out.\n */\n position: fixed;\n inset: 0;\n margin: 0;\n inline-size: auto;\n block-size: auto;\n max-inline-size: none;\n max-block-size: none;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n padding: 0;\n border: none;\n background: var(--vectis-color-surface-overlay);\n color: var(--vectis-color-text);\n box-shadow: var(--vectis-shadow-xl);\n font-family: var(--vectis-text-family);\n /*\n * `display` and `overlay` switch at the END of the exit, which keeps the closed drawer\n * painted, and in the top layer, while it slides out.\n */\n transition:\n translate var(--vectis-duration-slow) var(--vectis-ease-out),\n display var(--vectis-duration-slow) allow-discrete,\n overlay var(--vectis-duration-slow) allow-discrete;\n }\n\n .v-drawer[data-size='sm'] {\n --drawer-extent: var(--vectis-control-size-drawer-sm);\n }\n\n .v-drawer[data-size='lg'] {\n --drawer-extent: var(--vectis-control-size-drawer-lg);\n }\n\n /* The uncovered strip keeps the backdrop within reach, to see the page and to close. */\n .v-drawer[data-side='start'],\n .v-drawer[data-side='end'] {\n inline-size: var(--drawer-extent);\n max-inline-size: calc(100dvi - var(--vectis-space-12));\n }\n\n .v-drawer[data-side='top'],\n .v-drawer[data-side='bottom'] {\n block-size: var(--drawer-extent);\n max-block-size: calc(100dvb - var(--vectis-space-12));\n }\n\n /* The corners against the viewport stay square; the two facing the page are rounded. */\n .v-drawer[data-side='start'] {\n --drawer-offset: -100% 0;\n inset-inline-end: auto;\n border-start-end-radius: var(--vectis-radius-overlay);\n border-end-end-radius: var(--vectis-radius-overlay);\n }\n\n .v-drawer[data-side='end'] {\n inset-inline-start: auto;\n border-start-start-radius: var(--vectis-radius-overlay);\n border-end-start-radius: var(--vectis-radius-overlay);\n }\n\n /* A translation is physical: in a right-to-left page the inline sides swap directions. */\n .v-drawer[data-side='start']:dir(rtl) {\n --drawer-offset: 100% 0;\n }\n\n .v-drawer[data-side='end']:dir(rtl) {\n --drawer-offset: -100% 0;\n }\n\n .v-drawer[data-side='top'] {\n --drawer-offset: 0 -100%;\n bottom: auto;\n border-bottom-left-radius: var(--vectis-radius-overlay);\n border-bottom-right-radius: var(--vectis-radius-overlay);\n }\n\n .v-drawer[data-side='bottom'] {\n --drawer-offset: 0 100%;\n top: auto;\n border-top-left-radius: var(--vectis-radius-overlay);\n border-top-right-radius: var(--vectis-radius-overlay);\n }\n\n /*\n * An indispensable guard: the display declared above beats the browser's own rule hiding a\n * closed dialog. Through the exit, the transition holds `display` back, and a closed drawer\n * sliding away lets clicks through to the page it uncovers.\n */\n .v-drawer:not([open]) {\n display: none;\n translate: var(--drawer-offset);\n pointer-events: none;\n transition-timing-function: var(--vectis-ease-in);\n }\n\n @starting-style {\n .v-drawer[open] {\n translate: var(--drawer-offset);\n }\n }\n\n .v-drawer::backdrop {\n background: var(--vectis-color-backdrop);\n transition:\n opacity var(--vectis-duration-slow) var(--vectis-ease-default),\n display var(--vectis-duration-slow) allow-discrete,\n overlay var(--vectis-duration-slow) allow-discrete;\n }\n\n .v-drawer:not([open])::backdrop {\n opacity: 0;\n }\n\n @starting-style {\n .v-drawer[open]::backdrop {\n opacity: 0;\n }\n }\n\n /* No ring around the whole drawer when opening focuses it: the controls inside show theirs. */\n .v-drawer:focus-visible {\n outline: none;\n }\n\n .v-drawer-scroll {\n /* The zero minimum lets the flex item shrink below its content, so that it scrolls. */\n flex: 1 1 auto;\n min-block-size: 0;\n overflow-y: auto;\n overscroll-behavior: contain;\n display: flex;\n flex-direction: column;\n container-type: scroll-state;\n }\n\n /* Negative margins make the sentinels occupy no space at all. */\n .v-drawer-edge {\n flex: none;\n block-size: 1px;\n position: sticky;\n background: transparent;\n }\n\n .v-drawer-edge--top {\n inset-block-start: 0;\n margin-block-end: -1px;\n }\n\n .v-drawer-edge--bottom {\n inset-block-end: 0;\n margin-block-start: -1px;\n }\n\n .v-drawer-header {\n flex: none;\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: var(--vectis-space-4);\n padding: var(--vectis-space-6) var(--vectis-space-6) var(--vectis-space-3);\n }\n\n .v-drawer-titles {\n display: flex;\n flex-direction: column;\n min-inline-size: 0;\n }\n\n .v-drawer-header-actions {\n display: flex;\n align-items: center;\n gap: var(--vectis-space-1);\n /* Pulled back by the cross's own padding, so its glyph lines up with the header's edge. */\n margin-block-start: calc(-1 * var(--vectis-space-1));\n margin-inline-end: calc(-1 * var(--vectis-space-2));\n }\n\n .v-drawer-body {\n /* Stretched when short, so the footer stays at the bottom of the drawer. */\n flex: 1 0 auto;\n padding: var(--vectis-space-1) var(--vectis-space-6) var(--vectis-space-3);\n font-size: var(--vectis-text-body-md-size);\n line-height: var(--vectis-text-body-md-leading);\n }\n\n .v-drawer-footer {\n flex: none;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-wrap: wrap;\n gap: var(--vectis-space-3);\n padding: var(--vectis-space-3) var(--vectis-space-6) var(--vectis-space-6);\n }\n\n /* Where scroll-state queries are missing, the sentinels simply stay transparent. */\n @container scroll-state(scrollable: top) {\n .v-drawer-edge--top {\n background: var(--vectis-color-border);\n }\n }\n\n @container scroll-state(scrollable: bottom) {\n .v-drawer-edge--bottom {\n background: var(--vectis-color-border);\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-drawer,\n .v-drawer::backdrop {\n transition: none;\n }\n }\n\n /* An outline draws one without moving the layout by a pixel. */\n @media (forced-colors: active) {\n .v-drawer {\n outline: 1px solid CanvasText;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4DA,IAAM,IAAQ,GAYR,IAAI,EAAY,GAChB,IAAqB,QAAe,EAAM,cAAc,EAAE,MAAM,OAAO,KAAK,GAG5E,IAAO,EAAoB,GAAC,MAA0B,GAoBtD,IAAU,EAAM,GAChB,IAAa,EAAM,GAEnB,EACJ,aACA,aACA,cACA,SACA,OAAA,GACA,YACA,aACA,kBACA,uBACE,EAAe,GAAM;GACvB,0BAA0B,EAAM;GAChC,wBAAwB,EAAM;GAC9B,gBAAgB;EAClB,CAAC,GAEK,IAAe,SAAoC;GACvD,SAAS;GACT,iBAAiB;EACnB,EAAE;SAEF,EAAa;GAKX;GAKA,OAAA;GAKA,IAAI;EACN,CAAC,+BAIC,EAAqD,EAAA,QAAA,WAAA,EAA/B,cAAe,EAAA,MAAY,CAAA,GAEzC,EAAA,CAAA,KAAA,EAAA,GADR,EAmES,UAnET,EAmES;;YAjEH;GAAJ,KAAI;GACH,mBAAiB,EAAA,QAAQ,EAAA,CAAA,IAAU,KAAA;GACnC,oBAAkB,EAAA,WAAW,EAAA,CAAA,IAAa,KAAA;KACnC,EAAA,CAAA,GAAS;GACjB,OAAM;GACL,aAAW,EAAA;GACX,aAAW,EAAA;GACX,OAAK,EAAA,mBAAuB,EAAA,CAAA,CAAO,CAAC,EAAA,MAAM,EAAA;GAC1C,SAAK,AAAA,EAAA,QAAA,GAAA,MAAE,EAAA,CAAA,KAAA,EAAA,CAAA,CAAA,CAAA,GAAA,CAAA;GACP,UAAM,AAAA,EAAA,QAAA,GAAA,MAAE,EAAA,CAAA,KAAA,EAAA,CAAA,CAAA,CAAA,GAAA,CAAA;GACR,eAAW,AAAA,EAAA,QAAA,GAAA,MAAE,EAAA,CAAA,KAAA,EAAA,CAAA,CAAA,CAAA,GAAA,CAAA;GACb,SAAK,AAAA,EAAA,QAAA,GAAA,MAAE,EAAA,CAAA,KAAA,EAAA,CAAA,CAAA,CAAA,GAAA,CAAA;;GAMR,EAqCS,UArCT,GAqCS,CApCP,EAqBO,EAAA,QAAA,UAAA,CAAA,SAAA,CApBL,EAmBM,OAnBN,GAmBM,CAjBI,EAAA,SAAA,EAAA,GADR,EAQc,GAAA;;IANX,IAAI,EAAA,CAAA;IACL,IAAG;IACH,SAAQ;IACR,OAAM;;qBAEK,CAAA,EAAA,EAAR,EAAA,KAAK,GAAA,CAAA,CAAA,CAAA;;+BAGF,EAAA,YAAA,EAAA,GADR,EAQc,GAAA;;IANX,IAAI,EAAA,CAAA;IACL,SAAQ;IACR,MAAK;IACL,OAAM;;qBAEQ,CAAA,EAAA,EAAX,EAAA,QAAQ,GAAA,CAAA,CAAA,CAAA;;oCAIL,EAAA,aAAaA,EAAAA,OAAM,qBAAA,EAAA,GAA/B,EAaM,OAbN,GAaM,CAZJ,EAA8B,EAAA,QAAA,gBAAA,GAErB,EAAA,yBAAA,EAAA,GADT,EAUc,GAAA;;IARZ,OAAM;IACL,OAAO,EAAA;IACR,SAAQ;IACR,MAAK;IACL,MAAK;IACJ,SAAO,EAAA,CAAA;;qBAEmB,CAA3B,EAA2B,GAAA,EAAnB,MAAM,EAAA,CAAA,EAAS,GAAA,MAAA,GAAA,CAAA,MAAA,CAAA,CAAA,CAAA;;;GAI7B,EAMM,OANN,GAMM;aALJ,EAAoE,QAAA;KAA9D,OAAM;KAAmC,eAAY;;IAC3D,EAEM,OAFN,GAEM,CADJ,EAAQ,EAAA,QAAA,SAAA,CAAA,CAAA;aAEV,EAAuE,QAAA;KAAjE,OAAM;KAAsC,eAAY;;;GAElDA,EAAAA,OAAO,UAAA,EAAA,GAArB,EAES,UAFT,GAES,CADP,EAAsB,EAAA,QAAA,QAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA"}
@@ -0,0 +1,2 @@
1
+ @layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
2
+ @layer vectis.components{.v-empty-state{--empty-state-media:var(--vectis-control-size-empty-state-media-md);--empty-state-gap:var(--vectis-space-3);align-items:center;gap:var(--empty-state-gap);padding:var(--vectis-space-8) var(--vectis-space-6);text-align:center;color:var(--vectis-color-text);font-family:var(--vectis-text-family);flex-direction:column;display:flex}.v-empty-state[data-size=sm]{--empty-state-media:var(--vectis-control-size-empty-state-media-sm);--empty-state-gap:var(--vectis-space-2);padding:var(--vectis-space-4)}.v-empty-state[data-size=lg]{--empty-state-media:var(--vectis-control-size-empty-state-media-lg);--empty-state-gap:var(--vectis-space-4);padding:var(--vectis-space-12) var(--vectis-space-8)}.v-empty-state-icon{--vectis-icon-size:calc(var(--empty-state-media) / 2);inline-size:var(--empty-state-media);block-size:var(--empty-state-media);border-radius:var(--vectis-radius-full);background:var(--vectis-color-surface-muted);color:var(--vectis-color-text-muted);place-items:center;display:inline-grid}.v-empty-state-icon,.v-empty-state-media{margin-block-end:var(--vectis-space-1)}.v-empty-state-title,.v-empty-state-description{max-inline-size:var(--vectis-control-size-empty-state-text-max);margin:0}.v-empty-state-title{font-size:var(--vectis-text-heading-4-size);font-weight:var(--vectis-text-heading-4-weight);line-height:var(--vectis-text-heading-4-leading)}.v-empty-state-description{font-size:var(--vectis-text-body-md-size);font-weight:var(--vectis-text-body-md-weight);line-height:var(--vectis-text-body-md-leading);color:var(--vectis-color-text-muted)}.v-empty-state[data-size=sm] .v-empty-state-title{font-size:var(--vectis-text-label-size);font-weight:var(--vectis-text-label-weight);line-height:var(--vectis-text-label-leading)}.v-empty-state[data-size=sm] .v-empty-state-description{font-size:var(--vectis-text-body-sm-size);font-weight:var(--vectis-text-body-sm-weight);line-height:var(--vectis-text-body-sm-leading)}.v-empty-state[data-size=lg] .v-empty-state-title{font-size:var(--vectis-text-heading-3-size);font-weight:var(--vectis-text-heading-3-weight);line-height:var(--vectis-text-heading-3-leading)}.v-empty-state-actions{justify-content:center;gap:var(--vectis-space-3);flex-wrap:wrap;margin-block-start:var(--vectis-space-2);display:flex}@media (forced-colors:active){.v-empty-state-icon{outline:1px solid canvastext}}}