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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VSwitch.js","names":[],"sources":["../../../src/components/VSwitch/VSwitch.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A switch, for a setting that takes effect at once — where a checkbox states an\n * intention to be confirmed later.\n *\n * Underneath it is a native checkbox marked `role=\"switch\"`, so a screen reader\n * announces it as on or off rather than as ticked, and the keyboard and the form\n * behaviour come along for free. The track and the moving thumb are pure CSS,\n * following the input's checked state; the only JavaScript
|
|
1
|
+
{"version":3,"file":"VSwitch.js","names":[],"sources":["../../../src/components/VSwitch/VSwitch.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A switch, for a setting that takes effect at once — where a checkbox states an\n * intention to be confirmed later.\n *\n * Underneath it is a native checkbox marked `role=\"switch\"`, so a screen reader\n * announces it as on or off rather than as ticked, and the keyboard and the form\n * behaviour come along for free. The track and the moving thumb are pure CSS,\n * following the input's checked state; the only JavaScript besides the v-model is the\n * refusal `readonly` asks for, which a checkbox has no native form of.\n */\n\nimport { ref } from 'vue'\n\nimport { useFieldIds } from '../../composables/useFieldIds'\nimport { useRootAttrs } from '../../composables/useRootAttrs'\n\n/** Which side of the switch the label sits on. */\nexport type SwitchLabelPosition = 'start' | 'end'\n\ninterface SwitchProps {\n /** The text beside the switch, which names it. The default slot replaces it. */\n label?: string\n /**\n * A line of help under the label. It is tied to the switch for assistive technology,\n * so it is read out after the label rather than as part of it.\n */\n hint?: string\n /** Which side of the switch the label sits on. */\n labelPosition?: SwitchLabelPosition\n /**\n * Pushes the label and the switch to opposite ends of the line, the row taking the\n * full width available — the usual shape for a list of settings.\n */\n spread?: boolean\n /**\n * Marks the field as invalid, which rings the track and tells assistive technology\n * so. Use it for a rule the browser cannot check by itself; native validity is\n * already handled without it.\n */\n invalid?: boolean\n /** Makes the switch unusable, greyed out through the colour tokens. */\n disabled?: boolean\n /**\n * Shows the setting without allowing it to be changed. The switch can still be\n * focused, is announced as read-only and is still submitted with its form; a click\n * or the Space key simply changes nothing.\n */\n readonly?: boolean\n}\n\nconst props = withDefaults(defineProps<SwitchProps>(), {\n label: undefined,\n hint: undefined,\n labelPosition: 'end',\n spread: false,\n invalid: false,\n disabled: false,\n readonly: false,\n})\n\n// @a11y\n// The root element is a layout box, so the attributes the consumer passes have to be\n// redirected onto the input: `name` for the form, and the aria-* for the element that\n// actually carries the switch role.\ndefineOptions({ inheritAttrs: false })\nconst { attrs, rootClass, rootStyle, forwardedAttrs } = useRootAttrs()\nconst { hintId, describedBy } = useFieldIds(attrs, () => !!props.hint)\n\n/** Whether the switch is on. It starts off. */\nconst model = defineModel<boolean>({ default: false })\n\ndefineSlots<{\n /** The label, when it needs more than the `label` prop's text. It is clickable. */\n default?(): unknown\n}>()\n\nconst inputEl = ref<HTMLInputElement | null>(null)\n\n// @core\n// The native `readonly` attribute does nothing on a checkbox. Cancelling the click is what\n// refuses the change: the browser puts `checked` back and fires no `change`, so the v-model\n// never hears of it. It covers the Space key, which a checkbox turns into a click, and a\n// click on the label, which is forwarded to the input.\nfunction refuseWhenReadonly(event: MouseEvent) {\n if (props.readonly) event.preventDefault()\n}\n\n// The root is a wrapper, so a template ref on the component reaches the layout box and not\n// the control: these two are the way to the real switch.\ndefineExpose({\n /** Moves the focus to the real switch. */\n focus: (options?: FocusOptions) => inputEl.value?.focus(options),\n /** The real `<input type=\"checkbox\" role=\"switch\">`, for what `focus` does not cover. */\n el: inputEl,\n})\n</script>\n\n<template>\n <span\n class=\"v-switch v-choice\"\n :class=\"rootClass\"\n :style=\"rootStyle\"\n :data-label-position=\"labelPosition\"\n :data-spread=\"spread ? '' : undefined\"\n :data-readonly=\"readonly ? '' : undefined\"\n >\n <label class=\"v-choice-row\">\n <input\n ref=\"inputEl\"\n v-model=\"model\"\n type=\"checkbox\"\n role=\"switch\"\n class=\"v-switch-input v-hidden-input\"\n v-bind=\"forwardedAttrs\"\n :disabled=\"disabled\"\n :aria-invalid=\"invalid || undefined\"\n :aria-readonly=\"readonly || undefined\"\n :aria-describedby=\"describedBy\"\n @click=\"refuseWhenReadonly\"\n />\n <span class=\"v-switch-track\" aria-hidden=\"true\">\n <span class=\"v-switch-thumb\" />\n </span>\n <span v-if=\"$slots.default || label\" class=\"v-switch-label v-choice-label\">\n <slot>{{ label }}</slot>\n </span>\n </label>\n <span v-if=\"hint\" :id=\"hintId\" class=\"v-switch-hint v-choice-hint\">{{ hint }}</span>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /* The track's own measurements, which nothing outside this sheet reads. The row they\n sit in is `.v-choice`'s (styles/choice.css), and so is the focus ring. */\n .v-switch {\n --switch-track-w: var(--vectis-control-size-switch-w);\n --switch-track-h: var(--vectis-control-size-switch-h);\n --switch-pad: var(--vectis-control-size-switch-pad);\n }\n\n .v-switch-track {\n display: inline-flex;\n align-items: center;\n width: var(--switch-track-w);\n height: var(--switch-track-h);\n padding: var(--switch-pad);\n background: var(--vectis-color-border-strong);\n border-radius: var(--vectis-radius-pill);\n transition: background-color var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-switch-thumb {\n width: calc(var(--switch-track-h) - var(--switch-pad) * 2);\n height: calc(var(--switch-track-h) - var(--switch-pad) * 2);\n background: var(--vectis-color-text-on-accent);\n border-radius: var(--vectis-radius-pill);\n box-shadow: var(--vectis-shadow-xs);\n /* The thumb travels through `margin-inline-start` rather than a translation,\n because a logical property follows the reading direction: in a right-to-left\n page the thumb then moves leftwards on its own, where a translateX would have\n to be mirrored by a second rule. */\n transition: margin-inline-start var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n .v-switch-input:checked + .v-switch-track {\n background: var(--vectis-color-accent);\n }\n\n .v-switch-input:checked + .v-switch-track .v-switch-thumb {\n margin-inline-start: calc(var(--switch-track-w) - var(--switch-track-h));\n }\n\n /* The 15 % mix VCheckbox and VRadio take on hover, on the track's own colour. */\n .v-switch:not([data-readonly])\n .v-choice-row:hover\n .v-switch-input:not(:disabled, :checked)\n + .v-switch-track {\n background: color-mix(\n in oklab,\n var(--vectis-color-border-strong),\n var(--vectis-color-text) 15%\n );\n }\n\n /* The same pair of selectors as VCheckbox and VRadio, so a switch reports a rule the\n browser checked and one only the consumer can. It is drawn as a RING rather than as\n a border colour: the track has no border to tint, and a shadow changes no geometry,\n where a border would eat into the padding the thumb travels in. The focus outline\n sits further out, at its own offset, so the two never sit on the same pixels. */\n .v-switch-input:user-invalid + .v-switch-track,\n .v-switch-input[aria-invalid='true'] + .v-switch-track {\n box-shadow: 0 0 0 1px var(--vectis-color-danger);\n }\n\n /* Read-only trades the accent of an ON switch for the muted text colour, the way a\n read-only checkbox does, and the thumb takes the surface colour that contrasts with it\n in both themes. `:where()` keeps both rules at the weight of the disabled ones below,\n which therefore win by order on a switch that is both. */\n :where(.v-switch[data-readonly]) .v-switch-input:checked + .v-switch-track {\n background: var(--vectis-color-text-muted);\n }\n\n :where(.v-switch[data-readonly]) .v-switch-input:checked + .v-switch-track .v-switch-thumb {\n background: var(--vectis-color-surface);\n }\n\n /* The thumb takes text-subtle — the colour VCheckbox's disabled tick and VRadio's\n disabled dot take — which is what keeps it visible against the grey track in both\n themes. The greying of the row itself comes from `.v-choice`. */\n .v-switch-input:disabled + .v-switch-track {\n background: var(--vectis-color-surface-muted);\n }\n\n .v-switch-input:disabled + .v-switch-track .v-switch-thumb {\n background: var(--vectis-color-text-subtle);\n box-shadow: none;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-switch-track,\n .v-switch-thumb {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":""}
|
|
@@ -1,20 +1,41 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useRootAttrs as e } from "../../composables/useRootAttrs.js";
|
|
2
|
+
import { useFieldIds as t } from "../../composables/useFieldIds.js";
|
|
3
|
+
import { createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, defineComponent as o, mergeModels as s, mergeProps as c, normalizeClass as l, normalizeStyle as u, openBlock as d, ref as f, renderSlot as p, toDisplayString as m, unref as h, useModel as g, vModelCheckbox as _, withDirectives as v } from "vue";
|
|
2
4
|
//#region src/components/VSwitch/VSwitch.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var
|
|
5
|
+
var y = [
|
|
6
|
+
"data-label-position",
|
|
7
|
+
"data-spread",
|
|
8
|
+
"data-readonly"
|
|
9
|
+
], b = { class: "v-choice-row" }, x = [
|
|
10
|
+
"disabled",
|
|
11
|
+
"aria-invalid",
|
|
12
|
+
"aria-readonly",
|
|
13
|
+
"aria-describedby"
|
|
14
|
+
], S = {
|
|
4
15
|
key: 0,
|
|
5
|
-
class: "v-switch-label"
|
|
6
|
-
},
|
|
16
|
+
class: "v-switch-label v-choice-label"
|
|
17
|
+
}, C = ["id"], w = /*@__PURE__*/ o({
|
|
7
18
|
inheritAttrs: !1,
|
|
8
19
|
__name: "VSwitch",
|
|
9
|
-
props: /*@__PURE__*/
|
|
20
|
+
props: /*@__PURE__*/ s({
|
|
21
|
+
label: { default: void 0 },
|
|
22
|
+
hint: { default: void 0 },
|
|
10
23
|
labelPosition: { default: "end" },
|
|
11
24
|
spread: {
|
|
12
25
|
type: Boolean,
|
|
13
26
|
default: !1
|
|
14
27
|
},
|
|
28
|
+
invalid: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: !1
|
|
31
|
+
},
|
|
15
32
|
disabled: {
|
|
16
33
|
type: Boolean,
|
|
17
34
|
default: !1
|
|
35
|
+
},
|
|
36
|
+
readonly: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: !1
|
|
18
39
|
}
|
|
19
40
|
}, {
|
|
20
41
|
modelValue: {
|
|
@@ -24,28 +45,48 @@ var d = ["data-label-position", "data-spread"], f = ["disabled"], p = {
|
|
|
24
45
|
modelModifiers: {}
|
|
25
46
|
}),
|
|
26
47
|
emits: ["update:modelValue"],
|
|
27
|
-
setup(
|
|
28
|
-
let
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
48
|
+
setup(o, { expose: s }) {
|
|
49
|
+
let w = o, { attrs: T, rootClass: E, rootStyle: D, forwardedAttrs: O } = e(), { hintId: k, describedBy: A } = t(T, () => !!w.hint), j = g(o, "modelValue"), M = f(null);
|
|
50
|
+
function N(e) {
|
|
51
|
+
w.readonly && e.preventDefault();
|
|
52
|
+
}
|
|
53
|
+
return s({
|
|
54
|
+
focus: (e) => M.value?.focus(e),
|
|
55
|
+
el: M
|
|
56
|
+
}), (e, t) => (d(), r("span", {
|
|
57
|
+
class: l(["v-switch v-choice", h(E)]),
|
|
58
|
+
style: u(h(D)),
|
|
59
|
+
"data-label-position": o.labelPosition,
|
|
60
|
+
"data-spread": o.spread ? "" : void 0,
|
|
61
|
+
"data-readonly": o.readonly ? "" : void 0
|
|
62
|
+
}, [i("label", b, [
|
|
63
|
+
v(i("input", c({
|
|
64
|
+
ref_key: "inputEl",
|
|
65
|
+
ref: M,
|
|
66
|
+
"onUpdate:modelValue": t[0] ||= (e) => j.value = e,
|
|
36
67
|
type: "checkbox",
|
|
37
68
|
role: "switch",
|
|
38
|
-
class: "v-switch-input"
|
|
39
|
-
},
|
|
40
|
-
|
|
69
|
+
class: "v-switch-input v-hidden-input"
|
|
70
|
+
}, h(O), {
|
|
71
|
+
disabled: o.disabled,
|
|
72
|
+
"aria-invalid": o.invalid || void 0,
|
|
73
|
+
"aria-readonly": o.readonly || void 0,
|
|
74
|
+
"aria-describedby": h(A),
|
|
75
|
+
onClick: N
|
|
76
|
+
}), null, 16, x), [[_, j.value]]),
|
|
77
|
+
t[1] ||= i("span", {
|
|
41
78
|
class: "v-switch-track",
|
|
42
79
|
"aria-hidden": "true"
|
|
43
|
-
}, [
|
|
44
|
-
|
|
45
|
-
],
|
|
80
|
+
}, [i("span", { class: "v-switch-thumb" })], -1),
|
|
81
|
+
e.$slots.default || o.label ? (d(), r("span", S, [p(e.$slots, "default", {}, () => [a(m(o.label), 1)])])) : n("", !0)
|
|
82
|
+
]), o.hint ? (d(), r("span", {
|
|
83
|
+
key: 0,
|
|
84
|
+
id: h(k),
|
|
85
|
+
class: "v-switch-hint v-choice-hint"
|
|
86
|
+
}, m(o.hint), 9, C)) : n("", !0)], 14, y));
|
|
46
87
|
}
|
|
47
88
|
});
|
|
48
89
|
//#endregion
|
|
49
|
-
export {
|
|
90
|
+
export { w as default };
|
|
50
91
|
|
|
51
92
|
//# sourceMappingURL=VSwitch.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VSwitch.vue_vue_type_script_setup_true_lang.js","names":["$attrs","$slots"],"sources":["../../../src/components/VSwitch/VSwitch.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A switch, for a setting that takes effect at once — where a checkbox states an\n * intention to be confirmed later.\n *\n * Underneath it is a native checkbox marked `role=\"switch\"`, so a screen reader\n * announces it as on or off rather than as ticked, and the keyboard and the form\n * behaviour come along for free. The track and the moving thumb are pure CSS,\n * following the input's checked state; the only JavaScript is the v-model.\n */\ninterface SwitchProps {\n /** Which side of the switch the label sits on. */\n labelPosition?: 'start' | 'end'\n /**\n * Pushes the label and the switch to opposite ends of the line, the row taking the\n * full width available — the usual shape for a list of settings.\n */\n spread?: boolean\n /** Makes the switch unusable, greyed out through the colour tokens. */\n disabled?: boolean\n}\n\nwithDefaults(defineProps<SwitchProps>(), {\n labelPosition: 'end',\n spread: false,\n disabled: false,\n})\n\n// @a11y\n// The root element is the <label>, so the attributes the consumer passes have to be\n// redirected onto the input: `name` for the form, and the aria-* for the element\n// that actually carries the switch role.\ndefineOptions({ inheritAttrs: false })\n\nconst model = defineModel<boolean>({ default: false })\n\ndefineSlots<{\n /** The label. It is clickable, the whole component being wrapped in a `<label>`. */\n default?(): unknown\n}>()\n</script>\n\n<template>\n <label class=\"v-switch\" :data-label-position=\"labelPosition\" :data-spread=\"spread || undefined\">\n <input\n v-model=\"model\"\n type=\"checkbox\"\n role=\"switch\"\n class=\"v-switch-input\"\n v-bind=\"$attrs\"\n :disabled=\"disabled\"\n />\n <span class=\"v-switch-track\" aria-hidden=\"true\">\n <span class=\"v-switch-thumb\" />\n </span>\n <span v-if=\"$slots.default\" class=\"v-switch-label\"><slot /></span>\n </label>\n</template>\n\n<style>\n@layer vectis.components {\n .v-switch {\n --switch-track-w: var(--vectis-control-size-switch-w);\n --switch-track-h: var(--vectis-control-size-switch-h);\n --switch-pad: 2px;\n display: inline-flex;\n align-items: center;\n gap: var(--vectis-space-2);\n font-family: var(--vectis-text-family);\n font-size: var(--vectis-text-label-size);\n color: var(--vectis-color-text);\n cursor: pointer;\n }\n\n /* The input is taken out of the flow by its absolute position, so reversing the\n row only ever swaps the track and the label. */\n .v-switch[data-label-position='start'] {\n flex-direction: row-reverse;\n }\n\n .v-switch[data-spread] {\n display: flex;\n justify-content: space-between;\n }\n\n /* Hidden with `opacity` and never with `display: none`, which would take the input\n out of the tab order and out of the form. */\n .v-switch-input {\n position: absolute;\n opacity: 0;\n width: 1px;\n height: 1px;\n margin: 0;\n pointer-events: none;\n }\n\n .v-switch-track {\n display: inline-flex;\n align-items: center;\n width: var(--switch-track-w);\n height: var(--switch-track-h);\n padding: var(--switch-pad);\n flex: none;\n background: var(--vectis-color-border-strong);\n border-radius: var(--vectis-radius-full);\n transition: background-color var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-switch-thumb {\n width: calc(var(--switch-track-h) - var(--switch-pad) * 2);\n height: calc(var(--switch-track-h) - var(--switch-pad) * 2);\n background: var(--vectis-color-surface);\n border-radius: var(--vectis-radius-full);\n box-shadow: var(--vectis-shadow-xs);\n /* The thumb travels through `margin-inline-start` rather than a translation,\n because a logical property follows the reading direction: in a right-to-left\n page the thumb then moves leftwards on its own, where a translateX would have\n to be mirrored by a second rule. */\n transition: margin-inline-start var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n .v-switch-input:checked + .v-switch-track {\n background: var(--vectis-color-accent);\n }\n\n .v-switch-input:checked + .v-switch-track .v-switch-thumb {\n margin-inline-start: calc(var(--switch-track-w) - var(--switch-track-h));\n }\n\n .v-switch:hover .v-switch-input:not(:disabled):not(:checked) + .v-switch-track {\n background: color-mix(\n in oklab,\n var(--vectis-color-border-strong),\n var(--vectis-color-text) 12%\n );\n }\n\n .v-switch-input:focus-visible + .v-switch-track {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: var(--vectis-focus-ring-offset);\n }\n\n /* A disabled switch greys out through the colour tokens, the same ones VCheckbox\n and VRadio use, and never through opacity. The thumb takes text-subtle — the\n colour their disabled tick and dot take — which is what keeps it visible against\n the grey track in both themes. */\n .v-switch:has(.v-switch-input:disabled) {\n color: var(--vectis-color-text-subtle);\n cursor: not-allowed;\n }\n\n .v-switch-input:disabled + .v-switch-track {\n background: var(--vectis-color-surface-muted);\n }\n\n .v-switch-input:disabled + .v-switch-track .v-switch-thumb {\n background: var(--vectis-color-text-subtle);\n box-shadow: none;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-switch-track,\n .v-switch-thumb {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAkCA,IAAM,IAAQ,EAAoB,GAAA,YAAmB;yBASnD,EAaQ,SAAA;GAbD,OAAM;GAAY,uBAAqB,EAAA;GAAgB,eAAa,EAAA,UAAU,KAAA;;KACnF,EAOE,SAPF,EAOE;6CANc,QAAA;IACd,MAAK;IACL,MAAK;IACL,OAAM;MACEA,EAAAA,QAAM,EACb,UAAU,EAAA,SAAQ,CAAA,GAAA,MAAA,IAAA,CAAA,GAAA,CAAA,CAAA,GALV,EAAA,KAAK,CAAA,CAAA;YAOhB,EAEO,QAAA;IAFD,OAAM;IAAiB,eAAY;OACvC,EAA+B,QAAA,EAAzB,OAAM,iBAAgB,CAAA,CAAA,GAAA,EAAA;GAElBC,EAAAA,OAAO,WAAA,EAAA,GAAnB,EAAkE,QAAlE,GAAkE,CAAf,EAAQ,EAAA,QAAA,SAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA"}
|
|
1
|
+
{"version":3,"file":"VSwitch.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/VSwitch/VSwitch.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A switch, for a setting that takes effect at once — where a checkbox states an\n * intention to be confirmed later.\n *\n * Underneath it is a native checkbox marked `role=\"switch\"`, so a screen reader\n * announces it as on or off rather than as ticked, and the keyboard and the form\n * behaviour come along for free. The track and the moving thumb are pure CSS,\n * following the input's checked state; the only JavaScript besides the v-model is the\n * refusal `readonly` asks for, which a checkbox has no native form of.\n */\n\nimport { ref } from 'vue'\n\nimport { useFieldIds } from '../../composables/useFieldIds'\nimport { useRootAttrs } from '../../composables/useRootAttrs'\n\n/** Which side of the switch the label sits on. */\nexport type SwitchLabelPosition = 'start' | 'end'\n\ninterface SwitchProps {\n /** The text beside the switch, which names it. The default slot replaces it. */\n label?: string\n /**\n * A line of help under the label. It is tied to the switch for assistive technology,\n * so it is read out after the label rather than as part of it.\n */\n hint?: string\n /** Which side of the switch the label sits on. */\n labelPosition?: SwitchLabelPosition\n /**\n * Pushes the label and the switch to opposite ends of the line, the row taking the\n * full width available — the usual shape for a list of settings.\n */\n spread?: boolean\n /**\n * Marks the field as invalid, which rings the track and tells assistive technology\n * so. Use it for a rule the browser cannot check by itself; native validity is\n * already handled without it.\n */\n invalid?: boolean\n /** Makes the switch unusable, greyed out through the colour tokens. */\n disabled?: boolean\n /**\n * Shows the setting without allowing it to be changed. The switch can still be\n * focused, is announced as read-only and is still submitted with its form; a click\n * or the Space key simply changes nothing.\n */\n readonly?: boolean\n}\n\nconst props = withDefaults(defineProps<SwitchProps>(), {\n label: undefined,\n hint: undefined,\n labelPosition: 'end',\n spread: false,\n invalid: false,\n disabled: false,\n readonly: false,\n})\n\n// @a11y\n// The root element is a layout box, so the attributes the consumer passes have to be\n// redirected onto the input: `name` for the form, and the aria-* for the element that\n// actually carries the switch role.\ndefineOptions({ inheritAttrs: false })\nconst { attrs, rootClass, rootStyle, forwardedAttrs } = useRootAttrs()\nconst { hintId, describedBy } = useFieldIds(attrs, () => !!props.hint)\n\n/** Whether the switch is on. It starts off. */\nconst model = defineModel<boolean>({ default: false })\n\ndefineSlots<{\n /** The label, when it needs more than the `label` prop's text. It is clickable. */\n default?(): unknown\n}>()\n\nconst inputEl = ref<HTMLInputElement | null>(null)\n\n// @core\n// The native `readonly` attribute does nothing on a checkbox. Cancelling the click is what\n// refuses the change: the browser puts `checked` back and fires no `change`, so the v-model\n// never hears of it. It covers the Space key, which a checkbox turns into a click, and a\n// click on the label, which is forwarded to the input.\nfunction refuseWhenReadonly(event: MouseEvent) {\n if (props.readonly) event.preventDefault()\n}\n\n// The root is a wrapper, so a template ref on the component reaches the layout box and not\n// the control: these two are the way to the real switch.\ndefineExpose({\n /** Moves the focus to the real switch. */\n focus: (options?: FocusOptions) => inputEl.value?.focus(options),\n /** The real `<input type=\"checkbox\" role=\"switch\">`, for what `focus` does not cover. */\n el: inputEl,\n})\n</script>\n\n<template>\n <span\n class=\"v-switch v-choice\"\n :class=\"rootClass\"\n :style=\"rootStyle\"\n :data-label-position=\"labelPosition\"\n :data-spread=\"spread ? '' : undefined\"\n :data-readonly=\"readonly ? '' : undefined\"\n >\n <label class=\"v-choice-row\">\n <input\n ref=\"inputEl\"\n v-model=\"model\"\n type=\"checkbox\"\n role=\"switch\"\n class=\"v-switch-input v-hidden-input\"\n v-bind=\"forwardedAttrs\"\n :disabled=\"disabled\"\n :aria-invalid=\"invalid || undefined\"\n :aria-readonly=\"readonly || undefined\"\n :aria-describedby=\"describedBy\"\n @click=\"refuseWhenReadonly\"\n />\n <span class=\"v-switch-track\" aria-hidden=\"true\">\n <span class=\"v-switch-thumb\" />\n </span>\n <span v-if=\"$slots.default || label\" class=\"v-switch-label v-choice-label\">\n <slot>{{ label }}</slot>\n </span>\n </label>\n <span v-if=\"hint\" :id=\"hintId\" class=\"v-switch-hint v-choice-hint\">{{ hint }}</span>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n /* The track's own measurements, which nothing outside this sheet reads. The row they\n sit in is `.v-choice`'s (styles/choice.css), and so is the focus ring. */\n .v-switch {\n --switch-track-w: var(--vectis-control-size-switch-w);\n --switch-track-h: var(--vectis-control-size-switch-h);\n --switch-pad: var(--vectis-control-size-switch-pad);\n }\n\n .v-switch-track {\n display: inline-flex;\n align-items: center;\n width: var(--switch-track-w);\n height: var(--switch-track-h);\n padding: var(--switch-pad);\n background: var(--vectis-color-border-strong);\n border-radius: var(--vectis-radius-pill);\n transition: background-color var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-switch-thumb {\n width: calc(var(--switch-track-h) - var(--switch-pad) * 2);\n height: calc(var(--switch-track-h) - var(--switch-pad) * 2);\n background: var(--vectis-color-text-on-accent);\n border-radius: var(--vectis-radius-pill);\n box-shadow: var(--vectis-shadow-xs);\n /* The thumb travels through `margin-inline-start` rather than a translation,\n because a logical property follows the reading direction: in a right-to-left\n page the thumb then moves leftwards on its own, where a translateX would have\n to be mirrored by a second rule. */\n transition: margin-inline-start var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n .v-switch-input:checked + .v-switch-track {\n background: var(--vectis-color-accent);\n }\n\n .v-switch-input:checked + .v-switch-track .v-switch-thumb {\n margin-inline-start: calc(var(--switch-track-w) - var(--switch-track-h));\n }\n\n /* The 15 % mix VCheckbox and VRadio take on hover, on the track's own colour. */\n .v-switch:not([data-readonly])\n .v-choice-row:hover\n .v-switch-input:not(:disabled, :checked)\n + .v-switch-track {\n background: color-mix(\n in oklab,\n var(--vectis-color-border-strong),\n var(--vectis-color-text) 15%\n );\n }\n\n /* The same pair of selectors as VCheckbox and VRadio, so a switch reports a rule the\n browser checked and one only the consumer can. It is drawn as a RING rather than as\n a border colour: the track has no border to tint, and a shadow changes no geometry,\n where a border would eat into the padding the thumb travels in. The focus outline\n sits further out, at its own offset, so the two never sit on the same pixels. */\n .v-switch-input:user-invalid + .v-switch-track,\n .v-switch-input[aria-invalid='true'] + .v-switch-track {\n box-shadow: 0 0 0 1px var(--vectis-color-danger);\n }\n\n /* Read-only trades the accent of an ON switch for the muted text colour, the way a\n read-only checkbox does, and the thumb takes the surface colour that contrasts with it\n in both themes. `:where()` keeps both rules at the weight of the disabled ones below,\n which therefore win by order on a switch that is both. */\n :where(.v-switch[data-readonly]) .v-switch-input:checked + .v-switch-track {\n background: var(--vectis-color-text-muted);\n }\n\n :where(.v-switch[data-readonly]) .v-switch-input:checked + .v-switch-track .v-switch-thumb {\n background: var(--vectis-color-surface);\n }\n\n /* The thumb takes text-subtle — the colour VCheckbox's disabled tick and VRadio's\n disabled dot take — which is what keeps it visible against the grey track in both\n themes. The greying of the row itself comes from `.v-choice`. */\n .v-switch-input:disabled + .v-switch-track {\n background: var(--vectis-color-surface-muted);\n }\n\n .v-switch-input:disabled + .v-switch-track .v-switch-thumb {\n background: var(--vectis-color-text-subtle);\n box-shadow: none;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-switch-track,\n .v-switch-thumb {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmDA,IAAM,IAAQ,GAeR,EAAE,UAAO,cAAW,cAAW,sBAAmB,EAAa,GAC/D,EAAE,WAAQ,mBAAgB,EAAY,SAAa,CAAC,CAAC,EAAM,IAAI,GAG/D,IAAQ,EAAoB,GAAA,YAAmB,GAO/C,IAAU,EAA6B,IAAI;EAOjD,SAAS,EAAmB,GAAmB;GAC7C,AAAI,EAAM,YAAU,EAAM,eAAe;EAC3C;SAIA,EAAa;GAEX,QAAQ,MAA2B,EAAQ,OAAO,MAAM,CAAO;GAE/D,IAAI;EACN,CAAC,mBAIC,EA8BO,QAAA;GA7BL,OAAK,EAAA,CAAC,qBACE,EAAA,CAAA,CAAS,CAAA;GAChB,OAAK,EAAE,EAAA,CAAA,CAAS;GAChB,uBAAqB,EAAA;GACrB,eAAa,EAAA,SAAM,KAAQ,KAAA;GAC3B,iBAAe,EAAA,WAAQ,KAAQ,KAAA;MAEhC,EAoBQ,SApBR,GAoBQ;KAnBN,EAYE,SAZF,EAYE;aAXI;IAAJ,KAAI;6CACU,QAAA;IACd,MAAK;IACL,MAAK;IACL,OAAM;MACE,EAAA,CAAA,GAAc;IACrB,UAAU,EAAA;IACV,gBAAc,EAAA,WAAW,KAAA;IACzB,iBAAe,EAAA,YAAY,KAAA;IAC3B,oBAAkB,EAAA,CAAA;IAClB,SAAO;0BATC,EAAA,KAAK,CAAA,CAAA;YAWhB,EAEO,QAAA;IAFD,OAAM;IAAiB,eAAY;OACvC,EAA+B,QAAA,EAAzB,OAAM,iBAAgB,CAAA,CAAA,GAAA,EAAA;GAElBA,EAAAA,OAAO,WAAW,EAAA,SAAA,EAAA,GAA9B,EAEO,QAFP,GAEO,CADL,EAAwB,EAAA,QAAA,WAAA,CAAA,SAAA,CAAA,EAAA,EAAf,EAAA,KAAK,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA;MAGN,EAAA,QAAA,EAAA,GAAZ,EAAoF,QAAA;;GAAjE,IAAI,EAAA,CAAA;GAAQ,OAAM;OAAiC,EAAA,IAAI,GAAA,GAAA,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-tab[data-size]{white-space:nowrap;flex:none;position:relative}.v-tab[data-size]
|
|
2
|
+
@layer vectis.components{.v-tab[data-size]{white-space:nowrap;flex:none;position:relative}.v-tab[data-size]:focus-visible{outline-offset:calc(-1 * var(--vectis-focus-ring-width))}.v-tab-label{text-overflow:ellipsis;overflow:hidden}.v-tabs[data-grow] .v-tab[data-size]{flex:1 1 0;min-inline-size:0}.v-tabs[data-variant=inset] .v-tab[data-size]{border-radius:calc(var(--vectis-radius-surface) - var(--vectis-space-1))}.v-tabs:is([data-variant=flat],[data-variant=outlined]) .v-tab[data-size]{border-radius:0}.v-tabs[data-variant=outlined] .v-tab[data-size]:first-of-type{border-start-start-radius:calc(var(--vectis-radius-surface) - 1px)}.v-tabs[data-variant=outlined][data-orientation=horizontal] .v-tab[data-size]:last-of-type{border-start-end-radius:calc(var(--vectis-radius-surface) - 1px)}.v-tabs[data-variant=outlined][data-orientation=vertical] .v-tab[data-size]:last-of-type{border-end-start-radius:calc(var(--vectis-radius-surface) - 1px)}.v-tabs:is([data-variant=flat],[data-variant=outlined]) .v-tab[data-size]:after{content:"";block-size:var(--vectis-control-size-tab-indicator);opacity:0;transition:opacity var(--vectis-duration-fast) var(--vectis-ease-default);background:currentColor;position:absolute;inset-block-end:0;inset-inline:0}.v-tabs:is([data-variant=flat],[data-variant=outlined])[data-orientation=vertical] .v-tab[data-size]:after{block-size:auto;inline-size:var(--vectis-control-size-tab-indicator);inset-block:0;inset-inline:0 auto}.v-tabs:is([data-variant=flat],[data-variant=outlined]) .v-tab[data-size][aria-selected=true]:after{opacity:1}@media (prefers-reduced-motion:reduce){.v-tabs:is([data-variant=flat],[data-variant=outlined]) .v-tab[data-size]:after{transition:none}}}
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
import { IconSource } from '../VIcon/types.js';
|
|
2
|
-
|
|
3
|
-
* One tab. It IS a VButton — the colour, the size, the focus ring and the disabled
|
|
4
|
-
* state all come from there — and what this component adds is the handful of
|
|
5
|
-
* attributes that make a button part of a tab row for assistive technology.
|
|
6
|
-
*
|
|
7
|
-
* Used outside a VTabs it still renders perfectly well, simply never selected, the
|
|
8
|
-
* same way an accordion item does outside its accordion.
|
|
9
|
-
*/
|
|
2
|
+
import { ItemValue } from '../../types.js';
|
|
10
3
|
interface TabProps {
|
|
11
4
|
/**
|
|
12
5
|
* What this tab is called in code. The panel carrying the same value is the one it
|
|
13
6
|
* shows, and it is also what the v-model holds when this tab is selected.
|
|
14
7
|
*/
|
|
15
|
-
value:
|
|
8
|
+
value: ItemValue;
|
|
16
9
|
/** The visible label. The default slot replaces it. */
|
|
17
10
|
label?: string;
|
|
18
11
|
/** An icon before the label: an icon name, or an explicit render. */
|
|
19
|
-
|
|
12
|
+
iconStart?: IconSource;
|
|
13
|
+
/** An icon after the label, for a count or a state the tab carries. */
|
|
14
|
+
iconEnd?: IconSource;
|
|
15
|
+
/** Renders `iconStart` and `iconEnd` in their filled form (the font's `FILL` axis). */
|
|
16
|
+
iconFilled?: boolean;
|
|
20
17
|
/**
|
|
21
18
|
* Makes the tab unusable: it no longer responds, the arrow keys skip over it, and it
|
|
22
|
-
* greys out through the colour tokens.
|
|
19
|
+
* greys out through the colour tokens. A VTabs set `disabled` disables every tab, this
|
|
20
|
+
* one included, whatever this says.
|
|
23
21
|
*/
|
|
24
22
|
disabled?: boolean;
|
|
25
23
|
}
|
|
@@ -30,7 +28,9 @@ type __VLS_Slots = {
|
|
|
30
28
|
declare const __VLS_base: import('vue').DefineComponent<TabProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TabProps> & Readonly<{}>, {
|
|
31
29
|
label: string;
|
|
32
30
|
disabled: boolean;
|
|
33
|
-
|
|
31
|
+
iconStart: IconSource;
|
|
32
|
+
iconEnd: IconSource;
|
|
33
|
+
iconFilled: boolean;
|
|
34
34
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
35
35
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
36
36
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VTab.js","names":[],"sources":["../../../src/components/VTabs/VTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\
|
|
1
|
+
{"version":3,"file":"VTab.js","names":[],"sources":["../../../src/components/VTabs/VTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * One tab. It IS a VButton — the colour, the size, the focus ring and the disabled\n * state all come from there — and what this component adds is the handful of\n * attributes that make a button part of a tab row for assistive technology.\n *\n * Used outside a VTabs it still renders, simply never selected, as a quiet neutral button\n * at VButton's own size: the row's decisions all come from the context, and a tab with no\n * row takes VButton's defaults rather than a copy of the row's.\n */\n\nimport { computed, inject } from 'vue'\n\nimport VButton from '../VButton/VButton.vue'\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport type { IconSource } from '../VIcon/types'\nimport { tabsKey } from './context'\nimport type { ItemValue } from '../../types'\n\ninterface TabProps {\n /**\n * What this tab is called in code. The panel carrying the same value is the one it\n * shows, and it is also what the v-model holds when this tab is selected.\n */\n value: ItemValue\n /** The visible label. The default slot replaces it. */\n label?: string\n /** An icon before the label: an icon name, or an explicit render. */\n iconStart?: IconSource\n /** An icon after the label, for a count or a state the tab carries. */\n iconEnd?: IconSource\n /** Renders `iconStart` and `iconEnd` in their filled form (the font's `FILL` axis). */\n iconFilled?: boolean\n /**\n * Makes the tab unusable: it no longer responds, the arrow keys skip over it, and it\n * greys out through the colour tokens. A VTabs set `disabled` disables every tab, this\n * one included, whatever this says.\n */\n disabled?: boolean\n}\n\nconst props = withDefaults(defineProps<TabProps>(), {\n label: undefined,\n iconStart: undefined,\n iconEnd: undefined,\n iconFilled: false,\n disabled: false,\n})\n\nconst slots = defineSlots<{\n /** The content of the tab, replacing the `label` prop. */\n default?(): unknown\n}>()\n\nconst tabs = inject(tabsKey, null)\n\nconst selected = computed(() => tabs != null && tabs.value === props.value)\nconst tabId = computed(() => tabs?.tabId(props.value))\nconst panelId = computed(() => (tabs?.hasPanels ? tabs.panelId(props.value) : undefined))\n// Cumulative, the VButtonGroup rule: a row switched off has no tab that can opt back in.\nconst resolvedDisabled = computed(() => props.disabled || Boolean(tabs?.disabled))\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.\n/**\n * An icon, on either side, and no label at all: the tab becomes a square, like a VIconButton.\n * The same definition as VChip's, and the square itself is VButton's `[data-icon-only]` rule.\n */\nfunction iconOnly() {\n return !props.label && !slots.default && Boolean(props.iconStart || props.iconEnd)\n}\n\n// @keyboard @a11y\n/*\n * Selecting a tab the moment it takes focus, which is what `automatic` activation\n * means. It lives here rather than in the row's keyboard handler, because this\n * component knows its own value: the handler would have to read it back from a DOM\n * attribute, and would lose the distinction between the number 1 and the string \"1\"\n * doing so.\n */\nfunction onFocus() {\n if (tabs?.activation === 'automatic' && !resolvedDisabled.value) tabs.select(props.value)\n}\n</script>\n\n<template>\n <VButton\n :id=\"tabId\"\n class=\"v-tab\"\n role=\"tab\"\n :aria-selected=\"selected ? 'true' : 'false'\"\n :aria-controls=\"panelId\"\n :tabindex=\"selected ? 0 : -1\"\n variant=\"ghost\"\n :elevated=\"selected && tabs?.variant === 'inset'\"\n :tone=\"selected && tabs ? tabs.tone : 'neutral'\"\n :size=\"tabs?.size\"\n :compact=\"tabs?.compact\"\n :disabled=\"resolvedDisabled\"\n :data-icon-only=\"iconOnly() ? '' : undefined\"\n @click=\"tabs?.select(value)\"\n @focus=\"onFocus\"\n >\n <template v-if=\"iconStart\" #start>\n <VIcon v-bind=\"iconProps(iconStart)\" :filled=\"iconFilled\" />\n </template>\n <template v-if=\"iconEnd\" #end>\n <VIcon v-bind=\"iconProps(iconEnd)\" :filled=\"iconFilled\" />\n </template>\n <!-- The label is wrapped in an element of its own so that it can be truncated:\n an ellipsis cannot be applied to the bare text of a flex container, and tabs\n sharing the bar equally have to be able to cut their labels short -->\n <span v-if=\"!iconOnly()\" class=\"v-tab-label\"\n ><slot>{{ label }}</slot></span\n >\n </VButton>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * These rules override a VButton, so they are qualified by an attribute that button\n * always renders. That is what makes them win whatever order the two sheets end up\n * in — the same device VIconButton uses.\n */\n .v-tab[data-size] {\n /* The indicator below is positioned against this box, and a button declares no\n position of its own. */\n position: relative;\n /*\n * The tabs are never compressed, and that is precisely WHAT makes the row\n * overflow. Allowed to shrink, they would squeeze down to their smallest possible\n * width and scrolling would never come into play at all.\n */\n flex: none;\n white-space: nowrap;\n }\n\n /*\n * The focus ring is drawn INSIDE the tab. The row scrolls, and a ring sitting\n * outside the tab would be cropped by that scrolling box on the first and last\n * tabs.\n */\n .v-tab[data-size]:focus-visible {\n outline-offset: calc(-1 * var(--vectis-focus-ring-width));\n }\n\n .v-tab-label {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .v-tabs[data-grow] .v-tab[data-size] {\n flex: 1 1 0;\n min-inline-size: 0;\n }\n\n /* A box nested inside a rounded one needs a smaller radius to look concentric: the\n track's own, less the padding between them. */\n .v-tabs[data-variant='inset'] .v-tab[data-size] {\n border-radius: calc(var(--vectis-radius-surface) - var(--vectis-space-1));\n }\n\n /*\n * On a track the tabs are contiguous SEGMENTS with square corners: what carves the\n * bar up is the rule and the indicator, not the silhouette of each button. Rounded\n * corners would leave pale notches above the rule, and a gap would break the row of\n * hover highlights into islands.\n *\n * The gap is removed on the row rather than here, the row being what declares it;\n * the bar's own gap stays, since that one separates the scroll buttons and not the\n * tabs.\n */\n .v-tabs:is([data-variant='flat'], [data-variant='outlined']) .v-tab[data-size] {\n border-radius: 0;\n }\n\n /*\n * Inside a card the row takes its rounded corners back at the ENDS only, the seams\n * between tabs staying square — the VButtonGroup idiom, applied to the one edge the\n * track does not occupy.\n *\n * The radius is the CARD's inner one — its own, less the border it sits behind — and\n * not the button's. The bar spends no gutter, so an end tab lands exactly on a corner\n * of the frame and has to follow that curve: a button radius, smaller, would leave a\n * sliver of card showing outside the tab as soon as it painted a background.\n *\n * TRAP — the selectors ask for the first and last of their TYPE rather than the\n * first and last child, because the scroll markers are the row's real first and last\n * children. They are spans, the tabs being the only buttons, which is what makes the\n * distinction work.\n */\n .v-tabs[data-variant='outlined'] .v-tab[data-size]:first-of-type {\n border-start-start-radius: calc(var(--vectis-radius-surface) - 1px);\n }\n\n .v-tabs[data-variant='outlined'][data-orientation='horizontal'] .v-tab[data-size]:last-of-type {\n border-start-end-radius: calc(var(--vectis-radius-surface) - 1px);\n }\n\n /* Turned vertical, the track has migrated to the end edge, so the free edge is the\n start one: that is where the ends of the column round their corners. */\n .v-tabs[data-variant='outlined'][data-orientation='vertical'] .v-tab[data-size]:last-of-type {\n border-end-start-radius: calc(var(--vectis-radius-surface) - 1px);\n }\n\n /*\n * The bar marking the selected tab, in the two framed variants. It is painted in the\n * tab's own text colour rather than by reading one of VButton's private variables:\n * that way it follows the selected tone AND the grey of a disabled tab on its own,\n * without this file having to know anything about either.\n */\n .v-tabs:is([data-variant='flat'], [data-variant='outlined']) .v-tab[data-size]::after {\n content: '';\n position: absolute;\n inset-inline: 0;\n inset-block-end: 0;\n block-size: var(--vectis-control-size-tab-indicator);\n background: currentColor;\n opacity: 0;\n transition: opacity var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-tabs:is([data-variant='flat'], [data-variant='outlined'])[data-orientation='vertical']\n .v-tab[data-size]::after {\n inset-block: 0;\n inset-inline: auto;\n inset-inline-start: 0;\n block-size: auto;\n inline-size: var(--vectis-control-size-tab-indicator);\n }\n\n .v-tabs:is([data-variant='flat'], [data-variant='outlined'])\n .v-tab[data-size][aria-selected='true']::after {\n opacity: 1;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-tabs:is([data-variant='flat'], [data-variant='outlined']) .v-tab[data-size]::after {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":""}
|
|
@@ -1,51 +1,63 @@
|
|
|
1
|
-
import e from "../VIcon/
|
|
2
|
-
import
|
|
1
|
+
import { iconProps as e } from "../VIcon/iconProps.js";
|
|
2
|
+
import t from "../VIcon/VIcon.js";
|
|
3
3
|
import n from "../VButton/VButton.js";
|
|
4
4
|
import { tabsKey as r } from "./context.js";
|
|
5
|
-
import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createSlots as c, createTextVNode as l, createVNode as u, defineComponent as d,
|
|
5
|
+
import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createSlots as c, createTextVNode as l, createVNode as u, defineComponent as d, inject as f, mergeProps as p, openBlock as m, renderSlot as h, toDisplayString as g, unref as _, useSlots as v, withCtx as y } from "vue";
|
|
6
6
|
//#region src/components/VTabs/VTab.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
7
|
+
var b = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "v-tab-label"
|
|
10
|
-
},
|
|
10
|
+
}, x = /*@__PURE__*/ d({
|
|
11
11
|
__name: "VTab",
|
|
12
12
|
props: {
|
|
13
13
|
value: {},
|
|
14
14
|
label: { default: void 0 },
|
|
15
|
-
|
|
15
|
+
iconStart: { default: void 0 },
|
|
16
|
+
iconEnd: { default: void 0 },
|
|
17
|
+
iconFilled: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: !1
|
|
20
|
+
},
|
|
16
21
|
disabled: {
|
|
17
22
|
type: Boolean,
|
|
18
23
|
default: !1
|
|
19
24
|
}
|
|
20
25
|
},
|
|
21
26
|
setup(d) {
|
|
22
|
-
let
|
|
27
|
+
let x = d, S = v(), C = f(r, null), w = i(() => C != null && C.value === x.value), T = i(() => C?.tabId(x.value)), E = i(() => C?.hasPanels ? C.panelId(x.value) : void 0), D = i(() => x.disabled || !!C?.disabled);
|
|
28
|
+
function O() {
|
|
29
|
+
return !x.label && !S.default && !!(x.iconStart || x.iconEnd);
|
|
30
|
+
}
|
|
23
31
|
function k() {
|
|
24
|
-
|
|
32
|
+
C?.activation === "automatic" && !D.value && C.select(x.value);
|
|
25
33
|
}
|
|
26
|
-
return (r, i) => (
|
|
27
|
-
id:
|
|
34
|
+
return (r, i) => (m(), a(n, {
|
|
35
|
+
id: T.value,
|
|
28
36
|
class: "v-tab",
|
|
29
37
|
role: "tab",
|
|
30
|
-
"aria-selected":
|
|
31
|
-
"aria-controls":
|
|
32
|
-
tabindex:
|
|
38
|
+
"aria-selected": w.value ? "true" : "false",
|
|
39
|
+
"aria-controls": E.value,
|
|
40
|
+
tabindex: w.value ? 0 : -1,
|
|
33
41
|
variant: "ghost",
|
|
34
|
-
elevated:
|
|
35
|
-
tone:
|
|
36
|
-
size:
|
|
37
|
-
compact:
|
|
38
|
-
disabled:
|
|
39
|
-
"data-icon-only": O
|
|
40
|
-
onClick: i[0] ||= (e) =>
|
|
42
|
+
elevated: w.value && _(C)?.variant === "inset",
|
|
43
|
+
tone: w.value && _(C) ? _(C).tone : "neutral",
|
|
44
|
+
size: _(C)?.size,
|
|
45
|
+
compact: _(C)?.compact,
|
|
46
|
+
disabled: D.value,
|
|
47
|
+
"data-icon-only": O() ? "" : void 0,
|
|
48
|
+
onClick: i[0] ||= (e) => _(C)?.select(d.value),
|
|
41
49
|
onFocus: k
|
|
42
50
|
}, c({
|
|
43
|
-
default:
|
|
51
|
+
default: y(() => [O() ? o("", !0) : (m(), s("span", b, [h(r.$slots, "default", {}, () => [l(g(d.label), 1)])]))]),
|
|
44
52
|
_: 2
|
|
45
|
-
}, [d.
|
|
53
|
+
}, [d.iconStart ? {
|
|
46
54
|
name: "start",
|
|
47
|
-
fn:
|
|
55
|
+
fn: y(() => [u(t, p(_(e)(d.iconStart), { filled: d.iconFilled }), null, 16, ["filled"])]),
|
|
48
56
|
key: "0"
|
|
57
|
+
} : void 0, d.iconEnd ? {
|
|
58
|
+
name: "end",
|
|
59
|
+
fn: y(() => [u(t, p(_(e)(d.iconEnd), { filled: d.iconFilled }), null, 16, ["filled"])]),
|
|
60
|
+
key: "1"
|
|
49
61
|
} : void 0]), 1032, [
|
|
50
62
|
"id",
|
|
51
63
|
"aria-selected",
|
|
@@ -61,6 +73,6 @@ var x = {
|
|
|
61
73
|
}
|
|
62
74
|
});
|
|
63
75
|
//#endregion
|
|
64
|
-
export {
|
|
76
|
+
export { x as default };
|
|
65
77
|
|
|
66
78
|
//# sourceMappingURL=VTab.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VTab.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VTabs/VTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, inject, useSlots } from 'vue'\n\nimport VButton from '../VButton/VButton.vue'\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport type { IconSource } from '../VIcon/types'\nimport { tabsKey } from './context'\n\n/**\n * One tab. It IS a VButton — the colour, the size, the focus ring and the disabled\n * state all come from there — and what this component adds is the handful of\n * attributes that make a button part of a tab row for assistive technology.\n *\n * Used outside a VTabs it still renders perfectly well, simply never selected, the\n * same way an accordion item does outside its accordion.\n */\ninterface TabProps {\n /**\n * What this tab is called in code. The panel carrying the same value is the one it\n * shows, and it is also what the v-model holds when this tab is selected.\n */\n value: string | number\n /** The visible label. The default slot replaces it. */\n label?: string\n /** An icon before the label: an icon name, or an explicit render. */\n icon?: IconSource\n /**\n * Makes the tab unusable: it no longer responds, the arrow keys skip over it, and it\n * greys out through the colour tokens.\n */\n disabled?: boolean\n}\n\nconst props = withDefaults(defineProps<TabProps>(), {\n label: undefined,\n icon: undefined,\n disabled: false,\n})\n\ndefineSlots<{\n /** The content of the tab, replacing the `label` prop. */\n default?(): unknown\n}>()\n\nconst slots = useSlots()\nconst tabs = inject(tabsKey, null)\n\nconst selected = computed(() => tabs != null && tabs.value === props.value)\nconst tabId = computed(() => tabs?.tabId(props.value))\nconst panelId = computed(() => (tabs?.hasPanels ? tabs.panelId(props.value) : undefined))\n\n/** An icon and no label at all: the tab becomes a square, like a VIconButton. */\nconst iconOnly = computed(() => Boolean(props.icon) && !props.label && !slots.default)\n\n// @keyboard @a11y\n/*\n * Selecting a tab the moment it takes focus, which is what `automatic` activation\n * means. It lives here rather than in the row's keyboard handler, because this\n * component knows its own value: the handler would have to read it back from a DOM\n * attribute, and would lose the distinction between the number 1 and the string \"1\"\n * doing so.\n */\nfunction onFocus() {\n if (tabs?.activation === 'automatic' && !props.disabled) tabs.select(props.value)\n}\n</script>\n\n<template>\n <VButton\n :id=\"tabId\"\n class=\"v-tab\"\n role=\"tab\"\n :aria-selected=\"selected ? 'true' : 'false'\"\n :aria-controls=\"panelId\"\n :tabindex=\"selected ? 0 : -1\"\n variant=\"ghost\"\n :elevated=\"selected && tabs?.variant === 'inset'\"\n :tone=\"selected ? (tabs?.tone ?? 'accent') : 'neutral'\"\n :size=\"tabs?.size ?? 'md'\"\n :compact=\"tabs?.compact ?? false\"\n :disabled=\"disabled\"\n :data-icon-only=\"iconOnly ? '' : undefined\"\n @click=\"tabs?.select(value)\"\n @focus=\"onFocus\"\n >\n <template v-if=\"icon\" #start>\n <VIcon v-bind=\"iconProps(icon)\" />\n </template>\n <!-- The label is wrapped in an element of its own so that it can be truncated:\n an ellipsis cannot be applied to the bare text of a flex container, and tabs\n sharing the bar equally have to be able to cut their labels short -->\n <span v-if=\"!iconOnly\" class=\"v-tab-label\"\n ><slot>{{ label }}</slot></span\n >\n </VButton>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * These rules override a VButton, so they are qualified by an attribute that button\n * always renders. That is what makes them win whatever order the two sheets end up\n * in — the same device VIconButton uses.\n */\n .v-tab[data-size] {\n /* The indicator below is positioned against this box, and a button declares no\n position of its own. */\n position: relative;\n /*\n * The tabs are never compressed, and that is precisely WHAT makes the row\n * overflow. Allowed to shrink, they would squeeze down to their smallest possible\n * width and scrolling would never come into play at all.\n */\n flex: none;\n white-space: nowrap;\n }\n\n .v-tab[data-size][data-icon-only] {\n padding-inline: 0;\n min-inline-size: var(--control-height);\n }\n\n /*\n * The focus ring is drawn INSIDE the tab. The row scrolls, and a ring sitting\n * outside the tab would be cropped by that scrolling box on the first and last\n * tabs.\n */\n .v-tab[data-size]:focus-visible {\n outline-offset: calc(var(--vectis-focus-ring-offset) * -1);\n }\n\n .v-tab-label {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .v-tabs[data-grow] .v-tab[data-size] {\n flex: 1 1 0;\n min-inline-size: 0;\n }\n\n /* A box nested inside a rounded one needs a smaller radius to look concentric: the\n track's own, less the padding between them. */\n .v-tabs[data-variant='inset'] .v-tab[data-size] {\n border-radius: calc(var(--vectis-radius-surface) - var(--vectis-space-1));\n }\n\n /*\n * On a track the tabs are contiguous SEGMENTS with square corners: what carves the\n * bar up is the rule and the indicator, not the silhouette of each button. Rounded\n * corners would leave pale notches above the rule, and a gap would break the row of\n * hover highlights into islands.\n *\n * The gap is removed on the row rather than here, the row being what declares it;\n * the bar's own gap stays, since that one separates the scroll buttons and not the\n * tabs.\n */\n .v-tabs:is([data-variant='flat'], [data-variant='outlined']) .v-tab[data-size] {\n border-radius: 0;\n }\n\n /*\n * Inside a card the row takes its rounded corners back at the ENDS only, the seams\n * between tabs staying square — the VButtonGroup idiom, applied to the one edge the\n * track does not occupy.\n *\n * The radius used is the button's own and not the card's: the row is set back from\n * the frame by the gutter, so it follows no clip and has no reason to match it.\n *\n * TRAP — the selectors ask for the first and last of their TYPE rather than the\n * first and last child, because the scroll markers are the row's real first and last\n * children. They are spans, the tabs being the only buttons, which is what makes the\n * distinction work.\n */\n .v-tabs[data-variant='outlined'] .v-tab[data-size]:first-of-type {\n border-start-start-radius: var(--vectis-radius-interactive);\n }\n\n .v-tabs[data-variant='outlined'][data-orientation='horizontal'] .v-tab[data-size]:last-of-type {\n border-start-end-radius: var(--vectis-radius-interactive);\n }\n\n /* Turned vertical, the track has migrated to the end edge, so the free edge is the\n start one: that is where the ends of the column round their corners. */\n .v-tabs[data-variant='outlined'][data-orientation='vertical'] .v-tab[data-size]:last-of-type {\n border-end-start-radius: var(--vectis-radius-interactive);\n }\n\n /*\n * The bar marking the selected tab, in the two framed variants. It is painted in the\n * tab's own text colour rather than by reading one of VButton's private variables:\n * that way it follows the selected tone AND the grey of a disabled tab on its own,\n * without this file having to know anything about either.\n */\n .v-tabs:is([data-variant='flat'], [data-variant='outlined']) .v-tab[data-size]::after {\n content: '';\n position: absolute;\n inset-inline: 0;\n inset-block-end: 0;\n block-size: var(--vectis-control-size-tab-indicator);\n background: currentColor;\n opacity: 0;\n transition: opacity var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-tabs:is([data-variant='flat'], [data-variant='outlined'])[data-orientation='vertical']\n .v-tab[data-size]::after {\n inset-block: 0;\n inset-inline: auto;\n inset-inline-start: 0;\n block-size: auto;\n inline-size: var(--vectis-control-size-tab-indicator);\n }\n\n .v-tabs:is([data-variant='flat'], [data-variant='outlined'])\n .v-tab[data-size][aria-selected='true']::after {\n opacity: 1;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-tabs:is([data-variant='flat'], [data-variant='outlined']) .v-tab[data-size]::after {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAkCA,IAAM,IAAQ,GAWR,IAAQ,EAAS,GACjB,IAAO,EAAO,GAAS,IAAI,GAE3B,IAAW,QAAe,KAAQ,QAAQ,EAAK,UAAU,EAAM,KAAK,GACpE,IAAQ,QAAe,GAAM,MAAM,EAAM,KAAK,CAAC,GAC/C,IAAU,QAAgB,GAAM,YAAY,EAAK,QAAQ,EAAM,KAAK,IAAI,KAAA,CAAU,GAGlF,IAAW,QAAe,EAAQ,EAAM,QAAS,CAAC,EAAM,SAAS,CAAC,EAAM,OAAO;EAUrF,SAAS,IAAU;GACjB,AAAI,GAAM,eAAe,eAAe,CAAC,EAAM,YAAU,EAAK,OAAO,EAAM,KAAK;EAClF;yBAIE,EA0BU,GAAA;GAzBP,IAAI,EAAA;GACL,OAAM;GACN,MAAK;GACJ,iBAAe,EAAA,QAAQ,SAAA;GACvB,iBAAe,EAAA;GACf,UAAU,EAAA,QAAQ,IAAA;GACnB,SAAQ;GACP,UAAU,EAAA,SAAY,EAAA,CAAA,CAAI,EAAE,YAAO;GACnC,MAAM,EAAA,QAAY,EAAA,CAAA,CAAI,EAAE,QAAI,WAAA;GAC5B,MAAM,EAAA,CAAA,CAAI,EAAE,QAAI;GAChB,SAAS,EAAA,CAAA,CAAI,EAAE,WAAO;GACtB,UAAU,EAAA;GACV,kBAAgB,EAAA,QAAQ,KAAQ,KAAA;GAChC,SAAK,AAAA,EAAA,QAAA,MAAE,EAAA,CAAA,CAAI,EAAE,OAAO,EAAA,KAAK;GAClB;;oBAUP,CAFY,EAAA,QACI,EAAA,IAAA,EAAA,KADJ,EAAA,GAAb,EAEC,QAFD,GAEC,CADE,EAAwB,EAAA,QAAA,WAAA,CAAA,SAAA,CAAA,EAAA,EAAf,EAAA,KAAK,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA;;MAPD,EAAA,OAAA;SAAO;eACa,CAAlC,EAAkC,GAAA,EAAA,EAAnB,EAAA,CAAA,CAAS,CAAC,EAAA,IAAI,CAAA,CAAA,GAAA,MAAA,EAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"VTab.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VTabs/VTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * One tab. It IS a VButton — the colour, the size, the focus ring and the disabled\n * state all come from there — and what this component adds is the handful of\n * attributes that make a button part of a tab row for assistive technology.\n *\n * Used outside a VTabs it still renders, simply never selected, as a quiet neutral button\n * at VButton's own size: the row's decisions all come from the context, and a tab with no\n * row takes VButton's defaults rather than a copy of the row's.\n */\n\nimport { computed, inject } from 'vue'\n\nimport VButton from '../VButton/VButton.vue'\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport type { IconSource } from '../VIcon/types'\nimport { tabsKey } from './context'\nimport type { ItemValue } from '../../types'\n\ninterface TabProps {\n /**\n * What this tab is called in code. The panel carrying the same value is the one it\n * shows, and it is also what the v-model holds when this tab is selected.\n */\n value: ItemValue\n /** The visible label. The default slot replaces it. */\n label?: string\n /** An icon before the label: an icon name, or an explicit render. */\n iconStart?: IconSource\n /** An icon after the label, for a count or a state the tab carries. */\n iconEnd?: IconSource\n /** Renders `iconStart` and `iconEnd` in their filled form (the font's `FILL` axis). */\n iconFilled?: boolean\n /**\n * Makes the tab unusable: it no longer responds, the arrow keys skip over it, and it\n * greys out through the colour tokens. A VTabs set `disabled` disables every tab, this\n * one included, whatever this says.\n */\n disabled?: boolean\n}\n\nconst props = withDefaults(defineProps<TabProps>(), {\n label: undefined,\n iconStart: undefined,\n iconEnd: undefined,\n iconFilled: false,\n disabled: false,\n})\n\nconst slots = defineSlots<{\n /** The content of the tab, replacing the `label` prop. */\n default?(): unknown\n}>()\n\nconst tabs = inject(tabsKey, null)\n\nconst selected = computed(() => tabs != null && tabs.value === props.value)\nconst tabId = computed(() => tabs?.tabId(props.value))\nconst panelId = computed(() => (tabs?.hasPanels ? tabs.panelId(props.value) : undefined))\n// Cumulative, the VButtonGroup rule: a row switched off has no tab that can opt back in.\nconst resolvedDisabled = computed(() => props.disabled || Boolean(tabs?.disabled))\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.\n/**\n * An icon, on either side, and no label at all: the tab becomes a square, like a VIconButton.\n * The same definition as VChip's, and the square itself is VButton's `[data-icon-only]` rule.\n */\nfunction iconOnly() {\n return !props.label && !slots.default && Boolean(props.iconStart || props.iconEnd)\n}\n\n// @keyboard @a11y\n/*\n * Selecting a tab the moment it takes focus, which is what `automatic` activation\n * means. It lives here rather than in the row's keyboard handler, because this\n * component knows its own value: the handler would have to read it back from a DOM\n * attribute, and would lose the distinction between the number 1 and the string \"1\"\n * doing so.\n */\nfunction onFocus() {\n if (tabs?.activation === 'automatic' && !resolvedDisabled.value) tabs.select(props.value)\n}\n</script>\n\n<template>\n <VButton\n :id=\"tabId\"\n class=\"v-tab\"\n role=\"tab\"\n :aria-selected=\"selected ? 'true' : 'false'\"\n :aria-controls=\"panelId\"\n :tabindex=\"selected ? 0 : -1\"\n variant=\"ghost\"\n :elevated=\"selected && tabs?.variant === 'inset'\"\n :tone=\"selected && tabs ? tabs.tone : 'neutral'\"\n :size=\"tabs?.size\"\n :compact=\"tabs?.compact\"\n :disabled=\"resolvedDisabled\"\n :data-icon-only=\"iconOnly() ? '' : undefined\"\n @click=\"tabs?.select(value)\"\n @focus=\"onFocus\"\n >\n <template v-if=\"iconStart\" #start>\n <VIcon v-bind=\"iconProps(iconStart)\" :filled=\"iconFilled\" />\n </template>\n <template v-if=\"iconEnd\" #end>\n <VIcon v-bind=\"iconProps(iconEnd)\" :filled=\"iconFilled\" />\n </template>\n <!-- The label is wrapped in an element of its own so that it can be truncated:\n an ellipsis cannot be applied to the bare text of a flex container, and tabs\n sharing the bar equally have to be able to cut their labels short -->\n <span v-if=\"!iconOnly()\" class=\"v-tab-label\"\n ><slot>{{ label }}</slot></span\n >\n </VButton>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * These rules override a VButton, so they are qualified by an attribute that button\n * always renders. That is what makes them win whatever order the two sheets end up\n * in — the same device VIconButton uses.\n */\n .v-tab[data-size] {\n /* The indicator below is positioned against this box, and a button declares no\n position of its own. */\n position: relative;\n /*\n * The tabs are never compressed, and that is precisely WHAT makes the row\n * overflow. Allowed to shrink, they would squeeze down to their smallest possible\n * width and scrolling would never come into play at all.\n */\n flex: none;\n white-space: nowrap;\n }\n\n /*\n * The focus ring is drawn INSIDE the tab. The row scrolls, and a ring sitting\n * outside the tab would be cropped by that scrolling box on the first and last\n * tabs.\n */\n .v-tab[data-size]:focus-visible {\n outline-offset: calc(-1 * var(--vectis-focus-ring-width));\n }\n\n .v-tab-label {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .v-tabs[data-grow] .v-tab[data-size] {\n flex: 1 1 0;\n min-inline-size: 0;\n }\n\n /* A box nested inside a rounded one needs a smaller radius to look concentric: the\n track's own, less the padding between them. */\n .v-tabs[data-variant='inset'] .v-tab[data-size] {\n border-radius: calc(var(--vectis-radius-surface) - var(--vectis-space-1));\n }\n\n /*\n * On a track the tabs are contiguous SEGMENTS with square corners: what carves the\n * bar up is the rule and the indicator, not the silhouette of each button. Rounded\n * corners would leave pale notches above the rule, and a gap would break the row of\n * hover highlights into islands.\n *\n * The gap is removed on the row rather than here, the row being what declares it;\n * the bar's own gap stays, since that one separates the scroll buttons and not the\n * tabs.\n */\n .v-tabs:is([data-variant='flat'], [data-variant='outlined']) .v-tab[data-size] {\n border-radius: 0;\n }\n\n /*\n * Inside a card the row takes its rounded corners back at the ENDS only, the seams\n * between tabs staying square — the VButtonGroup idiom, applied to the one edge the\n * track does not occupy.\n *\n * The radius is the CARD's inner one — its own, less the border it sits behind — and\n * not the button's. The bar spends no gutter, so an end tab lands exactly on a corner\n * of the frame and has to follow that curve: a button radius, smaller, would leave a\n * sliver of card showing outside the tab as soon as it painted a background.\n *\n * TRAP — the selectors ask for the first and last of their TYPE rather than the\n * first and last child, because the scroll markers are the row's real first and last\n * children. They are spans, the tabs being the only buttons, which is what makes the\n * distinction work.\n */\n .v-tabs[data-variant='outlined'] .v-tab[data-size]:first-of-type {\n border-start-start-radius: calc(var(--vectis-radius-surface) - 1px);\n }\n\n .v-tabs[data-variant='outlined'][data-orientation='horizontal'] .v-tab[data-size]:last-of-type {\n border-start-end-radius: calc(var(--vectis-radius-surface) - 1px);\n }\n\n /* Turned vertical, the track has migrated to the end edge, so the free edge is the\n start one: that is where the ends of the column round their corners. */\n .v-tabs[data-variant='outlined'][data-orientation='vertical'] .v-tab[data-size]:last-of-type {\n border-end-start-radius: calc(var(--vectis-radius-surface) - 1px);\n }\n\n /*\n * The bar marking the selected tab, in the two framed variants. It is painted in the\n * tab's own text colour rather than by reading one of VButton's private variables:\n * that way it follows the selected tone AND the grey of a disabled tab on its own,\n * without this file having to know anything about either.\n */\n .v-tabs:is([data-variant='flat'], [data-variant='outlined']) .v-tab[data-size]::after {\n content: '';\n position: absolute;\n inset-inline: 0;\n inset-block-end: 0;\n block-size: var(--vectis-control-size-tab-indicator);\n background: currentColor;\n opacity: 0;\n transition: opacity var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-tabs:is([data-variant='flat'], [data-variant='outlined'])[data-orientation='vertical']\n .v-tab[data-size]::after {\n inset-block: 0;\n inset-inline: auto;\n inset-inline-start: 0;\n block-size: auto;\n inline-size: var(--vectis-control-size-tab-indicator);\n }\n\n .v-tabs:is([data-variant='flat'], [data-variant='outlined'])\n .v-tab[data-size][aria-selected='true']::after {\n opacity: 1;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-tabs:is([data-variant='flat'], [data-variant='outlined']) .v-tab[data-size]::after {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;EA0CA,IAAM,IAAQ,GAQR,IAAQ,EAAA,GAKR,IAAO,EAAO,GAAS,IAAI,GAE3B,IAAW,QAAe,KAAQ,QAAQ,EAAK,UAAU,EAAM,KAAK,GACpE,IAAQ,QAAe,GAAM,MAAM,EAAM,KAAK,CAAC,GAC/C,IAAU,QAAgB,GAAM,YAAY,EAAK,QAAQ,EAAM,KAAK,IAAI,KAAA,CAAU,GAElF,IAAmB,QAAe,EAAM,YAAY,EAAQ,GAAM,QAAS;EAQjF,SAAS,IAAW;GAClB,OAAO,CAAC,EAAM,SAAS,CAAC,EAAM,WAAW,GAAQ,EAAM,aAAa,EAAM;EAC5E;EAUA,SAAS,IAAU;GACjB,AAAI,GAAM,eAAe,eAAe,CAAC,EAAiB,SAAO,EAAK,OAAO,EAAM,KAAK;EAC1F;yBAIE,EA6BU,GAAA;GA5BP,IAAI,EAAA;GACL,OAAM;GACN,MAAK;GACJ,iBAAe,EAAA,QAAQ,SAAA;GACvB,iBAAe,EAAA;GACf,UAAU,EAAA,QAAQ,IAAA;GACnB,SAAQ;GACP,UAAU,EAAA,SAAY,EAAA,CAAA,CAAI,EAAE,YAAO;GACnC,MAAM,EAAA,SAAY,EAAA,CAAA,IAAO,EAAA,CAAA,CAAI,CAAC,OAAI;GAClC,MAAM,EAAA,CAAA,CAAI,EAAE;GACZ,SAAS,EAAA,CAAA,CAAI,EAAE;GACf,UAAU,EAAA;GACV,kBAAgB,EAAQ,IAAA,KAAU,KAAA;GAClC,SAAK,AAAA,EAAA,QAAA,MAAE,EAAA,CAAA,CAAI,EAAE,OAAO,EAAA,KAAK;GAClB;;oBAaP,CAFY,EAAQ,IACJ,EAAA,IAAA,EAAA,KADI,EAAA,GAArB,EAEC,QAFD,GAEC,CADE,EAAwB,EAAA,QAAA,WAAA,CAAA,SAAA,CAAA,EAAA,EAAf,EAAA,KAAK,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA;;MAVD,EAAA,YAAA;SAAY;eACkC,CAA5D,EAA4D,GAA5D,EAAe,EAA6C,CAAA,CAApC,CAAC,EAAA,SAAS,GAAA,EAAI,QAAQ,EAAA,WAAU,CAAA,GAAA,MAAA,IAAA,CAAA,QAAA,CAAA,CAAA,CAAA;;cAE1C,EAAA,UAAA;SAAU;eACkC,CAA1D,EAA0D,GAA1D,EAAe,EAA2C,CAAA,CAAlC,CAAC,EAAA,OAAO,GAAA,EAAI,QAAQ,EAAA,WAAU,CAAA,GAAA,MAAA,IAAA,CAAA,QAAA,CAAA,CAAA,CAAA"}
|
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
* The panel a tab shows, matched to it by the same `value`.
|
|
3
|
-
*
|
|
4
|
-
* Every panel is rendered at all times, and the inactive ones are hidden with the
|
|
5
|
-
* native `hidden` attribute rather than removed. That costs no JavaScript, and it
|
|
6
|
-
* means the state of what they contain survives a change of tab: a half-typed field
|
|
7
|
-
* keeps its text, a scrolled list its position, and a form's fields are still
|
|
8
|
-
* submitted.
|
|
9
|
-
*/
|
|
1
|
+
import { ItemValue } from '../../types.js';
|
|
10
2
|
interface TabPanelProps {
|
|
11
3
|
/** Which tab shows this panel: it must be the `value` of one of them. */
|
|
12
|
-
value:
|
|
4
|
+
value: ItemValue;
|
|
13
5
|
/**
|
|
14
6
|
* Holds the content back until the panel is first shown, and keeps it from then on.
|
|
15
7
|
* It is for a panel expensive to build; the state it holds is still preserved
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VTabPanel.js","names":[],"sources":["../../../src/components/VTabs/VTabPanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\
|
|
1
|
+
{"version":3,"file":"VTabPanel.js","names":[],"sources":["../../../src/components/VTabs/VTabPanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The panel a tab shows, matched to it by the same `value`.\n *\n * Every panel is rendered at all times, and the inactive ones are hidden with the\n * native `hidden` attribute rather than removed. That costs no JavaScript, and it\n * means the state of what they contain survives a change of tab: a half-typed field\n * keeps its text, a scrolled list its position, and a form's fields are still\n * submitted.\n */\n\nimport { computed, inject, ref, watch } from 'vue'\n\nimport { tabsKey } from './context'\nimport type { ItemValue } from '../../types'\n\ninterface TabPanelProps {\n /** Which tab shows this panel: it must be the `value` of one of them. */\n value: ItemValue\n /**\n * Holds the content back until the panel is first shown, and keeps it from then on.\n * It is for a panel expensive to build; the state it holds is still preserved\n * afterwards.\n */\n lazy?: boolean\n}\n\nconst props = withDefaults(defineProps<TabPanelProps>(), { lazy: false })\n\ndefineSlots<{\n /** What the panel contains. */\n default(): unknown\n}>()\n\nconst tabs = inject(tabsKey, null)\n\nconst selected = computed(() => tabs != null && tabs.value === props.value)\nconst tabId = computed(() => tabs?.tabId(props.value))\nconst panelId = computed(() => tabs?.panelId(props.value))\n\n/*\n * Once a deferred panel has been shown it stays built, so nothing it holds is lost.\n *\n * The `&&` is what keeps a panel that is not lazy out of the selection's dependencies: its\n * getter stops at `props.lazy`, so changing tab re-runs nothing for it. `immediate` latches\n * a lazy panel that starts selected during setup, on the server too, so its content is in\n * the first render rather than one tick later.\n */\nconst revealed = ref(false)\nwatch(\n () => props.lazy && selected.value,\n (shown) => {\n if (shown) revealed.value = true\n },\n { immediate: true },\n)\n</script>\n\n<template>\n <div\n :id=\"panelId\"\n class=\"v-tabs-panel\"\n role=\"tabpanel\"\n :aria-labelledby=\"tabId\"\n tabindex=\"0\"\n :hidden=\"!selected\"\n >\n <slot v-if=\"!lazy || revealed\" />\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * A guard. The `hidden` attribute only hides an element through the browser's own\n * stylesheet, which ANY author declaration of a display overrides — a consumer's\n * `.v-tabs-panel { display: flex }` included, and it would then reveal every panel\n * at once.\n *\n * It is deliberately left overridable, with no `!important`: that would make this\n * the one component of the design system a consumer could not restyle. To give the\n * panel a display of your own, exclude the hidden ones —\n * `.v-tabs-panel:not([hidden])`.\n */\n .v-tabs-panel[hidden] {\n display: none;\n }\n\n .v-tabs-panel:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: var(--vectis-focus-ring-offset);\n }\n}\n</style>\n"],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { tabsKey as e } from "./context.js";
|
|
2
|
-
import { computed as t, createCommentVNode as n, createElementBlock as r, defineComponent as i, inject as a, openBlock as o, ref as s, renderSlot as c,
|
|
2
|
+
import { computed as t, createCommentVNode as n, createElementBlock as r, defineComponent as i, inject as a, openBlock as o, ref as s, renderSlot as c, watch as l } from "vue";
|
|
3
3
|
//#region src/components/VTabs/VTabPanel.vue?vue&type=script&setup=true&lang.ts
|
|
4
4
|
var u = [
|
|
5
5
|
"id",
|
|
@@ -16,9 +16,9 @@ var u = [
|
|
|
16
16
|
},
|
|
17
17
|
setup(i) {
|
|
18
18
|
let d = i, f = a(e, null), p = t(() => f != null && f.value === d.value), m = t(() => f?.tabId(d.value)), h = t(() => f?.panelId(d.value)), g = s(!1);
|
|
19
|
-
return l(() => {
|
|
20
|
-
|
|
21
|
-
}), (e, t) => (o(), r("div", {
|
|
19
|
+
return l(() => d.lazy && p.value, (e) => {
|
|
20
|
+
e && (g.value = !0);
|
|
21
|
+
}, { immediate: !0 }), (e, t) => (o(), r("div", {
|
|
22
22
|
id: h.value,
|
|
23
23
|
class: "v-tabs-panel",
|
|
24
24
|
role: "tabpanel",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VTabPanel.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VTabs/VTabPanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\
|
|
1
|
+
{"version":3,"file":"VTabPanel.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VTabs/VTabPanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The panel a tab shows, matched to it by the same `value`.\n *\n * Every panel is rendered at all times, and the inactive ones are hidden with the\n * native `hidden` attribute rather than removed. That costs no JavaScript, and it\n * means the state of what they contain survives a change of tab: a half-typed field\n * keeps its text, a scrolled list its position, and a form's fields are still\n * submitted.\n */\n\nimport { computed, inject, ref, watch } from 'vue'\n\nimport { tabsKey } from './context'\nimport type { ItemValue } from '../../types'\n\ninterface TabPanelProps {\n /** Which tab shows this panel: it must be the `value` of one of them. */\n value: ItemValue\n /**\n * Holds the content back until the panel is first shown, and keeps it from then on.\n * It is for a panel expensive to build; the state it holds is still preserved\n * afterwards.\n */\n lazy?: boolean\n}\n\nconst props = withDefaults(defineProps<TabPanelProps>(), { lazy: false })\n\ndefineSlots<{\n /** What the panel contains. */\n default(): unknown\n}>()\n\nconst tabs = inject(tabsKey, null)\n\nconst selected = computed(() => tabs != null && tabs.value === props.value)\nconst tabId = computed(() => tabs?.tabId(props.value))\nconst panelId = computed(() => tabs?.panelId(props.value))\n\n/*\n * Once a deferred panel has been shown it stays built, so nothing it holds is lost.\n *\n * The `&&` is what keeps a panel that is not lazy out of the selection's dependencies: its\n * getter stops at `props.lazy`, so changing tab re-runs nothing for it. `immediate` latches\n * a lazy panel that starts selected during setup, on the server too, so its content is in\n * the first render rather than one tick later.\n */\nconst revealed = ref(false)\nwatch(\n () => props.lazy && selected.value,\n (shown) => {\n if (shown) revealed.value = true\n },\n { immediate: true },\n)\n</script>\n\n<template>\n <div\n :id=\"panelId\"\n class=\"v-tabs-panel\"\n role=\"tabpanel\"\n :aria-labelledby=\"tabId\"\n tabindex=\"0\"\n :hidden=\"!selected\"\n >\n <slot v-if=\"!lazy || revealed\" />\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * A guard. The `hidden` attribute only hides an element through the browser's own\n * stylesheet, which ANY author declaration of a display overrides — a consumer's\n * `.v-tabs-panel { display: flex }` included, and it would then reveal every panel\n * at once.\n *\n * It is deliberately left overridable, with no `!important`: that would make this\n * the one component of the design system a consumer could not restyle. To give the\n * panel a display of your own, exclude the hidden ones —\n * `.v-tabs-panel:not([hidden])`.\n */\n .v-tabs-panel[hidden] {\n display: none;\n }\n\n .v-tabs-panel:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: var(--vectis-focus-ring-offset);\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;EA2BA,IAAM,IAAQ,GAOR,IAAO,EAAO,GAAS,IAAI,GAE3B,IAAW,QAAe,KAAQ,QAAQ,EAAK,UAAU,EAAM,KAAK,GACpE,IAAQ,QAAe,GAAM,MAAM,EAAM,KAAK,CAAC,GAC/C,IAAU,QAAe,GAAM,QAAQ,EAAM,KAAK,CAAC,GAUnD,IAAW,EAAI,EAAK;SAC1B,QACQ,EAAM,QAAQ,EAAS,QAC5B,MAAU;GACT,AAAI,MAAO,EAAS,QAAQ;EAC9B,GACA,EAAE,WAAW,GAAK,CACpB,mBAIE,EASM,OAAA;GARH,IAAI,EAAA;GACL,OAAM;GACN,MAAK;GACJ,mBAAiB,EAAA;GAClB,UAAS;GACR,QAAM,CAAG,EAAA;OAEG,EAAA,QAAQ,EAAA,QAArB,EAAiC,EAAA,QAAA,WAAA,CAAA,GAAA,KAAA,GAAA,KAAA,GAAA,CAAA,IAAA,EAAA,IAAA,EAAA,CAAA,GAAA,GAAA,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
|
|
2
|
-
@layer vectis.components{.v-tabs{--tabs-
|
|
2
|
+
@layer vectis.components{.v-tabs{--tabs-pad-delta:0px;--tabs-panels-pad:calc(var(--vectis-space-4) - var(--tabs-pad-delta));font-family:var(--vectis-text-family);flex-direction:column;display:flex}.v-tabs[data-compact]{--tabs-pad-delta:var(--vectis-space-1)}.v-tabs[data-orientation=vertical]{flex-direction:row}.v-tabs[data-variant=outlined]{background:var(--vectis-color-surface-raised);border:1px solid var(--vectis-color-border);border-radius:var(--vectis-radius-surface)}.v-tabs-bar{justify-content:flex-start;align-items:stretch;gap:var(--vectis-space-1);display:flex}.v-tabs[data-orientation=vertical] .v-tabs-bar{flex-direction:column}.v-tabs[data-align=center] .v-tabs-bar{justify-content:center}.v-tabs[data-align=end] .v-tabs-bar{justify-content:flex-end}.v-tabs:is([data-variant=flat],[data-variant=outlined]) .v-tabs-bar{border-block-end:1px solid var(--vectis-color-border)}.v-tabs:is([data-variant=flat],[data-variant=outlined])[data-orientation=vertical] .v-tabs-bar{border-block-end:none;border-inline-start:1px solid var(--vectis-color-border)}.v-tabs[data-variant=outlined][data-orientation=vertical] .v-tabs-bar{border-inline-start:none;border-inline-end:1px solid var(--vectis-color-border)}.v-tabs-list{align-items:center;gap:var(--vectis-space-1);scrollbar-width:none;scroll-behavior:smooth;min-block-size:0;min-inline-size:0;display:flex;overflow:auto}.v-tabs[data-orientation=vertical] .v-tabs-list{flex-direction:column;align-items:stretch}.v-tabs:is([data-variant=flat],[data-variant=outlined]) .v-tabs-list{gap:0;margin-block-end:-1px}.v-tabs:is([data-variant=flat],[data-variant=outlined])[data-orientation=horizontal] .v-tabs-list{align-items:flex-end}.v-tabs:is([data-variant=flat],[data-variant=outlined])[data-orientation=vertical] .v-tabs-list{margin-block-end:0;margin-inline-start:-1px}.v-tabs[data-variant=outlined][data-orientation=vertical] .v-tabs-list{margin-inline-start:0}.v-tabs[data-variant=outlined]:not(:has(>.v-tabs-panels)){overflow:clip}.v-tabs[data-variant=outlined]:not(:has(>.v-tabs-panels)) .v-tabs-bar{border-block-end:none;border-inline-end:none}.v-tabs[data-variant=outlined]:not(:has(>.v-tabs-panels)) .v-tabs-list{margin-block-end:0}.v-tabs[data-variant=inset] .v-tabs-list{background:var(--vectis-color-surface-sunken);padding:var(--vectis-space-1);border-radius:var(--vectis-radius-surface)}.v-tabs[data-grow] .v-tabs-list{flex:1}.v-tabs-sentinel{flex:0 0 1px;align-self:stretch}.v-tabs-scroll{flex:none;align-self:center}.v-tabs-panels{min-inline-size:0}.v-tabs:is([data-variant=flat],[data-variant=inset])[data-orientation=horizontal] .v-tabs-panels{padding-block-start:var(--tabs-panels-pad)}.v-tabs:is([data-variant=flat],[data-variant=inset])[data-orientation=vertical] .v-tabs-panels{padding-inline-start:var(--tabs-panels-pad)}.v-tabs[data-variant=outlined] .v-tabs-panels{padding:var(--tabs-panels-pad)}.v-tabs[data-orientation=vertical] .v-tabs-panels{flex:1}@media (prefers-reduced-motion:reduce){.v-tabs-list{scroll-behavior:auto}}}
|