vectis-ui 0.1.1-rc.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -6
- package/dist/components/VAccordion/VAccordion.css +1 -1
- package/dist/components/VAccordion/VAccordion.d.ts +9 -16
- package/dist/components/VAccordion/VAccordion.js.map +1 -1
- package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAccordion/VAccordionItem.css +1 -1
- package/dist/components/VAccordion/VAccordionItem.d.ts +33 -19
- package/dist/components/VAccordion/VAccordionItem.js.map +1 -1
- package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js +50 -38
- package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAccordion/context.d.ts +1 -8
- package/dist/components/VAccordion/context.js.map +1 -1
- package/dist/components/VAvatar/VAvatar.css +1 -1
- package/dist/components/VAvatar/VAvatar.d.ts +44 -29
- package/dist/components/VAvatar/VAvatar.js.map +1 -1
- package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js +38 -35
- package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAvatar/VAvatarGroup.d.ts +5 -16
- package/dist/components/VAvatar/VAvatarGroup.js.map +1 -1
- package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAvatar/context.d.ts +6 -10
- package/dist/components/VAvatar/context.js.map +1 -1
- package/dist/components/VBadge/VBadge.css +1 -1
- package/dist/components/VBadge/VBadge.d.ts +31 -10
- package/dist/components/VBadge/VBadge.js.map +1 -1
- package/dist/components/VBadge/VBadge.vue_vue_type_script_setup_true_lang.js +39 -24
- package/dist/components/VBadge/VBadge.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VBreadcrumb/VBreadcrumb.css +1 -1
- package/dist/components/VBreadcrumb/VBreadcrumb.d.ts +4 -17
- package/dist/components/VBreadcrumb/VBreadcrumb.js.map +1 -1
- package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js +23 -25
- package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VButton/VButton.css +1 -1
- package/dist/components/VButton/VButton.d.ts +30 -10
- package/dist/components/VButton/VButton.js.map +1 -1
- package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js +39 -30
- package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VButton/VButtonGroup.css +1 -1
- package/dist/components/VButton/VButtonGroup.d.ts +76 -13
- package/dist/components/VButton/VButtonGroup.js.map +1 -1
- package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js +74 -8
- package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VButton/context.d.ts +30 -0
- package/dist/components/VButton/context.js +6 -0
- package/dist/components/VButton/context.js.map +1 -0
- package/dist/components/VCalendar/VCalendar.css +1 -1
- package/dist/components/VCalendar/VCalendar.d.ts +50 -36
- package/dist/components/VCalendar/VCalendar.js.map +1 -1
- package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js +99 -85
- package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/VCalendarEvent.css +1 -1
- package/dist/components/VCalendar/VCalendarEvent.d.ts +5 -11
- package/dist/components/VCalendar/VCalendarEvent.js.map +1 -1
- package/dist/components/VCalendar/VCalendarEvent.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/VCalendar/VCalendarEvent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/VCalendarMonth.css +1 -1
- package/dist/components/VCalendar/VCalendarMonth.d.ts +10 -13
- package/dist/components/VCalendar/VCalendarMonth.js.map +1 -1
- package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js +183 -244
- package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/VCalendarTimeGrid.css +1 -1
- package/dist/components/VCalendar/VCalendarTimeGrid.d.ts +15 -20
- package/dist/components/VCalendar/VCalendarTimeGrid.js.map +1 -1
- package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js +385 -448
- package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/VCalendarYear.css +1 -1
- package/dist/components/VCalendar/VCalendarYear.js.map +1 -1
- package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js +53 -49
- package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/gesture.d.ts +158 -0
- package/dist/components/VCalendar/gesture.js +170 -0
- package/dist/components/VCalendar/gesture.js.map +1 -0
- package/dist/components/VCalendar/keyboard.d.ts +9 -3
- package/dist/components/VCalendar/keyboard.js +2 -6
- package/dist/components/VCalendar/keyboard.js.map +1 -1
- package/dist/components/VCalendar/layout.d.ts +67 -54
- package/dist/components/VCalendar/layout.js +77 -69
- package/dist/components/VCalendar/layout.js.map +1 -1
- package/dist/components/VCalendar/timeGrid.d.ts +55 -0
- package/dist/components/VCalendar/timeGrid.js +71 -0
- package/dist/components/VCalendar/timeGrid.js.map +1 -0
- package/dist/components/VCalendar/types.d.ts +41 -16
- package/dist/components/VCarousel/VCarousel.css +1 -1
- package/dist/components/VCarousel/VCarousel.d.ts +21 -41
- package/dist/components/VCarousel/VCarousel.js.map +1 -1
- package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js +157 -129
- package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCarousel/VCarouselItem.d.ts +0 -17
- package/dist/components/VCarousel/VCarouselItem.js.map +1 -1
- package/dist/components/VCarousel/VCarouselItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCarousel/context.d.ts +0 -12
- package/dist/components/VCarousel/context.js.map +1 -1
- package/dist/components/VCheckbox/VCheckbox.css +1 -1
- package/dist/components/VCheckbox/VCheckbox.d.ts +31 -16
- package/dist/components/VCheckbox/VCheckbox.js.map +1 -1
- package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js +62 -29
- package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VChip/VChip.css +1 -1
- package/dist/components/VChip/VChip.d.ts +36 -26
- package/dist/components/VChip/VChip.js.map +1 -1
- package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js +57 -48
- package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCombobox/VCombobox.css +1 -1
- package/dist/components/VCombobox/VCombobox.d.ts +127 -31
- package/dist/components/VCombobox/VCombobox.js.map +1 -1
- package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js +336 -247
- package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCombobox/VComboboxGroup.css +1 -1
- package/dist/components/VCombobox/VComboboxGroup.d.ts +0 -9
- package/dist/components/VCombobox/VComboboxGroup.js.map +1 -1
- package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCombobox/VComboboxOption.css +1 -1
- package/dist/components/VCombobox/VComboboxOption.d.ts +0 -15
- package/dist/components/VCombobox/VComboboxOption.js.map +1 -1
- package/dist/components/VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCombobox/VComboboxSeparator.js.map +1 -1
- package/dist/components/VCombobox/VComboboxSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCombobox/infiniteScroll.js.map +1 -1
- package/dist/components/VDataTable/VDataTable.css +1 -1
- package/dist/components/VDataTable/VDataTable.d.ts +50 -28
- package/dist/components/VDataTable/VDataTable.js.map +1 -1
- package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js +183 -194
- package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDateInput/VDateInput.css +1 -1
- package/dist/components/VDateInput/VDateInput.d.ts +90 -42
- package/dist/components/VDateInput/VDateInput.js.map +1 -1
- package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js +159 -191
- package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDatePicker/VDatePicker.css +1 -1
- package/dist/components/VDatePicker/VDatePicker.d.ts +61 -30
- package/dist/components/VDatePicker/VDatePicker.js.map +1 -1
- package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js +243 -221
- package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDialog/VDialog.css +1 -1
- package/dist/components/VDialog/VDialog.d.ts +45 -33
- package/dist/components/VDialog/VDialog.js.map +1 -1
- package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js +65 -64
- package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDialog/VDialogAlert.d.ts +24 -20
- package/dist/components/VDialog/VDialogAlert.js.map +1 -1
- package/dist/components/VDialog/VDialogAlert.vue_vue_type_script_setup_true_lang.js +36 -25
- package/dist/components/VDialog/VDialogAlert.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VFileInput/VFileInput.css +1 -1
- package/dist/components/VFileInput/VFileInput.d.ts +78 -26
- package/dist/components/VFileInput/VFileInput.js.map +1 -1
- package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js +144 -132
- package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VFilePicker/VFilePicker.css +1 -1
- package/dist/components/VFilePicker/VFilePicker.d.ts +47 -30
- package/dist/components/VFilePicker/VFilePicker.js.map +1 -1
- package/dist/components/VFilePicker/VFilePicker.vue_vue_type_script_setup_true_lang.js +166 -163
- package/dist/components/VFilePicker/VFilePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VFilePicker/fileKind.d.ts +2 -27
- package/dist/components/VFilePicker/fileKind.js +9 -8
- package/dist/components/VFilePicker/fileKind.js.map +1 -1
- package/dist/components/VHotkeys/VHotkeys.css +1 -1
- package/dist/components/VHotkeys/VHotkeys.d.ts +8 -30
- package/dist/components/VHotkeys/VHotkeys.js.map +1 -1
- package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VHotkeys/platform.js.map +1 -1
- package/dist/components/VIcon/VIcon.css +1 -1
- package/dist/components/VIcon/VIcon.d.ts +15 -6
- package/dist/components/VIcon/VIcon.js.map +1 -1
- package/dist/components/VIcon/VIcon.vue_vue_type_script_setup_true_lang.js +45 -37
- package/dist/components/VIcon/VIcon.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VIcon/iconProps.js.map +1 -1
- package/dist/components/VIcon/icons/index.d.ts +1 -1
- package/dist/components/VIcon/icons/index.js.map +1 -1
- package/dist/components/VIcon/icons/names.d.ts +1 -1
- package/dist/components/VIcon/icons/names.js.map +1 -1
- package/dist/components/VIcon/resolver.d.ts +3 -3
- package/dist/components/VIcon/resolver.js.map +1 -1
- package/dist/components/VIcon/types.d.ts +12 -12
- package/dist/components/VIconButton/VIconButton.css +1 -1
- package/dist/components/VIconButton/VIconButton.d.ts +28 -11
- package/dist/components/VIconButton/VIconButton.js.map +1 -1
- package/dist/components/VIconButton/VIconButton.vue_vue_type_script_setup_true_lang.js +26 -20
- package/dist/components/VIconButton/VIconButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VInput/VInput.css +1 -1
- package/dist/components/VInput/VInput.d.ts +26 -7
- package/dist/components/VInput/VInput.js.map +1 -1
- package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js +86 -75
- package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VInput/VInputGroup.css +2 -0
- package/dist/components/VInput/VInputGroup.d.ts +47 -0
- package/dist/components/VInput/VInputGroup.js +9 -0
- package/dist/components/VInput/VInputGroup.js.map +1 -0
- package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js +80 -0
- package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VInput/context.d.ts +11 -0
- package/dist/components/VInput/context.js +6 -0
- package/dist/components/VInput/context.js.map +1 -0
- package/dist/components/VInputOTP/VInputOTP.css +1 -1
- package/dist/components/VInputOTP/VInputOTP.d.ts +37 -22
- package/dist/components/VInputOTP/VInputOTP.js.map +1 -1
- package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js +98 -61
- package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/VMenu.d.ts +23 -30
- package/dist/components/VMenu/VMenu.js.map +1 -1
- package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js +31 -27
- package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/VMenuGroup.css +1 -1
- package/dist/components/VMenu/VMenuGroup.d.ts +12 -8
- package/dist/components/VMenu/VMenuGroup.js.map +1 -1
- package/dist/components/VMenu/VMenuGroup.vue_vue_type_script_setup_true_lang.js +11 -11
- package/dist/components/VMenu/VMenuGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/VMenuItem.css +1 -1
- package/dist/components/VMenu/VMenuItem.d.ts +11 -19
- package/dist/components/VMenu/VMenuItem.js.map +1 -1
- package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js +65 -57
- package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/VMenuPanel.d.ts +14 -30
- package/dist/components/VMenu/VMenuPanel.js.map +1 -1
- package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js +43 -44
- package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMenu/context.d.ts +2 -6
- package/dist/components/VMenu/context.js.map +1 -1
- package/dist/components/VPagination/VPagination.css +1 -1
- package/dist/components/VPagination/VPagination.d.ts +60 -22
- package/dist/components/VPagination/VPagination.js.map +1 -1
- package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js +113 -161
- package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VPopover/VPopover.css +1 -1
- package/dist/components/VPopover/VPopover.d.ts +26 -7
- package/dist/components/VPopover/VPopover.js.map +1 -1
- package/dist/components/VPopover/VPopover.vue_vue_type_script_setup_true_lang.js +43 -37
- package/dist/components/VPopover/VPopover.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VProgressCircular/VProgressCircular.css +1 -1
- package/dist/components/VProgressCircular/VProgressCircular.d.ts +15 -4
- package/dist/components/VProgressCircular/VProgressCircular.js.map +1 -1
- package/dist/components/VProgressCircular/VProgressCircular.vue_vue_type_script_setup_true_lang.js +32 -30
- package/dist/components/VProgressCircular/VProgressCircular.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VProgressLinear/VProgressLinear.css +1 -1
- package/dist/components/VProgressLinear/VProgressLinear.d.ts +23 -8
- package/dist/components/VProgressLinear/VProgressLinear.js.map +1 -1
- package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js +34 -32
- package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VRadio/VRadio.css +1 -1
- package/dist/components/VRadio/VRadio.d.ts +36 -18
- package/dist/components/VRadio/VRadio.js.map +1 -1
- package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js +55 -26
- package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSeparator/VSeparator.d.ts +4 -2
- package/dist/components/VSeparator/VSeparator.js.map +1 -1
- package/dist/components/VSeparator/VSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigation.css +1 -1
- package/dist/components/VSideNavigation/VSideNavigation.d.ts +5 -19
- package/dist/components/VSideNavigation/VSideNavigation.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigationGroup.css +1 -1
- package/dist/components/VSideNavigation/VSideNavigationGroup.d.ts +9 -17
- package/dist/components/VSideNavigation/VSideNavigationGroup.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigationGroup.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/VSideNavigation/VSideNavigationGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigationItem.css +1 -1
- package/dist/components/VSideNavigation/VSideNavigationItem.d.ts +22 -30
- package/dist/components/VSideNavigation/VSideNavigationItem.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js +77 -87
- package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSideNavigation/context.d.ts +0 -14
- package/dist/components/VSideNavigation/context.js.map +1 -1
- package/dist/components/VSkeletonLoader/VSkeletonLoader.css +1 -1
- package/dist/components/VSkeletonLoader/VSkeletonLoader.d.ts +9 -9
- package/dist/components/VSkeletonLoader/VSkeletonLoader.js.map +1 -1
- package/dist/components/VSkeletonLoader/VSkeletonLoader.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSlider/VSlider.css +1 -1
- package/dist/components/VSlider/VSlider.d.ts +52 -27
- package/dist/components/VSlider/VSlider.js.map +1 -1
- package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js +202 -118
- package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSnackbar/VSnackbar.css +1 -1
- package/dist/components/VSnackbar/VSnackbar.d.ts +0 -23
- package/dist/components/VSnackbar/VSnackbar.js.map +1 -1
- package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js +38 -38
- package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSnackbar/state.d.ts +0 -27
- package/dist/components/VSnackbar/state.js.map +1 -1
- package/dist/components/VSpinner/VSpinner.css +1 -1
- package/dist/components/VSpinner/VSpinner.d.ts +6 -6
- package/dist/components/VSpinner/VSpinner.js.map +1 -1
- package/dist/components/VSpinner/VSpinner.vue_vue_type_script_setup_true_lang.js +10 -9
- package/dist/components/VSpinner/VSpinner.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSwitch/VSwitch.css +1 -1
- package/dist/components/VSwitch/VSwitch.d.ts +35 -13
- package/dist/components/VSwitch/VSwitch.js.map +1 -1
- package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js +62 -21
- package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTabs/VTab.css +1 -1
- package/dist/components/VTabs/VTab.d.ts +12 -12
- package/dist/components/VTabs/VTab.js.map +1 -1
- package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js +36 -24
- package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTabs/VTabPanel.d.ts +2 -10
- package/dist/components/VTabs/VTabPanel.js.map +1 -1
- package/dist/components/VTabs/VTabPanel.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/VTabs/VTabPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTabs/VTabs.css +1 -1
- package/dist/components/VTabs/VTabs.d.ts +27 -18
- package/dist/components/VTabs/VTabs.js.map +1 -1
- package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js +92 -81
- package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTabs/context.d.ts +9 -19
- package/dist/components/VTabs/context.js +1 -1
- package/dist/components/VTabs/context.js.map +1 -1
- package/dist/components/VTextarea/VTextarea.css +1 -1
- package/dist/components/VTextarea/VTextarea.d.ts +34 -6
- package/dist/components/VTextarea/VTextarea.js.map +1 -1
- package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js +91 -74
- package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTimeInput/VTimeInput.css +1 -1
- package/dist/components/VTimeInput/VTimeInput.d.ts +123 -33
- package/dist/components/VTimeInput/VTimeInput.js.map +1 -1
- package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js +294 -291
- package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTimeInput/search.d.ts +24 -0
- package/dist/components/VTimeInput/search.js +22 -0
- package/dist/components/VTimeInput/search.js.map +1 -0
- package/dist/components/VTimePicker/VTimePicker.css +1 -1
- package/dist/components/VTimePicker/VTimePicker.d.ts +51 -30
- package/dist/components/VTimePicker/VTimePicker.js.map +1 -1
- package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js +216 -151
- package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTimePicker/limits.d.ts +88 -0
- package/dist/components/VTimePicker/limits.js +70 -0
- package/dist/components/VTimePicker/limits.js.map +1 -0
- package/dist/components/VToast/VToast.css +1 -1
- package/dist/components/VToast/VToast.d.ts +0 -10
- package/dist/components/VToast/VToast.js.map +1 -1
- package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js +10 -10
- package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VToast/VToaster.css +1 -1
- package/dist/components/VToast/VToaster.d.ts +0 -17
- package/dist/components/VToast/VToaster.js.map +1 -1
- package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js +29 -28
- package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VToast/state.d.ts +10 -19
- package/dist/components/VToast/state.js +1 -1
- package/dist/components/VToast/state.js.map +1 -1
- package/dist/components/VToggle/VToggle.css +1 -1
- package/dist/components/VToggle/VToggle.d.ts +56 -11
- package/dist/components/VToggle/VToggle.js.map +1 -1
- package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js +80 -46
- package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VToggle/VToggleItem.d.ts +16 -2
- package/dist/components/VToggle/VToggleItem.js +0 -2
- package/dist/components/VToggle/VToggleItem.js.map +1 -1
- package/dist/components/VToggle/VToggleItem.vue_vue_type_script_setup_true_lang.js +23 -15
- package/dist/components/VToggle/VToggleItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VToggle/context.d.ts +4 -24
- package/dist/components/VToggle/context.js.map +1 -1
- package/dist/components/VTooltip/VTooltip.css +1 -1
- package/dist/components/VTooltip/VTooltip.d.ts +9 -33
- package/dist/components/VTooltip/VTooltip.js.map +1 -1
- package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js +28 -24
- package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTypography/VTypography.js.map +1 -1
- package/dist/components/VTypography/VTypography.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/composables/useAriaLabel.d.ts +0 -17
- package/dist/composables/useAriaLabel.js.map +1 -1
- package/dist/composables/useClearable.d.ts +42 -0
- package/dist/composables/useClearable.js +19 -0
- package/dist/composables/useClearable.js.map +1 -0
- package/dist/composables/useControlShape.d.ts +22 -0
- package/dist/composables/useControlShape.js +13 -0
- package/dist/composables/useControlShape.js.map +1 -0
- package/dist/composables/useDetailsOpen.d.ts +22 -0
- package/dist/composables/useDetailsOpen.js +21 -0
- package/dist/composables/useDetailsOpen.js.map +1 -0
- package/dist/composables/useFieldIds.d.ts +0 -15
- package/dist/composables/useFieldIds.js +8 -7
- package/dist/composables/useFieldIds.js.map +1 -1
- package/dist/composables/useFieldPanel.d.ts +21 -18
- package/dist/composables/useFieldPanel.js +43 -23
- package/dist/composables/useFieldPanel.js.map +1 -1
- package/dist/composables/useFileDrop.d.ts +0 -22
- package/dist/composables/useFileDrop.js.map +1 -1
- package/dist/composables/useFileField.d.ts +45 -17
- package/dist/composables/useFileField.js +40 -20
- package/dist/composables/useFileField.js.map +1 -1
- package/dist/composables/useFocusoutDismiss.d.ts +0 -15
- package/dist/composables/useFocusoutDismiss.js.map +1 -1
- package/dist/composables/useIconClickHandlers.d.ts +29 -14
- package/dist/composables/useIconClickHandlers.js +15 -5
- package/dist/composables/useIconClickHandlers.js.map +1 -1
- package/dist/composables/useInertLink.d.ts +20 -0
- package/dist/composables/useInertLink.js +23 -0
- package/dist/composables/useInertLink.js.map +1 -0
- package/dist/composables/useMaskedField.d.ts +33 -10
- package/dist/composables/useMaskedField.js +45 -1
- package/dist/composables/useMaskedField.js.map +1 -1
- package/dist/composables/usePopover.d.ts +15 -1
- package/dist/composables/usePopover.js +23 -8
- package/dist/composables/usePopover.js.map +1 -1
- package/dist/composables/useProgressValue.d.ts +5 -8
- package/dist/composables/useProgressValue.js +6 -3
- package/dist/composables/useProgressValue.js.map +1 -1
- package/dist/composables/useRootAttrs.d.ts +12 -19
- package/dist/composables/useRootAttrs.js.map +1 -1
- package/dist/composables/useTimer.d.ts +8 -10
- package/dist/composables/useTimer.js.map +1 -1
- package/dist/i18n/en.d.ts +2 -10
- package/dist/i18n/en.js +18 -19
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/fr.d.ts +2 -18
- package/dist/i18n/fr.js +18 -19
- package/dist/i18n/fr.js.map +1 -1
- package/dist/i18n/state.d.ts +44 -47
- package/dist/i18n/state.js +20 -17
- package/dist/i18n/state.js.map +1 -1
- package/dist/i18n/types.d.ts +53 -44
- package/dist/icons.d.ts +3 -3
- package/dist/index.d.ts +43 -17
- package/dist/index.js +45 -44
- package/dist/styles.css +1 -1
- package/dist/tokens/css.js.map +1 -1
- package/dist/tokens/index.d.ts +5 -1
- package/dist/tokens/primitives.js.map +1 -1
- package/dist/tokens/semantic.d.ts +5 -1
- package/dist/tokens/semantic.js +6 -2
- package/dist/tokens/semantic.js.map +1 -1
- package/dist/tokens/themes/dark.js.map +1 -1
- package/dist/tokens/types.d.ts +7 -15
- package/dist/tokens/types.js.map +1 -1
- package/dist/tokens.json +25 -5
- package/dist/types.d.ts +24 -0
- package/dist/utils/array.d.ts +3 -6
- package/dist/utils/array.js.map +1 -1
- package/dist/utils/arrowNav.d.ts +17 -17
- package/dist/utils/arrowNav.js +5 -3
- package/dist/utils/arrowNav.js.map +1 -1
- package/dist/utils/chip.d.ts +11 -15
- package/dist/utils/chip.js.map +1 -1
- package/dist/utils/css.d.ts +22 -11
- package/dist/utils/css.js +5 -2
- package/dist/utils/css.js.map +1 -1
- package/dist/utils/date.d.ts +42 -19
- package/dist/utils/date.js +97 -98
- package/dist/utils/date.js.map +1 -1
- package/dist/utils/direction.d.ts +6 -12
- package/dist/utils/direction.js.map +1 -1
- package/dist/utils/env.d.ts +5 -6
- package/dist/utils/file.d.ts +46 -58
- package/dist/utils/file.js +43 -36
- package/dist/utils/file.js.map +1 -1
- package/dist/utils/focus.d.ts +8 -17
- package/dist/utils/focus.js.map +1 -1
- package/dist/utils/hostWarns.d.ts +12 -0
- package/dist/utils/hostWarns.js +6 -0
- package/dist/utils/hostWarns.js.map +1 -0
- package/dist/utils/ids.d.ts +10 -0
- package/dist/utils/ids.js +8 -0
- package/dist/utils/ids.js.map +1 -0
- package/dist/utils/matcher.d.ts +5 -9
- package/dist/utils/matcher.js.map +1 -1
- package/dist/utils/memo.d.ts +12 -0
- package/dist/utils/memo.js +9 -0
- package/dist/utils/memo.js.map +1 -0
- package/dist/utils/number.d.ts +3 -4
- package/dist/utils/number.js.map +1 -1
- package/dist/utils/text.d.ts +20 -9
- package/dist/utils/text.js +17 -3
- package/dist/utils/text.js.map +1 -1
- package/dist/utils/time.d.ts +53 -61
- package/dist/utils/time.js +49 -45
- package/dist/utils/time.js.map +1 -1
- package/dist/utils/vnode.d.ts +8 -15
- package/dist/utils/vnode.js.map +1 -1
- package/package.json +6 -6
- package/dist/components/VToggle/VToggleItem.css +0 -2
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ pnpm add vectis-ui vue
|
|
|
20
20
|
import 'vectis-ui/styles.css'
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
`styles.css` is the **core**: the reset, the tokens and the chrome shared by every component (
|
|
23
|
+
`styles.css` is the **core**: the reset, the tokens and the chrome shared by every component (5.27 kB gzip). Each component's own CSS ships with the component and is pulled in by the import you already write — nothing else to add, and you download the CSS of what you use. A single `VButton` costs 6.08 kB gzip of CSS instead of the 22.41 kB of a bundled stylesheet.
|
|
24
24
|
|
|
25
25
|
Those figures are measured, not estimated: `pnpm --filter vectis-ui bench:size` prints them from the built artefact and holds them to a committed baseline, so they cannot drift out of step with the library again.
|
|
26
26
|
|
|
@@ -147,7 +147,7 @@ A **bare string is always a NAME**, and it no longer reaches the library's own d
|
|
|
147
147
|
```vue
|
|
148
148
|
<VButton icon-start="download">Export</VButton>
|
|
149
149
|
<VButton :icon-start="cloud_upload">Upload</VButton>
|
|
150
|
-
<VBreadcrumb :separator="{ src: '/chevron.svg' }" :items="items" />
|
|
150
|
+
<VBreadcrumb :separator-icon="{ src: '/chevron.svg' }" :items="items" />
|
|
151
151
|
<VMenuItem label="Open" :icon-start="{ component: FolderIcon }" />
|
|
152
152
|
```
|
|
153
153
|
|
|
@@ -155,7 +155,7 @@ A string is **always** an icon name; one of the design system's own icons is imp
|
|
|
155
155
|
|
|
156
156
|
### Wiring your own icon library
|
|
157
157
|
|
|
158
|
-
`setIconResolver` is consulted **before** the icon's own drawing; returning `undefined` means "I do not know this name" and hands over to that drawing, then to the ligature. **Partial** mappings are therefore usable. The `
|
|
158
|
+
`setIconResolver` is consulted **before** the icon's own drawing; returning `undefined` means "I do not know this name" and hands over to that drawing, then to the ligature. **Partial** mappings are therefore usable. The `IconName` type enumerates the names to cover.
|
|
159
159
|
|
|
160
160
|
An imported icon carries its **name** as well as its paths, which is what keeps a single `setIconResolver` call enough to move the design system's own internals onto your icon set — exactly as it was when those defaults were plain strings.
|
|
161
161
|
|
|
@@ -252,9 +252,9 @@ registerMessages('en', {
|
|
|
252
252
|
The same gesture as enabling French — there are not two categories of dictionary. What you do not write falls back to English, never to an empty string: a partial dictionary is usable from its very first key.
|
|
253
253
|
|
|
254
254
|
```ts
|
|
255
|
-
import { registerMessages, setLocale, type
|
|
255
|
+
import { registerMessages, setLocale, type MessagesInput } from 'vectis-ui'
|
|
256
256
|
|
|
257
|
-
const de:
|
|
257
|
+
const de: MessagesInput = {
|
|
258
258
|
common: { loading: 'Wird geladen…', close: 'Schließen' },
|
|
259
259
|
pagination: { previous: 'Vorherige Seite', next: 'Nächste Seite', page: (p) => `Seite ${p}` },
|
|
260
260
|
}
|
|
@@ -263,7 +263,7 @@ registerMessages('de', de)
|
|
|
263
263
|
setLocale('de-DE')
|
|
264
264
|
```
|
|
265
265
|
|
|
266
|
-
An entry depending on a value is a **TypeScript function**, not a placeholder string: no plural engine and no ICU syntax to learn. Type the constant as `
|
|
266
|
+
An entry depending on a value is a **TypeScript function**, not a placeholder string: no plural engine and no ICU syntax to learn. Type the constant as `MessagesInput` for key autocompletion, or as `Messages` to have the compiler require full coverage.
|
|
267
267
|
|
|
268
268
|
The key is the **language subtag** alone: `registerMessages('de', …)` covers `de-DE`, `de-AT` and `de-CH`.
|
|
269
269
|
|
|
@@ -318,6 +318,40 @@ Target: **modern browsers** — Chrome/Edge 125+, Safari 26+, Firefox 147+.
|
|
|
318
318
|
- **CSS Anchor Positioning** (VTooltip, VMenu and its submenus, VCombobox): shipped with no JS fallback, a deliberate choice — every engine above the floor implements it, Firefox from 147.
|
|
319
319
|
- Pure progressive enhancement (clean degradation when unsupported): `@starting-style`/`allow-discrete` animations, `field-sizing: content` (VTextarea `auto-grow`), `::details-content` + `interpolate-size` (the VAccordion animation), and the scroll shadows of `VDialog` (`container-type: scroll-state`, Chrome/Edge 133+ — elsewhere the hairlines simply stay invisible).
|
|
320
320
|
|
|
321
|
+
### Do not let your build lower this CSS
|
|
322
|
+
|
|
323
|
+
Your bundler minifies the library's sheets along with the rest of your application, and a minifier
|
|
324
|
+
aimed at older browsers **rewrites** part of what they contain. One of those rewrites is not a
|
|
325
|
+
fallback but a change of meaning: **Lightning CSS** — the default CSS minifier of **Vite 8**, and
|
|
326
|
+
Parcel's — replaces `:dir(rtl)` with an `:is(:lang(ae), :lang(ar), …, :lang(yi))` approximation as
|
|
327
|
+
soon as its targets predate Chrome 120. That list matches on the document's **language** where the
|
|
328
|
+
library flips on its **direction**, so on an `<html dir="rtl" lang="en">` page the rule never
|
|
329
|
+
applies at all.
|
|
330
|
+
|
|
331
|
+
Eleven components mirror something through `:dir(rtl)` and would silently stop: the arrows of
|
|
332
|
+
VPagination, VTabs, VBreadcrumb, VMenu, VCalendar, VDatePicker and VCarousel, VBadge's overlay
|
|
333
|
+
corner, VProgressCircular's direction of travel, VProgressLinear's clipped text copy and
|
|
334
|
+
VSkeletonLoader's wave. Nothing errors, and a dev server shows none of it: only a production build
|
|
335
|
+
minifies.
|
|
336
|
+
|
|
337
|
+
Vite derives `build.cssTarget` from `build.target`, whose `'modules'` default stands for Chrome 87.
|
|
338
|
+
Pin it to the floor above, and the modern CSS goes through untouched:
|
|
339
|
+
|
|
340
|
+
```ts
|
|
341
|
+
// vite.config.ts
|
|
342
|
+
export default defineConfig({
|
|
343
|
+
build: { cssTarget: ['chrome125', 'edge125', 'safari26', 'firefox147'] },
|
|
344
|
+
})
|
|
345
|
+
|
|
346
|
+
// nuxt.config.ts — the same value, one level down
|
|
347
|
+
export default defineNuxtConfig({
|
|
348
|
+
vite: { build: { cssTarget: ['chrome125', 'edge125', 'safari26', 'firefox147'] } },
|
|
349
|
+
})
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
It is also what keeps the output small: lowered, every OKLCH colour of the palette is emitted twice,
|
|
353
|
+
once as an sRGB hex fallback and once as `lab()`.
|
|
354
|
+
|
|
321
355
|
## Accessibility
|
|
322
356
|
|
|
323
357
|
Keyboard navigation and ARIA semantics on every component: the ARIA menu pattern (roving focus, focus returned to the trigger), `role="switch"`, tooltips linked by `aria-describedby` and dismissible with Escape (WCAG 1.4.13), `role="status"`/`role="alert"` according to criticality, an accessible label **required** on `VIconButton`. `prefers-reduced-motion` respected everywhere. Storybook's a11y addon audits every story.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
|
|
2
|
-
@layer vectis.components{.v-accordion{--accordion-pad-delta:0px;--accordion-pad-block:calc(var(--vectis-space-4) - var(--accordion-pad-delta));--accordion-pad-inline:calc(var(--vectis-space-5) - var(--accordion-pad-delta));--accordion-content-pad-start:calc(var(--vectis-space-2) - var(--accordion-pad-delta));font-family:var(--vectis-text-family)
|
|
2
|
+
@layer vectis.components{.v-accordion{--accordion-pad-delta:0px;--accordion-pad-block:calc(var(--vectis-space-4) - var(--accordion-pad-delta));--accordion-pad-inline:calc(var(--vectis-space-5) - var(--accordion-pad-delta));--accordion-content-pad-start:calc(var(--vectis-space-2) - var(--accordion-pad-delta));font-family:var(--vectis-text-family)}.v-accordion[data-compact]{--accordion-pad-delta:var(--vectis-space-1)}.v-accordion[data-variant=outlined]{--accordion-corner-radius:calc(var(--vectis-radius-surface) - 1px);background:var(--vectis-color-surface-raised);border:1px solid var(--vectis-color-border);border-radius:var(--vectis-radius-surface);overflow:clip}}
|
|
@@ -1,26 +1,19 @@
|
|
|
1
1
|
import { IconSource } from '../VIcon/types.js';
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
* one heading at a time. This component is built entirely on the native HTML
|
|
5
|
-
* `<details>` and `<summary>` elements: the browser itself handles opening,
|
|
6
|
-
* closing, the keyboard and the accessibility semantics, so there is no
|
|
7
|
-
* JavaScript here keeping track of which section is currently open.
|
|
8
|
-
*
|
|
9
|
-
* In exclusive mode, opening one section automatically closes the others.
|
|
10
|
-
*/
|
|
2
|
+
/** How much decoration the block carries. */
|
|
3
|
+
export type AccordionVariant = 'flat' | 'outlined';
|
|
11
4
|
interface AccordionProps {
|
|
12
5
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
6
|
+
* Lets the reader keep several sections open at once. Left out, only one may stay
|
|
7
|
+
* open and opening one closes the previous one, which the browser does on its own
|
|
8
|
+
* once every item shares the same `<details>` name.
|
|
16
9
|
*/
|
|
17
|
-
|
|
10
|
+
multiple?: boolean;
|
|
18
11
|
/**
|
|
19
12
|
* How the group is decorated. `flat`, the default, draws nothing and lets the
|
|
20
13
|
* accordion sit directly on the surface behind it; `outlined` gives it a raised
|
|
21
14
|
* background, a border and rounded corners, so it reads as a card.
|
|
22
15
|
*/
|
|
23
|
-
variant?:
|
|
16
|
+
variant?: AccordionVariant;
|
|
24
17
|
/**
|
|
25
18
|
* The icon shown on a closed item: an icon name, or an explicit `{ src }` /
|
|
26
19
|
* `{ component }`. It is a chevron by default, which rotates by 180° when the
|
|
@@ -43,9 +36,9 @@ type __VLS_Slots = {
|
|
|
43
36
|
default(): unknown;
|
|
44
37
|
};
|
|
45
38
|
declare const __VLS_base: import('vue').DefineComponent<AccordionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AccordionProps> & Readonly<{}>, {
|
|
46
|
-
variant:
|
|
39
|
+
variant: AccordionVariant;
|
|
47
40
|
compact: boolean;
|
|
48
|
-
|
|
41
|
+
multiple: boolean;
|
|
49
42
|
expandIcon: IconSource;
|
|
50
43
|
collapseIcon: IconSource;
|
|
51
44
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VAccordion.js","names":[],"sources":["../../../src/components/VAccordion/VAccordion.vue"],"sourcesContent":["<script setup lang=\"ts\">\
|
|
1
|
+
{"version":3,"file":"VAccordion.js","names":[],"sources":["../../../src/components/VAccordion/VAccordion.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * An accordion is a stack of sections whose content the reader can show or hide,\n * one heading at a time. This component is built entirely on the native HTML\n * `<details>` and `<summary>` elements: the browser itself handles opening,\n * closing, the keyboard and the accessibility semantics, so there is no\n * JavaScript here keeping track of which section is currently open.\n *\n * Opening one section closes the previous one, unless `multiple` says otherwise.\n */\n\nimport { provide, useId } from 'vue'\n\nimport { expand_more as expandMoreIcon } from '../VIcon/icons/expand_more'\nimport type { IconSource } from '../VIcon/types'\n\nimport { accordionKey } from './context'\n\n/** How much decoration the block carries. */\nexport type AccordionVariant = 'flat' | 'outlined'\n\ninterface AccordionProps {\n /**\n * Lets the reader keep several sections open at once. Left out, only one may stay\n * open and opening one closes the previous one, which the browser does on its own\n * once every item shares the same `<details>` name.\n */\n multiple?: boolean\n /**\n * How the group is decorated. `flat`, the default, draws nothing and lets the\n * accordion sit directly on the surface behind it; `outlined` gives it a raised\n * background, a border and rounded corners, so it reads as a card.\n */\n variant?: AccordionVariant\n /**\n * The icon shown on a closed item: an icon name, or an explicit `{ src }` /\n * `{ component }`. It is a chevron by default, which rotates by 180° when the\n * item opens.\n */\n expandIcon?: IconSource\n /**\n * The icon shown on an open item. Leave it out and the `expandIcon` is simply\n * rotated 180°; provide one and the two icons are swapped instead.\n */\n collapseIcon?: IconSource\n /**\n * Reduced density: every padding loses 4px, while the text and the icons keep\n * their size.\n */\n compact?: boolean\n}\n\nconst props = withDefaults(defineProps<AccordionProps>(), {\n multiple: false,\n variant: 'flat',\n expandIcon: () => expandMoreIcon,\n collapseIcon: undefined,\n compact: false,\n})\n\ndefineSlots<{\n /** The `<VAccordionItem>`s that make up the group. */\n default(): unknown\n}>()\n\nconst groupName = useId()\nprovide(accordionKey, {\n get name() {\n return props.multiple ? undefined : groupName\n },\n get expandIcon() {\n return props.expandIcon\n },\n get collapseIcon() {\n return props.collapseIcon\n },\n})\n</script>\n\n<template>\n <div class=\"v-accordion\" :data-variant=\"variant\" :data-compact=\"compact ? '' : undefined\">\n <slot />\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n .v-accordion {\n --accordion-pad-delta: 0px;\n --accordion-pad-block: calc(var(--vectis-space-4) - var(--accordion-pad-delta));\n --accordion-pad-inline: calc(var(--vectis-space-5) - var(--accordion-pad-delta));\n --accordion-content-pad-start: calc(var(--vectis-space-2) - var(--accordion-pad-delta));\n\n font-family: var(--vectis-text-family);\n }\n\n .v-accordion[data-compact] {\n --accordion-pad-delta: var(--vectis-space-1);\n }\n\n .v-accordion[data-variant='outlined'] {\n --accordion-corner-radius: calc(var(--vectis-radius-surface) - 1px);\n\n background: var(--vectis-color-surface-raised);\n border: 1px solid var(--vectis-color-border);\n border-radius: var(--vectis-radius-surface);\n /* The clip is what keeps the first and last rows' hover inside the rounded corners, so\n it belongs to the variant that HAS corners. `clip` and not `hidden`: `hidden` makes\n the box a scroll container, which captures every `position: sticky` in the content\n and pins it to the accordion instead of the page. */\n overflow: clip;\n }\n}\n</style>\n"],"mappings":""}
|
|
@@ -5,9 +5,9 @@ import { createElementBlock as n, defineComponent as r, openBlock as i, provide
|
|
|
5
5
|
var c = ["data-variant", "data-compact"], l = /*@__PURE__*/ r({
|
|
6
6
|
__name: "VAccordion",
|
|
7
7
|
props: {
|
|
8
|
-
|
|
8
|
+
multiple: {
|
|
9
9
|
type: Boolean,
|
|
10
|
-
default: !
|
|
10
|
+
default: !1
|
|
11
11
|
},
|
|
12
12
|
variant: { default: "flat" },
|
|
13
13
|
expandIcon: { default: () => e },
|
|
@@ -21,7 +21,7 @@ var c = ["data-variant", "data-compact"], l = /*@__PURE__*/ r({
|
|
|
21
21
|
let r = e, l = s();
|
|
22
22
|
return a(t, {
|
|
23
23
|
get name() {
|
|
24
|
-
return r.
|
|
24
|
+
return r.multiple ? void 0 : l;
|
|
25
25
|
},
|
|
26
26
|
get expandIcon() {
|
|
27
27
|
return r.expandIcon;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VAccordion.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VAccordion/VAccordion.vue"],"sourcesContent":["<script setup lang=\"ts\">\
|
|
1
|
+
{"version":3,"file":"VAccordion.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VAccordion/VAccordion.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * An accordion is a stack of sections whose content the reader can show or hide,\n * one heading at a time. This component is built entirely on the native HTML\n * `<details>` and `<summary>` elements: the browser itself handles opening,\n * closing, the keyboard and the accessibility semantics, so there is no\n * JavaScript here keeping track of which section is currently open.\n *\n * Opening one section closes the previous one, unless `multiple` says otherwise.\n */\n\nimport { provide, useId } from 'vue'\n\nimport { expand_more as expandMoreIcon } from '../VIcon/icons/expand_more'\nimport type { IconSource } from '../VIcon/types'\n\nimport { accordionKey } from './context'\n\n/** How much decoration the block carries. */\nexport type AccordionVariant = 'flat' | 'outlined'\n\ninterface AccordionProps {\n /**\n * Lets the reader keep several sections open at once. Left out, only one may stay\n * open and opening one closes the previous one, which the browser does on its own\n * once every item shares the same `<details>` name.\n */\n multiple?: boolean\n /**\n * How the group is decorated. `flat`, the default, draws nothing and lets the\n * accordion sit directly on the surface behind it; `outlined` gives it a raised\n * background, a border and rounded corners, so it reads as a card.\n */\n variant?: AccordionVariant\n /**\n * The icon shown on a closed item: an icon name, or an explicit `{ src }` /\n * `{ component }`. It is a chevron by default, which rotates by 180° when the\n * item opens.\n */\n expandIcon?: IconSource\n /**\n * The icon shown on an open item. Leave it out and the `expandIcon` is simply\n * rotated 180°; provide one and the two icons are swapped instead.\n */\n collapseIcon?: IconSource\n /**\n * Reduced density: every padding loses 4px, while the text and the icons keep\n * their size.\n */\n compact?: boolean\n}\n\nconst props = withDefaults(defineProps<AccordionProps>(), {\n multiple: false,\n variant: 'flat',\n expandIcon: () => expandMoreIcon,\n collapseIcon: undefined,\n compact: false,\n})\n\ndefineSlots<{\n /** The `<VAccordionItem>`s that make up the group. */\n default(): unknown\n}>()\n\nconst groupName = useId()\nprovide(accordionKey, {\n get name() {\n return props.multiple ? undefined : groupName\n },\n get expandIcon() {\n return props.expandIcon\n },\n get collapseIcon() {\n return props.collapseIcon\n },\n})\n</script>\n\n<template>\n <div class=\"v-accordion\" :data-variant=\"variant\" :data-compact=\"compact ? '' : undefined\">\n <slot />\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n .v-accordion {\n --accordion-pad-delta: 0px;\n --accordion-pad-block: calc(var(--vectis-space-4) - var(--accordion-pad-delta));\n --accordion-pad-inline: calc(var(--vectis-space-5) - var(--accordion-pad-delta));\n --accordion-content-pad-start: calc(var(--vectis-space-2) - var(--accordion-pad-delta));\n\n font-family: var(--vectis-text-family);\n }\n\n .v-accordion[data-compact] {\n --accordion-pad-delta: var(--vectis-space-1);\n }\n\n .v-accordion[data-variant='outlined'] {\n --accordion-corner-radius: calc(var(--vectis-radius-surface) - 1px);\n\n background: var(--vectis-color-surface-raised);\n border: 1px solid var(--vectis-color-border);\n border-radius: var(--vectis-radius-surface);\n /* The clip is what keeps the first and last rows' hover inside the rounded corners, so\n it belongs to the variant that HAS corners. `clip` and not `hidden`: `hidden` makes\n the box a scroll container, which captures every `position: sticky` in the content\n and pins it to the accordion instead of the page. */\n overflow: clip;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAoDA,IAAM,IAAQ,GAaR,IAAY,EAAM;SACxB,EAAQ,GAAc;GACpB,IAAI,OAAO;IACT,OAAO,EAAM,WAAW,KAAA,IAAY;GACtC;GACA,IAAI,aAAa;IACf,OAAO,EAAM;GACf;GACA,IAAI,eAAe;IACjB,OAAO,EAAM;GACf;EACF,CAAC,mBAIC,EAEM,OAAA;GAFD,OAAM;GAAe,gBAAc,EAAA;GAAU,gBAAc,EAAA,UAAO,KAAQ,KAAA;MAC7E,EAAQ,EAAA,QAAA,SAAA,CAAA,GAAA,GAAA,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
|
|
2
|
-
@layer vectis.components{.v-accordion-item
|
|
2
|
+
@layer vectis.components{.v-accordion-item+.v-accordion-item{border-block-start:1px solid var(--vectis-color-border)}.v-accordion-summary{--vectis-icon-size:var(--vectis-icon-size-md);--vectis-icon-opsz:20;align-items:center;gap:var(--vectis-space-3);padding:var(--accordion-pad-block,var(--vectis-space-4)) var(--accordion-pad-inline,var(--vectis-space-5));cursor:pointer;font-size:var(--vectis-text-label-size);font-weight:var(--vectis-text-label-weight);color:var(--vectis-color-text);display:flex}.v-accordion-summary:hover:not([data-disabled]){background:var(--vectis-color-surface-muted)}.v-accordion-summary:focus-visible{outline:var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);outline-offset:calc(-1 * var(--vectis-focus-ring-width))}.v-accordion-item:first-child>.v-accordion-summary{border-start-start-radius:var(--accordion-corner-radius,0);border-start-end-radius:var(--accordion-corner-radius,0)}.v-accordion-item:last-child:not([open])>.v-accordion-summary{border-end-end-radius:var(--accordion-corner-radius,0);border-end-start-radius:var(--accordion-corner-radius,0)}.v-accordion-heading{line-height:var(--vectis-text-label-leading);flex-direction:column;flex:1;display:flex}.v-accordion-icon{color:var(--vectis-color-text-muted);flex:none}.v-accordion-summary[data-disabled]{color:var(--vectis-color-text-subtle);cursor:not-allowed}.v-accordion-summary[data-disabled] .v-accordion-icon,.v-accordion-summary[data-disabled] .v-accordion-subtitle{color:inherit}.v-accordion-content{padding:var(--accordion-content-pad-start,var(--vectis-space-2)) var(--accordion-pad-inline,var(--vectis-space-5)) var(--accordion-pad-block,var(--vectis-space-4));font-size:var(--vectis-text-body-md-size);line-height:var(--vectis-text-body-md-leading);color:var(--vectis-color-text-muted)}}
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import { IconSource } from '../VIcon/types.js';
|
|
2
|
-
/**
|
|
3
|
-
* One section of an accordion: a heading the reader can click, and the content it
|
|
4
|
-
* reveals. It is a native `<details>`/`<summary>` pair, so the browser owns the
|
|
5
|
-
* open and closed state, the keyboard and the accessibility semantics, and this
|
|
6
|
-
* component adds no code of its own for any of them.
|
|
7
|
-
*
|
|
8
|
-
* The opening is animated entirely in CSS, with `::details-content` and
|
|
9
|
-
* `interpolate-size`. Both are recent additions to the language: where they are
|
|
10
|
-
* missing the section simply appears at once, which is the intended fallback.
|
|
11
|
-
*/
|
|
12
2
|
interface AccordionItemProps {
|
|
13
3
|
/**
|
|
14
4
|
* The heading of the section, the line that stays visible when it is closed. Use
|
|
@@ -22,13 +12,18 @@ interface AccordionItemProps {
|
|
|
22
12
|
subtitle?: string;
|
|
23
13
|
/**
|
|
24
14
|
* An icon placed before the title: an icon name, or an explicit render
|
|
25
|
-
* (`{ src }`, `{ component }`…).
|
|
15
|
+
* (`{ src }`, `{ component }`…). The `#icon` slot replaces it.
|
|
16
|
+
*
|
|
17
|
+
* It carries no side in its name because there is only one: the end of the row belongs
|
|
18
|
+
* to the chevron, so there is nothing for a start to be told apart from. That is the
|
|
19
|
+
* rule every single-icon component of the design system follows, and its slot is named
|
|
20
|
+
* `#icon` for the same reason.
|
|
26
21
|
*/
|
|
27
|
-
|
|
22
|
+
icon?: IconSource;
|
|
28
23
|
/**
|
|
29
|
-
* Renders the section already open.
|
|
30
|
-
* the
|
|
31
|
-
*
|
|
24
|
+
* Renders the section already open. Only its initial value is read: the browser
|
|
25
|
+
* owns the state afterwards, so changing this prop later will not close a section
|
|
26
|
+
* the reader has opened. Bind `v-model:open` to drive it instead.
|
|
32
27
|
*/
|
|
33
28
|
defaultOpen?: boolean;
|
|
34
29
|
/**
|
|
@@ -37,6 +32,7 @@ interface AccordionItemProps {
|
|
|
37
32
|
*/
|
|
38
33
|
disabled?: boolean;
|
|
39
34
|
}
|
|
35
|
+
type __VLS_Props = AccordionItemProps;
|
|
40
36
|
type __VLS_Slots = {
|
|
41
37
|
/** The content revealed when the section is open. */
|
|
42
38
|
default(): unknown;
|
|
@@ -44,14 +40,32 @@ type __VLS_Slots = {
|
|
|
44
40
|
title?(): unknown;
|
|
45
41
|
/** A subtitle made of markup, which replaces the `subtitle` prop. */
|
|
46
42
|
subtitle?(): unknown;
|
|
47
|
-
/** Free content before the title, which takes the place of `
|
|
48
|
-
|
|
43
|
+
/** Free content before the title, which takes the place of `icon`. */
|
|
44
|
+
icon?(): unknown;
|
|
49
45
|
};
|
|
50
|
-
|
|
46
|
+
type __VLS_ModelProps = {
|
|
47
|
+
/**
|
|
48
|
+
* Whether the section is open, when the consumer wants to drive or observe it. Left
|
|
49
|
+
* unbound, the browser keeps that state to itself, `defaultOpen` giving only the initial
|
|
50
|
+
* value.
|
|
51
|
+
*
|
|
52
|
+
* TRAP — "not bound" is written as `null` and not `undefined`. A model typed as a plain
|
|
53
|
+
* boolean is declared as such at runtime, and Vue casts an ABSENT boolean prop to
|
|
54
|
+
* `false`, which would silently overwrite `defaultOpen`. The explicit default disarms
|
|
55
|
+
* that cast.
|
|
56
|
+
*/
|
|
57
|
+
'open'?: boolean | null;
|
|
58
|
+
};
|
|
59
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
60
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
61
|
+
"update:open": (value: boolean | null) => any;
|
|
62
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
63
|
+
"onUpdate:open"?: ((value: boolean | null) => any) | undefined;
|
|
64
|
+
}>, {
|
|
51
65
|
title: string;
|
|
52
66
|
subtitle: string;
|
|
53
67
|
disabled: boolean;
|
|
54
|
-
|
|
68
|
+
icon: IconSource;
|
|
55
69
|
defaultOpen: boolean;
|
|
56
70
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
57
71
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VAccordionItem.js","names":[],"sources":["../../../src/components/VAccordion/VAccordionItem.vue"],"sourcesContent":["<script setup lang=\"ts\">\
|
|
1
|
+
{"version":3,"file":"VAccordionItem.js","names":[],"sources":["../../../src/components/VAccordion/VAccordionItem.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * One section of an accordion: a heading the reader can click, and the content it\n * reveals. It is a native `<details>`/`<summary>` pair, so the browser owns the\n * open and closed state, the keyboard and the accessibility semantics. The only JS\n * is the `v-model:open` bridge, fed by the element, and the click a disabled summary\n * has to cancel, both shared with VSideNavigationItem through `useDetailsOpen`.\n *\n * The opening is animated entirely in CSS, with `::details-content` and\n * `interpolate-size` (`styles/disclosure.css`). Both are recent additions to the\n * language: where they are missing the section simply appears at once, which is the\n * intended fallback.\n */\n\nimport { computed, inject } from 'vue'\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { expand_more as expandMoreIcon } from '../VIcon/icons/expand_more'\nimport type { IconSource } from '../VIcon/types'\nimport VTypography from '../VTypography/VTypography.vue'\nimport { accordionKey } from './context'\n\nimport { useDetailsOpen } from '../../composables/useDetailsOpen'\n\ninterface AccordionItemProps {\n /**\n * The heading of the section, the line that stays visible when it is closed. Use\n * the `#title` slot instead when the heading needs markup rather than plain text.\n */\n title?: string\n /**\n * A secondary line under the title, for a short explanation or a status. The\n * `#subtitle` slot replaces it when markup is needed.\n */\n subtitle?: string\n /**\n * An icon placed before the title: an icon name, or an explicit render\n * (`{ src }`, `{ component }`…). The `#icon` slot replaces it.\n *\n * It carries no side in its name because there is only one: the end of the row belongs\n * to the chevron, so there is nothing for a start to be told apart from. That is the\n * rule every single-icon component of the design system follows, and its slot is named\n * `#icon` for the same reason.\n */\n icon?: IconSource\n /**\n * Renders the section already open. Only its initial value is read: the browser\n * owns the state afterwards, so changing this prop later will not close a section\n * the reader has opened. Bind `v-model:open` to drive it instead.\n */\n defaultOpen?: boolean\n /**\n * Makes the section inert. It can no longer be opened, the keyboard skips over\n * it, and it is greyed out through the colour tokens.\n */\n disabled?: boolean\n}\n\nconst props = withDefaults(defineProps<AccordionItemProps>(), {\n title: undefined,\n subtitle: undefined,\n icon: undefined,\n defaultOpen: false,\n disabled: false,\n})\n\n/**\n * Whether the section is open, when the consumer wants to drive or observe it. Left\n * unbound, the browser keeps that state to itself, `defaultOpen` giving only the initial\n * value.\n *\n * TRAP — \"not bound\" is written as `null` and not `undefined`. A model typed as a plain\n * boolean is declared as such at runtime, and Vue casts an ABSENT boolean prop to\n * `false`, which would silently overwrite `defaultOpen`. The explicit default disarms\n * that cast.\n */\nconst open = defineModel<boolean | null>('open', { default: null })\n\ndefineSlots<{\n /** The content revealed when the section is open. */\n default(): unknown\n /** A title made of markup, which replaces the `title` prop. */\n title?(): unknown\n /** A subtitle made of markup, which replaces the `subtitle` prop. */\n subtitle?(): unknown\n /** Free content before the title, which takes the place of `icon`. */\n icon?(): unknown\n}>()\n\nconst accordion = inject(accordionKey, null)\n\n/**\n * Both icons are chosen on the enclosing group. The chevron fallback is what keeps\n * an item rendering correctly when it is used outside a VAccordion.\n */\nconst expandIcon = computed(() => accordion?.expandIcon ?? expandMoreIcon)\nconst collapseIcon = computed(() => accordion?.collapseIcon)\n\nconst { openAttr, onToggle, onSummaryClick } = useDetailsOpen(open, {\n defaultOpen: () => props.defaultOpen,\n disabled: () => props.disabled,\n})\n</script>\n\n<template>\n <details\n class=\"v-accordion-item v-disclosure\"\n :name=\"accordion?.name\"\n :open=\"openAttr\"\n :data-swap=\"collapseIcon ? '' : undefined\"\n @toggle=\"onToggle\"\n >\n <summary\n class=\"v-accordion-summary\"\n :data-disabled=\"disabled ? '' : undefined\"\n :aria-disabled=\"disabled || undefined\"\n :tabindex=\"disabled ? -1 : undefined\"\n @click=\"onSummaryClick\"\n >\n <slot name=\"icon\">\n <VIcon v-if=\"icon\" class=\"v-accordion-icon\" v-bind=\"iconProps(icon)\" />\n </slot>\n <span class=\"v-accordion-heading\">\n <span class=\"v-accordion-title\"\n ><slot name=\"title\">{{ title }}</slot></span\n >\n <VTypography\n v-if=\"subtitle !== undefined || $slots.subtitle\"\n as=\"span\"\n variant=\"caption\"\n tone=\"muted\"\n class=\"v-accordion-subtitle\"\n ><slot name=\"subtitle\">{{ subtitle }}</slot></VTypography\n >\n </span>\n <VIcon class=\"v-accordion-chevron v-disclosure-chevron\" v-bind=\"iconProps(expandIcon)\" />\n <!-- Both icons are always in the DOM; [open] decides which one shows, in CSS alone -->\n <VIcon\n v-if=\"collapseIcon\"\n class=\"v-accordion-chevron v-accordion-chevron-open v-disclosure-chevron v-disclosure-chevron-open\"\n v-bind=\"iconProps(collapseIcon)\"\n />\n </summary>\n <div class=\"v-accordion-content\">\n <slot />\n </div>\n </details>\n</template>\n\n<style>\n@layer vectis.components {\n .v-accordion-item + .v-accordion-item {\n border-block-start: 1px solid var(--vectis-color-border);\n }\n\n .v-accordion-summary {\n --vectis-icon-size: var(--vectis-icon-size-md);\n --vectis-icon-opsz: 20;\n\n display: flex;\n align-items: center;\n gap: var(--vectis-space-3);\n padding: var(--accordion-pad-block, var(--vectis-space-4))\n var(--accordion-pad-inline, var(--vectis-space-5));\n cursor: pointer;\n font-size: var(--vectis-text-label-size);\n font-weight: var(--vectis-text-label-weight);\n color: var(--vectis-color-text);\n }\n\n .v-accordion-summary:hover:not([data-disabled]) {\n background: var(--vectis-color-surface-muted);\n }\n\n .v-accordion-summary:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: calc(-1 * var(--vectis-focus-ring-width));\n }\n\n .v-accordion-item:first-child > .v-accordion-summary {\n border-start-start-radius: var(--accordion-corner-radius, 0);\n border-start-end-radius: var(--accordion-corner-radius, 0);\n }\n\n .v-accordion-item:last-child:not([open]) > .v-accordion-summary {\n border-end-start-radius: var(--accordion-corner-radius, 0);\n border-end-end-radius: var(--accordion-corner-radius, 0);\n }\n\n .v-accordion-heading {\n flex: 1;\n display: flex;\n flex-direction: column;\n line-height: var(--vectis-text-label-leading);\n }\n\n .v-accordion-icon {\n flex: none;\n color: var(--vectis-color-text-muted);\n }\n\n /* A disabled item greys out through the colour tokens and never through\n `opacity`, the rule every control in the DS follows. */\n .v-accordion-summary[data-disabled] {\n color: var(--vectis-color-text-subtle);\n cursor: not-allowed;\n }\n\n /* The icon and the subtitle default to text-muted, which is DARKER than the\n text-subtle a disabled title takes: left to themselves they would come out\n stronger than the label they belong to, so they inherit it instead. The chevron\n gets the same treatment from `styles/disclosure.css`. */\n .v-accordion-summary[data-disabled] .v-accordion-icon,\n .v-accordion-summary[data-disabled] .v-accordion-subtitle {\n color: inherit;\n }\n\n .v-accordion-content {\n padding: var(--accordion-content-pad-start, var(--vectis-space-2))\n var(--accordion-pad-inline, var(--vectis-space-5))\n var(--accordion-pad-block, var(--vectis-space-4));\n font-size: var(--vectis-text-body-md-size);\n line-height: var(--vectis-text-body-md-leading);\n color: var(--vectis-color-text-muted);\n }\n\n /* The disclosure animation, the chevron's rotation or swap and the WebKit marker come\n from `styles/disclosure.css`, reduced-motion block included. */\n}\n</style>\n"],"mappings":""}
|
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import e from "../VIcon/
|
|
2
|
-
import t from "../
|
|
3
|
-
import
|
|
1
|
+
import { iconProps as e } from "../VIcon/iconProps.js";
|
|
2
|
+
import t from "../VIcon/VIcon.js";
|
|
3
|
+
import n from "../VTypography/VTypography.js";
|
|
4
4
|
import { expand_more as r } from "../VIcon/icons/expand_more.js";
|
|
5
5
|
import { accordionKey as i } from "./context.js";
|
|
6
|
-
import {
|
|
6
|
+
import { useDetailsOpen as a } from "../../composables/useDetailsOpen.js";
|
|
7
|
+
import { computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, inject as m, mergeModels as h, mergeProps as g, openBlock as _, renderSlot as v, toDisplayString as y, unref as b, useModel as x, withCtx as S } from "vue";
|
|
7
8
|
//#region src/components/VAccordion/VAccordionItem.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var
|
|
9
|
+
var C = [
|
|
9
10
|
"name",
|
|
10
11
|
"open",
|
|
11
|
-
"data-swap"
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
"data-swap"
|
|
13
|
+
], w = [
|
|
14
|
+
"data-disabled",
|
|
15
|
+
"aria-disabled",
|
|
16
|
+
"tabindex"
|
|
17
|
+
], T = { class: "v-accordion-heading" }, E = { class: "v-accordion-title" }, D = { class: "v-accordion-content" }, O = /*@__PURE__*/ p({
|
|
14
18
|
__name: "VAccordionItem",
|
|
15
|
-
props: {
|
|
19
|
+
props: /*@__PURE__*/ h({
|
|
16
20
|
title: { default: void 0 },
|
|
17
21
|
subtitle: { default: void 0 },
|
|
18
|
-
|
|
22
|
+
icon: { default: void 0 },
|
|
19
23
|
defaultOpen: {
|
|
20
24
|
type: Boolean,
|
|
21
25
|
default: !1
|
|
@@ -24,47 +28,55 @@ var b = [
|
|
|
24
28
|
type: Boolean,
|
|
25
29
|
default: !1
|
|
26
30
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
31
|
+
}, {
|
|
32
|
+
open: {
|
|
33
|
+
type: [Boolean, null],
|
|
34
|
+
default: null
|
|
35
|
+
},
|
|
36
|
+
openModifiers: {}
|
|
37
|
+
}),
|
|
38
|
+
emits: ["update:open"],
|
|
39
|
+
setup(p) {
|
|
40
|
+
let h = p, O = x(p, "open"), k = m(i, null), A = o(() => k?.expandIcon ?? r), j = o(() => k?.collapseIcon), { openAttr: M, onToggle: N, onSummaryClick: P } = a(O, {
|
|
41
|
+
defaultOpen: () => h.defaultOpen,
|
|
42
|
+
disabled: () => h.disabled
|
|
43
|
+
});
|
|
44
|
+
return (r, i) => (_(), l("details", {
|
|
45
|
+
class: "v-accordion-item v-disclosure",
|
|
46
|
+
name: b(k)?.name,
|
|
47
|
+
open: b(M),
|
|
48
|
+
"data-swap": j.value ? "" : void 0,
|
|
49
|
+
onToggle: i[1] ||= (...e) => b(N) && b(N)(...e)
|
|
50
|
+
}, [u("summary", {
|
|
40
51
|
class: "v-accordion-summary",
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
52
|
+
"data-disabled": p.disabled ? "" : void 0,
|
|
53
|
+
"aria-disabled": p.disabled || void 0,
|
|
54
|
+
tabindex: p.disabled ? -1 : void 0,
|
|
55
|
+
onClick: i[0] ||= (...e) => b(P) && b(P)(...e)
|
|
44
56
|
}, [
|
|
45
|
-
|
|
57
|
+
v(r.$slots, "icon", {}, () => [p.icon ? (_(), s(t, g({
|
|
46
58
|
key: 0,
|
|
47
|
-
class: "v-accordion-icon
|
|
48
|
-
},
|
|
49
|
-
|
|
59
|
+
class: "v-accordion-icon"
|
|
60
|
+
}, b(e)(p.icon)), null, 16)) : c("", !0)]),
|
|
61
|
+
u("span", T, [u("span", E, [v(r.$slots, "title", {}, () => [d(y(p.title), 1)])]), p.subtitle !== void 0 || r.$slots.subtitle ? (_(), s(n, {
|
|
50
62
|
key: 0,
|
|
51
63
|
as: "span",
|
|
52
64
|
variant: "caption",
|
|
53
65
|
tone: "muted",
|
|
54
66
|
class: "v-accordion-subtitle"
|
|
55
67
|
}, {
|
|
56
|
-
default:
|
|
68
|
+
default: S(() => [v(r.$slots, "subtitle", {}, () => [d(y(p.subtitle), 1)])]),
|
|
57
69
|
_: 3
|
|
58
|
-
})) :
|
|
59
|
-
|
|
60
|
-
|
|
70
|
+
})) : c("", !0)]),
|
|
71
|
+
f(t, g({ class: "v-accordion-chevron v-disclosure-chevron" }, b(e)(A.value)), null, 16),
|
|
72
|
+
j.value ? (_(), s(t, g({
|
|
61
73
|
key: 0,
|
|
62
|
-
class: "v-accordion-
|
|
63
|
-
},
|
|
64
|
-
], 8,
|
|
74
|
+
class: "v-accordion-chevron v-accordion-chevron-open v-disclosure-chevron v-disclosure-chevron-open"
|
|
75
|
+
}, b(e)(j.value)), null, 16)) : c("", !0)
|
|
76
|
+
], 8, w), u("div", D, [v(r.$slots, "default")])], 40, C));
|
|
65
77
|
}
|
|
66
78
|
});
|
|
67
79
|
//#endregion
|
|
68
|
-
export {
|
|
80
|
+
export { O as default };
|
|
69
81
|
|
|
70
82
|
//# sourceMappingURL=VAccordionItem.vue_vue_type_script_setup_true_lang.js.map
|
package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VAccordionItem.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/VAccordion/VAccordionItem.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, inject } from 'vue'\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { expand_more as expandMoreIcon } from '../VIcon/icons/expand_more'\nimport type { IconSource } from '../VIcon/types'\nimport VTypography from '../VTypography/VTypography.vue'\nimport { accordionKey } from './context'\n\n/**\n * One section of an accordion: a heading the reader can click, and the content it\n * reveals. It is a native `<details>`/`<summary>` pair, so the browser owns the\n * open and closed state, the keyboard and the accessibility semantics, and this\n * component adds no code of its own for any of them.\n *\n * The opening is animated entirely in CSS, with `::details-content` and\n * `interpolate-size`. Both are recent additions to the language: where they are\n * missing the section simply appears at once, which is the intended fallback.\n */\ninterface AccordionItemProps {\n /**\n * The heading of the section, the line that stays visible when it is closed. Use\n * the `#title` slot instead when the heading needs markup rather than plain text.\n */\n title?: string\n /**\n * A secondary line under the title, for a short explanation or a status. The\n * `#subtitle` slot replaces it when markup is needed.\n */\n subtitle?: string\n /**\n * An icon placed before the title: an icon name, or an explicit render\n * (`{ src }`, `{ component }`…).\n */\n iconStart?: IconSource\n /**\n * Renders the section already open. It only sets the state of the first render:\n * the browser owns it afterwards, so changing this prop later will not close a\n * section the reader has opened.\n */\n defaultOpen?: boolean\n /**\n * Makes the section inert. It can no longer be opened, the keyboard skips over\n * it, and it is greyed out through the colour tokens.\n */\n disabled?: boolean\n}\n\nconst props = withDefaults(defineProps<AccordionItemProps>(), {\n title: undefined,\n subtitle: undefined,\n iconStart: undefined,\n defaultOpen: false,\n disabled: false,\n})\n\ndefineSlots<{\n /** The content revealed when the section is open. */\n default(): unknown\n /** A title made of markup, which replaces the `title` prop. */\n title?(): unknown\n /** A subtitle made of markup, which replaces the `subtitle` prop. */\n subtitle?(): unknown\n /** Free content before the title, which takes the place of `iconStart`. */\n start?(): unknown\n}>()\n\nconst accordion = inject(accordionKey, null)\n\n/**\n * Both icons are chosen on the enclosing group. The chevron fallback is what keeps\n * an item rendering correctly when it is used outside a VAccordion.\n */\nconst expandIcon = computed(() => accordion?.expandIcon ?? expandMoreIcon)\nconst collapseIcon = computed(() => accordion?.collapseIcon)\n\n// @a11y @core\n/*\n * The component's only behavioural JS. A <summary> has no native `disabled`\n * attribute, so there is no other way to stop a click from toggling the\n * <details>. The keyboard needs no handler of its own: `tabindex=\"-1\"` already\n * takes the summary out of the tab order.\n */\nfunction onSummaryClick(event: MouseEvent) {\n if (props.disabled) event.preventDefault()\n}\n</script>\n\n<template>\n <details\n class=\"v-accordion-item\"\n :name=\"accordion?.name\"\n :open=\"defaultOpen || undefined\"\n :data-swap=\"collapseIcon ? '' : undefined\"\n :data-disabled=\"disabled ? '' : undefined\"\n >\n <summary\n class=\"v-accordion-summary\"\n :aria-disabled=\"disabled || undefined\"\n :tabindex=\"disabled ? -1 : undefined\"\n @click=\"onSummaryClick\"\n >\n <slot name=\"start\">\n <VIcon v-if=\"iconStart\" class=\"v-accordion-icon-start\" v-bind=\"iconProps(iconStart)\" />\n </slot>\n <span class=\"v-accordion-heading\">\n <span class=\"v-accordion-title\"\n ><slot name=\"title\">{{ title }}</slot></span\n >\n <VTypography\n v-if=\"subtitle || $slots.subtitle\"\n as=\"span\"\n variant=\"caption\"\n tone=\"muted\"\n class=\"v-accordion-subtitle\"\n ><slot name=\"subtitle\">{{ subtitle }}</slot></VTypography\n >\n </span>\n <VIcon class=\"v-accordion-icon\" v-bind=\"iconProps(expandIcon)\" />\n <!-- Both icons are always in the DOM; [open] decides which one shows, in CSS alone -->\n <VIcon\n v-if=\"collapseIcon\"\n class=\"v-accordion-icon v-accordion-icon-open\"\n v-bind=\"iconProps(collapseIcon)\"\n />\n </summary>\n <div class=\"v-accordion-content\">\n <slot />\n </div>\n </details>\n</template>\n\n<style>\n@layer vectis.components {\n .v-accordion-item {\n interpolate-size: allow-keywords;\n }\n\n .v-accordion-item + .v-accordion-item {\n border-block-start: 1px solid var(--vectis-color-border);\n }\n\n .v-accordion-summary {\n --vectis-icon-size: var(--vectis-icon-size-md);\n --vectis-icon-opsz: 20;\n\n display: flex;\n align-items: center;\n gap: var(--vectis-space-3);\n padding: var(--accordion-pad-block, var(--vectis-space-4))\n var(--accordion-pad-inline, var(--vectis-space-5));\n list-style: none;\n cursor: pointer;\n font-size: var(--vectis-text-label-size);\n font-weight: var(--vectis-text-label-weight);\n color: var(--vectis-color-text);\n }\n\n .v-accordion-summary::-webkit-details-marker {\n display: none;\n }\n\n .v-accordion-item:not([data-disabled]) > .v-accordion-summary:hover {\n background: var(--vectis-color-surface-muted);\n }\n\n .v-accordion-summary:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: calc(var(--vectis-focus-ring-offset) * -1);\n }\n\n .v-accordion-item:first-child > .v-accordion-summary {\n border-start-start-radius: var(--accordion-corner-radius, 0);\n border-start-end-radius: var(--accordion-corner-radius, 0);\n }\n\n .v-accordion-item:last-child:not([open]) > .v-accordion-summary {\n border-end-start-radius: var(--accordion-corner-radius, 0);\n border-end-end-radius: var(--accordion-corner-radius, 0);\n }\n\n .v-accordion-heading {\n flex: 1;\n display: flex;\n flex-direction: column;\n line-height: var(--vectis-text-label-leading);\n }\n\n .v-accordion-icon-start {\n flex: none;\n color: var(--vectis-color-text-muted);\n }\n\n .v-accordion-icon {\n flex: none;\n color: var(--vectis-color-text-muted);\n transition: rotate var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n .v-accordion-item[open]:not([data-swap]) > .v-accordion-summary .v-accordion-icon {\n rotate: 180deg;\n }\n\n /* data-swap marks an item whose group provided a collapseIcon: rather than\n rotating a single chevron, each state hides one of the two rendered icons. */\n .v-accordion-item[data-swap][open]\n > .v-accordion-summary\n .v-accordion-icon:not(.v-accordion-icon-open),\n .v-accordion-item[data-swap]:not([open]) > .v-accordion-summary .v-accordion-icon-open {\n display: none;\n }\n\n /* A disabled item greys out through the colour tokens and never through\n `opacity`, the rule every control in the DS follows. */\n .v-accordion-item[data-disabled] > .v-accordion-summary {\n color: var(--vectis-color-text-subtle);\n cursor: not-allowed;\n }\n\n /* The icons and the subtitle default to text-muted, which is DARKER than the\n text-subtle a disabled title takes: left to themselves they would come out\n stronger than the label they belong to, so they inherit it instead. */\n .v-accordion-item[data-disabled] .v-accordion-icon,\n .v-accordion-item[data-disabled] .v-accordion-icon-start,\n .v-accordion-item[data-disabled] .v-accordion-subtitle {\n color: inherit;\n }\n\n /* The opening animates in pure CSS: ::details-content targets the box the\n browser wraps the content in, and the `interpolate-size` declared on the item\n is what makes a transition towards `auto` possible at all. A browser missing\n either simply opens the section instantly. */\n .v-accordion-item::details-content {\n block-size: 0;\n overflow: clip;\n transition:\n block-size var(--vectis-duration-base) var(--vectis-ease-default),\n content-visibility var(--vectis-duration-base) allow-discrete;\n }\n\n .v-accordion-item[open]::details-content {\n block-size: auto;\n }\n\n .v-accordion-content {\n padding: var(--accordion-content-pad-start, var(--vectis-space-2))\n var(--accordion-pad-inline, var(--vectis-space-5))\n var(--accordion-pad-block, var(--vectis-space-4));\n font-size: var(--vectis-text-body-md-size);\n line-height: var(--vectis-text-body-md-leading);\n color: var(--vectis-color-text-muted);\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-accordion-icon {\n transition: none;\n }\n\n .v-accordion-item::details-content {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiDA,IAAM,IAAQ,GAmBR,IAAY,EAAO,GAAc,IAAI,GAMrC,IAAa,QAAe,GAAW,cAAc,CAAc,GACnE,IAAe,QAAe,GAAW,YAAY;EAS3D,SAAS,EAAe,GAAmB;GACzC,AAAI,EAAM,YAAU,EAAM,eAAe;EAC3C;yBAIE,EAwCU,WAAA;GAvCR,OAAM;GACL,MAAM,EAAA,CAAA,CAAS,EAAE;GACjB,MAAM,EAAA,eAAe,KAAA;GACrB,aAAW,EAAA,QAAY,KAAQ,KAAA;GAC/B,iBAAe,EAAA,WAAQ,KAAQ,KAAA;MAEhC,EA6BU,WAAA;GA5BR,OAAM;GACL,iBAAe,EAAA,YAAY,KAAA;GAC3B,UAAU,EAAA,WAAQ,KAAQ,KAAA;GAC1B,SAAO;;GAER,EAEO,EAAA,QAAA,SAAA,CAAA,SAAA,CADQ,EAAA,aAAA,EAAA,GAAb,EAAuF,GAAvF,EAAuF;;IAA/D,OAAM;MAAiC,EAAA,CAAA,CAAS,CAAC,EAAA,SAAS,CAAA,GAAA,MAAA,EAAA,KAAA,EAAA,IAAA,EAAA,CAAA,CAAA;GAEpF,EAYO,QAZP,GAYO,CAXL,EAEC,QAFD,GAEC,CADE,EAAqC,EAAA,QAAA,SAAA,CAAA,SAAA,CAAA,EAAA,EAAf,EAAA,KAAK,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAGtB,EAAA,YAAYA,EAAAA,OAAO,YAAA,EAAA,GAD3B,EAOC,GAAA;;IALC,IAAG;IACH,SAAQ;IACR,MAAK;IACL,OAAM;;qBACsC,CAA3C,EAA2C,EAAA,QAAA,YAAA,CAAA,SAAA,CAAA,EAAA,EAAlB,EAAA,QAAQ,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;GAGtC,EAAiE,GAAjE,EAAiE,EAA1D,OAAM,mBAAkB,GAAS,EAAA,CAAA,CAAS,CAAC,EAAA,KAAU,CAAA,GAAA,MAAA,EAAA;GAGpD,EAAA,SAAA,EAAA,GADR,EAIE,GAJF,EAIE;;IAFA,OAAM;MACE,EAAA,CAAA,CAAS,CAAC,EAAA,KAAY,CAAA,GAAA,MAAA,EAAA,KAAA,EAAA,IAAA,EAAA;YAGlC,EAEM,OAFN,GAEM,CADJ,EAAQ,EAAA,QAAA,SAAA,CAAA,CAAA,CAAA,GAAA,GAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"VAccordionItem.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/VAccordion/VAccordionItem.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * One section of an accordion: a heading the reader can click, and the content it\n * reveals. It is a native `<details>`/`<summary>` pair, so the browser owns the\n * open and closed state, the keyboard and the accessibility semantics. The only JS\n * is the `v-model:open` bridge, fed by the element, and the click a disabled summary\n * has to cancel, both shared with VSideNavigationItem through `useDetailsOpen`.\n *\n * The opening is animated entirely in CSS, with `::details-content` and\n * `interpolate-size` (`styles/disclosure.css`). Both are recent additions to the\n * language: where they are missing the section simply appears at once, which is the\n * intended fallback.\n */\n\nimport { computed, inject } from 'vue'\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { expand_more as expandMoreIcon } from '../VIcon/icons/expand_more'\nimport type { IconSource } from '../VIcon/types'\nimport VTypography from '../VTypography/VTypography.vue'\nimport { accordionKey } from './context'\n\nimport { useDetailsOpen } from '../../composables/useDetailsOpen'\n\ninterface AccordionItemProps {\n /**\n * The heading of the section, the line that stays visible when it is closed. Use\n * the `#title` slot instead when the heading needs markup rather than plain text.\n */\n title?: string\n /**\n * A secondary line under the title, for a short explanation or a status. The\n * `#subtitle` slot replaces it when markup is needed.\n */\n subtitle?: string\n /**\n * An icon placed before the title: an icon name, or an explicit render\n * (`{ src }`, `{ component }`…). The `#icon` slot replaces it.\n *\n * It carries no side in its name because there is only one: the end of the row belongs\n * to the chevron, so there is nothing for a start to be told apart from. That is the\n * rule every single-icon component of the design system follows, and its slot is named\n * `#icon` for the same reason.\n */\n icon?: IconSource\n /**\n * Renders the section already open. Only its initial value is read: the browser\n * owns the state afterwards, so changing this prop later will not close a section\n * the reader has opened. Bind `v-model:open` to drive it instead.\n */\n defaultOpen?: boolean\n /**\n * Makes the section inert. It can no longer be opened, the keyboard skips over\n * it, and it is greyed out through the colour tokens.\n */\n disabled?: boolean\n}\n\nconst props = withDefaults(defineProps<AccordionItemProps>(), {\n title: undefined,\n subtitle: undefined,\n icon: undefined,\n defaultOpen: false,\n disabled: false,\n})\n\n/**\n * Whether the section is open, when the consumer wants to drive or observe it. Left\n * unbound, the browser keeps that state to itself, `defaultOpen` giving only the initial\n * value.\n *\n * TRAP — \"not bound\" is written as `null` and not `undefined`. A model typed as a plain\n * boolean is declared as such at runtime, and Vue casts an ABSENT boolean prop to\n * `false`, which would silently overwrite `defaultOpen`. The explicit default disarms\n * that cast.\n */\nconst open = defineModel<boolean | null>('open', { default: null })\n\ndefineSlots<{\n /** The content revealed when the section is open. */\n default(): unknown\n /** A title made of markup, which replaces the `title` prop. */\n title?(): unknown\n /** A subtitle made of markup, which replaces the `subtitle` prop. */\n subtitle?(): unknown\n /** Free content before the title, which takes the place of `icon`. */\n icon?(): unknown\n}>()\n\nconst accordion = inject(accordionKey, null)\n\n/**\n * Both icons are chosen on the enclosing group. The chevron fallback is what keeps\n * an item rendering correctly when it is used outside a VAccordion.\n */\nconst expandIcon = computed(() => accordion?.expandIcon ?? expandMoreIcon)\nconst collapseIcon = computed(() => accordion?.collapseIcon)\n\nconst { openAttr, onToggle, onSummaryClick } = useDetailsOpen(open, {\n defaultOpen: () => props.defaultOpen,\n disabled: () => props.disabled,\n})\n</script>\n\n<template>\n <details\n class=\"v-accordion-item v-disclosure\"\n :name=\"accordion?.name\"\n :open=\"openAttr\"\n :data-swap=\"collapseIcon ? '' : undefined\"\n @toggle=\"onToggle\"\n >\n <summary\n class=\"v-accordion-summary\"\n :data-disabled=\"disabled ? '' : undefined\"\n :aria-disabled=\"disabled || undefined\"\n :tabindex=\"disabled ? -1 : undefined\"\n @click=\"onSummaryClick\"\n >\n <slot name=\"icon\">\n <VIcon v-if=\"icon\" class=\"v-accordion-icon\" v-bind=\"iconProps(icon)\" />\n </slot>\n <span class=\"v-accordion-heading\">\n <span class=\"v-accordion-title\"\n ><slot name=\"title\">{{ title }}</slot></span\n >\n <VTypography\n v-if=\"subtitle !== undefined || $slots.subtitle\"\n as=\"span\"\n variant=\"caption\"\n tone=\"muted\"\n class=\"v-accordion-subtitle\"\n ><slot name=\"subtitle\">{{ subtitle }}</slot></VTypography\n >\n </span>\n <VIcon class=\"v-accordion-chevron v-disclosure-chevron\" v-bind=\"iconProps(expandIcon)\" />\n <!-- Both icons are always in the DOM; [open] decides which one shows, in CSS alone -->\n <VIcon\n v-if=\"collapseIcon\"\n class=\"v-accordion-chevron v-accordion-chevron-open v-disclosure-chevron v-disclosure-chevron-open\"\n v-bind=\"iconProps(collapseIcon)\"\n />\n </summary>\n <div class=\"v-accordion-content\">\n <slot />\n </div>\n </details>\n</template>\n\n<style>\n@layer vectis.components {\n .v-accordion-item + .v-accordion-item {\n border-block-start: 1px solid var(--vectis-color-border);\n }\n\n .v-accordion-summary {\n --vectis-icon-size: var(--vectis-icon-size-md);\n --vectis-icon-opsz: 20;\n\n display: flex;\n align-items: center;\n gap: var(--vectis-space-3);\n padding: var(--accordion-pad-block, var(--vectis-space-4))\n var(--accordion-pad-inline, var(--vectis-space-5));\n cursor: pointer;\n font-size: var(--vectis-text-label-size);\n font-weight: var(--vectis-text-label-weight);\n color: var(--vectis-color-text);\n }\n\n .v-accordion-summary:hover:not([data-disabled]) {\n background: var(--vectis-color-surface-muted);\n }\n\n .v-accordion-summary:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: calc(-1 * var(--vectis-focus-ring-width));\n }\n\n .v-accordion-item:first-child > .v-accordion-summary {\n border-start-start-radius: var(--accordion-corner-radius, 0);\n border-start-end-radius: var(--accordion-corner-radius, 0);\n }\n\n .v-accordion-item:last-child:not([open]) > .v-accordion-summary {\n border-end-start-radius: var(--accordion-corner-radius, 0);\n border-end-end-radius: var(--accordion-corner-radius, 0);\n }\n\n .v-accordion-heading {\n flex: 1;\n display: flex;\n flex-direction: column;\n line-height: var(--vectis-text-label-leading);\n }\n\n .v-accordion-icon {\n flex: none;\n color: var(--vectis-color-text-muted);\n }\n\n /* A disabled item greys out through the colour tokens and never through\n `opacity`, the rule every control in the DS follows. */\n .v-accordion-summary[data-disabled] {\n color: var(--vectis-color-text-subtle);\n cursor: not-allowed;\n }\n\n /* The icon and the subtitle default to text-muted, which is DARKER than the\n text-subtle a disabled title takes: left to themselves they would come out\n stronger than the label they belong to, so they inherit it instead. The chevron\n gets the same treatment from `styles/disclosure.css`. */\n .v-accordion-summary[data-disabled] .v-accordion-icon,\n .v-accordion-summary[data-disabled] .v-accordion-subtitle {\n color: inherit;\n }\n\n .v-accordion-content {\n padding: var(--accordion-content-pad-start, var(--vectis-space-2))\n var(--accordion-pad-inline, var(--vectis-space-5))\n var(--accordion-pad-block, var(--vectis-space-4));\n font-size: var(--vectis-text-body-md-size);\n line-height: var(--vectis-text-body-md-leading);\n color: var(--vectis-color-text-muted);\n }\n\n /* The disclosure animation, the chevron's rotation or swap and the WebKit marker come\n from `styles/disclosure.css`, reduced-motion block included. */\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2DA,IAAM,IAAQ,GAkBR,IAAO,EAA2B,GAAC,MAAyB,GAa5D,IAAY,EAAO,GAAc,IAAI,GAMrC,IAAa,QAAe,GAAW,cAAc,CAAc,GACnE,IAAe,QAAe,GAAW,YAAY,GAErD,EAAE,aAAU,aAAU,sBAAmB,EAAe,GAAM;GAClE,mBAAmB,EAAM;GACzB,gBAAgB,EAAM;EACxB,CAAC;yBAIC,EAyCU,WAAA;GAxCR,OAAM;GACL,MAAM,EAAA,CAAA,CAAS,EAAE;GACjB,MAAM,EAAA,CAAA;GACN,aAAW,EAAA,QAAY,KAAQ,KAAA;GAC/B,UAAM,AAAA,EAAA,QAAA,GAAA,MAAE,EAAA,CAAA,KAAA,EAAA,CAAA,CAAA,CAAA,GAAA,CAAA;MAET,EA8BU,WAAA;GA7BR,OAAM;GACL,iBAAe,EAAA,WAAQ,KAAQ,KAAA;GAC/B,iBAAe,EAAA,YAAY,KAAA;GAC3B,UAAU,EAAA,WAAQ,KAAQ,KAAA;GAC1B,SAAK,AAAA,EAAA,QAAA,GAAA,MAAE,EAAA,CAAA,KAAA,EAAA,CAAA,CAAA,CAAA,GAAA,CAAA;;GAER,EAEO,EAAA,QAAA,QAAA,CAAA,SAAA,CADQ,EAAA,QAAA,EAAA,GAAb,EAAuE,GAAvE,EAAuE;;IAApD,OAAM;MAA2B,EAAA,CAAA,CAAS,CAAC,EAAA,IAAI,CAAA,GAAA,MAAA,EAAA,KAAA,EAAA,IAAA,EAAA,CAAA,CAAA;GAEpE,EAYO,QAZP,GAYO,CAXL,EAEC,QAFD,GAEC,CADE,EAAqC,EAAA,QAAA,SAAA,CAAA,SAAA,CAAA,EAAA,EAAf,EAAA,KAAK,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAGtB,EAAA,aAAa,KAAA,KAAaA,EAAAA,OAAO,YAAA,EAAA,GADzC,EAOC,GAAA;;IALC,IAAG;IACH,SAAQ;IACR,MAAK;IACL,OAAM;;qBACsC,CAA3C,EAA2C,EAAA,QAAA,YAAA,CAAA,SAAA,CAAA,EAAA,EAAlB,EAAA,QAAQ,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;GAGtC,EAAyF,GAAzF,EAAyF,EAAlF,OAAM,2CAA0C,GAAS,EAAA,CAAA,CAAS,CAAC,EAAA,KAAU,CAAA,GAAA,MAAA,EAAA;GAG5E,EAAA,SAAA,EAAA,GADR,EAIE,GAJF,EAIE;;IAFA,OAAM;MACE,EAAA,CAAA,CAAS,CAAC,EAAA,KAAY,CAAA,GAAA,MAAA,EAAA,KAAA,EAAA,IAAA,EAAA;YAGlC,EAEM,OAFN,GAEM,CADJ,EAAQ,EAAA,QAAA,SAAA,CAAA,CAAA,CAAA,GAAA,IAAA,CAAA"}
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import { InjectionKey } from 'vue';
|
|
2
2
|
import { IconSource } from '../VIcon/types.js';
|
|
3
|
-
/**
|
|
4
|
-
* The parent→items contract: the shared name set on each <details> activates NATIVE
|
|
5
|
-
* exclusive mode (the `name` attribute, Baseline 2024) — a single item open, with no
|
|
6
|
-
* JS at all. The icons are set on the group (homogeneous density and iconography);
|
|
7
|
-
* `compact` does NOT travel here, it descends through CSS inheritance (the
|
|
8
|
-
* --accordion-* variables set on the root).
|
|
9
|
-
*/
|
|
10
3
|
export interface AccordionContext {
|
|
11
|
-
/** Group name for <details name>; undefined =
|
|
4
|
+
/** Group name for <details name>; undefined = several items may stay open at once. */
|
|
12
5
|
name: string | undefined;
|
|
13
6
|
/** Icon in the closed state: an icon name, or an explicit render. */
|
|
14
7
|
expandIcon: IconSource;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","names":[],"sources":["../../../src/components/VAccordion/context.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"context.js","names":[],"sources":["../../../src/components/VAccordion/context.ts"],"sourcesContent":["/**\n * The parent→items contract: the shared name set on each <details> is what makes the\n * BROWSER close the previous item (the `name` attribute, Baseline 2024) — a single item\n * open, with no JS at all. The icons are set on the group (homogeneous density and iconography);\n * `compact` does NOT travel here, it descends through CSS inheritance (the\n * --accordion-* variables set on the root).\n */\n\nimport type { InjectionKey } from 'vue'\n\nimport type { IconSource } from '../VIcon/types'\n\nexport interface AccordionContext {\n /** Group name for <details name>; undefined = several items may stay open at once. */\n name: string | undefined\n /** Icon in the closed state: an icon name, or an explicit render. */\n expandIcon: IconSource\n /** Icon in the open state; undefined = a rotation of `expandIcon`. */\n collapseIcon: IconSource | undefined\n}\n\nexport const accordionKey: InjectionKey<AccordionContext> = Symbol('v-accordion')\n"],"mappings":";AAqBA,IAAa,IAA+C,OAAO,aAAa"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
|
|
2
|
-
@layer vectis.components{.v-avatar{--avatar-bg:var(--vectis-color-surface-muted);--avatar-text:var(--vectis-color-text-muted);inline-size:var(--control-height);block-size:var(--control-height);background:var(--avatar-bg);color:var(--avatar-text);border-radius:var(--vectis-radius-
|
|
2
|
+
@layer vectis.components{.v-avatar{--avatar-bg:var(--vectis-color-surface-muted);--avatar-text:var(--vectis-color-text-muted);inline-size:var(--control-height);block-size:var(--control-height);background:var(--avatar-bg);color:var(--avatar-text);border-radius:var(--vectis-radius-pill);font-family:var(--vectis-text-family);font-size:var(--control-font-size);font-weight:var(--vectis-font-weight-semibold);line-height:var(--vectis-text-control-leading);-webkit-user-select:none;user-select:none;box-shadow:0 0 0 var(--vectis-control-size-avatar-ring) var(--avatar-ring-color,transparent);transition:background-color var(--vectis-duration-fast) var(--vectis-ease-default), box-shadow var(--vectis-duration-fast) var(--vectis-ease-default);border:none;flex:none;justify-content:center;align-items:center;padding:0;text-decoration:none;display:inline-flex;overflow:hidden}:root,[data-theme=light]{--avatar-auto-bg-lc:.9 .06;--avatar-auto-text-lc:.42 .13}[data-theme=dark]{--avatar-auto-bg-lc:.42 .09;--avatar-auto-text-lc:.92 .05}.v-avatar[data-auto]{--avatar-bg:oklch(var(--avatar-auto-bg-lc) var(--avatar-hue));--avatar-text:oklch(var(--avatar-auto-text-lc) var(--avatar-hue))}.v-avatar[data-custom]{--avatar-bg:var(--custom-color);--avatar-text:var(--vectis-color-text-on-accent)}.v-avatar-image{object-fit:cover;block-size:100%;inline-size:100%}.v-avatar-icon{--vectis-icon-size:calc(var(--control-height) * .55)}:is(a,button).v-avatar{cursor:pointer}:is(a,button).v-avatar:hover:not([aria-disabled=true],:disabled){background:color-mix(in oklab, var(--avatar-bg), var(--vectis-color-text) 10%)}:is(a,button).v-avatar:focus-visible{outline:var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);outline-offset:var(--vectis-focus-ring-offset)}.v-avatar:is(:disabled,[aria-disabled=true]){cursor:not-allowed;background:var(--vectis-color-surface-muted);color:var(--vectis-color-text-subtle)}@media (prefers-reduced-motion:reduce){.v-avatar{transition:none}}}
|