vuetify 3.8.6 → 3.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/json/attributes.json +1767 -1767
- package/dist/json/importMap-labs.json +20 -20
- package/dist/json/importMap.json +176 -176
- package/dist/json/web-types.json +3266 -3266
- package/dist/vuetify-labs.cjs +1002 -904
- package/dist/vuetify-labs.css +6207 -6207
- package/dist/vuetify-labs.d.ts +62 -62
- package/dist/vuetify-labs.esm.js +1003 -905
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +1002 -904
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +889 -791
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +3094 -3094
- package/dist/vuetify.d.ts +62 -62
- package/dist/vuetify.esm.js +890 -792
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +889 -791
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +971 -963
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAlert/VAlert.js +11 -11
- package/lib/components/VAlert/VAlert.js.map +1 -1
- package/lib/components/VApp/VApp.js +5 -5
- package/lib/components/VApp/VApp.js.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.js +9 -9
- package/lib/components/VAutocomplete/VAutocomplete.js.map +1 -1
- package/lib/components/VAvatar/VAvatar.js +4 -4
- package/lib/components/VAvatar/VAvatar.js.map +1 -1
- package/lib/components/VBadge/VBadge.js +3 -3
- package/lib/components/VBadge/VBadge.js.map +1 -1
- package/lib/components/VBanner/VBanner.js +6 -6
- package/lib/components/VBanner/VBanner.js.map +1 -1
- package/lib/components/VBanner/VBannerActions.js +4 -4
- package/lib/components/VBanner/VBannerActions.js.map +1 -1
- package/lib/components/VBottomNavigation/VBottomNavigation.js +6 -6
- package/lib/components/VBottomNavigation/VBottomNavigation.js.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbs.js +5 -5
- package/lib/components/VBreadcrumbs/VBreadcrumbs.js.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbsDivider.js +4 -4
- package/lib/components/VBreadcrumbs/VBreadcrumbsDivider.js.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.js +5 -5
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.js.map +1 -1
- package/lib/components/VBtn/VBtn.js +7 -7
- package/lib/components/VBtn/VBtn.js.map +1 -1
- package/lib/components/VBtnGroup/VBtnGroup.js +4 -4
- package/lib/components/VBtnGroup/VBtnGroup.js.map +1 -1
- package/lib/components/VCard/VCard.js +5 -5
- package/lib/components/VCard/VCard.js.map +1 -1
- package/lib/components/VCard/VCardActions.js +4 -4
- package/lib/components/VCard/VCardActions.js.map +1 -1
- package/lib/components/VCard/VCardItem.js +9 -9
- package/lib/components/VCard/VCardItem.js.map +1 -1
- package/lib/components/VCard/VCardSubtitle.js +4 -4
- package/lib/components/VCard/VCardSubtitle.js.map +1 -1
- package/lib/components/VCard/VCardText.js +4 -4
- package/lib/components/VCard/VCardText.js.map +1 -1
- package/lib/components/VCarousel/VCarousel.js +4 -4
- package/lib/components/VCarousel/VCarousel.js.map +1 -1
- package/lib/components/VChip/VChip.js +11 -11
- package/lib/components/VChip/VChip.js.map +1 -1
- package/lib/components/VColorPicker/VColorPicker.js +3 -3
- package/lib/components/VColorPicker/VColorPicker.js.map +1 -1
- package/lib/components/VColorPicker/VColorPickerCanvas.js +9 -9
- package/lib/components/VColorPicker/VColorPickerCanvas.js.map +1 -1
- package/lib/components/VColorPicker/VColorPickerEdit.js +6 -6
- package/lib/components/VColorPicker/VColorPickerEdit.js.map +1 -1
- package/lib/components/VColorPicker/VColorPickerPreview.js +11 -11
- package/lib/components/VColorPicker/VColorPickerPreview.js.map +1 -1
- package/lib/components/VColorPicker/VColorPickerSwatches.js +10 -10
- package/lib/components/VColorPicker/VColorPickerSwatches.js.map +1 -1
- package/lib/components/VCombobox/VCombobox.js +9 -9
- package/lib/components/VCombobox/VCombobox.js.map +1 -1
- package/lib/components/VConfirmEdit/VConfirmEdit.js +3 -3
- package/lib/components/VConfirmEdit/VConfirmEdit.js.map +1 -1
- package/lib/components/VConfirmEdit/__test__/VConfirmEdit.spec.browser.js +3 -3
- package/lib/components/VConfirmEdit/__test__/VConfirmEdit.spec.browser.js.map +1 -1
- package/lib/components/VCounter/VCounter.js +5 -5
- package/lib/components/VCounter/VCounter.js.map +1 -1
- package/lib/components/VDataIterator/VDataIterator.js +5 -5
- package/lib/components/VDataIterator/VDataIterator.js.map +1 -1
- package/lib/components/VDataTable/VDataTable.js +4 -4
- package/lib/components/VDataTable/VDataTable.js.map +1 -1
- package/lib/components/VDataTable/VDataTableColumn.js +5 -5
- package/lib/components/VDataTable/VDataTableColumn.js.map +1 -1
- package/lib/components/VDataTable/VDataTableFooter.js +6 -6
- package/lib/components/VDataTable/VDataTableFooter.js.map +1 -1
- package/lib/components/VDataTable/VDataTableGroupHeaderRow.js +7 -7
- package/lib/components/VDataTable/VDataTableGroupHeaderRow.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaders.js +11 -11
- package/lib/components/VDataTable/VDataTableHeaders.js.map +1 -1
- package/lib/components/VDataTable/VDataTableRow.js +6 -6
- package/lib/components/VDataTable/VDataTableRow.js.map +1 -1
- package/lib/components/VDataTable/VDataTableRows.js +7 -7
- package/lib/components/VDataTable/VDataTableRows.js.map +1 -1
- package/lib/components/VDataTable/VDataTableServer.js +4 -4
- package/lib/components/VDataTable/VDataTableServer.js.map +1 -1
- package/lib/components/VDataTable/VDataTableVirtual.js +14 -14
- package/lib/components/VDataTable/VDataTableVirtual.js.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.js +3 -3
- package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerControls.js +5 -5
- package/lib/components/VDatePicker/VDatePickerControls.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerHeader.js +8 -8
- package/lib/components/VDatePicker/VDatePickerHeader.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonth.js +10 -10
- package/lib/components/VDatePicker/VDatePickerMonth.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonths.js +5 -5
- package/lib/components/VDatePicker/VDatePickerMonths.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerYears.js +5 -5
- package/lib/components/VDatePicker/VDatePickerYears.js.map +1 -1
- package/lib/components/VDialog/__test__/VDialog.spec.browser.js +5 -5
- package/lib/components/VDialog/__test__/VDialog.spec.browser.js.map +1 -1
- package/lib/components/VDivider/VDivider.js +10 -10
- package/lib/components/VDivider/VDivider.js.map +1 -1
- package/lib/components/VEmptyState/VEmptyState.js +14 -14
- package/lib/components/VEmptyState/VEmptyState.js.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanel.js +6 -6
- package/lib/components/VExpansionPanel/VExpansionPanel.js.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelText.js +5 -5
- package/lib/components/VExpansionPanel/VExpansionPanelText.js.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.js +10 -10
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.js.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanels.js +4 -4
- package/lib/components/VExpansionPanel/VExpansionPanels.js.map +1 -1
- package/lib/components/VFab/VFab.js +7 -7
- package/lib/components/VFab/VFab.js.map +1 -1
- package/lib/components/VField/VField.js +20 -18
- package/lib/components/VField/VField.js.map +1 -1
- package/lib/components/VField/VFieldLabel.js +4 -4
- package/lib/components/VField/VFieldLabel.js.map +1 -1
- package/lib/components/VFileInput/VFileInput.js +5 -5
- package/lib/components/VFileInput/VFileInput.js.map +1 -1
- package/lib/components/VFooter/VFooter.js +4 -4
- package/lib/components/VFooter/VFooter.js.map +1 -1
- package/lib/components/VForm/VForm.js +4 -4
- package/lib/components/VForm/VForm.js.map +1 -1
- package/lib/components/VGrid/VContainer.js +4 -4
- package/lib/components/VGrid/VContainer.js.map +1 -1
- package/lib/components/VIcon/VIcon.js +5 -5
- package/lib/components/VIcon/VIcon.js.map +1 -1
- package/lib/components/VImg/VImg.js +19 -19
- package/lib/components/VImg/VImg.js.map +1 -1
- package/lib/components/VInfiniteScroll/VInfiniteScroll.js +10 -10
- package/lib/components/VInfiniteScroll/VInfiniteScroll.js.map +1 -1
- package/lib/components/VInput/InputIcon.d.ts +1 -1
- package/lib/components/VInput/InputIcon.js +5 -4
- package/lib/components/VInput/InputIcon.js.map +1 -1
- package/lib/components/VInput/VInput.js +9 -9
- package/lib/components/VInput/VInput.js.map +1 -1
- package/lib/components/VItemGroup/VItemGroup.js +3 -3
- package/lib/components/VItemGroup/VItemGroup.js.map +1 -1
- package/lib/components/VLabel/VLabel.js +5 -5
- package/lib/components/VLabel/VLabel.js.map +1 -1
- package/lib/components/VLayout/VLayout.js +4 -4
- package/lib/components/VLayout/VLayout.js.map +1 -1
- package/lib/components/VLayout/VLayoutItem.js +4 -4
- package/lib/components/VLayout/VLayoutItem.js.map +1 -1
- package/lib/components/VLazy/VLazy.js +6 -6
- package/lib/components/VLazy/VLazy.js.map +1 -1
- package/lib/components/VList/VList.js +4 -4
- package/lib/components/VList/VList.js.map +1 -1
- package/lib/components/VList/VListGroup.js +5 -5
- package/lib/components/VList/VListGroup.js.map +1 -1
- package/lib/components/VList/VListItem.js +11 -11
- package/lib/components/VList/VListItem.js.map +1 -1
- package/lib/components/VList/VListItemAction.js +4 -4
- package/lib/components/VList/VListItemAction.js.map +1 -1
- package/lib/components/VList/VListItemMedia.js +4 -4
- package/lib/components/VList/VListItemMedia.js.map +1 -1
- package/lib/components/VList/VListItemSubtitle.js +4 -4
- package/lib/components/VList/VListItemSubtitle.js.map +1 -1
- package/lib/components/VList/VListSubheader.js +6 -6
- package/lib/components/VList/VListSubheader.js.map +1 -1
- package/lib/components/VLocaleProvider/VLocaleProvider.js +4 -4
- package/lib/components/VLocaleProvider/VLocaleProvider.js.map +1 -1
- package/lib/components/VMain/VMain.js +5 -5
- package/lib/components/VMain/VMain.js.map +1 -1
- package/lib/components/VMessages/VMessages.js +4 -4
- package/lib/components/VMessages/VMessages.js.map +1 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.js +7 -7
- package/lib/components/VNavigationDrawer/VNavigationDrawer.js.map +1 -1
- package/lib/components/VNavigationDrawer/touch.js +2 -4
- package/lib/components/VNavigationDrawer/touch.js.map +1 -1
- package/lib/components/VNumberInput/VNumberInput.js +38 -22
- package/lib/components/VNumberInput/VNumberInput.js.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.js +7 -7
- package/lib/components/VOtpInput/VOtpInput.js.map +1 -1
- package/lib/components/VOverlay/VOverlay.js +8 -8
- package/lib/components/VOverlay/VOverlay.js.map +1 -1
- package/lib/components/VOverlay/locationStrategies.js +16 -8
- package/lib/components/VOverlay/locationStrategies.js.map +1 -1
- package/lib/components/VPagination/VPagination.js +11 -11
- package/lib/components/VPagination/VPagination.js.map +1 -1
- package/lib/components/VParallax/VParallax.js +4 -4
- package/lib/components/VParallax/VParallax.js.map +1 -1
- package/lib/components/VProgressCircular/VProgressCircular.js +14 -14
- package/lib/components/VProgressCircular/VProgressCircular.js.map +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.js +26 -26
- package/lib/components/VProgressLinear/VProgressLinear.js.map +1 -1
- package/lib/components/VRadioGroup/VRadioGroup.js +2 -2
- package/lib/components/VRadioGroup/VRadioGroup.js.map +1 -1
- package/lib/components/VRangeSlider/VRangeSlider.js +5 -5
- package/lib/components/VRangeSlider/VRangeSlider.js.map +1 -1
- package/lib/components/VRating/VRating.js +14 -14
- package/lib/components/VRating/VRating.js.map +1 -1
- package/lib/components/VResponsive/VResponsive.js +9 -9
- package/lib/components/VResponsive/VResponsive.js.map +1 -1
- package/lib/components/VSelect/VSelect.js +43 -14
- package/lib/components/VSelect/VSelect.js.map +1 -1
- package/lib/components/VSelectionControl/VSelectionControl.js +11 -11
- package/lib/components/VSelectionControl/VSelectionControl.js.map +1 -1
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.js +5 -5
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.js.map +1 -1
- package/lib/components/VSheet/VSheet.js +3 -3
- package/lib/components/VSheet/VSheet.js.map +1 -1
- package/lib/components/VSkeletonLoader/VSkeletonLoader.js +4 -4
- package/lib/components/VSkeletonLoader/VSkeletonLoader.js.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroup.js +12 -12
- package/lib/components/VSlideGroup/VSlideGroup.js.map +1 -1
- package/lib/components/VSlider/VSlider.js +4 -4
- package/lib/components/VSlider/VSlider.js.map +1 -1
- package/lib/components/VSlider/VSliderThumb.js +19 -19
- package/lib/components/VSlider/VSliderThumb.js.map +1 -1
- package/lib/components/VSlider/VSliderTrack.js +23 -23
- package/lib/components/VSlider/VSliderTrack.js.map +1 -1
- package/lib/components/VSlider/slider.js +1 -1
- package/lib/components/VSlider/slider.js.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.js +4 -4
- package/lib/components/VSnackbar/VSnackbar.js.map +1 -1
- package/lib/components/VSnackbarQueue/VSnackbarQueue.js +3 -3
- package/lib/components/VSnackbarQueue/VSnackbarQueue.js.map +1 -1
- package/lib/components/VSparkline/VBarline.js +12 -12
- package/lib/components/VSparkline/VBarline.js.map +1 -1
- package/lib/components/VSparkline/VTrendline.js +8 -8
- package/lib/components/VSparkline/VTrendline.js.map +1 -1
- package/lib/components/VStepper/VStepper.js +2 -2
- package/lib/components/VStepper/VStepper.js.map +1 -1
- package/lib/components/VStepper/VStepperActions.js +2 -2
- package/lib/components/VStepper/VStepperActions.js.map +1 -1
- package/lib/components/VStepper/VStepperItem.js +10 -10
- package/lib/components/VStepper/VStepperItem.js.map +1 -1
- package/lib/components/VSwitch/VSwitch.js +10 -10
- package/lib/components/VSwitch/VSwitch.js.map +1 -1
- package/lib/components/VSystemBar/VSystemBar.js +4 -4
- package/lib/components/VSystemBar/VSystemBar.js.map +1 -1
- package/lib/components/VTable/VTable.js +8 -8
- package/lib/components/VTable/VTable.js.map +1 -1
- package/lib/components/VTabs/VTab.js +4 -4
- package/lib/components/VTabs/VTab.js.map +1 -1
- package/lib/components/VTabs/VTabs.js +2 -2
- package/lib/components/VTabs/VTabs.js.map +1 -1
- package/lib/components/VTextField/VTextField.js +12 -12
- package/lib/components/VTextField/VTextField.js.map +1 -1
- package/lib/components/VTextarea/VTextarea.js +10 -10
- package/lib/components/VTextarea/VTextarea.js.map +1 -1
- package/lib/components/VThemeProvider/VThemeProvider.js +3 -3
- package/lib/components/VThemeProvider/VThemeProvider.js.map +1 -1
- package/lib/components/VTimeline/VTimeline.js +5 -5
- package/lib/components/VTimeline/VTimeline.js.map +1 -1
- package/lib/components/VTimeline/VTimelineDivider.js +17 -17
- package/lib/components/VTimeline/VTimelineDivider.js.map +1 -1
- package/lib/components/VTimeline/VTimelineItem.js +9 -9
- package/lib/components/VTimeline/VTimelineItem.js.map +1 -1
- package/lib/components/VToolbar/VToolbar.js +13 -13
- package/lib/components/VToolbar/VToolbar.js.map +1 -1
- package/lib/components/VToolbar/VToolbarItems.js +4 -4
- package/lib/components/VToolbar/VToolbarItems.js.map +1 -1
- package/lib/components/VToolbar/VToolbarTitle.js +4 -4
- package/lib/components/VToolbar/VToolbarTitle.js.map +1 -1
- package/lib/components/VVirtualScroll/VVirtualScroll.js +13 -13
- package/lib/components/VVirtualScroll/VVirtualScroll.js.map +1 -1
- package/lib/components/VVirtualScroll/VVirtualScrollItem.js +3 -3
- package/lib/components/VVirtualScroll/VVirtualScrollItem.js.map +1 -1
- package/lib/components/VWindow/VWindow.js +13 -13
- package/lib/components/VWindow/VWindow.js.map +1 -1
- package/lib/components/VWindow/VWindowItem.js +6 -6
- package/lib/components/VWindow/VWindowItem.js.map +1 -1
- package/lib/composables/filter.js +8 -8
- package/lib/composables/filter.js.map +1 -1
- package/lib/composables/goto.js +1 -1
- package/lib/composables/goto.js.map +1 -1
- package/lib/composables/icons.js +6 -6
- package/lib/composables/icons.js.map +1 -1
- package/lib/composables/loader.js +3 -3
- package/lib/composables/loader.js.map +1 -1
- package/lib/composables/variant.js +5 -5
- package/lib/composables/variant.js.map +1 -1
- package/lib/entry-bundler.js +1 -1
- package/lib/framework.d.ts +62 -62
- package/lib/framework.js +1 -1
- package/lib/labs/VCalendar/VCalendar.js +15 -15
- package/lib/labs/VCalendar/VCalendar.js.map +1 -1
- package/lib/labs/VCalendar/VCalendarDay.js +4 -4
- package/lib/labs/VCalendar/VCalendarDay.js.map +1 -1
- package/lib/labs/VCalendar/VCalendarHeader.js +4 -4
- package/lib/labs/VCalendar/VCalendarHeader.js.map +1 -1
- package/lib/labs/VCalendar/VCalendarInterval.js +10 -10
- package/lib/labs/VCalendar/VCalendarInterval.js.map +1 -1
- package/lib/labs/VCalendar/VCalendarIntervalEvent.js +2 -2
- package/lib/labs/VCalendar/VCalendarIntervalEvent.js.map +1 -1
- package/lib/labs/VCalendar/VCalendarMonthDay.js +6 -6
- package/lib/labs/VCalendar/VCalendarMonthDay.js.map +1 -1
- package/lib/labs/VColorInput/VColorInput.js +3 -3
- package/lib/labs/VColorInput/VColorInput.js.map +1 -1
- package/lib/labs/VDateInput/VDateInput.js +2 -2
- package/lib/labs/VDateInput/VDateInput.js.map +1 -1
- package/lib/labs/VFileUpload/VFileUpload.js +9 -9
- package/lib/labs/VFileUpload/VFileUpload.js.map +1 -1
- package/lib/labs/VFileUpload/VFileUploadItem.js +3 -3
- package/lib/labs/VFileUpload/VFileUploadItem.js.map +1 -1
- package/lib/labs/VIconBtn/VIconBtn.js +7 -7
- package/lib/labs/VIconBtn/VIconBtn.js.map +1 -1
- package/lib/labs/VPicker/VPicker.js +7 -7
- package/lib/labs/VPicker/VPicker.js.map +1 -1
- package/lib/labs/VPullToRefresh/VPullToRefresh.js +13 -13
- package/lib/labs/VPullToRefresh/VPullToRefresh.js.map +1 -1
- package/lib/labs/VStepperVertical/VStepperVertical.js +2 -2
- package/lib/labs/VStepperVertical/VStepperVertical.js.map +1 -1
- package/lib/labs/VStepperVertical/VStepperVerticalItem.js +5 -5
- package/lib/labs/VStepperVertical/VStepperVerticalItem.js.map +1 -1
- package/lib/labs/VTimePicker/VTimePicker.js +2 -2
- package/lib/labs/VTimePicker/VTimePicker.js.map +1 -1
- package/lib/labs/VTimePicker/VTimePickerClock.js +15 -15
- package/lib/labs/VTimePicker/VTimePickerClock.js.map +1 -1
- package/lib/labs/VTimePicker/VTimePickerControls.js +24 -24
- package/lib/labs/VTimePicker/VTimePickerControls.js.map +1 -1
- package/lib/labs/VTreeview/VTreeviewChildren.js +2 -2
- package/lib/labs/VTreeview/VTreeviewChildren.js.map +1 -1
- package/lib/labs/VTreeview/VTreeviewGroup.js +2 -2
- package/lib/labs/VTreeview/VTreeviewGroup.js.map +1 -1
- package/lib/labs/VTreeview/VTreeviewItem.js +3 -3
- package/lib/labs/VTreeview/VTreeviewItem.js.map +1 -1
- package/lib/util/box.d.ts +1 -0
- package/lib/util/box.js +27 -0
- package/lib/util/box.js.map +1 -1
- package/lib/util/helpers.d.ts +1 -0
- package/lib/util/helpers.js +15 -0
- package/lib/util/helpers.js.map +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.js","names":["computed","shallowRef","unref","watchEffect","createVNode","_createVNode","Fragment","_Fragment","getPropertyFromItem","propsFactory","wrapInArray","defaultFilter","value","query","item","length","toString","toLocaleLowerCase","result","idx","indexOf","push","normaliseMatch","match","Array","isArray","makeFilterProps","customFilter","Function","customKeyFilter","Object","filterKeys","String","filterMode","type","default","noFilter","Boolean","filterItems","items","options","array","filter","keys","customFiltersLength","loop","i","transformed","customMatches","defaultMatches","key","keyFilter","title","defaultMatchesLength","customMatchesLength","index","matches","useFilter","props","filteredItems","filteredMatches","Map","transformedItems","transform","map","_query","strQuery","results","originalItems","_filteredItems","_filteredMatches","forEach","_ref","set","getMatches","get","highlightResult","name","text","start","slice"],"sources":["../../src/composables/filter.tsx"],"sourcesContent":["/* eslint-disable max-statements */\n/* eslint-disable no-labels */\n\n// Utilities\nimport { computed, shallowRef, unref, watchEffect } from 'vue'\nimport { getPropertyFromItem, propsFactory, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType, Ref } from 'vue'\nimport type { MaybeRef } from '@/util'\n\n/**\n * - boolean: match without highlight\n * - number: single match (index), length already known\n * - []: single match (start, end)\n * - [][]: multiple matches (start, end), shouldn't overlap\n */\nexport type FilterMatchArraySingle = readonly [number, number]\nexport type FilterMatchArrayMultiple = readonly FilterMatchArraySingle[]\nexport type FilterMatchArray = FilterMatchArraySingle | FilterMatchArrayMultiple\nexport type FilterMatch = boolean | number | FilterMatchArray\nexport type FilterFunction = (value: string, query: string, item?: InternalItem) => FilterMatch\nexport type FilterKeyFunctions = Record<string, FilterFunction>\nexport type FilterKeys = string | string[]\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\nexport interface InternalItem<T = any> {\n value: any\n raw: T\n}\n\n// Composables\nexport const defaultFilter: FilterFunction = (value, query, item) => {\n if (value == null || query == null) return -1\n if (!query.length) return 0\n\n value = value.toString().toLocaleLowerCase()\n query = query.toString().toLocaleLowerCase()\n\n const result = []\n let idx = value.indexOf(query)\n while (~idx) {\n result.push([idx, idx + query.length] as const)\n\n idx = value.indexOf(query, idx + query.length)\n }\n\n return result.length ? result : -1\n}\n\nfunction normaliseMatch (match: FilterMatch, query: string): FilterMatchArrayMultiple | undefined {\n if (match == null || typeof match === 'boolean' || match === -1) return\n if (typeof match === 'number') return [[match, match + query.length]]\n if (Array.isArray(match[0])) return match as FilterMatchArrayMultiple\n return [match] as FilterMatchArrayMultiple\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 (\n items: readonly (readonly [item: InternalItem, transformed: {}])[] | readonly InternalItem[],\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: { index: number, matches: Record<string, FilterMatchArrayMultiple | undefined> }[] = []\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 (let i = 0; i < items.length; i++) {\n const [item, transformed = item] = wrapInArray(items[i]) as readonly [InternalItem, {}]\n const customMatches: Record<string, FilterMatchArrayMultiple | undefined> = {}\n const defaultMatches: Record<string, FilterMatchArrayMultiple | undefined> = {}\n let match: FilterMatch = -1\n\n if ((query || customFiltersLength > 0) && !options?.noFilter) {\n if (typeof item === 'object') {\n const filterKeys = keys || Object.keys(transformed)\n\n for (const key of filterKeys) {\n const value = getPropertyFromItem(transformed, key)\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] = normaliseMatch(match, query)\n else defaultMatches[key] = normaliseMatch(match, query)\n } else if (options?.filterMode === 'every') {\n continue loop\n }\n }\n } else {\n match = filter(item, query, item)\n if (match !== -1 && match !== false) {\n defaultMatches.title = normaliseMatch(match, query)\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({ index: i, matches: { ...defaultMatches, ...customMatches } })\n }\n\n return array\n}\n\nexport function useFilter <T extends InternalItem> (\n props: FilterProps,\n items: MaybeRef<T[]>,\n query: Ref<string | undefined> | (() => string | undefined),\n options?: {\n transform?: (item: T) => {}\n customKeyFilter?: MaybeRef<FilterKeyFunctions | undefined>\n }\n) {\n const filteredItems = shallowRef<T[]>([])\n const filteredMatches = shallowRef(new Map<unknown, Record<string, FilterMatchArrayMultiple | undefined>>())\n const transformedItems = computed(() => (\n options?.transform\n ? unref(items).map(item => ([item, options.transform!(item)] as const))\n : unref(items)\n ))\n\n watchEffect(() => {\n const _query = typeof query === 'function' ? query() : unref(query)\n const strQuery = (\n typeof _query !== 'string' &&\n typeof _query !== 'number'\n ) ? '' : String(_query)\n\n const results = filterItems(\n transformedItems.value,\n strQuery,\n {\n customKeyFilter: {\n ...props.customKeyFilter,\n ...unref(options?.customKeyFilter),\n },\n default: props.customFilter,\n filterKeys: props.filterKeys,\n filterMode: props.filterMode,\n noFilter: props.noFilter,\n },\n )\n\n const originalItems = unref(items)\n\n const _filteredItems: typeof filteredItems['value'] = []\n const _filteredMatches: typeof filteredMatches['value'] = new Map()\n results.forEach(({ index, matches }) => {\n const item = originalItems[index]\n _filteredItems.push(item)\n _filteredMatches.set(item.value, matches)\n })\n filteredItems.value = _filteredItems\n filteredMatches.value = _filteredMatches\n })\n\n function getMatches (item: T) {\n return filteredMatches.value.get(item.value)\n }\n\n return { filteredItems, filteredMatches, getMatches }\n}\n\nexport function highlightResult (name: string, text: string, matches: FilterMatchArrayMultiple | undefined) {\n if (matches == null || !matches.length) return text\n\n return matches.map((match, i) => {\n const start = i === 0 ? 0 : matches[i - 1][1]\n const result = [\n <span class={ `${name}__unmask` }>{ text.slice(start, match[0]) }</span>,\n <span class={ `${name}__mask` }>{ text.slice(match[0], match[1]) }</span>,\n ]\n if (i === matches.length - 1) {\n result.push(<span class={ `${name}__unmask` }>{ text.slice(match[1]) }</span>)\n }\n return <>{ result }</>\n })\n}\n"],"mappings":"AAAA;AACA;;AAEA;AACA,SAASA,QAAQ,EAAEC,UAAU,EAAEC,KAAK,EAAEC,WAAW,EAAAC,WAAA,IAAAC,YAAA,EAAAC,QAAA,IAAAC,SAAA,QAAQ,KAAK;AAAA,SACrDC,mBAAmB,EAAEC,YAAY,EAAEC,WAAW,4BAEvD;AAIA;AACA;AACA;AACA;AACA;AACA;AAuBA;AACA,OAAO,MAAMC,aAA6B,GAAGA,CAACC,KAAK,EAAEC,KAAK,EAAEC,IAAI,KAAK;EACnE,IAAIF,KAAK,IAAI,IAAI,IAAIC,KAAK,IAAI,IAAI,EAAE,OAAO,CAAC,CAAC;EAC7C,IAAI,CAACA,KAAK,CAACE,MAAM,EAAE,OAAO,CAAC;EAE3BH,KAAK,GAAGA,KAAK,CAACI,QAAQ,CAAC,CAAC,CAACC,iBAAiB,CAAC,CAAC;EAC5CJ,KAAK,GAAGA,KAAK,CAACG,QAAQ,CAAC,CAAC,CAACC,iBAAiB,CAAC,CAAC;EAE5C,MAAMC,MAAM,GAAG,EAAE;EACjB,IAAIC,GAAG,GAAGP,KAAK,CAACQ,OAAO,CAACP,KAAK,CAAC;EAC9B,OAAO,CAACM,GAAG,EAAE;IACXD,MAAM,CAACG,IAAI,CAAC,CAACF,GAAG,EAAEA,GAAG,GAAGN,KAAK,CAACE,MAAM,CAAU,CAAC;IAE/CI,GAAG,GAAGP,KAAK,CAACQ,OAAO,CAACP,KAAK,EAAEM,GAAG,GAAGN,KAAK,CAACE,MAAM,CAAC;EAChD;EAEA,OAAOG,MAAM,CAACH,MAAM,GAAGG,MAAM,GAAG,CAAC,CAAC;AACpC,CAAC;AAED,SAASI,cAAcA,CAAEC,KAAkB,EAAEV,KAAa,EAAwC;EAChG,IAAIU,KAAK,IAAI,IAAI,IAAI,OAAOA,KAAK,KAAK,SAAS,IAA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AAW,CAAC;AACvD;AAEA,OAAO,SAASE,eAAeA,CAAEC,IAAY,EAAEC,IAAY,EAAEtB,OAA6C,EAAE;EAC1G,IAAIA,OAAO,IAAI,IAAI,IAAI,CAACA,OAAO,CAACzC,MAAM,EAAE,OAAO+D,IAAI;EAEnD,OAAOtB,OAAO,CAACQ,GAAG,CAAC,CAACzC,KAAK,EAAEuB,CAAC,KAAK;IAC/B,MAAMiC,KAAK,GAAGjC,CAAC,KAAK,CAAC,GAAG,CAAC,GAAGU,OAAO,CAACV,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,MAAM5B,MAAM,GAAG,CAAAb,YAAA;MAAA,SACC,GAAGwE,IAAI;IAAU,IAAKC,IAAI,CAACE,KAAK,CAACD,KAAK,EAAExD,KAAK,CAAC,CAAC,CAAC,CAAC,IAAAlB,YAAA;MAAA,SACjD,GAAGwE,IAAI;IAAQ,IAAKC,IAAI,CAACE,KAAK,CAACzD,KAAK,CAAC,CAAC,CAAC,EAAEA,KAAK,CAAC,CAAC,CAAC,CAAC,GACjE;IACD,IAAIuB,CAAC,KAAKU,OAAO,CAACzC,MAAM,GAAG,CAAC,EAAE;MAC5BG,MAAM,CAACG,IAAI,CAAAhB,YAAA;QAAA,SAAe,GAAGwE,IAAI;MAAU,IAAKC,IAAI,CAACE,KAAK,CAACzD,KAAK,CAAC,CAAC,CAAC,CAAC,EAAS,CAAC;IAChF;IACA,OAAAlB,YAAA,CAAAE,SAAA,SAAWW,MAAM;EACnB,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"filter.js","names":["computed","shallowRef","unref","watchEffect","normalizeClass","_normalizeClass","createElementVNode","_createElementVNode","Fragment","_Fragment","getPropertyFromItem","propsFactory","wrapInArray","defaultFilter","value","query","item","length","toString","toLocaleLowerCase","result","idx","indexOf","push","normaliseMatch","match","Array","isArray","makeFilterProps","customFilter","Function","customKeyFilter","Object","filterKeys","String","filterMode","type","default","noFilter","Boolean","filterItems","items","options","array","filter","keys","customFiltersLength","loop","i","transformed","customMatches","defaultMatches","key","keyFilter","title","defaultMatchesLength","customMatchesLength","index","matches","useFilter","props","filteredItems","filteredMatches","Map","transformedItems","transform","map","_query","strQuery","results","originalItems","_filteredItems","_filteredMatches","forEach","_ref","set","getMatches","get","highlightResult","name","text","start","slice"],"sources":["../../src/composables/filter.tsx"],"sourcesContent":["/* eslint-disable max-statements */\n/* eslint-disable no-labels */\n\n// Utilities\nimport { computed, shallowRef, unref, watchEffect } from 'vue'\nimport { getPropertyFromItem, propsFactory, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType, Ref } from 'vue'\nimport type { MaybeRef } from '@/util'\n\n/**\n * - boolean: match without highlight\n * - number: single match (index), length already known\n * - []: single match (start, end)\n * - [][]: multiple matches (start, end), shouldn't overlap\n */\nexport type FilterMatchArraySingle = readonly [number, number]\nexport type FilterMatchArrayMultiple = readonly FilterMatchArraySingle[]\nexport type FilterMatchArray = FilterMatchArraySingle | FilterMatchArrayMultiple\nexport type FilterMatch = boolean | number | FilterMatchArray\nexport type FilterFunction = (value: string, query: string, item?: InternalItem) => FilterMatch\nexport type FilterKeyFunctions = Record<string, FilterFunction>\nexport type FilterKeys = string | string[]\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\nexport interface InternalItem<T = any> {\n value: any\n raw: T\n}\n\n// Composables\nexport const defaultFilter: FilterFunction = (value, query, item) => {\n if (value == null || query == null) return -1\n if (!query.length) return 0\n\n value = value.toString().toLocaleLowerCase()\n query = query.toString().toLocaleLowerCase()\n\n const result = []\n let idx = value.indexOf(query)\n while (~idx) {\n result.push([idx, idx + query.length] as const)\n\n idx = value.indexOf(query, idx + query.length)\n }\n\n return result.length ? result : -1\n}\n\nfunction normaliseMatch (match: FilterMatch, query: string): FilterMatchArrayMultiple | undefined {\n if (match == null || typeof match === 'boolean' || match === -1) return\n if (typeof match === 'number') return [[match, match + query.length]]\n if (Array.isArray(match[0])) return match as FilterMatchArrayMultiple\n return [match] as FilterMatchArrayMultiple\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 (\n items: readonly (readonly [item: InternalItem, transformed: {}])[] | readonly InternalItem[],\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: { index: number, matches: Record<string, FilterMatchArrayMultiple | undefined> }[] = []\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 (let i = 0; i < items.length; i++) {\n const [item, transformed = item] = wrapInArray(items[i]) as readonly [InternalItem, {}]\n const customMatches: Record<string, FilterMatchArrayMultiple | undefined> = {}\n const defaultMatches: Record<string, FilterMatchArrayMultiple | undefined> = {}\n let match: FilterMatch = -1\n\n if ((query || customFiltersLength > 0) && !options?.noFilter) {\n if (typeof item === 'object') {\n const filterKeys = keys || Object.keys(transformed)\n\n for (const key of filterKeys) {\n const value = getPropertyFromItem(transformed, key)\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] = normaliseMatch(match, query)\n else defaultMatches[key] = normaliseMatch(match, query)\n } else if (options?.filterMode === 'every') {\n continue loop\n }\n }\n } else {\n match = filter(item, query, item)\n if (match !== -1 && match !== false) {\n defaultMatches.title = normaliseMatch(match, query)\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({ index: i, matches: { ...defaultMatches, ...customMatches } })\n }\n\n return array\n}\n\nexport function useFilter <T extends InternalItem> (\n props: FilterProps,\n items: MaybeRef<T[]>,\n query: Ref<string | undefined> | (() => string | undefined),\n options?: {\n transform?: (item: T) => {}\n customKeyFilter?: MaybeRef<FilterKeyFunctions | undefined>\n }\n) {\n const filteredItems = shallowRef<T[]>([])\n const filteredMatches = shallowRef(new Map<unknown, Record<string, FilterMatchArrayMultiple | undefined>>())\n const transformedItems = computed(() => (\n options?.transform\n ? unref(items).map(item => ([item, options.transform!(item)] as const))\n : unref(items)\n ))\n\n watchEffect(() => {\n const _query = typeof query === 'function' ? query() : unref(query)\n const strQuery = (\n typeof _query !== 'string' &&\n typeof _query !== 'number'\n ) ? '' : String(_query)\n\n const results = filterItems(\n transformedItems.value,\n strQuery,\n {\n customKeyFilter: {\n ...props.customKeyFilter,\n ...unref(options?.customKeyFilter),\n },\n default: props.customFilter,\n filterKeys: props.filterKeys,\n filterMode: props.filterMode,\n noFilter: props.noFilter,\n },\n )\n\n const originalItems = unref(items)\n\n const _filteredItems: typeof filteredItems['value'] = []\n const _filteredMatches: typeof filteredMatches['value'] = new Map()\n results.forEach(({ index, matches }) => {\n const item = originalItems[index]\n _filteredItems.push(item)\n _filteredMatches.set(item.value, matches)\n })\n filteredItems.value = _filteredItems\n filteredMatches.value = _filteredMatches\n })\n\n function getMatches (item: T) {\n return filteredMatches.value.get(item.value)\n }\n\n return { filteredItems, filteredMatches, getMatches }\n}\n\nexport function highlightResult (name: string, text: string, matches: FilterMatchArrayMultiple | undefined) {\n if (matches == null || !matches.length) return text\n\n return matches.map((match, i) => {\n const start = i === 0 ? 0 : matches[i - 1][1]\n const result = [\n <span class={ `${name}__unmask` }>{ text.slice(start, match[0]) }</span>,\n <span class={ `${name}__mask` }>{ text.slice(match[0], match[1]) }</span>,\n ]\n if (i === matches.length - 1) {\n result.push(<span class={ `${name}__unmask` }>{ text.slice(match[1]) }</span>)\n }\n return <>{ result }</>\n })\n}\n"],"mappings":"AAAA;AACA;;AAEA;AACA,SAASA,QAAQ,EAAEC,UAAU,EAAEC,KAAK,EAAEC,WAAW,EAAAC,cAAA,IAAAC,eAAA,EAAAC,kBAAA,IAAAC,mBAAA,EAAAC,QAAA,IAAAC,SAAA,QAAQ,KAAK;AAAA,SACrDC,mBAAmB,EAAEC,YAAY,EAAEC,WAAW,4BAEvD;AAIA;AACA;AACA;AACA;AACA;AACA;AAuBA;AACA,OAAO,MAAMC,aAA6B,GAAGA,CAACC,KAAK,EAAEC,KAAK,EAAEC,IAAI,KAAK;EACnE,IAAIF,KAAK,IAAI,IAAI,IAAIC,KAAK,IAAI,IAAI,EAAE,OAAO,CAAC,CAAC;EAC7C,IAAI,CAACA,KAAK,CAACE,MAAM,EAAE,OAAO,CAAC;EAE3BH,KAAK,GAAGA,KAAK,CAACI,QAAQ,CAAC,CAAC,CAACC,iBAAiB,CAAC,CAAC;EAC5CJ,KAAK,GAAGA,KAAK,CAACG,QAAQ,CAAC,CAAC,CAACC,iBAAiB,CAAC,CAAC;EAE5C,MAAMC,MAAM,GAAG,EAAE;EACjB,IAAIC,GAAG,GAAGP,KAAK,CAACQ,OAAO,CAACP,KAAK,CAAC;EAC9B,OAAO,CAACM,GAAG,EAAE;IACXD,MAAM,CAACG,IAAI,CAAC,CAACF,GAAG,EAAEA,GAAG,GAAGN,KAAK,CAACE,MAAM,CAAU,CAAC;IAE/CI,GAAG,GAAGP,KAAK,CAACQ,OAAO,CAACP,KAA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AAM;EACnB,CAAC,CAAC;AACJ","ignoreList":[]}
|
package/lib/composables/goto.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"goto.js","names":["inject","toRef","useRtl","clamp","consoleWarn","mergeDeep","refElement","GoToSymbol","Symbol","for","genDefaults","container","undefined","duration","layout","offset","easing","patterns","linear","t","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","getContainer","el","getTarget","document","scrollingElement","body","querySelector","getOffset","target","horizontal","rtl","totalOffset","offsetLeft","offsetTop","offsetParent","createGoTo","options","locale","isRtl","scrollTo","_target","_options","goTo","property","value","HTMLElement","parentElement","ease","TypeError","targetLocation","styles","window","getComputedStyle","layoutOffset","getPropertyValue","parseInt","clampTarget","startLocation","Promise","resolve","startTime","performance","now","requestAnimationFrame","step","currentTime","timeElapsed","progress","location","Math","floor","abs","useGoTo","arguments","length","goToInstance","Error","go","scrollWidth","scrollHeight","containerWidth","containerHeight","innerWidth","innerHeight","offsetWidth","offsetHeight","min","max"],"sources":["../../src/composables/goto.ts"],"sourcesContent":["// Utilities\nimport { inject, toRef } from 'vue'\nimport { useRtl } from './locale'\nimport { clamp, consoleWarn, mergeDeep, refElement } from '@/util'\n\n// Types\nimport type { ComponentPublicInstance, InjectionKey, Ref } from 'vue'\nimport type { LocaleInstance, RtlInstance } from './locale'\n\nexport interface GoToInstance {\n rtl: Ref<boolean>\n options: InternalGoToOptions\n}\n\nexport interface InternalGoToOptions {\n container: ComponentPublicInstance | HTMLElement | string\n duration: number\n layout: boolean\n offset: number\n easing: string | ((t: number) => number)\n patterns: Record<string, (t: number) => number>\n}\n\nexport type GoToOptions = Partial<InternalGoToOptions>\n\nexport const GoToSymbol: InjectionKey<GoToInstance> = Symbol.for('vuetify:goto')\n\nfunction genDefaults () {\n return {\n container: undefined,\n duration: 300,\n layout: false,\n offset: 0,\n easing: 'easeInOutCubic',\n patterns: {\n linear: (t: number) => t,\n easeInQuad: (t: number) => t ** 2,\n easeOutQuad: (t: number) => t * (2 - t),\n easeInOutQuad: (t: number) => (t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t),\n easeInCubic: (t: number) => t ** 3,\n easeOutCubic: (t: number) => --t ** 3 + 1,\n easeInOutCubic: (t: number) => t < 0.5 ? 4 * t ** 3 : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1,\n easeInQuart: (t: number) => t ** 4,\n easeOutQuart: (t: number) => 1 - --t ** 4,\n easeInOutQuart: (t: number) => (t < 0.5 ? 8 * t ** 4 : 1 - 8 * --t ** 4),\n easeInQuint: (t: number) => t ** 5,\n easeOutQuint: (t: number) => 1 + --t ** 5,\n easeInOutQuint: (t: number) => t < 0.5 ? 16 * t ** 5 : 1 + 16 * --t ** 5,\n },\n }\n}\n\nfunction getContainer (el?: ComponentPublicInstance | HTMLElement | string) {\n return getTarget(el) ?? (document.scrollingElement || document.body) as HTMLElement\n}\n\nfunction getTarget (el: ComponentPublicInstance | HTMLElement | string | undefined) {\n return (typeof el === 'string') ? document.querySelector<HTMLElement>(el) : refElement(el)\n}\n\nfunction getOffset (target: any, horizontal?: boolean, rtl?: boolean): number {\n if (typeof target === 'number') return horizontal && rtl ? -target : target\n\n let el = getTarget(target)\n let totalOffset = 0\n while (el) {\n totalOffset += horizontal ? el.offsetLeft : el.offsetTop\n el = el.offsetParent as HTMLElement\n }\n\n return totalOffset\n}\n\nexport function createGoTo (\n options: GoToOptions| undefined,\n locale: LocaleInstance & RtlInstance\n): GoToInstance {\n return {\n rtl: locale.isRtl,\n options: mergeDeep(genDefaults(), options) as InternalGoToOptions,\n }\n}\n\nexport async function scrollTo (\n _target: ComponentPublicInstance | HTMLElement | number | string,\n _options: GoToOptions,\n horizontal?: boolean,\n goTo?: GoToInstance,\n) {\n const property = horizontal ? 'scrollLeft' : 'scrollTop'\n const options = mergeDeep(goTo?.options ?? genDefaults(), _options)\n const rtl = goTo?.rtl.value\n const target = (typeof _target === 'number' ? _target : getTarget(_target)) ?? 0\n const container = options.container === 'parent' && target instanceof HTMLElement\n ? target.parentElement!\n : getContainer(options.container)\n const ease = typeof options.easing === 'function' ? options.easing : options.patterns[options.easing]\n\n if (!ease) throw new TypeError(`Easing function \"${options.easing}\" not found.`)\n\n let targetLocation: number\n if (typeof target === 'number') {\n targetLocation = getOffset(target, horizontal, rtl)\n } else {\n targetLocation = getOffset(target, horizontal, rtl) - getOffset(container, horizontal, rtl)\n\n if (options.layout) {\n const styles = window.getComputedStyle(target)\n const layoutOffset = styles.getPropertyValue('--v-layout-top')\n\n if (layoutOffset) targetLocation -= parseInt(layoutOffset, 10)\n }\n }\n\n targetLocation += options.offset\n targetLocation = clampTarget(container, targetLocation, !!rtl, !!horizontal)\n\n const startLocation = container[property] ?? 0\n\n if (targetLocation === startLocation) return Promise.resolve(targetLocation)\n\n const startTime = performance.now()\n\n return new Promise(resolve => requestAnimationFrame(function step (currentTime: number) {\n const timeElapsed = currentTime - startTime\n const progress = timeElapsed / options.duration\n const location = Math.floor(\n startLocation +\n (targetLocation - startLocation) *\n ease(clamp(progress, 0, 1))\n )\n\n container[property] = location\n\n // Allow for some jitter if target time has elapsed\n if (progress >= 1 && Math.abs(location - container[property]) < 10) {\n return resolve(targetLocation)\n } else if (progress > 2) {\n // The target might not be reachable\n consoleWarn('Scroll target is not reachable')\n return resolve(container[property])\n }\n\n requestAnimationFrame(step)\n }))\n}\n\nexport function useGoTo (_options: GoToOptions = {}) {\n const goToInstance = inject(GoToSymbol)\n const { isRtl } = useRtl()\n\n if (!goToInstance) throw new Error('[Vuetify] Could not find injected goto instance')\n\n const goTo = {\n ...goToInstance,\n // can be set via VLocaleProvider\n rtl: toRef(() => goToInstance.rtl.value || isRtl.value),\n }\n\n async function go (\n target: ComponentPublicInstance | HTMLElement | string | number,\n options?: Partial<GoToOptions>,\n ) {\n return scrollTo(target, mergeDeep(_options, options), false, goTo)\n }\n\n go.horizontal = async (\n target: ComponentPublicInstance | HTMLElement | string | number,\n options?: Partial<GoToOptions>,\n ) => {\n return scrollTo(target, mergeDeep(_options, options), true, goTo)\n }\n\n return go\n}\n\n/**\n * Clamp target value to achieve a smooth scroll animation\n * when the value goes outside the scroll container size\n */\nfunction clampTarget (\n container: HTMLElement,\n value: number,\n rtl: boolean,\n horizontal: boolean,\n) {\n const { scrollWidth, scrollHeight } = container\n const [containerWidth, containerHeight] = container === document.scrollingElement\n ? [window.innerWidth, window.innerHeight]\n : [container.offsetWidth, container.offsetHeight]\n\n let min: number\n let max: number\n\n if (horizontal) {\n if (rtl) {\n min = -(scrollWidth - containerWidth)\n max = 0\n } else {\n min = 0\n max = scrollWidth - containerWidth\n }\n } else {\n min = 0\n max = scrollHeight + -containerHeight\n }\n\n return Math.max(Math.min(value, max), min)\n}\n"],"mappings":"AAAA;AACA,SAASA,MAAM,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC1BC,MAAM;AAAA,SACNC,KAAK,EAAEC,WAAW,EAAEC,SAAS,EAAEC,UAAU,4BAElD;AAoBA,OAAO,MAAMC,UAAsC,GAAGC,MAAM,CAACC,GAAG,CAAC,cAAc,CAAC;AAEhF,SAASC,WAAWA,CAAA,EAAI;EACtB,OAAO;IACLC,SAAS,EAAEC,SAAS;IACpBC,QAAQ,EAAE,GAAG;IACbC,MAAM,EAAE,KAAK;IACbC,MAAM,EAAE,CAAC;IACTC,MAAM,EAAE,gBAAgB;IACxBC,QAAQ,EAAE;MACRC,MAAM,EAAGC,CAAS,IAAKA,CAAC;MACxBC,UAAU,EAAGD,CAAS,IAAKA,CAAC,IAAI,CAAC;MACjCE,WAAW,EAAGF,CAAS,IAAKA,CAAC,IAAI,CAAC,GAAGA,CAAC,CAAC;MACvCG,aAAa,EAAGH,CAAS,IAAMA,CAAC,GAAG,GAAG,GAAG,CAAC,GAAGA,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,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E2C,GAAG,CAAC,EAAED,GAAG,CAAC;AAC5C","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"goto.js","names":["inject","toRef","useRtl","clamp","consoleWarn","mergeDeep","refElement","GoToSymbol","Symbol","for","genDefaults","container","undefined","duration","layout","offset","easing","patterns","linear","t","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","getContainer","el","getTarget","document","scrollingElement","body","querySelector","getOffset","target","horizontal","rtl","totalOffset","offsetLeft","offsetTop","offsetParent","createGoTo","options","locale","isRtl","scrollTo","_target","_options","goTo","property","value","HTMLElement","parentElement","ease","TypeError","targetLocation","styles","window","getComputedStyle","layoutOffset","getPropertyValue","parseInt","clampTarget","startLocation","Promise","resolve","startTime","performance","now","requestAnimationFrame","step","currentTime","timeElapsed","progress","location","Math","floor","abs","useGoTo","arguments","length","goToInstance","Error","go","scrollWidth","scrollHeight","containerWidth","containerHeight","innerWidth","innerHeight","offsetWidth","offsetHeight","min","max"],"sources":["../../src/composables/goto.ts"],"sourcesContent":["// Utilities\nimport { inject, toRef } from 'vue'\nimport { useRtl } from './locale'\nimport { clamp, consoleWarn, mergeDeep, refElement } from '@/util'\n\n// Types\nimport type { ComponentPublicInstance, InjectionKey, Ref } from 'vue'\nimport type { LocaleInstance, RtlInstance } from './locale'\n\nexport interface GoToInstance {\n rtl: Ref<boolean>\n options: InternalGoToOptions\n}\n\nexport interface InternalGoToOptions {\n container: ComponentPublicInstance | HTMLElement | string\n duration: number\n layout: boolean\n offset: number\n easing: string | ((t: number) => number)\n patterns: Record<string, (t: number) => number>\n}\n\nexport type GoToOptions = Partial<InternalGoToOptions>\n\nexport const GoToSymbol: InjectionKey<GoToInstance> = Symbol.for('vuetify:goto')\n\nfunction genDefaults () {\n return {\n container: undefined,\n duration: 300,\n layout: false,\n offset: 0,\n easing: 'easeInOutCubic',\n patterns: {\n linear: (t: number) => t,\n easeInQuad: (t: number) => t ** 2,\n easeOutQuad: (t: number) => t * (2 - t),\n easeInOutQuad: (t: number) => (t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t),\n easeInCubic: (t: number) => t ** 3,\n easeOutCubic: (t: number) => --t ** 3 + 1,\n easeInOutCubic: (t: number) => t < 0.5 ? 4 * t ** 3 : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1,\n easeInQuart: (t: number) => t ** 4,\n easeOutQuart: (t: number) => 1 - --t ** 4,\n easeInOutQuart: (t: number) => (t < 0.5 ? 8 * t ** 4 : 1 - 8 * --t ** 4),\n easeInQuint: (t: number) => t ** 5,\n easeOutQuint: (t: number) => 1 + --t ** 5,\n easeInOutQuint: (t: number) => t < 0.5 ? 16 * t ** 5 : 1 + 16 * --t ** 5,\n },\n }\n}\n\nfunction getContainer (el?: ComponentPublicInstance | HTMLElement | string) {\n return getTarget(el) ?? (document.scrollingElement || document.body) as HTMLElement\n}\n\nfunction getTarget (el: ComponentPublicInstance | HTMLElement | string | undefined) {\n return (typeof el === 'string') ? document.querySelector<HTMLElement>(el) : refElement(el)\n}\n\nfunction getOffset (target: any, horizontal?: boolean, rtl?: boolean): number {\n if (typeof target === 'number') return horizontal && rtl ? -target : target\n\n let el = getTarget(target)\n let totalOffset = 0\n while (el) {\n totalOffset += horizontal ? el.offsetLeft : el.offsetTop\n el = el.offsetParent as HTMLElement\n }\n\n return totalOffset\n}\n\nexport function createGoTo (\n options: GoToOptions| undefined,\n locale: LocaleInstance & RtlInstance\n): GoToInstance {\n return {\n rtl: locale.isRtl,\n options: mergeDeep(genDefaults(), options) as InternalGoToOptions,\n }\n}\n\nexport async function scrollTo (\n _target: ComponentPublicInstance | HTMLElement | number | string,\n _options: GoToOptions,\n horizontal?: boolean,\n goTo?: GoToInstance,\n) {\n const property = horizontal ? 'scrollLeft' : 'scrollTop'\n const options = mergeDeep(goTo?.options ?? genDefaults(), _options)\n const rtl = goTo?.rtl.value\n const target = (typeof _target === 'number' ? _target : getTarget(_target)) ?? 0\n const container = options.container === 'parent' && target instanceof HTMLElement\n ? target.parentElement!\n : getContainer(options.container)\n const ease = typeof options.easing === 'function' ? options.easing : options.patterns[options.easing]\n\n if (!ease) throw new TypeError(`Easing function \"${options.easing}\" not found.`)\n\n let targetLocation: number\n if (typeof target === 'number') {\n targetLocation = getOffset(target, horizontal, rtl)\n } else {\n targetLocation = getOffset(target, horizontal, rtl) - getOffset(container, horizontal, rtl)\n\n if (options.layout) {\n const styles = window.getComputedStyle(target)\n const layoutOffset = styles.getPropertyValue('--v-layout-top')\n\n if (layoutOffset) targetLocation -= parseInt(layoutOffset, 10)\n }\n }\n\n targetLocation += options.offset\n targetLocation = clampTarget(container, targetLocation, !!rtl, !!horizontal)\n\n const startLocation = container[property] ?? 0\n\n if (targetLocation === startLocation) return Promise.resolve(targetLocation)\n\n const startTime = performance.now()\n\n return new Promise(resolve => requestAnimationFrame(function step (currentTime: number) {\n const timeElapsed = currentTime - startTime\n const progress = timeElapsed / options.duration\n const location = Math.floor(\n startLocation +\n (targetLocation - startLocation) *\n ease(clamp(progress, 0, 1))\n )\n\n container[property] = location\n\n // Allow for some jitter if target time has elapsed\n if (progress >= 1 && Math.abs(location - container[property]) < 10) {\n return resolve(targetLocation)\n } else if (progress > 2) {\n // The target might not be reachable\n consoleWarn('Scroll target is not reachable')\n return resolve(container[property])\n }\n\n requestAnimationFrame(step)\n }))\n}\n\nexport function useGoTo (_options: GoToOptions = {}) {\n const goToInstance = inject(GoToSymbol)\n const { isRtl } = useRtl()\n\n if (!goToInstance) throw new Error('[Vuetify] Could not find injected goto instance')\n\n const goTo = {\n ...goToInstance,\n // can be set via VLocaleProvider\n rtl: toRef(() => goToInstance.rtl.value || isRtl.value),\n }\n\n async function go (\n target: ComponentPublicInstance | HTMLElement | string | number,\n options?: Partial<GoToOptions>,\n ) {\n return scrollTo(target, mergeDeep(_options, options), false, goTo)\n }\n\n go.horizontal = async (\n target: ComponentPublicInstance | HTMLElement | string | number,\n options?: Partial<GoToOptions>,\n ) => {\n return scrollTo(target, mergeDeep(_options, options), true, goTo)\n }\n\n return go\n}\n\n/**\n * Clamp target value to achieve a smooth scroll animation\n * when the value goes outside the scroll container size\n */\nfunction clampTarget (\n container: HTMLElement,\n value: number,\n rtl: boolean,\n horizontal: boolean,\n) {\n const { scrollWidth, scrollHeight } = container\n const [containerWidth, containerHeight] = container === document.scrollingElement\n ? [window.innerWidth, window.innerHeight]\n : [container.offsetWidth, container.offsetHeight]\n\n let min: number\n let max: number\n\n if (horizontal) {\n if (rtl) {\n min = -(scrollWidth - containerWidth)\n max = 0\n } else {\n min = 0\n max = scrollWidth - containerWidth\n }\n } else {\n min = 0\n max = scrollHeight + -containerHeight\n }\n\n return clamp(value, min, max)\n}\n"],"mappings":"AAAA;AACA,SAASA,MAAM,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC1BC,MAAM;AAAA,SACNC,KAAK,EAAEC,WAAW,EAAEC,SAAS,EAAEC,UAAU,4BAElD;AAoBA,OAAO,MAAMC,UAAsC,GAAGC,MAAM,CAACC,GAAG,CAAC,cAAc,CAAC;AAEhF,SAASC,WAAWA,CAAA,EAAI;EACtB,OAAO;IACLC,SAAS,EAAEC,SAAS;IACpBC,QAAQ,EAAE,GAAG;IACbC,MAAM,EAAE,KAAK;IACbC,MAAM,EAAE,CAAC;IACTC,MAAM,EAAE,gBAAgB;IACxBC,QAAQ,EAAE;MACRC,MAAM,EAAGC,CAAS,IAAKA,CAAC;MACxBC,UAAU,EAAGD,CAAS,IAAKA,CAAC,IAAI,CAAC;MACjCE,WAAW,EAAGF,CAAS,IAAKA,CAAC,IAAI,CAAC,GAAGA,CAAC,CAAC;MACvCG,aAAa,EAAGH,CAAS,IAAMA,CAAC,GAAG,GAAG,GAAG,CAAC,GAAGA,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAGA,CAAC,IAAIA,CAAE;MAC3EI,WAA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 -1,4 +1,4 @@
|
|
|
1
|
-
import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
|
|
1
|
+
import { createVNode as _createVNode, createElementVNode as _createElementVNode, mergeProps as _mergeProps, normalizeClass as _normalizeClass } from "vue";
|
|
2
2
|
// Icons
|
|
3
3
|
import { aliases, mdi } from "../iconsets/mdi.js"; // Utilities
|
|
4
4
|
import { computed, inject, toValue } from 'vue';
|
|
@@ -42,18 +42,18 @@ export const VSvgIcon = defineComponent({
|
|
|
42
42
|
return _createVNode(props.tag, _mergeProps(attrs, {
|
|
43
43
|
"style": null
|
|
44
44
|
}), {
|
|
45
|
-
default: () => [
|
|
45
|
+
default: () => [_createElementVNode("svg", {
|
|
46
46
|
"class": "v-icon__svg",
|
|
47
47
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
48
48
|
"viewBox": "0 0 24 24",
|
|
49
49
|
"role": "img",
|
|
50
50
|
"aria-hidden": "true"
|
|
51
|
-
}, [Array.isArray(props.icon) ? props.icon.map(path => Array.isArray(path) ?
|
|
51
|
+
}, [Array.isArray(props.icon) ? props.icon.map(path => Array.isArray(path) ? _createElementVNode("path", {
|
|
52
52
|
"d": path[0],
|
|
53
53
|
"fill-opacity": path[1]
|
|
54
|
-
}, null) :
|
|
54
|
+
}, null) : _createElementVNode("path", {
|
|
55
55
|
"d": path
|
|
56
|
-
}, null)) :
|
|
56
|
+
}, null)) : _createElementVNode("path", {
|
|
57
57
|
"d": props.icon
|
|
58
58
|
}, null)])]
|
|
59
59
|
});
|
|
@@ -77,7 +77,7 @@ export const VClassIcon = defineComponent({
|
|
|
77
77
|
setup(props) {
|
|
78
78
|
return () => {
|
|
79
79
|
return _createVNode(props.tag, {
|
|
80
|
-
"class": props.icon
|
|
80
|
+
"class": _normalizeClass(props.icon)
|
|
81
81
|
}, null);
|
|
82
82
|
};
|
|
83
83
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.js","names":["aliases","mdi","computed","inject","toValue","consoleWarn","defineComponent","genericComponent","mergeDeep","propsFactory","IconValue","String","Function","Object","Array","IconSymbol","Symbol","for","makeIconProps","icon","type","tag","required","VComponentIcon","name","props","setup","_ref","slots","Icon","_createVNode","default","VSvgIcon","inheritAttrs","_ref2","attrs","_mergeProps","isArray","map","path","VLigatureIcon","VClassIcon","genDefaults","svg","component","class","createIcons","options","sets","defaultSet","vuetify","useIcon","icons","Error","iconData","iconAlias","trim","startsWith","slice","iconSetName","keys","find","setName","iconName","length","iconSet"],"sources":["../../src/composables/icons.tsx"],"sourcesContent":["// Icons\nimport { aliases, mdi } from '@/iconsets/mdi'\n\n// Utilities\nimport { computed, inject, toValue } from 'vue'\nimport { consoleWarn, defineComponent, genericComponent, mergeDeep, propsFactory } from '@/util'\n\n// Types\nimport type { InjectionKey, MaybeRefOrGetter, PropType } from 'vue'\nimport type { JSXComponent } from '@/util'\n\nexport type IconValue =\n | string\n | (string | [path: string, opacity: number])[]\n | JSXComponent\nexport const IconValue = [String, Function, Object, Array] as PropType<IconValue>\n\nexport interface IconAliases {\n [name: string]: IconValue\n complete: IconValue\n cancel: IconValue\n close: IconValue\n delete: IconValue\n clear: IconValue\n success: IconValue\n info: IconValue\n warning: IconValue\n error: IconValue\n prev: IconValue\n next: IconValue\n checkboxOn: IconValue\n checkboxOff: IconValue\n checkboxIndeterminate: IconValue\n delimiter: IconValue\n sortAsc: IconValue\n sortDesc: IconValue\n expand: IconValue\n menu: IconValue\n subgroup: IconValue\n dropdown: IconValue\n radioOn: IconValue\n radioOff: IconValue\n edit: IconValue\n ratingEmpty: IconValue\n ratingFull: IconValue\n ratingHalf: IconValue\n loading: IconValue\n first: IconValue\n last: IconValue\n unfold: IconValue\n file: IconValue\n plus: IconValue\n minus: IconValue\n calendar: IconValue\n}\n\nexport interface IconProps {\n tag: string | JSXComponent\n icon?: IconValue\n disabled?: Boolean\n}\n\ntype IconComponent = JSXComponent<IconProps>\n\nexport interface IconSet {\n component: IconComponent\n}\n\nexport type InternalIconOptions = {\n defaultSet: string\n aliases: Partial<IconAliases>\n sets: Record<string, IconSet>\n}\n\nexport type IconOptions = Partial<InternalIconOptions>\n\ntype IconInstance = {\n component: IconComponent\n icon?: IconValue\n}\n\nexport const IconSymbol: InjectionKey<InternalIconOptions> = Symbol.for('vuetify:icons')\n\nexport const makeIconProps = propsFactory({\n icon: {\n type: IconValue,\n },\n // Could not remove this and use makeTagProps, types complained because it is not required\n tag: {\n type: [String, Object, Function] as PropType<string | JSXComponent>,\n required: true,\n },\n}, 'icon')\n\nexport const VComponentIcon = genericComponent()({\n name: 'VComponentIcon',\n\n props: makeIconProps(),\n\n setup (props, { slots }) {\n return () => {\n const Icon = props.icon as JSXComponent\n return (\n <props.tag>\n { props.icon ? <Icon /> : slots.default?.() }\n </props.tag>\n )\n }\n },\n})\nexport type VComponentIcon = InstanceType<typeof VComponentIcon>\n\nexport const VSvgIcon = defineComponent({\n name: 'VSvgIcon',\n\n inheritAttrs: false,\n\n props: makeIconProps(),\n\n setup (props, { attrs }) {\n return () => {\n return (\n <props.tag { ...attrs } style={ null }>\n <svg\n class=\"v-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n role=\"img\"\n aria-hidden=\"true\"\n >\n { Array.isArray(props.icon)\n ? props.icon.map(path => (\n Array.isArray(path)\n ? <path d={ path[0] as string } fill-opacity={ path[1] }></path>\n : <path d={ path as string }></path>\n ))\n : <path d={ props.icon as string }></path>\n }\n </svg>\n </props.tag>\n )\n }\n },\n})\nexport type VSvgIcon = InstanceType<typeof VSvgIcon>\n\nexport const VLigatureIcon = defineComponent({\n name: 'VLigatureIcon',\n\n props: makeIconProps(),\n\n setup (props) {\n return () => {\n return <props.tag>{ props.icon }</props.tag>\n }\n },\n})\nexport type VLigatureIcon = InstanceType<typeof VLigatureIcon>\n\nexport const VClassIcon = defineComponent({\n name: 'VClassIcon',\n\n props: makeIconProps(),\n\n setup (props) {\n return () => {\n return <props.tag class={ props.icon }></props.tag>\n }\n },\n})\nexport type VClassIcon = InstanceType<typeof VClassIcon>\n\nfunction genDefaults (): Record<string, IconSet> {\n return {\n svg: {\n component: VSvgIcon,\n },\n class: {\n component: VClassIcon,\n },\n }\n}\n\n// Composables\nexport function createIcons (options?: IconOptions) {\n const sets = genDefaults()\n const defaultSet = options?.defaultSet ?? 'mdi'\n\n if (defaultSet === 'mdi' && !sets.mdi) {\n sets.mdi = mdi\n }\n\n return mergeDeep({\n defaultSet,\n sets,\n aliases: {\n ...aliases,\n /* eslint-disable max-len */\n vuetify: [\n 'M8.2241 14.2009L12 21L22 3H14.4459L8.2241 14.2009Z',\n ['M7.26303 12.4733L7.00113 12L2 3H12.5261C12.5261 3 12.5261 3 12.5261 3L7.26303 12.4733Z', 0.6],\n ],\n 'vuetify-outline': 'svg:M7.26 12.47 12.53 3H2L7.26 12.47ZM14.45 3 8.22 14.2 12 21 22 3H14.45ZM18.6 5 12 16.88 10.51 14.2 15.62 5ZM7.26 8.35 5.4 5H9.13L7.26 8.35Z',\n 'vuetify-play': [\n 'm6.376 13.184-4.11-7.192C1.505 4.66 2.467 3 4.003 3h8.532l-.953 1.576-.006.01-.396.677c-.429.732-.214 1.507.194 2.015.404.503 1.092.878 1.869.806a3.72 3.72 0 0 1 1.005.022c.276.053.434.143.523.237.138.146.38.635-.25 2.09-.893 1.63-1.553 1.722-1.847 1.677-.213-.033-.468-.158-.756-.406a4.95 4.95 0 0 1-.8-.927c-.39-.564-1.04-.84-1.66-.846-.625-.006-1.316.27-1.693.921l-.478.826-.911 1.506Z',\n ['M9.093 11.552c.046-.079.144-.15.32-.148a.53.53 0 0 1 .43.207c.285.414.636.847 1.046 1.2.405.35.914.662 1.516.754 1.334.205 2.502-.698 3.48-2.495l.014-.028.013-.03c.687-1.574.774-2.852-.005-3.675-.37-.391-.861-.586-1.333-.676a5.243 5.243 0 0 0-1.447-.044c-.173.016-.393-.073-.54-.257-.145-.18-.127-.316-.082-.392l.393-.672L14.287 3h5.71c1.536 0 2.499 1.659 1.737 2.992l-7.997 13.996c-.768 1.344-2.706 1.344-3.473 0l-3.037-5.314 1.377-2.278.004-.006.004-.007.481-.831Z', 0.6],\n ],\n /* eslint-enable max-len */\n },\n }, options) as InternalIconOptions\n}\n\nexport const useIcon = (props: MaybeRefOrGetter<IconValue | undefined>) => {\n const icons = inject(IconSymbol)\n\n if (!icons) throw new Error('Missing Vuetify Icons provide!')\n\n const iconData = computed<IconInstance>(() => {\n const iconAlias = toValue(props)\n\n if (!iconAlias) return { component: VComponentIcon }\n\n let icon: IconValue | undefined = iconAlias\n\n if (typeof icon === 'string') {\n icon = icon.trim()\n\n if (icon.startsWith('$')) {\n icon = icons.aliases?.[icon.slice(1)]\n }\n }\n\n if (!icon) consoleWarn(`Could not find aliased icon \"${iconAlias}\"`)\n\n if (Array.isArray(icon)) {\n return {\n component: VSvgIcon,\n icon,\n }\n } else if (typeof icon !== 'string') {\n return {\n component: VComponentIcon,\n icon,\n }\n }\n\n const iconSetName = Object.keys(icons.sets).find(\n setName => typeof icon === 'string' && icon.startsWith(`${setName}:`)\n )\n\n const iconName = iconSetName ? icon.slice(iconSetName.length + 1) : icon\n const iconSet = icons.sets[iconSetName ?? icons.defaultSet]\n\n return {\n component: iconSet.component,\n icon: iconName,\n }\n })\n\n return { iconData }\n}\n"],"mappings":";AAAA;AAAA,SACSA,OAAO,EAAEC,GAAG,8BAErB;AACA,SAASC,QAAQ,EAAEC,MAAM,EAAEC,OAAO,QAAQ,KAAK;AAAA,SACtCC,WAAW,EAAEC,eAAe,EAAEC,gBAAgB,EAAEC,SAAS,EAAEC,YAAY,4BAEhF;AAQA,OAAO,MAAMC,SAAS,GAAG,CAACC,MAAM,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,KAAK,CAAwB;AAkEjF,OAAO,MAAMC,UAA6C,GAAGC,MAAM,CAACC,GAAG,CAAC,eAAe,CAAC;AAExF,OAAO,MAAMC,aAAa,GAAGT,YAAY,CAAC;EACxCU,IAAI,EAAE;I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yB,SAAS,EAAErB,cAAc;QACzBJ;MACF,CAAC;IACH;IAEA,MAAMwC,WAAW,GAAG9C,MAAM,CAAC+C,IAAI,CAACR,KAAK,CAACJ,IAAI,CAAC,CAACa,IAAI,CAC9CC,OAAO,IAAI,OAAO3C,IAAI,KAAK,QAAQ,IAAIA,IAAI,CAACsC,UAAU,CAAC,GAAGK,OAAO,GAAG,CACtE,CAAC;IAED,MAAMC,QAAQ,GAAGJ,WAAW,GAAGxC,IAAI,CAACuC,KAAK,CAACC,WAAW,CAACK,MAAM,GAAG,CAAC,CAAC,GAAG7C,IAAI;IACxE,MAAM8C,OAAO,GAAGb,KAAK,CAACJ,IAAI,CAACW,WAAW,IAAIP,KAAK,CAACH,UAAU,CAAC;IAE3D,OAAO;MACLL,SAAS,EAAEqB,OAAO,CAACrB,SAAS;MAC5BzB,IAAI,EAAE4C;IACR,CAAC;EACH,CAAC,CAAC;EAEF,OAAO;IAAET;EAAS,CAAC;AACrB,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"icons.js","names":["aliases","mdi","computed","inject","toValue","consoleWarn","defineComponent","genericComponent","mergeDeep","propsFactory","IconValue","String","Function","Object","Array","IconSymbol","Symbol","for","makeIconProps","icon","type","tag","required","VComponentIcon","name","props","setup","_ref","slots","Icon","_createVNode","default","VSvgIcon","inheritAttrs","_ref2","attrs","_mergeProps","_createElementVNode","isArray","map","path","VLigatureIcon","VClassIcon","_normalizeClass","genDefaults","svg","component","class","createIcons","options","sets","defaultSet","vuetify","useIcon","icons","Error","iconData","iconAlias","trim","startsWith","slice","iconSetName","keys","find","setName","iconName","length","iconSet"],"sources":["../../src/composables/icons.tsx"],"sourcesContent":["// Icons\nimport { aliases, mdi } from '@/iconsets/mdi'\n\n// Utilities\nimport { computed, inject, toValue } from 'vue'\nimport { consoleWarn, defineComponent, genericComponent, mergeDeep, propsFactory } from '@/util'\n\n// Types\nimport type { InjectionKey, MaybeRefOrGetter, PropType } from 'vue'\nimport type { JSXComponent } from '@/util'\n\nexport type IconValue =\n | string\n | (string | [path: string, opacity: number])[]\n | JSXComponent\nexport const IconValue = [String, Function, Object, Array] as PropType<IconValue>\n\nexport interface IconAliases {\n [name: string]: IconValue\n complete: IconValue\n cancel: IconValue\n close: IconValue\n delete: IconValue\n clear: IconValue\n success: IconValue\n info: IconValue\n warning: IconValue\n error: IconValue\n prev: IconValue\n next: IconValue\n checkboxOn: IconValue\n checkboxOff: IconValue\n checkboxIndeterminate: IconValue\n delimiter: IconValue\n sortAsc: IconValue\n sortDesc: IconValue\n expand: IconValue\n menu: IconValue\n subgroup: IconValue\n dropdown: IconValue\n radioOn: IconValue\n radioOff: IconValue\n edit: IconValue\n ratingEmpty: IconValue\n ratingFull: IconValue\n ratingHalf: IconValue\n loading: IconValue\n first: IconValue\n last: IconValue\n unfold: IconValue\n file: IconValue\n plus: IconValue\n minus: IconValue\n calendar: IconValue\n}\n\nexport interface IconProps {\n tag: string | JSXComponent\n icon?: IconValue\n disabled?: Boolean\n}\n\ntype IconComponent = JSXComponent<IconProps>\n\nexport interface IconSet {\n component: IconComponent\n}\n\nexport type InternalIconOptions = {\n defaultSet: string\n aliases: Partial<IconAliases>\n sets: Record<string, IconSet>\n}\n\nexport type IconOptions = Partial<InternalIconOptions>\n\ntype IconInstance = {\n component: IconComponent\n icon?: IconValue\n}\n\nexport const IconSymbol: InjectionKey<InternalIconOptions> = Symbol.for('vuetify:icons')\n\nexport const makeIconProps = propsFactory({\n icon: {\n type: IconValue,\n },\n // Could not remove this and use makeTagProps, types complained because it is not required\n tag: {\n type: [String, Object, Function] as PropType<string | JSXComponent>,\n required: true,\n },\n}, 'icon')\n\nexport const VComponentIcon = genericComponent()({\n name: 'VComponentIcon',\n\n props: makeIconProps(),\n\n setup (props, { slots }) {\n return () => {\n const Icon = props.icon as JSXComponent\n return (\n <props.tag>\n { props.icon ? <Icon /> : slots.default?.() }\n </props.tag>\n )\n }\n },\n})\nexport type VComponentIcon = InstanceType<typeof VComponentIcon>\n\nexport const VSvgIcon = defineComponent({\n name: 'VSvgIcon',\n\n inheritAttrs: false,\n\n props: makeIconProps(),\n\n setup (props, { attrs }) {\n return () => {\n return (\n <props.tag { ...attrs } style={ null }>\n <svg\n class=\"v-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n role=\"img\"\n aria-hidden=\"true\"\n >\n { Array.isArray(props.icon)\n ? props.icon.map(path => (\n Array.isArray(path)\n ? <path d={ path[0] as string } fill-opacity={ path[1] }></path>\n : <path d={ path as string }></path>\n ))\n : <path d={ props.icon as string }></path>\n }\n </svg>\n </props.tag>\n )\n }\n },\n})\nexport type VSvgIcon = InstanceType<typeof VSvgIcon>\n\nexport const VLigatureIcon = defineComponent({\n name: 'VLigatureIcon',\n\n props: makeIconProps(),\n\n setup (props) {\n return () => {\n return <props.tag>{ props.icon }</props.tag>\n }\n },\n})\nexport type VLigatureIcon = InstanceType<typeof VLigatureIcon>\n\nexport const VClassIcon = defineComponent({\n name: 'VClassIcon',\n\n props: makeIconProps(),\n\n setup (props) {\n return () => {\n return <props.tag class={ props.icon }></props.tag>\n }\n },\n})\nexport type VClassIcon = InstanceType<typeof VClassIcon>\n\nfunction genDefaults (): Record<string, IconSet> {\n return {\n svg: {\n component: VSvgIcon,\n },\n class: {\n component: VClassIcon,\n },\n }\n}\n\n// Composables\nexport function createIcons (options?: IconOptions) {\n const sets = genDefaults()\n const defaultSet = options?.defaultSet ?? 'mdi'\n\n if (defaultSet === 'mdi' && !sets.mdi) {\n sets.mdi = mdi\n }\n\n return mergeDeep({\n defaultSet,\n sets,\n aliases: {\n ...aliases,\n /* eslint-disable max-len */\n vuetify: [\n 'M8.2241 14.2009L12 21L22 3H14.4459L8.2241 14.2009Z',\n ['M7.26303 12.4733L7.00113 12L2 3H12.5261C12.5261 3 12.5261 3 12.5261 3L7.26303 12.4733Z', 0.6],\n ],\n 'vuetify-outline': 'svg:M7.26 12.47 12.53 3H2L7.26 12.47ZM14.45 3 8.22 14.2 12 21 22 3H14.45ZM18.6 5 12 16.88 10.51 14.2 15.62 5ZM7.26 8.35 5.4 5H9.13L7.26 8.35Z',\n 'vuetify-play': [\n 'm6.376 13.184-4.11-7.192C1.505 4.66 2.467 3 4.003 3h8.532l-.953 1.576-.006.01-.396.677c-.429.732-.214 1.507.194 2.015.404.503 1.092.878 1.869.806a3.72 3.72 0 0 1 1.005.022c.276.053.434.143.523.237.138.146.38.635-.25 2.09-.893 1.63-1.553 1.722-1.847 1.677-.213-.033-.468-.158-.756-.406a4.95 4.95 0 0 1-.8-.927c-.39-.564-1.04-.84-1.66-.846-.625-.006-1.316.27-1.693.921l-.478.826-.911 1.506Z',\n ['M9.093 11.552c.046-.079.144-.15.32-.148a.53.53 0 0 1 .43.207c.285.414.636.847 1.046 1.2.405.35.914.662 1.516.754 1.334.205 2.502-.698 3.48-2.495l.014-.028.013-.03c.687-1.574.774-2.852-.005-3.675-.37-.391-.861-.586-1.333-.676a5.243 5.243 0 0 0-1.447-.044c-.173.016-.393-.073-.54-.257-.145-.18-.127-.316-.082-.392l.393-.672L14.287 3h5.71c1.536 0 2.499 1.659 1.737 2.992l-7.997 13.996c-.768 1.344-2.706 1.344-3.473 0l-3.037-5.314 1.377-2.278.004-.006.004-.007.481-.831Z', 0.6],\n ],\n /* eslint-enable max-len */\n },\n }, options) as InternalIconOptions\n}\n\nexport const useIcon = (props: MaybeRefOrGetter<IconValue | undefined>) => {\n const icons = inject(IconSymbol)\n\n if (!icons) throw new Error('Missing Vuetify Icons provide!')\n\n const iconData = computed<IconInstance>(() => {\n const iconAlias = toValue(props)\n\n if (!iconAlias) return { component: VComponentIcon }\n\n let icon: IconValue | undefined = iconAlias\n\n if (typeof icon === 'string') {\n icon = icon.trim()\n\n if (icon.startsWith('$')) {\n icon = icons.aliases?.[icon.slice(1)]\n }\n }\n\n if (!icon) consoleWarn(`Could not find aliased icon \"${iconAlias}\"`)\n\n if (Array.isArray(icon)) {\n return {\n component: VSvgIcon,\n icon,\n }\n } else if (typeof icon !== 'string') {\n return {\n component: VComponentIcon,\n icon,\n }\n }\n\n const iconSetName = Object.keys(icons.sets).find(\n setName => typeof icon === 'string' && icon.startsWith(`${setName}:`)\n )\n\n const iconName = iconSetName ? icon.slice(iconSetName.length + 1) : icon\n const iconSet = icons.sets[iconSetName ?? icons.defaultSet]\n\n return {\n component: iconSet.component,\n icon: iconName,\n }\n })\n\n return { iconData }\n}\n"],"mappings":";AAAA;AAAA,SACSA,OAAO,EAAEC,GAAG,8BAErB;AACA,SAASC,QAAQ,EAAEC,MAAM,EAAEC,OAAO,QAAQ,KAAK;AAAA,SACtCC,WAAW,EAAEC,eAAe,EAAEC,gBAAgB,EAAEC,SAAS,EAAEC,YAAY,4BAEhF;AAQA,OAAO,MAAMC,SAAS,GAAG,CAACC,MAAM,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,KAAK,CAAwB;AAkEjF,OAAO,MAAMC,UAA6C,GAAGC,MAAM,CAACC,GAAG,CAAC,eAAe,CAAC;AAExF,OAAO,MAAMC,aAAa,GAAGT,YAAY,CAAC;EACxCU,IAAI,EAAE;IACJC,IAAI,EAAEV;EACR,CAAC;EACD;EACAW,GAAG,EAAE;IACHD,IAAI,EAAE,CAACT,MAAM,EAAEE,MAAM,EAAED,QAAQ,CAAoC;IACnEU,QAAQ,EAAE;EACZ;AACF,CAAC,EAAE,MAAM,CAAC;AAEV,OAAO,MAAMC,cAAc,GAAGhB,gBAAgB,CAAC,CAAC,CAAC;EAC/CiB,IAAI,EAAE,gBAAgB;EAEtBC,KAAK,EAAEP,aAAa,CAAC,CAAC;EAEtBQ,KAAKA,CAAED,KAAK,EAAAE,IAAA,EAAa;IAAA,IAAX;MAAEC;IAAM,CAAC,GAAAD,IAAA;IACrB,OAAO,MAAM;MACX,MAAME,IAAI,GAAGJ,KAAK,CAACN,IAAoB;MACvC,OAAAW,YAAA,CAAAL,KAAA,CAAAJ,GAAA;QAAAU,OAAA,EAAAA,CAAA,MAEMN,K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C5B3B,IAAI,EAAE8C;IACR,CAAC;EACH,CAAC,CAAC;EAEF,OAAO;IAAET;EAAS,CAAC;AACrB,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createVNode as _createVNode } from "vue";
|
|
1
|
+
import { createVNode as _createVNode, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode } from "vue";
|
|
2
2
|
// Components
|
|
3
3
|
import { VProgressLinear } from "../components/VProgressLinear/index.js"; // Utilities
|
|
4
4
|
import { toRef } from 'vue';
|
|
@@ -20,8 +20,8 @@ export function LoaderSlot(props, _ref) {
|
|
|
20
20
|
let {
|
|
21
21
|
slots
|
|
22
22
|
} = _ref;
|
|
23
|
-
return
|
|
24
|
-
"class": `${props.name}__loader`
|
|
23
|
+
return _createElementVNode("div", {
|
|
24
|
+
"class": _normalizeClass(`${props.name}__loader`)
|
|
25
25
|
}, [slots.default?.({
|
|
26
26
|
color: props.color,
|
|
27
27
|
isActive: props.active
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.js","names":["VProgressLinear","toRef","getCurrentInstanceName","propsFactory","makeLoaderProps","loading","Boolean","String","useLoader","props","name","arguments","length","undefined","loaderClasses","LoaderSlot","_ref","slots","
|
|
1
|
+
{"version":3,"file":"loader.js","names":["VProgressLinear","toRef","getCurrentInstanceName","propsFactory","makeLoaderProps","loading","Boolean","String","useLoader","props","name","arguments","length","undefined","loaderClasses","LoaderSlot","_ref","slots","_createElementVNode","_normalizeClass","default","color","isActive","active","_createVNode","absolute"],"sources":["../../src/composables/loader.tsx"],"sourcesContent":["// Components\nimport { VProgressLinear } from '@/components/VProgressLinear'\n\n// Utilities\nimport { toRef } from 'vue'\nimport { getCurrentInstanceName, propsFactory } from '@/util'\n\n// Types\nimport type { ExtractPropTypes, SetupContext } from 'vue'\nimport type { SlotsToProps } from '@/util'\n\nexport interface LoaderSlotProps {\n color: string | undefined\n isActive: boolean\n}\n\nexport interface LoaderProps {\n loading?: boolean | string\n}\n\n// Composables\nexport const makeLoaderProps = propsFactory({\n loading: [Boolean, String],\n}, 'loader')\n\nexport function useLoader (\n props: LoaderProps,\n name = getCurrentInstanceName(),\n) {\n const loaderClasses = toRef(() => ({\n [`${name}--loading`]: props.loading,\n }))\n\n return { loaderClasses }\n}\n\nexport function LoaderSlot (\n props: {\n absolute?: boolean\n active: boolean\n name: string\n color?: string\n } & ExtractPropTypes<SlotsToProps<{\n default: LoaderSlotProps\n }>>,\n { slots }: SetupContext,\n) {\n return (\n <div class={ `${props.name}__loader` }>\n { slots.default?.({\n color: props.color,\n isActive: props.active,\n } satisfies LoaderSlotProps) || (\n <VProgressLinear\n absolute={ props.absolute }\n active={ props.active }\n color={ props.color }\n height=\"2\"\n indeterminate\n />\n )}\n </div>\n )\n}\n"],"mappings":";AAAA;AAAA,SACSA,eAAe,kDAExB;AACA,SAASC,KAAK,QAAQ,KAAK;AAAA,SAClBC,sBAAsB,EAAEC,YAAY,4BAE7C;AAaA;AACA,OAAO,MAAMC,eAAe,GAAGD,YAAY,CAAC;EAC1CE,OAAO,EAAE,CAACC,OAAO,EAAEC,MAAM;AAC3B,CAAC,EAAE,QAAQ,CAAC;AAEZ,OAAO,SAASC,SAASA,CACvBC,KAAkB,EAElB;EAAA,IADAC,IAAI,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGT,sBAAsB,CAAC,CAAC;EAE/B,MAAMY,aAAa,GAAGb,KAAK,CAAC,OAAO;IACjC,CAAC,GAAGS,IAAI,WAAW,GAAGD,KAAK,CAACJ;EAC9B,CAAC,CAAC,CAAC;EAEH,OAAO;IAAES;EAAc,CAAC;AAC1B;AAEA,OAAO,SAASC,UAAUA,CACxBN,KAOG,EAAAO,IAAA,EAEH;EAAA,IADA;IAAEC;EAAoB,CAAC,GAAAD,IAAA;EAEvB,OAAAE,mBAAA;IAAA,SAAAC,eAAA,CACe,GAAGV,KAAK,CAACC,IAAI,UAAU;EAAA,IAChCO,KAAK,CAACG,OAAO,GAAG;IAChBC,KAAK,EAAEZ,KAAK,CAACY,KAAK;IAClBC,QAAQ,EAAEb,KAAK,CAACc;EAClB,CAA2B,CAAC,IAAAC,YAAA,CAAAxB,eAAA;IAAA,YAEbS,KAAK,CAACgB,QAAQ;IAAA,UAChBhB,KAAK,CAACc,MAAM;IAAA,SACbd,KAAK,CAACY,KAAK;IAAA;IAAA;EAAA,QAItB;AAGP","ignoreList":[]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Fragment as _Fragment,
|
|
1
|
+
import { Fragment as _Fragment, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode } from "vue";
|
|
2
2
|
// Composables
|
|
3
3
|
import { useColor } from "./color.js"; // Utilities
|
|
4
4
|
import { toRef, toValue } from 'vue';
|
|
5
5
|
import { getCurrentInstanceName, propsFactory } from "../util/index.js"; // Types
|
|
6
6
|
export const allowedVariants = ['elevated', 'flat', 'tonal', 'outlined', 'text', 'plain'];
|
|
7
7
|
export function genOverlays(isClickable, name) {
|
|
8
|
-
return
|
|
8
|
+
return _createElementVNode(_Fragment, null, [isClickable && _createElementVNode("span", {
|
|
9
9
|
"key": "overlay",
|
|
10
|
-
"class": `${name}__overlay`
|
|
11
|
-
}, null),
|
|
10
|
+
"class": _normalizeClass(`${name}__overlay`)
|
|
11
|
+
}, null), _createElementVNode("span", {
|
|
12
12
|
"key": "underlay",
|
|
13
|
-
"class": `${name}__underlay`
|
|
13
|
+
"class": _normalizeClass(`${name}__underlay`)
|
|
14
14
|
}, null)]);
|
|
15
15
|
}
|
|
16
16
|
export const makeVariantProps = propsFactory({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variant.js","names":["useColor","toRef","toValue","getCurrentInstanceName","propsFactory","allowedVariants","genOverlays","isClickable","name","
|
|
1
|
+
{"version":3,"file":"variant.js","names":["useColor","toRef","toValue","getCurrentInstanceName","propsFactory","allowedVariants","genOverlays","isClickable","name","_createElementVNode","_Fragment","_normalizeClass","makeVariantProps","color","String","variant","type","default","validator","v","includes","useVariant","props","arguments","length","undefined","variantClasses","colorClasses","colorStyles"],"sources":["../../src/composables/variant.tsx"],"sourcesContent":["// Composables\nimport { useColor } from '@/composables/color'\n\n// Utilities\nimport { toRef, toValue } from 'vue'\nimport { getCurrentInstanceName, propsFactory } from '@/util'\n\n// Types\nimport type { MaybeRefOrGetter, PropType } from 'vue'\n\nexport const allowedVariants = [\n 'elevated',\n 'flat',\n 'tonal',\n 'outlined',\n 'text',\n 'plain',\n] as const\n\nexport type Variant = typeof allowedVariants[number]\n\nexport interface VariantProps {\n color?: string\n variant: Variant\n}\n\nexport function genOverlays (isClickable: boolean, name: string) {\n return (\n <>\n { isClickable && <span key=\"overlay\" class={ `${name}__overlay` } /> }\n\n <span key=\"underlay\" class={ `${name}__underlay` } />\n </>\n )\n}\n\nexport const makeVariantProps = propsFactory({\n color: String,\n variant: {\n type: String as PropType<Variant>,\n default: 'elevated',\n validator: (v: any) => allowedVariants.includes(v),\n },\n}, 'variant')\n\nexport function useVariant (\n props: MaybeRefOrGetter<VariantProps>,\n name = getCurrentInstanceName(),\n) {\n const variantClasses = toRef(() => {\n const { variant } = toValue(props)\n return `${name}--variant-${variant}`\n })\n\n const { colorClasses, colorStyles } = useColor(() => {\n const { variant, color } = toValue(props)\n return {\n [['elevated', 'flat'].includes(variant) ? 'background' : 'text']: color,\n }\n })\n\n return { colorClasses, colorStyles, variantClasses }\n}\n"],"mappings":";AAAA;AAAA,SACSA,QAAQ,sBAEjB;AACA,SAASC,KAAK,EAAEC,OAAO,QAAQ,KAAK;AAAA,SAC3BC,sBAAsB,EAAEC,YAAY,4BAE7C;AAGA,OAAO,MAAMC,eAAe,GAAG,CAC7B,UAAU,EACV,MAAM,EACN,OAAO,EACP,UAAU,EACV,MAAM,EACN,OAAO,CACC;AASV,OAAO,SAASC,WAAWA,CAAEC,WAAoB,EAAEC,IAAY,EAAE;EAC/D,OAAAC,mBAAA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
18
18
|
};
|
|
19
|
-
export const version = "3.8.
|
|
19
|
+
export const version = "3.8.7";
|
|
20
20
|
createVuetify.version = version;
|
|
21
21
|
export { blueprints, components, directives };
|
|
22
22
|
export * from "./composables/index.js";
|
package/lib/framework.d.ts
CHANGED
|
@@ -2539,46 +2539,40 @@ declare module 'vue' {
|
|
|
2539
2539
|
$children?: VNodeChild
|
|
2540
2540
|
}
|
|
2541
2541
|
export interface GlobalComponents {
|
|
2542
|
+
VApp: typeof import('vuetify/components')['VApp']
|
|
2543
|
+
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
|
2544
|
+
VBadge: typeof import('vuetify/components')['VBadge']
|
|
2542
2545
|
VAppBar: typeof import('vuetify/components')['VAppBar']
|
|
2543
2546
|
VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
|
|
2544
2547
|
VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
|
|
2545
|
-
VApp: typeof import('vuetify/components')['VApp']
|
|
2546
|
-
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
|
2547
2548
|
VAlert: typeof import('vuetify/components')['VAlert']
|
|
2548
2549
|
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
|
2549
|
-
VAvatar: typeof import('vuetify/components')['VAvatar']
|
|
2550
2550
|
VBanner: typeof import('vuetify/components')['VBanner']
|
|
2551
2551
|
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
|
2552
2552
|
VBannerText: typeof import('vuetify/components')['VBannerText']
|
|
2553
2553
|
VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
|
|
2554
|
-
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
|
2555
2554
|
VBtn: typeof import('vuetify/components')['VBtn']
|
|
2555
|
+
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
|
2556
|
+
VAvatar: typeof import('vuetify/components')['VAvatar']
|
|
2556
2557
|
VBreadcrumbs: typeof import('vuetify/components')['VBreadcrumbs']
|
|
2557
2558
|
VBreadcrumbsItem: typeof import('vuetify/components')['VBreadcrumbsItem']
|
|
2558
2559
|
VBreadcrumbsDivider: typeof import('vuetify/components')['VBreadcrumbsDivider']
|
|
2559
|
-
|
|
2560
|
-
|
|
2560
|
+
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
|
2561
|
+
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
|
2561
2562
|
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
|
2563
|
+
VCarousel: typeof import('vuetify/components')['VCarousel']
|
|
2564
|
+
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
|
2565
|
+
VChip: typeof import('vuetify/components')['VChip']
|
|
2566
|
+
VCode: typeof import('vuetify/components')['VCode']
|
|
2567
|
+
VColorPicker: typeof import('vuetify/components')['VColorPicker']
|
|
2562
2568
|
VCard: typeof import('vuetify/components')['VCard']
|
|
2563
2569
|
VCardActions: typeof import('vuetify/components')['VCardActions']
|
|
2564
2570
|
VCardItem: typeof import('vuetify/components')['VCardItem']
|
|
2565
2571
|
VCardSubtitle: typeof import('vuetify/components')['VCardSubtitle']
|
|
2566
2572
|
VCardText: typeof import('vuetify/components')['VCardText']
|
|
2567
2573
|
VCardTitle: typeof import('vuetify/components')['VCardTitle']
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
VChip: typeof import('vuetify/components')['VChip']
|
|
2571
|
-
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
|
2572
|
-
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
|
2573
|
-
VColorPicker: typeof import('vuetify/components')['VColorPicker']
|
|
2574
|
-
VCombobox: typeof import('vuetify/components')['VCombobox']
|
|
2575
|
-
VCode: typeof import('vuetify/components')['VCode']
|
|
2576
|
-
VDatePicker: typeof import('vuetify/components')['VDatePicker']
|
|
2577
|
-
VDatePickerControls: typeof import('vuetify/components')['VDatePickerControls']
|
|
2578
|
-
VDatePickerHeader: typeof import('vuetify/components')['VDatePickerHeader']
|
|
2579
|
-
VDatePickerMonth: typeof import('vuetify/components')['VDatePickerMonth']
|
|
2580
|
-
VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
|
|
2581
|
-
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
|
2574
|
+
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
|
2575
|
+
VCounter: typeof import('vuetify/components')['VCounter']
|
|
2582
2576
|
VDataTable: typeof import('vuetify/components')['VDataTable']
|
|
2583
2577
|
VDataTableHeaders: typeof import('vuetify/components')['VDataTableHeaders']
|
|
2584
2578
|
VDataTableFooter: typeof import('vuetify/components')['VDataTableFooter']
|
|
@@ -2586,31 +2580,35 @@ declare module 'vue' {
|
|
|
2586
2580
|
VDataTableRow: typeof import('vuetify/components')['VDataTableRow']
|
|
2587
2581
|
VDataTableVirtual: typeof import('vuetify/components')['VDataTableVirtual']
|
|
2588
2582
|
VDataTableServer: typeof import('vuetify/components')['VDataTableServer']
|
|
2589
|
-
|
|
2590
|
-
|
|
2583
|
+
VDatePicker: typeof import('vuetify/components')['VDatePicker']
|
|
2584
|
+
VDatePickerControls: typeof import('vuetify/components')['VDatePickerControls']
|
|
2585
|
+
VDatePickerHeader: typeof import('vuetify/components')['VDatePickerHeader']
|
|
2586
|
+
VDatePickerMonth: typeof import('vuetify/components')['VDatePickerMonth']
|
|
2587
|
+
VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
|
|
2588
|
+
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
|
2589
|
+
VDialog: typeof import('vuetify/components')['VDialog']
|
|
2590
|
+
VCombobox: typeof import('vuetify/components')['VCombobox']
|
|
2591
|
+
VFab: typeof import('vuetify/components')['VFab']
|
|
2591
2592
|
VExpansionPanels: typeof import('vuetify/components')['VExpansionPanels']
|
|
2592
2593
|
VExpansionPanel: typeof import('vuetify/components')['VExpansionPanel']
|
|
2593
2594
|
VExpansionPanelText: typeof import('vuetify/components')['VExpansionPanelText']
|
|
2594
2595
|
VExpansionPanelTitle: typeof import('vuetify/components')['VExpansionPanelTitle']
|
|
2595
2596
|
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
|
2597
|
+
VDivider: typeof import('vuetify/components')['VDivider']
|
|
2596
2598
|
VField: typeof import('vuetify/components')['VField']
|
|
2597
2599
|
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
|
2598
|
-
VCounter: typeof import('vuetify/components')['VCounter']
|
|
2599
|
-
VDialog: typeof import('vuetify/components')['VDialog']
|
|
2600
|
-
VFooter: typeof import('vuetify/components')['VFooter']
|
|
2601
|
-
VFab: typeof import('vuetify/components')['VFab']
|
|
2602
2600
|
VFileInput: typeof import('vuetify/components')['VFileInput']
|
|
2603
|
-
|
|
2601
|
+
VFooter: typeof import('vuetify/components')['VFooter']
|
|
2604
2602
|
VIcon: typeof import('vuetify/components')['VIcon']
|
|
2605
2603
|
VComponentIcon: typeof import('vuetify/components')['VComponentIcon']
|
|
2606
2604
|
VSvgIcon: typeof import('vuetify/components')['VSvgIcon']
|
|
2607
2605
|
VLigatureIcon: typeof import('vuetify/components')['VLigatureIcon']
|
|
2608
2606
|
VClassIcon: typeof import('vuetify/components')['VClassIcon']
|
|
2607
|
+
VImg: typeof import('vuetify/components')['VImg']
|
|
2609
2608
|
VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
|
|
2610
|
-
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
|
2611
|
-
VItem: typeof import('vuetify/components')['VItem']
|
|
2612
2609
|
VInput: typeof import('vuetify/components')['VInput']
|
|
2613
2610
|
VKbd: typeof import('vuetify/components')['VKbd']
|
|
2611
|
+
VMenu: typeof import('vuetify/components')['VMenu']
|
|
2614
2612
|
VList: typeof import('vuetify/components')['VList']
|
|
2615
2613
|
VListGroup: typeof import('vuetify/components')['VListGroup']
|
|
2616
2614
|
VListImg: typeof import('vuetify/components')['VListImg']
|
|
@@ -2620,74 +2618,76 @@ declare module 'vue' {
|
|
|
2620
2618
|
VListItemSubtitle: typeof import('vuetify/components')['VListItemSubtitle']
|
|
2621
2619
|
VListItemTitle: typeof import('vuetify/components')['VListItemTitle']
|
|
2622
2620
|
VListSubheader: typeof import('vuetify/components')['VListSubheader']
|
|
2623
|
-
VMain: typeof import('vuetify/components')['VMain']
|
|
2624
2621
|
VLabel: typeof import('vuetify/components')['VLabel']
|
|
2622
|
+
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
|
2623
|
+
VItem: typeof import('vuetify/components')['VItem']
|
|
2625
2624
|
VMessages: typeof import('vuetify/components')['VMessages']
|
|
2626
2625
|
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
|
2627
|
-
|
|
2628
|
-
VOverlay: typeof import('vuetify/components')['VOverlay']
|
|
2629
|
-
VNumberInput: typeof import('vuetify/components')['VNumberInput']
|
|
2630
|
-
VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
|
|
2626
|
+
VMain: typeof import('vuetify/components')['VMain']
|
|
2631
2627
|
VPagination: typeof import('vuetify/components')['VPagination']
|
|
2632
|
-
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
|
2633
|
-
VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
|
|
2634
2628
|
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
|
2629
|
+
VNumberInput: typeof import('vuetify/components')['VNumberInput']
|
|
2630
|
+
VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
|
|
2631
|
+
VOverlay: typeof import('vuetify/components')['VOverlay']
|
|
2635
2632
|
VRating: typeof import('vuetify/components')['VRating']
|
|
2633
|
+
VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
|
|
2634
|
+
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
|
2635
|
+
VSheet: typeof import('vuetify/components')['VSheet']
|
|
2636
2636
|
VSelect: typeof import('vuetify/components')['VSelect']
|
|
2637
|
-
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
|
2638
|
-
VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
|
|
2639
2637
|
VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
|
|
2640
|
-
|
|
2641
|
-
VSheet: typeof import('vuetify/components')['VSheet']
|
|
2638
|
+
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
|
2642
2639
|
VSlideGroup: typeof import('vuetify/components')['VSlideGroup']
|
|
2643
2640
|
VSlideGroupItem: typeof import('vuetify/components')['VSlideGroupItem']
|
|
2644
|
-
|
|
2645
|
-
VTab: typeof import('vuetify/components')['VTab']
|
|
2646
|
-
VTabs: typeof import('vuetify/components')['VTabs']
|
|
2647
|
-
VTabsWindow: typeof import('vuetify/components')['VTabsWindow']
|
|
2648
|
-
VTabsWindowItem: typeof import('vuetify/components')['VTabsWindowItem']
|
|
2641
|
+
VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
|
|
2649
2642
|
VStepper: typeof import('vuetify/components')['VStepper']
|
|
2650
2643
|
VStepperActions: typeof import('vuetify/components')['VStepperActions']
|
|
2651
2644
|
VStepperHeader: typeof import('vuetify/components')['VStepperHeader']
|
|
2652
2645
|
VStepperItem: typeof import('vuetify/components')['VStepperItem']
|
|
2653
2646
|
VStepperWindow: typeof import('vuetify/components')['VStepperWindow']
|
|
2654
2647
|
VStepperWindowItem: typeof import('vuetify/components')['VStepperWindowItem']
|
|
2648
|
+
VSlider: typeof import('vuetify/components')['VSlider']
|
|
2649
|
+
VSnackbar: typeof import('vuetify/components')['VSnackbar']
|
|
2655
2650
|
VSwitch: typeof import('vuetify/components')['VSwitch']
|
|
2656
|
-
VTable: typeof import('vuetify/components')['VTable']
|
|
2657
2651
|
VTextarea: typeof import('vuetify/components')['VTextarea']
|
|
2658
2652
|
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
|
2653
|
+
VTab: typeof import('vuetify/components')['VTab']
|
|
2654
|
+
VTabs: typeof import('vuetify/components')['VTabs']
|
|
2655
|
+
VTabsWindow: typeof import('vuetify/components')['VTabsWindow']
|
|
2656
|
+
VTabsWindowItem: typeof import('vuetify/components')['VTabsWindowItem']
|
|
2657
|
+
VTable: typeof import('vuetify/components')['VTable']
|
|
2658
|
+
VTextField: typeof import('vuetify/components')['VTextField']
|
|
2659
|
+
VTimeline: typeof import('vuetify/components')['VTimeline']
|
|
2660
|
+
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
|
2659
2661
|
VToolbar: typeof import('vuetify/components')['VToolbar']
|
|
2660
2662
|
VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
|
|
2661
2663
|
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
|
2662
|
-
VTextField: typeof import('vuetify/components')['VTextField']
|
|
2663
2664
|
VTooltip: typeof import('vuetify/components')['VTooltip']
|
|
2664
|
-
VTimeline: typeof import('vuetify/components')['VTimeline']
|
|
2665
|
-
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
|
2666
2665
|
VWindow: typeof import('vuetify/components')['VWindow']
|
|
2667
2666
|
VWindowItem: typeof import('vuetify/components')['VWindowItem']
|
|
2668
|
-
|
|
2667
|
+
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
|
2669
2668
|
VConfirmEdit: typeof import('vuetify/components')['VConfirmEdit']
|
|
2669
|
+
VDataIterator: typeof import('vuetify/components')['VDataIterator']
|
|
2670
2670
|
VDefaultsProvider: typeof import('vuetify/components')['VDefaultsProvider']
|
|
2671
|
-
VForm: typeof import('vuetify/components')['VForm']
|
|
2672
|
-
VHover: typeof import('vuetify/components')['VHover']
|
|
2673
2671
|
VContainer: typeof import('vuetify/components')['VContainer']
|
|
2674
2672
|
VCol: typeof import('vuetify/components')['VCol']
|
|
2675
2673
|
VRow: typeof import('vuetify/components')['VRow']
|
|
2676
2674
|
VSpacer: typeof import('vuetify/components')['VSpacer']
|
|
2675
|
+
VForm: typeof import('vuetify/components')['VForm']
|
|
2676
|
+
VHover: typeof import('vuetify/components')['VHover']
|
|
2677
2677
|
VLazy: typeof import('vuetify/components')['VLazy']
|
|
2678
2678
|
VLayout: typeof import('vuetify/components')['VLayout']
|
|
2679
2679
|
VLayoutItem: typeof import('vuetify/components')['VLayoutItem']
|
|
2680
|
+
VLocaleProvider: typeof import('vuetify/components')['VLocaleProvider']
|
|
2680
2681
|
VNoSsr: typeof import('vuetify/components')['VNoSsr']
|
|
2681
2682
|
VParallax: typeof import('vuetify/components')['VParallax']
|
|
2682
|
-
VLocaleProvider: typeof import('vuetify/components')['VLocaleProvider']
|
|
2683
2683
|
VRadio: typeof import('vuetify/components')['VRadio']
|
|
2684
|
-
VRangeSlider: typeof import('vuetify/components')['VRangeSlider']
|
|
2685
2684
|
VResponsive: typeof import('vuetify/components')['VResponsive']
|
|
2685
|
+
VRangeSlider: typeof import('vuetify/components')['VRangeSlider']
|
|
2686
2686
|
VSparkline: typeof import('vuetify/components')['VSparkline']
|
|
2687
2687
|
VSnackbarQueue: typeof import('vuetify/components')['VSnackbarQueue']
|
|
2688
2688
|
VSpeedDial: typeof import('vuetify/components')['VSpeedDial']
|
|
2689
|
-
VValidation: typeof import('vuetify/components')['VValidation']
|
|
2690
2689
|
VThemeProvider: typeof import('vuetify/components')['VThemeProvider']
|
|
2690
|
+
VValidation: typeof import('vuetify/components')['VValidation']
|
|
2691
2691
|
VVirtualScroll: typeof import('vuetify/components')['VVirtualScroll']
|
|
2692
2692
|
VFabTransition: typeof import('vuetify/components')['VFabTransition']
|
|
2693
2693
|
VDialogBottomTransition: typeof import('vuetify/components')['VDialogBottomTransition']
|
|
@@ -2705,28 +2705,28 @@ declare module 'vue' {
|
|
|
2705
2705
|
VExpandTransition: typeof import('vuetify/components')['VExpandTransition']
|
|
2706
2706
|
VExpandXTransition: typeof import('vuetify/components')['VExpandXTransition']
|
|
2707
2707
|
VDialogTransition: typeof import('vuetify/components')['VDialogTransition']
|
|
2708
|
-
VColorInput: typeof import('vuetify/labs/components')['VColorInput']
|
|
2709
|
-
VFileUpload: typeof import('vuetify/labs/components')['VFileUpload']
|
|
2710
|
-
VFileUploadItem: typeof import('vuetify/labs/components')['VFileUploadItem']
|
|
2711
2708
|
VCalendar: typeof import('vuetify/labs/components')['VCalendar']
|
|
2712
2709
|
VCalendarDay: typeof import('vuetify/labs/components')['VCalendarDay']
|
|
2713
2710
|
VCalendarHeader: typeof import('vuetify/labs/components')['VCalendarHeader']
|
|
2714
2711
|
VCalendarInterval: typeof import('vuetify/labs/components')['VCalendarInterval']
|
|
2715
2712
|
VCalendarIntervalEvent: typeof import('vuetify/labs/components')['VCalendarIntervalEvent']
|
|
2716
2713
|
VCalendarMonthDay: typeof import('vuetify/labs/components')['VCalendarMonthDay']
|
|
2714
|
+
VColorInput: typeof import('vuetify/labs/components')['VColorInput']
|
|
2717
2715
|
VIconBtn: typeof import('vuetify/labs/components')['VIconBtn']
|
|
2718
|
-
|
|
2719
|
-
|
|
2716
|
+
VFileUpload: typeof import('vuetify/labs/components')['VFileUpload']
|
|
2717
|
+
VFileUploadItem: typeof import('vuetify/labs/components')['VFileUploadItem']
|
|
2720
2718
|
VStepperVertical: typeof import('vuetify/labs/components')['VStepperVertical']
|
|
2721
2719
|
VStepperVerticalItem: typeof import('vuetify/labs/components')['VStepperVerticalItem']
|
|
2722
2720
|
VStepperVerticalActions: typeof import('vuetify/labs/components')['VStepperVerticalActions']
|
|
2723
|
-
|
|
2724
|
-
|
|
2721
|
+
VPicker: typeof import('vuetify/labs/components')['VPicker']
|
|
2722
|
+
VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
|
|
2725
2723
|
VTreeview: typeof import('vuetify/labs/components')['VTreeview']
|
|
2726
2724
|
VTreeviewItem: typeof import('vuetify/labs/components')['VTreeviewItem']
|
|
2727
2725
|
VTreeviewGroup: typeof import('vuetify/labs/components')['VTreeviewGroup']
|
|
2728
2726
|
VTimePicker: typeof import('vuetify/labs/components')['VTimePicker']
|
|
2729
2727
|
VTimePickerClock: typeof import('vuetify/labs/components')['VTimePickerClock']
|
|
2730
2728
|
VTimePickerControls: typeof import('vuetify/labs/components')['VTimePickerControls']
|
|
2729
|
+
VDateInput: typeof import('vuetify/labs/components')['VDateInput']
|
|
2730
|
+
VPullToRefresh: typeof import('vuetify/labs/components')['VPullToRefresh']
|
|
2731
2731
|
}
|
|
2732
2732
|
}
|