vectis-ui 0.8.1 → 0.9.1
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.
- package/README.md +3 -3
- package/dist/components/VAccordion/VAccordionItem.d.ts +4 -6
- package/dist/components/VAccordion/VAccordionItem.js.map +1 -1
- package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js +21 -19
- package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAccordion/context.d.ts +6 -1
- package/dist/components/VAccordion/context.js.map +1 -1
- package/dist/components/VAvatar/VAvatar.css +1 -1
- package/dist/components/VAvatar/VAvatar.d.ts +5 -3
- package/dist/components/VAvatar/VAvatar.js.map +1 -1
- package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js +53 -39
- package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAvatar/VAvatarGroup.d.ts +12 -3
- package/dist/components/VAvatar/VAvatarGroup.js.map +1 -1
- package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js +27 -20
- package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAvatar/context.d.ts +2 -2
- package/dist/components/VAvatar/context.js.map +1 -1
- package/dist/components/VBadge/VBadge.css +1 -1
- package/dist/components/VBadge/VBadge.d.ts +8 -4
- package/dist/components/VBadge/VBadge.js.map +1 -1
- package/dist/components/VBadge/VBadge.vue_vue_type_script_setup_true_lang.js +6 -3
- package/dist/components/VBadge/VBadge.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VBreadcrumb/VBreadcrumb.d.ts +5 -4
- package/dist/components/VBreadcrumb/VBreadcrumb.js.map +1 -1
- package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js +8 -3
- package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VButton/VButton.css +1 -1
- package/dist/components/VButton/VButton.d.ts +4 -1
- package/dist/components/VButton/VButton.js.map +1 -1
- package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js +8 -7
- package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VButton/VButtonGroup.js.map +1 -1
- package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/VCalendar.css +1 -1
- package/dist/components/VCalendar/VCalendar.d.ts +15 -6
- package/dist/components/VCalendar/VCalendar.js.map +1 -1
- package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js +144 -126
- package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/VCalendarEvent.css +1 -1
- package/dist/components/VCalendar/VCalendarEvent.d.ts +1 -1
- package/dist/components/VCalendar/VCalendarEvent.js.map +1 -1
- package/dist/components/VCalendar/VCalendarEvent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/VCalendarMonth.css +1 -1
- package/dist/components/VCalendar/VCalendarMonth.d.ts +1 -1
- package/dist/components/VCalendar/VCalendarMonth.js.map +1 -1
- package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js +99 -90
- package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/VCalendarTimeGrid.css +1 -1
- package/dist/components/VCalendar/VCalendarTimeGrid.d.ts +3 -3
- package/dist/components/VCalendar/VCalendarTimeGrid.js.map +1 -1
- package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js +256 -246
- package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/VCalendarYear.css +1 -1
- package/dist/components/VCalendar/VCalendarYear.d.ts +8 -1
- package/dist/components/VCalendar/VCalendarYear.js.map +1 -1
- package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js +39 -32
- package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/color.d.ts +1 -1
- package/dist/components/VCalendar/color.js.map +1 -1
- package/dist/components/VCalendar/edgeStep.d.ts +3 -3
- package/dist/components/VCalendar/edgeStep.js +5 -0
- package/dist/components/VCalendar/edgeStep.js.map +1 -1
- package/dist/components/VCalendar/gesture.d.ts +10 -9
- package/dist/components/VCalendar/gesture.js +60 -45
- package/dist/components/VCalendar/gesture.js.map +1 -1
- package/dist/components/VCalendar/keyboard.d.ts +22 -5
- package/dist/components/VCalendar/keyboard.js +17 -16
- package/dist/components/VCalendar/keyboard.js.map +1 -1
- package/dist/components/VCalendar/layout.d.ts +47 -37
- package/dist/components/VCalendar/layout.js +47 -37
- package/dist/components/VCalendar/layout.js.map +1 -1
- package/dist/components/VCalendar/timeGrid.d.ts +4 -4
- package/dist/components/VCalendar/timeGrid.js +6 -6
- package/dist/components/VCalendar/timeGrid.js.map +1 -1
- package/dist/components/VCalendar/types.d.ts +5 -5
- package/dist/components/VCarousel/VCarousel.css +1 -1
- package/dist/components/VCarousel/VCarousel.d.ts +59 -38
- package/dist/components/VCarousel/VCarousel.js.map +1 -1
- package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js +161 -132
- package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCarousel/VCarouselItem.d.ts +1 -1
- package/dist/components/VCarousel/VCarouselItem.js.map +1 -1
- package/dist/components/VCarousel/VCarouselItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCarousel/context.d.ts +1 -1
- package/dist/components/VCarousel/context.js.map +1 -1
- package/dist/components/VCheckbox/VCheckbox.css +1 -1
- package/dist/components/VCheckbox/VCheckbox.d.ts +2 -2
- package/dist/components/VCheckbox/VCheckbox.js.map +1 -1
- package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js +10 -8
- package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VChip/VChip.css +1 -1
- package/dist/components/VChip/VChip.d.ts +7 -2
- package/dist/components/VChip/VChip.js.map +1 -1
- package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js +69 -55
- package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCombobox/VCombobox.css +1 -1
- package/dist/components/VCombobox/VCombobox.d.ts +50 -36
- package/dist/components/VCombobox/VCombobox.js.map +1 -1
- package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js +167 -161
- package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCombobox/VComboboxGroup.css +1 -1
- package/dist/components/VCombobox/VComboboxGroup.js.map +1 -1
- package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCombobox/infiniteScroll.d.ts +12 -3
- package/dist/components/VCombobox/infiniteScroll.js +18 -12
- package/dist/components/VCombobox/infiniteScroll.js.map +1 -1
- package/dist/components/VDataTable/VDataTable.css +1 -1
- package/dist/components/VDataTable/VDataTable.d.ts +55 -24
- package/dist/components/VDataTable/VDataTable.js.map +1 -1
- package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js +192 -155
- package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDateInput/VDateInput.css +1 -1
- package/dist/components/VDateInput/VDateInput.d.ts +15 -12
- package/dist/components/VDateInput/VDateInput.js.map +1 -1
- package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js +180 -160
- package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDateInput/mask.d.ts +95 -0
- package/dist/components/VDateInput/mask.js +118 -0
- package/dist/components/VDateInput/mask.js.map +1 -0
- package/dist/components/VDatePicker/VDatePicker.css +1 -1
- package/dist/components/VDatePicker/VDatePicker.d.ts +6 -5
- package/dist/components/VDatePicker/VDatePicker.js.map +1 -1
- package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js +204 -173
- package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDatePicker/keyboard.d.ts +3 -3
- package/dist/components/VDatePicker/keyboard.js.map +1 -1
- package/dist/components/VDatePicker/names.d.ts +34 -0
- package/dist/components/VDatePicker/names.js +42 -0
- package/dist/components/VDatePicker/names.js.map +1 -0
- package/dist/components/VDialog/VDialog.css +1 -1
- package/dist/components/VDialog/VDialog.d.ts +2 -2
- package/dist/components/VDialog/VDialog.js.map +1 -1
- package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js +63 -41
- package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VFileInput/VFileInput.d.ts +38 -25
- package/dist/components/VFileInput/VFileInput.js.map +1 -1
- package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js +74 -71
- package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VFileInput/truncate.d.ts +4 -4
- package/dist/components/VFileInput/truncate.js.map +1 -1
- package/dist/components/VFilePicker/VFilePicker.css +1 -1
- package/dist/components/VFilePicker/VFilePicker.d.ts +54 -37
- package/dist/components/VFilePicker/VFilePicker.js.map +1 -1
- package/dist/components/VFilePicker/VFilePicker.vue_vue_type_script_setup_true_lang.js +152 -135
- package/dist/components/VFilePicker/VFilePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VFilePicker/fileKind.d.ts +2 -2
- package/dist/components/VFilePicker/fileKind.js.map +1 -1
- package/dist/components/VHotkeys/VHotkeys.css +1 -1
- package/dist/components/VHotkeys/VHotkeys.d.ts +10 -8
- package/dist/components/VHotkeys/VHotkeys.js.map +1 -1
- package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js +22 -20
- package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VHotkeys/platform.d.ts +9 -7
- package/dist/components/VHotkeys/platform.js +41 -30
- package/dist/components/VHotkeys/platform.js.map +1 -1
- package/dist/components/VIcon/VIcon.css +1 -1
- package/dist/components/VIcon/VIcon.d.ts +6 -6
- package/dist/components/VIcon/VIcon.js.map +1 -1
- package/dist/components/VIcon/VIcon.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VIcon/iconProps.d.ts +4 -4
- package/dist/components/VIcon/iconProps.js.map +1 -1
- package/dist/components/VIcon/icons/index.d.ts +1 -1
- package/dist/components/VIcon/icons/index.js.map +1 -1
- package/dist/components/VIcon/icons/names.d.ts +1 -1
- package/dist/components/VIcon/icons/names.js.map +1 -1
- package/dist/components/VIcon/resolver.d.ts +3 -3
- package/dist/components/VIcon/resolver.js +23 -20
- package/dist/components/VIcon/resolver.js.map +1 -1
- package/dist/components/VIcon/types.d.ts +4 -4
- package/dist/components/VIconButton/VIconButton.d.ts +4 -4
- package/dist/components/VIconButton/VIconButton.js.map +1 -1
- package/dist/components/VIconButton/VIconButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VInput/VInput.d.ts +16 -8
- package/dist/components/VInput/VInput.js.map +1 -1
- package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js +22 -16
- package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VInput/VInputGroup.css +1 -1
- package/dist/components/VInput/VInputGroup.js.map +1 -1
- package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js +43 -28
- package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VInputOTP/VInputOTP.css +1 -1
- package/dist/components/VInputOTP/VInputOTP.d.ts +3 -3
- package/dist/components/VInputOTP/VInputOTP.js.map +1 -1
- package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js +152 -85
- package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/VMenu.d.ts +4 -4
- package/dist/components/VMenu/VMenu.js.map +1 -1
- package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/VMenuGroup.css +1 -1
- package/dist/components/VMenu/VMenuGroup.js.map +1 -1
- package/dist/components/VMenu/VMenuGroup.vue_vue_type_script_setup_true_lang.js +18 -11
- package/dist/components/VMenu/VMenuGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/VMenuItem.css +1 -1
- package/dist/components/VMenu/VMenuItem.d.ts +6 -6
- package/dist/components/VMenu/VMenuItem.js.map +1 -1
- package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js +83 -69
- package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/VMenuPanel.css +1 -1
- package/dist/components/VMenu/VMenuPanel.d.ts +2 -2
- package/dist/components/VMenu/VMenuPanel.js.map +1 -1
- package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js +56 -55
- package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/context.d.ts +2 -2
- package/dist/components/VMenu/context.js.map +1 -1
- package/dist/components/VPagination/VPagination.css +1 -1
- package/dist/components/VPagination/VPagination.d.ts +31 -9
- package/dist/components/VPagination/VPagination.js.map +1 -1
- package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js +82 -52
- package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VPopover/VPopover.css +1 -1
- package/dist/components/VPopover/VPopover.d.ts +1 -1
- package/dist/components/VPopover/VPopover.js.map +1 -1
- package/dist/components/VPopover/VPopover.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VProgressCircular/VProgressCircular.css +1 -1
- package/dist/components/VProgressCircular/VProgressCircular.d.ts +12 -7
- package/dist/components/VProgressCircular/VProgressCircular.js.map +1 -1
- package/dist/components/VProgressCircular/VProgressCircular.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VProgressLinear/VProgressLinear.css +1 -1
- package/dist/components/VProgressLinear/VProgressLinear.d.ts +15 -10
- package/dist/components/VProgressLinear/VProgressLinear.js.map +1 -1
- package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VRadio/VRadio.css +1 -1
- package/dist/components/VRadio/VRadio.js.map +1 -1
- package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSeparator/VSeparator.d.ts +1 -1
- package/dist/components/VSeparator/VSeparator.js.map +1 -1
- package/dist/components/VSeparator/VSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigation.d.ts +2 -2
- package/dist/components/VSideNavigation/VSideNavigation.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigationGroup.css +1 -1
- package/dist/components/VSideNavigation/VSideNavigationGroup.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigationGroup.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/VSideNavigation/VSideNavigationGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigationItem.css +1 -1
- package/dist/components/VSideNavigation/VSideNavigationItem.d.ts +12 -13
- package/dist/components/VSideNavigation/VSideNavigationItem.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js +87 -68
- package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSkeletonLoader/VSkeletonLoader.css +1 -1
- package/dist/components/VSkeletonLoader/VSkeletonLoader.d.ts +10 -7
- package/dist/components/VSkeletonLoader/VSkeletonLoader.js.map +1 -1
- package/dist/components/VSkeletonLoader/VSkeletonLoader.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/VSkeletonLoader/VSkeletonLoader.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSlider/VSlider.css +1 -1
- package/dist/components/VSlider/VSlider.d.ts +21 -7
- package/dist/components/VSlider/VSlider.js.map +1 -1
- package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js +159 -140
- package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSnackbar/VSnackbar.css +1 -1
- package/dist/components/VSnackbar/VSnackbar.d.ts +4 -4
- package/dist/components/VSnackbar/VSnackbar.js.map +1 -1
- package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js +85 -59
- package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSnackbar/state.d.ts +7 -7
- package/dist/components/VSnackbar/state.js +13 -11
- package/dist/components/VSnackbar/state.js.map +1 -1
- package/dist/components/VSpinner/VSpinner.css +1 -1
- package/dist/components/VSpinner/VSpinner.js.map +1 -1
- package/dist/components/VSpinner/VSpinner.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSwitch/VSwitch.css +1 -1
- package/dist/components/VSwitch/VSwitch.d.ts +1 -1
- package/dist/components/VSwitch/VSwitch.js.map +1 -1
- package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTabs/VTab.css +1 -1
- package/dist/components/VTabs/VTab.d.ts +4 -0
- package/dist/components/VTabs/VTab.js.map +1 -1
- package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js +9 -8
- package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTabs/VTabs.css +1 -1
- package/dist/components/VTabs/VTabs.d.ts +17 -7
- package/dist/components/VTabs/VTabs.js.map +1 -1
- package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js +84 -77
- package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTextarea/VTextarea.d.ts +8 -8
- package/dist/components/VTextarea/VTextarea.js.map +1 -1
- package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js +71 -69
- package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTimeInput/VTimeInput.css +1 -1
- package/dist/components/VTimeInput/VTimeInput.d.ts +21 -12
- package/dist/components/VTimeInput/VTimeInput.js.map +1 -1
- package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js +230 -206
- package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTimeInput/search.d.ts +17 -2
- package/dist/components/VTimeInput/search.js +19 -9
- package/dist/components/VTimeInput/search.js.map +1 -1
- package/dist/components/VTimePicker/VTimePicker.css +1 -1
- package/dist/components/VTimePicker/VTimePicker.d.ts +8 -7
- package/dist/components/VTimePicker/VTimePicker.js.map +1 -1
- package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js +128 -106
- package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTimePicker/limits.d.ts +11 -4
- package/dist/components/VTimePicker/limits.js +3 -2
- package/dist/components/VTimePicker/limits.js.map +1 -1
- package/dist/components/VToast/VToast.css +1 -1
- package/dist/components/VToast/VToast.js.map +1 -1
- package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js +33 -37
- package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VToast/VToaster.js.map +1 -1
- package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js +91 -61
- package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VToast/state.d.ts +8 -6
- package/dist/components/VToast/state.js +15 -13
- package/dist/components/VToast/state.js.map +1 -1
- package/dist/components/VToggle/VToggle.css +1 -1
- package/dist/components/VToggle/VToggle.d.ts +9 -4
- package/dist/components/VToggle/VToggle.js.map +1 -1
- package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VToggle/VToggleItem.d.ts +4 -0
- package/dist/components/VToggle/VToggleItem.js.map +1 -1
- package/dist/components/VToggle/VToggleItem.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/VToggle/VToggleItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTooltip/VTooltip.css +1 -1
- package/dist/components/VTooltip/VTooltip.d.ts +17 -10
- package/dist/components/VTooltip/VTooltip.js.map +1 -1
- package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js +46 -26
- package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTypography/VTypography.css +1 -1
- package/dist/components/VTypography/VTypography.d.ts +6 -4
- package/dist/components/VTypography/VTypography.js.map +1 -1
- package/dist/components/VTypography/VTypography.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/composables/useAriaLabel.js +1 -1
- package/dist/composables/useAriaLabel.js.map +1 -1
- package/dist/composables/useClearable.d.ts +2 -2
- package/dist/composables/useClearable.js.map +1 -1
- package/dist/composables/useDetailsOpen.d.ts +3 -3
- package/dist/composables/useDetailsOpen.js +14 -12
- package/dist/composables/useDetailsOpen.js.map +1 -1
- package/dist/composables/useFieldIds.d.ts +2 -1
- package/dist/composables/useFieldIds.js +6 -5
- package/dist/composables/useFieldIds.js.map +1 -1
- package/dist/composables/useFieldPanel.d.ts +2 -2
- package/dist/composables/useFieldPanel.js +47 -37
- package/dist/composables/useFieldPanel.js.map +1 -1
- package/dist/composables/useFileDrop.js +3 -3
- package/dist/composables/useFileDrop.js.map +1 -1
- package/dist/composables/useFileField.d.ts +1 -1
- package/dist/composables/useFileField.js +62 -41
- package/dist/composables/useFileField.js.map +1 -1
- package/dist/composables/useIconClickHandlers.d.ts +3 -3
- package/dist/composables/useIconClickHandlers.js +14 -13
- package/dist/composables/useIconClickHandlers.js.map +1 -1
- package/dist/composables/useInertLink.js +12 -10
- package/dist/composables/useInertLink.js.map +1 -1
- package/dist/composables/useLiveAnnouncer.d.ts +5 -0
- package/dist/composables/useLiveAnnouncer.js +23 -0
- package/dist/composables/useLiveAnnouncer.js.map +1 -0
- package/dist/composables/useMaskedField.d.ts +5 -5
- package/dist/composables/useMaskedField.js.map +1 -1
- package/dist/composables/usePopover.d.ts +3 -3
- package/dist/composables/usePopover.js +6 -4
- package/dist/composables/usePopover.js.map +1 -1
- package/dist/composables/useProgressValue.js +11 -2
- package/dist/composables/useProgressValue.js.map +1 -1
- package/dist/composables/useRootAttrs.d.ts +1 -1
- package/dist/composables/useRootAttrs.js.map +1 -1
- package/dist/composables/useSlotNodes.d.ts +18 -0
- package/dist/composables/useSlotNodes.js +13 -0
- package/dist/composables/useSlotNodes.js.map +1 -0
- package/dist/composables/useTextLimit.d.ts +2 -1
- package/dist/composables/useTextLimit.js +2 -2
- package/dist/composables/useTextLimit.js.map +1 -1
- package/dist/composables/useTimer.d.ts +5 -0
- package/dist/composables/useTimer.js +22 -11
- package/dist/composables/useTimer.js.map +1 -1
- package/dist/i18n/en.js +1 -1
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/fr.js +14 -14
- package/dist/i18n/fr.js.map +1 -1
- package/dist/i18n/state.d.ts +7 -7
- package/dist/i18n/state.js +37 -28
- package/dist/i18n/state.js.map +1 -1
- package/dist/i18n/types.d.ts +12 -12
- package/dist/icons.d.ts +2 -2
- package/dist/index.d.ts +12 -11
- package/dist/styles.css +1 -1
- package/dist/tokens/css.d.ts +1 -1
- package/dist/tokens/css.js.map +1 -1
- package/dist/tokens/index.d.ts +6 -0
- package/dist/tokens/semantic.d.ts +6 -0
- package/dist/tokens/semantic.js +66 -60
- package/dist/tokens/semantic.js.map +1 -1
- package/dist/tokens/themes/dark.js +3 -3
- package/dist/tokens/themes/dark.js.map +1 -1
- package/dist/tokens.json +130 -66
- package/dist/types.d.ts +1 -1
- package/dist/utils/arrowNav.d.ts +4 -1
- package/dist/utils/arrowNav.js +7 -7
- package/dist/utils/arrowNav.js.map +1 -1
- package/dist/utils/chip.d.ts +1 -1
- package/dist/utils/chip.js.map +1 -1
- package/dist/utils/clock.d.ts +113 -0
- package/dist/utils/clock.js +84 -0
- package/dist/utils/clock.js.map +1 -0
- package/dist/utils/css.d.ts +6 -4
- package/dist/utils/css.js +2 -2
- package/dist/utils/css.js.map +1 -1
- package/dist/utils/date.d.ts +7 -102
- package/dist/utils/date.js +33 -160
- package/dist/utils/date.js.map +1 -1
- package/dist/utils/direction.d.ts +1 -1
- package/dist/utils/direction.js.map +1 -1
- package/dist/utils/env.d.ts +12 -3
- package/dist/utils/env.js +6 -0
- package/dist/utils/env.js.map +1 -0
- package/dist/utils/file.d.ts +3 -3
- package/dist/utils/file.js +1 -1
- package/dist/utils/file.js.map +1 -1
- package/dist/utils/focus.d.ts +1 -1
- package/dist/utils/focus.js.map +1 -1
- package/dist/utils/hostWarns.d.ts +1 -1
- package/dist/utils/hostWarns.js.map +1 -1
- package/dist/utils/ids.d.ts +1 -1
- package/dist/utils/ids.js.map +1 -1
- package/dist/utils/matcher.d.ts +2 -2
- package/dist/utils/matcher.js.map +1 -1
- package/dist/utils/memo.d.ts +1 -1
- package/dist/utils/memo.js.map +1 -1
- package/dist/utils/text.d.ts +3 -3
- package/dist/utils/text.js.map +1 -1
- package/dist/utils/time.d.ts +2 -101
- package/dist/utils/time.js +22 -98
- package/dist/utils/time.js.map +1 -1
- package/dist/utils/vnode.d.ts +5 -3
- package/dist/utils/vnode.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VCalendarMonth.js","names":[],"sources":["../../../src/components/VCalendar/VCalendarMonth.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"E extends CalendarEvent\">\n// @a11y @keyboard @core\n/**\n * The month view: the weeks stacked one under another, each day a square holding as many of\n * its events as will fit.\n *\n * It is internal to VCalendar and has no story of its own — its documentation lives with\n * the component that renders it. Like the time grid it computes nothing about dates: it is\n * handed the weeks already cut and filtered, and turns them into boxes.\n *\n * A day here is not a column of hours but a SUMMARY, so the events are drawn as chips in\n * the order the day would be read out — the all-day ones first, then the rest by when they\n * start — and a day with more than it can show says how many are left rather than silently\n * dropping them.\n *\n * The drag and the keyboard grab are `gesture.ts`'s. What stays here is what a square means:\n * the point under the pointer turned into a day, and a vertical step read as a whole week.\n */\nimport { computed, ref, useId } from 'vue'\n\nimport { formatDateDisplay } from '../../utils/date'\nimport { clamp } from '../../utils/number'\nimport { formatTimeDisplay } from '../../utils/time'\n\nimport { useMessages } from '../../i18n/state'\n\nimport VCalendarEvent from './VCalendarEvent.vue'\nimport { gridGeometryOf, useCalendarGesture, type GestureBase, type GrabStep } from './gesture'\nimport { calendarIntent } from './keyboard'\nimport {\n eventsByDay,\n isAllDayEvent,\n moveEventToDay,\n pointToMonthCell,\n sameTimes,\n timesOf,\n type MonthCell,\n} from './layout'\nimport type {\n ActivatedCell,\n CalendarEvent,\n CalendarEventId,\n CalendarEventSlotProps,\n CalendarEventTimes,\n CalendarFormat,\n} from './types'\n\nexport interface CalendarMonthProps<T> {\n /** The weeks, already padded to a fixed height and filtered to the visible weekdays. */\n weeks: MonthCell[][]\n events: T[]\n locale: string\n format: CalendarFormat\n today: string | null\n /** How many events a day shows before it starts counting the rest. */\n monthEventLimit: number\n /** Whether events can be moved from one day to another. */\n editable: boolean\n /** Whether the whole calendar is frozen, which also takes its cards out of the tab order. */\n disabled: boolean\n /** The node telling a reader how a chip can be moved, shared by every one of them. */\n hintId: string\n /** How long a drag rests against an edge before the month turns. Zero turns paging off. */\n edgeStepDelay: number\n label: string\n}\n\nconst props = defineProps<CalendarMonthProps<E>>()\n\nconst emit = defineEmits<{\n /** A day was asked to be opened on its own. */\n 'day-activate': [iso: string]\n /** An empty part of a day was activated. A month has no hours, so the time is left to the calendar. */\n 'cell-activate': [cell: ActivatedCell]\n 'event-activate': [event: E]\n /** An event was dropped on another day. A month has no hours, so it is only ever a move. */\n 'event-drop': [id: CalendarEventId, times: CalendarEventTimes, kind: 'move']\n /** Something happened that a reader who cannot see the grid needs told. */\n announce: [message: string]\n step: [delta: -1 | 1]\n}>()\n\n/** Which day holds the tab stop. Only the date matters here; the hour is the grid's affair. */\nconst focused = defineModel<string>('focused', { required: true })\n\ndefineSlots<{\n event?(props: CalendarEventSlotProps<E>): unknown\n}>()\n\nconst m = useMessages()\nconst uid = useId()\n\nconst cellId = (iso: string) => `${uid}-m-${iso}`\n\n/** The flattened list of days: what the arrows travel along, and what the events are filed by. */\nconst flat = computed(() => props.weeks.flat().map((cell) => cell.iso))\nconst columnCount = computed(() => props.weeks[0]?.length ?? 1)\n\n/** The column headings, taken from the first week so they always match the columns drawn. */\nconst weekdayNames = computed(() =>\n (props.weeks[0] ?? []).map((cell) =>\n formatDateDisplay(cell.iso, props.locale, { weekday: 'short' }),\n ),\n)\n\n/*\n * The two labels every square carries, worked out once per cell rather than once per USE.\n *\n * `longDay` is asked for twice in the template — the square's own `aria-label`, then the\n * name of the button that opens the day — so the 42 cells cost 126 `Intl` formats a render,\n * and a drag re-renders the whole grid each time it carries a chip onto another day. The map\n * depends on the weeks and the locale alone, so it survives every frame of a drag.\n */\nconst dayLabels = computed(() => {\n const map = new Map<string, { number: string; long: string }>()\n for (const iso of flat.value) {\n map.set(iso, {\n number: formatDateDisplay(iso, props.locale, { day: 'numeric' }),\n long: formatDateDisplay(iso, props.locale, {\n weekday: 'long',\n day: 'numeric',\n month: 'long',\n }),\n })\n }\n return map\n})\n\nconst dayNumber = (iso: string) => dayLabels.value.get(iso)?.number ?? ''\n\n/*\n * A day outside the grid can reach this — the announcement after a move names the day the\n * event landed on, which may be the next month — so it falls back to formatting rather than\n * assuming the map holds it.\n */\nconst longDay = (iso: string) =>\n dayLabels.value.get(iso)?.long ??\n formatDateDisplay(iso, props.locale, { weekday: 'long', day: 'numeric', month: 'long' })\n\n/**\n * A chip being carried from one day to another, by pointer or by keyboard.\n *\n * A month has no hours, so there is one kind and no resize: only which day an event starts\n * on moves, and its length in days and its times come along untouched.\n */\ninterface Gesture extends GestureBase {\n /** Which square the pointer took hold in, so a long bar does not jump under it. */\n grabIndex: number\n}\n\nconst gridEl = ref<HTMLElement | null>(null)\n/** The view's own box, which a drag is measured against to know whether it has left it. */\nconst rootEl = ref<HTMLElement | null>(null)\n\nconst {\n gesture,\n withPreview,\n edgeCue,\n isRtl,\n start,\n endLastGesture,\n consumeDrag,\n onPointermove,\n onPointerup,\n onPointercancel,\n onPointerleave,\n onCardKeydown,\n focusCell,\n idOfCard,\n cardState,\n} = useCalendarGesture<E, Gesture>({\n events: () => props.events,\n eventOf: (id): E | undefined => eventsById.value.get(id),\n // Measured against the ROOT and not against `gridEl`, whose rect leaves out the row of\n // weekday names above it.\n rootEl,\n // Captured on the GRID rather than on the chip, because a chip is redrawn on another day the\n // moment the drag starts and a captured element that moves takes the pointer with it.\n captureEl: gridEl,\n measureEl: gridEl,\n columns: () => columnCount.value,\n editable: () => props.editable,\n hintId: () => props.hintId,\n // The step is irrelevant to a month, which has no hours: 1 keeps the table honest without\n // asking the calendar for a number this view never uses.\n slotMinutes: () => 1,\n edgeStepDelay: () => props.edgeStepDelay,\n layout: () => props.weeks,\n applyPoint,\n onDrop: (state) => emit('event-drop', state.id, state.preview, 'move'),\n grab: (item) =>\n props.editable\n ? {\n id: item.id,\n origin: timesOf(item),\n pointerId: null,\n originX: 0,\n originY: 0,\n // There is no pointer to remember; the arrows work off the preview, not a position.\n grabIndex: 0,\n }\n : null,\n onGrabStep,\n step: (delta) => emit('step', delta),\n announce: (message) => emit('announce', message),\n})\n\n/**\n * The events as the month should currently DRAW them — the model, with the one being carried\n * put wherever it now is. Running the preview through the same grouping as everything else is\n * what makes the day it leaves and the day it arrives at both redraw with no special case.\n *\n * Nothing has to be held out of a layout for the echo, unlike the time grid: a month cell\n * simply stacks its chips, so the echo takes its own line in the day it came from and disturbs\n * nothing.\n */\nconst drawnEvents = computed<E[]>(() => (gesture.value ? withPreview(props.events) : props.events))\n\n/** Every day's events, worked out once rather than once per chip. */\nconst byDay = computed(() => eventsByDay(drawnEvents.value, flat.value))\n\nconst eventsById = computed(\n () => new Map<CalendarEventId, E>(drawnEvents.value.map((item) => [item.id, item])),\n)\n\n/**\n * A chip says when it happens only when that is not obvious: an all-day event has no time\n * to give, and the day it sits in already says which day it is.\n *\n * Memoized by start time inside the computed, so a change of locale or hour format throws the\n * cache away whole — the twin in VCalendarTimeGrid.vue carries the trap that makes reading\n * the computed, and not a cache beside it, the only correct shape.\n */\nconst timeTextOf = computed(() => {\n const { locale, format } = props\n const cache = new Map<string, string>()\n return (event: E): string => {\n if (isAllDayEvent(event)) return ''\n let text = cache.get(event.startTime)\n if (text === undefined) {\n text = formatTimeDisplay(event.startTime, locale, format)\n cache.set(event.startTime, text)\n }\n return text\n }\n})\n\n/** One chip as the template draws it, its time already written out. */\ninterface Chip {\n event: E\n timeText: string\n}\n\n/**\n * What each square draws, and how many it had to leave out — one Map, built in a single pass.\n *\n * It is the `dayLabels` treatment. Written as template functions these returned a NEW array\n * per square per render, and since one of them is the source of a `v-for`, Vue rediffed all\n * 42 lists each time; each chip also formatted its own time. The map is rebuilt with `byDay`,\n * which a drag changes only when it carries its chip onto another day (`applyPoint` writes\n * nothing otherwise), and survives every other render.\n */\nconst dayEvents = computed(() => {\n const map = new Map<string, { shown: Chip[]; hidden: number }>()\n const textOf = timeTextOf.value\n const limit = props.monthEventLimit\n for (const [iso, all] of byDay.value) {\n const shown = all.length > limit ? all.slice(0, limit) : all\n map.set(iso, {\n shown: shown.map((event) => ({ event, timeText: textOf(event) })),\n hidden: Math.max(0, all.length - limit),\n })\n }\n return map\n})\n\n/** A square with nothing on it, shared rather than allocated per empty cell. */\nconst NO_EVENTS: { shown: Chip[]; hidden: number } = Object.freeze({ shown: [], hidden: 0 })\nconst dayEventsOf = (iso: string) => dayEvents.value.get(iso) ?? NO_EVENTS\n\nfunction moveFocusTo(iso: string) {\n focused.value = iso\n // @a11y — the model decides which cell is tabbable, so the focus can only follow once the\n // render that applied it has run.\n focusCell(cellId(iso), true)\n}\n\nconst tabbable = computed(() =>\n flat.value.includes(focused.value) ? focused.value : (flat.value[0] ?? null),\n)\n\n/**\n * The same table serves both views, so its two axes are read differently here: a sideways step\n * is one day, and a vertical one is a whole week rather than an hour. That is the only place the\n * month reinterprets it, and it is why the table returns a direction rather than a date.\n */\nconst dayStep = (days: number, minutes: number) =>\n days !== 0 ? days : Math.sign(minutes) * columnCount.value\n\nfunction onKeydown(event: KeyboardEvent) {\n const target = event.target as HTMLElement | null\n\n // A chip answers its own table, delegated here on the same element as the pointer so the\n // two input paths cannot drift apart.\n const card = target?.closest<HTMLElement>('.v-calendar-event')\n if (card) {\n onCardKeydown(event, card)\n return\n }\n\n const cell = target?.closest<HTMLElement>('.v-calendar-month-cell')\n if (!cell) return\n\n const intent = calendarIntent(event.key, event.shiftKey, 'cell', 1, isRtl())\n if (!intent) return\n\n const iso = cell.dataset.iso!\n const index = flat.value.indexOf(iso)\n const columns = columnCount.value\n\n if (intent.kind === 'moveFocus') {\n const next =\n flat.value[clamp(index + dayStep(intent.days, intent.minutes), 0, flat.value.length - 1)]\n if (!next) return\n event.preventDefault()\n moveFocusTo(next)\n return\n }\n\n if (intent.kind === 'rowEdge') {\n const row = Math.floor(index / columns)\n const edge = intent.edge === 'start' ? row * columns : row * columns + columns - 1\n const next = flat.value[clamp(edge, 0, flat.value.length - 1)]\n if (!next) return\n event.preventDefault()\n moveFocusTo(next)\n return\n }\n\n if (intent.kind === 'period') {\n event.preventDefault()\n emit('step', intent.delta)\n return\n }\n\n if (intent.kind === 'activate') {\n event.preventDefault()\n emit('cell-activate', { date: iso, minutes: null })\n }\n}\n\n/** Which of the flattened squares a point falls on. */\nfunction indexAt(x: number, y: number, rect: DOMRect, rtl: boolean): number {\n const cell = pointToMonthCell(\n { x, y },\n { ...gridGeometryOf(rect, columnCount.value, rtl), rows: props.weeks.length || 1 },\n rtl,\n )\n return cell.rowIndex * columnCount.value + cell.columnIndex\n}\n\nfunction onGridPointerdown(event: PointerEvent) {\n endLastGesture()\n if (gesture.value || !props.editable || event.button !== 0) return\n\n const card = (event.target as HTMLElement | null)?.closest<HTMLElement>('.v-calendar-event')\n const item = card ? eventsById.value.get(idOfCard(card)) : undefined\n const rect = gridEl.value?.getBoundingClientRect()\n if (!item || !rect) return\n const rtl = isRtl()\n\n start(\n {\n id: item.id,\n origin: timesOf(item),\n pointerId: event.pointerId,\n originX: event.clientX,\n originY: event.clientY,\n grabIndex: indexAt(event.clientX, event.clientY, rect, rtl),\n },\n rtl,\n )\n}\n\n/**\n * Works out which day the chip now belongs to, from wherever the pointer last was.\n *\n * Separate from the handler because the month turning calls it too: the squares change under\n * a hand that has not moved, and the chip has to be placed against the new ones.\n */\nfunction applyPoint(state: Gesture, rect: DOMRect) {\n const index = indexAt(state.lastX, state.lastY, rect, state.rtl)\n const last = lastApplied\n if (last?.state === state && last.weeks === props.weeks && last.index === index) return\n lastApplied = { state, weeks: props.weeks, index }\n\n /*\n * The target is the event's START shifted by however many squares the pointer has crossed,\n * not the square it is over — so a bar grabbed by its third day keeps its third day under\n * the finger. The days come out of the flattened grid, which is already filtered to the\n * weekdays on show, so a hidden weekend is not counted.\n */\n const days = flat.value\n const from = days.indexOf(state.origin.start)\n const target =\n days[\n clamp((from === -1 ? state.grabIndex : from) + index - state.grabIndex, 0, days.length - 1)\n ]\n if (!target) return\n /*\n * TRAP — written only when the day changes. The gesture is a deep ref, so an equal but new\n * preview would still re-bucket and re-sort every event and re-render all 42 squares.\n */\n const next = moveEventToDay(state.origin, target)\n if (!sameTimes(state.preview, next)) state.preview = next\n}\n\n/**\n * The square `applyPoint` last placed the chip from, so the many `pointermove`s that fire\n * inside one square return before any date arithmetic. The weeks belong to what the index\n * MEANS: the month turning under a still pointer reads as a new square at the same index.\n * A plain variable, since nothing renders it; the gesture's identity says a new press began.\n */\nlet lastApplied: { state: Gesture; weeks: MonthCell[][]; index: number } | null = null\n\n/** One arrow press on a chip held by the keyboard: a day sideways, a week vertically. */\nfunction onGrabStep(state: Gesture, step: GrabStep, item: E): boolean {\n // A month has no hours to stretch, so Shift with an arrow is simply not a gesture here.\n if (step.kind !== 'grabMove') return false\n const days = flat.value\n const from = days.indexOf(state.preview.start)\n const target = days[clamp(from + dayStep(step.days, step.minutes), 0, days.length - 1)]\n if (!target) return false\n state.preview = moveEventToDay(state.preview, target)\n emit('announce', m.value.calendar.movedTo(item.title, longDay(state.preview.start)))\n return true\n}\n\nfunction onCardClick(item: E) {\n // `pointerup` fires before `click`, so letting go at the end of a drag would ALSO open the\n // event — the consumer's editor over every chip the reader had just moved.\n if (consumeDrag()) return\n emit('event-activate', item)\n}\n\n/**\n * A click on the empty part of a day: the pointer's side of the Enter that activates a cell,\n * so a square drawn with a pointer cursor answers a click as it answers the key.\n *\n * The chips and the two buttons a square holds answer their own clicks, so a click that came\n * from one of them is theirs alone. And a click ending a drag is swallowed like the one a chip\n * would have received: the drop has already said what the gesture meant.\n */\nfunction onGridClick(event: MouseEvent) {\n const target = event.target as HTMLElement | null\n if (target?.closest('.v-calendar-event, button')) return\n const cell = target?.closest<HTMLElement>('.v-calendar-month-cell')\n if (!cell || consumeDrag()) return\n emit('cell-activate', { date: cell.dataset.iso!, minutes: null })\n}\n\n// The same two members VCalendarTimeGrid exposes, so VCalendar drives either view without\n// asking which is on screen. A month has no hours, hence the empty `scrollToMinutes`.\ndefineExpose({\n /** Brings the focus onto the day the grid is currently pointing at. */\n focus: () => {\n if (tabbable.value) focusCell(cellId(tabbable.value))\n },\n /** Nothing to scroll to in a month view. */\n scrollToMinutes: () => {},\n})\n</script>\n\n<template>\n <div\n ref=\"rootEl\"\n class=\"v-calendar-month\"\n :data-outside=\"gesture?.outside ? '' : undefined\"\n :style=\"{ '--calendar-columns': String(weekdayNames.length) }\"\n >\n <div class=\"v-calendar-month-head\" aria-hidden=\"true\">\n <span\n v-for=\"name in weekdayNames\"\n :key=\"name\"\n class=\"v-calendar-weekday v-calendar-month-weekday\"\n >\n {{ name }}\n </span>\n </div>\n\n <div\n ref=\"gridEl\"\n class=\"v-calendar-month-grid v-calendar-edge-cue\"\n role=\"grid\"\n :aria-label=\"label\"\n :data-edge=\"edgeCue\"\n @keydown=\"onKeydown\"\n @pointerdown=\"onGridPointerdown\"\n @pointermove=\"onPointermove\"\n @pointerup=\"onPointerup\"\n @pointercancel=\"onPointercancel\"\n @pointerleave=\"onPointerleave\"\n @click=\"onGridClick\"\n >\n <div\n v-for=\"(week, row) in weeks\"\n :key=\"week[0]?.iso ?? row\"\n role=\"row\"\n class=\"v-calendar-month-week\"\n >\n <div\n v-for=\"cell in week\"\n :id=\"cellId(cell.iso)\"\n :key=\"cell.iso\"\n role=\"gridcell\"\n class=\"v-calendar-cell v-calendar-month-cell\"\n :data-iso=\"cell.iso\"\n :data-adjacent=\"cell.adjacent ?? undefined\"\n :tabindex=\"tabbable === cell.iso ? 0 : -1\"\n :aria-label=\"longDay(cell.iso)\"\n >\n <button\n type=\"button\"\n class=\"v-calendar-button v-calendar-month-day\"\n :class=\"{ 'v-calendar-today': cell.iso === today }\"\n tabindex=\"-1\"\n :aria-label=\"m.calendar.openDay(longDay(cell.iso))\"\n @click=\"emit('day-activate', cell.iso)\"\n >\n {{ dayNumber(cell.iso) }}\n </button>\n\n <VCalendarEvent\n v-for=\"chip in dayEventsOf(cell.iso).shown\"\n :key=\"chip.event.id\"\n class=\"v-calendar-month-chip\"\n :event=\"chip.event\"\n layout=\"chip\"\n :disabled=\"disabled\"\n :time-text=\"chip.timeText\"\n v-bind=\"cardState(chip.event.id)\"\n @click=\"onCardClick(chip.event)\"\n >\n <template v-if=\"$slots.event\" #default=\"slotProps\">\n <slot name=\"event\" v-bind=\"slotProps\" />\n </template>\n </VCalendarEvent>\n\n <button\n v-if=\"dayEventsOf(cell.iso).hidden > 0\"\n type=\"button\"\n class=\"v-calendar-button v-calendar-month-more\"\n tabindex=\"-1\"\n @click=\"emit('day-activate', cell.iso)\"\n >\n {{ m.calendar.moreEvents(dayEventsOf(cell.iso).hidden) }}\n </button>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n .v-calendar-month {\n display: flex;\n flex-direction: column;\n }\n\n .v-calendar-month-head,\n .v-calendar-month-week {\n display: grid;\n grid-template-columns: repeat(var(--calendar-columns), minmax(0, 1fr));\n }\n\n /* 4, the time grid's header layer: a dragged chip (3) and the edge strip (2) pass under the\n sticky names as the month scrolls, rather than over them. */\n .v-calendar-month-head {\n position: sticky;\n inset-block-start: 0;\n z-index: 4;\n background: var(--vectis-color-surface);\n border-block-end: 1px solid var(--vectis-color-border);\n }\n\n .v-calendar-month-weekday {\n padding-block: var(--vectis-space-2);\n text-align: center;\n }\n\n .v-calendar-month-grid {\n /* The edge strip is placed against this box. */\n position: relative;\n display: flex;\n /* The rows share what height there is, so a month fills the box it was given instead of\n leaving a band of nothing under the last week. The floor keeps a day readable when\n that box is short. */\n flex: 1;\n flex-direction: column;\n min-block-size: 0;\n }\n\n .v-calendar-month-week {\n flex: 1;\n min-block-size: var(--vectis-control-size-calendar-month-cell);\n }\n\n .v-calendar-month-cell {\n display: flex;\n flex-direction: column;\n gap: 2px;\n overflow: hidden;\n padding: var(--vectis-space-1);\n }\n\n /* The days of the neighbouring months are kept — the grid is a fixed six rows, so the\n page never jumps — but pushed back, since they are context rather than content. */\n .v-calendar-month-cell[data-adjacent] {\n background: var(--vectis-color-surface-sunken);\n color: var(--vectis-color-text-subtle);\n }\n\n .v-calendar-month-day {\n align-self: center;\n display: flex;\n align-items: center;\n justify-content: center;\n flex: none;\n inline-size: var(--vectis-control-height-sm);\n block-size: var(--vectis-control-height-sm);\n border-radius: var(--vectis-radius-pill);\n color: inherit;\n font-size: var(--vectis-text-body-md-size);\n }\n\n /* Disjoint from today rather than less specific: the two live in different sheets, where a\n tie would be settled by whichever one the consumer's bundler emitted last. */\n .v-calendar-month-day:hover:not(.v-calendar-today) {\n background: var(--vectis-color-surface-muted);\n }\n\n /*\n * A day in the month view is a summary, so a chip is capped at one lane however long the\n * event really is — an all-day bar and a two-hour meeting look the same here, and several\n * have to fit under the date.\n *\n * The height is SET AS A PROPERTY rather than as `block-size`. The chip rule in\n * VCalendarEvent's own sheet is (0,2,0) against this (0,1,0), so declaring the size\n * directly would lose — and matching its specificity would only hand the decision to\n * whichever sheet the consumer's bundler emitted last, which is the failure the library's\n * one-sheet-per-component rule exists to prevent.\n */\n .v-calendar-month-chip {\n --calendar-chip-height: var(--vectis-control-size-calendar-allday-lane);\n\n flex: none;\n }\n\n .v-calendar-month-more {\n flex: none;\n padding-inline: var(--vectis-space-1);\n color: var(--vectis-color-text-muted);\n font-size: var(--vectis-text-caption-size);\n text-align: start;\n }\n\n .v-calendar-month-more:hover {\n color: var(--vectis-color-text);\n text-decoration: underline;\n }\n}\n</style>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"VCalendarMonth.js","names":[],"sources":["../../../src/components/VCalendar/VCalendarMonth.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"E extends CalendarEvent\">\n// @a11y @keyboard @core\n/**\n * The month view: the weeks stacked one under another, each day a square holding as many of\n * its events as will fit.\n *\n * It is internal to VCalendar and has no story of its own — its documentation lives with\n * the component that renders it. Like the time grid it computes nothing about dates: it is\n * handed the weeks already cut and filtered, and turns them into boxes.\n *\n * A day here is not a column of hours but a SUMMARY, so the events are drawn as chips in\n * the order the day would be read out — the all-day ones first, then the rest by when they\n * start — and a day with more than it can show says how many are left rather than silently\n * dropping them.\n *\n * The drag and the keyboard grab are `gesture.ts`'s. What stays here is what a square means:\n * the point under the pointer turned into a day, and a vertical step read as a whole week.\n */\nimport { computed, ref, useId } from 'vue'\n\nimport { formatDateDisplay } from '../../utils/date'\nimport { clamp } from '../../utils/number'\nimport { formatTimeDisplay } from '../../utils/time'\n\nimport { useMessages } from '../../i18n/state'\n\nimport VCalendarEvent from './VCalendarEvent.vue'\nimport { gridGeometryOf, useCalendarGesture, type GestureBase, type GrabStep } from './gesture'\nimport { calendarIntent } from './keyboard'\nimport {\n eventsByDay,\n isAllDayEvent,\n moveEventToDay,\n pointToMonthCell,\n sameTimes,\n timesOf,\n type MonthCell,\n} from './layout'\nimport type {\n ActivatedCell,\n CalendarEvent,\n CalendarEventId,\n CalendarEventSlotProps,\n CalendarEventTimes,\n CalendarFormat,\n} from './types'\n\nexport interface CalendarMonthProps<T> {\n /** The weeks, already padded to a fixed height and filtered to the visible weekdays. */\n weeks: MonthCell[][]\n events: T[]\n locale: string\n format: CalendarFormat\n today: string | null\n /** How many events a day shows before it starts counting the rest. */\n monthEventLimit: number\n /** Whether events can be moved from one day to another. */\n editable: boolean\n /** Whether the whole calendar is frozen, which also takes its cards out of the tab order. */\n disabled: boolean\n /** The node telling a reader how a chip can be moved, shared by every one of them. */\n hintId: string\n /** How long a drag rests against an edge before the month turns. Zero turns paging off. */\n edgeStepDelay: number\n label: string\n}\n\nconst props = defineProps<CalendarMonthProps<E>>()\n\nconst emit = defineEmits<{\n /** A day was asked to be opened on its own. */\n 'day-activate': [iso: string]\n /** An empty part of a day was activated. A month has no hours, so the time is left to the calendar. */\n 'cell-activate': [cell: ActivatedCell]\n 'event-activate': [event: E]\n /** An event was dropped on another day. A month has no hours, so it is only ever a move. */\n 'event-drop': [id: CalendarEventId, times: CalendarEventTimes, kind: 'move']\n /** Something happened that a reader who cannot see the grid needs told. */\n announce: [message: string]\n step: [delta: -1 | 1]\n}>()\n\n/** Which day holds the tab stop. Only the date matters here; the hour is the grid's affair. */\nconst focused = defineModel<string>('focused', { required: true })\n\ndefineSlots<{\n event?(props: CalendarEventSlotProps<E>): unknown\n}>()\n\nconst m = useMessages()\nconst uid = useId()\n\nconst cellId = (iso: string) => `${uid}-m-${iso}`\n\n/** The flattened list of days: what the arrows travel along, and what the events are filed by. */\nconst flat = computed(() => props.weeks.flat().map((cell) => cell.iso))\nconst columnCount = computed(() => props.weeks[0]?.length ?? 1)\n\n/** The column headings, taken from the first week so they always match the columns drawn. */\nconst weekdayNames = computed(() =>\n (props.weeks[0] ?? []).map((cell) =>\n formatDateDisplay(cell.iso, props.locale, { weekday: 'short' }),\n ),\n)\n\n/*\n * The two labels every square carries, worked out once per cell rather than once per USE.\n *\n * `longDay` is asked for twice in the template — the square's own `aria-label`, then the\n * name of the button that opens the day — so the 42 cells cost 126 `Intl` formats a render,\n * and a drag re-renders the whole grid each time it carries a chip onto another day. The map\n * depends on the weeks and the locale alone, so it survives every frame of a drag.\n */\nconst dayLabels = computed(() => {\n const map = new Map<string, { number: string; long: string }>()\n for (const iso of flat.value) {\n map.set(iso, {\n number: formatDateDisplay(iso, props.locale, { day: 'numeric' }),\n long: formatDateDisplay(iso, props.locale, {\n weekday: 'long',\n day: 'numeric',\n month: 'long',\n }),\n })\n }\n return map\n})\n\nconst dayNumber = (iso: string) => dayLabels.value.get(iso)?.number ?? ''\n\n/*\n * A day outside the grid can reach this — the announcement after a move names the day the\n * event landed on, which may be the next month — so it falls back to formatting rather than\n * assuming the map holds it.\n */\nconst longDay = (iso: string) =>\n dayLabels.value.get(iso)?.long ??\n formatDateDisplay(iso, props.locale, { weekday: 'long', day: 'numeric', month: 'long' })\n\n/**\n * A chip being carried from one day to another, by pointer or by keyboard.\n *\n * A month has no hours, so there is one kind and no resize: only which day an event starts\n * on moves, and its length in days and its times come along untouched.\n */\ninterface Gesture extends GestureBase {\n /** Which square the pointer took hold in, so a long bar does not jump under it. */\n grabIndex: number\n}\n\nconst gridEl = ref<HTMLElement | null>(null)\n/** The view's own box, which a drag is measured against to know whether it has left it. */\nconst rootEl = ref<HTMLElement | null>(null)\n\nconst {\n gesture,\n withPreview,\n edgeCue,\n isRtl,\n start,\n endLastGesture,\n consumeDrag,\n onPointermove,\n onPointerup,\n onPointercancel,\n onPointerleave,\n onFocusout,\n onCardKeydown,\n focusCell,\n idOfCard,\n cardState,\n} = useCalendarGesture<E, Gesture>({\n events: () => props.events,\n // The finished gesture and the weeks it was measured against are not kept past it.\n onRelease: () => {\n lastApplied = null\n },\n eventOf: (id): E | undefined => eventsById.value.get(id),\n // Measured against the ROOT and not against `gridEl`, whose rect leaves out the row of\n // weekday names above it.\n rootEl,\n // Captured on the GRID rather than on the chip, because a chip is redrawn on another day the\n // moment the drag starts and a captured element that moves takes the pointer with it.\n captureEl: gridEl,\n measureEl: gridEl,\n columns: () => columnCount.value,\n editable: () => props.editable,\n hintId: () => props.hintId,\n // The step is irrelevant to a month, which has no hours: 1 keeps the table honest without\n // asking the calendar for a number this view never uses.\n slotMinutes: () => 1,\n edgeStepDelay: () => props.edgeStepDelay,\n layout: () => props.weeks,\n applyPoint,\n onDrop: (state) => emit('event-drop', state.id, state.preview, 'move'),\n grab: (item) =>\n props.editable\n ? {\n id: item.id,\n origin: timesOf(item),\n pointerId: null,\n originX: 0,\n originY: 0,\n // There is no pointer to remember; the arrows work off the preview, not a position.\n grabIndex: 0,\n }\n : null,\n onGrabStep,\n step: (delta) => emit('step', delta),\n announce: (message) => emit('announce', message),\n})\n\n/**\n * The events as the month should currently DRAW them — the model, with the one being carried\n * put wherever it now is. Running the preview through the same grouping as everything else is\n * what makes the day it leaves and the day it arrives at both redraw with no special case.\n *\n * Nothing has to be held out of a layout for the echo, unlike the time grid: a month cell\n * simply stacks its chips, so the echo takes its own line in the day it came from and disturbs\n * nothing.\n */\nconst drawnEvents = computed<E[]>(() => (gesture.value ? withPreview(props.events) : props.events))\n\n/** Every day's events, worked out once rather than once per chip. */\nconst byDay = computed(() => eventsByDay(drawnEvents.value, flat.value))\n\nconst eventsById = computed(\n () => new Map<CalendarEventId, E>(drawnEvents.value.map((item) => [item.id, item])),\n)\n\n/**\n * A chip says when it happens only when that is not obvious: an all-day event has no time\n * to give, and the day it sits in already says which day it is.\n *\n * Memoized by start time inside the computed, so a change of locale or hour format throws the\n * cache away whole — the twin in VCalendarTimeGrid.vue carries the trap that makes reading\n * the computed, and not a cache beside it, the only correct shape.\n */\nconst timeTextOf = computed(() => {\n const { locale, format } = props\n const cache = new Map<string, string>()\n return (event: E): string => {\n if (isAllDayEvent(event)) return ''\n let text = cache.get(event.startTime)\n if (text === undefined) {\n text = formatTimeDisplay(event.startTime, locale, format)\n cache.set(event.startTime, text)\n }\n return text\n }\n})\n\n/** One chip as the template draws it, its time already written out. */\ninterface Chip {\n event: E\n timeText: string\n}\n\n/**\n * What each square draws, and how many it had to leave out — one Map, built in a single pass.\n *\n * It is the `dayLabels` treatment. Written as template functions these returned a NEW array\n * per square per render, and since one of them is the source of a `v-for`, Vue rediffed all\n * 42 lists each time; each chip also formatted its own time. The map is rebuilt with `byDay`,\n * which a drag changes only when it carries its chip onto another day (`applyPoint` writes\n * nothing otherwise), and survives every other render.\n */\nconst dayEvents = computed(() => {\n const map = new Map<string, { shown: Chip[]; hidden: number }>()\n const textOf = timeTextOf.value\n // Below zero, a limit would count hidden events on every empty square.\n const limit = Math.max(0, props.monthEventLimit)\n for (const [iso, all] of byDay.value) {\n const shown = all.length > limit ? all.slice(0, limit) : all\n map.set(iso, {\n shown: shown.map((event) => ({ event, timeText: textOf(event) })),\n hidden: Math.max(0, all.length - limit),\n })\n }\n return map\n})\n\n/** A square with nothing on it, shared rather than allocated per empty cell. */\nconst NO_EVENTS: { shown: Chip[]; hidden: number } = Object.freeze({ shown: [], hidden: 0 })\nconst dayEventsOf = (iso: string) => dayEvents.value.get(iso) ?? NO_EVENTS\n\nfunction moveFocusTo(iso: string) {\n focused.value = iso\n // @a11y — the model decides which cell is tabbable, so the focus can only follow once the\n // render that applied it has run.\n focusCell(cellId(iso), true)\n}\n\nconst tabbable = computed(() =>\n flat.value.includes(focused.value) ? focused.value : (flat.value[0] ?? null),\n)\n\n/**\n * The same table serves both views, so its two axes are read differently here: a sideways step\n * is one day, and a vertical one is a whole week rather than an hour. That is the only place the\n * month reinterprets it, and it is why the table returns a direction rather than a date.\n */\nconst dayStep = (days: number, minutes: number) =>\n days !== 0 ? days : Math.sign(minutes) * columnCount.value\n\nfunction onKeydown(event: KeyboardEvent) {\n const target = event.target as HTMLElement | null\n\n // A chip answers its own table, delegated here on the same element as the pointer so the\n // two input paths cannot drift apart.\n const card = target?.closest<HTMLElement>('.v-calendar-event')\n if (card) {\n onCardKeydown(event, card)\n return\n }\n\n const cell = target?.closest<HTMLElement>('.v-calendar-month-cell')\n if (!cell) return\n\n const intent = calendarIntent(event, 'cell', 1, isRtl())\n if (!intent) return\n\n const iso = cell.dataset.iso!\n const index = flat.value.indexOf(iso)\n const columns = columnCount.value\n\n if (intent.kind === 'moveFocus') {\n const next =\n flat.value[clamp(index + dayStep(intent.days, intent.minutes), 0, flat.value.length - 1)]\n if (!next) return\n event.preventDefault()\n moveFocusTo(next)\n return\n }\n\n if (intent.kind === 'rowEdge') {\n const row = Math.floor(index / columns)\n const edge = intent.edge === 'start' ? row * columns : row * columns + columns - 1\n const next = flat.value[clamp(edge, 0, flat.value.length - 1)]\n if (!next) return\n event.preventDefault()\n moveFocusTo(next)\n return\n }\n\n if (intent.kind === 'period') {\n event.preventDefault()\n emit('step', intent.delta)\n return\n }\n\n if (intent.kind === 'openDay') {\n event.preventDefault()\n emit('day-activate', iso)\n return\n }\n\n if (intent.kind === 'activate') {\n event.preventDefault()\n emit('cell-activate', { date: iso, minutes: null })\n }\n}\n\n/** Which of the flattened squares a point falls on. */\nfunction indexAt(x: number, y: number, rect: DOMRect, rtl: boolean): number {\n const cell = pointToMonthCell(\n { x, y },\n { ...gridGeometryOf(rect, columnCount.value, rtl), rows: props.weeks.length || 1 },\n rtl,\n )\n return cell.rowIndex * columnCount.value + cell.columnIndex\n}\n\nfunction onGridPointerdown(event: PointerEvent) {\n endLastGesture()\n if (gesture.value || !props.editable || event.button !== 0) return\n\n const card = (event.target as HTMLElement | null)?.closest<HTMLElement>('.v-calendar-event')\n const item = card ? eventsById.value.get(idOfCard(card)) : undefined\n const rect = gridEl.value?.getBoundingClientRect()\n if (!item || !rect) return\n const rtl = isRtl()\n\n start(\n {\n id: item.id,\n origin: timesOf(item),\n pointerId: event.pointerId,\n originX: event.clientX,\n originY: event.clientY,\n grabIndex: indexAt(event.clientX, event.clientY, rect, rtl),\n },\n rtl,\n )\n}\n\n/**\n * Works out which day the chip now belongs to, from wherever the pointer last was.\n *\n * Separate from the handler because the month turning calls it too: the squares change under\n * a hand that has not moved, and the chip has to be placed against the new ones.\n */\nfunction applyPoint(state: Gesture, rect: DOMRect) {\n const index = indexAt(state.lastX, state.lastY, rect, state.rtl)\n const last = lastApplied\n if (last?.state === state && last.weeks === props.weeks && last.index === index) return\n lastApplied = { state, weeks: props.weeks, index }\n\n /*\n * The target is the event's START shifted by however many squares the pointer has crossed,\n * not the square it is over — so a bar grabbed by its third day keeps its third day under\n * the finger. The days come out of the flattened grid, which is already filtered to the\n * weekdays on show, so a hidden weekend is not counted.\n */\n const days = flat.value\n const from = days.indexOf(state.origin.start)\n const target =\n days[\n clamp((from === -1 ? state.grabIndex : from) + index - state.grabIndex, 0, days.length - 1)\n ]\n if (!target) return\n /*\n * TRAP — written only when the day changes. The gesture is a deep ref, so an equal but new\n * preview would still re-bucket and re-sort every event and re-render all 42 squares.\n */\n const next = moveEventToDay(state.origin, target)\n if (!sameTimes(state.preview, next)) state.preview = next\n}\n\n/**\n * The square `applyPoint` last placed the chip from, so the many `pointermove`s that fire\n * inside one square return before any date arithmetic. The weeks belong to what the index\n * MEANS: the month turning under a still pointer reads as a new square at the same index.\n * A plain variable, since nothing renders it; the gesture's identity says a new press began.\n */\nlet lastApplied: { state: Gesture; weeks: MonthCell[][]; index: number } | null = null\n\n/** One arrow press on a chip held by the keyboard: a day sideways, a week vertically. */\nfunction onGrabStep(state: Gesture, step: GrabStep, item: E): boolean {\n // A month has no hours to stretch, so Shift with an arrow is simply not a gesture here.\n if (step.kind !== 'grabMove') return false\n const days = flat.value\n const from = days.indexOf(state.preview.start)\n const target = days[clamp(from + dayStep(step.days, step.minutes), 0, days.length - 1)]\n // Held against the grid's edge, the press goes nowhere: nothing to announce or to drop.\n if (!target || target === state.preview.start) return false\n state.preview = moveEventToDay(state.preview, target)\n emit('announce', m.value.calendar.movedTo(item.title, longDay(state.preview.start)))\n return true\n}\n\nfunction onCardClick(item: E) {\n // `pointerup` fires before `click`, so letting go at the end of a drag would ALSO open the\n // event — the consumer's editor over every chip the reader had just moved.\n if (consumeDrag()) return\n emit('event-activate', item)\n}\n\n/**\n * A click on the empty part of a day: the pointer's side of the Enter that activates a cell,\n * so a square drawn with a pointer cursor answers a click as it answers the key.\n *\n * The chips and the two buttons a square holds answer their own clicks, so a click that came\n * from one of them is theirs alone. And a click ending a drag is swallowed like the one a chip\n * would have received: the drop has already said what the gesture meant.\n */\nfunction onGridClick(event: MouseEvent) {\n const target = event.target as HTMLElement | null\n if (target?.closest('.v-calendar-event, button')) return\n const cell = target?.closest<HTMLElement>('.v-calendar-month-cell')\n if (!cell || consumeDrag()) return\n emit('cell-activate', { date: cell.dataset.iso!, minutes: null })\n}\n\n// The same two members VCalendarTimeGrid exposes, so VCalendar drives either view without\n// asking which is on screen. A month has no hours, hence the empty `scrollToMinutes`.\ndefineExpose({\n /** Brings the focus onto the day the grid is currently pointing at. */\n focus: (options?: FocusOptions) => {\n if (tabbable.value) focusCell(cellId(tabbable.value), false, options)\n },\n /** Nothing to scroll to in a month view. */\n scrollToMinutes: () => {},\n})\n</script>\n\n<template>\n <div\n ref=\"rootEl\"\n class=\"v-calendar-month\"\n :data-outside=\"gesture?.outside ? '' : undefined\"\n :style=\"{ '--calendar-columns': String(weekdayNames.length) }\"\n @focusout=\"onFocusout\"\n >\n <div class=\"v-calendar-month-head\" aria-hidden=\"true\">\n <span\n v-for=\"(name, index) in weekdayNames\"\n :key=\"index\"\n class=\"v-calendar-weekday v-calendar-month-weekday\"\n >\n {{ name }}\n </span>\n </div>\n\n <div\n ref=\"gridEl\"\n class=\"v-calendar-month-grid v-calendar-edge-cue\"\n role=\"grid\"\n :aria-label=\"label\"\n :data-edge=\"edgeCue\"\n @keydown=\"onKeydown\"\n @pointerdown=\"onGridPointerdown\"\n @pointermove=\"onPointermove\"\n @pointerup=\"onPointerup\"\n @pointercancel=\"onPointercancel\"\n @pointerleave=\"onPointerleave\"\n @click=\"onGridClick\"\n >\n <div\n v-for=\"(week, row) in weeks\"\n :key=\"week[0]?.iso ?? row\"\n role=\"row\"\n class=\"v-calendar-month-week\"\n >\n <div\n v-for=\"cell in week\"\n :id=\"cellId(cell.iso)\"\n :key=\"cell.iso\"\n role=\"gridcell\"\n class=\"v-calendar-cell v-calendar-month-cell\"\n :data-iso=\"cell.iso\"\n :data-adjacent=\"cell.adjacent ?? undefined\"\n :tabindex=\"tabbable === cell.iso ? 0 : -1\"\n :aria-label=\"longDay(cell.iso)\"\n aria-keyshortcuts=\"Shift+Enter\"\n >\n <button\n type=\"button\"\n class=\"v-calendar-button v-calendar-month-day\"\n :class=\"{ 'v-calendar-today': cell.iso === today }\"\n tabindex=\"-1\"\n :aria-label=\"m.calendar.openDay(longDay(cell.iso))\"\n @click=\"emit('day-activate', cell.iso)\"\n >\n {{ dayNumber(cell.iso) }}\n </button>\n\n <VCalendarEvent\n v-for=\"chip in dayEventsOf(cell.iso).shown\"\n :key=\"chip.event.id\"\n class=\"v-calendar-month-chip\"\n :event=\"chip.event\"\n layout=\"chip\"\n :disabled=\"disabled\"\n :time-text=\"chip.timeText\"\n v-bind=\"cardState(chip.event.id)\"\n @click=\"onCardClick(chip.event)\"\n >\n <template v-if=\"$slots.event\" #default=\"slotProps\">\n <slot name=\"event\" v-bind=\"slotProps\" />\n </template>\n </VCalendarEvent>\n\n <button\n v-if=\"dayEventsOf(cell.iso).hidden > 0\"\n type=\"button\"\n class=\"v-calendar-button v-calendar-month-more\"\n tabindex=\"-1\"\n @click=\"emit('day-activate', cell.iso)\"\n >\n {{ m.calendar.moreEvents(dayEventsOf(cell.iso).hidden) }}\n </button>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n .v-calendar-month {\n display: flex;\n flex-direction: column;\n }\n\n .v-calendar-month-head,\n .v-calendar-month-week {\n display: grid;\n grid-template-columns: repeat(var(--calendar-columns), minmax(0, 1fr));\n }\n\n /* 4, the time grid's header layer: a dragged chip (3) and the edge strip (2) pass under the\n sticky names as the month scrolls, rather than over them. */\n .v-calendar-month-head {\n position: sticky;\n inset-block-start: 0;\n z-index: 4;\n background: var(--vectis-color-surface);\n border-block-end: 1px solid var(--vectis-color-border);\n }\n\n .v-calendar-month-weekday {\n padding-block: var(--vectis-space-2);\n text-align: center;\n }\n\n .v-calendar-month-grid {\n /* The edge strip is placed against this box. */\n position: relative;\n display: flex;\n /* The rows share what height there is, so a month fills the box it was given instead of\n leaving a band of nothing under the last week. The floor keeps a day readable when\n that box is short. */\n flex: 1;\n flex-direction: column;\n min-block-size: 0;\n }\n\n .v-calendar-month-week {\n flex: 1;\n min-block-size: var(--vectis-control-size-calendar-month-cell);\n }\n\n .v-calendar-month-cell {\n display: flex;\n flex-direction: column;\n gap: var(--vectis-control-size-calendar-gap);\n overflow: hidden;\n padding: var(--vectis-space-1);\n }\n\n /* The days of the neighbouring months are kept — the grid is a fixed six rows, so the\n page never jumps — but pushed back, since they are context rather than content. */\n .v-calendar-month-cell[data-adjacent] {\n background: var(--vectis-color-surface-sunken);\n color: var(--vectis-color-text-subtle);\n }\n\n .v-calendar-month-day {\n align-self: center;\n display: flex;\n align-items: center;\n justify-content: center;\n flex: none;\n inline-size: var(--vectis-control-height-sm);\n block-size: var(--vectis-control-height-sm);\n border-radius: var(--vectis-radius-pill);\n color: inherit;\n font-size: var(--vectis-text-body-md-size);\n }\n\n /* Disjoint from today rather than less specific: the two live in different sheets, where a\n tie would be settled by whichever one the consumer's bundler emitted last. */\n .v-calendar-month-day:hover:not(.v-calendar-today) {\n background: var(--vectis-color-surface-muted);\n }\n\n /*\n * A day in the month view is a summary, so a chip is capped at one lane however long the\n * event really is — an all-day bar and a two-hour meeting look the same here, and several\n * have to fit under the date.\n *\n * The height is SET AS A PROPERTY rather than as `block-size`. The chip rule in\n * VCalendarEvent's own sheet is (0,2,0) against this (0,1,0), so declaring the size\n * directly would lose — and matching its specificity would only hand the decision to\n * whichever sheet the consumer's bundler emitted last, which is the failure the library's\n * one-sheet-per-component rule exists to prevent.\n */\n .v-calendar-month-chip {\n --calendar-chip-height: var(--vectis-control-size-calendar-allday-lane);\n\n flex: none;\n }\n\n .v-calendar-month-more {\n flex: none;\n padding-inline: var(--vectis-space-1);\n color: var(--vectis-color-text-muted);\n font-size: var(--vectis-text-caption-size);\n text-align: start;\n }\n\n .v-calendar-month-more:hover {\n color: var(--vectis-color-text);\n text-decoration: underline;\n }\n\n /* The neighbouring months' days are told apart by a tint forced colors removes: grey text\n keeps them apart. */\n @media (forced-colors: active) {\n .v-calendar-month-cell[data-adjacent] {\n forced-color-adjust: none;\n background: Canvas;\n color: GrayText;\n }\n }\n}\n</style>\n"],"mappings":""}
|
|
@@ -6,18 +6,18 @@ import i from "./VCalendarEvent.js";
|
|
|
6
6
|
import { eventsByDay as a, isAllDayEvent as o, moveEventToDay as s, pointToMonthCell as c, sameTimes as ee, timesOf as l } from "./layout.js";
|
|
7
7
|
import { calendarIntent as te } from "./keyboard.js";
|
|
8
8
|
import { gridGeometryOf as ne, useCalendarGesture as re } from "./gesture.js";
|
|
9
|
-
import { Fragment as u, computed as d, createBlock as ie, createCommentVNode as ae, createElementBlock as f, createElementVNode as p, createSlots as oe, defineComponent as m, mergeModels as h, mergeProps as g, normalizeClass as se, normalizeStyle as _, openBlock as v, ref as y, renderList as b, renderSlot as
|
|
9
|
+
import { Fragment as u, computed as d, createBlock as ie, createCommentVNode as ae, createElementBlock as f, createElementVNode as p, createSlots as oe, defineComponent as m, mergeModels as h, mergeProps as g, normalizeClass as se, normalizeStyle as _, openBlock as v, ref as y, renderList as b, renderSlot as ce, toDisplayString as x, unref as S, useId as le, useModel as ue, withCtx as de } from "vue";
|
|
10
10
|
//#region src/components/VCalendar/VCalendarMonth.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
-
var
|
|
11
|
+
var fe = ["data-outside"], pe = {
|
|
12
12
|
class: "v-calendar-month-head",
|
|
13
13
|
"aria-hidden": "true"
|
|
14
|
-
},
|
|
14
|
+
}, me = ["aria-label", "data-edge"], he = [
|
|
15
15
|
"id",
|
|
16
16
|
"data-iso",
|
|
17
17
|
"data-adjacent",
|
|
18
18
|
"tabindex",
|
|
19
19
|
"aria-label"
|
|
20
|
-
],
|
|
20
|
+
], ge = ["aria-label", "onClick"], _e = ["onClick"], C = /*@__PURE__*/ m({
|
|
21
21
|
__name: "VCalendarMonth",
|
|
22
22
|
props: /*@__PURE__*/ h({
|
|
23
23
|
weeks: {},
|
|
@@ -43,37 +43,40 @@ var de = ["data-outside"], fe = {
|
|
|
43
43
|
"announce",
|
|
44
44
|
"step"
|
|
45
45
|
], ["update:focused"]),
|
|
46
|
-
setup(m, { expose: h, emit:
|
|
47
|
-
let
|
|
46
|
+
setup(m, { expose: h, emit: C }) {
|
|
47
|
+
let w = m, T = C, E = ue(m, "focused"), D = e(), ve = le(), O = (e) => `${ve}-m-${e}`, k = d(() => w.weeks.flat().map((e) => e.iso)), A = d(() => w.weeks[0]?.length ?? 1), j = d(() => (w.weeks[0] ?? []).map((e) => n(e.iso, w.locale, { weekday: "short" }))), M = d(() => {
|
|
48
48
|
let e = /* @__PURE__ */ new Map();
|
|
49
|
-
for (let t of
|
|
50
|
-
number: n(t,
|
|
51
|
-
long: n(t,
|
|
49
|
+
for (let t of k.value) e.set(t, {
|
|
50
|
+
number: n(t, w.locale, { day: "numeric" }),
|
|
51
|
+
long: n(t, w.locale, {
|
|
52
52
|
weekday: "long",
|
|
53
53
|
day: "numeric",
|
|
54
54
|
month: "long"
|
|
55
55
|
})
|
|
56
56
|
});
|
|
57
57
|
return e;
|
|
58
|
-
}),
|
|
58
|
+
}), ye = (e) => M.value.get(e)?.number ?? "", N = (e) => M.value.get(e)?.long ?? n(e, w.locale, {
|
|
59
59
|
weekday: "long",
|
|
60
60
|
day: "numeric",
|
|
61
61
|
month: "long"
|
|
62
|
-
}),
|
|
63
|
-
events: () =>
|
|
62
|
+
}), P = y(null), F = y(null), { gesture: I, withPreview: be, edgeCue: xe, isRtl: L, start: Se, endLastGesture: Ce, consumeDrag: R, onPointermove: z, onPointerup: B, onPointercancel: V, onPointerleave: H, onFocusout: U, onCardKeydown: W, focusCell: G, idOfCard: we, cardState: Te } = re({
|
|
63
|
+
events: () => w.events,
|
|
64
|
+
onRelease: () => {
|
|
65
|
+
$ = null;
|
|
66
|
+
},
|
|
64
67
|
eventOf: (e) => q.value.get(e),
|
|
65
|
-
rootEl:
|
|
66
|
-
captureEl:
|
|
67
|
-
measureEl:
|
|
68
|
-
columns: () =>
|
|
69
|
-
editable: () =>
|
|
70
|
-
hintId: () =>
|
|
68
|
+
rootEl: F,
|
|
69
|
+
captureEl: P,
|
|
70
|
+
measureEl: P,
|
|
71
|
+
columns: () => A.value,
|
|
72
|
+
editable: () => w.editable,
|
|
73
|
+
hintId: () => w.hintId,
|
|
71
74
|
slotMinutes: () => 1,
|
|
72
|
-
edgeStepDelay: () =>
|
|
73
|
-
layout: () =>
|
|
74
|
-
applyPoint:
|
|
75
|
-
onDrop: (e) =>
|
|
76
|
-
grab: (e) =>
|
|
75
|
+
edgeStepDelay: () => w.edgeStepDelay,
|
|
76
|
+
layout: () => w.weeks,
|
|
77
|
+
applyPoint: Me,
|
|
78
|
+
onDrop: (e) => T("event-drop", e.id, e.preview, "move"),
|
|
79
|
+
grab: (e) => w.editable ? {
|
|
77
80
|
id: e.id,
|
|
78
81
|
origin: l(e),
|
|
79
82
|
pointerId: null,
|
|
@@ -81,19 +84,19 @@ var de = ["data-outside"], fe = {
|
|
|
81
84
|
originY: 0,
|
|
82
85
|
grabIndex: 0
|
|
83
86
|
} : null,
|
|
84
|
-
onGrabStep:
|
|
85
|
-
step: (e) =>
|
|
86
|
-
announce: (e) =>
|
|
87
|
-
}), K = d(() =>
|
|
88
|
-
let { locale: e, format: t } =
|
|
87
|
+
onGrabStep: Ne,
|
|
88
|
+
step: (e) => T("step", e),
|
|
89
|
+
announce: (e) => T("announce", e)
|
|
90
|
+
}), K = d(() => I.value ? be(w.events) : w.events), Ee = d(() => a(K.value, k.value)), q = d(() => new Map(K.value.map((e) => [e.id, e]))), De = d(() => {
|
|
91
|
+
let { locale: e, format: t } = w, n = /* @__PURE__ */ new Map();
|
|
89
92
|
return (i) => {
|
|
90
93
|
if (o(i)) return "";
|
|
91
94
|
let a = n.get(i.startTime);
|
|
92
95
|
return a === void 0 && (a = r(i.startTime, e, t), n.set(i.startTime, a)), a;
|
|
93
96
|
};
|
|
94
|
-
}),
|
|
95
|
-
let e = /* @__PURE__ */ new Map(), t =
|
|
96
|
-
for (let [r, i] of
|
|
97
|
+
}), Oe = d(() => {
|
|
98
|
+
let e = /* @__PURE__ */ new Map(), t = De.value, n = Math.max(0, w.monthEventLimit);
|
|
99
|
+
for (let [r, i] of Ee.value) {
|
|
97
100
|
let a = i.length > n ? i.slice(0, n) : i;
|
|
98
101
|
e.set(r, {
|
|
99
102
|
shown: a.map((e) => ({
|
|
@@ -104,42 +107,46 @@ var de = ["data-outside"], fe = {
|
|
|
104
107
|
});
|
|
105
108
|
}
|
|
106
109
|
return e;
|
|
107
|
-
}),
|
|
110
|
+
}), ke = Object.freeze({
|
|
108
111
|
shown: [],
|
|
109
112
|
hidden: 0
|
|
110
|
-
}), J = (e) =>
|
|
113
|
+
}), J = (e) => Oe.value.get(e) ?? ke;
|
|
111
114
|
function Y(e) {
|
|
112
|
-
|
|
115
|
+
E.value = e, G(O(e), !0);
|
|
113
116
|
}
|
|
114
|
-
let X = d(() =>
|
|
115
|
-
function
|
|
117
|
+
let X = d(() => k.value.includes(E.value) ? E.value : k.value[0] ?? null), Z = (e, t) => e === 0 ? Math.sign(t) * A.value : e;
|
|
118
|
+
function Ae(e) {
|
|
116
119
|
let n = e.target, r = n?.closest(".v-calendar-event");
|
|
117
120
|
if (r) {
|
|
118
|
-
|
|
121
|
+
W(e, r);
|
|
119
122
|
return;
|
|
120
123
|
}
|
|
121
124
|
let i = n?.closest(".v-calendar-month-cell");
|
|
122
125
|
if (!i) return;
|
|
123
|
-
let a = te(e
|
|
126
|
+
let a = te(e, "cell", 1, L());
|
|
124
127
|
if (!a) return;
|
|
125
|
-
let o = i.dataset.iso, s =
|
|
128
|
+
let o = i.dataset.iso, s = k.value.indexOf(o), c = A.value;
|
|
126
129
|
if (a.kind === "moveFocus") {
|
|
127
|
-
let n =
|
|
130
|
+
let n = k.value[t(s + Z(a.days, a.minutes), 0, k.value.length - 1)];
|
|
128
131
|
if (!n) return;
|
|
129
132
|
e.preventDefault(), Y(n);
|
|
130
133
|
return;
|
|
131
134
|
}
|
|
132
135
|
if (a.kind === "rowEdge") {
|
|
133
|
-
let n = Math.floor(s / c), r = a.edge === "start" ? n * c : n * c + c - 1, i =
|
|
136
|
+
let n = Math.floor(s / c), r = a.edge === "start" ? n * c : n * c + c - 1, i = k.value[t(r, 0, k.value.length - 1)];
|
|
134
137
|
if (!i) return;
|
|
135
138
|
e.preventDefault(), Y(i);
|
|
136
139
|
return;
|
|
137
140
|
}
|
|
138
141
|
if (a.kind === "period") {
|
|
139
|
-
e.preventDefault(),
|
|
142
|
+
e.preventDefault(), T("step", a.delta);
|
|
140
143
|
return;
|
|
141
144
|
}
|
|
142
|
-
a.kind === "
|
|
145
|
+
if (a.kind === "openDay") {
|
|
146
|
+
e.preventDefault(), T("day-activate", o);
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
a.kind === "activate" && (e.preventDefault(), T("cell-activate", {
|
|
143
150
|
date: o,
|
|
144
151
|
minutes: null
|
|
145
152
|
}));
|
|
@@ -149,17 +156,17 @@ var de = ["data-outside"], fe = {
|
|
|
149
156
|
x: e,
|
|
150
157
|
y: t
|
|
151
158
|
}, {
|
|
152
|
-
...ne(n,
|
|
153
|
-
rows:
|
|
159
|
+
...ne(n, A.value, r),
|
|
160
|
+
rows: w.weeks.length || 1
|
|
154
161
|
}, r);
|
|
155
|
-
return i.rowIndex *
|
|
162
|
+
return i.rowIndex * A.value + i.columnIndex;
|
|
156
163
|
}
|
|
157
|
-
function
|
|
158
|
-
if (
|
|
159
|
-
let t = e.target?.closest(".v-calendar-event"), n = t ? q.value.get(
|
|
164
|
+
function je(e) {
|
|
165
|
+
if (Ce(), I.value || !w.editable || e.button !== 0) return;
|
|
166
|
+
let t = e.target?.closest(".v-calendar-event"), n = t ? q.value.get(we(t)) : void 0, r = P.value?.getBoundingClientRect();
|
|
160
167
|
if (!n || !r) return;
|
|
161
|
-
let i =
|
|
162
|
-
|
|
168
|
+
let i = L();
|
|
169
|
+
Se({
|
|
163
170
|
id: n.id,
|
|
164
171
|
origin: l(n),
|
|
165
172
|
pointerId: e.pointerId,
|
|
@@ -168,86 +175,88 @@ var de = ["data-outside"], fe = {
|
|
|
168
175
|
grabIndex: Q(e.clientX, e.clientY, r, i)
|
|
169
176
|
}, i);
|
|
170
177
|
}
|
|
171
|
-
function
|
|
178
|
+
function Me(e, n) {
|
|
172
179
|
let r = Q(e.lastX, e.lastY, n, e.rtl), i = $;
|
|
173
|
-
if (i?.state === e && i.weeks ===
|
|
180
|
+
if (i?.state === e && i.weeks === w.weeks && i.index === r) return;
|
|
174
181
|
$ = {
|
|
175
182
|
state: e,
|
|
176
|
-
weeks:
|
|
183
|
+
weeks: w.weeks,
|
|
177
184
|
index: r
|
|
178
185
|
};
|
|
179
|
-
let a =
|
|
186
|
+
let a = k.value, o = a.indexOf(e.origin.start), c = a[t((o === -1 ? e.grabIndex : o) + r - e.grabIndex, 0, a.length - 1)];
|
|
180
187
|
if (!c) return;
|
|
181
188
|
let l = s(e.origin, c);
|
|
182
189
|
ee(e.preview, l) || (e.preview = l);
|
|
183
190
|
}
|
|
184
191
|
let $ = null;
|
|
185
|
-
function
|
|
192
|
+
function Ne(e, n, r) {
|
|
186
193
|
if (n.kind !== "grabMove") return !1;
|
|
187
|
-
let i =
|
|
188
|
-
return a ? (e.preview = s(e.preview, a),
|
|
189
|
-
}
|
|
190
|
-
function Ne(e) {
|
|
191
|
-
B() || E("event-activate", e);
|
|
194
|
+
let i = k.value, a = i[t(i.indexOf(e.preview.start) + Z(n.days, n.minutes), 0, i.length - 1)];
|
|
195
|
+
return !a || a === e.preview.start ? !1 : (e.preview = s(e.preview, a), T("announce", D.value.calendar.movedTo(r.title, N(e.preview.start))), !0);
|
|
192
196
|
}
|
|
193
197
|
function Pe(e) {
|
|
198
|
+
R() || T("event-activate", e);
|
|
199
|
+
}
|
|
200
|
+
function Fe(e) {
|
|
194
201
|
let t = e.target;
|
|
195
202
|
if (t?.closest(".v-calendar-event, button")) return;
|
|
196
203
|
let n = t?.closest(".v-calendar-month-cell");
|
|
197
|
-
!n ||
|
|
204
|
+
!n || R() || T("cell-activate", {
|
|
198
205
|
date: n.dataset.iso,
|
|
199
206
|
minutes: null
|
|
200
207
|
});
|
|
201
208
|
}
|
|
202
209
|
return h({
|
|
203
|
-
focus: () => {
|
|
204
|
-
X.value && G(
|
|
210
|
+
focus: (e) => {
|
|
211
|
+
X.value && G(O(X.value), !1, e);
|
|
205
212
|
},
|
|
206
213
|
scrollToMinutes: () => {}
|
|
207
214
|
}), (e, t) => (v(), f("div", {
|
|
208
215
|
ref_key: "rootEl",
|
|
209
|
-
ref:
|
|
216
|
+
ref: F,
|
|
210
217
|
class: "v-calendar-month",
|
|
211
|
-
"data-outside":
|
|
212
|
-
style: _({ "--calendar-columns": String(
|
|
213
|
-
|
|
214
|
-
|
|
218
|
+
"data-outside": S(I)?.outside ? "" : void 0,
|
|
219
|
+
style: _({ "--calendar-columns": String(j.value.length) }),
|
|
220
|
+
onFocusout: t[4] ||= (...e) => S(U) && S(U)(...e)
|
|
221
|
+
}, [p("div", pe, [(v(!0), f(u, null, b(j.value, (e, t) => (v(), f("span", {
|
|
222
|
+
key: t,
|
|
215
223
|
class: "v-calendar-weekday v-calendar-month-weekday"
|
|
216
|
-
},
|
|
224
|
+
}, x(e), 1))), 128))]), p("div", {
|
|
217
225
|
ref_key: "gridEl",
|
|
218
|
-
ref:
|
|
226
|
+
ref: P,
|
|
219
227
|
class: "v-calendar-month-grid v-calendar-edge-cue",
|
|
220
228
|
role: "grid",
|
|
221
229
|
"aria-label": m.label,
|
|
222
|
-
"data-edge":
|
|
223
|
-
onKeydown:
|
|
224
|
-
onPointerdown:
|
|
225
|
-
onPointermove: t[0] ||= (...e) =>
|
|
226
|
-
onPointerup: t[1] ||= (...e) =>
|
|
227
|
-
onPointercancel: t[2] ||= (...e) =>
|
|
228
|
-
onPointerleave: t[3] ||= (...e) =>
|
|
229
|
-
onClick:
|
|
230
|
+
"data-edge": S(xe),
|
|
231
|
+
onKeydown: Ae,
|
|
232
|
+
onPointerdown: je,
|
|
233
|
+
onPointermove: t[0] ||= (...e) => S(z) && S(z)(...e),
|
|
234
|
+
onPointerup: t[1] ||= (...e) => S(B) && S(B)(...e),
|
|
235
|
+
onPointercancel: t[2] ||= (...e) => S(V) && S(V)(...e),
|
|
236
|
+
onPointerleave: t[3] ||= (...e) => S(H) && S(H)(...e),
|
|
237
|
+
onClick: Fe
|
|
230
238
|
}, [(v(!0), f(u, null, b(m.weeks, (t, n) => (v(), f("div", {
|
|
231
239
|
key: t[0]?.iso ?? n,
|
|
232
240
|
role: "row",
|
|
233
241
|
class: "v-calendar-month-week"
|
|
234
242
|
}, [(v(!0), f(u, null, b(t, (t) => (v(), f("div", {
|
|
235
|
-
id:
|
|
243
|
+
id: O(t.iso),
|
|
236
244
|
key: t.iso,
|
|
237
245
|
role: "gridcell",
|
|
238
246
|
class: "v-calendar-cell v-calendar-month-cell",
|
|
239
247
|
"data-iso": t.iso,
|
|
240
248
|
"data-adjacent": t.adjacent ?? void 0,
|
|
241
249
|
tabindex: X.value === t.iso ? 0 : -1,
|
|
242
|
-
"aria-label":
|
|
250
|
+
"aria-label": N(t.iso),
|
|
251
|
+
"aria-keyshortcuts": "Shift+Enter"
|
|
243
252
|
}, [
|
|
244
253
|
p("button", {
|
|
245
254
|
type: "button",
|
|
246
255
|
class: se(["v-calendar-button v-calendar-month-day", { "v-calendar-today": t.iso === m.today }]),
|
|
247
256
|
tabindex: "-1",
|
|
248
|
-
"aria-label":
|
|
249
|
-
onClick: (e) =>
|
|
250
|
-
},
|
|
257
|
+
"aria-label": S(D).calendar.openDay(N(t.iso)),
|
|
258
|
+
onClick: (e) => T("day-activate", t.iso)
|
|
259
|
+
}, x(ye(t.iso)), 11, ge),
|
|
251
260
|
(v(!0), f(u, null, b(J(t.iso).shown, (t) => (v(), ie(i, g({
|
|
252
261
|
key: t.event.id,
|
|
253
262
|
class: "v-calendar-month-chip",
|
|
@@ -255,9 +264,9 @@ var de = ["data-outside"], fe = {
|
|
|
255
264
|
layout: "chip",
|
|
256
265
|
disabled: m.disabled,
|
|
257
266
|
"time-text": t.timeText
|
|
258
|
-
}, { ref_for: !0 },
|
|
267
|
+
}, { ref_for: !0 }, S(Te)(t.event.id), { onClick: (e) => Pe(t.event) }), oe({ _: 2 }, [e.$slots.event ? {
|
|
259
268
|
name: "default",
|
|
260
|
-
fn:
|
|
269
|
+
fn: de((t) => [ce(e.$slots, "event", g({ ref_for: !0 }, t))]),
|
|
261
270
|
key: "0"
|
|
262
271
|
} : void 0]), 1040, [
|
|
263
272
|
"event",
|
|
@@ -270,12 +279,12 @@ var de = ["data-outside"], fe = {
|
|
|
270
279
|
type: "button",
|
|
271
280
|
class: "v-calendar-button v-calendar-month-more",
|
|
272
281
|
tabindex: "-1",
|
|
273
|
-
onClick: (e) =>
|
|
274
|
-
}, S(
|
|
275
|
-
], 8,
|
|
282
|
+
onClick: (e) => T("day-activate", t.iso)
|
|
283
|
+
}, x(S(D).calendar.moreEvents(J(t.iso).hidden)), 9, _e)) : ae("", !0)
|
|
284
|
+
], 8, he))), 128))]))), 128))], 40, me)], 44, fe));
|
|
276
285
|
}
|
|
277
286
|
});
|
|
278
287
|
//#endregion
|
|
279
|
-
export {
|
|
288
|
+
export { C as default };
|
|
280
289
|
|
|
281
290
|
//# sourceMappingURL=VCalendarMonth.vue_vue_type_script_setup_true_lang.js.map
|