@vuetify/nightly 3.0.0-beta.13 → 3.0.0-beta.15
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/CHANGELOG.md +23 -5
- package/dist/json/importMap.json +26 -30
- package/dist/vuetify.css +262 -173
- package/dist/vuetify.d.ts +16645 -7306
- package/dist/vuetify.esm.js +1040 -2004
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +1038 -2003
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +531 -537
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/index.d.ts +24 -32
- package/lib/blueprints/index.mjs.map +1 -1
- package/lib/blueprints/md1.d.ts +24 -32
- package/lib/blueprints/md1.mjs +3 -1
- package/lib/blueprints/md1.mjs.map +1 -1
- package/lib/blueprints/md2.d.ts +24 -32
- package/lib/blueprints/md2.mjs +3 -1
- package/lib/blueprints/md2.mjs.map +1 -1
- package/lib/blueprints/md3.d.ts +24 -32
- package/lib/blueprints/md3.mjs +2 -2
- package/lib/blueprints/md3.mjs.map +1 -1
- package/lib/components/VAlert/VAlert.mjs +2 -9
- package/lib/components/VAlert/VAlert.mjs.map +1 -1
- package/lib/components/VAlert/VAlertTitle.mjs.map +1 -1
- package/lib/components/VAlert/index.d.ts +7 -5
- package/lib/components/VAlert/index.mjs.map +1 -1
- package/lib/components/VApp/VApp.mjs +5 -7
- package/lib/components/VApp/VApp.mjs.map +1 -1
- package/lib/components/VApp/index.d.ts +4 -2
- package/lib/components/VApp/index.mjs.map +1 -1
- package/lib/components/VAppBar/VAppBar.mjs +4 -8
- package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
- package/lib/components/VAppBar/VAppBarNavIcon.mjs +0 -4
- package/lib/components/VAppBar/VAppBarNavIcon.mjs.map +1 -1
- package/lib/components/VAppBar/VAppBarTitle.mjs +2 -4
- package/lib/components/VAppBar/VAppBarTitle.mjs.map +1 -1
- package/lib/components/VAppBar/index.d.ts +7 -3
- package/lib/components/VAppBar/index.mjs.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.css +18 -1
- package/lib/components/VAutocomplete/VAutocomplete.mjs +16 -35
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.sass +11 -1
- package/lib/components/VAutocomplete/_variables.scss +1 -0
- package/lib/components/VAutocomplete/index.d.ts +267 -376
- package/lib/components/VAutocomplete/index.mjs.map +1 -1
- package/lib/components/VAvatar/VAvatar.mjs +3 -7
- package/lib/components/VAvatar/VAvatar.mjs.map +1 -1
- package/lib/components/VAvatar/index.d.ts +5 -3
- package/lib/components/VAvatar/index.mjs.map +1 -1
- package/lib/components/VBadge/VBadge.mjs +2 -6
- package/lib/components/VBadge/VBadge.mjs.map +1 -1
- package/lib/components/VBadge/index.mjs.map +1 -1
- package/lib/components/VBanner/VBanner.mjs +5 -7
- package/lib/components/VBanner/VBanner.mjs.map +1 -1
- package/lib/components/VBanner/VBannerActions.mjs +0 -4
- package/lib/components/VBanner/VBannerActions.mjs.map +1 -1
- package/lib/components/VBanner/VBannerText.mjs.map +1 -1
- package/lib/components/VBanner/index.d.ts +7 -3
- package/lib/components/VBanner/index.mjs.map +1 -1
- package/lib/components/VBottomNavigation/VBottomNavigation.mjs +2 -5
- package/lib/components/VBottomNavigation/VBottomNavigation.mjs.map +1 -1
- package/lib/components/VBottomNavigation/index.d.ts +5 -3
- package/lib/components/VBottomNavigation/index.mjs.map +1 -1
- package/lib/components/VBottomSheet/VBottomSheet.mjs +5 -5
- package/lib/components/VBottomSheet/VBottomSheet.mjs.map +1 -1
- package/lib/components/VBottomSheet/index.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +5 -9
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbsDivider.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs +0 -5
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/index.d.ts +50 -40
- package/lib/components/VBreadcrumbs/index.mjs.map +1 -1
- package/lib/components/VBtn/VBtn.mjs +2 -10
- package/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/lib/components/VBtn/index.d.ts +5 -3
- package/lib/components/VBtn/index.mjs.map +1 -1
- package/lib/components/VBtnGroup/VBtnGroup.mjs +2 -4
- package/lib/components/VBtnGroup/VBtnGroup.mjs.map +1 -1
- package/lib/components/VBtnGroup/index.d.ts +6 -3
- package/lib/components/VBtnGroup/index.mjs.map +1 -1
- package/lib/components/VBtnToggle/VBtnToggle.mjs +2 -7
- package/lib/components/VBtnToggle/VBtnToggle.mjs.map +1 -1
- package/lib/components/VBtnToggle/index.d.ts +20 -25
- package/lib/components/VBtnToggle/index.mjs.map +1 -1
- package/lib/components/VCalendar/VCalendar.mjs +6 -67
- package/lib/components/VCalendar/VCalendar.mjs.map +1 -1
- package/lib/components/VCalendar/VCalendarCategory.mjs +7 -18
- package/lib/components/VCalendar/VCalendarCategory.mjs.map +1 -1
- package/lib/components/VCalendar/VCalendarDaily.mjs +3 -34
- package/lib/components/VCalendar/VCalendarDaily.mjs.map +1 -1
- package/lib/components/VCalendar/VCalendarMonthly.mjs +3 -7
- package/lib/components/VCalendar/VCalendarMonthly.mjs.map +1 -1
- package/lib/components/VCalendar/VCalendarWeekly.mjs +3 -32
- package/lib/components/VCalendar/VCalendarWeekly.mjs.map +1 -1
- package/lib/components/VCalendar/index.mjs.map +1 -1
- package/lib/components/VCalendar/mixins/calendar-base.mjs +1 -19
- package/lib/components/VCalendar/mixins/calendar-base.mjs.map +1 -1
- package/lib/components/VCalendar/mixins/calendar-with-events.mjs +14 -78
- package/lib/components/VCalendar/mixins/calendar-with-events.mjs.map +1 -1
- package/lib/components/VCalendar/mixins/calendar-with-intervals.mjs +0 -30
- package/lib/components/VCalendar/mixins/calendar-with-intervals.mjs.map +1 -1
- package/lib/components/VCalendar/mixins/mouse.mjs +7 -17
- package/lib/components/VCalendar/mixins/mouse.mjs.map +1 -1
- package/lib/components/VCalendar/mixins/times.mjs +1 -9
- package/lib/components/VCalendar/mixins/times.mjs.map +1 -1
- package/lib/components/VCalendar/modes/column.mjs +0 -3
- package/lib/components/VCalendar/modes/column.mjs.map +1 -1
- package/lib/components/VCalendar/modes/common.mjs +0 -14
- package/lib/components/VCalendar/modes/common.mjs.map +1 -1
- package/lib/components/VCalendar/modes/index.mjs +0 -1
- package/lib/components/VCalendar/modes/index.mjs.map +1 -1
- package/lib/components/VCalendar/modes/stack.mjs +3 -45
- package/lib/components/VCalendar/modes/stack.mjs.map +1 -1
- package/lib/components/VCalendar/util/events.mjs +0 -1
- package/lib/components/VCalendar/util/events.mjs.map +1 -1
- package/lib/components/VCalendar/util/parser.mjs +3 -4
- package/lib/components/VCalendar/util/parser.mjs.map +1 -1
- package/lib/components/VCalendar/util/props.mjs +0 -13
- package/lib/components/VCalendar/util/props.mjs.map +1 -1
- package/lib/components/VCalendar/util/timestamp.mjs +2 -64
- package/lib/components/VCalendar/util/timestamp.mjs.map +1 -1
- package/lib/components/VCard/VCard.mjs +3 -8
- package/lib/components/VCard/VCard.mjs.map +1 -1
- package/lib/components/VCard/VCardActions.mjs +0 -4
- package/lib/components/VCard/VCardActions.mjs.map +1 -1
- package/lib/components/VCard/VCardItem.mjs +0 -5
- package/lib/components/VCard/VCardItem.mjs.map +1 -1
- package/lib/components/VCard/VCardSubtitle.mjs.map +1 -1
- package/lib/components/VCard/VCardText.mjs.map +1 -1
- package/lib/components/VCard/VCardTitle.mjs.map +1 -1
- package/lib/components/VCard/index.d.ts +13 -6
- package/lib/components/VCard/index.mjs.map +1 -1
- package/lib/components/VCarousel/VCarousel.mjs +5 -9
- package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
- package/lib/components/VCarousel/VCarouselItem.mjs +0 -3
- package/lib/components/VCarousel/VCarouselItem.mjs.map +1 -1
- package/lib/components/VCarousel/index.d.ts +1 -0
- package/lib/components/VCarousel/index.mjs.map +1 -1
- package/lib/components/VCheckbox/VCheckbox.mjs +6 -6
- package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
- package/lib/components/VCheckbox/VCheckboxBtn.mjs +7 -15
- package/lib/components/VCheckbox/VCheckboxBtn.mjs.map +1 -1
- package/lib/components/VCheckbox/index.d.ts +24 -22
- package/lib/components/VCheckbox/index.mjs.map +1 -1
- package/lib/components/VChip/VChip.css +25 -0
- package/lib/components/VChip/VChip.mjs +2 -10
- package/lib/components/VChip/VChip.mjs.map +1 -1
- package/lib/components/VChip/VChip.sass +1 -0
- package/lib/components/VChip/index.d.ts +5 -3
- package/lib/components/VChip/index.mjs.map +1 -1
- package/lib/components/VChipGroup/VChipGroup.mjs +5 -6
- package/lib/components/VChipGroup/VChipGroup.mjs.map +1 -1
- package/lib/components/VChipGroup/index.mjs.map +1 -1
- package/lib/components/VCode/index.d.ts +1 -0
- package/lib/components/VCode/index.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPicker.mjs +9 -12
- package/lib/components/VColorPicker/VColorPicker.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerCanvas.mjs +5 -20
- package/lib/components/VColorPicker/VColorPickerCanvas.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerEdit.mjs +6 -10
- package/lib/components/VColorPicker/VColorPickerEdit.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerPreview.mjs +6 -8
- package/lib/components/VColorPicker/VColorPickerPreview.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerSwatches.mjs +2 -6
- package/lib/components/VColorPicker/VColorPickerSwatches.mjs.map +1 -1
- package/lib/components/VColorPicker/index.mjs.map +1 -1
- package/lib/components/VColorPicker/util/index.mjs +24 -26
- package/lib/components/VColorPicker/util/index.mjs.map +1 -1
- package/lib/components/VCombobox/VCombobox.css +13 -0
- package/lib/components/VCombobox/VCombobox.mjs +23 -50
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/VCombobox.sass +5 -0
- package/lib/components/VCombobox/_variables.scss +1 -0
- package/lib/components/VCombobox/index.d.ts +275 -384
- package/lib/components/VCombobox/index.mjs.map +1 -1
- package/lib/components/VCounter/VCounter.mjs +2 -5
- package/lib/components/VCounter/VCounter.mjs.map +1 -1
- package/lib/components/VCounter/index.d.ts +1 -0
- package/lib/components/VCounter/index.mjs.map +1 -1
- package/lib/components/VData/VData.mjs +9 -67
- package/lib/components/VData/VData.mjs.map +1 -1
- package/lib/components/VData/index.mjs.map +1 -1
- package/lib/components/VDataIterator/VDataFooter.mjs +6 -25
- package/lib/components/VDataIterator/VDataFooter.mjs.map +1 -1
- package/lib/components/VDataIterator/VDataIterator.mjs +12 -51
- package/lib/components/VDataIterator/VDataIterator.mjs.map +1 -1
- package/lib/components/VDataIterator/index.mjs.map +1 -1
- package/lib/components/VDataTable/MobileRow.mjs +3 -8
- package/lib/components/VDataTable/MobileRow.mjs.map +1 -1
- package/lib/components/VDataTable/Row.mjs +1 -8
- package/lib/components/VDataTable/Row.mjs.map +1 -1
- package/lib/components/VDataTable/RowGroup.mjs +1 -7
- package/lib/components/VDataTable/RowGroup.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTable.mjs +42 -90
- package/lib/components/VDataTable/VDataTable.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTableHeader.mjs +6 -10
- package/lib/components/VDataTable/VDataTableHeader.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaderDesktop.mjs +0 -18
- package/lib/components/VDataTable/VDataTableHeaderDesktop.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaderMobile.mjs +0 -9
- package/lib/components/VDataTable/VDataTableHeaderMobile.mjs.map +1 -1
- package/lib/components/VDataTable/VEditDialog.mjs +3 -17
- package/lib/components/VDataTable/VEditDialog.mjs.map +1 -1
- package/lib/components/VDataTable/VVirtualTable.mjs +3 -28
- package/lib/components/VDataTable/VVirtualTable.mjs.map +1 -1
- package/lib/components/VDataTable/index.mjs +0 -1
- package/lib/components/VDataTable/index.mjs.map +1 -1
- package/lib/components/VDataTable/mixins/header.mjs +0 -5
- package/lib/components/VDataTable/mixins/header.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.mjs +2 -69
- package/lib/components/VDatePicker/VDatePicker.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerDateTable.mjs +1 -29
- package/lib/components/VDatePicker/VDatePickerDateTable.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerHeader.mjs +4 -17
- package/lib/components/VDatePicker/VDatePickerHeader.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonthTable.mjs +1 -12
- package/lib/components/VDatePicker/VDatePickerMonthTable.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerTitle.mjs +4 -15
- package/lib/components/VDatePicker/VDatePickerTitle.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerYears.mjs +4 -18
- package/lib/components/VDatePicker/VDatePickerYears.mjs.map +1 -1
- package/lib/components/VDatePicker/index.mjs.map +1 -1
- package/lib/components/VDatePicker/mixins/date-picker-table.mjs +6 -33
- package/lib/components/VDatePicker/mixins/date-picker-table.mjs.map +1 -1
- package/lib/components/VDatePicker/util/createNativeLocaleFormatter.mjs +0 -5
- package/lib/components/VDatePicker/util/createNativeLocaleFormatter.mjs.map +1 -1
- package/lib/components/VDatePicker/util/eventHelpers.mjs +2 -3
- package/lib/components/VDatePicker/util/eventHelpers.mjs.map +1 -1
- package/lib/components/VDatePicker/util/index.mjs +0 -1
- package/lib/components/VDatePicker/util/index.mjs.map +1 -1
- package/lib/components/VDatePicker/util/isDateAllowed.mjs +1 -1
- package/lib/components/VDatePicker/util/isDateAllowed.mjs.map +1 -1
- package/lib/components/VDatePicker/util/monthChange.mjs +0 -3
- package/lib/components/VDatePicker/util/monthChange.mjs.map +1 -1
- package/lib/components/VDatePicker/util/pad.mjs +1 -6
- package/lib/components/VDatePicker/util/pad.mjs.map +1 -1
- package/lib/components/VDatePicker/util/sanitizeDateString.mjs.map +1 -1
- package/lib/components/VDefaultsProvider/VDefaultsProvider.mjs +2 -4
- package/lib/components/VDefaultsProvider/VDefaultsProvider.mjs.map +1 -1
- package/lib/components/VDefaultsProvider/index.d.ts +1 -0
- package/lib/components/VDefaultsProvider/index.mjs.map +1 -1
- package/lib/components/VDialog/VDialog.mjs +7 -20
- package/lib/components/VDialog/VDialog.mjs.map +1 -1
- package/lib/components/VDialog/index.d.ts +1208 -188
- package/lib/components/VDialog/index.mjs.map +1 -1
- package/lib/components/VDivider/VDivider.mjs +2 -8
- package/lib/components/VDivider/VDivider.mjs.map +1 -1
- package/lib/components/VDivider/index.d.ts +1 -0
- package/lib/components/VDivider/index.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanel.mjs +0 -5
- package/lib/components/VExpansionPanel/VExpansionPanel.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelText.mjs +2 -6
- package/lib/components/VExpansionPanel/VExpansionPanelText.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs +3 -8
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanels.mjs +2 -5
- package/lib/components/VExpansionPanel/VExpansionPanels.mjs.map +1 -1
- package/lib/components/VExpansionPanel/index.mjs.map +1 -1
- package/lib/components/VField/VField.css +1 -1
- package/lib/components/VField/VField.mjs +4 -11
- package/lib/components/VField/VField.mjs.map +1 -1
- package/lib/components/VField/VField.sass +0 -1
- package/lib/components/VField/VFieldLabel.mjs +0 -3
- package/lib/components/VField/VFieldLabel.mjs.map +1 -1
- package/lib/components/VField/index.d.ts +33 -59
- package/lib/components/VField/index.mjs.map +1 -1
- package/lib/components/VFileInput/VFileInput.css +16 -0
- package/lib/components/VFileInput/VFileInput.mjs +6 -20
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/VFileInput.sass +10 -0
- package/lib/components/VFileInput/_variables.scss +2 -0
- package/lib/components/VFileInput/index.d.ts +233 -5
- package/lib/components/VFileInput/index.mjs.map +1 -1
- package/lib/components/VFooter/VFooter.mjs +2 -4
- package/lib/components/VFooter/VFooter.mjs.map +1 -1
- package/lib/components/VFooter/index.d.ts +1 -0
- package/lib/components/VFooter/index.mjs.map +1 -1
- package/lib/components/VForm/VForm.mjs +2 -13
- package/lib/components/VForm/VForm.mjs.map +1 -1
- package/lib/components/VForm/index.d.ts +1 -1
- package/lib/components/VForm/index.mjs.map +1 -1
- package/lib/components/VGrid/VCol.mjs +8 -23
- package/lib/components/VGrid/VCol.mjs.map +1 -1
- package/lib/components/VGrid/VContainer.mjs +2 -4
- package/lib/components/VGrid/VContainer.mjs.map +1 -1
- package/lib/components/VGrid/VRow.mjs +6 -24
- package/lib/components/VGrid/VRow.mjs.map +1 -1
- package/lib/components/VGrid/VSpacer.mjs.map +1 -1
- package/lib/components/VGrid/index.d.ts +2 -0
- package/lib/components/VGrid/index.mjs.map +1 -1
- package/lib/components/VHover/VHover.mjs +0 -4
- package/lib/components/VHover/VHover.mjs.map +1 -1
- package/lib/components/VHover/index.d.ts +1 -0
- package/lib/components/VHover/index.mjs.map +1 -1
- package/lib/components/VIcon/VIcon.mjs +2 -8
- package/lib/components/VIcon/VIcon.mjs.map +1 -1
- package/lib/components/VIcon/index.d.ts +1 -0
- package/lib/components/VIcon/index.mjs.map +1 -1
- package/lib/components/VImg/VImg.mjs +9 -35
- package/lib/components/VImg/VImg.mjs.map +1 -1
- package/lib/components/VImg/index.d.ts +8 -4
- package/lib/components/VImg/index.mjs.map +1 -1
- package/lib/components/VInput/InputIcon.mjs +0 -2
- package/lib/components/VInput/InputIcon.mjs.map +1 -1
- package/lib/components/VInput/VInput.mjs +5 -9
- package/lib/components/VInput/VInput.mjs.map +1 -1
- package/lib/components/VInput/index.d.ts +29 -45
- package/lib/components/VInput/index.mjs.map +1 -1
- package/lib/components/VItemGroup/VItem.mjs +0 -5
- package/lib/components/VItemGroup/VItem.mjs.map +1 -1
- package/lib/components/VItemGroup/VItemGroup.mjs +4 -6
- package/lib/components/VItemGroup/VItemGroup.mjs.map +1 -1
- package/lib/components/VItemGroup/index.d.ts +19 -25
- package/lib/components/VItemGroup/index.mjs.map +1 -1
- package/lib/components/VKbd/index.d.ts +1 -0
- package/lib/components/VKbd/index.mjs.map +1 -1
- package/lib/components/VLabel/VLabel.mjs +2 -5
- package/lib/components/VLabel/VLabel.mjs.map +1 -1
- package/lib/components/VLabel/index.mjs.map +1 -1
- package/lib/components/VLayout/VLayout.mjs +2 -5
- package/lib/components/VLayout/VLayout.mjs.map +1 -1
- package/lib/components/VLayout/VLayoutItem.mjs +2 -6
- package/lib/components/VLayout/VLayoutItem.mjs.map +1 -1
- package/lib/components/VLayout/index.d.ts +5 -2
- package/lib/components/VLayout/index.mjs.map +1 -1
- package/lib/components/VLazy/VLazy.mjs +0 -8
- package/lib/components/VLazy/VLazy.mjs.map +1 -1
- package/lib/components/VLazy/index.d.ts +1 -0
- package/lib/components/VLazy/index.mjs.map +1 -1
- package/lib/components/VList/VList.mjs +2 -11
- package/lib/components/VList/VList.mjs.map +1 -1
- package/lib/components/VList/VListChildren.mjs +12 -21
- package/lib/components/VList/VListChildren.mjs.map +1 -1
- package/lib/components/VList/VListGroup.mjs +1 -12
- package/lib/components/VList/VListGroup.mjs.map +1 -1
- package/lib/components/VList/VListImg.mjs.map +1 -1
- package/lib/components/VList/VListItem.mjs +2 -12
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/VListItemAction.mjs +0 -3
- package/lib/components/VList/VListItemAction.mjs.map +1 -1
- package/lib/components/VList/VListItemMedia.mjs +0 -3
- package/lib/components/VList/VListItemMedia.mjs.map +1 -1
- package/lib/components/VList/VListItemSubtitle.mjs.map +1 -1
- package/lib/components/VList/VListItemTitle.mjs.map +1 -1
- package/lib/components/VList/VListSubheader.mjs +0 -4
- package/lib/components/VList/VListSubheader.mjs.map +1 -1
- package/lib/components/VList/index.d.ts +147 -170
- package/lib/components/VList/index.mjs.map +1 -1
- package/lib/components/VList/list.mjs +5 -2
- package/lib/components/VList/list.mjs.map +1 -1
- package/lib/components/VLocaleProvider/VLocaleProvider.mjs +4 -9
- package/lib/components/VLocaleProvider/VLocaleProvider.mjs.map +1 -1
- package/lib/components/VLocaleProvider/index.d.ts +1 -0
- package/lib/components/VLocaleProvider/index.mjs.map +1 -1
- package/lib/components/VMain/VMain.mjs +2 -5
- package/lib/components/VMain/VMain.mjs.map +1 -1
- package/lib/components/VMain/index.d.ts +1 -0
- package/lib/components/VMain/index.mjs.map +1 -1
- package/lib/components/VMenu/VMenu.mjs +3 -14
- package/lib/components/VMenu/VMenu.mjs.map +1 -1
- package/lib/components/VMenu/index.d.ts +1203 -183
- package/lib/components/VMenu/index.mjs.map +1 -1
- package/lib/components/VMenu/shared.mjs.map +1 -1
- package/lib/components/VMessages/VMessages.mjs +2 -6
- package/lib/components/VMessages/VMessages.mjs.map +1 -1
- package/lib/components/VMessages/index.d.ts +1 -0
- package/lib/components/VMessages/index.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +6 -11
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/index.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/sticky.mjs +0 -4
- package/lib/components/VNavigationDrawer/sticky.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/touch.mjs +2 -15
- package/lib/components/VNavigationDrawer/touch.mjs.map +1 -1
- package/lib/components/VNoSsr/VNoSsr.mjs +0 -4
- package/lib/components/VNoSsr/VNoSsr.mjs.map +1 -1
- package/lib/components/VNoSsr/index.d.ts +1 -0
- package/lib/components/VNoSsr/index.mjs.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.mjs +7 -58
- package/lib/components/VOtpInput/VOtpInput.mjs.map +1 -1
- package/lib/components/VOtpInput/index.mjs.map +1 -1
- package/lib/components/VOverflowBtn/VOverflowBtn.mjs +7 -19
- package/lib/components/VOverflowBtn/VOverflowBtn.mjs.map +1 -1
- package/lib/components/VOverflowBtn/index.mjs.map +1 -1
- package/lib/components/VOverlay/VOverlay.mjs +8 -17
- package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/lib/components/VOverlay/index.d.ts +32 -60
- package/lib/components/VOverlay/index.mjs.map +1 -1
- package/lib/components/VOverlay/locationStrategies.mjs +23 -56
- package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
- package/lib/components/VOverlay/requestNewFrame.mjs +1 -2
- package/lib/components/VOverlay/requestNewFrame.mjs.map +1 -1
- package/lib/components/VOverlay/scrollStrategies.mjs +2 -18
- package/lib/components/VOverlay/scrollStrategies.mjs.map +1 -1
- package/lib/components/VOverlay/useActivator.mjs +6 -32
- package/lib/components/VOverlay/useActivator.mjs.map +1 -1
- package/lib/components/VOverlay/util/point.mjs +3 -4
- package/lib/components/VOverlay/util/point.mjs.map +1 -1
- package/lib/components/VPagination/VPagination.mjs +11 -23
- package/lib/components/VPagination/VPagination.mjs.map +1 -1
- package/lib/components/VPagination/index.d.ts +5 -3
- package/lib/components/VPagination/index.mjs.map +1 -1
- package/lib/components/VParallax/VParallax.mjs +6 -12
- package/lib/components/VParallax/VParallax.mjs.map +1 -1
- package/lib/components/VParallax/index.mjs.map +1 -1
- package/lib/components/VPicker/VPicker.mjs +3 -12
- package/lib/components/VPicker/VPicker.mjs.map +1 -1
- package/lib/components/VPicker/index.mjs.map +1 -1
- package/lib/components/VProgressCircular/VProgressCircular.mjs +2 -5
- package/lib/components/VProgressCircular/VProgressCircular.mjs.map +1 -1
- package/lib/components/VProgressCircular/index.d.ts +1 -0
- package/lib/components/VProgressCircular/index.mjs.map +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.mjs +5 -8
- package/lib/components/VProgressLinear/VProgressLinear.mjs.map +1 -1
- package/lib/components/VProgressLinear/index.d.ts +1 -0
- package/lib/components/VProgressLinear/index.mjs.map +1 -1
- package/lib/components/VRadio/VRadio.mjs +2 -4
- package/lib/components/VRadio/VRadio.mjs.map +1 -1
- package/lib/components/VRadio/index.d.ts +13 -11
- package/lib/components/VRadio/index.mjs.map +1 -1
- package/lib/components/VRadioGroup/VRadioGroup.mjs +15 -20
- package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
- package/lib/components/VRadioGroup/index.d.ts +26 -38
- package/lib/components/VRadioGroup/index.mjs.map +1 -1
- package/lib/components/VRangeSlider/VRangeSlider.mjs +13 -26
- package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
- package/lib/components/VRangeSlider/index.d.ts +5 -3
- package/lib/components/VRangeSlider/index.mjs.map +1 -1
- package/lib/components/VRating/VRating.mjs +4 -22
- package/lib/components/VRating/VRating.mjs.map +1 -1
- package/lib/components/VRating/index.d.ts +32 -40
- package/lib/components/VRating/index.mjs.map +1 -1
- package/lib/components/VResponsive/VResponsive.mjs +2 -5
- package/lib/components/VResponsive/VResponsive.mjs.map +1 -1
- package/lib/components/VResponsive/index.d.ts +1 -0
- package/lib/components/VResponsive/index.mjs.map +1 -1
- package/lib/components/VSelect/VSelect.css +13 -0
- package/lib/components/VSelect/VSelect.mjs +9 -22
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/VSelect.sass +6 -0
- package/lib/components/VSelect/_variables.scss +1 -0
- package/lib/components/VSelect/index.d.ts +4264 -776
- package/lib/components/VSelect/index.mjs.map +1 -1
- package/lib/components/VSelectionControl/VSelectionControl.mjs +14 -58
- package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
- package/lib/components/VSelectionControl/index.d.ts +62 -78
- package/lib/components/VSelectionControl/index.mjs.map +1 -1
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.css +1 -0
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs +56 -28
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs.map +1 -1
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.sass +1 -0
- package/lib/components/VSelectionControlGroup/index.d.ts +53 -4
- package/lib/components/VSelectionControlGroup/index.mjs.map +1 -1
- package/lib/components/VSheet/VSheet.mjs +2 -4
- package/lib/components/VSheet/VSheet.mjs.map +1 -1
- package/lib/components/VSheet/index.d.ts +1 -0
- package/lib/components/VSheet/index.mjs.map +1 -1
- package/lib/components/VSkeletonLoader/VSkeletonLoader.mjs +19 -32
- package/lib/components/VSkeletonLoader/VSkeletonLoader.mjs.map +1 -1
- package/lib/components/VSkeletonLoader/index.mjs.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroup.mjs +16 -47
- package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroupItem.mjs +5 -9
- package/lib/components/VSlideGroup/VSlideGroupItem.mjs.map +1 -1
- package/lib/components/VSlideGroup/helpers.mjs +0 -2
- package/lib/components/VSlideGroup/helpers.mjs.map +1 -1
- package/lib/components/VSlideGroup/index.d.ts +342 -59
- package/lib/components/VSlideGroup/index.mjs.map +1 -1
- package/lib/components/VSlider/VSlider.mjs +6 -9
- package/lib/components/VSlider/VSlider.mjs.map +1 -1
- package/lib/components/VSlider/VSliderThumb.mjs +4 -15
- package/lib/components/VSlider/VSliderThumb.mjs.map +1 -1
- package/lib/components/VSlider/VSliderTrack.mjs +6 -8
- package/lib/components/VSlider/VSliderTrack.mjs.map +1 -1
- package/lib/components/VSlider/index.d.ts +5 -3
- package/lib/components/VSlider/index.mjs.map +1 -1
- package/lib/components/VSlider/slider.mjs +6 -27
- package/lib/components/VSlider/slider.mjs.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.mjs +3 -10
- package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
- package/lib/components/VSnackbar/index.d.ts +1215 -191
- package/lib/components/VSnackbar/index.mjs.map +1 -1
- package/lib/components/VSparkline/VSparkline.mjs +5 -40
- package/lib/components/VSparkline/VSparkline.mjs.map +1 -1
- package/lib/components/VSparkline/helpers/core.mjs +1 -1
- package/lib/components/VSparkline/helpers/core.mjs.map +1 -1
- package/lib/components/VSparkline/helpers/math.mjs +2 -3
- package/lib/components/VSparkline/helpers/math.mjs.map +1 -1
- package/lib/components/VSparkline/helpers/path.mjs +0 -4
- package/lib/components/VSparkline/helpers/path.mjs.map +1 -1
- package/lib/components/VSparkline/index.mjs.map +1 -1
- package/lib/components/VSpeedDial/VSpeedDial.mjs +3 -12
- package/lib/components/VSpeedDial/VSpeedDial.mjs.map +1 -1
- package/lib/components/VSpeedDial/index.mjs.map +1 -1
- package/lib/components/VStepper/VStepper.mjs +5 -24
- package/lib/components/VStepper/VStepper.mjs.map +1 -1
- package/lib/components/VStepper/VStepperContent.mjs +4 -25
- package/lib/components/VStepper/VStepperContent.mjs.map +1 -1
- package/lib/components/VStepper/VStepperStep.mjs +0 -24
- package/lib/components/VStepper/VStepperStep.mjs.map +1 -1
- package/lib/components/VStepper/index.mjs.map +1 -1
- package/lib/components/VSwitch/VSwitch.mjs +14 -15
- package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
- package/lib/components/VSwitch/index.d.ts +15 -11
- package/lib/components/VSwitch/index.mjs.map +1 -1
- package/lib/components/VSystemBar/VSystemBar.mjs +2 -4
- package/lib/components/VSystemBar/VSystemBar.mjs.map +1 -1
- package/lib/components/VSystemBar/index.d.ts +1 -0
- package/lib/components/VSystemBar/index.mjs.map +1 -1
- package/lib/components/VTable/VTable.css +3 -3
- package/lib/components/VTable/VTable.mjs +5 -6
- package/lib/components/VTable/VTable.mjs.map +1 -1
- package/lib/components/VTable/VTable.sass +9 -3
- package/lib/components/VTable/index.d.ts +8 -3
- package/lib/components/VTable/index.mjs.map +1 -1
- package/lib/components/VTabs/VTab.mjs +2 -10
- package/lib/components/VTabs/VTab.mjs.map +1 -1
- package/lib/components/VTabs/VTabs.css +5 -5
- package/lib/components/VTabs/VTabs.mjs +12 -17
- package/lib/components/VTabs/VTabs.mjs.map +1 -1
- package/lib/components/VTabs/VTabs.sass +4 -4
- package/lib/components/VTabs/_variables.scss +1 -1
- package/lib/components/VTabs/index.d.ts +23 -15
- package/lib/components/VTabs/index.mjs.map +1 -1
- package/lib/components/VTabs/shared.mjs.map +1 -1
- package/lib/components/VTextField/VTextField.mjs +13 -24
- package/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/lib/components/VTextField/index.d.ts +1375 -191
- package/lib/components/VTextField/index.mjs.map +1 -1
- package/lib/components/VTextarea/VTextarea.mjs +6 -24
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VTextarea/index.d.ts +233 -5
- package/lib/components/VTextarea/index.mjs.map +1 -1
- package/lib/components/VThemeProvider/VThemeProvider.mjs +2 -5
- package/lib/components/VThemeProvider/VThemeProvider.mjs.map +1 -1
- package/lib/components/VThemeProvider/index.d.ts +1 -0
- package/lib/components/VThemeProvider/index.mjs.map +1 -1
- package/lib/components/VTimePicker/SelectingTimes.mjs +0 -3
- package/lib/components/VTimePicker/SelectingTimes.mjs.map +1 -1
- package/lib/components/VTimePicker/VTimePicker.mjs +3 -53
- package/lib/components/VTimePicker/VTimePicker.mjs.map +1 -1
- package/lib/components/VTimePicker/VTimePickerClock.mjs +6 -42
- package/lib/components/VTimePicker/VTimePickerClock.mjs.map +1 -1
- package/lib/components/VTimePicker/VTimePickerTitle.mjs +4 -13
- package/lib/components/VTimePicker/VTimePickerTitle.mjs.map +1 -1
- package/lib/components/VTimePicker/index.mjs.map +1 -1
- package/lib/components/VTimeline/VTimeline.mjs +2 -9
- package/lib/components/VTimeline/VTimeline.mjs.map +1 -1
- package/lib/components/VTimeline/VTimelineDivider.mjs +0 -5
- package/lib/components/VTimeline/VTimelineDivider.mjs.map +1 -1
- package/lib/components/VTimeline/VTimelineItem.mjs +0 -6
- package/lib/components/VTimeline/VTimelineItem.mjs.map +1 -1
- package/lib/components/VTimeline/index.d.ts +7 -3
- package/lib/components/VTimeline/index.mjs.map +1 -1
- package/lib/components/VToolbar/VToolbar.mjs +2 -8
- package/lib/components/VToolbar/VToolbar.mjs.map +1 -1
- package/lib/components/VToolbar/VToolbarItems.mjs +0 -4
- package/lib/components/VToolbar/VToolbarItems.mjs.map +1 -1
- package/lib/components/VToolbar/VToolbarTitle.mjs +0 -5
- package/lib/components/VToolbar/VToolbarTitle.mjs.map +1 -1
- package/lib/components/VToolbar/index.d.ts +34 -71
- package/lib/components/VToolbar/index.mjs.map +1 -1
- package/lib/components/VTooltip/VTooltip.mjs +2 -8
- package/lib/components/VTooltip/VTooltip.mjs.map +1 -1
- package/lib/components/VTooltip/index.d.ts +1196 -176
- package/lib/components/VTooltip/index.mjs.map +1 -1
- package/lib/components/VTreeview/VTreeview.mjs +17 -72
- package/lib/components/VTreeview/VTreeview.mjs.map +1 -1
- package/lib/components/VTreeview/VTreeviewNode.mjs +2 -32
- package/lib/components/VTreeview/VTreeviewNode.mjs.map +1 -1
- package/lib/components/VTreeview/index.mjs.map +1 -1
- package/lib/components/VTreeview/util/filterTreeItems.mjs +0 -6
- package/lib/components/VTreeview/util/filterTreeItems.mjs.map +1 -1
- package/lib/components/VValidation/VValidation.mjs +2 -5
- package/lib/components/VValidation/VValidation.mjs.map +1 -1
- package/lib/components/VValidation/index.d.ts +1 -0
- package/lib/components/VValidation/index.mjs.map +1 -1
- package/lib/components/VVirtualScroll/VVirtualScroll.mjs +3 -18
- package/lib/components/VVirtualScroll/VVirtualScroll.mjs.map +1 -1
- package/lib/components/VVirtualScroll/index.mjs.map +1 -1
- package/lib/components/VWindow/VWindow.mjs +5 -15
- package/lib/components/VWindow/VWindow.mjs.map +1 -1
- package/lib/components/VWindow/VWindowItem.mjs +8 -21
- package/lib/components/VWindow/VWindowItem.mjs.map +1 -1
- package/lib/components/VWindow/index.d.ts +37 -87
- package/lib/components/VWindow/index.mjs.map +1 -1
- package/lib/components/index.d.ts +16084 -6799
- package/lib/components/index.mjs +0 -11
- package/lib/components/index.mjs.map +1 -1
- package/lib/components/transitions/createTransition.mjs +0 -10
- package/lib/components/transitions/createTransition.mjs.map +1 -1
- package/lib/components/transitions/dialog-transition.mjs +3 -18
- package/lib/components/transitions/dialog-transition.mjs.map +1 -1
- package/lib/components/transitions/expand-transition.mjs +2 -11
- package/lib/components/transitions/expand-transition.mjs.map +1 -1
- package/lib/components/transitions/index.d.ts +16 -0
- package/lib/components/transitions/index.mjs +5 -4
- package/lib/components/transitions/index.mjs.map +1 -1
- package/lib/composables/border.mjs +0 -3
- package/lib/composables/border.mjs.map +1 -1
- package/lib/composables/color.mjs +0 -4
- package/lib/composables/color.mjs.map +1 -1
- package/lib/composables/defaults.mjs +0 -5
- package/lib/composables/defaults.mjs.map +1 -1
- package/lib/composables/delay.mjs +0 -3
- package/lib/composables/delay.mjs.map +1 -1
- package/lib/composables/density.mjs +4 -1
- package/lib/composables/density.mjs.map +1 -1
- package/lib/composables/dimensions.mjs +0 -1
- package/lib/composables/dimensions.mjs.map +1 -1
- package/lib/composables/display.mjs +7 -20
- package/lib/composables/display.mjs.map +1 -1
- package/lib/composables/elevation.mjs +2 -4
- package/lib/composables/elevation.mjs.map +1 -1
- package/lib/composables/filter.mjs +7 -14
- package/lib/composables/filter.mjs.map +1 -1
- package/lib/composables/focus.mjs +0 -5
- package/lib/composables/focus.mjs.map +1 -1
- package/lib/composables/form.mjs +1 -14
- package/lib/composables/form.mjs.map +1 -1
- package/lib/composables/forwardRefs.mjs +9 -16
- package/lib/composables/forwardRefs.mjs.map +1 -1
- package/lib/composables/group.mjs +10 -33
- package/lib/composables/group.mjs.map +1 -1
- package/lib/composables/hydration.mjs +0 -1
- package/lib/composables/hydration.mjs.map +1 -1
- package/lib/composables/icons.mjs +4 -17
- package/lib/composables/icons.mjs.map +1 -1
- package/lib/composables/index.mjs +1 -2
- package/lib/composables/index.mjs.map +1 -1
- package/lib/composables/intersectionObserver.mjs +0 -3
- package/lib/composables/intersectionObserver.mjs.map +1 -1
- package/lib/composables/items.mjs +3 -15
- package/lib/composables/items.mjs.map +1 -1
- package/lib/composables/layout.mjs +29 -31
- package/lib/composables/layout.mjs.map +1 -1
- package/lib/composables/lazy.mjs +2 -3
- package/lib/composables/lazy.mjs.map +1 -1
- package/lib/composables/loader.mjs +0 -3
- package/lib/composables/loader.mjs.map +1 -1
- package/lib/composables/locale.mjs +46 -118
- package/lib/composables/locale.mjs.map +1 -1
- package/lib/composables/location.mjs +1 -8
- package/lib/composables/location.mjs.map +1 -1
- package/lib/composables/mutationObserver.mjs +3 -1
- package/lib/composables/mutationObserver.mjs.map +1 -1
- package/lib/composables/nested/nested.mjs +4 -20
- package/lib/composables/nested/nested.mjs.map +1 -1
- package/lib/composables/nested/openStrategies.mjs +0 -9
- package/lib/composables/nested/openStrategies.mjs.map +1 -1
- package/lib/composables/nested/selectStrategies.mjs +6 -21
- package/lib/composables/nested/selectStrategies.mjs.map +1 -1
- package/lib/composables/position.mjs +1 -4
- package/lib/composables/position.mjs.map +1 -1
- package/lib/composables/proxiedModel.mjs +3 -9
- package/lib/composables/proxiedModel.mjs.map +1 -1
- package/lib/composables/refs.mjs +0 -2
- package/lib/composables/refs.mjs.map +1 -1
- package/lib/composables/resizeObserver.mjs +0 -3
- package/lib/composables/resizeObserver.mjs.map +1 -1
- package/lib/composables/rounded.mjs +0 -3
- package/lib/composables/rounded.mjs.map +1 -1
- package/lib/composables/router.mjs +3 -11
- package/lib/composables/router.mjs.map +1 -1
- package/lib/composables/scopeId.mjs.map +1 -1
- package/lib/composables/scroll.mjs +3 -9
- package/lib/composables/scroll.mjs.map +1 -1
- package/lib/composables/selectLink.mjs +3 -2
- package/lib/composables/selectLink.mjs.map +1 -1
- package/lib/composables/size.mjs +0 -3
- package/lib/composables/size.mjs.map +1 -1
- package/lib/composables/ssrBoot.mjs +2 -1
- package/lib/composables/ssrBoot.mjs.map +1 -1
- package/lib/composables/stack.mjs +0 -6
- package/lib/composables/stack.mjs.map +1 -1
- package/lib/composables/tag.mjs +0 -1
- package/lib/composables/tag.mjs.map +1 -1
- package/lib/composables/teleport.mjs +0 -4
- package/lib/composables/teleport.mjs.map +1 -1
- package/lib/composables/theme.mjs +18 -38
- package/lib/composables/theme.mjs.map +1 -1
- package/lib/composables/toggleScope.mjs +0 -1
- package/lib/composables/toggleScope.mjs.map +1 -1
- package/lib/composables/touch.mjs +5 -28
- package/lib/composables/touch.mjs.map +1 -1
- package/lib/composables/transition.mjs +0 -2
- package/lib/composables/transition.mjs.map +1 -1
- package/lib/composables/validation.mjs +3 -13
- package/lib/composables/validation.mjs.map +1 -1
- package/lib/composables/variant.mjs +0 -2
- package/lib/composables/variant.mjs.map +1 -1
- package/lib/directives/click-outside/index.mjs +10 -22
- package/lib/directives/click-outside/index.mjs.map +1 -1
- package/lib/directives/color/index.mjs +0 -11
- package/lib/directives/color/index.mjs.map +1 -1
- package/lib/directives/index.d.ts +104 -13
- package/lib/directives/index.mjs +0 -1
- package/lib/directives/index.mjs.map +1 -1
- package/lib/directives/intersect/index.mjs +3 -10
- package/lib/directives/intersect/index.mjs.map +1 -1
- package/lib/directives/mutate/index.mjs +1 -5
- package/lib/directives/mutate/index.mjs.map +1 -1
- package/lib/directives/resize/index.mjs +0 -5
- package/lib/directives/resize/index.mjs.map +1 -1
- package/lib/directives/ripple/index.mjs +11 -63
- package/lib/directives/ripple/index.mjs.map +1 -1
- package/lib/directives/scroll/index.mjs +0 -4
- package/lib/directives/scroll/index.mjs.map +1 -1
- package/lib/directives/touch/index.mjs +0 -15
- package/lib/directives/touch/index.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/entry-bundler.mjs.map +1 -1
- package/lib/framework.mjs +24 -22
- package/lib/framework.mjs.map +1 -1
- package/lib/iconsets/fa-svg.mjs +0 -1
- package/lib/iconsets/fa-svg.mjs.map +1 -1
- package/lib/iconsets/fa.mjs +0 -1
- package/lib/iconsets/fa.mjs.map +1 -1
- package/lib/iconsets/fa4.mjs +4 -3
- package/lib/iconsets/fa4.mjs.map +1 -1
- package/lib/iconsets/md.mjs +4 -3
- package/lib/iconsets/md.mjs.map +1 -1
- package/lib/iconsets/mdi-svg.mjs +0 -1
- package/lib/iconsets/mdi-svg.mjs.map +1 -1
- package/lib/iconsets/mdi.mjs +4 -3
- package/lib/iconsets/mdi.mjs.map +1 -1
- package/lib/index.d.ts +92 -106
- package/lib/locale/adapters/vue-i18n.d.ts +10 -16
- package/lib/locale/adapters/vue-i18n.mjs +59 -52
- package/lib/locale/adapters/vue-i18n.mjs.map +1 -1
- package/lib/locale/adapters/vuetify.d.ts +24 -0
- package/lib/locale/adapters/vuetify.mjs +97 -0
- package/lib/locale/adapters/vuetify.mjs.map +1 -0
- package/lib/locale/af.mjs.map +1 -1
- package/lib/locale/ar.mjs.map +1 -1
- package/lib/locale/az.mjs.map +1 -1
- package/lib/locale/bg.mjs.map +1 -1
- package/lib/locale/ca.mjs.map +1 -1
- package/lib/locale/ckb.mjs.map +1 -1
- package/lib/locale/cs.mjs.map +1 -1
- package/lib/locale/da.mjs.map +1 -1
- package/lib/locale/de.mjs.map +1 -1
- package/lib/locale/el.mjs.map +1 -1
- package/lib/locale/en.mjs.map +1 -1
- package/lib/locale/es.mjs.map +1 -1
- package/lib/locale/et.mjs.map +1 -1
- package/lib/locale/fa.mjs.map +1 -1
- package/lib/locale/fi.mjs.map +1 -1
- package/lib/locale/fr.mjs.map +1 -1
- package/lib/locale/he.mjs.map +1 -1
- package/lib/locale/hr.mjs.map +1 -1
- package/lib/locale/hu.mjs.map +1 -1
- package/lib/locale/id.mjs.map +1 -1
- package/lib/locale/index.d.ts +2 -2
- package/lib/locale/index.mjs +1 -1
- package/lib/locale/index.mjs.map +1 -1
- package/lib/locale/it.mjs.map +1 -1
- package/lib/locale/ja.mjs.map +1 -1
- package/lib/locale/ko.mjs.map +1 -1
- package/lib/locale/lt.mjs.map +1 -1
- package/lib/locale/lv.mjs.map +1 -1
- package/lib/locale/nl.mjs.map +1 -1
- package/lib/locale/no.mjs.map +1 -1
- package/lib/locale/pl.mjs +7 -7
- package/lib/locale/pl.mjs.map +1 -1
- package/lib/locale/pt.mjs.map +1 -1
- package/lib/locale/ro.mjs.map +1 -1
- package/lib/locale/ru.mjs.map +1 -1
- package/lib/locale/sk.mjs.map +1 -1
- package/lib/locale/sl.mjs.map +1 -1
- package/lib/locale/sr-Cyrl.mjs.map +1 -1
- package/lib/locale/sr-Latn.mjs.map +1 -1
- package/lib/locale/sv.mjs.map +1 -1
- package/lib/locale/th.mjs.map +1 -1
- package/lib/locale/tr.mjs.map +1 -1
- package/lib/locale/uk.mjs.map +1 -1
- package/lib/locale/vi.mjs.map +1 -1
- package/lib/locale/zh-Hans.mjs.map +1 -1
- package/lib/locale/zh-Hant.mjs.map +1 -1
- package/lib/services/goto/easing-patterns.mjs +24 -24
- package/lib/services/goto/easing-patterns.mjs.map +1 -1
- package/lib/services/goto/index.mjs +11 -15
- package/lib/services/goto/index.mjs.map +1 -1
- package/lib/services/goto/util.mjs +1 -8
- package/lib/services/goto/util.mjs.map +1 -1
- package/lib/styles/main.css +4 -0
- package/lib/styles/settings/_utilities.scss +7 -0
- package/lib/util/anchor.mjs +0 -3
- package/lib/util/anchor.mjs.map +1 -1
- package/lib/util/animation.mjs +0 -6
- package/lib/util/animation.mjs.map +1 -1
- package/lib/util/box.mjs +0 -5
- package/lib/util/box.mjs.map +1 -1
- package/lib/util/color/APCA.mjs +23 -21
- package/lib/util/color/APCA.mjs.map +1 -1
- package/lib/util/color/transformCIELAB.mjs +0 -2
- package/lib/util/color/transformCIELAB.mjs.map +1 -1
- package/lib/util/color/transformSRGB.mjs +14 -12
- package/lib/util/color/transformSRGB.mjs.map +1 -1
- package/lib/util/colorUtils.mjs +8 -25
- package/lib/util/colorUtils.mjs.map +1 -1
- package/lib/util/colors.mjs.map +1 -1
- package/lib/util/console.mjs +5 -14
- package/lib/util/console.mjs.map +1 -1
- package/lib/util/createSimpleFunctional.mjs +0 -3
- package/lib/util/createSimpleFunctional.mjs.map +1 -1
- package/lib/util/dateTimeUtils.mjs +0 -10
- package/lib/util/dateTimeUtils.mjs.map +1 -1
- package/lib/util/defineComponent.mjs +6 -22
- package/lib/util/defineComponent.mjs.map +1 -1
- package/lib/util/dom.mjs +4 -4
- package/lib/util/dom.mjs.map +1 -1
- package/lib/util/easing.mjs +0 -1
- package/lib/util/easing.mjs.map +1 -1
- package/lib/util/getCurrentInstance.mjs +1 -7
- package/lib/util/getCurrentInstance.mjs.map +1 -1
- package/lib/util/getScrollParent.mjs +0 -3
- package/lib/util/getScrollParent.mjs.map +1 -1
- package/lib/util/globals.mjs.map +1 -1
- package/lib/util/helpers.mjs +18 -75
- package/lib/util/helpers.mjs.map +1 -1
- package/lib/util/injectSelf.mjs +0 -1
- package/lib/util/injectSelf.mjs.map +1 -1
- package/lib/util/isFixedPosition.mjs +0 -2
- package/lib/util/isFixedPosition.mjs.map +1 -1
- package/lib/util/propsFactory.mjs +11 -5
- package/lib/util/propsFactory.mjs.map +1 -1
- package/lib/util/useRender.mjs +0 -1
- package/lib/util/useRender.mjs.map +1 -1
- package/package.json +6 -10
- package/dist/json/attributes.json +0 -5602
- package/dist/json/tags.json +0 -1945
- package/dist/json/web-types.json +0 -19006
- package/lib/composables/rtl.mjs +0 -42
- package/lib/composables/rtl.mjs.map +0 -1
- package/lib/locale/adapters/vue-intl.d.ts +0 -42
- package/lib/locale/adapters/vue-intl.mjs +0 -65
- package/lib/locale/adapters/vue-intl.mjs.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* eslint-disable sonarjs/no-identical-functions */
|
|
2
|
+
|
|
2
3
|
export const independentSelectStrategy = mandatory => {
|
|
3
4
|
const strategy = {
|
|
4
5
|
select: _ref => {
|
|
@@ -7,7 +8,6 @@ export const independentSelectStrategy = mandatory => {
|
|
|
7
8
|
value,
|
|
8
9
|
selected
|
|
9
10
|
} = _ref;
|
|
10
|
-
|
|
11
11
|
// When mandatory and we're trying to deselect when id
|
|
12
12
|
// is the only currently selected item then do nothing
|
|
13
13
|
if (mandatory && !value) {
|
|
@@ -17,13 +17,11 @@ export const independentSelectStrategy = mandatory => {
|
|
|
17
17
|
}, []);
|
|
18
18
|
if (on.length === 1 && on[0] === id) return selected;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
20
|
selected.set(id, value ? 'on' : 'off');
|
|
22
21
|
return selected;
|
|
23
22
|
},
|
|
24
23
|
in: (v, children, parents) => {
|
|
25
24
|
let map = new Map();
|
|
26
|
-
|
|
27
25
|
for (const id of v || []) {
|
|
28
26
|
map = strategy.select({
|
|
29
27
|
id,
|
|
@@ -33,16 +31,13 @@ export const independentSelectStrategy = mandatory => {
|
|
|
33
31
|
parents
|
|
34
32
|
});
|
|
35
33
|
}
|
|
36
|
-
|
|
37
34
|
return map;
|
|
38
35
|
},
|
|
39
36
|
out: v => {
|
|
40
37
|
const arr = [];
|
|
41
|
-
|
|
42
38
|
for (const [key, value] of v.entries()) {
|
|
43
39
|
if (value === 'on') arr.push(key);
|
|
44
40
|
}
|
|
45
|
-
|
|
46
41
|
return arr;
|
|
47
42
|
}
|
|
48
43
|
};
|
|
@@ -58,18 +53,17 @@ export const independentSingleSelectStrategy = mandatory => {
|
|
|
58
53
|
...rest
|
|
59
54
|
} = _ref3;
|
|
60
55
|
const singleSelected = selected.has(id) ? new Map([[id, selected.get(id)]]) : new Map();
|
|
61
|
-
return parentStrategy.select({
|
|
56
|
+
return parentStrategy.select({
|
|
57
|
+
...rest,
|
|
62
58
|
id,
|
|
63
59
|
selected: singleSelected
|
|
64
60
|
});
|
|
65
61
|
},
|
|
66
62
|
in: (v, children, parents) => {
|
|
67
63
|
let map = new Map();
|
|
68
|
-
|
|
69
64
|
if (v != null && v.length) {
|
|
70
65
|
map = parentStrategy.in(v.slice(0, 1), children, parents);
|
|
71
66
|
}
|
|
72
|
-
|
|
73
67
|
return map;
|
|
74
68
|
},
|
|
75
69
|
out: (v, children, parents) => {
|
|
@@ -136,28 +130,24 @@ export const classicSelectStrategy = mandatory => {
|
|
|
136
130
|
} = _ref6;
|
|
137
131
|
const original = new Map(selected);
|
|
138
132
|
const items = [id];
|
|
139
|
-
|
|
140
133
|
while (items.length) {
|
|
141
134
|
const item = items.shift();
|
|
142
135
|
selected.set(item, value ? 'on' : 'off');
|
|
143
|
-
|
|
144
136
|
if (children.has(item)) {
|
|
145
137
|
items.push(...children.get(item));
|
|
146
138
|
}
|
|
147
139
|
}
|
|
148
|
-
|
|
149
140
|
let parent = parents.get(id);
|
|
150
|
-
|
|
151
141
|
while (parent) {
|
|
152
142
|
const childrenIds = children.get(parent);
|
|
153
143
|
const everySelected = childrenIds.every(cid => selected.get(cid) === 'on');
|
|
154
144
|
const noneSelected = childrenIds.every(cid => !selected.has(cid) || selected.get(cid) === 'off');
|
|
155
145
|
selected.set(parent, everySelected ? 'on' : noneSelected ? 'off' : 'indeterminate');
|
|
156
146
|
parent = parents.get(parent);
|
|
157
|
-
}
|
|
158
|
-
// items then we can't do it, so return original state
|
|
159
|
-
|
|
147
|
+
}
|
|
160
148
|
|
|
149
|
+
// If mandatory and planned deselect results in no selected
|
|
150
|
+
// items then we can't do it, so return original state
|
|
161
151
|
if (mandatory && !value) {
|
|
162
152
|
const on = Array.from(selected.entries()).reduce((arr, _ref7) => {
|
|
163
153
|
let [key, value] = _ref7;
|
|
@@ -165,12 +155,10 @@ export const classicSelectStrategy = mandatory => {
|
|
|
165
155
|
}, []);
|
|
166
156
|
if (on.length === 0) return original;
|
|
167
157
|
}
|
|
168
|
-
|
|
169
158
|
return selected;
|
|
170
159
|
},
|
|
171
160
|
in: (v, children, parents) => {
|
|
172
161
|
let map = new Map();
|
|
173
|
-
|
|
174
162
|
for (const id of v || []) {
|
|
175
163
|
map = strategy.select({
|
|
176
164
|
id,
|
|
@@ -180,16 +168,13 @@ export const classicSelectStrategy = mandatory => {
|
|
|
180
168
|
parents
|
|
181
169
|
});
|
|
182
170
|
}
|
|
183
|
-
|
|
184
171
|
return map;
|
|
185
172
|
},
|
|
186
173
|
out: (v, children) => {
|
|
187
174
|
const arr = [];
|
|
188
|
-
|
|
189
175
|
for (const [key, value] of v.entries()) {
|
|
190
176
|
if (value === 'on' && !children.has(key)) arr.push(key);
|
|
191
177
|
}
|
|
192
|
-
|
|
193
178
|
return arr;
|
|
194
179
|
}
|
|
195
180
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectStrategies.mjs","names":["independentSelectStrategy","mandatory","strategy","select","id","value","selected","on","Array","from","entries","reduce","arr","key","length","set","in","v","children","parents","map","Map","out","push","independentSingleSelectStrategy","parentStrategy","rest","singleSelected","has","get","slice","leafSelectStrategy","leafSingleSelectStrategy","classicSelectStrategy","original","items","item","shift","parent","childrenIds","everySelected","every","cid","noneSelected"],"sources":["../../../src/composables/nested/selectStrategies.ts"],"sourcesContent":["/* eslint-disable sonarjs/no-identical-functions */\nexport type SelectStrategyFn = (data: {\n id: string\n value: boolean\n selected: Map<string, 'on' | 'off' | 'indeterminate'>\n children: Map<string, string[]>\n parents: Map<string, string>\n event?: Event\n}) => Map<string, 'on' | 'off' | 'indeterminate'>\n\nexport type SelectStrategyTransformInFn = (\n v: string[] | undefined,\n children: Map<string, string[]>,\n parents: Map<string, string>,\n) => Map<string, 'on' | 'off' | 'indeterminate'>\n\nexport type SelectStrategyTransformOutFn = (\n v: Map<string, 'on' | 'off' | 'indeterminate'>,\n children: Map<string, string[]>,\n parents: Map<string, string>,\n) => any[]\n\nexport type SelectStrategy = {\n select: SelectStrategyFn\n in: SelectStrategyTransformInFn\n out: SelectStrategyTransformOutFn\n}\n\nexport const independentSelectStrategy = (mandatory?: boolean): SelectStrategy => {\n const strategy: SelectStrategy = {\n select: ({ id, value, selected }) => {\n // When mandatory and we're trying to deselect when id\n // is the only currently selected item then do nothing\n if (mandatory && !value) {\n const on = Array.from(selected.entries()).reduce((arr, [key, value]) => value === 'on' ? [...arr, key] : arr, [] as string[])\n if (on.length === 1 && on[0] === id) return selected\n }\n\n selected.set(id, value ? 'on' : 'off')\n\n return selected\n },\n in: (v, children, parents) => {\n let map = new Map()\n\n for (const id of (v || [])) {\n map = strategy.select({\n id,\n value: true,\n selected: new Map(map),\n children,\n parents,\n })\n }\n\n return map\n },\n out: v => {\n const arr = []\n\n for (const [key, value] of v.entries()) {\n if (value === 'on') arr.push(key)\n }\n\n return arr\n },\n }\n\n return strategy\n}\n\nexport const independentSingleSelectStrategy = (mandatory?: boolean): SelectStrategy => {\n const parentStrategy = independentSelectStrategy(mandatory)\n\n const strategy: SelectStrategy = {\n select: ({ selected, id, ...rest }) => {\n const singleSelected = selected.has(id) ? new Map([[id, selected.get(id)!]]) : new Map()\n return parentStrategy.select({ ...rest, id, selected: singleSelected })\n },\n in: (v, children, parents) => {\n let map = new Map()\n\n if (v?.length) {\n map = parentStrategy.in(v.slice(0, 1), children, parents)\n }\n\n return map\n },\n out: (v, children, parents) => {\n return parentStrategy.out(v, children, parents)\n },\n }\n\n return strategy\n}\n\nexport const leafSelectStrategy = (mandatory?: boolean): SelectStrategy => {\n const parentStrategy = independentSelectStrategy(mandatory)\n\n const strategy: SelectStrategy = {\n select: ({ id, selected, children, ...rest }) => {\n if (children.has(id)) return selected\n\n return parentStrategy.select({ id, selected, children, ...rest })\n },\n in: parentStrategy.in,\n out: parentStrategy.out,\n }\n\n return strategy\n}\n\nexport const leafSingleSelectStrategy = (mandatory?: boolean): SelectStrategy => {\n const parentStrategy = independentSingleSelectStrategy(mandatory)\n\n const strategy: SelectStrategy = {\n select: ({ id, selected, children, ...rest }) => {\n if (children.has(id)) return selected\n\n return parentStrategy.select({ id, selected, children, ...rest })\n },\n in: parentStrategy.in,\n out: parentStrategy.out,\n }\n\n return strategy\n}\n\nexport const classicSelectStrategy = (mandatory?: boolean): SelectStrategy => {\n const strategy: SelectStrategy = {\n select: ({ id, value, selected, children, parents }) => {\n const original = new Map(selected)\n\n const items = [id]\n\n while (items.length) {\n const item = items.shift()!\n\n selected.set(item, value ? 'on' : 'off')\n\n if (children.has(item)) {\n items.push(...children.get(item)!)\n }\n }\n\n let parent = parents.get(id)\n\n while (parent) {\n const childrenIds = children.get(parent)!\n const everySelected = childrenIds.every(cid => selected.get(cid) === 'on')\n const noneSelected = childrenIds.every(cid => !selected.has(cid) || selected.get(cid) === 'off')\n\n selected.set(parent, everySelected ? 'on' : noneSelected ? 'off' : 'indeterminate')\n\n parent = parents.get(parent)\n }\n\n // If mandatory and planned deselect results in no selected\n // items then we can't do it, so return original state\n if (mandatory && !value) {\n const on = Array.from(selected.entries()).reduce((arr, [key, value]) => value === 'on' ? [...arr, key] : arr, [] as string[])\n if (on.length === 0) return original\n }\n\n return selected\n },\n in: (v, children, parents) => {\n let map = new Map()\n\n for (const id of (v || [])) {\n map = strategy.select({\n id,\n value: true,\n selected: new Map(map),\n children,\n parents,\n })\n }\n\n return map\n },\n out: (v, children) => {\n const arr = []\n\n for (const [key, value] of v.entries()) {\n if (value === 'on' && !children.has(key)) arr.push(key)\n }\n\n return arr\n },\n }\n\n return strategy\n}\n"],"mappings":"AAAA;AA4BA,OAAO,MAAMA,yBAAyB,GAAIC,SAAD,IAAyC;EAChF,MAAMC,QAAwB,GAAG;IAC/BC,MAAM,EAAE,QAA6B;MAAA,IAA5B;QAAEC,EAAF;QAAMC,KAAN;QAAaC;MAAb,CAA4B;;MACnC;MACA;MACA,IAAIL,SAAS,IAAI,CAACI,KAAlB,EAAyB;QACvB,MAAME,EAAE,GAAGC,KAAK,CAACC,IAAN,CAAWH,QAAQ,CAACI,OAAT,EAAX,EAA+BC,MAA/B,CAAsC,CAACC,GAAD;UAAA,IAAM,CAACC,GAAD,EAAMR,KAAN,CAAN;UAAA,OAAuBA,KAAK,KAAK,IAAV,GAAiB,CAAC,GAAGO,GAAJ,EAASC,GAAT,CAAjB,GAAiCD,GAAxD;QAAA,CAAtC,EAAmG,EAAnG,CAAX;QACA,IAAIL,EAAE,CAACO,MAAH,KAAc,CAAd,IAAmBP,EAAE,CAAC,CAAD,CAAF,KAAUH,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C,GAAJ,EAAV;;MAEA,KAAK,MAAMjB,EAAX,IAAkBa,CAAC,IAAI,EAAvB,EAA4B;QAC1BG,GAAG,GAAGlB,QAAQ,CAACC,MAAT,CAAgB;UACpBC,EADoB;UAEpBC,KAAK,EAAE,IAFa;UAGpBC,QAAQ,EAAE,IAAIe,GAAJ,CAAQD,GAAR,CAHU;UAIpBF,QAJoB;UAKpBC;QALoB,CAAhB,CAAN;MAOD;;MAED,OAAOC,GAAP;IACD,CAnD8B;IAoD/BE,GAAG,EAAE,CAACL,CAAD,EAAIC,QAAJ,KAAiB;MACpB,MAAMN,GAAG,GAAG,EAAZ;;MAEA,KAAK,MAAM,CAACC,GAAD,EAAMR,KAAN,CAAX,IAA2BY,CAAC,CAACP,OAAF,EAA3B,EAAwC;QACtC,IAAIL,KAAK,KAAK,IAAV,IAAkB,CAACa,QAAQ,CAACU,GAAT,CAAaf,GAAb,CAAvB,EAA0CD,GAAG,CAACW,IAAJ,CAASV,GAAT;MAC3C;;MAED,OAAOD,GAAP;IACD;EA5D8B,CAAjC;EA+DA,OAAOV,QAAP;AACD,CAjEM"}
|
|
1
|
+
{"version":3,"file":"selectStrategies.mjs","names":["independentSelectStrategy","mandatory","strategy","select","id","value","selected","on","Array","from","entries","reduce","arr","key","length","set","in","v","children","parents","map","Map","out","push","independentSingleSelectStrategy","parentStrategy","rest","singleSelected","has","get","slice","leafSelectStrategy","leafSingleSelectStrategy","classicSelectStrategy","original","items","item","shift","parent","childrenIds","everySelected","every","cid","noneSelected"],"sources":["../../../src/composables/nested/selectStrategies.ts"],"sourcesContent":["/* eslint-disable sonarjs/no-identical-functions */\nexport type SelectStrategyFn = (data: {\n id: unknown\n value: boolean\n selected: Map<unknown, 'on' | 'off' | 'indeterminate'>\n children: Map<unknown, unknown[]>\n parents: Map<unknown, unknown>\n event?: Event\n}) => Map<unknown, 'on' | 'off' | 'indeterminate'>\n\nexport type SelectStrategyTransformInFn = (\n v: unknown[] | undefined,\n children: Map<unknown, unknown[]>,\n parents: Map<unknown, unknown>,\n) => Map<unknown, 'on' | 'off' | 'indeterminate'>\n\nexport type SelectStrategyTransformOutFn = (\n v: Map<unknown, 'on' | 'off' | 'indeterminate'>,\n children: Map<unknown, unknown[]>,\n parents: Map<unknown, unknown>,\n) => unknown[]\n\nexport type SelectStrategy = {\n select: SelectStrategyFn\n in: SelectStrategyTransformInFn\n out: SelectStrategyTransformOutFn\n}\n\nexport const independentSelectStrategy = (mandatory?: boolean): SelectStrategy => {\n const strategy: SelectStrategy = {\n select: ({ id, value, selected }) => {\n // When mandatory and we're trying to deselect when id\n // is the only currently selected item then do nothing\n if (mandatory && !value) {\n const on = Array.from(selected.entries()).reduce((arr, [key, value]) => value === 'on' ? [...arr, key] : arr, [] as unknown[])\n if (on.length === 1 && on[0] === id) return selected\n }\n\n selected.set(id, value ? 'on' : 'off')\n\n return selected\n },\n in: (v, children, parents) => {\n let map = new Map()\n\n for (const id of (v || [])) {\n map = strategy.select({\n id,\n value: true,\n selected: new Map(map),\n children,\n parents,\n })\n }\n\n return map\n },\n out: v => {\n const arr = []\n\n for (const [key, value] of v.entries()) {\n if (value === 'on') arr.push(key)\n }\n\n return arr\n },\n }\n\n return strategy\n}\n\nexport const independentSingleSelectStrategy = (mandatory?: boolean): SelectStrategy => {\n const parentStrategy = independentSelectStrategy(mandatory)\n\n const strategy: SelectStrategy = {\n select: ({ selected, id, ...rest }) => {\n const singleSelected = selected.has(id) ? new Map([[id, selected.get(id)!]]) : new Map()\n return parentStrategy.select({ ...rest, id, selected: singleSelected })\n },\n in: (v, children, parents) => {\n let map = new Map()\n\n if (v?.length) {\n map = parentStrategy.in(v.slice(0, 1), children, parents)\n }\n\n return map\n },\n out: (v, children, parents) => {\n return parentStrategy.out(v, children, parents)\n },\n }\n\n return strategy\n}\n\nexport const leafSelectStrategy = (mandatory?: boolean): SelectStrategy => {\n const parentStrategy = independentSelectStrategy(mandatory)\n\n const strategy: SelectStrategy = {\n select: ({ id, selected, children, ...rest }) => {\n if (children.has(id)) return selected\n\n return parentStrategy.select({ id, selected, children, ...rest })\n },\n in: parentStrategy.in,\n out: parentStrategy.out,\n }\n\n return strategy\n}\n\nexport const leafSingleSelectStrategy = (mandatory?: boolean): SelectStrategy => {\n const parentStrategy = independentSingleSelectStrategy(mandatory)\n\n const strategy: SelectStrategy = {\n select: ({ id, selected, children, ...rest }) => {\n if (children.has(id)) return selected\n\n return parentStrategy.select({ id, selected, children, ...rest })\n },\n in: parentStrategy.in,\n out: parentStrategy.out,\n }\n\n return strategy\n}\n\nexport const classicSelectStrategy = (mandatory?: boolean): SelectStrategy => {\n const strategy: SelectStrategy = {\n select: ({ id, value, selected, children, parents }) => {\n const original = new Map(selected)\n\n const items = [id]\n\n while (items.length) {\n const item = items.shift()!\n\n selected.set(item, value ? 'on' : 'off')\n\n if (children.has(item)) {\n items.push(...children.get(item)!)\n }\n }\n\n let parent = parents.get(id)\n\n while (parent) {\n const childrenIds = children.get(parent)!\n const everySelected = childrenIds.every(cid => selected.get(cid) === 'on')\n const noneSelected = childrenIds.every(cid => !selected.has(cid) || selected.get(cid) === 'off')\n\n selected.set(parent, everySelected ? 'on' : noneSelected ? 'off' : 'indeterminate')\n\n parent = parents.get(parent)\n }\n\n // If mandatory and planned deselect results in no selected\n // items then we can't do it, so return original state\n if (mandatory && !value) {\n const on = Array.from(selected.entries()).reduce((arr, [key, value]) => value === 'on' ? [...arr, key] : arr, [] as unknown[])\n if (on.length === 0) return original\n }\n\n return selected\n },\n in: (v, children, parents) => {\n let map = new Map()\n\n for (const id of (v || [])) {\n map = strategy.select({\n id,\n value: true,\n selected: new Map(map),\n children,\n parents,\n })\n }\n\n return map\n },\n out: (v, children) => {\n const arr = []\n\n for (const [key, value] of v.entries()) {\n if (value === 'on' && !children.has(key)) arr.push(key)\n }\n\n return arr\n },\n }\n\n return strategy\n}\n"],"mappings":"AAAA;;AA4BA,OAAO,MAAMA,yBAAyB,GAAIC,SAAmB,IAAqB;EAChF,MAAMC,QAAwB,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AAG;UAAA,IAAE,CAACC,GAAG,EAAER,KAAK,CAAC;UAAA,OAAKA,KAAK,KAAK,IAAI,GAAG,CAAC,GAAGO,GAAG,EAAEC,GAAG,CAAC,GAAGD,GAAG;QAAA,GAAE,EAAE,CAAc;QAC9H,IAAIL,EAAE,CAACO,MAAM,KAAK,CAAC,EAAE,OAAOoB,QAAQ;MACtC;MAEA,OAAO5B,QAAQ;IACjB,CAAC;IACDU,EAAE,EAAE,CAACC,CAAC,EAAEC,QAAQ,EAAEC,OAAO,KAAK;MAC5B,IAAIC,GAAG,GAAG,IAAIC,GAAG,EAAE;MAEnB,KAAK,MAAMjB,EAAE,IAAKa,CAAC,IAAI,EAAE,EAAG;QAC1BG,GAAG,GAAGlB,QAAQ,CAACC,MAAM,CAAC;UACpBC,EAAE;UACFC,KAAK,EAAE,IAAI;UACXC,QAAQ,EAAE,IAAIe,GAAG,CAACD,GAAG,CAAC;UACtBF,QAAQ;UACRC;QACF,CAAC,CAAC;MACJ;MAEA,OAAOC,GAAG;IACZ,CAAC;IACDE,GAAG,EAAE,CAACL,CAAC,EAAEC,QAAQ,KAAK;MACpB,MAAMN,GAAG,GAAG,EAAE;MAEd,KAAK,MAAM,CAACC,GAAG,EAAER,KAAK,CAAC,IAAIY,CAAC,CAACP,OAAO,EAAE,EAAE;QACtC,IAAIL,KAAK,KAAK,IAAI,IAAI,CAACa,QAAQ,CAACU,GAAG,CAACf,GAAG,CAAC,EAAED,GAAG,CAACW,IAAI,CAACV,GAAG,CAAC;MACzD;MAEA,OAAOD,GAAG;IACZ;EACF,CAAC;EAED,OAAOV,QAAQ;AACjB,CAAC"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
// Utilities
|
|
2
2
|
import { computed } from 'vue';
|
|
3
3
|
import { getCurrentInstanceName, propsFactory } from "../util/index.mjs"; // Types
|
|
4
|
-
|
|
5
4
|
const positionValues = ['static', 'relative', 'fixed', 'absolute', 'sticky'];
|
|
6
5
|
// Composables
|
|
7
6
|
export const makePositionProps = propsFactory({
|
|
8
7
|
position: {
|
|
9
8
|
type: String,
|
|
10
|
-
validator:
|
|
11
|
-
/* istanbul ignore next */
|
|
12
|
-
v => positionValues.includes(v)
|
|
9
|
+
validator: /* istanbul ignore next */v => positionValues.includes(v)
|
|
13
10
|
}
|
|
14
11
|
}, 'position');
|
|
15
12
|
export function usePosition(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"position.mjs","names":["computed","getCurrentInstanceName","propsFactory","positionValues","makePositionProps","position","type","String","validator","v","includes","usePosition","props","name","positionClasses","undefined"],"sources":["../../src/composables/position.ts"],"sourcesContent":["// Utilities\nimport { computed } from 'vue'\nimport { getCurrentInstanceName, propsFactory } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\nconst positionValues = ['static', 'relative', 'fixed', 'absolute', 'sticky'] as const\n\ntype Position = typeof positionValues[number]\n\nexport interface PositionProps {\n position: Position | undefined\n}\n\n// Composables\nexport const makePositionProps = propsFactory({\n position: {\n type: String as PropType<Position>,\n validator: /* istanbul ignore next */ (v: any) => positionValues.includes(v),\n },\n}, 'position')\n\nexport function usePosition (\n props: PositionProps,\n name = getCurrentInstanceName(),\n) {\n const positionClasses = computed(() => {\n return props.position ? `${name}--${props.position}` : undefined\n })\n\n return { positionClasses }\n}\n"],"mappings":"AAAA;AACA,SAASA,
|
|
1
|
+
{"version":3,"file":"position.mjs","names":["computed","getCurrentInstanceName","propsFactory","positionValues","makePositionProps","position","type","String","validator","v","includes","usePosition","props","name","positionClasses","undefined"],"sources":["../../src/composables/position.ts"],"sourcesContent":["// Utilities\nimport { computed } from 'vue'\nimport { getCurrentInstanceName, propsFactory } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\nconst positionValues = ['static', 'relative', 'fixed', 'absolute', 'sticky'] as const\n\ntype Position = typeof positionValues[number]\n\nexport interface PositionProps {\n position: Position | undefined\n}\n\n// Composables\nexport const makePositionProps = propsFactory({\n position: {\n type: String as PropType<Position>,\n validator: /* istanbul ignore next */ (v: any) => positionValues.includes(v),\n },\n}, 'position')\n\nexport function usePosition (\n props: PositionProps,\n name = getCurrentInstanceName(),\n) {\n const positionClasses = computed(() => {\n return props.position ? `${name}--${props.position}` : undefined\n })\n\n return { positionClasses }\n}\n"],"mappings":"AAAA;AACA,SAASA,QAAQ,QAAQ,KAAK;AAAA,SACrBC,sBAAsB,EAAEC,YAAY,6BAE7C;AAGA,MAAMC,cAAc,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAU;AAQrF;AACA,OAAO,MAAMC,iBAAiB,GAAGF,YAAY,CAAC;EAC5CG,QAAQ,EAAE;IACRC,IAAI,EAAEC,MAA4B;IAClCC,SAAS,EAAE,0BAA4BC,CAAM,IAAKN,cAAc,CAACO,QAAQ,CAACD,CAAC;EAC7E;AACF,CAAC,EAAE,UAAU,CAAC;AAEd,OAAO,SAASE,WAAW,CACzBC,KAAoB,EAEpB;EAAA,IADAC,IAAI,uEAAGZ,sBAAsB,EAAE;EAE/B,MAAMa,eAAe,GAAGd,QAAQ,CAAC,MAAM;IACrC,OAAOY,KAAK,CAACP,QAAQ,GAAI,GAAEQ,IAAK,KAAID,KAAK,CAACP,QAAS,EAAC,GAAGU,SAAS;EAClE,CAAC,CAAC;EAEF,OAAO;IAAED;EAAgB,CAAC;AAC5B"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { computed, ref, watch } from 'vue';
|
|
3
3
|
import { getCurrentInstance, toKebabCase } from "../util/index.mjs";
|
|
4
4
|
import { useToggleScope } from "./toggleScope.mjs"; // Types
|
|
5
|
-
|
|
6
5
|
// Composables
|
|
7
6
|
export function useProxiedModel(props, prop, defaultValue) {
|
|
8
7
|
let transformIn = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : v => v;
|
|
@@ -13,12 +12,10 @@ export function useProxiedModel(props, prop, defaultValue) {
|
|
|
13
12
|
const checkKebab = kebabProp !== prop;
|
|
14
13
|
const isControlled = checkKebab ? computed(() => {
|
|
15
14
|
var _vm$vnode$props, _vm$vnode$props2, _vm$vnode$props3, _vm$vnode$props4;
|
|
16
|
-
|
|
17
15
|
void props[prop];
|
|
18
16
|
return !!(((_vm$vnode$props = vm.vnode.props) != null && _vm$vnode$props.hasOwnProperty(prop) || (_vm$vnode$props2 = vm.vnode.props) != null && _vm$vnode$props2.hasOwnProperty(kebabProp)) && ((_vm$vnode$props3 = vm.vnode.props) != null && _vm$vnode$props3.hasOwnProperty(`onUpdate:${prop}`) || (_vm$vnode$props4 = vm.vnode.props) != null && _vm$vnode$props4.hasOwnProperty(`onUpdate:${kebabProp}`)));
|
|
19
17
|
}) : computed(() => {
|
|
20
18
|
var _vm$vnode$props5, _vm$vnode$props6;
|
|
21
|
-
|
|
22
19
|
void props[prop];
|
|
23
20
|
return !!((_vm$vnode$props5 = vm.vnode.props) != null && _vm$vnode$props5.hasOwnProperty(prop) && (_vm$vnode$props6 = vm.vnode.props) != null && _vm$vnode$props6.hasOwnProperty(`onUpdate:${prop}`));
|
|
24
21
|
});
|
|
@@ -31,17 +28,14 @@ export function useProxiedModel(props, prop, defaultValue) {
|
|
|
31
28
|
get() {
|
|
32
29
|
return transformIn(isControlled.value ? props[prop] : internal.value);
|
|
33
30
|
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if (
|
|
31
|
+
set(value) {
|
|
32
|
+
const newValue = transformOut(value);
|
|
33
|
+
if ((isControlled.value ? props[prop] : internal.value) === newValue || transformIn(isControlled.value ? props[prop] : internal.value) === value) {
|
|
37
34
|
return;
|
|
38
35
|
}
|
|
39
|
-
|
|
40
|
-
newValue = transformOut(newValue);
|
|
41
36
|
internal.value = newValue;
|
|
42
37
|
vm == null ? void 0 : vm.emit(`update:${prop}`, newValue);
|
|
43
38
|
}
|
|
44
|
-
|
|
45
39
|
});
|
|
46
40
|
Object.defineProperty(model, 'externalValue', {
|
|
47
41
|
get: () => isControlled.value ? props[prop] : internal.value
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxiedModel.mjs","names":["computed","ref","watch","getCurrentInstance","toKebabCase","useToggleScope","useProxiedModel","props","prop","defaultValue","transformIn","v","transformOut","vm","internal","kebabProp","checkKebab","isControlled","vnode","hasOwnProperty","value","val","model","get","set","newValue","emit","Object","defineProperty"],"sources":["../../src/composables/proxiedModel.ts"],"sourcesContent":["// Utilities\nimport { computed, ref, watch } from 'vue'\nimport { getCurrentInstance, toKebabCase } from '@/util'\nimport { useToggleScope } from '@/composables/toggleScope'\n\n// Types\nimport type { Ref } from 'vue'\n\ntype InnerVal<T> = T extends any[] ? Readonly<T> : T\n\n// Composables\nexport function useProxiedModel<\n Props extends object & { [key in Prop as `onUpdate:${Prop}`]: ((val: any) => void) | undefined },\n Prop extends Extract<keyof Props, string>,\n Inner = Props[Prop],\n> (\n props: Props,\n prop: Prop,\n defaultValue?: Props[Prop],\n transformIn: (value?: Props[Prop]) => Inner = (v: any) => v,\n transformOut: (value: Inner) => Props[Prop] = (v: any) => v,\n) {\n const vm = getCurrentInstance('useProxiedModel')\n const internal = ref(props[prop]) as Ref<Props[Prop]>\n const kebabProp = toKebabCase(prop)\n const checkKebab = kebabProp !== prop\n\n const isControlled = checkKebab\n ? computed(() => {\n void props[prop]\n return !!(\n (vm.vnode.props?.hasOwnProperty(prop) || vm.vnode.props?.hasOwnProperty(kebabProp)) &&\n (vm.vnode.props?.hasOwnProperty(`onUpdate:${prop}`) || vm.vnode.props?.hasOwnProperty(`onUpdate:${kebabProp}`))\n )\n })\n : computed(() => {\n void props[prop]\n return !!(vm.vnode.props?.hasOwnProperty(prop) && vm.vnode.props?.hasOwnProperty(`onUpdate:${prop}`))\n })\n\n useToggleScope(() => !isControlled.value, () => {\n watch(() => props[prop], val => {\n internal.value = val\n })\n })\n\n const model = computed({\n get (): any {\n return transformIn(isControlled.value ? props[prop] : internal.value)\n },\n set (
|
|
1
|
+
{"version":3,"file":"proxiedModel.mjs","names":["computed","ref","watch","getCurrentInstance","toKebabCase","useToggleScope","useProxiedModel","props","prop","defaultValue","transformIn","v","transformOut","vm","internal","kebabProp","checkKebab","isControlled","vnode","hasOwnProperty","value","val","model","get","set","newValue","emit","Object","defineProperty"],"sources":["../../src/composables/proxiedModel.ts"],"sourcesContent":["// Utilities\nimport { computed, ref, watch } from 'vue'\nimport { getCurrentInstance, toKebabCase } from '@/util'\nimport { useToggleScope } from '@/composables/toggleScope'\n\n// Types\nimport type { Ref } from 'vue'\n\ntype InnerVal<T> = T extends any[] ? Readonly<T> : T\n\n// Composables\nexport function useProxiedModel<\n Props extends object & { [key in Prop as `onUpdate:${Prop}`]: ((val: any) => void) | undefined },\n Prop extends Extract<keyof Props, string>,\n Inner = Props[Prop],\n> (\n props: Props,\n prop: Prop,\n defaultValue?: Props[Prop],\n transformIn: (value?: Props[Prop]) => Inner = (v: any) => v,\n transformOut: (value: Inner) => Props[Prop] = (v: any) => v,\n) {\n const vm = getCurrentInstance('useProxiedModel')\n const internal = ref(props[prop]) as Ref<Props[Prop]>\n const kebabProp = toKebabCase(prop)\n const checkKebab = kebabProp !== prop\n\n const isControlled = checkKebab\n ? computed(() => {\n void props[prop]\n return !!(\n (vm.vnode.props?.hasOwnProperty(prop) || vm.vnode.props?.hasOwnProperty(kebabProp)) &&\n (vm.vnode.props?.hasOwnProperty(`onUpdate:${prop}`) || vm.vnode.props?.hasOwnProperty(`onUpdate:${kebabProp}`))\n )\n })\n : computed(() => {\n void props[prop]\n return !!(vm.vnode.props?.hasOwnProperty(prop) && vm.vnode.props?.hasOwnProperty(`onUpdate:${prop}`))\n })\n\n useToggleScope(() => !isControlled.value, () => {\n watch(() => props[prop], val => {\n internal.value = val\n })\n })\n\n const model = computed({\n get (): any {\n return transformIn(isControlled.value ? props[prop] : internal.value)\n },\n set (value) {\n const newValue = transformOut(value)\n if (\n (isControlled.value ? props[prop] : internal.value) === newValue ||\n transformIn(isControlled.value ? props[prop] : internal.value) === value\n ) {\n return\n }\n internal.value = newValue\n vm?.emit(`update:${prop}`, newValue)\n },\n }) as any as Ref<InnerVal<Inner>> & { readonly externalValue: Props[Prop] }\n\n Object.defineProperty(model, 'externalValue', {\n get: () => isControlled.value ? props[prop] : internal.value,\n })\n\n return model\n}\n"],"mappings":"AAAA;AACA,SAASA,QAAQ,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SACjCC,kBAAkB,EAAEC,WAAW;AAAA,SAC/BC,cAAc,6BAEvB;AAKA;AACA,OAAO,SAASC,eAAe,CAK7BC,KAAY,EACZC,IAAU,EACVC,YAA0B,EAG1B;EAAA,IAFAC,WAA2C,uEAAIC,CAAM,IAAKA,CAAC;EAAA,IAC3DC,YAA2C,uEAAID,CAAM,IAAKA,CAAC;EAE3D,MAAME,EAAE,GAAGV,kBAAkB,CAAC,iBAAiB,CAAC;EAChD,MAAMW,QAAQ,GAAGb,GAAG,CAACM,KAAK,CAACC,IAAI,CAAC,CAAqB;EACrD,MAAMO,SAAS,GAAGX,WAAW,CAACI,IAAI,CAAC;EACnC,MAAMQ,UAAU,GAAGD,SAAS,KAAKP,IAAI;EAErC,MAAMS,YAAY,GAAGD,UAAU,GAC3BhB,QAAQ,CAAC,MAAM;IAAA;IACf,KAAKO,KAAK,CAACC,IAAI,CAAC;IAChB,OAAO,CAAC,EACN,CAAC,mBAAAK,EAAE,CAACK,KAAK,CAACX,KAAK,aAAd,gBAAgBY,cAAc,CAACX,IAAI,CAAC,wBAAIK,EAAE,CAACK,KAAK,CAACX,KAAK,aAAd,iBAAgBY,cAAc,CAACJ,SAAS,CAAC,MACjF,oBAAAF,EAAE,CAACK,KAAK,CAACX,KAAK,aAAd,iBAAgBY,cAAc,CAAE,YAAWX,IAAK,EAAC,CAAC,wBAAIK,EAAE,CAACK,KAAK,CAACX,KAAK,aAAd,iBAAgBY,cAAc,CAAE,YAAWJ,SAAU,EAAC,CAAC,CAAC,CAChH;EACH,CAAC,CAAC,GACAf,QAAQ,CAAC,MAAM;IAAA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K,CAACC,IAAI,CAAC,GAAGM,QAAQ,CAACM;EACzD,CAAC,CAAC;EAEF,OAAOE,KAAK;AACd"}
|
package/lib/composables/refs.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refs.mjs","names":["onBeforeUpdate","ref","useRefs","refs","value","updateRef","e","i"],"sources":["../../src/composables/refs.ts"],"sourcesContent":["// Imports\nimport { onBeforeUpdate, ref } from 'vue'\nimport type { Ref } from 'vue'\n\nexport function useRefs <T extends {}> () {\n const refs = ref<(T | undefined)[]>([]) as Ref<(T | undefined)[]>\n\n onBeforeUpdate(() => (refs.value = []))\n\n function updateRef (e: any, i: number) {\n refs.value[i] = e\n }\n\n return { refs, updateRef }\n}\n"],"mappings":"AAAA;AACA,SAASA,
|
|
1
|
+
{"version":3,"file":"refs.mjs","names":["onBeforeUpdate","ref","useRefs","refs","value","updateRef","e","i"],"sources":["../../src/composables/refs.ts"],"sourcesContent":["// Imports\nimport { onBeforeUpdate, ref } from 'vue'\nimport type { Ref } from 'vue'\n\nexport function useRefs <T extends {}> () {\n const refs = ref<(T | undefined)[]>([]) as Ref<(T | undefined)[]>\n\n onBeforeUpdate(() => (refs.value = []))\n\n function updateRef (e: any, i: number) {\n refs.value[i] = e\n }\n\n return { refs, updateRef }\n}\n"],"mappings":"AAAA;AACA,SAASA,cAAc,EAAEC,GAAG,QAAQ,KAAK;AAGzC,OAAO,SAASC,OAAO,GAAmB;EACxC,MAAMC,IAAI,GAAGF,GAAG,CAAoB,EAAE,CAA2B;EAEjED,cAAc,CAAC,MAAOG,IAAI,CAACC,KAAK,GAAG,EAAG,CAAC;EAEvC,SAASC,SAAS,CAAEC,CAAM,EAAEC,CAAS,EAAE;IACrCJ,IAAI,CAACC,KAAK,CAACG,CAAC,CAAC,GAAGD,CAAC;EACnB;EAEA,OAAO;IAAEH,IAAI;IAAEE;EAAU,CAAC;AAC5B"}
|
|
@@ -5,7 +5,6 @@ import { IN_BROWSER } from "../util/globals.mjs";
|
|
|
5
5
|
export function useResizeObserver(callback) {
|
|
6
6
|
const resizeRef = ref();
|
|
7
7
|
const contentRect = ref();
|
|
8
|
-
|
|
9
8
|
if (IN_BROWSER) {
|
|
10
9
|
const observer = new ResizeObserver(entries => {
|
|
11
10
|
callback == null ? void 0 : callback(entries, observer);
|
|
@@ -20,13 +19,11 @@ export function useResizeObserver(callback) {
|
|
|
20
19
|
observer.unobserve(oldValue);
|
|
21
20
|
contentRect.value = undefined;
|
|
22
21
|
}
|
|
23
|
-
|
|
24
22
|
if (newValue) observer.observe(newValue);
|
|
25
23
|
}, {
|
|
26
24
|
flush: 'post'
|
|
27
25
|
});
|
|
28
26
|
}
|
|
29
|
-
|
|
30
27
|
return {
|
|
31
28
|
resizeRef,
|
|
32
29
|
contentRect: readonly(contentRect)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizeObserver.mjs","names":["onBeforeUnmount","readonly","ref","watch","IN_BROWSER","useResizeObserver","callback","resizeRef","contentRect","observer","ResizeObserver","entries","length","value","disconnect","newValue","oldValue","unobserve","undefined","observe","flush"],"sources":["../../src/composables/resizeObserver.ts"],"sourcesContent":["// Utilities\nimport { onBeforeUnmount, readonly, ref, watch } from 'vue'\nimport type { DeepReadonly, Ref } from 'vue'\n\n// Globals\nimport { IN_BROWSER } from '@/util/globals'\n\ninterface ResizeState {\n resizeRef: Ref<Element | undefined>\n contentRect: DeepReadonly<Ref<DOMRectReadOnly | undefined>>\n}\n\nexport function useResizeObserver (callback?: ResizeObserverCallback): ResizeState {\n const resizeRef = ref<Element>()\n const contentRect = ref<DOMRectReadOnly>()\n\n if (IN_BROWSER) {\n const observer = new ResizeObserver((entries: ResizeObserverEntry[]) => {\n callback?.(entries, observer)\n\n if (!entries.length) return\n\n contentRect.value = entries[0].contentRect\n })\n\n onBeforeUnmount(() => {\n observer.disconnect()\n })\n\n watch(resizeRef, (newValue, oldValue) => {\n if (oldValue) {\n observer.unobserve(oldValue)\n contentRect.value = undefined\n }\n\n if (newValue) observer.observe(newValue)\n }, {\n flush: 'post',\n })\n }\n\n return {\n resizeRef,\n contentRect: readonly(contentRect),\n }\n}\n"],"mappings":"AAAA;AACA,SAASA,
|
|
1
|
+
{"version":3,"file":"resizeObserver.mjs","names":["onBeforeUnmount","readonly","ref","watch","IN_BROWSER","useResizeObserver","callback","resizeRef","contentRect","observer","ResizeObserver","entries","length","value","disconnect","newValue","oldValue","unobserve","undefined","observe","flush"],"sources":["../../src/composables/resizeObserver.ts"],"sourcesContent":["// Utilities\nimport { onBeforeUnmount, readonly, ref, watch } from 'vue'\nimport type { DeepReadonly, Ref } from 'vue'\n\n// Globals\nimport { IN_BROWSER } from '@/util/globals'\n\ninterface ResizeState {\n resizeRef: Ref<Element | undefined>\n contentRect: DeepReadonly<Ref<DOMRectReadOnly | undefined>>\n}\n\nexport function useResizeObserver (callback?: ResizeObserverCallback): ResizeState {\n const resizeRef = ref<Element>()\n const contentRect = ref<DOMRectReadOnly>()\n\n if (IN_BROWSER) {\n const observer = new ResizeObserver((entries: ResizeObserverEntry[]) => {\n callback?.(entries, observer)\n\n if (!entries.length) return\n\n contentRect.value = entries[0].contentRect\n })\n\n onBeforeUnmount(() => {\n observer.disconnect()\n })\n\n watch(resizeRef, (newValue, oldValue) => {\n if (oldValue) {\n observer.unobserve(oldValue)\n contentRect.value = undefined\n }\n\n if (newValue) observer.observe(newValue)\n }, {\n flush: 'post',\n })\n }\n\n return {\n resizeRef,\n contentRect: readonly(contentRect),\n }\n}\n"],"mappings":"AAAA;AACA,SAASA,eAAe,EAAEC,QAAQ,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAG3D;AAAA,SACSC,UAAU;AAOnB,OAAO,SAASC,iBAAiB,CAAEC,QAAiC,EAAe;EACjF,MAAMC,SAAS,GAAGL,GAAG,EAAW;EAChC,MAAMM,WAAW,GAAGN,GAAG,EAAmB;EAE1C,IAAIE,UAAU,EAAE;IACd,MAAMK,QAAQ,GAAG,IAAIC,cAAc,CAAEC,OAA8B,IAAK;MACtEL,QAAQ,oBAARA,QAAQ,CAAGK,OAAO,EAAEF,QAAQ,CAAC;MAE7B,IAAI,CAACE,OAAO,CAACC,MAAM,EAAE;MAErBJ,WAAW,CAACK,KAAK,GAAGF,OAAO,CAAC,CAAC,CAAC,CAACH,WAAW;IAC5C,CAAC,CAAC;IAEFR,eAAe,CAAC,MAAM;MACpBS,QAAQ,CAACK,UAAU,EAAE;IACvB,CAAC,CAAC;IAEFX,KAAK,CAACI,SAAS,EAAE,CAACQ,QAAQ,EAAEC,QAAQ,KAAK;MACvC,IAAIA,QAAQ,EAAE;QACZP,QAAQ,CAACQ,SAAS,CAACD,QAAQ,CAAC;QAC5BR,WAAW,CAACK,KAAK,GAAGK,SAAS;MAC/B;MAEA,IAAIH,QAAQ,EAAEN,QAAQ,CAACU,OAAO,CAACJ,QAAQ,CAAC;IAC1C,CAAC,EAAE;MACDK,KAAK,EAAE;IACT,CAAC,CAAC;EACJ;EAEA,OAAO;IACLb,SAAS;IACTC,WAAW,EAAEP,QAAQ,CAACO,WAAW;EACnC,CAAC;AACH"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// Utilities
|
|
2
2
|
import { computed, isRef } from 'vue';
|
|
3
3
|
import { getCurrentInstanceName, propsFactory } from "../util/index.mjs"; // Types
|
|
4
|
-
|
|
5
4
|
// Composables
|
|
6
5
|
export const makeRoundedProps = propsFactory({
|
|
7
6
|
rounded: {
|
|
@@ -14,7 +13,6 @@ export function useRounded(props) {
|
|
|
14
13
|
const roundedClasses = computed(() => {
|
|
15
14
|
const rounded = isRef(props) ? props.value : props.rounded;
|
|
16
15
|
const classes = [];
|
|
17
|
-
|
|
18
16
|
if (rounded === true || rounded === '') {
|
|
19
17
|
classes.push(`${name}--rounded`);
|
|
20
18
|
} else if (typeof rounded === 'string' || rounded === 0) {
|
|
@@ -22,7 +20,6 @@ export function useRounded(props) {
|
|
|
22
20
|
classes.push(`rounded-${value}`);
|
|
23
21
|
}
|
|
24
22
|
}
|
|
25
|
-
|
|
26
23
|
return classes;
|
|
27
24
|
});
|
|
28
25
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rounded.mjs","names":["computed","isRef","getCurrentInstanceName","propsFactory","makeRoundedProps","rounded","type","Boolean","Number","String","default","undefined","useRounded","props","name","roundedClasses","value","classes","push","split"],"sources":["../../src/composables/rounded.ts"],"sourcesContent":["// Utilities\nimport { computed, isRef } from 'vue'\nimport { getCurrentInstanceName, propsFactory } from '@/util'\n\n// Types\nimport type { Ref } from 'vue'\n\ntype RoundedValue = boolean | string | number | null | undefined\n\nexport interface RoundedProps {\n rounded?: RoundedValue\n tile?: boolean\n}\n\ntype RoundedData = {\n roundedClasses: Ref<string[]>\n}\n\n// Composables\nexport const makeRoundedProps = propsFactory({\n rounded: {\n type: [Boolean, Number, String],\n default: undefined,\n },\n}, 'rounded')\n\nexport function useRounded (\n props: RoundedProps | Ref<RoundedValue>,\n name = getCurrentInstanceName(),\n): RoundedData {\n const roundedClasses = computed(() => {\n const rounded = isRef(props) ? props.value : props.rounded\n const classes: string[] = []\n\n if (rounded === true || rounded === '') {\n classes.push(`${name}--rounded`)\n } else if (\n typeof rounded === 'string' ||\n rounded === 0\n ) {\n for (const value of String(rounded).split(' ')) {\n classes.push(`rounded-${value}`)\n }\n }\n\n return classes\n })\n\n return { roundedClasses }\n}\n"],"mappings":"AAAA;AACA,SAASA,
|
|
1
|
+
{"version":3,"file":"rounded.mjs","names":["computed","isRef","getCurrentInstanceName","propsFactory","makeRoundedProps","rounded","type","Boolean","Number","String","default","undefined","useRounded","props","name","roundedClasses","value","classes","push","split"],"sources":["../../src/composables/rounded.ts"],"sourcesContent":["// Utilities\nimport { computed, isRef } from 'vue'\nimport { getCurrentInstanceName, propsFactory } from '@/util'\n\n// Types\nimport type { Ref } from 'vue'\n\ntype RoundedValue = boolean | string | number | null | undefined\n\nexport interface RoundedProps {\n rounded?: RoundedValue\n tile?: boolean\n}\n\ntype RoundedData = {\n roundedClasses: Ref<string[]>\n}\n\n// Composables\nexport const makeRoundedProps = propsFactory({\n rounded: {\n type: [Boolean, Number, String],\n default: undefined,\n },\n}, 'rounded')\n\nexport function useRounded (\n props: RoundedProps | Ref<RoundedValue>,\n name = getCurrentInstanceName(),\n): RoundedData {\n const roundedClasses = computed(() => {\n const rounded = isRef(props) ? props.value : props.rounded\n const classes: string[] = []\n\n if (rounded === true || rounded === '') {\n classes.push(`${name}--rounded`)\n } else if (\n typeof rounded === 'string' ||\n rounded === 0\n ) {\n for (const value of String(rounded).split(' ')) {\n classes.push(`rounded-${value}`)\n }\n }\n\n return classes\n })\n\n return { roundedClasses }\n}\n"],"mappings":"AAAA;AACA,SAASA,QAAQ,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC5BC,sBAAsB,EAAEC,YAAY,6BAE7C;AAcA;AACA,OAAO,MAAMC,gBAAgB,GAAGD,YAAY,CAAC;EAC3CE,OAAO,EAAE;IACPC,IAAI,EAAE,CAACC,OAAO,EAAEC,MAAM,EAAEC,MAAM,CAAC;IAC/BC,OAAO,EAAEC;EACX;AACF,CAAC,EAAE,SAAS,CAAC;AAEb,OAAO,SAASC,UAAU,CACxBC,KAAuC,EAE1B;EAAA,IADbC,IAAI,uEAAGZ,sBAAsB,EAAE;EAE/B,MAAMa,cAAc,GAAGf,QAAQ,CAAC,MAAM;IACpC,MAAMK,OAAO,GAAGJ,KAAK,CAACY,KAAK,CAAC,GAAGA,KAAK,CAACG,KAAK,GAAGH,KAAK,CAACR,OAAO;IAC1D,MAAMY,OAAiB,GAAG,EAAE;IAE5B,IAAIZ,OAAO,KAAK,IAAI,IAAIA,OAAO,KAAK,EAAE,EAAE;MACtCY,OAAO,CAACC,IAAI,CAAE,GAAEJ,IAAK,WAAU,CAAC;IAClC,CAAC,MAAM,IACL,OAAOT,OAAO,KAAK,QAAQ,IAC3BA,OAAO,KAAK,CAAC,EACb;MACA,KAAK,MAAMW,KAAK,IAAIP,MAAM,CAACJ,OAAO,CAAC,CAACc,KAAK,CAAC,GAAG,CAAC,EAAE;QAC9CF,OAAO,CAACC,IAAI,CAAE,WAAUF,KAAM,EAAC,CAAC;MAClC;IACF;IAEA,OAAOC,OAAO;EAChB,CAAC,CAAC;EAEF,OAAO;IAAEF;EAAe,CAAC;AAC3B"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
// Utilities
|
|
2
2
|
import { getCurrentInstance, IN_BROWSER, propsFactory } from "../util/index.mjs";
|
|
3
|
-
import { computed, nextTick, onScopeDispose, resolveDynamicComponent, toRef } from 'vue';
|
|
3
|
+
import { computed, nextTick, onScopeDispose, resolveDynamicComponent, toRef } from 'vue';
|
|
4
|
+
|
|
5
|
+
// Types
|
|
4
6
|
|
|
5
7
|
export function useRoute() {
|
|
6
8
|
const vm = getCurrentInstance('useRoute');
|
|
7
9
|
return computed(() => {
|
|
8
10
|
var _vm$proxy;
|
|
9
|
-
|
|
10
11
|
return vm == null ? void 0 : (_vm$proxy = vm.proxy) == null ? void 0 : _vm$proxy.$route;
|
|
11
12
|
});
|
|
12
13
|
}
|
|
13
14
|
export function useRouter() {
|
|
14
15
|
var _getCurrentInstance, _getCurrentInstance$p;
|
|
15
|
-
|
|
16
16
|
return (_getCurrentInstance = getCurrentInstance('useRouter')) == null ? void 0 : (_getCurrentInstance$p = _getCurrentInstance.proxy) == null ? void 0 : _getCurrentInstance$p.$router;
|
|
17
17
|
}
|
|
18
18
|
export function useLink(props, attrs) {
|
|
@@ -21,7 +21,6 @@ export function useLink(props, attrs) {
|
|
|
21
21
|
const isClickable = computed(() => {
|
|
22
22
|
return (isLink == null ? void 0 : isLink.value) || !!(attrs.onClick || attrs.onClickOnce);
|
|
23
23
|
});
|
|
24
|
-
|
|
25
24
|
if (typeof RouterLink === 'string') {
|
|
26
25
|
return {
|
|
27
26
|
isLink,
|
|
@@ -29,7 +28,6 @@ export function useLink(props, attrs) {
|
|
|
29
28
|
href: toRef(props, 'href')
|
|
30
29
|
};
|
|
31
30
|
}
|
|
32
|
-
|
|
33
31
|
const link = props.to ? RouterLink.useLink(props) : undefined;
|
|
34
32
|
return {
|
|
35
33
|
isLink,
|
|
@@ -38,7 +36,6 @@ export function useLink(props, attrs) {
|
|
|
38
36
|
navigate: link == null ? void 0 : link.navigate,
|
|
39
37
|
isActive: link && computed(() => {
|
|
40
38
|
var _link$isExactActive, _link$isActive;
|
|
41
|
-
|
|
42
39
|
return props.exact ? (_link$isExactActive = link.isExactActive) == null ? void 0 : _link$isExactActive.value : (_link$isActive = link.isActive) == null ? void 0 : _link$isActive.value;
|
|
43
40
|
}),
|
|
44
41
|
href: computed(() => props.to ? link == null ? void 0 : link.route.value.href : props.href)
|
|
@@ -55,7 +52,6 @@ export function useBackButton(router, cb) {
|
|
|
55
52
|
let popped = false;
|
|
56
53
|
let removeBefore;
|
|
57
54
|
let removeAfter;
|
|
58
|
-
|
|
59
55
|
if (IN_BROWSER) {
|
|
60
56
|
nextTick(() => {
|
|
61
57
|
window.addEventListener('popstate', onPopstate);
|
|
@@ -65,7 +61,6 @@ export function useBackButton(router, cb) {
|
|
|
65
61
|
} else {
|
|
66
62
|
popped ? cb(next) : next();
|
|
67
63
|
}
|
|
68
|
-
|
|
69
64
|
inTransition = true;
|
|
70
65
|
});
|
|
71
66
|
removeAfter = router == null ? void 0 : router.afterEach(() => {
|
|
@@ -74,16 +69,13 @@ export function useBackButton(router, cb) {
|
|
|
74
69
|
});
|
|
75
70
|
onScopeDispose(() => {
|
|
76
71
|
var _removeBefore, _removeAfter;
|
|
77
|
-
|
|
78
72
|
window.removeEventListener('popstate', onPopstate);
|
|
79
73
|
(_removeBefore = removeBefore) == null ? void 0 : _removeBefore();
|
|
80
74
|
(_removeAfter = removeAfter) == null ? void 0 : _removeAfter();
|
|
81
75
|
});
|
|
82
76
|
}
|
|
83
|
-
|
|
84
77
|
function onPopstate(e) {
|
|
85
78
|
var _e$state;
|
|
86
|
-
|
|
87
79
|
if ((_e$state = e.state) != null && _e$state.replaced) return;
|
|
88
80
|
popped = true;
|
|
89
81
|
setTimeout(() => popped = false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.mjs","names":["getCurrentInstance","IN_BROWSER","propsFactory","computed","nextTick","onScopeDispose","resolveDynamicComponent","toRef","useRoute","vm","proxy","$route","useRouter","$router","useLink","props","attrs","RouterLink","isLink","href","to","isClickable","value","onClick","onClickOnce","link","undefined","route","navigate","isActive","exact","isExactActive","makeRouterProps","String","replace","Boolean","Object","inTransition","useBackButton","router","cb","popped","removeBefore","removeAfter","window","addEventListener","onPopstate","beforeEach","from","next","setTimeout","afterEach","removeEventListener","e","state","replaced"],"sources":["../../src/composables/router.tsx"],"sourcesContent":["// Utilities\nimport { getCurrentInstance, IN_BROWSER, propsFactory } from '@/util'\nimport {\n computed,\n nextTick,\n onScopeDispose,\n resolveDynamicComponent,\n toRef,\n} from 'vue'\n\n// Types\nimport type { ComputedRef, PropType, Ref, SetupContext } from 'vue'\nimport type {\n RouterLink as _RouterLink,\n useLink as _useLink,\n NavigationGuardNext,\n RouteLocationNormalizedLoaded,\n RouteLocationRaw,\n Router,\n UseLinkOptions,\n} from 'vue-router'\n\nexport function useRoute (): Ref<RouteLocationNormalizedLoaded | undefined> {\n const vm = getCurrentInstance('useRoute')\n\n return computed(() => vm?.proxy?.$route)\n}\n\nexport function useRouter (): Router | undefined {\n return getCurrentInstance('useRouter')?.proxy?.$router\n}\n\nexport interface LinkProps {\n href: string | undefined\n replace: boolean | undefined\n to: RouteLocationRaw | undefined\n exact: boolean | undefined\n}\n\nexport interface UseLink extends Omit<Partial<ReturnType<typeof _useLink>>, 'href'> {\n isLink: ComputedRef<boolean>\n isClickable: ComputedRef<boolean>\n href: Ref<string | undefined>\n}\n\nexport function useLink (props: LinkProps, attrs: SetupContext['attrs']): UseLink {\n const RouterLink = resolveDynamicComponent('RouterLink') as typeof _RouterLink | string\n\n const isLink = computed(() => !!(props.href || props.to))\n const isClickable = computed(() => {\n return isLink?.value || !!(attrs.onClick || attrs.onClickOnce)\n })\n\n if (typeof RouterLink === 'string') {\n return {\n isLink,\n isClickable,\n href: toRef(props, 'href'),\n }\n }\n\n const link = props.to ? RouterLink.useLink(props as UseLinkOptions) : undefined\n\n return {\n isLink,\n isClickable,\n route: link?.route,\n navigate: link?.navigate,\n isActive: link && computed(() => props.exact ? link.isExactActive?.value : link.isActive?.value),\n href: computed(() => props.to ? link?.route.value.href : props.href),\n }\n}\n\nexport const makeRouterProps = propsFactory({\n href: String,\n replace: Boolean,\n to: [String, Object] as PropType<RouteLocationRaw>,\n exact: Boolean,\n}, 'router')\n\nlet inTransition = false\nexport function useBackButton (router: Router | undefined, cb: (next: NavigationGuardNext) => void) {\n let popped = false\n let removeBefore: (() => void) | undefined\n let removeAfter: (() => void) | undefined\n\n if (IN_BROWSER) {\n nextTick(() => {\n window.addEventListener('popstate', onPopstate)\n removeBefore = router?.beforeEach((to, from, next) => {\n if (!inTransition) {\n setTimeout(() => popped ? cb(next) : next())\n } else {\n popped ? cb(next) : next()\n }\n inTransition = true\n })\n removeAfter = router?.afterEach(() => {\n inTransition = false\n })\n })\n onScopeDispose(() => {\n window.removeEventListener('popstate', onPopstate)\n removeBefore?.()\n removeAfter?.()\n })\n }\n\n function onPopstate (e: PopStateEvent) {\n if (e.state?.replaced) return\n\n popped = true\n setTimeout(() => (popped = false))\n }\n}\n"],"mappings":"AAAA;SACSA,
|
|
1
|
+
{"version":3,"file":"router.mjs","names":["getCurrentInstance","IN_BROWSER","propsFactory","computed","nextTick","onScopeDispose","resolveDynamicComponent","toRef","useRoute","vm","proxy","$route","useRouter","$router","useLink","props","attrs","RouterLink","isLink","href","to","isClickable","value","onClick","onClickOnce","link","undefined","route","navigate","isActive","exact","isExactActive","makeRouterProps","String","replace","Boolean","Object","inTransition","useBackButton","router","cb","popped","removeBefore","removeAfter","window","addEventListener","onPopstate","beforeEach","from","next","setTimeout","afterEach","removeEventListener","e","state","replaced"],"sources":["../../src/composables/router.tsx"],"sourcesContent":["// Utilities\nimport { getCurrentInstance, IN_BROWSER, propsFactory } from '@/util'\nimport {\n computed,\n nextTick,\n onScopeDispose,\n resolveDynamicComponent,\n toRef,\n} from 'vue'\n\n// Types\nimport type { ComputedRef, PropType, Ref, SetupContext } from 'vue'\nimport type {\n RouterLink as _RouterLink,\n useLink as _useLink,\n NavigationGuardNext,\n RouteLocationNormalizedLoaded,\n RouteLocationRaw,\n Router,\n UseLinkOptions,\n} from 'vue-router'\n\nexport function useRoute (): Ref<RouteLocationNormalizedLoaded | undefined> {\n const vm = getCurrentInstance('useRoute')\n\n return computed(() => vm?.proxy?.$route)\n}\n\nexport function useRouter (): Router | undefined {\n return getCurrentInstance('useRouter')?.proxy?.$router\n}\n\nexport interface LinkProps {\n href: string | undefined\n replace: boolean | undefined\n to: RouteLocationRaw | undefined\n exact: boolean | undefined\n}\n\nexport interface UseLink extends Omit<Partial<ReturnType<typeof _useLink>>, 'href'> {\n isLink: ComputedRef<boolean>\n isClickable: ComputedRef<boolean>\n href: Ref<string | undefined>\n}\n\nexport function useLink (props: LinkProps, attrs: SetupContext['attrs']): UseLink {\n const RouterLink = resolveDynamicComponent('RouterLink') as typeof _RouterLink | string\n\n const isLink = computed(() => !!(props.href || props.to))\n const isClickable = computed(() => {\n return isLink?.value || !!(attrs.onClick || attrs.onClickOnce)\n })\n\n if (typeof RouterLink === 'string') {\n return {\n isLink,\n isClickable,\n href: toRef(props, 'href'),\n }\n }\n\n const link = props.to ? RouterLink.useLink(props as UseLinkOptions) : undefined\n\n return {\n isLink,\n isClickable,\n route: link?.route,\n navigate: link?.navigate,\n isActive: link && computed(() => props.exact ? link.isExactActive?.value : link.isActive?.value),\n href: computed(() => props.to ? link?.route.value.href : props.href),\n }\n}\n\nexport const makeRouterProps = propsFactory({\n href: String,\n replace: Boolean,\n to: [String, Object] as PropType<RouteLocationRaw>,\n exact: Boolean,\n}, 'router')\n\nlet inTransition = false\nexport function useBackButton (router: Router | undefined, cb: (next: NavigationGuardNext) => void) {\n let popped = false\n let removeBefore: (() => void) | undefined\n let removeAfter: (() => void) | undefined\n\n if (IN_BROWSER) {\n nextTick(() => {\n window.addEventListener('popstate', onPopstate)\n removeBefore = router?.beforeEach((to, from, next) => {\n if (!inTransition) {\n setTimeout(() => popped ? cb(next) : next())\n } else {\n popped ? cb(next) : next()\n }\n inTransition = true\n })\n removeAfter = router?.afterEach(() => {\n inTransition = false\n })\n })\n onScopeDispose(() => {\n window.removeEventListener('popstate', onPopstate)\n removeBefore?.()\n removeAfter?.()\n })\n }\n\n function onPopstate (e: PopStateEvent) {\n if (e.state?.replaced) return\n\n popped = true\n setTimeout(() => (popped = false))\n }\n}\n"],"mappings":"AAAA;AAAA,SACSA,kBAAkB,EAAEC,UAAU,EAAEC,YAAY;AACrD,SACEC,QAAQ,EACRC,QAAQ,EACRC,cAAc,EACdC,uBAAuB,EACvBC,KAAK,QACA,KAAK;;AAEZ;;AAYA,OAAO,SAASC,QAAQ,GAAoD;EAC1E,MAAMC,EAAE,GAAGT,kBAAkB,CAAC,UAAU,CAAC;EAEzC,OAAOG,QAAQ,CAAC;IAAA;IAAA,OAAMM,EAAE,iCAAFA,EAAE,CAAEC,KAAK,qBAAT,UAAWC,MAAM;EAAA,EAAC;AAC1C;AAEA,OAAO,SAASC,SAAS,GAAwB;EAAA;EAC/C,8BAAOZ,kBAAkB,CAAC,WAAW,CAAC,8CAA/B,oBAAiCU,KAAK,qBAAtC,sBAAwCG,OAAO;AACxD;AAeA,OAAO,SAASC,OAAO,CAAEC,KAAgB,EAAEC,KAA4B,EAAW;EAChF,MAAMC,UAAU,GAAGX,uBAAuB,CAAC,YAAY,CAAgC;EAEvF,MAAMY,MAAM,GAAGf,QAAQ,CAAC,MAAM,CAAC,EAAEY,KAAK,CAACI,IAAI,IAAIJ,KAAK,CAACK,EAAE,CAAC,CAAC;EACzD,MAAMC,WAAW,GAAGlB,QAAQ,CAAC,MAAM;IACjC,OAAO,CAAAe,MAAM,oBAAN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C,WAAqC;EAEzC,IAAI1C,UAAU,EAAE;IACdG,QAAQ,CAAC,MAAM;MACbwC,MAAM,CAACC,gBAAgB,CAAC,UAAU,EAAEC,UAAU,CAAC;MAC/CJ,YAAY,GAAGH,MAAM,oBAANA,MAAM,CAAEQ,UAAU,CAAC,CAAC3B,EAAE,EAAE4B,IAAI,EAAEC,IAAI,KAAK;QACpD,IAAI,CAACZ,YAAY,EAAE;UACjBa,UAAU,CAAC,MAAMT,MAAM,GAAGD,EAAE,CAACS,IAAI,CAAC,GAAGA,IAAI,EAAE,CAAC;QAC9C,CAAC,MAAM;UACLR,MAAM,GAAGD,EAAE,CAACS,IAAI,CAAC,GAAGA,IAAI,EAAE;QAC5B;QACAZ,YAAY,GAAG,IAAI;MACrB,CAAC,CAAC;MACFM,WAAW,GAAGJ,MAAM,oBAANA,MAAM,CAAEY,SAAS,CAAC,MAAM;QACpCd,YAAY,GAAG,KAAK;MACtB,CAAC,CAAC;IACJ,CAAC,CAAC;IACFhC,cAAc,CAAC,MAAM;MAAA;MACnBuC,MAAM,CAACQ,mBAAmB,CAAC,UAAU,EAAEN,UAAU,CAAC;MAClD,iBAAAJ,YAAY,qBAAZ,eAAgB;MAChB,gBAAAC,WAAW,qBAAX,cAAe;IACjB,CAAC,CAAC;EACJ;EAEA,SAASG,UAAU,CAAEO,CAAgB,EAAE;IAAA;IACrC,gBAAIA,CAAC,CAACC,KAAK,aAAP,SAASC,QAAQ,EAAE;IAEvBd,MAAM,GAAG,IAAI;IACbS,UAAU,CAAC,MAAOT,MAAM,GAAG,KAAM,CAAC;EACpC;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scopeId.mjs","names":["getCurrentInstance","useScopeId","vm","scopeId","vnode","undefined"],"sources":["../../src/composables/scopeId.ts"],"sourcesContent":["import { getCurrentInstance } from '@/util'\n\nexport function useScopeId () {\n const vm = getCurrentInstance('useScopeId')\n\n const scopeId = vm!.vnode.scopeId\n\n return { scopeId: scopeId ? { [scopeId]: '' } : undefined }\n}\n"],"mappings":"SAASA,
|
|
1
|
+
{"version":3,"file":"scopeId.mjs","names":["getCurrentInstance","useScopeId","vm","scopeId","vnode","undefined"],"sources":["../../src/composables/scopeId.ts"],"sourcesContent":["import { getCurrentInstance } from '@/util'\n\nexport function useScopeId () {\n const vm = getCurrentInstance('useScopeId')\n\n const scopeId = vm!.vnode.scopeId\n\n return { scopeId: scopeId ? { [scopeId]: '' } : undefined }\n}\n"],"mappings":"SAASA,kBAAkB;AAE3B,OAAO,SAASC,UAAU,GAAI;EAC5B,MAAMC,EAAE,GAAGF,kBAAkB,CAAC,YAAY,CAAC;EAE3C,MAAMG,OAAO,GAAGD,EAAE,CAAEE,KAAK,CAACD,OAAO;EAEjC,OAAO;IAAEA,OAAO,EAAEA,OAAO,GAAG;MAAE,CAACA,OAAO,GAAG;IAAG,CAAC,GAAGE;EAAU,CAAC;AAC7D"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// Utilities
|
|
2
2
|
import { computed, getCurrentInstance, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
|
3
3
|
import { consoleWarn, propsFactory } from "../util/index.mjs"; // Types
|
|
4
|
-
|
|
5
4
|
// Composables
|
|
6
5
|
export const makeScrollProps = propsFactory({
|
|
7
6
|
scrollTarget: {
|
|
@@ -28,7 +27,6 @@ export function useScroll(props) {
|
|
|
28
27
|
const computedScrollThreshold = computed(() => {
|
|
29
28
|
return Number(props.scrollThreshold ?? scrollThreshold ?? 300);
|
|
30
29
|
});
|
|
31
|
-
|
|
32
30
|
const onScroll = () => {
|
|
33
31
|
const targetEl = target.value;
|
|
34
32
|
if (!targetEl || canScroll && !canScroll.value) return;
|
|
@@ -37,7 +35,6 @@ export function useScroll(props) {
|
|
|
37
35
|
isScrollingUp.value = currentScroll.value < previousScroll;
|
|
38
36
|
currentThreshold.value = Math.abs(currentScroll.value - computedScrollThreshold.value);
|
|
39
37
|
};
|
|
40
|
-
|
|
41
38
|
watch(isScrollingUp, () => {
|
|
42
39
|
savedScroll.value = savedScroll.value || currentScroll.value;
|
|
43
40
|
});
|
|
@@ -47,14 +44,11 @@ export function useScroll(props) {
|
|
|
47
44
|
onMounted(() => {
|
|
48
45
|
watch(() => props.scrollTarget, scrollTarget => {
|
|
49
46
|
var _target$value;
|
|
50
|
-
|
|
51
47
|
const newTarget = scrollTarget ? document.querySelector(scrollTarget) : window;
|
|
52
|
-
|
|
53
48
|
if (!newTarget) {
|
|
54
49
|
consoleWarn(`Unable to locate element with identifier ${scrollTarget}`, getCurrentInstance());
|
|
55
50
|
return;
|
|
56
51
|
}
|
|
57
|
-
|
|
58
52
|
if (newTarget === target.value) return;
|
|
59
53
|
(_target$value = target.value) == null ? void 0 : _target$value.removeEventListener('scroll', onScroll);
|
|
60
54
|
target.value = newTarget;
|
|
@@ -67,7 +61,6 @@ export function useScroll(props) {
|
|
|
67
61
|
});
|
|
68
62
|
onBeforeUnmount(() => {
|
|
69
63
|
var _target$value2;
|
|
70
|
-
|
|
71
64
|
(_target$value2 = target.value) == null ? void 0 : _target$value2.removeEventListener('scroll', onScroll);
|
|
72
65
|
});
|
|
73
66
|
thresholdMetCallback && watch(() => Math.abs(currentScroll.value - savedScroll.value) > computedScrollThreshold.value, thresholdMet => {
|
|
@@ -78,9 +71,10 @@ export function useScroll(props) {
|
|
|
78
71
|
});
|
|
79
72
|
}, {
|
|
80
73
|
immediate: true
|
|
81
|
-
});
|
|
82
|
-
// there's no need to expose onScroll
|
|
74
|
+
});
|
|
83
75
|
|
|
76
|
+
// Do we need this? If yes - seems that
|
|
77
|
+
// there's no need to expose onScroll
|
|
84
78
|
canScroll && watch(canScroll, onScroll, {
|
|
85
79
|
immediate: true
|
|
86
80
|
});
|