vuetify 3.6.0-alpha.2 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_component-variables-labs.sass +2 -1
- package/dist/json/attributes.json +731 -63
- package/dist/json/importMap-labs.json +32 -20
- package/dist/json/importMap.json +138 -138
- package/dist/json/tags.json +184 -2
- package/dist/json/web-types.json +13002 -10923
- package/dist/vuetify-labs.css +2039 -1927
- package/dist/vuetify-labs.d.ts +3575 -1079
- package/dist/vuetify-labs.esm.js +1047 -390
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +1046 -389
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +3026 -2941
- package/dist/vuetify.d.ts +927 -306
- package/dist/vuetify.esm.js +625 -363
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +624 -362
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +728 -714
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAlert/VAlert.sass +128 -127
- package/lib/components/VApp/VApp.sass +15 -13
- package/lib/components/VAppBar/VAppBar.sass +9 -8
- package/lib/components/VAppBar/index.d.mts +10 -0
- package/lib/components/VAutocomplete/VAutocomplete.mjs +8 -10
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.sass +94 -93
- package/lib/components/VAutocomplete/index.d.mts +36 -0
- package/lib/components/VAvatar/VAvatar.sass +26 -25
- package/lib/components/VBadge/VBadge.sass +61 -60
- package/lib/components/VBanner/VBanner.css +1 -1
- package/lib/components/VBanner/VBanner.sass +92 -91
- package/lib/components/VBanner/index.d.mts +15 -0
- package/lib/components/VBottomNavigation/VBottomNavigation.sass +50 -49
- package/lib/components/VBottomSheet/VBottomSheet.sass +28 -26
- package/lib/components/VBottomSheet/index.d.mts +14 -0
- package/lib/components/VBreadcrumbs/VBreadcrumbs.css +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbs.sass +41 -40
- package/lib/components/VBtn/VBtn.css +3 -0
- package/lib/components/VBtn/VBtn.mjs +3 -1
- package/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/lib/components/VBtn/VBtn.sass +204 -200
- package/lib/components/VBtn/index.d.mts +10 -0
- package/lib/components/VBtnGroup/VBtnGroup.sass +47 -46
- package/lib/components/VBtnToggle/VBtnToggle.sass +4 -3
- package/lib/components/VBtnToggle/index.d.mts +1 -0
- package/lib/components/VCard/VCard.css +3 -3
- package/lib/components/VCard/VCard.sass +181 -180
- package/lib/components/VCarousel/VCarousel.sass +50 -49
- package/lib/components/VCarousel/VCarouselItem.mjs +1 -1
- package/lib/components/VCarousel/VCarouselItem.mjs.map +1 -1
- package/lib/components/VCarousel/index.d.mts +1 -0
- package/lib/components/VCheckbox/VCheckbox.sass +6 -5
- package/lib/components/VChip/VChip.css +1 -1
- package/lib/components/VChip/VChip.sass +78 -76
- package/lib/components/VChipGroup/VChipGroup.sass +20 -18
- package/lib/components/VChipGroup/index.d.mts +16 -0
- package/lib/components/VCode/VCode.sass +10 -8
- package/lib/components/VColorPicker/VColorPicker.sass +18 -17
- package/lib/components/VColorPicker/VColorPickerCanvas.sass +21 -20
- package/lib/components/VColorPicker/VColorPickerEdit.sass +24 -23
- package/lib/components/VColorPicker/VColorPickerPreview.sass +54 -53
- package/lib/components/VColorPicker/VColorPickerSwatches.sass +29 -28
- package/lib/components/VCombobox/VCombobox.mjs +8 -10
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/VCombobox.sass +94 -93
- package/lib/components/VCombobox/index.d.mts +36 -0
- package/lib/components/VCounter/VCounter.sass +7 -5
- package/lib/components/VDataIterator/index.d.mts +2 -0
- package/lib/components/VDataTable/VDataTable.css +36 -1
- package/lib/components/VDataTable/VDataTable.sass +137 -103
- package/lib/components/VDataTable/VDataTableFooter.css +5 -9
- package/lib/components/VDataTable/VDataTableFooter.sass +26 -25
- package/lib/components/VDataTable/VDataTableHeaders.mjs +66 -7
- package/lib/components/VDataTable/VDataTableHeaders.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTableRow.mjs +45 -10
- package/lib/components/VDataTable/VDataTableRow.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTableRows.mjs +8 -2
- package/lib/components/VDataTable/VDataTableRows.mjs.map +1 -1
- package/lib/components/VDataTable/_variables.scss +9 -3
- package/lib/components/VDataTable/index.d.mts +263 -217
- package/lib/components/VDataTable/types.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.mjs +12 -2
- package/lib/components/VDatePicker/VDatePicker.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.sass +6 -5
- package/lib/components/VDatePicker/VDatePickerControls.sass +56 -55
- package/lib/components/VDatePicker/VDatePickerHeader.sass +58 -56
- package/lib/components/VDatePicker/VDatePickerMonth.sass +53 -51
- package/lib/components/VDatePicker/VDatePickerMonths.sass +18 -16
- package/lib/components/VDatePicker/VDatePickerYears.sass +14 -12
- package/lib/components/VDialog/VDialog.css +7 -3
- package/lib/components/VDialog/VDialog.mjs +6 -2
- package/lib/components/VDialog/VDialog.mjs.map +1 -1
- package/lib/components/VDialog/VDialog.sass +71 -68
- package/lib/components/VDialog/__test__/VDialog.spec.cy.mjs +39 -0
- package/lib/components/VDialog/__test__/VDialog.spec.cy.mjs.map +1 -0
- package/lib/components/VDialog/_variables.scss +4 -3
- package/lib/components/VDialog/index.d.mts +60 -10
- package/lib/components/VDivider/VDivider.sass +49 -48
- package/lib/components/VExpansionPanel/VExpansionPanel.sass +172 -171
- package/lib/components/VField/VField.sass +451 -450
- package/lib/components/VFileInput/VFileInput.mjs +1 -1
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/VFileInput.sass +30 -31
- package/lib/components/VFileInput/index.d.mts +17 -5
- package/lib/components/VFooter/VFooter.sass +17 -16
- package/lib/components/VGrid/VGrid.sass +42 -40
- package/lib/components/VIcon/VIcon.sass +34 -32
- package/lib/components/VImg/VImg.sass +24 -23
- package/lib/components/VInfiniteScroll/VInfiniteScroll.sass +21 -19
- package/lib/components/VInput/VInput.mjs +6 -1
- package/lib/components/VInput/VInput.mjs.map +1 -1
- package/lib/components/VInput/VInput.sass +103 -102
- package/lib/components/VInput/index.d.mts +6 -0
- package/lib/components/VItemGroup/VItemGroup.sass +7 -5
- package/lib/components/VKbd/VKbd.sass +10 -9
- package/lib/components/VLabel/VLabel.sass +14 -13
- package/lib/components/VLayout/VLayout.mjs +6 -1
- package/lib/components/VLayout/VLayout.mjs.map +1 -1
- package/lib/components/VLayout/VLayout.sass +10 -7
- package/lib/components/VLayout/VLayoutItem.sass +7 -5
- package/lib/components/VLayout/index.d.mts +36 -0
- package/lib/components/VList/VList.mjs +2 -1
- package/lib/components/VList/VList.mjs.map +1 -1
- package/lib/components/VList/VList.sass +81 -80
- package/lib/components/VList/VListItem.css +1 -1
- package/lib/components/VList/VListItem.sass +260 -259
- package/lib/components/VLocaleProvider/VLocaleProvider.sass +5 -2
- package/lib/components/VMain/VMain.sass +22 -21
- package/lib/components/VMenu/VMenu.sass +14 -13
- package/lib/components/VMenu/index.d.mts +56 -0
- package/lib/components/VMessages/VMessages.sass +16 -15
- package/lib/components/VNavigationDrawer/VNavigationDrawer.css +4 -0
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +14 -5
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.sass +90 -84
- package/lib/components/VNavigationDrawer/index.d.mts +24 -0
- package/lib/components/VNavigationDrawer/touch.mjs +16 -2
- package/lib/components/VNavigationDrawer/touch.mjs.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.sass +51 -50
- package/lib/components/VOverlay/VOverlay.mjs +2 -2
- package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/lib/components/VOverlay/VOverlay.sass +57 -55
- package/lib/components/VOverlay/index.d.mts +27 -13
- package/lib/components/VOverlay/useActivator.mjs.map +1 -1
- package/lib/components/VPagination/VPagination.sass +14 -12
- package/lib/components/VParallax/VParallax.sass +8 -5
- package/lib/components/VProgressCircular/VProgressCircular.sass +85 -83
- package/lib/components/VProgressLinear/VProgressLinear.mjs +11 -1
- package/lib/components/VProgressLinear/VProgressLinear.mjs.map +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.sass +170 -169
- package/lib/components/VProgressLinear/index.d.mts +21 -0
- package/lib/components/VRadioGroup/VRadioGroup.sass +12 -10
- package/lib/components/VRangeSlider/index.d.mts +6 -0
- package/lib/components/VRating/VRating.sass +46 -44
- package/lib/components/VResponsive/VResponsive.sass +21 -19
- package/lib/components/VSelect/VSelect.mjs +5 -1
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/VSelect.sass +50 -49
- package/lib/components/VSelect/index.d.mts +36 -0
- package/lib/components/VSelectionControl/VSelectionControl.sass +87 -86
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.sass +9 -7
- package/lib/components/VSheet/VSheet.sass +10 -9
- package/lib/components/VSkeletonLoader/VSkeletonLoader.sass +174 -173
- package/lib/components/VSlideGroup/VSlideGroup.css +14 -1
- package/lib/components/VSlideGroup/VSlideGroup.mjs +110 -93
- package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroup.sass +54 -40
- package/lib/components/VSlideGroup/helpers.mjs +48 -28
- package/lib/components/VSlideGroup/helpers.mjs.map +1 -1
- package/lib/components/VSlideGroup/index.d.mts +16 -0
- package/lib/components/VSlider/VSlider.sass +49 -48
- package/lib/components/VSlider/VSliderThumb.sass +129 -128
- package/lib/components/VSlider/VSliderTrack.sass +120 -119
- package/lib/components/VSlider/index.d.mts +6 -0
- package/lib/components/VSnackbar/VSnackbar.css +18 -1
- package/lib/components/VSnackbar/VSnackbar.mjs +34 -9
- package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.sass +103 -83
- package/lib/components/VSnackbar/index.d.mts +42 -0
- package/lib/components/VStepper/VStepper.sass +37 -36
- package/lib/components/VStepper/VStepperItem.sass +69 -67
- package/lib/components/VSwitch/VSwitch.css +14 -2
- package/lib/components/VSwitch/VSwitch.sass +119 -112
- package/lib/components/VSystemBar/VSystemBar.css +1 -1
- package/lib/components/VSystemBar/VSystemBar.sass +24 -23
- package/lib/components/VTable/VTable.sass +140 -139
- package/lib/components/VTabs/VTab.sass +27 -25
- package/lib/components/VTabs/VTabs.sass +38 -37
- package/lib/components/VTabs/index.d.mts +49 -6
- package/lib/components/VTextField/VTextField.sass +58 -56
- package/lib/components/VTextField/index.d.mts +15 -3
- package/lib/components/VTextarea/VTextarea.sass +43 -42
- package/lib/components/VTextarea/index.d.mts +15 -3
- package/lib/components/VThemeProvider/VThemeProvider.sass +6 -3
- package/lib/components/VTimeline/VTimeline.sass +308 -307
- package/lib/components/VToolbar/VToolbar.sass +90 -89
- package/lib/components/VTooltip/VTooltip.sass +23 -21
- package/lib/components/VTooltip/index.d.mts +56 -0
- package/lib/components/VVirtualScroll/VVirtualScroll.sass +10 -7
- package/lib/components/VWindow/VWindow.css +1 -0
- package/lib/components/VWindow/VWindow.sass +74 -70
- package/lib/components/VWindow/index.d.mts +1 -0
- package/lib/components/index.d.mts +870 -253
- package/lib/composables/directiveComponent.mjs +4 -2
- package/lib/composables/directiveComponent.mjs.map +1 -1
- package/lib/composables/display.mjs +5 -0
- package/lib/composables/display.mjs.map +1 -1
- package/lib/composables/goto.mjs +40 -3
- package/lib/composables/goto.mjs.map +1 -1
- package/lib/composables/group.mjs +10 -1
- package/lib/composables/group.mjs.map +1 -1
- package/lib/composables/layout.mjs +3 -1
- package/lib/composables/layout.mjs.map +1 -1
- package/lib/directives/ripple/VRipple.sass +35 -33
- package/lib/entry-bundler.mjs +1 -1
- package/lib/entry-bundler.mjs.map +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/framework.mjs.map +1 -1
- package/lib/index.d.mts +58 -54
- package/lib/labs/VCalendar/VCalendar.sass +160 -158
- package/lib/labs/VCalendar/VCalendarDay.sass +26 -23
- package/lib/labs/VCalendar/VCalendarHeader.sass +12 -10
- package/lib/labs/VCalendar/VCalendarInterval.sass +36 -34
- package/lib/labs/VCalendar/VCalendarIntervalEvent.sass +9 -6
- package/lib/labs/VCalendar/VCalendarMonthDay.sass +59 -57
- package/lib/labs/VDateInput/VDateInput.mjs +129 -0
- package/lib/labs/VDateInput/VDateInput.mjs.map +1 -0
- package/lib/labs/VDateInput/index.d.mts +1068 -0
- package/lib/labs/VDateInput/index.mjs +2 -0
- package/lib/labs/VDateInput/index.mjs.map +1 -0
- package/lib/labs/VEmptyState/VEmptyState.css +3 -3
- package/lib/labs/VEmptyState/VEmptyState.sass +59 -57
- package/lib/labs/VFab/VFab.css +1 -0
- package/lib/labs/VFab/VFab.mjs +3 -2
- package/lib/labs/VFab/VFab.mjs.map +1 -1
- package/lib/labs/VFab/VFab.sass +62 -60
- package/lib/labs/VFab/index.d.mts +19 -0
- package/lib/labs/VNumberInput/VNumberInput.mjs +79 -24
- package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
- package/lib/labs/VNumberInput/VNumberInput.sass +42 -40
- package/lib/labs/VNumberInput/index.d.mts +56 -29
- package/lib/labs/VPicker/VPicker.sass +49 -48
- package/lib/labs/VPullToRefresh/VPullToRefresh.css +27 -0
- package/lib/labs/VPullToRefresh/VPullToRefresh.mjs +117 -0
- package/lib/labs/VPullToRefresh/VPullToRefresh.mjs.map +1 -0
- package/lib/labs/VPullToRefresh/VPullToRefresh.sass +23 -0
- package/lib/labs/VPullToRefresh/index.d.mts +189 -0
- package/lib/labs/VPullToRefresh/index.mjs +2 -0
- package/lib/labs/VPullToRefresh/index.mjs.map +1 -0
- package/lib/labs/VSnackbarQueue/VSnackbarQueue.mjs +112 -0
- package/lib/labs/VSnackbarQueue/VSnackbarQueue.mjs.map +1 -0
- package/lib/labs/VSnackbarQueue/index.d.mts +2763 -0
- package/lib/labs/VSnackbarQueue/index.mjs +2 -0
- package/lib/labs/VSnackbarQueue/index.mjs.map +1 -0
- package/lib/labs/VSpeedDial/VSpeedDial.mjs +8 -2
- package/lib/labs/VSpeedDial/VSpeedDial.mjs.map +1 -1
- package/lib/labs/VSpeedDial/VSpeedDial.sass +23 -20
- package/lib/labs/VSpeedDial/index.d.mts +28 -2
- package/lib/labs/VTimePicker/VTimePicker.sass +9 -8
- package/lib/labs/VTimePicker/VTimePickerClock.mjs +1 -3
- package/lib/labs/VTimePicker/VTimePickerClock.mjs.map +1 -1
- package/lib/labs/VTimePicker/VTimePickerClock.sass +114 -113
- package/lib/labs/VTimePicker/VTimePickerControls.sass +90 -90
- package/lib/labs/VTimePicker/_variables.scss +1 -1
- package/lib/labs/VTimePicker/index.d.mts +6 -13
- package/lib/labs/VTreeview/VTreeviewItem.sass +14 -12
- package/lib/labs/VTreeview/{variables.scss → _variables.scss} +0 -2
- package/lib/labs/components.d.mts +5587 -1641
- package/lib/labs/components.mjs +3 -0
- package/lib/labs/components.mjs.map +1 -1
- package/lib/locale/af.mjs +1 -0
- package/lib/locale/af.mjs.map +1 -1
- package/lib/locale/ar.mjs +1 -0
- package/lib/locale/ar.mjs.map +1 -1
- package/lib/locale/az.mjs +1 -0
- package/lib/locale/az.mjs.map +1 -1
- package/lib/locale/bg.mjs +1 -0
- package/lib/locale/bg.mjs.map +1 -1
- package/lib/locale/ca.mjs +1 -0
- package/lib/locale/ca.mjs.map +1 -1
- package/lib/locale/ckb.mjs +1 -0
- package/lib/locale/ckb.mjs.map +1 -1
- package/lib/locale/cs.mjs +1 -0
- package/lib/locale/cs.mjs.map +1 -1
- package/lib/locale/da.mjs +1 -0
- package/lib/locale/da.mjs.map +1 -1
- package/lib/locale/de.mjs +1 -0
- package/lib/locale/de.mjs.map +1 -1
- package/lib/locale/el.mjs +1 -0
- package/lib/locale/el.mjs.map +1 -1
- package/lib/locale/en.mjs +1 -0
- package/lib/locale/en.mjs.map +1 -1
- package/lib/locale/es.mjs +1 -0
- package/lib/locale/es.mjs.map +1 -1
- package/lib/locale/et.mjs +1 -0
- package/lib/locale/et.mjs.map +1 -1
- package/lib/locale/fa.mjs +1 -0
- package/lib/locale/fa.mjs.map +1 -1
- package/lib/locale/fi.mjs +1 -0
- package/lib/locale/fi.mjs.map +1 -1
- package/lib/locale/fr.mjs +1 -0
- package/lib/locale/fr.mjs.map +1 -1
- package/lib/locale/he.mjs +1 -0
- package/lib/locale/he.mjs.map +1 -1
- package/lib/locale/hr.mjs +1 -0
- package/lib/locale/hr.mjs.map +1 -1
- package/lib/locale/hu.mjs +1 -0
- package/lib/locale/hu.mjs.map +1 -1
- package/lib/locale/id.mjs +1 -0
- package/lib/locale/id.mjs.map +1 -1
- package/lib/locale/index.d.mts +43 -0
- package/lib/locale/it.mjs +1 -0
- package/lib/locale/it.mjs.map +1 -1
- package/lib/locale/ja.mjs +1 -0
- package/lib/locale/ja.mjs.map +1 -1
- package/lib/locale/km.mjs +1 -0
- package/lib/locale/km.mjs.map +1 -1
- package/lib/locale/ko.mjs +9 -8
- package/lib/locale/ko.mjs.map +1 -1
- package/lib/locale/lt.mjs +1 -0
- package/lib/locale/lt.mjs.map +1 -1
- package/lib/locale/lv.mjs +1 -0
- package/lib/locale/lv.mjs.map +1 -1
- package/lib/locale/nl.mjs +1 -0
- package/lib/locale/nl.mjs.map +1 -1
- package/lib/locale/no.mjs +1 -0
- package/lib/locale/no.mjs.map +1 -1
- package/lib/locale/pl.mjs +1 -0
- package/lib/locale/pl.mjs.map +1 -1
- package/lib/locale/pt.mjs +1 -0
- package/lib/locale/pt.mjs.map +1 -1
- package/lib/locale/ro.mjs +1 -0
- package/lib/locale/ro.mjs.map +1 -1
- package/lib/locale/ru.mjs +1 -0
- package/lib/locale/ru.mjs.map +1 -1
- package/lib/locale/sk.mjs +1 -0
- package/lib/locale/sk.mjs.map +1 -1
- package/lib/locale/sl.mjs +1 -0
- package/lib/locale/sl.mjs.map +1 -1
- package/lib/locale/sr-Cyrl.mjs +1 -0
- package/lib/locale/sr-Cyrl.mjs.map +1 -1
- package/lib/locale/sr-Latn.mjs +1 -0
- package/lib/locale/sr-Latn.mjs.map +1 -1
- package/lib/locale/sv.mjs +1 -0
- package/lib/locale/sv.mjs.map +1 -1
- package/lib/locale/th.mjs +1 -0
- package/lib/locale/th.mjs.map +1 -1
- package/lib/locale/tr.mjs +1 -0
- package/lib/locale/tr.mjs.map +1 -1
- package/lib/locale/uk.mjs +1 -0
- package/lib/locale/uk.mjs.map +1 -1
- package/lib/locale/vi.mjs +1 -0
- package/lib/locale/vi.mjs.map +1 -1
- package/lib/locale/zh-Hans.mjs +1 -0
- package/lib/locale/zh-Hans.mjs.map +1 -1
- package/lib/locale/zh-Hant.mjs +1 -0
- package/lib/locale/zh-Hant.mjs.map +1 -1
- package/lib/styles/elements/_blockquote.sass +6 -4
- package/lib/styles/elements/_global.sass +20 -18
- package/lib/styles/generic/_animations.scss +13 -9
- package/lib/styles/generic/_colors.scss +36 -35
- package/lib/styles/generic/_index.scss +1 -0
- package/lib/styles/generic/_layers.scss +7 -0
- package/lib/styles/generic/_reset.scss +235 -232
- package/lib/styles/generic/_rtl.scss +10 -6
- package/lib/styles/generic/_transitions.scss +244 -241
- package/lib/styles/main.css +78 -78
- package/lib/styles/settings/_variables.scss +22 -14
- package/lib/styles/tools/_index.sass +1 -0
- package/lib/styles/tools/_layer.scss +11 -0
- package/lib/styles/utilities/_display.sass +7 -5
- package/lib/styles/utilities/_elevation.scss +8 -6
- package/lib/styles/utilities/_index.sass +28 -29
- package/lib/styles/utilities/_screenreaders.sass +13 -11
- package/package.json +2 -2
package/dist/vuetify-labs.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.6.0
|
|
2
|
+
* Vuetify v3.6.0
|
|
3
3
|
* Forged by John Leider
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { Fragment, reactive, computed, watchEffect, toRefs, capitalize, isVNode, Comment, shallowRef, readonly, unref, warn, ref, provide, inject as inject$1, defineComponent as defineComponent$1, camelize, h, getCurrentInstance as getCurrentInstance$1, onBeforeUnmount, watch, nextTick, onDeactivated, onActivated, onScopeDispose, effectScope, toRaw, createVNode, Suspense, TransitionGroup, Transition, mergeProps, isRef, toRef, onBeforeMount, withDirectives, resolveDirective, vShow, onMounted, Text, resolveDynamicComponent, markRaw, Teleport, cloneVNode, createTextVNode, onUnmounted, onBeforeUpdate, withModifiers, toDisplayString, vModelText, resolveComponent, render } from 'vue';
|
|
7
|
+
import { Fragment, reactive, computed, watchEffect, toRefs, capitalize, isVNode, Comment, shallowRef, readonly, unref, warn, ref, provide, inject as inject$1, defineComponent as defineComponent$1, camelize, h, getCurrentInstance as getCurrentInstance$1, onBeforeUnmount, watch, nextTick, onDeactivated, onActivated, onScopeDispose, effectScope, toRaw, createVNode, Suspense, TransitionGroup, Transition, mergeProps, isRef, toRef, onBeforeMount, withDirectives, resolveDirective, vShow, onMounted, onUpdated, Text, resolveDynamicComponent, markRaw, Teleport, cloneVNode, createTextVNode, onUnmounted, onBeforeUpdate, withModifiers, toDisplayString, vModelText, resolveComponent, render } from 'vue';
|
|
8
8
|
|
|
9
9
|
// Types
|
|
10
10
|
// eslint-disable-line vue/prefer-import-from-vue
|
|
@@ -1779,10 +1779,12 @@ function createLayout(props) {
|
|
|
1779
1779
|
const isHorizontal = position.value === 'left' || position.value === 'right';
|
|
1780
1780
|
const isOppositeHorizontal = position.value === 'right';
|
|
1781
1781
|
const isOppositeVertical = position.value === 'bottom';
|
|
1782
|
+
const size = elementSize.value ?? layoutSize.value;
|
|
1783
|
+
const unit = size === 0 ? '%' : 'px';
|
|
1782
1784
|
const styles = {
|
|
1783
1785
|
[position.value]: 0,
|
|
1784
1786
|
zIndex: zIndex.value,
|
|
1785
|
-
transform: `translate${isHorizontal ? 'X' : 'Y'}(${(active.value ? 0 : -(
|
|
1787
|
+
transform: `translate${isHorizontal ? 'X' : 'Y'}(${(active.value ? 0 : -(size === 0 ? 100 : size)) * (isOppositeHorizontal || isOppositeVertical ? -1 : 1)}${unit})`,
|
|
1786
1788
|
position: absolute.value || rootZIndex.value !== ROOT_ZINDEX ? 'absolute' : 'fixed',
|
|
1787
1789
|
...(transitionsEnabled.value ? undefined : {
|
|
1788
1790
|
transition: 'none'
|
|
@@ -1922,6 +1924,7 @@ var en = {
|
|
|
1922
1924
|
badge: 'Badge',
|
|
1923
1925
|
open: 'Open',
|
|
1924
1926
|
close: 'Close',
|
|
1927
|
+
dismiss: 'Dismiss',
|
|
1925
1928
|
confirmEdit: {
|
|
1926
1929
|
ok: 'OK',
|
|
1927
1930
|
cancel: 'Cancel'
|
|
@@ -4152,6 +4155,7 @@ function useGroup(props, injectKey) {
|
|
|
4152
4155
|
const index = children.indexOf(vm);
|
|
4153
4156
|
if (unref(unwrapped.value) == null) {
|
|
4154
4157
|
unwrapped.value = index;
|
|
4158
|
+
unwrapped.useIndexAsValue = true;
|
|
4155
4159
|
}
|
|
4156
4160
|
if (index > -1) {
|
|
4157
4161
|
items.splice(index, 0, unwrapped);
|
|
@@ -4184,6 +4188,14 @@ function useGroup(props, injectKey) {
|
|
|
4184
4188
|
onBeforeUnmount(() => {
|
|
4185
4189
|
isUnmounted = true;
|
|
4186
4190
|
});
|
|
4191
|
+
onUpdated(() => {
|
|
4192
|
+
// #19655 update the items that use the index as the value.
|
|
4193
|
+
for (let i = 0; i < items.length; i++) {
|
|
4194
|
+
if (items[i].useIndexAsValue) {
|
|
4195
|
+
items[i].value = i;
|
|
4196
|
+
}
|
|
4197
|
+
}
|
|
4198
|
+
});
|
|
4187
4199
|
function select(id, value) {
|
|
4188
4200
|
const item = items.find(item => item.id === id);
|
|
4189
4201
|
if (value && item?.disabled) return;
|
|
@@ -4773,6 +4785,65 @@ const VProgressCircular = genericComponent()({
|
|
|
4773
4785
|
}
|
|
4774
4786
|
});
|
|
4775
4787
|
|
|
4788
|
+
// Composables
|
|
4789
|
+
|
|
4790
|
+
// Types
|
|
4791
|
+
|
|
4792
|
+
const oppositeMap = {
|
|
4793
|
+
center: 'center',
|
|
4794
|
+
top: 'bottom',
|
|
4795
|
+
bottom: 'top',
|
|
4796
|
+
left: 'right',
|
|
4797
|
+
right: 'left'
|
|
4798
|
+
};
|
|
4799
|
+
const makeLocationProps = propsFactory({
|
|
4800
|
+
location: String
|
|
4801
|
+
}, 'location');
|
|
4802
|
+
function useLocation(props) {
|
|
4803
|
+
let opposite = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
4804
|
+
let offset = arguments.length > 2 ? arguments[2] : undefined;
|
|
4805
|
+
const {
|
|
4806
|
+
isRtl
|
|
4807
|
+
} = useRtl();
|
|
4808
|
+
const locationStyles = computed(() => {
|
|
4809
|
+
if (!props.location) return {};
|
|
4810
|
+
const {
|
|
4811
|
+
side,
|
|
4812
|
+
align
|
|
4813
|
+
} = parseAnchor(props.location.split(' ').length > 1 ? props.location : `${props.location} center`, isRtl.value);
|
|
4814
|
+
function getOffset(side) {
|
|
4815
|
+
return offset ? offset(side) : 0;
|
|
4816
|
+
}
|
|
4817
|
+
const styles = {};
|
|
4818
|
+
if (side !== 'center') {
|
|
4819
|
+
if (opposite) styles[oppositeMap[side]] = `calc(100% - ${getOffset(side)}px)`;else styles[side] = 0;
|
|
4820
|
+
}
|
|
4821
|
+
if (align !== 'center') {
|
|
4822
|
+
if (opposite) styles[oppositeMap[align]] = `calc(100% - ${getOffset(align)}px)`;else styles[align] = 0;
|
|
4823
|
+
} else {
|
|
4824
|
+
if (side === 'center') styles.top = styles.left = '50%';else {
|
|
4825
|
+
styles[{
|
|
4826
|
+
top: 'left',
|
|
4827
|
+
bottom: 'left',
|
|
4828
|
+
left: 'top',
|
|
4829
|
+
right: 'top'
|
|
4830
|
+
}[side]] = '50%';
|
|
4831
|
+
}
|
|
4832
|
+
styles.transform = {
|
|
4833
|
+
top: 'translateX(-50%)',
|
|
4834
|
+
bottom: 'translateX(-50%)',
|
|
4835
|
+
left: 'translateY(-50%)',
|
|
4836
|
+
right: 'translateY(-50%)',
|
|
4837
|
+
center: 'translate(-50%, -50%)'
|
|
4838
|
+
}[side];
|
|
4839
|
+
}
|
|
4840
|
+
return styles;
|
|
4841
|
+
});
|
|
4842
|
+
return {
|
|
4843
|
+
locationStyles
|
|
4844
|
+
};
|
|
4845
|
+
}
|
|
4846
|
+
|
|
4776
4847
|
const makeVProgressLinearProps = propsFactory({
|
|
4777
4848
|
absolute: Boolean,
|
|
4778
4849
|
active: {
|
|
@@ -4808,6 +4879,9 @@ const makeVProgressLinearProps = propsFactory({
|
|
|
4808
4879
|
striped: Boolean,
|
|
4809
4880
|
roundedBar: Boolean,
|
|
4810
4881
|
...makeComponentProps(),
|
|
4882
|
+
...makeLocationProps({
|
|
4883
|
+
location: 'top'
|
|
4884
|
+
}),
|
|
4811
4885
|
...makeRoundedProps(),
|
|
4812
4886
|
...makeTagProps(),
|
|
4813
4887
|
...makeThemeProps()
|
|
@@ -4830,6 +4904,9 @@ const VProgressLinear = genericComponent()({
|
|
|
4830
4904
|
const {
|
|
4831
4905
|
themeClasses
|
|
4832
4906
|
} = provideTheme(props);
|
|
4907
|
+
const {
|
|
4908
|
+
locationStyles
|
|
4909
|
+
} = useLocation(props);
|
|
4833
4910
|
const {
|
|
4834
4911
|
textColorClasses,
|
|
4835
4912
|
textColorStyles
|
|
@@ -4880,8 +4957,11 @@ const VProgressLinear = genericComponent()({
|
|
|
4880
4957
|
'v-progress-linear--striped': props.striped
|
|
4881
4958
|
}, roundedClasses.value, themeClasses.value, rtlClasses.value, props.class],
|
|
4882
4959
|
"style": [{
|
|
4960
|
+
bottom: props.location === 'bottom' ? 0 : undefined,
|
|
4961
|
+
top: props.location === 'top' ? 0 : undefined,
|
|
4883
4962
|
height: props.active ? convertToUnit(height.value) : 0,
|
|
4884
|
-
'--v-progress-linear-height': convertToUnit(height.value)
|
|
4963
|
+
'--v-progress-linear-height': convertToUnit(height.value),
|
|
4964
|
+
...(props.absolute ? locationStyles.value : {})
|
|
4885
4965
|
}, props.style],
|
|
4886
4966
|
"role": "progressbar",
|
|
4887
4967
|
"aria-hidden": props.active ? 'false' : 'true',
|
|
@@ -4973,65 +5053,6 @@ function LoaderSlot(props, _ref) {
|
|
|
4973
5053
|
}, null)]);
|
|
4974
5054
|
}
|
|
4975
5055
|
|
|
4976
|
-
// Composables
|
|
4977
|
-
|
|
4978
|
-
// Types
|
|
4979
|
-
|
|
4980
|
-
const oppositeMap = {
|
|
4981
|
-
center: 'center',
|
|
4982
|
-
top: 'bottom',
|
|
4983
|
-
bottom: 'top',
|
|
4984
|
-
left: 'right',
|
|
4985
|
-
right: 'left'
|
|
4986
|
-
};
|
|
4987
|
-
const makeLocationProps = propsFactory({
|
|
4988
|
-
location: String
|
|
4989
|
-
}, 'location');
|
|
4990
|
-
function useLocation(props) {
|
|
4991
|
-
let opposite = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
4992
|
-
let offset = arguments.length > 2 ? arguments[2] : undefined;
|
|
4993
|
-
const {
|
|
4994
|
-
isRtl
|
|
4995
|
-
} = useRtl();
|
|
4996
|
-
const locationStyles = computed(() => {
|
|
4997
|
-
if (!props.location) return {};
|
|
4998
|
-
const {
|
|
4999
|
-
side,
|
|
5000
|
-
align
|
|
5001
|
-
} = parseAnchor(props.location.split(' ').length > 1 ? props.location : `${props.location} center`, isRtl.value);
|
|
5002
|
-
function getOffset(side) {
|
|
5003
|
-
return offset ? offset(side) : 0;
|
|
5004
|
-
}
|
|
5005
|
-
const styles = {};
|
|
5006
|
-
if (side !== 'center') {
|
|
5007
|
-
if (opposite) styles[oppositeMap[side]] = `calc(100% - ${getOffset(side)}px)`;else styles[side] = 0;
|
|
5008
|
-
}
|
|
5009
|
-
if (align !== 'center') {
|
|
5010
|
-
if (opposite) styles[oppositeMap[align]] = `calc(100% - ${getOffset(align)}px)`;else styles[align] = 0;
|
|
5011
|
-
} else {
|
|
5012
|
-
if (side === 'center') styles.top = styles.left = '50%';else {
|
|
5013
|
-
styles[{
|
|
5014
|
-
top: 'left',
|
|
5015
|
-
bottom: 'left',
|
|
5016
|
-
left: 'top',
|
|
5017
|
-
right: 'top'
|
|
5018
|
-
}[side]] = '50%';
|
|
5019
|
-
}
|
|
5020
|
-
styles.transform = {
|
|
5021
|
-
top: 'translateX(-50%)',
|
|
5022
|
-
bottom: 'translateX(-50%)',
|
|
5023
|
-
left: 'translateY(-50%)',
|
|
5024
|
-
right: 'translateY(-50%)',
|
|
5025
|
-
center: 'translate(-50%, -50%)'
|
|
5026
|
-
}[side];
|
|
5027
|
-
}
|
|
5028
|
-
return styles;
|
|
5029
|
-
});
|
|
5030
|
-
return {
|
|
5031
|
-
locationStyles
|
|
5032
|
-
};
|
|
5033
|
-
}
|
|
5034
|
-
|
|
5035
5056
|
// Utilities
|
|
5036
5057
|
|
|
5037
5058
|
// Types
|
|
@@ -5459,6 +5480,7 @@ const makeVBtnProps = propsFactory({
|
|
|
5459
5480
|
prependIcon: IconValue,
|
|
5460
5481
|
appendIcon: IconValue,
|
|
5461
5482
|
block: Boolean,
|
|
5483
|
+
readonly: Boolean,
|
|
5462
5484
|
slim: Boolean,
|
|
5463
5485
|
stacked: Boolean,
|
|
5464
5486
|
ripple: {
|
|
@@ -5580,6 +5602,7 @@ const VBtn = genericComponent()({
|
|
|
5580
5602
|
'v-btn--flat': props.flat,
|
|
5581
5603
|
'v-btn--icon': !!props.icon,
|
|
5582
5604
|
'v-btn--loading': props.loading,
|
|
5605
|
+
'v-btn--readonly': props.readonly,
|
|
5583
5606
|
'v-btn--slim': props.slim,
|
|
5584
5607
|
'v-btn--stacked': props.stacked
|
|
5585
5608
|
}, themeClasses.value, borderClasses.value, colorClasses.value, densityClasses.value, elevationClasses.value, loaderClasses.value, positionClasses.value, roundedClasses.value, sizeClasses.value, variantClasses.value, props.class],
|
|
@@ -5587,7 +5610,7 @@ const VBtn = genericComponent()({
|
|
|
5587
5610
|
"aria-busy": props.loading ? true : undefined,
|
|
5588
5611
|
"disabled": isDisabled.value || undefined,
|
|
5589
5612
|
"href": link.href.value,
|
|
5590
|
-
"tabindex": props.loading ? -1 : undefined,
|
|
5613
|
+
"tabindex": props.loading || props.readonly ? -1 : undefined,
|
|
5591
5614
|
"onClick": onClick,
|
|
5592
5615
|
"value": valueAttr.value
|
|
5593
5616
|
}, {
|
|
@@ -6758,6 +6781,7 @@ const makeVInputProps = propsFactory({
|
|
|
6758
6781
|
...makeComponentProps(),
|
|
6759
6782
|
...makeDensityProps(),
|
|
6760
6783
|
...only(makeDimensionProps(), ['maxWidth', 'minWidth', 'width']),
|
|
6784
|
+
...makeThemeProps(),
|
|
6761
6785
|
...makeValidationProps()
|
|
6762
6786
|
}, 'VInput');
|
|
6763
6787
|
const VInput = genericComponent()({
|
|
@@ -6780,6 +6804,9 @@ const VInput = genericComponent()({
|
|
|
6780
6804
|
const {
|
|
6781
6805
|
dimensionStyles
|
|
6782
6806
|
} = useDimension(props);
|
|
6807
|
+
const {
|
|
6808
|
+
themeClasses
|
|
6809
|
+
} = provideTheme(props);
|
|
6783
6810
|
const {
|
|
6784
6811
|
rtlClasses
|
|
6785
6812
|
} = useRtl();
|
|
@@ -6833,7 +6860,7 @@ const VInput = genericComponent()({
|
|
|
6833
6860
|
"class": ['v-input', `v-input--${props.direction}`, {
|
|
6834
6861
|
'v-input--center-affix': props.centerAffix,
|
|
6835
6862
|
'v-input--hide-spin-buttons': props.hideSpinButtons
|
|
6836
|
-
}, densityClasses.value, rtlClasses.value, validationClasses.value, props.class],
|
|
6863
|
+
}, densityClasses.value, themeClasses.value, rtlClasses.value, validationClasses.value, props.class],
|
|
6837
6864
|
"style": [dimensionStyles.value, props.style]
|
|
6838
6865
|
}, [hasPrepend && createVNode("div", {
|
|
6839
6866
|
"key": "prepend",
|
|
@@ -7060,6 +7087,10 @@ function createDisplay(options, ssr) {
|
|
|
7060
7087
|
};
|
|
7061
7088
|
}
|
|
7062
7089
|
const makeDisplayProps = propsFactory({
|
|
7090
|
+
mobile: {
|
|
7091
|
+
type: Boolean,
|
|
7092
|
+
default: null
|
|
7093
|
+
},
|
|
7063
7094
|
mobileBreakpoint: [Number, String]
|
|
7064
7095
|
}, 'display');
|
|
7065
7096
|
function useDisplay() {
|
|
@@ -7068,6 +7099,7 @@ function useDisplay() {
|
|
|
7068
7099
|
const display = inject$1(DisplaySymbol);
|
|
7069
7100
|
if (!display) throw new Error('Could not find Vuetify display injection');
|
|
7070
7101
|
const mobile = computed(() => {
|
|
7102
|
+
if (props.mobile != null) return props.mobile;
|
|
7071
7103
|
if (!props.mobileBreakpoint) return display.mobile.value;
|
|
7072
7104
|
const breakpointValue = typeof props.mobileBreakpoint === 'number' ? props.mobileBreakpoint : display.thresholds.value[props.mobileBreakpoint];
|
|
7073
7105
|
return display.width.value < breakpointValue;
|
|
@@ -7085,45 +7117,205 @@ function useDisplay() {
|
|
|
7085
7117
|
};
|
|
7086
7118
|
}
|
|
7087
7119
|
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
|
|
7120
|
+
// Utilities
|
|
7121
|
+
|
|
7122
|
+
// Types
|
|
7123
|
+
|
|
7124
|
+
const GoToSymbol = Symbol.for('vuetify:goto');
|
|
7125
|
+
function genDefaults() {
|
|
7126
|
+
return {
|
|
7127
|
+
container: undefined,
|
|
7128
|
+
duration: 300,
|
|
7129
|
+
layout: false,
|
|
7130
|
+
offset: 0,
|
|
7131
|
+
easing: 'easeInOutCubic',
|
|
7132
|
+
patterns: {
|
|
7133
|
+
linear: t => t,
|
|
7134
|
+
easeInQuad: t => t ** 2,
|
|
7135
|
+
easeOutQuad: t => t * (2 - t),
|
|
7136
|
+
easeInOutQuad: t => t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t,
|
|
7137
|
+
easeInCubic: t => t ** 3,
|
|
7138
|
+
easeOutCubic: t => --t ** 3 + 1,
|
|
7139
|
+
easeInOutCubic: t => t < 0.5 ? 4 * t ** 3 : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1,
|
|
7140
|
+
easeInQuart: t => t ** 4,
|
|
7141
|
+
easeOutQuart: t => 1 - --t ** 4,
|
|
7142
|
+
easeInOutQuart: t => t < 0.5 ? 8 * t ** 4 : 1 - 8 * --t ** 4,
|
|
7143
|
+
easeInQuint: t => t ** 5,
|
|
7144
|
+
easeOutQuint: t => 1 + --t ** 5,
|
|
7145
|
+
easeInOutQuint: t => t < 0.5 ? 16 * t ** 5 : 1 + 16 * --t ** 5
|
|
7146
|
+
}
|
|
7147
|
+
};
|
|
7148
|
+
}
|
|
7149
|
+
function getContainer(el) {
|
|
7150
|
+
return getTarget$1(el) ?? (document.scrollingElement || document.body);
|
|
7092
7151
|
}
|
|
7093
|
-
function
|
|
7152
|
+
function getTarget$1(el) {
|
|
7153
|
+
return typeof el === 'string' ? document.querySelector(el) : refElement(el);
|
|
7154
|
+
}
|
|
7155
|
+
function getOffset$2(target, horizontal, rtl) {
|
|
7156
|
+
if (typeof target === 'number') return horizontal && rtl ? -target : target;
|
|
7157
|
+
let el = getTarget$1(target);
|
|
7158
|
+
let totalOffset = 0;
|
|
7159
|
+
while (el) {
|
|
7160
|
+
totalOffset += horizontal ? el.offsetLeft : el.offsetTop;
|
|
7161
|
+
el = el.offsetParent;
|
|
7162
|
+
}
|
|
7163
|
+
return totalOffset;
|
|
7164
|
+
}
|
|
7165
|
+
function createGoTo(options, locale) {
|
|
7166
|
+
return {
|
|
7167
|
+
rtl: locale.isRtl,
|
|
7168
|
+
options: mergeDeep(genDefaults(), options)
|
|
7169
|
+
};
|
|
7170
|
+
}
|
|
7171
|
+
async function scrollTo(_target, _options, horizontal, goTo) {
|
|
7172
|
+
const property = horizontal ? 'scrollLeft' : 'scrollTop';
|
|
7173
|
+
const options = mergeDeep(goTo?.options ?? genDefaults(), _options);
|
|
7174
|
+
const rtl = goTo?.rtl.value;
|
|
7175
|
+
const target = (typeof _target === 'number' ? _target : getTarget$1(_target)) ?? 0;
|
|
7176
|
+
const container = options.container === 'parent' && target instanceof HTMLElement ? target.parentElement : getContainer(options.container);
|
|
7177
|
+
const ease = typeof options.easing === 'function' ? options.easing : options.patterns[options.easing];
|
|
7178
|
+
if (!ease) throw new TypeError(`Easing function "${options.easing}" not found.`);
|
|
7179
|
+
let targetLocation;
|
|
7180
|
+
if (typeof target === 'number') {
|
|
7181
|
+
targetLocation = getOffset$2(target, horizontal, rtl);
|
|
7182
|
+
} else {
|
|
7183
|
+
targetLocation = getOffset$2(target, horizontal, rtl) - getOffset$2(container, horizontal, rtl);
|
|
7184
|
+
if (options.layout) {
|
|
7185
|
+
const styles = window.getComputedStyle(target);
|
|
7186
|
+
const layoutOffset = styles.getPropertyValue('--v-layout-top');
|
|
7187
|
+
if (layoutOffset) targetLocation -= parseInt(layoutOffset, 10);
|
|
7188
|
+
}
|
|
7189
|
+
}
|
|
7190
|
+
targetLocation += options.offset;
|
|
7191
|
+
targetLocation = clampTarget(container, targetLocation, !!rtl, !!horizontal);
|
|
7192
|
+
const startLocation = container[property] ?? 0;
|
|
7193
|
+
if (targetLocation === startLocation) return Promise.resolve(targetLocation);
|
|
7194
|
+
const startTime = performance.now();
|
|
7195
|
+
return new Promise(resolve => requestAnimationFrame(function step(currentTime) {
|
|
7196
|
+
const timeElapsed = currentTime - startTime;
|
|
7197
|
+
const progress = timeElapsed / options.duration;
|
|
7198
|
+
const location = Math.floor(startLocation + (targetLocation - startLocation) * ease(clamp(progress, 0, 1)));
|
|
7199
|
+
container[property] = location;
|
|
7200
|
+
|
|
7201
|
+
// Allow for some jitter if target time has elapsed
|
|
7202
|
+
if (progress >= 1 && Math.abs(location - container[property]) < 10) {
|
|
7203
|
+
return resolve(targetLocation);
|
|
7204
|
+
} else if (progress > 2) {
|
|
7205
|
+
// The target might not be reachable
|
|
7206
|
+
consoleWarn('Scroll target is not reachable');
|
|
7207
|
+
return resolve(container[property]);
|
|
7208
|
+
}
|
|
7209
|
+
requestAnimationFrame(step);
|
|
7210
|
+
}));
|
|
7211
|
+
}
|
|
7212
|
+
function useGoTo() {
|
|
7213
|
+
let _options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
7214
|
+
const goToInstance = inject$1(GoToSymbol);
|
|
7215
|
+
const {
|
|
7216
|
+
isRtl
|
|
7217
|
+
} = useRtl();
|
|
7218
|
+
if (!goToInstance) throw new Error('[Vuetify] Could not find injected goto instance');
|
|
7219
|
+
const goTo = {
|
|
7220
|
+
...goToInstance,
|
|
7221
|
+
// can be set via VLocaleProvider
|
|
7222
|
+
rtl: computed(() => goToInstance.rtl.value || isRtl.value)
|
|
7223
|
+
};
|
|
7224
|
+
async function go(target, options) {
|
|
7225
|
+
return scrollTo(target, mergeDeep(_options, options), false, goTo);
|
|
7226
|
+
}
|
|
7227
|
+
go.horizontal = async (target, options) => {
|
|
7228
|
+
return scrollTo(target, mergeDeep(_options, options), true, goTo);
|
|
7229
|
+
};
|
|
7230
|
+
return go;
|
|
7231
|
+
}
|
|
7232
|
+
|
|
7233
|
+
/**
|
|
7234
|
+
* Clamp target value to achieve a smooth scroll animation
|
|
7235
|
+
* when the value goes outside the scroll container size
|
|
7236
|
+
*/
|
|
7237
|
+
function clampTarget(container, value, rtl, horizontal) {
|
|
7238
|
+
const {
|
|
7239
|
+
scrollWidth,
|
|
7240
|
+
scrollHeight
|
|
7241
|
+
} = container;
|
|
7242
|
+
const [containerWidth, containerHeight] = container === document.scrollingElement ? [window.innerWidth, window.innerHeight] : [container.offsetWidth, container.offsetHeight];
|
|
7243
|
+
let min;
|
|
7244
|
+
let max;
|
|
7245
|
+
if (horizontal) {
|
|
7246
|
+
if (rtl) {
|
|
7247
|
+
min = -(scrollWidth - containerWidth);
|
|
7248
|
+
max = 0;
|
|
7249
|
+
} else {
|
|
7250
|
+
min = 0;
|
|
7251
|
+
max = scrollWidth - containerWidth;
|
|
7252
|
+
}
|
|
7253
|
+
} else {
|
|
7254
|
+
min = 0;
|
|
7255
|
+
max = scrollHeight + -containerHeight;
|
|
7256
|
+
}
|
|
7257
|
+
return Math.max(Math.min(value, max), min);
|
|
7258
|
+
}
|
|
7259
|
+
|
|
7260
|
+
function calculateUpdatedTarget(_ref) {
|
|
7094
7261
|
let {
|
|
7095
7262
|
selectedElement,
|
|
7096
|
-
|
|
7097
|
-
contentSize,
|
|
7263
|
+
containerElement,
|
|
7098
7264
|
isRtl,
|
|
7099
|
-
currentScrollOffset,
|
|
7100
7265
|
isHorizontal
|
|
7101
7266
|
} = _ref;
|
|
7102
|
-
const
|
|
7103
|
-
const
|
|
7104
|
-
const
|
|
7105
|
-
const
|
|
7106
|
-
const
|
|
7107
|
-
|
|
7108
|
-
|
|
7109
|
-
|
|
7110
|
-
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
function calculateCenteredOffset(_ref2) {
|
|
7267
|
+
const containerSize = getOffsetSize(isHorizontal, containerElement);
|
|
7268
|
+
const scrollPosition = getScrollPosition(isHorizontal, isRtl, containerElement);
|
|
7269
|
+
const childrenSize = getOffsetSize(isHorizontal, selectedElement);
|
|
7270
|
+
const childrenStartPosition = getOffsetPosition(isHorizontal, selectedElement);
|
|
7271
|
+
const additionalOffset = childrenSize * 0.4;
|
|
7272
|
+
if (scrollPosition > childrenStartPosition) {
|
|
7273
|
+
return childrenStartPosition - additionalOffset;
|
|
7274
|
+
} else if (scrollPosition + containerSize < childrenStartPosition + childrenSize) {
|
|
7275
|
+
return childrenStartPosition - containerSize + childrenSize + additionalOffset;
|
|
7276
|
+
}
|
|
7277
|
+
return scrollPosition;
|
|
7278
|
+
}
|
|
7279
|
+
function calculateCenteredTarget(_ref2) {
|
|
7116
7280
|
let {
|
|
7117
7281
|
selectedElement,
|
|
7118
|
-
|
|
7119
|
-
contentSize,
|
|
7120
|
-
isRtl,
|
|
7282
|
+
containerElement,
|
|
7121
7283
|
isHorizontal
|
|
7122
7284
|
} = _ref2;
|
|
7123
|
-
const
|
|
7124
|
-
const
|
|
7125
|
-
const
|
|
7126
|
-
return
|
|
7285
|
+
const containerOffsetSize = getOffsetSize(isHorizontal, containerElement);
|
|
7286
|
+
const childrenOffsetPosition = getOffsetPosition(isHorizontal, selectedElement);
|
|
7287
|
+
const childrenOffsetSize = getOffsetSize(isHorizontal, selectedElement);
|
|
7288
|
+
return childrenOffsetPosition - containerOffsetSize / 2 + childrenOffsetSize / 2;
|
|
7289
|
+
}
|
|
7290
|
+
function getScrollSize(isHorizontal, element) {
|
|
7291
|
+
const key = isHorizontal ? 'scrollWidth' : 'scrollHeight';
|
|
7292
|
+
return element?.[key] || 0;
|
|
7293
|
+
}
|
|
7294
|
+
function getClientSize(isHorizontal, element) {
|
|
7295
|
+
const key = isHorizontal ? 'clientWidth' : 'clientHeight';
|
|
7296
|
+
return element?.[key] || 0;
|
|
7297
|
+
}
|
|
7298
|
+
function getScrollPosition(isHorizontal, rtl, element) {
|
|
7299
|
+
if (!element) {
|
|
7300
|
+
return 0;
|
|
7301
|
+
}
|
|
7302
|
+
const {
|
|
7303
|
+
scrollLeft,
|
|
7304
|
+
offsetWidth,
|
|
7305
|
+
scrollWidth
|
|
7306
|
+
} = element;
|
|
7307
|
+
if (isHorizontal) {
|
|
7308
|
+
return rtl ? scrollWidth - offsetWidth + scrollLeft : scrollLeft;
|
|
7309
|
+
}
|
|
7310
|
+
return element.scrollTop;
|
|
7311
|
+
}
|
|
7312
|
+
function getOffsetSize(isHorizontal, element) {
|
|
7313
|
+
const key = isHorizontal ? 'offsetWidth' : 'offsetHeight';
|
|
7314
|
+
return element?.[key] || 0;
|
|
7315
|
+
}
|
|
7316
|
+
function getOffsetPosition(isHorizontal, element) {
|
|
7317
|
+
const key = isHorizontal ? 'offsetLeft' : 'offsetTop';
|
|
7318
|
+
return element?.[key] || 0;
|
|
7127
7319
|
}
|
|
7128
7320
|
|
|
7129
7321
|
// Types
|
|
@@ -7189,6 +7381,14 @@ const VSlideGroup = genericComponent()({
|
|
|
7189
7381
|
resizeRef: contentRef,
|
|
7190
7382
|
contentRect
|
|
7191
7383
|
} = useResizeObserver();
|
|
7384
|
+
const goTo = useGoTo();
|
|
7385
|
+
const goToOptions = computed(() => {
|
|
7386
|
+
return {
|
|
7387
|
+
container: containerRef.value,
|
|
7388
|
+
duration: 200,
|
|
7389
|
+
easing: 'easeOutQuart'
|
|
7390
|
+
};
|
|
7391
|
+
});
|
|
7192
7392
|
const firstSelectedIndex = computed(() => {
|
|
7193
7393
|
if (!group.selected.value.length) return -1;
|
|
7194
7394
|
return group.items.value.findIndex(item => item.id === group.selected.value[0]);
|
|
@@ -7211,60 +7411,58 @@ const VSlideGroup = genericComponent()({
|
|
|
7211
7411
|
if (firstSelectedIndex.value >= 0 && contentRef.value) {
|
|
7212
7412
|
// TODO: Is this too naive? Should we store element references in group composable?
|
|
7213
7413
|
const selectedElement = contentRef.value.children[lastSelectedIndex.value];
|
|
7214
|
-
|
|
7215
|
-
scrollOffset.value = 0;
|
|
7216
|
-
} else if (props.centerActive) {
|
|
7217
|
-
scrollOffset.value = calculateCenteredOffset({
|
|
7218
|
-
selectedElement,
|
|
7219
|
-
containerSize: containerSize.value,
|
|
7220
|
-
contentSize: contentSize.value,
|
|
7221
|
-
isRtl: isRtl.value,
|
|
7222
|
-
isHorizontal: isHorizontal.value
|
|
7223
|
-
});
|
|
7224
|
-
} else if (isOverflowing.value) {
|
|
7225
|
-
scrollOffset.value = calculateUpdatedOffset({
|
|
7226
|
-
selectedElement,
|
|
7227
|
-
containerSize: containerSize.value,
|
|
7228
|
-
contentSize: contentSize.value,
|
|
7229
|
-
isRtl: isRtl.value,
|
|
7230
|
-
currentScrollOffset: scrollOffset.value,
|
|
7231
|
-
isHorizontal: isHorizontal.value
|
|
7232
|
-
});
|
|
7233
|
-
}
|
|
7414
|
+
scrollToChildren(selectedElement, props.centerActive);
|
|
7234
7415
|
}
|
|
7235
7416
|
});
|
|
7236
7417
|
});
|
|
7237
7418
|
}
|
|
7238
|
-
const
|
|
7239
|
-
|
|
7240
|
-
|
|
7241
|
-
|
|
7242
|
-
|
|
7243
|
-
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
|
|
7419
|
+
const isFocused = shallowRef(false);
|
|
7420
|
+
function scrollToChildren(children, center) {
|
|
7421
|
+
let target = 0;
|
|
7422
|
+
if (center) {
|
|
7423
|
+
target = calculateCenteredTarget({
|
|
7424
|
+
containerElement: containerRef.value,
|
|
7425
|
+
isHorizontal: isHorizontal.value,
|
|
7426
|
+
selectedElement: children
|
|
7427
|
+
});
|
|
7428
|
+
} else {
|
|
7429
|
+
target = calculateUpdatedTarget({
|
|
7430
|
+
containerElement: containerRef.value,
|
|
7431
|
+
isHorizontal: isHorizontal.value,
|
|
7432
|
+
isRtl: isRtl.value,
|
|
7433
|
+
selectedElement: children
|
|
7434
|
+
});
|
|
7435
|
+
}
|
|
7436
|
+
scrollToPosition(target);
|
|
7437
|
+
}
|
|
7438
|
+
function scrollToPosition(newPosition) {
|
|
7439
|
+
if (!IN_BROWSER || !containerRef.value) return;
|
|
7440
|
+
const offsetSize = getOffsetSize(isHorizontal.value, containerRef.value);
|
|
7441
|
+
const scrollPosition = getScrollPosition(isHorizontal.value, isRtl.value, containerRef.value);
|
|
7442
|
+
const scrollSize = getScrollSize(isHorizontal.value, containerRef.value);
|
|
7443
|
+
if (scrollSize <= offsetSize ||
|
|
7444
|
+
// Prevent scrolling by only a couple of pixels, which doesn't look smooth
|
|
7445
|
+
Math.abs(newPosition - scrollPosition) < 16) return;
|
|
7446
|
+
if (isHorizontal.value && isRtl.value && containerRef.value) {
|
|
7447
|
+
const {
|
|
7448
|
+
scrollWidth,
|
|
7449
|
+
offsetWidth: containerWidth
|
|
7450
|
+
} = containerRef.value;
|
|
7451
|
+
newPosition = scrollWidth - containerWidth - newPosition;
|
|
7452
|
+
}
|
|
7453
|
+
if (isHorizontal.value) {
|
|
7454
|
+
goTo.horizontal(newPosition, goToOptions.value);
|
|
7455
|
+
} else {
|
|
7456
|
+
goTo(newPosition, goToOptions.value);
|
|
7260
7457
|
}
|
|
7261
|
-
disableTransition.value = false;
|
|
7262
7458
|
}
|
|
7263
|
-
function onScroll() {
|
|
7264
|
-
|
|
7265
|
-
|
|
7459
|
+
function onScroll(e) {
|
|
7460
|
+
const {
|
|
7461
|
+
scrollTop,
|
|
7462
|
+
scrollLeft
|
|
7463
|
+
} = e.target;
|
|
7464
|
+
scrollOffset.value = isHorizontal.value ? scrollLeft : scrollTop;
|
|
7266
7465
|
}
|
|
7267
|
-
const isFocused = shallowRef(false);
|
|
7268
7466
|
function onFocusin(e) {
|
|
7269
7467
|
isFocused.value = true;
|
|
7270
7468
|
if (!isOverflowing.value || !contentRef.value) return;
|
|
@@ -7274,14 +7472,7 @@ const VSlideGroup = genericComponent()({
|
|
|
7274
7472
|
for (const el of e.composedPath()) {
|
|
7275
7473
|
for (const item of contentRef.value.children) {
|
|
7276
7474
|
if (item === el) {
|
|
7277
|
-
|
|
7278
|
-
selectedElement: item,
|
|
7279
|
-
containerSize: containerSize.value,
|
|
7280
|
-
contentSize: contentSize.value,
|
|
7281
|
-
isRtl: isRtl.value,
|
|
7282
|
-
currentScrollOffset: scrollOffset.value,
|
|
7283
|
-
isHorizontal: isHorizontal.value
|
|
7284
|
-
});
|
|
7475
|
+
scrollToChildren(item);
|
|
7285
7476
|
return;
|
|
7286
7477
|
}
|
|
7287
7478
|
}
|
|
@@ -7290,66 +7481,79 @@ const VSlideGroup = genericComponent()({
|
|
|
7290
7481
|
function onFocusout(e) {
|
|
7291
7482
|
isFocused.value = false;
|
|
7292
7483
|
}
|
|
7484
|
+
|
|
7485
|
+
// Affix clicks produce onFocus that we have to ignore to avoid extra scrollToChildren
|
|
7486
|
+
let ignoreFocusEvent = false;
|
|
7293
7487
|
function onFocus(e) {
|
|
7294
|
-
if (!isFocused.value && !(e.relatedTarget && contentRef.value?.contains(e.relatedTarget))) focus();
|
|
7488
|
+
if (!ignoreFocusEvent && !isFocused.value && !(e.relatedTarget && contentRef.value?.contains(e.relatedTarget))) focus();
|
|
7489
|
+
ignoreFocusEvent = false;
|
|
7490
|
+
}
|
|
7491
|
+
function onFocusAffixes() {
|
|
7492
|
+
ignoreFocusEvent = true;
|
|
7295
7493
|
}
|
|
7296
7494
|
function onKeydown(e) {
|
|
7297
7495
|
if (!contentRef.value) return;
|
|
7496
|
+
function toFocus(location) {
|
|
7497
|
+
e.preventDefault();
|
|
7498
|
+
focus(location);
|
|
7499
|
+
}
|
|
7298
7500
|
if (isHorizontal.value) {
|
|
7299
7501
|
if (e.key === 'ArrowRight') {
|
|
7300
|
-
|
|
7502
|
+
toFocus(isRtl.value ? 'prev' : 'next');
|
|
7301
7503
|
} else if (e.key === 'ArrowLeft') {
|
|
7302
|
-
|
|
7504
|
+
toFocus(isRtl.value ? 'next' : 'prev');
|
|
7303
7505
|
}
|
|
7304
7506
|
} else {
|
|
7305
7507
|
if (e.key === 'ArrowDown') {
|
|
7306
|
-
|
|
7508
|
+
toFocus('next');
|
|
7307
7509
|
} else if (e.key === 'ArrowUp') {
|
|
7308
|
-
|
|
7510
|
+
toFocus('prev');
|
|
7309
7511
|
}
|
|
7310
7512
|
}
|
|
7311
7513
|
if (e.key === 'Home') {
|
|
7312
|
-
|
|
7514
|
+
toFocus('first');
|
|
7313
7515
|
} else if (e.key === 'End') {
|
|
7314
|
-
|
|
7516
|
+
toFocus('last');
|
|
7315
7517
|
}
|
|
7316
7518
|
}
|
|
7317
7519
|
function focus(location) {
|
|
7318
7520
|
if (!contentRef.value) return;
|
|
7521
|
+
let el;
|
|
7319
7522
|
if (!location) {
|
|
7320
7523
|
const focusable = focusableChildren(contentRef.value);
|
|
7321
|
-
focusable[0]
|
|
7524
|
+
el = focusable[0];
|
|
7322
7525
|
} else if (location === 'next') {
|
|
7323
|
-
|
|
7324
|
-
if (el)
|
|
7526
|
+
el = contentRef.value.querySelector(':focus')?.nextElementSibling;
|
|
7527
|
+
if (!el) return focus('first');
|
|
7325
7528
|
} else if (location === 'prev') {
|
|
7326
|
-
|
|
7327
|
-
if (el)
|
|
7529
|
+
el = contentRef.value.querySelector(':focus')?.previousElementSibling;
|
|
7530
|
+
if (!el) return focus('last');
|
|
7328
7531
|
} else if (location === 'first') {
|
|
7329
|
-
contentRef.value.firstElementChild
|
|
7532
|
+
el = contentRef.value.firstElementChild;
|
|
7330
7533
|
} else if (location === 'last') {
|
|
7331
|
-
contentRef.value.lastElementChild
|
|
7534
|
+
el = contentRef.value.lastElementChild;
|
|
7535
|
+
}
|
|
7536
|
+
if (el) {
|
|
7537
|
+
el.focus({
|
|
7538
|
+
preventScroll: true
|
|
7539
|
+
});
|
|
7332
7540
|
}
|
|
7333
7541
|
}
|
|
7334
7542
|
function scrollTo(location) {
|
|
7335
|
-
const
|
|
7336
|
-
|
|
7337
|
-
|
|
7338
|
-
const contentStyles = computed(() => {
|
|
7339
|
-
// This adds friction when scrolling the 'wrong' way when at max offset
|
|
7340
|
-
let scrollAmount = scrollOffset.value > contentSize.value - containerSize.value ? -(contentSize.value - containerSize.value) + bias(contentSize.value - containerSize.value - scrollOffset.value) : -scrollOffset.value;
|
|
7543
|
+
const direction = isHorizontal.value && isRtl.value ? -1 : 1;
|
|
7544
|
+
const offsetStep = (location === 'prev' ? -direction : direction) * containerSize.value;
|
|
7545
|
+
let newPosition = scrollOffset.value + offsetStep;
|
|
7341
7546
|
|
|
7342
|
-
//
|
|
7343
|
-
if (
|
|
7344
|
-
|
|
7547
|
+
// TODO: improve it
|
|
7548
|
+
if (isHorizontal.value && isRtl.value && containerRef.value) {
|
|
7549
|
+
const {
|
|
7550
|
+
scrollWidth,
|
|
7551
|
+
offsetWidth: containerWidth
|
|
7552
|
+
} = containerRef.value;
|
|
7553
|
+
newPosition += scrollWidth - containerWidth;
|
|
7345
7554
|
}
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
transform: `translate${isHorizontal.value ? 'X' : 'Y'}(${sign * scrollAmount}px)`,
|
|
7349
|
-
transition: disableTransition.value ? 'none' : '',
|
|
7350
|
-
willChange: disableTransition.value ? 'transform' : ''
|
|
7351
|
-
};
|
|
7352
|
-
});
|
|
7555
|
+
scrollToPosition(newPosition);
|
|
7556
|
+
}
|
|
7353
7557
|
const slotProps = computed(() => ({
|
|
7354
7558
|
next: group.next,
|
|
7355
7559
|
prev: group.prev,
|
|
@@ -7383,11 +7587,17 @@ const VSlideGroup = genericComponent()({
|
|
|
7383
7587
|
}
|
|
7384
7588
|
});
|
|
7385
7589
|
const hasPrev = computed(() => {
|
|
7386
|
-
|
|
7590
|
+
// 1 pixel in reserve, may be lost after rounding
|
|
7591
|
+
return Math.abs(scrollOffset.value) > 1;
|
|
7387
7592
|
});
|
|
7388
7593
|
const hasNext = computed(() => {
|
|
7389
|
-
|
|
7390
|
-
|
|
7594
|
+
if (!containerRef.value) return false;
|
|
7595
|
+
const scrollSize = getScrollSize(isHorizontal.value, containerRef.value);
|
|
7596
|
+
const clientSize = getClientSize(isHorizontal.value, containerRef.value);
|
|
7597
|
+
const scrollSizeMax = scrollSize - clientSize;
|
|
7598
|
+
|
|
7599
|
+
// 1 pixel in reserve, may be lost after rounding
|
|
7600
|
+
return scrollSizeMax - Math.abs(scrollOffset.value) > 1;
|
|
7391
7601
|
});
|
|
7392
7602
|
useRender(() => createVNode(props.tag, {
|
|
7393
7603
|
"class": ['v-slide-group', {
|
|
@@ -7404,6 +7614,7 @@ const VSlideGroup = genericComponent()({
|
|
|
7404
7614
|
"class": ['v-slide-group__prev', {
|
|
7405
7615
|
'v-slide-group__prev--disabled': !hasPrev.value
|
|
7406
7616
|
}],
|
|
7617
|
+
"onMousedown": onFocusAffixes,
|
|
7407
7618
|
"onClick": () => hasPrev.value && scrollTo('prev')
|
|
7408
7619
|
}, [slots.prev?.(slotProps.value) ?? createVNode(VFadeTransition, null, {
|
|
7409
7620
|
default: () => [createVNode(VIcon, {
|
|
@@ -7417,10 +7628,6 @@ const VSlideGroup = genericComponent()({
|
|
|
7417
7628
|
}, [createVNode("div", {
|
|
7418
7629
|
"ref": contentRef,
|
|
7419
7630
|
"class": "v-slide-group__content",
|
|
7420
|
-
"style": contentStyles.value,
|
|
7421
|
-
"onTouchstartPassive": onTouchstart,
|
|
7422
|
-
"onTouchmovePassive": onTouchmove,
|
|
7423
|
-
"onTouchendPassive": onTouchend,
|
|
7424
7631
|
"onFocusin": onFocusin,
|
|
7425
7632
|
"onFocusout": onFocusout,
|
|
7426
7633
|
"onKeydown": onKeydown
|
|
@@ -7429,6 +7636,7 @@ const VSlideGroup = genericComponent()({
|
|
|
7429
7636
|
"class": ['v-slide-group__next', {
|
|
7430
7637
|
'v-slide-group__next--disabled': !hasNext.value
|
|
7431
7638
|
}],
|
|
7639
|
+
"onMousedown": onFocusAffixes,
|
|
7432
7640
|
"onClick": () => hasNext.value && scrollTo('next')
|
|
7433
7641
|
}, [slots.next?.(slotProps.value) ?? createVNode(VFadeTransition, null, {
|
|
7434
7642
|
default: () => [createVNode(VIcon, {
|
|
@@ -9223,7 +9431,8 @@ const VList = genericComponent()({
|
|
|
9223
9431
|
if (!isFocused.value && !(e.relatedTarget && contentRef.value?.contains(e.relatedTarget))) focus();
|
|
9224
9432
|
}
|
|
9225
9433
|
function onKeydown(e) {
|
|
9226
|
-
|
|
9434
|
+
const target = e.target;
|
|
9435
|
+
if (!contentRef.value || ['INPUT', 'TEXTAREA'].includes(target.tagName)) return;
|
|
9227
9436
|
if (e.key === 'ArrowDown') {
|
|
9228
9437
|
focus('next');
|
|
9229
9438
|
} else if (e.key === 'ArrowUp') {
|
|
@@ -9343,7 +9552,7 @@ function elementToViewport(point, offset) {
|
|
|
9343
9552
|
}
|
|
9344
9553
|
|
|
9345
9554
|
/** Get the difference between two points */
|
|
9346
|
-
function getOffset$
|
|
9555
|
+
function getOffset$1(a, b) {
|
|
9347
9556
|
return {
|
|
9348
9557
|
x: a.x - b.x,
|
|
9349
9558
|
y: a.y - b.y
|
|
@@ -9590,7 +9799,7 @@ function connectedLocationStrategy(data, props, contentStyles) {
|
|
|
9590
9799
|
let {
|
|
9591
9800
|
x,
|
|
9592
9801
|
y
|
|
9593
|
-
} = getOffset$
|
|
9802
|
+
} = getOffset$1(targetPoint, contentPoint);
|
|
9594
9803
|
switch (_placement.anchor.side) {
|
|
9595
9804
|
case 'top':
|
|
9596
9805
|
y -= offset.value[0];
|
|
@@ -10128,7 +10337,7 @@ function useActivator(props, _ref) {
|
|
|
10128
10337
|
const target = computed(() => {
|
|
10129
10338
|
if (props.target === 'cursor' && cursorTarget.value) return cursorTarget.value;
|
|
10130
10339
|
if (targetRef.value) return refElement(targetRef.value);
|
|
10131
|
-
return getTarget
|
|
10340
|
+
return getTarget(props.target, vm) || activatorEl.value;
|
|
10132
10341
|
});
|
|
10133
10342
|
const targetEl = computed(() => {
|
|
10134
10343
|
return Array.isArray(target.value) ? undefined : target.value;
|
|
@@ -10200,14 +10409,14 @@ function _useActivator(props, vm, _ref2) {
|
|
|
10200
10409
|
}
|
|
10201
10410
|
function getActivator() {
|
|
10202
10411
|
let selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : props.activator;
|
|
10203
|
-
const activator = getTarget
|
|
10412
|
+
const activator = getTarget(selector, vm);
|
|
10204
10413
|
|
|
10205
10414
|
// The activator should only be a valid element (Ignore comments and text nodes)
|
|
10206
10415
|
activatorEl.value = activator?.nodeType === Node.ELEMENT_NODE ? activator : undefined;
|
|
10207
10416
|
return activatorEl.value;
|
|
10208
10417
|
}
|
|
10209
10418
|
}
|
|
10210
|
-
function getTarget
|
|
10419
|
+
function getTarget(selector, vm) {
|
|
10211
10420
|
if (!selector) return;
|
|
10212
10421
|
let target;
|
|
10213
10422
|
if (selector === 'parent') {
|
|
@@ -10660,9 +10869,9 @@ const VOverlay = genericComponent()({
|
|
|
10660
10869
|
}
|
|
10661
10870
|
useRender(() => createVNode(Fragment, null, [slots.activator?.({
|
|
10662
10871
|
isActive: isActive.value,
|
|
10872
|
+
targetRef,
|
|
10663
10873
|
props: mergeProps({
|
|
10664
|
-
ref: activatorRef
|
|
10665
|
-
targetRef
|
|
10874
|
+
ref: activatorRef
|
|
10666
10875
|
}, activatorEvents.value, props.activatorProps)
|
|
10667
10876
|
}), isMounted.value && hasContent.value && createVNode(Teleport, {
|
|
10668
10877
|
"disabled": !teleportTarget.value,
|
|
@@ -12141,6 +12350,10 @@ const VSelect = genericComponent()({
|
|
|
12141
12350
|
const item = items.value.find(item => item.title.toLowerCase().startsWith(keyboardLookupPrefix));
|
|
12142
12351
|
if (item !== undefined) {
|
|
12143
12352
|
model.value = [item];
|
|
12353
|
+
const index = displayItems.value.indexOf(item);
|
|
12354
|
+
IN_BROWSER && window.requestAnimationFrame(() => {
|
|
12355
|
+
index >= 0 && vVirtualScrollRef.value?.scrollToIndex(index);
|
|
12356
|
+
});
|
|
12144
12357
|
}
|
|
12145
12358
|
}
|
|
12146
12359
|
|
|
@@ -12189,7 +12402,7 @@ const VSelect = genericComponent()({
|
|
|
12189
12402
|
vTextFieldRef.value.value = '';
|
|
12190
12403
|
}
|
|
12191
12404
|
}
|
|
12192
|
-
watch(
|
|
12405
|
+
watch(menu, () => {
|
|
12193
12406
|
if (!props.hideSelected && menu.value && model.value.length) {
|
|
12194
12407
|
const index = displayItems.value.findIndex(item => model.value.some(s => props.valueComparator(s.value, item.value)));
|
|
12195
12408
|
IN_BROWSER && window.requestAnimationFrame(() => {
|
|
@@ -12643,16 +12856,14 @@ const VAutocomplete = genericComponent()({
|
|
|
12643
12856
|
listRef.value?.focus('next');
|
|
12644
12857
|
}
|
|
12645
12858
|
if (['Backspace', 'Delete'].includes(e.key)) {
|
|
12646
|
-
if (!props.multiple && hasSelectionSlot.value && model.value.length > 0) return select(model.value[0], false);
|
|
12647
|
-
if (selectionIndex.value
|
|
12648
|
-
|
|
12649
|
-
|
|
12650
|
-
|
|
12651
|
-
|
|
12859
|
+
if (!props.multiple && hasSelectionSlot.value && model.value.length > 0 && !search.value) return select(model.value[0], false);
|
|
12860
|
+
if (~selectionIndex.value) {
|
|
12861
|
+
const originalSelectionIndex = selectionIndex.value;
|
|
12862
|
+
select(model.value[selectionIndex.value], false);
|
|
12863
|
+
selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
|
|
12864
|
+
} else if (e.key === 'Backspace' && !search.value) {
|
|
12865
|
+
selectionIndex.value = length - 1;
|
|
12652
12866
|
}
|
|
12653
|
-
const originalSelectionIndex = selectionIndex.value;
|
|
12654
|
-
select(model.value[selectionIndex.value], false);
|
|
12655
|
-
selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
|
|
12656
12867
|
}
|
|
12657
12868
|
if (!props.multiple) return;
|
|
12658
12869
|
if (e.key === 'ArrowLeft') {
|
|
@@ -12700,7 +12911,7 @@ const VAutocomplete = genericComponent()({
|
|
|
12700
12911
|
listHasFocus.value = false;
|
|
12701
12912
|
}
|
|
12702
12913
|
function onUpdateModelValue(v) {
|
|
12703
|
-
if (v == null || v === '' && !props.multiple) model.value = [];
|
|
12914
|
+
if (v == null || v === '' && !props.multiple && !hasSelectionSlot.value) model.value = [];
|
|
12704
12915
|
}
|
|
12705
12916
|
const isSelecting = shallowRef(false);
|
|
12706
12917
|
|
|
@@ -13340,12 +13551,12 @@ const VDialog = genericComponent()({
|
|
|
13340
13551
|
name: 'VDialog',
|
|
13341
13552
|
props: makeVDialogProps(),
|
|
13342
13553
|
emits: {
|
|
13343
|
-
'click:outside': e => true,
|
|
13344
13554
|
'update:modelValue': value => true,
|
|
13345
13555
|
afterLeave: () => true
|
|
13346
13556
|
},
|
|
13347
13557
|
setup(props, _ref) {
|
|
13348
13558
|
let {
|
|
13559
|
+
emit,
|
|
13349
13560
|
slots
|
|
13350
13561
|
} = _ref;
|
|
13351
13562
|
const isActive = useProxiedModel(props, 'modelValue');
|
|
@@ -13388,6 +13599,9 @@ const VDialog = genericComponent()({
|
|
|
13388
13599
|
});
|
|
13389
13600
|
}
|
|
13390
13601
|
}
|
|
13602
|
+
function onAfterLeave() {
|
|
13603
|
+
emit('afterLeave');
|
|
13604
|
+
}
|
|
13391
13605
|
watch(isActive, async val => {
|
|
13392
13606
|
if (!val) {
|
|
13393
13607
|
await nextTick();
|
|
@@ -13419,7 +13633,8 @@ const VDialog = genericComponent()({
|
|
|
13419
13633
|
"activatorProps": activatorProps,
|
|
13420
13634
|
"contentProps": contentProps,
|
|
13421
13635
|
"role": "dialog",
|
|
13422
|
-
"onAfterEnter": onAfterEnter
|
|
13636
|
+
"onAfterEnter": onAfterEnter,
|
|
13637
|
+
"onAfterLeave": onAfterLeave
|
|
13423
13638
|
}, scopeId), {
|
|
13424
13639
|
activator: slots.activator,
|
|
13425
13640
|
default: function () {
|
|
@@ -14507,7 +14722,7 @@ const VCarouselItem = genericComponent()({
|
|
|
14507
14722
|
const imgProps = VImg.filterProps(props);
|
|
14508
14723
|
const windowItemProps = VWindowItem.filterProps(props);
|
|
14509
14724
|
return createVNode(VWindowItem, mergeProps({
|
|
14510
|
-
"class":
|
|
14725
|
+
"class": ['v-carousel-item', props.class]
|
|
14511
14726
|
}, windowItemProps), {
|
|
14512
14727
|
default: () => [createVNode(VImg, mergeProps(attrs, imgProps), slots)]
|
|
14513
14728
|
});
|
|
@@ -14956,7 +15171,7 @@ const VColorPickerEdit = defineComponent({
|
|
|
14956
15171
|
// Types
|
|
14957
15172
|
|
|
14958
15173
|
const VSliderSymbol = Symbol.for('vuetify:v-slider');
|
|
14959
|
-
function getOffset
|
|
15174
|
+
function getOffset(e, el, direction) {
|
|
14960
15175
|
const vertical = direction === 'vertical';
|
|
14961
15176
|
const rect = el.getBoundingClientRect();
|
|
14962
15177
|
const touch = 'touches' in e ? e.touches[0] : e;
|
|
@@ -15115,7 +15330,7 @@ const useSlider = _ref => {
|
|
|
15115
15330
|
activeThumbRef.value.focus();
|
|
15116
15331
|
mousePressed.value = true;
|
|
15117
15332
|
if (activeThumbRef.value.contains(e.target)) {
|
|
15118
|
-
startOffset.value = getOffset
|
|
15333
|
+
startOffset.value = getOffset(e, activeThumbRef.value, props.direction);
|
|
15119
15334
|
} else {
|
|
15120
15335
|
startOffset.value = 0;
|
|
15121
15336
|
onSliderMove({
|
|
@@ -16512,16 +16727,14 @@ const VCombobox = genericComponent()({
|
|
|
16512
16727
|
if (hasSelectionSlot.value) _search.value = '';
|
|
16513
16728
|
}
|
|
16514
16729
|
if (['Backspace', 'Delete'].includes(e.key)) {
|
|
16515
|
-
if (!props.multiple && hasSelectionSlot.value && model.value.length > 0) return select(model.value[0], false);
|
|
16516
|
-
if (selectionIndex.value
|
|
16517
|
-
|
|
16518
|
-
|
|
16519
|
-
|
|
16520
|
-
|
|
16730
|
+
if (!props.multiple && hasSelectionSlot.value && model.value.length > 0 && !search.value) return select(model.value[0], false);
|
|
16731
|
+
if (~selectionIndex.value) {
|
|
16732
|
+
const originalSelectionIndex = selectionIndex.value;
|
|
16733
|
+
select(model.value[selectionIndex.value], false);
|
|
16734
|
+
selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
|
|
16735
|
+
} else if (e.key === 'Backspace' && !search.value) {
|
|
16736
|
+
selectionIndex.value = length - 1;
|
|
16521
16737
|
}
|
|
16522
|
-
const originalSelectionIndex = selectionIndex.value;
|
|
16523
|
-
select(model.value[selectionIndex.value], false);
|
|
16524
|
-
selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
|
|
16525
16738
|
}
|
|
16526
16739
|
if (!props.multiple) return;
|
|
16527
16740
|
if (e.key === 'ArrowLeft') {
|
|
@@ -16590,7 +16803,7 @@ const VCombobox = genericComponent()({
|
|
|
16590
16803
|
listHasFocus.value = false;
|
|
16591
16804
|
}
|
|
16592
16805
|
function onUpdateModelValue(v) {
|
|
16593
|
-
if (v == null || v === '' && !props.multiple) model.value = [];
|
|
16806
|
+
if (v == null || v === '' && !props.multiple && !hasSelectionSlot.value) model.value = [];
|
|
16594
16807
|
}
|
|
16595
16808
|
watch(isFocused, (val, oldVal) => {
|
|
16596
16809
|
if (val || val === oldVal) return;
|
|
@@ -18162,110 +18375,6 @@ function getWeek(adapter, value) {
|
|
|
18162
18375
|
return Math.floor(diffDays / 7) + 1;
|
|
18163
18376
|
}
|
|
18164
18377
|
|
|
18165
|
-
// Utilities
|
|
18166
|
-
|
|
18167
|
-
// Types
|
|
18168
|
-
|
|
18169
|
-
const GoToSymbol = Symbol.for('vuetify:goto');
|
|
18170
|
-
function genDefaults() {
|
|
18171
|
-
return {
|
|
18172
|
-
container: undefined,
|
|
18173
|
-
duration: 300,
|
|
18174
|
-
layout: false,
|
|
18175
|
-
offset: 0,
|
|
18176
|
-
easing: 'easeInOutCubic',
|
|
18177
|
-
patterns: {
|
|
18178
|
-
linear: t => t,
|
|
18179
|
-
easeInQuad: t => t ** 2,
|
|
18180
|
-
easeOutQuad: t => t * (2 - t),
|
|
18181
|
-
easeInOutQuad: t => t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t,
|
|
18182
|
-
easeInCubic: t => t ** 3,
|
|
18183
|
-
easeOutCubic: t => --t ** 3 + 1,
|
|
18184
|
-
easeInOutCubic: t => t < 0.5 ? 4 * t ** 3 : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1,
|
|
18185
|
-
easeInQuart: t => t ** 4,
|
|
18186
|
-
easeOutQuart: t => 1 - --t ** 4,
|
|
18187
|
-
easeInOutQuart: t => t < 0.5 ? 8 * t ** 4 : 1 - 8 * --t ** 4,
|
|
18188
|
-
easeInQuint: t => t ** 5,
|
|
18189
|
-
easeOutQuint: t => 1 + --t ** 5,
|
|
18190
|
-
easeInOutQuint: t => t < 0.5 ? 16 * t ** 5 : 1 + 16 * --t ** 5
|
|
18191
|
-
}
|
|
18192
|
-
};
|
|
18193
|
-
}
|
|
18194
|
-
function getContainer(el) {
|
|
18195
|
-
return getTarget(el) ?? (document.scrollingElement || document.body);
|
|
18196
|
-
}
|
|
18197
|
-
function getTarget(el) {
|
|
18198
|
-
return typeof el === 'string' ? document.querySelector(el) : refElement(el);
|
|
18199
|
-
}
|
|
18200
|
-
function getOffset(target, horizontal, rtl) {
|
|
18201
|
-
if (typeof target === 'number') return horizontal && rtl ? -target : target;
|
|
18202
|
-
let el = getTarget(target);
|
|
18203
|
-
let totalOffset = 0;
|
|
18204
|
-
while (el) {
|
|
18205
|
-
totalOffset += horizontal ? el.offsetLeft : el.offsetTop;
|
|
18206
|
-
el = el.offsetParent;
|
|
18207
|
-
}
|
|
18208
|
-
return totalOffset;
|
|
18209
|
-
}
|
|
18210
|
-
function createGoTo(options, locale) {
|
|
18211
|
-
return {
|
|
18212
|
-
rtl: locale.isRtl,
|
|
18213
|
-
options: mergeDeep(genDefaults(), options)
|
|
18214
|
-
};
|
|
18215
|
-
}
|
|
18216
|
-
async function scrollTo(_target, _options, horizontal, goTo) {
|
|
18217
|
-
const property = horizontal ? 'scrollLeft' : 'scrollTop';
|
|
18218
|
-
const options = mergeDeep(goTo?.options ?? genDefaults(), _options);
|
|
18219
|
-
const rtl = goTo?.rtl.value;
|
|
18220
|
-
const target = (typeof _target === 'number' ? _target : getTarget(_target)) ?? 0;
|
|
18221
|
-
const container = options.container === 'parent' && target instanceof HTMLElement ? target.parentElement : getContainer(options.container);
|
|
18222
|
-
const ease = typeof options.easing === 'function' ? options.easing : options.patterns[options.easing];
|
|
18223
|
-
if (!ease) throw new TypeError(`Easing function "${options.easing}" not found.`);
|
|
18224
|
-
let targetLocation;
|
|
18225
|
-
if (typeof target === 'number') {
|
|
18226
|
-
targetLocation = getOffset(target, horizontal, rtl);
|
|
18227
|
-
} else {
|
|
18228
|
-
targetLocation = getOffset(target, horizontal, rtl) - getOffset(container, horizontal, rtl);
|
|
18229
|
-
if (options.layout) {
|
|
18230
|
-
const styles = window.getComputedStyle(target);
|
|
18231
|
-
const layoutOffset = styles.getPropertyValue('--v-layout-top');
|
|
18232
|
-
if (layoutOffset) targetLocation -= parseInt(layoutOffset, 10);
|
|
18233
|
-
}
|
|
18234
|
-
}
|
|
18235
|
-
targetLocation += options.offset;
|
|
18236
|
-
const startLocation = container[property] ?? 0;
|
|
18237
|
-
if (targetLocation === startLocation) return Promise.resolve(targetLocation);
|
|
18238
|
-
const startTime = performance.now();
|
|
18239
|
-
return new Promise(resolve => requestAnimationFrame(function step(currentTime) {
|
|
18240
|
-
const timeElapsed = currentTime - startTime;
|
|
18241
|
-
const progress = timeElapsed / options.duration;
|
|
18242
|
-
const location = Math.floor(startLocation + (targetLocation - startLocation) * ease(clamp(progress, 0, 1)));
|
|
18243
|
-
container[property] = location;
|
|
18244
|
-
|
|
18245
|
-
// Allow for some jitter if target time has elapsed
|
|
18246
|
-
if (progress >= 1 && Math.abs(location - container[property]) < 10) {
|
|
18247
|
-
return resolve(targetLocation);
|
|
18248
|
-
} else if (progress > 2) {
|
|
18249
|
-
// The target might not be reachable
|
|
18250
|
-
consoleWarn('Scroll target is not reachable');
|
|
18251
|
-
return resolve(container[property]);
|
|
18252
|
-
}
|
|
18253
|
-
requestAnimationFrame(step);
|
|
18254
|
-
}));
|
|
18255
|
-
}
|
|
18256
|
-
function useGoTo() {
|
|
18257
|
-
let _options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
18258
|
-
const goTo = inject$1(GoToSymbol);
|
|
18259
|
-
if (!goTo) throw new Error('[Vuetify] Could not find injected goto instance');
|
|
18260
|
-
async function go(target, options) {
|
|
18261
|
-
return scrollTo(target, mergeDeep(_options, options), false, goTo);
|
|
18262
|
-
}
|
|
18263
|
-
go.horizontal = async (target, options) => {
|
|
18264
|
-
return scrollTo(target, mergeDeep(_options, options), true, goTo);
|
|
18265
|
-
};
|
|
18266
|
-
return go;
|
|
18267
|
-
}
|
|
18268
|
-
|
|
18269
18378
|
// Composables
|
|
18270
18379
|
|
|
18271
18380
|
// Types
|
|
@@ -19416,6 +19525,7 @@ const makeVDataTableHeadersProps = propsFactory({
|
|
|
19416
19525
|
headerProps: {
|
|
19417
19526
|
type: Object
|
|
19418
19527
|
},
|
|
19528
|
+
...makeDisplayProps(),
|
|
19419
19529
|
...makeLoaderProps()
|
|
19420
19530
|
}, 'VDataTableHeaders');
|
|
19421
19531
|
const VDataTableHeaders = genericComponent()({
|
|
@@ -19425,6 +19535,9 @@ const VDataTableHeaders = genericComponent()({
|
|
|
19425
19535
|
let {
|
|
19426
19536
|
slots
|
|
19427
19537
|
} = _ref;
|
|
19538
|
+
const {
|
|
19539
|
+
t
|
|
19540
|
+
} = useLocale();
|
|
19428
19541
|
const {
|
|
19429
19542
|
toggleSort,
|
|
19430
19543
|
sortBy,
|
|
@@ -19460,6 +19573,10 @@ const VDataTableHeaders = genericComponent()({
|
|
|
19460
19573
|
backgroundColorClasses,
|
|
19461
19574
|
backgroundColorStyles
|
|
19462
19575
|
} = useBackgroundColor(props, 'color');
|
|
19576
|
+
const {
|
|
19577
|
+
displayClasses,
|
|
19578
|
+
mobile
|
|
19579
|
+
} = useDisplay(props);
|
|
19463
19580
|
const slotProps = computed(() => ({
|
|
19464
19581
|
headers: headers.value,
|
|
19465
19582
|
columns: columns.value,
|
|
@@ -19471,6 +19588,9 @@ const VDataTableHeaders = genericComponent()({
|
|
|
19471
19588
|
selectAll,
|
|
19472
19589
|
getSortIcon
|
|
19473
19590
|
}));
|
|
19591
|
+
const headerCellClasses = computed(() => ['v-data-table__th', {
|
|
19592
|
+
'v-data-table__th--sticky': props.sticky
|
|
19593
|
+
}, displayClasses.value, loaderClasses.value]);
|
|
19474
19594
|
const VDataTableHeaderCell = _ref2 => {
|
|
19475
19595
|
let {
|
|
19476
19596
|
column,
|
|
@@ -19482,12 +19602,11 @@ const VDataTableHeaders = genericComponent()({
|
|
|
19482
19602
|
return createVNode(VDataTableColumn, mergeProps({
|
|
19483
19603
|
"tag": "th",
|
|
19484
19604
|
"align": column.align,
|
|
19485
|
-
"class": [
|
|
19605
|
+
"class": [{
|
|
19486
19606
|
'v-data-table__th--sortable': column.sortable,
|
|
19487
19607
|
'v-data-table__th--sorted': isSorted(column),
|
|
19488
|
-
'v-data-table__th--fixed': column.fixed
|
|
19489
|
-
|
|
19490
|
-
}, loaderClasses.value],
|
|
19608
|
+
'v-data-table__th--fixed': column.fixed
|
|
19609
|
+
}, ...headerCellClasses.value],
|
|
19491
19610
|
"style": {
|
|
19492
19611
|
width: convertToUnit(column.width),
|
|
19493
19612
|
minWidth: convertToUnit(column.minWidth),
|
|
@@ -19536,8 +19655,53 @@ const VDataTableHeaders = genericComponent()({
|
|
|
19536
19655
|
}
|
|
19537
19656
|
});
|
|
19538
19657
|
};
|
|
19658
|
+
const VDataTableMobileHeaderCell = () => {
|
|
19659
|
+
const headerProps = mergeProps(props.headerProps ?? {} ?? {});
|
|
19660
|
+
const displayItems = computed(() => {
|
|
19661
|
+
return columns.value.filter(column => column?.sortable);
|
|
19662
|
+
});
|
|
19663
|
+
const appendIcon = computed(() => {
|
|
19664
|
+
return allSelected.value ? '$checkboxOn' : someSelected.value ? '$checkboxIndeterminate' : '$checkboxOff';
|
|
19665
|
+
});
|
|
19666
|
+
return createVNode(VDataTableColumn, mergeProps({
|
|
19667
|
+
"tag": "th",
|
|
19668
|
+
"class": [...headerCellClasses.value],
|
|
19669
|
+
"colspan": headers.value.length + 1
|
|
19670
|
+
}, headerProps), {
|
|
19671
|
+
default: () => [createVNode("div", {
|
|
19672
|
+
"class": "v-data-table-header__content"
|
|
19673
|
+
}, [createVNode(VSelect, {
|
|
19674
|
+
"chips": true,
|
|
19675
|
+
"class": "v-data-table__td-sort-select",
|
|
19676
|
+
"clearable": true,
|
|
19677
|
+
"density": "default",
|
|
19678
|
+
"items": displayItems.value,
|
|
19679
|
+
"label": t('$vuetify.dataTable.sortBy'),
|
|
19680
|
+
"multiple": props.multiSort,
|
|
19681
|
+
"variant": "underlined",
|
|
19682
|
+
"onClick:clear": () => sortBy.value = [],
|
|
19683
|
+
"appendIcon": appendIcon.value,
|
|
19684
|
+
"onClick:append": () => selectAll(!allSelected.value)
|
|
19685
|
+
}, {
|
|
19686
|
+
...slots,
|
|
19687
|
+
chip: props => createVNode(VChip, {
|
|
19688
|
+
"onClick": props.item.raw?.sortable ? () => toggleSort(props.item.raw) : undefined,
|
|
19689
|
+
"onMousedown": e => {
|
|
19690
|
+
e.preventDefault();
|
|
19691
|
+
e.stopPropagation();
|
|
19692
|
+
}
|
|
19693
|
+
}, {
|
|
19694
|
+
default: () => [props.item.title, createVNode(VIcon, {
|
|
19695
|
+
"class": ['v-data-table__td-sort-icon', isSorted(props.item.raw) && 'v-data-table__td-sort-icon-active'],
|
|
19696
|
+
"icon": getSortIcon(props.item.raw),
|
|
19697
|
+
"size": "small"
|
|
19698
|
+
}, null)]
|
|
19699
|
+
})
|
|
19700
|
+
})])]
|
|
19701
|
+
});
|
|
19702
|
+
};
|
|
19539
19703
|
useRender(() => {
|
|
19540
|
-
return createVNode(Fragment, null, [slots.headers ? slots.headers(slotProps.value) : headers.value.map((row, y) => createVNode("tr", null, [row.map((column, x) => createVNode(VDataTableHeaderCell, {
|
|
19704
|
+
return mobile.value ? createVNode("tr", null, [createVNode(VDataTableMobileHeaderCell, null, null)]) : createVNode(Fragment, null, [slots.headers ? slots.headers(slotProps.value) : headers.value.map((row, y) => createVNode("tr", null, [row.map((column, x) => createVNode(VDataTableHeaderCell, {
|
|
19541
19705
|
"column": column,
|
|
19542
19706
|
"x": x,
|
|
19543
19707
|
"y": y
|
|
@@ -19645,7 +19809,8 @@ const makeVDataTableRowProps = propsFactory({
|
|
|
19645
19809
|
cellProps: [Object, Function],
|
|
19646
19810
|
onClick: EventProp(),
|
|
19647
19811
|
onContextmenu: EventProp(),
|
|
19648
|
-
onDblclick: EventProp()
|
|
19812
|
+
onDblclick: EventProp(),
|
|
19813
|
+
...makeDisplayProps()
|
|
19649
19814
|
}, 'VDataTableRow');
|
|
19650
19815
|
const VDataTableRow = genericComponent()({
|
|
19651
19816
|
name: 'VDataTableRow',
|
|
@@ -19654,27 +19819,40 @@ const VDataTableRow = genericComponent()({
|
|
|
19654
19819
|
let {
|
|
19655
19820
|
slots
|
|
19656
19821
|
} = _ref;
|
|
19822
|
+
const {
|
|
19823
|
+
displayClasses,
|
|
19824
|
+
mobile
|
|
19825
|
+
} = useDisplay(props, 'v-data-table__tr');
|
|
19657
19826
|
const {
|
|
19658
19827
|
isSelected,
|
|
19659
|
-
toggleSelect
|
|
19828
|
+
toggleSelect,
|
|
19829
|
+
someSelected,
|
|
19830
|
+
allSelected,
|
|
19831
|
+
selectAll
|
|
19660
19832
|
} = useSelection();
|
|
19661
19833
|
const {
|
|
19662
19834
|
isExpanded,
|
|
19663
19835
|
toggleExpand
|
|
19664
19836
|
} = useExpanded();
|
|
19837
|
+
const {
|
|
19838
|
+
toggleSort,
|
|
19839
|
+
sortBy,
|
|
19840
|
+
isSorted
|
|
19841
|
+
} = useSort();
|
|
19665
19842
|
const {
|
|
19666
19843
|
columns
|
|
19667
19844
|
} = useHeaders();
|
|
19668
19845
|
useRender(() => createVNode("tr", {
|
|
19669
19846
|
"class": ['v-data-table__tr', {
|
|
19670
19847
|
'v-data-table__tr--clickable': !!(props.onClick || props.onContextmenu || props.onDblclick)
|
|
19671
|
-
}],
|
|
19848
|
+
}, displayClasses.value],
|
|
19672
19849
|
"onClick": props.onClick,
|
|
19673
19850
|
"onContextmenu": props.onContextmenu,
|
|
19674
19851
|
"onDblclick": props.onDblclick
|
|
19675
19852
|
}, [props.item && columns.value.map((column, i) => {
|
|
19676
19853
|
const item = props.item;
|
|
19677
19854
|
const slotName = `item.${column.key}`;
|
|
19855
|
+
const headerSlotName = `header.${column.key}`;
|
|
19678
19856
|
const slotProps = {
|
|
19679
19857
|
index: props.index,
|
|
19680
19858
|
item: item.raw,
|
|
@@ -19686,6 +19864,16 @@ const VDataTableRow = genericComponent()({
|
|
|
19686
19864
|
isExpanded,
|
|
19687
19865
|
toggleExpand
|
|
19688
19866
|
};
|
|
19867
|
+
const columnSlotProps = {
|
|
19868
|
+
column,
|
|
19869
|
+
selectAll,
|
|
19870
|
+
isSorted,
|
|
19871
|
+
toggleSort,
|
|
19872
|
+
sortBy: sortBy.value,
|
|
19873
|
+
someSelected: someSelected.value,
|
|
19874
|
+
allSelected: allSelected.value,
|
|
19875
|
+
getSortIcon: () => ''
|
|
19876
|
+
};
|
|
19689
19877
|
const cellProps = typeof props.cellProps === 'function' ? props.cellProps({
|
|
19690
19878
|
index: slotProps.index,
|
|
19691
19879
|
item: slotProps.item,
|
|
@@ -19701,16 +19889,20 @@ const VDataTableRow = genericComponent()({
|
|
|
19701
19889
|
}) : column.cellProps;
|
|
19702
19890
|
return createVNode(VDataTableColumn, mergeProps({
|
|
19703
19891
|
"align": column.align,
|
|
19892
|
+
"class": {
|
|
19893
|
+
'v-data-table__td--expanded-row': column.key === 'data-table-expand',
|
|
19894
|
+
'v-data-table__td--select-row': column.key === 'data-table-select'
|
|
19895
|
+
},
|
|
19704
19896
|
"fixed": column.fixed,
|
|
19705
19897
|
"fixedOffset": column.fixedOffset,
|
|
19706
19898
|
"lastFixed": column.lastFixed,
|
|
19899
|
+
"maxWidth": !mobile.value ? column.maxWidth : undefined,
|
|
19707
19900
|
"noPadding": column.key === 'data-table-select' || column.key === 'data-table-expand',
|
|
19708
|
-
"
|
|
19709
|
-
"
|
|
19710
|
-
"nowrap": column.nowrap
|
|
19901
|
+
"nowrap": column.nowrap,
|
|
19902
|
+
"width": !mobile.value ? column.width : undefined
|
|
19711
19903
|
}, cellProps, columnCellProps), {
|
|
19712
19904
|
default: () => {
|
|
19713
|
-
if (slots[slotName]) return slots[slotName](slotProps);
|
|
19905
|
+
if (slots[slotName] && !mobile.value) return slots[slotName]?.(slotProps);
|
|
19714
19906
|
if (column.key === 'data-table-select') {
|
|
19715
19907
|
return slots['item.data-table-select']?.(slotProps) ?? createVNode(VCheckboxBtn, {
|
|
19716
19908
|
"disabled": !item.selectable,
|
|
@@ -19726,7 +19918,12 @@ const VDataTableRow = genericComponent()({
|
|
|
19726
19918
|
"onClick": withModifiers(() => toggleExpand(item), ['stop'])
|
|
19727
19919
|
}, null);
|
|
19728
19920
|
}
|
|
19729
|
-
|
|
19921
|
+
const displayValue = toDisplayString(slotProps.value);
|
|
19922
|
+
return !mobile.value ? displayValue : createVNode(Fragment, null, [createVNode("div", {
|
|
19923
|
+
"class": "v-data-table__td-title"
|
|
19924
|
+
}, [slots[headerSlotName]?.(columnSlotProps) ?? column.title]), createVNode("div", {
|
|
19925
|
+
"class": "v-data-table__td-value"
|
|
19926
|
+
}, [slots[slotName]?.(slotProps) ?? displayValue])]);
|
|
19730
19927
|
}
|
|
19731
19928
|
});
|
|
19732
19929
|
})]));
|
|
@@ -19751,7 +19948,8 @@ const makeVDataTableRowsProps = propsFactory({
|
|
|
19751
19948
|
default: '$vuetify.noDataText'
|
|
19752
19949
|
},
|
|
19753
19950
|
rowProps: [Object, Function],
|
|
19754
|
-
cellProps: [Object, Function]
|
|
19951
|
+
cellProps: [Object, Function],
|
|
19952
|
+
...makeDisplayProps()
|
|
19755
19953
|
}, 'VDataTableRows');
|
|
19756
19954
|
const VDataTableRows = genericComponent()({
|
|
19757
19955
|
name: 'VDataTableRows',
|
|
@@ -19781,6 +19979,9 @@ const VDataTableRows = genericComponent()({
|
|
|
19781
19979
|
const {
|
|
19782
19980
|
t
|
|
19783
19981
|
} = useLocale();
|
|
19982
|
+
const {
|
|
19983
|
+
mobile
|
|
19984
|
+
} = useDisplay(props);
|
|
19784
19985
|
useRender(() => {
|
|
19785
19986
|
if (props.loading && (!props.items.length || slots.loading)) {
|
|
19786
19987
|
return createVNode("tr", {
|
|
@@ -19835,7 +20036,8 @@ const VDataTableRows = genericComponent()({
|
|
|
19835
20036
|
} : undefined,
|
|
19836
20037
|
index,
|
|
19837
20038
|
item,
|
|
19838
|
-
cellProps: props.cellProps
|
|
20039
|
+
cellProps: props.cellProps,
|
|
20040
|
+
mobile: mobile.value
|
|
19839
20041
|
}, getPrefixedEventHandlers(attrs, ':row', () => slotProps), typeof props.rowProps === 'function' ? props.rowProps({
|
|
19840
20042
|
item: slotProps.item,
|
|
19841
20043
|
index: slotProps.index,
|
|
@@ -21662,8 +21864,18 @@ const VDatePicker = genericComponent()({
|
|
|
21662
21864
|
emit('update:year', value);
|
|
21663
21865
|
}
|
|
21664
21866
|
watch(model, (val, oldVal) => {
|
|
21665
|
-
const before = adapter.date(wrapInArray(
|
|
21666
|
-
const after = adapter.date(wrapInArray(
|
|
21867
|
+
const before = adapter.date(wrapInArray(oldVal)[oldVal.length - 1]);
|
|
21868
|
+
const after = adapter.date(wrapInArray(val)[val.length - 1]);
|
|
21869
|
+
const newMonth = adapter.getMonth(after);
|
|
21870
|
+
const newYear = adapter.getYear(after);
|
|
21871
|
+
if (newMonth !== month.value) {
|
|
21872
|
+
month.value = newMonth;
|
|
21873
|
+
onUpdateMonth(month.value);
|
|
21874
|
+
}
|
|
21875
|
+
if (newYear !== year.value) {
|
|
21876
|
+
year.value = newYear;
|
|
21877
|
+
onUpdateYear(year.value);
|
|
21878
|
+
}
|
|
21667
21879
|
isReversing.value = adapter.isBefore(before, after);
|
|
21668
21880
|
});
|
|
21669
21881
|
useRender(() => {
|
|
@@ -22006,7 +22218,7 @@ const makeVFileInputProps = propsFactory({
|
|
|
22006
22218
|
}),
|
|
22007
22219
|
modelValue: {
|
|
22008
22220
|
type: [Array, Object],
|
|
22009
|
-
default:
|
|
22221
|
+
default: props => props.multiple ? [] : null,
|
|
22010
22222
|
validator: val => {
|
|
22011
22223
|
return wrapInArray(val).every(v => v != null && typeof v === 'object');
|
|
22012
22224
|
}
|
|
@@ -22665,6 +22877,7 @@ const VKbd = createSimpleFunctional('v-kbd');
|
|
|
22665
22877
|
|
|
22666
22878
|
const makeVLayoutProps = propsFactory({
|
|
22667
22879
|
...makeComponentProps(),
|
|
22880
|
+
...makeDimensionProps(),
|
|
22668
22881
|
...makeLayoutProps()
|
|
22669
22882
|
}, 'VLayout');
|
|
22670
22883
|
const VLayout = genericComponent()({
|
|
@@ -22681,10 +22894,13 @@ const VLayout = genericComponent()({
|
|
|
22681
22894
|
items,
|
|
22682
22895
|
layoutRef
|
|
22683
22896
|
} = createLayout(props);
|
|
22897
|
+
const {
|
|
22898
|
+
dimensionStyles
|
|
22899
|
+
} = useDimension(props);
|
|
22684
22900
|
useRender(() => createVNode("div", {
|
|
22685
22901
|
"ref": layoutRef,
|
|
22686
22902
|
"class": [layoutClasses.value, props.class],
|
|
22687
|
-
"style": [layoutStyles.value, props.style]
|
|
22903
|
+
"style": [dimensionStyles.value, layoutStyles.value, props.style]
|
|
22688
22904
|
}, [createVNode(Suspense, null, {
|
|
22689
22905
|
default: () => [createVNode(Fragment, null, [slots.default?.()])]
|
|
22690
22906
|
})]));
|
|
@@ -23047,6 +23263,7 @@ function oops$1() {
|
|
|
23047
23263
|
|
|
23048
23264
|
function useTouch(_ref) {
|
|
23049
23265
|
let {
|
|
23266
|
+
el,
|
|
23050
23267
|
isActive,
|
|
23051
23268
|
isTemporary,
|
|
23052
23269
|
width,
|
|
@@ -23096,10 +23313,10 @@ function useTouch(_ref) {
|
|
|
23096
23313
|
const inTouchZone = position.value === 'left' ? touchX < touchZone : position.value === 'right' ? touchX > document.documentElement.clientWidth - touchZone : position.value === 'top' ? touchY < touchZone : position.value === 'bottom' ? touchY > document.documentElement.clientHeight - touchZone : oops();
|
|
23097
23314
|
const inElement = isActive.value && (position.value === 'left' ? touchX < width.value : position.value === 'right' ? touchX > document.documentElement.clientWidth - width.value : position.value === 'top' ? touchY < width.value : position.value === 'bottom' ? touchY > document.documentElement.clientHeight - width.value : oops());
|
|
23098
23315
|
if (inTouchZone || inElement || isActive.value && isTemporary.value) {
|
|
23099
|
-
maybeDragging = true;
|
|
23100
23316
|
start = [touchX, touchY];
|
|
23101
23317
|
offset.value = getOffset(isHorizontal.value ? touchX : touchY, isActive.value);
|
|
23102
23318
|
dragProgress.value = getProgress(isHorizontal.value ? touchX : touchY);
|
|
23319
|
+
maybeDragging = offset.value > -20 && offset.value < 80;
|
|
23103
23320
|
endTouch(e);
|
|
23104
23321
|
addMovement(e);
|
|
23105
23322
|
}
|
|
@@ -23159,6 +23376,18 @@ function useTouch(_ref) {
|
|
|
23159
23376
|
transition: 'none'
|
|
23160
23377
|
} : undefined;
|
|
23161
23378
|
});
|
|
23379
|
+
useToggleScope(isDragging, () => {
|
|
23380
|
+
const transform = el.value?.style.transform ?? null;
|
|
23381
|
+
const transition = el.value?.style.transition ?? null;
|
|
23382
|
+
watchEffect(() => {
|
|
23383
|
+
el.value?.style.setProperty('transform', dragStyles.value?.transform || 'none');
|
|
23384
|
+
el.value?.style.setProperty('transition', dragStyles.value?.transition || null);
|
|
23385
|
+
});
|
|
23386
|
+
onScopeDispose(() => {
|
|
23387
|
+
el.value?.style.setProperty('transform', transform);
|
|
23388
|
+
el.value?.style.setProperty('transition', transition);
|
|
23389
|
+
});
|
|
23390
|
+
});
|
|
23162
23391
|
return {
|
|
23163
23392
|
isDragging,
|
|
23164
23393
|
dragProgress,
|
|
@@ -23197,6 +23426,7 @@ const makeVNavigationDrawerProps = propsFactory({
|
|
|
23197
23426
|
},
|
|
23198
23427
|
image: String,
|
|
23199
23428
|
temporary: Boolean,
|
|
23429
|
+
persistent: Boolean,
|
|
23200
23430
|
touchless: Boolean,
|
|
23201
23431
|
width: {
|
|
23202
23432
|
type: [Number, String],
|
|
@@ -23278,6 +23508,7 @@ const VNavigationDrawer = genericComponent()({
|
|
|
23278
23508
|
const location = computed(() => {
|
|
23279
23509
|
return toPhysical(props.location, isRtl.value);
|
|
23280
23510
|
});
|
|
23511
|
+
const isPersistent = computed(() => props.persistent);
|
|
23281
23512
|
const isTemporary = computed(() => !props.permanent && (mobile.value || props.temporary));
|
|
23282
23513
|
const isSticky = computed(() => props.sticky && !isTemporary.value && location.value !== 'bottom');
|
|
23283
23514
|
useToggleScope(() => props.expandOnHover && props.rail != null, () => {
|
|
@@ -23297,9 +23528,9 @@ const VNavigationDrawer = genericComponent()({
|
|
|
23297
23528
|
}
|
|
23298
23529
|
const {
|
|
23299
23530
|
isDragging,
|
|
23300
|
-
dragProgress
|
|
23301
|
-
dragStyles
|
|
23531
|
+
dragProgress
|
|
23302
23532
|
} = useTouch({
|
|
23533
|
+
el: rootEl,
|
|
23303
23534
|
isActive,
|
|
23304
23535
|
isTemporary,
|
|
23305
23536
|
width,
|
|
@@ -23310,6 +23541,7 @@ const VNavigationDrawer = genericComponent()({
|
|
|
23310
23541
|
const size = isTemporary.value ? 0 : props.rail && props.expandOnHover ? Number(props.railWidth) : width.value;
|
|
23311
23542
|
return isDragging.value ? size * dragProgress.value : size;
|
|
23312
23543
|
});
|
|
23544
|
+
const elementSize = computed(() => ['top', 'bottom'].includes(props.location) ? 0 : width.value);
|
|
23313
23545
|
const {
|
|
23314
23546
|
layoutItemStyles,
|
|
23315
23547
|
layoutItemScrimStyles,
|
|
@@ -23319,7 +23551,7 @@ const VNavigationDrawer = genericComponent()({
|
|
|
23319
23551
|
order: computed(() => parseInt(props.order, 10)),
|
|
23320
23552
|
position: location,
|
|
23321
23553
|
layoutSize,
|
|
23322
|
-
elementSize
|
|
23554
|
+
elementSize,
|
|
23323
23555
|
active: computed(() => isActive.value || isDragging.value),
|
|
23324
23556
|
disableTransitions: computed(() => isDragging.value),
|
|
23325
23557
|
absolute: computed(() =>
|
|
@@ -23361,10 +23593,13 @@ const VNavigationDrawer = genericComponent()({
|
|
|
23361
23593
|
'v-navigation-drawer--is-hovering': isHovering.value,
|
|
23362
23594
|
'v-navigation-drawer--rail': props.rail,
|
|
23363
23595
|
'v-navigation-drawer--temporary': isTemporary.value,
|
|
23596
|
+
'v-navigation-drawer--persistent': isPersistent.value,
|
|
23364
23597
|
'v-navigation-drawer--active': isActive.value,
|
|
23365
23598
|
'v-navigation-drawer--sticky': isSticky.value
|
|
23366
23599
|
}, themeClasses.value, backgroundColorClasses.value, borderClasses.value, displayClasses.value, elevationClasses.value, roundedClasses.value, props.class],
|
|
23367
|
-
"style": [backgroundColorStyles.value, layoutItemStyles.value,
|
|
23600
|
+
"style": [backgroundColorStyles.value, layoutItemStyles.value, ssrBootStyles.value, stickyStyles.value, props.style, ['top', 'bottom'].includes(location.value) ? {
|
|
23601
|
+
height: 'auto'
|
|
23602
|
+
} : {}]
|
|
23368
23603
|
}, scopeId, attrs), {
|
|
23369
23604
|
default: () => [hasImage && createVNode("div", {
|
|
23370
23605
|
"key": "image",
|
|
@@ -23399,7 +23634,10 @@ const VNavigationDrawer = genericComponent()({
|
|
|
23399
23634
|
default: () => [isTemporary.value && (isDragging.value || isActive.value) && !!props.scrim && createVNode("div", mergeProps({
|
|
23400
23635
|
"class": ['v-navigation-drawer__scrim', scrimColor.backgroundColorClasses.value],
|
|
23401
23636
|
"style": [scrimStyles.value, scrimColor.backgroundColorStyles.value],
|
|
23402
|
-
"onClick": () =>
|
|
23637
|
+
"onClick": () => {
|
|
23638
|
+
if (isPersistent.value) return;
|
|
23639
|
+
isActive.value = false;
|
|
23640
|
+
}
|
|
23403
23641
|
}, scopeId), null)]
|
|
23404
23642
|
})]);
|
|
23405
23643
|
});
|
|
@@ -23880,8 +24118,8 @@ const VRangeSlider = genericComponent()({
|
|
|
23880
24118
|
} = useRtl();
|
|
23881
24119
|
function getActiveThumb(e) {
|
|
23882
24120
|
if (!startThumbRef.value || !stopThumbRef.value) return;
|
|
23883
|
-
const startOffset = getOffset
|
|
23884
|
-
const stopOffset = getOffset
|
|
24121
|
+
const startOffset = getOffset(e, startThumbRef.value.$el, props.direction);
|
|
24122
|
+
const stopOffset = getOffset(e, stopThumbRef.value.$el, props.direction);
|
|
23885
24123
|
const a = Math.abs(startOffset);
|
|
23886
24124
|
const b = Math.abs(stopOffset);
|
|
23887
24125
|
return a < b || a === b && startOffset < 0 ? startThumbRef.value.$el : stopThumbRef.value.$el;
|
|
@@ -24476,9 +24714,6 @@ const VSnackbar = genericComponent()({
|
|
|
24476
24714
|
slots
|
|
24477
24715
|
} = _ref;
|
|
24478
24716
|
const isActive = useProxiedModel(props, 'modelValue');
|
|
24479
|
-
const {
|
|
24480
|
-
locationStyles
|
|
24481
|
-
} = useLocation(props);
|
|
24482
24717
|
const {
|
|
24483
24718
|
positionClasses
|
|
24484
24719
|
} = usePosition(props);
|
|
@@ -24500,6 +24735,15 @@ const VSnackbar = genericComponent()({
|
|
|
24500
24735
|
const overlay = ref();
|
|
24501
24736
|
const timerRef = ref();
|
|
24502
24737
|
const isHovering = shallowRef(false);
|
|
24738
|
+
const startY = shallowRef(0);
|
|
24739
|
+
const mainStyles = ref();
|
|
24740
|
+
const hasLayout = inject$1(VuetifyLayoutKey, undefined);
|
|
24741
|
+
useToggleScope(() => !!hasLayout, () => {
|
|
24742
|
+
const layout = useLayout();
|
|
24743
|
+
watchEffect(() => {
|
|
24744
|
+
mainStyles.value = layout.mainStyles.value;
|
|
24745
|
+
});
|
|
24746
|
+
});
|
|
24503
24747
|
watch(isActive, startTimeout);
|
|
24504
24748
|
watch(() => props.timeout, startTimeout);
|
|
24505
24749
|
onMounted(() => {
|
|
@@ -24529,6 +24773,20 @@ const VSnackbar = genericComponent()({
|
|
|
24529
24773
|
isHovering.value = false;
|
|
24530
24774
|
startTimeout();
|
|
24531
24775
|
}
|
|
24776
|
+
function onTouchstart(event) {
|
|
24777
|
+
startY.value = event.touches[0].clientY;
|
|
24778
|
+
}
|
|
24779
|
+
function onTouchend(event) {
|
|
24780
|
+
if (Math.abs(startY.value - event.changedTouches[0].clientY) > 50) {
|
|
24781
|
+
isActive.value = false;
|
|
24782
|
+
}
|
|
24783
|
+
}
|
|
24784
|
+
const locationClasses = computed(() => {
|
|
24785
|
+
return props.location.split(' ').reduce((acc, loc) => {
|
|
24786
|
+
acc[`v-snackbar--${loc}`] = true;
|
|
24787
|
+
return acc;
|
|
24788
|
+
}, {});
|
|
24789
|
+
});
|
|
24532
24790
|
useRender(() => {
|
|
24533
24791
|
const overlayProps = VOverlay.filterProps(props);
|
|
24534
24792
|
const hasContent = !!(slots.default || slots.text || props.text);
|
|
@@ -24539,14 +24797,14 @@ const VSnackbar = genericComponent()({
|
|
|
24539
24797
|
'v-snackbar--multi-line': props.multiLine && !props.vertical,
|
|
24540
24798
|
'v-snackbar--timer': !!props.timer,
|
|
24541
24799
|
'v-snackbar--vertical': props.vertical
|
|
24542
|
-
}, positionClasses.value, props.class],
|
|
24543
|
-
"style": props.style
|
|
24800
|
+
}, locationClasses.value, positionClasses.value, props.class],
|
|
24801
|
+
"style": [mainStyles.value, props.style]
|
|
24544
24802
|
}, overlayProps, {
|
|
24545
24803
|
"modelValue": isActive.value,
|
|
24546
24804
|
"onUpdate:modelValue": $event => isActive.value = $event,
|
|
24547
24805
|
"contentProps": mergeProps({
|
|
24548
24806
|
class: ['v-snackbar__wrapper', themeClasses.value, colorClasses.value, roundedClasses.value, variantClasses.value],
|
|
24549
|
-
style: [
|
|
24807
|
+
style: [colorStyles.value],
|
|
24550
24808
|
onPointerenter,
|
|
24551
24809
|
onPointerleave
|
|
24552
24810
|
}, overlayProps.contentProps),
|
|
@@ -24554,7 +24812,9 @@ const VSnackbar = genericComponent()({
|
|
|
24554
24812
|
"noClickAnimation": true,
|
|
24555
24813
|
"scrim": false,
|
|
24556
24814
|
"scrollStrategy": "none",
|
|
24557
|
-
"_disableGlobalStack": true
|
|
24815
|
+
"_disableGlobalStack": true,
|
|
24816
|
+
"onTouchstartPassive": onTouchstart,
|
|
24817
|
+
"onTouchend": onTouchend
|
|
24558
24818
|
}, scopeId), {
|
|
24559
24819
|
default: () => [genOverlays(false, 'v-snackbar'), props.timer && !isHovering.value && createVNode("div", {
|
|
24560
24820
|
"key": "timer",
|
|
@@ -26686,6 +26946,125 @@ const VConfirmEdit = genericComponent()({
|
|
|
26686
26946
|
|
|
26687
26947
|
// Types
|
|
26688
26948
|
|
|
26949
|
+
const makeVDateInputProps = propsFactory({
|
|
26950
|
+
hideActions: Boolean,
|
|
26951
|
+
...makeFocusProps(),
|
|
26952
|
+
...makeVConfirmEditProps(),
|
|
26953
|
+
...makeVTextFieldProps({
|
|
26954
|
+
placeholder: 'mm/dd/yyyy',
|
|
26955
|
+
prependIcon: '$calendar'
|
|
26956
|
+
}),
|
|
26957
|
+
...omit(makeVDatePickerProps({
|
|
26958
|
+
weeksInMonth: 'dynamic',
|
|
26959
|
+
hideHeader: true
|
|
26960
|
+
}), ['active'])
|
|
26961
|
+
}, 'VDateInput');
|
|
26962
|
+
const VDateInput = genericComponent()({
|
|
26963
|
+
name: 'VDateInput',
|
|
26964
|
+
props: makeVDateInputProps(),
|
|
26965
|
+
emits: {
|
|
26966
|
+
'update:modelValue': val => true
|
|
26967
|
+
},
|
|
26968
|
+
setup(props, _ref) {
|
|
26969
|
+
let {
|
|
26970
|
+
slots
|
|
26971
|
+
} = _ref;
|
|
26972
|
+
const {
|
|
26973
|
+
t
|
|
26974
|
+
} = useLocale();
|
|
26975
|
+
const adapter = useDate();
|
|
26976
|
+
const {
|
|
26977
|
+
isFocused,
|
|
26978
|
+
focus,
|
|
26979
|
+
blur
|
|
26980
|
+
} = useFocus(props);
|
|
26981
|
+
const model = useProxiedModel(props, 'modelValue', props.multiple ? [] : null);
|
|
26982
|
+
const menu = shallowRef(false);
|
|
26983
|
+
const display = computed(() => {
|
|
26984
|
+
const value = wrapInArray(model.value);
|
|
26985
|
+
if (!value.length) return null;
|
|
26986
|
+
if (props.multiple === true) {
|
|
26987
|
+
return t('$vuetify.datePicker.itemsSelected', value.length);
|
|
26988
|
+
}
|
|
26989
|
+
if (props.multiple === 'range') {
|
|
26990
|
+
const start = value[0];
|
|
26991
|
+
const end = value[value.length - 1];
|
|
26992
|
+
return adapter.isValid(start) && adapter.isValid(end) ? `${adapter.format(start, 'keyboardDate')} - ${adapter.format(end, 'keyboardDate')}` : '';
|
|
26993
|
+
}
|
|
26994
|
+
return adapter.isValid(model.value) ? adapter.format(model.value, 'keyboardDate') : '';
|
|
26995
|
+
});
|
|
26996
|
+
function onKeydown(e) {
|
|
26997
|
+
if (e.key !== 'Enter') return;
|
|
26998
|
+
if (!menu.value || !isFocused.value) {
|
|
26999
|
+
menu.value = true;
|
|
27000
|
+
return;
|
|
27001
|
+
}
|
|
27002
|
+
const target = e.target;
|
|
27003
|
+
model.value = adapter.date(target.value);
|
|
27004
|
+
}
|
|
27005
|
+
function onClick(e) {
|
|
27006
|
+
e.preventDefault();
|
|
27007
|
+
e.stopPropagation();
|
|
27008
|
+
menu.value = true;
|
|
27009
|
+
}
|
|
27010
|
+
function onSave() {
|
|
27011
|
+
menu.value = false;
|
|
27012
|
+
}
|
|
27013
|
+
useRender(() => {
|
|
27014
|
+
const confirmEditProps = VConfirmEdit.filterProps(props);
|
|
27015
|
+
const datePickerProps = VDatePicker.filterProps(omit(props, ['active']));
|
|
27016
|
+
const textFieldProps = VTextField.filterProps(props);
|
|
27017
|
+
return createVNode(VTextField, mergeProps(textFieldProps, {
|
|
27018
|
+
"modelValue": display.value,
|
|
27019
|
+
"onKeydown": onKeydown,
|
|
27020
|
+
"focused": menu.value || isFocused.value,
|
|
27021
|
+
"onFocus": focus,
|
|
27022
|
+
"onBlur": blur,
|
|
27023
|
+
"onClick:control": onClick,
|
|
27024
|
+
"onClick:prepend": onClick
|
|
27025
|
+
}), {
|
|
27026
|
+
default: () => [createVNode(VMenu, {
|
|
27027
|
+
"modelValue": menu.value,
|
|
27028
|
+
"onUpdate:modelValue": $event => menu.value = $event,
|
|
27029
|
+
"activator": "parent",
|
|
27030
|
+
"min-width": "0",
|
|
27031
|
+
"closeOnContentClick": false,
|
|
27032
|
+
"openOnClick": false
|
|
27033
|
+
}, {
|
|
27034
|
+
default: () => [createVNode(VConfirmEdit, mergeProps(confirmEditProps, {
|
|
27035
|
+
"modelValue": model.value,
|
|
27036
|
+
"onUpdate:modelValue": $event => model.value = $event,
|
|
27037
|
+
"onSave": onSave
|
|
27038
|
+
}), {
|
|
27039
|
+
default: _ref2 => {
|
|
27040
|
+
let {
|
|
27041
|
+
actions,
|
|
27042
|
+
model: proxyModel
|
|
27043
|
+
} = _ref2;
|
|
27044
|
+
return createVNode(VDatePicker, mergeProps(datePickerProps, {
|
|
27045
|
+
"modelValue": props.hideActions ? model.value : proxyModel.value,
|
|
27046
|
+
"onUpdate:modelValue": val => {
|
|
27047
|
+
if (!props.hideActions) {
|
|
27048
|
+
proxyModel.value = val;
|
|
27049
|
+
} else {
|
|
27050
|
+
model.value = val;
|
|
27051
|
+
if (!props.multiple) menu.value = false;
|
|
27052
|
+
}
|
|
27053
|
+
},
|
|
27054
|
+
"onMousedown": e => e.preventDefault()
|
|
27055
|
+
}), {
|
|
27056
|
+
actions: !props.hideActions ? () => actions : undefined
|
|
27057
|
+
});
|
|
27058
|
+
}
|
|
27059
|
+
})]
|
|
27060
|
+
}), slots.default?.()]
|
|
27061
|
+
});
|
|
27062
|
+
});
|
|
27063
|
+
}
|
|
27064
|
+
});
|
|
27065
|
+
|
|
27066
|
+
// Types
|
|
27067
|
+
|
|
26689
27068
|
// Types
|
|
26690
27069
|
|
|
26691
27070
|
const makeVEmptyStateProps = propsFactory({
|
|
@@ -26823,6 +27202,7 @@ const makeVFabProps = propsFactory({
|
|
|
26823
27202
|
app: Boolean,
|
|
26824
27203
|
appear: Boolean,
|
|
26825
27204
|
extended: Boolean,
|
|
27205
|
+
layout: Boolean,
|
|
26826
27206
|
location: {
|
|
26827
27207
|
type: String,
|
|
26828
27208
|
default: 'bottom end'
|
|
@@ -26873,8 +27253,8 @@ const VFab = genericComponent()({
|
|
|
26873
27253
|
id: props.name,
|
|
26874
27254
|
order: computed(() => parseInt(props.order, 10)),
|
|
26875
27255
|
position,
|
|
26876
|
-
layoutSize: height,
|
|
26877
|
-
elementSize: computed(() => height.value +
|
|
27256
|
+
layoutSize: computed(() => props.layout ? height.value + 24 : 0),
|
|
27257
|
+
elementSize: computed(() => height.value + 24),
|
|
26878
27258
|
active: computed(() => props.app && model.value),
|
|
26879
27259
|
absolute: toRef(props, 'absolute')
|
|
26880
27260
|
});
|
|
@@ -26928,9 +27308,18 @@ const makeVNumberInputProps = propsFactory({
|
|
|
26928
27308
|
},
|
|
26929
27309
|
inset: Boolean,
|
|
26930
27310
|
hideInput: Boolean,
|
|
26931
|
-
min:
|
|
26932
|
-
|
|
26933
|
-
|
|
27311
|
+
min: {
|
|
27312
|
+
type: Number,
|
|
27313
|
+
default: -Infinity
|
|
27314
|
+
},
|
|
27315
|
+
max: {
|
|
27316
|
+
type: Number,
|
|
27317
|
+
default: Infinity
|
|
27318
|
+
},
|
|
27319
|
+
step: {
|
|
27320
|
+
type: Number,
|
|
27321
|
+
default: 1
|
|
27322
|
+
},
|
|
26934
27323
|
...only(makeVInputProps(), ['density', 'disabled', 'focused', 'hideDetails', 'hint', 'label', 'persistentHint', 'readonly']),
|
|
26935
27324
|
...only(makeVFieldProps(), ['baseColor', 'bgColor', 'class', 'color', 'disabled', 'error', 'loading', 'reverse', 'rounded', 'style', 'theme', 'variant']),
|
|
26936
27325
|
...makeFocusProps()
|
|
@@ -26941,8 +27330,8 @@ const VNumberInput = genericComponent()({
|
|
|
26941
27330
|
props: {
|
|
26942
27331
|
...makeVNumberInputProps(),
|
|
26943
27332
|
modelValue: {
|
|
26944
|
-
type:
|
|
26945
|
-
default:
|
|
27333
|
+
type: Number,
|
|
27334
|
+
default: undefined
|
|
26946
27335
|
}
|
|
26947
27336
|
},
|
|
26948
27337
|
emits: {
|
|
@@ -26961,20 +27350,45 @@ const VNumberInput = genericComponent()({
|
|
|
26961
27350
|
blur
|
|
26962
27351
|
} = useFocus(props);
|
|
26963
27352
|
const inputRef = ref();
|
|
27353
|
+
const stepDecimals = computed(() => getDecimals(props.step));
|
|
27354
|
+
const modelDecimals = computed(() => model.value != null ? getDecimals(model.value) : 0);
|
|
27355
|
+
const canIncrease = computed(() => {
|
|
27356
|
+
if (model.value == null) return true;
|
|
27357
|
+
return model.value + props.step <= props.max;
|
|
27358
|
+
});
|
|
27359
|
+
const canDecrease = computed(() => {
|
|
27360
|
+
if (model.value == null) return true;
|
|
27361
|
+
return model.value - props.step >= props.min;
|
|
27362
|
+
});
|
|
27363
|
+
watchEffect(() => {
|
|
27364
|
+
if (model.value != null && (model.value < props.min || model.value > props.max)) {
|
|
27365
|
+
model.value = clamp(model.value, props.min, props.max);
|
|
27366
|
+
}
|
|
27367
|
+
});
|
|
26964
27368
|
function onFocus() {
|
|
26965
27369
|
if (!isFocused.value) focus();
|
|
26966
27370
|
}
|
|
26967
27371
|
const controlVariant = computed(() => {
|
|
26968
27372
|
return props.hideInput ? 'stacked' : props.controlVariant;
|
|
26969
27373
|
});
|
|
27374
|
+
const incrementSlotProps = computed(() => ({
|
|
27375
|
+
click: onClickUp
|
|
27376
|
+
}));
|
|
27377
|
+
const decrementSlotProps = computed(() => ({
|
|
27378
|
+
click: onClickDown
|
|
27379
|
+
}));
|
|
26970
27380
|
function toggleUpDown() {
|
|
26971
27381
|
let increment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
27382
|
+
if (model.value == null) {
|
|
27383
|
+
model.value = 0;
|
|
27384
|
+
return;
|
|
27385
|
+
}
|
|
27386
|
+
const decimals = Math.max(modelDecimals.value, stepDecimals.value);
|
|
26972
27387
|
if (increment) {
|
|
26973
|
-
|
|
27388
|
+
if (canIncrease.value) model.value = +(model.value + props.step).toFixed(decimals);
|
|
26974
27389
|
} else {
|
|
26975
|
-
|
|
27390
|
+
if (canDecrease.value) model.value = +(model.value - props.step).toFixed(decimals);
|
|
26976
27391
|
}
|
|
26977
|
-
if (inputRef.value) model.value = parseInt(inputRef.value.value, 10);
|
|
26978
27392
|
}
|
|
26979
27393
|
function onClickUp() {
|
|
26980
27394
|
toggleUpDown();
|
|
@@ -26982,12 +27396,28 @@ const VNumberInput = genericComponent()({
|
|
|
26982
27396
|
function onClickDown() {
|
|
26983
27397
|
toggleUpDown(false);
|
|
26984
27398
|
}
|
|
26985
|
-
|
|
26986
|
-
|
|
26987
|
-
|
|
26988
|
-
|
|
26989
|
-
|
|
26990
|
-
|
|
27399
|
+
function onKeydown(e) {
|
|
27400
|
+
if (['Enter', 'ArrowLeft', 'ArrowRight', 'Backspace'].includes(e.key) || e.ctrlKey) return;
|
|
27401
|
+
if (['ArrowDown'].includes(e.key)) {
|
|
27402
|
+
e.preventDefault();
|
|
27403
|
+
toggleUpDown(false);
|
|
27404
|
+
return;
|
|
27405
|
+
}
|
|
27406
|
+
if (['ArrowUp'].includes(e.key)) {
|
|
27407
|
+
e.preventDefault();
|
|
27408
|
+
toggleUpDown();
|
|
27409
|
+
return;
|
|
27410
|
+
}
|
|
27411
|
+
|
|
27412
|
+
// Only numbers, +, - & . are allowed
|
|
27413
|
+
if (!/^[0-9\-+.]+$/.test(e.key)) {
|
|
27414
|
+
e.preventDefault();
|
|
27415
|
+
}
|
|
27416
|
+
}
|
|
27417
|
+
function onInput(e) {
|
|
27418
|
+
const el = e.target;
|
|
27419
|
+
model.value = el.value ? +el.value : undefined;
|
|
27420
|
+
}
|
|
26991
27421
|
useRender(() => {
|
|
26992
27422
|
const fieldProps = filterFieldProps(props);
|
|
26993
27423
|
const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);
|
|
@@ -27000,9 +27430,11 @@ const VNumberInput = genericComponent()({
|
|
|
27000
27430
|
return createVNode("div", {
|
|
27001
27431
|
"class": "v-number-input__control"
|
|
27002
27432
|
}, [!slots.decrement ? createVNode(VBtn, {
|
|
27433
|
+
"disabled": !canDecrease.value,
|
|
27003
27434
|
"flat": true,
|
|
27004
27435
|
"key": "decrement-btn",
|
|
27005
27436
|
"height": defaultHeight,
|
|
27437
|
+
"name": "decrement-btn",
|
|
27006
27438
|
"icon": "$expand",
|
|
27007
27439
|
"size": "small",
|
|
27008
27440
|
"onClick": onClickDown
|
|
@@ -27010,6 +27442,7 @@ const VNumberInput = genericComponent()({
|
|
|
27010
27442
|
"key": "decrement-defaults",
|
|
27011
27443
|
"defaults": {
|
|
27012
27444
|
VBtn: {
|
|
27445
|
+
disabled: !canDecrease.value,
|
|
27013
27446
|
flat: true,
|
|
27014
27447
|
height: defaultHeight,
|
|
27015
27448
|
size: 'small',
|
|
@@ -27021,9 +27454,11 @@ const VNumberInput = genericComponent()({
|
|
|
27021
27454
|
}), createVNode(VDivider, {
|
|
27022
27455
|
"vertical": controlVariant.value !== 'stacked'
|
|
27023
27456
|
}, null), !slots.increment ? createVNode(VBtn, {
|
|
27457
|
+
"disabled": !canIncrease.value,
|
|
27024
27458
|
"flat": true,
|
|
27025
27459
|
"key": "increment-btn",
|
|
27026
27460
|
"height": defaultHeight,
|
|
27461
|
+
"name": "increment-btn",
|
|
27027
27462
|
"icon": "$collapse",
|
|
27028
27463
|
"onClick": onClickUp,
|
|
27029
27464
|
"size": "small"
|
|
@@ -27031,6 +27466,7 @@ const VNumberInput = genericComponent()({
|
|
|
27031
27466
|
"key": "increment-defaults",
|
|
27032
27467
|
"defaults": {
|
|
27033
27468
|
VBtn: {
|
|
27469
|
+
disabled: !canIncrease.value,
|
|
27034
27470
|
flat: true,
|
|
27035
27471
|
height: defaultHeight,
|
|
27036
27472
|
size: 'small',
|
|
@@ -27072,17 +27508,16 @@ const VNumberInput = genericComponent()({
|
|
|
27072
27508
|
...slotProps
|
|
27073
27509
|
}
|
|
27074
27510
|
} = _ref2;
|
|
27075
|
-
return
|
|
27511
|
+
return createVNode("input", mergeProps({
|
|
27076
27512
|
"ref": inputRef,
|
|
27077
|
-
"type": "
|
|
27078
|
-
"
|
|
27513
|
+
"type": "text",
|
|
27514
|
+
"value": model.value,
|
|
27515
|
+
"onInput": onInput,
|
|
27516
|
+
"onKeydown": onKeydown,
|
|
27079
27517
|
"class": fieldClass,
|
|
27080
|
-
"max": props.max,
|
|
27081
|
-
"min": props.min,
|
|
27082
|
-
"step": props.step,
|
|
27083
27518
|
"onFocus": onFocus,
|
|
27084
27519
|
"onBlur": blur
|
|
27085
|
-
}, inputAttrs), null)
|
|
27520
|
+
}, inputAttrs), null);
|
|
27086
27521
|
},
|
|
27087
27522
|
'append-inner': controlVariant.value === 'split' ? () => createVNode("div", {
|
|
27088
27523
|
"class": "v-number-input__control"
|
|
@@ -27112,6 +27547,220 @@ const VNumberInput = genericComponent()({
|
|
|
27112
27547
|
}
|
|
27113
27548
|
});
|
|
27114
27549
|
|
|
27550
|
+
const VPullToRefresh = genericComponent()({
|
|
27551
|
+
name: 'VPullToRefresh',
|
|
27552
|
+
props: {
|
|
27553
|
+
pullDownThreshold: {
|
|
27554
|
+
type: Number,
|
|
27555
|
+
default: 64
|
|
27556
|
+
}
|
|
27557
|
+
},
|
|
27558
|
+
emits: {
|
|
27559
|
+
load: options => true
|
|
27560
|
+
},
|
|
27561
|
+
setup(props, _ref) {
|
|
27562
|
+
let {
|
|
27563
|
+
slots,
|
|
27564
|
+
emit
|
|
27565
|
+
} = _ref;
|
|
27566
|
+
let touchstartY = 0;
|
|
27567
|
+
let scrollParents = [];
|
|
27568
|
+
const touchDiff = shallowRef(0);
|
|
27569
|
+
const containerRef = ref();
|
|
27570
|
+
const refreshing = shallowRef(false);
|
|
27571
|
+
const goingUp = shallowRef(false);
|
|
27572
|
+
const touching = shallowRef(false);
|
|
27573
|
+
const canRefresh = computed(() => touchDiff.value >= props.pullDownThreshold && !refreshing.value);
|
|
27574
|
+
const topOffset = computed(() => clamp(touchDiff.value, 0, props.pullDownThreshold));
|
|
27575
|
+
function onTouchstart(e) {
|
|
27576
|
+
if (refreshing.value) return;
|
|
27577
|
+
touching.value = true;
|
|
27578
|
+
touchstartY = 'clientY' in e ? e.clientY : e.touches[0].clientY;
|
|
27579
|
+
}
|
|
27580
|
+
function onTouchmove(e) {
|
|
27581
|
+
if (refreshing.value || !touching.value) return;
|
|
27582
|
+
const touchY = 'clientY' in e ? e.clientY : e.touches[0].clientY;
|
|
27583
|
+
if (scrollParents.length && !scrollParents[0].scrollTop) {
|
|
27584
|
+
touchDiff.value = touchY - touchstartY;
|
|
27585
|
+
}
|
|
27586
|
+
}
|
|
27587
|
+
function onTouchend(e) {
|
|
27588
|
+
if (refreshing.value) return;
|
|
27589
|
+
touching.value = false;
|
|
27590
|
+
if (canRefresh.value) {
|
|
27591
|
+
function done() {
|
|
27592
|
+
if (!refreshing.value) return;
|
|
27593
|
+
touchDiff.value = 0;
|
|
27594
|
+
refreshing.value = false;
|
|
27595
|
+
}
|
|
27596
|
+
emit('load', {
|
|
27597
|
+
done
|
|
27598
|
+
});
|
|
27599
|
+
refreshing.value = true;
|
|
27600
|
+
} else {
|
|
27601
|
+
touchDiff.value = 0;
|
|
27602
|
+
}
|
|
27603
|
+
}
|
|
27604
|
+
onMounted(() => {
|
|
27605
|
+
scrollParents = getScrollParents(containerRef.value);
|
|
27606
|
+
});
|
|
27607
|
+
watch([topOffset, refreshing], () => {
|
|
27608
|
+
if (scrollParents.length) {
|
|
27609
|
+
const stopScrolling = topOffset.value && !refreshing.value;
|
|
27610
|
+
scrollParents.forEach(p => p.style.overflow = stopScrolling ? 'hidden' : 'auto');
|
|
27611
|
+
}
|
|
27612
|
+
});
|
|
27613
|
+
watch(topOffset, (newVal, oldVal) => {
|
|
27614
|
+
goingUp.value = newVal < oldVal;
|
|
27615
|
+
});
|
|
27616
|
+
useRender(() => {
|
|
27617
|
+
return createVNode("div", {
|
|
27618
|
+
"class": ['v-pull-to-refresh'],
|
|
27619
|
+
"onTouchstart": onTouchstart,
|
|
27620
|
+
"onTouchmove": onTouchmove,
|
|
27621
|
+
"onTouchend": onTouchend,
|
|
27622
|
+
"onMousedown": onTouchstart,
|
|
27623
|
+
"onMouseup": onTouchend,
|
|
27624
|
+
"onMouseleave": onTouchend,
|
|
27625
|
+
"onMousemove": onTouchmove,
|
|
27626
|
+
"ref": containerRef
|
|
27627
|
+
}, [createVNode("div", {
|
|
27628
|
+
"class": ['v-pull-to-refresh__pull-down', {
|
|
27629
|
+
'v-pull-to-refresh__pull-down--touching': touching.value
|
|
27630
|
+
}],
|
|
27631
|
+
"style": {
|
|
27632
|
+
top: convertToUnit(-1 * props.pullDownThreshold + topOffset.value),
|
|
27633
|
+
height: convertToUnit(props.pullDownThreshold)
|
|
27634
|
+
}
|
|
27635
|
+
}, [slots.pullDownPanel ? slots.pullDownPanel({
|
|
27636
|
+
canRefresh: canRefresh.value,
|
|
27637
|
+
goingUp: goingUp.value,
|
|
27638
|
+
refreshing: refreshing.value
|
|
27639
|
+
}) : createVNode("div", {
|
|
27640
|
+
"class": ['v-pull-to-refresh__pull-down-default']
|
|
27641
|
+
}, [refreshing.value ? createVNode(VProgressCircular, {
|
|
27642
|
+
"indeterminate": true,
|
|
27643
|
+
"active": false
|
|
27644
|
+
}, null) : createVNode(VIcon, {
|
|
27645
|
+
"icon": canRefresh.value || goingUp.value ? '$sortAsc' : '$sortDesc'
|
|
27646
|
+
}, null)])]), createVNode("div", {
|
|
27647
|
+
"class": ['v-pull-to-refresh__scroll-container', {
|
|
27648
|
+
'v-pull-to-refresh__scroll-container--touching': touching.value
|
|
27649
|
+
}],
|
|
27650
|
+
"style": {
|
|
27651
|
+
top: convertToUnit(topOffset.value)
|
|
27652
|
+
}
|
|
27653
|
+
}, [slots.default?.()])]);
|
|
27654
|
+
});
|
|
27655
|
+
}
|
|
27656
|
+
});
|
|
27657
|
+
|
|
27658
|
+
// Types
|
|
27659
|
+
|
|
27660
|
+
const makeVSnackbarQueueProps = propsFactory({
|
|
27661
|
+
// TODO: Port this to Snackbar on dev
|
|
27662
|
+
closable: [Boolean, String],
|
|
27663
|
+
closeText: {
|
|
27664
|
+
type: String,
|
|
27665
|
+
default: '$vuetify.dismiss'
|
|
27666
|
+
},
|
|
27667
|
+
modelValue: {
|
|
27668
|
+
type: Array,
|
|
27669
|
+
default: () => []
|
|
27670
|
+
},
|
|
27671
|
+
...omit(makeVSnackbarProps(), ['modelValue'])
|
|
27672
|
+
}, 'VSnackbarQueue');
|
|
27673
|
+
const VSnackbarQueue = genericComponent()({
|
|
27674
|
+
name: 'VSnackbarQueue',
|
|
27675
|
+
props: makeVSnackbarQueueProps(),
|
|
27676
|
+
emits: {
|
|
27677
|
+
'update:modelValue': val => true
|
|
27678
|
+
},
|
|
27679
|
+
setup(props, _ref) {
|
|
27680
|
+
let {
|
|
27681
|
+
emit,
|
|
27682
|
+
slots
|
|
27683
|
+
} = _ref;
|
|
27684
|
+
const {
|
|
27685
|
+
t
|
|
27686
|
+
} = useLocale();
|
|
27687
|
+
const isActive = shallowRef(false);
|
|
27688
|
+
const isVisible = shallowRef(false);
|
|
27689
|
+
const current = shallowRef();
|
|
27690
|
+
watch(() => props.modelValue.length, (val, oldVal) => {
|
|
27691
|
+
if (!isVisible.value && val > oldVal) {
|
|
27692
|
+
showNext();
|
|
27693
|
+
}
|
|
27694
|
+
});
|
|
27695
|
+
watch(isActive, val => {
|
|
27696
|
+
if (val) isVisible.value = true;
|
|
27697
|
+
});
|
|
27698
|
+
function onAfterLeave() {
|
|
27699
|
+
if (props.modelValue.length) {
|
|
27700
|
+
showNext();
|
|
27701
|
+
} else {
|
|
27702
|
+
current.value = undefined;
|
|
27703
|
+
isVisible.value = false;
|
|
27704
|
+
}
|
|
27705
|
+
}
|
|
27706
|
+
function showNext() {
|
|
27707
|
+
const [next, ...rest] = props.modelValue;
|
|
27708
|
+
emit('update:modelValue', rest);
|
|
27709
|
+
current.value = typeof next === 'string' ? {
|
|
27710
|
+
text: next
|
|
27711
|
+
} : next;
|
|
27712
|
+
nextTick(() => {
|
|
27713
|
+
isActive.value = true;
|
|
27714
|
+
});
|
|
27715
|
+
}
|
|
27716
|
+
function onClickClose() {
|
|
27717
|
+
isActive.value = false;
|
|
27718
|
+
}
|
|
27719
|
+
const btnProps = computed(() => ({
|
|
27720
|
+
color: typeof props.closable === 'string' ? props.closable : undefined,
|
|
27721
|
+
text: t(props.closeText)
|
|
27722
|
+
}));
|
|
27723
|
+
useRender(() => {
|
|
27724
|
+
const hasActions = !!(props.closable || slots.actions);
|
|
27725
|
+
const {
|
|
27726
|
+
modelValue: _,
|
|
27727
|
+
...snackbarProps
|
|
27728
|
+
} = VSnackbar.filterProps(props);
|
|
27729
|
+
return createVNode(Fragment, null, [isVisible.value && !!current.value && (slots.default ? createVNode(VDefaultsProvider, {
|
|
27730
|
+
"defaults": {
|
|
27731
|
+
VSnackbar: current.value
|
|
27732
|
+
}
|
|
27733
|
+
}, {
|
|
27734
|
+
default: () => [slots.default({
|
|
27735
|
+
item: current.value
|
|
27736
|
+
})]
|
|
27737
|
+
}) : createVNode(VSnackbar, mergeProps(snackbarProps, current.value, {
|
|
27738
|
+
"modelValue": isActive.value,
|
|
27739
|
+
"onUpdate:modelValue": $event => isActive.value = $event,
|
|
27740
|
+
"onAfterLeave": onAfterLeave
|
|
27741
|
+
}), {
|
|
27742
|
+
text: slots.text ? () => slots.text?.({
|
|
27743
|
+
item: current.value
|
|
27744
|
+
}) : undefined,
|
|
27745
|
+
actions: hasActions ? () => createVNode(Fragment, null, [!slots.actions ? createVNode(VBtn, mergeProps(btnProps.value, {
|
|
27746
|
+
"onClick": onClickClose
|
|
27747
|
+
}), null) : createVNode(VDefaultsProvider, {
|
|
27748
|
+
"defaults": {
|
|
27749
|
+
VBtn: btnProps.value
|
|
27750
|
+
}
|
|
27751
|
+
}, {
|
|
27752
|
+
default: () => [slots.actions({
|
|
27753
|
+
item: current.value,
|
|
27754
|
+
props: {
|
|
27755
|
+
onClick: onClickClose
|
|
27756
|
+
}
|
|
27757
|
+
})]
|
|
27758
|
+
})]) : undefined
|
|
27759
|
+
}))]);
|
|
27760
|
+
});
|
|
27761
|
+
}
|
|
27762
|
+
});
|
|
27763
|
+
|
|
27115
27764
|
// Utilities
|
|
27116
27765
|
|
|
27117
27766
|
// Types
|
|
@@ -27575,10 +28224,14 @@ const makeVSpeedDialProps = propsFactory({
|
|
|
27575
28224
|
const VSpeedDial = genericComponent()({
|
|
27576
28225
|
name: 'VSpeedDial',
|
|
27577
28226
|
props: makeVSpeedDialProps(),
|
|
28227
|
+
emits: {
|
|
28228
|
+
'update:modelValue': value => true
|
|
28229
|
+
},
|
|
27578
28230
|
setup(props, _ref) {
|
|
27579
28231
|
let {
|
|
27580
28232
|
slots
|
|
27581
28233
|
} = _ref;
|
|
28234
|
+
const model = useProxiedModel(props, 'modelValue');
|
|
27582
28235
|
const menuRef = ref();
|
|
27583
28236
|
const location = computed(() => {
|
|
27584
28237
|
const [y, x = 'center'] = props.location.split(' ');
|
|
@@ -27590,6 +28243,8 @@ const VSpeedDial = genericComponent()({
|
|
|
27590
28243
|
useRender(() => {
|
|
27591
28244
|
const menuProps = VMenu.filterProps(props);
|
|
27592
28245
|
return createVNode(VMenu, mergeProps(menuProps, {
|
|
28246
|
+
"modelValue": model.value,
|
|
28247
|
+
"onUpdate:modelValue": $event => model.value = $event,
|
|
27593
28248
|
"class": props.class,
|
|
27594
28249
|
"style": props.style,
|
|
27595
28250
|
"contentClass": ['v-speed-dial__content', locationClasses.value],
|
|
@@ -27608,8 +28263,7 @@ const VSpeedDial = genericComponent()({
|
|
|
27608
28263
|
default: () => [createVNode(MaybeTransition, {
|
|
27609
28264
|
"appear": true,
|
|
27610
28265
|
"group": true,
|
|
27611
|
-
"transition": props.transition
|
|
27612
|
-
"mode": "out-in"
|
|
28266
|
+
"transition": props.transition
|
|
27613
28267
|
}, {
|
|
27614
28268
|
default: () => [slots.default?.(slotProps)]
|
|
27615
28269
|
})]
|
|
@@ -27627,9 +28281,7 @@ const makeVTimePickerClockProps = propsFactory({
|
|
|
27627
28281
|
ampm: Boolean,
|
|
27628
28282
|
color: String,
|
|
27629
28283
|
disabled: Boolean,
|
|
27630
|
-
displayedValue:
|
|
27631
|
-
default: null
|
|
27632
|
-
},
|
|
28284
|
+
displayedValue: null,
|
|
27633
28285
|
double: Boolean,
|
|
27634
28286
|
format: {
|
|
27635
28287
|
type: Function,
|
|
@@ -28670,6 +29322,7 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
28670
29322
|
VDataTableRows: VDataTableRows,
|
|
28671
29323
|
VDataTableServer: VDataTableServer,
|
|
28672
29324
|
VDataTableVirtual: VDataTableVirtual,
|
|
29325
|
+
VDateInput: VDateInput,
|
|
28673
29326
|
VDatePicker: VDatePicker,
|
|
28674
29327
|
VDatePickerControls: VDatePickerControls,
|
|
28675
29328
|
VDatePickerHeader: VDatePickerHeader,
|
|
@@ -28734,6 +29387,7 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
28734
29387
|
VPickerTitle: VPickerTitle,
|
|
28735
29388
|
VProgressCircular: VProgressCircular,
|
|
28736
29389
|
VProgressLinear: VProgressLinear,
|
|
29390
|
+
VPullToRefresh: VPullToRefresh,
|
|
28737
29391
|
VRadio: VRadio,
|
|
28738
29392
|
VRadioGroup: VRadioGroup,
|
|
28739
29393
|
VRangeSlider: VRangeSlider,
|
|
@@ -28758,6 +29412,7 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
28758
29412
|
VSlideYTransition: VSlideYTransition,
|
|
28759
29413
|
VSlider: VSlider,
|
|
28760
29414
|
VSnackbar: VSnackbar,
|
|
29415
|
+
VSnackbarQueue: VSnackbarQueue,
|
|
28761
29416
|
VSpacer: VSpacer,
|
|
28762
29417
|
VSparkline: VSparkline,
|
|
28763
29418
|
VSpeedDial: VSpeedDial,
|
|
@@ -28934,7 +29589,7 @@ function useDirectiveComponent(component, props) {
|
|
|
28934
29589
|
function mountComponent(component, props) {
|
|
28935
29590
|
return function (el, binding, vnode) {
|
|
28936
29591
|
const _props = typeof props === 'function' ? props(binding) : props;
|
|
28937
|
-
const text = binding.value?.text ?? binding.value;
|
|
29592
|
+
const text = binding.value?.text ?? binding.value ?? _props?.text;
|
|
28938
29593
|
const value = isObject(binding.value) ? binding.value : {};
|
|
28939
29594
|
|
|
28940
29595
|
// Get the children from the props or directive value, or the element's children
|
|
@@ -28943,7 +29598,9 @@ function mountComponent(component, props) {
|
|
|
28943
29598
|
// If vnode.ctx is the same as the instance, then we're bound to a plain element
|
|
28944
29599
|
// and need to find the nearest parent component instance to inherit provides from
|
|
28945
29600
|
const provides = (vnode.ctx === binding.instance.$ ? findComponentParent(vnode, binding.instance.$)?.provides : vnode.ctx?.provides) ?? binding.instance.$.provides;
|
|
28946
|
-
const node = h(component, mergeProps(_props, value),
|
|
29601
|
+
const node = h(component, mergeProps(_props, value), {
|
|
29602
|
+
default: () => children
|
|
29603
|
+
});
|
|
28947
29604
|
node.appContext = Object.assign(Object.create(null), binding.instance.$.appContext, {
|
|
28948
29605
|
provides
|
|
28949
29606
|
});
|
|
@@ -29102,7 +29759,7 @@ function createVuetify$1() {
|
|
|
29102
29759
|
goTo
|
|
29103
29760
|
};
|
|
29104
29761
|
}
|
|
29105
|
-
const version$1 = "3.6.0
|
|
29762
|
+
const version$1 = "3.6.0";
|
|
29106
29763
|
createVuetify$1.version = version$1;
|
|
29107
29764
|
|
|
29108
29765
|
// Vue's inject() can only be used in setup
|
|
@@ -29355,7 +30012,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
29355
30012
|
|
|
29356
30013
|
/* eslint-disable local-rules/sort-imports */
|
|
29357
30014
|
|
|
29358
|
-
const version = "3.6.0
|
|
30015
|
+
const version = "3.6.0";
|
|
29359
30016
|
|
|
29360
30017
|
/* eslint-disable local-rules/sort-imports */
|
|
29361
30018
|
|