vectis-ui 0.1.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/LICENSE +21 -0
- package/NOTICE +27 -0
- package/README.md +354 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
- package/dist/components/VAccordion/VAccordion.css +2 -0
- package/dist/components/VAccordion/VAccordion.d.ts +59 -0
- package/dist/components/VAccordion/VAccordion.js +9 -0
- package/dist/components/VAccordion/VAccordion.js.map +1 -0
- package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js +42 -0
- package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VAccordion/VAccordionItem.css +2 -0
- package/dist/components/VAccordion/VAccordionItem.d.ts +64 -0
- package/dist/components/VAccordion/VAccordionItem.js +9 -0
- package/dist/components/VAccordion/VAccordionItem.js.map +1 -0
- package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js +70 -0
- package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VAccordion/context.d.ts +18 -0
- package/dist/components/VAccordion/context.js +6 -0
- package/dist/components/VAccordion/context.js.map +1 -0
- package/dist/components/VAvatar/VAvatar.css +2 -0
- package/dist/components/VAvatar/VAvatar.d.ts +68 -0
- package/dist/components/VAvatar/VAvatar.js +9 -0
- package/dist/components/VAvatar/VAvatar.js.map +1 -0
- package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js +87 -0
- package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VAvatar/VAvatarGroup.css +2 -0
- package/dist/components/VAvatar/VAvatarGroup.d.ts +59 -0
- package/dist/components/VAvatar/VAvatarGroup.js +9 -0
- package/dist/components/VAvatar/VAvatarGroup.js.map +1 -0
- package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js +43 -0
- package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VAvatar/context.d.ts +17 -0
- package/dist/components/VAvatar/context.js +6 -0
- package/dist/components/VAvatar/context.js.map +1 -0
- package/dist/components/VBadge/VBadge.css +2 -0
- package/dist/components/VBadge/VBadge.d.ts +74 -0
- package/dist/components/VBadge/VBadge.js +9 -0
- package/dist/components/VBadge/VBadge.js.map +1 -0
- package/dist/components/VBadge/VBadge.vue_vue_type_script_setup_true_lang.js +40 -0
- package/dist/components/VBadge/VBadge.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VBreadcrumb/VBreadcrumb.css +2 -0
- package/dist/components/VBreadcrumb/VBreadcrumb.d.ts +68 -0
- package/dist/components/VBreadcrumb/VBreadcrumb.js +9 -0
- package/dist/components/VBreadcrumb/VBreadcrumb.js.map +1 -0
- package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js +70 -0
- package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VButton/VButton.css +2 -0
- package/dist/components/VButton/VButton.d.ts +88 -0
- package/dist/components/VButton/VButton.js +9 -0
- package/dist/components/VButton/VButton.js.map +1 -0
- package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js +86 -0
- package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VButton/VButtonGroup.css +2 -0
- package/dist/components/VButton/VButtonGroup.d.ts +32 -0
- package/dist/components/VButton/VButtonGroup.js +9 -0
- package/dist/components/VButton/VButtonGroup.js.map +1 -0
- package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VCalendar/VCalendar.css +2 -0
- package/dist/components/VCalendar/VCalendar.d.ts +129 -0
- package/dist/components/VCalendar/VCalendar.js +9 -0
- package/dist/components/VCalendar/VCalendar.js.map +1 -0
- package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js +374 -0
- package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VCalendar/VCalendarEvent.css +2 -0
- package/dist/components/VCalendar/VCalendarEvent.d.ts +71 -0
- package/dist/components/VCalendar/VCalendarEvent.js +9 -0
- package/dist/components/VCalendar/VCalendarEvent.js.map +1 -0
- package/dist/components/VCalendar/VCalendarEvent.vue_vue_type_script_setup_true_lang.js +106 -0
- package/dist/components/VCalendar/VCalendarEvent.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VCalendar/VCalendarMonth.css +2 -0
- package/dist/components/VCalendar/VCalendarMonth.d.ts +60 -0
- package/dist/components/VCalendar/VCalendarMonth.js +9 -0
- package/dist/components/VCalendar/VCalendarMonth.js.map +1 -0
- package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js +342 -0
- package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VCalendar/VCalendarTimeGrid.css +2 -0
- package/dist/components/VCalendar/VCalendarTimeGrid.d.ts +85 -0
- package/dist/components/VCalendar/VCalendarTimeGrid.js +9 -0
- package/dist/components/VCalendar/VCalendarTimeGrid.js.map +1 -0
- package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js +621 -0
- package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VCalendar/VCalendarYear.css +2 -0
- package/dist/components/VCalendar/VCalendarYear.d.ts +31 -0
- package/dist/components/VCalendar/VCalendarYear.js +9 -0
- package/dist/components/VCalendar/VCalendarYear.js.map +1 -0
- package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js +76 -0
- package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VCalendar/color.d.ts +9 -0
- package/dist/components/VCalendar/color.js +9 -0
- package/dist/components/VCalendar/color.js.map +1 -0
- package/dist/components/VCalendar/edgeStep.d.ts +38 -0
- package/dist/components/VCalendar/edgeStep.js +28 -0
- package/dist/components/VCalendar/edgeStep.js.map +1 -0
- package/dist/components/VCalendar/keyboard.d.ts +78 -0
- package/dist/components/VCalendar/keyboard.js +86 -0
- package/dist/components/VCalendar/keyboard.js.map +1 -0
- package/dist/components/VCalendar/layout.d.ts +355 -0
- package/dist/components/VCalendar/layout.js +292 -0
- package/dist/components/VCalendar/layout.js.map +1 -0
- package/dist/components/VCalendar/types.d.ts +78 -0
- package/dist/components/VCarousel/VCarousel.css +2 -0
- package/dist/components/VCarousel/VCarousel.d.ts +241 -0
- package/dist/components/VCarousel/VCarousel.js +9 -0
- package/dist/components/VCarousel/VCarousel.js.map +1 -0
- package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js +262 -0
- package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VCarousel/VCarouselItem.d.ts +41 -0
- package/dist/components/VCarousel/VCarouselItem.js +7 -0
- package/dist/components/VCarousel/VCarouselItem.js.map +1 -0
- package/dist/components/VCarousel/VCarouselItem.vue_vue_type_script_setup_true_lang.js +25 -0
- package/dist/components/VCarousel/VCarouselItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VCarousel/context.d.ts +23 -0
- package/dist/components/VCarousel/context.js +6 -0
- package/dist/components/VCarousel/context.js.map +1 -0
- package/dist/components/VCheckbox/VCheckbox.css +2 -0
- package/dist/components/VCheckbox/VCheckbox.d.ts +63 -0
- package/dist/components/VCheckbox/VCheckbox.js +9 -0
- package/dist/components/VCheckbox/VCheckbox.js.map +1 -0
- package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js +83 -0
- package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VChip/VChip.css +2 -0
- package/dist/components/VChip/VChip.d.ts +120 -0
- package/dist/components/VChip/VChip.js +9 -0
- package/dist/components/VChip/VChip.js.map +1 -0
- package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js +118 -0
- package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VCombobox/VCombobox.css +2 -0
- package/dist/components/VCombobox/VCombobox.d.ts +183 -0
- package/dist/components/VCombobox/VCombobox.js +9 -0
- package/dist/components/VCombobox/VCombobox.js.map +1 -0
- package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js +428 -0
- package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VCombobox/VComboboxGroup.css +2 -0
- package/dist/components/VCombobox/VComboboxGroup.d.ts +26 -0
- package/dist/components/VCombobox/VComboboxGroup.js +9 -0
- package/dist/components/VCombobox/VComboboxGroup.js.map +1 -0
- package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js +21 -0
- package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VCombobox/VComboboxOption.css +2 -0
- package/dist/components/VCombobox/VComboboxOption.d.ts +48 -0
- package/dist/components/VCombobox/VComboboxOption.js +9 -0
- package/dist/components/VCombobox/VComboboxOption.js.map +1 -0
- package/dist/components/VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js +56 -0
- package/dist/components/VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VCombobox/VComboboxSeparator.css +2 -0
- package/dist/components/VCombobox/VComboboxSeparator.d.ts +3 -0
- package/dist/components/VCombobox/VComboboxSeparator.js +9 -0
- package/dist/components/VCombobox/VComboboxSeparator.js.map +1 -0
- package/dist/components/VCombobox/VComboboxSeparator.vue_vue_type_script_setup_true_lang.js +16 -0
- package/dist/components/VCombobox/VComboboxSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VCombobox/infiniteScroll.d.ts +22 -0
- package/dist/components/VCombobox/infiniteScroll.js +28 -0
- package/dist/components/VCombobox/infiniteScroll.js.map +1 -0
- package/dist/components/VDataTable/VDataTable.css +2 -0
- package/dist/components/VDataTable/VDataTable.d.ts +214 -0
- package/dist/components/VDataTable/VDataTable.js +9 -0
- package/dist/components/VDataTable/VDataTable.js.map +1 -0
- package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js +396 -0
- package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VDateInput/VDateInput.css +2 -0
- package/dist/components/VDateInput/VDateInput.d.ts +152 -0
- package/dist/components/VDateInput/VDateInput.js +9 -0
- package/dist/components/VDateInput/VDateInput.js.map +1 -0
- package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js +324 -0
- package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VDatePicker/VDatePicker.css +2 -0
- package/dist/components/VDatePicker/VDatePicker.d.ts +143 -0
- package/dist/components/VDatePicker/VDatePicker.js +9 -0
- package/dist/components/VDatePicker/VDatePicker.js.map +1 -0
- package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js +454 -0
- package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VDatePicker/keyboard.d.ts +56 -0
- package/dist/components/VDatePicker/keyboard.js +26 -0
- package/dist/components/VDatePicker/keyboard.js.map +1 -0
- package/dist/components/VDialog/VDialog.css +2 -0
- package/dist/components/VDialog/VDialog.d.ts +96 -0
- package/dist/components/VDialog/VDialog.js +9 -0
- package/dist/components/VDialog/VDialog.js.map +1 -0
- package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js +134 -0
- package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VDialog/VDialogAlert.d.ts +67 -0
- package/dist/components/VDialog/VDialogAlert.js +7 -0
- package/dist/components/VDialog/VDialogAlert.js.map +1 -0
- package/dist/components/VDialog/VDialogAlert.vue_vue_type_script_setup_true_lang.js +60 -0
- package/dist/components/VDialog/VDialogAlert.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VFileInput/VFileInput.css +2 -0
- package/dist/components/VFileInput/VFileInput.d.ts +156 -0
- package/dist/components/VFileInput/VFileInput.js +9 -0
- package/dist/components/VFileInput/VFileInput.js.map +1 -0
- package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js +244 -0
- package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VFileInput/truncate.d.ts +29 -0
- package/dist/components/VFileInput/truncate.js +10 -0
- package/dist/components/VFileInput/truncate.js.map +1 -0
- package/dist/components/VFilePicker/VFilePicker.css +2 -0
- package/dist/components/VFilePicker/VFilePicker.d.ts +203 -0
- package/dist/components/VFilePicker/VFilePicker.js +9 -0
- package/dist/components/VFilePicker/VFilePicker.js.map +1 -0
- package/dist/components/VFilePicker/VFilePicker.vue_vue_type_script_setup_true_lang.js +266 -0
- package/dist/components/VFilePicker/VFilePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VFilePicker/fileKind.d.ts +29 -0
- package/dist/components/VFilePicker/fileKind.js +91 -0
- package/dist/components/VFilePicker/fileKind.js.map +1 -0
- package/dist/components/VHotkeys/VHotkeys.css +2 -0
- package/dist/components/VHotkeys/VHotkeys.d.ts +100 -0
- package/dist/components/VHotkeys/VHotkeys.js +9 -0
- package/dist/components/VHotkeys/VHotkeys.js.map +1 -0
- package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js +76 -0
- package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VHotkeys/platform.d.ts +82 -0
- package/dist/components/VHotkeys/platform.js +115 -0
- package/dist/components/VHotkeys/platform.js.map +1 -0
- package/dist/components/VIcon/VIcon.css +2 -0
- package/dist/components/VIcon/VIcon.d.ts +57 -0
- package/dist/components/VIcon/VIcon.js +9 -0
- package/dist/components/VIcon/VIcon.js.map +1 -0
- package/dist/components/VIcon/VIcon.vue_vue_type_script_setup_true_lang.js +99 -0
- package/dist/components/VIcon/VIcon.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VIcon/iconProps.d.ts +30 -0
- package/dist/components/VIcon/iconProps.js +6 -0
- package/dist/components/VIcon/iconProps.js.map +1 -0
- package/dist/components/VIcon/icons/arrow_downward.d.ts +5 -0
- package/dist/components/VIcon/icons/arrow_downward.js +9 -0
- package/dist/components/VIcon/icons/arrow_downward.js.map +1 -0
- package/dist/components/VIcon/icons/arrow_downward_alt.d.ts +5 -0
- package/dist/components/VIcon/icons/arrow_downward_alt.js +9 -0
- package/dist/components/VIcon/icons/arrow_downward_alt.js.map +1 -0
- package/dist/components/VIcon/icons/arrow_drop_down.d.ts +5 -0
- package/dist/components/VIcon/icons/arrow_drop_down.js +9 -0
- package/dist/components/VIcon/icons/arrow_drop_down.js.map +1 -0
- package/dist/components/VIcon/icons/arrow_drop_up.d.ts +5 -0
- package/dist/components/VIcon/icons/arrow_drop_up.js +9 -0
- package/dist/components/VIcon/icons/arrow_drop_up.js.map +1 -0
- package/dist/components/VIcon/icons/arrow_left_alt.d.ts +5 -0
- package/dist/components/VIcon/icons/arrow_left_alt.js +9 -0
- package/dist/components/VIcon/icons/arrow_left_alt.js.map +1 -0
- package/dist/components/VIcon/icons/arrow_right_alt.d.ts +5 -0
- package/dist/components/VIcon/icons/arrow_right_alt.js +9 -0
- package/dist/components/VIcon/icons/arrow_right_alt.js.map +1 -0
- package/dist/components/VIcon/icons/arrow_upward.d.ts +5 -0
- package/dist/components/VIcon/icons/arrow_upward.js +9 -0
- package/dist/components/VIcon/icons/arrow_upward.js.map +1 -0
- package/dist/components/VIcon/icons/arrow_upward_alt.d.ts +5 -0
- package/dist/components/VIcon/icons/arrow_upward_alt.js +9 -0
- package/dist/components/VIcon/icons/arrow_upward_alt.js.map +1 -0
- package/dist/components/VIcon/icons/attach_file.d.ts +5 -0
- package/dist/components/VIcon/icons/attach_file.js +9 -0
- package/dist/components/VIcon/icons/attach_file.js.map +1 -0
- package/dist/components/VIcon/icons/audio_file.d.ts +5 -0
- package/dist/components/VIcon/icons/audio_file.js +9 -0
- package/dist/components/VIcon/icons/audio_file.js.map +1 -0
- package/dist/components/VIcon/icons/calendar_today.d.ts +5 -0
- package/dist/components/VIcon/icons/calendar_today.js +9 -0
- package/dist/components/VIcon/icons/calendar_today.js.map +1 -0
- package/dist/components/VIcon/icons/check.d.ts +5 -0
- package/dist/components/VIcon/icons/check.js +9 -0
- package/dist/components/VIcon/icons/check.js.map +1 -0
- package/dist/components/VIcon/icons/check_circle.d.ts +5 -0
- package/dist/components/VIcon/icons/check_circle.js +9 -0
- package/dist/components/VIcon/icons/check_circle.js.map +1 -0
- package/dist/components/VIcon/icons/chevron_left.d.ts +5 -0
- package/dist/components/VIcon/icons/chevron_left.js +9 -0
- package/dist/components/VIcon/icons/chevron_left.js.map +1 -0
- package/dist/components/VIcon/icons/chevron_right.d.ts +5 -0
- package/dist/components/VIcon/icons/chevron_right.js +9 -0
- package/dist/components/VIcon/icons/chevron_right.js.map +1 -0
- package/dist/components/VIcon/icons/close.d.ts +5 -0
- package/dist/components/VIcon/icons/close.js +9 -0
- package/dist/components/VIcon/icons/close.js.map +1 -0
- package/dist/components/VIcon/icons/cloud_upload.d.ts +5 -0
- package/dist/components/VIcon/icons/cloud_upload.js +9 -0
- package/dist/components/VIcon/icons/cloud_upload.js.map +1 -0
- package/dist/components/VIcon/icons/code.d.ts +5 -0
- package/dist/components/VIcon/icons/code.js +9 -0
- package/dist/components/VIcon/icons/code.js.map +1 -0
- package/dist/components/VIcon/icons/description.d.ts +5 -0
- package/dist/components/VIcon/icons/description.js +9 -0
- package/dist/components/VIcon/icons/description.js.map +1 -0
- package/dist/components/VIcon/icons/error.d.ts +5 -0
- package/dist/components/VIcon/icons/error.js +9 -0
- package/dist/components/VIcon/icons/error.js.map +1 -0
- package/dist/components/VIcon/icons/expand_less.d.ts +5 -0
- package/dist/components/VIcon/icons/expand_less.js +9 -0
- package/dist/components/VIcon/icons/expand_less.js.map +1 -0
- package/dist/components/VIcon/icons/expand_more.d.ts +5 -0
- package/dist/components/VIcon/icons/expand_more.js +9 -0
- package/dist/components/VIcon/icons/expand_more.js.map +1 -0
- package/dist/components/VIcon/icons/folder_zip.d.ts +5 -0
- package/dist/components/VIcon/icons/folder_zip.js +9 -0
- package/dist/components/VIcon/icons/folder_zip.js.map +1 -0
- package/dist/components/VIcon/icons/image.d.ts +5 -0
- package/dist/components/VIcon/icons/image.js +9 -0
- package/dist/components/VIcon/icons/image.js.map +1 -0
- package/dist/components/VIcon/icons/index.d.ts +183 -0
- package/dist/components/VIcon/icons/index.js +77 -0
- package/dist/components/VIcon/icons/index.js.map +1 -0
- package/dist/components/VIcon/icons/info.d.ts +5 -0
- package/dist/components/VIcon/icons/info.js +9 -0
- package/dist/components/VIcon/icons/info.js.map +1 -0
- package/dist/components/VIcon/icons/more_horiz.d.ts +5 -0
- package/dist/components/VIcon/icons/more_horiz.js +9 -0
- package/dist/components/VIcon/icons/more_horiz.js.map +1 -0
- package/dist/components/VIcon/icons/names.d.ts +11 -0
- package/dist/components/VIcon/icons/names.js +5 -0
- package/dist/components/VIcon/icons/names.js.map +1 -0
- package/dist/components/VIcon/icons/notifications.d.ts +5 -0
- package/dist/components/VIcon/icons/notifications.js +9 -0
- package/dist/components/VIcon/icons/notifications.js.map +1 -0
- package/dist/components/VIcon/icons/picture_as_pdf.d.ts +5 -0
- package/dist/components/VIcon/icons/picture_as_pdf.js +9 -0
- package/dist/components/VIcon/icons/picture_as_pdf.js.map +1 -0
- package/dist/components/VIcon/icons/schedule.d.ts +5 -0
- package/dist/components/VIcon/icons/schedule.js +9 -0
- package/dist/components/VIcon/icons/schedule.js.map +1 -0
- package/dist/components/VIcon/icons/search.d.ts +5 -0
- package/dist/components/VIcon/icons/search.js +9 -0
- package/dist/components/VIcon/icons/search.js.map +1 -0
- package/dist/components/VIcon/icons/swap_vert.d.ts +5 -0
- package/dist/components/VIcon/icons/swap_vert.js +9 -0
- package/dist/components/VIcon/icons/swap_vert.js.map +1 -0
- package/dist/components/VIcon/icons/table_chart.d.ts +5 -0
- package/dist/components/VIcon/icons/table_chart.js +9 -0
- package/dist/components/VIcon/icons/table_chart.js.map +1 -0
- package/dist/components/VIcon/icons/video_file.d.ts +5 -0
- package/dist/components/VIcon/icons/video_file.js +9 -0
- package/dist/components/VIcon/icons/video_file.js.map +1 -0
- package/dist/components/VIcon/icons/viewBox.d.ts +6 -0
- package/dist/components/VIcon/icons/viewBox.js +6 -0
- package/dist/components/VIcon/icons/viewBox.js.map +1 -0
- package/dist/components/VIcon/icons/warning.d.ts +5 -0
- package/dist/components/VIcon/icons/warning.js +9 -0
- package/dist/components/VIcon/icons/warning.js.map +1 -0
- package/dist/components/VIcon/resolver.d.ts +76 -0
- package/dist/components/VIcon/resolver.js +35 -0
- package/dist/components/VIcon/resolver.js.map +1 -0
- package/dist/components/VIcon/types.d.ts +77 -0
- package/dist/components/VIconButton/VIconButton.css +2 -0
- package/dist/components/VIconButton/VIconButton.d.ts +66 -0
- package/dist/components/VIconButton/VIconButton.js +9 -0
- package/dist/components/VIconButton/VIconButton.js.map +1 -0
- package/dist/components/VIconButton/VIconButton.vue_vue_type_script_setup_true_lang.js +70 -0
- package/dist/components/VIconButton/VIconButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VInput/VInput.css +2 -0
- package/dist/components/VInput/VInput.d.ts +152 -0
- package/dist/components/VInput/VInput.js +9 -0
- package/dist/components/VInput/VInput.js.map +1 -0
- package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js +185 -0
- package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VInputOTP/VInputOTP.css +2 -0
- package/dist/components/VInputOTP/VInputOTP.d.ts +76 -0
- package/dist/components/VInputOTP/VInputOTP.js +9 -0
- package/dist/components/VInputOTP/VInputOTP.js.map +1 -0
- package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js +149 -0
- package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VMenu/VMenu.d.ts +91 -0
- package/dist/components/VMenu/VMenu.js +7 -0
- package/dist/components/VMenu/VMenu.js.map +1 -0
- package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js +73 -0
- package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VMenu/VMenuGroup.css +2 -0
- package/dist/components/VMenu/VMenuGroup.d.ts +22 -0
- package/dist/components/VMenu/VMenuGroup.js +9 -0
- package/dist/components/VMenu/VMenuGroup.js.map +1 -0
- package/dist/components/VMenu/VMenuGroup.vue_vue_type_script_setup_true_lang.js +21 -0
- package/dist/components/VMenu/VMenuGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VMenu/VMenuItem.css +2 -0
- package/dist/components/VMenu/VMenuItem.d.ts +85 -0
- package/dist/components/VMenu/VMenuItem.js +9 -0
- package/dist/components/VMenu/VMenuItem.js.map +1 -0
- package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js +121 -0
- package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VMenu/VMenuPanel.css +2 -0
- package/dist/components/VMenu/VMenuPanel.d.ts +91 -0
- package/dist/components/VMenu/VMenuPanel.js +9 -0
- package/dist/components/VMenu/VMenuPanel.js.map +1 -0
- package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js +103 -0
- package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VMenu/VMenuSeparator.css +2 -0
- package/dist/components/VMenu/VMenuSeparator.d.ts +3 -0
- package/dist/components/VMenu/VMenuSeparator.js +9 -0
- package/dist/components/VMenu/VMenuSeparator.js.map +1 -0
- package/dist/components/VMenu/VMenuSeparator.vue_vue_type_script_setup_true_lang.js +13 -0
- package/dist/components/VMenu/VMenuSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VMenu/context.d.ts +33 -0
- package/dist/components/VMenu/context.js +9 -0
- package/dist/components/VMenu/context.js.map +1 -0
- package/dist/components/VPagination/VPagination.css +2 -0
- package/dist/components/VPagination/VPagination.d.ts +103 -0
- package/dist/components/VPagination/VPagination.js +9 -0
- package/dist/components/VPagination/VPagination.js.map +1 -0
- package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js +270 -0
- package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VPopover/VPopover.css +2 -0
- package/dist/components/VPopover/VPopover.d.ts +82 -0
- package/dist/components/VPopover/VPopover.js +9 -0
- package/dist/components/VPopover/VPopover.js.map +1 -0
- package/dist/components/VPopover/VPopover.vue_vue_type_script_setup_true_lang.js +65 -0
- package/dist/components/VPopover/VPopover.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VProgressCircular/VProgressCircular.css +2 -0
- package/dist/components/VProgressCircular/VProgressCircular.d.ts +60 -0
- package/dist/components/VProgressCircular/VProgressCircular.js +9 -0
- package/dist/components/VProgressCircular/VProgressCircular.js.map +1 -0
- package/dist/components/VProgressCircular/VProgressCircular.vue_vue_type_script_setup_true_lang.js +74 -0
- package/dist/components/VProgressCircular/VProgressCircular.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VProgressLinear/VProgressLinear.css +2 -0
- package/dist/components/VProgressLinear/VProgressLinear.d.ts +74 -0
- package/dist/components/VProgressLinear/VProgressLinear.js +9 -0
- package/dist/components/VProgressLinear/VProgressLinear.js.map +1 -0
- package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js +74 -0
- package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VRadio/VRadio.css +2 -0
- package/dist/components/VRadio/VRadio.d.ts +58 -0
- package/dist/components/VRadio/VRadio.js +9 -0
- package/dist/components/VRadio/VRadio.js.map +1 -0
- package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js +60 -0
- package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VSeparator/VSeparator.css +2 -0
- package/dist/components/VSeparator/VSeparator.d.ts +23 -0
- package/dist/components/VSeparator/VSeparator.js +9 -0
- package/dist/components/VSeparator/VSeparator.js.map +1 -0
- package/dist/components/VSeparator/VSeparator.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/components/VSeparator/VSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VSideNavigation/VSideNavigation.css +2 -0
- package/dist/components/VSideNavigation/VSideNavigation.d.ts +64 -0
- package/dist/components/VSideNavigation/VSideNavigation.js +9 -0
- package/dist/components/VSideNavigation/VSideNavigation.js.map +1 -0
- package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js +67 -0
- package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VSideNavigation/VSideNavigationGroup.css +2 -0
- package/dist/components/VSideNavigation/VSideNavigationGroup.d.ts +33 -0
- package/dist/components/VSideNavigation/VSideNavigationGroup.js +9 -0
- package/dist/components/VSideNavigation/VSideNavigationGroup.js.map +1 -0
- package/dist/components/VSideNavigation/VSideNavigationGroup.vue_vue_type_script_setup_true_lang.js +20 -0
- package/dist/components/VSideNavigation/VSideNavigationGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VSideNavigation/VSideNavigationItem.css +2 -0
- package/dist/components/VSideNavigation/VSideNavigationItem.d.ts +103 -0
- package/dist/components/VSideNavigation/VSideNavigationItem.js +9 -0
- package/dist/components/VSideNavigation/VSideNavigationItem.js.map +1 -0
- package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js +154 -0
- package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VSideNavigation/VSideNavigationSeparator.css +2 -0
- package/dist/components/VSideNavigation/VSideNavigationSeparator.d.ts +3 -0
- package/dist/components/VSideNavigation/VSideNavigationSeparator.js +17 -0
- package/dist/components/VSideNavigation/VSideNavigationSeparator.js.map +1 -0
- package/dist/components/VSideNavigation/context.d.ts +37 -0
- package/dist/components/VSideNavigation/context.js +6 -0
- package/dist/components/VSideNavigation/context.js.map +1 -0
- package/dist/components/VSkeletonLoader/VSkeletonLoader.css +2 -0
- package/dist/components/VSkeletonLoader/VSkeletonLoader.d.ts +75 -0
- package/dist/components/VSkeletonLoader/VSkeletonLoader.js +9 -0
- package/dist/components/VSkeletonLoader/VSkeletonLoader.js.map +1 -0
- package/dist/components/VSkeletonLoader/VSkeletonLoader.vue_vue_type_script_setup_true_lang.js +61 -0
- package/dist/components/VSkeletonLoader/VSkeletonLoader.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VSlider/VSlider.css +2 -0
- package/dist/components/VSlider/VSlider.d.ts +82 -0
- package/dist/components/VSlider/VSlider.js +9 -0
- package/dist/components/VSlider/VSlider.js.map +1 -0
- package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js +220 -0
- package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VSnackbar/VSnackbar.css +2 -0
- package/dist/components/VSnackbar/VSnackbar.d.ts +51 -0
- package/dist/components/VSnackbar/VSnackbar.js +9 -0
- package/dist/components/VSnackbar/VSnackbar.js.map +1 -0
- package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js +83 -0
- package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VSnackbar/state.d.ts +92 -0
- package/dist/components/VSnackbar/state.js +18 -0
- package/dist/components/VSnackbar/state.js.map +1 -0
- package/dist/components/VSpinner/VSpinner.css +2 -0
- package/dist/components/VSpinner/VSpinner.d.ts +21 -0
- package/dist/components/VSpinner/VSpinner.js +9 -0
- package/dist/components/VSpinner/VSpinner.js.map +1 -0
- package/dist/components/VSpinner/VSpinner.vue_vue_type_script_setup_true_lang.js +25 -0
- package/dist/components/VSpinner/VSpinner.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VSwitch/VSwitch.css +2 -0
- package/dist/components/VSwitch/VSwitch.d.ts +46 -0
- package/dist/components/VSwitch/VSwitch.js +9 -0
- package/dist/components/VSwitch/VSwitch.js.map +1 -0
- package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js +51 -0
- package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VTabs/VTab.css +2 -0
- package/dist/components/VTabs/VTab.d.ts +42 -0
- package/dist/components/VTabs/VTab.js +9 -0
- package/dist/components/VTabs/VTab.js.map +1 -0
- package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js +66 -0
- package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VTabs/VTabPanel.css +2 -0
- package/dist/components/VTabs/VTabPanel.d.ts +34 -0
- package/dist/components/VTabs/VTabPanel.js +9 -0
- package/dist/components/VTabs/VTabPanel.js.map +1 -0
- package/dist/components/VTabs/VTabPanel.vue_vue_type_script_setup_true_lang.js +34 -0
- package/dist/components/VTabs/VTabPanel.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VTabs/VTabs.css +2 -0
- package/dist/components/VTabs/VTabs.d.ts +107 -0
- package/dist/components/VTabs/VTabs.js +9 -0
- package/dist/components/VTabs/VTabs.js.map +1 -0
- package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js +199 -0
- package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VTabs/context.d.ts +43 -0
- package/dist/components/VTabs/context.js +6 -0
- package/dist/components/VTabs/context.js.map +1 -0
- package/dist/components/VTextarea/VTextarea.css +2 -0
- package/dist/components/VTextarea/VTextarea.d.ts +140 -0
- package/dist/components/VTextarea/VTextarea.js +9 -0
- package/dist/components/VTextarea/VTextarea.js.map +1 -0
- package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js +187 -0
- package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VTimeInput/VTimeInput.css +2 -0
- package/dist/components/VTimeInput/VTimeInput.d.ts +112 -0
- package/dist/components/VTimeInput/VTimeInput.js +9 -0
- package/dist/components/VTimeInput/VTimeInput.js.map +1 -0
- package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js +385 -0
- package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VTimePicker/VTimePicker.css +2 -0
- package/dist/components/VTimePicker/VTimePicker.d.ts +89 -0
- package/dist/components/VTimePicker/VTimePicker.js +9 -0
- package/dist/components/VTimePicker/VTimePicker.js.map +1 -0
- package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js +257 -0
- package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VToast/VToast.css +2 -0
- package/dist/components/VToast/VToast.d.ts +24 -0
- package/dist/components/VToast/VToast.js +9 -0
- package/dist/components/VToast/VToast.js.map +1 -0
- package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js +62 -0
- package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VToast/VToaster.css +2 -0
- package/dist/components/VToast/VToaster.d.ts +42 -0
- package/dist/components/VToast/VToaster.js +9 -0
- package/dist/components/VToast/VToaster.js.map +1 -0
- package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js +112 -0
- package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VToast/state.d.ts +74 -0
- package/dist/components/VToast/state.js +25 -0
- package/dist/components/VToast/state.js.map +1 -0
- package/dist/components/VToggle/VToggle.css +2 -0
- package/dist/components/VToggle/VToggle.d.ts +84 -0
- package/dist/components/VToggle/VToggle.js +9 -0
- package/dist/components/VToggle/VToggle.js.map +1 -0
- package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js +103 -0
- package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VToggle/VToggleItem.css +2 -0
- package/dist/components/VToggle/VToggleItem.d.ts +35 -0
- package/dist/components/VToggle/VToggleItem.js +9 -0
- package/dist/components/VToggle/VToggleItem.js.map +1 -0
- package/dist/components/VToggle/VToggleItem.vue_vue_type_script_setup_true_lang.js +51 -0
- package/dist/components/VToggle/VToggleItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VToggle/context.d.ts +37 -0
- package/dist/components/VToggle/context.js +6 -0
- package/dist/components/VToggle/context.js.map +1 -0
- package/dist/components/VTooltip/VTooltip.css +2 -0
- package/dist/components/VTooltip/VTooltip.d.ts +76 -0
- package/dist/components/VTooltip/VTooltip.js +9 -0
- package/dist/components/VTooltip/VTooltip.js.map +1 -0
- package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js +50 -0
- package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VTypography/VTypography.css +2 -0
- package/dist/components/VTypography/VTypography.d.ts +46 -0
- package/dist/components/VTypography/VTypography.js +9 -0
- package/dist/components/VTypography/VTypography.js.map +1 -0
- package/dist/components/VTypography/VTypography.vue_vue_type_script_setup_true_lang.js +49 -0
- package/dist/components/VTypography/VTypography.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/composables/useAriaLabel.d.ts +19 -0
- package/dist/composables/useAriaLabel.js +10 -0
- package/dist/composables/useAriaLabel.js.map +1 -0
- package/dist/composables/useFieldIds.d.ts +21 -0
- package/dist/composables/useFieldIds.js +14 -0
- package/dist/composables/useFieldIds.js.map +1 -0
- package/dist/composables/useFieldPanel.d.ts +61 -0
- package/dist/composables/useFieldPanel.js +39 -0
- package/dist/composables/useFieldPanel.js.map +1 -0
- package/dist/composables/useFileDrop.d.ts +30 -0
- package/dist/composables/useFileDrop.js +28 -0
- package/dist/composables/useFileDrop.js.map +1 -0
- package/dist/composables/useFileField.d.ts +36 -0
- package/dist/composables/useFileField.js +45 -0
- package/dist/composables/useFileField.js.map +1 -0
- package/dist/composables/useFocusoutDismiss.d.ts +17 -0
- package/dist/composables/useFocusoutDismiss.js +11 -0
- package/dist/composables/useFocusoutDismiss.js.map +1 -0
- package/dist/composables/useIconClickHandlers.d.ts +27 -0
- package/dist/composables/useIconClickHandlers.js +13 -0
- package/dist/composables/useIconClickHandlers.js.map +1 -0
- package/dist/composables/useMaskedField.d.ts +65 -0
- package/dist/composables/useMaskedField.js +54 -0
- package/dist/composables/useMaskedField.js.map +1 -0
- package/dist/composables/usePopover.d.ts +7 -0
- package/dist/composables/usePopover.js +24 -0
- package/dist/composables/usePopover.js.map +1 -0
- package/dist/composables/useProgressValue.d.ts +13 -0
- package/dist/composables/useProgressValue.js +14 -0
- package/dist/composables/useProgressValue.js.map +1 -0
- package/dist/composables/useRootAttrs.d.ts +34 -0
- package/dist/composables/useRootAttrs.js +15 -0
- package/dist/composables/useRootAttrs.js.map +1 -0
- package/dist/composables/useTextLimit.d.ts +31 -0
- package/dist/composables/useTextLimit.js +19 -0
- package/dist/composables/useTextLimit.js.map +1 -0
- package/dist/composables/useTimer.d.ts +18 -0
- package/dist/composables/useTimer.js +19 -0
- package/dist/composables/useTimer.js.map +1 -0
- package/dist/i18n/en.d.ts +10 -0
- package/dist/i18n/en.js +179 -0
- package/dist/i18n/en.js.map +1 -0
- package/dist/i18n/fr.d.ts +18 -0
- package/dist/i18n/fr.js +179 -0
- package/dist/i18n/fr.js.map +1 -0
- package/dist/i18n/state.d.ts +64 -0
- package/dist/i18n/state.js +40 -0
- package/dist/i18n/state.js.map +1 -0
- package/dist/i18n/types.d.ts +345 -0
- package/dist/icons.d.ts +16 -0
- package/dist/icons.js +38 -0
- package/dist/index.d.ts +90 -0
- package/dist/index.js +64 -0
- package/dist/styles.css +1 -0
- package/dist/tokens/css.d.ts +25 -0
- package/dist/tokens/css.js +29 -0
- package/dist/tokens/css.js.map +1 -0
- package/dist/tokens/index.d.ts +370 -0
- package/dist/tokens/index.js +15 -0
- package/dist/tokens/index.js.map +1 -0
- package/dist/tokens/primitives.d.ts +101 -0
- package/dist/tokens/primitives.js +166 -0
- package/dist/tokens/primitives.js.map +1 -0
- package/dist/tokens/semantic.d.ts +236 -0
- package/dist/tokens/semantic.js +219 -0
- package/dist/tokens/semantic.js.map +1 -0
- package/dist/tokens/themes/dark.d.ts +49 -0
- package/dist/tokens/themes/dark.js +53 -0
- package/dist/tokens/themes/dark.js.map +1 -0
- package/dist/tokens/types.d.ts +38 -0
- package/dist/tokens/types.js +16 -0
- package/dist/tokens/types.js.map +1 -0
- package/dist/tokens.json +1516 -0
- package/dist/utils/array.d.ts +10 -0
- package/dist/utils/array.js +8 -0
- package/dist/utils/array.js.map +1 -0
- package/dist/utils/arrowNav.d.ts +27 -0
- package/dist/utils/arrowNav.js +26 -0
- package/dist/utils/arrowNav.js.map +1 -0
- package/dist/utils/chip.d.ts +26 -0
- package/dist/utils/chip.js +13 -0
- package/dist/utils/chip.js.map +1 -0
- package/dist/utils/css.d.ts +19 -0
- package/dist/utils/css.js +13 -0
- package/dist/utils/css.js.map +1 -0
- package/dist/utils/date.d.ts +199 -0
- package/dist/utils/date.js +225 -0
- package/dist/utils/date.js.map +1 -0
- package/dist/utils/direction.d.ts +18 -0
- package/dist/utils/direction.js +8 -0
- package/dist/utils/direction.js.map +1 -0
- package/dist/utils/env.d.ts +10 -0
- package/dist/utils/file.d.ts +95 -0
- package/dist/utils/file.js +70 -0
- package/dist/utils/file.js.map +1 -0
- package/dist/utils/focus.d.ts +24 -0
- package/dist/utils/focus.js +13 -0
- package/dist/utils/focus.js.map +1 -0
- package/dist/utils/matcher.d.ts +13 -0
- package/dist/utils/matcher.js +11 -0
- package/dist/utils/matcher.js.map +1 -0
- package/dist/utils/number.d.ts +9 -0
- package/dist/utils/number.js +8 -0
- package/dist/utils/number.js.map +1 -0
- package/dist/utils/text.d.ts +19 -0
- package/dist/utils/text.js +12 -0
- package/dist/utils/text.js.map +1 -0
- package/dist/utils/time.d.ts +138 -0
- package/dist/utils/time.js +123 -0
- package/dist/utils/time.js.map +1 -0
- package/dist/utils/vnode.d.ts +21 -0
- package/dist/utils/vnode.js +14 -0
- package/dist/utils/vnode.js.map +1 -0
- package/package.json +114 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { IconSource } from '../VIcon/types.js';
|
|
2
|
+
export type BadgeTone = 'neutral' | 'accent' | 'danger' | 'success' | 'warning';
|
|
3
|
+
export type BadgeOverlayPosition = 'top' | 'bottom';
|
|
4
|
+
interface BadgeProps {
|
|
5
|
+
/**
|
|
6
|
+
* The meaning the badge carries, expressed as a colour. The pill is filled with
|
|
7
|
+
* it and the text adapts to stay readable; there is a single, fully coloured
|
|
8
|
+
* rendering, so no variant to choose alongside it.
|
|
9
|
+
*/
|
|
10
|
+
tone?: BadgeTone;
|
|
11
|
+
/**
|
|
12
|
+
* A colour of your own (hex, CSS name or `oklch()`), which replaces the tone. On
|
|
13
|
+
* browsers that support `contrast-color()` the text turns black or white by
|
|
14
|
+
* itself; everywhere else it falls back to white, so with a light colour the
|
|
15
|
+
* contrast is yours to check.
|
|
16
|
+
*/
|
|
17
|
+
color?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The number to display. Anything above 99 is shown as "99+", so that a busy
|
|
20
|
+
* counter cannot stretch the pill indefinitely.
|
|
21
|
+
*/
|
|
22
|
+
count?: number;
|
|
23
|
+
/**
|
|
24
|
+
* A single icon shown instead of a number: an icon name, or an explicit render
|
|
25
|
+
* (the VIcon contract). It takes precedence over `count`, and is ignored when the
|
|
26
|
+
* badge is a `dot`.
|
|
27
|
+
*/
|
|
28
|
+
icon?: IconSource;
|
|
29
|
+
/**
|
|
30
|
+
* Reduces the badge to a 10px dot with no content — the discreet way to signal
|
|
31
|
+
* that something is new without saying how much.
|
|
32
|
+
*/
|
|
33
|
+
dot?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Pins the badge to a corner of the target element instead of placing it beside
|
|
36
|
+
* it. It does nothing when the badge has no target.
|
|
37
|
+
*/
|
|
38
|
+
overlay?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Which corner an `overlay` badge is pinned to: the top one by default, the
|
|
41
|
+
* bottom one for a marker that belongs at the foot of its target — a presence dot
|
|
42
|
+
* under an avatar, for instance. The horizontal side follows the reading
|
|
43
|
+
* direction and is not configurable. It does nothing without `overlay`.
|
|
44
|
+
*/
|
|
45
|
+
overlayPosition?: BadgeOverlayPosition;
|
|
46
|
+
/**
|
|
47
|
+
* Draws a 2px ring in the colour of the surface behind the badge
|
|
48
|
+
* (`--vectis-color-surface`, overridable per subtree), which detaches it from a
|
|
49
|
+
* busy target such as a picture.
|
|
50
|
+
*/
|
|
51
|
+
bordered?: boolean;
|
|
52
|
+
}
|
|
53
|
+
type __VLS_Slots = {
|
|
54
|
+
/**
|
|
55
|
+
* The element the badge belongs to. Without it the badge stands on its own; with
|
|
56
|
+
* it, the badge is placed beside the element, or in its corner under `overlay`.
|
|
57
|
+
*/
|
|
58
|
+
default?(): unknown;
|
|
59
|
+
};
|
|
60
|
+
declare const __VLS_base: import('vue').DefineComponent<BadgeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BadgeProps> & Readonly<{}>, {
|
|
61
|
+
tone: BadgeTone;
|
|
62
|
+
icon: IconSource;
|
|
63
|
+
color: string;
|
|
64
|
+
count: number;
|
|
65
|
+
overlayPosition: BadgeOverlayPosition;
|
|
66
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
67
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
68
|
+
declare const _default: typeof __VLS_export;
|
|
69
|
+
export default _default;
|
|
70
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
71
|
+
new (): {
|
|
72
|
+
$slots: S;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VBadge.js","names":[],"sources":["../../../src/components/VBadge/VBadge.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @core\n/**\n * A small pill carrying one piece of information at a glance: a count of unread\n * items, or a single icon. It is never interactive — there is nothing to click and\n * nothing to focus — and it either stands on its own, sits next to an element, or\n * is pinned to one of that element's corners.\n *\n * It is made of HTML and CSS alone. The only JavaScript decides what to render:\n * whether a target element was given at all, capping the counter at \"99+\", and\n * handing a custom colour to the stylesheet as `--custom-color`.\n */\nimport { computed, useSlots } from 'vue'\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport type { IconSource } from '../VIcon/types'\n\nexport type BadgeTone = 'neutral' | 'accent' | 'danger' | 'success' | 'warning'\nexport type BadgeOverlayPosition = 'top' | 'bottom'\n\ninterface BadgeProps {\n /**\n * The meaning the badge carries, expressed as a colour. The pill is filled with\n * it and the text adapts to stay readable; there is a single, fully coloured\n * rendering, so no variant to choose alongside it.\n */\n tone?: BadgeTone\n /**\n * A colour of your own (hex, CSS name or `oklch()`), which replaces the tone. On\n * browsers that support `contrast-color()` the text turns black or white by\n * itself; everywhere else it falls back to white, so with a light colour the\n * contrast is yours to check.\n */\n color?: string\n /**\n * The number to display. Anything above 99 is shown as \"99+\", so that a busy\n * counter cannot stretch the pill indefinitely.\n */\n count?: number\n /**\n * A single icon shown instead of a number: an icon name, or an explicit render\n * (the VIcon contract). It takes precedence over `count`, and is ignored when the\n * badge is a `dot`.\n */\n icon?: IconSource\n /**\n * Reduces the badge to a 10px dot with no content — the discreet way to signal\n * that something is new without saying how much.\n */\n dot?: boolean\n /**\n * Pins the badge to a corner of the target element instead of placing it beside\n * it. It does nothing when the badge has no target.\n */\n overlay?: boolean\n /**\n * Which corner an `overlay` badge is pinned to: the top one by default, the\n * bottom one for a marker that belongs at the foot of its target — a presence dot\n * under an avatar, for instance. The horizontal side follows the reading\n * direction and is not configurable. It does nothing without `overlay`.\n */\n overlayPosition?: BadgeOverlayPosition\n /**\n * Draws a 2px ring in the colour of the surface behind the badge\n * (`--vectis-color-surface`, overridable per subtree), which detaches it from a\n * busy target such as a picture.\n */\n bordered?: boolean\n}\n\nconst props = withDefaults(defineProps<BadgeProps>(), {\n tone: 'accent',\n color: undefined,\n count: undefined,\n icon: undefined,\n overlayPosition: 'top',\n})\n\ndefineSlots<{\n /**\n * The element the badge belongs to. Without it the badge stands on its own; with\n * it, the badge is placed beside the element, or in its corner under `overlay`.\n */\n default?(): unknown\n}>()\n\nconst slots = useSlots()\nconst hasTarget = computed(() => slots.default !== undefined)\n\n/** The counter as it is actually displayed: anything past 99 becomes \"99+\". */\nconst displayCount = computed(() =>\n props.count !== undefined && props.count > 99 ? '99+' : props.count,\n)\n\n/*\n * The attributes of the pill itself. The template has two roots — one wrapping a\n * target, one standing alone — and both render the same badge, so the attributes\n * are computed once here rather than written twice.\n */\nconst badgeAttrs = computed(() => ({\n 'data-tone': props.tone,\n 'data-custom': props.color !== undefined ? '' : undefined,\n 'data-dot': props.dot ? '' : undefined,\n 'data-icon-only': !props.dot && props.icon ? '' : undefined,\n 'data-bordered': props.bordered ? '' : undefined,\n style: props.color !== undefined ? { '--custom-color': props.color } : undefined,\n}))\n</script>\n\n<template>\n <span\n v-if=\"hasTarget\"\n class=\"v-badge-host\"\n :data-overlay=\"overlay ? '' : undefined\"\n :data-overlay-position=\"overlayPosition\"\n >\n <slot />\n <span class=\"v-badge\" v-bind=\"badgeAttrs\">\n <template v-if=\"!dot\">\n <VIcon v-if=\"icon\" v-bind=\"iconProps(icon)\" />\n <template v-else>{{ displayCount }}</template>\n </template>\n </span>\n </span>\n <span v-else class=\"v-badge\" v-bind=\"badgeAttrs\">\n <template v-if=\"!dot\">\n <VIcon v-if=\"icon\" v-bind=\"iconProps(icon)\" />\n <template v-else>{{ displayCount }}</template>\n </template>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n .v-badge-host {\n position: relative;\n display: inline-flex;\n align-items: center;\n gap: var(--vectis-space-2); /* the space between the target and the badge, in inline mode */\n }\n\n .v-badge {\n --vectis-icon-size: var(--vectis-icon-size-sm);\n --vectis-icon-opsz: 20;\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: var(--vectis-control-size-badge-h);\n /* A minimum width equal to the height, with a small padding on top, is what\n makes a one- or two-digit counter come out round rather than oval. */\n min-width: var(--vectis-control-size-badge-h);\n padding-inline: var(--vectis-space-1);\n border-radius: var(--vectis-radius-pill);\n background: var(--badge-bg);\n font-family: var(--vectis-text-family);\n font-size: var(--vectis-text-caption-size);\n font-weight: var(--vectis-text-control-weight);\n line-height: var(--vectis-text-control-leading);\n color: var(--tone-text-fallback);\n }\n\n @supports (color: contrast-color(red)) {\n .v-badge {\n color: contrast-color(var(--badge-bg));\n }\n }\n\n .v-badge[data-tone='accent'] {\n --badge-bg: var(--vectis-color-accent);\n --tone-text-fallback: var(--vectis-color-text-on-accent);\n }\n\n .v-badge[data-tone='danger'] {\n --badge-bg: var(--vectis-color-danger);\n --tone-text-fallback: var(--vectis-color-text-on-accent);\n }\n\n .v-badge[data-tone='success'] {\n --badge-bg: var(--vectis-color-success);\n --tone-text-fallback: var(--vectis-color-text-on-accent);\n }\n\n .v-badge[data-tone='warning'] {\n --badge-bg: var(--vectis-color-warning);\n --tone-text-fallback: var(--vectis-color-text-on-warning);\n }\n\n /* The neutral tone inverts text and surface rather than using a grey. A grey of\n the text-muted kind resolves to neutral-400 in the dark theme, where the white\n fallback would no longer contrast with it; with the inversion, the fallback and\n contrast-color() agree in both themes. */\n .v-badge[data-tone='neutral'] {\n --badge-bg: var(--vectis-color-text);\n --tone-text-fallback: var(--vectis-color-surface);\n }\n\n /* Placed after the tones on purpose: the specificity is the same, so it is the\n order that lets a custom colour override the tone it replaces. */\n .v-badge[data-custom] {\n --badge-bg: var(--custom-color);\n --tone-text-fallback: var(--vectis-color-text-on-accent);\n }\n\n .v-badge[data-icon-only] {\n padding: 0;\n }\n\n .v-badge[data-dot] {\n width: var(--vectis-control-size-badge-dot);\n height: var(--vectis-control-size-badge-dot);\n min-width: 0;\n padding: 0;\n }\n\n .v-badge[data-bordered] {\n box-shadow: 0 0 0 2px var(--vectis-color-surface);\n }\n\n /* The tuck-in offset is a ratio of the badge's own size, so it stays proportionate\n across the pill, the dot and the icon. Each half of it is held in its own\n variable: the corner and the reading direction each flip ONE axis, and writing\n the whole `translate` again in each branch would make the two multiply — four\n rules to keep in step by hand for two independent decisions. */\n .v-badge-host[data-overlay] > .v-badge {\n --badge-overlay-x: 25%;\n --badge-overlay-y: -25%;\n\n position: absolute;\n inset-block: 0 auto;\n inset-inline-end: 0;\n translate: var(--badge-overlay-x) var(--badge-overlay-y);\n }\n\n .v-badge-host[data-overlay][data-overlay-position='bottom'] > .v-badge {\n --badge-overlay-y: 25%;\n\n inset-block: auto 0;\n }\n\n /* In a right-to-left direction the logical corner moves to the left, so the\n horizontal half of the translation has to flip with it — `translate` is a\n physical property and knows nothing about direction. */\n .v-badge-host[data-overlay]:dir(rtl) > .v-badge {\n --badge-overlay-x: -25%;\n }\n}\n</style>\n"],"mappings":""}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import e from "../VIcon/VIcon.js";
|
|
2
|
+
import { iconProps as t } from "../VIcon/iconProps.js";
|
|
3
|
+
import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, defineComponent as l, mergeProps as u, normalizeProps as d, openBlock as f, renderSlot as p, toDisplayString as m, unref as h, useSlots as g } from "vue";
|
|
4
|
+
//#region src/components/VBadge/VBadge.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var _ = ["data-overlay", "data-overlay-position"], v = /*@__PURE__*/ l({
|
|
6
|
+
__name: "VBadge",
|
|
7
|
+
props: {
|
|
8
|
+
tone: { default: "accent" },
|
|
9
|
+
color: { default: void 0 },
|
|
10
|
+
count: { default: void 0 },
|
|
11
|
+
icon: { default: void 0 },
|
|
12
|
+
dot: { type: Boolean },
|
|
13
|
+
overlay: { type: Boolean },
|
|
14
|
+
overlayPosition: { default: "top" },
|
|
15
|
+
bordered: { type: Boolean }
|
|
16
|
+
},
|
|
17
|
+
setup(l) {
|
|
18
|
+
let v = l, y = g(), b = r(() => y.default !== void 0), x = r(() => v.count !== void 0 && v.count > 99 ? "99+" : v.count), S = r(() => ({
|
|
19
|
+
"data-tone": v.tone,
|
|
20
|
+
"data-custom": v.color === void 0 ? void 0 : "",
|
|
21
|
+
"data-dot": v.dot ? "" : void 0,
|
|
22
|
+
"data-icon-only": !v.dot && v.icon ? "" : void 0,
|
|
23
|
+
"data-bordered": v.bordered ? "" : void 0,
|
|
24
|
+
style: v.color === void 0 ? void 0 : { "--custom-color": v.color }
|
|
25
|
+
}));
|
|
26
|
+
return (r, g) => b.value ? (f(), o("span", {
|
|
27
|
+
key: 0,
|
|
28
|
+
class: "v-badge-host",
|
|
29
|
+
"data-overlay": l.overlay ? "" : void 0,
|
|
30
|
+
"data-overlay-position": l.overlayPosition
|
|
31
|
+
}, [p(r.$slots, "default"), s("span", u({ class: "v-badge" }, S.value), [l.dot ? a("", !0) : (f(), o(n, { key: 0 }, [l.icon ? (f(), i(e, d(u({ key: 0 }, h(t)(l.icon))), null, 16)) : (f(), o(n, { key: 1 }, [c(m(x.value), 1)], 64))], 64))], 16)], 8, _)) : (f(), o("span", u({
|
|
32
|
+
key: 1,
|
|
33
|
+
class: "v-badge"
|
|
34
|
+
}, S.value), [l.dot ? a("", !0) : (f(), o(n, { key: 0 }, [l.icon ? (f(), i(e, d(u({ key: 0 }, h(t)(l.icon))), null, 16)) : (f(), o(n, { key: 1 }, [c(m(x.value), 1)], 64))], 64))], 16));
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
//#endregion
|
|
38
|
+
export { v as default };
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=VBadge.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VBadge.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VBadge/VBadge.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @core\n/**\n * A small pill carrying one piece of information at a glance: a count of unread\n * items, or a single icon. It is never interactive — there is nothing to click and\n * nothing to focus — and it either stands on its own, sits next to an element, or\n * is pinned to one of that element's corners.\n *\n * It is made of HTML and CSS alone. The only JavaScript decides what to render:\n * whether a target element was given at all, capping the counter at \"99+\", and\n * handing a custom colour to the stylesheet as `--custom-color`.\n */\nimport { computed, useSlots } from 'vue'\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport type { IconSource } from '../VIcon/types'\n\nexport type BadgeTone = 'neutral' | 'accent' | 'danger' | 'success' | 'warning'\nexport type BadgeOverlayPosition = 'top' | 'bottom'\n\ninterface BadgeProps {\n /**\n * The meaning the badge carries, expressed as a colour. The pill is filled with\n * it and the text adapts to stay readable; there is a single, fully coloured\n * rendering, so no variant to choose alongside it.\n */\n tone?: BadgeTone\n /**\n * A colour of your own (hex, CSS name or `oklch()`), which replaces the tone. On\n * browsers that support `contrast-color()` the text turns black or white by\n * itself; everywhere else it falls back to white, so with a light colour the\n * contrast is yours to check.\n */\n color?: string\n /**\n * The number to display. Anything above 99 is shown as \"99+\", so that a busy\n * counter cannot stretch the pill indefinitely.\n */\n count?: number\n /**\n * A single icon shown instead of a number: an icon name, or an explicit render\n * (the VIcon contract). It takes precedence over `count`, and is ignored when the\n * badge is a `dot`.\n */\n icon?: IconSource\n /**\n * Reduces the badge to a 10px dot with no content — the discreet way to signal\n * that something is new without saying how much.\n */\n dot?: boolean\n /**\n * Pins the badge to a corner of the target element instead of placing it beside\n * it. It does nothing when the badge has no target.\n */\n overlay?: boolean\n /**\n * Which corner an `overlay` badge is pinned to: the top one by default, the\n * bottom one for a marker that belongs at the foot of its target — a presence dot\n * under an avatar, for instance. The horizontal side follows the reading\n * direction and is not configurable. It does nothing without `overlay`.\n */\n overlayPosition?: BadgeOverlayPosition\n /**\n * Draws a 2px ring in the colour of the surface behind the badge\n * (`--vectis-color-surface`, overridable per subtree), which detaches it from a\n * busy target such as a picture.\n */\n bordered?: boolean\n}\n\nconst props = withDefaults(defineProps<BadgeProps>(), {\n tone: 'accent',\n color: undefined,\n count: undefined,\n icon: undefined,\n overlayPosition: 'top',\n})\n\ndefineSlots<{\n /**\n * The element the badge belongs to. Without it the badge stands on its own; with\n * it, the badge is placed beside the element, or in its corner under `overlay`.\n */\n default?(): unknown\n}>()\n\nconst slots = useSlots()\nconst hasTarget = computed(() => slots.default !== undefined)\n\n/** The counter as it is actually displayed: anything past 99 becomes \"99+\". */\nconst displayCount = computed(() =>\n props.count !== undefined && props.count > 99 ? '99+' : props.count,\n)\n\n/*\n * The attributes of the pill itself. The template has two roots — one wrapping a\n * target, one standing alone — and both render the same badge, so the attributes\n * are computed once here rather than written twice.\n */\nconst badgeAttrs = computed(() => ({\n 'data-tone': props.tone,\n 'data-custom': props.color !== undefined ? '' : undefined,\n 'data-dot': props.dot ? '' : undefined,\n 'data-icon-only': !props.dot && props.icon ? '' : undefined,\n 'data-bordered': props.bordered ? '' : undefined,\n style: props.color !== undefined ? { '--custom-color': props.color } : undefined,\n}))\n</script>\n\n<template>\n <span\n v-if=\"hasTarget\"\n class=\"v-badge-host\"\n :data-overlay=\"overlay ? '' : undefined\"\n :data-overlay-position=\"overlayPosition\"\n >\n <slot />\n <span class=\"v-badge\" v-bind=\"badgeAttrs\">\n <template v-if=\"!dot\">\n <VIcon v-if=\"icon\" v-bind=\"iconProps(icon)\" />\n <template v-else>{{ displayCount }}</template>\n </template>\n </span>\n </span>\n <span v-else class=\"v-badge\" v-bind=\"badgeAttrs\">\n <template v-if=\"!dot\">\n <VIcon v-if=\"icon\" v-bind=\"iconProps(icon)\" />\n <template v-else>{{ displayCount }}</template>\n </template>\n </span>\n</template>\n\n<style>\n@layer vectis.components {\n .v-badge-host {\n position: relative;\n display: inline-flex;\n align-items: center;\n gap: var(--vectis-space-2); /* the space between the target and the badge, in inline mode */\n }\n\n .v-badge {\n --vectis-icon-size: var(--vectis-icon-size-sm);\n --vectis-icon-opsz: 20;\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: var(--vectis-control-size-badge-h);\n /* A minimum width equal to the height, with a small padding on top, is what\n makes a one- or two-digit counter come out round rather than oval. */\n min-width: var(--vectis-control-size-badge-h);\n padding-inline: var(--vectis-space-1);\n border-radius: var(--vectis-radius-pill);\n background: var(--badge-bg);\n font-family: var(--vectis-text-family);\n font-size: var(--vectis-text-caption-size);\n font-weight: var(--vectis-text-control-weight);\n line-height: var(--vectis-text-control-leading);\n color: var(--tone-text-fallback);\n }\n\n @supports (color: contrast-color(red)) {\n .v-badge {\n color: contrast-color(var(--badge-bg));\n }\n }\n\n .v-badge[data-tone='accent'] {\n --badge-bg: var(--vectis-color-accent);\n --tone-text-fallback: var(--vectis-color-text-on-accent);\n }\n\n .v-badge[data-tone='danger'] {\n --badge-bg: var(--vectis-color-danger);\n --tone-text-fallback: var(--vectis-color-text-on-accent);\n }\n\n .v-badge[data-tone='success'] {\n --badge-bg: var(--vectis-color-success);\n --tone-text-fallback: var(--vectis-color-text-on-accent);\n }\n\n .v-badge[data-tone='warning'] {\n --badge-bg: var(--vectis-color-warning);\n --tone-text-fallback: var(--vectis-color-text-on-warning);\n }\n\n /* The neutral tone inverts text and surface rather than using a grey. A grey of\n the text-muted kind resolves to neutral-400 in the dark theme, where the white\n fallback would no longer contrast with it; with the inversion, the fallback and\n contrast-color() agree in both themes. */\n .v-badge[data-tone='neutral'] {\n --badge-bg: var(--vectis-color-text);\n --tone-text-fallback: var(--vectis-color-surface);\n }\n\n /* Placed after the tones on purpose: the specificity is the same, so it is the\n order that lets a custom colour override the tone it replaces. */\n .v-badge[data-custom] {\n --badge-bg: var(--custom-color);\n --tone-text-fallback: var(--vectis-color-text-on-accent);\n }\n\n .v-badge[data-icon-only] {\n padding: 0;\n }\n\n .v-badge[data-dot] {\n width: var(--vectis-control-size-badge-dot);\n height: var(--vectis-control-size-badge-dot);\n min-width: 0;\n padding: 0;\n }\n\n .v-badge[data-bordered] {\n box-shadow: 0 0 0 2px var(--vectis-color-surface);\n }\n\n /* The tuck-in offset is a ratio of the badge's own size, so it stays proportionate\n across the pill, the dot and the icon. Each half of it is held in its own\n variable: the corner and the reading direction each flip ONE axis, and writing\n the whole `translate` again in each branch would make the two multiply — four\n rules to keep in step by hand for two independent decisions. */\n .v-badge-host[data-overlay] > .v-badge {\n --badge-overlay-x: 25%;\n --badge-overlay-y: -25%;\n\n position: absolute;\n inset-block: 0 auto;\n inset-inline-end: 0;\n translate: var(--badge-overlay-x) var(--badge-overlay-y);\n }\n\n .v-badge-host[data-overlay][data-overlay-position='bottom'] > .v-badge {\n --badge-overlay-y: 25%;\n\n inset-block: auto 0;\n }\n\n /* In a right-to-left direction the logical corner moves to the left, so the\n horizontal half of the translation has to flip with it — `translate` is a\n physical property and knows nothing about direction. */\n .v-badge-host[data-overlay]:dir(rtl) > .v-badge {\n --badge-overlay-x: -25%;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;EAuEA,IAAM,IAAQ,GAgBR,IAAQ,EAAS,GACjB,IAAY,QAAe,EAAM,YAAY,KAAA,CAAS,GAGtD,IAAe,QACnB,EAAM,UAAU,KAAA,KAAa,EAAM,QAAQ,KAAK,QAAQ,EAAM,KAChE,GAOM,IAAa,SAAgB;GACjC,aAAa,EAAM;GACnB,eAAe,EAAM,UAAU,KAAA,IAAiB,KAAA,IAAL;GAC3C,YAAY,EAAM,MAAM,KAAK,KAAA;GAC7B,kBAAkB,CAAC,EAAM,OAAO,EAAM,OAAO,KAAK,KAAA;GAClD,iBAAiB,EAAM,WAAW,KAAK,KAAA;GACvC,OAAO,EAAM,UAAU,KAAA,IAAgD,KAAA,IAApC,EAAE,kBAAkB,EAAM,MAAM;EACrE,EAAE;mBAKQ,EAAA,SAAA,EAAA,GADR,EAaO,QAAA;;GAXL,OAAM;GACL,gBAAc,EAAA,UAAO,KAAQ,KAAA;GAC7B,yBAAuB,EAAA;MAExB,EAAQ,EAAA,QAAA,SAAA,GACR,EAKO,QALP,EAKO,EALD,OAAM,UAAS,GAAS,EAAA,KAAU,GAAA,CACrB,EAAA,MAEiB,EAAA,IAAA,EAAA,KAFjB,EAAA,GAAjB,EAGW,GAAA,EAAA,KAAA,EAAA,GAAA,CAFI,EAAA,QAAA,EAAA,GAAb,EAA8C,GAAA,EAAA,EAAA,EAAA,KAAA,EAAA,GAAnB,EAAA,CAAA,CAAS,CAAC,EAAA,IAAI,CAAA,CAAA,GAAA,MAAA,EAAA,MAAA,EAAA,GACzC,EAA8C,GAAA,EAAA,KAAA,EAAA,GAAA,CAAA,EAAA,EAA1B,EAAA,KAAY,GAAA,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,EAAA,GAAA,EAAA,CAAA,GAAA,GAAA,CAAA,MAAA,EAAA,GAItC,EAKO,QALP,EAKO;;GALM,OAAM;KAAkB,EAAA,KAAU,GAAA,CAC5B,EAAA,MAEiB,EAAA,IAAA,EAAA,KAFjB,EAAA,GAAjB,EAGW,GAAA,EAAA,KAAA,EAAA,GAAA,CAFI,EAAA,QAAA,EAAA,GAAb,EAA8C,GAAA,EAAA,EAAA,EAAA,KAAA,EAAA,GAAnB,EAAA,CAAA,CAAS,CAAC,EAAA,IAAI,CAAA,CAAA,GAAA,MAAA,EAAA,MAAA,EAAA,GACzC,EAA8C,GAAA,EAAA,KAAA,EAAA,GAAA,CAAA,EAAA,EAA1B,EAAA,KAAY,GAAA,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,EAAA,GAAA,EAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
|
|
2
|
+
@layer vectis.components{.v-breadcrumb{--vectis-icon-size:var(--vectis-icon-size-sm);--vectis-icon-opsz:20}.v-breadcrumb-list{align-items:center;gap:var(--vectis-space-2);font-family:var(--vectis-text-family);font-size:var(--vectis-text-body-md-size);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}.v-breadcrumb-item{align-items:center;gap:var(--vectis-space-2);color:var(--vectis-color-text-muted);display:inline-flex}.v-breadcrumb-list>.v-breadcrumb-item:first-child>.v-breadcrumb-separator{display:none}.v-breadcrumb-separator{color:var(--vectis-color-text-subtle)}.v-breadcrumb-link{align-items:center;gap:var(--vectis-space-1);color:var(--vectis-color-text-muted);border-radius:var(--vectis-radius-xs);transition:color var(--vectis-duration-fast) var(--vectis-ease-default);text-decoration:none;display:inline-flex}.v-breadcrumb-link:hover{color:var(--vectis-color-text);text-decoration:underline}.v-breadcrumb-link:focus-visible{outline:var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);outline-offset:var(--vectis-focus-ring-offset)}.v-breadcrumb-link[aria-current=page]{color:var(--vectis-color-text);font-weight:var(--vectis-text-label-weight)}@media (prefers-reduced-motion:reduce){.v-breadcrumb-link{transition:none}}}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { IconSource } from '../VIcon/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* A breadcrumb trail: the path that leads to the page being read, from the most
|
|
4
|
+
* general section down to the current one. It is a `<nav>` holding an ordered list,
|
|
5
|
+
* built entirely from the `items` prop — nothing is read from the browser, so the
|
|
6
|
+
* server and the client render exactly the same thing.
|
|
7
|
+
*
|
|
8
|
+
* The separators between the segments are decorative icons, hidden from screen
|
|
9
|
+
* readers, and the very first one is removed in CSS rather than by a condition in
|
|
10
|
+
* the markup. The current page is found by comparing each segment's address with
|
|
11
|
+
* `currentPath`: it is marked with `aria-current="page"` and stays a working link,
|
|
12
|
+
* as the ARIA authoring practices recommend. When the trail grows past `maxItems`,
|
|
13
|
+
* the middle segments are folded into a menu opened by an "…" button.
|
|
14
|
+
*/
|
|
15
|
+
export interface BreadcrumbItem {
|
|
16
|
+
/** The text shown for this segment. */
|
|
17
|
+
label: string;
|
|
18
|
+
/**
|
|
19
|
+
* Where the segment leads. It is also the value compared with `currentPath` to
|
|
20
|
+
* decide which segment is the current page.
|
|
21
|
+
*/
|
|
22
|
+
href: string;
|
|
23
|
+
/**
|
|
24
|
+
* An icon placed before the label: a Material Symbols Rounded name, an icon URL,
|
|
25
|
+
* or an explicit render (`{ src: '/logo.svg' }`, `{ component }`…).
|
|
26
|
+
*/
|
|
27
|
+
iconStart?: IconSource;
|
|
28
|
+
}
|
|
29
|
+
interface BreadcrumbProps {
|
|
30
|
+
/** The segments of the trail, ordered from the most general down to the deepest. */
|
|
31
|
+
items: BreadcrumbItem[];
|
|
32
|
+
/**
|
|
33
|
+
* The name screen readers announce for this navigation. It falls back to the
|
|
34
|
+
* wording of the DS dictionary, in the current language.
|
|
35
|
+
*/
|
|
36
|
+
label?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The address of the page being displayed. The segment whose `href` matches it is
|
|
39
|
+
* the current one; a trailing slash on either side makes no difference.
|
|
40
|
+
*/
|
|
41
|
+
currentPath?: string;
|
|
42
|
+
/**
|
|
43
|
+
* The icon drawn between two segments: an icon name, or an explicit render,
|
|
44
|
+
* exactly like `iconStart`.
|
|
45
|
+
*/
|
|
46
|
+
separator?: IconSource;
|
|
47
|
+
/**
|
|
48
|
+
* The length past which the trail folds: only the first segment, an "…" button and
|
|
49
|
+
* the last two remain, the button opening a menu that lists the hidden segments
|
|
50
|
+
* alone. Below 3 there would be nothing left to fold, so 3 is the effective
|
|
51
|
+
* minimum.
|
|
52
|
+
*/
|
|
53
|
+
maxItems?: number;
|
|
54
|
+
/**
|
|
55
|
+
* The name screen readers announce for the "…" button. It falls back to the
|
|
56
|
+
* wording of the DS dictionary.
|
|
57
|
+
*/
|
|
58
|
+
ellipsisLabel?: string;
|
|
59
|
+
}
|
|
60
|
+
declare const __VLS_export: import('vue').DefineComponent<BreadcrumbProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BreadcrumbProps> & Readonly<{}>, {
|
|
61
|
+
label: string;
|
|
62
|
+
separator: IconSource;
|
|
63
|
+
currentPath: string;
|
|
64
|
+
maxItems: number;
|
|
65
|
+
ellipsisLabel: string;
|
|
66
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
67
|
+
declare const _default: typeof __VLS_export;
|
|
68
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import './VBreadcrumb.css';
|
|
2
|
+
import e from "./VBreadcrumb.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/VBreadcrumb/VBreadcrumb.vue
|
|
5
|
+
var t = e;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { t as default };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=VBreadcrumb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VBreadcrumb.js","names":[],"sources":["../../../src/components/VBreadcrumb/VBreadcrumb.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { chevron_right as chevronRightIcon } from '../VIcon/icons/chevron_right'\nimport { more_horiz as moreHorizIcon } from '../VIcon/icons/more_horiz'\nimport type { IconSource } from '../VIcon/types'\nimport VIconButton from '../VIconButton/VIconButton.vue'\nimport VMenu from '../VMenu/VMenu.vue'\nimport VMenuItem from '../VMenu/VMenuItem.vue'\n\nimport { useAriaLabel } from '../../composables/useAriaLabel'\nimport { useMessages } from '../../i18n/state'\n\n// @ssr @core\n/**\n * A breadcrumb trail: the path that leads to the page being read, from the most\n * general section down to the current one. It is a `<nav>` holding an ordered list,\n * built entirely from the `items` prop — nothing is read from the browser, so the\n * server and the client render exactly the same thing.\n *\n * The separators between the segments are decorative icons, hidden from screen\n * readers, and the very first one is removed in CSS rather than by a condition in\n * the markup. The current page is found by comparing each segment's address with\n * `currentPath`: it is marked with `aria-current=\"page\"` and stays a working link,\n * as the ARIA authoring practices recommend. When the trail grows past `maxItems`,\n * the middle segments are folded into a menu opened by an \"…\" button.\n */\nexport interface BreadcrumbItem {\n /** The text shown for this segment. */\n label: string\n /**\n * Where the segment leads. It is also the value compared with `currentPath` to\n * decide which segment is the current page.\n */\n href: string\n /**\n * An icon placed before the label: a Material Symbols Rounded name, an icon URL,\n * or an explicit render (`{ src: '/logo.svg' }`, `{ component }`…).\n */\n iconStart?: IconSource\n}\n\ninterface BreadcrumbProps {\n /** The segments of the trail, ordered from the most general down to the deepest. */\n items: BreadcrumbItem[]\n /**\n * The name screen readers announce for this navigation. It falls back to the\n * wording of the DS dictionary, in the current language.\n */\n label?: string\n /**\n * The address of the page being displayed. The segment whose `href` matches it is\n * the current one; a trailing slash on either side makes no difference.\n */\n currentPath?: string\n /**\n * The icon drawn between two segments: an icon name, or an explicit render,\n * exactly like `iconStart`.\n */\n separator?: IconSource\n /**\n * The length past which the trail folds: only the first segment, an \"…\" button and\n * the last two remain, the button opening a menu that lists the hidden segments\n * alone. Below 3 there would be nothing left to fold, so 3 is the effective\n * minimum.\n */\n maxItems?: number\n /**\n * The name screen readers announce for the \"…\" button. It falls back to the\n * wording of the DS dictionary.\n */\n ellipsisLabel?: string\n}\n\nconst props = withDefaults(defineProps<BreadcrumbProps>(), {\n label: undefined,\n currentPath: undefined,\n separator: () => chevronRightIcon,\n maxItems: undefined,\n ellipsisLabel: undefined,\n})\n\nconst m = useMessages()\nconst ariaLabel = useAriaLabel(() => props.label ?? m.value.breadcrumb.label)\nconst resolvedEllipsisLabel = computed(() => props.ellipsisLabel ?? m.value.breadcrumb.ellipsis)\n\n/**\n * Drops a trailing slash so that `/docs` and `/docs/` compare as the same page; the\n * root `/` is left alone. Pure string handling, hence safe to run on the server.\n */\nfunction normalize(path: string): string {\n return path.length > 1 && path.endsWith('/') ? path.slice(0, -1) : path\n}\n\n// @a11y — this is what feeds `aria-current=\"page\"`, the only marker telling\n// assistive technology where the trail ends.\nfunction isCurrent(item: BreadcrumbItem): boolean {\n if (props.currentPath === undefined) return false\n return normalize(item.href) === normalize(props.currentPath)\n}\n\nconst truncated = computed(\n () => props.maxItems !== undefined && props.items.length > Math.max(props.maxItems, 3),\n)\n/** The segments folded into the menu: everything between the first and the last two. */\nconst hiddenItems = computed(() => (truncated.value ? props.items.slice(1, -2) : []))\n/**\n * The segments actually rendered in the list — when the trail is folded, the first\n * one followed by the last two.\n */\nconst visibleItems = computed(() =>\n truncated.value ? [props.items[0] as BreadcrumbItem, ...props.items.slice(-2)] : props.items,\n)\n</script>\n\n<template>\n <nav class=\"v-breadcrumb\" :aria-label=\"ariaLabel\">\n <ol class=\"v-breadcrumb-list\">\n <template v-for=\"(item, index) in visibleItems\" :key=\"item.href\">\n <li v-if=\"truncated && index === 1\" class=\"v-breadcrumb-item v-breadcrumb-ellipsis\">\n <VIcon class=\"v-breadcrumb-separator\" v-bind=\"iconProps(separator)\" />\n <VMenu compact>\n <template #trigger=\"{ triggerProps }\">\n <VIconButton size=\"sm\" compact :label=\"resolvedEllipsisLabel\" v-bind=\"triggerProps\">\n <VIcon :name=\"moreHorizIcon\" />\n </VIconButton>\n </template>\n <VMenuItem\n v-for=\"hidden in hiddenItems\"\n :key=\"hidden.href\"\n :href=\"hidden.href\"\n :label=\"hidden.label\"\n :icon-start=\"hidden.iconStart\"\n />\n </VMenu>\n </li>\n <li class=\"v-breadcrumb-item\">\n <VIcon class=\"v-breadcrumb-separator\" v-bind=\"iconProps(separator)\" />\n <a\n class=\"v-breadcrumb-link\"\n :href=\"item.href\"\n :aria-current=\"isCurrent(item) ? 'page' : undefined\"\n >\n <VIcon v-if=\"item.iconStart\" v-bind=\"iconProps(item.iconStart)\" />\n {{ item.label }}\n </a>\n </li>\n </template>\n </ol>\n </nav>\n</template>\n\n<style>\n@layer vectis.components {\n .v-breadcrumb {\n --vectis-icon-size: var(--vectis-icon-size-sm);\n --vectis-icon-opsz: 20;\n }\n\n .v-breadcrumb-list {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--vectis-space-2);\n margin: 0;\n padding: 0;\n list-style: none;\n font-family: var(--vectis-text-family);\n font-size: var(--vectis-text-body-md-size);\n }\n\n .v-breadcrumb-item {\n display: inline-flex;\n align-items: center;\n gap: var(--vectis-space-2);\n color: var(--vectis-color-text-muted);\n }\n\n .v-breadcrumb-list > .v-breadcrumb-item:first-child > .v-breadcrumb-separator {\n display: none;\n }\n\n .v-breadcrumb-separator {\n color: var(--vectis-color-text-subtle);\n }\n\n .v-breadcrumb-link {\n display: inline-flex;\n align-items: center;\n gap: var(--vectis-space-1);\n color: var(--vectis-color-text-muted);\n text-decoration: none;\n border-radius: var(--vectis-radius-xs);\n transition: color var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-breadcrumb-link:hover {\n color: var(--vectis-color-text);\n text-decoration: underline;\n }\n\n .v-breadcrumb-link:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: var(--vectis-focus-ring-offset);\n }\n\n .v-breadcrumb-link[aria-current='page'] {\n color: var(--vectis-color-text);\n font-weight: var(--vectis-text-label-weight);\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-breadcrumb-link {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":""}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { useMessages as e } from "../../i18n/state.js";
|
|
2
|
+
import t from "../VIcon/VIcon.js";
|
|
3
|
+
import { iconProps as n } from "../VIcon/iconProps.js";
|
|
4
|
+
import r from "../VIconButton/VIconButton.js";
|
|
5
|
+
import { chevron_right as i } from "../VIcon/icons/chevron_right.js";
|
|
6
|
+
import { more_horiz as a } from "../VIcon/icons/more_horiz.js";
|
|
7
|
+
import { useAriaLabel as o } from "../../composables/useAriaLabel.js";
|
|
8
|
+
import s from "../VMenu/VMenu.js";
|
|
9
|
+
import c from "../VMenu/VMenuItem.js";
|
|
10
|
+
import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as h, createVNode as g, defineComponent as _, mergeProps as v, openBlock as y, renderList as b, toDisplayString as x, unref as S, withCtx as C } from "vue";
|
|
11
|
+
//#region src/components/VBreadcrumb/VBreadcrumb.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
+
var w = ["aria-label"], T = { class: "v-breadcrumb-list" }, E = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "v-breadcrumb-item v-breadcrumb-ellipsis"
|
|
15
|
+
}, D = { class: "v-breadcrumb-item" }, O = ["href", "aria-current"], k = /*@__PURE__*/ _({
|
|
16
|
+
__name: "VBreadcrumb",
|
|
17
|
+
props: {
|
|
18
|
+
items: {},
|
|
19
|
+
label: { default: void 0 },
|
|
20
|
+
currentPath: { default: void 0 },
|
|
21
|
+
separator: { default: () => i },
|
|
22
|
+
maxItems: { default: void 0 },
|
|
23
|
+
ellipsisLabel: { default: void 0 }
|
|
24
|
+
},
|
|
25
|
+
setup(i) {
|
|
26
|
+
let _ = i, k = e(), A = o(() => _.label ?? k.value.breadcrumb.label), j = u(() => _.ellipsisLabel ?? k.value.breadcrumb.ellipsis);
|
|
27
|
+
function M(e) {
|
|
28
|
+
return e.length > 1 && e.endsWith("/") ? e.slice(0, -1) : e;
|
|
29
|
+
}
|
|
30
|
+
function N(e) {
|
|
31
|
+
return _.currentPath !== void 0 && M(e.href) === M(_.currentPath);
|
|
32
|
+
}
|
|
33
|
+
let P = u(() => _.maxItems !== void 0 && _.items.length > Math.max(_.maxItems, 3)), F = u(() => P.value ? _.items.slice(1, -2) : []), I = u(() => P.value ? [_.items[0], ..._.items.slice(-2)] : _.items);
|
|
34
|
+
return (e, o) => (y(), p("nav", {
|
|
35
|
+
class: "v-breadcrumb",
|
|
36
|
+
"aria-label": S(A)
|
|
37
|
+
}, [m("ol", T, [(y(!0), p(l, null, b(I.value, (e, o) => (y(), p(l, { key: e.href }, [P.value && o === 1 ? (y(), p("li", E, [g(t, v({ class: "v-breadcrumb-separator" }, { ref_for: !0 }, S(n)(i.separator)), null, 16), g(s, { compact: "" }, {
|
|
38
|
+
trigger: C(({ triggerProps: e }) => [g(r, v({
|
|
39
|
+
size: "sm",
|
|
40
|
+
compact: "",
|
|
41
|
+
label: j.value
|
|
42
|
+
}, { ref_for: !0 }, e), {
|
|
43
|
+
default: C(() => [g(t, { name: S(a) }, null, 8, ["name"])]),
|
|
44
|
+
_: 1
|
|
45
|
+
}, 16, ["label"])]),
|
|
46
|
+
default: C(() => [(y(!0), p(l, null, b(F.value, (e) => (y(), d(c, {
|
|
47
|
+
key: e.href,
|
|
48
|
+
href: e.href,
|
|
49
|
+
label: e.label,
|
|
50
|
+
"icon-start": e.iconStart
|
|
51
|
+
}, null, 8, [
|
|
52
|
+
"href",
|
|
53
|
+
"label",
|
|
54
|
+
"icon-start"
|
|
55
|
+
]))), 128))]),
|
|
56
|
+
_: 1
|
|
57
|
+
})])) : f("", !0), m("li", D, [g(t, v({ class: "v-breadcrumb-separator" }, { ref_for: !0 }, S(n)(i.separator)), null, 16), m("a", {
|
|
58
|
+
class: "v-breadcrumb-link",
|
|
59
|
+
href: e.href,
|
|
60
|
+
"aria-current": N(e) ? "page" : void 0
|
|
61
|
+
}, [e.iconStart ? (y(), d(t, v({
|
|
62
|
+
key: 0,
|
|
63
|
+
ref_for: !0
|
|
64
|
+
}, S(n)(e.iconStart)), null, 16)) : f("", !0), h(" " + x(e.label), 1)], 8, O)])], 64))), 128))])], 8, w));
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
//#endregion
|
|
68
|
+
export { k as default };
|
|
69
|
+
|
|
70
|
+
//# sourceMappingURL=VBreadcrumb.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VBreadcrumb.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VBreadcrumb/VBreadcrumb.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { chevron_right as chevronRightIcon } from '../VIcon/icons/chevron_right'\nimport { more_horiz as moreHorizIcon } from '../VIcon/icons/more_horiz'\nimport type { IconSource } from '../VIcon/types'\nimport VIconButton from '../VIconButton/VIconButton.vue'\nimport VMenu from '../VMenu/VMenu.vue'\nimport VMenuItem from '../VMenu/VMenuItem.vue'\n\nimport { useAriaLabel } from '../../composables/useAriaLabel'\nimport { useMessages } from '../../i18n/state'\n\n// @ssr @core\n/**\n * A breadcrumb trail: the path that leads to the page being read, from the most\n * general section down to the current one. It is a `<nav>` holding an ordered list,\n * built entirely from the `items` prop — nothing is read from the browser, so the\n * server and the client render exactly the same thing.\n *\n * The separators between the segments are decorative icons, hidden from screen\n * readers, and the very first one is removed in CSS rather than by a condition in\n * the markup. The current page is found by comparing each segment's address with\n * `currentPath`: it is marked with `aria-current=\"page\"` and stays a working link,\n * as the ARIA authoring practices recommend. When the trail grows past `maxItems`,\n * the middle segments are folded into a menu opened by an \"…\" button.\n */\nexport interface BreadcrumbItem {\n /** The text shown for this segment. */\n label: string\n /**\n * Where the segment leads. It is also the value compared with `currentPath` to\n * decide which segment is the current page.\n */\n href: string\n /**\n * An icon placed before the label: a Material Symbols Rounded name, an icon URL,\n * or an explicit render (`{ src: '/logo.svg' }`, `{ component }`…).\n */\n iconStart?: IconSource\n}\n\ninterface BreadcrumbProps {\n /** The segments of the trail, ordered from the most general down to the deepest. */\n items: BreadcrumbItem[]\n /**\n * The name screen readers announce for this navigation. It falls back to the\n * wording of the DS dictionary, in the current language.\n */\n label?: string\n /**\n * The address of the page being displayed. The segment whose `href` matches it is\n * the current one; a trailing slash on either side makes no difference.\n */\n currentPath?: string\n /**\n * The icon drawn between two segments: an icon name, or an explicit render,\n * exactly like `iconStart`.\n */\n separator?: IconSource\n /**\n * The length past which the trail folds: only the first segment, an \"…\" button and\n * the last two remain, the button opening a menu that lists the hidden segments\n * alone. Below 3 there would be nothing left to fold, so 3 is the effective\n * minimum.\n */\n maxItems?: number\n /**\n * The name screen readers announce for the \"…\" button. It falls back to the\n * wording of the DS dictionary.\n */\n ellipsisLabel?: string\n}\n\nconst props = withDefaults(defineProps<BreadcrumbProps>(), {\n label: undefined,\n currentPath: undefined,\n separator: () => chevronRightIcon,\n maxItems: undefined,\n ellipsisLabel: undefined,\n})\n\nconst m = useMessages()\nconst ariaLabel = useAriaLabel(() => props.label ?? m.value.breadcrumb.label)\nconst resolvedEllipsisLabel = computed(() => props.ellipsisLabel ?? m.value.breadcrumb.ellipsis)\n\n/**\n * Drops a trailing slash so that `/docs` and `/docs/` compare as the same page; the\n * root `/` is left alone. Pure string handling, hence safe to run on the server.\n */\nfunction normalize(path: string): string {\n return path.length > 1 && path.endsWith('/') ? path.slice(0, -1) : path\n}\n\n// @a11y — this is what feeds `aria-current=\"page\"`, the only marker telling\n// assistive technology where the trail ends.\nfunction isCurrent(item: BreadcrumbItem): boolean {\n if (props.currentPath === undefined) return false\n return normalize(item.href) === normalize(props.currentPath)\n}\n\nconst truncated = computed(\n () => props.maxItems !== undefined && props.items.length > Math.max(props.maxItems, 3),\n)\n/** The segments folded into the menu: everything between the first and the last two. */\nconst hiddenItems = computed(() => (truncated.value ? props.items.slice(1, -2) : []))\n/**\n * The segments actually rendered in the list — when the trail is folded, the first\n * one followed by the last two.\n */\nconst visibleItems = computed(() =>\n truncated.value ? [props.items[0] as BreadcrumbItem, ...props.items.slice(-2)] : props.items,\n)\n</script>\n\n<template>\n <nav class=\"v-breadcrumb\" :aria-label=\"ariaLabel\">\n <ol class=\"v-breadcrumb-list\">\n <template v-for=\"(item, index) in visibleItems\" :key=\"item.href\">\n <li v-if=\"truncated && index === 1\" class=\"v-breadcrumb-item v-breadcrumb-ellipsis\">\n <VIcon class=\"v-breadcrumb-separator\" v-bind=\"iconProps(separator)\" />\n <VMenu compact>\n <template #trigger=\"{ triggerProps }\">\n <VIconButton size=\"sm\" compact :label=\"resolvedEllipsisLabel\" v-bind=\"triggerProps\">\n <VIcon :name=\"moreHorizIcon\" />\n </VIconButton>\n </template>\n <VMenuItem\n v-for=\"hidden in hiddenItems\"\n :key=\"hidden.href\"\n :href=\"hidden.href\"\n :label=\"hidden.label\"\n :icon-start=\"hidden.iconStart\"\n />\n </VMenu>\n </li>\n <li class=\"v-breadcrumb-item\">\n <VIcon class=\"v-breadcrumb-separator\" v-bind=\"iconProps(separator)\" />\n <a\n class=\"v-breadcrumb-link\"\n :href=\"item.href\"\n :aria-current=\"isCurrent(item) ? 'page' : undefined\"\n >\n <VIcon v-if=\"item.iconStart\" v-bind=\"iconProps(item.iconStart)\" />\n {{ item.label }}\n </a>\n </li>\n </template>\n </ol>\n </nav>\n</template>\n\n<style>\n@layer vectis.components {\n .v-breadcrumb {\n --vectis-icon-size: var(--vectis-icon-size-sm);\n --vectis-icon-opsz: 20;\n }\n\n .v-breadcrumb-list {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--vectis-space-2);\n margin: 0;\n padding: 0;\n list-style: none;\n font-family: var(--vectis-text-family);\n font-size: var(--vectis-text-body-md-size);\n }\n\n .v-breadcrumb-item {\n display: inline-flex;\n align-items: center;\n gap: var(--vectis-space-2);\n color: var(--vectis-color-text-muted);\n }\n\n .v-breadcrumb-list > .v-breadcrumb-item:first-child > .v-breadcrumb-separator {\n display: none;\n }\n\n .v-breadcrumb-separator {\n color: var(--vectis-color-text-subtle);\n }\n\n .v-breadcrumb-link {\n display: inline-flex;\n align-items: center;\n gap: var(--vectis-space-1);\n color: var(--vectis-color-text-muted);\n text-decoration: none;\n border-radius: var(--vectis-radius-xs);\n transition: color var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-breadcrumb-link:hover {\n color: var(--vectis-color-text);\n text-decoration: underline;\n }\n\n .v-breadcrumb-link:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: var(--vectis-focus-ring-offset);\n }\n\n .v-breadcrumb-link[aria-current='page'] {\n color: var(--vectis-color-text);\n font-weight: var(--vectis-text-label-weight);\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-breadcrumb-link {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EA4EA,IAAM,IAAQ,GAQR,IAAI,EAAY,GAChB,IAAY,QAAmB,EAAM,SAAS,EAAE,MAAM,WAAW,KAAK,GACtE,IAAwB,QAAe,EAAM,iBAAiB,EAAE,MAAM,WAAW,QAAQ;EAM/F,SAAS,EAAU,GAAsB;GACvC,OAAO,EAAK,SAAS,KAAK,EAAK,SAAS,GAAG,IAAI,EAAK,MAAM,GAAG,EAAE,IAAI;EACrE;EAIA,SAAS,EAAU,GAA+B;GAEhD,OADI,EAAM,gBAAgB,KAAA,KACnB,EAAU,EAAK,IAAI,MAAM,EAAU,EAAM,WAAW;EAC7D;EAEA,IAAM,IAAY,QACV,EAAM,aAAa,KAAA,KAAa,EAAM,MAAM,SAAS,KAAK,IAAI,EAAM,UAAU,CAAC,CACvF,GAEM,IAAc,QAAgB,EAAU,QAAQ,EAAM,MAAM,MAAM,GAAG,EAAE,IAAI,CAAC,CAAE,GAK9E,IAAe,QACnB,EAAU,QAAQ,CAAC,EAAM,MAAM,IAAsB,GAAG,EAAM,MAAM,MAAM,EAAE,CAAC,IAAI,EAAM,KACzF;yBAIE,EAiCM,OAAA;GAjCD,OAAM;GAAgB,cAAY,EAAA,CAAA;MACrC,EA+BK,MA/BL,GA+BK,EAAA,EAAA,EAAA,GA9BH,EA6BW,GAAA,MAAA,EA7BuB,EAAA,QAAhB,GAAM,wBAA8B,EAAK,KAAA,GAAA,CAC/C,EAAA,SAAa,MAAK,KAAA,EAAA,GAA5B,EAgBK,MAhBL,GAgBK,CAfH,EAAsE,GAAtE,EAAsE,EAA/D,OAAM,yBAAwB,GAAA,EAAA,SAAA,GAAA,GAAS,EAAA,CAAA,CAAS,CAAC,EAAA,SAAS,CAAA,GAAA,MAAA,EAAA,GACjE,EAaQ,GAAA,EAbD,SAAA,GAAO,GAAA;GACD,SAAO,GAGF,EAHM,sBAAY,CAChC,EAEc,GAFd,EAEc;IAFD,MAAK;IAAK,SAAA;IAAS,OAAO,EAAA;uBAA+B,CAAY,GAAA;qBACjD,CAA/B,EAA+B,GAAA,EAAvB,MAAM,EAAA,CAAA,EAAa,GAAA,MAAA,GAAA,CAAA,MAAA,CAAA,CAAA,CAAA;;;oBAIA,EAAA,EAAA,EAAA,GAD/B,EAME,GAAA,MAAA,EALiB,EAAA,QAAV,YADT,EAME,GAAA;IAJC,KAAK,EAAO;IACZ,MAAM,EAAO;IACb,OAAO,EAAO;IACd,cAAY,EAAO;;;;;;;qBAI1B,EAUK,MAVL,GAUK,CATH,EAAsE,GAAtE,EAAsE,EAA/D,OAAM,yBAAwB,GAAA,EAAA,SAAA,GAAA,GAAS,EAAA,CAAA,CAAS,CAAC,EAAA,SAAS,CAAA,GAAA,MAAA,EAAA,GACjE,EAOI,KAAA;GANF,OAAM;GACL,MAAM,EAAK;GACX,gBAAc,EAAU,CAAI,IAAA,SAAa,KAAA;MAE7B,EAAK,aAAA,EAAA,GAAlB,EAAkE,GAAlE,EAAkE;;;KAA7B,EAAA,CAAA,CAAS,CAAC,EAAK,SAAS,CAAA,GAAA,MAAA,EAAA,KAAA,EAAA,IAAA,EAAA,GAAA,EAAK,MAClE,EAAG,EAAK,KAAK,GAAA,CAAA,CAAA,GAAA,GAAA,CAAA,CAAA,CAAA,CAAA,GAAA,EAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
|
|
2
|
+
@layer vectis.components{.v-button{justify-content:center;align-items:center;gap:var(--control-gap);height:var(--control-height);padding-inline:var(--control-padding-inline);border-radius:var(--vectis-radius-interactive);font-family:var(--vectis-text-family);font-size:var(--control-font-size);font-weight:var(--vectis-text-control-weight);line-height:var(--vectis-text-control-leading);cursor:pointer;transition:background-color var(--vectis-duration-fast) var(--vectis-ease-default), border-color var(--vectis-duration-fast) var(--vectis-ease-default), color var(--vectis-duration-fast) var(--vectis-ease-default), box-shadow var(--vectis-duration-fast) var(--vectis-ease-default);border:1px solid #0000;text-decoration:none;display:inline-flex}.v-button:focus-visible{outline:var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);outline-offset:var(--vectis-focus-ring-offset)}.v-button[data-variant=solid]{background:var(--tone-bg-solid);color:var(--tone-text-solid)}.v-button[data-variant=solid]:hover:not(:disabled,[aria-disabled=true]){background:var(--tone-bg-solid-hover)}.v-button[data-variant=solid]:active:not(:disabled,[aria-disabled=true]){background:var(--tone-bg-solid-active)}.v-button[data-variant=outline]{color:var(--tone-text-tinted);border-color:var(--tone-border-soft);background:0 0}.v-button[data-variant=ghost]{color:var(--tone-text-tinted);background:0 0}.v-button[data-variant=outline]:not([data-elevated]):hover:not(:disabled,[aria-disabled=true]),.v-button[data-variant=ghost]:not([data-elevated]):hover:not(:disabled,[aria-disabled=true]){background:var(--tone-bg-soft)}.v-button[data-variant=outline]:not([data-elevated]):active:not(:disabled,[aria-disabled=true]),.v-button[data-variant=ghost]:not([data-elevated]):active:not(:disabled,[aria-disabled=true]){background:color-mix(in oklab, var(--tone-bg-soft), var(--tone-text-tinted) 8%)}.v-button[data-variant=soft]{background:var(--tone-bg-soft);color:var(--tone-text-tinted)}.v-button[data-variant=soft]:hover:not(:disabled,[aria-disabled=true]){background:color-mix(in oklab, var(--tone-bg-soft), var(--tone-text-tinted) 8%)}.v-button[data-variant=soft]:active:not(:disabled,[aria-disabled=true]){background:color-mix(in oklab, var(--tone-bg-soft), var(--tone-text-tinted) 14%)}.v-button[data-elevated]{box-shadow:var(--vectis-shadow-sm)}.v-button[data-elevated]:is([data-variant=ghost],[data-variant=outline]){background:var(--vectis-color-surface-raised)}.v-button[data-elevated]:hover:not(:disabled,[aria-disabled=true]){box-shadow:var(--vectis-shadow-md)}.v-button[data-elevated]:is([data-variant=ghost],[data-variant=outline]):hover:not(:disabled,[aria-disabled=true]){background:color-mix(in oklab, var(--vectis-color-surface-raised), var(--tone-text-tinted) 8%)}.v-button[data-elevated]:active:not(:disabled,[aria-disabled=true]){box-shadow:var(--vectis-shadow-sm)}.v-button[data-elevated]:is([data-variant=ghost],[data-variant=outline]):active:not(:disabled,[aria-disabled=true]){background:color-mix(in oklab, var(--vectis-color-surface-raised), var(--tone-text-tinted) 12%)}.v-button:is(:disabled,[aria-disabled=true]){cursor:not-allowed}.v-button[data-loading]{opacity:.5}.v-button:is(:disabled,[aria-disabled=true]):not([data-loading]):is([data-variant=solid],[data-variant=soft]){background:var(--vectis-color-surface-muted);color:var(--vectis-color-text-subtle)}.v-button:is(:disabled,[aria-disabled=true]):not([data-loading])[data-variant=outline]{color:var(--vectis-color-text-subtle);border-color:var(--vectis-color-border);background:0 0}.v-button:is(:disabled,[aria-disabled=true]):not([data-loading])[data-variant=ghost]{color:var(--vectis-color-text-subtle);background:0 0}.v-button:is(:disabled,[aria-disabled=true]):not([data-loading])[data-elevated]{box-shadow:none}.v-button-spinner{width:var(--vectis-icon-size);height:var(--vectis-icon-size);font-size:var(--vectis-icon-size);flex:none;justify-content:center;align-items:center;display:inline-flex}@media (prefers-reduced-motion:reduce){.v-button{transition:none}}}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes } from 'vue';
|
|
2
|
+
import { IconSource } from '../VIcon/types.js';
|
|
3
|
+
interface ButtonProps {
|
|
4
|
+
/**
|
|
5
|
+
* How much visual weight the button carries: `solid` is filled with the tone,
|
|
6
|
+
* `soft` uses a tinted background, `outline` keeps only a border, and `ghost`
|
|
7
|
+
* shows nothing until it is hovered.
|
|
8
|
+
*/
|
|
9
|
+
variant?: 'solid' | 'outline' | 'ghost' | 'soft';
|
|
10
|
+
/**
|
|
11
|
+
* What the action means: `accent` for the ordinary one, `neutral` for a secondary
|
|
12
|
+
* one, `danger` for one that destroys something. On a button a tone is an
|
|
13
|
+
* intention, which is why states such as success or warning are not offered here.
|
|
14
|
+
*/
|
|
15
|
+
tone?: 'accent' | 'neutral' | 'danger';
|
|
16
|
+
/**
|
|
17
|
+
* Raises the button off the page: a shadow that grows on hover and settles back
|
|
18
|
+
* when pressed, whatever the variant. On `ghost` and `outline`, which have no
|
|
19
|
+
* background of their own, it also paints the raised surface — in the dark theme
|
|
20
|
+
* a shadow lying straight on the page background has nothing casting it.
|
|
21
|
+
*/
|
|
22
|
+
elevated?: boolean;
|
|
23
|
+
/** The height of the button, taken from the size scale shared by every control. */
|
|
24
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
25
|
+
/** Takes 4px off the height, leaving the padding, the text and the icons as they are. */
|
|
26
|
+
compact?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Turns the button into an `<a>` pointing at this address. A disabled or loading
|
|
29
|
+
* link becomes inert: the address is dropped, so it can be neither focused nor
|
|
30
|
+
* followed.
|
|
31
|
+
*/
|
|
32
|
+
href?: string;
|
|
33
|
+
/** The native type of the button. It is ignored as soon as `href` makes it a link. */
|
|
34
|
+
type?: ButtonHTMLAttributes['type'];
|
|
35
|
+
/**
|
|
36
|
+
* Makes the button unusable: it stops responding, leaves the tab order and greys
|
|
37
|
+
* out through the colour tokens.
|
|
38
|
+
*/
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Shows a spinner, disables the button and announces it as busy. The spinner takes
|
|
42
|
+
* the place of the start slot (`iconStart` / `#start`), so an icon and a spinner
|
|
43
|
+
* are never displayed side by side.
|
|
44
|
+
*/
|
|
45
|
+
loading?: boolean;
|
|
46
|
+
/** An icon before the label. The `#start` slot replaces it when both are given. */
|
|
47
|
+
iconStart?: IconSource;
|
|
48
|
+
/** An icon after the label. The `#end` slot replaces it when both are given. */
|
|
49
|
+
iconEnd?: IconSource;
|
|
50
|
+
/**
|
|
51
|
+
* Renders `iconStart` and `iconEnd` in their filled form (the font's `FILL` axis).
|
|
52
|
+
* It has no effect on the `#start`/`#end` slots, whose icons the consumer builds.
|
|
53
|
+
*/
|
|
54
|
+
iconFilled?: boolean;
|
|
55
|
+
}
|
|
56
|
+
type __VLS_Slots = {
|
|
57
|
+
/** The label of the button. */
|
|
58
|
+
default(): unknown;
|
|
59
|
+
/**
|
|
60
|
+
* Content placed before the label, usually an icon. Mark it `aria-hidden` when it
|
|
61
|
+
* only repeats what the label already says.
|
|
62
|
+
*/
|
|
63
|
+
start?(): unknown;
|
|
64
|
+
/** Content placed after the label. */
|
|
65
|
+
end?(): unknown;
|
|
66
|
+
};
|
|
67
|
+
declare const __VLS_base: import('vue').DefineComponent<ButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ButtonProps> & Readonly<{}>, {
|
|
68
|
+
loading: boolean;
|
|
69
|
+
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
70
|
+
type: "button" | "submit" | "reset";
|
|
71
|
+
variant: "solid" | "outline" | "ghost" | "soft";
|
|
72
|
+
tone: "accent" | "neutral" | "danger";
|
|
73
|
+
elevated: boolean;
|
|
74
|
+
compact: boolean;
|
|
75
|
+
href: string;
|
|
76
|
+
disabled: boolean;
|
|
77
|
+
iconStart: IconSource;
|
|
78
|
+
iconEnd: IconSource;
|
|
79
|
+
iconFilled: boolean;
|
|
80
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
81
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
82
|
+
declare const _default: typeof __VLS_export;
|
|
83
|
+
export default _default;
|
|
84
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
85
|
+
new (): {
|
|
86
|
+
$slots: S;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VButton.js","names":[],"sources":["../../../src/components/VButton/VButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @a11y — the component's ONLY behavioural JS, and it exists entirely for\n// accessibility: an <a> has no native `disabled`, so the inert-link bridge has to\n// reproduce it by hand.\n/**\n * The button that triggers an action, and the reference from which the tone and\n * variant tables of every other coloured component are taken.\n *\n * It renders a native <button>, or an <a> as soon as it is given an `href`, so\n * focus, keyboard activation and disabling all come from the browser. Its one piece\n * of behavioural code is the inert link: a link has no `disabled` attribute of its\n * own, so a disabled or loading <a> has its address removed — it can then be\n * neither focused nor followed — receives `aria-disabled` for assistive technology,\n * and has the click handlers it was given filtered out. Together these reproduce\n * the complete inertness that a <button disabled> gets for free.\n */\nimport { computed, useAttrs } from 'vue'\nimport type { ButtonHTMLAttributes } from 'vue'\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport type { IconSource } from '../VIcon/types'\nimport VSpinner from '../VSpinner/VSpinner.vue'\n\ninterface ButtonProps {\n /**\n * How much visual weight the button carries: `solid` is filled with the tone,\n * `soft` uses a tinted background, `outline` keeps only a border, and `ghost`\n * shows nothing until it is hovered.\n */\n variant?: 'solid' | 'outline' | 'ghost' | 'soft'\n /**\n * What the action means: `accent` for the ordinary one, `neutral` for a secondary\n * one, `danger` for one that destroys something. On a button a tone is an\n * intention, which is why states such as success or warning are not offered here.\n */\n tone?: 'accent' | 'neutral' | 'danger'\n /**\n * Raises the button off the page: a shadow that grows on hover and settles back\n * when pressed, whatever the variant. On `ghost` and `outline`, which have no\n * background of their own, it also paints the raised surface — in the dark theme\n * a shadow lying straight on the page background has nothing casting it.\n */\n elevated?: boolean\n /** The height of the button, taken from the size scale shared by every control. */\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n /** Takes 4px off the height, leaving the padding, the text and the icons as they are. */\n compact?: boolean\n /**\n * Turns the button into an `<a>` pointing at this address. A disabled or loading\n * link becomes inert: the address is dropped, so it can be neither focused nor\n * followed.\n */\n href?: string\n /** The native type of the button. It is ignored as soon as `href` makes it a link. */\n type?: ButtonHTMLAttributes['type']\n /**\n * Makes the button unusable: it stops responding, leaves the tab order and greys\n * out through the colour tokens.\n */\n disabled?: boolean\n /**\n * Shows a spinner, disables the button and announces it as busy. The spinner takes\n * the place of the start slot (`iconStart` / `#start`), so an icon and a spinner\n * are never displayed side by side.\n */\n loading?: boolean\n /** An icon before the label. The `#start` slot replaces it when both are given. */\n iconStart?: IconSource\n /** An icon after the label. The `#end` slot replaces it when both are given. */\n iconEnd?: IconSource\n /**\n * Renders `iconStart` and `iconEnd` in their filled form (the font's `FILL` axis).\n * It has no effect on the `#start`/`#end` slots, whose icons the consumer builds.\n */\n iconFilled?: boolean\n}\n\nconst props = withDefaults(defineProps<ButtonProps>(), {\n variant: 'solid',\n tone: 'accent',\n elevated: false,\n size: 'md',\n compact: false,\n href: undefined,\n type: 'button',\n disabled: false,\n loading: false,\n iconStart: undefined,\n iconEnd: undefined,\n iconFilled: false,\n})\n\ndefineSlots<{\n /** The label of the button. */\n default(): unknown\n /**\n * Content placed before the label, usually an icon. Mark it `aria-hidden` when it\n * only repeats what the label already says.\n */\n start?(): unknown\n /** Content placed after the label. */\n end?(): unknown\n}>()\n\ndefineOptions({ inheritAttrs: false })\n\nconst attrs = useAttrs()\nconst isLink = computed(() => props.href !== undefined)\nconst isInert = computed(() => props.disabled || props.loading)\nconst isInertLink = computed(() => isLink.value && isInert.value)\nconst passedAttrs = computed(() => {\n if (!isInertLink.value) return attrs\n const rest = { ...(attrs as Record<string, unknown>) }\n delete rest.onClick\n return rest\n})\n</script>\n\n<template>\n <component\n :is=\"isLink ? 'a' : 'button'\"\n v-bind=\"passedAttrs\"\n class=\"v-button v-control v-tone\"\n :href=\"isLink && !isInert ? href : undefined\"\n :type=\"isLink ? undefined : type\"\n :disabled=\"isLink ? undefined : disabled || loading\"\n :aria-disabled=\"isInertLink ? 'true' : undefined\"\n :data-variant=\"variant\"\n :data-tone=\"tone\"\n :data-elevated=\"elevated ? '' : undefined\"\n :data-size=\"size\"\n :data-compact=\"compact ? '' : undefined\"\n :data-loading=\"loading ? '' : undefined\"\n :aria-busy=\"loading || undefined\"\n >\n <!-- The button already carries aria-busy, so the spinner is hidden from\n assistive technology: its own role=\"status\" would announce the same state a\n second time -->\n <span v-if=\"loading\" class=\"v-button-spinner\" aria-hidden=\"true\">\n <VSpinner />\n </span>\n <slot v-else name=\"start\">\n <VIcon v-if=\"iconStart\" v-bind=\"iconProps(iconStart)\" :filled=\"iconFilled\" />\n </slot>\n <slot />\n <slot name=\"end\">\n <VIcon v-if=\"iconEnd\" v-bind=\"iconProps(iconEnd)\" :filled=\"iconFilled\" />\n </slot>\n </component>\n</template>\n\n<style>\n@layer vectis.components {\n .v-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--control-gap);\n height: var(--control-height);\n padding-inline: var(--control-padding-inline);\n border: 1px solid transparent;\n border-radius: var(--vectis-radius-interactive);\n font-family: var(--vectis-text-family);\n font-size: var(--control-font-size);\n font-weight: var(--vectis-text-control-weight);\n line-height: var(--vectis-text-control-leading);\n text-decoration: none;\n cursor: pointer;\n transition:\n background-color var(--vectis-duration-fast) var(--vectis-ease-default),\n border-color var(--vectis-duration-fast) var(--vectis-ease-default),\n color var(--vectis-duration-fast) var(--vectis-ease-default),\n box-shadow var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-button:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: var(--vectis-focus-ring-offset);\n }\n\n /* The tone table itself lives in styles/tones.css, on the `v-tone` class in the\n vectis.tokens layer, and is shared with VChip and VToast. VButton overrides not\n a single one of its values: it is the reference those values were written for. */\n\n .v-button[data-variant='solid'] {\n background: var(--tone-bg-solid);\n color: var(--tone-text-solid);\n }\n\n .v-button[data-variant='solid']:hover:not(:disabled, [aria-disabled='true']) {\n background: var(--tone-bg-solid-hover);\n }\n\n .v-button[data-variant='solid']:active:not(:disabled, [aria-disabled='true']) {\n background: var(--tone-bg-solid-active);\n }\n\n .v-button[data-variant='outline'] {\n background: transparent;\n color: var(--tone-text-tinted);\n border-color: var(--tone-border-soft);\n }\n\n .v-button[data-variant='ghost'] {\n background: transparent;\n color: var(--tone-text-tinted);\n }\n\n /* The `:not([data-elevated])` is what makes these rules DISJOINT from the\n elevation rules below, rather than merely less specific than them. Nothing then\n arbitrates the background of a raised ghost by a one-step specificity margin,\n so a declaration added to either set later cannot silently leak into the other\n case. */\n .v-button[data-variant='outline']:not([data-elevated]):hover:not(\n :disabled,\n [aria-disabled='true']\n ),\n .v-button[data-variant='ghost']:not([data-elevated]):hover:not(\n :disabled,\n [aria-disabled='true']\n ) {\n background: var(--tone-bg-soft);\n }\n\n .v-button[data-variant='outline']:not([data-elevated]):active:not(\n :disabled,\n [aria-disabled='true']\n ),\n .v-button[data-variant='ghost']:not([data-elevated]):active:not(\n :disabled,\n [aria-disabled='true']\n ) {\n background: color-mix(in oklab, var(--tone-bg-soft), var(--tone-text-tinted) 8%);\n }\n\n .v-button[data-variant='soft'] {\n background: var(--tone-bg-soft);\n color: var(--tone-text-tinted);\n }\n\n .v-button[data-variant='soft']:hover:not(:disabled, [aria-disabled='true']) {\n background: color-mix(in oklab, var(--tone-bg-soft), var(--tone-text-tinted) 8%);\n }\n\n .v-button[data-variant='soft']:active:not(:disabled, [aria-disabled='true']) {\n background: color-mix(in oklab, var(--tone-bg-soft), var(--tone-text-tinted) 14%);\n }\n\n /* Elevation is ORTHOGONAL to the variant: the shadow scale applies to all four of\n them, while the raised surface is only painted on the two that have no\n background of their own. The `:is()` here is not decoration — it is what gives\n these rules a specificity of (0,3,0), beating the (0,2,0) of the ghost and\n outline bases without depending on the order the rules end up in. */\n .v-button[data-elevated] {\n box-shadow: var(--vectis-shadow-sm);\n }\n\n .v-button[data-elevated]:is([data-variant='ghost'], [data-variant='outline']) {\n background: var(--vectis-color-surface-raised);\n }\n\n .v-button[data-elevated]:hover:not(:disabled, [aria-disabled='true']) {\n box-shadow: var(--vectis-shadow-md);\n }\n\n .v-button[data-elevated]:is([data-variant='ghost'], [data-variant='outline']):hover:not(\n :disabled,\n [aria-disabled='true']\n ) {\n background: color-mix(in oklab, var(--vectis-color-surface-raised), var(--tone-text-tinted) 8%);\n }\n\n .v-button[data-elevated]:active:not(:disabled, [aria-disabled='true']) {\n box-shadow: var(--vectis-shadow-sm);\n }\n\n .v-button[data-elevated]:is([data-variant='ghost'], [data-variant='outline']):active:not(\n :disabled,\n [aria-disabled='true']\n ) {\n background: color-mix(\n in oklab,\n var(--vectis-color-surface-raised),\n var(--tone-text-tinted) 12%\n );\n }\n\n .v-button:is(:disabled, [aria-disabled='true']) {\n cursor: not-allowed;\n }\n\n .v-button[data-loading] {\n opacity: 0.5;\n }\n\n /* A disabled button that is not loading greys out through the colour tokens and\n never through opacity. These three rules are (0,4,0), so they already beat the\n (0,3,0) of the raised background whatever the order they are read in. */\n .v-button:is(:disabled, [aria-disabled='true']):not([data-loading]):is(\n [data-variant='solid'],\n [data-variant='soft']\n ) {\n background: var(--vectis-color-surface-muted);\n color: var(--vectis-color-text-subtle);\n }\n\n .v-button:is(:disabled, [aria-disabled='true']):not([data-loading])[data-variant='outline'] {\n background: transparent;\n color: var(--vectis-color-text-subtle);\n border-color: var(--vectis-color-border);\n }\n\n .v-button:is(:disabled, [aria-disabled='true']):not([data-loading])[data-variant='ghost'] {\n background: transparent;\n color: var(--vectis-color-text-subtle);\n }\n\n /* The shadow needs a rule of its OWN. No variant declares a shadow, so none of the\n three rules above cancels one, and a disabled raised ghost would otherwise go on\n casting its shadow-sm. */\n .v-button:is(:disabled, [aria-disabled='true']):not([data-loading])[data-elevated] {\n box-shadow: none;\n }\n\n .v-button-spinner {\n /* A box exactly the size of an icon, since the spinner takes the place of\n iconStart: the button's width does not jump when it starts loading. The\n font-size is set to that same size so that VSpinner's own box, which measures\n 1em, coincides with this one — VSpinner then draws its ring inside it at the\n proportion Material Symbols gives `progress_activity`, which is what makes the\n spinner and the icon it replaces read at the same size. */\n width: var(--vectis-icon-size);\n height: var(--vectis-icon-size);\n font-size: var(--vectis-icon-size);\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-button {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":""}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import e from "../VIcon/VIcon.js";
|
|
2
|
+
import { iconProps as t } from "../VIcon/iconProps.js";
|
|
3
|
+
import n from "../VSpinner/VSpinner.js";
|
|
4
|
+
import { computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createVNode as s, defineComponent as c, mergeProps as l, openBlock as u, renderSlot as d, resolveDynamicComponent as f, unref as p, useAttrs as m, withCtx as h } from "vue";
|
|
5
|
+
//#region src/components/VButton/VButton.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var g = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "v-button-spinner",
|
|
9
|
+
"aria-hidden": "true"
|
|
10
|
+
}, _ = /*@__PURE__*/ c({
|
|
11
|
+
inheritAttrs: !1,
|
|
12
|
+
__name: "VButton",
|
|
13
|
+
props: {
|
|
14
|
+
variant: { default: "solid" },
|
|
15
|
+
tone: { default: "accent" },
|
|
16
|
+
elevated: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: !1
|
|
19
|
+
},
|
|
20
|
+
size: { default: "md" },
|
|
21
|
+
compact: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !1
|
|
24
|
+
},
|
|
25
|
+
href: { default: void 0 },
|
|
26
|
+
type: { default: "button" },
|
|
27
|
+
disabled: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: !1
|
|
30
|
+
},
|
|
31
|
+
loading: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: !1
|
|
34
|
+
},
|
|
35
|
+
iconStart: { default: void 0 },
|
|
36
|
+
iconEnd: { default: void 0 },
|
|
37
|
+
iconFilled: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: !1
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
setup(c) {
|
|
43
|
+
let _ = c, v = m(), y = r(() => _.href !== void 0), b = r(() => _.disabled || _.loading), x = r(() => y.value && b.value), S = r(() => {
|
|
44
|
+
if (!x.value) return v;
|
|
45
|
+
let e = { ...v };
|
|
46
|
+
return delete e.onClick, e;
|
|
47
|
+
});
|
|
48
|
+
return (r, m) => (u(), i(f(y.value ? "a" : "button"), l(S.value, {
|
|
49
|
+
class: "v-button v-control v-tone",
|
|
50
|
+
href: y.value && !b.value ? c.href : void 0,
|
|
51
|
+
type: y.value ? void 0 : c.type,
|
|
52
|
+
disabled: y.value ? void 0 : c.disabled || c.loading,
|
|
53
|
+
"aria-disabled": x.value ? "true" : void 0,
|
|
54
|
+
"data-variant": c.variant,
|
|
55
|
+
"data-tone": c.tone,
|
|
56
|
+
"data-elevated": c.elevated ? "" : void 0,
|
|
57
|
+
"data-size": c.size,
|
|
58
|
+
"data-compact": c.compact ? "" : void 0,
|
|
59
|
+
"data-loading": c.loading ? "" : void 0,
|
|
60
|
+
"aria-busy": c.loading || void 0
|
|
61
|
+
}), {
|
|
62
|
+
default: h(() => [
|
|
63
|
+
c.loading ? (u(), o("span", g, [s(n)])) : d(r.$slots, "start", {}, () => [c.iconStart ? (u(), i(e, l({ key: 0 }, p(t)(c.iconStart), { filled: c.iconFilled }), null, 16, ["filled"])) : a("", !0)], void 0, 1),
|
|
64
|
+
d(r.$slots, "default"),
|
|
65
|
+
d(r.$slots, "end", {}, () => [c.iconEnd ? (u(), i(e, l({ key: 0 }, p(t)(c.iconEnd), { filled: c.iconFilled }), null, 16, ["filled"])) : a("", !0)])
|
|
66
|
+
]),
|
|
67
|
+
_: 3
|
|
68
|
+
}, 16, [
|
|
69
|
+
"href",
|
|
70
|
+
"type",
|
|
71
|
+
"disabled",
|
|
72
|
+
"aria-disabled",
|
|
73
|
+
"data-variant",
|
|
74
|
+
"data-tone",
|
|
75
|
+
"data-elevated",
|
|
76
|
+
"data-size",
|
|
77
|
+
"data-compact",
|
|
78
|
+
"data-loading",
|
|
79
|
+
"aria-busy"
|
|
80
|
+
]));
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
//#endregion
|
|
84
|
+
export { _ as default };
|
|
85
|
+
|
|
86
|
+
//# sourceMappingURL=VButton.vue_vue_type_script_setup_true_lang.js.map
|