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":"arrowNav.js","names":[],"sources":["../../src/utils/arrowNav.ts"],"sourcesContent":["// @keyboard @a11y\n
|
|
1
|
+
{"version":3,"file":"arrowNav.js","names":[],"sources":["../../src/utils/arrowNav.ts"],"sourcesContent":["// @keyboard @a11y\n/** Arrow-key navigation over a row or column of controls, shared by every roving-focus group. */\nimport { isRtl } from './direction'\n\n/** The elements the arrows may land on, discovered from the DOM rather than a registry. */\nexport function navigableItems(container: HTMLElement, selector: string): HTMLElement[] {\n return [...container.querySelectorAll<HTMLElement>(selector)].filter(\n (el) => getComputedStyle(el).display !== 'none',\n )\n}\n\n/** Moves focus for the arrows and Home/End, and reports whether it took the key. */\nexport function arrowNavigate(\n event: KeyboardEvent,\n container: HTMLElement,\n items: () => HTMLElement[],\n options: { vertical?: boolean } = {},\n): boolean {\n const vertical = options.vertical ?? false\n const keys = vertical\n ? ['ArrowDown', 'ArrowUp', 'Home', 'End']\n : ['ArrowRight', 'ArrowLeft', 'Home', 'End']\n if (event.altKey || event.ctrlKey || event.metaKey || !keys.includes(event.key)) return false\n const list = items()\n if (list.length === 0) return false\n event.preventDefault()\n\n // A function, not a value: only the arrow branch asks, so Home and End are spared the\n // style recalculation that reading the direction forces.\n const forward = () =>\n vertical ? event.key === 'ArrowDown' : (event.key === 'ArrowRight') !== isRtl(container)\n const current = list.indexOf(document.activeElement as HTMLElement)\n const next =\n event.key === 'Home'\n ? 0\n : event.key === 'End'\n ? list.length - 1\n : current === -1\n ? 0\n : (current + (forward() ? 1 : -1) + list.length) % list.length\n list[next]?.focus()\n return true\n}\n"],"mappings":";;AAKA,SAAgB,EAAe,GAAwB,GAAiC;CACtF,OAAO,CAAC,GAAG,EAAU,iBAA8B,CAAQ,CAAC,CAAC,CAAC,QAC3D,MAAO,iBAAiB,CAAE,CAAC,CAAC,YAAY,MAC3C;AACF;AAGA,SAAgB,EACd,GACA,GACA,GACA,IAAkC,CAAC,GAC1B;CACT,IAAM,IAAW,EAAQ,YAAY,IAC/B,IAAO,IACT;EAAC;EAAa;EAAW;EAAQ;CAAK,IACtC;EAAC;EAAc;EAAa;EAAQ;CAAK;CAC7C,IAAI,EAAM,UAAU,EAAM,WAAW,EAAM,WAAW,CAAC,EAAK,SAAS,EAAM,GAAG,GAAG,OAAO;CACxF,IAAM,IAAO,EAAM;CACnB,IAAI,EAAK,WAAW,GAAG,OAAO;CAC9B,EAAM,eAAe;CAIrB,IAAM,UACJ,IAAW,EAAM,QAAQ,cAAe,EAAM,QAAQ,iBAAkB,EAAM,CAAS,GACnF,IAAU,EAAK,QAAQ,SAAS,aAA4B;CAUlE,OADA,EAPE,EAAM,QAAQ,SACV,IACA,EAAM,QAAQ,QACZ,EAAK,SAAS,IACd,MAAY,KACV,KACC,KAAW,EAAQ,IAAI,IAAI,MAAM,EAAK,UAAU,EAAK,OACtD,EAAE,MAAM,GACX;AACT"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Splits attributes between two elements: the listed keys go to `picked`, every other one to
|
|
3
|
+
* `rest`. Each listed key is read even when absent, so a computed calling this re-runs when one
|
|
4
|
+
* appears later: enumerating an empty attrs object tracks no reads.
|
|
5
|
+
*/
|
|
6
|
+
export declare function partitionAttrs(attrs: Record<string, unknown>, keys: readonly string[]): {
|
|
7
|
+
picked: Record<string, unknown>;
|
|
8
|
+
rest: Record<string, unknown>;
|
|
9
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/utils/attrs.ts
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
for (let n of t) e[n];
|
|
4
|
+
let n = {}, r = {};
|
|
5
|
+
for (let [i, a] of Object.entries(e)) (t.includes(i) ? n : r)[i] = a;
|
|
6
|
+
return {
|
|
7
|
+
picked: n,
|
|
8
|
+
rest: r
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { e as partitionAttrs };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=attrs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attrs.js","names":[],"sources":["../../src/utils/attrs.ts"],"sourcesContent":["/**\n * Splits attributes between two elements: the listed keys go to `picked`, every other one to\n * `rest`. Each listed key is read even when absent, so a computed calling this re-runs when one\n * appears later: enumerating an empty attrs object tracks no reads.\n */\nexport function partitionAttrs(\n attrs: Record<string, unknown>,\n keys: readonly string[],\n): { picked: Record<string, unknown>; rest: Record<string, unknown> } {\n for (const key of keys) void attrs[key]\n const picked: Record<string, unknown> = {}\n const rest: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(attrs)) {\n ;(keys.includes(key) ? picked : rest)[key] = value\n }\n return { picked, rest }\n}\n"],"mappings":";AAKA,SAAgB,EACd,GACA,GACoE;CACpE,KAAK,IAAM,KAAO,GAAM,EAAW;CACnC,IAAM,IAAkC,CAAC,GACnC,IAAgC,CAAC;CACvC,KAAK,IAAM,CAAC,GAAK,MAAU,OAAO,QAAQ,CAAK,GAC5C,CAAC,EAAK,SAAS,CAAG,IAAI,IAAS,EAAA,CAAM,KAAO;CAE/C,OAAO;EAAE;EAAQ;CAAK;AACxB"}
|
package/dist/utils/date.d.ts
CHANGED
|
@@ -74,6 +74,7 @@ export declare function firstDayOfWeekFor(locale: string): number;
|
|
|
74
74
|
* dropped straight into a calendar header.
|
|
75
75
|
*/
|
|
76
76
|
export declare function weekdayNames(locale: string, firstDayOfWeek: number, weekday?: 'short' | 'long'): string[];
|
|
77
|
+
export declare function dateFormatter(locale: string, options: Intl.DateTimeFormatOptions): Intl.DateTimeFormat;
|
|
77
78
|
/**
|
|
78
79
|
* A date written out for the reader, in the conventions of their locale: this is
|
|
79
80
|
* what VDateInput shows in its field. An unparsable date yields an empty string
|
package/dist/utils/date.js
CHANGED
|
@@ -71,7 +71,7 @@ function y(e) {
|
|
|
71
71
|
}
|
|
72
72
|
var b = Date.UTC(2021, 7, 1), x = 864e5;
|
|
73
73
|
function S(e, t, n = "short") {
|
|
74
|
-
let r =
|
|
74
|
+
let r = w(e, {
|
|
75
75
|
weekday: n,
|
|
76
76
|
timeZone: "UTC"
|
|
77
77
|
});
|
|
@@ -92,6 +92,6 @@ function E(e, t, n, r) {
|
|
|
92
92
|
return c === 0 ? s.format(i) : c < 0 ? s.formatRange(i, o) : s.formatRange(o, i);
|
|
93
93
|
}
|
|
94
94
|
//#endregion
|
|
95
|
-
export { c as addDays, l as addMonths, g as buildMonthGrid, p as clampISO, d as compareISO, u as daysInMonth, v as firstDayOfWeekFor, T as formatDateDisplay, E as formatDisplayRange, o as formatISO, h as isDateAllowed, f as isSameISO, i as isValidISO, m as isWithin, s as isoOf, a as parseISO, S as weekdayNames };
|
|
95
|
+
export { c as addDays, l as addMonths, g as buildMonthGrid, p as clampISO, d as compareISO, w as dateFormatter, u as daysInMonth, v as firstDayOfWeekFor, T as formatDateDisplay, E as formatDisplayRange, o as formatISO, h as isDateAllowed, f as isSameISO, i as isValidISO, m as isWithin, s as isoOf, a as parseISO, S as weekdayNames };
|
|
96
96
|
|
|
97
97
|
//# sourceMappingURL=date.js.map
|
package/dist/utils/date.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.js","names":[],"sources":["../../src/utils/date.ts"],"sourcesContent":["// @ssr @core\n/** Pure date arithmetic shared by date inputs, pickers and calendars. */\n\nimport { memo } from './memo'\nimport { pad2 } from './text'\n\n/**\n * Not `new Date(y, m, d)` itself, which reads a year from 0 to 99 as 1900 to 1999: `0050-01-01`\n * would come back as 1950, and a `min` in the first century would open the years view nineteen\n * centuries late. `setFullYear` takes the year as it is.\n */\nfunction localDate(year: number, month0: number, day: number): Date {\n const date = new Date(year, month0, day)\n if (year >= 0 && year < 100) date.setFullYear(year, month0, day)\n return date\n}\n\nconst ISO_RE = /^\\d{4}-\\d{2}-\\d{2}$/\n\n/** Tells whether a value is a real `YYYY-MM-DD` date. */\nexport function isValidISO(iso: unknown): iso is string {\n return typeof iso === 'string' && parseISO(iso) !== null\n}\n\n/**\n * Parse ISO dates at local midnight, returning null for invalid input. Round-trip the result to\n * reject impossible days that Date silently rolls into the next month.\n */\nexport function parseISO(iso: string | null | undefined): Date | null {\n if (typeof iso !== 'string' || !ISO_RE.test(iso)) return null\n const parts = iso.split('-')\n const date = localDate(Number(parts[0]), Number(parts[1]) - 1, Number(parts[2]))\n return Number.isNaN(date.getTime()) || formatISO(date) !== iso ? null : date\n}\n\n/**\n * Writes a `Date` as an ISO string, reading its LOCAL components. This manual\n * concatenation is what `toISOString()` cannot do, since that one formats in UTC.\n */\nexport function formatISO(date: Date): string {\n const year = String(date.getFullYear()).padStart(4, '0')\n return `${year}-${pad2(date.getMonth() + 1)}-${pad2(date.getDate())}`\n}\n\n/**\n * Builds an ISO string from separate values. The month is 0-indexed, as everywhere\n * in the language: 0 is January.\n */\nexport function isoOf(year: number, month0: number, day: number): string {\n return formatISO(localDate(year, month0, day))\n}\n\n/**\n * Moves a date by a number of days, forwards or backwards. Crossing into another\n * month or year is handled by `Date` itself.\n */\nexport function addDays(iso: string, n: number): string {\n const d = parseISO(iso)\n if (!d) return iso\n d.setDate(d.getDate() + n)\n return formatISO(d)\n}\n\n/** Moves a date by a number of months, keeping the day of the month where possible. */\nexport function addMonths(iso: string, n: number): string {\n const d = parseISO(iso)\n if (!d) return iso\n const day = d.getDate()\n d.setDate(1)\n d.setMonth(d.getMonth() + n)\n d.setDate(Math.min(day, daysInMonth(d.getFullYear(), d.getMonth())))\n return formatISO(d)\n}\n\n/**\n * How many days the given month holds, leap years included. Day 0 of the following month is the\n * last day of this one, which makes the leap year rule the language's problem rather than ours.\n */\nexport function daysInMonth(year: number, month0: number): number {\n return localDate(year, month0 + 1, 0).getDate()\n}\n\n/** Compares two dates chronologically, returning the usual -1, 0 or 1. */\nexport function compareISO(a: string, b: string): number {\n return a < b ? -1 : a > b ? 1 : 0\n}\n\n/**\n * Whether two dates are the same day, with a null on either side counting as no\n * date at all rather than as a match.\n */\nexport const isSameISO = (a: string | null, b: string | null) => !!a && a === b\n\n/**\n * Brings a date back inside the allowed interval, returning the bound it exceeded.\n * Both bounds are optional, and an absent one means unbounded on that side.\n */\nexport function clampISO(iso: string, min?: string, max?: string): string {\n if (min && compareISO(iso, min) < 0) return min\n if (max && compareISO(iso, max) > 0) return max\n return iso\n}\n\n/** Whether a date falls inside the allowed interval, each bound being optional. */\nexport function isWithin(iso: string, min?: string, max?: string): boolean {\n if (min && compareISO(iso, min) < 0) return false\n if (max && compareISO(iso, max) > 0) return false\n return true\n}\n\n/** Whether a date may be chosen: inside the bounds, and not one the matcher excludes. */\nexport function isDateAllowed(\n iso: string,\n min: string | undefined,\n max: string | undefined,\n excluded: (iso: string) => boolean,\n): boolean {\n return isWithin(iso, min, max) && !excluded(iso)\n}\n\n/** One square of a month grid. */\nexport interface MonthCell {\n /** The day it stands for, as an ISO `YYYY-MM-DD` string. */\n iso: string\n /** The day of the month, carried so a caller does not parse back what was just formatted. */\n day: number\n /**\n * Which side of the displayed month this day belongs to when it is not part of it,\n * and `null` when it is.\n */\n adjacent: 'prev' | 'next' | null\n}\n\n/**\n * Builds the grid of a month: 42 cells, six rows of seven, filled out at both ends with the\n * days of the neighbouring months. The count is fixed on purpose, so that the calendar keeps\n * the same height from one month to the next instead of jumping by a row.\n */\nexport function buildMonthGrid(year: number, month0: number, firstDayOfWeek: number): MonthCell[] {\n const first = localDate(year, month0, 1)\n // How many cells the 1st of the month sits after the start of its row, which is\n // exactly how many days of the previous month the grid has to open with.\n const offset = (first.getDay() - firstDayOfWeek + 7) % 7\n const cells: MonthCell[] = []\n for (let i = 0; i < 42; i++) {\n // Built from the 1st rather than stepped from a start date, so the month and year\n // rolling over at either end is `Date`'s arithmetic and not ours.\n const d = localDate(year, month0, 1 - offset + i)\n const adjacent =\n d.getMonth() === month0 && d.getFullYear() === year ? null : d < first ? 'prev' : 'next'\n cells.push({ iso: formatISO(d), day: d.getDate(), adjacent })\n }\n return cells\n}\n\nconst firstDayCache = new Map<string, number>()\n\n// @fallback @ssr\n/**\n * The day the week starts on in a given locale, from 0 for Sunday to 6 for Saturday : Sunday in\n * the United States, Monday in most of Europe, Saturday in much of the Middle East. That part\n * of `Intl` is not everywhere (some Node builds lack it), so the answer falls back to Monday\n * when it is missing.\n */\nexport function firstDayOfWeekFor(locale: string): number {\n return memo(firstDayCache, locale, () => resolveFirstDayOfWeek(locale))\n}\n\nfunction resolveFirstDayOfWeek(locale: string): number {\n try {\n // Implementations disagree on the shape: Chrome and Safari expose `weekInfo` as\n // a getter, others a `getWeekInfo()` method. Both are tried.\n const loc = new Intl.Locale(locale) as Intl.Locale & {\n weekInfo?: { firstDay: number }\n getWeekInfo?: () => { firstDay: number }\n }\n const info = loc.getWeekInfo?.() ?? loc.weekInfo\n if (info?.firstDay) return info.firstDay % 7\n } catch {\n /* An invalid locale throws a RangeError: fall through to the fallback */\n }\n return 1\n}\n\n// The reference instants the names are formatted from. Any Sunday will do for the\n// weekdays, and any year for the months; combined with `timeZone: 'UTC'` at every\n// call site, they pin the output whatever zone the machine is in.\nconst REF_SUNDAY = Date.UTC(2021, 7, 1)\nconst MS_DAY = 86_400_000\n\n/**\n * The names of the seven days, starting from `firstDayOfWeek` so the list can be\n * dropped straight into a calendar header.\n */\nexport function weekdayNames(\n locale: string,\n firstDayOfWeek: number,\n weekday: 'short' | 'long' = 'short',\n): string[] {\n const fmt = new Intl.DateTimeFormat(locale, { weekday, timeZone: 'UTC' })\n return Array.from({ length: 7 }, (_, i) =>\n fmt.format(REF_SUNDAY + ((firstDayOfWeek + i) % 7) * MS_DAY),\n )\n}\n\n/**\n * One formatter kept per locale and set of options, for the lifetime of the module; the same\n * `formatterFor` idiom as in `utils/file.ts` and `utils/time.ts`.\n */\nconst formatters = new Map<string, Intl.DateTimeFormat>()\n\nfunction formatterFor(locale: string, options: Intl.DateTimeFormatOptions): Intl.DateTimeFormat {\n return memo(\n formatters,\n `${locale}|${JSON.stringify(options)}`,\n () => new Intl.DateTimeFormat(locale, options),\n )\n}\n\n/**\n * A date written out for the reader, in the conventions of their locale: this is\n * what VDateInput shows in its field. An unparsable date yields an empty string\n * rather than a broken one.\n */\nexport function formatDateDisplay(\n iso: string,\n locale: string,\n options: Intl.DateTimeFormatOptions,\n): string {\n const d = parseISO(iso)\n return d ? formatterFor(locale, options).format(d) : ''\n}\n\n/** A period written out for the reader. */\nexport function formatDisplayRange(\n start: string,\n end: string,\n locale: string,\n options: Intl.DateTimeFormatOptions,\n): string {\n const a = parseISO(start)\n const b = parseISO(end)\n if (!a || !b) return ''\n const fmt = formatterFor(locale, options)\n const order = compareISO(start, end)\n if (order === 0) return fmt.format(a)\n return order < 0 ? fmt.formatRange(a, b) : fmt.formatRange(b, a)\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"date.js","names":[],"sources":["../../src/utils/date.ts"],"sourcesContent":["// @ssr @core\n/** Pure date arithmetic shared by date inputs, pickers and calendars. */\n\nimport { memo } from './memo'\nimport { pad2 } from './text'\n\n/**\n * Not `new Date(y, m, d)` itself, which reads a year from 0 to 99 as 1900 to 1999: `0050-01-01`\n * would come back as 1950, and a `min` in the first century would open the years view nineteen\n * centuries late. `setFullYear` takes the year as it is.\n */\nfunction localDate(year: number, month0: number, day: number): Date {\n const date = new Date(year, month0, day)\n if (year >= 0 && year < 100) date.setFullYear(year, month0, day)\n return date\n}\n\nconst ISO_RE = /^\\d{4}-\\d{2}-\\d{2}$/\n\n/** Tells whether a value is a real `YYYY-MM-DD` date. */\nexport function isValidISO(iso: unknown): iso is string {\n return typeof iso === 'string' && parseISO(iso) !== null\n}\n\n/**\n * Parse ISO dates at local midnight, returning null for invalid input. Round-trip the result to\n * reject impossible days that Date silently rolls into the next month.\n */\nexport function parseISO(iso: string | null | undefined): Date | null {\n if (typeof iso !== 'string' || !ISO_RE.test(iso)) return null\n const parts = iso.split('-')\n const date = localDate(Number(parts[0]), Number(parts[1]) - 1, Number(parts[2]))\n return Number.isNaN(date.getTime()) || formatISO(date) !== iso ? null : date\n}\n\n/**\n * Writes a `Date` as an ISO string, reading its LOCAL components. This manual\n * concatenation is what `toISOString()` cannot do, since that one formats in UTC.\n */\nexport function formatISO(date: Date): string {\n const year = String(date.getFullYear()).padStart(4, '0')\n return `${year}-${pad2(date.getMonth() + 1)}-${pad2(date.getDate())}`\n}\n\n/**\n * Builds an ISO string from separate values. The month is 0-indexed, as everywhere\n * in the language: 0 is January.\n */\nexport function isoOf(year: number, month0: number, day: number): string {\n return formatISO(localDate(year, month0, day))\n}\n\n/**\n * Moves a date by a number of days, forwards or backwards. Crossing into another\n * month or year is handled by `Date` itself.\n */\nexport function addDays(iso: string, n: number): string {\n const d = parseISO(iso)\n if (!d) return iso\n d.setDate(d.getDate() + n)\n return formatISO(d)\n}\n\n/** Moves a date by a number of months, keeping the day of the month where possible. */\nexport function addMonths(iso: string, n: number): string {\n const d = parseISO(iso)\n if (!d) return iso\n const day = d.getDate()\n d.setDate(1)\n d.setMonth(d.getMonth() + n)\n d.setDate(Math.min(day, daysInMonth(d.getFullYear(), d.getMonth())))\n return formatISO(d)\n}\n\n/**\n * How many days the given month holds, leap years included. Day 0 of the following month is the\n * last day of this one, which makes the leap year rule the language's problem rather than ours.\n */\nexport function daysInMonth(year: number, month0: number): number {\n return localDate(year, month0 + 1, 0).getDate()\n}\n\n/** Compares two dates chronologically, returning the usual -1, 0 or 1. */\nexport function compareISO(a: string, b: string): number {\n return a < b ? -1 : a > b ? 1 : 0\n}\n\n/**\n * Whether two dates are the same day, with a null on either side counting as no\n * date at all rather than as a match.\n */\nexport const isSameISO = (a: string | null, b: string | null) => !!a && a === b\n\n/**\n * Brings a date back inside the allowed interval, returning the bound it exceeded.\n * Both bounds are optional, and an absent one means unbounded on that side.\n */\nexport function clampISO(iso: string, min?: string, max?: string): string {\n if (min && compareISO(iso, min) < 0) return min\n if (max && compareISO(iso, max) > 0) return max\n return iso\n}\n\n/** Whether a date falls inside the allowed interval, each bound being optional. */\nexport function isWithin(iso: string, min?: string, max?: string): boolean {\n if (min && compareISO(iso, min) < 0) return false\n if (max && compareISO(iso, max) > 0) return false\n return true\n}\n\n/** Whether a date may be chosen: inside the bounds, and not one the matcher excludes. */\nexport function isDateAllowed(\n iso: string,\n min: string | undefined,\n max: string | undefined,\n excluded: (iso: string) => boolean,\n): boolean {\n return isWithin(iso, min, max) && !excluded(iso)\n}\n\n/** One square of a month grid. */\nexport interface MonthCell {\n /** The day it stands for, as an ISO `YYYY-MM-DD` string. */\n iso: string\n /** The day of the month, carried so a caller does not parse back what was just formatted. */\n day: number\n /**\n * Which side of the displayed month this day belongs to when it is not part of it,\n * and `null` when it is.\n */\n adjacent: 'prev' | 'next' | null\n}\n\n/**\n * Builds the grid of a month: 42 cells, six rows of seven, filled out at both ends with the\n * days of the neighbouring months. The count is fixed on purpose, so that the calendar keeps\n * the same height from one month to the next instead of jumping by a row.\n */\nexport function buildMonthGrid(year: number, month0: number, firstDayOfWeek: number): MonthCell[] {\n const first = localDate(year, month0, 1)\n // How many cells the 1st of the month sits after the start of its row, which is\n // exactly how many days of the previous month the grid has to open with.\n const offset = (first.getDay() - firstDayOfWeek + 7) % 7\n const cells: MonthCell[] = []\n for (let i = 0; i < 42; i++) {\n // Built from the 1st rather than stepped from a start date, so the month and year\n // rolling over at either end is `Date`'s arithmetic and not ours.\n const d = localDate(year, month0, 1 - offset + i)\n const adjacent =\n d.getMonth() === month0 && d.getFullYear() === year ? null : d < first ? 'prev' : 'next'\n cells.push({ iso: formatISO(d), day: d.getDate(), adjacent })\n }\n return cells\n}\n\nconst firstDayCache = new Map<string, number>()\n\n// @fallback @ssr\n/**\n * The day the week starts on in a given locale, from 0 for Sunday to 6 for Saturday : Sunday in\n * the United States, Monday in most of Europe, Saturday in much of the Middle East. That part\n * of `Intl` is not everywhere (some Node builds lack it), so the answer falls back to Monday\n * when it is missing.\n */\nexport function firstDayOfWeekFor(locale: string): number {\n return memo(firstDayCache, locale, () => resolveFirstDayOfWeek(locale))\n}\n\nfunction resolveFirstDayOfWeek(locale: string): number {\n try {\n // Implementations disagree on the shape: Chrome and Safari expose `weekInfo` as\n // a getter, others a `getWeekInfo()` method. Both are tried.\n const loc = new Intl.Locale(locale) as Intl.Locale & {\n weekInfo?: { firstDay: number }\n getWeekInfo?: () => { firstDay: number }\n }\n const info = loc.getWeekInfo?.() ?? loc.weekInfo\n if (info?.firstDay) return info.firstDay % 7\n } catch {\n /* An invalid locale throws a RangeError: fall through to the fallback */\n }\n return 1\n}\n\n// The reference instants the names are formatted from. Any Sunday will do for the\n// weekdays, and any year for the months; combined with `timeZone: 'UTC'` at every\n// call site, they pin the output whatever zone the machine is in.\nconst REF_SUNDAY = Date.UTC(2021, 7, 1)\nconst MS_DAY = 86_400_000\n\n/**\n * The names of the seven days, starting from `firstDayOfWeek` so the list can be\n * dropped straight into a calendar header.\n */\nexport function weekdayNames(\n locale: string,\n firstDayOfWeek: number,\n weekday: 'short' | 'long' = 'short',\n): string[] {\n const fmt = dateFormatter(locale, { weekday, timeZone: 'UTC' })\n return Array.from({ length: 7 }, (_, i) =>\n fmt.format(REF_SUNDAY + ((firstDayOfWeek + i) % 7) * MS_DAY),\n )\n}\n\n/**\n * One formatter kept per locale and set of options, for the lifetime of the module: building an\n * `Intl` formatter costs far more than using one.\n */\nconst formatters = new Map<string, Intl.DateTimeFormat>()\n\nexport function dateFormatter(\n locale: string,\n options: Intl.DateTimeFormatOptions,\n): Intl.DateTimeFormat {\n return memo(\n formatters,\n `${locale}|${JSON.stringify(options)}`,\n () => new Intl.DateTimeFormat(locale, options),\n )\n}\n\n/**\n * A date written out for the reader, in the conventions of their locale: this is\n * what VDateInput shows in its field. An unparsable date yields an empty string\n * rather than a broken one.\n */\nexport function formatDateDisplay(\n iso: string,\n locale: string,\n options: Intl.DateTimeFormatOptions,\n): string {\n const d = parseISO(iso)\n return d ? dateFormatter(locale, options).format(d) : ''\n}\n\n/** A period written out for the reader. */\nexport function formatDisplayRange(\n start: string,\n end: string,\n locale: string,\n options: Intl.DateTimeFormatOptions,\n): string {\n const a = parseISO(start)\n const b = parseISO(end)\n if (!a || !b) return ''\n const fmt = dateFormatter(locale, options)\n const order = compareISO(start, end)\n if (order === 0) return fmt.format(a)\n return order < 0 ? fmt.formatRange(a, b) : fmt.formatRange(b, a)\n}\n"],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
@layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
|
|
2
|
-
@layer vectis.components{.v-combobox-group{gap:var(--vectis-space-1);flex-direction:column;flex:none;display:flex}.v-combobox-group-label{min-block-size:var(--control-height);padding-block:var(--vectis-space-1);padding-inline:var(--control-padding-inline);font-size:var(--vectis-text-overline-size);font-weight:var(--vectis-text-overline-weight);letter-spacing:var(--vectis-text-overline-tracking);color:var(--vectis-color-text-muted);align-items:center;display:flex}}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
interface ComboboxGroupProps {
|
|
2
|
-
/** The name of the block. It is a heading, not something that can be chosen. */
|
|
3
|
-
label: string;
|
|
4
|
-
}
|
|
5
|
-
type __VLS_Slots = {
|
|
6
|
-
/** The options belonging to this block. */
|
|
7
|
-
default(): unknown;
|
|
8
|
-
};
|
|
9
|
-
declare const __VLS_base: import('vue').DefineComponent<ComboboxGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ComboboxGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
10
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
-
declare const _default: typeof __VLS_export;
|
|
12
|
-
export default _default;
|
|
13
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
-
new (): {
|
|
15
|
-
$slots: S;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import './VComboboxGroup.css';
|
|
2
|
-
import e from "./VComboboxGroup.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
-
/* empty css */
|
|
4
|
-
//#region src/components/VCombobox/VComboboxGroup.vue
|
|
5
|
-
var t = e;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { t as default };
|
|
8
|
-
|
|
9
|
-
//# sourceMappingURL=VComboboxGroup.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VComboboxGroup.js","names":[],"sources":["../../../src/components/VCombobox/VComboboxGroup.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Group generated options under their accessible label; groups and options are the listbox's\n * permitted children.\n */\n\nimport { useId } from 'vue'\n\ninterface ComboboxGroupProps {\n /** The name of the block. It is a heading, not something that can be chosen. */\n label: string\n}\n\ndefineProps<ComboboxGroupProps>()\n\ndefineSlots<{\n /** The options belonging to this block. */\n default(): unknown\n}>()\n\nconst labelId = useId()\n</script>\n\n<template>\n <div role=\"group\" class=\"v-combobox-group\" :aria-labelledby=\"labelId\">\n <span :id=\"labelId\" class=\"v-combobox-group-label\">{{ label }}</span>\n <slot />\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * It refuses to shrink, where a menu group has no need to: this panel is a column of bounded\n * height that scrolls, and a block left free to shrink would be squashed to make its content\n * fit; the same reason the state rows and the foot of the list refuse it too.\n */\n .v-combobox-group {\n display: flex;\n flex: none;\n flex-direction: column;\n gap: var(--vectis-space-1);\n }\n\n .v-combobox-group-label {\n display: flex;\n align-items: center;\n min-block-size: var(--control-height);\n padding-block: var(--vectis-space-1);\n padding-inline: var(--control-padding-inline);\n font-size: var(--vectis-text-overline-size);\n font-weight: var(--vectis-text-overline-weight);\n letter-spacing: var(--vectis-text-overline-tracking);\n color: var(--vectis-color-text-muted);\n }\n}\n</style>\n"],"mappings":""}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { createElementBlock as e, createElementVNode as t, defineComponent as n, openBlock as r, renderSlot as i, toDisplayString as a, unref as o, useId as s } from "vue";
|
|
2
|
-
//#region src/components/VCombobox/VComboboxGroup.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var c = ["aria-labelledby"], l = ["id"], u = /*@__PURE__*/ n({
|
|
4
|
-
__name: "VComboboxGroup",
|
|
5
|
-
props: { label: {} },
|
|
6
|
-
setup(n) {
|
|
7
|
-
let u = s();
|
|
8
|
-
return (s, d) => (r(), e("div", {
|
|
9
|
-
role: "group",
|
|
10
|
-
class: "v-combobox-group",
|
|
11
|
-
"aria-labelledby": o(u)
|
|
12
|
-
}, [t("span", {
|
|
13
|
-
id: o(u),
|
|
14
|
-
class: "v-combobox-group-label"
|
|
15
|
-
}, a(n.label), 9, l), i(s.$slots, "default")], 8, c));
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
//#endregion
|
|
19
|
-
export { u as default };
|
|
20
|
-
|
|
21
|
-
//# sourceMappingURL=VComboboxGroup.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VComboboxGroup.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VCombobox/VComboboxGroup.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Group generated options under their accessible label; groups and options are the listbox's\n * permitted children.\n */\n\nimport { useId } from 'vue'\n\ninterface ComboboxGroupProps {\n /** The name of the block. It is a heading, not something that can be chosen. */\n label: string\n}\n\ndefineProps<ComboboxGroupProps>()\n\ndefineSlots<{\n /** The options belonging to this block. */\n default(): unknown\n}>()\n\nconst labelId = useId()\n</script>\n\n<template>\n <div role=\"group\" class=\"v-combobox-group\" :aria-labelledby=\"labelId\">\n <span :id=\"labelId\" class=\"v-combobox-group-label\">{{ label }}</span>\n <slot />\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * It refuses to shrink, where a menu group has no need to: this panel is a column of bounded\n * height that scrolls, and a block left free to shrink would be squashed to make its content\n * fit; the same reason the state rows and the foot of the list refuse it too.\n */\n .v-combobox-group {\n display: flex;\n flex: none;\n flex-direction: column;\n gap: var(--vectis-space-1);\n }\n\n .v-combobox-group-label {\n display: flex;\n align-items: center;\n min-block-size: var(--control-height);\n padding-block: var(--vectis-space-1);\n padding-inline: var(--control-padding-inline);\n font-size: var(--vectis-text-overline-size);\n font-weight: var(--vectis-text-overline-weight);\n letter-spacing: var(--vectis-text-overline-tracking);\n color: var(--vectis-color-text-muted);\n }\n}\n</style>\n"],"mappings":";;;;;;EAoBA,IAAM,IAAU,EAAM;yBAIpB,EAGM,OAAA;GAHD,MAAK;GAAQ,OAAM;GAAoB,mBAAiB,EAAA,CAAA;MAC3D,EAAqE,QAAA;GAA9D,IAAI,EAAA,CAAA;GAAS,OAAM;OAA4B,EAAA,KAAK,GAAA,GAAA,CAAA,GAC3D,EAAQ,EAAA,QAAA,SAAA,CAAA,GAAA,GAAA,CAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
@layer vectis.reset, vectis.tokens, vectis.components, vectis.utilities;
|
|
2
|
-
@layer vectis.components{.v-combobox-option{align-items:center;gap:var(--control-gap);width:100%;min-height:var(--control-height);padding:var(--vectis-space-1) var(--control-padding-inline);color:var(--vectis-color-text);border-radius:min(var(--vectis-radius-interactive), calc(var(--control-height) / 2));font-family:inherit;font-size:var(--control-font-size);line-height:var(--vectis-text-body-md-leading);text-align:start;cursor:pointer;background:0 0;border:none;display:flex}.v-combobox-option-label{flex:1;min-inline-size:0}.v-combobox-option:hover:not([aria-disabled=true]),.v-combobox-option[data-active]{background:var(--vectis-color-surface-muted);outline:none}.v-combobox-option[aria-selected=true]{color:var(--vectis-color-accent-text)}.v-combobox-option[aria-disabled=true]{color:var(--vectis-color-text-subtle);cursor:not-allowed;background:0 0}}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import './VComboboxOption.css';
|
|
2
|
-
import e from "./VComboboxOption.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
-
/* empty css */
|
|
4
|
-
//#region src/components/VCombobox/VComboboxOption.vue
|
|
5
|
-
var t = e;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { t as default };
|
|
8
|
-
|
|
9
|
-
//# sourceMappingURL=VComboboxOption.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VComboboxOption.js","names":[],"sources":["../../../src/components/VCombobox/VComboboxOption.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Options use aria-disabled while field focus stays on aria-activedescendant; do not apply\n * native disabling to the active-descendant target.\n */\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { check as checkIcon } from '../VIcon/icons/check'\nimport type { IconSource } from '../VIcon/types'\n\ninterface ComboboxOptionProps {\n /** An icon before the label: an icon name, or an explicit render. */\n icon?: IconSource\n /** Marks the option as one of the chosen ones, which also draws the tick. */\n selected?: boolean\n /** Marks the option as the one currently highlighted. The field decides this. */\n active?: boolean\n /** Shows the option without allowing it to be chosen. */\n disabled?: boolean\n}\n\nconst props = withDefaults(defineProps<ComboboxOptionProps>(), {\n icon: undefined,\n selected: false,\n active: false,\n disabled: false,\n})\n\nconst emit = defineEmits<{\n /** The option was clicked. What that does to the selection is the field's business. */\n select: []\n}>()\n\ndefineSlots<{\n /** What the row shows. */\n default?(): unknown\n}>()\n\nfunction onClick() {\n if (props.disabled) return\n emit('select')\n}\n</script>\n\n<template>\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"v-combobox-option\"\n :aria-selected=\"selected\"\n :aria-disabled=\"disabled ? 'true' : undefined\"\n :data-active=\"active ? '' : undefined\"\n @click=\"onClick\"\n >\n <VIcon v-if=\"icon\" v-bind=\"iconProps(icon)\" />\n <span class=\"v-combobox-option-label\"><slot /></span>\n <VIcon v-if=\"selected\" :name=\"checkIcon\" class=\"v-combobox-option-check\" />\n </button>\n</template>\n\n<style>\n@layer vectis.components {\n .v-combobox-option {\n /*\n * Every dimension is inherited from the panel, which carries the shared size class, and the\n * icons follow through the same inheritance. The type is composite, exactly as in a menu\n * row: the SIZE comes from the scale, the line height stays that of body text; a unitless\n * ratio, so it follows the size; and the weight stays regular, since a row may wrap.\n */\n display: flex;\n align-items: center;\n gap: var(--control-gap);\n width: 100%;\n min-height: var(--control-height);\n padding: var(--vectis-space-1) var(--control-padding-inline);\n border: none;\n background: transparent;\n color: var(--vectis-color-text);\n border-radius: min(var(--vectis-radius-interactive), calc(var(--control-height) / 2));\n font-family: inherit;\n font-size: var(--control-font-size);\n line-height: var(--vectis-text-body-md-leading);\n text-align: start;\n cursor: pointer;\n }\n\n /* The zero minimum is what allows a long label to be compressed at all: a flex item\n otherwise refuses to shrink below its own content. */\n .v-combobox-option-label {\n flex: 1;\n min-inline-size: 0;\n }\n\n /* A row is highlighted by the pointer resting on it, or by being the current one. There\n is deliberately no focus rule: the focus never arrives here, it stays in the field. */\n .v-combobox-option:hover:not([aria-disabled='true']),\n .v-combobox-option[data-active] {\n background: var(--vectis-color-surface-muted);\n outline: none;\n }\n\n .v-combobox-option[aria-selected='true'] {\n color: var(--vectis-color-accent-text);\n }\n\n /*\n * Matched on the ARIA state and not on the native one, which this component deliberately\n * never sets; see the introduction.\n */\n .v-combobox-option[aria-disabled='true'] {\n background: transparent;\n color: var(--vectis-color-text-subtle);\n cursor: not-allowed;\n }\n}\n</style>\n"],"mappings":""}
|
package/dist/components/VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VComboboxOption.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VCombobox/VComboboxOption.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Options use aria-disabled while field focus stays on aria-activedescendant; do not apply\n * native disabling to the active-descendant target.\n */\n\nimport VIcon from '../VIcon/VIcon.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { check as checkIcon } from '../VIcon/icons/check'\nimport type { IconSource } from '../VIcon/types'\n\ninterface ComboboxOptionProps {\n /** An icon before the label: an icon name, or an explicit render. */\n icon?: IconSource\n /** Marks the option as one of the chosen ones, which also draws the tick. */\n selected?: boolean\n /** Marks the option as the one currently highlighted. The field decides this. */\n active?: boolean\n /** Shows the option without allowing it to be chosen. */\n disabled?: boolean\n}\n\nconst props = withDefaults(defineProps<ComboboxOptionProps>(), {\n icon: undefined,\n selected: false,\n active: false,\n disabled: false,\n})\n\nconst emit = defineEmits<{\n /** The option was clicked. What that does to the selection is the field's business. */\n select: []\n}>()\n\ndefineSlots<{\n /** What the row shows. */\n default?(): unknown\n}>()\n\nfunction onClick() {\n if (props.disabled) return\n emit('select')\n}\n</script>\n\n<template>\n <button\n type=\"button\"\n role=\"option\"\n tabindex=\"-1\"\n class=\"v-combobox-option\"\n :aria-selected=\"selected\"\n :aria-disabled=\"disabled ? 'true' : undefined\"\n :data-active=\"active ? '' : undefined\"\n @click=\"onClick\"\n >\n <VIcon v-if=\"icon\" v-bind=\"iconProps(icon)\" />\n <span class=\"v-combobox-option-label\"><slot /></span>\n <VIcon v-if=\"selected\" :name=\"checkIcon\" class=\"v-combobox-option-check\" />\n </button>\n</template>\n\n<style>\n@layer vectis.components {\n .v-combobox-option {\n /*\n * Every dimension is inherited from the panel, which carries the shared size class, and the\n * icons follow through the same inheritance. The type is composite, exactly as in a menu\n * row: the SIZE comes from the scale, the line height stays that of body text; a unitless\n * ratio, so it follows the size; and the weight stays regular, since a row may wrap.\n */\n display: flex;\n align-items: center;\n gap: var(--control-gap);\n width: 100%;\n min-height: var(--control-height);\n padding: var(--vectis-space-1) var(--control-padding-inline);\n border: none;\n background: transparent;\n color: var(--vectis-color-text);\n border-radius: min(var(--vectis-radius-interactive), calc(var(--control-height) / 2));\n font-family: inherit;\n font-size: var(--control-font-size);\n line-height: var(--vectis-text-body-md-leading);\n text-align: start;\n cursor: pointer;\n }\n\n /* The zero minimum is what allows a long label to be compressed at all: a flex item\n otherwise refuses to shrink below its own content. */\n .v-combobox-option-label {\n flex: 1;\n min-inline-size: 0;\n }\n\n /* A row is highlighted by the pointer resting on it, or by being the current one. There\n is deliberately no focus rule: the focus never arrives here, it stays in the field. */\n .v-combobox-option:hover:not([aria-disabled='true']),\n .v-combobox-option[data-active] {\n background: var(--vectis-color-surface-muted);\n outline: none;\n }\n\n .v-combobox-option[aria-selected='true'] {\n color: var(--vectis-color-accent-text);\n }\n\n /*\n * Matched on the ARIA state and not on the native one, which this component deliberately\n * never sets; see the introduction.\n */\n .v-combobox-option[aria-disabled='true'] {\n background: transparent;\n color: var(--vectis-color-text-subtle);\n cursor: not-allowed;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBA,IAAM,IAAQ,GAOR,IAAO;EAUb,SAAS,IAAU;GACb,EAAM,YACV,EAAK,QAAQ;EACf;yBAIE,EAaS,UAAA;GAZP,MAAK;GACL,MAAK;GACL,UAAS;GACT,OAAM;GACL,iBAAe,EAAA;GACf,iBAAe,EAAA,WAAQ,SAAY,KAAA;GACnC,eAAa,EAAA,SAAM,KAAQ,KAAA;GACpB;;GAEK,EAAA,QAAA,EAAA,GAAb,EAA8C,GAAA,EAAA,EAAA,EAAA,KAAA,EAAA,GAAnB,EAAA,CAAA,CAAS,CAAC,EAAA,IAAI,CAAA,CAAA,GAAA,MAAA,EAAA,KAAA,EAAA,IAAA,EAAA;GACzC,EAAqD,QAArD,GAAqD,CAAf,EAAQ,EAAA,QAAA,SAAA,CAAA,CAAA;GACjC,EAAA,YAAA,EAAA,GAAb,EAA2E,GAAA;;IAAnD,MAAM,EAAA,CAAA;IAAW,OAAM"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import './VComboboxSeparator.css';
|
|
2
|
-
import e from "./VComboboxSeparator.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
-
/* empty css */
|
|
4
|
-
//#region src/components/VCombobox/VComboboxSeparator.vue
|
|
5
|
-
var t = e;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { t as default };
|
|
8
|
-
|
|
9
|
-
//# sourceMappingURL=VComboboxSeparator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VComboboxSeparator.js","names":[],"sources":["../../../src/components/VCombobox/VComboboxSeparator.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Use presentation semantics for separators: a listbox owns only options and groups, unlike a\n * menu.\n */\nimport VSeparator from '../VSeparator/VSeparator.vue'\n</script>\n\n<template>\n <VSeparator role=\"presentation\" class=\"v-combobox-separator\" />\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * The selector compounds both classes because `.v-separator` sets `margin: 0` from a sheet of\n * its own: at equal specificity the winner would be whichever of the two the consumer's\n * bundler happens to put last. The space above and below comes from the panel's own gap, so\n * no margin is added here.\n */\n .v-separator.v-combobox-separator {\n margin-inline: calc(-1 * var(--vectis-space-1));\n }\n}\n</style>\n"],"mappings":""}
|
package/dist/components/VCombobox/VComboboxSeparator.vue_vue_type_script_setup_true_lang.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VComboboxSeparator.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/VCombobox/VComboboxSeparator.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Use presentation semantics for separators: a listbox owns only options and groups, unlike a\n * menu.\n */\nimport VSeparator from '../VSeparator/VSeparator.vue'\n</script>\n\n<template>\n <VSeparator role=\"presentation\" class=\"v-combobox-separator\" />\n</template>\n\n<style>\n@layer vectis.components {\n /*\n * The selector compounds both classes because `.v-separator` sets `margin: 0` from a sheet of\n * its own: at equal specificity the winner would be whichever of the two the consumer's\n * bundler happens to put last. The space above and below comes from the panel's own gap, so\n * no margin is added here.\n */\n .v-separator.v-combobox-separator {\n margin-inline: calc(-1 * var(--vectis-space-1));\n }\n}\n</style>\n"],"mappings":";;;;;;yBASE,EAA+D,GAAA;GAAnD,MAAK;GAAe,OAAM"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"infiniteScroll.js","names":[],"sources":["../../../src/components/VCombobox/infiniteScroll.ts"],"sourcesContent":["// @core\n/**\n * Observe the list's sentinel to request another page; retain ownership of data fetching with\n * the consumer.\n */\nimport { watch, type Ref } from 'vue'\n\nexport interface InfiniteScrollOptions {\n /** The marker at the foot of the list. It is absent when there is nothing left to load. */\n sentinelEl: Ref<HTMLElement | null>\n /** Whether a page may be asked for right now: the panel open, more to come, none in flight. */\n canLoad: () => boolean\n /**\n * The options loaded so far. A change in their NUMBER is the signal that a page has\n * arrived; a new array of the same length counts only after `restart`.\n */\n loaded: () => readonly unknown[]\n /** Asks for the next page. */\n onLoadMore: () => void\n}\n\nexport interface InfiniteScroll {\n /** Releases the lock that stops two requests overlapping. */\n reset: () => void\n /**\n * Releases the lock and takes the next list handed over as an arrival, whatever its length.\n * For a new search: the page asked for under the old term never lands, and the new first page\n * may be exactly as long as the list it replaces.\n */\n restart: () => void\n}\n\nexport function useInfiniteScroll(options: InfiniteScrollOptions): InfiniteScroll {\n let observer: IntersectionObserver | null = null\n /*\n * The consumer's loading flag cannot serve: they raise it when their request starts, which is\n * at best a tick later, and the gap between the two is wide enough for several requests to go\n * out.\n */\n let pending = false\n let rearm = false\n\n function onIntersect(entries: IntersectionObserverEntry[]) {\n if (!entries.some((entry) => entry.isIntersecting)) return\n if (pending || !options.canLoad()) return\n pending = true\n options.onLoadMore()\n }\n\n watch(\n options.sentinelEl,\n (el, _previous, onCleanup) => {\n // @fallback\n // The observer does not exist in the unit-test environment, so its absence has to\n // be tolerated rather than assumed away; the behaviour is checked in a real\n // browser.\n if (!el || typeof IntersectionObserver === 'undefined') return\n // The panel must be named as the frame the marker is watched within, and it is found by\n // its ARIA role, which is public API, rather than by an internal class. Left unspecified,\n // the frame would be the VIEWPORT; and since the panel floats above the page, the marker\n // would count as visible from the very first moment, firing a burst of requests for every\n // page at once.\n const root = el.closest('[role=\"listbox\"]')\n if (!root) return\n observer = new IntersectionObserver(onIntersect, {\n root,\n // The next page is asked for half a panel before the marker is actually reached,\n // so the list is already growing by the time the reader gets there. It is\n // expressed as a proportion of the panel rather than as a number of pixels.\n rootMargin: '0px 0px 50% 0px',\n })\n observer.observe(el)\n onCleanup(() => {\n observer?.disconnect()\n observer = null\n })\n },\n { flush: 'post' },\n )\n\n // An observer only reports a CROSSING. If the page that arrives is too short to push the\n // marker out of view, the marker stays visible without ever crossing anything again, and the\n // loading would stop dead at the second page.\n watch(options.loaded, (list, previous) => {\n if (list.length === previous.length && !rearm) return\n rearm = false\n pending = false\n const el = options.sentinelEl.value\n if (!observer || !el) return\n observer.unobserve(el)\n observer.observe(el)\n })\n\n return {\n reset: () => {\n pending = false\n },\n restart: () => {\n pending = false\n rearm = true\n },\n }\n}\n"],"mappings":";;AAgCA,SAAgB,EAAkB,GAAgD;CAChF,IAAI,IAAwC,MAMxC,IAAU,IACV,IAAQ;CAEZ,SAAS,EAAY,GAAsC;EACpD,EAAQ,MAAM,MAAU,EAAM,cAAc,MAC7C,KAAW,CAAC,EAAQ,QAAQ,MAChC,IAAU,IACV,EAAQ,WAAW;CACrB;CA8CA,OA5CA,EACE,EAAQ,aACP,GAAI,GAAW,MAAc;EAK5B,IAAI,CAAC,KAAM,OAAO,uBAAyB,KAAa;EAMxD,IAAM,IAAO,EAAG,QAAQ,oBAAkB;EACrC,MACL,IAAW,IAAI,qBAAqB,GAAa;GAC/C;GAIA,YAAY;EACd,CAAC,GACD,EAAS,QAAQ,CAAE,GACnB,QAAgB;GAEd,AADA,GAAU,WAAW,GACrB,IAAW;EACb,CAAC;CACH,GACA,EAAE,OAAO,OAAO,CAClB,GAKA,EAAM,EAAQ,SAAS,GAAM,MAAa;EACxC,IAAI,EAAK,WAAW,EAAS,UAAU,CAAC,GAAO;EAE/C,AADA,IAAQ,IACR,IAAU;EACV,IAAM,IAAK,EAAQ,WAAW;EAC1B,CAAC,KAAY,CAAC,MAClB,EAAS,UAAU,CAAE,GACrB,EAAS,QAAQ,CAAE;CACrB,CAAC,GAEM;EACL,aAAa;GACX,IAAU;EACZ;EACA,eAAe;GAEb,AADA,IAAU,IACV,IAAQ;EACV;CACF;AACF"}
|
|
File without changes
|