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
package/dist/utils/time.js
CHANGED
|
@@ -1,44 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { memo as
|
|
1
|
+
import { pad2 as e } from "./text.js";
|
|
2
|
+
import { memo as t } from "./memo.js";
|
|
3
3
|
//#region src/utils/time.ts
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
return typeof e == "string" &&
|
|
4
|
+
var n = /^([01]\d|2[0-3]):([0-5]\d)$/;
|
|
5
|
+
function r(e) {
|
|
6
|
+
return typeof e == "string" && n.test(e);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
if (!
|
|
8
|
+
function i(e) {
|
|
9
|
+
if (!r(e)) return null;
|
|
10
10
|
let [t, n] = e.split(":");
|
|
11
11
|
return {
|
|
12
12
|
hour: Number(t),
|
|
13
13
|
minute: Number(n)
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
return `${t
|
|
16
|
+
function a(t, n) {
|
|
17
|
+
return `${e(t)}:${e(n)}`;
|
|
18
18
|
}
|
|
19
|
+
var o = /* @__PURE__ */ new Map();
|
|
19
20
|
function s(e) {
|
|
20
|
-
|
|
21
|
-
return {
|
|
22
|
-
hour: e % 12 == 0 ? 12 : e % 12,
|
|
23
|
-
meridiem: t
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
function c(e, t) {
|
|
27
|
-
let n = e % 12;
|
|
28
|
-
return t === "PM" ? n + 12 : n;
|
|
29
|
-
}
|
|
30
|
-
function l(e, t) {
|
|
31
|
-
return c(s(e).hour, t);
|
|
21
|
+
return t(o, e, () => c(e));
|
|
32
22
|
}
|
|
33
|
-
function
|
|
34
|
-
let n = a(e);
|
|
35
|
-
return n ? o(l(n.hour, t), n.minute) : null;
|
|
36
|
-
}
|
|
37
|
-
var d = /* @__PURE__ */ new Map();
|
|
38
|
-
function f(e) {
|
|
39
|
-
return n(d, e, () => p(e));
|
|
40
|
-
}
|
|
41
|
-
function p(e) {
|
|
23
|
+
function c(e) {
|
|
42
24
|
try {
|
|
43
25
|
let { hourCycle: t } = new Intl.DateTimeFormat(e, { hour: "numeric" }).resolvedOptions();
|
|
44
26
|
return t === "h11" || t === "h12" ? "12h" : "24h";
|
|
@@ -46,82 +28,24 @@ function p(e) {
|
|
|
46
28
|
return "24h";
|
|
47
29
|
}
|
|
48
30
|
}
|
|
49
|
-
var
|
|
50
|
-
function
|
|
51
|
-
return
|
|
31
|
+
var l = /* @__PURE__ */ new Map();
|
|
32
|
+
function u(e, n) {
|
|
33
|
+
return t(l, `${e}|${n}`, () => new Intl.DateTimeFormat(e, {
|
|
52
34
|
hour: "numeric",
|
|
53
35
|
minute: "2-digit",
|
|
54
|
-
|
|
36
|
+
...n === "12h" ? { hour12: !0 } : { hourCycle: "h23" },
|
|
55
37
|
timeZone: "UTC"
|
|
56
38
|
}));
|
|
57
39
|
}
|
|
58
|
-
function
|
|
59
|
-
let r =
|
|
60
|
-
return r ?
|
|
61
|
-
}
|
|
62
|
-
function _(e, t) {
|
|
63
|
-
return ((t <= 1 ? Math.round(e) : Math.round(e / t) * t) % 60 + 60) % 60;
|
|
64
|
-
}
|
|
65
|
-
function v(e, t, n) {
|
|
66
|
-
let r = (Math.atan2(e, -t) / (2 * Math.PI) + 1) % 1;
|
|
67
|
-
return Math.round(r * n) % n;
|
|
40
|
+
function d(e, t, n) {
|
|
41
|
+
let r = i(e);
|
|
42
|
+
return r ? u(t, n).format(Date.UTC(2021, 0, 1, r.hour, r.minute)) : "";
|
|
68
43
|
}
|
|
69
|
-
function
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
var b = .625;
|
|
73
|
-
function x(e, t) {
|
|
74
|
-
return t === "outer" ? e === 0 ? 12 : e : e === 0 ? 0 : e + 12;
|
|
75
|
-
}
|
|
76
|
-
function S(e) {
|
|
77
|
-
return e === 0 ? {
|
|
78
|
-
index: 0,
|
|
79
|
-
ring: "inner"
|
|
80
|
-
} : e === 12 ? {
|
|
81
|
-
index: 0,
|
|
82
|
-
ring: "outer"
|
|
83
|
-
} : e > 12 ? {
|
|
84
|
-
index: e - 12,
|
|
85
|
-
ring: "inner"
|
|
86
|
-
} : {
|
|
87
|
-
index: e,
|
|
88
|
-
ring: "outer"
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
function C(e) {
|
|
92
|
-
let t = a(e);
|
|
44
|
+
function f(e) {
|
|
45
|
+
let t = i(e);
|
|
93
46
|
return t ? t.hour * 60 + t.minute : null;
|
|
94
47
|
}
|
|
95
|
-
function w(e, t, n) {
|
|
96
|
-
let r = Number.isInteger(e) && e >= 1 && e <= 60 ? e : 60, i = [];
|
|
97
|
-
for (let e = 0; e < 1440; e += r) {
|
|
98
|
-
let r = o(Math.floor(e / 60), e % 60);
|
|
99
|
-
i.push({
|
|
100
|
-
value: r,
|
|
101
|
-
label: g(r, t, n)
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
return i;
|
|
105
|
-
}
|
|
106
|
-
var T = ":";
|
|
107
|
-
function E(t) {
|
|
108
|
-
let n = e(t).slice(0, 4);
|
|
109
|
-
return n.length >= 2 ? `${n.slice(0, 2)}${T}${n.slice(2)}` : n;
|
|
110
|
-
}
|
|
111
|
-
function D(e, t = !1) {
|
|
112
|
-
return e < 2 ? e : e === 2 ? t ? 3 : 2 : Math.min(e + 1, 5);
|
|
113
|
-
}
|
|
114
|
-
function O(e, n) {
|
|
115
|
-
let r = a(e);
|
|
116
|
-
return r ? E(t(n === "12h" ? s(r.hour).hour : r.hour) + t(r.minute)) : "";
|
|
117
|
-
}
|
|
118
|
-
function k(t, n, r = "AM") {
|
|
119
|
-
let i = e(t);
|
|
120
|
-
if (i.length !== 4) return null;
|
|
121
|
-
let a = Number(i.slice(0, 2)), s = Number(i.slice(2));
|
|
122
|
-
return s > 59 ? null : n === "12h" ? a >= 1 && a <= 12 ? o(c(a, r), s) : null : a <= 23 ? o(a, s) : null;
|
|
123
|
-
}
|
|
124
48
|
//#endregion
|
|
125
|
-
export {
|
|
49
|
+
export { a as formatTime, d as formatTimeDisplay, s as hourCycleFor, r as isValidTime, f as minutesOf, i as parseTime };
|
|
126
50
|
|
|
127
51
|
//# sourceMappingURL=time.js.map
|
package/dist/utils/time.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time.js","names":[],"sources":["../../src/utils/time.ts"],"sourcesContent":["// @ssr @core — module-wide: every export below is @core unless tagged otherwise.\n/**\n * The TIME domain behind VTimePicker and VTimeInput. Pure: nothing here draws or touches\n * the page, and the same numbers always give the same answer.\n *\n * A time is always the canonical 24-hour string `'HH:mm'`, whatever is being SHOWN — a\n * picker displaying \"7:05 PM\" still holds `'19:05'`. That is what keeps the value a\n * consumer receives independent of the reader's locale.\n *\n * `Intl` is asked on UTC reference instants only, so nothing depends on the host clock and\n * the server render agrees with the browser's.\n *\n * The dial's geometry lives here too, and for a practical reason: jsdom lays nothing out and\n * measures every element at zero, so a calculation kept inside the component is untestable.\n */\nimport { memo } from './memo'\nimport { digitsOf, pad2 } from './text'\n\nexport type HourFormat = '12h' | '24h'\nexport type Meridiem = 'AM' | 'PM'\n\nexport interface TimeParts {\n /** The hour on the 24-hour clock, from 0 to 23. */\n hour: number\n minute: number\n}\n\nconst TIME_RE = /^([01]\\d|2[0-3]):([0-5]\\d)$/\n\n/** Whether something is a time in the canonical form — two digits, a colon, two digits. */\nexport function isValidTime(value: unknown): value is string {\n return typeof value === 'string' && TIME_RE.test(value)\n}\n\n/** Reads a canonical time into its two numbers, or nothing at all if it is not one. */\nexport function parseTime(value: string | null | undefined): TimeParts | null {\n if (!isValidTime(value)) return null\n const [h, m] = value.split(':')\n return { hour: Number(h), minute: Number(m) }\n}\n\n/** Writes an hour and a minute back into the canonical form, both on two digits. */\nexport function formatTime(hour: number, minute: number): string {\n return `${pad2(hour)}:${pad2(minute)}`\n}\n\n/**\n * Turns an hour of the 24-hour clock into the hour a 12-hour clock face shows, together\n * with which half of the day it belongs to: midnight is 12 AM, noon is 12 PM, and eleven\n * at night is 11 PM.\n */\nexport function to12h(hour24: number): { hour: number; meridiem: Meridiem } {\n const meridiem: Meridiem = hour24 >= 12 ? 'PM' : 'AM'\n const hour = hour24 % 12 === 0 ? 12 : hour24 % 12\n return { hour, meridiem }\n}\n\n/**\n * The way back: an hour read off a 12-hour clock face, plus the half of the day it is in,\n * gives the hour on the 24-hour clock — 12 in the morning is 0, 12 in the afternoon is 12.\n */\nexport function to24h(hour12: number, meridiem: Meridiem): number {\n const base = hour12 % 12 // Twelve is the zero of the cycle, not its top.\n return meridiem === 'PM' ? base + 12 : base\n}\n\n/**\n * The same hour moved into the other half of the day, or left where it is: 9 with PM gives\n * 21, and 21 with PM stays 21. It is what an AM/PM control does to the hour it qualifies.\n */\nexport function hourWithMeridiem(hour24: number, meridiem: Meridiem): number {\n return to24h(to12h(hour24).hour, meridiem)\n}\n\n/**\n * A canonical time moved into a half of the day, its minutes untouched, or `null` when it is\n * not a time at all: `'09:30'` with PM gives `'21:30'`.\n */\nexport function withMeridiem(time: string | null | undefined, meridiem: Meridiem): string | null {\n const parts = parseTime(time)\n return parts ? formatTime(hourWithMeridiem(parts.hour, meridiem), parts.minute) : null\n}\n\nconst hourCycleCache = new Map<string, HourFormat>()\n\n// @fallback\n/**\n * Whether a language counts the hours to twelve, with a morning and an afternoon, or\n * straight to twenty-four. It is the browser that knows, and it is asked.\n *\n * A language tag it cannot make sense of falls back to the 24-hour clock rather than\n * failing.\n */\nexport function hourCycleFor(locale: string): HourFormat {\n return memo(hourCycleCache, locale, () => resolveHourCycle(locale))\n}\n\nfunction resolveHourCycle(locale: string): HourFormat {\n try {\n const { hourCycle } = new Intl.DateTimeFormat(locale, { hour: 'numeric' }).resolvedOptions()\n return hourCycle === 'h11' || hourCycle === 'h12' ? '12h' : '24h'\n } catch {\n return '24h'\n }\n}\n\n/**\n * One formatter per locale and clock, module-lived — the `formatterFor` idiom of `file.ts`.\n *\n * Construction costs one to two orders of magnitude more than use, and `timeList` formats\n * ONE VALUE AT A TIME: 1440 entries at one-minute steps, so 1440 constructions per rebuild.\n * Measured at ~82 ms against ~2 ms memoized. The clock is part of the key because it is\n * imposed below rather than following from the locale.\n */\nconst displayFormatters = new Map<string, Intl.DateTimeFormat>()\n\nfunction displayFormatterFor(locale: string, format: HourFormat): Intl.DateTimeFormat {\n return memo(\n displayFormatters,\n `${locale}|${format}`,\n () =>\n new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n minute: '2-digit',\n hourCycle: format === '12h' ? 'h12' : 'h23',\n timeZone: 'UTC',\n }),\n )\n}\n\n/**\n * A time written out for a reader: \"19:05\", or \"7:05 PM\".\n *\n * `hourCycle` is imposed rather than left to `Intl`, so the text follows what the component\n * settled on: a consumer asking for a 24-hour clock in a locale that would choose otherwise\n * must get theirs.\n */\nexport function formatTimeDisplay(time: string, locale: string, format: HourFormat): string {\n const parts = parseTime(time)\n if (!parts) return ''\n return displayFormatterFor(locale, format).format(Date.UTC(2021, 0, 1, parts.hour, parts.minute))\n}\n\n/**\n * Snaps a minute to the nearest allowed step and wraps it back inside the hour.\n *\n * Both ends need the wrap: 58 snapped to five-minute steps lands on 60, which is 0, and\n * stepping back from 0 with the keyboard passes through -1, which is 59.\n */\nexport function snapMinute(minute: number, step: number): number {\n const snapped = step <= 1 ? Math.round(minute) : Math.round(minute / step) * step\n return ((snapped % 60) + 60) % 60\n}\n\n/**\n * Which mark a pointer offset from the dial's centre is aiming at. Marks are numbered\n * clockwise from twelve o'clock and the nearest wins. `dy` is negated because screen\n * coordinates grow DOWNWARD and the angle is measured from the top.\n */\nexport function angleToIndex(dx: number, dy: number, segments: number): number {\n // The angle from twelve o'clock, clockwise-positive, as a fraction of a full turn.\n const angle = Math.atan2(dx, -dy)\n const turn = (angle / (2 * Math.PI) + 1) % 1\n return Math.round(turn * segments) % segments\n}\n\n/** How far from the centre a finger landed, as a fraction: nothing at the centre, one at the edge. */\nexport function distanceFraction(dx: number, dy: number, radius: number): number {\n return radius > 0 ? Math.hypot(dx, dy) / radius : 0\n}\n\n/**\n * How close to the centre a pointer must land to be aiming at the INNER ring, the one\n * holding the small hours of a 24-hour dial: the halfway mark between the two rings.\n *\n * TRAP — the number is DERIVED from the dial tokens. A 256px dial with 48px numerals puts\n * the rings' centres at 104px and 56px from the middle, whose midpoint is 0.625 of the\n * radius. Change either token without changing this and the threshold no longer separates\n * the two rings: a tap near the boundary quietly sets the wrong hour.\n */\nexport const DIAL_INNER_THRESHOLD = 0.625\n\n/**\n * Which hour a mark stands for on the two-ring dial: outer carries 12 then 1-11, inner\n * carries 00 then 13-23. Index 0 of each is the mark at twelve o'clock.\n */\nexport function dialIndexToHour24(index: number, ring: 'outer' | 'inner'): number {\n if (ring === 'outer') return index === 0 ? 12 : index\n return index === 0 ? 0 : index + 12\n}\n\n/** The way back, which is what tells the hand where to point. */\nexport function hour24ToDial(hour: number): { index: number; ring: 'outer' | 'inner' } {\n if (hour === 0) return { index: 0, ring: 'inner' }\n if (hour === 12) return { index: 0, ring: 'outer' }\n if (hour > 12) return { index: hour - 12, ring: 'inner' }\n return { index: hour, ring: 'outer' }\n}\n\nexport interface TimeOption {\n /** The canonical time, which is what the component's value will be set to. */\n value: string\n /** The same time written out for the reader: \"07:30\", or \"7:30 AM\". */\n label: string\n}\n\n/** A time as minutes since midnight, `null` if it is not one — its position in a list. */\nexport function minutesOf(time: string | null | undefined): number | null {\n const parts = parseTime(time)\n return parts ? parts.hour * 60 + parts.minute : null\n}\n\n/**\n * Every time of the day at a given interval, midnight to the last one before the next.\n *\n * There is deliberately no earliest or latest, VTimePicker having none: do not invent one.\n * A nonsensical step — zero, a fraction, more than an hour — falls back to hourly, so the\n * list stays FINITE even when the component's warning about it was ignored.\n */\nexport function timeList(step: number, locale: string, format: HourFormat): TimeOption[] {\n const safe = Number.isInteger(step) && step >= 1 && step <= 60 ? step : 60\n const out: TimeOption[] = []\n for (let m = 0; m < 24 * 60; m += safe) {\n const value = formatTime(Math.floor(m / 60), m % 60)\n out.push({ value, label: formatTimeDisplay(value, locale, format) })\n }\n return out\n}\n\n/*\n * Unlike a date's separator this one is UNIVERSAL: every language writes a time with a\n * colon, and only the 12/24-hour cycle varies. It therefore stays out of the dictionary,\n * where the empty field's `hh:mm` placeholder does belong — that one is made of the\n * initials of words.\n */\nconst TIME_SEPARATOR = ':'\n\n/**\n * Lays a run of typed digits out as a time. The colon appears AS SOON AS the hour is\n * complete — typing \"09\" already gives \"09:\" — exactly as a date's separators do.\n */\nexport function formatTimeMask(digits: string): string {\n const all = digitsOf(digits).slice(0, 4)\n return all.length >= 2 ? `${all.slice(0, 2)}${TIME_SEPARATOR}${all.slice(2)}` : all\n}\n\n/**\n * Where the caret belongs to sit just after `n` digits. A closed formula rather than\n * `date.ts`'s scan, the colon always being in the same place.\n *\n * `skipSeparator` means something was INSERTED, and the caret then steps over the colon\n * into the minutes. On a DELETION it stays in front of it, or the next Backspace steps\n * over the colon instead of erasing a digit and the key appears to do nothing.\n */\nexport function timeCaret(n: number, skipSeparator = false): number {\n if (n < 2) return n\n if (n === 2) return skipSeparator ? 3 : 2\n return Math.min(n + 1, 5)\n}\n\n/**\n * A canonical time written into the field in whichever form is SHOWN. On a 12-hour clock the\n * hour comes back into 1-12: the meridiem belongs to the toggle beside the field, never to\n * the text.\n */\nexport function timeToMask(time: string | null | undefined, format: HourFormat): string {\n const parts = parseTime(time)\n if (!parts) return ''\n const hour = format === '12h' ? to12h(parts.hour).hour : parts.hour\n return formatTimeMask(pad2(hour) + pad2(parts.minute))\n}\n\n/**\n * What was typed read back into a canonical time, or `null` when it is incomplete, too long\n * or not a real time. On a 12-hour clock this is the ONE place the typed digits and the\n * meridiem toggle meet.\n */\nexport function parseTimeMask(\n text: string,\n format: HourFormat,\n meridiem: Meridiem = 'AM',\n): string | null {\n const digits = digitsOf(text)\n if (digits.length !== 4) return null\n const hour = Number(digits.slice(0, 2))\n const minute = Number(digits.slice(2))\n if (minute > 59) return null\n if (format === '12h')\n return hour >= 1 && hour <= 12 ? formatTime(to24h(hour, meridiem), minute) : null\n return hour <= 23 ? formatTime(hour, minute) : null\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"time.js","names":[],"sources":["../../src/utils/time.ts"],"sourcesContent":["// @ssr @core — module-wide: every export below is @core unless tagged otherwise.\n/**\n * The TIME domain every component that shows a time shares: VTimePicker, VTimeInput and the\n * VCalendar views. Pure: nothing here draws or touches the page, and the same numbers always\n * give the same answer.\n *\n * TRAP — what only the clock and the field need lives in `./clock`, not here. This module\n * is in the import closure of every VCalendar component (`minutesOf`, `hourCycleFor`,\n * `formatTimeDisplay`), and anything added to it is paid by each of them: the dial, the\n * AM/PM arithmetic, the typing mask and the list of times weighed some 600 B gzip on\n * `VCalendarYear`, which shows no time at all.\n *\n * A time is always the canonical 24-hour string `'HH:mm'`, whatever is being SHOWN — a\n * picker displaying \"7:05 PM\" still holds `'19:05'`. That is what keeps the value a\n * consumer receives independent of the reader's locale.\n *\n * `Intl` is asked on UTC reference instants only, so nothing depends on the host clock and\n * the server render agrees with the browser's.\n */\nimport { memo } from './memo'\nimport { pad2 } from './text'\n\nexport type HourFormat = '12h' | '24h'\nexport type Meridiem = 'AM' | 'PM'\n\nexport interface TimeParts {\n /** The hour on the 24-hour clock, from 0 to 23. */\n hour: number\n minute: number\n}\n\nconst TIME_RE = /^([01]\\d|2[0-3]):([0-5]\\d)$/\n\n/** Whether something is a time in the canonical form: two digits, a colon, two digits. */\nexport function isValidTime(value: unknown): value is string {\n return typeof value === 'string' && TIME_RE.test(value)\n}\n\n/** Reads a canonical time into its two numbers, or nothing at all if it is not one. */\nexport function parseTime(value: string | null | undefined): TimeParts | null {\n if (!isValidTime(value)) return null\n const [h, m] = value.split(':')\n return { hour: Number(h), minute: Number(m) }\n}\n\n/** Writes an hour and a minute back into the canonical form, both on two digits. */\nexport function formatTime(hour: number, minute: number): string {\n return `${pad2(hour)}:${pad2(minute)}`\n}\n\nconst hourCycleCache = new Map<string, HourFormat>()\n\n// @fallback\n/**\n * Whether a language counts the hours to twelve, with a morning and an afternoon, or\n * straight to twenty-four. It is the browser that knows, and it is asked.\n *\n * A language tag it cannot make sense of falls back to the 24-hour clock rather than\n * failing.\n */\nexport function hourCycleFor(locale: string): HourFormat {\n return memo(hourCycleCache, locale, () => resolveHourCycle(locale))\n}\n\nfunction resolveHourCycle(locale: string): HourFormat {\n try {\n const { hourCycle } = new Intl.DateTimeFormat(locale, { hour: 'numeric' }).resolvedOptions()\n return hourCycle === 'h11' || hourCycle === 'h12' ? '12h' : '24h'\n } catch {\n return '24h'\n }\n}\n\n/**\n * One formatter per locale and clock, module-lived — the `formatterFor` idiom of `file.ts`.\n *\n * Construction costs one to two orders of magnitude more than use, and `timeList` formats\n * ONE VALUE AT A TIME: 1440 entries at one-minute steps, so 1440 constructions per rebuild.\n * Measured at ~82 ms against ~2 ms memoized. The clock is part of the key because it is\n * imposed below rather than following from the locale.\n */\nconst displayFormatters = new Map<string, Intl.DateTimeFormat>()\n\nfunction displayFormatterFor(locale: string, format: HourFormat): Intl.DateTimeFormat {\n return memo(\n displayFormatters,\n `${locale}|${format}`,\n () =>\n new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n minute: '2-digit',\n // A 12-hour clock takes the language's own: Japanese counts it from 0 (h11), English\n // from 12 (h12). Imposing h12 wrote 午前12:05 where 午前0:05 is written.\n ...(format === '12h' ? { hour12: true } : { hourCycle: 'h23' as const }),\n timeZone: 'UTC',\n }),\n )\n}\n\n/**\n * A time written out for a reader: \"19:05\", or \"7:05 PM\".\n *\n * `hourCycle` is imposed rather than left to `Intl`, so the text follows what the component\n * settled on: a consumer asking for a 24-hour clock in a locale that would choose otherwise\n * must get theirs.\n */\nexport function formatTimeDisplay(time: string, locale: string, format: HourFormat): string {\n const parts = parseTime(time)\n if (!parts) return ''\n return displayFormatterFor(locale, format).format(Date.UTC(2021, 0, 1, parts.hour, parts.minute))\n}\n\n/** A time as minutes since midnight, `null` if it is not one: its position in a list. */\nexport function minutesOf(time: string | null | undefined): number | null {\n const parts = parseTime(time)\n return parts ? parts.hour * 60 + parts.minute : null\n}\n"],"mappings":";;;AA+BA,IAAM,IAAU;AAGhB,SAAgB,EAAY,GAAiC;CAC3D,OAAO,OAAO,KAAU,YAAY,EAAQ,KAAK,CAAK;AACxD;AAGA,SAAgB,EAAU,GAAoD;CAC5E,IAAI,CAAC,EAAY,CAAK,GAAG,OAAO;CAChC,IAAM,CAAC,GAAG,KAAK,EAAM,MAAM,GAAG;CAC9B,OAAO;EAAE,MAAM,OAAO,CAAC;EAAG,QAAQ,OAAO,CAAC;CAAE;AAC9C;AAGA,SAAgB,EAAW,GAAc,GAAwB;CAC/D,OAAO,GAAG,EAAK,CAAI,EAAE,GAAG,EAAK,CAAM;AACrC;AAEA,IAAM,oBAAiB,IAAI,IAAwB;AAUnD,SAAgB,EAAa,GAA4B;CACvD,OAAO,EAAK,GAAgB,SAAc,EAAiB,CAAM,CAAC;AACpE;AAEA,SAAS,EAAiB,GAA4B;CACpD,IAAI;EACF,IAAM,EAAE,iBAAc,IAAI,KAAK,eAAe,GAAQ,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,gBAAgB;EAC3F,OAAO,MAAc,SAAS,MAAc,QAAQ,QAAQ;CAC9D,QAAQ;EACN,OAAO;CACT;AACF;AAUA,IAAM,oBAAoB,IAAI,IAAiC;AAE/D,SAAS,EAAoB,GAAgB,GAAyC;CACpF,OAAO,EACL,GACA,GAAG,EAAO,GAAG,WAEX,IAAI,KAAK,eAAe,GAAQ;EAC9B,MAAM;EACN,QAAQ;EAGR,GAAI,MAAW,QAAQ,EAAE,QAAQ,GAAK,IAAI,EAAE,WAAW,MAAe;EACtE,UAAU;CACZ,CAAC,CACL;AACF;AASA,SAAgB,EAAkB,GAAc,GAAgB,GAA4B;CAC1F,IAAM,IAAQ,EAAU,CAAI;CAE5B,OADK,IACE,EAAoB,GAAQ,CAAM,CAAC,CAAC,OAAO,KAAK,IAAI,MAAM,GAAG,GAAG,EAAM,MAAM,EAAM,MAAM,CAAC,IAD7E;AAErB;AAGA,SAAgB,EAAU,GAAgD;CACxE,IAAM,IAAQ,EAAU,CAAI;CAC5B,OAAO,IAAQ,EAAM,OAAO,KAAK,EAAM,SAAS;AAClD"}
|
package/dist/utils/vnode.d.ts
CHANGED
|
@@ -5,10 +5,12 @@ import { VNode } from 'vue';
|
|
|
5
5
|
*
|
|
6
6
|
* This is what lets a component count its children without a registry they feed at mount.
|
|
7
7
|
* A registry fills up in the browser and stays empty on the server, so the two renders
|
|
8
|
-
* disagree
|
|
8
|
+
* disagree: VAvatarGroup would say "+0" in one and "+3" in the other. Reading the slot
|
|
9
9
|
* happens while the parent renders, which is the same on both sides.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* Components never call it on a slot directly: they go through `composables/useSlotNodes`,
|
|
12
|
+
* which redoes the read whenever the parent hands down a new slot. Its consumers are
|
|
13
|
+
* VAvatarGroup for its "+N", VCarousel for its slide count and the index each slide is
|
|
14
|
+
* handed, and VInputGroup for its dev warning on a segment carrying a label.
|
|
13
15
|
*/
|
|
14
16
|
export declare function flattenSlot(nodes: VNode[] | undefined): VNode[];
|
package/dist/utils/vnode.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vnode.js","names":[],"sources":["../../src/utils/vnode.ts"],"sourcesContent":["import { Comment, Fragment, Text } from 'vue'\nimport type { VNode } from 'vue'\n\n// @ssr @core\n/**\n * A slot's VNodes reduced to the elements that will actually render: `v-for` Fragments\n * unwrapped, a false `v-if`'s Comment and the source text's whitespace dropped.\n *\n * This is what lets a component count its children without a registry they feed at mount.\n * A registry fills up in the browser and stays empty on the server, so the two renders\n * disagree
|
|
1
|
+
{"version":3,"file":"vnode.js","names":[],"sources":["../../src/utils/vnode.ts"],"sourcesContent":["import { Comment, Fragment, Text } from 'vue'\nimport type { VNode } from 'vue'\n\n// @ssr @core\n/**\n * A slot's VNodes reduced to the elements that will actually render: `v-for` Fragments\n * unwrapped, a false `v-if`'s Comment and the source text's whitespace dropped.\n *\n * This is what lets a component count its children without a registry they feed at mount.\n * A registry fills up in the browser and stays empty on the server, so the two renders\n * disagree: VAvatarGroup would say \"+0\" in one and \"+3\" in the other. Reading the slot\n * happens while the parent renders, which is the same on both sides.\n *\n * Components never call it on a slot directly: they go through `composables/useSlotNodes`,\n * which redoes the read whenever the parent hands down a new slot. Its consumers are\n * VAvatarGroup for its \"+N\", VCarousel for its slide count and the index each slide is\n * handed, and VInputGroup for its dev warning on a segment carrying a label.\n */\nexport function flattenSlot(nodes: VNode[] | undefined): VNode[] {\n const out: VNode[] = []\n for (const node of nodes ?? []) {\n if (node.type === Fragment) out.push(...flattenSlot(node.children as VNode[]))\n else if (node.type === Comment) continue\n else if (node.type === Text && !String(node.children).trim()) continue\n else out.push(node)\n }\n return out\n}\n"],"mappings":";;AAkBA,SAAgB,EAAY,GAAqC;CAC/D,IAAM,IAAe,CAAC;CACtB,KAAK,IAAM,KAAQ,KAAS,CAAC,GAC3B,IAAI,EAAK,SAAS,GAAU,EAAI,KAAK,GAAG,EAAY,EAAK,QAAmB,CAAC;MACxE,IAAI,EAAK,SAAS,GAAS;MAC3B,IAAI,EAAK,SAAS,KAAQ,CAAC,OAAO,EAAK,QAAQ,CAAC,CAAC,KAAK,GAAG;MACzD,EAAI,KAAK,CAAI;CAEpB,OAAO;AACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vectis-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Vue 3 design system — HTML/CSS first, CSS tokens, Nuxt 3 (SSR) compatible",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"icons": "tsx scripts/build-icons.ts",
|
|
94
94
|
"prebuild": "pnpm run tokens",
|
|
95
95
|
"build": "vite build",
|
|
96
|
-
"postbuild": "tsx scripts/check-css-split.ts && tsx scripts/bench-size.ts",
|
|
96
|
+
"postbuild": "tsx scripts/check-css-split.ts && tsx scripts/check-dev-warnings.ts && tsx scripts/bench-size.ts",
|
|
97
97
|
"//bench": "Runtime timings, deliberately OUTSIDE the checkpoint and never gating: a benchmark on a shared runner measures the runner. The SIZE gate is the deterministic half and runs in postbuild.",
|
|
98
98
|
"bench": "vitest bench --run",
|
|
99
99
|
"bench:size": "tsx scripts/bench-size.ts",
|