@vuetify/nightly 3.0.0-alpha.3 → 3.0.0-beta.2
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 +41 -98
- package/dist/json/attributes.json +5378 -0
- package/dist/json/importMap.json +585 -0
- package/dist/json/tags.json +1933 -0
- package/dist/json/web-types.json +18314 -0
- package/dist/vuetify.css +12154 -8451
- package/dist/vuetify.d.ts +15974 -0
- package/dist/vuetify.esm.js +17658 -0
- package/dist/vuetify.esm.js.map +1 -0
- package/dist/vuetify.js +16972 -9378
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +6 -3
- package/dist/vuetify.min.js +1466 -5252
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAlert/VAlert.css +214 -0
- package/lib/components/VAlert/VAlert.mjs +157 -206
- package/lib/components/VAlert/VAlert.mjs.map +1 -1
- package/lib/components/VAlert/VAlert.sass +106 -159
- package/lib/components/VAlert/VAlertTitle.mjs +4 -0
- package/lib/components/VAlert/VAlertTitle.mjs.map +1 -0
- package/lib/components/VAlert/_variables.scss +50 -14
- package/lib/components/VAlert/index.mjs +2 -3
- package/lib/components/VAlert/index.mjs.map +1 -1
- package/lib/components/VApp/VApp.css +29 -0
- package/lib/components/VApp/VApp.mjs +36 -22
- package/lib/components/VApp/VApp.mjs.map +1 -1
- package/lib/components/VApp/VApp.sass +1 -4
- package/lib/components/VApp/index.mjs +1 -1
- package/lib/components/VApp/index.mjs.map +1 -1
- package/lib/components/VAppBar/VAppBar.css +10 -0
- package/lib/components/VAppBar/VAppBar.mjs +63 -227
- package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
- package/lib/components/VAppBar/VAppBar.sass +8 -54
- package/lib/components/VAppBar/VAppBarNavIcon.mjs +24 -25
- package/lib/components/VAppBar/VAppBarNavIcon.mjs.map +1 -1
- package/lib/components/VAppBar/VAppBarTitle.mjs +15 -62
- package/lib/components/VAppBar/VAppBarTitle.mjs.map +1 -1
- package/lib/components/VAppBar/_variables.scss +39 -4
- package/lib/components/VAppBar/index.mjs +3 -11
- package/lib/components/VAppBar/index.mjs.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.css +57 -0
- package/lib/components/VAutocomplete/VAutocomplete.mjs +240 -357
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.sass +69 -33
- package/lib/components/VAutocomplete/_variables.scss +7 -4
- package/lib/components/VAutocomplete/index.mjs +1 -3
- package/lib/components/VAutocomplete/index.mjs.map +1 -1
- package/lib/components/VAvatar/VAvatar.css +43 -0
- package/lib/components/VAvatar/VAvatar.mjs +49 -27
- package/lib/components/VAvatar/VAvatar.mjs.map +1 -1
- package/lib/components/VAvatar/VAvatar.sass +9 -13
- package/lib/components/VAvatar/_mixins.scss +32 -0
- package/lib/components/VAvatar/_variables.scss +19 -8
- package/lib/components/VAvatar/index.mjs +1 -1
- package/lib/components/VAvatar/index.mjs.map +1 -1
- package/lib/components/VBadge/VBadge.css +74 -0
- package/lib/components/VBadge/VBadge.mjs +51 -35
- package/lib/components/VBadge/VBadge.mjs.map +1 -1
- package/lib/components/VBadge/VBadge.sass +5 -5
- package/lib/components/VBadge/_variables.scss +11 -3
- package/lib/components/VBadge/index.mjs +1 -1
- package/lib/components/VBadge/index.mjs.map +1 -1
- package/lib/components/VBanner/VBanner.css +157 -0
- package/lib/components/VBanner/VBanner.mjs +75 -46
- package/lib/components/VBanner/VBanner.mjs.map +1 -1
- package/lib/components/VBanner/VBanner.sass +80 -122
- package/lib/components/VBanner/VBannerActions.mjs +35 -0
- package/lib/components/VBanner/VBannerActions.mjs.map +1 -0
- package/lib/components/VBanner/VBannerAvatar.mjs +20 -0
- package/lib/components/VBanner/VBannerAvatar.mjs.map +1 -0
- package/lib/components/VBanner/VBannerIcon.mjs +20 -0
- package/lib/components/VBanner/VBannerIcon.mjs.map +1 -0
- package/lib/components/VBanner/VBannerText.mjs +3 -0
- package/lib/components/VBanner/VBannerText.mjs.map +1 -0
- package/lib/components/VBanner/_variables.scss +37 -45
- package/lib/components/VBanner/index.mjs +5 -1
- package/lib/components/VBanner/index.mjs.map +1 -1
- package/lib/components/VBottomNavigation/VBottomNavigation.css +61 -0
- package/lib/components/VBottomNavigation/VBottomNavigation.mjs +104 -111
- package/lib/components/VBottomNavigation/VBottomNavigation.mjs.map +1 -1
- package/lib/components/VBottomNavigation/VBottomNavigation.sass +48 -74
- package/lib/components/VBottomNavigation/_variables.scss +42 -6
- package/lib/components/VBottomNavigation/index.mjs +1 -3
- package/lib/components/VBottomNavigation/index.mjs.map +1 -1
- package/lib/components/VBottomSheet/VBottomSheet.mjs +1 -1
- package/lib/components/VBottomSheet/VBottomSheet.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbs.css +48 -0
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +81 -51
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbs.sass +26 -30
- package/lib/components/VBreadcrumbs/VBreadcrumbsDivider.mjs +2 -5
- package/lib/components/VBreadcrumbs/VBreadcrumbsDivider.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs +56 -35
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/_variables.scss +15 -7
- package/lib/components/VBreadcrumbs/index.mjs +3 -11
- package/lib/components/VBreadcrumbs/index.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/shared.mjs +2 -0
- package/lib/components/VBreadcrumbs/shared.mjs.map +1 -0
- package/lib/components/VBtn/VBtn.css +319 -0
- package/lib/components/VBtn/VBtn.mjs +103 -67
- package/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/lib/components/VBtn/VBtn.sass +101 -34
- package/lib/components/VBtn/_mixins.scss +31 -7
- package/lib/components/VBtn/_variables.scss +66 -29
- package/lib/components/VBtn/index.mjs +1 -1
- package/lib/components/VBtn/index.mjs.map +1 -1
- package/lib/components/VBtnGroup/VBtnGroup.css +57 -0
- package/lib/components/VBtnGroup/VBtnGroup.mjs +67 -0
- package/lib/components/VBtnGroup/VBtnGroup.mjs.map +1 -0
- package/lib/components/VBtnGroup/VBtnGroup.sass +52 -0
- package/lib/components/VBtnGroup/_variables.scss +25 -0
- package/lib/components/VBtnGroup/index.mjs +2 -0
- package/lib/components/VBtnGroup/index.mjs.map +1 -0
- package/lib/components/VBtnToggle/VBtnToggle.css +3 -0
- package/lib/components/VBtnToggle/VBtnToggle.mjs +45 -39
- package/lib/components/VBtnToggle/VBtnToggle.mjs.map +1 -1
- package/lib/components/VBtnToggle/VBtnToggle.sass +5 -95
- package/lib/components/VBtnToggle/_variables.scss +3 -10
- package/lib/components/VBtnToggle/index.mjs +1 -3
- package/lib/components/VBtnToggle/index.mjs.map +1 -1
- package/lib/components/VCalendar/VCalendar.mjs +15 -6
- package/lib/components/VCalendar/VCalendar.mjs.map +1 -1
- package/lib/components/VCalendar/VCalendarCategory.mjs +5 -4
- package/lib/components/VCalendar/VCalendarCategory.mjs.map +1 -1
- package/lib/components/VCalendar/VCalendarCategory.sass +67 -0
- package/lib/components/VCalendar/VCalendarDaily.mjs +1 -1
- package/lib/components/VCalendar/VCalendarDaily.mjs.map +1 -1
- package/lib/components/VCalendar/VCalendarMonthly.mjs +1 -1
- package/lib/components/VCalendar/VCalendarMonthly.mjs.map +1 -1
- package/lib/components/VCalendar/VCalendarWeekly.mjs +1 -1
- package/lib/components/VCalendar/VCalendarWeekly.mjs.map +1 -1
- package/lib/components/VCalendar/_variables.scss +4 -0
- package/lib/components/VCalendar/mixins/calendar-base.mjs +5 -4
- package/lib/components/VCalendar/mixins/calendar-base.mjs.map +1 -1
- package/lib/components/VCalendar/mixins/calendar-with-events.mjs +40 -33
- package/lib/components/VCalendar/mixins/calendar-with-events.mjs.map +1 -1
- package/lib/components/VCalendar/mixins/calendar-with-events.sass +7 -1
- package/lib/components/VCalendar/mixins/calendar-with-intervals.mjs +2 -1
- package/lib/components/VCalendar/mixins/calendar-with-intervals.mjs.map +1 -1
- package/lib/components/VCalendar/mixins/mouse.mjs +20 -1
- package/lib/components/VCalendar/mixins/mouse.mjs.map +1 -1
- package/lib/components/VCalendar/modes/common.mjs +7 -3
- package/lib/components/VCalendar/modes/common.mjs.map +1 -1
- package/lib/components/VCalendar/modes/stack.mjs +2 -1
- package/lib/components/VCalendar/modes/stack.mjs.map +1 -1
- package/lib/components/VCalendar/util/events.mjs +8 -3
- package/lib/components/VCalendar/util/events.mjs.map +1 -1
- package/lib/components/VCalendar/util/parser.mjs +1 -3
- package/lib/components/VCalendar/util/parser.mjs.map +1 -1
- package/lib/components/VCalendar/util/timestamp.mjs +24 -12
- package/lib/components/VCalendar/util/timestamp.mjs.map +1 -1
- package/lib/components/VCard/VCard.css +270 -0
- package/lib/components/VCard/VCard.mjs +163 -65
- package/lib/components/VCard/VCard.mjs.map +1 -1
- package/lib/components/VCard/VCard.sass +147 -119
- package/lib/components/VCard/VCardActions.mjs +29 -0
- package/lib/components/VCard/VCardActions.mjs.map +1 -0
- package/lib/components/VCard/VCardAvatar.mjs +3 -0
- package/lib/components/VCard/VCardAvatar.mjs.map +1 -0
- package/lib/components/VCard/VCardContent.mjs +3 -0
- package/lib/components/VCard/VCardContent.mjs.map +1 -0
- package/lib/components/VCard/VCardHeader.mjs +3 -0
- package/lib/components/VCard/VCardHeader.mjs.map +1 -0
- package/lib/components/VCard/VCardHeaderText.mjs +3 -0
- package/lib/components/VCard/VCardHeaderText.mjs.map +1 -0
- package/lib/components/VCard/VCardImg.mjs +3 -0
- package/lib/components/VCard/VCardImg.mjs.map +1 -0
- package/lib/components/VCard/VCardSubtitle.mjs +3 -0
- package/lib/components/VCard/VCardSubtitle.mjs.map +1 -0
- package/lib/components/VCard/VCardText.mjs +3 -0
- package/lib/components/VCard/VCardText.mjs.map +1 -0
- package/lib/components/VCard/VCardTitle.mjs +3 -0
- package/lib/components/VCard/VCardTitle.mjs.map +1 -0
- package/lib/components/VCard/_mixins.scss +13 -0
- package/lib/components/VCard/_variables.scss +106 -26
- package/lib/components/VCard/index.mjs +10 -16
- package/lib/components/VCard/index.mjs.map +1 -1
- package/lib/components/VCarousel/VCarousel.css +63 -0
- package/lib/components/VCarousel/VCarousel.mjs +99 -185
- package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
- package/lib/components/VCarousel/VCarousel.sass +7 -2
- package/lib/components/VCarousel/VCarouselItem.mjs +22 -42
- package/lib/components/VCarousel/VCarouselItem.mjs.map +1 -1
- package/lib/components/VCarousel/_variables.scss +1 -3
- package/lib/components/VCarousel/index.mjs +2 -9
- package/lib/components/VCarousel/index.mjs.map +1 -1
- package/lib/components/VCheckbox/VCheckbox.css +3 -0
- package/lib/components/VCheckbox/VCheckbox.mjs +56 -83
- package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
- package/lib/components/VCheckbox/VCheckbox.sass +8 -8
- package/lib/components/VCheckbox/_variables.scss +2 -4
- package/lib/components/VCheckbox/index.mjs +1 -9
- package/lib/components/VCheckbox/index.mjs.map +1 -1
- package/lib/components/VChip/VChip.css +276 -0
- package/lib/components/VChip/VChip.mjs +153 -143
- package/lib/components/VChip/VChip.mjs.map +1 -1
- package/lib/components/VChip/VChip.sass +41 -177
- package/lib/components/VChip/_mixins.scss +65 -0
- package/lib/components/VChip/_variables.scss +48 -49
- package/lib/components/VChip/index.mjs +1 -3
- package/lib/components/VChip/index.mjs.map +1 -1
- package/lib/components/VChipGroup/VChipGroup.css +18 -0
- package/lib/components/VChipGroup/VChipGroup.mjs +66 -38
- package/lib/components/VChipGroup/VChipGroup.mjs.map +1 -1
- package/lib/components/VChipGroup/VChipGroup.sass +11 -17
- package/lib/components/VChipGroup/_variables.scss +3 -5
- package/lib/components/VChipGroup/index.mjs +1 -3
- package/lib/components/VChipGroup/index.mjs.map +1 -1
- package/lib/components/VCode/VCode.css +7 -0
- package/lib/components/VCode/VCode.sass +9 -0
- package/lib/components/VCode/_variables.scss +5 -0
- package/lib/components/VCode/index.mjs +4 -0
- package/lib/components/VCode/index.mjs.map +1 -0
- package/lib/components/VColorPicker/VColorPicker.css +21 -0
- package/lib/components/VColorPicker/VColorPicker.mjs +103 -133
- package/lib/components/VColorPicker/VColorPicker.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPicker.sass +10 -17
- package/lib/components/VColorPicker/VColorPickerCanvas.css +21 -0
- package/lib/components/VColorPicker/VColorPickerCanvas.mjs +139 -121
- package/lib/components/VColorPicker/VColorPickerCanvas.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerCanvas.sass +5 -3
- package/lib/components/VColorPicker/VColorPickerEdit.css +31 -0
- package/lib/components/VColorPicker/VColorPickerEdit.mjs +74 -134
- package/lib/components/VColorPicker/VColorPickerEdit.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerEdit.sass +9 -6
- package/lib/components/VColorPicker/VColorPickerPreview.css +67 -0
- package/lib/components/VColorPicker/VColorPickerPreview.mjs +65 -83
- package/lib/components/VColorPicker/VColorPickerPreview.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerPreview.sass +42 -39
- package/lib/components/VColorPicker/VColorPickerSwatches.css +35 -0
- package/lib/components/VColorPicker/VColorPickerSwatches.mjs +34 -54
- package/lib/components/VColorPicker/VColorPickerSwatches.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerSwatches.sass +6 -4
- package/lib/components/VColorPicker/_variables.scss +5 -9
- package/lib/components/VColorPicker/index.mjs +1 -5
- package/lib/components/VColorPicker/index.mjs.map +1 -1
- package/lib/components/VColorPicker/util/index.mjs +141 -97
- package/lib/components/VColorPicker/util/index.mjs.map +1 -1
- package/lib/components/VCombobox/VCombobox.css +66 -0
- package/lib/components/VCombobox/VCombobox.mjs +336 -200
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/VCombobox.sass +91 -0
- package/lib/components/VCombobox/_variables.scss +8 -0
- package/lib/components/VCombobox/index.mjs +1 -3
- package/lib/components/VCombobox/index.mjs.map +1 -1
- package/lib/components/VCounter/VCounter.css +6 -0
- package/lib/components/VCounter/VCounter.mjs +36 -27
- package/lib/components/VCounter/VCounter.mjs.map +1 -1
- package/lib/components/VCounter/VCounter.sass +5 -7
- package/lib/components/VCounter/_variables.scss +3 -2
- package/lib/components/VCounter/index.mjs +1 -3
- package/lib/components/VCounter/index.mjs.map +1 -1
- package/lib/components/VData/VData.mjs +8 -3
- package/lib/components/VData/VData.mjs.map +1 -1
- package/lib/components/VDataIterator/VDataFooter.mjs +1 -1
- package/lib/components/VDataIterator/VDataFooter.mjs.map +1 -1
- package/lib/components/VDataIterator/VDataIterator.mjs +20 -8
- package/lib/components/VDataIterator/VDataIterator.mjs.map +1 -1
- package/lib/components/VDataIterator/_variables.scss +2 -2
- package/lib/components/VDataTable/MobileRow.mjs +6 -5
- package/lib/components/VDataTable/MobileRow.mjs.map +1 -1
- package/lib/components/VDataTable/Row.mjs +20 -12
- package/lib/components/VDataTable/Row.mjs.map +1 -1
- package/lib/components/VDataTable/RowGroup.mjs +5 -4
- package/lib/components/VDataTable/RowGroup.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTable.mjs +11 -6
- package/lib/components/VDataTable/VDataTable.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTable.sass +5 -0
- package/lib/components/VDataTable/VDataTableHeader.mjs +7 -6
- package/lib/components/VDataTable/VDataTableHeader.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaderDesktop.mjs +3 -3
- package/lib/components/VDataTable/VDataTableHeaderDesktop.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaderMobile.mjs +2 -2
- package/lib/components/VDataTable/VDataTableHeaderMobile.mjs.map +1 -1
- package/lib/components/VDataTable/VEditDialog.mjs +7 -6
- package/lib/components/VDataTable/VEditDialog.mjs.map +1 -1
- package/lib/components/VDataTable/VVirtualTable.mjs +2 -2
- package/lib/components/VDataTable/VVirtualTable.mjs.map +1 -1
- package/lib/components/VDataTable/_variables.scss +2 -2
- package/lib/components/VDatePicker/VDatePicker.mjs +13 -13
- package/lib/components/VDatePicker/VDatePicker.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerDateTable.mjs +5 -5
- package/lib/components/VDatePicker/VDatePickerDateTable.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerHeader.mjs +5 -5
- package/lib/components/VDatePicker/VDatePickerHeader.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonthTable.mjs +2 -2
- package/lib/components/VDatePicker/VDatePickerMonthTable.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerTitle.mjs +2 -2
- package/lib/components/VDatePicker/VDatePickerTitle.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerYears.mjs +4 -4
- package/lib/components/VDatePicker/VDatePickerYears.mjs.map +1 -1
- package/lib/components/VDatePicker/mixins/date-picker-table.mjs +20 -9
- package/lib/components/VDatePicker/mixins/date-picker-table.mjs.map +1 -1
- package/lib/components/VDatePicker/util/createNativeLocaleFormatter.mjs +7 -5
- package/lib/components/VDatePicker/util/createNativeLocaleFormatter.mjs.map +1 -1
- package/lib/components/VDatePicker/util/eventHelpers.mjs +1 -0
- package/lib/components/VDatePicker/util/eventHelpers.mjs.map +1 -1
- package/lib/components/VDatePicker/util/monthChange.mjs +3 -3
- package/lib/components/VDatePicker/util/monthChange.mjs.map +1 -1
- package/lib/components/VDatePicker/util/pad.mjs +4 -1
- package/lib/components/VDatePicker/util/pad.mjs.map +1 -1
- package/lib/components/VDatePicker/util/sanitizeDateString.mjs +1 -1
- package/lib/components/VDatePicker/util/sanitizeDateString.mjs.map +1 -1
- package/lib/components/VDefaultsProvider/VDefaultsProvider.mjs +38 -0
- package/lib/components/VDefaultsProvider/VDefaultsProvider.mjs.map +1 -0
- package/lib/components/VDefaultsProvider/index.mjs +2 -0
- package/lib/components/VDefaultsProvider/index.mjs.map +1 -0
- package/lib/components/VDialog/VDialog.css +77 -0
- package/lib/components/VDialog/VDialog.mjs +91 -279
- package/lib/components/VDialog/VDialog.mjs.map +1 -1
- package/lib/components/VDialog/VDialog.sass +53 -81
- package/lib/components/VDialog/_variables.scss +12 -10
- package/lib/components/VDialog/index.mjs +1 -3
- package/lib/components/VDialog/index.mjs.map +1 -1
- package/lib/components/VDivider/VDivider.css +30 -0
- package/lib/components/VDivider/VDivider.mjs +25 -17
- package/lib/components/VDivider/VDivider.mjs.map +1 -1
- package/lib/components/VDivider/VDivider.sass +5 -9
- package/lib/components/VDivider/_variables.scss +9 -11
- package/lib/components/VDivider/index.mjs +1 -1
- package/lib/components/VDivider/index.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanel.css +190 -0
- package/lib/components/VExpansionPanel/VExpansionPanel.mjs +87 -83
- package/lib/components/VExpansionPanel/VExpansionPanel.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanel.sass +91 -129
- package/lib/components/VExpansionPanel/VExpansionPanelText.mjs +42 -0
- package/lib/components/VExpansionPanel/VExpansionPanelText.mjs.map +1 -0
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs +79 -0
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs.map +1 -0
- package/lib/components/VExpansionPanel/VExpansionPanels.mjs +45 -59
- package/lib/components/VExpansionPanel/VExpansionPanels.mjs.map +1 -1
- package/lib/components/VExpansionPanel/_variables.scss +13 -7
- package/lib/components/VExpansionPanel/index.mjs +4 -13
- package/lib/components/VExpansionPanel/index.mjs.map +1 -1
- package/lib/components/VField/VField.css +410 -0
- package/lib/components/VField/VField.mjs +248 -0
- package/lib/components/VField/VField.mjs.map +1 -0
- package/lib/components/VField/VField.sass +392 -0
- package/lib/components/VField/VFieldLabel.mjs +27 -0
- package/lib/components/VField/VFieldLabel.mjs.map +1 -0
- package/lib/components/VField/_variables.scss +44 -0
- package/lib/components/VField/index.mjs +3 -0
- package/lib/components/VField/index.mjs.map +1 -0
- package/lib/components/VFileInput/VFileInput.css +8 -0
- package/lib/components/VFileInput/VFileInput.mjs +181 -224
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/VFileInput.sass +3 -51
- package/lib/components/VFileInput/_variables.scss +2 -6
- package/lib/components/VFileInput/index.mjs +1 -3
- package/lib/components/VFileInput/index.mjs.map +1 -1
- package/lib/components/VFooter/VFooter.css +20 -0
- package/lib/components/VFooter/VFooter.mjs +54 -31
- package/lib/components/VFooter/VFooter.mjs.map +1 -1
- package/lib/components/VFooter/VFooter.sass +10 -7
- package/lib/components/VFooter/_variables.scss +13 -3
- package/lib/components/VFooter/index.mjs +1 -1
- package/lib/components/VFooter/index.mjs.map +1 -1
- package/lib/components/VForm/VForm.mjs +55 -122
- package/lib/components/VForm/VForm.mjs.map +1 -1
- package/lib/components/VForm/index.mjs +1 -3
- package/lib/components/VForm/index.mjs.map +1 -1
- package/lib/components/VGrid/VCol.mjs +23 -18
- package/lib/components/VGrid/VCol.mjs.map +1 -1
- package/lib/components/VGrid/VContainer.mjs +10 -12
- package/lib/components/VGrid/VContainer.mjs.map +1 -1
- package/lib/components/VGrid/VGrid.css +1002 -0
- package/lib/components/VGrid/VGrid.sass +9 -8
- package/lib/components/VGrid/VRow.mjs +22 -17
- package/lib/components/VGrid/VRow.mjs.map +1 -1
- package/lib/components/VGrid/VSpacer.mjs +1 -1
- package/lib/components/VGrid/VSpacer.mjs.map +1 -1
- package/lib/components/VGrid/_mixins.sass +26 -21
- package/lib/components/VGrid/index.mjs +4 -4
- package/lib/components/VGrid/index.mjs.map +1 -1
- package/lib/components/VHover/VHover.mjs +31 -61
- package/lib/components/VHover/VHover.mjs.map +1 -1
- package/lib/components/VHover/index.mjs +1 -3
- package/lib/components/VHover/index.mjs.map +1 -1
- package/lib/components/VIcon/VIcon.css +65 -0
- package/lib/components/VIcon/VIcon.mjs +36 -29
- package/lib/components/VIcon/VIcon.mjs.map +1 -1
- package/lib/components/VIcon/VIcon.sass +31 -49
- package/lib/components/VIcon/_variables.scss +17 -20
- package/lib/components/VIcon/index.mjs +1 -1
- package/lib/components/VIcon/index.mjs.map +1 -1
- package/lib/components/VImg/VImg.css +34 -0
- package/lib/components/VImg/VImg.mjs +121 -71
- package/lib/components/VImg/VImg.mjs.map +1 -1
- package/lib/components/VImg/VImg.sass +14 -8
- package/lib/components/VImg/_variables.scss +1 -0
- package/lib/components/VImg/index.mjs +1 -1
- package/lib/components/VImg/index.mjs.map +1 -1
- package/lib/components/VInput/VInput.css +112 -0
- package/lib/components/VInput/VInput.mjs +102 -278
- package/lib/components/VInput/VInput.mjs.map +1 -1
- package/lib/components/VInput/VInput.sass +77 -117
- package/lib/components/VInput/_variables.scss +21 -13
- package/lib/components/VInput/index.mjs +1 -3
- package/lib/components/VInput/index.mjs.map +1 -1
- package/lib/components/VItemGroup/VItem.mjs +33 -62
- package/lib/components/VItemGroup/VItem.mjs.map +1 -1
- package/lib/components/VItemGroup/VItemGroup.css +6 -0
- package/lib/components/VItemGroup/VItemGroup.mjs +45 -215
- package/lib/components/VItemGroup/VItemGroup.mjs.map +1 -1
- package/lib/components/VItemGroup/VItemGroup.sass +3 -2
- package/lib/components/VItemGroup/_variables.scss +3 -2
- package/lib/components/VItemGroup/index.mjs +2 -9
- package/lib/components/VItemGroup/index.mjs.map +1 -1
- package/lib/components/VKbd/VKbd.css +9 -0
- package/lib/components/VKbd/VKbd.sass +13 -0
- package/lib/components/VKbd/_variables.scss +6 -0
- package/lib/components/VKbd/index.mjs +4 -0
- package/lib/components/VKbd/index.mjs.map +1 -0
- package/lib/components/VLabel/VLabel.css +12 -0
- package/lib/components/VLabel/VLabel.mjs +18 -56
- package/lib/components/VLabel/VLabel.mjs.map +1 -1
- package/lib/components/VLabel/VLabel.sass +13 -11
- package/lib/components/VLabel/_variables.scss +7 -4
- package/lib/components/VLabel/index.mjs +1 -3
- package/lib/components/VLabel/index.mjs.map +1 -1
- package/lib/components/VLayout/VLayout.css +11 -0
- package/lib/components/VLayout/VLayout.mjs +20 -15
- package/lib/components/VLayout/VLayout.mjs.map +1 -1
- package/lib/components/VLayout/VLayout.sass +5 -3
- package/lib/components/VLayout/VLayoutItem.css +8 -0
- package/lib/components/VLayout/VLayoutItem.mjs +36 -17
- package/lib/components/VLayout/VLayoutItem.mjs.map +1 -1
- package/lib/components/VLayout/VLayoutItem.sass +8 -0
- package/lib/components/VLayout/index.mjs +2 -2
- package/lib/components/VLayout/index.mjs.map +1 -1
- package/lib/components/VLazy/VLazy.mjs +41 -51
- package/lib/components/VLazy/VLazy.mjs.map +1 -1
- package/lib/components/VLazy/index.mjs +1 -3
- package/lib/components/VLazy/index.mjs.map +1 -1
- package/lib/components/VList/VList.css +107 -0
- package/lib/components/VList/VList.mjs +140 -73
- package/lib/components/VList/VList.mjs.map +1 -1
- package/lib/components/VList/VList.sass +88 -94
- package/lib/components/VList/VListChildren.mjs +53 -0
- package/lib/components/VList/VListChildren.mjs.map +1 -0
- package/lib/components/VList/VListGroup.mjs +84 -164
- package/lib/components/VList/VListGroup.mjs.map +1 -1
- package/lib/components/VList/VListImg.mjs +3 -0
- package/lib/components/VList/VListImg.mjs.map +1 -0
- package/lib/components/VList/VListItem.css +350 -0
- package/lib/components/VList/VListItem.mjs +184 -141
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/VListItem.sass +178 -228
- package/lib/components/VList/VListItemAction.mjs +23 -19
- package/lib/components/VList/VListItemAction.mjs.map +1 -1
- package/lib/components/VList/VListItemAvatar.mjs +16 -29
- package/lib/components/VList/VListItemAvatar.mjs.map +1 -1
- package/lib/components/VList/VListItemHeader.mjs +3 -0
- package/lib/components/VList/VListItemHeader.mjs.map +1 -0
- package/lib/components/VList/VListItemIcon.mjs +17 -15
- package/lib/components/VList/VListItemIcon.mjs.map +1 -1
- package/lib/components/VList/VListItemMedia.mjs +29 -0
- package/lib/components/VList/VListItemMedia.mjs.map +1 -0
- package/lib/components/VList/VListItemSubtitle.mjs +3 -0
- package/lib/components/VList/VListItemSubtitle.mjs.map +1 -0
- package/lib/components/VList/VListItemTitle.mjs +3 -0
- package/lib/components/VList/VListItemTitle.mjs.map +1 -0
- package/lib/components/VList/VListSubheader.mjs +47 -0
- package/lib/components/VList/VListSubheader.mjs.map +1 -0
- package/lib/components/VList/_variables.scss +154 -57
- package/lib/components/VList/index.mjs +12 -28
- package/lib/components/VList/index.mjs.map +1 -1
- package/lib/components/VList/list.mjs +31 -0
- package/lib/components/VList/list.mjs.map +1 -0
- package/lib/components/VLocaleProvider/VLocaleProvider.css +3 -0
- package/lib/components/VLocaleProvider/VLocaleProvider.mjs +19 -10
- package/lib/components/VLocaleProvider/VLocaleProvider.mjs.map +1 -1
- package/lib/components/VLocaleProvider/VLocaleProvider.sass +2 -0
- package/lib/components/VLocaleProvider/index.mjs +1 -1
- package/lib/components/VLocaleProvider/index.mjs.map +1 -1
- package/lib/components/VMain/VMain.css +18 -0
- package/lib/components/VMain/VMain.mjs +23 -19
- package/lib/components/VMain/VMain.mjs.map +1 -1
- package/lib/components/VMain/VMain.sass +2 -1
- package/lib/components/VMain/_variables.scss +3 -1
- package/lib/components/VMain/index.mjs +1 -1
- package/lib/components/VMain/index.mjs.map +1 -1
- package/lib/components/VMenu/VMenu.css +14 -0
- package/lib/components/VMenu/VMenu.mjs +78 -447
- package/lib/components/VMenu/VMenu.mjs.map +1 -1
- package/lib/components/VMenu/VMenu.sass +17 -71
- package/lib/components/VMenu/_variables.scss +3 -2
- package/lib/components/VMenu/index.mjs +1 -3
- package/lib/components/VMenu/index.mjs.map +1 -1
- package/lib/components/VMenu/shared.mjs +2 -0
- package/lib/components/VMenu/shared.mjs.map +1 -0
- package/lib/components/VMessages/VMessages.css +16 -0
- package/lib/components/VMessages/VMessages.mjs +42 -41
- package/lib/components/VMessages/VMessages.mjs.map +1 -1
- package/lib/components/VMessages/VMessages.sass +5 -10
- package/lib/components/VMessages/_variables.scss +3 -2
- package/lib/components/VMessages/index.mjs +1 -3
- package/lib/components/VMessages/index.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.css +93 -0
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +124 -55
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.sass +36 -23
- package/lib/components/VNavigationDrawer/_variables.scss +16 -9
- package/lib/components/VNavigationDrawer/index.mjs +1 -1
- package/lib/components/VNavigationDrawer/index.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/touch.mjs +139 -0
- package/lib/components/VNavigationDrawer/touch.mjs.map +1 -0
- package/lib/components/VNoSsr/VNoSsr.mjs +23 -0
- package/lib/components/VNoSsr/VNoSsr.mjs.map +1 -0
- package/lib/components/VNoSsr/index.mjs +2 -0
- package/lib/components/VNoSsr/index.mjs.map +1 -0
- package/lib/components/VOtpInput/VOtpInput.mjs +345 -0
- package/lib/components/VOtpInput/VOtpInput.mjs.map +1 -0
- package/lib/components/VOtpInput/VOtpInput.sass +37 -0
- package/lib/components/VOtpInput/_variables.scss +4 -0
- package/lib/components/VOtpInput/index.mjs +4 -0
- package/lib/components/VOtpInput/index.mjs.map +1 -0
- package/lib/components/VOverflowBtn/VOverflowBtn.mjs +1 -1
- package/lib/components/VOverflowBtn/VOverflowBtn.mjs.map +1 -1
- package/lib/components/VOverlay/VOverlay.css +63 -0
- package/lib/components/VOverlay/VOverlay.mjs +229 -67
- package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/lib/components/VOverlay/VOverlay.sass +39 -19
- package/lib/components/VOverlay/_variables.scss +4 -3
- package/lib/components/VOverlay/index.mjs +1 -3
- package/lib/components/VOverlay/index.mjs.map +1 -1
- package/lib/components/VOverlay/positionStrategies.mjs +207 -0
- package/lib/components/VOverlay/positionStrategies.mjs.map +1 -0
- package/lib/components/VOverlay/requestNewFrame.mjs +28 -0
- package/lib/components/VOverlay/requestNewFrame.mjs.map +1 -0
- package/lib/components/VOverlay/scrollStrategies.mjs +137 -0
- package/lib/components/VOverlay/scrollStrategies.mjs.map +1 -0
- package/lib/components/VOverlay/useActivator.mjs +241 -0
- package/lib/components/VOverlay/useActivator.mjs.map +1 -0
- package/lib/components/VOverlay/util/anchor.mjs +52 -0
- package/lib/components/VOverlay/util/anchor.mjs.map +1 -0
- package/lib/components/VOverlay/util/point.mjs +56 -0
- package/lib/components/VOverlay/util/point.mjs.map +1 -0
- package/lib/components/VPagination/VPagination.css +9 -0
- package/lib/components/VPagination/VPagination.mjs +261 -176
- package/lib/components/VPagination/VPagination.mjs.map +1 -1
- package/lib/components/VPagination/VPagination.sass +11 -77
- package/lib/components/VPagination/_variables.scss +1 -15
- package/lib/components/VPagination/index.mjs +1 -3
- package/lib/components/VPagination/index.mjs.map +1 -1
- package/lib/components/VParallax/VParallax.css +7 -0
- package/lib/components/VParallax/VParallax.mjs +71 -77
- package/lib/components/VParallax/VParallax.mjs.map +1 -1
- package/lib/components/VParallax/VParallax.sass +1 -32
- package/lib/components/VParallax/index.mjs +1 -3
- package/lib/components/VParallax/index.mjs.map +1 -1
- package/lib/components/VPicker/VPicker.mjs +5 -5
- package/lib/components/VPicker/VPicker.mjs.map +1 -1
- package/lib/components/VProgressCircular/VProgressCircular.css +101 -0
- package/lib/components/VProgressCircular/VProgressCircular.mjs +110 -141
- package/lib/components/VProgressCircular/VProgressCircular.mjs.map +1 -1
- package/lib/components/VProgressCircular/VProgressCircular.sass +57 -36
- package/lib/components/VProgressCircular/_variables.scss +12 -5
- package/lib/components/VProgressCircular/index.mjs +1 -3
- package/lib/components/VProgressCircular/index.mjs.map +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.css +212 -0
- package/lib/components/VProgressLinear/VProgressLinear.mjs +138 -226
- package/lib/components/VProgressLinear/VProgressLinear.mjs.map +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.sass +83 -157
- package/lib/components/VProgressLinear/_variables.scss +11 -3
- package/lib/components/VProgressLinear/index.mjs +1 -3
- package/lib/components/VProgressLinear/index.mjs.map +1 -1
- package/lib/components/VRadio/VRadio.mjs +33 -0
- package/lib/components/VRadio/VRadio.mjs.map +1 -0
- package/lib/components/VRadio/index.mjs +2 -0
- package/lib/components/VRadio/index.mjs.map +1 -0
- package/lib/components/VRadioGroup/VRadioGroup.css +10 -0
- package/lib/components/VRadioGroup/VRadioGroup.mjs +66 -69
- package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
- package/lib/components/VRadioGroup/VRadioGroup.sass +7 -37
- package/lib/components/VRadioGroup/_variables.scss +3 -3
- package/lib/components/VRadioGroup/index.mjs +1 -9
- package/lib/components/VRadioGroup/index.mjs.map +1 -1
- package/lib/components/VRangeSlider/VRangeSlider.mjs +194 -206
- package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
- package/lib/components/VRangeSlider/index.mjs +1 -3
- package/lib/components/VRangeSlider/index.mjs.map +1 -1
- package/lib/components/VRating/VRating.css +58 -0
- package/lib/components/VRating/VRating.mjs +202 -177
- package/lib/components/VRating/VRating.mjs.map +1 -1
- package/lib/components/VRating/VRating.sass +51 -18
- package/lib/components/VRating/_variables.scss +9 -4
- package/lib/components/VRating/index.mjs +1 -3
- package/lib/components/VRating/index.mjs.map +1 -1
- package/lib/components/VResponsive/VResponsive.css +23 -0
- package/lib/components/VResponsive/VResponsive.mjs +24 -19
- package/lib/components/VResponsive/VResponsive.mjs.map +1 -1
- package/lib/components/VResponsive/VResponsive.sass +5 -7
- package/lib/components/VResponsive/index.mjs +1 -1
- package/lib/components/VResponsive/index.mjs.map +1 -1
- package/lib/components/VSelect/VSelect.css +34 -0
- package/lib/components/VSelect/VSelect.mjs +170 -781
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/VSelect.sass +44 -153
- package/lib/components/VSelect/_variables.scss +7 -21
- package/lib/components/VSelect/index.mjs +1 -3
- package/lib/components/VSelect/index.mjs.map +1 -1
- package/lib/components/VSelectionControl/VSelectionControl.css +97 -0
- package/lib/components/VSelectionControl/VSelectionControl.mjs +210 -0
- package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -0
- package/lib/components/VSelectionControl/VSelectionControl.sass +96 -0
- package/lib/components/VSelectionControl/_variables.scss +9 -0
- package/lib/components/VSelectionControl/index.mjs +2 -0
- package/lib/components/VSelectionControl/index.mjs.map +1 -0
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.css +3 -0
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs +64 -0
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs.map +1 -0
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.sass +9 -0
- package/lib/components/VSelectionControlGroup/_variables.scss +4 -0
- package/lib/components/VSelectionControlGroup/index.mjs +2 -0
- package/lib/components/VSelectionControlGroup/index.mjs.map +1 -0
- package/lib/components/VSheet/VSheet.css +23 -0
- package/lib/components/VSheet/VSheet.mjs +18 -18
- package/lib/components/VSheet/VSheet.mjs.map +1 -1
- package/lib/components/VSheet/VSheet.sass +11 -7
- package/lib/components/VSheet/_variables.scss +15 -4
- package/lib/components/VSheet/index.mjs +1 -1
- package/lib/components/VSheet/index.mjs.map +1 -1
- package/lib/components/VSkeletonLoader/VSkeletonLoader.mjs +8 -8
- package/lib/components/VSkeletonLoader/VSkeletonLoader.mjs.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroup.css +42 -0
- package/lib/components/VSlideGroup/VSlideGroup.mjs +301 -361
- package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroup.sass +21 -25
- package/lib/components/VSlideGroup/VSlideGroupItem.mjs +29 -0
- package/lib/components/VSlideGroup/VSlideGroupItem.mjs.map +1 -0
- package/lib/components/VSlideGroup/_variables.scss +4 -1
- package/lib/components/VSlideGroup/helpers.mjs +54 -0
- package/lib/components/VSlideGroup/helpers.mjs.map +1 -0
- package/lib/components/VSlideGroup/index.mjs +2 -9
- package/lib/components/VSlideGroup/index.mjs.map +1 -1
- package/lib/components/VSlider/VSlider.css +53 -0
- package/lib/components/VSlider/VSlider.mjs +113 -538
- package/lib/components/VSlider/VSlider.mjs.map +1 -1
- package/lib/components/VSlider/VSlider.sass +38 -274
- package/lib/components/VSlider/VSliderThumb.css +142 -0
- package/lib/components/VSlider/VSliderThumb.mjs +165 -0
- package/lib/components/VSlider/VSliderThumb.mjs.map +1 -0
- package/lib/components/VSlider/VSliderThumb.sass +147 -0
- package/lib/components/VSlider/VSliderTrack.css +150 -0
- package/lib/components/VSlider/VSliderTrack.mjs +121 -0
- package/lib/components/VSlider/VSliderTrack.mjs.map +1 -0
- package/lib/components/VSlider/VSliderTrack.sass +159 -0
- package/lib/components/VSlider/_variables.scss +23 -14
- package/lib/components/VSlider/index.mjs +1 -3
- package/lib/components/VSlider/index.mjs.map +1 -1
- package/lib/components/VSlider/slider.mjs +300 -0
- package/lib/components/VSlider/slider.mjs.map +1 -0
- package/lib/components/VSnackbar/VSnackbar.css +137 -0
- package/lib/components/VSnackbar/VSnackbar.mjs +101 -168
- package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.sass +43 -79
- package/lib/components/VSnackbar/_variables.scss +20 -25
- package/lib/components/VSnackbar/index.mjs +1 -3
- package/lib/components/VSnackbar/index.mjs.map +1 -1
- package/lib/components/VSparkline/VSparkline.mjs +13 -13
- package/lib/components/VSparkline/VSparkline.mjs.map +1 -1
- package/lib/components/VSparkline/helpers/path.mjs +7 -5
- package/lib/components/VSparkline/helpers/path.mjs.map +1 -1
- package/lib/components/VSpeedDial/VSpeedDial.mjs +4 -4
- package/lib/components/VSpeedDial/VSpeedDial.mjs.map +1 -1
- package/lib/components/VStepper/VStepper.mjs +2 -2
- package/lib/components/VStepper/VStepper.mjs.map +1 -1
- package/lib/components/VStepper/VStepper.sass +5 -1
- package/lib/components/VStepper/VStepperStep.mjs +1 -1
- package/lib/components/VStepper/_variables.scss +6 -5
- package/lib/components/VSwitch/VSwitch.css +69 -0
- package/lib/components/VSwitch/VSwitch.mjs +99 -107
- package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
- package/lib/components/VSwitch/VSwitch.sass +71 -129
- package/lib/components/VSwitch/_variables.scss +10 -23
- package/lib/components/VSwitch/index.mjs +1 -3
- package/lib/components/VSwitch/index.mjs.map +1 -1
- package/lib/components/VSystemBar/VSystemBar.css +35 -0
- package/lib/components/VSystemBar/VSystemBar.mjs +52 -37
- package/lib/components/VSystemBar/VSystemBar.mjs.map +1 -1
- package/lib/components/VSystemBar/VSystemBar.sass +14 -26
- package/lib/components/VSystemBar/_variables.scss +27 -17
- package/lib/components/VSystemBar/index.mjs +1 -1
- package/lib/components/VSystemBar/index.mjs.map +1 -1
- package/lib/components/VTable/VTable.css +143 -0
- package/lib/components/VTable/VTable.mjs +54 -0
- package/lib/components/VTable/VTable.mjs.map +1 -0
- package/lib/components/VTable/VTable.sass +156 -0
- package/lib/components/VTable/_mixins.scss +25 -0
- package/lib/components/VTable/_variables.scss +21 -0
- package/lib/components/VTable/index.mjs +2 -0
- package/lib/components/VTable/index.mjs.map +1 -0
- package/lib/components/VTabs/VTab.css +29 -0
- package/lib/components/VTabs/VTab.mjs +109 -69
- package/lib/components/VTabs/VTab.mjs.map +1 -1
- package/lib/components/VTabs/VTab.sass +30 -0
- package/lib/components/VTabs/VTabs.css +71 -0
- package/lib/components/VTabs/VTabs.mjs +86 -283
- package/lib/components/VTabs/VTabs.mjs.map +1 -1
- package/lib/components/VTabs/VTabs.sass +40 -202
- package/lib/components/VTabs/_variables.scss +10 -18
- package/lib/components/VTabs/index.mjs +2 -15
- package/lib/components/VTabs/index.mjs.map +1 -1
- package/lib/components/VTabs/shared.mjs +2 -0
- package/lib/components/VTabs/shared.mjs.map +1 -0
- package/lib/components/VTextField/VTextField.css +70 -0
- package/lib/components/VTextField/VTextField.mjs +162 -483
- package/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/lib/components/VTextField/VTextField.sass +56 -493
- package/lib/components/VTextField/_variables.scss +10 -50
- package/lib/components/VTextField/index.mjs +1 -3
- package/lib/components/VTextField/index.mjs.map +1 -1
- package/lib/components/VTextarea/VTextarea.css +37 -0
- package/lib/components/VTextarea/VTextarea.mjs +210 -74
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VTextarea/VTextarea.sass +35 -75
- package/lib/components/VTextarea/_variables.scss +2 -4
- package/lib/components/VTextarea/index.mjs +1 -3
- package/lib/components/VTextarea/index.mjs.map +1 -1
- package/lib/components/VThemeProvider/VThemeProvider.css +4 -0
- package/lib/components/VThemeProvider/VThemeProvider.mjs +23 -18
- package/lib/components/VThemeProvider/VThemeProvider.mjs.map +1 -1
- package/lib/components/VThemeProvider/index.mjs +1 -1
- package/lib/components/VThemeProvider/index.mjs.map +1 -1
- package/lib/components/VTimePicker/VTimePicker.mjs +4 -4
- package/lib/components/VTimePicker/VTimePicker.mjs.map +1 -1
- package/lib/components/VTimePicker/VTimePickerClock.mjs +9 -9
- package/lib/components/VTimePicker/VTimePickerClock.mjs.map +1 -1
- package/lib/components/VTimePicker/VTimePickerTitle.mjs +2 -2
- package/lib/components/VTimePicker/VTimePickerTitle.mjs.map +1 -1
- package/lib/components/VTimeline/VTimeline.css +399 -0
- package/lib/components/VTimeline/VTimeline.mjs +89 -34
- package/lib/components/VTimeline/VTimeline.mjs.map +1 -1
- package/lib/components/VTimeline/VTimeline.sass +347 -115
- package/lib/components/VTimeline/VTimelineDivider.mjs +76 -0
- package/lib/components/VTimeline/VTimelineDivider.mjs.map +1 -0
- package/lib/components/VTimeline/VTimelineItem.mjs +68 -90
- package/lib/components/VTimeline/VTimelineItem.mjs.map +1 -1
- package/lib/components/VTimeline/_mixins.sass +21 -32
- package/lib/components/VTimeline/_variables.scss +28 -15
- package/lib/components/VTimeline/index.mjs +2 -9
- package/lib/components/VTimeline/index.mjs.map +1 -1
- package/lib/components/VTimeline/shared.mjs +2 -0
- package/lib/components/VTimeline/shared.mjs.map +1 -0
- package/lib/components/VToolbar/VToolbar.css +145 -0
- package/lib/components/VToolbar/VToolbar.mjs +135 -141
- package/lib/components/VToolbar/VToolbar.mjs.map +1 -1
- package/lib/components/VToolbar/VToolbar.sass +75 -123
- package/lib/components/VToolbar/VToolbarItems.mjs +32 -0
- package/lib/components/VToolbar/VToolbarItems.mjs.map +1 -0
- package/lib/components/VToolbar/VToolbarTitle.mjs +34 -0
- package/lib/components/VToolbar/VToolbarTitle.mjs.map +1 -0
- package/lib/components/VToolbar/_variables.scss +65 -15
- package/lib/components/VToolbar/index.mjs +3 -14
- package/lib/components/VToolbar/index.mjs.map +1 -1
- package/lib/components/VTooltip/VTooltip.css +22 -0
- package/lib/components/VTooltip/VTooltip.mjs +73 -199
- package/lib/components/VTooltip/VTooltip.mjs.map +1 -1
- package/lib/components/VTooltip/VTooltip.sass +8 -15
- package/lib/components/VTooltip/_variables.scss +6 -6
- package/lib/components/VTooltip/index.mjs +1 -3
- package/lib/components/VTooltip/index.mjs.map +1 -1
- package/lib/components/VTreeview/VTreeview.mjs +18 -9
- package/lib/components/VTreeview/VTreeview.mjs.map +1 -1
- package/lib/components/VTreeview/VTreeviewNode.mjs +4 -2
- package/lib/components/VTreeview/VTreeviewNode.mjs.map +1 -1
- package/lib/components/VTreeview/_mixins.sass +3 -3
- package/lib/components/VValidation/VValidation.mjs +26 -0
- package/lib/components/VValidation/VValidation.mjs.map +1 -0
- package/lib/components/VValidation/index.mjs +2 -0
- package/lib/components/VValidation/index.mjs.map +1 -0
- package/lib/components/VVirtualScroll/VVirtualScroll.mjs +1 -1
- package/lib/components/VVirtualScroll/VVirtualScroll.mjs.map +1 -1
- package/lib/components/VWindow/VWindow.css +70 -0
- package/lib/components/VWindow/VWindow.mjs +158 -233
- package/lib/components/VWindow/VWindow.mjs.map +1 -1
- package/lib/components/VWindow/VWindow.sass +29 -51
- package/lib/components/VWindow/VWindowItem.mjs +72 -98
- package/lib/components/VWindow/VWindowItem.mjs.map +1 -1
- package/lib/components/VWindow/_variables.scss +2 -3
- package/lib/components/VWindow/index.mjs +2 -9
- package/lib/components/VWindow/index.mjs.map +1 -1
- package/lib/components/index.d.ts +15391 -0
- package/lib/components/index.mjs +75 -65
- package/lib/components/index.mjs.map +1 -1
- package/lib/components/transitions/createTransition.mjs +61 -16
- package/lib/components/transitions/createTransition.mjs.map +1 -1
- package/lib/components/transitions/dialog-transition.mjs +107 -0
- package/lib/components/transitions/dialog-transition.mjs.map +1 -0
- package/lib/components/transitions/expand-transition.mjs +6 -4
- package/lib/components/transitions/expand-transition.mjs.map +1 -1
- package/lib/components/transitions/index.mjs +1 -1
- package/lib/components/transitions/index.mjs.map +1 -1
- package/lib/composables/border.mjs +9 -7
- package/lib/composables/border.mjs.map +1 -1
- package/lib/composables/color.mjs +2 -2
- package/lib/composables/color.mjs.map +1 -1
- package/lib/composables/defaults.mjs +42 -0
- package/lib/composables/defaults.mjs.map +1 -0
- package/lib/composables/density.mjs +5 -4
- package/lib/composables/density.mjs.map +1 -1
- package/lib/composables/display.mjs +4 -3
- package/lib/composables/display.mjs.map +1 -1
- package/lib/composables/elevation.mjs +4 -3
- package/lib/composables/elevation.mjs.map +1 -1
- package/lib/composables/filter.mjs +87 -0
- package/lib/composables/filter.mjs.map +1 -0
- package/lib/composables/focus.mjs +35 -0
- package/lib/composables/focus.mjs.map +1 -0
- package/lib/composables/form.mjs +116 -0
- package/lib/composables/form.mjs.map +1 -0
- package/lib/composables/forwardRef.mjs +46 -0
- package/lib/composables/forwardRef.mjs.map +1 -0
- package/lib/composables/group.mjs +135 -45
- package/lib/composables/group.mjs.map +1 -1
- package/lib/composables/hydration.mjs +12 -0
- package/lib/composables/hydration.mjs.map +1 -0
- package/lib/composables/icons.mjs +24 -30
- package/lib/composables/icons.mjs.map +1 -1
- package/lib/composables/index.mjs +9 -0
- package/lib/composables/index.mjs.map +1 -0
- package/lib/composables/intersectionObserver.mjs +33 -0
- package/lib/composables/intersectionObserver.mjs.map +1 -0
- package/lib/composables/items.mjs +56 -0
- package/lib/composables/items.mjs.map +1 -0
- package/lib/composables/layout.mjs +157 -66
- package/lib/composables/layout.mjs.map +1 -1
- package/lib/composables/lazy.mjs +23 -0
- package/lib/composables/lazy.mjs.map +1 -0
- package/lib/composables/loader.mjs +39 -0
- package/lib/composables/loader.mjs.map +1 -0
- package/lib/composables/locale.mjs +25 -13
- package/lib/composables/locale.mjs.map +1 -1
- package/lib/composables/mutationObserver.mjs +43 -0
- package/lib/composables/mutationObserver.mjs.map +1 -0
- package/lib/composables/nested/nested.mjs +207 -0
- package/lib/composables/nested/nested.mjs.map +1 -0
- package/lib/composables/nested/openStrategies.mjs +76 -0
- package/lib/composables/nested/openStrategies.mjs.map +1 -0
- package/lib/composables/nested/selectStrategies.mjs +198 -0
- package/lib/composables/nested/selectStrategies.mjs.map +1 -0
- package/lib/composables/overlay.mjs +34 -0
- package/lib/composables/overlay.mjs.map +1 -0
- package/lib/composables/position.mjs +6 -5
- package/lib/composables/position.mjs.map +1 -1
- package/lib/composables/proxiedModel.mjs +13 -8
- package/lib/composables/proxiedModel.mjs.map +1 -1
- package/lib/composables/refs.mjs +16 -0
- package/lib/composables/refs.mjs.map +1 -0
- package/lib/composables/resizeObserver.mjs +35 -0
- package/lib/composables/resizeObserver.mjs.map +1 -0
- package/lib/composables/rounded.mjs +10 -8
- package/lib/composables/rounded.mjs.map +1 -1
- package/lib/composables/router.mjs +82 -0
- package/lib/composables/router.mjs.map +1 -0
- package/lib/composables/rtl.mjs +5 -5
- package/lib/composables/rtl.mjs.map +1 -1
- package/lib/composables/scroll.mjs +3 -2
- package/lib/composables/scroll.mjs.map +1 -1
- package/lib/composables/selectLink.mjs +19 -0
- package/lib/composables/selectLink.mjs.map +1 -0
- package/lib/composables/size.mjs +4 -3
- package/lib/composables/size.mjs.map +1 -1
- package/lib/composables/stack.mjs +36 -0
- package/lib/composables/stack.mjs.map +1 -0
- package/lib/composables/teleport.mjs +30 -0
- package/lib/composables/teleport.mjs.map +1 -0
- package/lib/composables/theme.mjs +147 -96
- package/lib/composables/theme.mjs.map +1 -1
- package/lib/composables/touch.mjs +129 -0
- package/lib/composables/touch.mjs.map +1 -0
- package/lib/composables/transition.mjs +20 -0
- package/lib/composables/transition.mjs.map +1 -1
- package/lib/composables/validation.mjs +119 -0
- package/lib/composables/validation.mjs.map +1 -0
- package/lib/composables/variant.mjs +50 -0
- package/lib/composables/variant.mjs.map +1 -0
- package/lib/directives/click-outside/index.mjs +23 -11
- package/lib/directives/click-outside/index.mjs.map +1 -1
- package/lib/directives/color/index.mjs +1 -1
- package/lib/directives/color/index.mjs.map +1 -1
- package/lib/directives/index.d.ts +58 -0
- package/lib/directives/index.mjs +2 -2
- package/lib/directives/index.mjs.map +1 -1
- package/lib/directives/intersect/index.mjs +26 -19
- package/lib/directives/intersect/index.mjs.map +1 -1
- package/lib/directives/mutate/index.mjs +33 -34
- package/lib/directives/mutate/index.mjs.map +1 -1
- package/lib/directives/resize/index.mjs +10 -7
- package/lib/directives/resize/index.mjs.map +1 -1
- package/lib/directives/ripple/VRipple.css +34 -0
- package/lib/directives/ripple/VRipple.sass +2 -1
- package/lib/directives/ripple/_variables.scss +4 -4
- package/lib/directives/ripple/index.mjs +35 -20
- package/lib/directives/ripple/index.mjs.map +1 -1
- package/lib/directives/scroll/index.mjs +9 -6
- package/lib/directives/scroll/index.mjs.map +1 -1
- package/lib/directives/touch/index.mjs +17 -7
- package/lib/directives/touch/index.mjs.map +1 -1
- package/lib/entry-bundler.mjs +8 -6
- package/lib/entry-bundler.mjs.map +1 -1
- package/lib/framework.mjs +55 -36
- package/lib/framework.mjs.map +1 -1
- package/lib/iconsets/fa-svg.d.ts +54 -0
- package/lib/iconsets/fa.d.ts +54 -0
- package/lib/iconsets/fa.mjs +1 -0
- package/lib/iconsets/fa.mjs.map +1 -1
- package/lib/iconsets/fa4.d.ts +54 -0
- package/lib/iconsets/fa4.mjs +2 -1
- package/lib/iconsets/fa4.mjs.map +1 -1
- package/lib/iconsets/md.d.ts +54 -0
- package/lib/iconsets/md.mjs +2 -1
- package/lib/iconsets/md.mjs.map +1 -1
- package/lib/iconsets/mdi-svg.d.ts +54 -0
- package/lib/iconsets/mdi-svg.mjs +1 -1
- package/lib/iconsets/mdi-svg.mjs.map +1 -1
- package/lib/iconsets/mdi.d.ts +54 -0
- package/lib/iconsets/mdi.mjs +4 -3
- package/lib/iconsets/mdi.mjs.map +1 -1
- package/lib/index.d.ts +450 -0
- package/lib/locale/adapters/vue-i18n.mjs +64 -0
- package/lib/locale/adapters/vue-i18n.mjs.map +1 -0
- package/lib/locale/adapters/vue-intl.mjs +67 -0
- package/lib/locale/adapters/vue-intl.mjs.map +1 -0
- package/lib/locale/af.mjs +5 -3
- package/lib/locale/af.mjs.map +1 -1
- package/lib/locale/ar.mjs +5 -3
- package/lib/locale/ar.mjs.map +1 -1
- package/lib/locale/az.mjs +5 -3
- package/lib/locale/az.mjs.map +1 -1
- package/lib/locale/bg.mjs +5 -3
- package/lib/locale/bg.mjs.map +1 -1
- package/lib/locale/ca.mjs +12 -10
- package/lib/locale/ca.mjs.map +1 -1
- package/lib/locale/ckb.mjs +5 -3
- package/lib/locale/ckb.mjs.map +1 -1
- package/lib/locale/cs.mjs +6 -4
- package/lib/locale/cs.mjs.map +1 -1
- package/lib/locale/da.mjs +72 -0
- package/lib/locale/da.mjs.map +1 -0
- package/lib/locale/de.mjs +5 -3
- package/lib/locale/de.mjs.map +1 -1
- package/lib/locale/el.mjs +5 -3
- package/lib/locale/el.mjs.map +1 -1
- package/lib/locale/en.mjs +5 -3
- package/lib/locale/en.mjs.map +1 -1
- package/lib/locale/es.mjs +6 -4
- package/lib/locale/es.mjs.map +1 -1
- package/lib/locale/et.mjs +5 -3
- package/lib/locale/et.mjs.map +1 -1
- package/lib/locale/fa.mjs +5 -3
- package/lib/locale/fa.mjs.map +1 -1
- package/lib/locale/fi.mjs +5 -3
- package/lib/locale/fi.mjs.map +1 -1
- package/lib/locale/fr.mjs +7 -5
- package/lib/locale/fr.mjs.map +1 -1
- package/lib/locale/he.mjs +5 -3
- package/lib/locale/he.mjs.map +1 -1
- package/lib/locale/hr.mjs +5 -3
- package/lib/locale/hr.mjs.map +1 -1
- package/lib/locale/hu.mjs +5 -3
- package/lib/locale/hu.mjs.map +1 -1
- package/lib/locale/id.mjs +5 -3
- package/lib/locale/id.mjs.map +1 -1
- package/lib/locale/index.d.ts +3111 -0
- package/lib/locale/index.mjs +1 -0
- package/lib/locale/index.mjs.map +1 -1
- package/lib/locale/it.mjs +8 -6
- package/lib/locale/it.mjs.map +1 -1
- package/lib/locale/ja.mjs +5 -3
- package/lib/locale/ja.mjs.map +1 -1
- package/lib/locale/ko.mjs +5 -3
- package/lib/locale/ko.mjs.map +1 -1
- package/lib/locale/lt.mjs +5 -3
- package/lib/locale/lt.mjs.map +1 -1
- package/lib/locale/lv.mjs +5 -3
- package/lib/locale/lv.mjs.map +1 -1
- package/lib/locale/nl.mjs +5 -3
- package/lib/locale/nl.mjs.map +1 -1
- package/lib/locale/no.mjs +5 -3
- package/lib/locale/no.mjs.map +1 -1
- package/lib/locale/pl.mjs +5 -3
- package/lib/locale/pl.mjs.map +1 -1
- package/lib/locale/pt.mjs +5 -3
- package/lib/locale/pt.mjs.map +1 -1
- package/lib/locale/ro.mjs +5 -3
- package/lib/locale/ro.mjs.map +1 -1
- package/lib/locale/ru.mjs +5 -3
- package/lib/locale/ru.mjs.map +1 -1
- package/lib/locale/sk.mjs +5 -3
- package/lib/locale/sk.mjs.map +1 -1
- package/lib/locale/sl.mjs +5 -3
- package/lib/locale/sl.mjs.map +1 -1
- package/lib/locale/sr-Cyrl.mjs +5 -3
- package/lib/locale/sr-Cyrl.mjs.map +1 -1
- package/lib/locale/sr-Latn.mjs +5 -3
- package/lib/locale/sr-Latn.mjs.map +1 -1
- package/lib/locale/sv.mjs +5 -3
- package/lib/locale/sv.mjs.map +1 -1
- package/lib/locale/th.mjs +5 -3
- package/lib/locale/th.mjs.map +1 -1
- package/lib/locale/tr.mjs +5 -3
- package/lib/locale/tr.mjs.map +1 -1
- package/lib/locale/uk.mjs +5 -3
- package/lib/locale/uk.mjs.map +1 -1
- package/lib/locale/vi.mjs +5 -3
- package/lib/locale/vi.mjs.map +1 -1
- package/lib/locale/zh-Hans.mjs +5 -3
- package/lib/locale/zh-Hans.mjs.map +1 -1
- package/lib/locale/zh-Hant.mjs +5 -3
- package/lib/locale/zh-Hant.mjs.map +1 -1
- package/lib/presets/default/index.mjs +1 -1
- package/lib/presets/default/index.mjs.map +1 -1
- package/lib/services/goto/easing-patterns.mjs +0 -3
- package/lib/services/goto/easing-patterns.mjs.map +1 -1
- package/lib/services/goto/index.mjs +17 -17
- package/lib/services/goto/index.mjs.map +1 -1
- package/lib/services/goto/util.mjs +2 -2
- package/lib/services/goto/util.mjs.map +1 -1
- package/lib/styles/elements/_blockquote.sass +6 -4
- package/lib/styles/elements/_global.sass +12 -8
- package/lib/styles/elements/_index.sass +2 -6
- package/lib/styles/generic/_colors.scss +31 -11
- package/lib/styles/generic/_elevation.scss +3 -3
- package/lib/styles/generic/_index.scss +6 -6
- package/lib/styles/generic/_reset.scss +236 -226
- package/lib/styles/generic/_transitions.scss +20 -4
- package/lib/styles/main.css +18620 -0
- package/lib/styles/main.sass +4 -5
- package/lib/styles/settings/_colors.scss +431 -7
- package/lib/styles/settings/_elevations.scss +1 -1
- package/lib/styles/settings/_index.sass +4 -10
- package/lib/styles/settings/_utilities.scss +514 -463
- package/lib/styles/settings/_variables.scss +59 -64
- package/lib/styles/tools/_absolute.sass +8 -0
- package/lib/styles/tools/_border.sass +6 -1
- package/lib/styles/tools/_density.sass +5 -9
- package/lib/styles/tools/_display.sass +11 -0
- package/lib/styles/tools/_elevation.sass +4 -2
- package/lib/styles/tools/_functions.sass +32 -24
- package/lib/styles/tools/_index.sass +17 -22
- package/lib/styles/tools/_radius.sass +5 -2
- package/lib/styles/tools/_rtl.sass +2 -0
- package/lib/styles/tools/_sheet.sass +7 -4
- package/lib/styles/tools/_states.sass +18 -8
- package/lib/styles/tools/_theme.sass +3 -5
- package/lib/styles/tools/_typography.sass +6 -0
- package/lib/styles/tools/_utilities.sass +27 -24
- package/lib/styles/tools/_variant.sass +53 -0
- package/lib/styles/utilities/_display.sass +7 -6
- package/lib/styles/utilities/_index.sass +25 -22
- package/lib/styles/utilities/_text.sass +8 -7
- package/lib/styles.scss +4 -0
- package/lib/util/animation.mjs +43 -0
- package/lib/util/animation.mjs.map +1 -0
- package/lib/util/box.mjs +32 -0
- package/lib/util/box.mjs.map +1 -0
- package/lib/util/color/APCA.mjs +85 -0
- package/lib/util/color/APCA.mjs.map +1 -0
- package/lib/util/colorUtils.mjs +10 -7
- package/lib/util/colorUtils.mjs.map +1 -1
- package/lib/util/console.mjs +8 -7
- package/lib/util/console.mjs.map +1 -1
- package/lib/util/createSimpleFunctional.mjs +18 -11
- package/lib/util/createSimpleFunctional.mjs.map +1 -1
- package/lib/util/dateTimeUtils.mjs +3 -1
- package/lib/util/dateTimeUtils.mjs.map +1 -1
- package/lib/util/defineComponent.mjs +92 -0
- package/lib/util/defineComponent.mjs.map +1 -0
- package/lib/util/easing.mjs +5 -0
- package/lib/util/easing.mjs.map +1 -0
- package/lib/util/getCurrentInstance.mjs +19 -0
- package/lib/util/getCurrentInstance.mjs.map +1 -0
- package/lib/util/getScrollParent.mjs +24 -0
- package/lib/util/getScrollParent.mjs.map +1 -0
- package/lib/util/globals.mjs +1 -0
- package/lib/util/globals.mjs.map +1 -1
- package/lib/util/helpers.mjs +194 -41
- package/lib/util/helpers.mjs.map +1 -1
- package/lib/util/index.mjs +6 -2
- package/lib/util/isFixedPosition.mjs +12 -0
- package/lib/util/isFixedPosition.mjs.map +1 -0
- package/lib/util/propsFactory.mjs.map +1 -1
- package/lib/util/useRender.mjs +4 -2
- package/lib/util/useRender.mjs.map +1 -1
- package/package.json +109 -42
- package/dist/vuetify.css.map +0 -1
- package/lib/components/VApp/_index.scss +0 -1
- package/lib/components/VAvatar/_index.scss +0 -2
- package/lib/components/VBadge/_index.scss +0 -2
- package/lib/components/VBanner/_index.scss +0 -2
- package/lib/components/VBtn/_index.scss +0 -3
- package/lib/components/VCheckbox/VSimpleCheckbox.mjs +0 -92
- package/lib/components/VCheckbox/VSimpleCheckbox.mjs.map +0 -1
- package/lib/components/VCheckbox/VSimpleCheckbox.sass +0 -16
- package/lib/components/VDataTable/VSimpleTable.mjs +0 -48
- package/lib/components/VDataTable/VSimpleTable.mjs.map +0 -1
- package/lib/components/VDataTable/VSimpleTable.sass +0 -179
- package/lib/components/VDivider/_index.scss +0 -2
- package/lib/components/VExpansionPanel/VExpansionPanelContent.mjs +0 -47
- package/lib/components/VExpansionPanel/VExpansionPanelContent.mjs.map +0 -1
- package/lib/components/VExpansionPanel/VExpansionPanelHeader.mjs +0 -112
- package/lib/components/VExpansionPanel/VExpansionPanelHeader.mjs.map +0 -1
- package/lib/components/VFooter/_index.scss +0 -2
- package/lib/components/VGrid/_index.scss +0 -2
- package/lib/components/VIcon/_index.scss +0 -2
- package/lib/components/VImg/_index.scss +0 -2
- package/lib/components/VLayout/_index.scss +0 -1
- package/lib/components/VList/VListGroup.sass +0 -111
- package/lib/components/VList/VListItemGroup.mjs +0 -41
- package/lib/components/VList/VListItemGroup.mjs.map +0 -1
- package/lib/components/VList/VListItemGroup.sass +0 -5
- package/lib/components/VList/_mixins.sass +0 -18
- package/lib/components/VMain/_index.scss +0 -2
- package/lib/components/VNavigationDrawer/_index.scss +0 -2
- package/lib/components/VParallax/_variables.scss +0 -4
- package/lib/components/VRadioGroup/VRadio.mjs +0 -179
- package/lib/components/VRadioGroup/VRadio.mjs.map +0 -1
- package/lib/components/VRadioGroup/VRadio.sass +0 -25
- package/lib/components/VRangeSlider/VRangeSlider.sass +0 -19
- package/lib/components/VResponsive/_index.scss +0 -1
- package/lib/components/VSelect/VSelectList.mjs +0 -251
- package/lib/components/VSelect/VSelectList.mjs.map +0 -1
- package/lib/components/VSheet/_index.scss +0 -2
- package/lib/components/VSlideGroup/VSlideItem.mjs +0 -14
- package/lib/components/VSlideGroup/VSlideItem.mjs.map +0 -1
- package/lib/components/VSubheader/VSubheader.mjs +0 -31
- package/lib/components/VSubheader/VSubheader.mjs.map +0 -1
- package/lib/components/VSubheader/VSubheader.sass +0 -15
- package/lib/components/VSubheader/_variables.scss +0 -6
- package/lib/components/VSubheader/index.mjs +0 -4
- package/lib/components/VSubheader/index.mjs.map +0 -1
- package/lib/components/VSystemBar/_index.scss +0 -2
- package/lib/components/VTabs/VTabItem.mjs +0 -23
- package/lib/components/VTabs/VTabItem.mjs.map +0 -1
- package/lib/components/VTabs/VTabsBar.mjs +0 -86
- package/lib/components/VTabs/VTabsBar.mjs.map +0 -1
- package/lib/components/VTabs/VTabsItems.mjs +0 -37
- package/lib/components/VTabs/VTabsItems.mjs.map +0 -1
- package/lib/components/VTabs/VTabsSlider.mjs +0 -20
- package/lib/components/VTabs/VTabsSlider.mjs.map +0 -1
- package/lib/components/VTextField/_mixins.sass +0 -18
- package/lib/components/VToolbar/_index.scss +0 -2
- package/lib/entry.mjs +0 -4
- package/lib/entry.mjs.map +0 -1
- package/lib/globals.d.mjs +0 -2
- package/lib/globals.d.mjs.map +0 -1
- package/lib/mixins/activatable/index.mjs +0 -196
- package/lib/mixins/activatable/index.mjs.map +0 -1
- package/lib/mixins/applicationable/index.mjs +0 -72
- package/lib/mixins/applicationable/index.mjs.map +0 -1
- package/lib/mixins/binds-attrs/index.mjs +0 -42
- package/lib/mixins/binds-attrs/index.mjs.map +0 -1
- package/lib/mixins/bootable/index.mjs +0 -54
- package/lib/mixins/bootable/index.mjs.map +0 -1
- package/lib/mixins/button-group/index.mjs +0 -28
- package/lib/mixins/button-group/index.mjs.map +0 -1
- package/lib/mixins/colorable/index.mjs +0 -78
- package/lib/mixins/colorable/index.mjs.map +0 -1
- package/lib/mixins/comparable/index.mjs +0 -15
- package/lib/mixins/comparable/index.mjs.map +0 -1
- package/lib/mixins/dependent/index.mjs +0 -73
- package/lib/mixins/dependent/index.mjs.map +0 -1
- package/lib/mixins/detachable/index.mjs +0 -128
- package/lib/mixins/detachable/index.mjs.map +0 -1
- package/lib/mixins/elevatable/index.mjs +0 -26
- package/lib/mixins/elevatable/index.mjs.map +0 -1
- package/lib/mixins/filterable/index.mjs +0 -16
- package/lib/mixins/filterable/index.mjs.map +0 -1
- package/lib/mixins/intersectable/index.mjs +0 -53
- package/lib/mixins/intersectable/index.mjs.map +0 -1
- package/lib/mixins/loadable/index.mjs +0 -45
- package/lib/mixins/loadable/index.mjs.map +0 -1
- package/lib/mixins/localable/index.mjs +0 -17
- package/lib/mixins/localable/index.mjs.map +0 -1
- package/lib/mixins/menuable/index.mjs +0 -361
- package/lib/mixins/menuable/index.mjs.map +0 -1
- package/lib/mixins/mobile/index.mjs +0 -50
- package/lib/mixins/mobile/index.mjs.map +0 -1
- package/lib/mixins/overlayable/index.mjs +0 -201
- package/lib/mixins/overlayable/index.mjs.map +0 -1
- package/lib/mixins/picker/index.mjs +0 -75
- package/lib/mixins/picker/index.mjs.map +0 -1
- package/lib/mixins/picker-button/index.mjs +0 -35
- package/lib/mixins/picker-button/index.mjs.map +0 -1
- package/lib/mixins/proxyable/index.mjs +0 -50
- package/lib/mixins/proxyable/index.mjs.map +0 -1
- package/lib/mixins/returnable/index.mjs +0 -36
- package/lib/mixins/returnable/index.mjs.map +0 -1
- package/lib/mixins/rippleable/index.mjs +0 -35
- package/lib/mixins/rippleable/index.mjs.map +0 -1
- package/lib/mixins/roundable/index.mjs +0 -37
- package/lib/mixins/roundable/index.mjs.map +0 -1
- package/lib/mixins/routable/index.mjs +0 -146
- package/lib/mixins/routable/index.mjs.map +0 -1
- package/lib/mixins/selectable/index.mjs +0 -167
- package/lib/mixins/selectable/index.mjs.map +0 -1
- package/lib/mixins/stackable/index.mjs +0 -55
- package/lib/mixins/stackable/index.mjs.map +0 -1
- package/lib/mixins/themeable/index.mjs +0 -111
- package/lib/mixins/themeable/index.mjs.map +0 -1
- package/lib/mixins/toggleable/index.mjs +0 -40
- package/lib/mixins/toggleable/index.mjs.map +0 -1
- package/lib/mixins/transitionable/index.mjs +0 -13
- package/lib/mixins/transitionable/index.mjs.map +0 -1
- package/lib/mixins/translatable/index.mjs +0 -59
- package/lib/mixins/translatable/index.mjs.map +0 -1
- package/lib/mixins/validatable/index.mjs +0 -263
- package/lib/mixins/validatable/index.mjs.map +0 -1
- package/lib/services/application/index.mjs +0 -44
- package/lib/services/application/index.mjs.map +0 -1
- package/lib/services/breakpoint/index.mjs +0 -151
- package/lib/services/breakpoint/index.mjs.map +0 -1
- package/lib/services/index.mjs +0 -10
- package/lib/services/index.mjs.map +0 -1
- package/lib/services/lang/index.mjs +0 -69
- package/lib/services/lang/index.mjs.map +0 -1
- package/lib/services/service/index.mjs +0 -8
- package/lib/services/service/index.mjs.map +0 -1
- package/lib/styles/components/_index.sass +0 -1
- package/lib/styles/components/_selection-controls.sass +0 -119
- package/lib/styles/elements/_code.sass +0 -23
- package/lib/styles/elements/_headings.sass +0 -8
- package/lib/styles/elements/_lists.sass +0 -3
- package/lib/styles/elements/_typography.sass +0 -88
- package/lib/styles/settings/_dark.scss +0 -145
- package/lib/styles/settings/_light.scss +0 -126
- package/lib/styles/settings/_theme.scss +0 -1
- package/lib/styles/styles.sass +0 -2
- package/lib/util/makeProps.mjs +0 -52
- package/lib/util/makeProps.mjs.map +0 -1
- package/lib/util/useDirective.mjs +0 -7
- package/lib/util/useDirective.mjs.map +0 -1
- package/types/.npmignore +0 -2
- package/types/alacarte.d.ts +0 -49
- package/types/colors.d.ts +0 -107
- package/types/index.d.ts +0 -300
- package/types/lib.d.ts +0 -380
- package/types/services/application.d.ts +0 -27
- package/types/services/breakpoint.d.ts +0 -45
- package/types/services/goto.d.ts +0 -31
- package/types/services/icons.d.ts +0 -71
- package/types/services/index.d.ts +0 -16
- package/types/services/lang.d.ts +0 -19
- package/types/services/theme.d.ts +0 -83
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/composables/color.ts"],"names":["computed","isRef","isCssColor","useColor","colors","backgroundIsCssColor","value","background","textIsCssColor","text","colorClasses","classes","push","colorStyles","styles","backgroundColor","color","caretColor","useTextColor","props","name","textColorClasses","textColorStyles","useBackgroundColor","backgroundColorClasses","backgroundColorStyles"],"mappings":"AAAA;AACA,SAASA,QAAT,EAAmBC,KAAnB,QAAgC,KAAhC;SACSC,U,6BAET;;AAeA;AACA,OAAO,SAASC,QAAT,CAAmBC,MAAnB,EAAgF;AACrF,QAAMC,oBAAoB,GAAGL,QAAQ,CAAC,MAAME,UAAU,CAACE,MAAM,CAACE,KAAP,CAAaC,UAAd,CAAjB,CAArC;AACA,QAAMC,cAAc,GAAGR,QAAQ,CAAC,MAAME,UAAU,CAACE,MAAM,CAACE,KAAP,CAAaG,IAAd,CAAjB,CAA/B;AAEA,QAAMC,YAAY,GAAGV,QAAQ,CAAC,MAAM;AAClC,UAAMW,OAAiB,GAAG,EAA1B;;AAEA,QAAIP,MAAM,CAACE,KAAP,CAAaC,UAAb,IAA2B,CAACF,oBAAoB,CAACC,KAArD,EAA4D;AAC1DK,MAAAA,OAAO,CAACC,IAAR,
|
|
1
|
+
{"version":3,"sources":["../../src/composables/color.ts"],"names":["computed","isRef","isCssColor","useColor","colors","backgroundIsCssColor","value","background","textIsCssColor","text","colorClasses","classes","push","colorStyles","styles","backgroundColor","color","caretColor","useTextColor","props","name","textColorClasses","textColorStyles","useBackgroundColor","backgroundColorClasses","backgroundColorStyles"],"mappings":"AAAA;AACA,SAASA,QAAT,EAAmBC,KAAnB,QAAgC,KAAhC;SACSC,U,6BAET;;AAeA;AACA,OAAO,SAASC,QAAT,CAAmBC,MAAnB,EAAgF;AACrF,QAAMC,oBAAoB,GAAGL,QAAQ,CAAC,MAAME,UAAU,CAACE,MAAM,CAACE,KAAP,CAAaC,UAAd,CAAjB,CAArC;AACA,QAAMC,cAAc,GAAGR,QAAQ,CAAC,MAAME,UAAU,CAACE,MAAM,CAACE,KAAP,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A,KAAK,CAACb,KAArB,GAA8Bc,IAAI,GAAGD,KAAK,CAACC,IAAD,CAAR,GAAiB;AAD5B,GAAP,CAAD,CAAvB;AAIA,QAAM;AACJV,IAAAA,YAAY,EAAEW,gBADV;AAEJR,IAAAA,WAAW,EAAES;AAFT,MAGFnB,QAAQ,CAACC,MAAD,CAHZ;AAKA,SAAO;AAAEiB,IAAAA,gBAAF;AAAoBC,IAAAA;AAApB,GAAP;AACD;AAID,OAAO,SAASC,kBAAT,CACLJ,KADK,EAELC,IAFK,EAGgB;AACrB,QAAMhB,MAAM,GAAGJ,QAAQ,CAAC,OAAO;AAC7BO,IAAAA,UAAU,EAAEN,KAAK,CAACkB,KAAD,CAAL,GAAeA,KAAK,CAACb,KAArB,GAA8Bc,IAAI,GAAGD,KAAK,CAACC,IAAD,CAAR,GAAiB;AADlC,GAAP,CAAD,CAAvB;AAIA,QAAM;AACJV,IAAAA,YAAY,EAAEc,sBADV;AAEJX,IAAAA,WAAW,EAAEY;AAFT,MAGFtB,QAAQ,CAACC,MAAD,CAHZ;AAKA,SAAO;AAAEoB,IAAAA,sBAAF;AAA0BC,IAAAA;AAA1B,GAAP;AACD","sourcesContent":["// Utilities\nimport { computed, isRef } from 'vue'\nimport { isCssColor } from '@/util'\n\n// Types\nimport type { CSSProperties, Ref } from 'vue'\n\ntype ColorValue = string | false | null | undefined\n\nexport interface TextColorData {\n textColorClasses: Ref<string[]>\n textColorStyles: Ref<CSSProperties>\n}\n\nexport interface BackgroundColorData {\n backgroundColorClasses: Ref<string[]>\n backgroundColorStyles: Ref<CSSProperties>\n}\n\n// Composables\nexport function useColor (colors: Ref<{ background?: ColorValue, text?: ColorValue }>) {\n const backgroundIsCssColor = computed(() => isCssColor(colors.value.background))\n const textIsCssColor = computed(() => isCssColor(colors.value.text))\n\n const colorClasses = computed(() => {\n const classes: string[] = []\n\n if (colors.value.background && !backgroundIsCssColor.value) {\n classes.push(`bg-${colors.value.background}`)\n }\n\n if (colors.value.text && !textIsCssColor.value) {\n classes.push(`text-${colors.value.text}`)\n }\n\n return classes\n })\n\n const colorStyles = computed(() => {\n const styles: CSSProperties = {}\n\n if (colors.value.background && backgroundIsCssColor.value) {\n styles.backgroundColor = colors.value.background\n }\n\n if (colors.value.text && textIsCssColor.value) {\n styles.color = colors.value.text\n styles.caretColor = colors.value.text\n }\n\n return styles\n })\n\n return { colorClasses, colorStyles }\n}\n\nexport function useTextColor (color: Ref<ColorValue>): TextColorData\nexport function useTextColor <T extends Record<K, ColorValue>, K extends string> (props: T, name: K): TextColorData\nexport function useTextColor <T extends Record<K, ColorValue>, K extends string> (\n props: T | Ref<ColorValue>,\n name?: K\n): TextColorData {\n const colors = computed(() => ({\n text: isRef(props) ? props.value : (name ? props[name] : null),\n }))\n\n const {\n colorClasses: textColorClasses,\n colorStyles: textColorStyles,\n } = useColor(colors)\n\n return { textColorClasses, textColorStyles }\n}\n\nexport function useBackgroundColor (color: Ref<ColorValue>): BackgroundColorData\nexport function useBackgroundColor <T extends Record<K, ColorValue>, K extends string> (props: T, name: K): BackgroundColorData\nexport function useBackgroundColor <T extends Record<K, ColorValue>, K extends string> (\n props: T | Ref<ColorValue>,\n name?: K\n): BackgroundColorData {\n const colors = computed(() => ({\n background: isRef(props) ? props.value : (name ? props[name] : null),\n }))\n\n const {\n colorClasses: backgroundColorClasses,\n colorStyles: backgroundColorStyles,\n } = useColor(colors)\n\n return { backgroundColorClasses, backgroundColorStyles }\n}\n"],"file":"color.mjs"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Utilities
|
|
2
|
+
import { computed, inject, provide, ref, unref } from 'vue';
|
|
3
|
+
import { mergeDeep } from "../util/helpers.mjs"; // Types
|
|
4
|
+
|
|
5
|
+
export const DefaultsSymbol = Symbol.for('vuetify:defaults');
|
|
6
|
+
export function createDefaults(options) {
|
|
7
|
+
return ref(options != null ? options : {});
|
|
8
|
+
}
|
|
9
|
+
export function useDefaults() {
|
|
10
|
+
const defaults = inject(DefaultsSymbol);
|
|
11
|
+
if (!defaults) throw new Error('[Vuetify] Could not find defaults instance');
|
|
12
|
+
return defaults;
|
|
13
|
+
}
|
|
14
|
+
export function provideDefaults(defaults, options) {
|
|
15
|
+
const injectedDefaults = useDefaults();
|
|
16
|
+
const providedDefaults = ref(defaults);
|
|
17
|
+
const newDefaults = computed(() => {
|
|
18
|
+
const scoped = unref(options == null ? void 0 : options.scoped);
|
|
19
|
+
const reset = unref(options == null ? void 0 : options.reset);
|
|
20
|
+
const root = unref(options == null ? void 0 : options.root);
|
|
21
|
+
let properties = mergeDeep(providedDefaults.value, {
|
|
22
|
+
prev: injectedDefaults.value
|
|
23
|
+
});
|
|
24
|
+
if (scoped) return properties;
|
|
25
|
+
|
|
26
|
+
if (reset || root) {
|
|
27
|
+
const len = Number(reset || Infinity);
|
|
28
|
+
|
|
29
|
+
for (let i = 0; i <= len; i++) {
|
|
30
|
+
if (!properties.prev) break;
|
|
31
|
+
properties = properties.prev;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return properties;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return mergeDeep(properties.prev, properties);
|
|
38
|
+
});
|
|
39
|
+
provide(DefaultsSymbol, newDefaults);
|
|
40
|
+
return newDefaults;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=defaults.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/composables/defaults.ts"],"names":["computed","inject","provide","ref","unref","mergeDeep","DefaultsSymbol","Symbol","for","createDefaults","options","useDefaults","defaults","Error","provideDefaults","injectedDefaults","providedDefaults","newDefaults","scoped","reset","root","properties","value","prev","len","Number","Infinity","i"],"mappings":"AAAA;AACA,SAASA,QAAT,EAAmBC,MAAnB,EAA2BC,OAA3B,EAAoCC,GAApC,EAAyCC,KAAzC,QAAsD,KAAtD;SACSC,S,+BAET;;AAWA,OAAO,MAAMC,cAAmD,GAAGC,MAAM,CAACC,GAAP,CAAW,kBAAX,CAA5D;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AS,CAACgB,UAAU,CAACE,IAAZ,EAAkBF,UAAlB,CAAhB;AACD,GAtB2B,CAA5B;AAwBAnB,EAAAA,OAAO,CAACI,cAAD,EAAiBW,WAAjB,CAAP;AAEA,SAAOA,WAAP;AACD","sourcesContent":["// Utilities\nimport { computed, inject, provide, ref, unref } from 'vue'\nimport { mergeDeep } from '@/util/helpers'\n\n// Types\nimport type { ComputedRef, InjectionKey, Ref } from 'vue'\nimport type { MaybeRef } from '@/util'\n\nexport interface DefaultsInstance {\n [key: string]: undefined | Record<string, unknown>\n global?: Record<string, unknown>\n}\n\nexport type DefaultsOptions = Partial<DefaultsInstance>\n\nexport const DefaultsSymbol: InjectionKey<Ref<DefaultsInstance>> = Symbol.for('vuetify:defaults')\n\nexport function createDefaults (options?: DefaultsInstance): Ref<DefaultsInstance> {\n return ref(options ?? {})\n}\n\nexport function useDefaults () {\n const defaults = inject(DefaultsSymbol)\n\n if (!defaults) throw new Error('[Vuetify] Could not find defaults instance')\n\n return defaults\n}\n\nexport function provideDefaults (\n defaults?: MaybeRef<DefaultsInstance | undefined>,\n options?: {\n reset?: MaybeRef<number | string | undefined>\n root?: MaybeRef<boolean | undefined>\n scoped?: MaybeRef<boolean | undefined>\n }\n) {\n const injectedDefaults = useDefaults()\n const providedDefaults = ref(defaults)\n\n const newDefaults = computed(() => {\n const scoped = unref(options?.scoped)\n const reset = unref(options?.reset)\n const root = unref(options?.root)\n\n let properties = mergeDeep(providedDefaults.value, { prev: injectedDefaults.value })\n\n if (scoped) return properties\n\n if (reset || root) {\n const len = Number(reset || Infinity)\n\n for (let i = 0; i <= len; i++) {\n if (!properties.prev) break\n\n properties = properties.prev\n }\n\n return properties\n }\n\n return mergeDeep(properties.prev, properties)\n }) as ComputedRef<DefaultsInstance>\n\n provide(DefaultsSymbol, newDefaults)\n\n return newDefaults\n}\n"],"file":"defaults.mjs"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Utilities
|
|
2
2
|
import { computed } from 'vue';
|
|
3
|
-
import { propsFactory } from "../util/index.mjs"; // Types
|
|
3
|
+
import { getCurrentInstanceName, propsFactory } from "../util/index.mjs"; // Types
|
|
4
4
|
|
|
5
|
-
const allowedDensities = ['default', 'comfortable', 'compact'];
|
|
5
|
+
const allowedDensities = [null, 'default', 'comfortable', 'compact'];
|
|
6
6
|
// Composables
|
|
7
7
|
export const makeDensityProps = propsFactory({
|
|
8
8
|
density: {
|
|
@@ -11,9 +11,10 @@ export const makeDensityProps = propsFactory({
|
|
|
11
11
|
validator: v => allowedDensities.includes(v)
|
|
12
12
|
}
|
|
13
13
|
}, 'density');
|
|
14
|
-
export function useDensity(props
|
|
14
|
+
export function useDensity(props) {
|
|
15
|
+
let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName();
|
|
15
16
|
const densityClasses = computed(() => {
|
|
16
|
-
return
|
|
17
|
+
return `${name}--density-${props.density}`;
|
|
17
18
|
});
|
|
18
19
|
return {
|
|
19
20
|
densityClasses
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/composables/density.ts"],"names":["computed","propsFactory","allowedDensities","makeDensityProps","density","type","String","default","validator","v","includes","useDensity","props","name","densityClasses"],"mappings":"AAAA;AACA,SAASA,QAAT,QAAyB,KAAzB;SACSC,Y,
|
|
1
|
+
{"version":3,"sources":["../../src/composables/density.ts"],"names":["computed","getCurrentInstanceName","propsFactory","allowedDensities","makeDensityProps","density","type","String","default","validator","v","includes","useDensity","props","name","densityClasses"],"mappings":"AAAA;AACA,SAASA,QAAT,QAAyB,KAAzB;SACSC,sB,EAAwBC,Y,6BAEjC;;AAGA,MAAMC,gBAAgB,GAAG,CAAC,IAAD,EAAO,SAAP,EAAkB,aAAlB,EAAiC,SAAjC,CAAzB;AAQA;AACA,OAAO,MAAMC,gBAAgB,GAAGF,YAAY,CAAC;AAC3CG,EAAAA,OAAO,EAAE;AACPC,IAAAA,IAAI,EAAEC,MADC;AAEPC,IAAAA,OAAO,EAAE,SAFF;AAGPC,IAAAA,SAAS,EAAGC,CAAD,IAAYP,gBAAgB,CAACQ,QAAjB,CAA0BD,CAA1B;AAHhB;AADkC,CAAD,EAMzC,SANyC,CAArC;AAQP,OAAO,SAASE,UAAT,CACLC,KADK,EAGL;AAAA,MADAC,IACA,uEADOb,sBAAsB,EAC7B;AACA,QAAMc,cAAc,GAAGf,QAAQ,CAAC,MAAM;AACpC,WAAQ,GAAEc,IAAK,aAAYD,KAAK,CAACR,OAAQ,EAAzC;AACD,GAF8B,CAA/B;AAIA,SAAO;AAAEU,IAAAA;AAAF,GAAP;AACD","sourcesContent":["// Utilities\nimport { computed } from 'vue'\nimport { getCurrentInstanceName, propsFactory } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\nconst allowedDensities = [null, 'default', 'comfortable', 'compact'] as const\n\nexport type Density = typeof allowedDensities[number]\n\nexport interface DensityProps {\n density?: Density\n}\n\n// Composables\nexport const makeDensityProps = propsFactory({\n density: {\n type: String as PropType<Density>,\n default: 'default',\n validator: (v: any) => allowedDensities.includes(v),\n },\n}, 'density')\n\nexport function useDensity (\n props: DensityProps,\n name = getCurrentInstanceName(),\n) {\n const densityClasses = computed(() => {\n return `${name}--density-${props.density}`\n })\n\n return { densityClasses }\n}\n"],"file":"density.mjs"}
|
|
@@ -4,7 +4,7 @@ import { mergeDeep } from "../util/index.mjs"; // Globals
|
|
|
4
4
|
|
|
5
5
|
import { IN_BROWSER, SUPPORTS_TOUCH } from "../util/globals.mjs"; // Types
|
|
6
6
|
|
|
7
|
-
export const
|
|
7
|
+
export const DisplaySymbol = Symbol.for('vuetify:display');
|
|
8
8
|
const defaultDisplayOptions = {
|
|
9
9
|
mobileBreakpoint: 'lg',
|
|
10
10
|
thresholds: {
|
|
@@ -17,7 +17,8 @@ const defaultDisplayOptions = {
|
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
const parseDisplayOptions = (
|
|
20
|
+
const parseDisplayOptions = function () {
|
|
21
|
+
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultDisplayOptions;
|
|
21
22
|
return mergeDeep(defaultDisplayOptions, options);
|
|
22
23
|
}; // Cross-browser support as described in:
|
|
23
24
|
// https://stackoverflow.com/questions/1248081
|
|
@@ -125,7 +126,7 @@ export function createDisplay(options) {
|
|
|
125
126
|
return toRefs(state);
|
|
126
127
|
}
|
|
127
128
|
export function useDisplay() {
|
|
128
|
-
const display = inject(
|
|
129
|
+
const display = inject(DisplaySymbol);
|
|
129
130
|
if (!display) throw new Error('Could not find Vuetify display injection');
|
|
130
131
|
return display;
|
|
131
132
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/composables/display.ts"],"names":["inject","reactive","ref","toRefs","watchEffect","mergeDeep","IN_BROWSER","SUPPORTS_TOUCH","VuetifyDisplaySymbol","Symbol","for","defaultDisplayOptions","mobileBreakpoint","thresholds","xs","sm","md","lg","xl","xxl","parseDisplayOptions","options","getClientWidth","Math","max","document","documentElement","clientWidth","window","innerWidth","getClientHeight","clientHeight","innerHeight","getPlatform","userAgent","navigator","match","regexp","Boolean","android","ios","cordova","electron","chrome","edge","firefox","opera","win","mac","linux","ssr","touch","createDisplay","height","platform","state","width","onResize","value","name","breakpointValue","mobile","smAndUp","mdAndUp","lgAndUp","xlAndUp","smAndDown","mdAndDown","lgAndDown","xlAndDown","addEventListener","passive","useDisplay","display","Error"],"mappings":"AAAA;AACA,SAASA,MAAT,EAAiBC,QAAjB,EAA2BC,GAA3B,EAAgCC,MAAhC,EAAwCC,WAAxC,QAA2D,KAA3D;SACSC,S,6BAET;;SACSC,U,EAAYC,c,+BAErB;;AAgEA,OAAO,MAAMC,oBAA2D,GAAGC,MAAM,CAACC,GAAP,CAAW,iBAAX,CAApE;AAEP,MAAMC,qBAAqC,GAAG;AAC5CC,EAAAA,gBAAgB,EAAE,IAD0B;AAE5CC,EAAAA,UAAU,EAAE;AACVC,IAAAA,EAAE,EAAE,CADM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C,OAAO,GAAGzE,MAAM,CAACQ,oBAAD,CAAtB;AAEA,MAAI,CAACiE,OAAL,EAAc,MAAM,IAAIC,KAAJ,CAAU,0CAAV,CAAN;AAEd,SAAOD,OAAP;AACD","sourcesContent":["// Utilities\nimport { inject, reactive, ref, toRefs, watchEffect } from 'vue'\nimport { mergeDeep } from '@/util'\n\n// Globals\nimport { IN_BROWSER, SUPPORTS_TOUCH } from '@/util/globals'\n\n// Types\nimport type { InjectionKey, ToRefs } from 'vue'\n\nexport type DisplayBreakpoint = keyof DisplayThresholds\n\nexport interface DisplayThresholds {\n xs: number\n sm: number\n md: number\n lg: number\n xl: number\n xxl: number\n}\n\nexport interface DisplayOptions {\n mobileBreakpoint?: number | DisplayBreakpoint\n thresholds?: Partial<DisplayThresholds>\n}\n\nexport interface InternalDisplayOptions {\n mobileBreakpoint: number | DisplayBreakpoint\n thresholds: DisplayThresholds\n}\n\nexport interface DisplayPlatform {\n android: boolean\n ios: boolean\n cordova: boolean\n electron: boolean\n chrome: boolean\n edge: boolean\n firefox: boolean\n opera: boolean\n win: boolean\n mac: boolean\n linux: boolean\n touch: boolean\n ssr: boolean\n}\n\nexport interface DisplayInstance {\n xs: boolean\n sm: boolean\n md: boolean\n lg: boolean\n xl: boolean\n xxl: boolean\n smAndUp: boolean\n mdAndUp: boolean\n lgAndUp: boolean\n xlAndUp: boolean\n smAndDown: boolean\n mdAndDown: boolean\n lgAndDown: boolean\n xlAndDown: boolean\n name: DisplayBreakpoint\n height: number\n width: number\n mobile: boolean\n mobileBreakpoint: number | DisplayBreakpoint\n platform: DisplayPlatform\n thresholds: DisplayThresholds\n}\n\nexport const VuetifyDisplaySymbol: InjectionKey<ToRefs<DisplayInstance>> = Symbol.for('vuetify:display')\n\nconst defaultDisplayOptions: DisplayOptions = {\n mobileBreakpoint: 'lg',\n thresholds: {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920,\n xxl: 2560,\n },\n}\n\nconst parseDisplayOptions = (options: DisplayOptions = defaultDisplayOptions) => {\n return mergeDeep(defaultDisplayOptions, options) as InternalDisplayOptions\n}\n\n// Cross-browser support as described in:\n// https://stackoverflow.com/questions/1248081\nfunction getClientWidth () {\n return IN_BROWSER ? Math.max(\n document.documentElement!.clientWidth,\n window.innerWidth\n ) : 0 // SSR\n}\n\nfunction getClientHeight () {\n return IN_BROWSER ? Math.max(\n document.documentElement!.clientHeight,\n window.innerHeight\n ) : 0 // SSR\n}\n\nfunction getPlatform (): DisplayPlatform {\n const userAgent = IN_BROWSER ? window.navigator.userAgent : 'ssr'\n\n function match (regexp: RegExp) {\n return Boolean(userAgent.match(regexp))\n }\n\n const android = match(/android/i)\n const ios = match(/iphone|ipad|ipod/i)\n const cordova = match(/cordova/i)\n const electron = match(/electron/i)\n const chrome = match(/chrome/i)\n const edge = match(/edge/i)\n const firefox = match(/firefox/i)\n const opera = match(/opera/i)\n const win = match(/win/i)\n const mac = match(/mac/i)\n const linux = match(/linux/i)\n const ssr = match(/ssr/i)\n\n return {\n android,\n ios,\n cordova,\n electron,\n chrome,\n edge,\n firefox,\n opera,\n win,\n mac,\n linux,\n touch: SUPPORTS_TOUCH,\n ssr,\n }\n}\n\nexport function createDisplay (options?: DisplayOptions): ToRefs<DisplayInstance> {\n const { thresholds, mobileBreakpoint } = parseDisplayOptions(options)\n\n const height = ref(getClientHeight())\n const platform = getPlatform()\n const state = reactive({} as DisplayInstance)\n const width = ref(getClientWidth())\n\n function onResize () {\n height.value = getClientHeight()\n width.value = getClientWidth()\n }\n\n // eslint-disable-next-line max-statements\n watchEffect(() => {\n const xs = width.value < thresholds.sm\n const sm = width.value < thresholds.md && !xs\n const md = width.value < thresholds.lg && !(sm || xs)\n const lg = width.value < thresholds.xl && !(md || sm || xs)\n const xl = width.value < thresholds.xxl && !(lg || md || sm || xs)\n const xxl = width.value >= thresholds.xxl\n const name =\n xs ? 'xs'\n : sm ? 'sm'\n : md ? 'md'\n : lg ? 'lg'\n : xl ? 'xl'\n : 'xxl'\n const breakpointValue = typeof mobileBreakpoint === 'number' ? mobileBreakpoint : thresholds[mobileBreakpoint]\n const mobile = !platform.ssr\n ? width.value < breakpointValue\n : platform.android || platform.ios || platform.opera\n\n state.xs = xs\n state.sm = sm\n state.md = md\n state.lg = lg\n state.xl = xl\n state.xxl = xxl\n state.smAndUp = !xs\n state.mdAndUp = !(xs || sm)\n state.lgAndUp = !(xs || sm || md)\n state.xlAndUp = !(xs || sm || md || lg)\n state.smAndDown = !(md || lg || xl || xxl)\n state.mdAndDown = !(lg || xl || xxl)\n state.lgAndDown = !(xl || xxl)\n state.xlAndDown = !xxl\n state.name = name\n state.height = height.value\n state.width = width.value\n state.mobile = mobile\n state.mobileBreakpoint = mobileBreakpoint\n state.platform = platform\n state.thresholds = thresholds\n })\n\n if (IN_BROWSER) {\n window.addEventListener('resize', onResize, { passive: true })\n }\n\n return toRefs(state)\n}\n\nexport function useDisplay () {\n const display = inject(VuetifyDisplaySymbol)\n\n if (!display) throw new Error('Could not find Vuetify display injection')\n\n return display\n}\n"],"file":"display.mjs"}
|
|
1
|
+
{"version":3,"sources":["../../src/composables/display.ts"],"names":["inject","reactive","ref","toRefs","watchEffect","mergeDeep","IN_BROWSER","SUPPORTS_TOUCH","DisplaySymbol","Symbol","for","defaultDisplayOptions","mobileBreakpoint","thresholds","xs","sm","md","lg","xl","xxl","parseDisplayOptions","options","getClientWidth","Math","max","document","documentElement","clientWidth","window","innerWidth","getClientHeight","clientHeight","innerHeight","getPlatform","userAgent","navigator","match","regexp","Boolean","android","ios","cordova","electron","chrome","edge","firefox","opera","win","mac","linux","ssr","touch","createDisplay","height","platform","state","width","onResize","value","name","breakpointValue","mobile","smAndUp","mdAndUp","lgAndUp","xlAndUp","smAndDown","mdAndDown","lgAndDown","xlAndDown","addEventListener","passive","useDisplay","display","Error"],"mappings":"AAAA;AACA,SAASA,MAAT,EAAiBC,QAAjB,EAA2BC,GAA3B,EAAgCC,MAAhC,EAAwCC,WAAxC,QAA2D,KAA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,GAxCU,CAAX;;AA0CA,MAAIP,UAAJ,EAAgB;AACdsB,IAAAA,MAAM,CAAC0C,gBAAP,CAAwB,QAAxB,EAAkCb,QAAlC,EAA4C;AAAEc,MAAAA,OAAO,EAAE;AAAX,KAA5C;AACD;;AAED,SAAOpE,MAAM,CAACoD,KAAD,CAAb;AACD;AAED,OAAO,SAASiB,UAAT,GAAuB;AAC5B,QAAMC,OAAO,GAAGzE,MAAM,CAACQ,aAAD,CAAtB;AAEA,MAAI,CAACiE,OAAL,EAAc,MAAM,IAAIC,KAAJ,CAAU,0CAAV,CAAN;AAEd,SAAOD,OAAP;AACD","sourcesContent":["// Utilities\nimport { inject, reactive, ref, toRefs, watchEffect } from 'vue'\nimport { mergeDeep } from '@/util'\n\n// Globals\nimport { IN_BROWSER, SUPPORTS_TOUCH } from '@/util/globals'\n\n// Types\nimport type { InjectionKey, ToRefs } from 'vue'\n\nexport type DisplayBreakpoint = keyof DisplayThresholds\n\nexport interface DisplayThresholds {\n xs: number\n sm: number\n md: number\n lg: number\n xl: number\n xxl: number\n}\n\nexport interface DisplayOptions {\n mobileBreakpoint?: number | DisplayBreakpoint\n thresholds?: Partial<DisplayThresholds>\n}\n\nexport interface InternalDisplayOptions {\n mobileBreakpoint: number | DisplayBreakpoint\n thresholds: DisplayThresholds\n}\n\nexport interface DisplayPlatform {\n android: boolean\n ios: boolean\n cordova: boolean\n electron: boolean\n chrome: boolean\n edge: boolean\n firefox: boolean\n opera: boolean\n win: boolean\n mac: boolean\n linux: boolean\n touch: boolean\n ssr: boolean\n}\n\nexport interface DisplayInstance {\n xs: boolean\n sm: boolean\n md: boolean\n lg: boolean\n xl: boolean\n xxl: boolean\n smAndUp: boolean\n mdAndUp: boolean\n lgAndUp: boolean\n xlAndUp: boolean\n smAndDown: boolean\n mdAndDown: boolean\n lgAndDown: boolean\n xlAndDown: boolean\n name: DisplayBreakpoint\n height: number\n width: number\n mobile: boolean\n mobileBreakpoint: number | DisplayBreakpoint\n platform: DisplayPlatform\n thresholds: DisplayThresholds\n}\n\nexport const DisplaySymbol: InjectionKey<ToRefs<DisplayInstance>> = Symbol.for('vuetify:display')\n\nconst defaultDisplayOptions: DisplayOptions = {\n mobileBreakpoint: 'lg',\n thresholds: {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920,\n xxl: 2560,\n },\n}\n\nconst parseDisplayOptions = (options: DisplayOptions = defaultDisplayOptions) => {\n return mergeDeep(defaultDisplayOptions, options) as InternalDisplayOptions\n}\n\n// Cross-browser support as described in:\n// https://stackoverflow.com/questions/1248081\nfunction getClientWidth () {\n return IN_BROWSER ? Math.max(\n document.documentElement!.clientWidth,\n window.innerWidth\n ) : 0 // SSR\n}\n\nfunction getClientHeight () {\n return IN_BROWSER ? Math.max(\n document.documentElement!.clientHeight,\n window.innerHeight\n ) : 0 // SSR\n}\n\nfunction getPlatform (): DisplayPlatform {\n const userAgent = IN_BROWSER ? window.navigator.userAgent : 'ssr'\n\n function match (regexp: RegExp) {\n return Boolean(userAgent.match(regexp))\n }\n\n const android = match(/android/i)\n const ios = match(/iphone|ipad|ipod/i)\n const cordova = match(/cordova/i)\n const electron = match(/electron/i)\n const chrome = match(/chrome/i)\n const edge = match(/edge/i)\n const firefox = match(/firefox/i)\n const opera = match(/opera/i)\n const win = match(/win/i)\n const mac = match(/mac/i)\n const linux = match(/linux/i)\n const ssr = match(/ssr/i)\n\n return {\n android,\n ios,\n cordova,\n electron,\n chrome,\n edge,\n firefox,\n opera,\n win,\n mac,\n linux,\n touch: SUPPORTS_TOUCH,\n ssr,\n }\n}\n\nexport function createDisplay (options?: DisplayOptions): ToRefs<DisplayInstance> {\n const { thresholds, mobileBreakpoint } = parseDisplayOptions(options)\n\n const height = ref(getClientHeight())\n const platform = getPlatform()\n const state = reactive({} as DisplayInstance)\n const width = ref(getClientWidth())\n\n function onResize () {\n height.value = getClientHeight()\n width.value = getClientWidth()\n }\n\n // eslint-disable-next-line max-statements\n watchEffect(() => {\n const xs = width.value < thresholds.sm\n const sm = width.value < thresholds.md && !xs\n const md = width.value < thresholds.lg && !(sm || xs)\n const lg = width.value < thresholds.xl && !(md || sm || xs)\n const xl = width.value < thresholds.xxl && !(lg || md || sm || xs)\n const xxl = width.value >= thresholds.xxl\n const name =\n xs ? 'xs'\n : sm ? 'sm'\n : md ? 'md'\n : lg ? 'lg'\n : xl ? 'xl'\n : 'xxl'\n const breakpointValue = typeof mobileBreakpoint === 'number' ? mobileBreakpoint : thresholds[mobileBreakpoint]\n const mobile = !platform.ssr\n ? width.value < breakpointValue\n : platform.android || platform.ios || platform.opera\n\n state.xs = xs\n state.sm = sm\n state.md = md\n state.lg = lg\n state.xl = xl\n state.xxl = xxl\n state.smAndUp = !xs\n state.mdAndUp = !(xs || sm)\n state.lgAndUp = !(xs || sm || md)\n state.xlAndUp = !(xs || sm || md || lg)\n state.smAndDown = !(md || lg || xl || xxl)\n state.mdAndDown = !(lg || xl || xxl)\n state.lgAndDown = !(xl || xxl)\n state.xlAndDown = !xxl\n state.name = name\n state.height = height.value\n state.width = width.value\n state.mobile = mobile\n state.mobileBreakpoint = mobileBreakpoint\n state.platform = platform\n state.thresholds = thresholds\n })\n\n if (IN_BROWSER) {\n window.addEventListener('resize', onResize, { passive: true })\n }\n\n return toRefs(state)\n}\n\nexport function useDisplay () {\n const display = inject(DisplaySymbol)\n\n if (!display) throw new Error('Could not find Vuetify display injection')\n\n return display\n}\n"],"file":"display.mjs"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Utilities
|
|
2
|
-
import { computed } from 'vue';
|
|
2
|
+
import { computed, isRef } from 'vue';
|
|
3
3
|
import { propsFactory } from "../util/index.mjs"; // Types
|
|
4
4
|
|
|
5
5
|
// Composables
|
|
@@ -18,9 +18,10 @@ export const makeElevationProps = propsFactory({
|
|
|
18
18
|
}, 'elevation');
|
|
19
19
|
export function useElevation(props) {
|
|
20
20
|
const elevationClasses = computed(() => {
|
|
21
|
+
const elevation = isRef(props) ? props.value : props.elevation;
|
|
21
22
|
const classes = [];
|
|
22
|
-
if (
|
|
23
|
-
classes.push(
|
|
23
|
+
if (elevation == null) return classes;
|
|
24
|
+
classes.push(`elevation-${elevation}`);
|
|
24
25
|
return classes;
|
|
25
26
|
});
|
|
26
27
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/composables/elevation.ts"],"names":["computed","propsFactory","makeElevationProps","elevation","type","Number","String","validator","v","value","parseInt","isNaN","useElevation","props","elevationClasses","classes","push"],"mappings":"AAAA;AACA,SAASA,QAAT,
|
|
1
|
+
{"version":3,"sources":["../../src/composables/elevation.ts"],"names":["computed","isRef","propsFactory","makeElevationProps","elevation","type","Number","String","validator","v","value","parseInt","isNaN","useElevation","props","elevationClasses","classes","push"],"mappings":"AAAA;AACA,SAASA,QAAT,EAAmBC,KAAnB,QAAgC,KAAhC;SACSC,Y,6BAET;;AAMA;AACA,OAAO,MAAMC,kBAAkB,GAAGD,YAAY,CAAC;AAC7CE,EAAAA,SAAS,EAAE;AACTC,IAAAA,IAAI,EAAE,CAACC,MAAD,EAASC,MAAT,CADG;;AAETC,IAAAA,SAAS,CAAEC,CAAF,EAAU;AACjB,YAAMC,KAAK,GAAGC,QAAQ,CAACF,CAAD,CAAtB;AAEA,aACE,CAACG,KAAK,CAACF,KAAD,CAAN,IACAA,KAAK,IAAI,CADT,IAEA;AACA;AACAA,MAAAA,KAAK,IAAI,EALX;AAOD;;AAZQ;AADkC,CAAD,EAe3C,WAf2C,CAAvC;AAqBP,OAAO,SAASG,YAAT,CAAuBC,KAAvB,EAAgG;AACrG,QAAMC,gBAAgB,GAAGf,QAAQ,CAAC,MAAM;AACtC,UAAMI,SAAS,GAAGH,KAAK,CAACa,KAAD,CAAL,GAAeA,KAAK,CAACJ,KAArB,GAA6BI,KAAK,CAACV,SAArD;AACA,UAAMY,OAAiB,GAAG,EAA1B;AAEA,QAAIZ,SAAS,IAAI,IAAjB,EAAuB,OAAOY,OAAP;AAEvBA,IAAAA,OAAO,CAACC,IAAR,CAAc,aAAYb,SAAU,EAApC;AAEA,WAAOY,OAAP;AACD,GATgC,CAAjC;AAWA,SAAO;AAAED,IAAAA;AAAF,GAAP;AACD","sourcesContent":["// Utilities\nimport { computed, isRef } from 'vue'\nimport { propsFactory } from '@/util'\n\n// Types\nimport type { Ref } from 'vue'\nexport interface ElevationProps {\n elevation?: number | string | null\n}\n\n// Composables\nexport const makeElevationProps = propsFactory({\n elevation: {\n type: [Number, String],\n validator (v: any) {\n const value = parseInt(v)\n\n return (\n !isNaN(value) &&\n value >= 0 &&\n // Material Design has a maximum elevation of 24\n // https://material.io/design/environment/elevation.html#default-elevations\n value <= 24\n )\n },\n },\n}, 'elevation')\n\ntype ElevationData = {\n elevationClasses: Ref<string[]>\n}\n\nexport function useElevation (props: ElevationProps | Ref<number | string | undefined>): ElevationData {\n const elevationClasses = computed(() => {\n const elevation = isRef(props) ? props.value : props.elevation\n const classes: string[] = []\n\n if (elevation == null) return classes\n\n classes.push(`elevation-${elevation}`)\n\n return classes\n })\n\n return { elevationClasses }\n}\n"],"file":"elevation.mjs"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/* eslint-disable max-statements */
|
|
2
|
+
|
|
3
|
+
/* eslint-disable no-labels */
|
|
4
|
+
// Utilities
|
|
5
|
+
import { getPropertyFromItem, propsFactory, wrapInArray } from "../util/index.mjs";
|
|
6
|
+
import { computed, unref } from 'vue'; // Types
|
|
7
|
+
|
|
8
|
+
// Composables
|
|
9
|
+
export const defaultFilter = (value, query, item) => {
|
|
10
|
+
if (value == null || query == null) return -1;
|
|
11
|
+
return value.toString().toLocaleLowerCase().indexOf(query.toString().toLocaleLowerCase());
|
|
12
|
+
};
|
|
13
|
+
export const makeFilterProps = propsFactory({
|
|
14
|
+
customFilter: Function,
|
|
15
|
+
customKeyFilter: Object,
|
|
16
|
+
filterKeys: [Array, String],
|
|
17
|
+
filterMode: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: 'intersection'
|
|
20
|
+
},
|
|
21
|
+
noFilter: Boolean
|
|
22
|
+
}, 'filter');
|
|
23
|
+
export function filterItems(items, query, options) {
|
|
24
|
+
var _options$default, _options$customKeyFil;
|
|
25
|
+
|
|
26
|
+
const array = []; // always ensure we fall back to a functioning filter
|
|
27
|
+
|
|
28
|
+
const filter = (_options$default = options == null ? void 0 : options.default) != null ? _options$default : defaultFilter;
|
|
29
|
+
const keys = options != null && options.filterKeys ? wrapInArray(options.filterKeys) : false;
|
|
30
|
+
const customFiltersLength = Object.keys((_options$customKeyFil = options == null ? void 0 : options.customKeyFilter) != null ? _options$customKeyFil : {}).length;
|
|
31
|
+
if (!(items != null && items.length)) return array;
|
|
32
|
+
|
|
33
|
+
loop: for (const item of items) {
|
|
34
|
+
const customMatches = {};
|
|
35
|
+
const defaultMatches = {};
|
|
36
|
+
let match = -1;
|
|
37
|
+
|
|
38
|
+
if (query && typeof item === 'object' && !(options != null && options.noFilter)) {
|
|
39
|
+
const filterKeys = keys || Object.keys(item);
|
|
40
|
+
|
|
41
|
+
for (const key of filterKeys) {
|
|
42
|
+
var _options$customKeyFil2;
|
|
43
|
+
|
|
44
|
+
const value = getPropertyFromItem(item, key, item);
|
|
45
|
+
const keyFilter = options == null ? void 0 : (_options$customKeyFil2 = options.customKeyFilter) == null ? void 0 : _options$customKeyFil2[key];
|
|
46
|
+
match = keyFilter ? keyFilter(value, query, item) : filter(value, query, item);
|
|
47
|
+
|
|
48
|
+
if (match !== -1 && match !== false) {
|
|
49
|
+
if (keyFilter) customMatches[key] = match;else defaultMatches[key] = match;
|
|
50
|
+
} else if ((options == null ? void 0 : options.filterMode) === 'every') {
|
|
51
|
+
continue loop;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const defaultMatchesLength = Object.keys(defaultMatches).length;
|
|
56
|
+
const customMatchesLength = Object.keys(customMatches).length;
|
|
57
|
+
if (!defaultMatchesLength && !customMatchesLength) continue;
|
|
58
|
+
if ((options == null ? void 0 : options.filterMode) === 'union' && customMatchesLength !== customFiltersLength && !defaultMatchesLength) continue;
|
|
59
|
+
if ((options == null ? void 0 : options.filterMode) === 'intersection' && (customMatchesLength !== customFiltersLength || !defaultMatchesLength)) continue;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
array.push({
|
|
63
|
+
item,
|
|
64
|
+
matches: { ...defaultMatches,
|
|
65
|
+
...customMatches
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return array;
|
|
71
|
+
}
|
|
72
|
+
export function useFilter(props, items, query) {
|
|
73
|
+
const strQuery = computed(() => typeof (query == null ? void 0 : query.value) !== 'string' && typeof (query == null ? void 0 : query.value) !== 'number' ? '' : String(query.value));
|
|
74
|
+
const filteredItems = computed(() => {
|
|
75
|
+
return filterItems(unref(items), strQuery.value, {
|
|
76
|
+
customKeyFilter: props.customKeyFilter,
|
|
77
|
+
default: props.customFilter,
|
|
78
|
+
filterKeys: props.filterKeys,
|
|
79
|
+
filterMode: props.filterMode,
|
|
80
|
+
noFilter: props.noFilter
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
return {
|
|
84
|
+
filteredItems
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=filter.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/composables/filter.ts"],"names":["getPropertyFromItem","propsFactory","wrapInArray","computed","unref","defaultFilter","value","query","item","toString","toLocaleLowerCase","indexOf","makeFilterProps","customFilter","Function","customKeyFilter","Object","filterKeys","Array","String","filterMode","type","default","noFilter","Boolean","filterItems","items","options","array","filter","keys","customFiltersLength","length","loop","customMatches","defaultMatches","match","key","keyFilter","defaultMatchesLength","customMatchesLength","push","matches","useFilter","props","strQuery","filteredItems"],"mappings":"AAAA;;AACA;AAEA;SACSA,mB,EAAqBC,Y,EAAcC,W;AAC5C,SAASC,QAAT,EAAmBC,KAAnB,QAA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statements */\n/* eslint-disable no-labels */\n\n// Utilities\nimport { getPropertyFromItem, propsFactory, wrapInArray } from '@/util'\nimport { computed, unref } from 'vue'\n\n// Types\nimport type { PropType, Ref } from 'vue'\nimport type { MaybeRef } from '@/util'\n\nexport type FilterFunction = (value: string, query: string, item?: any) => FilterMatch\nexport type FilterKeyFunctions = Record<string, FilterFunction>\nexport type FilterKeys = string | string[]\nexport type FilterMatch = number | [number, number] | [number, number][] | boolean\nexport type FilterMode = 'some' | 'every' | 'union' | 'intersection'\n\nexport interface FilterProps {\n customFilter?: FilterFunction\n customKeyFilter?: FilterKeyFunctions\n filterKeys?: FilterKeys\n filterMode?: FilterMode\n noFilter?: boolean\n}\n\n// Composables\nexport const defaultFilter: FilterFunction = (value, query, item) => {\n if (value == null || query == null) return -1\n\n return value.toString().toLocaleLowerCase().indexOf(query.toString().toLocaleLowerCase())\n}\n\nexport const makeFilterProps = propsFactory({\n customFilter: Function as PropType<FilterFunction>,\n customKeyFilter: Object as PropType<FilterKeyFunctions>,\n filterKeys: [Array, String] as PropType<FilterKeys>,\n filterMode: {\n type: String as PropType<FilterMode>,\n default: 'intersection',\n },\n noFilter: Boolean,\n}, 'filter')\n\nexport function filterItems<T = Record<string, any>> (\n items: T[],\n query: string,\n options?: {\n customKeyFilter?: FilterKeyFunctions\n default?: FilterFunction\n filterKeys?: FilterKeys\n filterMode?: FilterMode\n noFilter?: boolean\n },\n) {\n const array: { item: T, matches: Record<string, FilterMatch> }[] = []\n // always ensure we fall back to a functioning filter\n const filter = options?.default ?? defaultFilter\n const keys = options?.filterKeys ? wrapInArray(options.filterKeys) : false\n const customFiltersLength = Object.keys(options?.customKeyFilter ?? {}).length\n\n if (!items?.length) return array\n\n loop:\n for (const item of items) {\n const customMatches: Record<string, FilterMatch> = {}\n const defaultMatches: Record<string, FilterMatch> = {}\n let match: FilterMatch = -1\n\n if (query && typeof item === 'object' && !options?.noFilter) {\n const filterKeys = keys || Object.keys(item)\n\n for (const key of filterKeys) {\n const value = getPropertyFromItem(item as any, key, item)\n const keyFilter = options?.customKeyFilter?.[key]\n\n match = keyFilter\n ? keyFilter(value, query, item)\n : filter(value, query, item)\n\n if (match !== -1 && match !== false) {\n if (keyFilter) customMatches[key] = match\n else defaultMatches[key] = match\n } else if (options?.filterMode === 'every') {\n continue loop\n }\n }\n\n const defaultMatchesLength = Object.keys(defaultMatches).length\n const customMatchesLength = Object.keys(customMatches).length\n\n if (!defaultMatchesLength && !customMatchesLength) continue\n\n if (\n options?.filterMode === 'union' &&\n customMatchesLength !== customFiltersLength &&\n !defaultMatchesLength\n ) continue\n\n if (\n options?.filterMode === 'intersection' &&\n (\n customMatchesLength !== customFiltersLength ||\n !defaultMatchesLength\n )\n ) continue\n }\n\n array.push({ item, matches: { ...defaultMatches, ...customMatches } })\n }\n\n return array\n}\n\nexport function useFilter<T> (\n props: FilterProps,\n items: MaybeRef<T[]>,\n query?: Ref<string | undefined>,\n) {\n const strQuery = computed(() => (\n typeof query?.value !== 'string' &&\n typeof query?.value !== 'number'\n ) ? '' : String(query.value))\n\n const filteredItems = computed(() => {\n return filterItems(\n unref(items),\n strQuery.value,\n {\n customKeyFilter: props.customKeyFilter,\n default: props.customFilter,\n filterKeys: props.filterKeys,\n filterMode: props.filterMode,\n noFilter: props.noFilter,\n },\n )\n })\n\n return { filteredItems }\n}\n"],"file":"filter.mjs"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Components
|
|
2
|
+
import { useProxiedModel } from "./proxiedModel.mjs"; // Utilities
|
|
3
|
+
|
|
4
|
+
import { computed } from 'vue';
|
|
5
|
+
import { getCurrentInstanceName, propsFactory } from "../util/index.mjs"; // Types
|
|
6
|
+
|
|
7
|
+
// Composables
|
|
8
|
+
export const makeFocusProps = propsFactory({
|
|
9
|
+
focused: Boolean
|
|
10
|
+
}, 'focus');
|
|
11
|
+
export function useFocus(props) {
|
|
12
|
+
let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName();
|
|
13
|
+
const isFocused = useProxiedModel(props, 'focused');
|
|
14
|
+
const focusClasses = computed(() => {
|
|
15
|
+
return {
|
|
16
|
+
[`${name}--focused`]: isFocused.value
|
|
17
|
+
};
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
function focus() {
|
|
21
|
+
isFocused.value = true;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function blur() {
|
|
25
|
+
isFocused.value = false;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return {
|
|
29
|
+
focusClasses,
|
|
30
|
+
isFocused,
|
|
31
|
+
focus,
|
|
32
|
+
blur
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=focus.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/composables/focus.ts"],"names":["useProxiedModel","computed","getCurrentInstanceName","propsFactory","makeFocusProps","focused","Boolean","useFocus","props","name","isFocused","focusClasses","value","focus","blur"],"mappings":"AAAA;SACSA,e,8BAET;;AACA,SAASC,QAAT,QAAyB,KAAzB;SACSC,sB,EAAwBC,Y,6BAEjC;;AAMA;AACA,OAAO,MAAMC,cAAc,GAAGD,YAAY,CAAC;AACzCE,EAAAA,OAAO,EAAEC;AADgC,CAAD,EAEvC,OAFuC,CAAnC;AAIP,OAAO,SAASC,QAAT,CACLC,KADK,EAGL;AAAA,MADAC,IACA,uEADOP,sBAAsB,EAC7B;AACA,QAAMQ,SAAS,GAAGV,eAAe,CAACQ,KAAD,EAAQ,SAAR,CAAjC;AACA,QAAMG,YAAY,GAAGV,QAAQ,CAAC,MAAM;AAClC,WAAQ;AACN,OAAE,GAAEQ,IAAK,WAAT,GAAsBC,SAAS,CAACE;AAD1B,KAAR;AAGD,GAJ4B,CAA7B;;AAMA,WAASC,KAAT,GAAkB;AAChBH,IAAAA,SAAS,CAACE,KAAV,GAAkB,IAAlB;AACD;;AAED,WAASE,IAAT,GAAiB;AACfJ,IAAAA,SAAS,CAACE,KAAV,GAAkB,KAAlB;AACD;;AAED,SAAO;AAAED,IAAAA,YAAF;AAAgBD,IAAAA,SAAhB;AAA2BG,IAAAA,KAA3B;AAAkCC,IAAAA;AAAlC,GAAP;AACD","sourcesContent":["// Components\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed } from 'vue'\nimport { getCurrentInstanceName, propsFactory } from '@/util'\n\n// Types\nexport interface FocusProps {\n focused: boolean\n 'onUpdate:focused': ((val: boolean) => void) | undefined\n}\n\n// Composables\nexport const makeFocusProps = propsFactory({\n focused: Boolean,\n}, 'focus')\n\nexport function useFocus (\n props: FocusProps,\n name = getCurrentInstanceName()\n) {\n const isFocused = useProxiedModel(props, 'focused')\n const focusClasses = computed(() => {\n return ({\n [`${name}--focused`]: isFocused.value,\n })\n })\n\n function focus () {\n isFocused.value = true\n }\n\n function blur () {\n isFocused.value = false\n }\n\n return { focusClasses, isFocused, focus, blur }\n}\n"],"file":"focus.mjs"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// Utilities
|
|
2
|
+
import { computed, inject, provide, ref, watch } from 'vue';
|
|
3
|
+
import { useProxiedModel } from "./proxiedModel.mjs";
|
|
4
|
+
import { consoleWarn, propsFactory } from "../util/index.mjs"; // Types
|
|
5
|
+
|
|
6
|
+
export const FormKey = Symbol.for('vuetify:form');
|
|
7
|
+
export const makeFormProps = propsFactory({
|
|
8
|
+
disabled: Boolean,
|
|
9
|
+
fastFail: Boolean,
|
|
10
|
+
lazyValidation: Boolean,
|
|
11
|
+
readonly: Boolean,
|
|
12
|
+
modelValue: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: null
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export function createForm(props) {
|
|
18
|
+
const model = useProxiedModel(props, 'modelValue');
|
|
19
|
+
const isDisabled = computed(() => props.disabled);
|
|
20
|
+
const isReadonly = computed(() => props.readonly);
|
|
21
|
+
const isValidating = ref(false);
|
|
22
|
+
const items = ref([]);
|
|
23
|
+
const errorMessages = ref([]);
|
|
24
|
+
|
|
25
|
+
async function validate() {
|
|
26
|
+
const results = [];
|
|
27
|
+
let valid = true;
|
|
28
|
+
errorMessages.value = [];
|
|
29
|
+
isValidating.value = true;
|
|
30
|
+
|
|
31
|
+
for (const item of items.value) {
|
|
32
|
+
const itemErrorMessages = await item.validate();
|
|
33
|
+
|
|
34
|
+
if (itemErrorMessages.length > 0) {
|
|
35
|
+
valid = false;
|
|
36
|
+
results.push({
|
|
37
|
+
id: item.id,
|
|
38
|
+
errorMessages: itemErrorMessages
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (!valid && props.fastFail) break;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
errorMessages.value = results;
|
|
46
|
+
isValidating.value = false;
|
|
47
|
+
return {
|
|
48
|
+
valid,
|
|
49
|
+
errorMessages: errorMessages.value
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function reset() {
|
|
54
|
+
items.value.forEach(item => item.reset());
|
|
55
|
+
model.value = null;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function resetValidation() {
|
|
59
|
+
items.value.forEach(item => item.resetValidation());
|
|
60
|
+
errorMessages.value = [];
|
|
61
|
+
model.value = null;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
watch(items, () => {
|
|
65
|
+
let valid = null;
|
|
66
|
+
|
|
67
|
+
if (items.value.some(item => item.isValid === false)) {
|
|
68
|
+
valid = false;
|
|
69
|
+
} else if (items.value.every(item => item.isValid === true)) {
|
|
70
|
+
valid = true;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
model.value = valid;
|
|
74
|
+
}, {
|
|
75
|
+
deep: true
|
|
76
|
+
});
|
|
77
|
+
provide(FormKey, {
|
|
78
|
+
register: (id, validate, reset, resetValidation, isValid) => {
|
|
79
|
+
if (items.value.some(item => item.id === id)) {
|
|
80
|
+
consoleWarn(`Duplicate input name "${id}"`);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
items.value.push({
|
|
84
|
+
id,
|
|
85
|
+
validate,
|
|
86
|
+
reset,
|
|
87
|
+
resetValidation,
|
|
88
|
+
isValid: isValid // TODO: Better way to type this unwrapping?
|
|
89
|
+
|
|
90
|
+
});
|
|
91
|
+
},
|
|
92
|
+
unregister: id => {
|
|
93
|
+
items.value = items.value.filter(item => {
|
|
94
|
+
return item.id !== id;
|
|
95
|
+
});
|
|
96
|
+
},
|
|
97
|
+
isDisabled,
|
|
98
|
+
isReadonly,
|
|
99
|
+
isValidating,
|
|
100
|
+
items
|
|
101
|
+
});
|
|
102
|
+
return {
|
|
103
|
+
errorMessages,
|
|
104
|
+
isDisabled,
|
|
105
|
+
isReadonly,
|
|
106
|
+
isValidating,
|
|
107
|
+
items,
|
|
108
|
+
validate,
|
|
109
|
+
reset,
|
|
110
|
+
resetValidation
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
export function useForm() {
|
|
114
|
+
return inject(FormKey, null);
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=form.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/composables/form.ts"],"names":["computed","inject","provide","ref","watch","useProxiedModel","consoleWarn","propsFactory","FormKey","Symbol","for","makeFormProps","disabled","Boolean","fastFail","lazyValidation","readonly","modelValue","type","default","createForm","props","model","isDisabled","isReadonly","isValidating","items","errorMessages","validate","results","valid","value","item","itemErrorMessages","length","push","id","reset","forEach","resetValidation","some","isValid","every","deep","register","unregister","filter","useForm"],"mappings":"AAAA;AACA,SAASA,QAAT,EAAmBC,MAAnB,EAA2BC,OAA3B,EAAoCC,GAApC,EAAyCC,KAAzC,QAAsD,KAAtD;SACSC,e;SACAC,W,EAAaC,Y,6BAEtB;;AAiCA,OAAO,MAAMC,OAAkC,GAAGC,MAAM,CAACC,GAAP,CAAW,cAAX,CAA3C;AAWP,OAAO,MAAMC,aAAa,GAAGJ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,eAAtB,EAAuCE,OAAvC,KAAmD;AAC3D,UAAIf,KAAK,CAACK,KAAN,CAAYS,IAAZ,CAAiBR,IAAI,IAAIA,IAAI,CAACI,EAAL,KAAYA,EAArC,CAAJ,EAA8C;AAC5C9B,QAAAA,WAAW,CAAE,yBAAwB8B,EAAG,GAA7B,CAAX;AACD;;AAEDV,MAAAA,KAAK,CAACK,KAAN,CAAYI,IAAZ,CAAiB;AACfC,QAAAA,EADe;AAEfR,QAAAA,QAFe;AAGfS,QAAAA,KAHe;AAIfE,QAAAA,eAJe;AAKfE,QAAAA,OAAO,EAAEA,OALM,CAKgC;;AALhC,OAAjB;AAOD,KAbc;AAcfI,IAAAA,UAAU,EAAET,EAAE,IAAI;AAChBV,MAAAA,KAAK,CAACK,KAAN,GAAcL,KAAK,CAACK,KAAN,CAAYe,MAAZ,CAAmBd,IAAI,IAAI;AACvC,eAAOA,IAAI,CAACI,EAAL,KAAYA,EAAnB;AACD,OAFa,CAAd;AAGD,KAlBc;AAmBfb,IAAAA,UAnBe;AAoBfC,IAAAA,UApBe;AAqBfC,IAAAA,YArBe;AAsBfC,IAAAA;AAtBe,GAAV,CAAP;AAyBA,SAAO;AACLC,IAAAA,aADK;AAELJ,IAAAA,UAFK;AAGLC,IAAAA,UAHK;AAILC,IAAAA,YAJK;AAKLC,IAAAA,KALK;AAMLE,IAAAA,QANK;AAOLS,IAAAA,KAPK;AAQLE,IAAAA;AARK,GAAP;AAUD;AAED,OAAO,SAASQ,OAAT,GAAoB;AACzB,SAAO9C,MAAM,CAACO,OAAD,EAAU,IAAV,CAAb;AACD","sourcesContent":["// Utilities\nimport { computed, inject, provide, ref, watch } from 'vue'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { consoleWarn, propsFactory } from '@/util'\n\n// Types\nimport type { ComputedRef, InjectionKey, PropType, Ref } from 'vue'\n\nexport interface FormProvide {\n register: (\n id: number | string,\n validate: () => Promise<string[]>,\n reset: () => void,\n resetValidation: () => void,\n isValid: Ref<boolean | null>,\n ) => void\n unregister: (id: number | string) => void\n items: Ref<FormField[]>\n isDisabled: ComputedRef<boolean>\n isReadonly: ComputedRef<boolean>\n isValidating: Ref<boolean>\n}\n\ninterface FormField {\n id: number | string\n validate: () => Promise<string[]>\n reset: () => void\n resetValidation: () => void\n isValid: boolean | null\n}\n\ninterface FormValidationResult {\n id: number | string\n errorMessages: string[]\n}\n\nexport interface SubmitEventPromise extends SubmitEvent, Promise<{ valid: boolean, errorMessages: FormValidationResult[] }> {}\n\nexport const FormKey: InjectionKey<FormProvide> = Symbol.for('vuetify:form')\n\nexport interface FormProps {\n disabled: boolean\n fastFail: boolean\n lazyValidation: boolean\n readonly: boolean\n modelValue: boolean | null\n 'onUpdate:modelValue': ((val: boolean | null) => void) | undefined\n}\n\nexport const makeFormProps = propsFactory({\n disabled: Boolean,\n fastFail: Boolean,\n lazyValidation: Boolean,\n readonly: Boolean,\n modelValue: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n})\n\nexport function createForm (props: FormProps) {\n const model = useProxiedModel(props, 'modelValue')\n\n const isDisabled = computed(() => props.disabled)\n const isReadonly = computed(() => props.readonly)\n const isValidating = ref(false)\n const items = ref<FormField[]>([])\n const errorMessages = ref<FormValidationResult[]>([])\n\n async function validate () {\n const results = []\n let valid = true\n\n errorMessages.value = []\n isValidating.value = true\n\n for (const item of items.value) {\n const itemErrorMessages = await item.validate()\n\n if (itemErrorMessages.length > 0) {\n valid = false\n\n results.push({\n id: item.id,\n errorMessages: itemErrorMessages,\n })\n }\n\n if (!valid && props.fastFail) break\n }\n\n errorMessages.value = results\n isValidating.value = false\n\n return { valid, errorMessages: errorMessages.value }\n }\n\n function reset () {\n items.value.forEach(item => item.reset())\n model.value = null\n }\n\n function resetValidation () {\n items.value.forEach(item => item.resetValidation())\n errorMessages.value = []\n model.value = null\n }\n\n watch(items, () => {\n let valid = null\n\n if (items.value.some(item => item.isValid === false)) {\n valid = false\n } else if (items.value.every(item => item.isValid === true)) {\n valid = true\n }\n\n model.value = valid\n }, {\n deep: true,\n })\n\n provide(FormKey, {\n register: (id, validate, reset, resetValidation, isValid) => {\n if (items.value.some(item => item.id === id)) {\n consoleWarn(`Duplicate input name \"${id}\"`)\n }\n\n items.value.push({\n id,\n validate,\n reset,\n resetValidation,\n isValid: isValid as unknown as boolean | null, // TODO: Better way to type this unwrapping?\n })\n },\n unregister: id => {\n items.value = items.value.filter(item => {\n return item.id !== id\n })\n },\n isDisabled,\n isReadonly,\n isValidating,\n items,\n })\n\n return {\n errorMessages,\n isDisabled,\n isReadonly,\n isValidating,\n items,\n validate,\n reset,\n resetValidation,\n }\n}\n\nexport function useForm () {\n return inject(FormKey, null)\n}\n"],"file":"form.mjs"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export function useForwardRef(target) {
|
|
2
|
+
for (var _len = arguments.length, refs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
3
|
+
refs[_key - 1] = arguments[_key];
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
return new Proxy(target, {
|
|
7
|
+
get(target, key) {
|
|
8
|
+
if (Reflect.has(target, key)) {
|
|
9
|
+
return Reflect.get(target, key);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
for (const ref of refs) {
|
|
13
|
+
if (ref.value && Reflect.has(ref.value, key)) {
|
|
14
|
+
const val = Reflect.get(ref.value, key);
|
|
15
|
+
return typeof val === 'function' ? val.bind(ref.value) : val;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
getOwnPropertyDescriptor(target, key) {
|
|
21
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(target, key);
|
|
22
|
+
if (descriptor) return descriptor; // Check each ref's own properties
|
|
23
|
+
|
|
24
|
+
for (const ref of refs) {
|
|
25
|
+
if (!ref.value) continue;
|
|
26
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(ref.value, key);
|
|
27
|
+
if (descriptor) return descriptor;
|
|
28
|
+
} // Recursive search up each ref's prototype
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
for (const ref of refs) {
|
|
32
|
+
let obj = ref.value && Object.getPrototypeOf(ref.value);
|
|
33
|
+
|
|
34
|
+
while (obj) {
|
|
35
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(obj, key);
|
|
36
|
+
if (descriptor) return descriptor;
|
|
37
|
+
obj = Object.getPrototypeOf(obj);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=forwardRef.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/composables/forwardRef.ts"],"names":["useForwardRef","target","refs","Proxy","get","key","Reflect","has","ref","value","val","bind","getOwnPropertyDescriptor","descriptor","obj","Object","getPrototypeOf","undefined"],"mappings":"AAGA,OAAO,SAASA,aAAT,CACLC,MADK,EAG0C;AAAA,oCAD5CC,IAC4C;AAD5CA,IAAAA,IAC4C;AAAA;;AAC/C,SAAO,IAAIC,KAAJ,CAAUF,MAAV,EAAkB;AACvBG,IAAAA,GAAG,CAAEH,MAAF,EAAUI,GAAV,EAAe;AAChB,UAAIC,OAAO,CAACC,GAAR,CAAYN,MAAZ,EAAoBI,GAApB,CAAJ,EAA8B;AAC5B,eAAOC,OAAO,CAACF,GAAR,CAAYH,MAAZ,EAAoBI,GAApB,CAAP;AACD;;AACD,WAAK,MAAMG,GAAX,IAAkBN,IAAlB,EAAwB;AACtB,YAAIM,GAAG,CAACC,KAAJ,IAAaH,OAAO,CAACC,GAAR,CAAYC,GAAG,CAACC,KAAhB,EAAuBJ,GAAvB,CAAjB,EAA8C;AAC5C,gBAAMK,GAAG,GAAGJ,OAAO,CAACF,GAAR,CAAYI,GAAG,CAACC,KAAhB,EAAuBJ,GAAvB,CAAZ;AACA,iBAAO,OAAOK,GAAP,KAAe,UAAf,GACHA,GAAG,CAACC,IAAJ,CAASH,GAAG,CAACC,KAAb,CADG,GAEHC,GAFJ;AAGD;AACF;AACF,KAbsB;;AAcvBE,IAAAA,wBAAwB,CAAEX,MAAF,EAAUI,GAAV,EAAe;AACrC,YAAMQ,UAAU,GAAGP,OAAO,CAACM,wBAAR,CAAiCX,MAAjC,EAAyCI,GAAzC,CAAnB;AACA,UAAIQ,UAAJ,EAAgB,OAAOA,UAAP,CAFqB,CAIrC;;AACA,WAAK,MAAML,GAAX,IAAkBN,IAAlB,EAAwB;AACtB,YAAI,CAACM,GAAG,CAACC,KAAT,EAAgB;AAChB,cAAMI,UAAU,GAAGP,OAAO,CAACM,wBAAR,CAAiCJ,GAAG,CAACC,KAArC,EAA4CJ,GAA5C,CAAnB;AACA,YAAIQ,UAAJ,EAAgB,OAAOA,UAAP;AACjB,OAToC,CAUrC;;;AACA,WAAK,MAAML,GAAX,IAAkBN,IAAlB,EAAwB;AACtB,YAAIY,GAAG,GAAGN,GAAG,CAACC,KAAJ,IAAaM,MAAM,CAACC,cAAP,CAAsBR,GAAG,CAACC,KAA1B,CAAvB;;AACA,eAAOK,GAAP,EAAY;AACV,gBAAMD,UAAU,GAAGP,OAAO,CAACM,wBAAR,CAAiCE,GAAjC,EAAsCT,GAAtC,CAAnB;AACA,cAAIQ,UAAJ,EAAgB,OAAOA,UAAP;AAChBC,UAAAA,GAAG,GAAGC,MAAM,CAACC,cAAP,CAAsBF,GAAtB,CAAN;AACD;AACF;;AACD,aAAOG,SAAP;AACD;;AAlCsB,GAAlB,CAAP;AAoCD","sourcesContent":["import type { Ref, UnwrapRef } from 'vue'\nimport type { UnionToIntersection } from '@/util'\n\nexport function useForwardRef<T extends {}, U extends Ref<{} | undefined>[]> (\n target: T,\n ...refs: U\n): T & UnwrapRef<UnionToIntersection<U[number]>> {\n return new Proxy(target, {\n get (target, key) {\n if (Reflect.has(target, key)) {\n return Reflect.get(target, key)\n }\n for (const ref of refs) {\n if (ref.value && Reflect.has(ref.value, key)) {\n const val = Reflect.get(ref.value, key)\n return typeof val === 'function'\n ? val.bind(ref.value)\n : val\n }\n }\n },\n getOwnPropertyDescriptor (target, key) {\n const descriptor = Reflect.getOwnPropertyDescriptor(target, key)\n if (descriptor) return descriptor\n\n // Check each ref's own properties\n for (const ref of refs) {\n if (!ref.value) continue\n const descriptor = Reflect.getOwnPropertyDescriptor(ref.value, key)\n if (descriptor) return descriptor\n }\n // Recursive search up each ref's prototype\n for (const ref of refs) {\n let obj = ref.value && Object.getPrototypeOf(ref.value)\n while (obj) {\n const descriptor = Reflect.getOwnPropertyDescriptor(obj, key)\n if (descriptor) return descriptor\n obj = Object.getPrototypeOf(obj)\n }\n }\n return undefined\n },\n }) as any\n}\n"],"file":"forwardRef.mjs"}
|