vectis-ui 0.1.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (475) hide show
  1. package/README.md +40 -6
  2. package/dist/components/VAccordion/VAccordion.css +1 -1
  3. package/dist/components/VAccordion/VAccordion.d.ts +9 -16
  4. package/dist/components/VAccordion/VAccordion.js.map +1 -1
  5. package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js +3 -3
  6. package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
  7. package/dist/components/VAccordion/VAccordionItem.css +1 -1
  8. package/dist/components/VAccordion/VAccordionItem.d.ts +33 -19
  9. package/dist/components/VAccordion/VAccordionItem.js.map +1 -1
  10. package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js +50 -38
  11. package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  12. package/dist/components/VAccordion/context.d.ts +1 -8
  13. package/dist/components/VAccordion/context.js.map +1 -1
  14. package/dist/components/VAvatar/VAvatar.css +1 -1
  15. package/dist/components/VAvatar/VAvatar.d.ts +44 -29
  16. package/dist/components/VAvatar/VAvatar.js.map +1 -1
  17. package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js +38 -35
  18. package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  19. package/dist/components/VAvatar/VAvatarGroup.d.ts +5 -16
  20. package/dist/components/VAvatar/VAvatarGroup.js.map +1 -1
  21. package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js +7 -7
  22. package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  23. package/dist/components/VAvatar/context.d.ts +6 -10
  24. package/dist/components/VAvatar/context.js.map +1 -1
  25. package/dist/components/VBadge/VBadge.css +1 -1
  26. package/dist/components/VBadge/VBadge.d.ts +31 -10
  27. package/dist/components/VBadge/VBadge.js.map +1 -1
  28. package/dist/components/VBadge/VBadge.vue_vue_type_script_setup_true_lang.js +39 -24
  29. package/dist/components/VBadge/VBadge.vue_vue_type_script_setup_true_lang.js.map +1 -1
  30. package/dist/components/VBreadcrumb/VBreadcrumb.css +1 -1
  31. package/dist/components/VBreadcrumb/VBreadcrumb.d.ts +4 -17
  32. package/dist/components/VBreadcrumb/VBreadcrumb.js.map +1 -1
  33. package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js +23 -25
  34. package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js.map +1 -1
  35. package/dist/components/VButton/VButton.css +1 -1
  36. package/dist/components/VButton/VButton.d.ts +30 -10
  37. package/dist/components/VButton/VButton.js.map +1 -1
  38. package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js +39 -30
  39. package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  40. package/dist/components/VButton/VButtonGroup.css +1 -1
  41. package/dist/components/VButton/VButtonGroup.d.ts +76 -13
  42. package/dist/components/VButton/VButtonGroup.js.map +1 -1
  43. package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js +74 -8
  44. package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  45. package/dist/components/VButton/context.d.ts +30 -0
  46. package/dist/components/VButton/context.js +6 -0
  47. package/dist/components/VButton/context.js.map +1 -0
  48. package/dist/components/VCalendar/VCalendar.css +1 -1
  49. package/dist/components/VCalendar/VCalendar.d.ts +50 -36
  50. package/dist/components/VCalendar/VCalendar.js.map +1 -1
  51. package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js +99 -85
  52. package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  53. package/dist/components/VCalendar/VCalendarEvent.css +1 -1
  54. package/dist/components/VCalendar/VCalendarEvent.d.ts +5 -11
  55. package/dist/components/VCalendar/VCalendarEvent.js.map +1 -1
  56. package/dist/components/VCalendar/VCalendarEvent.vue_vue_type_script_setup_true_lang.js +7 -1
  57. package/dist/components/VCalendar/VCalendarEvent.vue_vue_type_script_setup_true_lang.js.map +1 -1
  58. package/dist/components/VCalendar/VCalendarMonth.css +1 -1
  59. package/dist/components/VCalendar/VCalendarMonth.d.ts +10 -13
  60. package/dist/components/VCalendar/VCalendarMonth.js.map +1 -1
  61. package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js +183 -244
  62. package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js.map +1 -1
  63. package/dist/components/VCalendar/VCalendarTimeGrid.css +1 -1
  64. package/dist/components/VCalendar/VCalendarTimeGrid.d.ts +15 -20
  65. package/dist/components/VCalendar/VCalendarTimeGrid.js.map +1 -1
  66. package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js +385 -448
  67. package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js.map +1 -1
  68. package/dist/components/VCalendar/VCalendarYear.css +1 -1
  69. package/dist/components/VCalendar/VCalendarYear.js.map +1 -1
  70. package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js +53 -49
  71. package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js.map +1 -1
  72. package/dist/components/VCalendar/gesture.d.ts +158 -0
  73. package/dist/components/VCalendar/gesture.js +170 -0
  74. package/dist/components/VCalendar/gesture.js.map +1 -0
  75. package/dist/components/VCalendar/keyboard.d.ts +9 -3
  76. package/dist/components/VCalendar/keyboard.js +2 -6
  77. package/dist/components/VCalendar/keyboard.js.map +1 -1
  78. package/dist/components/VCalendar/layout.d.ts +67 -54
  79. package/dist/components/VCalendar/layout.js +77 -69
  80. package/dist/components/VCalendar/layout.js.map +1 -1
  81. package/dist/components/VCalendar/timeGrid.d.ts +55 -0
  82. package/dist/components/VCalendar/timeGrid.js +71 -0
  83. package/dist/components/VCalendar/timeGrid.js.map +1 -0
  84. package/dist/components/VCalendar/types.d.ts +41 -16
  85. package/dist/components/VCarousel/VCarousel.css +1 -1
  86. package/dist/components/VCarousel/VCarousel.d.ts +21 -41
  87. package/dist/components/VCarousel/VCarousel.js.map +1 -1
  88. package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js +157 -129
  89. package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  90. package/dist/components/VCarousel/VCarouselItem.d.ts +0 -17
  91. package/dist/components/VCarousel/VCarouselItem.js.map +1 -1
  92. package/dist/components/VCarousel/VCarouselItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  93. package/dist/components/VCarousel/context.d.ts +0 -12
  94. package/dist/components/VCarousel/context.js.map +1 -1
  95. package/dist/components/VCheckbox/VCheckbox.css +1 -1
  96. package/dist/components/VCheckbox/VCheckbox.d.ts +31 -16
  97. package/dist/components/VCheckbox/VCheckbox.js.map +1 -1
  98. package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js +62 -29
  99. package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  100. package/dist/components/VChip/VChip.css +1 -1
  101. package/dist/components/VChip/VChip.d.ts +36 -26
  102. package/dist/components/VChip/VChip.js.map +1 -1
  103. package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js +57 -48
  104. package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  105. package/dist/components/VCombobox/VCombobox.css +1 -1
  106. package/dist/components/VCombobox/VCombobox.d.ts +127 -31
  107. package/dist/components/VCombobox/VCombobox.js.map +1 -1
  108. package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js +336 -247
  109. package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  110. package/dist/components/VCombobox/VComboboxGroup.css +1 -1
  111. package/dist/components/VCombobox/VComboboxGroup.d.ts +0 -9
  112. package/dist/components/VCombobox/VComboboxGroup.js.map +1 -1
  113. package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js +1 -1
  114. package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  115. package/dist/components/VCombobox/VComboboxOption.css +1 -1
  116. package/dist/components/VCombobox/VComboboxOption.d.ts +0 -15
  117. package/dist/components/VCombobox/VComboboxOption.js.map +1 -1
  118. package/dist/components/VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js +4 -4
  119. package/dist/components/VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js.map +1 -1
  120. package/dist/components/VCombobox/VComboboxSeparator.js.map +1 -1
  121. package/dist/components/VCombobox/VComboboxSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
  122. package/dist/components/VCombobox/infiniteScroll.js.map +1 -1
  123. package/dist/components/VDataTable/VDataTable.css +1 -1
  124. package/dist/components/VDataTable/VDataTable.d.ts +50 -28
  125. package/dist/components/VDataTable/VDataTable.js.map +1 -1
  126. package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js +183 -194
  127. package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  128. package/dist/components/VDateInput/VDateInput.css +1 -1
  129. package/dist/components/VDateInput/VDateInput.d.ts +90 -42
  130. package/dist/components/VDateInput/VDateInput.js.map +1 -1
  131. package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js +159 -191
  132. package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  133. package/dist/components/VDatePicker/VDatePicker.css +1 -1
  134. package/dist/components/VDatePicker/VDatePicker.d.ts +61 -30
  135. package/dist/components/VDatePicker/VDatePicker.js.map +1 -1
  136. package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js +243 -221
  137. package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  138. package/dist/components/VDialog/VDialog.css +1 -1
  139. package/dist/components/VDialog/VDialog.d.ts +45 -33
  140. package/dist/components/VDialog/VDialog.js.map +1 -1
  141. package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js +65 -64
  142. package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  143. package/dist/components/VDialog/VDialogAlert.d.ts +24 -20
  144. package/dist/components/VDialog/VDialogAlert.js.map +1 -1
  145. package/dist/components/VDialog/VDialogAlert.vue_vue_type_script_setup_true_lang.js +36 -25
  146. package/dist/components/VDialog/VDialogAlert.vue_vue_type_script_setup_true_lang.js.map +1 -1
  147. package/dist/components/VFileInput/VFileInput.css +1 -1
  148. package/dist/components/VFileInput/VFileInput.d.ts +78 -26
  149. package/dist/components/VFileInput/VFileInput.js.map +1 -1
  150. package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js +144 -132
  151. package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  152. package/dist/components/VFilePicker/VFilePicker.css +1 -1
  153. package/dist/components/VFilePicker/VFilePicker.d.ts +47 -30
  154. package/dist/components/VFilePicker/VFilePicker.js.map +1 -1
  155. package/dist/components/VFilePicker/VFilePicker.vue_vue_type_script_setup_true_lang.js +166 -163
  156. package/dist/components/VFilePicker/VFilePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  157. package/dist/components/VFilePicker/fileKind.d.ts +2 -27
  158. package/dist/components/VFilePicker/fileKind.js +9 -8
  159. package/dist/components/VFilePicker/fileKind.js.map +1 -1
  160. package/dist/components/VHotkeys/VHotkeys.css +1 -1
  161. package/dist/components/VHotkeys/VHotkeys.d.ts +8 -30
  162. package/dist/components/VHotkeys/VHotkeys.js.map +1 -1
  163. package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js +4 -4
  164. package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js.map +1 -1
  165. package/dist/components/VHotkeys/platform.js.map +1 -1
  166. package/dist/components/VIcon/VIcon.css +1 -1
  167. package/dist/components/VIcon/VIcon.d.ts +15 -6
  168. package/dist/components/VIcon/VIcon.js.map +1 -1
  169. package/dist/components/VIcon/VIcon.vue_vue_type_script_setup_true_lang.js +45 -37
  170. package/dist/components/VIcon/VIcon.vue_vue_type_script_setup_true_lang.js.map +1 -1
  171. package/dist/components/VIcon/iconProps.js.map +1 -1
  172. package/dist/components/VIcon/icons/index.d.ts +1 -1
  173. package/dist/components/VIcon/icons/index.js.map +1 -1
  174. package/dist/components/VIcon/icons/names.d.ts +1 -1
  175. package/dist/components/VIcon/icons/names.js.map +1 -1
  176. package/dist/components/VIcon/resolver.d.ts +3 -3
  177. package/dist/components/VIcon/resolver.js.map +1 -1
  178. package/dist/components/VIcon/types.d.ts +12 -12
  179. package/dist/components/VIconButton/VIconButton.css +1 -1
  180. package/dist/components/VIconButton/VIconButton.d.ts +28 -11
  181. package/dist/components/VIconButton/VIconButton.js.map +1 -1
  182. package/dist/components/VIconButton/VIconButton.vue_vue_type_script_setup_true_lang.js +26 -20
  183. package/dist/components/VIconButton/VIconButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  184. package/dist/components/VInput/VInput.css +1 -1
  185. package/dist/components/VInput/VInput.d.ts +26 -7
  186. package/dist/components/VInput/VInput.js.map +1 -1
  187. package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js +86 -75
  188. package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  189. package/dist/components/VInput/VInputGroup.css +2 -0
  190. package/dist/components/VInput/VInputGroup.d.ts +47 -0
  191. package/dist/components/VInput/VInputGroup.js +9 -0
  192. package/dist/components/VInput/VInputGroup.js.map +1 -0
  193. package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js +80 -0
  194. package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
  195. package/dist/components/VInput/context.d.ts +11 -0
  196. package/dist/components/VInput/context.js +6 -0
  197. package/dist/components/VInput/context.js.map +1 -0
  198. package/dist/components/VInputOTP/VInputOTP.css +1 -1
  199. package/dist/components/VInputOTP/VInputOTP.d.ts +37 -22
  200. package/dist/components/VInputOTP/VInputOTP.js.map +1 -1
  201. package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js +98 -61
  202. package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js.map +1 -1
  203. package/dist/components/VMenu/VMenu.d.ts +23 -30
  204. package/dist/components/VMenu/VMenu.js.map +1 -1
  205. package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js +31 -27
  206. package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  207. package/dist/components/VMenu/VMenuGroup.css +1 -1
  208. package/dist/components/VMenu/VMenuGroup.d.ts +12 -8
  209. package/dist/components/VMenu/VMenuGroup.js.map +1 -1
  210. package/dist/components/VMenu/VMenuGroup.vue_vue_type_script_setup_true_lang.js +11 -11
  211. package/dist/components/VMenu/VMenuGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  212. package/dist/components/VMenu/VMenuItem.css +1 -1
  213. package/dist/components/VMenu/VMenuItem.d.ts +11 -19
  214. package/dist/components/VMenu/VMenuItem.js.map +1 -1
  215. package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js +65 -57
  216. package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  217. package/dist/components/VMenu/VMenuPanel.d.ts +14 -30
  218. package/dist/components/VMenu/VMenuPanel.js.map +1 -1
  219. package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js +43 -44
  220. package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  221. package/dist/components/VMenu/context.d.ts +2 -6
  222. package/dist/components/VMenu/context.js.map +1 -1
  223. package/dist/components/VPagination/VPagination.css +1 -1
  224. package/dist/components/VPagination/VPagination.d.ts +60 -22
  225. package/dist/components/VPagination/VPagination.js.map +1 -1
  226. package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js +113 -161
  227. package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
  228. package/dist/components/VPopover/VPopover.css +1 -1
  229. package/dist/components/VPopover/VPopover.d.ts +26 -7
  230. package/dist/components/VPopover/VPopover.js.map +1 -1
  231. package/dist/components/VPopover/VPopover.vue_vue_type_script_setup_true_lang.js +43 -37
  232. package/dist/components/VPopover/VPopover.vue_vue_type_script_setup_true_lang.js.map +1 -1
  233. package/dist/components/VProgressCircular/VProgressCircular.css +1 -1
  234. package/dist/components/VProgressCircular/VProgressCircular.d.ts +15 -4
  235. package/dist/components/VProgressCircular/VProgressCircular.js.map +1 -1
  236. package/dist/components/VProgressCircular/VProgressCircular.vue_vue_type_script_setup_true_lang.js +32 -30
  237. package/dist/components/VProgressCircular/VProgressCircular.vue_vue_type_script_setup_true_lang.js.map +1 -1
  238. package/dist/components/VProgressLinear/VProgressLinear.css +1 -1
  239. package/dist/components/VProgressLinear/VProgressLinear.d.ts +23 -8
  240. package/dist/components/VProgressLinear/VProgressLinear.js.map +1 -1
  241. package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js +34 -32
  242. package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js.map +1 -1
  243. package/dist/components/VRadio/VRadio.css +1 -1
  244. package/dist/components/VRadio/VRadio.d.ts +36 -18
  245. package/dist/components/VRadio/VRadio.js.map +1 -1
  246. package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js +55 -26
  247. package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js.map +1 -1
  248. package/dist/components/VSeparator/VSeparator.d.ts +4 -2
  249. package/dist/components/VSeparator/VSeparator.js.map +1 -1
  250. package/dist/components/VSeparator/VSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
  251. package/dist/components/VSideNavigation/VSideNavigation.css +1 -1
  252. package/dist/components/VSideNavigation/VSideNavigation.d.ts +5 -19
  253. package/dist/components/VSideNavigation/VSideNavigation.js.map +1 -1
  254. package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js +5 -5
  255. package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js.map +1 -1
  256. package/dist/components/VSideNavigation/VSideNavigationGroup.css +1 -1
  257. package/dist/components/VSideNavigation/VSideNavigationGroup.d.ts +9 -17
  258. package/dist/components/VSideNavigation/VSideNavigationGroup.js.map +1 -1
  259. package/dist/components/VSideNavigation/VSideNavigationGroup.vue_vue_type_script_setup_true_lang.js +2 -2
  260. package/dist/components/VSideNavigation/VSideNavigationGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  261. package/dist/components/VSideNavigation/VSideNavigationItem.css +1 -1
  262. package/dist/components/VSideNavigation/VSideNavigationItem.d.ts +22 -30
  263. package/dist/components/VSideNavigation/VSideNavigationItem.js.map +1 -1
  264. package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js +77 -87
  265. package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  266. package/dist/components/VSideNavigation/context.d.ts +0 -14
  267. package/dist/components/VSideNavigation/context.js.map +1 -1
  268. package/dist/components/VSkeletonLoader/VSkeletonLoader.css +1 -1
  269. package/dist/components/VSkeletonLoader/VSkeletonLoader.d.ts +9 -9
  270. package/dist/components/VSkeletonLoader/VSkeletonLoader.js.map +1 -1
  271. package/dist/components/VSkeletonLoader/VSkeletonLoader.vue_vue_type_script_setup_true_lang.js.map +1 -1
  272. package/dist/components/VSlider/VSlider.css +1 -1
  273. package/dist/components/VSlider/VSlider.d.ts +52 -27
  274. package/dist/components/VSlider/VSlider.js.map +1 -1
  275. package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js +202 -118
  276. package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js.map +1 -1
  277. package/dist/components/VSnackbar/VSnackbar.css +1 -1
  278. package/dist/components/VSnackbar/VSnackbar.d.ts +0 -23
  279. package/dist/components/VSnackbar/VSnackbar.js.map +1 -1
  280. package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js +38 -38
  281. package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  282. package/dist/components/VSnackbar/state.d.ts +0 -27
  283. package/dist/components/VSnackbar/state.js.map +1 -1
  284. package/dist/components/VSpinner/VSpinner.css +1 -1
  285. package/dist/components/VSpinner/VSpinner.d.ts +6 -6
  286. package/dist/components/VSpinner/VSpinner.js.map +1 -1
  287. package/dist/components/VSpinner/VSpinner.vue_vue_type_script_setup_true_lang.js +10 -9
  288. package/dist/components/VSpinner/VSpinner.vue_vue_type_script_setup_true_lang.js.map +1 -1
  289. package/dist/components/VSwitch/VSwitch.css +1 -1
  290. package/dist/components/VSwitch/VSwitch.d.ts +35 -13
  291. package/dist/components/VSwitch/VSwitch.js.map +1 -1
  292. package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js +62 -21
  293. package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js.map +1 -1
  294. package/dist/components/VTabs/VTab.css +1 -1
  295. package/dist/components/VTabs/VTab.d.ts +12 -12
  296. package/dist/components/VTabs/VTab.js.map +1 -1
  297. package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js +36 -24
  298. package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js.map +1 -1
  299. package/dist/components/VTabs/VTabPanel.d.ts +2 -10
  300. package/dist/components/VTabs/VTabPanel.js.map +1 -1
  301. package/dist/components/VTabs/VTabPanel.vue_vue_type_script_setup_true_lang.js +4 -4
  302. package/dist/components/VTabs/VTabPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  303. package/dist/components/VTabs/VTabs.css +1 -1
  304. package/dist/components/VTabs/VTabs.d.ts +27 -18
  305. package/dist/components/VTabs/VTabs.js.map +1 -1
  306. package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js +92 -81
  307. package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
  308. package/dist/components/VTabs/context.d.ts +9 -19
  309. package/dist/components/VTabs/context.js +1 -1
  310. package/dist/components/VTabs/context.js.map +1 -1
  311. package/dist/components/VTextarea/VTextarea.css +1 -1
  312. package/dist/components/VTextarea/VTextarea.d.ts +34 -6
  313. package/dist/components/VTextarea/VTextarea.js.map +1 -1
  314. package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js +91 -74
  315. package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js.map +1 -1
  316. package/dist/components/VTimeInput/VTimeInput.css +1 -1
  317. package/dist/components/VTimeInput/VTimeInput.d.ts +123 -33
  318. package/dist/components/VTimeInput/VTimeInput.js.map +1 -1
  319. package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js +294 -291
  320. package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  321. package/dist/components/VTimeInput/search.d.ts +24 -0
  322. package/dist/components/VTimeInput/search.js +22 -0
  323. package/dist/components/VTimeInput/search.js.map +1 -0
  324. package/dist/components/VTimePicker/VTimePicker.css +1 -1
  325. package/dist/components/VTimePicker/VTimePicker.d.ts +51 -30
  326. package/dist/components/VTimePicker/VTimePicker.js.map +1 -1
  327. package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js +216 -151
  328. package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  329. package/dist/components/VTimePicker/limits.d.ts +88 -0
  330. package/dist/components/VTimePicker/limits.js +70 -0
  331. package/dist/components/VTimePicker/limits.js.map +1 -0
  332. package/dist/components/VToast/VToast.css +1 -1
  333. package/dist/components/VToast/VToast.d.ts +0 -10
  334. package/dist/components/VToast/VToast.js.map +1 -1
  335. package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js +10 -10
  336. package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js.map +1 -1
  337. package/dist/components/VToast/VToaster.css +1 -1
  338. package/dist/components/VToast/VToaster.d.ts +0 -17
  339. package/dist/components/VToast/VToaster.js.map +1 -1
  340. package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js +29 -28
  341. package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js.map +1 -1
  342. package/dist/components/VToast/state.d.ts +10 -19
  343. package/dist/components/VToast/state.js +1 -1
  344. package/dist/components/VToast/state.js.map +1 -1
  345. package/dist/components/VToggle/VToggle.css +1 -1
  346. package/dist/components/VToggle/VToggle.d.ts +56 -11
  347. package/dist/components/VToggle/VToggle.js.map +1 -1
  348. package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js +80 -46
  349. package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js.map +1 -1
  350. package/dist/components/VToggle/VToggleItem.d.ts +16 -2
  351. package/dist/components/VToggle/VToggleItem.js +0 -2
  352. package/dist/components/VToggle/VToggleItem.js.map +1 -1
  353. package/dist/components/VToggle/VToggleItem.vue_vue_type_script_setup_true_lang.js +23 -15
  354. package/dist/components/VToggle/VToggleItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  355. package/dist/components/VToggle/context.d.ts +4 -24
  356. package/dist/components/VToggle/context.js.map +1 -1
  357. package/dist/components/VTooltip/VTooltip.css +1 -1
  358. package/dist/components/VTooltip/VTooltip.d.ts +9 -33
  359. package/dist/components/VTooltip/VTooltip.js.map +1 -1
  360. package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js +28 -24
  361. package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  362. package/dist/components/VTypography/VTypography.js.map +1 -1
  363. package/dist/components/VTypography/VTypography.vue_vue_type_script_setup_true_lang.js.map +1 -1
  364. package/dist/composables/useAriaLabel.d.ts +0 -17
  365. package/dist/composables/useAriaLabel.js.map +1 -1
  366. package/dist/composables/useClearable.d.ts +42 -0
  367. package/dist/composables/useClearable.js +19 -0
  368. package/dist/composables/useClearable.js.map +1 -0
  369. package/dist/composables/useControlShape.d.ts +22 -0
  370. package/dist/composables/useControlShape.js +13 -0
  371. package/dist/composables/useControlShape.js.map +1 -0
  372. package/dist/composables/useDetailsOpen.d.ts +22 -0
  373. package/dist/composables/useDetailsOpen.js +21 -0
  374. package/dist/composables/useDetailsOpen.js.map +1 -0
  375. package/dist/composables/useFieldIds.d.ts +0 -15
  376. package/dist/composables/useFieldIds.js +8 -7
  377. package/dist/composables/useFieldIds.js.map +1 -1
  378. package/dist/composables/useFieldPanel.d.ts +21 -18
  379. package/dist/composables/useFieldPanel.js +43 -23
  380. package/dist/composables/useFieldPanel.js.map +1 -1
  381. package/dist/composables/useFileDrop.d.ts +0 -22
  382. package/dist/composables/useFileDrop.js.map +1 -1
  383. package/dist/composables/useFileField.d.ts +45 -17
  384. package/dist/composables/useFileField.js +40 -20
  385. package/dist/composables/useFileField.js.map +1 -1
  386. package/dist/composables/useFocusoutDismiss.d.ts +0 -15
  387. package/dist/composables/useFocusoutDismiss.js.map +1 -1
  388. package/dist/composables/useIconClickHandlers.d.ts +29 -14
  389. package/dist/composables/useIconClickHandlers.js +15 -5
  390. package/dist/composables/useIconClickHandlers.js.map +1 -1
  391. package/dist/composables/useInertLink.d.ts +20 -0
  392. package/dist/composables/useInertLink.js +23 -0
  393. package/dist/composables/useInertLink.js.map +1 -0
  394. package/dist/composables/useMaskedField.d.ts +33 -10
  395. package/dist/composables/useMaskedField.js +45 -1
  396. package/dist/composables/useMaskedField.js.map +1 -1
  397. package/dist/composables/usePopover.d.ts +15 -1
  398. package/dist/composables/usePopover.js +23 -8
  399. package/dist/composables/usePopover.js.map +1 -1
  400. package/dist/composables/useProgressValue.d.ts +5 -8
  401. package/dist/composables/useProgressValue.js +6 -3
  402. package/dist/composables/useProgressValue.js.map +1 -1
  403. package/dist/composables/useRootAttrs.d.ts +12 -19
  404. package/dist/composables/useRootAttrs.js.map +1 -1
  405. package/dist/composables/useTimer.d.ts +8 -10
  406. package/dist/composables/useTimer.js.map +1 -1
  407. package/dist/i18n/en.d.ts +2 -10
  408. package/dist/i18n/en.js +18 -19
  409. package/dist/i18n/en.js.map +1 -1
  410. package/dist/i18n/fr.d.ts +2 -18
  411. package/dist/i18n/fr.js +18 -19
  412. package/dist/i18n/fr.js.map +1 -1
  413. package/dist/i18n/state.d.ts +44 -47
  414. package/dist/i18n/state.js +20 -17
  415. package/dist/i18n/state.js.map +1 -1
  416. package/dist/i18n/types.d.ts +53 -44
  417. package/dist/icons.d.ts +3 -3
  418. package/dist/index.d.ts +43 -17
  419. package/dist/index.js +45 -44
  420. package/dist/styles.css +1 -1
  421. package/dist/tokens/css.js.map +1 -1
  422. package/dist/tokens/index.d.ts +5 -1
  423. package/dist/tokens/primitives.js.map +1 -1
  424. package/dist/tokens/semantic.d.ts +5 -1
  425. package/dist/tokens/semantic.js +6 -2
  426. package/dist/tokens/semantic.js.map +1 -1
  427. package/dist/tokens/themes/dark.js.map +1 -1
  428. package/dist/tokens/types.d.ts +7 -15
  429. package/dist/tokens/types.js.map +1 -1
  430. package/dist/tokens.json +25 -5
  431. package/dist/types.d.ts +24 -0
  432. package/dist/utils/array.d.ts +3 -6
  433. package/dist/utils/array.js.map +1 -1
  434. package/dist/utils/arrowNav.d.ts +17 -17
  435. package/dist/utils/arrowNav.js +5 -3
  436. package/dist/utils/arrowNav.js.map +1 -1
  437. package/dist/utils/chip.d.ts +11 -15
  438. package/dist/utils/chip.js.map +1 -1
  439. package/dist/utils/css.d.ts +22 -11
  440. package/dist/utils/css.js +5 -2
  441. package/dist/utils/css.js.map +1 -1
  442. package/dist/utils/date.d.ts +42 -19
  443. package/dist/utils/date.js +97 -98
  444. package/dist/utils/date.js.map +1 -1
  445. package/dist/utils/direction.d.ts +6 -12
  446. package/dist/utils/direction.js.map +1 -1
  447. package/dist/utils/env.d.ts +5 -6
  448. package/dist/utils/file.d.ts +46 -58
  449. package/dist/utils/file.js +43 -36
  450. package/dist/utils/file.js.map +1 -1
  451. package/dist/utils/focus.d.ts +8 -17
  452. package/dist/utils/focus.js.map +1 -1
  453. package/dist/utils/hostWarns.d.ts +12 -0
  454. package/dist/utils/hostWarns.js +6 -0
  455. package/dist/utils/hostWarns.js.map +1 -0
  456. package/dist/utils/ids.d.ts +10 -0
  457. package/dist/utils/ids.js +8 -0
  458. package/dist/utils/ids.js.map +1 -0
  459. package/dist/utils/matcher.d.ts +5 -9
  460. package/dist/utils/matcher.js.map +1 -1
  461. package/dist/utils/memo.d.ts +12 -0
  462. package/dist/utils/memo.js +9 -0
  463. package/dist/utils/memo.js.map +1 -0
  464. package/dist/utils/number.d.ts +3 -4
  465. package/dist/utils/number.js.map +1 -1
  466. package/dist/utils/text.d.ts +20 -9
  467. package/dist/utils/text.js +17 -3
  468. package/dist/utils/text.js.map +1 -1
  469. package/dist/utils/time.d.ts +53 -61
  470. package/dist/utils/time.js +49 -45
  471. package/dist/utils/time.js.map +1 -1
  472. package/dist/utils/vnode.d.ts +8 -15
  473. package/dist/utils/vnode.js.map +1 -1
  474. package/package.json +6 -6
  475. package/dist/components/VToggle/VToggleItem.css +0 -2
@@ -1,17 +1,17 @@
1
- import { useLocale as e, useMessages as t } from "../../i18n/state.js";
1
+ import { useMessages as e, useResolvedLocale as t } from "../../i18n/state.js";
2
2
  import n from "../VIcon/VIcon.js";
3
3
  import r from "../VTypography/VTypography.js";
4
4
  import i from "../VButton/VButton.js";
5
5
  import a from "../VIconButton/VIconButton.js";
6
- import { chevron_left as ee } from "../VIcon/icons/chevron_left.js";
7
- import { chevron_right as te } from "../VIcon/icons/chevron_right.js";
8
- import { useAriaLabel as ne } from "../../composables/useAriaLabel.js";
6
+ import { useAriaLabel as ee } from "../../composables/useAriaLabel.js";
7
+ import { chevron_left as te } from "../VIcon/icons/chevron_left.js";
8
+ import { chevron_right as ne } from "../VIcon/icons/chevron_right.js";
9
9
  import { useRootAttrs as re } from "../../composables/useRootAttrs.js";
10
10
  import { useTimer as ie } from "../../composables/useTimer.js";
11
11
  import ae from "../VMenu/VMenu.js";
12
12
  import oe from "../VMenu/VMenuItem.js";
13
13
  import { arrow_drop_down as se } from "../VIcon/icons/arrow_drop_down.js";
14
- import { firstDayOfWeekFor as ce, formatDisplay as o, formatDisplayRange as le } from "../../utils/date.js";
14
+ import { firstDayOfWeekFor as ce, formatDateDisplay as o, formatDisplayRange as le } from "../../utils/date.js";
15
15
  import { hourCycleFor as ue, minutesOf as s } from "../../utils/time.js";
16
16
  import { monthWeeks as de, monthsOfYear as fe, normalizeWeekdays as pe, stepAnchor as me, timeOf as he, timesOf as ge, todayISO as c, visibleDays as _e, visibleRange as ve, windowOf as ye } from "./layout.js";
17
17
  import be from "./VCalendarMonth.js";
@@ -19,7 +19,7 @@ import xe from "./VCalendarTimeGrid.js";
19
19
  import Se from "./VCalendarYear.js";
20
20
  import { Fragment as Ce, computed as l, createBlock as u, createCommentVNode as we, createElementBlock as d, createElementVNode as f, createSlots as p, createTextVNode as m, createVNode as h, defineComponent as g, guardReactiveProps as _, mergeModels as v, mergeProps as y, normalizeClass as Te, normalizeProps as b, normalizeStyle as Ee, onMounted as De, openBlock as x, ref as S, renderList as Oe, renderSlot as C, toDisplayString as w, unref as T, useId as ke, useModel as E, withCtx as D } from "vue";
21
21
  //#region src/components/VCalendar/VCalendar.vue?vue&type=script&setup=true&lang.ts
22
- var Ae = ["aria-label", "aria-roledescription"], je = { class: "v-calendar-toolbar" }, Me = { class: "v-calendar-nav" }, Ne = { class: "v-calendar-actions" }, Pe = {
22
+ var Ae = ["data-disabled"], je = ["aria-label", "aria-roledescription"], Me = { class: "v-calendar-toolbar" }, Ne = { class: "v-calendar-nav" }, Pe = { class: "v-calendar-actions" }, Fe = {
23
23
  class: "v-visually-hidden",
24
24
  role: "status",
25
25
  "aria-live": "polite"
@@ -34,29 +34,34 @@ var Ae = ["aria-label", "aria-roledescription"], je = { class: "v-calendar-toolb
34
34
  ] },
35
35
  customDays: { default: 4 },
36
36
  weekdays: { default: void 0 },
37
+ firstDayOfWeek: { default: void 0 },
37
38
  locale: { default: void 0 },
38
- hourFormat: { default: void 0 },
39
+ format: { default: void 0 },
39
40
  dayStart: { default: 0 },
40
41
  dayEnd: { default: 24 },
41
42
  slotDuration: { default: 15 },
42
43
  scrollTime: { default: "08:00" },
43
- showCurrentTime: {
44
+ hideCurrentTime: {
44
45
  type: Boolean,
45
- default: !0
46
+ default: !1
46
47
  },
47
48
  monthEventLimit: { default: 3 },
48
- editable: {
49
+ readonly: {
49
50
  type: Boolean,
50
- default: !0
51
+ default: !1
52
+ },
53
+ disabled: {
54
+ type: Boolean,
55
+ default: !1
51
56
  },
52
57
  creatable: {
53
58
  type: Boolean,
54
- default: !0
59
+ default: !1
55
60
  },
56
61
  edgeStepDelay: { default: 800 },
57
- autoScroll: {
62
+ noEdgeScroll: {
58
63
  type: Boolean,
59
- default: !0
64
+ default: !1
60
65
  },
61
66
  label: { default: void 0 }
62
67
  }, {
@@ -69,7 +74,7 @@ var Ae = ["aria-label", "aria-roledescription"], je = { class: "v-calendar-toolb
69
74
  }),
70
75
  emits: /*@__PURE__*/ v([
71
76
  "event-activate",
72
- "slot-activate",
77
+ "cell-activate",
73
78
  "event-move",
74
79
  "event-resize",
75
80
  "event-create"
@@ -79,13 +84,13 @@ var Ae = ["aria-label", "aria-roledescription"], je = { class: "v-calendar-toolb
79
84
  "update:events"
80
85
  ]),
81
86
  setup(g, { expose: v, emit: O }) {
82
- let k = g, A = E(g, "view"), j = E(g, "date"), M = E(g, "events"), N = O, P = t(), Fe = e(), { rootClass: Ie, rootStyle: Le, forwardedAttrs: Re } = re(), F = l(() => k.locale ?? Fe.value), I = l(() => k.hourFormat ?? ue(F.value)), L = l(() => pe(k.weekdays, ce(F.value))), R = l(() => ye(k.dayStart, k.dayEnd)), ze = l(() => _e(j.value, A.value, L.value, k.customDays)), Be = l(() => A.value !== "month" && A.value !== "year"), Ve = l(() => A.value === "month" ? de(j.value, L.value) : []), He = l(() => A.value === "year" ? fe(j.value) : []), z = S(null), B = S(null), Ue = ie();
87
+ let k = g, A = E(g, "view"), j = E(g, "date"), M = E(g, "events"), N = O, P = e(), { rootClass: Ie, rootStyle: Le, forwardedAttrs: Re } = re(), F = t(() => k.locale), I = l(() => k.format ?? ue(F.value)), L = l(() => pe(k.weekdays, k.firstDayOfWeek ?? ce(F.value))), R = l(() => ye(k.dayStart, k.dayEnd)), ze = l(() => _e(j.value, A.value, L.value, k.customDays)), Be = l(() => A.value !== "month" && A.value !== "year"), Ve = l(() => A.value === "month" ? de(j.value, L.value) : []), He = l(() => A.value === "year" ? fe(j.value) : []), z = S(null), B = S(null), Ue = ie();
83
88
  function V() {
84
89
  let e = /* @__PURE__ */ new Date();
85
90
  B.value = e.getHours() * 60 + e.getMinutes(), Ue.start(V, Math.max(1e3, (60 - e.getSeconds()) * 1e3));
86
91
  }
87
92
  De(() => {
88
- z.value = c(), k.showCurrentTime && V();
93
+ z.value = c(), k.hideCurrentTime || V();
89
94
  let e = s(k.scrollTime);
90
95
  e !== null && H.value?.scrollToMinutes(e);
91
96
  });
@@ -128,30 +133,30 @@ var Ae = ["aria-label", "aria-roledescription"], je = { class: "v-calendar-toolb
128
133
  previous: e.previousPeriod,
129
134
  next: e.nextPeriod
130
135
  };
131
- }), We = ne(() => k.label ?? P.value.calendar.label);
136
+ }), We = ee(() => k.label ?? P.value.calendar.label);
132
137
  function Y(e) {
133
- j.value = me(j.value, A.value, e, L.value, k.customDays);
138
+ k.disabled || (j.value = me(j.value, A.value, e, L.value, k.customDays));
134
139
  }
135
140
  function X() {
136
- j.value = c();
141
+ k.disabled || (j.value = c());
137
142
  }
138
143
  function Ge(e) {
139
- A.value = e;
144
+ k.disabled || (A.value = e);
140
145
  }
141
- function Ke(e, t) {
142
- N("slot-activate", {
143
- date: e,
144
- time: he(t)
146
+ function Z(e) {
147
+ k.disabled || N("cell-activate", {
148
+ date: e.date,
149
+ time: he(e.minutes ?? R.value.start)
145
150
  });
146
151
  }
147
- function qe(e, t) {
148
- j.value = e, k.views.includes(t) && (A.value = t);
152
+ function Ke(e, t) {
153
+ k.disabled || (j.value = e, k.views.includes(t) && (A.value = t));
149
154
  }
150
- let Je = S(""), Ye = ke(), Z = `${Ye}-hint`;
151
- function Xe(e) {
152
- Je.value = e;
155
+ let qe = S(""), Q = `${ke()}-hint`;
156
+ function Je(e) {
157
+ qe.value = e;
153
158
  }
154
- function Q(e, t, n) {
159
+ function $(e, t, n) {
155
160
  let r = M.value.find((t) => t.id === e);
156
161
  if (!r) return;
157
162
  let i = ge(r), a = {
@@ -160,18 +165,8 @@ var Ae = ["aria-label", "aria-roledescription"], je = { class: "v-calendar-toolb
160
165
  };
161
166
  M.value = M.value.map((t) => t.id === e ? a : t), N(n === "resize" ? "event-resize" : "event-move", a, i);
162
167
  }
163
- let $ = 0;
164
- function Ze(e) {
165
- N("slot-activate", {
166
- date: e.start,
167
- time: e.startTime
168
- }), $++;
169
- let t = {
170
- id: `${Ye}-${$}`,
171
- title: P.value.calendar.newEvent($),
172
- ...e
173
- };
174
- M.value = [...M.value, t], N("event-create", t);
168
+ function Ye(e) {
169
+ N("event-create", e);
175
170
  }
176
171
  return v({
177
172
  focus: () => H.value?.focus(),
@@ -184,33 +179,47 @@ var Ae = ["aria-label", "aria-roledescription"], je = { class: "v-calendar-toolb
184
179
  }
185
180
  }), (e, t) => (x(), d("div", {
186
181
  class: Te(["v-calendar", T(Ie)]),
187
- style: Ee(T(Le))
182
+ style: Ee(T(Le)),
183
+ "data-disabled": g.disabled ? "" : void 0
188
184
  }, [f("section", y(T(Re), {
189
185
  class: "v-calendar-region",
190
186
  "aria-label": T(We),
191
187
  "aria-roledescription": T(P).calendar.roleDescription
192
188
  }), [
193
- f("div", je, [
194
- f("div", Me, [h(a, {
195
- icon: T(ee),
189
+ f("div", Me, [
190
+ f("div", Ne, [h(a, {
196
191
  label: J.value.previous,
197
192
  size: "sm",
193
+ disabled: g.disabled,
198
194
  onClick: t[0] ||= (e) => Y(-1)
199
- }, null, 8, ["icon", "label"]), h(a, {
200
- icon: T(te),
195
+ }, {
196
+ default: D(() => [h(n, {
197
+ name: T(te),
198
+ mirrored: ""
199
+ }, null, 8, ["name"])]),
200
+ _: 1
201
+ }, 8, ["label", "disabled"]), h(a, {
201
202
  label: J.value.next,
202
203
  size: "sm",
204
+ disabled: g.disabled,
203
205
  onClick: t[1] ||= (e) => Y(1)
204
- }, null, 8, ["icon", "label"])]),
206
+ }, {
207
+ default: D(() => [h(n, {
208
+ name: T(ne),
209
+ mirrored: ""
210
+ }, null, 8, ["name"])]),
211
+ _: 1
212
+ }, 8, ["label", "disabled"])]),
205
213
  h(i, {
206
214
  variant: "outline",
207
215
  tone: "neutral",
208
216
  size: "sm",
217
+ disabled: g.disabled,
209
218
  onClick: X
210
219
  }, {
211
220
  default: D(() => [m(w(T(P).calendar.today), 1)]),
212
221
  _: 1
213
- }),
222
+ }, 8, ["disabled"]),
214
223
  h(r, {
215
224
  variant: "heading-4",
216
225
  as: "h2",
@@ -219,7 +228,7 @@ var Ae = ["aria-label", "aria-roledescription"], je = { class: "v-calendar-toolb
219
228
  default: D(() => [m(w(K.value), 1)]),
220
229
  _: 1
221
230
  }),
222
- f("div", Ne, [C(e.$slots, "actions"), g.views.length > 1 ? (x(), u(ae, {
231
+ f("div", Pe, [C(e.$slots, "actions"), g.views.length > 1 ? (x(), u(ae, {
223
232
  key: 0,
224
233
  size: "sm",
225
234
  placement: "bottom-end",
@@ -228,11 +237,12 @@ var Ae = ["aria-label", "aria-roledescription"], je = { class: "v-calendar-toolb
228
237
  trigger: D(({ triggerProps: e }) => [h(i, y({
229
238
  variant: "outline",
230
239
  tone: "neutral",
231
- size: "sm"
240
+ size: "sm",
241
+ disabled: g.disabled
232
242
  }, e, { "aria-label": `${T(P).calendar.view}: ${q(A.value)}` }), {
233
243
  default: D(() => [m(w(q(A.value)) + " ", 1), h(n, { name: T(se) }, null, 8, ["name"])]),
234
244
  _: 1
235
- }, 16, ["aria-label"])]),
245
+ }, 16, ["disabled", "aria-label"])]),
236
246
  default: D(() => [(x(!0), d(Ce, null, Oe(g.views, (e) => (x(), u(oe, {
237
247
  key: e,
238
248
  label: q(e),
@@ -255,23 +265,24 @@ var Ae = ["aria-label", "aria-roledescription"], je = { class: "v-calendar-toolb
255
265
  class: "v-calendar-view",
256
266
  days: ze.value,
257
267
  events: M.value,
258
- window: R.value,
268
+ "time-window": R.value,
259
269
  "slot-duration": g.slotDuration,
260
- locale: F.value,
261
- "hour-format": I.value,
270
+ locale: T(F),
271
+ format: I.value,
262
272
  today: z.value,
263
- now: g.showCurrentTime ? B.value : null,
264
- editable: g.editable,
265
- creatable: g.creatable,
266
- "hint-id": Z,
273
+ now: g.hideCurrentTime ? null : B.value,
274
+ editable: !g.readonly && !g.disabled,
275
+ disabled: g.disabled,
276
+ creatable: g.creatable && !g.disabled,
277
+ "hint-id": Q,
267
278
  "edge-step-delay": g.edgeStepDelay,
268
- "auto-scroll": g.autoScroll,
279
+ "auto-scroll": !g.noEdgeScroll,
269
280
  label: K.value,
270
- onCellActivate: Ke,
281
+ onCellActivate: Z,
271
282
  onEventActivate: t[3] ||= (e) => N("event-activate", e),
272
- onEventDrop: Q,
273
- onSlotCreate: Ze,
274
- onAnnounce: Xe,
283
+ onEventDrop: $,
284
+ onSlotCreate: Ye,
285
+ onAnnounce: Je,
275
286
  onStep: Y
276
287
  }, p({ _: 2 }, [
277
288
  e.$slots.event ? {
@@ -293,13 +304,14 @@ var Ae = ["aria-label", "aria-roledescription"], je = { class: "v-calendar-toolb
293
304
  "focused",
294
305
  "days",
295
306
  "events",
296
- "window",
307
+ "time-window",
297
308
  "slot-duration",
298
309
  "locale",
299
- "hour-format",
310
+ "format",
300
311
  "today",
301
312
  "now",
302
313
  "editable",
314
+ "disabled",
303
315
  "creatable",
304
316
  "edge-step-delay",
305
317
  "auto-scroll",
@@ -313,19 +325,20 @@ var Ae = ["aria-label", "aria-roledescription"], je = { class: "v-calendar-toolb
313
325
  class: "v-calendar-view",
314
326
  weeks: Ve.value,
315
327
  events: M.value,
316
- locale: F.value,
317
- "hour-format": I.value,
328
+ locale: T(F),
329
+ format: I.value,
318
330
  today: z.value,
319
- "event-limit": g.monthEventLimit,
320
- editable: g.editable,
321
- "hint-id": Z,
331
+ "month-event-limit": g.monthEventLimit,
332
+ editable: !g.readonly && !g.disabled,
333
+ disabled: g.disabled,
334
+ "hint-id": Q,
322
335
  "edge-step-delay": g.edgeStepDelay,
323
336
  label: K.value,
324
- onDayActivate: t[5] ||= (e) => qe(e, "day"),
325
- onCellActivate: t[6] ||= (e) => Ke(e, R.value.start),
326
- onEventActivate: t[7] ||= (e) => N("event-activate", e),
327
- onEventDrop: Q,
328
- onAnnounce: Xe,
337
+ onDayActivate: t[5] ||= (e) => Ke(e, "day"),
338
+ onCellActivate: Z,
339
+ onEventActivate: t[6] ||= (e) => N("event-activate", e),
340
+ onEventDrop: $,
341
+ onAnnounce: Je,
329
342
  onStep: Y
330
343
  }, p({ _: 2 }, [e.$slots.event ? {
331
344
  name: "event",
@@ -336,10 +349,11 @@ var Ae = ["aria-label", "aria-roledescription"], je = { class: "v-calendar-toolb
336
349
  "weeks",
337
350
  "events",
338
351
  "locale",
339
- "hour-format",
352
+ "format",
340
353
  "today",
341
- "event-limit",
354
+ "month-event-limit",
342
355
  "editable",
356
+ "disabled",
343
357
  "edge-step-delay",
344
358
  "label"
345
359
  ])) : (x(), u(Se, {
@@ -347,11 +361,11 @@ var Ae = ["aria-label", "aria-roledescription"], je = { class: "v-calendar-toolb
347
361
  class: "v-calendar-view",
348
362
  months: He.value,
349
363
  events: M.value,
350
- locale: F.value,
364
+ locale: T(F),
351
365
  weekdays: L.value,
352
366
  today: z.value,
353
367
  label: K.value,
354
- onMonthActivate: t[8] ||= (e) => qe(e, "month")
368
+ onMonthActivate: t[7] ||= (e) => Ke(e, "month")
355
369
  }, null, 8, [
356
370
  "months",
357
371
  "events",
@@ -360,12 +374,12 @@ var Ae = ["aria-label", "aria-roledescription"], je = { class: "v-calendar-toolb
360
374
  "today",
361
375
  "label"
362
376
  ])),
363
- f("div", Pe, w(Je.value), 1),
377
+ f("div", Fe, w(qe.value), 1),
364
378
  f("span", {
365
- id: Z,
379
+ id: Q,
366
380
  class: "v-visually-hidden"
367
381
  }, w(T(P).calendar.eventHint), 1)
368
- ], 16, Ae)], 6));
382
+ ], 16, je)], 14, Ae));
369
383
  }
370
384
  });
371
385
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"VCalendar.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/VCalendar/VCalendar.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"E extends CalendarEvent\">\n// @a11y @ssr @core\n/**\n * An agenda: the days laid out side by side with the hours running down them, and the\n * events drawn where they fall.\n *\n * It is a place to READ and REARRANGE a schedule, not to write one. Opening an event for\n * editing, and adding one by any route other than pointing at an empty slot, stay with the\n * consumer — the component tells them what was asked for and leaves the form to them.\n *\n * Everything is handled in local time as ISO `YYYY-MM-DD` dates and 24-hour `HH:mm` times\n * (see `utils/date` and `utils/time`), which is what keeps the server and the browser in\n * agreement. An event may name a time zone, and that name is shown beside its times as an\n * annotation; it is never applied. Converting would mean the card moved depending on where\n * the page was rendered, which is the one thing a calendar must not do.\n *\n * The JavaScript here is what the platform gives no way to avoid. There is no accessible\n * time grid to build on and no way to express \"these three meetings overlap, so share the\n * width between them\" in CSS, so the ARIA grid pattern and the overlap layout are written\n * out by hand. Every geometric and calendrical decision lives in `layout.ts`, pure, because\n * the test environment lays nothing out and that is the only place any of it can be checked.\n */\nimport { computed, onMounted, ref, useId } from 'vue'\n\nimport VButton from '../VButton/VButton.vue'\nimport VIcon from '../VIcon/VIcon.vue'\nimport { arrow_drop_down as arrowDropDownIcon } from '../VIcon/icons/arrow_drop_down'\nimport { chevron_left as chevronLeftIcon } from '../VIcon/icons/chevron_left'\nimport { chevron_right as chevronRightIcon } from '../VIcon/icons/chevron_right'\nimport VIconButton from '../VIconButton/VIconButton.vue'\nimport VMenu from '../VMenu/VMenu.vue'\nimport VMenuItem from '../VMenu/VMenuItem.vue'\nimport VTypography from '../VTypography/VTypography.vue'\n\nimport { useAriaLabel } from '../../composables/useAriaLabel'\nimport { useRootAttrs } from '../../composables/useRootAttrs'\nimport { useTimer } from '../../composables/useTimer'\nimport {\n firstDayOfWeekFor,\n formatDisplay as formatDate,\n formatDisplayRange,\n} from '../../utils/date'\nimport { hourCycleFor, minutesOf, type HourFormat } from '../../utils/time'\n\nimport { useLocale, useMessages } from '../../i18n/state'\n\nimport VCalendarMonth from './VCalendarMonth.vue'\nimport VCalendarTimeGrid, { type FocusedCell } from './VCalendarTimeGrid.vue'\nimport VCalendarYear from './VCalendarYear.vue'\nimport { EDGE_STEP_DELAY } from './edgeStep'\nimport {\n monthWeeks,\n monthsOfYear,\n normalizeWeekdays,\n stepAnchor,\n timeOf,\n timesOf,\n todayISO,\n visibleDays,\n visibleRange,\n windowOf,\n} from './layout'\nimport type { CalendarEvent, CalendarEventId, CalendarEventTimes, CalendarView } from './types'\n\nexport interface CalendarProps {\n /**\n * Which views the menu offers, in the order it lists them. Narrowing it is how a\n * calendar that only ever shows weeks stops offering anything else.\n */\n views?: CalendarView[]\n /** How many days the custom view shows, and how far Previous and Next step in it. */\n customDays?: number\n /**\n * Which weekdays are on show, as numbers from 0 for Sunday. `[1,2,3,4,5]` hides the\n * weekend everywhere. The ORDER matters as well: the first entry is the day a week\n * starts on, which is why there is no separate first-day setting. Left out, the seven\n * days in the order the locale puts them.\n */\n weekdays?: number[]\n /** The language the days, months and times are written in. Falls back to the global one. */\n locale?: string\n /** Whether times are shown on a twelve or twenty-four hour clock. Follows the locale. */\n hourFormat?: HourFormat\n /** The hour the grid starts at, from 0. */\n dayStart?: number\n /** The hour it ends at, up to 24. */\n dayEnd?: number\n /**\n * The step everything snaps to, in minutes: how far a nudge moves an event, and how long\n * a newly created one is.\n */\n slotDuration?: number\n /** Where the grid is scrolled to when it first appears, so the working day is in view. */\n scrollTime?: string\n /**\n * Draws a line across today's column at the time it is now, with a dot on its leading\n * edge. It ticks once a minute while the calendar is on screen.\n */\n showCurrentTime?: boolean\n /** How many events a day of the month view shows before it starts counting the rest. */\n monthEventLimit?: number\n /**\n * Lets events be moved and stretched — by dragging them, and with the keyboard. Turning it\n * off leaves them readable and clickable, and nothing else.\n */\n editable?: boolean\n /**\n * Makes an event when an empty part of a day is taken up: a click makes one `slotDuration`\n * long, a drag makes one as long as it was drawn. `slot-activate` still fires either way,\n * so a consumer who wants their own form can turn this off and keep the signal.\n */\n creatable?: boolean\n /**\n * How long a dragged event has to rest against the side of the calendar before the view\n * turns to the previous or next period, in milliseconds. `0` turns that off.\n *\n * The wait is the point of it: paging the instant the pointer touched the edge would make\n * the last day of a week impossible to aim at.\n */\n edgeStepDelay?: number\n /** Whether dragging near the top or bottom of a time grid scrolls it. */\n autoScroll?: boolean\n /** What the calendar is called, for anyone who cannot see it. */\n label?: string\n}\n\nconst props = withDefaults(defineProps<CalendarProps>(), {\n views: () => ['day', '4days', 'week'],\n customDays: 4,\n weekdays: undefined,\n locale: undefined,\n hourFormat: undefined,\n dayStart: 0,\n dayEnd: 24,\n slotDuration: 15,\n scrollTime: '08:00',\n showCurrentTime: true,\n monthEventLimit: 3,\n editable: true,\n creatable: true,\n edgeStepDelay: EDGE_STEP_DELAY,\n autoScroll: true,\n label: undefined,\n})\n\n/*\n * The wrapper-root pattern: the consumer's class and style stay on the outer box, and\n * everything else — their `id`, their `aria-*` — goes on the region, which is the part\n * that carries the role and is therefore the part they mean.\n */\ndefineOptions({ inheritAttrs: false })\n\nconst view = defineModel<CalendarView>('view', { default: 'week' })\n\n/*\n * @ssr — the anchor is read from the clock at setup, so the server and the client can in\n * principle disagree across a midnight boundary. That is the trade VDatePicker already\n * makes for the month it opens on, and it is a safer one here: what the anchor decides is\n * a whole WEEK or month, which is the same on both sides for all but a few seconds a day.\n * Today's date, which marks a single column, is a different matter and is read below in\n * `onMounted` where the server cannot see it at all.\n */\nconst date = defineModel<string>('date', { default: () => todayISO() })\nconst events = defineModel<E[]>('events', { default: () => [] })\n\nconst emit = defineEmits<{\n /** A card was clicked or activated — the cue to open an editor of your own. */\n 'event-activate': [event: E]\n /** An empty part of the grid was activated, at this day and this time. */\n 'slot-activate': [slot: { date: string; time: string }]\n /**\n * An event was dragged or nudged somewhere else. It carries the event as it now stands and\n * where it came from, so undoing it needs no copy of your own.\n */\n 'event-move': [event: E, previous: CalendarEventTimes]\n /** An event's end was dragged or nudged, in the same two parts. */\n 'event-resize': [event: E, previous: CalendarEventTimes]\n /**\n * An event was made by taking up an empty part of a day. It has already been added to\n * `events`; this is the cue to give it a real name, or to save it.\n */\n 'event-create': [event: CalendarEvent]\n}>()\n\ndefineSlots<{\n /** Extra controls in the toolbar, between the range and the view menu. */\n actions?(): unknown\n /** The content of one event's card, replacing the title and times. */\n event?(props: {\n event: E\n layout: 'block' | 'chip'\n timeText: string\n continuesBefore: boolean\n continuesAfter: boolean\n }): unknown\n /** The head of one day column, replacing the weekday and the number. */\n 'day-header'?(props: { iso: string; weekday: string; day: string; today: boolean }): unknown\n /** The label beside the band of all-day events. */\n 'all-day-label'?(): unknown\n}>()\n\nconst m = useMessages()\nconst vectisLocale = useLocale()\nconst { rootClass, rootStyle, forwardedAttrs } = useRootAttrs()\n\n/*\n * The prop wins, and the design system's global locale is what it falls back to. Every read\n * goes through this one derivation, so the two sources can never be consulted in a\n * different order somewhere else.\n */\nconst resolvedLocale = computed(() => props.locale ?? vectisLocale.value)\nconst resolvedHourFormat = computed(() => props.hourFormat ?? hourCycleFor(resolvedLocale.value))\nconst resolvedWeekdays = computed(() =>\n normalizeWeekdays(props.weekdays, firstDayOfWeekFor(resolvedLocale.value)),\n)\n\nconst window = computed(() => windowOf(props.dayStart, props.dayEnd))\n\nconst days = computed(() =>\n visibleDays(date.value, view.value, resolvedWeekdays.value, props.customDays),\n)\n\n/** Which view is a time grid, and which is a summary. Several things below turn on this. */\nconst isTimeGrid = computed(() => view.value !== 'month' && view.value !== 'year')\n\nconst weeks = computed(() =>\n view.value === 'month' ? monthWeeks(date.value, resolvedWeekdays.value) : [],\n)\n\nconst months = computed(() => (view.value === 'year' ? monthsOfYear(date.value) : []))\n\n// @ssr — today and the time it is now can only be known on the client: the server has no\n// way to tell either where the reader is, and rendering a guess would make the two markups\n// differ. Both stay null until then, and every rule that draws them is written to expect it.\nconst today = ref<string | null>(null)\nconst now = ref<number | null>(null)\n\nconst clock = useTimer()\n\n/**\n * Re-reads the clock, then arms itself for the top of the next minute — so the line moves\n * when the minute does rather than drifting by however long the interval was.\n *\n * TRAP — the floor on the delay is not a nicety. `useTimer` runs a delay of zero or less\n * SYNCHRONOUSLY, by design, so a tick that ever computed one would call itself straight back\n * and go on doing so until the stack gave out. A second is well below the resolution\n * anything here needs and comfortably above the point where that could happen.\n */\nfunction tick() {\n const at = new Date()\n now.value = at.getHours() * 60 + at.getMinutes()\n clock.start(tick, Math.max(1000, (60 - at.getSeconds()) * 1000))\n}\n\nonMounted(() => {\n today.value = todayISO()\n if (props.showCurrentTime) tick()\n const at = minutesOf(props.scrollTime)\n if (at !== null) gridRef.value?.scrollToMinutes(at)\n})\n\n/**\n * The grid, named by what it exposes rather than by `InstanceType<typeof …>`.\n *\n * TRAP — the usual form does not work here and the error it gives says nothing useful about\n * why. A generic `<script setup>` compiles to a FUNCTION, not to a class, so it has no\n * construct signature for `InstanceType` to read: the message complains that the component\n * \"provides no match for the signature `new (...args: any)`\", pointing at the template.\n * Writing the contract out is also the more honest of the two, since these two methods are\n * the whole of what this component asks of that one.\n */\nconst gridRef = ref<{ focus(): void; scrollToMinutes(minutes: number): void } | null>(null)\n\n/*\n * Which cell holds the tab stop, kept as two refs because the two kinds of view mean\n * different things by it: a time grid needs a day AND an hour, a month only a day. One ref\n * carrying an hour the month ignores would leave that hour to go stale, and the grid would\n * then reopen on whatever the month happened to leave behind.\n */\nconst focused = ref<FocusedCell>({ iso: date.value, minutes: window.value.start })\nconst focusedDay = ref(date.value)\n\nconst range = computed(() =>\n visibleRange(date.value, view.value, resolvedWeekdays.value, props.customDays),\n)\n\n/**\n * What the toolbar says the calendar is showing. Each view names itself at the coarsest\n * granularity that still identifies it: a single day says its weekday, a year says nothing\n * but the number.\n */\nconst rangeText = computed(() => {\n const locale = resolvedLocale.value\n if (view.value === 'year') return formatDate(range.value.start, locale, { year: 'numeric' })\n if (view.value === 'month') {\n return formatDate(range.value.start, locale, { month: 'long', year: 'numeric' })\n }\n if (view.value === 'day') {\n return formatDate(range.value.start, locale, {\n weekday: 'long',\n day: 'numeric',\n month: 'long',\n year: 'numeric',\n })\n }\n return formatDisplayRange(range.value.start, range.value.end, locale, {\n day: 'numeric',\n month: 'long',\n year: 'numeric',\n })\n})\n\nconst viewLabel = (value: CalendarView) => {\n const words = m.value.calendar\n if (value === 'day') return words.viewDay\n if (value === '4days') return words.view4Days\n if (value === 'week') return words.viewWeek\n if (value === 'month') return words.viewMonth\n if (value === 'year') return words.viewYear\n return words.viewCustom(props.customDays)\n}\n\n/**\n * What the two navigation buttons are called. They name the step rather than saying\n * \"previous\" alone, because the step is what changes from one view to the next and a bare\n * \"previous\" leaves a reader to guess whether it is a day or a year they are about to lose.\n */\nconst stepLabels = computed(() => {\n const words = m.value.calendar\n if (view.value === 'day') return { previous: words.previousDay, next: words.nextDay }\n if (view.value === 'week') return { previous: words.previousWeek, next: words.nextWeek }\n if (view.value === 'month') return { previous: words.previousMonth, next: words.nextMonth }\n if (view.value === 'year') return { previous: words.previousYear, next: words.nextYear }\n return { previous: words.previousPeriod, next: words.nextPeriod }\n})\n\nconst ariaLabel = useAriaLabel(() => props.label ?? m.value.calendar.label)\n\nfunction step(delta: -1 | 1) {\n date.value = stepAnchor(date.value, view.value, delta, resolvedWeekdays.value, props.customDays)\n}\n\nfunction today_() {\n date.value = todayISO()\n}\n\nfunction setView(value: CalendarView) {\n view.value = value\n}\n\nfunction onCellActivate(iso: string, minutes: number) {\n emit('slot-activate', { date: iso, time: timeOf(minutes) })\n}\n\n/**\n * Going from a summary to the thing it summarises: opening a day from the month view, or a\n * month from the year view.\n *\n * The view only changes if the calendar was offering that one in the first place. A consumer\n * who narrowed `views` to a week and a year has said what their calendar is for, and jumping\n * it into a day view they deliberately left out would be the component overruling them —\n * so the date moves and the view stays, which is still a step towards what was asked for.\n */\nfunction openIn(iso: string, target: CalendarView) {\n date.value = iso\n if (props.views.includes(target)) view.value = target\n}\n\n/**\n * What a reader who cannot see the grid is told: the range after every step of a move, and\n * whether the move was taken or given up.\n *\n * The node is rendered from the FIRST paint and left empty, never inserted along with its\n * first message — a live region that appears at the same moment as its text is not announced\n * at all, which is the trap VDataTable's selection count already documents.\n */\nconst announcement = ref('')\nconst uid = useId()\nconst hintId = `${uid}-hint`\n\nfunction announce(message: string) {\n announcement.value = message\n}\n\n/**\n * Writes one event's new times into the model and says what happened.\n *\n * The array is replaced rather than edited in place: a new reference is what wakes a\n * consumer's own watchers, and it is the design system's rule for every v-model holding a\n * list. This runs ONCE, when a gesture ends — never per frame of a drag, which would fill an\n * undo stack with sixty entries a second and send each one back as a render fighting the\n * finger.\n */\nfunction onEventDrop(id: CalendarEventId, times: CalendarEventTimes, kind: 'move' | 'resize') {\n const current = events.value.find((item) => item.id === id)\n if (!current) return\n\n const previous = timesOf(current)\n const next = { ...current, ...times }\n events.value = events.value.map((item) => (item.id === id ? next : item))\n // Written out rather than picking the name with a conditional: the emit signatures are an\n // overload set, and TypeScript resolves one only against a literal.\n if (kind === 'resize') emit('event-resize', next, previous)\n else emit('event-move', next, previous)\n}\n\n/**\n * How many events this calendar has minted, which is what numbers their default names.\n *\n * It counts from one per calendar rather than from the length of the list, so removing an\n * event does not make the next one reuse its name.\n */\nlet created = 0\n\nfunction onSlotCreate(times: CalendarEventTimes) {\n // The grid only ever asks for this when it was told it could create, so there is no second\n // guard here: `creatable` is decided once, where the press is read.\n emit('slot-activate', { date: times.start, time: times.startTime })\n\n created++\n const draft: CalendarEvent = {\n // Vue's own id makes it unique to this calendar, so two on one page cannot collide, and\n // it is stable across the server and the client.\n id: `${uid}-${created}`,\n title: m.value.calendar.newEvent(created),\n ...times,\n }\n\n /*\n * A consumer whose own event type adds REQUIRED fields gets a draft without them — there\n * is nothing here that could invent a room number or an attendee list. That is what\n * `event-create` is for: it fires with the event as made, and replacing that entry with a\n * complete one is the intended answer. Documented in the `.mdx`.\n */\n events.value = [...events.value, draft as E]\n emit('event-create', draft)\n}\n\ndefineExpose({\n /** Brings the focus into the grid, onto the cell it is currently showing. */\n focus: () => gridRef.value?.focus(),\n /** Goes back to the current day, exactly as the Today button does. */\n today: today_,\n previous: () => step(-1),\n next: () => step(1),\n /** Scrolls the grid so a given `HH:mm` sits at the top of the visible area. */\n scrollTo: (time: string) => {\n const at = minutesOf(time)\n if (at !== null) gridRef.value?.scrollToMinutes(at)\n },\n})\n</script>\n\n<template>\n <div class=\"v-calendar\" :class=\"rootClass\" :style=\"rootStyle\">\n <section\n v-bind=\"forwardedAttrs\"\n class=\"v-calendar-region\"\n :aria-label=\"ariaLabel\"\n :aria-roledescription=\"m.calendar.roleDescription\"\n >\n <div class=\"v-calendar-toolbar\">\n <div class=\"v-calendar-nav\">\n <VIconButton\n :icon=\"chevronLeftIcon\"\n :label=\"stepLabels.previous\"\n size=\"sm\"\n @click=\"step(-1)\"\n />\n <VIconButton\n :icon=\"chevronRightIcon\"\n :label=\"stepLabels.next\"\n size=\"sm\"\n @click=\"step(1)\"\n />\n </div>\n\n <VButton variant=\"outline\" tone=\"neutral\" size=\"sm\" @click=\"today_\">\n {{ m.calendar.today }}\n </VButton>\n\n <VTypography variant=\"heading-4\" as=\"h2\" class=\"v-calendar-title\">\n {{ rangeText }}\n </VTypography>\n\n <div class=\"v-calendar-actions\">\n <slot name=\"actions\" />\n\n <VMenu v-if=\"views.length > 1\" size=\"sm\" placement=\"bottom-end\" match-trigger>\n <template #trigger=\"{ triggerProps }\">\n <VButton\n variant=\"outline\"\n tone=\"neutral\"\n size=\"sm\"\n v-bind=\"triggerProps\"\n :aria-label=\"`${m.calendar.view}: ${viewLabel(view)}`\"\n >\n {{ viewLabel(view) }}\n <VIcon :name=\"arrowDropDownIcon\" />\n </VButton>\n </template>\n <VMenuItem\n v-for=\"value in views\"\n :key=\"value\"\n :label=\"viewLabel(value)\"\n :selected=\"value === view\"\n @select=\"setView(value)\"\n />\n </VMenu>\n </div>\n </div>\n\n <VCalendarTimeGrid\n v-if=\"isTimeGrid\"\n ref=\"gridRef\"\n v-model:focused=\"focused\"\n class=\"v-calendar-view\"\n :days=\"days\"\n :events=\"events\"\n :window=\"window\"\n :slot-duration=\"slotDuration\"\n :locale=\"resolvedLocale\"\n :hour-format=\"resolvedHourFormat\"\n :today=\"today\"\n :now=\"showCurrentTime ? now : null\"\n :editable=\"editable\"\n :creatable=\"creatable\"\n :hint-id=\"hintId\"\n :edge-step-delay=\"edgeStepDelay\"\n :auto-scroll=\"autoScroll\"\n :label=\"rangeText\"\n @cell-activate=\"onCellActivate\"\n @event-activate=\"emit('event-activate', $event)\"\n @event-drop=\"onEventDrop\"\n @slot-create=\"onSlotCreate\"\n @announce=\"announce\"\n @step=\"step\"\n >\n <template v-if=\"$slots.event\" #event=\"slotProps\">\n <slot name=\"event\" v-bind=\"slotProps\" />\n </template>\n <template v-if=\"$slots['day-header']\" #day-header=\"slotProps\">\n <slot name=\"day-header\" v-bind=\"slotProps\" />\n </template>\n <template v-if=\"$slots['all-day-label']\" #all-day-label>\n <slot name=\"all-day-label\" />\n </template>\n </VCalendarTimeGrid>\n\n <VCalendarMonth\n v-else-if=\"view === 'month'\"\n ref=\"gridRef\"\n v-model:focused=\"focusedDay\"\n class=\"v-calendar-view\"\n :weeks=\"weeks\"\n :events=\"events\"\n :locale=\"resolvedLocale\"\n :hour-format=\"resolvedHourFormat\"\n :today=\"today\"\n :event-limit=\"monthEventLimit\"\n :editable=\"editable\"\n :hint-id=\"hintId\"\n :edge-step-delay=\"edgeStepDelay\"\n :label=\"rangeText\"\n @day-activate=\"openIn($event, 'day')\"\n @cell-activate=\"onCellActivate($event, window.start)\"\n @event-activate=\"emit('event-activate', $event)\"\n @event-drop=\"onEventDrop\"\n @announce=\"announce\"\n @step=\"step\"\n >\n <template v-if=\"$slots.event\" #event=\"slotProps\">\n <slot name=\"event\" v-bind=\"slotProps\" />\n </template>\n </VCalendarMonth>\n\n <VCalendarYear\n v-else\n class=\"v-calendar-view\"\n :months=\"months\"\n :events=\"events\"\n :locale=\"resolvedLocale\"\n :weekdays=\"resolvedWeekdays\"\n :today=\"today\"\n :label=\"rangeText\"\n @month-activate=\"openIn($event, 'month')\"\n />\n\n <!--\n Both of these are rendered from the first paint and never conditionally.\n\n The live region has to EXIST before it has anything to say: one inserted along with\n its first message is not announced at all. And the hint is what every card points at\n with `aria-describedby`, so one node serves the whole calendar rather than repeating\n the same sentence on each of a hundred events.\n -->\n <div class=\"v-visually-hidden\" role=\"status\" aria-live=\"polite\">{{ announcement }}</div>\n <span :id=\"hintId\" class=\"v-visually-hidden\">{{ m.calendar.eventHint }}</span>\n </section>\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n .v-calendar {\n display: flex;\n block-size: 100%;\n min-block-size: 0;\n font-family: var(--vectis-text-family);\n color: var(--vectis-color-text);\n }\n\n /*\n * The height is settled in CSS rather than measured, the VDataTable idiom: the region is\n * a flex column at full height, the toolbar refuses to grow and the grid takes what is\n * left. `min-block-size: 0` on the grid is what lets it shrink below its content and\n * therefore scroll — without it the automatic minimum of a flex item would hold it at its\n * full 24-hour height and the whole page would scroll instead.\n *\n * All of it is a no-op when the parent's height is auto, where the percentage falls back\n * to auto and the calendar is simply as tall as its content. That is what makes an opt-in\n * prop unnecessary.\n */\n .v-calendar-region {\n display: flex;\n flex: 1;\n flex-direction: column;\n min-inline-size: 0;\n min-block-size: 0;\n }\n\n .v-calendar-toolbar {\n display: flex;\n flex: none;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--vectis-space-2);\n padding-block-end: var(--vectis-space-3);\n }\n\n .v-calendar-nav {\n display: flex;\n align-items: center;\n gap: var(--vectis-space-1);\n }\n\n .v-calendar-title {\n /* It may be long — a full weekday and month in the day view — so it is the part that\n gives way first, and the controls keep their size. */\n min-inline-size: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .v-calendar-actions {\n display: flex;\n align-items: center;\n gap: var(--vectis-space-2);\n /* The two siblings are pushed apart from here rather than by a `justify-content` on the\n toolbar, which would space every control equally instead of grouping them. */\n margin-inline-start: auto;\n }\n\n .v-calendar-view {\n flex: 1;\n min-block-size: 0;\n border: 1px solid var(--vectis-color-border);\n border-radius: var(--vectis-radius-surface);\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8HA,IAAM,IAAQ,GA0BR,IAAO,EAAyB,GAAC,MAA2B,GAU5D,IAAO,EAAmB,GAAC,MAAqC,GAChE,IAAS,EAAgB,GAAC,QAA+B,GAEzD,IAAO,GAoCP,IAAI,EAAY,GAChB,KAAe,EAAU,GACzB,EAAE,eAAW,eAAW,uBAAmB,GAAa,GAOxD,IAAiB,QAAe,EAAM,UAAU,GAAa,KAAK,GAClE,IAAqB,QAAe,EAAM,cAAc,GAAa,EAAe,KAAK,CAAC,GAC1F,IAAmB,QACvB,GAAkB,EAAM,UAAU,GAAkB,EAAe,KAAK,CAAC,CAC3E,GAEM,IAAS,QAAe,GAAS,EAAM,UAAU,EAAM,MAAM,CAAC,GAE9D,KAAO,QACX,GAAY,EAAK,OAAO,EAAK,OAAO,EAAiB,OAAO,EAA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AAA,MAAE,GAAe,GAAQ,EAAA,MAAO,KAAK;IAClD,iBAAc,AAAA,EAAA,QAAA,MAAE,EAAI,kBAAmB,CAAM;IACjC;IACZ,YAAU;IACV,QAAM;mBAESA,EAAAA,OAAO,QAAA;UAAQ;WAAO,MAAS,CAC7C,EAAwC,EAAA,QAAA,SAAA,EAAA,EAAb,CAAS,CAAA,CAAA,CAAA,CAAA;;;;;;;;;;;;;eAIxC,EAUE,IAAA;;IARA,OAAM;IACL,QAAQ,GAAA;IACR,QAAQ,EAAA;IACR,QAAQ,EAAA;IACR,UAAU,EAAA;IACV,OAAO,EAAA;IACP,OAAO,EAAA;IACP,iBAAc,AAAA,EAAA,QAAA,MAAE,GAAO,GAAM,OAAA;;;;;;;;;GAWhC,EAAwF,OAAxF,IAAwF,EAArB,GAAA,KAAY,GAAA,CAAA;GAC/E,EAA8E,QAAA;IAAvE,IAAI;IAAQ,OAAM;QAAuB,EAAA,CAAA,CAAC,CAAC,SAAS,SAAS,GAAA,CAAA"}
1
+ {"version":3,"file":"VCalendar.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/VCalendar/VCalendar.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"E extends CalendarEvent\">\n// @a11y @ssr @core\n/**\n * An agenda: the days side by side, the hours running down them, the events drawn where they\n * fall.\n *\n * A place to READ and REARRANGE a schedule, never to write one. Opening an event for editing\n * stays with the consumer — this reports what was asked for and leaves the form to them.\n *\n * Everything is local ISO `YYYY-MM-DD` and 24-hour `HH:mm`, which is what keeps the server\n * and the browser in agreement. An event may name a `timezone`, and that name is SHOWN\n * beside its times but never applied: converting would move the card depending on where the\n * page was rendered, the one thing a calendar must not do.\n *\n * The JS is what the platform leaves no way round — there is no accessible time grid to\n * build on and no way to say \"these three meetings overlap, share the width\" in CSS, so the\n * ARIA grid pattern and the overlap layout are written by hand. Every geometric and\n * calendrical decision lives in `layout.ts`, pure, because jsdom lays nothing out and that is\n * the only place any of it can be tested.\n */\nimport { computed, onMounted, ref, useId } from 'vue'\n\nimport VButton from '../VButton/VButton.vue'\nimport VIcon from '../VIcon/VIcon.vue'\nimport { arrow_drop_down as arrowDropDownIcon } from '../VIcon/icons/arrow_drop_down'\nimport { chevron_left as chevronLeftIcon } from '../VIcon/icons/chevron_left'\nimport { chevron_right as chevronRightIcon } from '../VIcon/icons/chevron_right'\nimport VIconButton from '../VIconButton/VIconButton.vue'\nimport VMenu from '../VMenu/VMenu.vue'\nimport VMenuItem from '../VMenu/VMenuItem.vue'\nimport VTypography from '../VTypography/VTypography.vue'\n\nimport { useAriaLabel } from '../../composables/useAriaLabel'\nimport { useRootAttrs } from '../../composables/useRootAttrs'\nimport { useTimer } from '../../composables/useTimer'\nimport { firstDayOfWeekFor, formatDateDisplay, formatDisplayRange } from '../../utils/date'\nimport { hourCycleFor, minutesOf } from '../../utils/time'\n\nimport { useMessages, useResolvedLocale } from '../../i18n/state'\n\nimport VCalendarMonth from './VCalendarMonth.vue'\nimport VCalendarTimeGrid, { type FocusedCell } from './VCalendarTimeGrid.vue'\nimport VCalendarYear from './VCalendarYear.vue'\nimport { EDGE_STEP_DELAY } from './edgeStep'\nimport {\n monthWeeks,\n monthsOfYear,\n normalizeWeekdays,\n stepAnchor,\n timeOf,\n timesOf,\n todayISO,\n visibleDays,\n visibleRange,\n windowOf,\n} from './layout'\nimport type {\n ActivatedCell,\n CalendarCell,\n CalendarEvent,\n CalendarEventId,\n CalendarEventSlotProps,\n CalendarEventTimes,\n CalendarFormat,\n CalendarView,\n} from './types'\n\nexport interface CalendarProps {\n /**\n * Which views the menu offers, in the order it lists them. Narrowing it is how a\n * calendar that only ever shows weeks stops offering anything else.\n */\n views?: CalendarView[]\n /** How many days the custom view shows, and how far Previous and Next step in it. */\n customDays?: number\n /**\n * Which weekdays are on show, as numbers from 0 for Sunday. `[1,2,3,4,5]` hides the\n * weekend everywhere. The ORDER matters as well: the first entry is the day a week\n * starts on, and it wins over `firstDayOfWeek`. Left out, the seven days starting on\n * `firstDayOfWeek`.\n */\n weekdays?: number[]\n /**\n * The day a week starts on, from 0 for Sunday, when `weekdays` is not given. Left out,\n * the locale decides.\n */\n firstDayOfWeek?: number\n /** The language the days, months and times are written in. Falls back to the global one. */\n locale?: string\n /**\n * Whether times are shown on a twelve or twenty-four hour clock. Left out, the reader's\n * language decides. It is the same prop, under the same name, as VTimePicker's.\n */\n format?: CalendarFormat\n /** The hour the grid starts at, from 0. */\n dayStart?: number\n /** The hour it ends at, up to 24. */\n dayEnd?: number\n /**\n * The step everything snaps to, in minutes: how far a nudge moves an event, and the unit a\n * slot is drawn out in.\n */\n slotDuration?: number\n /** Where the grid is scrolled to when it first appears, so the working day is in view. */\n scrollTime?: string\n /**\n * Leaves out the line drawn across today's column at the time it is now, and the dot on\n * its leading edge. Left in, it ticks once a minute while the calendar is on screen.\n */\n hideCurrentTime?: boolean\n /** How many events a day of the month view shows before it starts counting the rest. */\n monthEventLimit?: number\n /**\n * Stops events being moved and stretched — by dragging them, and with the keyboard. They\n * stay readable and clickable, and nothing else.\n */\n readonly?: boolean\n /**\n * Freezes the whole calendar: nothing can be moved, created or opened, no other period\n * can be reached, and everything greys out through the colour tokens. The cards leave the\n * tab order, the grid keeps its own so the agenda can still be read — which is what\n * separates this from `readonly`, where only the editing stops.\n */\n disabled?: boolean\n /**\n * Lets an empty stretch of a time grid be drawn out with the pointer, up or down from the\n * slot pressed. On release its times are reported through `event-create`, and nothing is\n * added to `events`: putting the event on the calendar is yours to do. A click, or Enter on a\n * focused cell, reports `cell-activate` with or without this.\n */\n creatable?: boolean\n /**\n * How long a dragged event has to rest against the side of the calendar before the view\n * turns to the previous or next period, in milliseconds. `0` turns that off.\n *\n * The wait is the point of it: paging the instant the pointer touched the edge would make\n * the last day of a week impossible to aim at.\n */\n edgeStepDelay?: number\n /** Stops dragging near the top or bottom of a time grid from scrolling it. */\n noEdgeScroll?: boolean\n /** What the calendar is called, for anyone who cannot see it. */\n label?: string\n}\n\nconst props = withDefaults(defineProps<CalendarProps>(), {\n views: () => ['day', '4days', 'week'],\n customDays: 4,\n weekdays: undefined,\n firstDayOfWeek: undefined,\n locale: undefined,\n format: undefined,\n dayStart: 0,\n dayEnd: 24,\n slotDuration: 15,\n scrollTime: '08:00',\n hideCurrentTime: false,\n monthEventLimit: 3,\n readonly: false,\n disabled: false,\n creatable: false,\n edgeStepDelay: EDGE_STEP_DELAY,\n noEdgeScroll: false,\n label: undefined,\n})\n\n/*\n * The wrapper-root pattern: the consumer's class and style stay on the outer box, and\n * everything else — their `id`, their `aria-*` — goes on the region, which is the part\n * that carries the role and is therefore the part they mean.\n */\ndefineOptions({ inheritAttrs: false })\n\n/** Which span the calendar is showing. It opens on the week. */\nconst view = defineModel<CalendarView>('view', { default: 'week' })\n\n/*\n * @ssr — the anchor is read from the clock at setup, so the server and the client can in\n * principle disagree across a midnight boundary. That is the trade VDatePicker already\n * makes for the month it opens on, and it is a safer one here: what the anchor decides is\n * a whole WEEK or month, which is the same on both sides for all but a few seconds a day.\n * Today's date, which marks a single column, is a different matter and is read below in\n * `onMounted` where the server cannot see it at all.\n */\nconst date = defineModel<string>('date', { default: () => todayISO() })\n/**\n * What is on the calendar, empty to begin with. It is a MODEL rather than a plain prop\n * because dragging and resizing write back to it: the calendar rearranges what it is given\n * and hands the new list back, never mutating the one it received.\n *\n * Opening an event for editing stays with the consumer — this component reads and\n * rearranges, and never creates or deletes: a slot drawn out is reported, not added.\n */\nconst events = defineModel<E[]>('events', { default: () => [] })\n\nconst emit = defineEmits<{\n /** A card was clicked or activated — the cue to open an editor of your own. */\n 'event-activate': [event: E]\n /**\n * An empty part of the grid was activated, at this day and this time. A day of the month\n * view has no hour of its own, and reports the one the time grids start at.\n */\n 'cell-activate': [cell: CalendarCell]\n /**\n * An event was dragged or nudged somewhere else. It carries the event as it now stands and\n * where it came from, so undoing it needs no copy of your own.\n */\n 'event-move': [event: E, previous: CalendarEventTimes]\n /** An event's end was dragged or nudged, in the same two parts. */\n 'event-resize': [event: E, previous: CalendarEventTimes]\n /**\n * An empty stretch of a day was drawn out, and these are its times. Nothing has been added\n * to `events`: this is the cue to make the event, in your own model or through your own form.\n */\n 'event-create': [times: CalendarEventTimes]\n}>()\n\ndefineSlots<{\n /** Extra controls in the toolbar, between the range and the view menu. */\n actions?(): unknown\n /** The content of one event's card, replacing the title and times. */\n event?(props: CalendarEventSlotProps<E>): unknown\n /** The head of one day column, replacing the weekday and the number. */\n 'day-header'?(props: { iso: string; weekday: string; dayText: string; today: boolean }): unknown\n /** The label beside the band of all-day events. */\n 'all-day-label'?(): unknown\n}>()\n\nconst m = useMessages()\nconst { rootClass, rootStyle, forwardedAttrs } = useRootAttrs()\n\nconst resolvedLocale = useResolvedLocale(() => props.locale)\nconst resolvedFormat = computed(() => props.format ?? hourCycleFor(resolvedLocale.value))\nconst resolvedWeekdays = computed(() =>\n normalizeWeekdays(\n props.weekdays,\n props.firstDayOfWeek ?? firstDayOfWeekFor(resolvedLocale.value),\n ),\n)\n\nconst timeWindow = computed(() => windowOf(props.dayStart, props.dayEnd))\n\nconst days = computed(() =>\n visibleDays(date.value, view.value, resolvedWeekdays.value, props.customDays),\n)\n\n/** Which view is a time grid, and which is a summary. Several things below turn on this. */\nconst isTimeGrid = computed(() => view.value !== 'month' && view.value !== 'year')\n\nconst weeks = computed(() =>\n view.value === 'month' ? monthWeeks(date.value, resolvedWeekdays.value) : [],\n)\n\nconst months = computed(() => (view.value === 'year' ? monthsOfYear(date.value) : []))\n\n// @ssr — today and the time it is now can only be known on the client: the server has no\n// way to tell either where the reader is, and rendering a guess would make the two markups\n// differ. Both stay null until then, and every rule that draws them is written to expect it.\nconst today = ref<string | null>(null)\nconst now = ref<number | null>(null)\n\nconst clock = useTimer()\n\n/**\n * Re-reads the clock, then arms itself for the top of the next minute — so the line moves\n * when the minute does rather than drifting by however long the interval was.\n *\n * TRAP — the floor on the delay is not a nicety. `useTimer` runs a delay of zero or less\n * SYNCHRONOUSLY, by design, so a tick that ever computed one would call itself straight back\n * and go on doing so until the stack gave out. A second is well below the resolution\n * anything here needs and comfortably above the point where that could happen.\n */\nfunction tick() {\n const at = new Date()\n now.value = at.getHours() * 60 + at.getMinutes()\n clock.start(tick, Math.max(1000, (60 - at.getSeconds()) * 1000))\n}\n\nonMounted(() => {\n today.value = todayISO()\n if (!props.hideCurrentTime) tick()\n const at = minutesOf(props.scrollTime)\n if (at !== null) gridRef.value?.scrollToMinutes(at)\n})\n\n/**\n * The grid, named by what it exposes rather than by `InstanceType<typeof …>`.\n *\n * TRAP — the usual form does not work here and the error it gives says nothing useful about\n * why. A generic `<script setup>` compiles to a FUNCTION, not to a class, so it has no\n * construct signature for `InstanceType` to read: the message complains that the component\n * \"provides no match for the signature `new (...args: any)`\", pointing at the template.\n * Writing the contract out is also the more honest of the two, since these two methods are\n * the whole of what this component asks of that one.\n */\nconst gridRef = ref<{ focus(): void; scrollToMinutes(minutes: number): void } | null>(null)\n\n/*\n * Which cell holds the tab stop, kept as two refs because the two kinds of view mean\n * different things by it: a time grid needs a day AND an hour, a month only a day. One ref\n * carrying an hour the month ignores would leave that hour to go stale, and the grid would\n * then reopen on whatever the month happened to leave behind.\n */\nconst focused = ref<FocusedCell>({ iso: date.value, minutes: timeWindow.value.start })\nconst focusedDay = ref(date.value)\n\nconst range = computed(() =>\n visibleRange(date.value, view.value, resolvedWeekdays.value, props.customDays),\n)\n\n/**\n * What the toolbar says the calendar is showing. Each view names itself at the coarsest\n * granularity that still identifies it: a single day says its weekday, a year says nothing\n * but the number.\n */\nconst rangeText = computed(() => {\n const locale = resolvedLocale.value\n if (view.value === 'year')\n return formatDateDisplay(range.value.start, locale, { year: 'numeric' })\n if (view.value === 'month') {\n return formatDateDisplay(range.value.start, locale, { month: 'long', year: 'numeric' })\n }\n if (view.value === 'day') {\n return formatDateDisplay(range.value.start, locale, {\n weekday: 'long',\n day: 'numeric',\n month: 'long',\n year: 'numeric',\n })\n }\n return formatDisplayRange(range.value.start, range.value.end, locale, {\n day: 'numeric',\n month: 'long',\n year: 'numeric',\n })\n})\n\nconst viewLabel = (value: CalendarView) => {\n const words = m.value.calendar\n if (value === 'day') return words.viewDay\n if (value === '4days') return words.view4Days\n if (value === 'week') return words.viewWeek\n if (value === 'month') return words.viewMonth\n if (value === 'year') return words.viewYear\n return words.viewCustom(props.customDays)\n}\n\n/**\n * What the two navigation buttons are called. They name the step rather than saying\n * \"previous\" alone, because the step is what changes from one view to the next and a bare\n * \"previous\" leaves a reader to guess whether it is a day or a year they are about to lose.\n */\nconst stepLabels = computed(() => {\n const words = m.value.calendar\n if (view.value === 'day') return { previous: words.previousDay, next: words.nextDay }\n if (view.value === 'week') return { previous: words.previousWeek, next: words.nextWeek }\n if (view.value === 'month') return { previous: words.previousMonth, next: words.nextMonth }\n if (view.value === 'year') return { previous: words.previousYear, next: words.nextYear }\n return { previous: words.previousPeriod, next: words.nextPeriod }\n})\n\nconst ariaLabel = useAriaLabel(() => props.label ?? m.value.calendar.label)\n\n/*\n * The four ways of reaching another period all pass through here, and `disabled` is refused\n * in every one of them rather than on the controls alone: the edge step pages the view from a\n * drag, and the year grid opens a month from a cell, neither of which is a button this\n * component disabled. It is the VDatePicker arrangement, where the guard sits on `goTo`.\n * `onCellActivate` below takes the same guard, for the same reason.\n */\nfunction step(delta: -1 | 1) {\n if (props.disabled) return\n date.value = stepAnchor(date.value, view.value, delta, resolvedWeekdays.value, props.customDays)\n}\n\nfunction goToToday() {\n if (props.disabled) return\n date.value = todayISO()\n}\n\nfunction setView(value: CalendarView) {\n if (props.disabled) return\n view.value = value\n}\n\n/**\n * An empty cell taken up, from either grid. The one place the time a month day stands for is\n * decided: the hour the time grids start at.\n *\n * TRAP — `disabled` is refused HERE, and not by the stylesheet's `pointer-events: none`\n * alone. That rule stops a click, but the grid keeps its tab stop so the agenda stays\n * readable, and Enter on a focused cell reaches this with nothing in its way — a frozen\n * calendar would go on reporting cells to a consumer's form.\n */\nfunction onCellActivate(cell: ActivatedCell) {\n if (props.disabled) return\n emit('cell-activate', {\n date: cell.date,\n time: timeOf(cell.minutes ?? timeWindow.value.start),\n })\n}\n\n/**\n * Going from a summary to the thing it summarises: opening a day from the month view, or a\n * month from the year view.\n *\n * The view only changes if the calendar was offering that one in the first place. A consumer\n * who narrowed `views` to a week and a year has said what their calendar is for, and jumping\n * it into a day view they deliberately left out would be the component overruling them —\n * so the date moves and the view stays, which is still a step towards what was asked for.\n */\nfunction openIn(iso: string, target: CalendarView) {\n if (props.disabled) return\n date.value = iso\n if (props.views.includes(target)) view.value = target\n}\n\n/**\n * What a reader who cannot see the grid is told: the range after every step of a move, and\n * whether the move was taken or given up.\n *\n * The node is rendered from the FIRST paint and left empty, never inserted along with its\n * first message — a live region that appears at the same moment as its text is not announced\n * at all, which is the trap VDataTable's selection count already documents.\n */\nconst announcement = ref('')\nconst uid = useId()\nconst hintId = `${uid}-hint`\n\nfunction announce(message: string) {\n announcement.value = message\n}\n\n/**\n * Writes one event's new times into the model and says what happened.\n *\n * The array is replaced rather than edited in place: a new reference is what wakes a\n * consumer's own watchers, and it is the design system's rule for every v-model holding a\n * list. This runs ONCE, when a gesture ends — never per frame of a drag, which would fill an\n * undo stack with sixty entries a second and send each one back as a render fighting the\n * finger.\n */\nfunction onEventDrop(id: CalendarEventId, times: CalendarEventTimes, kind: 'move' | 'resize') {\n const current = events.value.find((item) => item.id === id)\n if (!current) return\n\n const previous = timesOf(current)\n const next = { ...current, ...times }\n events.value = events.value.map((item) => (item.id === id ? next : item))\n // Written out rather than picking the name with a conditional: the emit signatures are an\n // overload set, and TypeScript resolves one only against a literal.\n if (kind === 'resize') emit('event-resize', next, previous)\n else emit('event-move', next, previous)\n}\n\n/*\n * A drawn slot is REPORTED and never added. What an event is called, what else it carries and\n * whether it exists at all are the consumer's decisions, so the calendar hands over the times\n * and draws nothing once the pointer is let go. The grid only asks when it was told it could\n * create, so `creatable` is not checked a second time here.\n */\nfunction onSlotCreate(times: CalendarEventTimes) {\n emit('event-create', times)\n}\n\ndefineExpose({\n /** Brings the focus into the grid, onto the cell it is currently showing. */\n focus: () => gridRef.value?.focus(),\n /** Goes back to the current day, exactly as the Today button does. */\n today: goToToday,\n /** Moves back one view — a week, a month, a year — exactly as the toolbar's arrow does. */\n previous: () => step(-1),\n /** Moves forward one view. */\n next: () => step(1),\n /** Scrolls the grid so a given `HH:mm` sits at the top of the visible area. */\n scrollTo: (time: string) => {\n const at = minutesOf(time)\n if (at !== null) gridRef.value?.scrollToMinutes(at)\n },\n})\n</script>\n\n<template>\n <div\n class=\"v-calendar\"\n :class=\"rootClass\"\n :style=\"rootStyle\"\n :data-disabled=\"disabled ? '' : undefined\"\n >\n <section\n v-bind=\"forwardedAttrs\"\n class=\"v-calendar-region\"\n :aria-label=\"ariaLabel\"\n :aria-roledescription=\"m.calendar.roleDescription\"\n >\n <div class=\"v-calendar-toolbar\">\n <div class=\"v-calendar-nav\">\n <VIconButton\n :label=\"stepLabels.previous\"\n size=\"sm\"\n :disabled=\"disabled\"\n @click=\"step(-1)\"\n >\n <VIcon :name=\"chevronLeftIcon\" mirrored />\n </VIconButton>\n <VIconButton :label=\"stepLabels.next\" size=\"sm\" :disabled=\"disabled\" @click=\"step(1)\">\n <VIcon :name=\"chevronRightIcon\" mirrored />\n </VIconButton>\n </div>\n\n <VButton variant=\"outline\" tone=\"neutral\" size=\"sm\" :disabled=\"disabled\" @click=\"goToToday\">\n {{ m.calendar.today }}\n </VButton>\n\n <VTypography variant=\"heading-4\" as=\"h2\" class=\"v-calendar-title\">\n {{ rangeText }}\n </VTypography>\n\n <div class=\"v-calendar-actions\">\n <slot name=\"actions\" />\n\n <VMenu v-if=\"views.length > 1\" size=\"sm\" placement=\"bottom-end\" match-trigger>\n <template #trigger=\"{ triggerProps }\">\n <VButton\n variant=\"outline\"\n tone=\"neutral\"\n size=\"sm\"\n :disabled=\"disabled\"\n v-bind=\"triggerProps\"\n :aria-label=\"`${m.calendar.view}: ${viewLabel(view)}`\"\n >\n {{ viewLabel(view) }}\n <VIcon :name=\"arrowDropDownIcon\" />\n </VButton>\n </template>\n <VMenuItem\n v-for=\"value in views\"\n :key=\"value\"\n :label=\"viewLabel(value)\"\n :selected=\"value === view\"\n @select=\"setView(value)\"\n />\n </VMenu>\n </div>\n </div>\n\n <!--\n The public props say what is REFUSED — `readonly`, `hideCurrentTime`,\n `noEdgeScroll` — so that none of them has to be turned off with a binding. The two\n internal grids keep the positive sense they read a dozen times each, and the whole\n of the inversion lives here, at the boundary: flip a sign on one of these lines and\n the grid quietly does the opposite of what was asked, since nothing downstream\n knows which way round the prop was written.\n -->\n <VCalendarTimeGrid\n v-if=\"isTimeGrid\"\n ref=\"gridRef\"\n v-model:focused=\"focused\"\n class=\"v-calendar-view\"\n :days=\"days\"\n :events=\"events\"\n :time-window=\"timeWindow\"\n :slot-duration=\"slotDuration\"\n :locale=\"resolvedLocale\"\n :format=\"resolvedFormat\"\n :today=\"today\"\n :now=\"hideCurrentTime ? null : now\"\n :editable=\"!readonly && !disabled\"\n :disabled=\"disabled\"\n :creatable=\"creatable && !disabled\"\n :hint-id=\"hintId\"\n :edge-step-delay=\"edgeStepDelay\"\n :auto-scroll=\"!noEdgeScroll\"\n :label=\"rangeText\"\n @cell-activate=\"onCellActivate\"\n @event-activate=\"emit('event-activate', $event)\"\n @event-drop=\"onEventDrop\"\n @slot-create=\"onSlotCreate\"\n @announce=\"announce\"\n @step=\"step\"\n >\n <template v-if=\"$slots.event\" #event=\"slotProps\">\n <slot name=\"event\" v-bind=\"slotProps\" />\n </template>\n <template v-if=\"$slots['day-header']\" #day-header=\"slotProps\">\n <slot name=\"day-header\" v-bind=\"slotProps\" />\n </template>\n <template v-if=\"$slots['all-day-label']\" #all-day-label>\n <slot name=\"all-day-label\" />\n </template>\n </VCalendarTimeGrid>\n\n <VCalendarMonth\n v-else-if=\"view === 'month'\"\n ref=\"gridRef\"\n v-model:focused=\"focusedDay\"\n class=\"v-calendar-view\"\n :weeks=\"weeks\"\n :events=\"events\"\n :locale=\"resolvedLocale\"\n :format=\"resolvedFormat\"\n :today=\"today\"\n :month-event-limit=\"monthEventLimit\"\n :editable=\"!readonly && !disabled\"\n :disabled=\"disabled\"\n :hint-id=\"hintId\"\n :edge-step-delay=\"edgeStepDelay\"\n :label=\"rangeText\"\n @day-activate=\"openIn($event, 'day')\"\n @cell-activate=\"onCellActivate\"\n @event-activate=\"emit('event-activate', $event)\"\n @event-drop=\"onEventDrop\"\n @announce=\"announce\"\n @step=\"step\"\n >\n <template v-if=\"$slots.event\" #event=\"slotProps\">\n <slot name=\"event\" v-bind=\"slotProps\" />\n </template>\n </VCalendarMonth>\n\n <VCalendarYear\n v-else\n class=\"v-calendar-view\"\n :months=\"months\"\n :events=\"events\"\n :locale=\"resolvedLocale\"\n :weekdays=\"resolvedWeekdays\"\n :today=\"today\"\n :label=\"rangeText\"\n @month-activate=\"openIn($event, 'month')\"\n />\n\n <!--\n Both of these are rendered from the first paint and never conditionally.\n\n The live region has to EXIST before it has anything to say: one inserted along with\n its first message is not announced at all. And the hint is what every card points at\n with `aria-describedby`, so one node serves the whole calendar rather than repeating\n the same sentence on each of a hundred events.\n -->\n <div class=\"v-visually-hidden\" role=\"status\" aria-live=\"polite\">{{ announcement }}</div>\n <span :id=\"hintId\" class=\"v-visually-hidden\">{{ m.calendar.eventHint }}</span>\n </section>\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n .v-calendar {\n display: flex;\n block-size: 100%;\n min-block-size: 0;\n font-family: var(--vectis-text-family);\n color: var(--vectis-color-text);\n }\n\n /* A frozen calendar greys out through the colour tokens and never through opacity, the\n design system rule: what a reader keeps here is the agenda itself, which has to stay\n readable. The cards are real disabled buttons, so they grey themselves. */\n .v-calendar[data-disabled] {\n color: var(--vectis-color-text-subtle);\n cursor: not-allowed;\n }\n\n .v-calendar[data-disabled] .v-calendar-view {\n pointer-events: none;\n }\n\n /*\n * The height is settled in CSS rather than measured, the VDataTable idiom: the region is\n * a flex column at full height, the toolbar refuses to grow and the grid takes what is\n * left. `min-block-size: 0` on the grid is what lets it shrink below its content and\n * therefore scroll — without it the automatic minimum of a flex item would hold it at its\n * full 24-hour height and the whole page would scroll instead.\n *\n * All of it is a no-op when the parent's height is auto, where the percentage falls back\n * to auto and the calendar is simply as tall as its content. That is what makes an opt-in\n * prop unnecessary.\n */\n .v-calendar-region {\n display: flex;\n flex: 1;\n flex-direction: column;\n min-inline-size: 0;\n min-block-size: 0;\n }\n\n .v-calendar-toolbar {\n display: flex;\n flex: none;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--vectis-space-2);\n padding-block-end: var(--vectis-space-3);\n }\n\n .v-calendar-nav {\n display: flex;\n align-items: center;\n gap: var(--vectis-space-1);\n }\n\n .v-calendar-title {\n /* It may be long — a full weekday and month in the day view — so it is the part that\n gives way first, and the controls keep their size. */\n min-inline-size: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .v-calendar-actions {\n display: flex;\n align-items: center;\n gap: var(--vectis-space-2);\n /* The two siblings are pushed apart from here rather than by a `justify-content` on the\n toolbar, which would space every control equally instead of grouping them. */\n margin-inline-start: auto;\n }\n\n /*\n * The view on show, whichever it is: the one box that scrolls. The views inherit the family\n * and the colour from `.v-calendar` and declare neither again.\n */\n .v-calendar-view {\n flex: 1;\n overflow: auto;\n block-size: 100%;\n min-block-size: 0;\n border: 1px solid var(--vectis-color-border);\n border-radius: var(--vectis-radius-surface);\n }\n\n /*\n * What the three views share lives HERE rather than in each of their sheets. They are only\n * ever rendered by this component, so this sheet ships wherever they do — the\n * VCarousel/VCarouselItem arrangement. Every rule a view writes against one of these classes\n * is either disjoint from it or more specific, never tied: a tie between two sheets would be\n * settled by the consumer's bundler.\n */\n\n /*\n * A drag currently held off the calendar. `not-allowed` is the word the library already uses\n * for \"you cannot do this\", on every disabled control.\n *\n * BEST-EFFORT, and never the signal: while a pointer is captured the cursor is resolved\n * against the capture target rather than against whatever sits under the pointer, and engines\n * differ on it. What carries the message is the card's own paint.\n */\n .v-calendar-view[data-outside] {\n cursor: not-allowed;\n }\n\n .v-calendar-weekday {\n color: var(--vectis-color-text-muted);\n font-size: var(--vectis-text-overline-size);\n font-weight: var(--vectis-text-overline-weight);\n letter-spacing: var(--vectis-text-overline-tracking);\n text-transform: uppercase;\n }\n\n /*\n * Today's date, marked on the number the way a calendar marks a date rather than a column.\n * Semibold here marks a state, not a type role. Written at (0,2,0) so it wins over each view's\n * own (0,1,0) rule for the element it lands on.\n */\n .v-calendar-view .v-calendar-today {\n background: var(--vectis-color-accent);\n color: var(--vectis-color-text-on-accent);\n font-weight: var(--vectis-font-weight-semibold);\n }\n\n /*\n * A cell of either grid: ruled on two sides, the other two drawn by its neighbours. It keeps\n * the default cursor: the pointer hand belongs to what can be opened, the events, and a grid\n * of hands would say every square of the week is a link.\n */\n .v-calendar-cell {\n border-block-start: 1px solid var(--vectis-color-border);\n border-inline-start: 1px solid var(--vectis-color-border);\n }\n\n .v-calendar-cell:first-child {\n border-inline-start: none;\n }\n\n .v-calendar-cell:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n /* Drawn inwards: the view is a scrolling box, and an outward ring on a cell at the edge\n would be cropped by it. */\n outline-offset: calc(-1 * var(--vectis-focus-ring-width));\n }\n\n /* The plain buttons the month and year views draw: a day number, the \"+2 more\", a month. */\n .v-calendar-button {\n /* A button carries a border and a background from the browser, which around a round day\n number read as a stray ring. Neither is optional. */\n border: none;\n background: none;\n font-family: inherit;\n cursor: pointer;\n transition: background-color var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-calendar-button:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: var(--vectis-focus-ring-offset);\n }\n\n /*\n * The strip that lights up while a drag rests against an edge, counting down to turn the\n * page. It is what stops the paging being a surprise.\n *\n * Drawn INSIDE the box the cells occupy rather than on the scroller, because a scroller's\n * absolutely positioned child is placed against its content and scrolls away with it. That\n * box has to be positioned, which each view's own sheet sees to. An absolutely positioned\n * pseudo-element is not a grid item, so it disturbs no column.\n *\n * Its width is `--vectis-control-size-calendar-edge`, whose twin is `EDGE_BAND` in\n * `edgeStep.ts` — the JavaScript that decides where the countdown actually starts. Neither\n * may move without the other. The layer, 2, is the time grid's stacking table.\n */\n .v-calendar-edge-cue[data-edge]::after {\n content: '';\n position: absolute;\n inset-block: 0;\n inline-size: var(--vectis-control-size-calendar-edge);\n background: var(--vectis-color-accent-surface);\n z-index: 2;\n pointer-events: none;\n }\n\n .v-calendar-edge-cue[data-edge='start']::after {\n inset-inline-start: 0;\n }\n\n .v-calendar-edge-cue[data-edge='end']::after {\n inset-inline-end: 0;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-calendar-button {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiJA,IAAM,IAAQ,GA6BR,IAAO,EAAyB,GAAC,MAA2B,GAU5D,IAAO,EAAmB,GAAC,MAAqC,GAShE,IAAS,EAAgB,GAAC,QAA+B,GAEzD,IAAO,GAiCP,IAAI,EAAY,GAChB,EAAE,eAAW,eAAW,uBAAmB,GAAa,GAExD,IAAiB,QAAwB,EAAM,MAAM,GACrD,IAAiB,QAAe,EAAM,UAAU,GAAa,EAAe,KAAK,CAAC,GAClF,IAAmB,QACvB,GACE,EAAM,UACN,EAAM,kBAAkB,GAAkB,EAAe,KAAK,CAChE,CACF,GAEM,IAAa,QAAe,GAAS,EAAM,UAAU,EAAM,MAAM,CAAC,GAElE,KAAO,QACX,GAAY,EAAK,OAAO,EAAK,OAAO,EAAiB,OAAO,EAAM,UAAU,CAC9E,GAGM,KAAa,QAAe,EAAK,UAAU,WAAW,EAAK,UAAU,MAAM,GAE3E,KAAQ,QACZ,EAAK,UAAU,UAAU,GAAW,EAAK,OAAO,EAAiB,KAAK,IAAI,CAAC,CAC7E,GAEM,KAAS,QA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;IACZ,YAAU;IACV,QAAM;mBAESA,EAAAA,OAAO,QAAA;UAAQ;WAAO,MAAS,CAC7C,EAAwC,EAAA,QAAA,SAAA,EAAA,EAAb,CAAS,CAAA,CAAA,CAAA,CAAA;;;;;;;;;;;;;;eAIxC,EAUE,IAAA;;IARA,OAAM;IACL,QAAQ,GAAA;IACR,QAAQ,EAAA;IACR,QAAQ,EAAA,CAAA;IACR,UAAU,EAAA;IACV,OAAO,EAAA;IACP,OAAO,EAAA;IACP,iBAAc,AAAA,EAAA,QAAA,MAAE,GAAO,GAAM,OAAA;;;;;;;;;GAWhC,EAAwF,OAAxF,IAAwF,EAArB,GAAA,KAAY,GAAA,CAAA;GAC/E,EAA8E,QAAA;IAAvE,IAAI;IAAQ,OAAM;QAAuB,EAAA,CAAA,CAAC,CAAC,SAAS,SAAS,GAAA,CAAA"}
@@ -1,2 +1,2 @@
1
1
  @layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
2
- @layer vectis.components{.v-calendar-event{--calendar-event-face:var(--vectis-color-event-surface);--calendar-event-edge:var(--vectis-color-event-border);--calendar-event-ink:var(--vectis-color-event-text);border:1px solid var(--calendar-event-edge);border-inline-start:3px solid var(--calendar-event-edge);border-radius:var(--vectis-radius-interactive);background:var(--calendar-event-face);color:var(--calendar-event-ink);font-family:var(--vectis-text-family);text-align:start;cursor:pointer;transition:box-shadow var(--vectis-duration-fast) var(--vectis-ease-default), filter var(--vectis-duration-fast) var(--vectis-ease-default);display:flex;position:relative;overflow:hidden;container-type:size}.v-calendar-event[data-custom]{--calendar-event-edge:var(--calendar-event-color);--calendar-event-face:color-mix(in oklab, var(--calendar-event-color) 14%, var(--vectis-color-surface));--calendar-event-ink:var(--vectis-color-text)}.v-calendar-event-body{min-block-size:0;min-inline-size:0;padding:var(--vectis-space-1) var(--vectis-space-2);flex-direction:column;flex:1;gap:1px;display:flex;overflow:hidden}@container (height<=3rem){.v-calendar-event[data-layout=block] .v-calendar-event-body{align-items:center;gap:var(--vectis-space-1);flex-direction:row;padding-block:0}.v-calendar-event[data-layout=block] .v-calendar-event-title{flex:1;min-inline-size:0}.v-calendar-event[data-layout=block] .v-calendar-event-time{flex:none}.v-calendar-event[data-layout=block] .v-calendar-event-description{display:none}}@container (height<=1.5rem){.v-calendar-event[data-layout=block] .v-calendar-event-title,.v-calendar-event[data-layout=block] .v-calendar-event-time{line-height:1}.v-calendar-event[data-layout=block] .v-calendar-event-handle{block-size:calc(var(--vectis-control-size-calendar-handle) / 2)}}.v-calendar-event:hover{filter:brightness(.97)}.v-calendar-event[data-dragging]{opacity:.75;box-shadow:var(--vectis-shadow-md);pointer-events:none;z-index:3}.v-calendar-event[data-rejected]{--calendar-event-face:var(--vectis-color-danger-surface);--calendar-event-edge:var(--vectis-color-danger-border);--calendar-event-ink:var(--vectis-color-danger-text);box-shadow:none;border-style:dotted}.v-calendar-event[data-ghost]{opacity:.4;z-index:0;border-style:dashed}.v-calendar-event[data-grabbed]{outline:var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);outline-offset:var(--vectis-focus-ring-offset);box-shadow:var(--vectis-shadow-md);z-index:3}.v-calendar-event-handle{block-size:var(--vectis-control-size-calendar-handle);touch-action:none;cursor:ns-resize;position:absolute;inset-block-end:0;inset-inline:0}.v-calendar-event-handle:after{content:"";inline-size:var(--vectis-space-4);border-radius:var(--vectis-radius-pill);background:var(--calendar-event-ink);opacity:0;block-size:2px;transition:opacity var(--vectis-duration-fast) var(--vectis-ease-default);position:absolute;inset-block-end:2px;inset-inline-start:50%;translate:-50%}.v-calendar-event:hover .v-calendar-event-handle:after,.v-calendar-event[data-dragging] .v-calendar-event-handle:after{opacity:.6}.v-calendar-event:focus-visible{outline:var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);outline-offset:calc(-1 * var(--vectis-focus-ring-width))}.v-calendar-event[data-continues-before]{border-block-start-style:dashed;border-start-start-radius:0;border-start-end-radius:0}.v-calendar-event[data-continues-after]{border-block-end-style:dashed;border-end-end-radius:0;border-end-start-radius:0}.v-calendar-event[data-layout=chip]{block-size:var(--calendar-chip-height,100%)}.v-calendar-event[data-layout=chip] .v-calendar-event-body{align-items:center;gap:var(--vectis-space-1);flex-direction:row;padding-block:0}.v-calendar-event-title{font-size:var(--vectis-text-body-sm-size);font-weight:var(--vectis-font-weight-medium);line-height:var(--vectis-text-body-sm-leading);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.v-calendar-event-time{font-size:var(--vectis-text-caption-size);line-height:var(--vectis-text-caption-leading);text-overflow:ellipsis;white-space:nowrap;opacity:.85;overflow:hidden}.v-calendar-event-description{min-block-size:0;color:inherit;text-overflow:ellipsis;opacity:.85;overflow:hidden}@media (prefers-reduced-motion:reduce){.v-calendar-event,.v-calendar-event-handle:after{transition:none}}}
2
+ @layer vectis.components{.v-calendar-event{--calendar-event-face:var(--vectis-color-event-surface);--calendar-event-edge:var(--vectis-color-event-border);--calendar-event-ink:var(--vectis-color-event-text);border:1px solid var(--calendar-event-edge);border-inline-start:3px solid var(--calendar-event-edge);border-radius:min(var(--vectis-radius-interactive), calc(var(--vectis-control-size-calendar-allday-lane) / 2));background:var(--calendar-event-face);color:var(--calendar-event-ink);font-family:var(--vectis-text-family);text-align:start;cursor:pointer;transition:box-shadow var(--vectis-duration-fast) var(--vectis-ease-default), filter var(--vectis-duration-fast) var(--vectis-ease-default);display:flex;position:relative;overflow:hidden;container-type:size}.v-calendar-event[data-custom]{--calendar-event-edge:var(--calendar-event-color);--calendar-event-face:color-mix(in oklab, var(--calendar-event-color) 14%, var(--vectis-color-surface));--calendar-event-ink:var(--vectis-color-text)}.v-calendar-event-body{min-block-size:0;min-inline-size:0;padding:var(--vectis-space-1) var(--vectis-space-2);flex-direction:column;flex:1;gap:1px;display:flex;overflow:hidden}@container (height<=3rem){.v-calendar-event[data-layout=block] .v-calendar-event-body{align-items:center;gap:var(--vectis-space-1);flex-direction:row;padding-block:0}.v-calendar-event[data-layout=block] .v-calendar-event-title{flex:0 auto;min-inline-size:0}.v-calendar-event[data-layout=block] .v-calendar-event-time{flex:0 1000 auto;min-inline-size:0}.v-calendar-event[data-layout=block] .v-calendar-event-description{display:none}}@container (height<=1.5rem){.v-calendar-event[data-layout=block] .v-calendar-event-title,.v-calendar-event[data-layout=block] .v-calendar-event-time{line-height:1}.v-calendar-event[data-layout=block] .v-calendar-event-handle{block-size:calc(var(--vectis-control-size-calendar-handle) / 2)}}.v-calendar-event:hover{filter:brightness(.97)}.v-calendar-event[data-dragging]{opacity:.75;box-shadow:var(--vectis-shadow-md);pointer-events:none;z-index:3}.v-calendar-event[data-rejected]{--calendar-event-face:var(--vectis-color-danger-surface);--calendar-event-edge:var(--vectis-color-danger-border);--calendar-event-ink:var(--vectis-color-danger-text);box-shadow:none;border-style:dotted}.v-calendar-event[data-ghost]{opacity:.4;z-index:0;border-style:dashed}.v-calendar-event[data-grabbed]{outline:var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);outline-offset:var(--vectis-focus-ring-offset);box-shadow:var(--vectis-shadow-md);z-index:3}.v-calendar-event-handle{block-size:var(--vectis-control-size-calendar-handle);touch-action:none;cursor:ns-resize;position:absolute;inset-block-end:0;inset-inline:0}.v-calendar-event-handle:after{content:"";inline-size:var(--vectis-space-4);border-radius:var(--vectis-radius-pill);background:var(--calendar-event-ink);opacity:0;block-size:2px;transition:opacity var(--vectis-duration-fast) var(--vectis-ease-default);position:absolute;inset-block-end:2px;inset-inline-start:50%;translate:-50%}.v-calendar-event:hover .v-calendar-event-handle:after,.v-calendar-event[data-dragging] .v-calendar-event-handle:after{opacity:.6}.v-calendar-event:focus-visible{outline:var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);outline-offset:calc(-1 * var(--vectis-focus-ring-width))}.v-calendar-event[data-continues-before]{border-block-start-style:dashed;border-start-start-radius:0;border-start-end-radius:0}.v-calendar-event[data-continues-after]{border-block-end-style:dashed;border-end-end-radius:0;border-end-start-radius:0}.v-calendar-event[data-layout=chip]{block-size:var(--calendar-chip-height,100%)}.v-calendar-event[data-layout=chip] .v-calendar-event-body{align-items:center;gap:var(--vectis-space-1);flex-direction:row;padding-block:0}.v-calendar-event-title{font-size:var(--vectis-text-body-sm-size);font-weight:var(--vectis-font-weight-medium);line-height:var(--vectis-text-body-sm-leading);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.v-calendar-event-time{font-size:var(--vectis-text-caption-size);line-height:var(--vectis-text-caption-leading);text-overflow:ellipsis;white-space:nowrap;opacity:.85;overflow:hidden}.v-calendar-event-description{min-block-size:0;color:inherit;text-overflow:ellipsis;opacity:.85;overflow:hidden}@media (prefers-reduced-motion:reduce){.v-calendar-event,.v-calendar-event-handle:after{transition:none}}}
@@ -1,4 +1,4 @@
1
- import { CalendarEvent, CalendarEventId } from './types.js';
1
+ import { CalendarEvent, CalendarEventId, CalendarEventLayout, CalendarEventSlotProps } from './types.js';
2
2
  export interface CalendarEventProps<T> {
3
3
  /** The event this card stands for. */
4
4
  event: T;
@@ -6,7 +6,7 @@ export interface CalendarEventProps<T> {
6
6
  * Which shape to take: a block, which fills the box the calendar gives it and can show a
7
7
  * second line, or a chip, which is one line high and sits in a row of others.
8
8
  */
9
- layout?: 'block' | 'chip';
9
+ layout?: CalendarEventLayout;
10
10
  /** The event's times, already written out for the reader by the calendar. */
11
11
  timeText?: string;
12
12
  /** Whether the event carries on past the start or the end of what is on show. */
@@ -39,6 +39,8 @@ export interface CalendarEventProps<T> {
39
39
  * without this the echo would come out a different colour from the card it belongs to.
40
40
  */
41
41
  ghostOf?: CalendarEventId;
42
+ /** Whether the whole calendar is disabled, which makes the card a real disabled button. */
43
+ disabled?: boolean;
42
44
  }
43
45
  declare const __VLS_export: <E extends CalendarEvent>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
44
46
  props: import('vue').PublicProps & __VLS_PrettifyLocal<CalendarEventProps<E>> & (typeof globalThis extends {
@@ -48,15 +50,7 @@ declare const __VLS_export: <E extends CalendarEvent>(__VLS_props: NonNullable<A
48
50
  attrs: any;
49
51
  slots: {
50
52
  /** The whole content of the card, replacing the title and the times. */
51
- default?(props: {
52
- event: E;
53
- layout: "block" | "chip";
54
- timeText: string;
55
- continuesBefore: boolean;
56
- continuesAfter: boolean;
57
- dragging: boolean;
58
- grabbed: boolean;
59
- }): unknown;
53
+ default?(props: CalendarEventSlotProps<E>): unknown;
60
54
  };
61
55
  emit: {};
62
56
  }>) => import('vue').VNode & {