@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,6 +1,5 @@
|
|
|
1
1
|
import { CircularBuffer } from "../util/index.mjs";
|
|
2
2
|
const HORIZON = 100; // ms
|
|
3
|
-
|
|
4
3
|
const HISTORY = 20; // number of samples to keep
|
|
5
4
|
|
|
6
5
|
/** @see https://android.googlesource.com/platform/frameworks/native/+/master/libs/input/VelocityTracker.cpp */
|
|
@@ -8,84 +7,67 @@ function kineticEnergyToVelocity(work) {
|
|
|
8
7
|
const sqrt2 = 1.41421356237;
|
|
9
8
|
return (work < 0 ? -1.0 : 1.0) * Math.sqrt(Math.abs(work)) * sqrt2;
|
|
10
9
|
}
|
|
10
|
+
|
|
11
11
|
/**
|
|
12
12
|
* Returns pointer velocity in px/s
|
|
13
13
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
14
|
export function calculateImpulseVelocity(samples) {
|
|
17
15
|
// The input should be in reversed time order (most recent sample at index i=0)
|
|
18
16
|
if (samples.length < 2) {
|
|
19
17
|
// if 0 or 1 points, velocity is zero
|
|
20
18
|
return 0;
|
|
21
|
-
}
|
|
19
|
+
}
|
|
20
|
+
// if (samples[1].t > samples[0].t) {
|
|
22
21
|
// // Algorithm will still work, but not perfectly
|
|
23
22
|
// consoleWarn('Samples provided to calculateImpulseVelocity in the wrong order')
|
|
24
23
|
// }
|
|
25
|
-
|
|
26
|
-
|
|
27
24
|
if (samples.length === 2) {
|
|
28
25
|
// if 2 points, basic linear calculation
|
|
29
26
|
if (samples[1].t === samples[0].t) {
|
|
30
27
|
// consoleWarn(`Events have identical time stamps t=${samples[0].t}, setting velocity = 0`)
|
|
31
28
|
return 0;
|
|
32
29
|
}
|
|
33
|
-
|
|
34
30
|
return (samples[1].d - samples[0].d) / (samples[1].t - samples[0].t);
|
|
35
|
-
}
|
|
31
|
+
}
|
|
32
|
+
// Guaranteed to have at least 3 points here
|
|
36
33
|
// start with the oldest sample and go forward in time
|
|
37
|
-
|
|
38
|
-
|
|
39
34
|
let work = 0;
|
|
40
|
-
|
|
41
35
|
for (let i = samples.length - 1; i > 0; i--) {
|
|
42
36
|
if (samples[i].t === samples[i - 1].t) {
|
|
43
37
|
// consoleWarn(`Events have identical time stamps t=${samples[i].t}, skipping sample`)
|
|
44
38
|
continue;
|
|
45
39
|
}
|
|
46
|
-
|
|
47
40
|
const vprev = kineticEnergyToVelocity(work); // v[i-1]
|
|
48
|
-
|
|
49
41
|
const vcurr = (samples[i].d - samples[i - 1].d) / (samples[i].t - samples[i - 1].t); // v[i]
|
|
50
|
-
|
|
51
42
|
work += (vcurr - vprev) * Math.abs(vcurr);
|
|
52
|
-
|
|
53
43
|
if (i === samples.length - 1) {
|
|
54
44
|
work *= 0.5;
|
|
55
45
|
}
|
|
56
46
|
}
|
|
57
|
-
|
|
58
47
|
return kineticEnergyToVelocity(work) * 1000;
|
|
59
48
|
}
|
|
60
49
|
export function useVelocity() {
|
|
61
50
|
const touches = {};
|
|
62
|
-
|
|
63
51
|
function addMovement(e) {
|
|
64
52
|
Array.from(e.changedTouches).forEach(touch => {
|
|
65
53
|
const samples = touches[touch.identifier] ?? (touches[touch.identifier] = new CircularBuffer(HISTORY));
|
|
66
54
|
samples.push([e.timeStamp, touch]);
|
|
67
55
|
});
|
|
68
56
|
}
|
|
69
|
-
|
|
70
57
|
function endTouch(e) {
|
|
71
58
|
Array.from(e.changedTouches).forEach(touch => {
|
|
72
59
|
delete touches[touch.identifier];
|
|
73
60
|
});
|
|
74
61
|
}
|
|
75
|
-
|
|
76
62
|
function getVelocity(id) {
|
|
77
63
|
var _touches$id;
|
|
78
|
-
|
|
79
64
|
const samples = (_touches$id = touches[id]) == null ? void 0 : _touches$id.values().reverse();
|
|
80
|
-
|
|
81
65
|
if (!samples) {
|
|
82
66
|
throw new Error(`No samples for touch id ${id}`);
|
|
83
67
|
}
|
|
84
|
-
|
|
85
68
|
const newest = samples[0];
|
|
86
69
|
const x = [];
|
|
87
70
|
const y = [];
|
|
88
|
-
|
|
89
71
|
for (const val of samples) {
|
|
90
72
|
if (newest[0] - val[0] > HORIZON) break;
|
|
91
73
|
x.push({
|
|
@@ -97,11 +79,9 @@ export function useVelocity() {
|
|
|
97
79
|
d: val[1].clientY
|
|
98
80
|
});
|
|
99
81
|
}
|
|
100
|
-
|
|
101
82
|
return {
|
|
102
83
|
x: calculateImpulseVelocity(x),
|
|
103
84
|
y: calculateImpulseVelocity(y),
|
|
104
|
-
|
|
105
85
|
get direction() {
|
|
106
86
|
const {
|
|
107
87
|
x,
|
|
@@ -110,17 +90,14 @@ export function useVelocity() {
|
|
|
110
90
|
const [absX, absY] = [Math.abs(x), Math.abs(y)];
|
|
111
91
|
return absX > absY && x >= 0 ? 'right' : absX > absY && x <= 0 ? 'left' : absY > absX && y >= 0 ? 'down' : absY > absX && y <= 0 ? 'up' : oops();
|
|
112
92
|
}
|
|
113
|
-
|
|
114
93
|
};
|
|
115
94
|
}
|
|
116
|
-
|
|
117
95
|
return {
|
|
118
96
|
addMovement,
|
|
119
97
|
endTouch,
|
|
120
98
|
getVelocity
|
|
121
99
|
};
|
|
122
100
|
}
|
|
123
|
-
|
|
124
101
|
function oops() {
|
|
125
102
|
throw new Error();
|
|
126
103
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"touch.mjs","names":["CircularBuffer","HORIZON","HISTORY","kineticEnergyToVelocity","work","sqrt2","Math","sqrt","abs","calculateImpulseVelocity","samples","length","t","d","i","vprev","vcurr","useVelocity","touches","addMovement","e","Array","from","changedTouches","forEach","touch","identifier","push","timeStamp","endTouch","getVelocity","id","values","reverse","Error","newest","x","y","val","clientX","clientY","direction","absX","absY","oops"],"sources":["../../src/composables/touch.ts"],"sourcesContent":["import { CircularBuffer } from '@/util'\n\nconst HORIZON = 100 // ms\nconst HISTORY = 20 // number of samples to keep\n\nexport interface Sample {\n t: number\n d: number\n}\n\n/** @see https://android.googlesource.com/platform/frameworks/native/+/master/libs/input/VelocityTracker.cpp */\nfunction kineticEnergyToVelocity (work: number) {\n const sqrt2 = 1.41421356237\n return (work < 0 ? -1.0 : 1.0) * Math.sqrt(Math.abs(work)) * sqrt2\n}\n\n/**\n * Returns pointer velocity in px/s\n */\nexport function calculateImpulseVelocity (samples: Sample[]) {\n // The input should be in reversed time order (most recent sample at index i=0)\n if (samples.length < 2) {\n // if 0 or 1 points, velocity is zero\n return 0\n }\n // if (samples[1].t > samples[0].t) {\n // // Algorithm will still work, but not perfectly\n // consoleWarn('Samples provided to calculateImpulseVelocity in the wrong order')\n // }\n if (samples.length === 2) {\n // if 2 points, basic linear calculation\n if (samples[1].t === samples[0].t) {\n // consoleWarn(`Events have identical time stamps t=${samples[0].t}, setting velocity = 0`)\n return 0\n }\n return (samples[1].d - samples[0].d) / (samples[1].t - samples[0].t)\n }\n // Guaranteed to have at least 3 points here\n // start with the oldest sample and go forward in time\n let work = 0\n for (let i = samples.length - 1; i > 0; i--) {\n if (samples[i].t === samples[i - 1].t) {\n // consoleWarn(`Events have identical time stamps t=${samples[i].t}, skipping sample`)\n continue\n }\n const vprev = kineticEnergyToVelocity(work) // v[i-1]\n const vcurr = (samples[i].d - samples[i - 1].d) / (samples[i].t - samples[i - 1].t) // v[i]\n work += (vcurr - vprev) * Math.abs(vcurr)\n if (i === samples.length - 1) {\n work *= 0.5\n }\n }\n return kineticEnergyToVelocity(work) * 1000\n}\n\nexport function useVelocity () {\n const touches: Record<number, CircularBuffer<[number, Touch]> | undefined> = {}\n\n function addMovement (e: TouchEvent) {\n Array.from(e.changedTouches).forEach(touch => {\n const samples = touches[touch.identifier] ?? (touches[touch.identifier] = new CircularBuffer(HISTORY))\n samples.push([e.timeStamp, touch])\n })\n }\n\n function endTouch (e: TouchEvent) {\n Array.from(e.changedTouches).forEach(touch => {\n delete touches[touch.identifier]\n })\n }\n\n function getVelocity (id: number) {\n const samples = touches[id]?.values().reverse()\n\n if (!samples) {\n throw new Error(`No samples for touch id ${id}`)\n }\n\n const newest = samples[0]\n const x: Sample[] = []\n const y: Sample[] = []\n for (const val of samples) {\n if (newest[0] - val[0] > HORIZON) break\n\n x.push({ t: val[0], d: val[1].clientX })\n y.push({ t: val[0], d: val[1].clientY })\n }\n\n return {\n x: calculateImpulseVelocity(x),\n y: calculateImpulseVelocity(y),\n get direction () {\n const { x, y } = this\n const [absX, absY] = [Math.abs(x), Math.abs(y)]\n\n return absX > absY && x >= 0 ? 'right'\n : absX > absY && x <= 0 ? 'left'\n : absY > absX && y >= 0 ? 'down'\n : absY > absX && y <= 0 ? 'up'\n : oops()\n },\n }\n }\n\n return { addMovement, endTouch, getVelocity }\n}\n\nfunction oops (): never {\n throw new Error()\n}\n"],"mappings":"SAASA,
|
|
1
|
+
{"version":3,"file":"touch.mjs","names":["CircularBuffer","HORIZON","HISTORY","kineticEnergyToVelocity","work","sqrt2","Math","sqrt","abs","calculateImpulseVelocity","samples","length","t","d","i","vprev","vcurr","useVelocity","touches","addMovement","e","Array","from","changedTouches","forEach","touch","identifier","push","timeStamp","endTouch","getVelocity","id","values","reverse","Error","newest","x","y","val","clientX","clientY","direction","absX","absY","oops"],"sources":["../../src/composables/touch.ts"],"sourcesContent":["import { CircularBuffer } from '@/util'\n\nconst HORIZON = 100 // ms\nconst HISTORY = 20 // number of samples to keep\n\nexport interface Sample {\n t: number\n d: number\n}\n\n/** @see https://android.googlesource.com/platform/frameworks/native/+/master/libs/input/VelocityTracker.cpp */\nfunction kineticEnergyToVelocity (work: number) {\n const sqrt2 = 1.41421356237\n return (work < 0 ? -1.0 : 1.0) * Math.sqrt(Math.abs(work)) * sqrt2\n}\n\n/**\n * Returns pointer velocity in px/s\n */\nexport function calculateImpulseVelocity (samples: Sample[]) {\n // The input should be in reversed time order (most recent sample at index i=0)\n if (samples.length < 2) {\n // if 0 or 1 points, velocity is zero\n return 0\n }\n // if (samples[1].t > samples[0].t) {\n // // Algorithm will still work, but not perfectly\n // consoleWarn('Samples provided to calculateImpulseVelocity in the wrong order')\n // }\n if (samples.length === 2) {\n // if 2 points, basic linear calculation\n if (samples[1].t === samples[0].t) {\n // consoleWarn(`Events have identical time stamps t=${samples[0].t}, setting velocity = 0`)\n return 0\n }\n return (samples[1].d - samples[0].d) / (samples[1].t - samples[0].t)\n }\n // Guaranteed to have at least 3 points here\n // start with the oldest sample and go forward in time\n let work = 0\n for (let i = samples.length - 1; i > 0; i--) {\n if (samples[i].t === samples[i - 1].t) {\n // consoleWarn(`Events have identical time stamps t=${samples[i].t}, skipping sample`)\n continue\n }\n const vprev = kineticEnergyToVelocity(work) // v[i-1]\n const vcurr = (samples[i].d - samples[i - 1].d) / (samples[i].t - samples[i - 1].t) // v[i]\n work += (vcurr - vprev) * Math.abs(vcurr)\n if (i === samples.length - 1) {\n work *= 0.5\n }\n }\n return kineticEnergyToVelocity(work) * 1000\n}\n\nexport function useVelocity () {\n const touches: Record<number, CircularBuffer<[number, Touch]> | undefined> = {}\n\n function addMovement (e: TouchEvent) {\n Array.from(e.changedTouches).forEach(touch => {\n const samples = touches[touch.identifier] ?? (touches[touch.identifier] = new CircularBuffer(HISTORY))\n samples.push([e.timeStamp, touch])\n })\n }\n\n function endTouch (e: TouchEvent) {\n Array.from(e.changedTouches).forEach(touch => {\n delete touches[touch.identifier]\n })\n }\n\n function getVelocity (id: number) {\n const samples = touches[id]?.values().reverse()\n\n if (!samples) {\n throw new Error(`No samples for touch id ${id}`)\n }\n\n const newest = samples[0]\n const x: Sample[] = []\n const y: Sample[] = []\n for (const val of samples) {\n if (newest[0] - val[0] > HORIZON) break\n\n x.push({ t: val[0], d: val[1].clientX })\n y.push({ t: val[0], d: val[1].clientY })\n }\n\n return {\n x: calculateImpulseVelocity(x),\n y: calculateImpulseVelocity(y),\n get direction () {\n const { x, y } = this\n const [absX, absY] = [Math.abs(x), Math.abs(y)]\n\n return absX > absY && x >= 0 ? 'right'\n : absX > absY && x <= 0 ? 'left'\n : absY > absX && y >= 0 ? 'down'\n : absY > absX && y <= 0 ? 'up'\n : oops()\n },\n }\n }\n\n return { addMovement, endTouch, getVelocity }\n}\n\nfunction oops (): never {\n throw new Error()\n}\n"],"mappings":"SAASA,cAAc;AAEvB,MAAMC,OAAO,GAAG,GAAG,EAAC;AACpB,MAAMC,OAAO,GAAG,EAAE,EAAC;;AAOnB;AACA,SAASC,uBAAuB,CAAEC,IAAY,EAAE;EAC9C,MAAMC,KAAK,GAAG,aAAa;EAC3B,OAAO,CAACD,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,IAAIE,IAAI,CAACC,IAAI,CAACD,IAAI,CAACE,GAAG,CAACJ,IAAI,CAAC,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ue';
|
|
3
3
|
import { propsFactory } from "../util/index.mjs"; // Types
|
|
4
|
-
|
|
5
4
|
export const makeTransitionProps = propsFactory({
|
|
6
5
|
transition: {
|
|
7
6
|
type: [Boolean, String, Object],
|
|
@@ -11,7 +10,6 @@ export const makeTransitionProps = propsFactory({
|
|
|
11
10
|
}, 'transition');
|
|
12
11
|
export const MaybeTransition = (props, _ref) => {
|
|
13
12
|
var _slots$default;
|
|
14
|
-
|
|
15
13
|
let {
|
|
16
14
|
slots
|
|
17
15
|
} = _ref;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transition.mjs","names":["h","mergeProps","Transition","propsFactory","makeTransitionProps","transition","type","Boolean","String","Object","default","validator","val","MaybeTransition","props","slots","rest","component","customProps","name"],"sources":["../../src/composables/transition.ts"],"sourcesContent":["// Utilities\nimport { h, mergeProps, Transition } from 'vue'\nimport { propsFactory } from '@/util'\n\n// Types\nimport type { Component, FunctionalComponent, PropType, TransitionProps } from 'vue'\n\nexport const makeTransitionProps = propsFactory({\n transition: {\n type: [Boolean, String, Object] as PropType<string | boolean | TransitionProps & { component?: Component }>,\n default: 'fade-transition',\n validator: val => val !== true,\n },\n}, 'transition')\n\ninterface MaybeTransitionProps extends TransitionProps {\n transition?: string | boolean | TransitionProps & { component?: any }\n}\n\nexport const MaybeTransition: FunctionalComponent<MaybeTransitionProps> = (props, { slots }) => {\n const { transition, ...rest } = props\n\n if (!transition || typeof transition === 'boolean') return slots.default?.()\n\n const { component = Transition, ...customProps } = typeof transition === 'object' ? transition : {}\n\n return h(\n component,\n mergeProps(typeof transition === 'string' ? { name: transition } : customProps as any, rest as any),\n slots\n )\n}\n"],"mappings":"AAAA;AACA,SAASA,
|
|
1
|
+
{"version":3,"file":"transition.mjs","names":["h","mergeProps","Transition","propsFactory","makeTransitionProps","transition","type","Boolean","String","Object","default","validator","val","MaybeTransition","props","slots","rest","component","customProps","name"],"sources":["../../src/composables/transition.ts"],"sourcesContent":["// Utilities\nimport { h, mergeProps, Transition } from 'vue'\nimport { propsFactory } from '@/util'\n\n// Types\nimport type { Component, FunctionalComponent, PropType, TransitionProps } from 'vue'\n\nexport const makeTransitionProps = propsFactory({\n transition: {\n type: [Boolean, String, Object] as PropType<string | boolean | TransitionProps & { component?: Component }>,\n default: 'fade-transition',\n validator: val => val !== true,\n },\n}, 'transition')\n\ninterface MaybeTransitionProps extends TransitionProps {\n transition?: string | boolean | TransitionProps & { component?: any }\n}\n\nexport const MaybeTransition: FunctionalComponent<MaybeTransitionProps> = (props, { slots }) => {\n const { transition, ...rest } = props\n\n if (!transition || typeof transition === 'boolean') return slots.default?.()\n\n const { component = Transition, ...customProps } = typeof transition === 'object' ? transition : {}\n\n return h(\n component,\n mergeProps(typeof transition === 'string' ? { name: transition } : customProps as any, rest as any),\n slots\n )\n}\n"],"mappings":"AAAA;AACA,SAASA,CAAC,EAAEC,UAAU,EAAEC,UAAU,QAAQ,KAAK;AAAA,SACtCC,YAAY,6BAErB;AAGA,OAAO,MAAMC,mBAAmB,GAAGD,YAAY,CAAC;EAC9CE,UAAU,EAAE;IACVC,IAAI,EAAE,CAACC,OAAO,EAAEC,MAAM,EAAEC,MAAM,CAA6E;IAC3GC,OAAO,EAAE,iBAAiB;IAC1BC,SAAS,EAAEC,GAAG,IAAIA,GAAG,KAAK;EAC5B;AACF,CAAC,EAAE,YAAY,CAAC;AAMhB,OAAO,MAAMC,eAA0D,GAAG,CAACC,KAAK,WAAgB;EAAA;EAAA,IAAd;IAAEC;EAAM,CAAC;EACzF,MAAM;IAAEV,UAAU;IAAE,GAAGW;EAAK,CAAC,GAAGF,KAAK;EAErC,IAAI,CAACT,UAAU,IAAI,OAAOA,UAAU,KAAK,SAAS,EAAE,yBAAOU,KAAK,CAACL,OAAO,qBAAb,oBAAAK,KAAK,CAAY;EAE5E,MAAM;IAAEE,SAAS,GAAGf,UAAU;IAAE,GAAGgB;EAAY,CAAC,GAAG,OAAOb,UAAU,KAAK,QAAQ,GAAGA,UAAU,GAAG,CAAC,CAAC;EAEnG,OAAOL,CAAC,CACNiB,SAAS,EACThB,UAAU,CAAC,OAAOI,UAAU,KAAK,QAAQ,GAAG;IAAEc,IAAI,EAAEd;EAAW,CAAC,GAAGa,WAAkB,EAAEF,IAAI,CAAQ,EACnGD,KAAK,CACN;AACH,CAAC"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
// Composables
|
|
2
2
|
import { useForm } from "./form.mjs";
|
|
3
3
|
import { useProxiedModel } from "./proxiedModel.mjs"; // Utilities
|
|
4
|
-
|
|
5
4
|
import { computed, onBeforeMount, onBeforeUnmount, onMounted, ref, unref, watch } from 'vue';
|
|
6
5
|
import { getCurrentInstanceName, getUid, propsFactory, wrapInArray } from "../util/index.mjs"; // Types
|
|
7
|
-
|
|
8
6
|
export const makeValidationProps = propsFactory({
|
|
9
7
|
disabled: Boolean,
|
|
10
8
|
error: Boolean,
|
|
@@ -25,7 +23,7 @@ export const makeValidationProps = propsFactory({
|
|
|
25
23
|
},
|
|
26
24
|
modelValue: null,
|
|
27
25
|
validationValue: null
|
|
28
|
-
});
|
|
26
|
+
}, 'validation');
|
|
29
27
|
export function useValidation(props) {
|
|
30
28
|
let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName();
|
|
31
29
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : getUid();
|
|
@@ -65,8 +63,9 @@ export function useValidation(props) {
|
|
|
65
63
|
});
|
|
66
64
|
onBeforeUnmount(() => {
|
|
67
65
|
form == null ? void 0 : form.unregister(uid.value);
|
|
68
|
-
});
|
|
66
|
+
});
|
|
69
67
|
|
|
68
|
+
// Set initial valid state, for inputs that might not have rules
|
|
70
69
|
onMounted(() => form == null ? void 0 : form.update(uid.value, isValid.value, errorMessages.value));
|
|
71
70
|
watch(validationModel, () => {
|
|
72
71
|
if (validationModel.value != null) validate();
|
|
@@ -74,45 +73,36 @@ export function useValidation(props) {
|
|
|
74
73
|
watch(isValid, () => {
|
|
75
74
|
form == null ? void 0 : form.update(uid.value, isValid.value, errorMessages.value);
|
|
76
75
|
});
|
|
77
|
-
|
|
78
76
|
function reset() {
|
|
79
77
|
resetValidation();
|
|
80
78
|
model.value = null;
|
|
81
79
|
}
|
|
82
|
-
|
|
83
80
|
function resetValidation() {
|
|
84
81
|
isPristine.value = true;
|
|
85
82
|
internalErrorMessages.value = [];
|
|
86
83
|
}
|
|
87
|
-
|
|
88
84
|
async function validate() {
|
|
89
85
|
const results = [];
|
|
90
86
|
isValidating.value = true;
|
|
91
|
-
|
|
92
87
|
for (const rule of props.rules) {
|
|
93
88
|
if (results.length >= (props.maxErrors || 1)) {
|
|
94
89
|
break;
|
|
95
90
|
}
|
|
96
|
-
|
|
97
91
|
const handler = typeof rule === 'function' ? rule : () => rule;
|
|
98
92
|
const result = await handler(validationModel.value);
|
|
99
93
|
if (result === true) continue;
|
|
100
|
-
|
|
101
94
|
if (typeof result !== 'string') {
|
|
102
95
|
// eslint-disable-next-line no-console
|
|
103
96
|
console.warn(`${result} is not a valid value. Rule functions must return boolean true or a string.`);
|
|
104
97
|
continue;
|
|
105
98
|
}
|
|
106
|
-
|
|
107
99
|
results.push(result);
|
|
108
100
|
}
|
|
109
|
-
|
|
110
101
|
internalErrorMessages.value = results;
|
|
111
102
|
isValidating.value = false;
|
|
112
103
|
isPristine.value = false;
|
|
113
104
|
return internalErrorMessages.value;
|
|
114
105
|
}
|
|
115
|
-
|
|
116
106
|
return {
|
|
117
107
|
errorMessages,
|
|
118
108
|
isDirty,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.mjs","names":["useForm","useProxiedModel","computed","onBeforeMount","onBeforeUnmount","onMounted","ref","unref","watch","getCurrentInstanceName","getUid","propsFactory","wrapInArray","makeValidationProps","disabled","Boolean","error","errorMessages","type","Array","String","default","maxErrors","Number","name","label","readonly","rules","modelValue","validationValue","useValidation","props","id","model","validationModel","undefined","value","form","internalErrorMessages","isPristine","isDirty","length","isDisabled","isReadonly","isValid","isValidating","validationClasses","uid","register","validate","reset","resetValidation","unregister","update","results","rule","handler","result","console","warn","push"],"sources":["../../src/composables/validation.ts"],"sourcesContent":["// Composables\nimport { useForm } from '@/composables/form'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, onBeforeMount, onBeforeUnmount, onMounted, ref, unref, watch } from 'vue'\nimport { getCurrentInstanceName, getUid, propsFactory, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { MaybeRef } from '@/util'\n\nexport type ValidationResult = string | boolean\nexport type ValidationRule =\n | ValidationResult\n | PromiseLike<ValidationResult>\n | ((value: any) => ValidationResult)\n | ((value: any) => PromiseLike<ValidationResult>)\n\nexport interface ValidationProps {\n disabled: boolean\n error: boolean\n errorMessages: string | string[]\n maxErrors: string | number\n name: string | undefined\n label: string | undefined\n readonly: boolean\n rules: ValidationRule[]\n modelValue: any\n 'onUpdate:modelValue': ((val: any) => void) | undefined\n validationValue: any\n}\n\nexport const makeValidationProps = propsFactory({\n disabled: Boolean,\n error: Boolean,\n errorMessages: {\n type: [Array, String] as PropType<string | string[]>,\n default: () => ([]),\n },\n maxErrors: {\n type: [Number, String],\n default: 1,\n },\n name: String,\n label: String,\n readonly: Boolean,\n rules: {\n type: Array as PropType<ValidationRule[]>,\n default: () => ([]),\n },\n modelValue: null,\n validationValue: null,\n})\n\nexport function useValidation (\n props: ValidationProps,\n name = getCurrentInstanceName(),\n id: MaybeRef<string | number> = getUid(),\n) {\n const model = useProxiedModel(props, 'modelValue')\n const validationModel = computed(() => props.validationValue === undefined ? model.value : props.validationValue)\n const form = useForm()\n const internalErrorMessages = ref<string[]>([])\n const isPristine = ref(true)\n const isDirty = computed(() => !!(\n wrapInArray(model.value === '' ? null : model.value).length ||\n wrapInArray(validationModel.value === '' ? null : validationModel.value).length\n ))\n const isDisabled = computed(() => !!(props.disabled || form?.isDisabled.value))\n const isReadonly = computed(() => !!(props.readonly || form?.isReadonly.value))\n const errorMessages = computed(() => {\n return props.errorMessages.length\n ? wrapInArray(props.errorMessages)\n : internalErrorMessages.value\n })\n const isValid = computed(() => {\n if (props.error || errorMessages.value.length) return false\n if (!props.rules.length) return true\n\n return isPristine.value ? null : true\n })\n const isValidating = ref(false)\n const validationClasses = computed(() => {\n return {\n [`${name}--error`]: isValid.value === false,\n [`${name}--dirty`]: isDirty.value,\n [`${name}--disabled`]: isDisabled.value,\n [`${name}--readonly`]: isReadonly.value,\n }\n })\n\n const uid = computed(() => props.name ?? unref(id))\n\n onBeforeMount(() => {\n form?.register({\n id: uid.value,\n validate,\n reset,\n resetValidation,\n })\n })\n\n onBeforeUnmount(() => {\n form?.unregister(uid.value)\n })\n\n // Set initial valid state, for inputs that might not have rules\n onMounted(() => form?.update(uid.value, isValid.value, errorMessages.value))\n\n watch(validationModel, () => {\n if (validationModel.value != null) validate()\n })\n\n watch(isValid, () => {\n form?.update(uid.value, isValid.value, errorMessages.value)\n })\n\n function reset () {\n resetValidation()\n model.value = null\n }\n\n function resetValidation () {\n isPristine.value = true\n internalErrorMessages.value = []\n }\n\n async function validate () {\n const results = []\n\n isValidating.value = true\n\n for (const rule of props.rules) {\n if (results.length >= (props.maxErrors || 1)) {\n break\n }\n\n const handler = typeof rule === 'function' ? rule : () => rule\n const result = await handler(validationModel.value)\n\n if (result === true) continue\n\n if (typeof result !== 'string') {\n // eslint-disable-next-line no-console\n console.warn(`${result} is not a valid value. Rule functions must return boolean true or a string.`)\n\n continue\n }\n\n results.push(result)\n }\n\n internalErrorMessages.value = results\n isValidating.value = false\n isPristine.value = false\n\n return internalErrorMessages.value\n }\n\n return {\n errorMessages,\n isDirty,\n isDisabled,\n isReadonly,\n isPristine,\n isValid,\n isValidating,\n reset,\n resetValidation,\n validate,\n validationClasses,\n }\n}\n"],"mappings":"AAAA;SACSA,
|
|
1
|
+
{"version":3,"file":"validation.mjs","names":["useForm","useProxiedModel","computed","onBeforeMount","onBeforeUnmount","onMounted","ref","unref","watch","getCurrentInstanceName","getUid","propsFactory","wrapInArray","makeValidationProps","disabled","Boolean","error","errorMessages","type","Array","String","default","maxErrors","Number","name","label","readonly","rules","modelValue","validationValue","useValidation","props","id","model","validationModel","undefined","value","form","internalErrorMessages","isPristine","isDirty","length","isDisabled","isReadonly","isValid","isValidating","validationClasses","uid","register","validate","reset","resetValidation","unregister","update","results","rule","handler","result","console","warn","push"],"sources":["../../src/composables/validation.ts"],"sourcesContent":["// Composables\nimport { useForm } from '@/composables/form'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, onBeforeMount, onBeforeUnmount, onMounted, ref, unref, watch } from 'vue'\nimport { getCurrentInstanceName, getUid, propsFactory, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { MaybeRef } from '@/util'\n\nexport type ValidationResult = string | boolean\nexport type ValidationRule =\n | ValidationResult\n | PromiseLike<ValidationResult>\n | ((value: any) => ValidationResult)\n | ((value: any) => PromiseLike<ValidationResult>)\n\nexport interface ValidationProps {\n disabled: boolean\n error: boolean\n errorMessages: string | string[]\n maxErrors: string | number\n name: string | undefined\n label: string | undefined\n readonly: boolean\n rules: ValidationRule[]\n modelValue: any\n 'onUpdate:modelValue': ((val: any) => void) | undefined\n validationValue: any\n}\n\nexport const makeValidationProps = propsFactory({\n disabled: Boolean,\n error: Boolean,\n errorMessages: {\n type: [Array, String] as PropType<string | string[]>,\n default: () => ([]),\n },\n maxErrors: {\n type: [Number, String],\n default: 1,\n },\n name: String,\n label: String,\n readonly: Boolean,\n rules: {\n type: Array as PropType<ValidationRule[]>,\n default: () => ([]),\n },\n modelValue: null,\n validationValue: null,\n}, 'validation')\n\nexport function useValidation (\n props: ValidationProps,\n name = getCurrentInstanceName(),\n id: MaybeRef<string | number> = getUid(),\n) {\n const model = useProxiedModel(props, 'modelValue')\n const validationModel = computed(() => props.validationValue === undefined ? model.value : props.validationValue)\n const form = useForm()\n const internalErrorMessages = ref<string[]>([])\n const isPristine = ref(true)\n const isDirty = computed(() => !!(\n wrapInArray(model.value === '' ? null : model.value).length ||\n wrapInArray(validationModel.value === '' ? null : validationModel.value).length\n ))\n const isDisabled = computed(() => !!(props.disabled || form?.isDisabled.value))\n const isReadonly = computed(() => !!(props.readonly || form?.isReadonly.value))\n const errorMessages = computed(() => {\n return props.errorMessages.length\n ? wrapInArray(props.errorMessages)\n : internalErrorMessages.value\n })\n const isValid = computed(() => {\n if (props.error || errorMessages.value.length) return false\n if (!props.rules.length) return true\n\n return isPristine.value ? null : true\n })\n const isValidating = ref(false)\n const validationClasses = computed(() => {\n return {\n [`${name}--error`]: isValid.value === false,\n [`${name}--dirty`]: isDirty.value,\n [`${name}--disabled`]: isDisabled.value,\n [`${name}--readonly`]: isReadonly.value,\n }\n })\n\n const uid = computed(() => props.name ?? unref(id))\n\n onBeforeMount(() => {\n form?.register({\n id: uid.value,\n validate,\n reset,\n resetValidation,\n })\n })\n\n onBeforeUnmount(() => {\n form?.unregister(uid.value)\n })\n\n // Set initial valid state, for inputs that might not have rules\n onMounted(() => form?.update(uid.value, isValid.value, errorMessages.value))\n\n watch(validationModel, () => {\n if (validationModel.value != null) validate()\n })\n\n watch(isValid, () => {\n form?.update(uid.value, isValid.value, errorMessages.value)\n })\n\n function reset () {\n resetValidation()\n model.value = null\n }\n\n function resetValidation () {\n isPristine.value = true\n internalErrorMessages.value = []\n }\n\n async function validate () {\n const results = []\n\n isValidating.value = true\n\n for (const rule of props.rules) {\n if (results.length >= (props.maxErrors || 1)) {\n break\n }\n\n const handler = typeof rule === 'function' ? rule : () => rule\n const result = await handler(validationModel.value)\n\n if (result === true) continue\n\n if (typeof result !== 'string') {\n // eslint-disable-next-line no-console\n console.warn(`${result} is not a valid value. Rule functions must return boolean true or a string.`)\n\n continue\n }\n\n results.push(result)\n }\n\n internalErrorMessages.value = results\n isValidating.value = false\n isPristine.value = false\n\n return internalErrorMessages.value\n }\n\n return {\n errorMessages,\n isDirty,\n isDisabled,\n isReadonly,\n isPristine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G,KAAK,GAAG,IAAI;EACpB;EAEA,SAASe,eAAe,GAAI;IAC1BZ,UAAU,CAACH,KAAK,GAAG,IAAI;IACvBE,qBAAqB,CAACF,KAAK,GAAG,EAAE;EAClC;EAEA,eAAea,QAAQ,GAAI;IACzB,MAAMK,OAAO,GAAG,EAAE;IAElBT,YAAY,CAACT,KAAK,GAAG,IAAI;IAEzB,KAAK,MAAMmB,IAAI,IAAIxB,KAAK,CAACJ,KAAK,EAAE;MAC9B,IAAI2B,OAAO,CAACb,MAAM,KAAKV,KAAK,CAACT,SAAS,IAAI,CAAC,CAAC,EAAE;QAC5C;MACF;MAEA,MAAMkC,OAAO,GAAG,OAAOD,IAAI,KAAK,UAAU,GAAGA,IAAI,GAAG,MAAMA,IAAI;MAC9D,MAAME,MAAM,GAAG,MAAMD,OAAO,CAACtB,eAAe,CAACE,KAAK,CAAC;MAEnD,IAAIqB,MAAM,KAAK,IAAI,EAAE;MAErB,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;QAC9B;QACAC,OAAO,CAACC,IAAI,CAAE,GAAEF,MAAO,6EAA4E,CAAC;QAEpG;MACF;MAEAH,OAAO,CAACM,IAAI,CAACH,MAAM,CAAC;IACtB;IAEAnB,qBAAqB,CAACF,KAAK,GAAGkB,OAAO;IACrCT,YAAY,CAACT,KAAK,GAAG,KAAK;IAC1BG,UAAU,CAACH,KAAK,GAAG,KAAK;IAExB,OAAOE,qBAAqB,CAACF,KAAK;EACpC;EAEA,OAAO;IACLnB,aAAa;IACbuB,OAAO;IACPE,UAAU;IACVC,UAAU;IACVJ,UAAU;IACVK,OAAO;IACPC,YAAY;IACZK,KAAK;IACLC,eAAe;IACfF,QAAQ;IACRH;EACF,CAAC;AACH"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { createVNode as _createVNode, Fragment as _Fragment } from "vue";
|
|
2
2
|
// Composables
|
|
3
3
|
import { useColor } from "./color.mjs"; // Utilities
|
|
4
|
-
|
|
5
4
|
import { computed, unref } from 'vue';
|
|
6
5
|
import { getCurrentInstanceName, propsFactory } from "../util/index.mjs"; // Types
|
|
7
|
-
|
|
8
6
|
export const allowedVariants = ['elevated', 'flat', 'tonal', 'outlined', 'text', 'plain'];
|
|
9
7
|
export function genOverlays(isClickable, name) {
|
|
10
8
|
return _createVNode(_Fragment, null, [isClickable && _createVNode("span", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variant.mjs","names":["useColor","computed","unref","getCurrentInstanceName","propsFactory","allowedVariants","genOverlays","isClickable","name","makeVariantProps","color","String","variant","type","default","validator","v","includes","useVariant","props","variantClasses","colorClasses","colorStyles"],"sources":["../../src/composables/variant.tsx"],"sourcesContent":["// Composables\nimport { useColor } from '@/composables/color'\n\n// Utilities\nimport { computed, unref } from 'vue'\nimport { getCurrentInstanceName, propsFactory } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { MaybeRef } from '@/util'\n\nexport const allowedVariants = [\n 'elevated',\n 'flat',\n 'tonal',\n 'outlined',\n 'text',\n 'plain',\n] as const\n\nexport type Variant = typeof allowedVariants[number]\n\nexport interface VariantProps {\n color?: string\n variant: Variant\n}\n\nexport function genOverlays (isClickable: boolean, name: string) {\n return (\n <>\n { isClickable && <span key=\"overlay\" class={`${name}__overlay`} /> }\n\n <span key=\"underlay\" class={`${name}__underlay`} />\n </>\n )\n}\n\nexport const makeVariantProps = propsFactory({\n color: String,\n variant: {\n type: String as PropType<Variant>,\n default: 'elevated',\n validator: (v: any) => allowedVariants.includes(v),\n },\n}, 'variant')\n\nexport function useVariant (\n props: MaybeRef<VariantProps>,\n name = getCurrentInstanceName(),\n) {\n const variantClasses = computed(() => {\n const { variant } = unref(props)\n return `${name}--variant-${variant}`\n })\n\n const { colorClasses, colorStyles } = useColor(computed(() => {\n const { variant, color } = unref(props)\n return {\n [['elevated', 'flat'].includes(variant) ? 'background' : 'text']: color,\n }\n }))\n\n return { colorClasses, colorStyles, variantClasses }\n}\n"],"mappings":";AAAA;SACSA,
|
|
1
|
+
{"version":3,"file":"variant.mjs","names":["useColor","computed","unref","getCurrentInstanceName","propsFactory","allowedVariants","genOverlays","isClickable","name","makeVariantProps","color","String","variant","type","default","validator","v","includes","useVariant","props","variantClasses","colorClasses","colorStyles"],"sources":["../../src/composables/variant.tsx"],"sourcesContent":["// Composables\nimport { useColor } from '@/composables/color'\n\n// Utilities\nimport { computed, unref } from 'vue'\nimport { getCurrentInstanceName, propsFactory } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { MaybeRef } from '@/util'\n\nexport const allowedVariants = [\n 'elevated',\n 'flat',\n 'tonal',\n 'outlined',\n 'text',\n 'plain',\n] as const\n\nexport type Variant = typeof allowedVariants[number]\n\nexport interface VariantProps {\n color?: string\n variant: Variant\n}\n\nexport function genOverlays (isClickable: boolean, name: string) {\n return (\n <>\n { isClickable && <span key=\"overlay\" class={`${name}__overlay`} /> }\n\n <span key=\"underlay\" class={`${name}__underlay`} />\n </>\n )\n}\n\nexport const makeVariantProps = propsFactory({\n color: String,\n variant: {\n type: String as PropType<Variant>,\n default: 'elevated',\n validator: (v: any) => allowedVariants.includes(v),\n },\n}, 'variant')\n\nexport function useVariant (\n props: MaybeRef<VariantProps>,\n name = getCurrentInstanceName(),\n) {\n const variantClasses = computed(() => {\n const { variant } = unref(props)\n return `${name}--variant-${variant}`\n })\n\n const { colorClasses, colorStyles } = useColor(computed(() => {\n const { variant, color } = unref(props)\n return {\n [['elevated', 'flat'].includes(variant) ? 'background' : 'text']: color,\n }\n }))\n\n return { colorClasses, colorStyles, variantClasses }\n}\n"],"mappings":";AAAA;AAAA,SACSA,QAAQ,uBAEjB;AACA,SAASC,QAAQ,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC5BC,sBAAsB,EAAEC,YAAY,6BAE7C;AAIA,OAAO,MAAMC,eAAe,GAAG,CAC7B,UAAU,EACV,MAAM,EACN,OAAO,EACP,UAAU,EACV,MAAM,EACN,OAAO,CACC;AASV,OAAO,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(e, el, binding) {
|
|
8
6
|
// The include element callbacks below can be expensive
|
|
9
7
|
// so we should avoid calling them when we're not active.
|
|
10
8
|
// Explicitly check for false to allow fallback compatibility
|
|
11
9
|
// with non-toggleable components
|
|
12
|
-
if (!e || checkIsActive(e, binding) === false) return false;
|
|
10
|
+
if (!e || checkIsActive(e, binding) === false) return false;
|
|
11
|
+
|
|
12
|
+
// If we're clicking inside the shadowroot, then the app root doesn't get the same
|
|
13
13
|
// level of introspection as to _what_ we're clicking. We want to check to see if
|
|
14
14
|
// our target is the shadowroot parent container, and if it is, ignore.
|
|
15
|
-
|
|
16
15
|
const root = attachedRoot(el);
|
|
17
|
-
if (typeof ShadowRoot !== 'undefined' && root instanceof ShadowRoot && root.host === e.target) return false;
|
|
18
|
-
// (click must be outside all included elements, if any)
|
|
19
|
-
|
|
20
|
-
const elements = (typeof binding.value === 'object' && binding.value.include || (() => []))(); // Add the root element for the component this directive was defined on
|
|
16
|
+
if (typeof ShadowRoot !== 'undefined' && root instanceof ShadowRoot && root.host === e.target) return false;
|
|
21
17
|
|
|
18
|
+
// Check if additional elements were passed to be included in check
|
|
19
|
+
// (click must be outside all included elements, if any)
|
|
20
|
+
const elements = (typeof binding.value === 'object' && binding.value.include || (() => []))();
|
|
21
|
+
// Add the root element for the component this directive was defined on
|
|
22
|
+
elements.push(el);
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
// Check if it's a click outside our elements, and then if our callback returns true.
|
|
24
25
|
// Non-toggleable components should take action in their callback and return falsy.
|
|
25
26
|
// Toggleable can return true if it wants to deactivate.
|
|
26
27
|
// Note that, because we're in the capture phase, this callback will occur before
|
|
27
28
|
// the bubbling click event on any outside elements.
|
|
28
|
-
|
|
29
29
|
return !elements.some(el => el == null ? void 0 : el.contains(e.target));
|
|
30
30
|
}
|
|
31
|
-
|
|
32
31
|
function checkIsActive(e, binding) {
|
|
33
32
|
const isActive = typeof binding.value === 'object' && binding.value.closeConditional || defaultConditional;
|
|
34
33
|
return isActive(e);
|
|
35
34
|
}
|
|
36
|
-
|
|
37
35
|
function directive(e, el, binding) {
|
|
38
36
|
const handler = typeof binding.value === 'function' ? binding.value : binding.value.handler;
|
|
39
37
|
el._clickOutside.lastMousedownWasOutside && checkEvent(e, el, binding) && setTimeout(() => {
|
|
40
38
|
checkIsActive(e, binding) && handler && handler(e);
|
|
41
39
|
}, 0);
|
|
42
40
|
}
|
|
43
|
-
|
|
44
41
|
function handleShadow(el, callback) {
|
|
45
42
|
const root = attachedRoot(el);
|
|
46
43
|
callback(document);
|
|
47
|
-
|
|
48
44
|
if (typeof ShadowRoot !== 'undefined' && root instanceof ShadowRoot) {
|
|
49
45
|
callback(root);
|
|
50
46
|
}
|
|
51
47
|
}
|
|
52
|
-
|
|
53
48
|
export const ClickOutside = {
|
|
54
49
|
// [data-app] may not be found
|
|
55
50
|
// if using bind, inserted makes
|
|
@@ -58,33 +53,27 @@ export const ClickOutside = {
|
|
|
58
53
|
// clicks on body
|
|
59
54
|
mounted(el, binding) {
|
|
60
55
|
const onClick = e => directive(e, el, binding);
|
|
61
|
-
|
|
62
56
|
const onMousedown = e => {
|
|
63
57
|
el._clickOutside.lastMousedownWasOutside = checkEvent(e, el, binding);
|
|
64
58
|
};
|
|
65
|
-
|
|
66
59
|
handleShadow(el, app => {
|
|
67
60
|
app.addEventListener('click', onClick, true);
|
|
68
61
|
app.addEventListener('mousedown', onMousedown, true);
|
|
69
62
|
});
|
|
70
|
-
|
|
71
63
|
if (!el._clickOutside) {
|
|
72
64
|
el._clickOutside = {
|
|
73
65
|
lastMousedownWasOutside: true
|
|
74
66
|
};
|
|
75
67
|
}
|
|
76
|
-
|
|
77
68
|
el._clickOutside[binding.instance.$.uid] = {
|
|
78
69
|
onClick,
|
|
79
70
|
onMousedown
|
|
80
71
|
};
|
|
81
72
|
},
|
|
82
|
-
|
|
83
73
|
unmounted(el, binding) {
|
|
84
74
|
if (!el._clickOutside) return;
|
|
85
75
|
handleShadow(el, app => {
|
|
86
76
|
var _el$_clickOutside;
|
|
87
|
-
|
|
88
77
|
if (!app || !((_el$_clickOutside = el._clickOutside) != null && _el$_clickOutside[binding.instance.$.uid])) return;
|
|
89
78
|
const {
|
|
90
79
|
onClick,
|
|
@@ -95,7 +84,6 @@ export const ClickOutside = {
|
|
|
95
84
|
});
|
|
96
85
|
delete el._clickOutside[binding.instance.$.uid];
|
|
97
86
|
}
|
|
98
|
-
|
|
99
87
|
};
|
|
100
88
|
export default ClickOutside;
|
|
101
89
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["attachedRoot","defaultConditional","checkEvent","e","el","binding","checkIsActive","root","ShadowRoot","host","target","elements","value","include","push","some","contains","isActive","closeConditional","directive","handler","_clickOutside","lastMousedownWasOutside","setTimeout","handleShadow","callback","document","ClickOutside","mounted","onClick","onMousedown","app","addEventListener","instance","$","uid","unmounted","removeEventListener"],"sources":["../../../src/directives/click-outside/index.ts"],"sourcesContent":["import { attachedRoot } from '@/util'\nimport type { DirectiveBinding } from 'vue'\n\ninterface ClickOutsideBindingArgs {\n handler: (e: MouseEvent) => void\n closeConditional?: (e: Event) => boolean\n include?: () => HTMLElement[]\n}\n\ninterface ClickOutsideDirectiveBinding extends DirectiveBinding {\n value: ((e: MouseEvent) => void) | ClickOutsideBindingArgs\n}\n\nfunction defaultConditional () {\n return true\n}\n\nfunction checkEvent (e: MouseEvent, el: HTMLElement, binding: ClickOutsideDirectiveBinding): boolean {\n // The include element callbacks below can be expensive\n // so we should avoid calling them when we're not active.\n // Explicitly check for false to allow fallback compatibility\n // with non-toggleable components\n if (!e || checkIsActive(e, binding) === false) return false\n\n // If we're clicking inside the shadowroot, then the app root doesn't get the same\n // level of introspection as to _what_ we're clicking. We want to check to see if\n // our target is the shadowroot parent container, and if it is, ignore.\n const root = attachedRoot(el)\n if (\n typeof ShadowRoot !== 'undefined' &&\n root instanceof ShadowRoot &&\n root.host === e.target\n ) return false\n\n // Check if additional elements were passed to be included in check\n // (click must be outside all included elements, if any)\n const elements = ((typeof binding.value === 'object' && binding.value.include) || (() => []))()\n // Add the root element for the component this directive was defined on\n elements.push(el)\n\n // Check if it's a click outside our elements, and then if our callback returns true.\n // Non-toggleable components should take action in their callback and return falsy.\n // Toggleable can return true if it wants to deactivate.\n // Note that, because we're in the capture phase, this callback will occur before\n // the bubbling click event on any outside elements.\n return !elements.some(el => el?.contains(e.target as Node))\n}\n\nfunction checkIsActive (e: MouseEvent, binding: ClickOutsideDirectiveBinding): boolean | void {\n const isActive = (typeof binding.value === 'object' && binding.value.closeConditional) || defaultConditional\n\n return isActive(e)\n}\n\nfunction directive (e: MouseEvent, el: HTMLElement, binding: ClickOutsideDirectiveBinding) {\n const handler = typeof binding.value === 'function' ? binding.value : binding.value.handler\n\n el._clickOutside!.lastMousedownWasOutside && checkEvent(e, el, binding) && setTimeout(() => {\n checkIsActive(e, binding) && handler && handler(e)\n }, 0)\n}\n\nfunction handleShadow (el: HTMLElement, callback: Function): void {\n const root = attachedRoot(el)\n\n callback(document)\n\n if (typeof ShadowRoot !== 'undefined' && root instanceof ShadowRoot) {\n callback(root)\n }\n}\n\nexport const ClickOutside = {\n // [data-app] may not be found\n // if using bind, inserted makes\n // sure that the root element is\n // available, iOS does not support\n // clicks on body\n mounted (el: HTMLElement, binding: ClickOutsideDirectiveBinding) {\n const onClick = (e: Event) => directive(e as MouseEvent, el, binding)\n const onMousedown = (e: Event) => {\n el._clickOutside!.lastMousedownWasOutside = checkEvent(e as MouseEvent, el, binding)\n }\n\n handleShadow(el, (app: HTMLElement) => {\n app.addEventListener('click', onClick, true)\n app.addEventListener('mousedown', onMousedown, true)\n })\n\n if (!el._clickOutside) {\n el._clickOutside = {\n lastMousedownWasOutside: true,\n }\n }\n\n el._clickOutside[binding.instance!.$.uid] = {\n onClick,\n onMousedown,\n }\n },\n\n unmounted (el: HTMLElement, binding: ClickOutsideDirectiveBinding) {\n if (!el._clickOutside) return\n\n handleShadow(el, (app: HTMLElement) => {\n if (!app || !el._clickOutside?.[binding.instance!.$.uid]) return\n\n const { onClick, onMousedown } = el._clickOutside[binding.instance!.$.uid]!\n\n app.removeEventListener('click', onClick, true)\n app.removeEventListener('mousedown', onMousedown, true)\n })\n\n delete el._clickOutside[binding.instance!.$.uid]\n },\n}\n\nexport default ClickOutside\n"],"mappings":"SAASA,
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["attachedRoot","defaultConditional","checkEvent","e","el","binding","checkIsActive","root","ShadowRoot","host","target","elements","value","include","push","some","contains","isActive","closeConditional","directive","handler","_clickOutside","lastMousedownWasOutside","setTimeout","handleShadow","callback","document","ClickOutside","mounted","onClick","onMousedown","app","addEventListener","instance","$","uid","unmounted","removeEventListener"],"sources":["../../../src/directives/click-outside/index.ts"],"sourcesContent":["import { attachedRoot } from '@/util'\nimport type { DirectiveBinding } from 'vue'\n\ninterface ClickOutsideBindingArgs {\n handler: (e: MouseEvent) => void\n closeConditional?: (e: Event) => boolean\n include?: () => HTMLElement[]\n}\n\ninterface ClickOutsideDirectiveBinding extends DirectiveBinding {\n value: ((e: MouseEvent) => void) | ClickOutsideBindingArgs\n}\n\nfunction defaultConditional () {\n return true\n}\n\nfunction checkEvent (e: MouseEvent, el: HTMLElement, binding: ClickOutsideDirectiveBinding): boolean {\n // The include element callbacks below can be expensive\n // so we should avoid calling them when we're not active.\n // Explicitly check for false to allow fallback compatibility\n // with non-toggleable components\n if (!e || checkIsActive(e, binding) === false) return false\n\n // If we're clicking inside the shadowroot, then the app root doesn't get the same\n // level of introspection as to _what_ we're clicking. We want to check to see if\n // our target is the shadowroot parent container, and if it is, ignore.\n const root = attachedRoot(el)\n if (\n typeof ShadowRoot !== 'undefined' &&\n root instanceof ShadowRoot &&\n root.host === e.target\n ) return false\n\n // Check if additional elements were passed to be included in check\n // (click must be outside all included elements, if any)\n const elements = ((typeof binding.value === 'object' && binding.value.include) || (() => []))()\n // Add the root element for the component this directive was defined on\n elements.push(el)\n\n // Check if it's a click outside our elements, and then if our callback returns true.\n // Non-toggleable components should take action in their callback and return falsy.\n // Toggleable can return true if it wants to deactivate.\n // Note that, because we're in the capture phase, this callback will occur before\n // the bubbling click event on any outside elements.\n return !elements.some(el => el?.contains(e.target as Node))\n}\n\nfunction checkIsActive (e: MouseEvent, binding: ClickOutsideDirectiveBinding): boolean | void {\n const isActive = (typeof binding.value === 'object' && binding.value.closeConditional) || defaultConditional\n\n return isActive(e)\n}\n\nfunction directive (e: MouseEvent, el: HTMLElement, binding: ClickOutsideDirectiveBinding) {\n const handler = typeof binding.value === 'function' ? binding.value : binding.value.handler\n\n el._clickOutside!.lastMousedownWasOutside && checkEvent(e, el, binding) && setTimeout(() => {\n checkIsActive(e, binding) && handler && handler(e)\n }, 0)\n}\n\nfunction handleShadow (el: HTMLElement, callback: Function): void {\n const root = attachedRoot(el)\n\n callback(document)\n\n if (typeof ShadowRoot !== 'undefined' && root instanceof ShadowRoot) {\n callback(root)\n }\n}\n\nexport const ClickOutside = {\n // [data-app] may not be found\n // if using bind, inserted makes\n // sure that the root element is\n // available, iOS does not support\n // clicks on body\n mounted (el: HTMLElement, binding: ClickOutsideDirectiveBinding) {\n const onClick = (e: Event) => directive(e as MouseEvent, el, binding)\n const onMousedown = (e: Event) => {\n el._clickOutside!.lastMousedownWasOutside = checkEvent(e as MouseEvent, el, binding)\n }\n\n handleShadow(el, (app: HTMLElement) => {\n app.addEventListener('click', onClick, true)\n app.addEventListener('mousedown', onMousedown, true)\n })\n\n if (!el._clickOutside) {\n el._clickOutside = {\n lastMousedownWasOutside: true,\n }\n }\n\n el._clickOutside[binding.instance!.$.uid] = {\n onClick,\n onMousedown,\n }\n },\n\n unmounted (el: HTMLElement, binding: ClickOutsideDirectiveBinding) {\n if (!el._clickOutside) return\n\n handleShadow(el, (app: HTMLElement) => {\n if (!app || !el._clickOutside?.[binding.instance!.$.uid]) return\n\n const { onClick, onMousedown } = el._clickOutside[binding.instance!.$.uid]!\n\n app.removeEventListener('click', onClick, true)\n app.removeEventListener('mousedown', onMousedown, true)\n })\n\n delete el._clickOutside[binding.instance!.$.uid]\n },\n}\n\nexport default ClickOutside\n"],"mappings":"SAASA,YAAY;AAarB,SAASC,kBAAkB,GAAI;EAC7B,OAAO,IAAI;AACb;AAEA,SAASC,UAAU,CAAEC,CAAa,EAAEC,EAAe,EAAEC,OAAqC,EAAW;EACnG;EACA;EACA;EACA;EACA,IAAI,CAACF,CAAC,IAAIG,aAAa,CAACH,CAAC,EAAEE,OAAO,CAAC,KAAK,KAAK,EAAE,OAAO,KAAK;;EAE3D;EACA;EACA;EACA,MAAME,IAAI,GAAGP,YAAY,CAACI,EAAE,CAAC;EAC7B,IACE,OAAOI,UAAU,KAAK,WAAW,IACjCD,IAAI,YAAYC,UAAU,IAC1BD,IAAI,CAACE,IAAI,KAAKN,CAAC,CAACO,MAAM,EACtB,OAAO,KAAK;;EAEd;EACA;EACA,MAAMC,QAAQ,GAAG,CAAE,OAAON,OAAO,CAACO,KAAK,KAAK,QAAQ,IAAIP,OAAO,CAACO,KAAK,CAACC,OAAO,KAAM,MAAM,EAAE,CAAC,GAAG;EAC/F;EACAF,QAAQ,CAACG,IAAI,CAACV,EAAE,CAAC;;EAEjB;EACA;EACA;EACA;EACA;EACA,OAAO,CAACO,QAAQ,CAACI,IAAI,CAACX,EAAE,IAAIA,EAAE,oBAAFA,EAAE,CAAEY,QAAQ,CAACb,CAAC,CAACO,MAAM,CAAS,CAAC;AAC7D;AAEA,SAASJ,aAAa,CAAEH,CAAa,EAAEE,OAAqC,EAAkB;EAC5F,MAAMY,QAAQ,GAAI,OAAOZ,OAAO,CAACO,KAAK,KAAK,QAAQ,IAAIP,OAAO,CAACO,KAAK,CAACM,gBAAgB,IAAKjB,kBAAkB;EAE5G,OAAOgB,QAAQ,CAACd,CAAC,CAAC;AACpB;AAEA,SAASgB,SAAS,CAAEhB,CAAa,EAAEC,EAAe,EAAEC,OAAqC,EAAE;EACzF,MAAMe,OAAO,GAAG,OAAOf,OAA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EAAE,CAACiB,aAAa,GAAG;QACjBC,uBAAuB,EAAE;MAC3B,CAAC;IACH;IAEAlB,EAAE,CAACiB,aAAa,CAAChB,OAAO,CAAC4B,QAAQ,CAAEC,CAAC,CAACC,GAAG,CAAC,GAAG;MAC1CN,OAAO;MACPC;IACF,CAAC;EACH,CAAC;EAEDM,SAAS,CAAEhC,EAAe,EAAEC,OAAqC,EAAE;IACjE,IAAI,CAACD,EAAE,CAACiB,aAAa,EAAE;IAEvBG,YAAY,CAACpB,EAAE,EAAG2B,GAAgB,IAAK;MAAA;MACrC,IAAI,CAACA,GAAG,IAAI,uBAAC3B,EAAE,CAACiB,aAAa,aAAhB,kBAAmBhB,OAAO,CAAC4B,QAAQ,CAAEC,CAAC,CAACC,GAAG,CAAC,GAAE;MAE1D,MAAM;QAAEN,OAAO;QAAEC;MAAY,CAAC,GAAG1B,EAAE,CAACiB,aAAa,CAAChB,OAAO,CAAC4B,QAAQ,CAAEC,CAAC,CAACC,GAAG,CAAE;MAE3EJ,GAAG,CAACM,mBAAmB,CAAC,OAAO,EAAER,OAAO,EAAE,IAAI,CAAC;MAC/CE,GAAG,CAACM,mBAAmB,CAAC,WAAW,EAAEP,WAAW,EAAE,IAAI,CAAC;IACzD,CAAC,CAAC;IAEF,OAAO1B,EAAE,CAACiB,aAAa,CAAChB,OAAO,CAAC4B,QAAQ,CAAEC,CAAC,CAACC,GAAG,CAAC;EAClD;AACF,CAAC;AAED,eAAeR,YAAY"}
|
|
@@ -1,43 +1,34 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
|
|
3
2
|
/* eslint-disable */
|
|
4
3
|
// Utilities
|
|
5
4
|
import { classToHex, isCssColor, parseGradient } from "../../util/colorUtils.mjs";
|
|
6
5
|
import colors from "../../util/colors.mjs"; // Types
|
|
7
|
-
|
|
8
6
|
function setTextColor(el, color, currentTheme) {
|
|
9
7
|
const cssColor = !isCssColor(color) ? classToHex(color, colors, currentTheme) : color;
|
|
10
8
|
el.style.color = cssColor;
|
|
11
9
|
el.style.caretColor = cssColor;
|
|
12
10
|
}
|
|
13
|
-
|
|
14
11
|
function setBackgroundColor(el, color, currentTheme) {
|
|
15
12
|
const cssColor = !isCssColor(color) ? classToHex(color, colors, currentTheme) : color;
|
|
16
13
|
el.style.backgroundColor = cssColor;
|
|
17
14
|
el.style.borderColor = cssColor;
|
|
18
15
|
}
|
|
19
|
-
|
|
20
16
|
function setBorderColor(el, color, currentTheme, modifiers) {
|
|
21
17
|
const cssColor = !isCssColor(color) ? classToHex(color, colors, currentTheme) : color;
|
|
22
|
-
|
|
23
18
|
if (!modifiers || !Object.keys(modifiers).length) {
|
|
24
19
|
el.style.borderColor = cssColor;
|
|
25
20
|
return;
|
|
26
21
|
}
|
|
27
|
-
|
|
28
22
|
if (modifiers.top) el.style.borderTopColor = cssColor;
|
|
29
23
|
if (modifiers.right) el.style.borderRightColor = cssColor;
|
|
30
24
|
if (modifiers.bottom) el.style.borderBottomColor = cssColor;
|
|
31
25
|
if (modifiers.left) el.style.borderLeftColor = cssColor;
|
|
32
26
|
}
|
|
33
|
-
|
|
34
27
|
function setGradientColor(el, gradient, currentTheme) {
|
|
35
28
|
el.style.backgroundImage = `linear-gradient(${parseGradient(gradient, colors, currentTheme)})`;
|
|
36
29
|
}
|
|
37
|
-
|
|
38
30
|
function updateColor(el, binding, node) {
|
|
39
31
|
const currentTheme = node.context.$vuetify.theme.currentTheme;
|
|
40
|
-
|
|
41
32
|
if (binding.arg === undefined) {
|
|
42
33
|
setBackgroundColor(el, binding.value, currentTheme);
|
|
43
34
|
} else if (binding.arg === 'text') {
|
|
@@ -48,12 +39,10 @@ function updateColor(el, binding, node) {
|
|
|
48
39
|
setGradientColor(el, binding.value, currentTheme);
|
|
49
40
|
}
|
|
50
41
|
}
|
|
51
|
-
|
|
52
42
|
function update(el, binding, node) {
|
|
53
43
|
if (binding.value === binding.oldValue) return;
|
|
54
44
|
updateColor(el, binding, node);
|
|
55
45
|
}
|
|
56
|
-
|
|
57
46
|
export const Color = {
|
|
58
47
|
bind: updateColor,
|
|
59
48
|
update
|