vectis-ui 0.1.1-rc.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -303
- 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
|
@@ -1,48 +1,79 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://vectis-ui.com">
|
|
3
|
+
<img src="https://vectis-ui.com/favicon.svg" alt="Vectis UI logo" width="96" />
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
<h1 align="center">Vectis UI</h1>
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
<p align="center">
|
|
10
|
+
A Vue 3 component library built for modern browsers.
|
|
11
|
+
</p>
|
|
6
12
|
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="https://www.npmjs.com/package/vectis-ui"><img src="https://img.shields.io/npm/v/vectis-ui" alt="npm version" /></a>
|
|
15
|
+
<a href="https://github.com/Jypyx/vectis-ui/actions/workflows/ci.yml"><img src="https://github.com/Jypyx/vectis-ui/actions/workflows/ci.yml/badge.svg" alt="CI status" /></a>
|
|
16
|
+
<a href="https://github.com/Jypyx/vectis-ui/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/vectis-ui" alt="MIT license" /></a>
|
|
17
|
+
</p>
|
|
11
18
|
|
|
12
|
-
|
|
19
|
+
<p align="center">
|
|
20
|
+
<a href="https://vectis-ui.com">Documentation</a> ·
|
|
21
|
+
<a href="https://vectis-ui.com/docs/installation/">Installation</a> ·
|
|
22
|
+
<a href="https://github.com/Jypyx/vectis-ui/blob/main/CHANGELOG.md">Changelog</a> ·
|
|
23
|
+
<a href="https://github.com/Jypyx/vectis-ui">GitHub</a>
|
|
24
|
+
</p>
|
|
25
|
+
|
|
26
|
+
## Introduction
|
|
27
|
+
|
|
28
|
+
Vectis UI is a set of Vue 3 components written in TypeScript.
|
|
29
|
+
The whole look is driven by CSS custom properties (`--vectis-*`), so you can retheme the library, or a single part of a page, without rebuilding anything. Styles live in cascade layers, which means your own CSS wins without fighting over specificity.
|
|
30
|
+
|
|
31
|
+
A few things you get out of the box:
|
|
32
|
+
|
|
33
|
+
- **No runtime dependency** other than Vue itself.
|
|
34
|
+
- **Pay for what you import.** Each component ships as its own module with its own stylesheet.
|
|
35
|
+
- **SSR-safe**, so it works with Nuxt 3 and 4 without a module or a plugin.
|
|
36
|
+
- **Accessible by default.** Keyboard support and ARIA semantics on every component, with axe checks run in CI against both the light and the dark theme.
|
|
37
|
+
- **Light and dark themes**, switchable on any DOM subtree with a `data-theme` attribute.
|
|
38
|
+
- **English and French** built in, and any other language can be added from your app.
|
|
39
|
+
- **No icon font required.** The icons the library draws are embedded SVGs, and you can plug in your own icon set.
|
|
40
|
+
|
|
41
|
+
## Quick start
|
|
42
|
+
|
|
43
|
+
Install the package:
|
|
13
44
|
|
|
14
45
|
```bash
|
|
15
|
-
|
|
46
|
+
npm install vectis-ui
|
|
47
|
+
# or
|
|
48
|
+
pnpm add vectis-ui
|
|
49
|
+
# or
|
|
50
|
+
yarn add vectis-ui
|
|
16
51
|
```
|
|
17
52
|
|
|
53
|
+
Import the global stylesheet once, in your app's entry point:
|
|
54
|
+
|
|
18
55
|
```ts
|
|
19
56
|
// main.ts
|
|
20
57
|
import 'vectis-ui/styles.css'
|
|
21
58
|
```
|
|
22
59
|
|
|
23
|
-
|
|
24
|
-
|
|
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.
|
|
60
|
+
Then import the components you need:
|
|
26
61
|
|
|
27
62
|
```vue
|
|
28
63
|
<script setup lang="ts">
|
|
29
64
|
import { ref } from 'vue'
|
|
30
|
-
import { VButton, VInput
|
|
65
|
+
import { VButton, VInput } from 'vectis-ui'
|
|
31
66
|
|
|
32
67
|
const email = ref('')
|
|
33
68
|
</script>
|
|
34
69
|
|
|
35
70
|
<template>
|
|
36
|
-
<VInput v-model="email" type="email"
|
|
37
|
-
<VButton
|
|
38
|
-
Subscribe
|
|
39
|
-
</VButton>
|
|
71
|
+
<VInput v-model="email" type="email" label="Email" />
|
|
72
|
+
<VButton>Subscribe</VButton>
|
|
40
73
|
</template>
|
|
41
74
|
```
|
|
42
75
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
The library is pre-built as ESM and SSR-safe (no `window`/`document` access outside the client lifecycle). No module and no plugin needed:
|
|
76
|
+
Using Nuxt? Declare the stylesheet in `nuxt.config.ts` instead, so it's injected during server rendering:
|
|
46
77
|
|
|
47
78
|
```ts
|
|
48
79
|
// nuxt.config.ts
|
|
@@ -51,304 +82,41 @@ export default defineNuxtConfig({
|
|
|
51
82
|
})
|
|
52
83
|
```
|
|
53
84
|
|
|
54
|
-
|
|
55
|
-
<script setup lang="ts">
|
|
56
|
-
import { VButton, VBadge } from 'vectis-ui'
|
|
57
|
-
</script>
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Named imports are tree-shaken by Vite/Nitro. No `build.transpile` required.
|
|
61
|
-
|
|
62
|
-
Component CSS travels with the component as a plain static `import`, which Vite, Nitro and webpack all turn into a render-blocking `<link>` — including for a lazily loaded route, whose stylesheet is awaited before the chunk runs. The one setup that would flash is a hand-rolled SSR server that injects its client CSS **through JavaScript** (`vite-plugin-css-injected-by-js`, webpack's `style-loader`): there, the first paint carries the core (tokens, layout, hidden popovers) but not the components' internal rules. Keep the client CSS extracted to a file and the question does not arise.
|
|
63
|
-
|
|
64
|
-
For the locale and the icons, put the configuration in a **universal** plugin — `plugins/vectis.ts`, never `plugins/vectis.client.ts`: a client-only configuration would make the server and client renders diverge, hence a hydration mismatch. See [Internationalization](#internationalization).
|
|
65
|
-
|
|
66
|
-
## Theming
|
|
67
|
-
|
|
68
|
-
### Token architecture
|
|
69
|
-
|
|
70
|
-
Two levels of custom properties, generated from a typed TypeScript source (a format inspired by the [W3C DTCG](https://design-tokens.github.io/community-group/format/)):
|
|
71
|
-
|
|
72
|
-
- **Primitives**: OKLCH palettes (`--vectis-color-indigo-500`), spacing scales (`--vectis-space-4`), type, radii, shadows, durations/easings.
|
|
73
|
-
- **Semantics** — the only ones components consume: `--vectis-color-surface`, `--vectis-color-text-muted`, `--vectis-color-accent`, `--vectis-radius-interactive`, `--vectis-focus-ring-color`…
|
|
74
|
-
|
|
75
|
-
### Dark mode
|
|
76
|
-
|
|
77
|
-
```html
|
|
78
|
-
<html data-theme="dark"></html>
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
`data-theme` works on **any DOM subtree** (a dark panel inside a light page, or the reverse) and also drives `color-scheme` (scrollbars, native controls).
|
|
82
|
-
|
|
83
|
-
### Runtime overrides — no rebuild
|
|
84
|
-
|
|
85
|
-
Every customization is a redefinition of custom properties, in CSS:
|
|
86
|
-
|
|
87
|
-
```css
|
|
88
|
-
/* a "coral" theme: accent + pill radii */
|
|
89
|
-
:root {
|
|
90
|
-
--vectis-color-accent: oklch(58% 0.2 25);
|
|
91
|
-
--vectis-color-accent-hover: oklch(51% 0.19 25);
|
|
92
|
-
--vectis-radius-interactive: 9999px;
|
|
93
|
-
}
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
…or in JavaScript, on a subtree included:
|
|
97
|
-
|
|
98
|
-
```ts
|
|
99
|
-
panel.style.setProperty('--vectis-color-accent', 'oklch(58% 0.2 25)')
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
The design system's CSS lives in layers (`vectis.reset < vectis.tokens < vectis.components < vectis.utilities`): **any non-layered consumer style wins automatically** — overriding a component never calls for a specificity war. Every sheet the library emits re-declares that order, so it holds whichever one your bundler happens to place first.
|
|
103
|
-
|
|
104
|
-
### Programmatic access to the tokens
|
|
105
|
-
|
|
106
|
-
```ts
|
|
107
|
-
import { tokens, flattenTokens } from 'vectis-ui/tokens'
|
|
108
|
-
|
|
109
|
-
// [{ path: ['color', 'surface'], cssName: '--vectis-color-surface', token: {...} }, …]
|
|
110
|
-
const semanticColors = flattenTokens(tokens.semantic.color, ['color'])
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
`vectis-ui/tokens.json` exposes the same source as raw JSON (tooling, configuration export). It is the foundation of the theming app to come: modify the object, inject the variables, export the config.
|
|
114
|
-
|
|
115
|
-
## Icons
|
|
116
|
-
|
|
117
|
-
**No icon font is required.** The icons the library renders itself — `VDialog`'s cross, `VDatePicker`'s and `VMenu`'s chevrons, the toasts' tone icons, `VDataTable`'s sorting… — are **embedded SVGs**, exact replicas of Material Symbols Rounded (wght 400 · GRAD 0 · opsz 24, Apache-2.0 © Google). There are 34 of them and **each is a module of its own**, imported by the components that draw it: you pay for the icons your components actually render and for nothing else. A lone `VButton` ships none at all, which is most of why its JavaScript comes to 4.62 kB gzip with `VIcon`, `VSpinner` and the dictionary pulled in alongside it.
|
|
118
|
-
|
|
119
|
-
Reach for one directly through the `vectis-ui/icons` subpath, and pass it where a name would go:
|
|
120
|
-
|
|
121
|
-
```ts
|
|
122
|
-
import { close, search } from 'vectis-ui/icons'
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
The `VIcon` component resolves its source in this order: **an explicit `render` → `src` → `name` (the consumer resolver first, then the drawing the icon brought along, then the ligature) → the slot**.
|
|
126
|
-
|
|
127
|
-
```vue
|
|
128
|
-
<VIcon :name="close" />
|
|
129
|
-
<!-- one of the DS's own icons: SVG, no font needed -->
|
|
130
|
-
<VIcon name="favorite" />
|
|
131
|
-
<!-- a bare NAME: your resolver, then a ligature from YOUR icon font -->
|
|
132
|
-
<VIcon src="/logo.svg" label="Logo" />
|
|
133
|
-
<!-- an image -->
|
|
134
|
-
<VIcon><svg …/></VIcon>
|
|
135
|
-
<!-- an inline SVG (the slot) -->
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
A **bare string is always a NAME**, and it no longer reaches the library's own drawings: an icon is in your bundle because a module imported it, never because a string might one day ask for it.
|
|
139
|
-
|
|
140
|
-
- **Decorative by default** (`aria-hidden`); the `label` prop makes it informative (`role="img"` + `aria-label`).
|
|
141
|
-
- The **`data-icon`** attribute carries the requested name whatever the source — a stable hook for consumer CSS and for tests.
|
|
142
|
-
- Size: **1em by default** — the icon follows the surrounding text. Override freely in pixels through `:size="32"`. With no prop, any parent can drive the context by setting the **`--vectis-icon-size`** and **`--vectis-icon-opsz`** custom properties (which is what the shared `v-control` class does — VButton, VInput, VTextarea, VInputOTP, VChip… — according to the control's size); the numeric prop wins over the context. `VSpinner` follows the same principle (1em + `:size` in px), with no context API.
|
|
143
|
-
- **`--vectis-icon-opsz` only applies to the ligature**: it is a font variable axis, with no hold on a built-in SVG, an image or a third-party component. The size, by contrast, applies to every source.
|
|
144
|
-
|
|
145
|
-
### Every icon prop takes a name **or** an explicit rendering
|
|
146
|
-
|
|
147
|
-
```vue
|
|
148
|
-
<VButton icon-start="download">Export</VButton>
|
|
149
|
-
<VButton :icon-start="cloud_upload">Upload</VButton>
|
|
150
|
-
<VBreadcrumb :separator="{ src: '/chevron.svg' }" :items="items" />
|
|
151
|
-
<VMenuItem label="Open" :icon-start="{ component: FolderIcon }" />
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
A string is **always** an icon name; one of the design system's own icons is imported from `vectis-ui/icons`; an image or a component is declared as an object (`{ src }`, `{ component }`, `{ path }`, `{ text }`, `{ class }`). That is what lets Iconify-style naming conventions (`mdi:close`, `fa6-solid:xmark`) work.
|
|
155
|
-
|
|
156
|
-
### Wiring your own icon library
|
|
85
|
+
The [installation guide](https://vectis-ui.com/docs/installation/) covers both setups in more detail.
|
|
157
86
|
|
|
158
|
-
|
|
87
|
+
## Documentation
|
|
159
88
|
|
|
160
|
-
|
|
89
|
+
Everything lives on **[vectis-ui.com](https://vectis-ui.com)**, a page per component with live examples and API tables, plus guides on [theming](https://vectis-ui.com/docs/theming/), [iconography](https://vectis-ui.com/docs/iconography/), [internationalization](https://vectis-ui.com/docs/i18n/) and [accessibility](https://vectis-ui.com/docs/accessibility/).
|
|
161
90
|
|
|
162
|
-
|
|
163
|
-
// main.ts / plugins/icons.ts — at MODULE level, never inside a setup()
|
|
164
|
-
import { setIconResolver, classIconResolver } from 'vectis-ui'
|
|
165
|
-
|
|
166
|
-
// Font Awesome, Phosphor, Bootstrap Icons… (class-based fonts + ::before)
|
|
167
|
-
// `fa-solid` unconditionally: the Free tier only draws a small fraction of the
|
|
168
|
-
// catalogue in Regular, so mapping `filled: false` onto it would render empty
|
|
169
|
-
// squares. FA's outline/filled pair requires the Pro tier.
|
|
170
|
-
setIconResolver(
|
|
171
|
-
classIconResolver({
|
|
172
|
-
aliases: { close: 'xmark', expand_more: 'angle-down', check_circle: 'circle-check' },
|
|
173
|
-
className: (name) => `fa-solid fa-${name}`,
|
|
174
|
-
}),
|
|
175
|
-
)
|
|
176
|
-
|
|
177
|
-
// Lucide, Untitled UI… (SVG sets as Vue components, a single <svg> root)
|
|
178
|
-
import { componentIconResolver } from 'vectis-ui'
|
|
179
|
-
import { X, Check, ChevronDown } from 'lucide-vue-next'
|
|
180
|
-
setIconResolver(
|
|
181
|
-
componentIconResolver({
|
|
182
|
-
components: { close: X, check: Check, expand_more: ChevronDown },
|
|
183
|
-
props: () => ({ strokeWidth: 1.75 }),
|
|
184
|
-
}),
|
|
185
|
-
)
|
|
186
|
-
|
|
187
|
-
// Material Symbols, ligature-based IcoMoon… — ALSO renders the design system's 20
|
|
188
|
-
// icons through the font, which restores the --vectis-icon-opsz optical axis
|
|
189
|
-
// (20 at xs/sm/md).
|
|
190
|
-
import { ligatureIconResolver } from 'vectis-ui'
|
|
191
|
-
setIconResolver(ligatureIconResolver())
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
`classIconResolver` is **strict** by default: one of the design system's own names absent from your alias table falls back to the embedded SVG rather than producing a nonexistent class (an empty square). Your own names always pass through. It consults a **set of names** to decide, never the drawings, so wiring in your own library downloads none of the Material paths.
|
|
195
|
-
|
|
196
|
-
For a one-off need, `setIconResolver` accepts any function returning one of the five shapes: `{ path }`, `{ component }`, `{ src }`, `{ text }`, `{ class }`.
|
|
197
|
-
|
|
198
|
-
> **SSR** — set the resolver at module level (a Nuxt plugin, `main.ts`), never inside a `setup()`: the state lives in the process, which is correct for configuration and wrong for per-request state. Above all, **do not install it client-only** (`plugins/*.client.ts`): the server would render the built-in SVG and the client your library — a hydration mismatch. Font Awesome in "SVG with JS" mode (which replaces elements in the DOM) is not supported: use its CSS mode.
|
|
199
|
-
|
|
200
|
-
**Loading an icon font stays useful** for your own names. An example with Material Symbols Rounded through Google Fonts:
|
|
201
|
-
|
|
202
|
-
```html
|
|
203
|
-
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
204
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
205
|
-
<link
|
|
206
|
-
rel="stylesheet"
|
|
207
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block"
|
|
208
|
-
/>
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
(or self-host the variable woff2, e.g. the `material-symbols` npm package). `display=block` avoids flashing the icon name in full. With no font loaded, the layout is preserved (the textual name stays inside the icon's box). Overriding the `--vectis-font-family-icon` token is enough to switch to another **ligature-based** font (Material Symbols Outlined/Sharp, an IcoMoon build) — with no resolver.
|
|
212
|
-
|
|
213
|
-
On `VButton`: the `icon-start` / `icon-end` props take an icon name or an explicit rendering (the `#start`/`#end` slots stay available for custom content and win over the props). `VButton` also accepts `href` (rendered as `<a>`; `disabled`/`loading` produce an inert link: `href` removed + `aria-disabled`) and `compact` (height reduced by 4px: 20/28/36/44/52px depending on the `xs`–`xl` size).
|
|
214
|
-
|
|
215
|
-
The `xs`–`xl` scale is not exposed by every component: those embedding a text input (`VInput`, `VTextarea`, `VInputOTP`, `VCombobox`, `VDateInput`, `VTimeInput`) restrict themselves to **`sm` / `md` / `lg`** (32/40/48px, default `md`), `compact` remaining available; `VChip` restricts itself to `xs`/`sm`.
|
|
216
|
-
|
|
217
|
-
## Internationalization
|
|
218
|
-
|
|
219
|
-
No user-facing text is hardcoded in the components: everything comes from a dictionary. The design system is **English by default** and ships French; any other language is added on the consumer side.
|
|
220
|
-
|
|
221
|
-
Two things are settled separately: the **words** come from the dictionary, the **formats** (month and day names, date field order, hour cycle, first day of the week) derive from `Intl` from the locale tag. Setting a locale with no matching dictionary therefore already gives correct dates, with labels left in English.
|
|
222
|
-
|
|
223
|
-
### Switching the design system to French
|
|
224
|
-
|
|
225
|
-
```ts
|
|
226
|
-
// main.ts
|
|
227
|
-
import { fr, registerMessages, setLocale } from 'vectis-ui'
|
|
228
|
-
|
|
229
|
-
registerMessages('fr', fr)
|
|
230
|
-
setLocale('fr-FR')
|
|
231
|
-
```
|
|
91
|
+
## Browser support
|
|
232
92
|
|
|
233
|
-
|
|
93
|
+
Vectis UI targets recent browsers only:
|
|
234
94
|
|
|
235
|
-
|
|
95
|
+
| Chrome / Edge | Safari | Firefox |
|
|
96
|
+
| ------------- | ------ | ------- |
|
|
97
|
+
| 125+ | 26+ | 147+ |
|
|
236
98
|
|
|
237
|
-
|
|
99
|
+
CSS anchor positioning is used without a JavaScript fallback, which is what sets this floor. Some effects, like entry animations, are progressive enhancements and simply don't play on engines that lack them.
|
|
238
100
|
|
|
239
|
-
|
|
101
|
+
If your bundler targets older browsers, it may rewrite part of the library's CSS during minification. Set `build.cssTarget` to the versions above in your Vite (or Nuxt) config to keep it intact:
|
|
240
102
|
|
|
241
103
|
```ts
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
dataTable: { empty: 'Nothing to display' },
|
|
246
|
-
common: { close: 'Quit' },
|
|
104
|
+
// vite.config.ts
|
|
105
|
+
export default defineConfig({
|
|
106
|
+
build: { cssTarget: ['chrome125', 'edge125', 'safari26', 'firefox147'] },
|
|
247
107
|
})
|
|
248
108
|
```
|
|
249
109
|
|
|
250
|
-
|
|
251
|
-
|
|
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
|
-
|
|
254
|
-
```ts
|
|
255
|
-
import { registerMessages, setLocale, type VectisMessagesInput } from 'vectis-ui'
|
|
256
|
-
|
|
257
|
-
const de: VectisMessagesInput = {
|
|
258
|
-
common: { loading: 'Wird geladen…', close: 'Schließen' },
|
|
259
|
-
pagination: { previous: 'Vorherige Seite', next: 'Nächste Seite', page: (p) => `Seite ${p}` },
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
registerMessages('de', de)
|
|
263
|
-
setLocale('de-DE')
|
|
264
|
-
```
|
|
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 `VectisMessagesInput` for key autocompletion, or as `VectisMessages` to have the compiler require full coverage.
|
|
267
|
-
|
|
268
|
-
The key is the **language subtag** alone: `registerMessages('de', …)` covers `de-DE`, `de-AT` and `de-CH`.
|
|
269
|
-
|
|
270
|
-
### Precedence
|
|
271
|
-
|
|
272
|
-
A text prop set on a component stays **authoritative**: the global translation only changes the defaults. For containers' accessible names, the full chain is `aria-labelledby` › `aria-label` › the `label` prop › the dictionary › English.
|
|
273
|
-
|
|
274
|
-
`VDatePicker`, `VDateInput`, `VTimePicker` and `VTimeInput` keep their `locale` prop, which takes precedence; without it, they follow the global locale.
|
|
275
|
-
|
|
276
|
-
```vue
|
|
277
|
-
<VDateInput />
|
|
278
|
-
<!-- the global locale -->
|
|
279
|
-
<VDateInput locale="ja-JP" />
|
|
280
|
-
<!-- forced -->
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
### Limit: one locale per process
|
|
284
|
-
|
|
285
|
-
The configuration lives at module level, like the icons': **a single locale per process**. A server-rendered site serving `/fr` and `/en` from the same Node process cannot rely on it to vary the language per request — it must pass the text props explicitly.
|
|
286
|
-
|
|
287
|
-
## Components
|
|
288
|
-
|
|
289
|
-
| Area | Components |
|
|
290
|
-
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
291
|
-
| Actions | `VButton`, `VIconButton`, `VChip` (selectable, dismissible) |
|
|
292
|
-
| Forms | `VInput`, `VTextarea`, `VCheckbox`, `VRadio`, `VSwitch`, `VSlider` (single/range), `VInputOTP`, `VCombobox` (search, multi) |
|
|
293
|
-
| Overlays | `VTooltip`, `VMenu` + `VMenuItem`/`VMenuGroup`/`VMenuSeparator` (recursive submenus) |
|
|
294
|
-
| Structure | `VAccordion` + `VAccordionItem`, `VDataTable` (sorting, responsive), `VBreadcrumb` (data-driven, truncation) |
|
|
295
|
-
| Feedback | `VToaster` + `toast()` (notifications), `VBadge`, `VAvatar`, `VSpinner`, `VSkeletonLoader` (loading silhouettes), `VProgressLinear`, `VProgressCircular`, `VIcon` (built-in SVGs, a font, an image or an inline SVG) |
|
|
296
|
-
|
|
297
|
-
Implementation notes worth knowing:
|
|
298
|
-
|
|
299
|
-
- **VSlider range** superimposes two native `<input type="range">` (each thumb stays a real keyboard/ARIA slider); the JS only prevents them crossing.
|
|
300
|
-
- **VDataTable responsive**: the `stack` mode is pure CSS (container queries) — under a 640px container, rows become cards and the headers are re-injected through `::before + data-label`.
|
|
301
|
-
- **VCombobox** follows the ARIA combobox/listbox pattern (`aria-activedescendant`, focus stays in the input); the panel is aligned on the control through `anchor-size(width)`.
|
|
302
|
-
- **VToast**: mount `<VToaster />` once (at the app root), then call `toast({ message, tone, ... })` from anywhere — a component, a store, an API response (client only, never during SSR). Placements as Popover API stacks (the top layer), auto-dismiss (5 s by default, `duration: 0` = persistent, paused on hover), `dismissToast(id?)` to close programmatically.
|
|
110
|
+
## Versioning
|
|
303
111
|
|
|
304
|
-
|
|
112
|
+
Vectis UI follows [Semantic Versioning](https://semver.org/). While the version is still 0.x, a minor release can include breaking changes, so read the [changelog](https://github.com/Jypyx/vectis-ui/blob/main/CHANGELOG.md) before upgrading.
|
|
305
113
|
|
|
306
|
-
|
|
307
|
-
- `v-model` wherever state exists (`v-model:open` for VMenu).
|
|
308
|
-
- Floating elements take their trigger from a scoped slot: `<template #trigger="{ triggerProps }"><VButton v-bind="triggerProps">…</VButton></template>` — `popovertarget` and the ARIA attributes are set for you.
|
|
309
|
-
- Forms: the visual error state comes from native `:user-invalid` (zero validation JS); the `invalid` prop forces the state for server-side validation.
|
|
310
|
-
|
|
311
|
-
The living documentation (stories, tokens page, theme switch): `pnpm storybook`.
|
|
312
|
-
|
|
313
|
-
## Browser support
|
|
314
|
-
|
|
315
|
-
Target: **modern browsers** — Chrome/Edge 125+, Safari 26+, Firefox 147+.
|
|
316
|
-
|
|
317
|
-
- Baseline, no compromise: the Popover API, `<dialog>`, `<details name>`, `:user-invalid`, `:has()`, `color-mix()`, `@layer`, custom properties.
|
|
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
|
-
- 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
|
-
|
|
321
|
-
## Accessibility
|
|
322
|
-
|
|
323
|
-
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.
|
|
324
|
-
|
|
325
|
-
## Security model
|
|
326
|
-
|
|
327
|
-
The package has **no runtime dependency** beyond Vue, makes **no network request**, and reads no
|
|
328
|
-
storage. It renders no consumer string as HTML: there is no `v-html` anywhere in the library.
|
|
114
|
+
## Contributing
|
|
329
115
|
|
|
330
|
-
|
|
331
|
-
not filter URL schemes.** `href` (`VButton`, `VChip`, `VAvatar`, `VMenuItem`, `VSideNavigationItem`,
|
|
332
|
-
`VBreadcrumb`) and `src` (`VIcon`, `VAvatar`) are passed through untouched, so a `javascript:` URL
|
|
333
|
-
coming from your data runs on click. Validate it where the data enters your application — with
|
|
334
|
-
particular care for `VBreadcrumb`, whose `items[].href` is typically built from a CMS or an API
|
|
335
|
-
rather than written by hand.
|
|
116
|
+
Bug reports and feature requests are welcome in the [issue tracker](https://github.com/Jypyx/vectis-ui/issues). To work on the library itself, see the [repository](https://github.com/Jypyx/vectis-ui).
|
|
336
117
|
|
|
337
|
-
|
|
338
|
-
custom properties through `style.setProperty`, so they cannot escape the `style` attribute — but a
|
|
339
|
-
hostile value can still be a valid `url(…)`, i.e. a tracking beacon. Treat them as data to validate
|
|
340
|
-
if they come from outside your application.
|
|
118
|
+
## License
|
|
341
119
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
```bash
|
|
345
|
-
corepack enable pnpm
|
|
346
|
-
pnpm install
|
|
347
|
-
pnpm storybook # development
|
|
348
|
-
pnpm lint && pnpm format && pnpm typecheck && pnpm test && pnpm build && pnpm build-storybook
|
|
349
|
-
```
|
|
120
|
+
Vectis UI is released under the [MIT license](https://github.com/Jypyx/vectis-ui/blob/main/LICENSE).
|
|
350
121
|
|
|
351
|
-
-
|
|
352
|
-
- **A new component**: a `src/components/VX/` folder with `VX.vue` (non-scoped styles in `@layer vectis.components`, semantic tokens only, variants through `data-*`), `VX.stories.ts` (default, variants, states, edge cases, play functions), `VX.test.ts` (logic only — browser behaviour is tested in the play functions), and the named export in `src/index.ts`. The Storybook `title` and the `.mdx` heading are written **without the `V`** — the only exception to the prefix.
|
|
353
|
-
- **Its CSS ships as `dist/components/VX/VX.css`, imported by `VX.js`.** No rule may depend on where another component's sheet lands: a declaration that would collide with another component's at equal specificity is qualified (`[data-size]`, a compound class, a descendant) or routed through the custom property the target reads. `pnpm build` checks the mechanism.
|
|
354
|
-
- Any behavioural JS must be justified by a comment: "can modern HTML/CSS do it?" comes first.
|
|
122
|
+
The built-in icons are drawn from [Material Symbols](https://github.com/google/material-design-icons) by Google, used under the Apache License 2.0. See [NOTICE](https://github.com/Jypyx/vectis-ui/blob/main/NOTICE) for details.
|
|
@@ -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)}}
|