vectis-ui 0.12.0 → 0.13.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/dist/components/VAccordion/VAccordion.css +1 -1
- package/dist/components/VAccordion/VAccordion.d.ts +6 -5
- package/dist/components/VAccordion/VAccordion.js.map +1 -1
- package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAccordion/VAccordionItem.css +1 -1
- package/dist/components/VAccordion/VAccordionItem.d.ts +1 -1
- package/dist/components/VAccordion/VAccordionItem.js.map +1 -1
- package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VAlert/VAlert.css +2 -0
- package/dist/components/VAlert/VAlert.d.ts +73 -0
- package/dist/components/VAlert/VAlert.js +9 -0
- package/dist/components/VAlert/VAlert.js.map +1 -0
- package/dist/components/VAlert/VAlert.vue_vue_type_script_setup_true_lang.js +96 -0
- package/dist/components/VAlert/VAlert.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VAvatar/VAvatar.d.ts +2 -2
- package/dist/components/VAvatar/VAvatarGroup.d.ts +1 -1
- package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/VBadge/VBadge.d.ts +3 -3
- package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/components/VButton/VButton.d.ts +4 -4
- package/dist/components/VButton/VButtonGroup.css +1 -1
- package/dist/components/VButton/VButtonGroup.d.ts +2 -2
- package/dist/components/VButton/VButtonGroup.js.map +1 -1
- package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/VCalendar.css +1 -1
- package/dist/components/VCalendar/VCalendar.d.ts +7 -1
- package/dist/components/VCalendar/VCalendar.js.map +1 -1
- package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js +20 -18
- package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/VCalendarEvent.js.map +1 -1
- package/dist/components/VCalendar/VCalendarEvent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/VCalendarMonth.css +1 -1
- package/dist/components/VCalendar/VCalendarMonth.d.ts +2 -2
- package/dist/components/VCalendar/VCalendarMonth.js.map +1 -1
- package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/VCalendarTimeGrid.css +1 -1
- package/dist/components/VCalendar/VCalendarTimeGrid.d.ts +3 -3
- package/dist/components/VCalendar/VCalendarTimeGrid.js.map +1 -1
- package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/VCalendarYear.css +1 -1
- package/dist/components/VCalendar/VCalendarYear.js.map +1 -1
- package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCalendar/gesture.d.ts +1 -16
- package/dist/components/VCalendar/gesture.js +1 -1
- package/dist/components/VCalendar/gesture.js.map +1 -1
- package/dist/components/VCalendar/types.d.ts +2 -0
- package/dist/components/VCard/VCard.css +2 -0
- package/dist/components/VCard/VCard.d.ts +87 -0
- package/dist/components/VCard/VCard.js +9 -0
- package/dist/components/VCard/VCard.js.map +1 -0
- package/dist/components/VCard/VCard.vue_vue_type_script_setup_true_lang.js +103 -0
- package/dist/components/VCard/VCard.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VCarousel/VCarousel.d.ts +1 -1
- package/dist/components/VCarousel/VCarousel.js.map +1 -1
- package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js +18 -18
- package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCheckbox/VCheckMark.css +2 -0
- package/dist/components/VCheckbox/VCheckMark.js +9 -0
- package/dist/components/VCheckbox/VCheckMark.js.map +1 -0
- package/dist/components/VCheckbox/VCheckMark.vue_vue_type_script_setup_true_lang.js +33 -0
- package/dist/components/VCheckbox/VCheckMark.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VCheckbox/VCheckbox.css +1 -1
- package/dist/components/VCheckbox/VCheckbox.d.ts +8 -3
- package/dist/components/VCheckbox/VCheckbox.js.map +1 -1
- package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js +54 -69
- package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VChip/VChip.d.ts +6 -6
- package/dist/components/VChip/VChip.js.map +1 -1
- package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js +26 -26
- package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VColorInput/VColorInput.css +2 -0
- package/dist/components/VColorInput/VColorInput.d.ts +113 -0
- package/dist/components/VColorInput/VColorInput.js +9 -0
- package/dist/components/VColorInput/VColorInput.js.map +1 -0
- package/dist/components/VColorInput/VColorInput.vue_vue_type_script_setup_true_lang.js +230 -0
- package/dist/components/VColorInput/VColorInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VColorPicker/VColorPicker.css +2 -0
- package/dist/components/VColorPicker/VColorPicker.d.ts +67 -0
- package/dist/components/VColorPicker/VColorPicker.js +9 -0
- package/dist/components/VColorPicker/VColorPicker.js.map +1 -0
- package/dist/components/VColorPicker/VColorPicker.vue_vue_type_script_setup_true_lang.js +390 -0
- package/dist/components/VColorPicker/VColorPicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VColorPicker/color.d.ts +42 -0
- package/dist/components/VColorPicker/color.js +158 -0
- package/dist/components/VColorPicker/color.js.map +1 -0
- package/dist/components/VCombobox/VCombobox.css +1 -1
- package/dist/components/VCombobox/VCombobox.d.ts +46 -60
- package/dist/components/VCombobox/VCombobox.js.map +1 -1
- package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js +271 -372
- package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VCommandPalette/VCommandPalette.css +2 -0
- package/dist/components/VCommandPalette/VCommandPalette.d.ts +163 -0
- package/dist/components/VCommandPalette/VCommandPalette.js +9 -0
- package/dist/components/VCommandPalette/VCommandPalette.js.map +1 -0
- package/dist/components/VCommandPalette/VCommandPalette.vue_vue_type_script_setup_true_lang.js +321 -0
- package/dist/components/VCommandPalette/VCommandPalette.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VCommandPalette/VCommandPaletteItem.css +2 -0
- package/dist/components/VCommandPalette/VCommandPaletteItem.d.ts +38 -0
- package/dist/components/VCommandPalette/VCommandPaletteItem.js +9 -0
- package/dist/components/VCommandPalette/VCommandPaletteItem.js.map +1 -0
- package/dist/components/VCommandPalette/VCommandPaletteItem.vue_vue_type_script_setup_true_lang.js +69 -0
- package/dist/components/VCommandPalette/VCommandPaletteItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VContextMenu/VContextMenu.css +2 -0
- package/dist/components/VContextMenu/VContextMenu.d.ts +66 -0
- package/dist/components/VContextMenu/VContextMenu.js +9 -0
- package/dist/components/VContextMenu/VContextMenu.js.map +1 -0
- package/dist/components/VContextMenu/VContextMenu.vue_vue_type_script_setup_true_lang.js +148 -0
- package/dist/components/VContextMenu/VContextMenu.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VDataTable/VDataTable.css +1 -1
- package/dist/components/VDataTable/VDataTable.d.ts +41 -16
- package/dist/components/VDataTable/VDataTable.js.map +1 -1
- package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js +307 -195
- package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDateInput/VDateInput.d.ts +27 -7
- package/dist/components/VDateInput/VDateInput.js.map +1 -1
- package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js +170 -162
- package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDatePicker/VDatePicker.d.ts +3 -3
- package/dist/components/VDatePicker/VDatePicker.js.map +1 -1
- package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js +228 -227
- package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDatePicker/keyboard.d.ts +7 -7
- package/dist/components/VDatePicker/keyboard.js +8 -6
- package/dist/components/VDatePicker/keyboard.js.map +1 -1
- package/dist/components/VDatePicker/names.js +16 -20
- package/dist/components/VDatePicker/names.js.map +1 -1
- package/dist/components/VDialog/VDialog.d.ts +2 -4
- package/dist/components/VDialog/VDialog.js.map +1 -1
- package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js +46 -77
- package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VDrawer/VDrawer.css +2 -0
- package/dist/components/VDrawer/VDrawer.d.ts +102 -0
- package/dist/components/VDrawer/VDrawer.js +9 -0
- package/dist/components/VDrawer/VDrawer.js.map +1 -0
- package/dist/components/VDrawer/VDrawer.vue_vue_type_script_setup_true_lang.js +128 -0
- package/dist/components/VDrawer/VDrawer.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VEmptyState/VEmptyState.css +2 -0
- package/dist/components/VEmptyState/VEmptyState.d.ts +43 -0
- package/dist/components/VEmptyState/VEmptyState.js +9 -0
- package/dist/components/VEmptyState/VEmptyState.js.map +1 -0
- package/dist/components/VEmptyState/VEmptyState.vue_vue_type_script_setup_true_lang.js +48 -0
- package/dist/components/VEmptyState/VEmptyState.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VField/VField.css +2 -0
- package/dist/components/VField/VField.d.ts +84 -0
- package/dist/components/VField/VField.js +9 -0
- package/dist/components/VField/VField.js.map +1 -0
- package/dist/components/VField/VField.vue_vue_type_script_setup_true_lang.js +99 -0
- package/dist/components/VField/VField.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VField/VFieldAnnouncer.d.ts +7 -0
- package/dist/components/VField/VFieldAnnouncer.js +7 -0
- package/dist/components/VField/VFieldAnnouncer.js.map +1 -0
- package/dist/components/VField/VFieldAnnouncer.vue_vue_type_script_setup_true_lang.js +19 -0
- package/dist/components/VField/VFieldAnnouncer.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VField/VFieldMessage.d.ts +11 -0
- package/dist/components/VField/VFieldMessage.js +7 -0
- package/dist/components/VField/VFieldMessage.js.map +1 -0
- package/dist/components/VField/VFieldMessage.vue_vue_type_script_setup_true_lang.js +32 -0
- package/dist/components/VField/VFieldMessage.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VFieldset/VFieldset.css +2 -0
- package/dist/components/VFieldset/VFieldset.d.ts +52 -0
- package/dist/components/VFieldset/VFieldset.js +9 -0
- package/dist/components/VFieldset/VFieldset.js.map +1 -0
- package/dist/components/VFieldset/VFieldset.vue_vue_type_script_setup_true_lang.js +63 -0
- package/dist/components/VFieldset/VFieldset.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VFileInput/VFileInput.css +1 -1
- package/dist/components/VFileInput/VFileInput.d.ts +31 -7
- package/dist/components/VFileInput/VFileInput.js.map +1 -1
- package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js +168 -161
- package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VFilePicker/VFilePicker.d.ts +4 -4
- package/dist/components/VHotkeys/VHotkeys.css +1 -1
- package/dist/components/VHotkeys/VHotkeys.js.map +1 -1
- package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js +27 -30
- package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VHotkeys/platform.d.ts +2 -0
- package/dist/components/VHotkeys/platform.js +24 -5
- package/dist/components/VHotkeys/platform.js.map +1 -1
- package/dist/components/VHoverCard/VHoverCard.css +2 -0
- package/dist/components/VHoverCard/VHoverCard.d.ts +62 -0
- package/dist/components/VHoverCard/VHoverCard.js +9 -0
- package/dist/components/VHoverCard/VHoverCard.js.map +1 -0
- package/dist/components/VHoverCard/VHoverCard.vue_vue_type_script_setup_true_lang.js +97 -0
- package/dist/components/VHoverCard/VHoverCard.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VIcon/icons/add.d.ts +5 -0
- package/dist/components/VIcon/icons/add.js +9 -0
- package/dist/components/VIcon/icons/add.js.map +1 -0
- package/dist/components/VIcon/icons/colorize.d.ts +5 -0
- package/dist/components/VIcon/icons/colorize.js +9 -0
- package/dist/components/VIcon/icons/colorize.js.map +1 -0
- package/dist/components/VIcon/icons/inbox.d.ts +5 -0
- package/dist/components/VIcon/icons/inbox.js +9 -0
- package/dist/components/VIcon/icons/inbox.js.map +1 -0
- package/dist/components/VIcon/icons/index.d.ts +42 -2
- package/dist/components/VIcon/icons/index.js +88 -72
- package/dist/components/VIcon/icons/index.js.map +1 -1
- package/dist/components/VIcon/icons/names.d.ts +2 -2
- package/dist/components/VIcon/icons/names.js +1 -1
- package/dist/components/VIcon/icons/names.js.map +1 -1
- package/dist/components/VIcon/icons/open_in_new.d.ts +5 -0
- package/dist/components/VIcon/icons/open_in_new.js +9 -0
- package/dist/components/VIcon/icons/open_in_new.js.map +1 -0
- package/dist/components/VIcon/icons/priority_high.d.ts +5 -0
- package/dist/components/VIcon/icons/priority_high.js +9 -0
- package/dist/components/VIcon/icons/priority_high.js.map +1 -0
- package/dist/components/VIcon/icons/remove.d.ts +5 -0
- package/dist/components/VIcon/icons/remove.js +9 -0
- package/dist/components/VIcon/icons/remove.js.map +1 -0
- package/dist/components/VIcon/icons/search_off.d.ts +5 -0
- package/dist/components/VIcon/icons/search_off.js +9 -0
- package/dist/components/VIcon/icons/search_off.js.map +1 -0
- package/dist/components/VIcon/icons/star.d.ts +5 -0
- package/dist/components/VIcon/icons/star.js +9 -0
- package/dist/components/VIcon/icons/star.js.map +1 -0
- package/dist/components/VIconButton/VIconButton.d.ts +4 -4
- package/dist/components/VInput/VInput.css +1 -1
- package/dist/components/VInput/VInput.d.ts +51 -2
- package/dist/components/VInput/VInput.js.map +1 -1
- package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js +129 -106
- package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VInput/VInputGroup.css +1 -1
- package/dist/components/VInput/VInputGroup.d.ts +20 -0
- package/dist/components/VInput/VInputGroup.js.map +1 -1
- package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js +50 -51
- package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VInputOTP/VInputOTP.css +1 -1
- package/dist/components/VInputOTP/VInputOTP.d.ts +27 -4
- package/dist/components/VInputOTP/VInputOTP.js.map +1 -1
- package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js +131 -113
- package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VLink/VLink.css +2 -0
- package/dist/components/VLink/VLink.d.ts +53 -0
- package/dist/components/VLink/VLink.js +9 -0
- package/dist/components/VLink/VLink.js.map +1 -0
- package/dist/components/VLink/VLink.vue_vue_type_script_setup_true_lang.js +58 -0
- package/dist/components/VLink/VLink.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VListbox/VListboxChevron.css +2 -0
- package/dist/components/VListbox/VListboxChevron.d.ts +12 -0
- package/dist/components/VListbox/VListboxChevron.js +9 -0
- package/dist/components/VListbox/VListboxChevron.js.map +1 -0
- package/dist/components/VListbox/VListboxChevron.vue_vue_type_script_setup_true_lang.js +25 -0
- package/dist/components/VListbox/VListboxChevron.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VListbox/VListboxGroup.css +2 -0
- package/dist/components/VListbox/VListboxGroup.d.ts +27 -0
- package/dist/components/VListbox/VListboxGroup.js +9 -0
- package/dist/components/VListbox/VListboxGroup.js.map +1 -0
- package/dist/components/VListbox/VListboxGroup.vue_vue_type_script_setup_true_lang.js +21 -0
- package/dist/components/VListbox/VListboxGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VListbox/VListboxOption.css +2 -0
- package/dist/components/{VCombobox/VComboboxOption.d.ts → VListbox/VListboxOption.d.ts} +4 -4
- package/dist/components/VListbox/VListboxOption.js +9 -0
- package/dist/components/VListbox/VListboxOption.js.map +1 -0
- package/dist/components/{VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js → VListbox/VListboxOption.vue_vue_type_script_setup_true_lang.js} +6 -6
- package/dist/components/VListbox/VListboxOption.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VListbox/VListboxPanel.css +2 -0
- package/dist/components/VListbox/VListboxPanel.d.ts +59 -0
- package/dist/components/VListbox/VListboxPanel.js +9 -0
- package/dist/components/VListbox/VListboxPanel.js.map +1 -0
- package/dist/components/VListbox/VListboxPanel.vue_vue_type_script_setup_true_lang.js +123 -0
- package/dist/components/VListbox/VListboxPanel.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VListbox/VListboxSeparator.css +2 -0
- package/dist/components/VListbox/VListboxSeparator.d.ts +3 -0
- package/dist/components/VListbox/VListboxSeparator.js +9 -0
- package/dist/components/VListbox/VListboxSeparator.js.map +1 -0
- package/dist/components/{VCombobox/VComboboxSeparator.vue_vue_type_script_setup_true_lang.js → VListbox/VListboxSeparator.vue_vue_type_script_setup_true_lang.js} +4 -4
- package/dist/components/VListbox/VListboxSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VListbox/VListboxValues.css +2 -0
- package/dist/components/VListbox/VListboxValues.d.ts +52 -0
- package/dist/components/VListbox/VListboxValues.js +9 -0
- package/dist/components/VListbox/VListboxValues.js.map +1 -0
- package/dist/components/VListbox/VListboxValues.vue_vue_type_script_setup_true_lang.js +103 -0
- package/dist/components/VListbox/VListboxValues.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VMenu/VMenu.d.ts +1 -1
- package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/components/VMenu/VMenuItem.d.ts +1 -1
- package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js +16 -16
- package/dist/components/VMenu/VMenuPanel.d.ts +2 -2
- package/dist/components/VMenu/VMenuPanel.js.map +1 -1
- package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VMeter/VMeter.css +2 -0
- package/dist/components/VMeter/VMeter.d.ts +77 -0
- package/dist/components/VMeter/VMeter.js +9 -0
- package/dist/components/VMeter/VMeter.js.map +1 -0
- package/dist/components/VMeter/VMeter.vue_vue_type_script_setup_true_lang.js +113 -0
- package/dist/components/VMeter/VMeter.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VNumberInput/VNumberInput.css +2 -0
- package/dist/components/VNumberInput/VNumberInput.d.ts +114 -0
- package/dist/components/VNumberInput/VNumberInput.js +9 -0
- package/dist/components/VNumberInput/VNumberInput.js.map +1 -0
- package/dist/components/VNumberInput/VNumberInput.vue_vue_type_script_setup_true_lang.js +251 -0
- package/dist/components/VNumberInput/VNumberInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VNumberInput/number.d.ts +30 -0
- package/dist/components/VNumberInput/number.js +38 -0
- package/dist/components/VNumberInput/number.js.map +1 -0
- package/dist/components/VPagination/VPagination.d.ts +1 -1
- package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js +76 -76
- package/dist/components/VProgressCircular/VProgressCircular.d.ts +2 -2
- package/dist/components/VProgressLinear/VProgressLinear.css +1 -1
- package/dist/components/VProgressLinear/VProgressLinear.d.ts +10 -7
- package/dist/components/VProgressLinear/VProgressLinear.js.map +1 -1
- package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js +52 -34
- package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VRadio/VRadio.d.ts +8 -3
- package/dist/components/VRadio/VRadio.js.map +1 -1
- package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js +52 -46
- package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VRating/VRating.css +2 -0
- package/dist/components/VRating/VRating.d.ts +92 -0
- package/dist/components/VRating/VRating.js +9 -0
- package/dist/components/VRating/VRating.js.map +1 -0
- package/dist/components/VRating/VRating.vue_vue_type_script_setup_true_lang.js +158 -0
- package/dist/components/VRating/VRating.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VResizable/VResizable.css +2 -0
- package/dist/components/VResizable/VResizable.d.ts +50 -0
- package/dist/components/VResizable/VResizable.js +9 -0
- package/dist/components/VResizable/VResizable.js.map +1 -0
- package/dist/components/VResizable/VResizable.vue_vue_type_script_setup_true_lang.js +225 -0
- package/dist/components/VResizable/VResizable.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VResizable/VResizablePanel.css +2 -0
- package/dist/components/VResizable/VResizablePanel.d.ts +60 -0
- package/dist/components/VResizable/VResizablePanel.js +9 -0
- package/dist/components/VResizable/VResizablePanel.js.map +1 -0
- package/dist/components/VResizable/VResizablePanel.vue_vue_type_script_setup_true_lang.js +83 -0
- package/dist/components/VResizable/VResizablePanel.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VResizable/context.d.ts +24 -0
- package/dist/components/VResizable/context.js +6 -0
- package/dist/components/VResizable/context.js.map +1 -0
- package/dist/components/VResizable/layout.d.ts +28 -0
- package/dist/components/VResizable/layout.js +41 -0
- package/dist/components/VResizable/layout.js.map +1 -0
- package/dist/components/VSelect/VSelect.css +2 -0
- package/dist/components/VSelect/VSelect.d.ts +193 -0
- package/dist/components/VSelect/VSelect.js +9 -0
- package/dist/components/VSelect/VSelect.js.map +1 -0
- package/dist/components/VSelect/VSelect.vue_vue_type_script_setup_true_lang.js +424 -0
- package/dist/components/VSelect/VSelect.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VSeparator/VSeparator.js.map +1 -1
- package/dist/components/VSeparator/VSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/VSideNavigation/VSideNavigationItem.d.ts +2 -2
- package/dist/components/VSideNavigation/VSideNavigationItem.js.map +1 -1
- package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSkeletonLoader/VSkeletonLoader.d.ts +3 -3
- package/dist/components/VSlider/VSlider.css +1 -1
- package/dist/components/VSlider/VSlider.d.ts +34 -8
- package/dist/components/VSlider/VSlider.js.map +1 -1
- package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js +236 -215
- package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/VSnackbar/state.js.map +1 -1
- package/dist/components/VSplitButton/VSplitButton.css +2 -0
- package/dist/components/VSplitButton/VSplitButton.d.ts +114 -0
- package/dist/components/VSplitButton/VSplitButton.js +9 -0
- package/dist/components/VSplitButton/VSplitButton.js.map +1 -0
- package/dist/components/VSplitButton/VSplitButton.vue_vue_type_script_setup_true_lang.js +148 -0
- package/dist/components/VSplitButton/VSplitButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VStepper/VStepper.css +2 -0
- package/dist/components/VStepper/VStepper.d.ts +73 -0
- package/dist/components/VStepper/VStepper.js +9 -0
- package/dist/components/VStepper/VStepper.js.map +1 -0
- package/dist/components/VStepper/VStepper.vue_vue_type_script_setup_true_lang.js +96 -0
- package/dist/components/VStepper/VStepper.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VSwitch/VSwitch.d.ts +8 -3
- package/dist/components/VSwitch/VSwitch.js.map +1 -1
- package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js +53 -47
- package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTabs/VTab.css +1 -1
- package/dist/components/VTabs/VTab.d.ts +1 -1
- package/dist/components/VTabs/VTab.js.map +1 -1
- package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTabs/VTabs.css +1 -1
- package/dist/components/VTabs/VTabs.d.ts +13 -5
- package/dist/components/VTabs/VTabs.js.map +1 -1
- package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js +20 -20
- package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTextarea/VTextarea.css +1 -1
- package/dist/components/VTextarea/VTextarea.d.ts +22 -2
- package/dist/components/VTextarea/VTextarea.js.map +1 -1
- package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js +108 -100
- package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTimeInput/VTimeInput.d.ts +27 -7
- package/dist/components/VTimeInput/VTimeInput.js.map +1 -1
- package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js +187 -171
- package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTimePicker/VTimePicker.d.ts +2 -2
- package/dist/components/VTimePicker/VTimePicker.js.map +1 -1
- package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js +15 -15
- package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTimeline/VTimeline.css +2 -0
- package/dist/components/VTimeline/VTimeline.d.ts +59 -0
- package/dist/components/VTimeline/VTimeline.js +9 -0
- package/dist/components/VTimeline/VTimeline.js.map +1 -0
- package/dist/components/VTimeline/VTimeline.vue_vue_type_script_setup_true_lang.js +53 -0
- package/dist/components/VTimeline/VTimeline.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VTimeline/VTimelineItem.css +2 -0
- package/dist/components/VTimeline/VTimelineItem.d.ts +48 -0
- package/dist/components/VTimeline/VTimelineItem.js +9 -0
- package/dist/components/VTimeline/VTimelineItem.js.map +1 -0
- package/dist/components/VTimeline/VTimelineItem.vue_vue_type_script_setup_true_lang.js +70 -0
- package/dist/components/VTimeline/VTimelineItem.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VTimeline/context.d.ts +11 -0
- package/dist/components/VTimeline/context.js +6 -0
- package/dist/components/VTimeline/context.js.map +1 -0
- package/dist/components/VTimeline/datetime.d.ts +8 -0
- package/dist/components/VTimeline/datetime.js +36 -0
- package/dist/components/VTimeline/datetime.js.map +1 -0
- package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js +12 -12
- package/dist/components/VToggle/VToggle.d.ts +4 -4
- package/dist/components/VToggle/VToggleItem.d.ts +1 -1
- package/dist/components/VTooltip/VTooltip.d.ts +8 -2
- package/dist/components/VTooltip/VTooltip.js.map +1 -1
- package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js +45 -43
- package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VTreeView/VTreeView.css +2 -0
- package/dist/components/VTreeView/VTreeView.d.ts +112 -0
- package/dist/components/VTreeView/VTreeView.js +9 -0
- package/dist/components/VTreeView/VTreeView.js.map +1 -0
- package/dist/components/VTreeView/VTreeView.vue_vue_type_script_setup_true_lang.js +321 -0
- package/dist/components/VTreeView/VTreeView.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VTypography/VTypography.d.ts +1 -1
- package/dist/components/VVirtualList/VVirtualList.css +2 -0
- package/dist/components/VVirtualList/VVirtualList.d.ts +78 -0
- package/dist/components/VVirtualList/VVirtualList.js +9 -0
- package/dist/components/VVirtualList/VVirtualList.js.map +1 -0
- package/dist/components/VVirtualList/VVirtualList.vue_vue_type_script_setup_true_lang.js +114 -0
- package/dist/components/VVirtualList/VVirtualList.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/composables/useChoice.d.ts +28 -0
- package/dist/composables/useChoice.js +28 -0
- package/dist/composables/useChoice.js.map +1 -0
- package/dist/composables/useDebouncedSearch.d.ts +17 -0
- package/dist/composables/useDebouncedSearch.js +18 -0
- package/dist/composables/useDebouncedSearch.js.map +1 -0
- package/dist/composables/useEscapeDismiss.d.ts +8 -0
- package/dist/composables/useEscapeDismiss.js +16 -0
- package/dist/composables/useEscapeDismiss.js.map +1 -0
- package/dist/composables/useFieldIds.d.ts +2 -1
- package/dist/composables/useFieldIds.js +7 -6
- package/dist/composables/useFieldIds.js.map +1 -1
- package/dist/composables/useFieldPanel.d.ts +1 -0
- package/dist/composables/useFieldPanel.js +52 -42
- package/dist/composables/useFieldPanel.js.map +1 -1
- package/dist/composables/useFileField.d.ts +1 -3
- package/dist/composables/useFileField.js +48 -50
- package/dist/composables/useFileField.js.map +1 -1
- package/dist/composables/useHotkeyListener.d.ts +17 -0
- package/dist/composables/useHotkeyListener.js +26 -0
- package/dist/composables/useHotkeyListener.js.map +1 -0
- package/dist/composables/useIconClickHandlers.d.ts +2 -10
- package/dist/composables/useIconClickHandlers.js +1 -1
- package/dist/composables/useIconClickHandlers.js.map +1 -1
- package/dist/{components/VCombobox/infiniteScroll.d.ts → composables/useInfiniteScroll.d.ts} +6 -0
- package/dist/{components/VCombobox/infiniteScroll.js → composables/useInfiniteScroll.js} +7 -7
- package/dist/composables/useInfiniteScroll.js.map +1 -0
- package/dist/composables/useListbox.d.ts +132 -0
- package/dist/composables/useListbox.js +227 -0
- package/dist/composables/useListbox.js.map +1 -0
- package/dist/composables/useModalDialog.d.ts +28 -0
- package/dist/composables/useModalDialog.js +60 -0
- package/dist/composables/useModalDialog.js.map +1 -0
- package/dist/composables/useRootAttrs.d.ts +2 -3
- package/dist/composables/useRootAttrs.js.map +1 -1
- package/dist/composables/useVirtualList.d.ts +46 -0
- package/dist/composables/useVirtualList.js +145 -0
- package/dist/composables/useVirtualList.js.map +1 -0
- package/dist/i18n/en.js +50 -0
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/fr.js +50 -0
- package/dist/i18n/fr.js.map +1 -1
- package/dist/i18n/types.d.ts +103 -2
- package/dist/icons.js +45 -37
- package/dist/index.d.ts +49 -3
- package/dist/index.js +80 -56
- package/dist/styles.css +1 -1
- package/dist/tokens/index.d.ts +43 -0
- package/dist/tokens/semantic.d.ts +42 -0
- package/dist/tokens/semantic.js +43 -1
- package/dist/tokens/semantic.js.map +1 -1
- package/dist/tokens/themes/dark.d.ts +1 -0
- package/dist/tokens/themes/dark.js +1 -0
- package/dist/tokens/themes/dark.js.map +1 -1
- package/dist/tokens.json +215 -1
- package/dist/types.d.ts +57 -4
- package/dist/utils/arrowNav.js.map +1 -1
- package/dist/utils/attrs.d.ts +9 -0
- package/dist/utils/attrs.js +14 -0
- package/dist/utils/attrs.js.map +1 -0
- package/dist/utils/date.d.ts +1 -0
- package/dist/utils/date.js +2 -2
- package/dist/utils/date.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/VCombobox/VComboboxGroup.css +0 -2
- package/dist/components/VCombobox/VComboboxGroup.d.ts +0 -17
- package/dist/components/VCombobox/VComboboxGroup.js +0 -9
- package/dist/components/VCombobox/VComboboxGroup.js.map +0 -1
- package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js +0 -21
- package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/components/VCombobox/VComboboxOption.css +0 -2
- package/dist/components/VCombobox/VComboboxOption.js +0 -9
- package/dist/components/VCombobox/VComboboxOption.js.map +0 -1
- package/dist/components/VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/components/VCombobox/VComboboxSeparator.css +0 -2
- package/dist/components/VCombobox/VComboboxSeparator.js +0 -9
- package/dist/components/VCombobox/VComboboxSeparator.js.map +0 -1
- package/dist/components/VCombobox/VComboboxSeparator.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/dist/components/VCombobox/infiniteScroll.js.map +0 -1
- /package/dist/components/{VCombobox/VComboboxSeparator.d.ts → VCheckbox/VCheckMark.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VSlider.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VSlider/VSlider.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @core\n/**\n * Native range inputs own thumb interaction. JavaScript keeps range endpoints ordered and\n * synchronizes optional number fields, labels and ARIA values.\n */\n\nimport { computed, inject, reactive, ref, watch, watchEffect } from 'vue'\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport type { IconSource } from '../VIcon/types'\nimport VInput from '../VInput/VInput.vue'\nimport { inputGroupKey } from '../VInput/context'\n\nimport { useAriaLabel } from '../../composables/useAriaLabel'\nimport { useControlShape } from '../../composables/useControlShape'\nimport { useFieldIds } from '../../composables/useFieldIds'\nimport { useRootAttrs } from '../../composables/useRootAttrs'\nimport { isDev } from '../../utils/env'\nimport { clamp } from '../../utils/number'\nimport { useMessages } from '../../i18n/state'\n\n/**\n * What one step of the track is called: a piece of text, or an icon paired with the words that\n * name it, which a screen reader reads in place of the raw number.\n */\nexport type SliderLabel = string | { icon: IconSource; label: string }\n\n/** The value of a slider: one number, or an ordered pair of them in range mode. */\nexport type SliderValue = number | [number, number]\n\n/** Which way the track runs. */\nexport type SliderOrientation = 'horizontal' | 'vertical'\n\n/** The height of the number fields: 32, 40 or 48 pixels. */\nexport type SliderSize = 'sm' | 'md' | 'lg'\n\n/**\n * Where the number fields sit: none, at the ends of the track, or in a row above or below\n * it. On an upright slider, above and below become the two sides of it.\n */\nexport type SliderInputs = false | 'ends' | 'top' | 'bottom'\n\ninterface SliderProps {\n /** The lowest value the thumb can reach. It is 0 by default. */\n min?: number\n /** The highest value the thumb can reach. It is 100 by default. */\n max?: number\n /**\n * The gap between two values the thumb can stop on, 1 by default. It is also what the\n * arrow keys move by, and what a value typed into the companion field is snapped to.\n */\n step?: number\n /** Offers two thumbs to pick a range, which makes the v-model a pair of values. */\n range?: boolean\n /** Makes the slider unusable. */\n disabled?: boolean\n /**\n * Shows the value without allowing it to be changed. The thumbs can still be focused and\n * are announced as read-only, but neither the pointer nor the keyboard moves them, and the\n * number fields turn read-only with them.\n */\n readonly?: boolean\n /**\n * Marks the value as invalid, which colours the thumbs and tells assistive technology\n * so. It is for a rule the browser cannot check by itself.\n */\n invalid?: boolean\n /**\n * The height of the number fields `inputs` adds. Inside a VInputGroup the group's size\n * wins, as it does for every field of the row.\n */\n size?: SliderSize\n /**\n * What screen readers announce for the slider. It is an accessible name and draws\n * nothing on screen. In range mode the two thumbs are announced as the start and the\n * end of it.\n */\n label?: string\n /**\n * A line of help under the track, stating what the numbers mean or where they may go. It\n * is tied to the slider for assistive technology, so it is read out after the name rather\n * than as part of it.\n */\n hint?: string\n /** Turns the slider upright, with the lowest value at the bottom. */\n orientation?: SliderOrientation\n /**\n * Adds a number field for setting the value exactly: one, or one per end in range mode. No\n * field is drawn by default.\n */\n inputs?: SliderInputs\n /**\n * Marks each step on the track. Providing labels implies it. Past fifty steps the\n * marks would be an unreadable comb and are not drawn at all.\n */\n ticks?: boolean\n /**\n * A label for every step, in order: a piece of text, or an icon with the words that\n * name it for screen readers. They also become what a screen reader announces in\n * place of the raw number.\n */\n labels?: SliderLabel[]\n /** Shows the value in a bubble above the thumb while it is being moved or focused. */\n tooltip?: boolean\n}\n\nconst props = withDefaults(defineProps<SliderProps>(), {\n min: 0,\n max: 100,\n step: 1,\n range: false,\n disabled: false,\n readonly: false,\n invalid: false,\n size: 'md',\n label: undefined,\n hint: undefined,\n orientation: 'horizontal',\n inputs: false,\n ticks: false,\n labels: undefined,\n tooltip: false,\n})\n\n/** The value: a single number, 0 to begin with, or an ordered pair once `range` is set. */\nconst model = defineModel<SliderValue>({ default: 0 })\n\nconst emit = defineEmits<{\n /** The value is BEING changed: every step of a drag, and every key that moves a thumb. */\n input: [value: SliderValue]\n /**\n * The reader has SETTLED on a value: a thumb was released or moved by a key, or a number\n * field was committed.\n */\n change: [value: SliderValue]\n}>()\n\n// The number fields are fields of a VInputGroup row like any other, so the row's size and\n// its disabled state reach them through the same arbitration. A slider has no `compact` of\n// its own: only the row's can apply.\nconst group = inject(inputGroupKey, null)\nconst {\n size: resolvedSize,\n compact: resolvedCompact,\n disabled: resolvedDisabled,\n} = useControlShape(\n {\n get size() {\n return props.size\n },\n compact: false,\n get disabled() {\n return props.disabled\n },\n },\n group,\n)\n\ntype Thumb = 'start' | 'end'\n\nconst startValue = computed(() => (Array.isArray(model.value) ? model.value[0] : props.min))\nconst endValue = computed(() =>\n Array.isArray(model.value) ? model.value[1] : (model.value as number),\n)\n\nconst thumbValue = (which: Thumb) => (which === 'start' ? startValue.value : endValue.value)\n\n/**\n * Where a value sits along the run, as a fraction between 0 and 1. The guard covers a\n * slider whose two bounds are equal, which would otherwise divide by zero.\n */\nconst frac = (v: number) => clamp((v - props.min) / (props.max - props.min || 1), 0, 1)\n\n// @core\n// The thumb being held PUSHES its sibling; it must not stop against it. Two thumbs resting on\n// the same value are one thumb as far as the pointer is concerned, the end one being last in\n// the DOM and therefore the only one it can reach; so a range stopped at `[100, 100]` could\n// only ever be raised, and at the maximum it could not move at all.\nfunction writeThumb(which: Thumb, n: number): SliderValue {\n const next: SliderValue = !props.range\n ? n\n : which === 'start'\n ? [n, Math.max(n, endValue.value)]\n : [Math.min(n, startValue.value), n]\n model.value = next\n return next\n}\n\nconst writtenFor = (value: SliderValue, which: Thumb) =>\n Array.isArray(value) ? value[which === 'start' ? 0 : 1] : value\n\nfunction onThumbInput(which: Thumb, event: Event) {\n const el = event.target as HTMLInputElement\n // @core\n // A drag or a click on the track has ALREADY moved the native thumb when `input` fires,\n // and the event cannot be cancelled: putting the value back is the only refusal there is.\n // It lands before the browser paints, so the thumb never visibly leaves its place, and\n // since the value at release is the one it started from, no `change` follows either.\n if (props.readonly) {\n el.value = String(thumbValue(which))\n return\n }\n const next = writeThumb(which, Number(el.value))\n el.value = String(writtenFor(next, which))\n emit('input', next)\n}\n\n// @keyboard @core\n// The keys that move a range input, cancelled before the browser applies them when the\n// slider is read-only. Tab and every other key pass, so the thumbs stay reachable.\nconst VALUE_KEYS = new Set([\n 'ArrowUp',\n 'ArrowDown',\n 'ArrowLeft',\n 'ArrowRight',\n 'Home',\n 'End',\n 'PageUp',\n 'PageDown',\n])\n\nfunction onThumbKeydown(event: KeyboardEvent) {\n if (props.readonly && VALUE_KEYS.has(event.key)) event.preventDefault()\n}\n\n// @core\n/*\n * The settled value is read off the THUMB, never off the model. A key press fires `input` and\n * `change` back to back in one task, and under a parent `v-model` the model's local copy only\n * catches up when the parent re-renders, so it would still hold the value from before the key.\n */\nfunction onThumbChange(which: Thumb, event: Event) {\n if (props.readonly) return\n const value = Number((event.target as HTMLInputElement).value)\n if (!props.range) emit('change', value)\n else if (which === 'start') emit('change', [value, Math.max(value, endValue.value)])\n else emit('change', [Math.min(value, startValue.value), value])\n}\n\n/** How many whole steps the thumb can actually stop on. */\nconst stepCount = computed(() =>\n props.step > 0 ? Math.floor((props.max - props.min) / props.step + 1e-9) : 0,\n)\n\n/**\n * The highest value a thumb can actually stop on, which is the last whole step and not\n * necessarily the maximum: with `min=0 max=95 step=10` the native control stops at 90.\n */\nconst lastStop = computed(() =>\n props.step > 0 ? props.min + stepCount.value * props.step : props.max,\n)\n\nconst showTicks = computed(\n () =>\n (props.ticks || props.labels !== undefined) && stepCount.value >= 1 && stepCount.value <= 50,\n)\n\n/** Each step's value and the style that places it, shared by the ticks and the labels. */\nconst stepPlaces = computed(() => {\n const length = Math.max(showTicks.value ? stepCount.value + 1 : 0, props.labels?.length ?? 0)\n return Array.from({ length }, (_, i) => {\n const value = props.min + i * props.step\n return { value, style: { '--fill-fraction': String(frac(value)) } }\n })\n})\n\nconst tickPlaces = computed(() =>\n showTicks.value ? stepPlaces.value.slice(0, stepCount.value + 1) : [],\n)\n\nconst isFilled = (value: number) =>\n props.range ? value >= startValue.value && value <= endValue.value : value <= endValue.value\n\n/** What a value is called, if the consumer named its step; failing that, the number itself. */\nfunction labelTextAt(value: number): string {\n const item = props.labels?.[Math.round((value - props.min) / props.step)]\n if (item === undefined) return String(value)\n return typeof item === 'string' ? item : item.label\n}\n\n// @a11y\n/*\n * Resolve the label against consumer ARIA attributes before deriving distinct range-thumb\n * names; an undefined prop must not erase their accessible name.\n */\nconst m = useMessages()\nconst resolvedLabel = useAriaLabel(() => props.label)\nconst startLabel = computed(() =>\n resolvedLabel.value ? m.value.slider.rangeStart(resolvedLabel.value) : m.value.slider.start,\n)\nconst endLabel = computed(() =>\n resolvedLabel.value ? m.value.slider.rangeEnd(resolvedLabel.value) : m.value.slider.end,\n)\nconst thumbEndLabel = computed(() => (props.range ? endLabel.value : resolvedLabel.value))\nconst fieldEndLabel = computed(() =>\n props.range ? endLabel.value : (resolvedLabel.value ?? m.value.slider.value),\n)\n\nconst startValueText = computed(() =>\n props.range && props.labels ? labelTextAt(startValue.value) : undefined,\n)\nconst endValueText = computed(() => (props.labels ? labelTextAt(endValue.value) : undefined))\n\n// @a11y\n/*\n * The wrapper-root split. The root here is a layout box holding the labels, the track and the\n * optional number fields, so a consumer's `name`, `id`, `required` and `aria-*` have to be\n * redirected onto the real `<input type=\"range\">`; left on the wrapper, a `name` submits\n * nothing and a `<label for>` points at a div.\n */\ndefineOptions({ inheritAttrs: false })\nconst { attrs, rootClass, rootStyle, forwardedAttrs } = useRootAttrs()\n\n// The hint is APPENDED to whatever the consumer already pointed at rather than replacing\n// it, which is why the binding below sits after the forwarded attributes, as on every\n// other field of the design system.\nconst { hintId, describedBy } = useFieldIds(attrs, () => !!props.hint)\n\n/**\n * Where the fields go, `ends` standing in for any other truthy value: a bare `inputs`\n * attribute reaches the component as `true`, the prop being part boolean.\n */\nconst inputsPlace = computed(() =>\n props.inputs === 'top' || props.inputs === 'bottom' ? props.inputs : props.inputs && 'ends',\n)\n\n// @devwarn\n/*\n * Every guard here describes something that fails SILENTLY. They sit in an effect, so a\n * bound that only becomes wrong on a later render is still caught, and each sentence is\n * given once per instance: the same warning repeated on every keystroke is how a warning\n * stops being read (the `useFileField` arrangement).\n */\nif (isDev) {\n // Keyed by a short id rather than by the sentence: each of these embeds a count, so the\n // same guard reported twice would read as two different messages and warn again.\n const warned = new Set<string>()\n const warn = (id: string, message: string) => {\n if (warned.has(id)) return\n warned.add(id)\n console.warn(`[VSlider] ${message}`)\n }\n watchEffect(() => {\n if (props.step <= 0)\n warn(\n 'step',\n `step=\"${props.step}\" cannot move a thumb: the arrow keys do nothing and a value typed into a field is committed as it stands. Give a positive step.`,\n )\n if ((props.ticks || props.labels) && stepCount.value > 50)\n warn(\n 'ticks',\n `${stepCount.value} steps: no tick is drawn past 50, the comb being unreadable.`,\n )\n if (props.labels && props.labels.length !== stepCount.value + 1)\n warn(\n 'labels',\n `${props.labels.length} labels for ${stepCount.value + 1} steps: one label per step expected.`,\n )\n if (props.inputs !== false && props.inputs !== inputsPlace.value)\n warn(\n 'inputs',\n `inputs=\"${String(props.inputs)}\" is not a placement: the fields are drawn at the ends. Write inputs=\"ends\", \"top\" or \"bottom\".`,\n )\n if (props.range && attrs.name !== undefined)\n warn(\n 'name',\n `name=\"${String(attrs.name)}\" on a range: only the end thumb carries it, so the form receives one value of the two. Bind the model to two inputs of your own instead.`,\n )\n })\n}\n\n// @core\n// It is typed as text or a number because these are number fields, whose value Vue converts to\n// a number as soon as it can be read as one; while an empty field, or one holding a half-typed\n// \"1-\", stays text. That is why the value is turned back into text when it is committed.\nconst fieldText = reactive<Record<Thumb, string | number>>({\n start: String(startValue.value),\n end: String(endValue.value),\n})\n\nwatch(startValue, (v) => {\n if (props.range) fieldText.start = String(v)\n})\nwatch(endValue, (v) => (fieldText.end = String(v)))\n\n// @a11y\n/*\n * The fields are rendered in the order they are SEEN, before or after the track, so that\n * the tab order follows the screen. Laid out by the grid alone from a fixed DOM order, a\n * row of fields above the track would be reached one on each side of the thumbs.\n */\nconst fieldsBefore = computed<Thumb[]>(() => {\n if (inputsPlace.value === 'ends') return props.range ? ['start'] : []\n if (inputsPlace.value === 'top') return props.range ? ['start', 'end'] : ['end']\n return []\n})\nconst fieldsAfter = computed<Thumb[]>(() => {\n if (inputsPlace.value === 'ends') return ['end']\n if (inputsPlace.value === 'bottom') return props.range ? ['start', 'end'] : ['end']\n return []\n})\n\nconst fieldLabel = (which: Thumb) => (which === 'start' ? startLabel.value : fieldEndLabel.value)\n\n// @core\n/**\n * Takes what was typed in a field and makes it the value; but only once the reader has\n * finished, on leaving the field or on Enter.\n */\nfunction commitField(which: Thumb) {\n const raw = fieldText[which]\n // Parsed rather than converted: an empty string parses to nothing, which triggers the revert\n // below, where converting it would give ZERO and quietly overwrite the value with it.\n const parsed = Number.parseFloat(String(raw))\n if (Number.isNaN(parsed)) {\n resyncFields()\n return\n }\n // The ceiling is the last step that FITS, never `max` itself. A native range stops there\n // (that is what `stepCount` counts), so clipped to a `max` the step does not reach, the model\n // held a value the thumb could not: the browser sanitized its input back down, and the\n // number, the thumb and the fill then said three different things.\n const clamped = clamp(parsed, props.min, props.max)\n const snapped =\n props.step > 0\n ? props.min + Math.round((clamped - props.min) / props.step) * props.step\n : clamped\n const value = Math.min(lastStop.value, Math.round(snapped * 1e10) / 1e10)\n const previous = thumbValue(which)\n const next = writeThumb(which, value)\n // Emitted only when the value MOVED, as a native range emits nothing for a key that cannot\n // move its thumb; and the payload is `next`, the model's local copy lagging a parent\n // `v-model` (see `onThumbChange`).\n if (writtenFor(next, which) !== previous) emit('change', next)\n // Put back explicitly, because a commit that does not change the value; typing 200 where the\n // maximum is 100; changes nothing for the watchers to react to, and the field would go on\n // showing what was typed.\n resyncFields()\n}\n\nfunction resyncFields() {\n if (props.range) fieldText.start = String(startValue.value)\n fieldText.end = String(endValue.value)\n}\n\nconst endThumbEl = ref<HTMLInputElement | null>(null)\n\n// Both members point at the END thumb: it is the one always rendered, and the one the\n// consumer's `id` lands on, so `focus()` goes where a `<label for>` would send it.\ndefineExpose({\n /** Moves the focus to the end thumb, the only thumb outside range mode. */\n focus: (options?: FocusOptions) => endThumbEl.value?.focus(options),\n /** The end thumb's real `<input type=\"range\">`, for what `focus` does not cover. */\n el: endThumbEl,\n})\n</script>\n\n<template>\n <div\n class=\"v-slider\"\n :class=\"rootClass\"\n :data-range=\"range ? '' : undefined\"\n :data-disabled=\"resolvedDisabled ? '' : undefined\"\n :data-readonly=\"readonly ? '' : undefined\"\n :data-invalid=\"invalid ? '' : undefined\"\n :data-size=\"resolvedSize\"\n :data-orientation=\"orientation\"\n :data-inputs=\"inputsPlace || undefined\"\n :style=\"[\n rootStyle,\n {\n '--slider-start-fraction': range ? String(frac(startValue)) : undefined,\n '--slider-end-fraction': String(frac(endValue)),\n },\n ]\"\n >\n <VInput\n v-for=\"which in fieldsBefore\"\n :key=\"which\"\n v-model=\"fieldText[which]\"\n :class=\"['v-slider-field', `v-slider-field-${which}`]\"\n type=\"number\"\n :size=\"resolvedSize\"\n :compact=\"resolvedCompact\"\n :min=\"min\"\n :max=\"max\"\n :step=\"step\"\n :disabled=\"resolvedDisabled\"\n :readonly=\"readonly\"\n :invalid=\"invalid\"\n :aria-label=\"fieldLabel(which)\"\n @change=\"commitField(which)\"\n />\n <div class=\"v-slider-rail\">\n <span class=\"v-slider-control\">\n <span class=\"v-slider-track\" aria-hidden=\"true\">\n <span class=\"v-slider-fill\" />\n <span\n v-for=\"(tick, i) in tickPlaces\"\n :key=\"i\"\n class=\"v-slider-tick\"\n :data-filled=\"isFilled(tick.value) ? '' : undefined\"\n :style=\"tick.style\"\n />\n </span>\n <input\n v-if=\"range\"\n type=\"range\"\n class=\"v-slider-input v-slider-input-start\"\n :min=\"min\"\n :max=\"max\"\n :step=\"step\"\n :disabled=\"resolvedDisabled\"\n :value=\"startValue\"\n :aria-label=\"startLabel\"\n :aria-valuetext=\"startValueText\"\n :aria-invalid=\"invalid || undefined\"\n :aria-readonly=\"readonly || undefined\"\n @keydown=\"onThumbKeydown\"\n @input=\"onThumbInput('start', $event)\"\n @change=\"onThumbChange('start', $event)\"\n />\n <!--\n The consumer's attributes come first, so what the component decides for itself; the\n bounds, the value and the disabled state; cannot be overwritten by one of them, and so\n that an ARIA state the consumer sets is not erased by an `undefined` of ours.\n `aria-valuetext` is one of those: the component has one to say only when `labels` was\n given.\n -->\n <input\n ref=\"endThumbEl\"\n :aria-invalid=\"invalid || undefined\"\n :aria-readonly=\"readonly || undefined\"\n :aria-valuetext=\"endValueText\"\n v-bind=\"forwardedAttrs\"\n type=\"range\"\n class=\"v-slider-input v-slider-input-end\"\n :min=\"min\"\n :max=\"max\"\n :step=\"step\"\n :disabled=\"resolvedDisabled\"\n :value=\"endValue\"\n :aria-label=\"thumbEndLabel\"\n :aria-describedby=\"describedBy\"\n @keydown=\"onThumbKeydown\"\n @input=\"onThumbInput('end', $event)\"\n @change=\"onThumbChange('end', $event)\"\n />\n </span>\n <span\n v-if=\"tooltip && range\"\n class=\"v-slider-tooltip v-slider-tooltip-start\"\n aria-hidden=\"true\"\n >\n <span class=\"v-slider-tooltip-bubble\">{{ startValueText ?? startValue }}</span>\n </span>\n <span v-if=\"tooltip\" class=\"v-slider-tooltip v-slider-tooltip-end\" aria-hidden=\"true\">\n <span class=\"v-slider-tooltip-bubble\">{{ endValueText ?? endValue }}</span>\n </span>\n </div>\n <div v-if=\"labels\" class=\"v-slider-labels\">\n <span\n v-for=\"(item, i) in labels\"\n :key=\"i\"\n class=\"v-slider-label\"\n :style=\"stepPlaces[i]?.style\"\n >\n <template v-if=\"typeof item === 'string'\">{{ item }}</template>\n <VIcon v-else v-bind=\"iconProps(item.icon)\" :label=\"item.label\" />\n </span>\n </div>\n <VInput\n v-for=\"which in fieldsAfter\"\n :key=\"which\"\n v-model=\"fieldText[which]\"\n :class=\"['v-slider-field', `v-slider-field-${which}`]\"\n type=\"number\"\n :size=\"resolvedSize\"\n :compact=\"resolvedCompact\"\n :min=\"min\"\n :max=\"max\"\n :step=\"step\"\n :disabled=\"resolvedDisabled\"\n :readonly=\"readonly\"\n :invalid=\"invalid\"\n :aria-label=\"fieldLabel(which)\"\n @change=\"commitField(which)\"\n />\n <span v-if=\"hint\" :id=\"hintId\" class=\"v-slider-hint\">{{ hint }}</span>\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n .v-slider {\n --slider-thumb: var(--vectis-control-size-slider-thumb);\n --slider-track: var(--vectis-control-size-slider-track);\n display: grid;\n grid-template-areas: 'rail';\n grid-template-columns: minmax(0, 1fr);\n align-items: center;\n column-gap: var(--vectis-space-2);\n row-gap: var(--vectis-space-1);\n inline-size: 100%;\n font-family: var(--vectis-text-family);\n }\n\n /*\n * Each combination is written with exactly the conditions that define it, so a richer one\n * always carries one condition more than the poorer ones it also matches and wins on WEIGHT,\n * never on source order: `[data-inputs='ends'][data-range]:has(.v-slider-labels)` is (0,4,0)\n * against the (0,3,0) of the two it builds on. `:has()` weighs its argument.\n */\n .v-slider:has(.v-slider-labels) {\n grid-template-areas: 'rail' 'labels';\n }\n\n .v-slider[data-inputs='ends'] {\n grid-template-areas: 'rail field-end';\n grid-template-columns: minmax(0, 1fr) auto;\n }\n\n .v-slider[data-inputs='ends']:has(.v-slider-labels) {\n grid-template-areas: 'rail field-end' 'labels .';\n }\n\n .v-slider[data-inputs='ends'][data-range] {\n grid-template-areas: 'field-start rail field-end';\n grid-template-columns: auto minmax(0, 1fr) auto;\n }\n\n .v-slider[data-inputs='ends'][data-range]:has(.v-slider-labels) {\n grid-template-areas: 'field-start rail field-end' '. labels .';\n }\n\n .v-slider[data-inputs='top'] {\n grid-template-areas: 'field-start . field-end' 'rail rail rail';\n grid-template-columns: auto minmax(0, 1fr) auto;\n }\n\n .v-slider[data-inputs='top']:has(.v-slider-labels) {\n grid-template-areas: 'field-start . field-end' 'rail rail rail' 'labels labels labels';\n }\n\n .v-slider[data-inputs='bottom'] {\n grid-template-areas: 'rail rail rail' 'field-start . field-end';\n grid-template-columns: auto minmax(0, 1fr) auto;\n }\n\n .v-slider[data-inputs='bottom']:has(.v-slider-labels) {\n grid-template-areas: 'rail rail rail' 'labels labels labels' 'field-start . field-end';\n }\n\n .v-slider-rail {\n grid-area: rail;\n position: relative;\n block-size: var(--slider-thumb);\n }\n\n .v-slider-control {\n position: absolute;\n inset: 0;\n }\n\n .v-slider-track {\n position: absolute;\n inset-inline: 0;\n inset-block: 0;\n margin-block: auto;\n block-size: var(--slider-track);\n border-radius: var(--vectis-radius-pill);\n background: var(--vectis-color-border);\n overflow: hidden;\n }\n\n /*\n * It must be declared on the element that CARRIES the fraction, never on an ancestor. A\n * custom property's `var()` is resolved where the property is declared, so set on the root it\n * would read a `--fill-fraction` the root does not have and turn invalid, and every tick,\n * label and bubble would drop to its static position at the start of the track, with no\n * error.\n */\n .v-slider-fill,\n .v-slider-tick,\n .v-slider-tooltip,\n .v-slider-label {\n --slider-at: calc(\n var(--slider-thumb) / 2 + (100% - var(--slider-thumb)) * var(--fill-fraction)\n );\n }\n\n .v-slider-fill {\n --fill-fraction: var(--slider-end-fraction);\n position: absolute;\n inset-block: 0;\n inset-inline-start: 0;\n inline-size: var(--slider-at);\n background: var(--vectis-color-accent);\n }\n\n .v-slider[data-range] .v-slider-fill {\n --fill-fraction: var(--slider-start-fraction);\n inset-inline-start: var(--slider-at);\n inline-size: calc(\n (100% - var(--slider-thumb)) * (var(--slider-end-fraction) - var(--slider-start-fraction))\n );\n }\n\n .v-slider-tick {\n --slider-tick: calc(var(--slider-track) / 3 * 2);\n position: absolute;\n inset-block: 0;\n margin-block: auto;\n inset-inline-start: calc(var(--slider-at) - var(--slider-tick) / 2);\n inline-size: var(--slider-tick);\n block-size: var(--slider-tick);\n border-radius: var(--vectis-radius-pill);\n background: var(--vectis-color-border-strong);\n }\n\n .v-slider-tick[data-filled] {\n background: var(--vectis-color-text-on-accent);\n }\n\n /*\n * Without that, the one on top would swallow every click and the other thumb could never be\n * grabbed. The thumb's paint lives in variables set here, on the control, and read once by\n * each vendor pseudo-element below.\n */\n .v-slider-input {\n --slider-thumb-bg: var(--vectis-color-text-on-accent);\n --slider-thumb-border: var(--vectis-color-accent);\n --slider-thumb-shadow: var(--vectis-shadow-xs);\n --slider-thumb-outline: none;\n --slider-thumb-cursor: pointer;\n --slider-thumb-transition: background-color var(--vectis-duration-fast)\n var(--vectis-ease-default);\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n appearance: none;\n background: transparent;\n pointer-events: none;\n }\n\n /*\n * With a single thumb there is nothing underneath to protect, so the whole control takes the\n * pointer again; which makes clicking the track jump the value there and start dragging at\n * once, natively and with no code at all. The accepted side effect is that the thumb lights\n * up when the pointer is anywhere over the track.\n */\n .v-slider:not([data-range]) .v-slider-input {\n pointer-events: auto;\n cursor: pointer;\n }\n\n /*\n * The two vendor pseudo-elements stay in two separate rules. A selector list holding one a\n * browser does not know is dropped whole, so merged, each engine would throw away the other's\n * thumb and draw its native one.\n */\n .v-slider-input::-webkit-slider-thumb {\n appearance: none;\n pointer-events: auto;\n width: var(--slider-thumb);\n height: var(--slider-thumb);\n border-radius: var(--vectis-radius-pill);\n background: var(--slider-thumb-bg);\n border: var(--vectis-control-border-width) solid var(--slider-thumb-border);\n box-shadow: var(--slider-thumb-shadow);\n outline: var(--slider-thumb-outline);\n outline-offset: var(--vectis-focus-ring-offset);\n cursor: var(--slider-thumb-cursor);\n transition: var(--slider-thumb-transition);\n }\n\n .v-slider-input::-moz-range-thumb {\n pointer-events: auto;\n width: var(--slider-thumb);\n height: var(--slider-thumb);\n border-radius: var(--vectis-radius-pill);\n background: var(--slider-thumb-bg);\n border: var(--vectis-control-border-width) solid var(--slider-thumb-border);\n box-shadow: var(--slider-thumb-shadow);\n outline: var(--slider-thumb-outline);\n outline-offset: var(--vectis-focus-ring-offset);\n cursor: var(--slider-thumb-cursor);\n transition: var(--slider-thumb-transition);\n }\n\n /* The states, all at (0,3,0) but the base, so their ORDER arbitrates them: hover, then\n read-only, invalid and disabled, each overriding what came before on a thumb that is\n several at once.\n\n The hover tint is mixed from the thumb's own white rather than read from\n `accent-surface`: that token turns dark in the dark theme, and a white thumb would\n flash nearly black under the pointer. */\n .v-slider-input:is(:hover, :active):not(:disabled) {\n --slider-thumb-bg: color-mix(\n in oklab,\n var(--vectis-color-text-on-accent),\n var(--vectis-color-accent) 10%\n );\n }\n\n .v-slider-input:focus-visible {\n --slider-thumb-outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline: none;\n }\n\n .v-slider[data-readonly] .v-slider-input {\n --slider-thumb-bg: var(--vectis-color-surface);\n --slider-thumb-border: var(--vectis-color-text-muted);\n --slider-thumb-cursor: default;\n cursor: default;\n }\n\n .v-slider[data-readonly] .v-slider-fill {\n background: var(--vectis-color-text-muted);\n }\n\n .v-slider[data-readonly] .v-slider-tick[data-filled] {\n background: var(--vectis-color-surface);\n }\n\n .v-slider[data-invalid] .v-slider-input {\n --slider-thumb-border: var(--vectis-color-danger);\n }\n\n /*\n * It looks like a VTooltip but is placed by arithmetic rather than anchored to the thumb: a\n * native thumb is a pseudo-element, and the browser's anchoring cannot attach anything to\n * one. The fraction it follows is the one the root already carries for the fill.\n */\n .v-slider-tooltip {\n position: absolute;\n inset-block-end: calc(100% + var(--vectis-space-2));\n inset-inline-start: var(--slider-at);\n inline-size: 0;\n display: flex;\n justify-content: center;\n opacity: 0;\n visibility: hidden;\n transition:\n opacity var(--vectis-duration-fast) var(--vectis-ease-default),\n visibility var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-slider-tooltip-start {\n --fill-fraction: var(--slider-start-fraction);\n }\n\n .v-slider-tooltip-end {\n --fill-fraction: var(--slider-end-fraction);\n }\n\n .v-slider:has(.v-slider-input-start:active) .v-slider-tooltip-start,\n .v-slider:has(.v-slider-input-start:focus-visible) .v-slider-tooltip-start,\n .v-slider:has(.v-slider-input-end:active) .v-slider-tooltip-end,\n .v-slider:has(.v-slider-input-end:focus-visible) .v-slider-tooltip-end {\n opacity: 1;\n visibility: visible;\n }\n\n .v-slider-tooltip-bubble {\n padding: var(--vectis-space-1) var(--vectis-space-2);\n background: var(--vectis-color-surface-inverse);\n color: var(--vectis-color-text-on-inverse);\n font-size: var(--vectis-text-caption-size);\n line-height: var(--vectis-text-caption-leading);\n border-radius: min(var(--vectis-radius-interactive), calc(0.5lh + var(--vectis-space-1)));\n box-shadow: var(--vectis-shadow-sm);\n white-space: nowrap;\n }\n\n .v-slider-labels {\n grid-area: labels;\n position: relative;\n /* The labels are positioned individually and therefore contribute no height of\n their own; this reserves enough room for either kind, a small line of text or an\n icon. */\n min-block-size: var(--vectis-icon-size-md);\n /* The pair travels together, as it does in every `[data-size]` block of\n control-size.css: the size applies to every source, the optical size only to the\n ligature, and setting one without the other draws a 20px glyph cut for 24. */\n --vectis-icon-size: var(--vectis-icon-size-md);\n --vectis-icon-opsz: 20;\n font-size: var(--vectis-text-caption-size);\n color: var(--vectis-color-text-muted);\n }\n\n /* A box of zero width placed exactly on the step: its content then overflows equally\n on both sides, which centres it there. Centring it with a transform would be the\n usual trick, but a transform is physical and would have to be undone for the\n vertical orientation and again for a right-to-left page. */\n .v-slider-label {\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: var(--slider-at);\n inline-size: 0;\n display: flex;\n justify-content: center;\n white-space: nowrap;\n }\n\n /* The hint takes no area of its own: it spans every column and is AUTO-PLACED, which\n drops it into an implicit row under whichever zone template is in force.\n Given a row in each of them instead, the `row-gap` would open under every slider that\n has no hint at all. */\n .v-slider-hint {\n grid-column: 1 / -1;\n font-size: var(--vectis-text-caption-size);\n line-height: var(--vectis-text-caption-leading);\n color: var(--vectis-color-text-muted);\n }\n\n .v-slider[data-disabled] .v-slider-hint {\n color: var(--vectis-color-text-subtle);\n }\n\n .v-slider-field.v-input {\n inline-size: var(--vectis-control-size-slider-field);\n }\n\n /* Qualify number-field selectors so their layout cannot depend on VInput stylesheet order. */\n .v-slider-field-start.v-input {\n grid-area: field-start;\n }\n\n .v-slider-field-end.v-input {\n grid-area: field-end;\n }\n\n .v-slider[data-orientation='vertical'] {\n grid-template-areas: 'rail';\n grid-template-columns: none;\n inline-size: fit-content;\n justify-items: center;\n }\n\n .v-slider[data-orientation='vertical']:has(.v-slider-labels) {\n grid-template-areas: 'rail labels';\n grid-template-columns: auto auto;\n }\n\n .v-slider[data-orientation='vertical'][data-inputs='ends'] {\n grid-template-areas: 'field-end' 'rail';\n grid-template-columns: none;\n }\n\n .v-slider[data-orientation='vertical'][data-inputs='ends']:has(.v-slider-labels) {\n grid-template-areas: 'field-end .' 'rail labels';\n grid-template-columns: auto auto;\n }\n\n .v-slider[data-orientation='vertical'][data-inputs='ends'][data-range] {\n grid-template-areas: 'field-end' 'rail' 'field-start';\n grid-template-columns: none;\n }\n\n .v-slider[data-orientation='vertical'][data-inputs='ends'][data-range]:has(.v-slider-labels) {\n grid-template-areas: 'field-end .' 'rail labels' 'field-start .';\n grid-template-columns: auto auto;\n }\n\n /*\n * Upright, `top` and `bottom` become the two SIDES, the inline start and the inline end: the\n * fields stack in a column beside the track, the end field level with its top and the start\n * field with its bottom, where the values they hold sit. The track spans the three rows and\n * gives them their height, the middle one taking whatever the fields leave.\n */\n .v-slider[data-orientation='vertical'][data-inputs='top'] {\n grid-template-areas: 'field-end rail' '. rail' 'field-start rail';\n grid-template-columns: auto auto;\n grid-template-rows: auto 1fr auto;\n }\n\n .v-slider[data-orientation='vertical'][data-inputs='top']:has(.v-slider-labels) {\n grid-template-areas:\n 'field-end rail labels'\n '. rail labels'\n 'field-start rail labels';\n grid-template-columns: auto auto auto;\n }\n\n .v-slider[data-orientation='vertical'][data-inputs='bottom'] {\n grid-template-areas: 'rail field-end' 'rail .' 'rail field-start';\n grid-template-columns: auto auto;\n grid-template-rows: auto 1fr auto;\n }\n\n .v-slider[data-orientation='vertical'][data-inputs='bottom']:has(.v-slider-labels) {\n grid-template-areas:\n 'rail labels field-end'\n 'rail labels .'\n 'rail labels field-start';\n grid-template-columns: auto auto auto;\n }\n\n .v-slider[data-orientation='vertical'] .v-slider-rail {\n inline-size: var(--slider-thumb);\n block-size: var(--vectis-control-size-slider-length);\n }\n\n /*\n * Rotate only the track box and reverse its direction; labels remain horizontal and the\n * minimum value stays at the bottom.\n */\n .v-slider[data-orientation='vertical'] .v-slider-control {\n writing-mode: vertical-lr;\n direction: rtl;\n }\n\n .v-slider[data-orientation='vertical'] .v-slider-tooltip {\n inset-block-end: var(--slider-at);\n inset-inline-start: auto;\n inset-inline-end: calc(100% + var(--vectis-space-2));\n inline-size: auto;\n block-size: 0;\n align-items: center;\n justify-content: flex-end;\n }\n\n .v-slider[data-orientation='vertical'] .v-slider-labels {\n align-self: stretch;\n min-block-size: auto;\n }\n\n .v-slider[data-orientation='vertical'] .v-slider-label {\n inset-block-start: auto;\n inset-block-end: var(--slider-at);\n inset-inline-start: 0;\n inline-size: auto;\n block-size: 0;\n align-items: center;\n justify-content: flex-start;\n }\n\n /*\n * A disabled slider greys out through the colour tokens, the same ones VCheckbox and VSwitch\n * use, and never through opacity. It comes last among the states, so a slider both disabled\n * and read-only or invalid is drawn disabled.\n */\n .v-slider[data-disabled] {\n cursor: not-allowed;\n }\n\n .v-slider[data-disabled] .v-slider-track {\n background: var(--vectis-color-surface-muted);\n }\n\n .v-slider[data-disabled] .v-slider-fill {\n background: var(--vectis-color-text-subtle);\n }\n\n .v-slider[data-disabled] .v-slider-tick {\n background: var(--vectis-color-text-subtle);\n }\n\n /*\n * A tick sitting on the greyed fill takes the light colour back, so that it stays visible\n * against it; the same inversion VCheckbox applies to its disabled tick.\n */\n .v-slider[data-disabled] .v-slider-tick[data-filled] {\n background: var(--vectis-color-surface-muted);\n }\n\n .v-slider[data-disabled] .v-slider-labels {\n color: var(--vectis-color-text-subtle);\n }\n\n .v-slider[data-disabled] .v-slider-input {\n --slider-thumb-bg: var(--vectis-color-surface-muted);\n --slider-thumb-border: var(--vectis-color-text-subtle);\n --slider-thumb-shadow: none;\n --slider-thumb-cursor: not-allowed;\n cursor: not-allowed;\n }\n\n /*\n * Forced colours erase background-only tracks and ticks. Restore the track edge and use\n * system Highlight/HighlightText for selected portions.\n */\n @media (forced-colors: active) {\n .v-slider .v-slider-track {\n forced-color-adjust: none;\n background: Canvas;\n box-shadow: inset 0 0 0 var(--vectis-control-border-width) CanvasText;\n }\n\n .v-slider .v-slider-fill {\n forced-color-adjust: none;\n background: Highlight;\n }\n\n .v-slider .v-slider-tick {\n forced-color-adjust: none;\n background: CanvasText;\n }\n\n .v-slider .v-slider-tick[data-filled] {\n background: HighlightText;\n }\n\n .v-slider .v-slider-input {\n forced-color-adjust: none;\n --slider-thumb-bg: Canvas;\n --slider-thumb-border: CanvasText;\n --slider-thumb-shadow: none;\n }\n\n .v-slider[data-disabled] .v-slider-track {\n box-shadow: inset 0 0 0 var(--vectis-control-border-width) GrayText;\n }\n\n .v-slider[data-disabled] .v-slider-fill,\n .v-slider[data-disabled] .v-slider-tick {\n background: GrayText;\n }\n\n .v-slider[data-disabled] .v-slider-input {\n --slider-thumb-border: GrayText;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-slider-input {\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V,SAAS,EAAA;IACT,cAAY,GAAW,CAAK;IAC5B,WAAM,MAAE,GAAY,CAAK;;;;;;;;;;;;;;;;GAEhB,EAAA,QAAA,EAAA,GAAZ,EAAsE,QAAA;;IAAnD,IAAI,EAAA,EAAA;IAAQ,OAAM;QAAmB,EAAA,IAAI,GAAA,GAAA,EAAA,KAAA,EAAA,IAAA,EAAA"}
|
|
1
|
+
{"version":3,"file":"VSlider.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VSlider/VSlider.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @core\n/**\n * Native range inputs own thumb interaction. JavaScript keeps range endpoints ordered and\n * synchronizes optional number fields, labels and ARIA values.\n */\n\nimport { computed, inject, ref, watchEffect } from 'vue'\nimport VField from '../VField/VField.vue'\nimport type { FieldControlProps, FieldLabelPosition } from '../VField/VField.vue'\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport type { IconSource } from '../VIcon/types'\nimport { inputGroupKey } from '../VInput/context'\nimport VNumberInput from '../VNumberInput/VNumberInput.vue'\n\nimport { useAriaLabel } from '../../composables/useAriaLabel'\nimport { useControlShape } from '../../composables/useControlShape'\nimport { useRootAttrs } from '../../composables/useRootAttrs'\nimport { isDev } from '../../utils/env'\nimport { clamp } from '../../utils/number'\nimport { useMessages, useResolvedLocale } from '../../i18n/state'\n\n/**\n * What one step of the track is called: a piece of text, or an icon paired with the words that\n * name it, which a screen reader reads in place of the raw number.\n */\nexport type SliderLabel = string | { icon: IconSource; label: string }\n\n/** The value of a slider: one number, or an ordered pair of them in range mode. */\nexport type SliderValue = number | [number, number]\n\n/** Which way the track runs. */\nexport type SliderOrientation = 'horizontal' | 'vertical'\n\n/** The height of the number fields: 32, 40 or 48 pixels. */\nexport type SliderSize = 'sm' | 'md' | 'lg'\n\n/**\n * Where the number fields sit: none, at the ends of the track, or in a row above or below\n * it. On an upright slider, above and below become the two sides of it.\n */\nexport type SliderInputs = false | 'ends' | 'top' | 'bottom'\n\ninterface SliderProps {\n /** The lowest value the thumb can reach. It is 0 by default. */\n min?: number\n /** The highest value the thumb can reach. It is 100 by default. */\n max?: number\n /**\n * The gap between two values the thumb can stop on, 1 by default. It is also what the\n * arrow keys move by, and what a value typed into the companion field is snapped to.\n */\n step?: number\n /** Offers two thumbs to pick a range, which makes the v-model a pair of values. */\n range?: boolean\n /** Makes the slider unusable. */\n disabled?: boolean\n /**\n * Shows the value without allowing it to be changed. The thumbs can still be focused and\n * are announced as read-only, but neither the pointer nor the keyboard moves them, and the\n * number fields turn read-only with them.\n */\n readonly?: boolean\n /**\n * Marks the value as invalid, which colours the thumbs and tells assistive technology\n * so. It is for a rule the browser cannot check by itself.\n */\n invalid?: boolean\n /**\n * The height of the number fields `inputs` adds. Inside a VInputGroup the group's size\n * wins, as it does for every field of the row.\n */\n size?: SliderSize\n /**\n * The label above the slider, which also names its thumbs: in range mode they are announced\n * as the start and the end of it.\n */\n label?: string\n /** Hides the label visually. It still names the thumbs for assistive technology. */\n hideLabel?: boolean\n /**\n * Where the label sits: above the slider (`top`, the default), or at its start, in a column of\n * its own, moving back above when there is not room for both.\n */\n labelPosition?: FieldLabelPosition\n /**\n * A line of help under the track, stating what the numbers mean or where they may go. It\n * is tied to the slider for assistive technology, so it is read out after the name rather\n * than as part of it.\n */\n hint?: string\n /**\n * A message saying what is wrong with the value, shown in place of the hint so that the field\n * does not grow. It marks the field invalid, is read along with it, and is announced when it\n * appears or changes.\n */\n error?: string\n /** Turns the slider upright, with the lowest value at the bottom. */\n orientation?: SliderOrientation\n /**\n * Adds a number field for setting the value exactly: one, or one per end in range mode. No\n * field is drawn by default.\n */\n inputs?: SliderInputs\n /**\n * Marks each step on the track. Providing labels implies it. Past fifty steps the\n * marks would be an unreadable comb and are not drawn at all.\n */\n ticks?: boolean\n /**\n * A label for every step, in order: a piece of text, or an icon with the words that\n * name it for screen readers. They also become what a screen reader announces in\n * place of the raw number.\n */\n labels?: SliderLabel[]\n /** Shows the value in a bubble above the thumb while it is being moved or focused. */\n tooltip?: boolean\n /**\n * How the value is written in the bubble, the number fields and what the thumbs announce: the\n * options of `Intl.NumberFormat`, for a price, a unit or a percentage. `min`, `max` and `step`\n * stay in the model's unit: with `style: 'percent'`, 0.25 is written 25%.\n */\n formatOptions?: Intl.NumberFormatOptions\n /** The locale the value is written and read in. It defaults to the design system's. */\n locale?: string\n}\n\nconst props = withDefaults(defineProps<SliderProps>(), {\n min: 0,\n max: 100,\n step: 1,\n range: false,\n disabled: false,\n readonly: false,\n invalid: false,\n size: 'md',\n label: undefined,\n hideLabel: false,\n labelPosition: 'top',\n hint: undefined,\n error: undefined,\n orientation: 'horizontal',\n inputs: false,\n ticks: false,\n labels: undefined,\n tooltip: false,\n formatOptions: undefined,\n locale: undefined,\n})\n\n/** The value: a single number, 0 to begin with, or an ordered pair once `range` is set. */\nconst model = defineModel<SliderValue>({ default: 0 })\n\nconst emit = defineEmits<{\n /** The value is BEING changed: every step of a drag, and every key that moves a thumb. */\n input: [value: SliderValue]\n /**\n * The reader has SETTLED on a value: a thumb was released or moved by a key, or a number\n * field was committed.\n */\n change: [value: SliderValue]\n}>()\n\n// The number fields are fields of a VInputGroup row like any other, so the row's size and\n// its disabled state reach them through the same arbitration. A slider has no `compact` of\n// its own: only the row's can apply.\nconst group = inject(inputGroupKey, null)\nconst {\n size: resolvedSize,\n compact: resolvedCompact,\n disabled: resolvedDisabled,\n} = useControlShape(\n {\n get size() {\n return props.size\n },\n compact: false,\n get disabled() {\n return props.disabled\n },\n },\n group,\n)\n\ntype Thumb = 'start' | 'end'\n\nconst startValue = computed(() => (Array.isArray(model.value) ? model.value[0] : props.min))\nconst endValue = computed(() =>\n Array.isArray(model.value) ? model.value[1] : (model.value as number),\n)\n\nconst thumbValue = (which: Thumb) => (which === 'start' ? startValue.value : endValue.value)\n\n/**\n * Where a value sits along the run, as a fraction between 0 and 1. The guard covers a\n * slider whose two bounds are equal, which would otherwise divide by zero.\n */\nconst frac = (v: number) => clamp((v - props.min) / (props.max - props.min || 1), 0, 1)\n\n// @core\n// The thumb being held PUSHES its sibling; it must not stop against it. Two thumbs resting on\n// the same value are one thumb as far as the pointer is concerned, the end one being last in\n// the DOM and therefore the only one it can reach; so a range stopped at `[100, 100]` could\n// only ever be raised, and at the maximum it could not move at all.\nfunction writeThumb(which: Thumb, n: number): SliderValue {\n const next: SliderValue = !props.range\n ? n\n : which === 'start'\n ? [n, Math.max(n, endValue.value)]\n : [Math.min(n, startValue.value), n]\n model.value = next\n return next\n}\n\nconst writtenFor = (value: SliderValue, which: Thumb) =>\n Array.isArray(value) ? value[which === 'start' ? 0 : 1] : value\n\nfunction onThumbInput(which: Thumb, event: Event) {\n const el = event.target as HTMLInputElement\n // @core\n // A drag or a click on the track has ALREADY moved the native thumb when `input` fires,\n // and the event cannot be cancelled: putting the value back is the only refusal there is.\n // It lands before the browser paints, so the thumb never visibly leaves its place, and\n // since the value at release is the one it started from, no `change` follows either.\n if (props.readonly) {\n el.value = String(thumbValue(which))\n return\n }\n const next = writeThumb(which, Number(el.value))\n el.value = String(writtenFor(next, which))\n emit('input', next)\n}\n\n// @keyboard @core\n// The keys that move a range input, cancelled before the browser applies them when the\n// slider is read-only. Tab and every other key pass, so the thumbs stay reachable.\nconst VALUE_KEYS = new Set([\n 'ArrowUp',\n 'ArrowDown',\n 'ArrowLeft',\n 'ArrowRight',\n 'Home',\n 'End',\n 'PageUp',\n 'PageDown',\n])\n\nfunction onThumbKeydown(event: KeyboardEvent) {\n if (props.readonly && VALUE_KEYS.has(event.key)) event.preventDefault()\n}\n\n// @core\n/*\n * The settled value is read off the THUMB, never off the model. A key press fires `input` and\n * `change` back to back in one task, and under a parent `v-model` the model's local copy only\n * catches up when the parent re-renders, so it would still hold the value from before the key.\n */\nfunction onThumbChange(which: Thumb, event: Event) {\n if (props.readonly) return\n const value = Number((event.target as HTMLInputElement).value)\n if (!props.range) emit('change', value)\n else if (which === 'start') emit('change', [value, Math.max(value, endValue.value)])\n else emit('change', [Math.min(value, startValue.value), value])\n}\n\n/** How many whole steps the thumb can actually stop on. */\nconst stepCount = computed(() =>\n props.step > 0 ? Math.floor((props.max - props.min) / props.step + 1e-9) : 0,\n)\n\n/**\n * The highest value a thumb can actually stop on, which is the last whole step and not\n * necessarily the maximum: with `min=0 max=95 step=10` the native control stops at 90.\n */\nconst lastStop = computed(() =>\n props.step > 0 ? props.min + stepCount.value * props.step : props.max,\n)\n\nconst showTicks = computed(\n () =>\n (props.ticks || props.labels !== undefined) && stepCount.value >= 1 && stepCount.value <= 50,\n)\n\n/** Each step's value and the style that places it, shared by the ticks and the labels. */\nconst stepPlaces = computed(() => {\n const length = Math.max(showTicks.value ? stepCount.value + 1 : 0, props.labels?.length ?? 0)\n return Array.from({ length }, (_, i) => {\n const value = props.min + i * props.step\n return { value, style: { '--fill-fraction': String(frac(value)) } }\n })\n})\n\nconst tickPlaces = computed(() =>\n showTicks.value ? stepPlaces.value.slice(0, stepCount.value + 1) : [],\n)\n\nconst isFilled = (value: number) =>\n props.range ? value >= startValue.value && value <= endValue.value : value <= endValue.value\n\n// Resolved once here and handed to the number fields as the result, so the fields and the\n// bubble can never read the value in two different languages.\nconst resolvedLocale = useResolvedLocale(() => props.locale)\nconst numberFormat = computed(\n () => new Intl.NumberFormat(resolvedLocale.value, props.formatOptions),\n)\nconst formatValue = (value: number) => numberFormat.value.format(value)\n\n/** What a value is called, if the consumer named its step; failing that, the number written. */\nfunction labelTextAt(value: number): string {\n const item = props.labels?.[Math.round((value - props.min) / props.step)]\n if (item === undefined) return formatValue(value)\n return typeof item === 'string' ? item : item.label\n}\n\n// @a11y\n/*\n * Resolve the label against consumer ARIA attributes before deriving distinct range-thumb\n * names; an undefined prop must not erase their accessible name.\n */\nconst m = useMessages()\nconst resolvedLabel = useAriaLabel(() => props.label)\nconst startLabel = computed(() =>\n resolvedLabel.value ? m.value.slider.rangeStart(resolvedLabel.value) : m.value.slider.start,\n)\nconst endLabel = computed(() =>\n resolvedLabel.value ? m.value.slider.rangeEnd(resolvedLabel.value) : m.value.slider.end,\n)\nconst thumbEndLabel = computed(() => (props.range ? endLabel.value : resolvedLabel.value))\nconst fieldEndLabel = computed(() =>\n props.range ? endLabel.value : (resolvedLabel.value ?? m.value.slider.value),\n)\n\n// @a11y\n// Said only when it adds something to the bare number a range announces: a step label, or a\n// value written with `formatOptions` (\"120 €\" rather than \"120\").\nconst spokenText = (value: number) =>\n props.labels || props.formatOptions ? labelTextAt(value) : undefined\nconst startValueText = computed(() => (props.range ? spokenText(startValue.value) : undefined))\nconst endValueText = computed(() => spokenText(endValue.value))\n\n// @a11y\n/*\n * The wrapper-root split. The root here is a layout box holding the labels, the track and the\n * optional number fields, so a consumer's `name`, `id`, `required` and `aria-*` have to be\n * redirected onto the real `<input type=\"range\">`; left on the wrapper, a `name` submits\n * nothing and a `<label for>` points at a div.\n */\ndefineOptions({ inheritAttrs: false })\nconst { attrs, rootClass, rootStyle, forwardedAttrs } = useRootAttrs()\n\n/**\n * What reaches the end thumb from VField: the consumer's attributes and the description. The\n * thumbs are named by `aria-label`, carrying the label's words, so VField's reference to the\n * label text gives way to the consumer's own `aria-labelledby`, if any. A `required` attribute\n * is VField's prop on the way, which group mode keeps for its asterisk: it is handed on here.\n */\nfunction thumbAttrs(fieldProps: FieldControlProps): FieldControlProps {\n return {\n ...fieldProps,\n 'aria-labelledby': attrs['aria-labelledby'] as string | undefined,\n required: attrs.required as true | undefined,\n }\n}\nconst isInvalid = computed(() => props.invalid || !!props.error)\n\n/**\n * Where the fields go, `ends` standing in for any other truthy value: a bare `inputs`\n * attribute reaches the component as `true`, the prop being part boolean.\n */\nconst inputsPlace = computed(() =>\n props.inputs === 'top' || props.inputs === 'bottom' ? props.inputs : props.inputs && 'ends',\n)\n\n// @devwarn\n/*\n * Every guard here describes something that fails SILENTLY. They sit in an effect, so a\n * bound that only becomes wrong on a later render is still caught, and each sentence is\n * given once per instance: the same warning repeated on every keystroke is how a warning\n * stops being read (the `useFileField` arrangement).\n */\nif (isDev) {\n // Keyed by a short id rather than by the sentence: each of these embeds a count, so the\n // same guard reported twice would read as two different messages and warn again.\n const warned = new Set<string>()\n const warn = (id: string, message: string) => {\n if (warned.has(id)) return\n warned.add(id)\n console.warn(`[VSlider] ${message}`)\n }\n watchEffect(() => {\n if (props.step <= 0)\n warn(\n 'step',\n `step=\"${props.step}\" cannot move a thumb: the arrow keys do nothing and a value typed into a field is committed as it stands. Give a positive step.`,\n )\n if ((props.ticks || props.labels) && stepCount.value > 50)\n warn(\n 'ticks',\n `${stepCount.value} steps: no tick is drawn past 50, the comb being unreadable.`,\n )\n if (props.labels && props.labels.length !== stepCount.value + 1)\n warn(\n 'labels',\n `${props.labels.length} labels for ${stepCount.value + 1} steps: one label per step expected.`,\n )\n if (props.inputs !== false && props.inputs !== inputsPlace.value)\n warn(\n 'inputs',\n `inputs=\"${String(props.inputs)}\" is not a placement: the fields are drawn at the ends. Write inputs=\"ends\", \"top\" or \"bottom\".`,\n )\n if (props.range && attrs.name !== undefined)\n warn(\n 'name',\n `name=\"${String(attrs.name)}\" on a range: only the end thumb carries it, so the form receives one value of the two. Bind the model to two inputs of your own instead.`,\n )\n })\n}\n\n// @a11y\n/*\n * The fields are rendered in the order they are SEEN, before or after the track, so that\n * the tab order follows the screen. Laid out by the grid alone from a fixed DOM order, a\n * row of fields above the track would be reached one on each side of the thumbs.\n */\nconst fieldsBefore = computed<Thumb[]>(() => {\n if (inputsPlace.value === 'ends') return props.range ? ['start'] : []\n if (inputsPlace.value === 'top') return props.range ? ['start', 'end'] : ['end']\n return []\n})\nconst fieldsAfter = computed<Thumb[]>(() => {\n if (inputsPlace.value === 'ends') return ['end']\n if (inputsPlace.value === 'bottom') return props.range ? ['start', 'end'] : ['end']\n return []\n})\n\nconst fieldLabel = (which: Thumb) => (which === 'start' ? startLabel.value : fieldEndLabel.value)\n\n// @core\n/**\n * What a number field commits, on leaving it or on Enter. VNumberInput has already parsed and\n * bounded it, and puts its text back to the value it is given when this refuses or changes\n * what was typed; an emptied field is refused.\n */\nfunction commitField(which: Thumb, typed: number | null) {\n if (typed === null) return\n // The ceiling is the last step that FITS, never `max` itself: a native range stops there\n // (what `stepCount` counts), so a value past it would put the thumb, the fill and the number\n // out of step.\n const snapped =\n props.step > 0 ? props.min + Math.round((typed - props.min) / props.step) * props.step : typed\n const value = Math.min(lastStop.value, Math.round(snapped * 1e10) / 1e10)\n const previous = thumbValue(which)\n const next = writeThumb(which, value)\n // Emitted only when the value MOVED, as a native range emits nothing for a key that cannot\n // move its thumb; and the payload is `next`, the model's local copy lagging a parent\n // `v-model` (see `onThumbChange`).\n if (writtenFor(next, which) !== previous) emit('change', next)\n}\n\nconst endThumbEl = ref<HTMLInputElement | null>(null)\n\n// Both members point at the END thumb: it is the one always rendered, and the one the\n// consumer's `id` lands on, so `focus()` goes where a `<label for>` would send it.\ndefineExpose({\n /** Moves the focus to the end thumb, the only thumb outside range mode. */\n focus: (options?: FocusOptions) => endThumbEl.value?.focus(options),\n /** The end thumb's real `<input type=\"range\">`, for what `focus` does not cover. */\n el: endThumbEl,\n})\n</script>\n\n<template>\n <VField\n v-bind=\"forwardedAttrs\"\n class=\"v-slider\"\n :class=\"rootClass\"\n :style=\"rootStyle\"\n :label=\"label\"\n :hint=\"hint\"\n :error=\"error\"\n :disabled=\"resolvedDisabled\"\n :hide-label=\"hideLabel\"\n :label-position=\"labelPosition\"\n group\n >\n <!-- The label is text only: the thumbs carry the same words as their accessible names. -->\n <template #default=\"{ fieldProps }\">\n <div\n class=\"v-slider-body\"\n :data-range=\"range ? '' : undefined\"\n :data-disabled=\"resolvedDisabled ? '' : undefined\"\n :data-readonly=\"readonly ? '' : undefined\"\n :data-invalid=\"isInvalid ? '' : undefined\"\n :data-size=\"resolvedSize\"\n :data-orientation=\"orientation\"\n :data-inputs=\"inputsPlace || undefined\"\n :style=\"{\n '--slider-start-fraction': range ? String(frac(startValue)) : undefined,\n '--slider-end-fraction': String(frac(endValue)),\n }\"\n >\n <VNumberInput\n v-for=\"which in fieldsBefore\"\n :key=\"which\"\n :model-value=\"thumbValue(which)\"\n :class=\"['v-slider-field', `v-slider-field-${which}`]\"\n controls=\"none\"\n :format-options=\"formatOptions\"\n :locale=\"resolvedLocale\"\n :size=\"resolvedSize\"\n :compact=\"resolvedCompact\"\n :min=\"min\"\n :max=\"max\"\n :step=\"step\"\n :disabled=\"resolvedDisabled\"\n :readonly=\"readonly\"\n :invalid=\"isInvalid\"\n :aria-label=\"fieldLabel(which)\"\n @update:model-value=\"commitField(which, $event)\"\n />\n <div class=\"v-slider-rail\">\n <span class=\"v-slider-control\">\n <span class=\"v-slider-track\" aria-hidden=\"true\">\n <span class=\"v-slider-fill\" />\n <span\n v-for=\"(tick, i) in tickPlaces\"\n :key=\"i\"\n class=\"v-slider-tick\"\n :data-filled=\"isFilled(tick.value) ? '' : undefined\"\n :style=\"tick.style\"\n />\n </span>\n <input\n v-if=\"range\"\n type=\"range\"\n class=\"v-slider-input v-slider-input-start\"\n :min=\"min\"\n :max=\"max\"\n :step=\"step\"\n :disabled=\"resolvedDisabled\"\n :value=\"startValue\"\n :aria-label=\"startLabel\"\n :aria-valuetext=\"startValueText\"\n :aria-invalid=\"isInvalid || undefined\"\n :aria-readonly=\"readonly || undefined\"\n @keydown=\"onThumbKeydown\"\n @input=\"onThumbInput('start', $event)\"\n @change=\"onThumbChange('start', $event)\"\n />\n <!--\n The consumer's attributes come first, so what the component decides for itself; the\n bounds, the value and the disabled state; cannot be overwritten by one of them, and so\n that an ARIA state the consumer sets is not erased by an `undefined` of ours.\n `aria-valuetext` is one of those: the component has one to say only when `labels` or\n `formatOptions` was given.\n -->\n <input\n ref=\"endThumbEl\"\n :aria-invalid=\"isInvalid || undefined\"\n :aria-readonly=\"readonly || undefined\"\n :aria-valuetext=\"endValueText\"\n v-bind=\"thumbAttrs(fieldProps)\"\n type=\"range\"\n class=\"v-slider-input v-slider-input-end\"\n :min=\"min\"\n :max=\"max\"\n :step=\"step\"\n :disabled=\"resolvedDisabled\"\n :value=\"endValue\"\n :aria-label=\"thumbEndLabel\"\n @keydown=\"onThumbKeydown\"\n @input=\"onThumbInput('end', $event)\"\n @change=\"onThumbChange('end', $event)\"\n />\n </span>\n <span\n v-if=\"tooltip && range\"\n class=\"v-slider-tooltip v-slider-tooltip-start\"\n aria-hidden=\"true\"\n >\n <span class=\"v-slider-tooltip-bubble\">{{ labelTextAt(startValue) }}</span>\n </span>\n <span v-if=\"tooltip\" class=\"v-slider-tooltip v-slider-tooltip-end\" aria-hidden=\"true\">\n <span class=\"v-slider-tooltip-bubble\">{{ labelTextAt(endValue) }}</span>\n </span>\n </div>\n <div v-if=\"labels\" class=\"v-slider-labels\">\n <span\n v-for=\"(item, i) in labels\"\n :key=\"i\"\n class=\"v-slider-label\"\n :style=\"stepPlaces[i]?.style\"\n >\n <template v-if=\"typeof item === 'string'\">{{ item }}</template>\n <VIcon v-else v-bind=\"iconProps(item.icon)\" :label=\"item.label\" />\n </span>\n </div>\n <VNumberInput\n v-for=\"which in fieldsAfter\"\n :key=\"which\"\n :model-value=\"thumbValue(which)\"\n :class=\"['v-slider-field', `v-slider-field-${which}`]\"\n controls=\"none\"\n :format-options=\"formatOptions\"\n :locale=\"resolvedLocale\"\n :size=\"resolvedSize\"\n :compact=\"resolvedCompact\"\n :min=\"min\"\n :max=\"max\"\n :step=\"step\"\n :disabled=\"resolvedDisabled\"\n :readonly=\"readonly\"\n :invalid=\"isInvalid\"\n :aria-label=\"fieldLabel(which)\"\n @update:model-value=\"commitField(which, $event)\"\n />\n </div>\n </template>\n </VField>\n</template>\n\n<style>\n@layer vectis.components {\n .v-slider-body {\n --slider-thumb: var(--vectis-control-size-slider-thumb);\n --slider-track: var(--vectis-control-size-slider-track);\n display: grid;\n grid-template-areas: 'rail';\n grid-template-columns: minmax(0, 1fr);\n align-items: center;\n column-gap: var(--vectis-space-2);\n row-gap: var(--vectis-space-1);\n inline-size: 100%;\n font-family: var(--vectis-text-family);\n }\n\n /*\n * Each combination is written with exactly the conditions that define it, so a richer one\n * always carries one condition more than the poorer ones it also matches and wins on WEIGHT,\n * never on source order: `[data-inputs='ends'][data-range]:has(.v-slider-labels)` is (0,4,0)\n * against the (0,3,0) of the two it builds on. `:has()` weighs its argument.\n */\n .v-slider-body:has(.v-slider-labels) {\n grid-template-areas: 'rail' 'labels';\n }\n\n .v-slider-body[data-inputs='ends'] {\n grid-template-areas: 'rail field-end';\n grid-template-columns: minmax(0, 1fr) auto;\n }\n\n .v-slider-body[data-inputs='ends']:has(.v-slider-labels) {\n grid-template-areas: 'rail field-end' 'labels .';\n }\n\n .v-slider-body[data-inputs='ends'][data-range] {\n grid-template-areas: 'field-start rail field-end';\n grid-template-columns: auto minmax(0, 1fr) auto;\n }\n\n .v-slider-body[data-inputs='ends'][data-range]:has(.v-slider-labels) {\n grid-template-areas: 'field-start rail field-end' '. labels .';\n }\n\n .v-slider-body[data-inputs='top'] {\n grid-template-areas: 'field-start . field-end' 'rail rail rail';\n grid-template-columns: auto minmax(0, 1fr) auto;\n }\n\n .v-slider-body[data-inputs='top']:has(.v-slider-labels) {\n grid-template-areas: 'field-start . field-end' 'rail rail rail' 'labels labels labels';\n }\n\n .v-slider-body[data-inputs='bottom'] {\n grid-template-areas: 'rail rail rail' 'field-start . field-end';\n grid-template-columns: auto minmax(0, 1fr) auto;\n }\n\n .v-slider-body[data-inputs='bottom']:has(.v-slider-labels) {\n grid-template-areas: 'rail rail rail' 'labels labels labels' 'field-start . field-end';\n }\n\n .v-slider-rail {\n grid-area: rail;\n position: relative;\n block-size: var(--slider-thumb);\n }\n\n .v-slider-control {\n position: absolute;\n inset: 0;\n }\n\n .v-slider-track {\n position: absolute;\n inset-inline: 0;\n inset-block: 0;\n margin-block: auto;\n block-size: var(--slider-track);\n border-radius: var(--vectis-radius-pill);\n background: var(--vectis-color-border);\n overflow: hidden;\n }\n\n /*\n * It must be declared on the element that CARRIES the fraction, never on an ancestor. A\n * custom property's `var()` is resolved where the property is declared, so set on the root it\n * would read a `--fill-fraction` the root does not have and turn invalid, and every tick,\n * label and bubble would drop to its static position at the start of the track, with no\n * error.\n */\n .v-slider-fill,\n .v-slider-tick,\n .v-slider-tooltip,\n .v-slider-label {\n --slider-at: calc(\n var(--slider-thumb) / 2 + (100% - var(--slider-thumb)) * var(--fill-fraction)\n );\n }\n\n .v-slider-fill {\n --fill-fraction: var(--slider-end-fraction);\n position: absolute;\n inset-block: 0;\n inset-inline-start: 0;\n inline-size: var(--slider-at);\n background: var(--vectis-color-accent);\n }\n\n .v-slider-body[data-range] .v-slider-fill {\n --fill-fraction: var(--slider-start-fraction);\n inset-inline-start: var(--slider-at);\n inline-size: calc(\n (100% - var(--slider-thumb)) * (var(--slider-end-fraction) - var(--slider-start-fraction))\n );\n }\n\n .v-slider-tick {\n --slider-tick: calc(var(--slider-track) / 3 * 2);\n position: absolute;\n inset-block: 0;\n margin-block: auto;\n inset-inline-start: calc(var(--slider-at) - var(--slider-tick) / 2);\n inline-size: var(--slider-tick);\n block-size: var(--slider-tick);\n border-radius: var(--vectis-radius-pill);\n background: var(--vectis-color-border-strong);\n }\n\n .v-slider-tick[data-filled] {\n background: var(--vectis-color-text-on-accent);\n }\n\n /*\n * Without that, the one on top would swallow every click and the other thumb could never be\n * grabbed. The thumb's paint lives in variables set here, on the control, and read once by\n * each vendor pseudo-element below.\n */\n .v-slider-input {\n --slider-thumb-bg: var(--vectis-color-text-on-accent);\n --slider-thumb-border: var(--vectis-color-accent);\n --slider-thumb-shadow: var(--vectis-shadow-xs);\n --slider-thumb-outline: none;\n --slider-thumb-cursor: pointer;\n --slider-thumb-transition: background-color var(--vectis-duration-fast)\n var(--vectis-ease-default);\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n appearance: none;\n background: transparent;\n pointer-events: none;\n }\n\n /*\n * With a single thumb there is nothing underneath to protect, so the whole control takes the\n * pointer again; which makes clicking the track jump the value there and start dragging at\n * once, natively and with no code at all. The accepted side effect is that the thumb lights\n * up when the pointer is anywhere over the track.\n */\n .v-slider-body:not([data-range]) .v-slider-input {\n pointer-events: auto;\n cursor: pointer;\n }\n\n /*\n * The two vendor pseudo-elements stay in two separate rules. A selector list holding one a\n * browser does not know is dropped whole, so merged, each engine would throw away the other's\n * thumb and draw its native one.\n */\n .v-slider-input::-webkit-slider-thumb {\n appearance: none;\n pointer-events: auto;\n width: var(--slider-thumb);\n height: var(--slider-thumb);\n border-radius: var(--vectis-radius-pill);\n background: var(--slider-thumb-bg);\n border: var(--vectis-control-border-width) solid var(--slider-thumb-border);\n box-shadow: var(--slider-thumb-shadow);\n outline: var(--slider-thumb-outline);\n outline-offset: var(--vectis-focus-ring-offset);\n cursor: var(--slider-thumb-cursor);\n transition: var(--slider-thumb-transition);\n }\n\n .v-slider-input::-moz-range-thumb {\n pointer-events: auto;\n width: var(--slider-thumb);\n height: var(--slider-thumb);\n border-radius: var(--vectis-radius-pill);\n background: var(--slider-thumb-bg);\n border: var(--vectis-control-border-width) solid var(--slider-thumb-border);\n box-shadow: var(--slider-thumb-shadow);\n outline: var(--slider-thumb-outline);\n outline-offset: var(--vectis-focus-ring-offset);\n cursor: var(--slider-thumb-cursor);\n transition: var(--slider-thumb-transition);\n }\n\n /* The states, all at (0,3,0) but the base, so their ORDER arbitrates them: hover, then\n read-only, invalid and disabled, each overriding what came before on a thumb that is\n several at once.\n\n The hover tint is mixed from the thumb's own white rather than read from\n `accent-surface`: that token turns dark in the dark theme, and a white thumb would\n flash nearly black under the pointer. */\n .v-slider-input:is(:hover, :active):not(:disabled) {\n --slider-thumb-bg: color-mix(\n in oklab,\n var(--vectis-color-text-on-accent),\n var(--vectis-color-accent) 10%\n );\n }\n\n .v-slider-input:focus-visible {\n --slider-thumb-outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline: none;\n }\n\n .v-slider-body[data-readonly] .v-slider-input {\n --slider-thumb-bg: var(--vectis-color-surface);\n --slider-thumb-border: var(--vectis-color-text-muted);\n --slider-thumb-cursor: default;\n cursor: default;\n }\n\n .v-slider-body[data-readonly] .v-slider-fill {\n background: var(--vectis-color-text-muted);\n }\n\n .v-slider-body[data-readonly] .v-slider-tick[data-filled] {\n background: var(--vectis-color-surface);\n }\n\n .v-slider-body[data-invalid] .v-slider-input {\n --slider-thumb-border: var(--vectis-color-danger);\n }\n\n /*\n * It looks like a VTooltip but is placed by arithmetic rather than anchored to the thumb: a\n * native thumb is a pseudo-element, and the browser's anchoring cannot attach anything to\n * one. The fraction it follows is the one the root already carries for the fill.\n */\n .v-slider-tooltip {\n position: absolute;\n inset-block-end: calc(100% + var(--vectis-space-2));\n inset-inline-start: var(--slider-at);\n inline-size: 0;\n display: flex;\n justify-content: center;\n opacity: 0;\n visibility: hidden;\n transition:\n opacity var(--vectis-duration-fast) var(--vectis-ease-default),\n visibility var(--vectis-duration-fast) var(--vectis-ease-default);\n }\n\n .v-slider-tooltip-start {\n --fill-fraction: var(--slider-start-fraction);\n }\n\n .v-slider-tooltip-end {\n --fill-fraction: var(--slider-end-fraction);\n }\n\n .v-slider-body:has(.v-slider-input-start:active) .v-slider-tooltip-start,\n .v-slider-body:has(.v-slider-input-start:focus-visible) .v-slider-tooltip-start,\n .v-slider-body:has(.v-slider-input-end:active) .v-slider-tooltip-end,\n .v-slider-body:has(.v-slider-input-end:focus-visible) .v-slider-tooltip-end {\n opacity: 1;\n visibility: visible;\n }\n\n .v-slider-tooltip-bubble {\n padding: var(--vectis-space-1) var(--vectis-space-2);\n background: var(--vectis-color-surface-inverse);\n color: var(--vectis-color-text-on-inverse);\n font-size: var(--vectis-text-caption-size);\n line-height: var(--vectis-text-caption-leading);\n border-radius: min(var(--vectis-radius-interactive), calc(0.5lh + var(--vectis-space-1)));\n box-shadow: var(--vectis-shadow-sm);\n white-space: nowrap;\n }\n\n .v-slider-labels {\n grid-area: labels;\n position: relative;\n /* The labels are positioned individually and therefore contribute no height of\n their own; this reserves enough room for either kind, a small line of text or an\n icon. */\n min-block-size: var(--vectis-icon-size-md);\n /* The pair travels together, as it does in every `[data-size]` block of\n control-size.css: the size applies to every source, the optical size only to the\n ligature, and setting one without the other draws a 20px glyph cut for 24. */\n --vectis-icon-size: var(--vectis-icon-size-md);\n --vectis-icon-opsz: 20;\n font-size: var(--vectis-text-caption-size);\n color: var(--vectis-color-text-muted);\n }\n\n /* A box of zero width placed exactly on the step: its content then overflows equally\n on both sides, which centres it there. Centring it with a transform would be the\n usual trick, but a transform is physical and would have to be undone for the\n vertical orientation and again for a right-to-left page. */\n .v-slider-label {\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: var(--slider-at);\n inline-size: 0;\n display: flex;\n justify-content: center;\n white-space: nowrap;\n }\n\n .v-slider-field.v-input {\n inline-size: var(--vectis-control-size-slider-field);\n }\n\n /* Qualify number-field selectors so their layout cannot depend on VInput stylesheet order. */\n .v-slider-field-start.v-input {\n grid-area: field-start;\n }\n\n .v-slider-field-end.v-input {\n grid-area: field-end;\n }\n\n .v-slider-body[data-orientation='vertical'] {\n grid-template-areas: 'rail';\n grid-template-columns: none;\n inline-size: fit-content;\n justify-items: center;\n }\n\n .v-slider-body[data-orientation='vertical']:has(.v-slider-labels) {\n grid-template-areas: 'rail labels';\n grid-template-columns: auto auto;\n }\n\n .v-slider-body[data-orientation='vertical'][data-inputs='ends'] {\n grid-template-areas: 'field-end' 'rail';\n grid-template-columns: none;\n }\n\n .v-slider-body[data-orientation='vertical'][data-inputs='ends']:has(.v-slider-labels) {\n grid-template-areas: 'field-end .' 'rail labels';\n grid-template-columns: auto auto;\n }\n\n .v-slider-body[data-orientation='vertical'][data-inputs='ends'][data-range] {\n grid-template-areas: 'field-end' 'rail' 'field-start';\n grid-template-columns: none;\n }\n\n .v-slider-body[data-orientation='vertical'][data-inputs='ends'][data-range]:has(\n .v-slider-labels\n ) {\n grid-template-areas: 'field-end .' 'rail labels' 'field-start .';\n grid-template-columns: auto auto;\n }\n\n /*\n * Upright, `top` and `bottom` become the two SIDES, the inline start and the inline end: the\n * fields stack in a column beside the track, the end field level with its top and the start\n * field with its bottom, where the values they hold sit. The track spans the three rows and\n * gives them their height, the middle one taking whatever the fields leave.\n */\n .v-slider-body[data-orientation='vertical'][data-inputs='top'] {\n grid-template-areas: 'field-end rail' '. rail' 'field-start rail';\n grid-template-columns: auto auto;\n grid-template-rows: auto 1fr auto;\n }\n\n .v-slider-body[data-orientation='vertical'][data-inputs='top']:has(.v-slider-labels) {\n grid-template-areas:\n 'field-end rail labels'\n '. rail labels'\n 'field-start rail labels';\n grid-template-columns: auto auto auto;\n }\n\n .v-slider-body[data-orientation='vertical'][data-inputs='bottom'] {\n grid-template-areas: 'rail field-end' 'rail .' 'rail field-start';\n grid-template-columns: auto auto;\n grid-template-rows: auto 1fr auto;\n }\n\n .v-slider-body[data-orientation='vertical'][data-inputs='bottom']:has(.v-slider-labels) {\n grid-template-areas:\n 'rail labels field-end'\n 'rail labels .'\n 'rail labels field-start';\n grid-template-columns: auto auto auto;\n }\n\n .v-slider-body[data-orientation='vertical'] .v-slider-rail {\n inline-size: var(--slider-thumb);\n block-size: var(--vectis-control-size-slider-length);\n }\n\n /*\n * Rotate only the track box and reverse its direction; labels remain horizontal and the\n * minimum value stays at the bottom.\n */\n .v-slider-body[data-orientation='vertical'] .v-slider-control {\n writing-mode: vertical-lr;\n direction: rtl;\n }\n\n .v-slider-body[data-orientation='vertical'] .v-slider-tooltip {\n inset-block-end: var(--slider-at);\n inset-inline-start: auto;\n inset-inline-end: calc(100% + var(--vectis-space-2));\n inline-size: auto;\n block-size: 0;\n align-items: center;\n justify-content: flex-end;\n }\n\n .v-slider-body[data-orientation='vertical'] .v-slider-labels {\n align-self: stretch;\n min-block-size: auto;\n }\n\n .v-slider-body[data-orientation='vertical'] .v-slider-label {\n inset-block-start: auto;\n inset-block-end: var(--slider-at);\n inset-inline-start: 0;\n inline-size: auto;\n block-size: 0;\n align-items: center;\n justify-content: flex-start;\n }\n\n /*\n * A disabled slider greys out through the colour tokens, the same ones VCheckbox and VSwitch\n * use, and never through opacity. It comes last among the states, so a slider both disabled\n * and read-only or invalid is drawn disabled.\n */\n .v-slider-body[data-disabled] {\n cursor: not-allowed;\n }\n\n .v-slider-body[data-disabled] .v-slider-track {\n background: var(--vectis-color-surface-muted);\n }\n\n .v-slider-body[data-disabled] .v-slider-fill {\n background: var(--vectis-color-text-subtle);\n }\n\n .v-slider-body[data-disabled] .v-slider-tick {\n background: var(--vectis-color-text-subtle);\n }\n\n /*\n * A tick sitting on the greyed fill takes the light colour back, so that it stays visible\n * against it; the same inversion VCheckbox applies to its disabled tick.\n */\n .v-slider-body[data-disabled] .v-slider-tick[data-filled] {\n background: var(--vectis-color-surface-muted);\n }\n\n .v-slider-body[data-disabled] .v-slider-labels {\n color: var(--vectis-color-text-subtle);\n }\n\n .v-slider-body[data-disabled] .v-slider-input {\n --slider-thumb-bg: var(--vectis-color-surface-muted);\n --slider-thumb-border: var(--vectis-color-text-subtle);\n --slider-thumb-shadow: none;\n --slider-thumb-cursor: not-allowed;\n cursor: not-allowed;\n }\n\n /*\n * Forced colours erase background-only tracks and ticks. Restore the track edge and use\n * system Highlight/HighlightText for selected portions.\n */\n @media (forced-colors: active) {\n .v-slider-body .v-slider-track {\n forced-color-adjust: none;\n background: Canvas;\n box-shadow: inset 0 0 0 var(--vectis-control-border-width) CanvasText;\n }\n\n .v-slider-body .v-slider-fill {\n forced-color-adjust: none;\n background: Highlight;\n }\n\n .v-slider-body .v-slider-tick {\n forced-color-adjust: none;\n background: CanvasText;\n }\n\n .v-slider-body .v-slider-tick[data-filled] {\n background: HighlightText;\n }\n\n .v-slider-body .v-slider-input {\n forced-color-adjust: none;\n --slider-thumb-bg: Canvas;\n --slider-thumb-border: CanvasText;\n --slider-thumb-shadow: none;\n }\n\n .v-slider-body[data-disabled] .v-slider-track {\n box-shadow: inset 0 0 0 var(--vectis-control-border-width) GrayText;\n }\n\n .v-slider-body[data-disabled] .v-slider-fill,\n .v-slider-body[data-disabled] .v-slider-tick {\n background: GrayText;\n }\n\n .v-slider-body[data-disabled] .v-slider-input {\n --slider-thumb-border: GrayText;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-slider-input {\n --slider-thumb-transition: none;\n }\n\n .v-slider-tooltip {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgIA,IAAM,IAAQ,GAwBR,IAAQ,GAAwB,GAAA,YAAe,GAE/C,IAAO,GAcP,EACJ,MAAM,GACN,SAAS,GACT,UAAU,MACR,GACF;GACE,IAAI,OAAO;IACT,OAAO,EAAM;GACf;GACA,SAAS;GACT,IAAI,WAAW;IACb,OAAO,EAAM;GACf;EACF,GAdY,GAAO,IAAe,IAelC,CACF,GAIM,IAAa,QAAgB,MAAM,QAAQ,EAAM,KAAK,IAAI,EAAM,MAAM,KAAK,EAAM,GAAI,GACrF,IAAW,QACf,MAAM,QAAQ,EAAM,KAAK,IAAI,EAAM,MAAM,KAAM,EAAM,KACvD,GAEM,KAAc,MAAkB,MAAU,UAAU,EAAW,QAAQ,EAAS,OAMhF,KAAQ,MAAc,GAAO,IAAI,EAAM,QAAQ,EAAM,MAAM,EAAM,OAAO,IAAI,GAAG,CAAC;EAOtF,SAAS,EAAW,GAAc,GAAwB;GACxD,IAAM,IAAqB,EAAM,QAE7B,MAAU,UACR,CAAC,GAAG,KAAK,IAAI,GAAG,EAAS,KAAK,CAAC,IAC/B,CAAC,KAAK,IAAI,GAAG,EAAW,KAAK,GAAG,CAAC,IAHnC;GAKJ,OADA,EAAM,QAAQ,GACP;EACT;EAEA,IAAM,KAAc,GAAoB,MACtC,MAAM,QAAQ,CAAK,IAAI,EAAM,MAAU,UAAU,IAAI,KAAK;EAE5D,SAAS,EAAa,GAAc,GAAc;GAChD,IAAM,IAAK,EAAM;GAMjB,IAAI,EAAM,UAAU;IAClB,E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AAM,EAAA,CAAA;KACN,SAAS,EAAA,CAAA;KACT,KAAK,EAAA;KACL,KAAK,EAAA;KACL,MAAM,EAAA;KACN,UAAU,EAAA,CAAA;KACV,UAAU,EAAA;KACV,SAAS,EAAA;KACT,cAAY,EAAW,CAAK;KAC5B,wBAAkB,MAAE,EAAY,GAAO,CAAM"}
|
|
@@ -4,8 +4,8 @@ import n from "../VIcon/VIcon.js";
|
|
|
4
4
|
import { usePopover as r } from "../../composables/usePopover.js";
|
|
5
5
|
import i from "../VButton/VButton.js";
|
|
6
6
|
import { useAriaLabel as a } from "../../composables/useAriaLabel.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { useLiveAnnouncer as o } from "../../composables/useLiveAnnouncer.js";
|
|
8
|
+
import { useTimer as s } from "../../composables/useTimer.js";
|
|
9
9
|
import { current as c, dismissSnackbar as l } from "./state.js";
|
|
10
10
|
import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, defineComponent as _, mergeProps as v, nextTick as y, onMounted as b, openBlock as x, ref as S, toDisplayString as C, unref as w, watch as T, withCtx as E } from "vue";
|
|
11
11
|
//#region src/components/VSnackbar/VSnackbar.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -25,14 +25,14 @@ var D = ["data-placement", "aria-label"], ee = ["data-tone"], O = { class: "v-ba
|
|
|
25
25
|
label: { default: void 0 }
|
|
26
26
|
},
|
|
27
27
|
setup(_) {
|
|
28
|
-
let j = _, M = e(), N = a(() => j.label ?? M.value.snackbar.label), P = d(() => c.value?.placement ?? j.placement), F = d(() => c.value?.actionText ?? j.actionText ?? M.value.snackbar.action), I = d(() => c.value?.icon ? t(c.value.icon) : void 0), L = S(null), { syncShown: R, show: z, hide: B } = r(L), { start: V, cancel: H } =
|
|
28
|
+
let j = _, M = e(), N = a(() => j.label ?? M.value.snackbar.label), P = d(() => c.value?.placement ?? j.placement), F = d(() => c.value?.actionText ?? j.actionText ?? M.value.snackbar.action), I = d(() => c.value?.icon ? t(c.value.icon) : void 0), L = S(null), { syncShown: R, show: z, hide: B } = r(L), { start: V, cancel: H } = s(), U = !1, W = !1;
|
|
29
29
|
function G() {
|
|
30
30
|
let e = c.value;
|
|
31
31
|
if (!e || U || W) return;
|
|
32
32
|
let t = e.duration ?? j.duration;
|
|
33
33
|
t > 0 && V(() => l(e.id), t);
|
|
34
34
|
}
|
|
35
|
-
let { polite: K, assertive: q, announce: J } =
|
|
35
|
+
let { polite: K, assertive: q, announce: J } = o(), Y;
|
|
36
36
|
function X() {
|
|
37
37
|
H(), c.value ? L.value?.contains(document.activeElement) || (W = !1) : U = W = !1, c.value && c.value.id !== Y && (Y = c.value.id, J(c.value.message, c.value.tone === "danger")), c.value ? z() : B(), G();
|
|
38
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","names":[],"sources":["../../../src/components/VSnackbar/state.ts"],"sourcesContent":["// @ssr @core\n/**\n *
|
|
1
|
+
{"version":3,"file":"state.js","names":[],"sources":["../../../src/components/VSnackbar/state.ts"],"sourcesContent":["// @ssr @core\n/**\n * A snackbar confirms the last action a reader took, which separates it from a notification\n * reporting a state: notifications stack, because two things can be true at once, whereas only\n * the last action is worth offering to undo. So there is at most one snackbar at a time, and\n * raising a new one replaces the one before it on the spot.\n */\n\nimport { shallowRef } from 'vue'\n\nimport type { IconSource } from '../VIcon/types'\nimport { isDev } from '../../utils/env'\n\n/** What a confirmation can mean. */\nexport type SnackbarTone = 'neutral' | 'danger'\n\n/** Where the bar appears. Along the bottom edge only, where it is out of the content's way. */\nexport type SnackbarPlacement = 'bottom-left' | 'bottom-center' | 'bottom-right'\n\n/** Everything one can say when raising a confirmation. */\nexport interface SnackbarOptions {\n /** What the confirmation says. One short sentence: there is no title to frame it. */\n message: string\n /** What it means, expressed as a colour: the plain inversion, or the failure colour. */\n tone?: SnackbarTone\n /**\n * An icon before the message. There is none by default, and none is deduced from the\n * tone: a confirmation is read, not scanned.\n */\n icon?: IconSource\n /**\n * How long it stays, in milliseconds. Setting it to 0 keeps it until it is replaced or\n * taken away by hand, and leaving it out takes the duration set on the VSnackbar.\n */\n duration?: number\n /** Which end of the bottom edge it appears at. Left out, it takes the one set on the VSnackbar. */\n placement?: SnackbarPlacement\n /**\n * What the single action does. Left out, the bar carries no button at all. Running it\n * always takes the bar away, so nothing has to be dismissed by hand afterwards.\n */\n action?: () => void\n /** The word drawn on that action. It falls back to the design system dictionary (\"Undo\"). */\n actionText?: string\n}\n\n/**\n * A confirmation once it is showing, with the choices the caller left out filled in and\n * an id of its own. Internal: it is what VSnackbar renders.\n */\nexport interface SnackbarItem extends SnackbarOptions {\n id: number\n tone: SnackbarTone\n}\n\n/** The bar currently showing, if any. Internal, read only by VSnackbar, and not public API. */\nexport const current = shallowRef<SnackbarItem | null>(null)\n\nlet nextId = 0\n\n/**\n * Raises a confirmation, replacing whatever was showing, and hands back an id that\n * `dismissSnackbar` can use to take it away again before its time.\n */\nexport function snackbar(options: SnackbarOptions): number {\n // @devwarn\n // The queue is module state, shared by every request a server renders: raised there, it\n // would reach another reader's page and differ from what the browser hydrates.\n if (isDev && typeof document === 'undefined')\n console.warn(\n '[snackbar] called during a server render: call it from a handler or a lifecycle hook that runs in the browser.',\n )\n const id = nextId++\n current.value = { tone: 'neutral', ...options, id }\n return id\n}\n\n/**\n * Takes a confirmation away, by its id or, called with no argument, whichever one is showing.\n * Passing an id is not a formality: it is checked against the bar actually on screen, and a\n * stale one is ignored.\n */\nexport function dismissSnackbar(id?: number): void {\n if (id === undefined || current.value?.id === id) current.value = null\n}\n"],"mappings":";;;AAwDA,IAAa,IAAU,EAAgC,IAAI,GAEvD,IAAS;AAMb,SAAgB,EAAS,GAAkC;CAIzD,AAAI,KAAS,OAAO,WAAa,OAC/B,QAAQ,KACN,gHACF;CACF,IAAM,IAAK;CAEX,OADA,EAAQ,QAAQ;EAAE,MAAM;EAAW,GAAG;EAAS;CAAG,GAC3C;AACT;AAOA,SAAgB,EAAgB,GAAmB;CACjD,CAAI,MAAO,KAAA,KAAa,EAAQ,OAAO,OAAO,OAAI,EAAQ,QAAQ;AACpE"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
|
|
2
|
+
@layer vectis.components{.v-split-button{anchor-name:--split-button-anchor;anchor-scope:--split-button-anchor}.v-split-button>.v-menu{position-anchor:--split-button-anchor}.v-split-button[data-full-width]{grid-template-columns:1fr auto}.v-split-button[data-loading]>.v-split-button-menu.v-button{opacity:.5}.v-split-button[data-loading]>.v-split-button-menu.v-button[data-variant=solid]{background:var(--tone-bg-solid);color:var(--tone-text-solid)}.v-split-button[data-loading]>.v-split-button-menu.v-button[data-variant=soft]{background:var(--tone-bg-soft);color:var(--tone-text-tinted)}.v-split-button[data-loading]>.v-split-button-menu.v-button[data-variant=outline]{color:var(--tone-text-tinted);border-color:var(--tone-border-soft)}.v-split-button[data-loading]>.v-split-button-menu.v-button[data-variant=ghost]{color:var(--tone-text-tinted)}}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes } from 'vue';
|
|
2
|
+
import { ButtonSize, ButtonTone, ButtonVariant } from '../VButton/VButton.js';
|
|
3
|
+
import { IconSource } from '../VIcon/types.js';
|
|
4
|
+
import { MenuPlacement, MenuSize } from '../VMenu/context.js';
|
|
5
|
+
interface SplitButtonProps {
|
|
6
|
+
/** The visible text of the main action. */
|
|
7
|
+
label: string;
|
|
8
|
+
/**
|
|
9
|
+
* How much visual weight both halves carry, on the values of VButton's own `variant`:
|
|
10
|
+
* `solid`, `outline`, `ghost` or `soft`.
|
|
11
|
+
*/
|
|
12
|
+
variant?: ButtonVariant;
|
|
13
|
+
/** What the actions mean, in colour: `accent`, `neutral` or `danger`. */
|
|
14
|
+
tone?: ButtonTone;
|
|
15
|
+
/** The height of both halves, from the size scale shared by every control. */
|
|
16
|
+
size?: ButtonSize;
|
|
17
|
+
/** Takes 4px off the height of both halves. */
|
|
18
|
+
compact?: boolean;
|
|
19
|
+
/** Raises the control off the page with a shadow, on the terms of VButton's `elevated`. */
|
|
20
|
+
elevated?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Stretches the control to the whole inline size of its parent. The main action takes the
|
|
23
|
+
* extra room; the menu button stays square.
|
|
24
|
+
*/
|
|
25
|
+
fullWidth?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Turns the main action into an `<a>` pointing at this address. A disabled or loading link
|
|
28
|
+
* becomes inert: the address is dropped, so it can be neither focused nor followed.
|
|
29
|
+
*/
|
|
30
|
+
href?: string;
|
|
31
|
+
/** The native type of the main button. It is ignored as soon as `href` makes it a link. */
|
|
32
|
+
type?: ButtonHTMLAttributes['type'];
|
|
33
|
+
/** Makes both halves unusable. */
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Shows a spinner in the main action and announces it as busy. The menu button is disabled
|
|
37
|
+
* meanwhile: an action is already under way.
|
|
38
|
+
*/
|
|
39
|
+
loading?: boolean;
|
|
40
|
+
/** An icon before the label of the main action. */
|
|
41
|
+
iconStart?: IconSource;
|
|
42
|
+
/** An icon after the label of the main action. */
|
|
43
|
+
iconEnd?: IconSource;
|
|
44
|
+
/** Renders `iconStart` and `iconEnd` in their filled form. */
|
|
45
|
+
iconFilled?: boolean;
|
|
46
|
+
/** What screen readers announce for the menu button. The dictionary's "More options" otherwise. */
|
|
47
|
+
menuLabel?: string;
|
|
48
|
+
/** The icon of the menu button, the built-in `expand_more` otherwise. */
|
|
49
|
+
menuIcon?: IconSource;
|
|
50
|
+
/**
|
|
51
|
+
* Where the menu opens relative to the whole control. The browser moves it to another side by
|
|
52
|
+
* itself when there is not enough room.
|
|
53
|
+
*/
|
|
54
|
+
placement?: MenuPlacement;
|
|
55
|
+
/** How tall the rows of the menu are: 32, 40 or 48 pixels. */
|
|
56
|
+
menuSize?: MenuSize;
|
|
57
|
+
/**
|
|
58
|
+
* A width for the menu: a number is read as pixels, a string as any CSS length or keyword
|
|
59
|
+
* (`16rem`, `max-content`).
|
|
60
|
+
*/
|
|
61
|
+
menuWidth?: number | string;
|
|
62
|
+
/** Stops the menu from being narrower than the whole control, while leaving it free to grow. */
|
|
63
|
+
matchTrigger?: boolean;
|
|
64
|
+
}
|
|
65
|
+
type __VLS_Props = SplitButtonProps;
|
|
66
|
+
type __VLS_Slots = {
|
|
67
|
+
/** The other actions: VMenuItem, VMenuGroup and VMenuSeparator, submenus included. */
|
|
68
|
+
default(): unknown;
|
|
69
|
+
};
|
|
70
|
+
type __VLS_ModelProps = {
|
|
71
|
+
/** Whether the menu is showing. The browser's own dismissal writes back to it. */
|
|
72
|
+
'open'?: boolean;
|
|
73
|
+
};
|
|
74
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
75
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
76
|
+
/** Moves the focus to the main action. */
|
|
77
|
+
focus: (options?: FocusOptions) => void | undefined;
|
|
78
|
+
/** The main action's `<button>` or `<a>`. */
|
|
79
|
+
el: import('vue').ComputedRef<HTMLElement | null>;
|
|
80
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
81
|
+
click: (event: MouseEvent) => any;
|
|
82
|
+
"update:open": (value: boolean) => any;
|
|
83
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
84
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
85
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
86
|
+
}>, {
|
|
87
|
+
loading: boolean;
|
|
88
|
+
size: ButtonSize;
|
|
89
|
+
type: "button" | "reset" | "submit";
|
|
90
|
+
variant: ButtonVariant;
|
|
91
|
+
tone: ButtonTone;
|
|
92
|
+
compact: boolean;
|
|
93
|
+
href: string;
|
|
94
|
+
iconStart: IconSource;
|
|
95
|
+
iconEnd: IconSource;
|
|
96
|
+
iconFilled: boolean;
|
|
97
|
+
disabled: boolean;
|
|
98
|
+
placement: MenuPlacement;
|
|
99
|
+
matchTrigger: boolean;
|
|
100
|
+
elevated: boolean;
|
|
101
|
+
fullWidth: boolean;
|
|
102
|
+
menuLabel: string;
|
|
103
|
+
menuIcon: IconSource;
|
|
104
|
+
menuSize: MenuSize;
|
|
105
|
+
menuWidth: number | string;
|
|
106
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
107
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
108
|
+
declare const _default: typeof __VLS_export;
|
|
109
|
+
export default _default;
|
|
110
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
111
|
+
new (): {
|
|
112
|
+
$slots: S;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import './VSplitButton.css';
|
|
2
|
+
import e from "./VSplitButton.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/VSplitButton/VSplitButton.vue
|
|
5
|
+
var t = e;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { t as default };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=VSplitButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VSplitButton.js","names":[],"sources":["../../../src/components/VSplitButton/VSplitButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @a11y\n/**\n * A VButtonGroup joining a VButton to the VIconButton that opens a VMenu. The group shares the\n * shape and the disabled state; the menu is anchored to the whole control rather than to its\n * trigger, so it can line up with either edge and match the full width.\n */\nimport { computed, ref } from 'vue'\nimport type { ButtonHTMLAttributes } from 'vue'\n\nimport { useRootAttrs } from '../../composables/useRootAttrs'\nimport { useMessages } from '../../i18n/state'\n\nimport VButton from '../VButton/VButton.vue'\nimport type { ButtonSize, ButtonTone, ButtonVariant } from '../VButton/VButton.vue'\nimport VButtonGroup from '../VButton/VButtonGroup.vue'\nimport VIconButton from '../VIconButton/VIconButton.vue'\nimport { expand_more as expandMoreIcon } from '../VIcon/icons/expand_more'\nimport type { IconSource } from '../VIcon/types'\nimport VMenu from '../VMenu/VMenu.vue'\nimport type { MenuPlacement, MenuSize } from '../VMenu/context'\n\ninterface SplitButtonProps {\n /** The visible text of the main action. */\n label: string\n /**\n * How much visual weight both halves carry, on the values of VButton's own `variant`:\n * `solid`, `outline`, `ghost` or `soft`.\n */\n variant?: ButtonVariant\n /** What the actions mean, in colour: `accent`, `neutral` or `danger`. */\n tone?: ButtonTone\n /** The height of both halves, from the size scale shared by every control. */\n size?: ButtonSize\n /** Takes 4px off the height of both halves. */\n compact?: boolean\n /** Raises the control off the page with a shadow, on the terms of VButton's `elevated`. */\n elevated?: boolean\n /**\n * Stretches the control to the whole inline size of its parent. The main action takes the\n * extra room; the menu button stays square.\n */\n fullWidth?: boolean\n /**\n * Turns the main action into an `<a>` pointing at this address. A disabled or loading link\n * becomes inert: the address is dropped, so it can be neither focused nor followed.\n */\n href?: string\n /** The native type of the main button. It is ignored as soon as `href` makes it a link. */\n type?: ButtonHTMLAttributes['type']\n /** Makes both halves unusable. */\n disabled?: boolean\n /**\n * Shows a spinner in the main action and announces it as busy. The menu button is disabled\n * meanwhile: an action is already under way.\n */\n loading?: boolean\n /** An icon before the label of the main action. */\n iconStart?: IconSource\n /** An icon after the label of the main action. */\n iconEnd?: IconSource\n /** Renders `iconStart` and `iconEnd` in their filled form. */\n iconFilled?: boolean\n /** What screen readers announce for the menu button. The dictionary's \"More options\" otherwise. */\n menuLabel?: string\n /** The icon of the menu button, the built-in `expand_more` otherwise. */\n menuIcon?: IconSource\n /**\n * Where the menu opens relative to the whole control. The browser moves it to another side by\n * itself when there is not enough room.\n */\n placement?: MenuPlacement\n /** How tall the rows of the menu are: 32, 40 or 48 pixels. */\n menuSize?: MenuSize\n /**\n * A width for the menu: a number is read as pixels, a string as any CSS length or keyword\n * (`16rem`, `max-content`).\n */\n menuWidth?: number | string\n /** Stops the menu from being narrower than the whole control, while leaving it free to grow. */\n matchTrigger?: boolean\n}\n\nconst props = withDefaults(defineProps<SplitButtonProps>(), {\n variant: 'solid',\n tone: 'accent',\n size: 'md',\n compact: false,\n elevated: false,\n fullWidth: false,\n href: undefined,\n type: 'button',\n disabled: false,\n loading: false,\n iconStart: undefined,\n iconEnd: undefined,\n iconFilled: false,\n menuLabel: undefined,\n menuIcon: () => expandMoreIcon,\n placement: 'bottom-end',\n menuSize: 'sm',\n menuWidth: undefined,\n matchTrigger: false,\n})\n\nconst emit = defineEmits<{\n /** The main action was activated. A disabled or loading control emits nothing. */\n click: [event: MouseEvent]\n}>()\n\n/** Whether the menu is showing. The browser's own dismissal writes back to it. */\nconst open = defineModel<boolean>('open', { default: false })\n\ndefineSlots<{\n /** The other actions: VMenuItem, VMenuGroup and VMenuSeparator, submenus included. */\n default(): unknown\n}>()\n\ndefineOptions({ inheritAttrs: false })\n\nconst { rootClass, rootStyle, forwardedAttrs } = useRootAttrs()\nconst m = useMessages()\nconst menuText = computed(() => props.menuLabel ?? m.value.splitButton.menu)\n\nconst mainRef = ref<InstanceType<typeof VButton> | null>(null)\nconst el = computed(() => (mainRef.value?.$el as HTMLElement | undefined) ?? null)\n\ndefineExpose({\n /** Moves the focus to the main action. */\n focus: (options?: FocusOptions) => el.value?.focus(options),\n /** The main action's `<button>` or `<a>`. */\n el,\n})\n</script>\n\n<template>\n <VButtonGroup\n bordered\n class=\"v-split-button\"\n :class=\"rootClass\"\n :style=\"rootStyle\"\n :variant=\"variant\"\n :tone=\"tone\"\n :size=\"size\"\n :compact=\"compact\"\n :elevated=\"elevated\"\n :disabled=\"disabled\"\n :full-width=\"fullWidth\"\n :data-loading=\"loading ? '' : undefined\"\n >\n <VButton\n ref=\"mainRef\"\n v-bind=\"forwardedAttrs\"\n class=\"v-split-button-main\"\n :href=\"href\"\n :type=\"type\"\n :loading=\"loading\"\n :icon-start=\"iconStart\"\n :icon-end=\"iconEnd\"\n :icon-filled=\"iconFilled\"\n @click=\"emit('click', $event)\"\n >\n {{ label }}\n </VButton>\n <VMenu\n v-model:open=\"open\"\n :placement=\"placement\"\n :size=\"menuSize\"\n :width=\"menuWidth\"\n :match-trigger=\"matchTrigger\"\n >\n <template #trigger=\"{ triggerProps }\">\n <VIconButton\n v-bind=\"triggerProps\"\n class=\"v-split-button-menu\"\n :label=\"menuText\"\n :icon=\"menuIcon\"\n :disabled=\"loading\"\n />\n </template>\n <slot />\n </VMenu>\n </VButtonGroup>\n</template>\n\n<style>\n@layer vectis.components {\n /* The panel stays a descendant of the group in the document, so the scope covers it while\n keeping every split button on the page from answering to the same name. */\n .v-split-button {\n anchor-name: --split-button-anchor;\n anchor-scope: --split-button-anchor;\n }\n\n /* The whole control instead of the menu button VMenu anchors to. (0,2,0) beats the panel's\n own `position-anchor` at (0,1,0) whatever the sheet order, and the child combinator leaves\n submenus, nested inside the panel, on their parent item. */\n .v-split-button > .v-menu {\n position-anchor: --split-button-anchor;\n }\n\n /* The group's full width shares the row equally between its segments; here only the main\n action grows, and the menu button keeps its square. */\n .v-split-button[data-full-width] {\n grid-template-columns: 1fr auto;\n }\n\n /*\n * While the main action loads, the disabled menu button keeps the paint of the main one, half\n * transparent, instead of VButton's grey disabled state, which would split the control in two\n * colours. At (0,5,0) these beat VButton's (0,4,0) disabled rules whatever the sheet order.\n */\n .v-split-button[data-loading] > .v-split-button-menu.v-button {\n opacity: 0.5;\n }\n\n .v-split-button[data-loading] > .v-split-button-menu.v-button[data-variant='solid'] {\n background: var(--tone-bg-solid);\n color: var(--tone-text-solid);\n }\n\n .v-split-button[data-loading] > .v-split-button-menu.v-button[data-variant='soft'] {\n background: var(--tone-bg-soft);\n color: var(--tone-text-tinted);\n }\n\n .v-split-button[data-loading] > .v-split-button-menu.v-button[data-variant='outline'] {\n color: var(--tone-text-tinted);\n border-color: var(--tone-border-soft);\n }\n\n .v-split-button[data-loading] > .v-split-button-menu.v-button[data-variant='ghost'] {\n color: var(--tone-text-tinted);\n }\n}\n</style>\n"],"mappings":""}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { useMessages as e } from "../../i18n/state.js";
|
|
2
|
+
import t from "../VButton/VButton.js";
|
|
3
|
+
import n from "../VIconButton/VIconButton.js";
|
|
4
|
+
import r from "../VButton/VButtonGroup.js";
|
|
5
|
+
import { useRootAttrs as i } from "../../composables/useRootAttrs.js";
|
|
6
|
+
import { expand_more as a } from "../VIcon/icons/expand_more.js";
|
|
7
|
+
import o from "../VMenu/VMenu.js";
|
|
8
|
+
import { computed as s, createBlock as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as p, normalizeClass as m, normalizeStyle as h, openBlock as g, ref as _, renderSlot as v, toDisplayString as y, unref as b, useModel as x, withCtx as S } from "vue";
|
|
9
|
+
//#region src/components/VSplitButton/VSplitButton.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
+
var C = /*@__PURE__*/ d({
|
|
11
|
+
inheritAttrs: !1,
|
|
12
|
+
__name: "VSplitButton",
|
|
13
|
+
props: /*@__PURE__*/ f({
|
|
14
|
+
label: {},
|
|
15
|
+
variant: { default: "solid" },
|
|
16
|
+
tone: { default: "accent" },
|
|
17
|
+
size: { default: "md" },
|
|
18
|
+
compact: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
},
|
|
22
|
+
elevated: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !1
|
|
25
|
+
},
|
|
26
|
+
fullWidth: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !1
|
|
29
|
+
},
|
|
30
|
+
href: { default: void 0 },
|
|
31
|
+
type: { default: "button" },
|
|
32
|
+
disabled: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: !1
|
|
35
|
+
},
|
|
36
|
+
loading: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: !1
|
|
39
|
+
},
|
|
40
|
+
iconStart: { default: void 0 },
|
|
41
|
+
iconEnd: { default: void 0 },
|
|
42
|
+
iconFilled: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !1
|
|
45
|
+
},
|
|
46
|
+
menuLabel: { default: void 0 },
|
|
47
|
+
menuIcon: { default: () => a },
|
|
48
|
+
placement: { default: "bottom-end" },
|
|
49
|
+
menuSize: { default: "sm" },
|
|
50
|
+
menuWidth: { default: void 0 },
|
|
51
|
+
matchTrigger: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: !1
|
|
54
|
+
}
|
|
55
|
+
}, {
|
|
56
|
+
open: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: !1
|
|
59
|
+
},
|
|
60
|
+
openModifiers: {}
|
|
61
|
+
}),
|
|
62
|
+
emits: /*@__PURE__*/ f(["click"], ["update:open"]),
|
|
63
|
+
setup(a, { expose: d, emit: f }) {
|
|
64
|
+
let C = a, w = f, T = x(a, "open"), { rootClass: E, rootStyle: D, forwardedAttrs: O } = i(), k = e(), A = s(() => C.menuLabel ?? k.value.splitButton.menu), j = _(null), M = s(() => j.value?.$el ?? null);
|
|
65
|
+
return d({
|
|
66
|
+
focus: (e) => M.value?.focus(e),
|
|
67
|
+
el: M
|
|
68
|
+
}), (e, i) => (g(), c(r, {
|
|
69
|
+
bordered: "",
|
|
70
|
+
class: m(["v-split-button", b(E)]),
|
|
71
|
+
style: h(b(D)),
|
|
72
|
+
variant: a.variant,
|
|
73
|
+
tone: a.tone,
|
|
74
|
+
size: a.size,
|
|
75
|
+
compact: a.compact,
|
|
76
|
+
elevated: a.elevated,
|
|
77
|
+
disabled: a.disabled,
|
|
78
|
+
"full-width": a.fullWidth,
|
|
79
|
+
"data-loading": a.loading ? "" : void 0
|
|
80
|
+
}, {
|
|
81
|
+
default: S(() => [u(t, p({
|
|
82
|
+
ref_key: "mainRef",
|
|
83
|
+
ref: j
|
|
84
|
+
}, b(O), {
|
|
85
|
+
class: "v-split-button-main",
|
|
86
|
+
href: a.href,
|
|
87
|
+
type: a.type,
|
|
88
|
+
loading: a.loading,
|
|
89
|
+
"icon-start": a.iconStart,
|
|
90
|
+
"icon-end": a.iconEnd,
|
|
91
|
+
"icon-filled": a.iconFilled,
|
|
92
|
+
onClick: i[0] ||= (e) => w("click", e)
|
|
93
|
+
}), {
|
|
94
|
+
default: S(() => [l(y(a.label), 1)]),
|
|
95
|
+
_: 1
|
|
96
|
+
}, 16, [
|
|
97
|
+
"href",
|
|
98
|
+
"type",
|
|
99
|
+
"loading",
|
|
100
|
+
"icon-start",
|
|
101
|
+
"icon-end",
|
|
102
|
+
"icon-filled"
|
|
103
|
+
]), u(o, {
|
|
104
|
+
open: T.value,
|
|
105
|
+
"onUpdate:open": i[1] ||= (e) => T.value = e,
|
|
106
|
+
placement: a.placement,
|
|
107
|
+
size: a.menuSize,
|
|
108
|
+
width: a.menuWidth,
|
|
109
|
+
"match-trigger": a.matchTrigger
|
|
110
|
+
}, {
|
|
111
|
+
trigger: S(({ triggerProps: e }) => [u(n, p(e, {
|
|
112
|
+
class: "v-split-button-menu",
|
|
113
|
+
label: A.value,
|
|
114
|
+
icon: a.menuIcon,
|
|
115
|
+
disabled: a.loading
|
|
116
|
+
}), null, 16, [
|
|
117
|
+
"label",
|
|
118
|
+
"icon",
|
|
119
|
+
"disabled"
|
|
120
|
+
])]),
|
|
121
|
+
default: S(() => [v(e.$slots, "default")]),
|
|
122
|
+
_: 3
|
|
123
|
+
}, 8, [
|
|
124
|
+
"open",
|
|
125
|
+
"placement",
|
|
126
|
+
"size",
|
|
127
|
+
"width",
|
|
128
|
+
"match-trigger"
|
|
129
|
+
])]),
|
|
130
|
+
_: 3
|
|
131
|
+
}, 8, [
|
|
132
|
+
"class",
|
|
133
|
+
"style",
|
|
134
|
+
"variant",
|
|
135
|
+
"tone",
|
|
136
|
+
"size",
|
|
137
|
+
"compact",
|
|
138
|
+
"elevated",
|
|
139
|
+
"disabled",
|
|
140
|
+
"full-width",
|
|
141
|
+
"data-loading"
|
|
142
|
+
]));
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
//#endregion
|
|
146
|
+
export { C as default };
|
|
147
|
+
|
|
148
|
+
//# sourceMappingURL=VSplitButton.vue_vue_type_script_setup_true_lang.js.map
|