vectis-ui 0.1.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -6
- package/dist/components/VAccordion/VAccordion.css +1 -1
- package/dist/components/VAccordion/VAccordion.d.ts +9 -16
- package/dist/components/VAccordion/VAccordion.js.map +1 -1
- package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAccordion/VAccordionItem.css +1 -1
- package/dist/components/VAccordion/VAccordionItem.d.ts +33 -19
- package/dist/components/VAccordion/VAccordionItem.js.map +1 -1
- package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js +50 -38
- package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAccordion/context.d.ts +1 -8
- package/dist/components/VAccordion/context.js.map +1 -1
- package/dist/components/VAvatar/VAvatar.css +1 -1
- package/dist/components/VAvatar/VAvatar.d.ts +44 -29
- package/dist/components/VAvatar/VAvatar.js.map +1 -1
- package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js +38 -35
- package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAvatar/VAvatarGroup.d.ts +5 -16
- package/dist/components/VAvatar/VAvatarGroup.js.map +1 -1
- package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAvatar/context.d.ts +6 -10
- package/dist/components/VAvatar/context.js.map +1 -1
- package/dist/components/VBadge/VBadge.css +1 -1
- package/dist/components/VBadge/VBadge.d.ts +31 -10
- package/dist/components/VBadge/VBadge.js.map +1 -1
- package/dist/components/VBadge/VBadge.vue_vue_type_script_setup_true_lang.js +39 -24
- package/dist/components/VBadge/VBadge.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VBreadcrumb/VBreadcrumb.css +1 -1
- package/dist/components/VBreadcrumb/VBreadcrumb.d.ts +4 -17
- package/dist/components/VBreadcrumb/VBreadcrumb.js.map +1 -1
- package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js +23 -25
- 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 +30 -10
- package/dist/components/VButton/VButton.js.map +1 -1
- package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js +39 -30
- package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VButton/VButtonGroup.css +1 -1
- package/dist/components/VButton/VButtonGroup.d.ts +76 -13
- package/dist/components/VButton/VButtonGroup.js.map +1 -1
- package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js +74 -8
- package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VButton/context.d.ts +30 -0
- package/dist/components/VButton/context.js +6 -0
- package/dist/components/VButton/context.js.map +1 -0
- package/dist/components/VCalendar/VCalendar.css +1 -1
- package/dist/components/VCalendar/VCalendar.d.ts +50 -36
- package/dist/components/VCalendar/VCalendar.js.map +1 -1
- package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js +99 -85
- 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 +5 -11
- package/dist/components/VCalendar/VCalendarEvent.js.map +1 -1
- package/dist/components/VCalendar/VCalendarEvent.vue_vue_type_script_setup_true_lang.js +7 -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 +10 -13
- package/dist/components/VCalendar/VCalendarMonth.js.map +1 -1
- package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js +183 -244
- 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 +15 -20
- package/dist/components/VCalendar/VCalendarTimeGrid.js.map +1 -1
- package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js +385 -448
- 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.js.map +1 -1
- package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js +53 -49
- package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/gesture.d.ts +158 -0
- package/dist/components/VCalendar/gesture.js +170 -0
- package/dist/components/VCalendar/gesture.js.map +1 -0
- package/dist/components/VCalendar/keyboard.d.ts +9 -3
- package/dist/components/VCalendar/keyboard.js +2 -6
- package/dist/components/VCalendar/keyboard.js.map +1 -1
- package/dist/components/VCalendar/layout.d.ts +67 -54
- package/dist/components/VCalendar/layout.js +77 -69
- package/dist/components/VCalendar/layout.js.map +1 -1
- package/dist/components/VCalendar/timeGrid.d.ts +55 -0
- package/dist/components/VCalendar/timeGrid.js +71 -0
- package/dist/components/VCalendar/timeGrid.js.map +1 -0
- package/dist/components/VCalendar/types.d.ts +41 -16
- package/dist/components/VCarousel/VCarousel.css +1 -1
- package/dist/components/VCarousel/VCarousel.d.ts +21 -41
- package/dist/components/VCarousel/VCarousel.js.map +1 -1
- package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js +157 -129
- package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCarousel/VCarouselItem.d.ts +0 -17
- 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 +0 -12
- package/dist/components/VCarousel/context.js.map +1 -1
- package/dist/components/VCheckbox/VCheckbox.css +1 -1
- package/dist/components/VCheckbox/VCheckbox.d.ts +31 -16
- package/dist/components/VCheckbox/VCheckbox.js.map +1 -1
- package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js +62 -29
- 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 +36 -26
- package/dist/components/VChip/VChip.js.map +1 -1
- package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js +57 -48
- 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 +127 -31
- package/dist/components/VCombobox/VCombobox.js.map +1 -1
- package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js +336 -247
- 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.d.ts +0 -9
- 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/VComboboxOption.css +1 -1
- package/dist/components/VCombobox/VComboboxOption.d.ts +0 -15
- package/dist/components/VCombobox/VComboboxOption.js.map +1 -1
- package/dist/components/VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCombobox/VComboboxSeparator.js.map +1 -1
- package/dist/components/VCombobox/VComboboxSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCombobox/infiniteScroll.js.map +1 -1
- package/dist/components/VDataTable/VDataTable.css +1 -1
- package/dist/components/VDataTable/VDataTable.d.ts +50 -28
- package/dist/components/VDataTable/VDataTable.js.map +1 -1
- package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js +183 -194
- 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 +90 -42
- package/dist/components/VDateInput/VDateInput.js.map +1 -1
- package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js +159 -191
- package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDatePicker/VDatePicker.css +1 -1
- package/dist/components/VDatePicker/VDatePicker.d.ts +61 -30
- package/dist/components/VDatePicker/VDatePicker.js.map +1 -1
- package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js +243 -221
- package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDialog/VDialog.css +1 -1
- package/dist/components/VDialog/VDialog.d.ts +45 -33
- package/dist/components/VDialog/VDialog.js.map +1 -1
- package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js +65 -64
- package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDialog/VDialogAlert.d.ts +24 -20
- package/dist/components/VDialog/VDialogAlert.js.map +1 -1
- package/dist/components/VDialog/VDialogAlert.vue_vue_type_script_setup_true_lang.js +36 -25
- package/dist/components/VDialog/VDialogAlert.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VFileInput/VFileInput.css +1 -1
- package/dist/components/VFileInput/VFileInput.d.ts +78 -26
- package/dist/components/VFileInput/VFileInput.js.map +1 -1
- package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js +144 -132
- package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VFilePicker/VFilePicker.css +1 -1
- package/dist/components/VFilePicker/VFilePicker.d.ts +47 -30
- package/dist/components/VFilePicker/VFilePicker.js.map +1 -1
- package/dist/components/VFilePicker/VFilePicker.vue_vue_type_script_setup_true_lang.js +166 -163
- package/dist/components/VFilePicker/VFilePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VFilePicker/fileKind.d.ts +2 -27
- package/dist/components/VFilePicker/fileKind.js +9 -8
- package/dist/components/VFilePicker/fileKind.js.map +1 -1
- package/dist/components/VHotkeys/VHotkeys.css +1 -1
- package/dist/components/VHotkeys/VHotkeys.d.ts +8 -30
- package/dist/components/VHotkeys/VHotkeys.js.map +1 -1
- package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VHotkeys/platform.js.map +1 -1
- package/dist/components/VIcon/VIcon.css +1 -1
- package/dist/components/VIcon/VIcon.d.ts +15 -6
- package/dist/components/VIcon/VIcon.js.map +1 -1
- package/dist/components/VIcon/VIcon.vue_vue_type_script_setup_true_lang.js +45 -37
- package/dist/components/VIcon/VIcon.vue_vue_type_script_setup_true_lang.js.map +1 -1
- 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.map +1 -1
- package/dist/components/VIcon/types.d.ts +12 -12
- package/dist/components/VIconButton/VIconButton.css +1 -1
- package/dist/components/VIconButton/VIconButton.d.ts +28 -11
- package/dist/components/VIconButton/VIconButton.js.map +1 -1
- package/dist/components/VIconButton/VIconButton.vue_vue_type_script_setup_true_lang.js +26 -20
- package/dist/components/VIconButton/VIconButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VInput/VInput.css +1 -1
- package/dist/components/VInput/VInput.d.ts +26 -7
- package/dist/components/VInput/VInput.js.map +1 -1
- package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js +86 -75
- package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VInput/VInputGroup.css +2 -0
- package/dist/components/VInput/VInputGroup.d.ts +47 -0
- package/dist/components/VInput/VInputGroup.js +9 -0
- package/dist/components/VInput/VInputGroup.js.map +1 -0
- package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js +80 -0
- package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VInput/context.d.ts +11 -0
- package/dist/components/VInput/context.js +6 -0
- package/dist/components/VInput/context.js.map +1 -0
- package/dist/components/VInputOTP/VInputOTP.css +1 -1
- package/dist/components/VInputOTP/VInputOTP.d.ts +37 -22
- package/dist/components/VInputOTP/VInputOTP.js.map +1 -1
- package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js +98 -61
- package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/VMenu.d.ts +23 -30
- package/dist/components/VMenu/VMenu.js.map +1 -1
- package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js +31 -27
- 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.d.ts +12 -8
- package/dist/components/VMenu/VMenuGroup.js.map +1 -1
- package/dist/components/VMenu/VMenuGroup.vue_vue_type_script_setup_true_lang.js +11 -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 +11 -19
- package/dist/components/VMenu/VMenuItem.js.map +1 -1
- package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js +65 -57
- package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/VMenuPanel.d.ts +14 -30
- package/dist/components/VMenu/VMenuPanel.js.map +1 -1
- package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js +43 -44
- package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/context.d.ts +2 -6
- package/dist/components/VMenu/context.js.map +1 -1
- package/dist/components/VPagination/VPagination.css +1 -1
- package/dist/components/VPagination/VPagination.d.ts +60 -22
- package/dist/components/VPagination/VPagination.js.map +1 -1
- package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js +113 -161
- 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 +26 -7
- package/dist/components/VPopover/VPopover.js.map +1 -1
- package/dist/components/VPopover/VPopover.vue_vue_type_script_setup_true_lang.js +43 -37
- 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 +15 -4
- package/dist/components/VProgressCircular/VProgressCircular.js.map +1 -1
- package/dist/components/VProgressCircular/VProgressCircular.vue_vue_type_script_setup_true_lang.js +32 -30
- 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 +23 -8
- package/dist/components/VProgressLinear/VProgressLinear.js.map +1 -1
- package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js +34 -32
- 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.d.ts +36 -18
- package/dist/components/VRadio/VRadio.js.map +1 -1
- package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js +55 -26
- package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSeparator/VSeparator.d.ts +4 -2
- 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.css +1 -1
- package/dist/components/VSideNavigation/VSideNavigation.d.ts +5 -19
- package/dist/components/VSideNavigation/VSideNavigation.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js +5 -5
- 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.d.ts +9 -17
- package/dist/components/VSideNavigation/VSideNavigationGroup.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigationGroup.vue_vue_type_script_setup_true_lang.js +2 -2
- 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 +22 -30
- package/dist/components/VSideNavigation/VSideNavigationItem.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js +77 -87
- package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSideNavigation/context.d.ts +0 -14
- package/dist/components/VSideNavigation/context.js.map +1 -1
- package/dist/components/VSkeletonLoader/VSkeletonLoader.css +1 -1
- package/dist/components/VSkeletonLoader/VSkeletonLoader.d.ts +9 -9
- package/dist/components/VSkeletonLoader/VSkeletonLoader.js.map +1 -1
- 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 +52 -27
- package/dist/components/VSlider/VSlider.js.map +1 -1
- package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js +202 -118
- 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 +0 -23
- package/dist/components/VSnackbar/VSnackbar.js.map +1 -1
- package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js +38 -38
- package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSnackbar/state.d.ts +0 -27
- package/dist/components/VSnackbar/state.js.map +1 -1
- package/dist/components/VSpinner/VSpinner.css +1 -1
- package/dist/components/VSpinner/VSpinner.d.ts +6 -6
- package/dist/components/VSpinner/VSpinner.js.map +1 -1
- package/dist/components/VSpinner/VSpinner.vue_vue_type_script_setup_true_lang.js +10 -9
- 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 +35 -13
- package/dist/components/VSwitch/VSwitch.js.map +1 -1
- package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js +62 -21
- 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 +12 -12
- package/dist/components/VTabs/VTab.js.map +1 -1
- package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js +36 -24
- package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTabs/VTabPanel.d.ts +2 -10
- package/dist/components/VTabs/VTabPanel.js.map +1 -1
- package/dist/components/VTabs/VTabPanel.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/VTabs/VTabPanel.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 +27 -18
- package/dist/components/VTabs/VTabs.js.map +1 -1
- package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js +92 -81
- package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTabs/context.d.ts +9 -19
- package/dist/components/VTabs/context.js +1 -1
- package/dist/components/VTabs/context.js.map +1 -1
- package/dist/components/VTextarea/VTextarea.css +1 -1
- package/dist/components/VTextarea/VTextarea.d.ts +34 -6
- package/dist/components/VTextarea/VTextarea.js.map +1 -1
- package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js +91 -74
- 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 +123 -33
- package/dist/components/VTimeInput/VTimeInput.js.map +1 -1
- package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js +294 -291
- package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTimeInput/search.d.ts +24 -0
- package/dist/components/VTimeInput/search.js +22 -0
- package/dist/components/VTimeInput/search.js.map +1 -0
- package/dist/components/VTimePicker/VTimePicker.css +1 -1
- package/dist/components/VTimePicker/VTimePicker.d.ts +51 -30
- package/dist/components/VTimePicker/VTimePicker.js.map +1 -1
- package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js +216 -151
- package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTimePicker/limits.d.ts +88 -0
- package/dist/components/VTimePicker/limits.js +70 -0
- package/dist/components/VTimePicker/limits.js.map +1 -0
- package/dist/components/VToast/VToast.css +1 -1
- package/dist/components/VToast/VToast.d.ts +0 -10
- package/dist/components/VToast/VToast.js.map +1 -1
- package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js +10 -10
- package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VToast/VToaster.css +1 -1
- package/dist/components/VToast/VToaster.d.ts +0 -17
- package/dist/components/VToast/VToaster.js.map +1 -1
- package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js +29 -28
- package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VToast/state.d.ts +10 -19
- package/dist/components/VToast/state.js +1 -1
- package/dist/components/VToast/state.js.map +1 -1
- package/dist/components/VToggle/VToggle.css +1 -1
- package/dist/components/VToggle/VToggle.d.ts +56 -11
- package/dist/components/VToggle/VToggle.js.map +1 -1
- package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js +80 -46
- package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VToggle/VToggleItem.d.ts +16 -2
- package/dist/components/VToggle/VToggleItem.js +0 -2
- package/dist/components/VToggle/VToggleItem.js.map +1 -1
- package/dist/components/VToggle/VToggleItem.vue_vue_type_script_setup_true_lang.js +23 -15
- package/dist/components/VToggle/VToggleItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VToggle/context.d.ts +4 -24
- package/dist/components/VToggle/context.js.map +1 -1
- package/dist/components/VTooltip/VTooltip.css +1 -1
- package/dist/components/VTooltip/VTooltip.d.ts +9 -33
- package/dist/components/VTooltip/VTooltip.js.map +1 -1
- package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js +28 -24
- package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
- 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.d.ts +0 -17
- package/dist/composables/useAriaLabel.js.map +1 -1
- package/dist/composables/useClearable.d.ts +42 -0
- package/dist/composables/useClearable.js +19 -0
- package/dist/composables/useClearable.js.map +1 -0
- package/dist/composables/useControlShape.d.ts +22 -0
- package/dist/composables/useControlShape.js +13 -0
- package/dist/composables/useControlShape.js.map +1 -0
- package/dist/composables/useDetailsOpen.d.ts +22 -0
- package/dist/composables/useDetailsOpen.js +21 -0
- package/dist/composables/useDetailsOpen.js.map +1 -0
- package/dist/composables/useFieldIds.d.ts +0 -15
- package/dist/composables/useFieldIds.js +8 -7
- package/dist/composables/useFieldIds.js.map +1 -1
- package/dist/composables/useFieldPanel.d.ts +21 -18
- package/dist/composables/useFieldPanel.js +43 -23
- package/dist/composables/useFieldPanel.js.map +1 -1
- package/dist/composables/useFileDrop.d.ts +0 -22
- package/dist/composables/useFileDrop.js.map +1 -1
- package/dist/composables/useFileField.d.ts +45 -17
- package/dist/composables/useFileField.js +40 -20
- package/dist/composables/useFileField.js.map +1 -1
- package/dist/composables/useFocusoutDismiss.d.ts +0 -15
- package/dist/composables/useFocusoutDismiss.js.map +1 -1
- package/dist/composables/useIconClickHandlers.d.ts +29 -14
- package/dist/composables/useIconClickHandlers.js +15 -5
- package/dist/composables/useIconClickHandlers.js.map +1 -1
- package/dist/composables/useInertLink.d.ts +20 -0
- package/dist/composables/useInertLink.js +23 -0
- package/dist/composables/useInertLink.js.map +1 -0
- package/dist/composables/useMaskedField.d.ts +33 -10
- package/dist/composables/useMaskedField.js +45 -1
- package/dist/composables/useMaskedField.js.map +1 -1
- package/dist/composables/usePopover.d.ts +15 -1
- package/dist/composables/usePopover.js +23 -8
- package/dist/composables/usePopover.js.map +1 -1
- package/dist/composables/useProgressValue.d.ts +5 -8
- package/dist/composables/useProgressValue.js +6 -3
- package/dist/composables/useProgressValue.js.map +1 -1
- package/dist/composables/useRootAttrs.d.ts +12 -19
- package/dist/composables/useRootAttrs.js.map +1 -1
- package/dist/composables/useTimer.d.ts +8 -10
- package/dist/composables/useTimer.js.map +1 -1
- package/dist/i18n/en.d.ts +2 -10
- package/dist/i18n/en.js +18 -19
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/fr.d.ts +2 -18
- package/dist/i18n/fr.js +18 -19
- package/dist/i18n/fr.js.map +1 -1
- package/dist/i18n/state.d.ts +44 -47
- package/dist/i18n/state.js +20 -17
- package/dist/i18n/state.js.map +1 -1
- package/dist/i18n/types.d.ts +53 -44
- package/dist/icons.d.ts +3 -3
- package/dist/index.d.ts +43 -17
- package/dist/index.js +45 -44
- package/dist/styles.css +1 -1
- package/dist/tokens/css.js.map +1 -1
- package/dist/tokens/index.d.ts +5 -1
- package/dist/tokens/primitives.js.map +1 -1
- package/dist/tokens/semantic.d.ts +5 -1
- package/dist/tokens/semantic.js +6 -2
- package/dist/tokens/semantic.js.map +1 -1
- package/dist/tokens/themes/dark.js.map +1 -1
- package/dist/tokens/types.d.ts +7 -15
- package/dist/tokens/types.js.map +1 -1
- package/dist/tokens.json +25 -5
- package/dist/types.d.ts +24 -0
- package/dist/utils/array.d.ts +3 -6
- package/dist/utils/array.js.map +1 -1
- package/dist/utils/arrowNav.d.ts +17 -17
- package/dist/utils/arrowNav.js +5 -3
- package/dist/utils/arrowNav.js.map +1 -1
- package/dist/utils/chip.d.ts +11 -15
- package/dist/utils/chip.js.map +1 -1
- package/dist/utils/css.d.ts +22 -11
- package/dist/utils/css.js +5 -2
- package/dist/utils/css.js.map +1 -1
- package/dist/utils/date.d.ts +42 -19
- package/dist/utils/date.js +97 -98
- package/dist/utils/date.js.map +1 -1
- package/dist/utils/direction.d.ts +6 -12
- package/dist/utils/direction.js.map +1 -1
- package/dist/utils/env.d.ts +5 -6
- package/dist/utils/file.d.ts +46 -58
- package/dist/utils/file.js +43 -36
- package/dist/utils/file.js.map +1 -1
- package/dist/utils/focus.d.ts +8 -17
- package/dist/utils/focus.js.map +1 -1
- package/dist/utils/hostWarns.d.ts +12 -0
- package/dist/utils/hostWarns.js +6 -0
- package/dist/utils/hostWarns.js.map +1 -0
- package/dist/utils/ids.d.ts +10 -0
- package/dist/utils/ids.js +8 -0
- package/dist/utils/ids.js.map +1 -0
- package/dist/utils/matcher.d.ts +5 -9
- package/dist/utils/matcher.js.map +1 -1
- package/dist/utils/memo.d.ts +12 -0
- package/dist/utils/memo.js +9 -0
- package/dist/utils/memo.js.map +1 -0
- package/dist/utils/number.d.ts +3 -4
- package/dist/utils/number.js.map +1 -1
- package/dist/utils/text.d.ts +20 -9
- package/dist/utils/text.js +17 -3
- package/dist/utils/text.js.map +1 -1
- package/dist/utils/time.d.ts +53 -61
- package/dist/utils/time.js +49 -45
- package/dist/utils/time.js.map +1 -1
- package/dist/utils/vnode.d.ts +8 -15
- package/dist/utils/vnode.js.map +1 -1
- package/package.json +6 -6
- package/dist/components/VToggle/VToggleItem.css +0 -2
package/dist/utils/time.d.ts
CHANGED
|
@@ -25,59 +25,63 @@ export declare function to12h(hour24: number): {
|
|
|
25
25
|
* gives the hour on the 24-hour clock — 12 in the morning is 0, 12 in the afternoon is 12.
|
|
26
26
|
*/
|
|
27
27
|
export declare function to24h(hour12: number, meridiem: Meridiem): number;
|
|
28
|
+
/**
|
|
29
|
+
* The same hour moved into the other half of the day, or left where it is: 9 with PM gives
|
|
30
|
+
* 21, and 21 with PM stays 21. It is what an AM/PM control does to the hour it qualifies.
|
|
31
|
+
*/
|
|
32
|
+
export declare function hourWithMeridiem(hour24: number, meridiem: Meridiem): number;
|
|
33
|
+
/**
|
|
34
|
+
* A canonical time moved into a half of the day, its minutes untouched, or `null` when it is
|
|
35
|
+
* not a time at all: `'09:30'` with PM gives `'21:30'`.
|
|
36
|
+
*/
|
|
37
|
+
export declare function withMeridiem(time: string | null | undefined, meridiem: Meridiem): string | null;
|
|
38
|
+
/**
|
|
39
|
+
* Whether a language counts the hours to twelve, with a morning and an afternoon, or
|
|
40
|
+
* straight to twenty-four. It is the browser that knows, and it is asked.
|
|
41
|
+
*
|
|
42
|
+
* A language tag it cannot make sense of falls back to the 24-hour clock rather than
|
|
43
|
+
* failing.
|
|
44
|
+
*/
|
|
28
45
|
export declare function hourCycleFor(locale: string): HourFormat;
|
|
29
46
|
/**
|
|
30
|
-
* A time written out for a reader
|
|
47
|
+
* A time written out for a reader: "19:05", or "7:05 PM".
|
|
31
48
|
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
49
|
+
* `hourCycle` is imposed rather than left to `Intl`, so the text follows what the component
|
|
50
|
+
* settled on: a consumer asking for a 24-hour clock in a locale that would choose otherwise
|
|
51
|
+
* must get theirs.
|
|
35
52
|
*/
|
|
36
|
-
export declare function
|
|
53
|
+
export declare function formatTimeDisplay(time: string, locale: string, format: HourFormat): string;
|
|
37
54
|
/**
|
|
38
|
-
* Snaps a minute to the nearest
|
|
39
|
-
* brings it back inside the hour.
|
|
55
|
+
* Snaps a minute to the nearest allowed step and wraps it back inside the hour.
|
|
40
56
|
*
|
|
41
|
-
* Both ends need
|
|
42
|
-
*
|
|
43
|
-
* 59.
|
|
57
|
+
* Both ends need the wrap: 58 snapped to five-minute steps lands on 60, which is 0, and
|
|
58
|
+
* stepping back from 0 with the keyboard passes through -1, which is 59.
|
|
44
59
|
*/
|
|
45
60
|
export declare function snapMinute(minute: number, step: number): number;
|
|
46
61
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* The marks are numbered from the twelve o'clock position and go round clockwise, and the
|
|
51
|
-
* nearest one wins. The offsets are the ones the screen uses, where going DOWN is
|
|
52
|
-
* positive, which is why the vertical one is negated to measure the angle from the top.
|
|
62
|
+
* Which mark a pointer offset from the dial's centre is aiming at. Marks are numbered
|
|
63
|
+
* clockwise from twelve o'clock and the nearest wins. `dy` is negated because screen
|
|
64
|
+
* coordinates grow DOWNWARD and the angle is measured from the top.
|
|
53
65
|
*/
|
|
54
66
|
export declare function angleToIndex(dx: number, dy: number, segments: number): number;
|
|
55
67
|
/** How far from the centre a finger landed, as a fraction: nothing at the centre, one at the edge. */
|
|
56
68
|
export declare function distanceFraction(dx: number, dy: number, radius: number): number;
|
|
57
69
|
/**
|
|
58
|
-
* How close to the centre a
|
|
59
|
-
*
|
|
60
|
-
* between the two rings of numerals.
|
|
70
|
+
* How close to the centre a pointer must land to be aiming at the INNER ring, the one
|
|
71
|
+
* holding the small hours of a 24-hour dial: the halfway mark between the two rings.
|
|
61
72
|
*
|
|
62
|
-
* TRAP — the number is DERIVED from the dial
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* threshold between two rings it no longer separates, and a tap near the boundary quietly
|
|
67
|
-
* sets the wrong hour.
|
|
73
|
+
* TRAP — the number is DERIVED from the dial tokens. A 256px dial with 48px numerals puts
|
|
74
|
+
* the rings' centres at 104px and 56px from the middle, whose midpoint is 0.625 of the
|
|
75
|
+
* radius. Change either token without changing this and the threshold no longer separates
|
|
76
|
+
* the two rings: a tap near the boundary quietly sets the wrong hour.
|
|
68
77
|
*/
|
|
69
78
|
export declare const DIAL_INNER_THRESHOLD = 0.625;
|
|
70
79
|
/**
|
|
71
|
-
* Which hour a mark stands for
|
|
72
|
-
*
|
|
73
|
-
* the one at the twelve o'clock position.
|
|
80
|
+
* Which hour a mark stands for on the two-ring dial: outer carries 12 then 1-11, inner
|
|
81
|
+
* carries 00 then 13-23. Index 0 of each is the mark at twelve o'clock.
|
|
74
82
|
*/
|
|
75
83
|
export declare function dialIndexToHour24(index: number, ring: 'outer' | 'inner'): number;
|
|
76
|
-
/**
|
|
77
|
-
* The way back, which is what tells the hand where to point: midnight is the top of the
|
|
78
|
-
* inner ring, noon the top of the outer one, and three in the afternoon the third mark of
|
|
79
|
-
* the inner ring.
|
|
80
|
-
*/
|
|
84
|
+
/** The way back, which is what tells the hand where to point. */
|
|
81
85
|
export declare function hour24ToDial(hour: number): {
|
|
82
86
|
index: number;
|
|
83
87
|
ring: 'outer' | 'inner';
|
|
@@ -88,21 +92,14 @@ export interface TimeOption {
|
|
|
88
92
|
/** The same time written out for the reader: "07:30", or "7:30 AM". */
|
|
89
93
|
label: string;
|
|
90
94
|
}
|
|
91
|
-
/**
|
|
92
|
-
* A time as a count of minutes since midnight, or nothing if it is not a time. It is what
|
|
93
|
-
* gives a time its position in a list.
|
|
94
|
-
*/
|
|
95
|
+
/** A time as minutes since midnight, `null` if it is not one — its position in a list. */
|
|
95
96
|
export declare function minutesOf(time: string | null | undefined): number | null;
|
|
96
97
|
/**
|
|
97
|
-
* Every time of the day at a given interval,
|
|
98
|
-
* next.
|
|
98
|
+
* Every time of the day at a given interval, midnight to the last one before the next.
|
|
99
99
|
*
|
|
100
|
-
* There is deliberately no earliest or latest
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
* An interval that makes no sense — nothing, a fraction, more than an hour — falls back
|
|
104
|
-
* to one an hour. The list has to stay FINITE even when the warning the component prints
|
|
105
|
-
* about it was ignored, since an interval of zero would build times for ever.
|
|
100
|
+
* There is deliberately no earliest or latest, VTimePicker having none: do not invent one.
|
|
101
|
+
* A nonsensical step — zero, a fraction, more than an hour — falls back to hourly, so the
|
|
102
|
+
* list stays FINITE even when the component's warning about it was ignored.
|
|
106
103
|
*/
|
|
107
104
|
export declare function timeList(step: number, locale: string, format: HourFormat): TimeOption[];
|
|
108
105
|
/**
|
|
@@ -111,28 +108,23 @@ export declare function timeList(step: number, locale: string, format: HourForma
|
|
|
111
108
|
*/
|
|
112
109
|
export declare function formatTimeMask(digits: string): string;
|
|
113
110
|
/**
|
|
114
|
-
* Where the caret belongs
|
|
115
|
-
*
|
|
116
|
-
* It is a plain formula rather than a scan of the text, because a time's separator is
|
|
117
|
-
* always in the same place — which is exactly what the date's equivalent cannot assume,
|
|
118
|
-
* since the order and the width of its parts change from one language to the next.
|
|
111
|
+
* Where the caret belongs to sit just after `n` digits. A closed formula rather than
|
|
112
|
+
* `date.ts`'s scan, the colon always being in the same place.
|
|
119
113
|
*
|
|
120
|
-
*
|
|
121
|
-
* minutes. On a
|
|
122
|
-
* over the colon instead of erasing a digit
|
|
114
|
+
* `skipSeparator` means something was INSERTED, and the caret then steps over the colon
|
|
115
|
+
* into the minutes. On a DELETION it stays in front of it, or the next Backspace steps
|
|
116
|
+
* over the colon instead of erasing a digit and the key appears to do nothing.
|
|
123
117
|
*/
|
|
124
118
|
export declare function timeCaret(n: number, skipSeparator?: boolean): number;
|
|
125
119
|
/**
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
120
|
+
* A canonical time written into the field in whichever form is SHOWN. On a 12-hour clock the
|
|
121
|
+
* hour comes back into 1-12: the meridiem belongs to the toggle beside the field, never to
|
|
122
|
+
* the text.
|
|
129
123
|
*/
|
|
130
124
|
export declare function timeToMask(time: string | null | undefined, format: HourFormat): string;
|
|
131
125
|
/**
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
* On a 12-hour clock the half of the day comes from the pair of buttons beside the field.
|
|
136
|
-
* This is the ONE place where what was typed and that choice meet.
|
|
126
|
+
* What was typed read back into a canonical time, or `null` when it is incomplete, too long
|
|
127
|
+
* or not a real time. On a 12-hour clock this is the ONE place the typed digits and the
|
|
128
|
+
* meridiem toggle meet.
|
|
137
129
|
*/
|
|
138
130
|
export declare function parseTimeMask(text: string, format: HourFormat, meridiem?: Meridiem): string | null;
|
package/dist/utils/time.js
CHANGED
|
@@ -1,39 +1,44 @@
|
|
|
1
1
|
import { digitsOf as e, pad2 as t } from "./text.js";
|
|
2
|
+
import { memo as n } from "./memo.js";
|
|
2
3
|
//#region src/utils/time.ts
|
|
3
|
-
var
|
|
4
|
-
function r(e) {
|
|
5
|
-
return typeof e == "string" && n.test(e);
|
|
6
|
-
}
|
|
4
|
+
var r = /^([01]\d|2[0-3]):([0-5]\d)$/;
|
|
7
5
|
function i(e) {
|
|
8
|
-
|
|
6
|
+
return typeof e == "string" && r.test(e);
|
|
7
|
+
}
|
|
8
|
+
function a(e) {
|
|
9
|
+
if (!i(e)) return null;
|
|
9
10
|
let [t, n] = e.split(":");
|
|
10
11
|
return {
|
|
11
12
|
hour: Number(t),
|
|
12
13
|
minute: Number(n)
|
|
13
14
|
};
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
+
function o(e, n) {
|
|
16
17
|
return `${t(e)}:${t(n)}`;
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
+
function s(e) {
|
|
19
20
|
let t = e >= 12 ? "PM" : "AM";
|
|
20
21
|
return {
|
|
21
22
|
hour: e % 12 == 0 ? 12 : e % 12,
|
|
22
23
|
meridiem: t
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
+
function c(e, t) {
|
|
26
27
|
let n = e % 12;
|
|
27
28
|
return t === "PM" ? n + 12 : n;
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
let n =
|
|
34
|
-
return
|
|
30
|
+
function l(e, t) {
|
|
31
|
+
return c(s(e).hour, t);
|
|
32
|
+
}
|
|
33
|
+
function u(e, t) {
|
|
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));
|
|
35
40
|
}
|
|
36
|
-
function
|
|
41
|
+
function p(e) {
|
|
37
42
|
try {
|
|
38
43
|
let { hourCycle: t } = new Intl.DateTimeFormat(e, { hour: "numeric" }).resolvedOptions();
|
|
39
44
|
return t === "h11" || t === "h12" ? "12h" : "24h";
|
|
@@ -41,35 +46,34 @@ function u(e) {
|
|
|
41
46
|
return "24h";
|
|
42
47
|
}
|
|
43
48
|
}
|
|
44
|
-
var
|
|
45
|
-
function
|
|
46
|
-
|
|
47
|
-
return r || (r = new Intl.DateTimeFormat(e, {
|
|
49
|
+
var m = /* @__PURE__ */ new Map();
|
|
50
|
+
function h(e, t) {
|
|
51
|
+
return n(m, `${e}|${t}`, () => new Intl.DateTimeFormat(e, {
|
|
48
52
|
hour: "numeric",
|
|
49
53
|
minute: "2-digit",
|
|
50
54
|
hourCycle: t === "12h" ? "h12" : "h23",
|
|
51
55
|
timeZone: "UTC"
|
|
52
|
-
})
|
|
56
|
+
}));
|
|
53
57
|
}
|
|
54
|
-
function
|
|
55
|
-
let r =
|
|
56
|
-
return r ?
|
|
58
|
+
function g(e, t, n) {
|
|
59
|
+
let r = a(e);
|
|
60
|
+
return r ? h(t, n).format(Date.UTC(2021, 0, 1, r.hour, r.minute)) : "";
|
|
57
61
|
}
|
|
58
|
-
function
|
|
62
|
+
function _(e, t) {
|
|
59
63
|
return ((t <= 1 ? Math.round(e) : Math.round(e / t) * t) % 60 + 60) % 60;
|
|
60
64
|
}
|
|
61
|
-
function
|
|
65
|
+
function v(e, t, n) {
|
|
62
66
|
let r = (Math.atan2(e, -t) / (2 * Math.PI) + 1) % 1;
|
|
63
67
|
return Math.round(r * n) % n;
|
|
64
68
|
}
|
|
65
|
-
function
|
|
69
|
+
function y(e, t, n) {
|
|
66
70
|
return n > 0 ? Math.hypot(e, t) / n : 0;
|
|
67
71
|
}
|
|
68
|
-
var
|
|
69
|
-
function
|
|
72
|
+
var b = .625;
|
|
73
|
+
function x(e, t) {
|
|
70
74
|
return t === "outer" ? e === 0 ? 12 : e : e === 0 ? 0 : e + 12;
|
|
71
75
|
}
|
|
72
|
-
function
|
|
76
|
+
function S(e) {
|
|
73
77
|
return e === 0 ? {
|
|
74
78
|
index: 0,
|
|
75
79
|
ring: "inner"
|
|
@@ -84,40 +88,40 @@ function y(e) {
|
|
|
84
88
|
ring: "outer"
|
|
85
89
|
};
|
|
86
90
|
}
|
|
87
|
-
function
|
|
88
|
-
let t =
|
|
91
|
+
function C(e) {
|
|
92
|
+
let t = a(e);
|
|
89
93
|
return t ? t.hour * 60 + t.minute : null;
|
|
90
94
|
}
|
|
91
|
-
function
|
|
95
|
+
function w(e, t, n) {
|
|
92
96
|
let r = Number.isInteger(e) && e >= 1 && e <= 60 ? e : 60, i = [];
|
|
93
97
|
for (let e = 0; e < 1440; e += r) {
|
|
94
|
-
let r =
|
|
98
|
+
let r = o(Math.floor(e / 60), e % 60);
|
|
95
99
|
i.push({
|
|
96
100
|
value: r,
|
|
97
|
-
label:
|
|
101
|
+
label: g(r, t, n)
|
|
98
102
|
});
|
|
99
103
|
}
|
|
100
104
|
return i;
|
|
101
105
|
}
|
|
102
|
-
var
|
|
103
|
-
function
|
|
106
|
+
var T = ":";
|
|
107
|
+
function E(t) {
|
|
104
108
|
let n = e(t).slice(0, 4);
|
|
105
|
-
return n.length >= 2 ? `${n.slice(0, 2)}${
|
|
109
|
+
return n.length >= 2 ? `${n.slice(0, 2)}${T}${n.slice(2)}` : n;
|
|
106
110
|
}
|
|
107
|
-
function
|
|
111
|
+
function D(e, t = !1) {
|
|
108
112
|
return e < 2 ? e : e === 2 ? t ? 3 : 2 : Math.min(e + 1, 5);
|
|
109
113
|
}
|
|
110
|
-
function
|
|
111
|
-
let r =
|
|
112
|
-
return r ?
|
|
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)) : "";
|
|
113
117
|
}
|
|
114
|
-
function
|
|
118
|
+
function k(t, n, r = "AM") {
|
|
115
119
|
let i = e(t);
|
|
116
120
|
if (i.length !== 4) return null;
|
|
117
|
-
let
|
|
118
|
-
return
|
|
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;
|
|
119
123
|
}
|
|
120
124
|
//#endregion
|
|
121
|
-
export {
|
|
125
|
+
export { b as DIAL_INNER_THRESHOLD, v as angleToIndex, x as dialIndexToHour24, y as distanceFraction, o as formatTime, g as formatTimeDisplay, E as formatTimeMask, S as hour24ToDial, f as hourCycleFor, l as hourWithMeridiem, i as isValidTime, C as minutesOf, a as parseTime, k as parseTimeMask, _ as snapMinute, D as timeCaret, w as timeList, O as timeToMask, s as to12h, c as to24h, u as withMeridiem };
|
|
122
126
|
|
|
123
127
|
//# 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 * All the reasoning about TIMES that the time picker and its clock face rest on. Nothing\n * here draws anything or touches the page: give it the same numbers twice and it answers\n * the same way twice.\n *\n * A time is always carried as text of the form \"19:05\", counted on the 24-hour clock, no\n * matter how it is being SHOWN — a picker displaying \"7:05 PM\" still holds \"19:05\". That\n * one rule is what keeps the value a consumer receives independent of the reader's\n * language and habits.\n *\n * Dates are used only to ask the browser to write a time out in someone's language, and\n * always at a fixed reference instant taken in universal time. Nothing here therefore\n * depends on the clock of the machine it runs on, which is what lets a page rendered on a\n * server and the same page in the browser agree.\n *\n * The clock face's geometry — where a finger landed, which ring it fell on — is worked\n * out here too, and for a practical reason: the environment the tests run in has no\n * layout at all and measures every element as having no size, so a calculation kept\n * inside the component could not be tested.\n */\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// @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 */\nconst hourCycleCache = new Map<string, HourFormat>()\n\nexport function hourCycleFor(locale: string): HourFormat {\n const cached = hourCycleCache.get(locale)\n if (cached) return cached\n const format = resolveHourCycle(locale)\n hourCycleCache.set(locale, format)\n return format\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 language and clock, kept for as long as the page lives — the same\n * arrangement as the one that writes out file sizes.\n *\n * Building a formatter costs one to two orders of magnitude more than using one, and the\n * list of times is built ONE ENTRY AT A TIME: a list at one-minute intervals is 1440\n * entries, so 1440 formatters would be built every time it is recalculated — measured at\n * around 82 ms, against 2 ms once they are kept. Both the language AND the clock make up\n * the key, since the clock is imposed below rather than following from the language.\n */\nconst displayFormatters = new Map<string, Intl.DateTimeFormat>()\n\nfunction displayFormatterFor(locale: string, format: HourFormat): Intl.DateTimeFormat {\n const key = `${locale}|${format}`\n let formatter = displayFormatters.get(key)\n if (!formatter) {\n formatter = new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n minute: '2-digit',\n hourCycle: format === '12h' ? 'h12' : 'h23',\n timeZone: 'UTC',\n })\n displayFormatters.set(key, formatter)\n }\n return formatter\n}\n\n/**\n * A time written out for a reader — \"19:05\", or \"7:05 PM\".\n *\n * The choice of clock is imposed on the browser rather than left to it, so that the text\n * follows what the component settled on. A consumer may ask for a 24-hour clock in a\n * language that would have chosen otherwise, and their choice must be the one that shows.\n */\nexport function formatDisplay(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 one the component allows — every five minutes, say — and\n * brings it back inside the hour.\n *\n * Both ends need that last part: 58 minutes snapped to five-minute steps lands on 60,\n * which is 0, and stepping back from 0 with the keyboard goes through minus one, which is\n * 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 * Where a finger landed on the clock face, given as an offset from the centre, becomes\n * which mark it was pointing at.\n *\n * The marks are numbered from the twelve o'clock position and go round clockwise, and the\n * nearest one wins. The offsets are the ones the screen uses, where going DOWN is\n * positive, which is why the vertical one is negated to measure the angle from the top.\n */\nexport function angleToIndex(dx: number, dy: number, segments: number): number {\n // The angle from twelve o'clock, positive going clockwise, then that same angle as a\n // 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 finger has to land for it to be aiming at the INNER ring of\n * numbers, the one holding the small hours of a 24-hour clock. It is the halfway mark\n * between the two rings of numerals.\n *\n * TRAP — the number is DERIVED from the dial's size and the size of a numeral, both of\n * which are decided in the stylesheet: a dial of 256px across and numerals of 48px put\n * the two rings' centres at 104px and 56px from the middle, whose halfway point is\n * 0.625 of the radius. Changing either size in the CSS without changing this leaves the\n * threshold between two rings it no longer separates, and a tap near the boundary quietly\n * sets the wrong hour.\n */\nexport const DIAL_INNER_THRESHOLD = 0.625\n\n/**\n * Which hour a mark stands for, on a dial laid out as two rings: the outer one carries 12\n * then 1 to 11, the inner one carries midnight then 13 to 23. The first mark of each is\n * the one at the twelve o'clock position.\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/**\n * The way back, which is what tells the hand where to point: midnight is the top of the\n * inner ring, noon the top of the outer one, and three in the afternoon the third mark of\n * the inner ring.\n */\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/**\n * A time as a count of minutes since midnight, or nothing if it is not a time. It is what\n * gives a time its position in a list.\n */\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, from midnight up to the last one before the\n * next.\n *\n * There is deliberately no earliest or latest here, because the time picker itself has\n * none: do not invent one.\n *\n * An interval that makes no sense — nothing, a fraction, more than an hour — falls back\n * to one an hour. The list has to stay FINITE even when the warning the component prints\n * about it was ignored, since an interval of zero would build times for ever.\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: formatDisplay(value, locale, format) })\n }\n return out\n}\n\n/*\n * What separates the hours from the minutes as a time is typed.\n *\n * Unlike a date's separator, this one is the SAME everywhere: every language writes a\n * time with a colon, and what varies between them is only whether the hours run to twelve\n * or to twenty-four.\n *\n * The grey template shown in an empty field lives in the dictionary instead, because\n * \"hh:mm\" is made of the initials of WORDS and those do change from one language to the\n * next — where the colon does not.\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 so as to sit just after a given number of digits.\n *\n * It is a plain formula rather than a scan of the text, because a time's separator is\n * always in the same place — which is exactly what the date's equivalent cannot assume,\n * since the order and the width of its parts change from one language to the next.\n *\n * The flag says something was INSERTED, and the caret then steps over the colon into the\n * minutes. On a deletion it stays in FRONT of it, or the next press of the key would step\n * over the colon instead of erasing a digit, and the key would appear 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 * Writes a canonical time into the field, in whichever form is being SHOWN. On a 12-hour\n * clock the hour is brought back into the range 1 to 12: which half of the day it is\n * belongs to the pair of buttons beside the field, and never to the text itself.\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 * Reads what has been typed back into a canonical time, or nothing at all when it is\n * incomplete, too long, or not a time anyone could point to.\n *\n * On a 12-hour clock the half of the day comes from the pair of buttons beside the field.\n * This is the ONE place where what was typed and that choice 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":";;AAgCA,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;AAOA,SAAgB,EAAM,GAAsD;CAC1E,IAAM,IAAqB,KAAU,KAAK,OAAO;CAEjD,OAAO;EAAE,MADI,IAAS,MAAO,IAAI,KAAK,IAAS;EAChC;CAAS;AAC1B;AAMA,SAAgB,EAAM,GAAgB,GAA4B;CAChE,IAAM,IAAO,IAAS;CACtB,OAAO,MAAa,OAAO,IAAO,KAAK;AACzC;AAUA,IAAM,oBAAiB,IAAI,IAAwB;AAEnD,SAAgB,EAAa,GAA4B;CACvD,IAAM,IAAS,EAAe,IAAI,CAAM;CACxC,IAAI,GAAQ,OAAO;CACnB,IAAM,IAAS,EAAiB,CAAM;CAEtC,OADA,EAAe,IAAI,GAAQ,CAAM,GAC1B;AACT;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;AAYA,IAAM,oBAAoB,IAAI,IAAiC;AAE/D,SAAS,EAAoB,GAAgB,GAAyC;CACpF,IAAM,IAAM,GAAG,EAAO,GAAG,KACrB,IAAY,EAAkB,IAAI,CAAG;CAUzC,OATK,MACH,IAAY,IAAI,KAAK,eAAe,GAAQ;EAC1C,MAAM;EACN,QAAQ;EACR,WAAW,MAAW,QAAQ,QAAQ;EACtC,UAAU;CACZ,CAAC,GACD,EAAkB,IAAI,GAAK,CAAS,IAE/B;AACT;AASA,SAAgB,EAAc,GAAc,GAAgB,GAA4B;CACtF,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;AAUA,SAAgB,EAAW,GAAgB,GAAsB;CAE/D,SADgB,KAAQ,IAAI,KAAK,MAAM,CAAM,IAAI,KAAK,MAAM,IAAS,CAAI,IAAI,KAC1D,KAAM,MAAM;AACjC;AAUA,SAAgB,EAAa,GAAY,GAAY,GAA0B;CAI7E,IAAM,KADQ,KAAK,MAAM,GAAI,CAAC,CAChB,KAAS,IAAI,KAAK,MAAM,KAAK;CAC3C,OAAO,KAAK,MAAM,IAAO,CAAQ,IAAI;AACvC;AAGA,SAAgB,EAAiB,GAAY,GAAY,GAAwB;CAC/E,OAAO,IAAS,IAAI,KAAK,MAAM,GAAI,CAAE,IAAI,IAAS;AACpD;AAcA,IAAa,IAAuB;AAOpC,SAAgB,EAAkB,GAAe,GAAiC;CAEhF,OADI,MAAS,UAAgB,MAAU,IAAI,KAAK,IACzC,MAAU,IAAI,IAAI,IAAQ;AACnC;AAOA,SAAgB,EAAa,GAA0D;CAIrF,OAHI,MAAS,IAAU;EAAE,OAAO;EAAG,MAAM;CAAQ,IAC7C,MAAS,KAAW;EAAE,OAAO;EAAG,MAAM;CAAQ,IAC9C,IAAO,KAAW;EAAE,OAAO,IAAO;EAAI,MAAM;CAAQ,IACjD;EAAE,OAAO;EAAM,MAAM;CAAQ;AACtC;AAaA,SAAgB,EAAU,GAAgD;CACxE,IAAM,IAAQ,EAAU,CAAI;CAC5B,OAAO,IAAQ,EAAM,OAAO,KAAK,EAAM,SAAS;AAClD;AAaA,SAAgB,EAAS,GAAc,GAAgB,GAAkC;CACvF,IAAM,IAAO,OAAO,UAAU,CAAI,KAAK,KAAQ,KAAK,KAAQ,KAAK,IAAO,IAClE,IAAoB,CAAC;CAC3B,KAAK,IAAI,IAAI,GAAG,IAAI,MAAS,KAAK,GAAM;EACtC,IAAM,IAAQ,EAAW,KAAK,MAAM,IAAI,EAAE,GAAG,IAAI,EAAE;EACnD,EAAI,KAAK;GAAE;GAAO,OAAO,EAAc,GAAO,GAAQ,CAAM;EAAE,CAAC;CACjE;CACA,OAAO;AACT;AAaA,IAAM,IAAiB;AAMvB,SAAgB,EAAe,GAAwB;CACrD,IAAM,IAAM,EAAS,CAAM,CAAC,CAAC,MAAM,GAAG,CAAC;CACvC,OAAO,EAAI,UAAU,IAAI,GAAG,EAAI,MAAM,GAAG,CAAC,IAAI,IAAiB,EAAI,MAAM,CAAC,MAAM;AAClF;AAaA,SAAgB,EAAU,GAAW,IAAgB,IAAe;CAGlE,OAFI,IAAI,IAAU,IACd,MAAM,IAAU,IAAgB,IAAI,IACjC,KAAK,IAAI,IAAI,GAAG,CAAC;AAC1B;AAOA,SAAgB,EAAW,GAAiC,GAA4B;CACtF,IAAM,IAAQ,EAAU,CAAI;CAG5B,OAFK,IAEE,EAAe,EADT,MAAW,QAAQ,EAAM,EAAM,IAAI,CAAC,CAAC,OAAO,EAAM,IAChC,IAAI,EAAK,EAAM,MAAM,CAAC,IAFlC;AAGrB;AASA,SAAgB,EACd,GACA,GACA,IAAqB,MACN;CACf,IAAM,IAAS,EAAS,CAAI;CAC5B,IAAI,EAAO,WAAW,GAAG,OAAO;CAChC,IAAM,IAAO,OAAO,EAAO,MAAM,GAAG,CAAC,CAAC,GAChC,IAAS,OAAO,EAAO,MAAM,CAAC,CAAC;CAIrC,OAHI,IAAS,KAAW,OACpB,MAAW,QACN,KAAQ,KAAK,KAAQ,KAAK,EAAW,EAAM,GAAM,CAAQ,GAAG,CAAM,IAAI,OACxE,KAAQ,KAAK,EAAW,GAAM,CAAM,IAAI;AACjD"}
|
|
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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"}
|
package/dist/utils/vnode.d.ts
CHANGED
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* A slot's VNodes reduced to the elements that will actually render: `v-for` Fragments
|
|
4
|
+
* unwrapped, a false `v-if`'s Comment and the source text's whitespace dropped.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* This is what lets a component count its children without a registry they feed at mount.
|
|
7
|
+
* A registry fills up in the browser and stays empty on the server, so the two renders
|
|
8
|
+
* disagree — VAvatarGroup would say "+0" in one and "+3" in the other. Reading the slot
|
|
9
|
+
* happens while the parent renders, which is the same on both sides.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* done on the server and everywhere in the browser, so the page the server sent and the
|
|
14
|
-
* page the browser builds would disagree — a group of avatars would say "+0" in one and
|
|
15
|
-
* "+3" in the other. The content is inspected while the parent renders, which happens on
|
|
16
|
-
* both sides alike, so the count is the same in both.
|
|
17
|
-
*
|
|
18
|
-
* It is used by the group of avatars, for the "+3" it ends with, and by the carousel, for
|
|
19
|
-
* its dots and for announcing which slide of how many is showing.
|
|
11
|
+
* Used by VAvatarGroup for its "+N", by VCarousel for its slide count and the index each
|
|
12
|
+
* slide is handed, and by VInputGroup for its dev warning on a segment carrying a label.
|
|
20
13
|
*/
|
|
21
14
|
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 *
|
|
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 * Used by VAvatarGroup for its \"+N\", by VCarousel for its slide count and the index each\n * slide is handed, and by 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":";;AAgBA,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.8.0",
|
|
4
4
|
"description": "Vue 3 design system — HTML/CSS first, CSS tokens, Nuxt 3 (SSR) compatible",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
66
|
-
"@storybook/addon-a11y": "^10.
|
|
67
|
-
"@storybook/addon-docs": "^10.
|
|
68
|
-
"@storybook/addon-vitest": "^10.
|
|
69
|
-
"@storybook/vue3-vite": "^10.
|
|
66
|
+
"@storybook/addon-a11y": "^10.6.0",
|
|
67
|
+
"@storybook/addon-docs": "^10.6.0",
|
|
68
|
+
"@storybook/addon-vitest": "^10.6.0",
|
|
69
|
+
"@storybook/vue3-vite": "^10.6.0",
|
|
70
70
|
"@testing-library/vue": "^8.1.0",
|
|
71
71
|
"@types/node": "^26.1.1",
|
|
72
72
|
"@vitejs/plugin-vue": "^6.0.8",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"jsdom": "^29.1.1",
|
|
79
79
|
"playwright": "^1.62.0",
|
|
80
80
|
"publint": "^0.3.23",
|
|
81
|
-
"storybook": "^10.
|
|
81
|
+
"storybook": "^10.6.0",
|
|
82
82
|
"tsx": "^4.23.1",
|
|
83
83
|
"typescript": "^5.9.3",
|
|
84
84
|
"vite": "^8.1.5",
|