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
|
@@ -1,21 +1,26 @@
|
|
|
1
|
-
import { usePopover as e } from "../../composables/usePopover.js";
|
|
2
|
-
import { computed as
|
|
1
|
+
import { usePopover as e, usePopoverModel as t } from "../../composables/usePopover.js";
|
|
2
|
+
import { computed as n, createElementBlock as r, createElementVNode as i, defineComponent as a, mergeModels as o, mergeProps as s, openBlock as c, ref as l, renderSlot as u, unref as d, useId as f, useModel as p, useSlots as m } from "vue";
|
|
3
3
|
//#region src/components/VPopover/VPopover.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
4
|
+
var h = ["data-trigger"], g = [
|
|
5
5
|
"id",
|
|
6
6
|
"popover",
|
|
7
|
-
"data-placement"
|
|
8
|
-
|
|
7
|
+
"data-placement",
|
|
8
|
+
"data-match-trigger"
|
|
9
|
+
], _ = /*@__PURE__*/ a({
|
|
9
10
|
inheritAttrs: !1,
|
|
10
11
|
__name: "VPopover",
|
|
11
|
-
props: /*@__PURE__*/
|
|
12
|
+
props: /*@__PURE__*/ o({
|
|
12
13
|
id: { default: void 0 },
|
|
13
14
|
placement: { default: "bottom-start" },
|
|
14
15
|
mode: { default: "auto" },
|
|
15
16
|
anchor: { default: void 0 },
|
|
16
|
-
|
|
17
|
+
bare: {
|
|
17
18
|
type: Boolean,
|
|
18
|
-
default: !
|
|
19
|
+
default: !1
|
|
20
|
+
},
|
|
21
|
+
matchTrigger: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !1
|
|
19
24
|
}
|
|
20
25
|
}, {
|
|
21
26
|
open: {
|
|
@@ -25,41 +30,42 @@ var g = ["data-trigger"], _ = [
|
|
|
25
30
|
openModifiers: {}
|
|
26
31
|
}),
|
|
27
32
|
emits: ["update:open"],
|
|
28
|
-
setup(
|
|
29
|
-
let
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
setup(a, { expose: o }) {
|
|
34
|
+
let _ = a, v = p(a, "open"), y = m(), b = l(null), x = f(), S = n(() => _.id ?? x), { shown: C, syncShown: w, show: T, hide: E } = e(b);
|
|
35
|
+
function D() {
|
|
36
|
+
return y.trigger !== void 0;
|
|
37
|
+
}
|
|
38
|
+
let O = n(() => ({
|
|
39
|
+
popovertarget: S.value,
|
|
40
|
+
"aria-expanded": v.value,
|
|
41
|
+
"aria-controls": S.value
|
|
42
|
+
})), k = n(() => ({ "--popover-anchor-name": _.anchor ?? "--popover-anchor" }));
|
|
43
|
+
function A(e) {
|
|
44
|
+
w(e), v.value = C.value;
|
|
36
45
|
}
|
|
37
|
-
return
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}),
|
|
42
|
-
show: E,
|
|
43
|
-
hide: D,
|
|
44
|
-
el: x
|
|
45
|
-
}), (e, t) => (c(), n("span", {
|
|
46
|
+
return t(v, () => C.value, T, E), o({
|
|
47
|
+
show: T,
|
|
48
|
+
close: E,
|
|
49
|
+
el: b
|
|
50
|
+
}), (e, t) => (c(), r("span", {
|
|
46
51
|
class: "v-popover",
|
|
47
|
-
"data-trigger":
|
|
48
|
-
}, [u(e.$slots, "trigger", { triggerProps:
|
|
49
|
-
id:
|
|
52
|
+
"data-trigger": D() ? "" : void 0
|
|
53
|
+
}, [u(e.$slots, "trigger", { triggerProps: O.value }), i("div", s({
|
|
54
|
+
id: S.value,
|
|
50
55
|
ref_key: "panelEl",
|
|
51
|
-
ref:
|
|
52
|
-
popover:
|
|
53
|
-
class: ["v-overlay v-popover-panel v-floating", { "v-panel":
|
|
54
|
-
"data-placement":
|
|
55
|
-
|
|
56
|
+
ref: b,
|
|
57
|
+
popover: a.mode,
|
|
58
|
+
class: ["v-overlay v-popover-panel v-floating", { "v-panel": !a.bare }],
|
|
59
|
+
"data-placement": a.placement,
|
|
60
|
+
"data-match-trigger": a.matchTrigger ? "" : void 0,
|
|
61
|
+
style: k.value
|
|
56
62
|
}, e.$attrs, {
|
|
57
|
-
onBeforetoggle: t[0] ||= (...e) => d(
|
|
58
|
-
onToggle:
|
|
59
|
-
}), [u(e.$slots, "default")], 16,
|
|
63
|
+
onBeforetoggle: t[0] ||= (...e) => d(w) && d(w)(...e),
|
|
64
|
+
onToggle: A
|
|
65
|
+
}), [u(e.$slots, "default")], 16, g)], 8, h));
|
|
60
66
|
}
|
|
61
67
|
});
|
|
62
68
|
//#endregion
|
|
63
|
-
export {
|
|
69
|
+
export { _ as default };
|
|
64
70
|
|
|
65
71
|
//# sourceMappingURL=VPopover.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VPopover.vue_vue_type_script_setup_true_lang.js","names":["$attrs"],"sources":["../../../src/components/VPopover/VPopover.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @core\n/**\n * A panel that floats above the page, next to whatever opened it. It is built on the\n * browser's own popover support and positions itself entirely in CSS, so there is no\n * positioning library involved and no JavaScript measuring anything.\n *\n * What it carries is deliberately only the PLUMBING every panel of the design system\n * needs: the popover element and how it opens, the bridge between the browser's own\n * open state and `v-model:open`, the anchoring and the placement, and an optional\n * surface — the background, border and shadow of a panel.\n *\n * What it carries NOT is just as deliberate: no ARIA role, no keyboard, no focus\n * management and no rule about when to close. Those are exactly what makes a menu\n * different from a listbox or a tooltip, and they stay with the components building\n * on it — VTooltip, VCombobox, VDateInput, VTimeInput. Turning this into one panel\n * with a `role` prop would put all four sets of behaviour back into a single file.\n *\n * There are two ways of anchoring it, and they exclude one another:\n *\n * - the `#trigger` slot, where the component wraps the trigger and names that\n * wrapper as the anchor. The name is shared by every instance and confined to each\n * wrapper's own subtree, which is what makes a panel resolve ITS trigger rather\n * than the last one named on the page — a real risk, since an open panel moves to\n * the top layer and counts as coming after the whole document.\n * - the `anchor` prop, for a consumer that already owns its root and its control —\n * VCombobox and the pickers do. They name the anchor themselves and pass the name\n * in, and the wrapper then disappears from the layout entirely.\n *\n * The only JavaScript is the bridge between `v-model:open` and the browser's own\n * imperative popover methods.\n */\nimport { computed, onMounted, ref, useId, watch } from 'vue'\n\nimport { usePopover } from '../../composables/usePopover'\n\nexport type PopoverPlacement =\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n\n/**\n * What the trigger has to carry for the browser to open the panel and for assistive\n * technology to know what it controls. It is the disclosure pattern and nothing more:\n * no role and no `aria-haspopup` are imposed, since only the consumer knows what kind\n * of panel it is opening.\n */\nexport type PopoverTriggerProps = {\n popovertarget: string\n 'aria-expanded': boolean\n 'aria-controls': string\n}\n\ninterface PopoverProps {\n /**\n * The id of the panel, which the trigger points at. One is generated when none is\n * given, so this is only needed to tie the panel to something outside the\n * component.\n */\n id?: string\n /**\n * Where the panel is placed relative to its trigger. The browser flips it to the\n * opposite side by itself when there is not enough room.\n */\n placement?: PopoverPlacement\n /**\n * How the panel closes. `auto` lets the browser dismiss it on a click outside or on\n * Escape, and stack it with other panels; `manual` leaves everything to the\n * consumer, which is what a panel with its own focus and dismissal rules needs.\n */\n mode?: 'auto' | 'manual'\n /**\n * The name of an anchor the consumer has set on its own control, written as a CSS\n * dashed identifier such as `--tooltip-anchor`. Supplying it replaces the internal\n * wrapper, which is the required route as soon as the trigger is a text input,\n * where the browser's own `popovertarget` attribute is not allowed.\n */\n anchor?: string\n /**\n * Gives the panel the look of a surface: background, border, shadow and rounded\n * corners. Turn it off for a panel that brings its own, as VDatePicker does.\n */\n surface?: boolean\n}\n\nconst props = withDefaults(defineProps<PopoverProps>(), {\n id: undefined,\n placement: 'bottom-start',\n mode: 'auto',\n anchor: undefined,\n surface: true,\n})\n\nconst open = defineModel<boolean>('open', { default: false })\n\nconst slots = defineSlots<{\n /**\n * The element that opens the panel. Bind the `triggerProps` it receives onto a\n * button of your own: that is what wires the two together.\n */\n trigger?(props: { triggerProps: PopoverTriggerProps }): unknown\n /** What the panel contains. */\n default(): unknown\n}>()\n\n/*\n * Everything the consumer passes — the ARIA role, the aria-*, the data-*, class,\n * style and the listeners — goes on the PANEL rather than on the anchoring wrapper,\n * because the panel is what the consumer is really describing and styling.\n *\n * This is a deliberate departure from the design system's usual wrapper pattern,\n * which keeps class and style on the root; `useRootAttrs` therefore does not apply\n * here.\n */\ndefineOptions({ inheritAttrs: false })\n\nconst panelEl = ref<HTMLElement | null>(null)\nconst generatedId = useId()\nconst panelId = computed(() => props.id ?? generatedId)\n\n// The open state and the guards that keep the calls idempotent live in usePopover.\n// The invariant to respect here: `shown` is fed by the panel's own events and never\n// assigned by hand, so the browser stays the source of truth — it can close the panel\n// without asking us.\nconst { shown, syncShown, show, hide } = usePopover(panelEl)\n\nconst hasTrigger = computed(() => slots.trigger !== undefined)\n\nconst triggerProps = computed<PopoverTriggerProps>(() => ({\n popovertarget: panelId.value,\n 'aria-expanded': open.value,\n 'aria-controls': panelId.value,\n}))\n\n// Both anchoring modes are served by one CSS declaration: the panel reads this\n// variable, and falls back to the wrapper's own anchor name when it is not set.\nconst panelStyle = computed(() => (props.anchor ? { '--anchor-name': props.anchor } : undefined))\n\nfunction onToggle(event: Event) {\n syncShown(event)\n open.value = shown.value\n}\n\n// Opening and closing from the model. The guard is what keeps the two directions\n// from chasing each other: a panel closed by the browser has already updated `shown`,\n// and calling hide() again would be pointless at best.\nwatch(open, (value) => {\n if (value === shown.value) return\n if (value) show()\n else hide()\n})\n\n// @ssr — a watcher does not run during the server render, so a panel asked to be\n// open from the start would never be told to open. Replaying the initial state on\n// mount is what covers that case.\nonMounted(() => {\n if (open.value) show()\n})\n\ndefineExpose({ show, hide, el: panelEl })\n</script>\n\n<template>\n <span class=\"v-popover\" :data-trigger=\"hasTrigger ? '' : undefined\">\n <slot name=\"trigger\" :trigger-props=\"triggerProps\" />\n <div\n :id=\"panelId\"\n ref=\"panelEl\"\n :popover=\"mode\"\n class=\"v-overlay v-popover-panel v-floating\"\n :class=\"{ 'v-panel': surface }\"\n :data-placement=\"placement\"\n :style=\"panelStyle\"\n v-bind=\"$attrs\"\n @beforetoggle=\"syncShown\"\n @toggle=\"onToggle\"\n >\n <slot />\n </div>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * Without a trigger the wrapper has nothing to wrap, so `display: contents` takes\n * it out of the layout entirely — the panel is positioned against the viewport and\n * does not depend on it. Left as an empty inline-block it would still create a line\n * box, and therefore add height, inside every component using this route.\n */\n .v-popover {\n display: contents;\n }\n\n /*\n * With a trigger the wrapper must generate a box, since that box is the ANCHOR —\n * which is why `display: contents` stops at the rule above. It is FLEX rather than\n * inline-block, the `.v-badge-host` and `.v-tooltip` form: both are inline-level\n * atomic boxes, so text flows around them identically, but an inline-block opens an\n * inline formatting context for the trigger, which then lands on a line box and adds\n * the strut's descender to the wrapper. The wrapper being the anchor, that offsets\n * the panel as well as the row.\n *\n * `align-items: center` covers the rest: a wrapper stretched by a parent in\n * `align-items: stretch` would otherwise stretch the trigger with it, where the\n * inline-block form left it at its natural height.\n */\n .v-popover[data-trigger] {\n display: inline-flex;\n align-items: center;\n anchor-name: --popover-anchor;\n /* Confining the name to this subtree is indispensable, not tidy: an open panel\n moves to the top layer, where anchor resolution treats it as coming after the\n whole document. Without the confinement every panel on the page would attach\n itself to the LAST wrapper carrying this name. */\n anchor-scope: --popover-anchor;\n }\n\n /*\n * The panel gets this one declaration and no dimension whatsoever. Widths, heights\n * and overflow differ from one consumer to the next, and since each component ships\n * its own stylesheet, a declaration here would sit at equal specificity with theirs\n * — leaving the winner to whichever order the consumer's bundler happens to\n * produce.\n */\n .v-popover-panel {\n position-anchor: var(--anchor-name, --popover-anchor);\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8FA,IAAM,IAAQ,GAQR,IAAO,EAAoB,GAAC,MAA0B,GAEtD,IAAQ,EAAA,GAqBR,IAAU,EAAwB,IAAI,GACtC,IAAc,EAAM,GACpB,IAAU,QAAe,EAAM,MAAM,CAAW,GAMhD,EAAE,UAAO,cAAW,SAAM,YAAS,EAAW,CAAO,GAErD,IAAa,QAAe,EAAM,YAAY,KAAA,CAAS,GAEvD,IAAe,SAAqC;GACxD,eAAe,EAAQ;GACvB,iBAAiB,EAAK;GACtB,iBAAiB,EAAQ;EAC3B,EAAE,GAII,IAAa,QAAgB,EAAM,SAAS,EAAE,iBAAiB,EAAM,OAAO,IAAI,KAAA,CAAU;EAEhG,SAAS,EAAS,GAAc;GAE9B,AADA,EAAU,CAAK,GACf,EAAK,QAAQ,EAAM;EACrB;SAKA,EAAM,IAAO,MAAU;GACjB,MAAU,EAAM,UAChB,IAAO,EAAK,IACX,EAAK;EACZ,CAAC,GAKD,QAAgB;GACd,AAAI,EAAK,SAAO,EAAK;EACvB,CAAC,GAED,EAAa;GAAE;GAAM;GAAM,IAAI;EAAQ,CAAC,mBAItC,EAgBO,QAAA;GAhBD,OAAM;GAAa,gBAAc,EAAA,QAAU,KAAQ,KAAA;MACvD,EAAqD,EAAA,QAAA,WAAA,EAA/B,cAAe,EAAA,MAAY,CAAA,GACjD,EAaM,OAbN,EAaM;GAZH,IAAI,EAAA;YACD;GAAJ,KAAI;GACH,SAAS,EAAA;GACV,OAAK,CAAC,wCAAsC,EAAA,WACvB,EAAA,QAAO,CAAA;GAC3B,kBAAgB,EAAA;GAChB,OAAO,EAAA;KACAA,EAAAA,QAAM;GACb,gBAAY,AAAA,EAAA,QAAA,GAAA,MAAE,EAAA,CAAA,KAAA,EAAA,CAAA,CAAA,CAAA,GAAA,CAAA;GACN;OAET,EAAQ,EAAA,QAAA,SAAA,CAAA,GAAA,IAAA,CAAA,CAAA,GAAA,GAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"VPopover.vue_vue_type_script_setup_true_lang.js","names":["$attrs"],"sources":["../../../src/components/VPopover/VPopover.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @core\n/**\n * A panel that floats above the page, next to whatever opened it. It is built on the\n * browser's own popover support and positions itself entirely in CSS, so there is no\n * positioning library involved and no JavaScript measuring anything.\n *\n * What it carries is deliberately only the PLUMBING every panel of the design system\n * needs: the popover element and how it opens, the bridge between the browser's own\n * open state and `v-model:open`, the anchoring and the placement, and the surface a\n * panel is drawn on — its background, border and shadow, which `bare` strips away.\n *\n * What it carries NOT is just as deliberate: no ARIA role, no keyboard, no focus\n * management and no rule about when to close. Those are exactly what makes a menu\n * different from a listbox or a tooltip, and they stay with the components building\n * on it — VTooltip, VCombobox, VDateInput, VTimeInput. Turning this into one panel\n * with a `role` prop would put all four sets of behaviour back into a single file.\n *\n * There are two ways of anchoring it, and they exclude one another:\n *\n * - the `#trigger` slot, where the component wraps the trigger and names that\n * wrapper as the anchor. The name is shared by every instance and confined to each\n * wrapper's own subtree, which is what makes a panel resolve ITS trigger rather\n * than the last one named on the page — a real risk, since an open panel moves to\n * the top layer and counts as coming after the whole document.\n * - the `anchor` prop, for a consumer that already owns its root and its control —\n * VCombobox and the pickers do. They name the anchor themselves and pass the name\n * in, and the wrapper then disappears from the layout entirely.\n *\n * The only JavaScript is the bridge between `v-model:open` and the browser's own\n * imperative popover methods.\n */\nimport { computed, ref, useId } from 'vue'\n\nimport { usePopover, usePopoverModel } from '../../composables/usePopover'\n\nexport type PopoverPlacement =\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n\n/**\n * What the trigger has to carry for the browser to open the panel and for assistive\n * technology to know what it controls. It is the disclosure pattern and nothing more:\n * no role and no `aria-haspopup` are imposed, since only the consumer knows what kind\n * of panel it is opening.\n */\nexport type PopoverTriggerProps = {\n popovertarget: string\n 'aria-expanded': boolean\n 'aria-controls': string\n}\n\n/** Whether the browser dismisses the panel on its own. */\nexport type PopoverMode = 'auto' | 'manual'\n\ninterface PopoverProps {\n /**\n * The id of the panel, which the trigger points at. One is generated when none is\n * given, so this is only needed to tie the panel to something outside the\n * component.\n */\n id?: string\n /**\n * Where the panel is placed relative to its trigger. The browser flips it to the\n * opposite side by itself when there is not enough room.\n */\n placement?: PopoverPlacement\n /**\n * How the panel closes. `auto` lets the browser dismiss it on a click outside or on\n * Escape, and stack it with other panels; `manual` leaves everything to the\n * consumer, which is what a panel with its own focus and dismissal rules needs.\n */\n mode?: PopoverMode\n /**\n * The name of an anchor the consumer has set on its own control, written as a CSS\n * dashed identifier such as `--tooltip-anchor`. Supplying it replaces the internal\n * wrapper, which is the required route as soon as the trigger is a text input,\n * where the browser's own `popovertarget` attribute is not allowed.\n */\n anchor?: string\n /**\n * Strips the panel of the design system's surface: no background, no border, no\n * shadow and no rounded corners. It is what a panel whose content brings its own\n * asks for, as VDatePicker does.\n */\n bare?: boolean\n /**\n * Stops the panel being narrower than whatever it is anchored to. It is a FLOOR, so a\n * panel with a width of its own still grows past it rather than being clamped to the\n * trigger — which is what a list of long labels under a short field wants.\n */\n matchTrigger?: boolean\n}\n\nconst props = withDefaults(defineProps<PopoverProps>(), {\n id: undefined,\n placement: 'bottom-start',\n mode: 'auto',\n anchor: undefined,\n bare: false,\n matchTrigger: false,\n})\n\n/**\n * Whether the panel is showing. It starts closed and is BIDIRECTIONAL, fed from the DOM: in\n * `auto` mode the browser's own light dismiss writes back to it. Setting it opens and closes\n * the panel; a consumer needing the change to be synchronous uses the exposed `show`/`close`\n * instead, which is what VTooltip and the pickers do.\n */\nconst open = defineModel<boolean>('open', { default: false })\n\nconst slots = defineSlots<{\n /**\n * The element that opens the panel. Bind the `triggerProps` it receives onto a\n * button of your own: that is what wires the two together.\n */\n trigger?(props: { triggerProps: PopoverTriggerProps }): unknown\n /** What the panel contains. */\n default(): unknown\n}>()\n\n/*\n * Everything the consumer passes — the ARIA role, the aria-*, the data-*, class,\n * style and the listeners — goes on the PANEL rather than on the anchoring wrapper,\n * because the panel is what the consumer is really describing and styling.\n *\n * This is a deliberate departure from the design system's usual wrapper pattern,\n * which keeps class and style on the root; `useRootAttrs` therefore does not apply\n * here.\n */\ndefineOptions({ inheritAttrs: false })\n\nconst panelEl = ref<HTMLElement | null>(null)\nconst generatedId = useId()\nconst panelId = computed(() => props.id ?? generatedId)\n\n// The open state and the guards that keep the calls idempotent live in usePopover.\n// The invariant to respect here: `shown` is fed by the panel's own events and never\n// assigned by hand, so the browser stays the source of truth — it can close the panel\n// without asking us.\nconst { shown, syncShown, show, hide } = usePopover(panelEl)\n\n// TRAP — a function read by the template, never a `computed`: `slots` is not reactive, so a\n// computed would keep its first answer while a slot behind a `v-if` comes and goes.\nfunction hasTrigger() {\n return slots.trigger !== undefined\n}\n\nconst triggerProps = computed<PopoverTriggerProps>(() => ({\n popovertarget: panelId.value,\n 'aria-expanded': open.value,\n 'aria-controls': panelId.value,\n}))\n\n// Both anchoring modes are served by one CSS declaration: the panel reads this variable,\n// which names either the consumer's anchor or the wrapper's own.\n//\n// TRAP — it is set inline in BOTH modes, never left to a fallback. A custom property\n// INHERITS: left unset in the `#trigger` mode, the panel read whatever an ancestor had\n// set — a VPopover placed in VDateInput's `#footer` inherited the date field's anchor and\n// opened under the field instead of under its own trigger, with no error anywhere.\nconst panelStyle = computed(() => ({\n '--popover-anchor-name': props.anchor ?? '--popover-anchor',\n}))\n\nfunction onToggle(event: Event) {\n syncShown(event)\n open.value = shown.value\n}\n\nusePopoverModel(open, () => shown.value, show, hide)\n\n// The imperative counterpart of `v-model:open`, for a consumer whose opening must be\n// SYNCHRONOUS: the model would insert a tick, which is exactly what VTooltip's delay and\n// the pickers' focus frame cannot afford.\ndefineExpose({\n /** Opens the panel at once, without waiting for the model to come round. */\n show,\n /** Closes it at once. Safe to call on a panel that is already closed. */\n close: hide,\n /** The panel element itself, which is the popover. */\n el: panelEl,\n})\n</script>\n\n<template>\n <span class=\"v-popover\" :data-trigger=\"hasTrigger() ? '' : undefined\">\n <slot name=\"trigger\" :trigger-props=\"triggerProps\" />\n <div\n :id=\"panelId\"\n ref=\"panelEl\"\n :popover=\"mode\"\n class=\"v-overlay v-popover-panel v-floating\"\n :class=\"{ 'v-panel': !bare }\"\n :data-placement=\"placement\"\n :data-match-trigger=\"matchTrigger ? '' : undefined\"\n :style=\"panelStyle\"\n v-bind=\"$attrs\"\n @beforetoggle=\"syncShown\"\n @toggle=\"onToggle\"\n >\n <slot />\n </div>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * Without a trigger the wrapper has nothing to wrap, so `display: contents` takes\n * it out of the layout entirely — the panel is positioned against the viewport and\n * does not depend on it. Left as an empty inline-block it would still create a line\n * box, and therefore add height, inside every component using this route.\n */\n .v-popover {\n display: contents;\n }\n\n /*\n * With a trigger the wrapper must generate a box, since that box is the ANCHOR —\n * which is why `display: contents` stops at the rule above. It is FLEX rather than\n * inline-block, the `.v-badge-host` and `.v-tooltip` form: both are inline-level\n * atomic boxes, so text flows around them identically, but an inline-block opens an\n * inline formatting context for the trigger, which then lands on a line box and adds\n * the strut's descender to the wrapper. The wrapper being the anchor, that offsets\n * the panel as well as the row.\n *\n * `align-items: center` covers the rest: a wrapper stretched by a parent in\n * `align-items: stretch` would otherwise stretch the trigger with it, where the\n * inline-block form left it at its natural height.\n */\n .v-popover[data-trigger] {\n display: inline-flex;\n align-items: center;\n anchor-name: --popover-anchor;\n /* Confining the name to this subtree is indispensable, not tidy: an open panel\n moves to the top layer, where anchor resolution treats it as coming after the\n whole document. Without the confinement every panel on the page would attach\n itself to the LAST wrapper carrying this name. */\n anchor-scope: --popover-anchor;\n }\n\n /*\n * The panel gets this one declaration and no dimension whatsoever. Widths, heights\n * and overflow differ from one consumer to the next, and since each component ships\n * its own stylesheet, a declaration here would sit at equal specificity with theirs\n * — leaving the winner to whichever order the consumer's bundler happens to\n * produce.\n */\n .v-popover-panel {\n position-anchor: var(--popover-anchor-name);\n }\n\n /*\n * The one dimension this sheet does carry, and it is a FLOOR rather than a size: a panel\n * may not come out narrower than what it is anchored to. It is written here rather than in\n * each consumer because `anchor-size()` resolves against `position-anchor`, which is the\n * declaration above — the same reason the anchoring itself lives here.\n *\n * A minimum beats a maximum, so a consumer's own `max-inline-size` does not clamp it: a\n * trigger wider than the ceiling widens the panel past it, which is intended. VMenu carries\n * the twin of this rule, being deliberately outside VPopover, and answers to the same word.\n */\n .v-popover-panel[data-match-trigger] {\n min-inline-size: anchor-size(width);\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwGA,IAAM,IAAQ,GAeR,IAAO,EAAoB,GAAC,MAA0B,GAEtD,IAAQ,EAAA,GAqBR,IAAU,EAAwB,IAAI,GACtC,IAAc,EAAM,GACpB,IAAU,QAAe,EAAM,MAAM,CAAW,GAMhD,EAAE,UAAO,cAAW,SAAM,YAAS,EAAW,CAAO;EAI3D,SAAS,IAAa;GACpB,OAAO,EAAM,YAAY,KAAA;EAC3B;EAEA,IAAM,IAAe,SAAqC;GACxD,eAAe,EAAQ;GACvB,iBAAiB,EAAK;GACtB,iBAAiB,EAAQ;EAC3B,EAAE,GASI,IAAa,SAAgB,EACjC,yBAAyB,EAAM,UAAU,mBAC3C,EAAE;EAEF,SAAS,EAAS,GAAc;GAE9B,AADA,EAAU,CAAK,GACf,EAAK,QAAQ,EAAM;EACrB;SAEA,EAAgB,SAAY,EAAM,OAAO,GAAM,CAAI,GAKnD,EAAa;GAEX;GAEA,OAAO;GAEP,IAAI;EACN,CAAC,mBAIC,EAiBO,QAAA;GAjBD,OAAM;GAAa,gBAAc,EAAU,IAAA,KAAU,KAAA;MACzD,EAAqD,EAAA,QAAA,WAAA,EAA/B,cAAe,EAAA,MAAY,CAAA,GACjD,EAcM,OAdN,EAcM;GAbH,IAAI,EAAA;YACD;GAAJ,KAAI;GACH,SAAS,EAAA;GACV,OAAK,CAAC,wCAAsC,EAAA,WAAA,CACtB,EAAA,KAAI,CAAA;GACzB,kBAAgB,EAAA;GAChB,sBAAoB,EAAA,eAAY,KAAQ,KAAA;GACxC,OAAO,EAAA;KACAA,EAAAA,QAAM;GACb,gBAAY,AAAA,EAAA,QAAA,GAAA,MAAE,EAAA,CAAA,KAAA,EAAA,CAAA,CAAA,CAAA,GAAA,CAAA;GACN;OAET,EAAQ,EAAA,QAAA,SAAA,CAAA,GAAA,IAAA,CAAA,CAAA,GAAA,GAAA,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
|
|
2
|
-
@layer vectis.components{.v-progress-circular{--progress-diameter:var(--vectis-control-size-progress-circular-diameter);--progress-thickness:var(--vectis-control-size-progress-circular-thickness);inline-size:var(--progress-diameter);block-size:var(--progress-diameter);vertical-align:middle;display:inline-grid}.v-progress-circular-svg,.v-progress-circular-label{grid-area:1/1}.v-progress-circular-svg{block-size:100%;inline-size:100%;rotate:-90deg}.v-progress-circular:dir(rtl) .v-progress-circular-svg{scale:1 -1}.v-progress-circular-track,.v-progress-circular-bar{cx:calc(var(--progress-diameter) / 2);cy:calc(var(--progress-diameter) / 2);r:max(0px, calc((var(--progress-diameter) - var(--progress-thickness)) / 2));fill:none;stroke-width:var(--progress-thickness)}.v-progress-circular-track{stroke:var(--progress-track)}.v-progress-circular-bar{stroke:var(--progress-fill);stroke-linecap:round;stroke-dasharray:100;stroke-dashoffset:calc(100 - 100 * var(--fill-fraction));transition:stroke-dashoffset var(--vectis-duration-base) var(--vectis-ease-default)}.v-progress-circular[data-shape=square] .v-progress-circular-bar{stroke-linecap:butt}.v-progress-circular[data-
|
|
2
|
+
@layer vectis.components{.v-progress-circular{--progress-diameter:var(--vectis-control-size-progress-circular-diameter);--progress-thickness:var(--vectis-control-size-progress-circular-thickness);--progress-fill:var(--tone-bg-solid);--progress-track:var(--tone-bg-soft);inline-size:var(--progress-diameter);block-size:var(--progress-diameter);vertical-align:middle;display:inline-grid}.v-progress-circular-svg,.v-progress-circular-label{grid-area:1/1}.v-progress-circular-svg{block-size:100%;inline-size:100%;rotate:-90deg}.v-progress-circular:dir(rtl) .v-progress-circular-svg{scale:1 -1}.v-progress-circular-track,.v-progress-circular-bar{cx:calc(var(--progress-diameter) / 2);cy:calc(var(--progress-diameter) / 2);r:max(0px, calc((var(--progress-diameter) - var(--progress-thickness)) / 2));fill:none;stroke-width:var(--progress-thickness)}.v-progress-circular-track{stroke:var(--progress-track)}.v-progress-circular-bar{stroke:var(--progress-fill);stroke-linecap:round;stroke-dasharray:100;stroke-dashoffset:calc(100 - 100 * var(--fill-fraction));transition:stroke-dashoffset var(--vectis-duration-base) var(--vectis-ease-default)}.v-progress-circular[data-shape=square] .v-progress-circular-bar{stroke-linecap:butt}.v-progress-circular[data-custom]{--progress-fill:var(--custom-color);--progress-track:color-mix(in oklab, var(--custom-color), var(--vectis-color-surface) 85%)}.v-progress-circular-label{max-inline-size:calc(var(--progress-diameter) - var(--progress-thickness) * 2);color:var(--vectis-color-text);font-family:var(--vectis-text-family);font-size:max(var(--vectis-text-caption-size), calc(var(--progress-diameter) / 4));font-weight:var(--vectis-text-control-weight);line-height:var(--vectis-text-control-leading);text-align:center;justify-content:center;place-self:center;align-items:center;display:flex}.v-progress-circular[data-indeterminate] .v-progress-circular-svg{animation:v-spin var(--vectis-duration-1000) linear infinite}.v-progress-circular[data-indeterminate] .v-progress-circular-bar{animation:v-progress-circular-dash var(--vectis-duration-1500) var(--vectis-ease-default) infinite;transition:none}@keyframes v-progress-circular-dash{0%{stroke-dasharray:5 100;stroke-dashoffset:0}50%{stroke-dasharray:70 100;stroke-dashoffset:-20px}to{stroke-dasharray:5 100;stroke-dashoffset:-100px}}@media (prefers-reduced-motion:reduce){.v-progress-circular-bar{transition:none}.v-progress-circular[data-indeterminate] .v-progress-circular-svg{animation-duration:var(--vectis-duration-3000)}.v-progress-circular[data-indeterminate] .v-progress-circular-bar{animation-duration:var(--vectis-duration-5000)}}}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
+
/** What the progress means, in colour. */
|
|
2
|
+
export type ProgressCircularTone = 'accent' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
3
|
+
/** How the arc ends. */
|
|
4
|
+
export type ProgressCircularShape = 'rounded' | 'square';
|
|
1
5
|
interface ProgressCircularProps {
|
|
2
6
|
/** How far along it is. Anything outside the range is brought back into it. */
|
|
3
7
|
value?: number;
|
|
8
|
+
/**
|
|
9
|
+
* What is progressing, in words, for screen readers. It draws nothing on screen, and falls
|
|
10
|
+
* back to the design system dictionary; an `aria-label` or `aria-labelledby` of your own
|
|
11
|
+
* takes precedence over it.
|
|
12
|
+
*/
|
|
13
|
+
label?: string;
|
|
4
14
|
/** What counts as finished. The other end is always zero. */
|
|
5
15
|
max?: number;
|
|
6
16
|
/**
|
|
@@ -9,7 +19,7 @@ interface ProgressCircularProps {
|
|
|
9
19
|
*/
|
|
10
20
|
indeterminate?: boolean;
|
|
11
21
|
/** What the progress means, expressed as a colour. */
|
|
12
|
-
tone?:
|
|
22
|
+
tone?: ProgressCircularTone;
|
|
13
23
|
/**
|
|
14
24
|
* A colour of your own (hex, CSS name or `oklch()`), which replaces the tone. The
|
|
15
25
|
* unfilled ring's shade is derived from it against the theme, so it follows the light
|
|
@@ -21,7 +31,7 @@ interface ProgressCircularProps {
|
|
|
21
31
|
/** How thick the ring is, always IN PIXELS: `8` and `'8'` both give 8px. */
|
|
22
32
|
thickness?: number | string;
|
|
23
33
|
/** Whether the ends of the drawn arc are rounded or cut square. */
|
|
24
|
-
shape?:
|
|
34
|
+
shape?: ProgressCircularShape;
|
|
25
35
|
/**
|
|
26
36
|
* Writes the percentage in the middle of the ring. It is ignored while the progress is
|
|
27
37
|
* unmeasurable, there being no figure to write.
|
|
@@ -40,10 +50,11 @@ type __VLS_Slots = {
|
|
|
40
50
|
}): unknown;
|
|
41
51
|
};
|
|
42
52
|
declare const __VLS_base: import('vue').DefineComponent<ProgressCircularProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ProgressCircularProps> & Readonly<{}>, {
|
|
53
|
+
label: string;
|
|
43
54
|
value: number;
|
|
44
55
|
size: number | string;
|
|
45
|
-
tone:
|
|
46
|
-
shape:
|
|
56
|
+
tone: ProgressCircularTone;
|
|
57
|
+
shape: ProgressCircularShape;
|
|
47
58
|
color: string;
|
|
48
59
|
indeterminate: boolean;
|
|
49
60
|
max: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VProgressCircular.js","names":[],"sources":["../../../src/components/VProgressCircular/VProgressCircular.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @core — no behavioural JS at all: value normalization and the display string.\n/**\n * Progress drawn as a ring filling up. It is an SVG whose geometry is entirely\n * described in CSS, with no JavaScript computing anything.\n *\n * Two things make that possible. The drawing declares no coordinate system of its own,\n * so one unit is one pixel and the circles can be placed with plain lengths: with a\n * fixed coordinate system the thickness would have to be converted into its units,\n * which means knowing the ratio in code and recomputing it at every change of size.\n * And the ring's outline is declared to be 100 units long whatever its real\n * circumference, so the portion drawn is simply a percentage — no π anywhere.\n *\n * On naming: pass an `aria-label` saying what is progressing. The figure shown in the\n * middle cannot serve as that name — the role a progress bar carries makes its content\n * presentational, so screen readers do not announce it.\n */\nimport { useProgressValue } from '../../composables/useProgressValue'\nimport { useMessages } from '../../i18n/state'\nimport { px } from '../../utils/css'\n\ninterface ProgressCircularProps {\n /** How far along it is. Anything outside the range is brought back into it. */\n value?: number\n /** What counts as finished. The other end is always zero. */\n max?: number\n /**\n * Says that the progress cannot be measured: the ring turns continuously and the\n * value is ignored.\n */\n indeterminate?: boolean\n /** What the progress means, expressed as a colour. */\n tone?: 'accent' | 'success' | 'warning' | 'danger' | 'neutral'\n /**\n * A colour of your own (hex, CSS name or `oklch()`), which replaces the tone. The\n * unfilled ring's shade is derived from it against the theme, so it follows the light\n * and the dark one.\n */\n color?: string\n /** The diameter, always IN PIXELS: `96` and `'96'` both give 96px. */\n size?: number | string\n /** How thick the ring is, always IN PIXELS: `8` and `'8'` both give 8px. */\n thickness?: number | string\n /** Whether the ends of the drawn arc are rounded or cut square. */\n shape?: 'rounded' | 'square'\n /**\n * Writes the percentage in the middle of the ring. It is ignored while the progress is\n * unmeasurable, there being no figure to write.\n */\n showValue?: boolean\n}\n\nconst props = withDefaults(defineProps<ProgressCircularProps>(), {\n value: 0,\n max: 100,\n indeterminate: false,\n tone: 'accent',\n color: undefined,\n size: undefined,\n thickness: undefined,\n shape: 'rounded',\n showValue: false,\n})\n\ndefineSlots<{\n /**\n * What to put in the middle of the ring instead of the percentage — a count of files,\n * an icon, a shortened figure.\n */\n default?(props: { value: number; max: number; percent: number }): unknown\n}>()\n\n/* The percent sign, and the non-breaking space French puts before it where English puts\n nothing, are a convention of the language: they belong in the dictionary rather than\n in this file. Any other format goes through the slot above. */\nconst m = useMessages()\n\nconst { clamped, fraction } = useProgressValue(\n () => props.value,\n () => props.max,\n)\n</script>\n\n<template>\n <span\n class=\"v-progress-circular\"\n role=\"progressbar\"\n :aria-label=\"m.progress.label\"\n :data-tone=\"tone\"\n :data-custom=\"color !== undefined ? '' : undefined\"\n :data-shape=\"shape\"\n :data-indeterminate=\"indeterminate ? '' : undefined\"\n :aria-valuenow=\"indeterminate ? undefined : clamped\"\n aria-valuemin=\"0\"\n :aria-valuemax=\"max\"\n :style=\"{\n '--fill-fraction': String(fraction),\n '--custom-color': color,\n '--progress-diameter': px(size),\n '--progress-thickness': px(thickness),\n }\"\n >\n <svg class=\"v-progress-circular-svg\" aria-hidden=\"true\">\n <circle class=\"v-progress-circular-track\" pathLength=\"100\" />\n <circle class=\"v-progress-circular-bar\" pathLength=\"100\" />\n </svg>\n <span v-if=\"!indeterminate && (showValue || $slots.default)\" class=\"v-progress-circular-label\">\n <slot :value=\"clamped\" :max=\"max\" :percent=\"fraction * 100\">\n {{ m.progress.percent(Math.round(fraction * 100)) }}\n </slot>\n </span>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /* The two dimensions are declared here as defaults, on the very element the props\n write to inline — which is what makes an explicit size or thickness always win. */\n .v-progress-circular {\n --progress-diameter: var(--vectis-control-size-progress-circular-diameter);\n --progress-thickness: var(--vectis-control-size-progress-circular-thickness);\n display: inline-grid;\n inline-size: var(--progress-diameter);\n block-size: var(--progress-diameter);\n vertical-align: middle;\n }\n\n .v-progress-circular-svg,\n .v-progress-circular-label {\n grid-area: 1 / 1;\n }\n\n .v-progress-circular-svg {\n inline-size: 100%;\n block-size: 100%;\n /* Turns the ring so that it starts at twelve o'clock rather than at three. It is\n written as its own property and not as a transform, so that it COMPOSES with the\n spinning of the unmeasurable mode instead of being overwritten by it. */\n rotate: -90deg;\n }\n\n /* In a right-to-left page the ring fills the other way round, following the reading\n direction. These individual properties are applied in a fixed order — move, turn,\n then mirror — so the mirroring is taken into account before the quarter turn above. */\n .v-progress-circular:dir(rtl) .v-progress-circular-svg {\n scale: 1 -1;\n }\n\n /* The geometry, entirely in CSS and in plain lengths. Percentages are avoided\n deliberately: a radius given as a percentage is resolved against a normalized\n diagonal rather than against the width, and there is no reason to expose the\n component to that when the diameter is always a length to begin with. */\n .v-progress-circular-track,\n .v-progress-circular-bar {\n cx: calc(var(--progress-diameter) / 2);\n cy: calc(var(--progress-diameter) / 2);\n /* A thickness as large as the diameter would give a NEGATIVE radius, which is an\n error in SVG: the circle would simply not be drawn. The floor degrades that case\n to a radius of zero instead. */\n r: max(0px, calc((var(--progress-diameter) - var(--progress-thickness)) / 2));\n fill: none;\n stroke-width: var(--progress-thickness);\n }\n\n .v-progress-circular-track {\n stroke: var(--progress-track);\n }\n\n .v-progress-circular-bar {\n stroke: var(--progress-fill);\n stroke-linecap: round;\n stroke-dasharray: 100;\n stroke-dashoffset: calc(100 - 100 * var(--fill-fraction));\n transition: stroke-dashoffset var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n .v-progress-circular[data-shape='square'] .v-progress-circular-bar {\n stroke-linecap: butt;\n }\n\n /* Unlike the linear bar, no tone declares a text colour: the figure sits in the hole\n of the ring, against the page itself, so it simply takes the ordinary text colour. */\n .v-progress-circular[data-tone='accent'] {\n --progress-fill: var(--vectis-color-accent);\n --progress-track: var(--vectis-color-accent-surface);\n }\n\n .v-progress-circular[data-tone='success'] {\n --progress-fill: var(--vectis-color-success);\n --progress-track: var(--vectis-color-success-surface);\n }\n\n .v-progress-circular[data-tone='danger'] {\n --progress-fill: var(--vectis-color-danger);\n --progress-track: var(--vectis-color-danger-surface);\n }\n\n .v-progress-circular[data-tone='warning'] {\n --progress-fill: var(--vectis-color-warning);\n --progress-track: var(--vectis-color-warning-surface);\n }\n\n /* The neutral tone inverts text and surface rather than using a mid grey, which would\n be unreadable in one theme or the other. */\n .v-progress-circular[data-tone='neutral'] {\n --progress-fill: var(--vectis-color-text);\n --progress-track: var(--vectis-color-surface-muted);\n }\n\n /* Placed after the tones on purpose: the specificity is the same, so it is the order\n that lets a custom colour override the tone it replaces. */\n .v-progress-circular[data-custom] {\n --progress-fill: var(--custom-color);\n --progress-track: color-mix(in oklab, var(--custom-color), var(--vectis-color-surface) 85%);\n }\n\n .v-progress-circular-label {\n display: flex;\n align-items: center;\n justify-content: center;\n /* TRAP — this centres the BOX itself in its cell, and it is not redundant with the\n centring above. The maximum width below stops the box from being stretched to\n fill the cell, and a stretch that cannot apply falls back to the START edge: the\n figure would end up against the side of the ring. */\n place-self: center;\n max-inline-size: calc(var(--progress-diameter) - var(--progress-thickness) * 2);\n color: var(--vectis-color-text);\n font-family: var(--vectis-text-family);\n /* Sized as a fraction of the diameter so it stays in proportion at every size — the\n same tolerance already granted to VSpinner's stroke — with a floor at the smallest\n type token, below which it would be unreadable. */\n font-size: max(var(--vectis-text-caption-size), calc(var(--progress-diameter) / 4));\n font-weight: var(--vectis-text-control-weight);\n line-height: var(--vectis-text-control-leading);\n text-align: center;\n }\n\n /* When the progress cannot be measured, two animations run at once: the whole ring\n turns, and the arc drawn on it lengthens and shortens. Their periods are deliberately\n not multiples of one another — were the arc to restart on every rotation, the pair\n would repeat the same picture over and over and read as a mechanical beat. At 1s and\n 1.5s they only realign every third turn; the slowed-down pair below is 3s and 5s, so\n every fifth. Keep any change to those four values out of a whole-number ratio. */\n .v-progress-circular[data-indeterminate] .v-progress-circular-svg {\n animation: v-spin var(--vectis-duration-1000) linear infinite;\n }\n\n .v-progress-circular[data-indeterminate] .v-progress-circular-bar {\n animation: v-progress-circular-dash var(--vectis-duration-1500) var(--vectis-ease-default)\n infinite;\n transition: none;\n }\n\n /* Both ends of the arc move, so it lengthens, shortens and travels around the circle\n at once. The spin it rides on is the shared one from styles/utilities.css; only\n these keyframes, which belong to this component alone, stay here. */\n @keyframes v-progress-circular-dash {\n 0% {\n stroke-dasharray: 5 100;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 70 100;\n stroke-dashoffset: -20;\n }\n\n 100% {\n stroke-dasharray: 5 100;\n stroke-dashoffset: -100;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-progress-circular-bar {\n transition: none;\n }\n\n /* Slowed down and not stopped: a motionless loader no longer says that anything is\n happening, which is the one thing it exists to say. */\n .v-progress-circular[data-indeterminate] .v-progress-circular-svg {\n animation-duration: var(--vectis-duration-3000);\n }\n\n .v-progress-circular[data-indeterminate] .v-progress-circular-bar {\n animation-duration: var(--vectis-duration-5000);\n }\n }\n}\n</style>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"VProgressCircular.js","names":[],"sources":["../../../src/components/VProgressCircular/VProgressCircular.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @core — no behavioural JS at all: value normalization and the display string.\n/**\n * Progress drawn as a ring, an SVG whose geometry is described entirely in CSS with no JS\n * computing anything.\n *\n * Two things make that possible. There is no `viewBox`, so one user unit is one pixel and\n * the circles take plain lengths — a fixed coordinate system would mean converting the\n * thickness into its units, hence knowing the ratio in code and recomputing it at every\n * change of size. And `pathLength=\"100\"` declares the outline 100 units long whatever its\n * real circumference, so the portion drawn is a percentage with no π anywhere.\n *\n * NAMING — pass a `label` saying what is progressing. The figure in the middle cannot\n * serve: `role=\"progressbar\"` makes its content presentational, so it is never announced.\n */\nimport { useAriaLabel } from '../../composables/useAriaLabel'\nimport { useProgressValue } from '../../composables/useProgressValue'\nimport { useMessages } from '../../i18n/state'\nimport { px } from '../../utils/css'\n\n/** What the progress means, in colour. */\nexport type ProgressCircularTone = 'accent' | 'success' | 'warning' | 'danger' | 'neutral'\n\n/** How the arc ends. */\nexport type ProgressCircularShape = 'rounded' | 'square'\n\ninterface ProgressCircularProps {\n /** How far along it is. Anything outside the range is brought back into it. */\n value?: number\n /**\n * What is progressing, in words, for screen readers. It draws nothing on screen, and falls\n * back to the design system dictionary; an `aria-label` or `aria-labelledby` of your own\n * takes precedence over it.\n */\n label?: string\n /** What counts as finished. The other end is always zero. */\n max?: number\n /**\n * Says that the progress cannot be measured: the ring turns continuously and the\n * value is ignored.\n */\n indeterminate?: boolean\n /** What the progress means, expressed as a colour. */\n tone?: ProgressCircularTone\n /**\n * A colour of your own (hex, CSS name or `oklch()`), which replaces the tone. The\n * unfilled ring's shade is derived from it against the theme, so it follows the light\n * and the dark one.\n */\n color?: string\n /** The diameter, always IN PIXELS: `96` and `'96'` both give 96px. */\n size?: number | string\n /** How thick the ring is, always IN PIXELS: `8` and `'8'` both give 8px. */\n thickness?: number | string\n /** Whether the ends of the drawn arc are rounded or cut square. */\n shape?: ProgressCircularShape\n /**\n * Writes the percentage in the middle of the ring. It is ignored while the progress is\n * unmeasurable, there being no figure to write.\n */\n showValue?: boolean\n}\n\nconst props = withDefaults(defineProps<ProgressCircularProps>(), {\n value: 0,\n label: undefined,\n max: 100,\n indeterminate: false,\n tone: 'accent',\n color: undefined,\n size: undefined,\n thickness: undefined,\n shape: 'rounded',\n showValue: false,\n})\n\ndefineSlots<{\n /**\n * What to put in the middle of the ring instead of the percentage — a count of files,\n * an icon, a shortened figure.\n */\n default?(props: { value: number; max: number; percent: number }): unknown\n}>()\n\n/* The percent sign, and the non-breaking space French puts before it where English puts\n nothing, are a convention of the language: they belong in the dictionary rather than\n in this file. Any other format goes through the slot above. */\nconst m = useMessages()\n\nconst {\n max: normalizedMax,\n clamped,\n fraction,\n percent,\n roundedPercent,\n} = useProgressValue(\n () => props.value,\n () => props.max,\n)\n\n// @a11y\n// The canonical cascade: a consumer's `aria-labelledby`, then their `aria-label`, then the\n// `label` prop, then the dictionary. An indicator takes no name from the text inside it, so\n// without the last step it would have none at all.\nconst ariaLabel = useAriaLabel(() => props.label ?? m.value.progress.label)\n</script>\n\n<template>\n <span\n class=\"v-progress-circular v-tone\"\n role=\"progressbar\"\n :aria-label=\"ariaLabel\"\n :data-tone=\"tone\"\n :data-custom=\"color !== undefined ? '' : undefined\"\n :data-shape=\"shape\"\n :data-indeterminate=\"indeterminate ? '' : undefined\"\n :aria-valuenow=\"indeterminate ? undefined : clamped\"\n aria-valuemin=\"0\"\n :aria-valuemax=\"normalizedMax\"\n :style=\"{\n '--fill-fraction': String(fraction),\n '--custom-color': color,\n '--progress-diameter': px(size),\n '--progress-thickness': px(thickness),\n }\"\n >\n <svg class=\"v-progress-circular-svg\" aria-hidden=\"true\">\n <circle class=\"v-progress-circular-track\" pathLength=\"100\" />\n <circle class=\"v-progress-circular-bar\" pathLength=\"100\" />\n </svg>\n <span v-if=\"!indeterminate && (showValue || $slots.default)\" class=\"v-progress-circular-label\">\n <slot :value=\"clamped\" :max=\"normalizedMax\" :percent=\"percent\">\n {{ m.progress.percent(roundedPercent) }}\n </slot>\n </span>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /* The two dimensions are declared here as defaults, on the very element the props\n write to inline — which is what makes an explicit size or thickness always win. */\n .v-progress-circular {\n --progress-diameter: var(--vectis-control-size-progress-circular-diameter);\n --progress-thickness: var(--vectis-control-size-progress-circular-thickness);\n /* Arc and track are the tone's solid and soft colours, read from the shared table\n (`.v-tone`, set in the template). No text colour is taken from it: the figure sits\n in the hole of the ring, against the page, in the ordinary text colour. */\n --progress-fill: var(--tone-bg-solid);\n --progress-track: var(--tone-bg-soft);\n display: inline-grid;\n inline-size: var(--progress-diameter);\n block-size: var(--progress-diameter);\n vertical-align: middle;\n }\n\n .v-progress-circular-svg,\n .v-progress-circular-label {\n grid-area: 1 / 1;\n }\n\n .v-progress-circular-svg {\n inline-size: 100%;\n block-size: 100%;\n /* Turns the ring so that it starts at twelve o'clock rather than at three. It is\n written as its own property and not as a transform, so that it COMPOSES with the\n spinning of the unmeasurable mode instead of being overwritten by it. */\n rotate: -90deg;\n }\n\n /* In a right-to-left page the ring fills the other way round, following the reading\n direction. These individual properties are applied in a fixed order — move, turn,\n then mirror — so the mirroring is taken into account before the quarter turn above. */\n .v-progress-circular:dir(rtl) .v-progress-circular-svg {\n scale: 1 -1;\n }\n\n /* The geometry, entirely in CSS and in plain lengths. Percentages are avoided\n deliberately: a radius given as a percentage is resolved against a normalized\n diagonal rather than against the width, and there is no reason to expose the\n component to that when the diameter is always a length to begin with. */\n .v-progress-circular-track,\n .v-progress-circular-bar {\n cx: calc(var(--progress-diameter) / 2);\n cy: calc(var(--progress-diameter) / 2);\n /* A thickness as large as the diameter would give a NEGATIVE radius, which is an\n error in SVG: the circle would simply not be drawn. The floor degrades that case\n to a radius of zero instead. */\n r: max(0px, calc((var(--progress-diameter) - var(--progress-thickness)) / 2));\n fill: none;\n stroke-width: var(--progress-thickness);\n }\n\n .v-progress-circular-track {\n stroke: var(--progress-track);\n }\n\n .v-progress-circular-bar {\n stroke: var(--progress-fill);\n stroke-linecap: round;\n stroke-dasharray: 100;\n stroke-dashoffset: calc(100 - 100 * var(--fill-fraction));\n transition: stroke-dashoffset var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n .v-progress-circular[data-shape='square'] .v-progress-circular-bar {\n stroke-linecap: butt;\n }\n\n /* A custom colour replaces the tone: at (0,2,0) it beats the base rule's mapping\n whatever the order the two are written in. */\n .v-progress-circular[data-custom] {\n --progress-fill: var(--custom-color);\n --progress-track: color-mix(in oklab, var(--custom-color), var(--vectis-color-surface) 85%);\n }\n\n .v-progress-circular-label {\n display: flex;\n align-items: center;\n justify-content: center;\n /* TRAP — this centres the BOX itself in its cell, and it is not redundant with the\n centring above. The maximum width below stops the box from being stretched to\n fill the cell, and a stretch that cannot apply falls back to the START edge: the\n figure would end up against the side of the ring. */\n place-self: center;\n max-inline-size: calc(var(--progress-diameter) - var(--progress-thickness) * 2);\n color: var(--vectis-color-text);\n font-family: var(--vectis-text-family);\n /* Sized as a fraction of the diameter so it stays in proportion at every size — the\n same tolerance already granted to VSpinner's stroke — with a floor at the smallest\n type token, below which it would be unreadable. */\n font-size: max(var(--vectis-text-caption-size), calc(var(--progress-diameter) / 4));\n font-weight: var(--vectis-text-control-weight);\n line-height: var(--vectis-text-control-leading);\n text-align: center;\n }\n\n /* When the progress cannot be measured, two animations run at once: the whole ring\n turns, and the arc drawn on it lengthens and shortens. Their periods are deliberately\n not multiples of one another — were the arc to restart on every rotation, the pair\n would repeat the same picture over and over and read as a mechanical beat. At 1s and\n 1.5s they only realign every third turn; the slowed-down pair below is 3s and 5s, so\n every fifth. Keep any change to those four values out of a whole-number ratio. */\n .v-progress-circular[data-indeterminate] .v-progress-circular-svg {\n animation: v-spin var(--vectis-duration-1000) linear infinite;\n }\n\n .v-progress-circular[data-indeterminate] .v-progress-circular-bar {\n animation: v-progress-circular-dash var(--vectis-duration-1500) var(--vectis-ease-default)\n infinite;\n transition: none;\n }\n\n /* Both ends of the arc move, so it lengthens, shortens and travels around the circle\n at once. The spin it rides on is the shared one from styles/utilities.css; only\n these keyframes, which belong to this component alone, stay here. */\n @keyframes v-progress-circular-dash {\n 0% {\n stroke-dasharray: 5 100;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 70 100;\n stroke-dashoffset: -20;\n }\n\n 100% {\n stroke-dasharray: 5 100;\n stroke-dashoffset: -100;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-progress-circular-bar {\n transition: none;\n }\n\n /* Slowed down and not stopped: a motionless loader no longer says that anything is\n happening, which is the one thing it exists to say. */\n .v-progress-circular[data-indeterminate] .v-progress-circular-svg {\n animation-duration: var(--vectis-duration-3000);\n }\n\n .v-progress-circular[data-indeterminate] .v-progress-circular-bar {\n animation-duration: var(--vectis-duration-5000);\n }\n }\n}\n</style>\n"],"mappings":""}
|
package/dist/components/VProgressCircular/VProgressCircular.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { useMessages as e } from "../../i18n/state.js";
|
|
2
2
|
import { px as t } from "../../utils/css.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useAriaLabel as n } from "../../composables/useAriaLabel.js";
|
|
4
|
+
import { useProgressValue as r } from "../../composables/useProgressValue.js";
|
|
5
|
+
import { createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, defineComponent as c, normalizeStyle as l, openBlock as u, renderSlot as d, toDisplayString as f, unref as p } from "vue";
|
|
5
6
|
//#region src/components/VProgressCircular/VProgressCircular.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var
|
|
7
|
+
var m = [
|
|
7
8
|
"aria-label",
|
|
8
9
|
"data-tone",
|
|
9
10
|
"data-custom",
|
|
@@ -11,13 +12,14 @@ var p = [
|
|
|
11
12
|
"data-indeterminate",
|
|
12
13
|
"aria-valuenow",
|
|
13
14
|
"aria-valuemax"
|
|
14
|
-
],
|
|
15
|
+
], h = {
|
|
15
16
|
key: 0,
|
|
16
17
|
class: "v-progress-circular-label"
|
|
17
|
-
},
|
|
18
|
+
}, g = /*@__PURE__*/ c({
|
|
18
19
|
__name: "VProgressCircular",
|
|
19
20
|
props: {
|
|
20
21
|
value: { default: 0 },
|
|
22
|
+
label: { default: void 0 },
|
|
21
23
|
max: { default: 100 },
|
|
22
24
|
indeterminate: {
|
|
23
25
|
type: Boolean,
|
|
@@ -33,42 +35,42 @@ var p = [
|
|
|
33
35
|
default: !1
|
|
34
36
|
}
|
|
35
37
|
},
|
|
36
|
-
setup(
|
|
37
|
-
let
|
|
38
|
-
return (e, n) => (
|
|
39
|
-
class: "v-progress-circular",
|
|
38
|
+
setup(c) {
|
|
39
|
+
let g = c, _ = e(), { max: v, clamped: y, fraction: b, percent: x, roundedPercent: S } = r(() => g.value, () => g.max), C = n(() => g.label ?? _.value.progress.label);
|
|
40
|
+
return (e, n) => (u(), a("span", {
|
|
41
|
+
class: "v-progress-circular v-tone",
|
|
40
42
|
role: "progressbar",
|
|
41
|
-
"aria-label":
|
|
42
|
-
"data-tone":
|
|
43
|
-
"data-custom":
|
|
44
|
-
"data-shape":
|
|
45
|
-
"data-indeterminate":
|
|
46
|
-
"aria-valuenow":
|
|
43
|
+
"aria-label": p(C),
|
|
44
|
+
"data-tone": c.tone,
|
|
45
|
+
"data-custom": c.color === void 0 ? void 0 : "",
|
|
46
|
+
"data-shape": c.shape,
|
|
47
|
+
"data-indeterminate": c.indeterminate ? "" : void 0,
|
|
48
|
+
"aria-valuenow": c.indeterminate ? void 0 : p(y),
|
|
47
49
|
"aria-valuemin": "0",
|
|
48
|
-
"aria-valuemax":
|
|
49
|
-
style:
|
|
50
|
-
"--fill-fraction": String(
|
|
51
|
-
"--custom-color":
|
|
52
|
-
"--progress-diameter":
|
|
53
|
-
"--progress-thickness":
|
|
50
|
+
"aria-valuemax": p(v),
|
|
51
|
+
style: l({
|
|
52
|
+
"--fill-fraction": String(p(b)),
|
|
53
|
+
"--custom-color": c.color,
|
|
54
|
+
"--progress-diameter": p(t)(c.size),
|
|
55
|
+
"--progress-thickness": p(t)(c.thickness)
|
|
54
56
|
})
|
|
55
|
-
}, [n[0] ||=
|
|
57
|
+
}, [n[0] ||= o("svg", {
|
|
56
58
|
class: "v-progress-circular-svg",
|
|
57
59
|
"aria-hidden": "true"
|
|
58
|
-
}, [
|
|
60
|
+
}, [o("circle", {
|
|
59
61
|
class: "v-progress-circular-track",
|
|
60
62
|
pathLength: "100"
|
|
61
|
-
}),
|
|
63
|
+
}), o("circle", {
|
|
62
64
|
class: "v-progress-circular-bar",
|
|
63
65
|
pathLength: "100"
|
|
64
|
-
})], -1), !
|
|
65
|
-
value:
|
|
66
|
-
max:
|
|
67
|
-
percent:
|
|
68
|
-
}, () => [
|
|
66
|
+
})], -1), !c.indeterminate && (c.showValue || e.$slots.default) ? (u(), a("span", h, [d(e.$slots, "default", {
|
|
67
|
+
value: p(y),
|
|
68
|
+
max: p(v),
|
|
69
|
+
percent: p(x)
|
|
70
|
+
}, () => [s(f(p(_).progress.percent(p(S))), 1)])])) : i("", !0)], 12, m));
|
|
69
71
|
}
|
|
70
72
|
});
|
|
71
73
|
//#endregion
|
|
72
|
-
export {
|
|
74
|
+
export { g as default };
|
|
73
75
|
|
|
74
76
|
//# sourceMappingURL=VProgressCircular.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VProgressCircular.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/VProgressCircular/VProgressCircular.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @core — no behavioural JS at all: value normalization and the display string.\n/**\n * Progress drawn as a ring filling up. It is an SVG whose geometry is entirely\n * described in CSS, with no JavaScript computing anything.\n *\n * Two things make that possible. The drawing declares no coordinate system of its own,\n * so one unit is one pixel and the circles can be placed with plain lengths: with a\n * fixed coordinate system the thickness would have to be converted into its units,\n * which means knowing the ratio in code and recomputing it at every change of size.\n * And the ring's outline is declared to be 100 units long whatever its real\n * circumference, so the portion drawn is simply a percentage — no π anywhere.\n *\n * On naming: pass an `aria-label` saying what is progressing. The figure shown in the\n * middle cannot serve as that name — the role a progress bar carries makes its content\n * presentational, so screen readers do not announce it.\n */\nimport { useProgressValue } from '../../composables/useProgressValue'\nimport { useMessages } from '../../i18n/state'\nimport { px } from '../../utils/css'\n\ninterface ProgressCircularProps {\n /** How far along it is. Anything outside the range is brought back into it. */\n value?: number\n /** What counts as finished. The other end is always zero. */\n max?: number\n /**\n * Says that the progress cannot be measured: the ring turns continuously and the\n * value is ignored.\n */\n indeterminate?: boolean\n /** What the progress means, expressed as a colour. */\n tone?: 'accent' | 'success' | 'warning' | 'danger' | 'neutral'\n /**\n * A colour of your own (hex, CSS name or `oklch()`), which replaces the tone. The\n * unfilled ring's shade is derived from it against the theme, so it follows the light\n * and the dark one.\n */\n color?: string\n /** The diameter, always IN PIXELS: `96` and `'96'` both give 96px. */\n size?: number | string\n /** How thick the ring is, always IN PIXELS: `8` and `'8'` both give 8px. */\n thickness?: number | string\n /** Whether the ends of the drawn arc are rounded or cut square. */\n shape?: 'rounded' | 'square'\n /**\n * Writes the percentage in the middle of the ring. It is ignored while the progress is\n * unmeasurable, there being no figure to write.\n */\n showValue?: boolean\n}\n\nconst props = withDefaults(defineProps<ProgressCircularProps>(), {\n value: 0,\n max: 100,\n indeterminate: false,\n tone: 'accent',\n color: undefined,\n size: undefined,\n thickness: undefined,\n shape: 'rounded',\n showValue: false,\n})\n\ndefineSlots<{\n /**\n * What to put in the middle of the ring instead of the percentage — a count of files,\n * an icon, a shortened figure.\n */\n default?(props: { value: number; max: number; percent: number }): unknown\n}>()\n\n/* The percent sign, and the non-breaking space French puts before it where English puts\n nothing, are a convention of the language: they belong in the dictionary rather than\n in this file. Any other format goes through the slot above. */\nconst m = useMessages()\n\nconst { clamped, fraction } = useProgressValue(\n () => props.value,\n () => props.max,\n)\n</script>\n\n<template>\n <span\n class=\"v-progress-circular\"\n role=\"progressbar\"\n :aria-label=\"m.progress.label\"\n :data-tone=\"tone\"\n :data-custom=\"color !== undefined ? '' : undefined\"\n :data-shape=\"shape\"\n :data-indeterminate=\"indeterminate ? '' : undefined\"\n :aria-valuenow=\"indeterminate ? undefined : clamped\"\n aria-valuemin=\"0\"\n :aria-valuemax=\"max\"\n :style=\"{\n '--fill-fraction': String(fraction),\n '--custom-color': color,\n '--progress-diameter': px(size),\n '--progress-thickness': px(thickness),\n }\"\n >\n <svg class=\"v-progress-circular-svg\" aria-hidden=\"true\">\n <circle class=\"v-progress-circular-track\" pathLength=\"100\" />\n <circle class=\"v-progress-circular-bar\" pathLength=\"100\" />\n </svg>\n <span v-if=\"!indeterminate && (showValue || $slots.default)\" class=\"v-progress-circular-label\">\n <slot :value=\"clamped\" :max=\"max\" :percent=\"fraction * 100\">\n {{ m.progress.percent(Math.round(fraction * 100)) }}\n </slot>\n </span>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /* The two dimensions are declared here as defaults, on the very element the props\n write to inline — which is what makes an explicit size or thickness always win. */\n .v-progress-circular {\n --progress-diameter: var(--vectis-control-size-progress-circular-diameter);\n --progress-thickness: var(--vectis-control-size-progress-circular-thickness);\n display: inline-grid;\n inline-size: var(--progress-diameter);\n block-size: var(--progress-diameter);\n vertical-align: middle;\n }\n\n .v-progress-circular-svg,\n .v-progress-circular-label {\n grid-area: 1 / 1;\n }\n\n .v-progress-circular-svg {\n inline-size: 100%;\n block-size: 100%;\n /* Turns the ring so that it starts at twelve o'clock rather than at three. It is\n written as its own property and not as a transform, so that it COMPOSES with the\n spinning of the unmeasurable mode instead of being overwritten by it. */\n rotate: -90deg;\n }\n\n /* In a right-to-left page the ring fills the other way round, following the reading\n direction. These individual properties are applied in a fixed order — move, turn,\n then mirror — so the mirroring is taken into account before the quarter turn above. */\n .v-progress-circular:dir(rtl) .v-progress-circular-svg {\n scale: 1 -1;\n }\n\n /* The geometry, entirely in CSS and in plain lengths. Percentages are avoided\n deliberately: a radius given as a percentage is resolved against a normalized\n diagonal rather than against the width, and there is no reason to expose the\n component to that when the diameter is always a length to begin with. */\n .v-progress-circular-track,\n .v-progress-circular-bar {\n cx: calc(var(--progress-diameter) / 2);\n cy: calc(var(--progress-diameter) / 2);\n /* A thickness as large as the diameter would give a NEGATIVE radius, which is an\n error in SVG: the circle would simply not be drawn. The floor degrades that case\n to a radius of zero instead. */\n r: max(0px, calc((var(--progress-diameter) - var(--progress-thickness)) / 2));\n fill: none;\n stroke-width: var(--progress-thickness);\n }\n\n .v-progress-circular-track {\n stroke: var(--progress-track);\n }\n\n .v-progress-circular-bar {\n stroke: var(--progress-fill);\n stroke-linecap: round;\n stroke-dasharray: 100;\n stroke-dashoffset: calc(100 - 100 * var(--fill-fraction));\n transition: stroke-dashoffset var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n .v-progress-circular[data-shape='square'] .v-progress-circular-bar {\n stroke-linecap: butt;\n }\n\n /* Unlike the linear bar, no tone declares a text colour: the figure sits in the hole\n of the ring, against the page itself, so it simply takes the ordinary text colour. */\n .v-progress-circular[data-tone='accent'] {\n --progress-fill: var(--vectis-color-accent);\n --progress-track: var(--vectis-color-accent-surface);\n }\n\n .v-progress-circular[data-tone='success'] {\n --progress-fill: var(--vectis-color-success);\n --progress-track: var(--vectis-color-success-surface);\n }\n\n .v-progress-circular[data-tone='danger'] {\n --progress-fill: var(--vectis-color-danger);\n --progress-track: var(--vectis-color-danger-surface);\n }\n\n .v-progress-circular[data-tone='warning'] {\n --progress-fill: var(--vectis-color-warning);\n --progress-track: var(--vectis-color-warning-surface);\n }\n\n /* The neutral tone inverts text and surface rather than using a mid grey, which would\n be unreadable in one theme or the other. */\n .v-progress-circular[data-tone='neutral'] {\n --progress-fill: var(--vectis-color-text);\n --progress-track: var(--vectis-color-surface-muted);\n }\n\n /* Placed after the tones on purpose: the specificity is the same, so it is the order\n that lets a custom colour override the tone it replaces. */\n .v-progress-circular[data-custom] {\n --progress-fill: var(--custom-color);\n --progress-track: color-mix(in oklab, var(--custom-color), var(--vectis-color-surface) 85%);\n }\n\n .v-progress-circular-label {\n display: flex;\n align-items: center;\n justify-content: center;\n /* TRAP — this centres the BOX itself in its cell, and it is not redundant with the\n centring above. The maximum width below stops the box from being stretched to\n fill the cell, and a stretch that cannot apply falls back to the START edge: the\n figure would end up against the side of the ring. */\n place-self: center;\n max-inline-size: calc(var(--progress-diameter) - var(--progress-thickness) * 2);\n color: var(--vectis-color-text);\n font-family: var(--vectis-text-family);\n /* Sized as a fraction of the diameter so it stays in proportion at every size — the\n same tolerance already granted to VSpinner's stroke — with a floor at the smallest\n type token, below which it would be unreadable. */\n font-size: max(var(--vectis-text-caption-size), calc(var(--progress-diameter) / 4));\n font-weight: var(--vectis-text-control-weight);\n line-height: var(--vectis-text-control-leading);\n text-align: center;\n }\n\n /* When the progress cannot be measured, two animations run at once: the whole ring\n turns, and the arc drawn on it lengthens and shortens. Their periods are deliberately\n not multiples of one another — were the arc to restart on every rotation, the pair\n would repeat the same picture over and over and read as a mechanical beat. At 1s and\n 1.5s they only realign every third turn; the slowed-down pair below is 3s and 5s, so\n every fifth. Keep any change to those four values out of a whole-number ratio. */\n .v-progress-circular[data-indeterminate] .v-progress-circular-svg {\n animation: v-spin var(--vectis-duration-1000) linear infinite;\n }\n\n .v-progress-circular[data-indeterminate] .v-progress-circular-bar {\n animation: v-progress-circular-dash var(--vectis-duration-1500) var(--vectis-ease-default)\n infinite;\n transition: none;\n }\n\n /* Both ends of the arc move, so it lengthens, shortens and travels around the circle\n at once. The spin it rides on is the shared one from styles/utilities.css; only\n these keyframes, which belong to this component alone, stay here. */\n @keyframes v-progress-circular-dash {\n 0% {\n stroke-dasharray: 5 100;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 70 100;\n stroke-dashoffset: -20;\n }\n\n 100% {\n stroke-dasharray: 5 100;\n stroke-dashoffset: -100;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-progress-circular-bar {\n transition: none;\n }\n\n /* Slowed down and not stopped: a motionless loader no longer says that anything is\n happening, which is the one thing it exists to say. */\n .v-progress-circular[data-indeterminate] .v-progress-circular-svg {\n animation-duration: var(--vectis-duration-3000);\n }\n\n .v-progress-circular[data-indeterminate] .v-progress-circular-bar {\n animation-duration: var(--vectis-duration-5000);\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoDA,IAAM,IAAQ,GAuBR,IAAI,EAAY,GAEhB,EAAE,YAAS,gBAAa,QACtB,EAAM,aACN,EAAM,GACd;yBAIE,EA2BO,QAAA;GA1BL,OAAM;GACN,MAAK;GACJ,cAAY,EAAA,CAAA,CAAC,CAAC,SAAS;GACvB,aAAW,EAAA;GACX,eAAa,EAAA,UAAU,KAAA,IAAiB,KAAA,IAAR;GAChC,cAAY,EAAA;GACZ,sBAAoB,EAAA,gBAAa,KAAQ,KAAA;GACzC,iBAAe,EAAA,gBAAgB,KAAA,IAAY,EAAA,CAAA;GAC5C,iBAAc;GACb,iBAAe,EAAA;GACf,OAAK,EAAA;uBAA6B,OAAO,EAAA,CAAA,CAAQ;sBAA2B,EAAA;2BAAoC,EAAA,CAAA,CAAE,CAAC,EAAA,IAAI;4BAAiC,EAAA,CAAA,CAAE,CAAC,EAAA,SAAS;;eAOrK,EAGM,OAAA;GAHD,OAAM;GAA0B,eAAY;MAC/C,EAA6D,UAAA;GAArD,OAAM;GAA4B,YAAW;MACrD,EAA2D,UAAA;GAAnD,OAAM;GAA0B,YAAW;aAExC,EAAA,kBAAkB,EAAA,aAAaA,EAAAA,OAAO,YAAA,EAAA,GAAnD,EAIO,QAJP,GAIO,CAHL,EAEO,EAAA,QAAA,WAAA;GAFA,OAAO,EAAA,CAAA;GAAU,KAAK,EAAA;GAAM,SAAS,EAAA,CAAA,IAAQ;WAE7C,CAAA,EAAA,EADF,EAAA,CAAA,CAAC,CAAC,SAAS,QAAQ,KAAK,MAAM,EAAA,CAAA,IAAQ,GAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,GAAA,IAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"VProgressCircular.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/VProgressCircular/VProgressCircular.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @core — no behavioural JS at all: value normalization and the display string.\n/**\n * Progress drawn as a ring, an SVG whose geometry is described entirely in CSS with no JS\n * computing anything.\n *\n * Two things make that possible. There is no `viewBox`, so one user unit is one pixel and\n * the circles take plain lengths — a fixed coordinate system would mean converting the\n * thickness into its units, hence knowing the ratio in code and recomputing it at every\n * change of size. And `pathLength=\"100\"` declares the outline 100 units long whatever its\n * real circumference, so the portion drawn is a percentage with no π anywhere.\n *\n * NAMING — pass a `label` saying what is progressing. The figure in the middle cannot\n * serve: `role=\"progressbar\"` makes its content presentational, so it is never announced.\n */\nimport { useAriaLabel } from '../../composables/useAriaLabel'\nimport { useProgressValue } from '../../composables/useProgressValue'\nimport { useMessages } from '../../i18n/state'\nimport { px } from '../../utils/css'\n\n/** What the progress means, in colour. */\nexport type ProgressCircularTone = 'accent' | 'success' | 'warning' | 'danger' | 'neutral'\n\n/** How the arc ends. */\nexport type ProgressCircularShape = 'rounded' | 'square'\n\ninterface ProgressCircularProps {\n /** How far along it is. Anything outside the range is brought back into it. */\n value?: number\n /**\n * What is progressing, in words, for screen readers. It draws nothing on screen, and falls\n * back to the design system dictionary; an `aria-label` or `aria-labelledby` of your own\n * takes precedence over it.\n */\n label?: string\n /** What counts as finished. The other end is always zero. */\n max?: number\n /**\n * Says that the progress cannot be measured: the ring turns continuously and the\n * value is ignored.\n */\n indeterminate?: boolean\n /** What the progress means, expressed as a colour. */\n tone?: ProgressCircularTone\n /**\n * A colour of your own (hex, CSS name or `oklch()`), which replaces the tone. The\n * unfilled ring's shade is derived from it against the theme, so it follows the light\n * and the dark one.\n */\n color?: string\n /** The diameter, always IN PIXELS: `96` and `'96'` both give 96px. */\n size?: number | string\n /** How thick the ring is, always IN PIXELS: `8` and `'8'` both give 8px. */\n thickness?: number | string\n /** Whether the ends of the drawn arc are rounded or cut square. */\n shape?: ProgressCircularShape\n /**\n * Writes the percentage in the middle of the ring. It is ignored while the progress is\n * unmeasurable, there being no figure to write.\n */\n showValue?: boolean\n}\n\nconst props = withDefaults(defineProps<ProgressCircularProps>(), {\n value: 0,\n label: undefined,\n max: 100,\n indeterminate: false,\n tone: 'accent',\n color: undefined,\n size: undefined,\n thickness: undefined,\n shape: 'rounded',\n showValue: false,\n})\n\ndefineSlots<{\n /**\n * What to put in the middle of the ring instead of the percentage — a count of files,\n * an icon, a shortened figure.\n */\n default?(props: { value: number; max: number; percent: number }): unknown\n}>()\n\n/* The percent sign, and the non-breaking space French puts before it where English puts\n nothing, are a convention of the language: they belong in the dictionary rather than\n in this file. Any other format goes through the slot above. */\nconst m = useMessages()\n\nconst {\n max: normalizedMax,\n clamped,\n fraction,\n percent,\n roundedPercent,\n} = useProgressValue(\n () => props.value,\n () => props.max,\n)\n\n// @a11y\n// The canonical cascade: a consumer's `aria-labelledby`, then their `aria-label`, then the\n// `label` prop, then the dictionary. An indicator takes no name from the text inside it, so\n// without the last step it would have none at all.\nconst ariaLabel = useAriaLabel(() => props.label ?? m.value.progress.label)\n</script>\n\n<template>\n <span\n class=\"v-progress-circular v-tone\"\n role=\"progressbar\"\n :aria-label=\"ariaLabel\"\n :data-tone=\"tone\"\n :data-custom=\"color !== undefined ? '' : undefined\"\n :data-shape=\"shape\"\n :data-indeterminate=\"indeterminate ? '' : undefined\"\n :aria-valuenow=\"indeterminate ? undefined : clamped\"\n aria-valuemin=\"0\"\n :aria-valuemax=\"normalizedMax\"\n :style=\"{\n '--fill-fraction': String(fraction),\n '--custom-color': color,\n '--progress-diameter': px(size),\n '--progress-thickness': px(thickness),\n }\"\n >\n <svg class=\"v-progress-circular-svg\" aria-hidden=\"true\">\n <circle class=\"v-progress-circular-track\" pathLength=\"100\" />\n <circle class=\"v-progress-circular-bar\" pathLength=\"100\" />\n </svg>\n <span v-if=\"!indeterminate && (showValue || $slots.default)\" class=\"v-progress-circular-label\">\n <slot :value=\"clamped\" :max=\"normalizedMax\" :percent=\"percent\">\n {{ m.progress.percent(roundedPercent) }}\n </slot>\n </span>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /* The two dimensions are declared here as defaults, on the very element the props\n write to inline — which is what makes an explicit size or thickness always win. */\n .v-progress-circular {\n --progress-diameter: var(--vectis-control-size-progress-circular-diameter);\n --progress-thickness: var(--vectis-control-size-progress-circular-thickness);\n /* Arc and track are the tone's solid and soft colours, read from the shared table\n (`.v-tone`, set in the template). No text colour is taken from it: the figure sits\n in the hole of the ring, against the page, in the ordinary text colour. */\n --progress-fill: var(--tone-bg-solid);\n --progress-track: var(--tone-bg-soft);\n display: inline-grid;\n inline-size: var(--progress-diameter);\n block-size: var(--progress-diameter);\n vertical-align: middle;\n }\n\n .v-progress-circular-svg,\n .v-progress-circular-label {\n grid-area: 1 / 1;\n }\n\n .v-progress-circular-svg {\n inline-size: 100%;\n block-size: 100%;\n /* Turns the ring so that it starts at twelve o'clock rather than at three. It is\n written as its own property and not as a transform, so that it COMPOSES with the\n spinning of the unmeasurable mode instead of being overwritten by it. */\n rotate: -90deg;\n }\n\n /* In a right-to-left page the ring fills the other way round, following the reading\n direction. These individual properties are applied in a fixed order — move, turn,\n then mirror — so the mirroring is taken into account before the quarter turn above. */\n .v-progress-circular:dir(rtl) .v-progress-circular-svg {\n scale: 1 -1;\n }\n\n /* The geometry, entirely in CSS and in plain lengths. Percentages are avoided\n deliberately: a radius given as a percentage is resolved against a normalized\n diagonal rather than against the width, and there is no reason to expose the\n component to that when the diameter is always a length to begin with. */\n .v-progress-circular-track,\n .v-progress-circular-bar {\n cx: calc(var(--progress-diameter) / 2);\n cy: calc(var(--progress-diameter) / 2);\n /* A thickness as large as the diameter would give a NEGATIVE radius, which is an\n error in SVG: the circle would simply not be drawn. The floor degrades that case\n to a radius of zero instead. */\n r: max(0px, calc((var(--progress-diameter) - var(--progress-thickness)) / 2));\n fill: none;\n stroke-width: var(--progress-thickness);\n }\n\n .v-progress-circular-track {\n stroke: var(--progress-track);\n }\n\n .v-progress-circular-bar {\n stroke: var(--progress-fill);\n stroke-linecap: round;\n stroke-dasharray: 100;\n stroke-dashoffset: calc(100 - 100 * var(--fill-fraction));\n transition: stroke-dashoffset var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n .v-progress-circular[data-shape='square'] .v-progress-circular-bar {\n stroke-linecap: butt;\n }\n\n /* A custom colour replaces the tone: at (0,2,0) it beats the base rule's mapping\n whatever the order the two are written in. */\n .v-progress-circular[data-custom] {\n --progress-fill: var(--custom-color);\n --progress-track: color-mix(in oklab, var(--custom-color), var(--vectis-color-surface) 85%);\n }\n\n .v-progress-circular-label {\n display: flex;\n align-items: center;\n justify-content: center;\n /* TRAP — this centres the BOX itself in its cell, and it is not redundant with the\n centring above. The maximum width below stops the box from being stretched to\n fill the cell, and a stretch that cannot apply falls back to the START edge: the\n figure would end up against the side of the ring. */\n place-self: center;\n max-inline-size: calc(var(--progress-diameter) - var(--progress-thickness) * 2);\n color: var(--vectis-color-text);\n font-family: var(--vectis-text-family);\n /* Sized as a fraction of the diameter so it stays in proportion at every size — the\n same tolerance already granted to VSpinner's stroke — with a floor at the smallest\n type token, below which it would be unreadable. */\n font-size: max(var(--vectis-text-caption-size), calc(var(--progress-diameter) / 4));\n font-weight: var(--vectis-text-control-weight);\n line-height: var(--vectis-text-control-leading);\n text-align: center;\n }\n\n /* When the progress cannot be measured, two animations run at once: the whole ring\n turns, and the arc drawn on it lengthens and shortens. Their periods are deliberately\n not multiples of one another — were the arc to restart on every rotation, the pair\n would repeat the same picture over and over and read as a mechanical beat. At 1s and\n 1.5s they only realign every third turn; the slowed-down pair below is 3s and 5s, so\n every fifth. Keep any change to those four values out of a whole-number ratio. */\n .v-progress-circular[data-indeterminate] .v-progress-circular-svg {\n animation: v-spin var(--vectis-duration-1000) linear infinite;\n }\n\n .v-progress-circular[data-indeterminate] .v-progress-circular-bar {\n animation: v-progress-circular-dash var(--vectis-duration-1500) var(--vectis-ease-default)\n infinite;\n transition: none;\n }\n\n /* Both ends of the arc move, so it lengthens, shortens and travels around the circle\n at once. The spin it rides on is the shared one from styles/utilities.css; only\n these keyframes, which belong to this component alone, stay here. */\n @keyframes v-progress-circular-dash {\n 0% {\n stroke-dasharray: 5 100;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 70 100;\n stroke-dashoffset: -20;\n }\n\n 100% {\n stroke-dasharray: 5 100;\n stroke-dashoffset: -100;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-progress-circular-bar {\n transition: none;\n }\n\n /* Slowed down and not stopped: a motionless loader no longer says that anything is\n happening, which is the one thing it exists to say. */\n .v-progress-circular[data-indeterminate] .v-progress-circular-svg {\n animation-duration: var(--vectis-duration-3000);\n }\n\n .v-progress-circular[data-indeterminate] .v-progress-circular-bar {\n animation-duration: var(--vectis-duration-5000);\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+DA,IAAM,IAAQ,GAwBR,IAAI,EAAY,GAEhB,EACJ,KAAK,GACL,YACA,aACA,YACA,sBACE,QACI,EAAM,aACN,EAAM,GACd,GAMM,IAAY,QAAmB,EAAM,SAAS,EAAE,MAAM,SAAS,KAAK;yBAIxE,EA2BO,QAAA;GA1BL,OAAM;GACN,MAAK;GACJ,cAAY,EAAA,CAAA;GACZ,aAAW,EAAA;GACX,eAAa,EAAA,UAAU,KAAA,IAAiB,KAAA,IAAR;GAChC,cAAY,EAAA;GACZ,sBAAoB,EAAA,gBAAa,KAAQ,KAAA;GACzC,iBAAe,EAAA,gBAAgB,KAAA,IAAY,EAAA,CAAA;GAC5C,iBAAc;GACb,iBAAe,EAAA,CAAA;GACf,OAAK,EAAA;uBAA6B,OAAO,EAAA,CAAA,CAAQ;sBAA2B,EAAA;2BAAoC,EAAA,CAAA,CAAE,CAAC,EAAA,IAAI;4BAAiC,EAAA,CAAA,CAAE,CAAC,EAAA,SAAS;;eAOrK,EAGM,OAAA;GAHD,OAAM;GAA0B,eAAY;MAC/C,EAA6D,UAAA;GAArD,OAAM;GAA4B,YAAW;MACrD,EAA2D,UAAA;GAAnD,OAAM;GAA0B,YAAW;aAExC,EAAA,kBAAkB,EAAA,aAAaA,EAAAA,OAAO,YAAA,EAAA,GAAnD,EAIO,QAJP,GAIO,CAHL,EAEO,EAAA,QAAA,WAAA;GAFA,OAAO,EAAA,CAAA;GAAU,KAAK,EAAA,CAAA;GAAgB,SAAS,EAAA,CAAA;WAE/C,CAAA,EAAA,EADF,EAAA,CAAA,CAAC,CAAC,SAAS,QAAQ,EAAA,CAAA,CAAc,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,GAAA,IAAA,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
|
|
2
|
-
@layer vectis.components{.v-progress-linear{--progress-thickness:var(--vectis-control-size-progress-linear-thickness);inline-size:100%;block-size:var(--progress-thickness);border-radius:var(--vectis-radius-pill);background:var(--progress-track);font-family:var(--vectis-text-family);font-size:var(--vectis-text-caption-size);font-weight:var(--vectis-text-control-weight);line-height:var(--vectis-text-control-leading);display:block;position:relative}.v-progress-linear[data-shape=square]{border-radius:0}.v-progress-linear-fill{inline-size:calc(100% * var(--fill-fraction));border-radius:inherit;background:var(--progress-fill);transition:inline-size var(--vectis-duration-base) var(--vectis-ease-default);position:absolute;inset-block:0;inset-inline-start:0}.v-progress-linear[data-
|
|
2
|
+
@layer vectis.components{.v-progress-linear{--progress-thickness:var(--vectis-control-size-progress-linear-thickness);--progress-fill:var(--tone-bg-solid);--progress-track:var(--tone-bg-soft);--progress-text-fallback:var(--tone-text-solid);inline-size:100%;block-size:var(--progress-thickness);border-radius:var(--vectis-radius-pill);background:var(--progress-track);font-family:var(--vectis-text-family);font-size:var(--vectis-text-caption-size);font-weight:var(--vectis-text-control-weight);line-height:var(--vectis-text-control-leading);display:block;position:relative}.v-progress-linear[data-shape=square]{border-radius:0}.v-progress-linear-fill{inline-size:calc(100% * var(--fill-fraction));border-radius:inherit;background:var(--progress-fill);transition:inline-size var(--vectis-duration-base) var(--vectis-ease-default);position:absolute;inset-block:0;inset-inline-start:0}.v-progress-linear[data-custom]{--progress-fill:var(--custom-color);--progress-track:color-mix(in oklab, var(--custom-color), var(--vectis-color-surface) 85%);--progress-text-fallback:var(--vectis-color-text-on-accent)}.v-progress-linear-text{--progress-clip-start:calc(100% * var(--fill-fraction));--progress-clip-end:-100vmax;padding-inline:var(--vectis-space-2);color:var(--vectis-color-text);clip-path:inset(-100vmax var(--progress-clip-end) -100vmax var(--progress-clip-start));transition:clip-path var(--vectis-duration-base) var(--vectis-ease-default);writing-mode:horizontal-tb;white-space:nowrap;pointer-events:none;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.v-progress-linear[data-value-position=start] .v-progress-linear-text{justify-content:start}.v-progress-linear[data-value-position=end] .v-progress-linear-text{justify-content:end}.v-progress-linear-text[data-on-fill]{--progress-clip-start:-100vmax;--progress-clip-end:calc(100% * (1 - var(--fill-fraction)));color:var(--progress-text-fallback)}@supports (color:contrast-color(red)){.v-progress-linear-text[data-on-fill]{color:contrast-color(var(--progress-fill))}}.v-progress-linear:dir(rtl) .v-progress-linear-text{clip-path:inset(-100vmax var(--progress-clip-start) -100vmax var(--progress-clip-end))}.v-progress-linear[data-orientation=vertical]{writing-mode:vertical-lr;inline-size:var(--vectis-control-size-progress-linear-length)}.v-progress-linear[data-orientation=vertical] .v-progress-linear-fill{inset-inline:auto 0}.v-progress-linear[data-orientation=vertical] .v-progress-linear-text{padding-inline:0;padding-block:var(--vectis-space-2);flex-direction:column-reverse}.v-progress-linear[data-orientation=vertical] .v-progress-linear-text,.v-progress-linear[data-orientation=vertical]:dir(rtl) .v-progress-linear-text{clip-path:inset(var(--progress-clip-end) -100vmax var(--progress-clip-start) -100vmax)}.v-progress-linear[data-indeterminate]{overflow:hidden}.v-progress-linear[data-indeterminate] .v-progress-linear-fill{--progress-bar:40%;inline-size:var(--progress-bar);animation:v-progress-linear-indeterminate var(--vectis-duration-1500) var(--vectis-ease-in-out) infinite;transition:none;inset-inline:0 auto}@keyframes v-progress-linear-indeterminate{0%{inset-inline-start:calc(-1 * var(--progress-bar))}to{inset-inline-start:100%}}.v-progress-linear[data-orientation=vertical][data-indeterminate] .v-progress-linear-fill{animation-direction:reverse}@media (prefers-reduced-motion:reduce){.v-progress-linear-fill,.v-progress-linear-text{transition:none}.v-progress-linear[data-indeterminate] .v-progress-linear-fill{animation-duration:var(--vectis-duration-5000)}}}
|
|
@@ -1,6 +1,20 @@
|
|
|
1
|
+
/** What the progress means, in colour. */
|
|
2
|
+
export type ProgressLinearTone = 'accent' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
3
|
+
/** How the track and the fill end. */
|
|
4
|
+
export type ProgressLinearShape = 'rounded' | 'square';
|
|
5
|
+
/** Where the value sits along the bar. */
|
|
6
|
+
export type ProgressLinearValuePosition = 'start' | 'center' | 'end';
|
|
7
|
+
/** Which way the bar fills. */
|
|
8
|
+
export type ProgressLinearOrientation = 'horizontal' | 'vertical';
|
|
1
9
|
interface ProgressLinearProps {
|
|
2
10
|
/** How far along it is. Anything outside the range is brought back into it. */
|
|
3
11
|
value?: number;
|
|
12
|
+
/**
|
|
13
|
+
* What is progressing, in words, for screen readers. It draws nothing on screen, and falls
|
|
14
|
+
* back to the design system dictionary; an `aria-label` or `aria-labelledby` of your own
|
|
15
|
+
* takes precedence over it.
|
|
16
|
+
*/
|
|
17
|
+
label?: string;
|
|
4
18
|
/** What counts as finished. The other end is always zero. */
|
|
5
19
|
max?: number;
|
|
6
20
|
/**
|
|
@@ -10,7 +24,7 @@ interface ProgressLinearProps {
|
|
|
10
24
|
*/
|
|
11
25
|
indeterminate?: boolean;
|
|
12
26
|
/** What the progress means, expressed as a colour. */
|
|
13
|
-
tone?:
|
|
27
|
+
tone?: ProgressLinearTone;
|
|
14
28
|
/**
|
|
15
29
|
* A colour of your own (hex, CSS name or `oklch()`), which replaces the tone. The
|
|
16
30
|
* track's own shade is derived from it against the theme, so it follows the light and
|
|
@@ -24,7 +38,7 @@ interface ProgressLinearProps {
|
|
|
24
38
|
*/
|
|
25
39
|
thickness?: number | string;
|
|
26
40
|
/** Whether the ends of the bar are rounded or square. */
|
|
27
|
-
shape?:
|
|
41
|
+
shape?: ProgressLinearShape;
|
|
28
42
|
/**
|
|
29
43
|
* Writes the percentage inside the bar. It is ignored while the progress is
|
|
30
44
|
* unmeasurable, there being no figure to write.
|
|
@@ -34,9 +48,9 @@ interface ProgressLinearProps {
|
|
|
34
48
|
* Where that text sits along the bar. On a vertical bar the start is the zero end,
|
|
35
49
|
* hence the bottom.
|
|
36
50
|
*/
|
|
37
|
-
valuePosition?:
|
|
51
|
+
valuePosition?: ProgressLinearValuePosition;
|
|
38
52
|
/** Turns the bar upright, filling from the bottom up. */
|
|
39
|
-
orientation?:
|
|
53
|
+
orientation?: ProgressLinearOrientation;
|
|
40
54
|
}
|
|
41
55
|
type __VLS_Slots = {
|
|
42
56
|
/**
|
|
@@ -53,16 +67,17 @@ type __VLS_Slots = {
|
|
|
53
67
|
}): unknown;
|
|
54
68
|
};
|
|
55
69
|
declare const __VLS_base: import('vue').DefineComponent<ProgressLinearProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ProgressLinearProps> & Readonly<{}>, {
|
|
70
|
+
label: string;
|
|
56
71
|
value: number;
|
|
57
|
-
tone:
|
|
58
|
-
orientation:
|
|
59
|
-
shape:
|
|
72
|
+
tone: ProgressLinearTone;
|
|
73
|
+
orientation: ProgressLinearOrientation;
|
|
74
|
+
shape: ProgressLinearShape;
|
|
60
75
|
color: string;
|
|
61
76
|
indeterminate: boolean;
|
|
62
77
|
max: number;
|
|
63
78
|
thickness: number | string;
|
|
64
79
|
showValue: boolean;
|
|
65
|
-
valuePosition:
|
|
80
|
+
valuePosition: ProgressLinearValuePosition;
|
|
66
81
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
67
82
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
68
83
|
declare const _default: typeof __VLS_export;
|