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.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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
|
*/
|
|
@@ -1783,10 +1783,12 @@
|
|
|
1783
1783
|
const isHorizontal = position.value === 'left' || position.value === 'right';
|
|
1784
1784
|
const isOppositeHorizontal = position.value === 'right';
|
|
1785
1785
|
const isOppositeVertical = position.value === 'bottom';
|
|
1786
|
+
const size = elementSize.value ?? layoutSize.value;
|
|
1787
|
+
const unit = size === 0 ? '%' : 'px';
|
|
1786
1788
|
const styles = {
|
|
1787
1789
|
[position.value]: 0,
|
|
1788
1790
|
zIndex: zIndex.value,
|
|
1789
|
-
transform: `translate${isHorizontal ? 'X' : 'Y'}(${(active.value ? 0 : -(
|
|
1791
|
+
transform: `translate${isHorizontal ? 'X' : 'Y'}(${(active.value ? 0 : -(size === 0 ? 100 : size)) * (isOppositeHorizontal || isOppositeVertical ? -1 : 1)}${unit})`,
|
|
1790
1792
|
position: absolute.value || rootZIndex.value !== ROOT_ZINDEX ? 'absolute' : 'fixed',
|
|
1791
1793
|
...(transitionsEnabled.value ? undefined : {
|
|
1792
1794
|
transition: 'none'
|
|
@@ -1926,6 +1928,7 @@
|
|
|
1926
1928
|
badge: 'Badge',
|
|
1927
1929
|
open: 'Open',
|
|
1928
1930
|
close: 'Close',
|
|
1931
|
+
dismiss: 'Dismiss',
|
|
1929
1932
|
confirmEdit: {
|
|
1930
1933
|
ok: 'OK',
|
|
1931
1934
|
cancel: 'Cancel'
|
|
@@ -4156,6 +4159,7 @@
|
|
|
4156
4159
|
const index = children.indexOf(vm);
|
|
4157
4160
|
if (vue.unref(unwrapped.value) == null) {
|
|
4158
4161
|
unwrapped.value = index;
|
|
4162
|
+
unwrapped.useIndexAsValue = true;
|
|
4159
4163
|
}
|
|
4160
4164
|
if (index > -1) {
|
|
4161
4165
|
items.splice(index, 0, unwrapped);
|
|
@@ -4188,6 +4192,14 @@
|
|
|
4188
4192
|
vue.onBeforeUnmount(() => {
|
|
4189
4193
|
isUnmounted = true;
|
|
4190
4194
|
});
|
|
4195
|
+
vue.onUpdated(() => {
|
|
4196
|
+
// #19655 update the items that use the index as the value.
|
|
4197
|
+
for (let i = 0; i < items.length; i++) {
|
|
4198
|
+
if (items[i].useIndexAsValue) {
|
|
4199
|
+
items[i].value = i;
|
|
4200
|
+
}
|
|
4201
|
+
}
|
|
4202
|
+
});
|
|
4191
4203
|
function select(id, value) {
|
|
4192
4204
|
const item = items.find(item => item.id === id);
|
|
4193
4205
|
if (value && item?.disabled) return;
|
|
@@ -4777,6 +4789,65 @@
|
|
|
4777
4789
|
}
|
|
4778
4790
|
});
|
|
4779
4791
|
|
|
4792
|
+
// Composables
|
|
4793
|
+
|
|
4794
|
+
// Types
|
|
4795
|
+
|
|
4796
|
+
const oppositeMap = {
|
|
4797
|
+
center: 'center',
|
|
4798
|
+
top: 'bottom',
|
|
4799
|
+
bottom: 'top',
|
|
4800
|
+
left: 'right',
|
|
4801
|
+
right: 'left'
|
|
4802
|
+
};
|
|
4803
|
+
const makeLocationProps = propsFactory({
|
|
4804
|
+
location: String
|
|
4805
|
+
}, 'location');
|
|
4806
|
+
function useLocation(props) {
|
|
4807
|
+
let opposite = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
4808
|
+
let offset = arguments.length > 2 ? arguments[2] : undefined;
|
|
4809
|
+
const {
|
|
4810
|
+
isRtl
|
|
4811
|
+
} = useRtl();
|
|
4812
|
+
const locationStyles = vue.computed(() => {
|
|
4813
|
+
if (!props.location) return {};
|
|
4814
|
+
const {
|
|
4815
|
+
side,
|
|
4816
|
+
align
|
|
4817
|
+
} = parseAnchor(props.location.split(' ').length > 1 ? props.location : `${props.location} center`, isRtl.value);
|
|
4818
|
+
function getOffset(side) {
|
|
4819
|
+
return offset ? offset(side) : 0;
|
|
4820
|
+
}
|
|
4821
|
+
const styles = {};
|
|
4822
|
+
if (side !== 'center') {
|
|
4823
|
+
if (opposite) styles[oppositeMap[side]] = `calc(100% - ${getOffset(side)}px)`;else styles[side] = 0;
|
|
4824
|
+
}
|
|
4825
|
+
if (align !== 'center') {
|
|
4826
|
+
if (opposite) styles[oppositeMap[align]] = `calc(100% - ${getOffset(align)}px)`;else styles[align] = 0;
|
|
4827
|
+
} else {
|
|
4828
|
+
if (side === 'center') styles.top = styles.left = '50%';else {
|
|
4829
|
+
styles[{
|
|
4830
|
+
top: 'left',
|
|
4831
|
+
bottom: 'left',
|
|
4832
|
+
left: 'top',
|
|
4833
|
+
right: 'top'
|
|
4834
|
+
}[side]] = '50%';
|
|
4835
|
+
}
|
|
4836
|
+
styles.transform = {
|
|
4837
|
+
top: 'translateX(-50%)',
|
|
4838
|
+
bottom: 'translateX(-50%)',
|
|
4839
|
+
left: 'translateY(-50%)',
|
|
4840
|
+
right: 'translateY(-50%)',
|
|
4841
|
+
center: 'translate(-50%, -50%)'
|
|
4842
|
+
}[side];
|
|
4843
|
+
}
|
|
4844
|
+
return styles;
|
|
4845
|
+
});
|
|
4846
|
+
return {
|
|
4847
|
+
locationStyles
|
|
4848
|
+
};
|
|
4849
|
+
}
|
|
4850
|
+
|
|
4780
4851
|
const makeVProgressLinearProps = propsFactory({
|
|
4781
4852
|
absolute: Boolean,
|
|
4782
4853
|
active: {
|
|
@@ -4812,6 +4883,9 @@
|
|
|
4812
4883
|
striped: Boolean,
|
|
4813
4884
|
roundedBar: Boolean,
|
|
4814
4885
|
...makeComponentProps(),
|
|
4886
|
+
...makeLocationProps({
|
|
4887
|
+
location: 'top'
|
|
4888
|
+
}),
|
|
4815
4889
|
...makeRoundedProps(),
|
|
4816
4890
|
...makeTagProps(),
|
|
4817
4891
|
...makeThemeProps()
|
|
@@ -4834,6 +4908,9 @@
|
|
|
4834
4908
|
const {
|
|
4835
4909
|
themeClasses
|
|
4836
4910
|
} = provideTheme(props);
|
|
4911
|
+
const {
|
|
4912
|
+
locationStyles
|
|
4913
|
+
} = useLocation(props);
|
|
4837
4914
|
const {
|
|
4838
4915
|
textColorClasses,
|
|
4839
4916
|
textColorStyles
|
|
@@ -4884,8 +4961,11 @@
|
|
|
4884
4961
|
'v-progress-linear--striped': props.striped
|
|
4885
4962
|
}, roundedClasses.value, themeClasses.value, rtlClasses.value, props.class],
|
|
4886
4963
|
"style": [{
|
|
4964
|
+
bottom: props.location === 'bottom' ? 0 : undefined,
|
|
4965
|
+
top: props.location === 'top' ? 0 : undefined,
|
|
4887
4966
|
height: props.active ? convertToUnit(height.value) : 0,
|
|
4888
|
-
'--v-progress-linear-height': convertToUnit(height.value)
|
|
4967
|
+
'--v-progress-linear-height': convertToUnit(height.value),
|
|
4968
|
+
...(props.absolute ? locationStyles.value : {})
|
|
4889
4969
|
}, props.style],
|
|
4890
4970
|
"role": "progressbar",
|
|
4891
4971
|
"aria-hidden": props.active ? 'false' : 'true',
|
|
@@ -4977,65 +5057,6 @@
|
|
|
4977
5057
|
}, null)]);
|
|
4978
5058
|
}
|
|
4979
5059
|
|
|
4980
|
-
// Composables
|
|
4981
|
-
|
|
4982
|
-
// Types
|
|
4983
|
-
|
|
4984
|
-
const oppositeMap = {
|
|
4985
|
-
center: 'center',
|
|
4986
|
-
top: 'bottom',
|
|
4987
|
-
bottom: 'top',
|
|
4988
|
-
left: 'right',
|
|
4989
|
-
right: 'left'
|
|
4990
|
-
};
|
|
4991
|
-
const makeLocationProps = propsFactory({
|
|
4992
|
-
location: String
|
|
4993
|
-
}, 'location');
|
|
4994
|
-
function useLocation(props) {
|
|
4995
|
-
let opposite = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
4996
|
-
let offset = arguments.length > 2 ? arguments[2] : undefined;
|
|
4997
|
-
const {
|
|
4998
|
-
isRtl
|
|
4999
|
-
} = useRtl();
|
|
5000
|
-
const locationStyles = vue.computed(() => {
|
|
5001
|
-
if (!props.location) return {};
|
|
5002
|
-
const {
|
|
5003
|
-
side,
|
|
5004
|
-
align
|
|
5005
|
-
} = parseAnchor(props.location.split(' ').length > 1 ? props.location : `${props.location} center`, isRtl.value);
|
|
5006
|
-
function getOffset(side) {
|
|
5007
|
-
return offset ? offset(side) : 0;
|
|
5008
|
-
}
|
|
5009
|
-
const styles = {};
|
|
5010
|
-
if (side !== 'center') {
|
|
5011
|
-
if (opposite) styles[oppositeMap[side]] = `calc(100% - ${getOffset(side)}px)`;else styles[side] = 0;
|
|
5012
|
-
}
|
|
5013
|
-
if (align !== 'center') {
|
|
5014
|
-
if (opposite) styles[oppositeMap[align]] = `calc(100% - ${getOffset(align)}px)`;else styles[align] = 0;
|
|
5015
|
-
} else {
|
|
5016
|
-
if (side === 'center') styles.top = styles.left = '50%';else {
|
|
5017
|
-
styles[{
|
|
5018
|
-
top: 'left',
|
|
5019
|
-
bottom: 'left',
|
|
5020
|
-
left: 'top',
|
|
5021
|
-
right: 'top'
|
|
5022
|
-
}[side]] = '50%';
|
|
5023
|
-
}
|
|
5024
|
-
styles.transform = {
|
|
5025
|
-
top: 'translateX(-50%)',
|
|
5026
|
-
bottom: 'translateX(-50%)',
|
|
5027
|
-
left: 'translateY(-50%)',
|
|
5028
|
-
right: 'translateY(-50%)',
|
|
5029
|
-
center: 'translate(-50%, -50%)'
|
|
5030
|
-
}[side];
|
|
5031
|
-
}
|
|
5032
|
-
return styles;
|
|
5033
|
-
});
|
|
5034
|
-
return {
|
|
5035
|
-
locationStyles
|
|
5036
|
-
};
|
|
5037
|
-
}
|
|
5038
|
-
|
|
5039
5060
|
// Utilities
|
|
5040
5061
|
|
|
5041
5062
|
// Types
|
|
@@ -5463,6 +5484,7 @@
|
|
|
5463
5484
|
prependIcon: IconValue,
|
|
5464
5485
|
appendIcon: IconValue,
|
|
5465
5486
|
block: Boolean,
|
|
5487
|
+
readonly: Boolean,
|
|
5466
5488
|
slim: Boolean,
|
|
5467
5489
|
stacked: Boolean,
|
|
5468
5490
|
ripple: {
|
|
@@ -5584,6 +5606,7 @@
|
|
|
5584
5606
|
'v-btn--flat': props.flat,
|
|
5585
5607
|
'v-btn--icon': !!props.icon,
|
|
5586
5608
|
'v-btn--loading': props.loading,
|
|
5609
|
+
'v-btn--readonly': props.readonly,
|
|
5587
5610
|
'v-btn--slim': props.slim,
|
|
5588
5611
|
'v-btn--stacked': props.stacked
|
|
5589
5612
|
}, themeClasses.value, borderClasses.value, colorClasses.value, densityClasses.value, elevationClasses.value, loaderClasses.value, positionClasses.value, roundedClasses.value, sizeClasses.value, variantClasses.value, props.class],
|
|
@@ -5591,7 +5614,7 @@
|
|
|
5591
5614
|
"aria-busy": props.loading ? true : undefined,
|
|
5592
5615
|
"disabled": isDisabled.value || undefined,
|
|
5593
5616
|
"href": link.href.value,
|
|
5594
|
-
"tabindex": props.loading ? -1 : undefined,
|
|
5617
|
+
"tabindex": props.loading || props.readonly ? -1 : undefined,
|
|
5595
5618
|
"onClick": onClick,
|
|
5596
5619
|
"value": valueAttr.value
|
|
5597
5620
|
}, {
|
|
@@ -6762,6 +6785,7 @@
|
|
|
6762
6785
|
...makeComponentProps(),
|
|
6763
6786
|
...makeDensityProps(),
|
|
6764
6787
|
...only(makeDimensionProps(), ['maxWidth', 'minWidth', 'width']),
|
|
6788
|
+
...makeThemeProps(),
|
|
6765
6789
|
...makeValidationProps()
|
|
6766
6790
|
}, 'VInput');
|
|
6767
6791
|
const VInput = genericComponent()({
|
|
@@ -6784,6 +6808,9 @@
|
|
|
6784
6808
|
const {
|
|
6785
6809
|
dimensionStyles
|
|
6786
6810
|
} = useDimension(props);
|
|
6811
|
+
const {
|
|
6812
|
+
themeClasses
|
|
6813
|
+
} = provideTheme(props);
|
|
6787
6814
|
const {
|
|
6788
6815
|
rtlClasses
|
|
6789
6816
|
} = useRtl();
|
|
@@ -6837,7 +6864,7 @@
|
|
|
6837
6864
|
"class": ['v-input', `v-input--${props.direction}`, {
|
|
6838
6865
|
'v-input--center-affix': props.centerAffix,
|
|
6839
6866
|
'v-input--hide-spin-buttons': props.hideSpinButtons
|
|
6840
|
-
}, densityClasses.value, rtlClasses.value, validationClasses.value, props.class],
|
|
6867
|
+
}, densityClasses.value, themeClasses.value, rtlClasses.value, validationClasses.value, props.class],
|
|
6841
6868
|
"style": [dimensionStyles.value, props.style]
|
|
6842
6869
|
}, [hasPrepend && vue.createVNode("div", {
|
|
6843
6870
|
"key": "prepend",
|
|
@@ -7064,6 +7091,10 @@
|
|
|
7064
7091
|
};
|
|
7065
7092
|
}
|
|
7066
7093
|
const makeDisplayProps = propsFactory({
|
|
7094
|
+
mobile: {
|
|
7095
|
+
type: Boolean,
|
|
7096
|
+
default: null
|
|
7097
|
+
},
|
|
7067
7098
|
mobileBreakpoint: [Number, String]
|
|
7068
7099
|
}, 'display');
|
|
7069
7100
|
function useDisplay() {
|
|
@@ -7072,6 +7103,7 @@
|
|
|
7072
7103
|
const display = vue.inject(DisplaySymbol);
|
|
7073
7104
|
if (!display) throw new Error('Could not find Vuetify display injection');
|
|
7074
7105
|
const mobile = vue.computed(() => {
|
|
7106
|
+
if (props.mobile != null) return props.mobile;
|
|
7075
7107
|
if (!props.mobileBreakpoint) return display.mobile.value;
|
|
7076
7108
|
const breakpointValue = typeof props.mobileBreakpoint === 'number' ? props.mobileBreakpoint : display.thresholds.value[props.mobileBreakpoint];
|
|
7077
7109
|
return display.width.value < breakpointValue;
|
|
@@ -7089,45 +7121,205 @@
|
|
|
7089
7121
|
};
|
|
7090
7122
|
}
|
|
7091
7123
|
|
|
7092
|
-
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
|
|
7124
|
+
// Utilities
|
|
7125
|
+
|
|
7126
|
+
// Types
|
|
7127
|
+
|
|
7128
|
+
const GoToSymbol = Symbol.for('vuetify:goto');
|
|
7129
|
+
function genDefaults() {
|
|
7130
|
+
return {
|
|
7131
|
+
container: undefined,
|
|
7132
|
+
duration: 300,
|
|
7133
|
+
layout: false,
|
|
7134
|
+
offset: 0,
|
|
7135
|
+
easing: 'easeInOutCubic',
|
|
7136
|
+
patterns: {
|
|
7137
|
+
linear: t => t,
|
|
7138
|
+
easeInQuad: t => t ** 2,
|
|
7139
|
+
easeOutQuad: t => t * (2 - t),
|
|
7140
|
+
easeInOutQuad: t => t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t,
|
|
7141
|
+
easeInCubic: t => t ** 3,
|
|
7142
|
+
easeOutCubic: t => --t ** 3 + 1,
|
|
7143
|
+
easeInOutCubic: t => t < 0.5 ? 4 * t ** 3 : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1,
|
|
7144
|
+
easeInQuart: t => t ** 4,
|
|
7145
|
+
easeOutQuart: t => 1 - --t ** 4,
|
|
7146
|
+
easeInOutQuart: t => t < 0.5 ? 8 * t ** 4 : 1 - 8 * --t ** 4,
|
|
7147
|
+
easeInQuint: t => t ** 5,
|
|
7148
|
+
easeOutQuint: t => 1 + --t ** 5,
|
|
7149
|
+
easeInOutQuint: t => t < 0.5 ? 16 * t ** 5 : 1 + 16 * --t ** 5
|
|
7150
|
+
}
|
|
7151
|
+
};
|
|
7152
|
+
}
|
|
7153
|
+
function getContainer(el) {
|
|
7154
|
+
return getTarget$1(el) ?? (document.scrollingElement || document.body);
|
|
7096
7155
|
}
|
|
7097
|
-
function
|
|
7156
|
+
function getTarget$1(el) {
|
|
7157
|
+
return typeof el === 'string' ? document.querySelector(el) : refElement(el);
|
|
7158
|
+
}
|
|
7159
|
+
function getOffset$2(target, horizontal, rtl) {
|
|
7160
|
+
if (typeof target === 'number') return horizontal && rtl ? -target : target;
|
|
7161
|
+
let el = getTarget$1(target);
|
|
7162
|
+
let totalOffset = 0;
|
|
7163
|
+
while (el) {
|
|
7164
|
+
totalOffset += horizontal ? el.offsetLeft : el.offsetTop;
|
|
7165
|
+
el = el.offsetParent;
|
|
7166
|
+
}
|
|
7167
|
+
return totalOffset;
|
|
7168
|
+
}
|
|
7169
|
+
function createGoTo(options, locale) {
|
|
7170
|
+
return {
|
|
7171
|
+
rtl: locale.isRtl,
|
|
7172
|
+
options: mergeDeep(genDefaults(), options)
|
|
7173
|
+
};
|
|
7174
|
+
}
|
|
7175
|
+
async function scrollTo(_target, _options, horizontal, goTo) {
|
|
7176
|
+
const property = horizontal ? 'scrollLeft' : 'scrollTop';
|
|
7177
|
+
const options = mergeDeep(goTo?.options ?? genDefaults(), _options);
|
|
7178
|
+
const rtl = goTo?.rtl.value;
|
|
7179
|
+
const target = (typeof _target === 'number' ? _target : getTarget$1(_target)) ?? 0;
|
|
7180
|
+
const container = options.container === 'parent' && target instanceof HTMLElement ? target.parentElement : getContainer(options.container);
|
|
7181
|
+
const ease = typeof options.easing === 'function' ? options.easing : options.patterns[options.easing];
|
|
7182
|
+
if (!ease) throw new TypeError(`Easing function "${options.easing}" not found.`);
|
|
7183
|
+
let targetLocation;
|
|
7184
|
+
if (typeof target === 'number') {
|
|
7185
|
+
targetLocation = getOffset$2(target, horizontal, rtl);
|
|
7186
|
+
} else {
|
|
7187
|
+
targetLocation = getOffset$2(target, horizontal, rtl) - getOffset$2(container, horizontal, rtl);
|
|
7188
|
+
if (options.layout) {
|
|
7189
|
+
const styles = window.getComputedStyle(target);
|
|
7190
|
+
const layoutOffset = styles.getPropertyValue('--v-layout-top');
|
|
7191
|
+
if (layoutOffset) targetLocation -= parseInt(layoutOffset, 10);
|
|
7192
|
+
}
|
|
7193
|
+
}
|
|
7194
|
+
targetLocation += options.offset;
|
|
7195
|
+
targetLocation = clampTarget(container, targetLocation, !!rtl, !!horizontal);
|
|
7196
|
+
const startLocation = container[property] ?? 0;
|
|
7197
|
+
if (targetLocation === startLocation) return Promise.resolve(targetLocation);
|
|
7198
|
+
const startTime = performance.now();
|
|
7199
|
+
return new Promise(resolve => requestAnimationFrame(function step(currentTime) {
|
|
7200
|
+
const timeElapsed = currentTime - startTime;
|
|
7201
|
+
const progress = timeElapsed / options.duration;
|
|
7202
|
+
const location = Math.floor(startLocation + (targetLocation - startLocation) * ease(clamp(progress, 0, 1)));
|
|
7203
|
+
container[property] = location;
|
|
7204
|
+
|
|
7205
|
+
// Allow for some jitter if target time has elapsed
|
|
7206
|
+
if (progress >= 1 && Math.abs(location - container[property]) < 10) {
|
|
7207
|
+
return resolve(targetLocation);
|
|
7208
|
+
} else if (progress > 2) {
|
|
7209
|
+
// The target might not be reachable
|
|
7210
|
+
consoleWarn('Scroll target is not reachable');
|
|
7211
|
+
return resolve(container[property]);
|
|
7212
|
+
}
|
|
7213
|
+
requestAnimationFrame(step);
|
|
7214
|
+
}));
|
|
7215
|
+
}
|
|
7216
|
+
function useGoTo() {
|
|
7217
|
+
let _options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
7218
|
+
const goToInstance = vue.inject(GoToSymbol);
|
|
7219
|
+
const {
|
|
7220
|
+
isRtl
|
|
7221
|
+
} = useRtl();
|
|
7222
|
+
if (!goToInstance) throw new Error('[Vuetify] Could not find injected goto instance');
|
|
7223
|
+
const goTo = {
|
|
7224
|
+
...goToInstance,
|
|
7225
|
+
// can be set via VLocaleProvider
|
|
7226
|
+
rtl: vue.computed(() => goToInstance.rtl.value || isRtl.value)
|
|
7227
|
+
};
|
|
7228
|
+
async function go(target, options) {
|
|
7229
|
+
return scrollTo(target, mergeDeep(_options, options), false, goTo);
|
|
7230
|
+
}
|
|
7231
|
+
go.horizontal = async (target, options) => {
|
|
7232
|
+
return scrollTo(target, mergeDeep(_options, options), true, goTo);
|
|
7233
|
+
};
|
|
7234
|
+
return go;
|
|
7235
|
+
}
|
|
7236
|
+
|
|
7237
|
+
/**
|
|
7238
|
+
* Clamp target value to achieve a smooth scroll animation
|
|
7239
|
+
* when the value goes outside the scroll container size
|
|
7240
|
+
*/
|
|
7241
|
+
function clampTarget(container, value, rtl, horizontal) {
|
|
7242
|
+
const {
|
|
7243
|
+
scrollWidth,
|
|
7244
|
+
scrollHeight
|
|
7245
|
+
} = container;
|
|
7246
|
+
const [containerWidth, containerHeight] = container === document.scrollingElement ? [window.innerWidth, window.innerHeight] : [container.offsetWidth, container.offsetHeight];
|
|
7247
|
+
let min;
|
|
7248
|
+
let max;
|
|
7249
|
+
if (horizontal) {
|
|
7250
|
+
if (rtl) {
|
|
7251
|
+
min = -(scrollWidth - containerWidth);
|
|
7252
|
+
max = 0;
|
|
7253
|
+
} else {
|
|
7254
|
+
min = 0;
|
|
7255
|
+
max = scrollWidth - containerWidth;
|
|
7256
|
+
}
|
|
7257
|
+
} else {
|
|
7258
|
+
min = 0;
|
|
7259
|
+
max = scrollHeight + -containerHeight;
|
|
7260
|
+
}
|
|
7261
|
+
return Math.max(Math.min(value, max), min);
|
|
7262
|
+
}
|
|
7263
|
+
|
|
7264
|
+
function calculateUpdatedTarget(_ref) {
|
|
7098
7265
|
let {
|
|
7099
7266
|
selectedElement,
|
|
7100
|
-
|
|
7101
|
-
contentSize,
|
|
7267
|
+
containerElement,
|
|
7102
7268
|
isRtl,
|
|
7103
|
-
currentScrollOffset,
|
|
7104
7269
|
isHorizontal
|
|
7105
7270
|
} = _ref;
|
|
7106
|
-
const
|
|
7107
|
-
const
|
|
7108
|
-
const
|
|
7109
|
-
const
|
|
7110
|
-
const
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
|
|
7116
|
-
|
|
7117
|
-
|
|
7118
|
-
|
|
7119
|
-
function calculateCenteredOffset(_ref2) {
|
|
7271
|
+
const containerSize = getOffsetSize(isHorizontal, containerElement);
|
|
7272
|
+
const scrollPosition = getScrollPosition(isHorizontal, isRtl, containerElement);
|
|
7273
|
+
const childrenSize = getOffsetSize(isHorizontal, selectedElement);
|
|
7274
|
+
const childrenStartPosition = getOffsetPosition(isHorizontal, selectedElement);
|
|
7275
|
+
const additionalOffset = childrenSize * 0.4;
|
|
7276
|
+
if (scrollPosition > childrenStartPosition) {
|
|
7277
|
+
return childrenStartPosition - additionalOffset;
|
|
7278
|
+
} else if (scrollPosition + containerSize < childrenStartPosition + childrenSize) {
|
|
7279
|
+
return childrenStartPosition - containerSize + childrenSize + additionalOffset;
|
|
7280
|
+
}
|
|
7281
|
+
return scrollPosition;
|
|
7282
|
+
}
|
|
7283
|
+
function calculateCenteredTarget(_ref2) {
|
|
7120
7284
|
let {
|
|
7121
7285
|
selectedElement,
|
|
7122
|
-
|
|
7123
|
-
contentSize,
|
|
7124
|
-
isRtl,
|
|
7286
|
+
containerElement,
|
|
7125
7287
|
isHorizontal
|
|
7126
7288
|
} = _ref2;
|
|
7127
|
-
const
|
|
7128
|
-
const
|
|
7129
|
-
const
|
|
7130
|
-
return
|
|
7289
|
+
const containerOffsetSize = getOffsetSize(isHorizontal, containerElement);
|
|
7290
|
+
const childrenOffsetPosition = getOffsetPosition(isHorizontal, selectedElement);
|
|
7291
|
+
const childrenOffsetSize = getOffsetSize(isHorizontal, selectedElement);
|
|
7292
|
+
return childrenOffsetPosition - containerOffsetSize / 2 + childrenOffsetSize / 2;
|
|
7293
|
+
}
|
|
7294
|
+
function getScrollSize(isHorizontal, element) {
|
|
7295
|
+
const key = isHorizontal ? 'scrollWidth' : 'scrollHeight';
|
|
7296
|
+
return element?.[key] || 0;
|
|
7297
|
+
}
|
|
7298
|
+
function getClientSize(isHorizontal, element) {
|
|
7299
|
+
const key = isHorizontal ? 'clientWidth' : 'clientHeight';
|
|
7300
|
+
return element?.[key] || 0;
|
|
7301
|
+
}
|
|
7302
|
+
function getScrollPosition(isHorizontal, rtl, element) {
|
|
7303
|
+
if (!element) {
|
|
7304
|
+
return 0;
|
|
7305
|
+
}
|
|
7306
|
+
const {
|
|
7307
|
+
scrollLeft,
|
|
7308
|
+
offsetWidth,
|
|
7309
|
+
scrollWidth
|
|
7310
|
+
} = element;
|
|
7311
|
+
if (isHorizontal) {
|
|
7312
|
+
return rtl ? scrollWidth - offsetWidth + scrollLeft : scrollLeft;
|
|
7313
|
+
}
|
|
7314
|
+
return element.scrollTop;
|
|
7315
|
+
}
|
|
7316
|
+
function getOffsetSize(isHorizontal, element) {
|
|
7317
|
+
const key = isHorizontal ? 'offsetWidth' : 'offsetHeight';
|
|
7318
|
+
return element?.[key] || 0;
|
|
7319
|
+
}
|
|
7320
|
+
function getOffsetPosition(isHorizontal, element) {
|
|
7321
|
+
const key = isHorizontal ? 'offsetLeft' : 'offsetTop';
|
|
7322
|
+
return element?.[key] || 0;
|
|
7131
7323
|
}
|
|
7132
7324
|
|
|
7133
7325
|
// Types
|
|
@@ -7193,6 +7385,14 @@
|
|
|
7193
7385
|
resizeRef: contentRef,
|
|
7194
7386
|
contentRect
|
|
7195
7387
|
} = useResizeObserver();
|
|
7388
|
+
const goTo = useGoTo();
|
|
7389
|
+
const goToOptions = vue.computed(() => {
|
|
7390
|
+
return {
|
|
7391
|
+
container: containerRef.value,
|
|
7392
|
+
duration: 200,
|
|
7393
|
+
easing: 'easeOutQuart'
|
|
7394
|
+
};
|
|
7395
|
+
});
|
|
7196
7396
|
const firstSelectedIndex = vue.computed(() => {
|
|
7197
7397
|
if (!group.selected.value.length) return -1;
|
|
7198
7398
|
return group.items.value.findIndex(item => item.id === group.selected.value[0]);
|
|
@@ -7215,60 +7415,58 @@
|
|
|
7215
7415
|
if (firstSelectedIndex.value >= 0 && contentRef.value) {
|
|
7216
7416
|
// TODO: Is this too naive? Should we store element references in group composable?
|
|
7217
7417
|
const selectedElement = contentRef.value.children[lastSelectedIndex.value];
|
|
7218
|
-
|
|
7219
|
-
scrollOffset.value = 0;
|
|
7220
|
-
} else if (props.centerActive) {
|
|
7221
|
-
scrollOffset.value = calculateCenteredOffset({
|
|
7222
|
-
selectedElement,
|
|
7223
|
-
containerSize: containerSize.value,
|
|
7224
|
-
contentSize: contentSize.value,
|
|
7225
|
-
isRtl: isRtl.value,
|
|
7226
|
-
isHorizontal: isHorizontal.value
|
|
7227
|
-
});
|
|
7228
|
-
} else if (isOverflowing.value) {
|
|
7229
|
-
scrollOffset.value = calculateUpdatedOffset({
|
|
7230
|
-
selectedElement,
|
|
7231
|
-
containerSize: containerSize.value,
|
|
7232
|
-
contentSize: contentSize.value,
|
|
7233
|
-
isRtl: isRtl.value,
|
|
7234
|
-
currentScrollOffset: scrollOffset.value,
|
|
7235
|
-
isHorizontal: isHorizontal.value
|
|
7236
|
-
});
|
|
7237
|
-
}
|
|
7418
|
+
scrollToChildren(selectedElement, props.centerActive);
|
|
7238
7419
|
}
|
|
7239
7420
|
});
|
|
7240
7421
|
});
|
|
7241
7422
|
}
|
|
7242
|
-
const
|
|
7243
|
-
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7423
|
+
const isFocused = vue.shallowRef(false);
|
|
7424
|
+
function scrollToChildren(children, center) {
|
|
7425
|
+
let target = 0;
|
|
7426
|
+
if (center) {
|
|
7427
|
+
target = calculateCenteredTarget({
|
|
7428
|
+
containerElement: containerRef.value,
|
|
7429
|
+
isHorizontal: isHorizontal.value,
|
|
7430
|
+
selectedElement: children
|
|
7431
|
+
});
|
|
7432
|
+
} else {
|
|
7433
|
+
target = calculateUpdatedTarget({
|
|
7434
|
+
containerElement: containerRef.value,
|
|
7435
|
+
isHorizontal: isHorizontal.value,
|
|
7436
|
+
isRtl: isRtl.value,
|
|
7437
|
+
selectedElement: children
|
|
7438
|
+
});
|
|
7439
|
+
}
|
|
7440
|
+
scrollToPosition(target);
|
|
7441
|
+
}
|
|
7442
|
+
function scrollToPosition(newPosition) {
|
|
7443
|
+
if (!IN_BROWSER || !containerRef.value) return;
|
|
7444
|
+
const offsetSize = getOffsetSize(isHorizontal.value, containerRef.value);
|
|
7445
|
+
const scrollPosition = getScrollPosition(isHorizontal.value, isRtl.value, containerRef.value);
|
|
7446
|
+
const scrollSize = getScrollSize(isHorizontal.value, containerRef.value);
|
|
7447
|
+
if (scrollSize <= offsetSize ||
|
|
7448
|
+
// Prevent scrolling by only a couple of pixels, which doesn't look smooth
|
|
7449
|
+
Math.abs(newPosition - scrollPosition) < 16) return;
|
|
7450
|
+
if (isHorizontal.value && isRtl.value && containerRef.value) {
|
|
7451
|
+
const {
|
|
7452
|
+
scrollWidth,
|
|
7453
|
+
offsetWidth: containerWidth
|
|
7454
|
+
} = containerRef.value;
|
|
7455
|
+
newPosition = scrollWidth - containerWidth - newPosition;
|
|
7456
|
+
}
|
|
7457
|
+
if (isHorizontal.value) {
|
|
7458
|
+
goTo.horizontal(newPosition, goToOptions.value);
|
|
7459
|
+
} else {
|
|
7460
|
+
goTo(newPosition, goToOptions.value);
|
|
7264
7461
|
}
|
|
7265
|
-
disableTransition.value = false;
|
|
7266
7462
|
}
|
|
7267
|
-
function onScroll() {
|
|
7268
|
-
|
|
7269
|
-
|
|
7463
|
+
function onScroll(e) {
|
|
7464
|
+
const {
|
|
7465
|
+
scrollTop,
|
|
7466
|
+
scrollLeft
|
|
7467
|
+
} = e.target;
|
|
7468
|
+
scrollOffset.value = isHorizontal.value ? scrollLeft : scrollTop;
|
|
7270
7469
|
}
|
|
7271
|
-
const isFocused = vue.shallowRef(false);
|
|
7272
7470
|
function onFocusin(e) {
|
|
7273
7471
|
isFocused.value = true;
|
|
7274
7472
|
if (!isOverflowing.value || !contentRef.value) return;
|
|
@@ -7278,14 +7476,7 @@
|
|
|
7278
7476
|
for (const el of e.composedPath()) {
|
|
7279
7477
|
for (const item of contentRef.value.children) {
|
|
7280
7478
|
if (item === el) {
|
|
7281
|
-
|
|
7282
|
-
selectedElement: item,
|
|
7283
|
-
containerSize: containerSize.value,
|
|
7284
|
-
contentSize: contentSize.value,
|
|
7285
|
-
isRtl: isRtl.value,
|
|
7286
|
-
currentScrollOffset: scrollOffset.value,
|
|
7287
|
-
isHorizontal: isHorizontal.value
|
|
7288
|
-
});
|
|
7479
|
+
scrollToChildren(item);
|
|
7289
7480
|
return;
|
|
7290
7481
|
}
|
|
7291
7482
|
}
|
|
@@ -7294,66 +7485,79 @@
|
|
|
7294
7485
|
function onFocusout(e) {
|
|
7295
7486
|
isFocused.value = false;
|
|
7296
7487
|
}
|
|
7488
|
+
|
|
7489
|
+
// Affix clicks produce onFocus that we have to ignore to avoid extra scrollToChildren
|
|
7490
|
+
let ignoreFocusEvent = false;
|
|
7297
7491
|
function onFocus(e) {
|
|
7298
|
-
if (!isFocused.value && !(e.relatedTarget && contentRef.value?.contains(e.relatedTarget))) focus();
|
|
7492
|
+
if (!ignoreFocusEvent && !isFocused.value && !(e.relatedTarget && contentRef.value?.contains(e.relatedTarget))) focus();
|
|
7493
|
+
ignoreFocusEvent = false;
|
|
7494
|
+
}
|
|
7495
|
+
function onFocusAffixes() {
|
|
7496
|
+
ignoreFocusEvent = true;
|
|
7299
7497
|
}
|
|
7300
7498
|
function onKeydown(e) {
|
|
7301
7499
|
if (!contentRef.value) return;
|
|
7500
|
+
function toFocus(location) {
|
|
7501
|
+
e.preventDefault();
|
|
7502
|
+
focus(location);
|
|
7503
|
+
}
|
|
7302
7504
|
if (isHorizontal.value) {
|
|
7303
7505
|
if (e.key === 'ArrowRight') {
|
|
7304
|
-
|
|
7506
|
+
toFocus(isRtl.value ? 'prev' : 'next');
|
|
7305
7507
|
} else if (e.key === 'ArrowLeft') {
|
|
7306
|
-
|
|
7508
|
+
toFocus(isRtl.value ? 'next' : 'prev');
|
|
7307
7509
|
}
|
|
7308
7510
|
} else {
|
|
7309
7511
|
if (e.key === 'ArrowDown') {
|
|
7310
|
-
|
|
7512
|
+
toFocus('next');
|
|
7311
7513
|
} else if (e.key === 'ArrowUp') {
|
|
7312
|
-
|
|
7514
|
+
toFocus('prev');
|
|
7313
7515
|
}
|
|
7314
7516
|
}
|
|
7315
7517
|
if (e.key === 'Home') {
|
|
7316
|
-
|
|
7518
|
+
toFocus('first');
|
|
7317
7519
|
} else if (e.key === 'End') {
|
|
7318
|
-
|
|
7520
|
+
toFocus('last');
|
|
7319
7521
|
}
|
|
7320
7522
|
}
|
|
7321
7523
|
function focus(location) {
|
|
7322
7524
|
if (!contentRef.value) return;
|
|
7525
|
+
let el;
|
|
7323
7526
|
if (!location) {
|
|
7324
7527
|
const focusable = focusableChildren(contentRef.value);
|
|
7325
|
-
focusable[0]
|
|
7528
|
+
el = focusable[0];
|
|
7326
7529
|
} else if (location === 'next') {
|
|
7327
|
-
|
|
7328
|
-
if (el)
|
|
7530
|
+
el = contentRef.value.querySelector(':focus')?.nextElementSibling;
|
|
7531
|
+
if (!el) return focus('first');
|
|
7329
7532
|
} else if (location === 'prev') {
|
|
7330
|
-
|
|
7331
|
-
if (el)
|
|
7533
|
+
el = contentRef.value.querySelector(':focus')?.previousElementSibling;
|
|
7534
|
+
if (!el) return focus('last');
|
|
7332
7535
|
} else if (location === 'first') {
|
|
7333
|
-
contentRef.value.firstElementChild
|
|
7536
|
+
el = contentRef.value.firstElementChild;
|
|
7334
7537
|
} else if (location === 'last') {
|
|
7335
|
-
contentRef.value.lastElementChild
|
|
7538
|
+
el = contentRef.value.lastElementChild;
|
|
7539
|
+
}
|
|
7540
|
+
if (el) {
|
|
7541
|
+
el.focus({
|
|
7542
|
+
preventScroll: true
|
|
7543
|
+
});
|
|
7336
7544
|
}
|
|
7337
7545
|
}
|
|
7338
7546
|
function scrollTo(location) {
|
|
7339
|
-
const
|
|
7340
|
-
|
|
7341
|
-
|
|
7342
|
-
const contentStyles = vue.computed(() => {
|
|
7343
|
-
// This adds friction when scrolling the 'wrong' way when at max offset
|
|
7344
|
-
let scrollAmount = scrollOffset.value > contentSize.value - containerSize.value ? -(contentSize.value - containerSize.value) + bias(contentSize.value - containerSize.value - scrollOffset.value) : -scrollOffset.value;
|
|
7547
|
+
const direction = isHorizontal.value && isRtl.value ? -1 : 1;
|
|
7548
|
+
const offsetStep = (location === 'prev' ? -direction : direction) * containerSize.value;
|
|
7549
|
+
let newPosition = scrollOffset.value + offsetStep;
|
|
7345
7550
|
|
|
7346
|
-
//
|
|
7347
|
-
if (
|
|
7348
|
-
|
|
7551
|
+
// TODO: improve it
|
|
7552
|
+
if (isHorizontal.value && isRtl.value && containerRef.value) {
|
|
7553
|
+
const {
|
|
7554
|
+
scrollWidth,
|
|
7555
|
+
offsetWidth: containerWidth
|
|
7556
|
+
} = containerRef.value;
|
|
7557
|
+
newPosition += scrollWidth - containerWidth;
|
|
7349
7558
|
}
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
transform: `translate${isHorizontal.value ? 'X' : 'Y'}(${sign * scrollAmount}px)`,
|
|
7353
|
-
transition: disableTransition.value ? 'none' : '',
|
|
7354
|
-
willChange: disableTransition.value ? 'transform' : ''
|
|
7355
|
-
};
|
|
7356
|
-
});
|
|
7559
|
+
scrollToPosition(newPosition);
|
|
7560
|
+
}
|
|
7357
7561
|
const slotProps = vue.computed(() => ({
|
|
7358
7562
|
next: group.next,
|
|
7359
7563
|
prev: group.prev,
|
|
@@ -7387,11 +7591,17 @@
|
|
|
7387
7591
|
}
|
|
7388
7592
|
});
|
|
7389
7593
|
const hasPrev = vue.computed(() => {
|
|
7390
|
-
|
|
7594
|
+
// 1 pixel in reserve, may be lost after rounding
|
|
7595
|
+
return Math.abs(scrollOffset.value) > 1;
|
|
7391
7596
|
});
|
|
7392
7597
|
const hasNext = vue.computed(() => {
|
|
7393
|
-
|
|
7394
|
-
|
|
7598
|
+
if (!containerRef.value) return false;
|
|
7599
|
+
const scrollSize = getScrollSize(isHorizontal.value, containerRef.value);
|
|
7600
|
+
const clientSize = getClientSize(isHorizontal.value, containerRef.value);
|
|
7601
|
+
const scrollSizeMax = scrollSize - clientSize;
|
|
7602
|
+
|
|
7603
|
+
// 1 pixel in reserve, may be lost after rounding
|
|
7604
|
+
return scrollSizeMax - Math.abs(scrollOffset.value) > 1;
|
|
7395
7605
|
});
|
|
7396
7606
|
useRender(() => vue.createVNode(props.tag, {
|
|
7397
7607
|
"class": ['v-slide-group', {
|
|
@@ -7408,6 +7618,7 @@
|
|
|
7408
7618
|
"class": ['v-slide-group__prev', {
|
|
7409
7619
|
'v-slide-group__prev--disabled': !hasPrev.value
|
|
7410
7620
|
}],
|
|
7621
|
+
"onMousedown": onFocusAffixes,
|
|
7411
7622
|
"onClick": () => hasPrev.value && scrollTo('prev')
|
|
7412
7623
|
}, [slots.prev?.(slotProps.value) ?? vue.createVNode(VFadeTransition, null, {
|
|
7413
7624
|
default: () => [vue.createVNode(VIcon, {
|
|
@@ -7421,10 +7632,6 @@
|
|
|
7421
7632
|
}, [vue.createVNode("div", {
|
|
7422
7633
|
"ref": contentRef,
|
|
7423
7634
|
"class": "v-slide-group__content",
|
|
7424
|
-
"style": contentStyles.value,
|
|
7425
|
-
"onTouchstartPassive": onTouchstart,
|
|
7426
|
-
"onTouchmovePassive": onTouchmove,
|
|
7427
|
-
"onTouchendPassive": onTouchend,
|
|
7428
7635
|
"onFocusin": onFocusin,
|
|
7429
7636
|
"onFocusout": onFocusout,
|
|
7430
7637
|
"onKeydown": onKeydown
|
|
@@ -7433,6 +7640,7 @@
|
|
|
7433
7640
|
"class": ['v-slide-group__next', {
|
|
7434
7641
|
'v-slide-group__next--disabled': !hasNext.value
|
|
7435
7642
|
}],
|
|
7643
|
+
"onMousedown": onFocusAffixes,
|
|
7436
7644
|
"onClick": () => hasNext.value && scrollTo('next')
|
|
7437
7645
|
}, [slots.next?.(slotProps.value) ?? vue.createVNode(VFadeTransition, null, {
|
|
7438
7646
|
default: () => [vue.createVNode(VIcon, {
|
|
@@ -9227,7 +9435,8 @@
|
|
|
9227
9435
|
if (!isFocused.value && !(e.relatedTarget && contentRef.value?.contains(e.relatedTarget))) focus();
|
|
9228
9436
|
}
|
|
9229
9437
|
function onKeydown(e) {
|
|
9230
|
-
|
|
9438
|
+
const target = e.target;
|
|
9439
|
+
if (!contentRef.value || ['INPUT', 'TEXTAREA'].includes(target.tagName)) return;
|
|
9231
9440
|
if (e.key === 'ArrowDown') {
|
|
9232
9441
|
focus('next');
|
|
9233
9442
|
} else if (e.key === 'ArrowUp') {
|
|
@@ -9347,7 +9556,7 @@
|
|
|
9347
9556
|
}
|
|
9348
9557
|
|
|
9349
9558
|
/** Get the difference between two points */
|
|
9350
|
-
function getOffset$
|
|
9559
|
+
function getOffset$1(a, b) {
|
|
9351
9560
|
return {
|
|
9352
9561
|
x: a.x - b.x,
|
|
9353
9562
|
y: a.y - b.y
|
|
@@ -9594,7 +9803,7 @@
|
|
|
9594
9803
|
let {
|
|
9595
9804
|
x,
|
|
9596
9805
|
y
|
|
9597
|
-
} = getOffset$
|
|
9806
|
+
} = getOffset$1(targetPoint, contentPoint);
|
|
9598
9807
|
switch (_placement.anchor.side) {
|
|
9599
9808
|
case 'top':
|
|
9600
9809
|
y -= offset.value[0];
|
|
@@ -10132,7 +10341,7 @@
|
|
|
10132
10341
|
const target = vue.computed(() => {
|
|
10133
10342
|
if (props.target === 'cursor' && cursorTarget.value) return cursorTarget.value;
|
|
10134
10343
|
if (targetRef.value) return refElement(targetRef.value);
|
|
10135
|
-
return getTarget
|
|
10344
|
+
return getTarget(props.target, vm) || activatorEl.value;
|
|
10136
10345
|
});
|
|
10137
10346
|
const targetEl = vue.computed(() => {
|
|
10138
10347
|
return Array.isArray(target.value) ? undefined : target.value;
|
|
@@ -10204,14 +10413,14 @@
|
|
|
10204
10413
|
}
|
|
10205
10414
|
function getActivator() {
|
|
10206
10415
|
let selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : props.activator;
|
|
10207
|
-
const activator = getTarget
|
|
10416
|
+
const activator = getTarget(selector, vm);
|
|
10208
10417
|
|
|
10209
10418
|
// The activator should only be a valid element (Ignore comments and text nodes)
|
|
10210
10419
|
activatorEl.value = activator?.nodeType === Node.ELEMENT_NODE ? activator : undefined;
|
|
10211
10420
|
return activatorEl.value;
|
|
10212
10421
|
}
|
|
10213
10422
|
}
|
|
10214
|
-
function getTarget
|
|
10423
|
+
function getTarget(selector, vm) {
|
|
10215
10424
|
if (!selector) return;
|
|
10216
10425
|
let target;
|
|
10217
10426
|
if (selector === 'parent') {
|
|
@@ -10664,9 +10873,9 @@
|
|
|
10664
10873
|
}
|
|
10665
10874
|
useRender(() => vue.createVNode(vue.Fragment, null, [slots.activator?.({
|
|
10666
10875
|
isActive: isActive.value,
|
|
10876
|
+
targetRef,
|
|
10667
10877
|
props: vue.mergeProps({
|
|
10668
|
-
ref: activatorRef
|
|
10669
|
-
targetRef
|
|
10878
|
+
ref: activatorRef
|
|
10670
10879
|
}, activatorEvents.value, props.activatorProps)
|
|
10671
10880
|
}), isMounted.value && hasContent.value && vue.createVNode(vue.Teleport, {
|
|
10672
10881
|
"disabled": !teleportTarget.value,
|
|
@@ -12145,6 +12354,10 @@
|
|
|
12145
12354
|
const item = items.value.find(item => item.title.toLowerCase().startsWith(keyboardLookupPrefix));
|
|
12146
12355
|
if (item !== undefined) {
|
|
12147
12356
|
model.value = [item];
|
|
12357
|
+
const index = displayItems.value.indexOf(item);
|
|
12358
|
+
IN_BROWSER && window.requestAnimationFrame(() => {
|
|
12359
|
+
index >= 0 && vVirtualScrollRef.value?.scrollToIndex(index);
|
|
12360
|
+
});
|
|
12148
12361
|
}
|
|
12149
12362
|
}
|
|
12150
12363
|
|
|
@@ -12193,7 +12406,7 @@
|
|
|
12193
12406
|
vTextFieldRef.value.value = '';
|
|
12194
12407
|
}
|
|
12195
12408
|
}
|
|
12196
|
-
vue.watch(
|
|
12409
|
+
vue.watch(menu, () => {
|
|
12197
12410
|
if (!props.hideSelected && menu.value && model.value.length) {
|
|
12198
12411
|
const index = displayItems.value.findIndex(item => model.value.some(s => props.valueComparator(s.value, item.value)));
|
|
12199
12412
|
IN_BROWSER && window.requestAnimationFrame(() => {
|
|
@@ -12647,16 +12860,14 @@
|
|
|
12647
12860
|
listRef.value?.focus('next');
|
|
12648
12861
|
}
|
|
12649
12862
|
if (['Backspace', 'Delete'].includes(e.key)) {
|
|
12650
|
-
if (!props.multiple && hasSelectionSlot.value && model.value.length > 0) return select(model.value[0], false);
|
|
12651
|
-
if (selectionIndex.value
|
|
12652
|
-
|
|
12653
|
-
|
|
12654
|
-
|
|
12655
|
-
|
|
12863
|
+
if (!props.multiple && hasSelectionSlot.value && model.value.length > 0 && !search.value) return select(model.value[0], false);
|
|
12864
|
+
if (~selectionIndex.value) {
|
|
12865
|
+
const originalSelectionIndex = selectionIndex.value;
|
|
12866
|
+
select(model.value[selectionIndex.value], false);
|
|
12867
|
+
selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
|
|
12868
|
+
} else if (e.key === 'Backspace' && !search.value) {
|
|
12869
|
+
selectionIndex.value = length - 1;
|
|
12656
12870
|
}
|
|
12657
|
-
const originalSelectionIndex = selectionIndex.value;
|
|
12658
|
-
select(model.value[selectionIndex.value], false);
|
|
12659
|
-
selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
|
|
12660
12871
|
}
|
|
12661
12872
|
if (!props.multiple) return;
|
|
12662
12873
|
if (e.key === 'ArrowLeft') {
|
|
@@ -12704,7 +12915,7 @@
|
|
|
12704
12915
|
listHasFocus.value = false;
|
|
12705
12916
|
}
|
|
12706
12917
|
function onUpdateModelValue(v) {
|
|
12707
|
-
if (v == null || v === '' && !props.multiple) model.value = [];
|
|
12918
|
+
if (v == null || v === '' && !props.multiple && !hasSelectionSlot.value) model.value = [];
|
|
12708
12919
|
}
|
|
12709
12920
|
const isSelecting = vue.shallowRef(false);
|
|
12710
12921
|
|
|
@@ -13344,12 +13555,12 @@
|
|
|
13344
13555
|
name: 'VDialog',
|
|
13345
13556
|
props: makeVDialogProps(),
|
|
13346
13557
|
emits: {
|
|
13347
|
-
'click:outside': e => true,
|
|
13348
13558
|
'update:modelValue': value => true,
|
|
13349
13559
|
afterLeave: () => true
|
|
13350
13560
|
},
|
|
13351
13561
|
setup(props, _ref) {
|
|
13352
13562
|
let {
|
|
13563
|
+
emit,
|
|
13353
13564
|
slots
|
|
13354
13565
|
} = _ref;
|
|
13355
13566
|
const isActive = useProxiedModel(props, 'modelValue');
|
|
@@ -13392,6 +13603,9 @@
|
|
|
13392
13603
|
});
|
|
13393
13604
|
}
|
|
13394
13605
|
}
|
|
13606
|
+
function onAfterLeave() {
|
|
13607
|
+
emit('afterLeave');
|
|
13608
|
+
}
|
|
13395
13609
|
vue.watch(isActive, async val => {
|
|
13396
13610
|
if (!val) {
|
|
13397
13611
|
await vue.nextTick();
|
|
@@ -13423,7 +13637,8 @@
|
|
|
13423
13637
|
"activatorProps": activatorProps,
|
|
13424
13638
|
"contentProps": contentProps,
|
|
13425
13639
|
"role": "dialog",
|
|
13426
|
-
"onAfterEnter": onAfterEnter
|
|
13640
|
+
"onAfterEnter": onAfterEnter,
|
|
13641
|
+
"onAfterLeave": onAfterLeave
|
|
13427
13642
|
}, scopeId), {
|
|
13428
13643
|
activator: slots.activator,
|
|
13429
13644
|
default: function () {
|
|
@@ -14511,7 +14726,7 @@
|
|
|
14511
14726
|
const imgProps = VImg.filterProps(props);
|
|
14512
14727
|
const windowItemProps = VWindowItem.filterProps(props);
|
|
14513
14728
|
return vue.createVNode(VWindowItem, vue.mergeProps({
|
|
14514
|
-
"class":
|
|
14729
|
+
"class": ['v-carousel-item', props.class]
|
|
14515
14730
|
}, windowItemProps), {
|
|
14516
14731
|
default: () => [vue.createVNode(VImg, vue.mergeProps(attrs, imgProps), slots)]
|
|
14517
14732
|
});
|
|
@@ -14960,7 +15175,7 @@
|
|
|
14960
15175
|
// Types
|
|
14961
15176
|
|
|
14962
15177
|
const VSliderSymbol = Symbol.for('vuetify:v-slider');
|
|
14963
|
-
function getOffset
|
|
15178
|
+
function getOffset(e, el, direction) {
|
|
14964
15179
|
const vertical = direction === 'vertical';
|
|
14965
15180
|
const rect = el.getBoundingClientRect();
|
|
14966
15181
|
const touch = 'touches' in e ? e.touches[0] : e;
|
|
@@ -15119,7 +15334,7 @@
|
|
|
15119
15334
|
activeThumbRef.value.focus();
|
|
15120
15335
|
mousePressed.value = true;
|
|
15121
15336
|
if (activeThumbRef.value.contains(e.target)) {
|
|
15122
|
-
startOffset.value = getOffset
|
|
15337
|
+
startOffset.value = getOffset(e, activeThumbRef.value, props.direction);
|
|
15123
15338
|
} else {
|
|
15124
15339
|
startOffset.value = 0;
|
|
15125
15340
|
onSliderMove({
|
|
@@ -16516,16 +16731,14 @@
|
|
|
16516
16731
|
if (hasSelectionSlot.value) _search.value = '';
|
|
16517
16732
|
}
|
|
16518
16733
|
if (['Backspace', 'Delete'].includes(e.key)) {
|
|
16519
|
-
if (!props.multiple && hasSelectionSlot.value && model.value.length > 0) return select(model.value[0], false);
|
|
16520
|
-
if (selectionIndex.value
|
|
16521
|
-
|
|
16522
|
-
|
|
16523
|
-
|
|
16524
|
-
|
|
16734
|
+
if (!props.multiple && hasSelectionSlot.value && model.value.length > 0 && !search.value) return select(model.value[0], false);
|
|
16735
|
+
if (~selectionIndex.value) {
|
|
16736
|
+
const originalSelectionIndex = selectionIndex.value;
|
|
16737
|
+
select(model.value[selectionIndex.value], false);
|
|
16738
|
+
selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
|
|
16739
|
+
} else if (e.key === 'Backspace' && !search.value) {
|
|
16740
|
+
selectionIndex.value = length - 1;
|
|
16525
16741
|
}
|
|
16526
|
-
const originalSelectionIndex = selectionIndex.value;
|
|
16527
|
-
select(model.value[selectionIndex.value], false);
|
|
16528
|
-
selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
|
|
16529
16742
|
}
|
|
16530
16743
|
if (!props.multiple) return;
|
|
16531
16744
|
if (e.key === 'ArrowLeft') {
|
|
@@ -16594,7 +16807,7 @@
|
|
|
16594
16807
|
listHasFocus.value = false;
|
|
16595
16808
|
}
|
|
16596
16809
|
function onUpdateModelValue(v) {
|
|
16597
|
-
if (v == null || v === '' && !props.multiple) model.value = [];
|
|
16810
|
+
if (v == null || v === '' && !props.multiple && !hasSelectionSlot.value) model.value = [];
|
|
16598
16811
|
}
|
|
16599
16812
|
vue.watch(isFocused, (val, oldVal) => {
|
|
16600
16813
|
if (val || val === oldVal) return;
|
|
@@ -18166,110 +18379,6 @@
|
|
|
18166
18379
|
return Math.floor(diffDays / 7) + 1;
|
|
18167
18380
|
}
|
|
18168
18381
|
|
|
18169
|
-
// Utilities
|
|
18170
|
-
|
|
18171
|
-
// Types
|
|
18172
|
-
|
|
18173
|
-
const GoToSymbol = Symbol.for('vuetify:goto');
|
|
18174
|
-
function genDefaults() {
|
|
18175
|
-
return {
|
|
18176
|
-
container: undefined,
|
|
18177
|
-
duration: 300,
|
|
18178
|
-
layout: false,
|
|
18179
|
-
offset: 0,
|
|
18180
|
-
easing: 'easeInOutCubic',
|
|
18181
|
-
patterns: {
|
|
18182
|
-
linear: t => t,
|
|
18183
|
-
easeInQuad: t => t ** 2,
|
|
18184
|
-
easeOutQuad: t => t * (2 - t),
|
|
18185
|
-
easeInOutQuad: t => t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t,
|
|
18186
|
-
easeInCubic: t => t ** 3,
|
|
18187
|
-
easeOutCubic: t => --t ** 3 + 1,
|
|
18188
|
-
easeInOutCubic: t => t < 0.5 ? 4 * t ** 3 : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1,
|
|
18189
|
-
easeInQuart: t => t ** 4,
|
|
18190
|
-
easeOutQuart: t => 1 - --t ** 4,
|
|
18191
|
-
easeInOutQuart: t => t < 0.5 ? 8 * t ** 4 : 1 - 8 * --t ** 4,
|
|
18192
|
-
easeInQuint: t => t ** 5,
|
|
18193
|
-
easeOutQuint: t => 1 + --t ** 5,
|
|
18194
|
-
easeInOutQuint: t => t < 0.5 ? 16 * t ** 5 : 1 + 16 * --t ** 5
|
|
18195
|
-
}
|
|
18196
|
-
};
|
|
18197
|
-
}
|
|
18198
|
-
function getContainer(el) {
|
|
18199
|
-
return getTarget(el) ?? (document.scrollingElement || document.body);
|
|
18200
|
-
}
|
|
18201
|
-
function getTarget(el) {
|
|
18202
|
-
return typeof el === 'string' ? document.querySelector(el) : refElement(el);
|
|
18203
|
-
}
|
|
18204
|
-
function getOffset(target, horizontal, rtl) {
|
|
18205
|
-
if (typeof target === 'number') return horizontal && rtl ? -target : target;
|
|
18206
|
-
let el = getTarget(target);
|
|
18207
|
-
let totalOffset = 0;
|
|
18208
|
-
while (el) {
|
|
18209
|
-
totalOffset += horizontal ? el.offsetLeft : el.offsetTop;
|
|
18210
|
-
el = el.offsetParent;
|
|
18211
|
-
}
|
|
18212
|
-
return totalOffset;
|
|
18213
|
-
}
|
|
18214
|
-
function createGoTo(options, locale) {
|
|
18215
|
-
return {
|
|
18216
|
-
rtl: locale.isRtl,
|
|
18217
|
-
options: mergeDeep(genDefaults(), options)
|
|
18218
|
-
};
|
|
18219
|
-
}
|
|
18220
|
-
async function scrollTo(_target, _options, horizontal, goTo) {
|
|
18221
|
-
const property = horizontal ? 'scrollLeft' : 'scrollTop';
|
|
18222
|
-
const options = mergeDeep(goTo?.options ?? genDefaults(), _options);
|
|
18223
|
-
const rtl = goTo?.rtl.value;
|
|
18224
|
-
const target = (typeof _target === 'number' ? _target : getTarget(_target)) ?? 0;
|
|
18225
|
-
const container = options.container === 'parent' && target instanceof HTMLElement ? target.parentElement : getContainer(options.container);
|
|
18226
|
-
const ease = typeof options.easing === 'function' ? options.easing : options.patterns[options.easing];
|
|
18227
|
-
if (!ease) throw new TypeError(`Easing function "${options.easing}" not found.`);
|
|
18228
|
-
let targetLocation;
|
|
18229
|
-
if (typeof target === 'number') {
|
|
18230
|
-
targetLocation = getOffset(target, horizontal, rtl);
|
|
18231
|
-
} else {
|
|
18232
|
-
targetLocation = getOffset(target, horizontal, rtl) - getOffset(container, horizontal, rtl);
|
|
18233
|
-
if (options.layout) {
|
|
18234
|
-
const styles = window.getComputedStyle(target);
|
|
18235
|
-
const layoutOffset = styles.getPropertyValue('--v-layout-top');
|
|
18236
|
-
if (layoutOffset) targetLocation -= parseInt(layoutOffset, 10);
|
|
18237
|
-
}
|
|
18238
|
-
}
|
|
18239
|
-
targetLocation += options.offset;
|
|
18240
|
-
const startLocation = container[property] ?? 0;
|
|
18241
|
-
if (targetLocation === startLocation) return Promise.resolve(targetLocation);
|
|
18242
|
-
const startTime = performance.now();
|
|
18243
|
-
return new Promise(resolve => requestAnimationFrame(function step(currentTime) {
|
|
18244
|
-
const timeElapsed = currentTime - startTime;
|
|
18245
|
-
const progress = timeElapsed / options.duration;
|
|
18246
|
-
const location = Math.floor(startLocation + (targetLocation - startLocation) * ease(clamp(progress, 0, 1)));
|
|
18247
|
-
container[property] = location;
|
|
18248
|
-
|
|
18249
|
-
// Allow for some jitter if target time has elapsed
|
|
18250
|
-
if (progress >= 1 && Math.abs(location - container[property]) < 10) {
|
|
18251
|
-
return resolve(targetLocation);
|
|
18252
|
-
} else if (progress > 2) {
|
|
18253
|
-
// The target might not be reachable
|
|
18254
|
-
consoleWarn('Scroll target is not reachable');
|
|
18255
|
-
return resolve(container[property]);
|
|
18256
|
-
}
|
|
18257
|
-
requestAnimationFrame(step);
|
|
18258
|
-
}));
|
|
18259
|
-
}
|
|
18260
|
-
function useGoTo() {
|
|
18261
|
-
let _options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
18262
|
-
const goTo = vue.inject(GoToSymbol);
|
|
18263
|
-
if (!goTo) throw new Error('[Vuetify] Could not find injected goto instance');
|
|
18264
|
-
async function go(target, options) {
|
|
18265
|
-
return scrollTo(target, mergeDeep(_options, options), false, goTo);
|
|
18266
|
-
}
|
|
18267
|
-
go.horizontal = async (target, options) => {
|
|
18268
|
-
return scrollTo(target, mergeDeep(_options, options), true, goTo);
|
|
18269
|
-
};
|
|
18270
|
-
return go;
|
|
18271
|
-
}
|
|
18272
|
-
|
|
18273
18382
|
// Composables
|
|
18274
18383
|
|
|
18275
18384
|
// Types
|
|
@@ -19420,6 +19529,7 @@
|
|
|
19420
19529
|
headerProps: {
|
|
19421
19530
|
type: Object
|
|
19422
19531
|
},
|
|
19532
|
+
...makeDisplayProps(),
|
|
19423
19533
|
...makeLoaderProps()
|
|
19424
19534
|
}, 'VDataTableHeaders');
|
|
19425
19535
|
const VDataTableHeaders = genericComponent()({
|
|
@@ -19429,6 +19539,9 @@
|
|
|
19429
19539
|
let {
|
|
19430
19540
|
slots
|
|
19431
19541
|
} = _ref;
|
|
19542
|
+
const {
|
|
19543
|
+
t
|
|
19544
|
+
} = useLocale();
|
|
19432
19545
|
const {
|
|
19433
19546
|
toggleSort,
|
|
19434
19547
|
sortBy,
|
|
@@ -19464,6 +19577,10 @@
|
|
|
19464
19577
|
backgroundColorClasses,
|
|
19465
19578
|
backgroundColorStyles
|
|
19466
19579
|
} = useBackgroundColor(props, 'color');
|
|
19580
|
+
const {
|
|
19581
|
+
displayClasses,
|
|
19582
|
+
mobile
|
|
19583
|
+
} = useDisplay(props);
|
|
19467
19584
|
const slotProps = vue.computed(() => ({
|
|
19468
19585
|
headers: headers.value,
|
|
19469
19586
|
columns: columns.value,
|
|
@@ -19475,6 +19592,9 @@
|
|
|
19475
19592
|
selectAll,
|
|
19476
19593
|
getSortIcon
|
|
19477
19594
|
}));
|
|
19595
|
+
const headerCellClasses = vue.computed(() => ['v-data-table__th', {
|
|
19596
|
+
'v-data-table__th--sticky': props.sticky
|
|
19597
|
+
}, displayClasses.value, loaderClasses.value]);
|
|
19478
19598
|
const VDataTableHeaderCell = _ref2 => {
|
|
19479
19599
|
let {
|
|
19480
19600
|
column,
|
|
@@ -19486,12 +19606,11 @@
|
|
|
19486
19606
|
return vue.createVNode(VDataTableColumn, vue.mergeProps({
|
|
19487
19607
|
"tag": "th",
|
|
19488
19608
|
"align": column.align,
|
|
19489
|
-
"class": [
|
|
19609
|
+
"class": [{
|
|
19490
19610
|
'v-data-table__th--sortable': column.sortable,
|
|
19491
19611
|
'v-data-table__th--sorted': isSorted(column),
|
|
19492
|
-
'v-data-table__th--fixed': column.fixed
|
|
19493
|
-
|
|
19494
|
-
}, loaderClasses.value],
|
|
19612
|
+
'v-data-table__th--fixed': column.fixed
|
|
19613
|
+
}, ...headerCellClasses.value],
|
|
19495
19614
|
"style": {
|
|
19496
19615
|
width: convertToUnit(column.width),
|
|
19497
19616
|
minWidth: convertToUnit(column.minWidth),
|
|
@@ -19540,8 +19659,53 @@
|
|
|
19540
19659
|
}
|
|
19541
19660
|
});
|
|
19542
19661
|
};
|
|
19662
|
+
const VDataTableMobileHeaderCell = () => {
|
|
19663
|
+
const headerProps = vue.mergeProps(props.headerProps ?? {} ?? {});
|
|
19664
|
+
const displayItems = vue.computed(() => {
|
|
19665
|
+
return columns.value.filter(column => column?.sortable);
|
|
19666
|
+
});
|
|
19667
|
+
const appendIcon = vue.computed(() => {
|
|
19668
|
+
return allSelected.value ? '$checkboxOn' : someSelected.value ? '$checkboxIndeterminate' : '$checkboxOff';
|
|
19669
|
+
});
|
|
19670
|
+
return vue.createVNode(VDataTableColumn, vue.mergeProps({
|
|
19671
|
+
"tag": "th",
|
|
19672
|
+
"class": [...headerCellClasses.value],
|
|
19673
|
+
"colspan": headers.value.length + 1
|
|
19674
|
+
}, headerProps), {
|
|
19675
|
+
default: () => [vue.createVNode("div", {
|
|
19676
|
+
"class": "v-data-table-header__content"
|
|
19677
|
+
}, [vue.createVNode(VSelect, {
|
|
19678
|
+
"chips": true,
|
|
19679
|
+
"class": "v-data-table__td-sort-select",
|
|
19680
|
+
"clearable": true,
|
|
19681
|
+
"density": "default",
|
|
19682
|
+
"items": displayItems.value,
|
|
19683
|
+
"label": t('$vuetify.dataTable.sortBy'),
|
|
19684
|
+
"multiple": props.multiSort,
|
|
19685
|
+
"variant": "underlined",
|
|
19686
|
+
"onClick:clear": () => sortBy.value = [],
|
|
19687
|
+
"appendIcon": appendIcon.value,
|
|
19688
|
+
"onClick:append": () => selectAll(!allSelected.value)
|
|
19689
|
+
}, {
|
|
19690
|
+
...slots,
|
|
19691
|
+
chip: props => vue.createVNode(VChip, {
|
|
19692
|
+
"onClick": props.item.raw?.sortable ? () => toggleSort(props.item.raw) : undefined,
|
|
19693
|
+
"onMousedown": e => {
|
|
19694
|
+
e.preventDefault();
|
|
19695
|
+
e.stopPropagation();
|
|
19696
|
+
}
|
|
19697
|
+
}, {
|
|
19698
|
+
default: () => [props.item.title, vue.createVNode(VIcon, {
|
|
19699
|
+
"class": ['v-data-table__td-sort-icon', isSorted(props.item.raw) && 'v-data-table__td-sort-icon-active'],
|
|
19700
|
+
"icon": getSortIcon(props.item.raw),
|
|
19701
|
+
"size": "small"
|
|
19702
|
+
}, null)]
|
|
19703
|
+
})
|
|
19704
|
+
})])]
|
|
19705
|
+
});
|
|
19706
|
+
};
|
|
19543
19707
|
useRender(() => {
|
|
19544
|
-
return vue.createVNode(vue.Fragment, null, [slots.headers ? slots.headers(slotProps.value) : headers.value.map((row, y) => vue.createVNode("tr", null, [row.map((column, x) => vue.createVNode(VDataTableHeaderCell, {
|
|
19708
|
+
return mobile.value ? vue.createVNode("tr", null, [vue.createVNode(VDataTableMobileHeaderCell, null, null)]) : vue.createVNode(vue.Fragment, null, [slots.headers ? slots.headers(slotProps.value) : headers.value.map((row, y) => vue.createVNode("tr", null, [row.map((column, x) => vue.createVNode(VDataTableHeaderCell, {
|
|
19545
19709
|
"column": column,
|
|
19546
19710
|
"x": x,
|
|
19547
19711
|
"y": y
|
|
@@ -19649,7 +19813,8 @@
|
|
|
19649
19813
|
cellProps: [Object, Function],
|
|
19650
19814
|
onClick: EventProp(),
|
|
19651
19815
|
onContextmenu: EventProp(),
|
|
19652
|
-
onDblclick: EventProp()
|
|
19816
|
+
onDblclick: EventProp(),
|
|
19817
|
+
...makeDisplayProps()
|
|
19653
19818
|
}, 'VDataTableRow');
|
|
19654
19819
|
const VDataTableRow = genericComponent()({
|
|
19655
19820
|
name: 'VDataTableRow',
|
|
@@ -19658,27 +19823,40 @@
|
|
|
19658
19823
|
let {
|
|
19659
19824
|
slots
|
|
19660
19825
|
} = _ref;
|
|
19826
|
+
const {
|
|
19827
|
+
displayClasses,
|
|
19828
|
+
mobile
|
|
19829
|
+
} = useDisplay(props, 'v-data-table__tr');
|
|
19661
19830
|
const {
|
|
19662
19831
|
isSelected,
|
|
19663
|
-
toggleSelect
|
|
19832
|
+
toggleSelect,
|
|
19833
|
+
someSelected,
|
|
19834
|
+
allSelected,
|
|
19835
|
+
selectAll
|
|
19664
19836
|
} = useSelection();
|
|
19665
19837
|
const {
|
|
19666
19838
|
isExpanded,
|
|
19667
19839
|
toggleExpand
|
|
19668
19840
|
} = useExpanded();
|
|
19841
|
+
const {
|
|
19842
|
+
toggleSort,
|
|
19843
|
+
sortBy,
|
|
19844
|
+
isSorted
|
|
19845
|
+
} = useSort();
|
|
19669
19846
|
const {
|
|
19670
19847
|
columns
|
|
19671
19848
|
} = useHeaders();
|
|
19672
19849
|
useRender(() => vue.createVNode("tr", {
|
|
19673
19850
|
"class": ['v-data-table__tr', {
|
|
19674
19851
|
'v-data-table__tr--clickable': !!(props.onClick || props.onContextmenu || props.onDblclick)
|
|
19675
|
-
}],
|
|
19852
|
+
}, displayClasses.value],
|
|
19676
19853
|
"onClick": props.onClick,
|
|
19677
19854
|
"onContextmenu": props.onContextmenu,
|
|
19678
19855
|
"onDblclick": props.onDblclick
|
|
19679
19856
|
}, [props.item && columns.value.map((column, i) => {
|
|
19680
19857
|
const item = props.item;
|
|
19681
19858
|
const slotName = `item.${column.key}`;
|
|
19859
|
+
const headerSlotName = `header.${column.key}`;
|
|
19682
19860
|
const slotProps = {
|
|
19683
19861
|
index: props.index,
|
|
19684
19862
|
item: item.raw,
|
|
@@ -19690,6 +19868,16 @@
|
|
|
19690
19868
|
isExpanded,
|
|
19691
19869
|
toggleExpand
|
|
19692
19870
|
};
|
|
19871
|
+
const columnSlotProps = {
|
|
19872
|
+
column,
|
|
19873
|
+
selectAll,
|
|
19874
|
+
isSorted,
|
|
19875
|
+
toggleSort,
|
|
19876
|
+
sortBy: sortBy.value,
|
|
19877
|
+
someSelected: someSelected.value,
|
|
19878
|
+
allSelected: allSelected.value,
|
|
19879
|
+
getSortIcon: () => ''
|
|
19880
|
+
};
|
|
19693
19881
|
const cellProps = typeof props.cellProps === 'function' ? props.cellProps({
|
|
19694
19882
|
index: slotProps.index,
|
|
19695
19883
|
item: slotProps.item,
|
|
@@ -19705,16 +19893,20 @@
|
|
|
19705
19893
|
}) : column.cellProps;
|
|
19706
19894
|
return vue.createVNode(VDataTableColumn, vue.mergeProps({
|
|
19707
19895
|
"align": column.align,
|
|
19896
|
+
"class": {
|
|
19897
|
+
'v-data-table__td--expanded-row': column.key === 'data-table-expand',
|
|
19898
|
+
'v-data-table__td--select-row': column.key === 'data-table-select'
|
|
19899
|
+
},
|
|
19708
19900
|
"fixed": column.fixed,
|
|
19709
19901
|
"fixedOffset": column.fixedOffset,
|
|
19710
19902
|
"lastFixed": column.lastFixed,
|
|
19903
|
+
"maxWidth": !mobile.value ? column.maxWidth : undefined,
|
|
19711
19904
|
"noPadding": column.key === 'data-table-select' || column.key === 'data-table-expand',
|
|
19712
|
-
"
|
|
19713
|
-
"
|
|
19714
|
-
"nowrap": column.nowrap
|
|
19905
|
+
"nowrap": column.nowrap,
|
|
19906
|
+
"width": !mobile.value ? column.width : undefined
|
|
19715
19907
|
}, cellProps, columnCellProps), {
|
|
19716
19908
|
default: () => {
|
|
19717
|
-
if (slots[slotName]) return slots[slotName](slotProps);
|
|
19909
|
+
if (slots[slotName] && !mobile.value) return slots[slotName]?.(slotProps);
|
|
19718
19910
|
if (column.key === 'data-table-select') {
|
|
19719
19911
|
return slots['item.data-table-select']?.(slotProps) ?? vue.createVNode(VCheckboxBtn, {
|
|
19720
19912
|
"disabled": !item.selectable,
|
|
@@ -19730,7 +19922,12 @@
|
|
|
19730
19922
|
"onClick": vue.withModifiers(() => toggleExpand(item), ['stop'])
|
|
19731
19923
|
}, null);
|
|
19732
19924
|
}
|
|
19733
|
-
|
|
19925
|
+
const displayValue = vue.toDisplayString(slotProps.value);
|
|
19926
|
+
return !mobile.value ? displayValue : vue.createVNode(vue.Fragment, null, [vue.createVNode("div", {
|
|
19927
|
+
"class": "v-data-table__td-title"
|
|
19928
|
+
}, [slots[headerSlotName]?.(columnSlotProps) ?? column.title]), vue.createVNode("div", {
|
|
19929
|
+
"class": "v-data-table__td-value"
|
|
19930
|
+
}, [slots[slotName]?.(slotProps) ?? displayValue])]);
|
|
19734
19931
|
}
|
|
19735
19932
|
});
|
|
19736
19933
|
})]));
|
|
@@ -19755,7 +19952,8 @@
|
|
|
19755
19952
|
default: '$vuetify.noDataText'
|
|
19756
19953
|
},
|
|
19757
19954
|
rowProps: [Object, Function],
|
|
19758
|
-
cellProps: [Object, Function]
|
|
19955
|
+
cellProps: [Object, Function],
|
|
19956
|
+
...makeDisplayProps()
|
|
19759
19957
|
}, 'VDataTableRows');
|
|
19760
19958
|
const VDataTableRows = genericComponent()({
|
|
19761
19959
|
name: 'VDataTableRows',
|
|
@@ -19785,6 +19983,9 @@
|
|
|
19785
19983
|
const {
|
|
19786
19984
|
t
|
|
19787
19985
|
} = useLocale();
|
|
19986
|
+
const {
|
|
19987
|
+
mobile
|
|
19988
|
+
} = useDisplay(props);
|
|
19788
19989
|
useRender(() => {
|
|
19789
19990
|
if (props.loading && (!props.items.length || slots.loading)) {
|
|
19790
19991
|
return vue.createVNode("tr", {
|
|
@@ -19839,7 +20040,8 @@
|
|
|
19839
20040
|
} : undefined,
|
|
19840
20041
|
index,
|
|
19841
20042
|
item,
|
|
19842
|
-
cellProps: props.cellProps
|
|
20043
|
+
cellProps: props.cellProps,
|
|
20044
|
+
mobile: mobile.value
|
|
19843
20045
|
}, getPrefixedEventHandlers(attrs, ':row', () => slotProps), typeof props.rowProps === 'function' ? props.rowProps({
|
|
19844
20046
|
item: slotProps.item,
|
|
19845
20047
|
index: slotProps.index,
|
|
@@ -21666,8 +21868,18 @@
|
|
|
21666
21868
|
emit('update:year', value);
|
|
21667
21869
|
}
|
|
21668
21870
|
vue.watch(model, (val, oldVal) => {
|
|
21669
|
-
const before = adapter.date(wrapInArray(
|
|
21670
|
-
const after = adapter.date(wrapInArray(
|
|
21871
|
+
const before = adapter.date(wrapInArray(oldVal)[oldVal.length - 1]);
|
|
21872
|
+
const after = adapter.date(wrapInArray(val)[val.length - 1]);
|
|
21873
|
+
const newMonth = adapter.getMonth(after);
|
|
21874
|
+
const newYear = adapter.getYear(after);
|
|
21875
|
+
if (newMonth !== month.value) {
|
|
21876
|
+
month.value = newMonth;
|
|
21877
|
+
onUpdateMonth(month.value);
|
|
21878
|
+
}
|
|
21879
|
+
if (newYear !== year.value) {
|
|
21880
|
+
year.value = newYear;
|
|
21881
|
+
onUpdateYear(year.value);
|
|
21882
|
+
}
|
|
21671
21883
|
isReversing.value = adapter.isBefore(before, after);
|
|
21672
21884
|
});
|
|
21673
21885
|
useRender(() => {
|
|
@@ -22010,7 +22222,7 @@
|
|
|
22010
22222
|
}),
|
|
22011
22223
|
modelValue: {
|
|
22012
22224
|
type: [Array, Object],
|
|
22013
|
-
default:
|
|
22225
|
+
default: props => props.multiple ? [] : null,
|
|
22014
22226
|
validator: val => {
|
|
22015
22227
|
return wrapInArray(val).every(v => v != null && typeof v === 'object');
|
|
22016
22228
|
}
|
|
@@ -22669,6 +22881,7 @@
|
|
|
22669
22881
|
|
|
22670
22882
|
const makeVLayoutProps = propsFactory({
|
|
22671
22883
|
...makeComponentProps(),
|
|
22884
|
+
...makeDimensionProps(),
|
|
22672
22885
|
...makeLayoutProps()
|
|
22673
22886
|
}, 'VLayout');
|
|
22674
22887
|
const VLayout = genericComponent()({
|
|
@@ -22685,10 +22898,13 @@
|
|
|
22685
22898
|
items,
|
|
22686
22899
|
layoutRef
|
|
22687
22900
|
} = createLayout(props);
|
|
22901
|
+
const {
|
|
22902
|
+
dimensionStyles
|
|
22903
|
+
} = useDimension(props);
|
|
22688
22904
|
useRender(() => vue.createVNode("div", {
|
|
22689
22905
|
"ref": layoutRef,
|
|
22690
22906
|
"class": [layoutClasses.value, props.class],
|
|
22691
|
-
"style": [layoutStyles.value, props.style]
|
|
22907
|
+
"style": [dimensionStyles.value, layoutStyles.value, props.style]
|
|
22692
22908
|
}, [vue.createVNode(vue.Suspense, null, {
|
|
22693
22909
|
default: () => [vue.createVNode(vue.Fragment, null, [slots.default?.()])]
|
|
22694
22910
|
})]));
|
|
@@ -23051,6 +23267,7 @@
|
|
|
23051
23267
|
|
|
23052
23268
|
function useTouch(_ref) {
|
|
23053
23269
|
let {
|
|
23270
|
+
el,
|
|
23054
23271
|
isActive,
|
|
23055
23272
|
isTemporary,
|
|
23056
23273
|
width,
|
|
@@ -23100,10 +23317,10 @@
|
|
|
23100
23317
|
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();
|
|
23101
23318
|
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());
|
|
23102
23319
|
if (inTouchZone || inElement || isActive.value && isTemporary.value) {
|
|
23103
|
-
maybeDragging = true;
|
|
23104
23320
|
start = [touchX, touchY];
|
|
23105
23321
|
offset.value = getOffset(isHorizontal.value ? touchX : touchY, isActive.value);
|
|
23106
23322
|
dragProgress.value = getProgress(isHorizontal.value ? touchX : touchY);
|
|
23323
|
+
maybeDragging = offset.value > -20 && offset.value < 80;
|
|
23107
23324
|
endTouch(e);
|
|
23108
23325
|
addMovement(e);
|
|
23109
23326
|
}
|
|
@@ -23163,6 +23380,18 @@
|
|
|
23163
23380
|
transition: 'none'
|
|
23164
23381
|
} : undefined;
|
|
23165
23382
|
});
|
|
23383
|
+
useToggleScope(isDragging, () => {
|
|
23384
|
+
const transform = el.value?.style.transform ?? null;
|
|
23385
|
+
const transition = el.value?.style.transition ?? null;
|
|
23386
|
+
vue.watchEffect(() => {
|
|
23387
|
+
el.value?.style.setProperty('transform', dragStyles.value?.transform || 'none');
|
|
23388
|
+
el.value?.style.setProperty('transition', dragStyles.value?.transition || null);
|
|
23389
|
+
});
|
|
23390
|
+
vue.onScopeDispose(() => {
|
|
23391
|
+
el.value?.style.setProperty('transform', transform);
|
|
23392
|
+
el.value?.style.setProperty('transition', transition);
|
|
23393
|
+
});
|
|
23394
|
+
});
|
|
23166
23395
|
return {
|
|
23167
23396
|
isDragging,
|
|
23168
23397
|
dragProgress,
|
|
@@ -23201,6 +23430,7 @@
|
|
|
23201
23430
|
},
|
|
23202
23431
|
image: String,
|
|
23203
23432
|
temporary: Boolean,
|
|
23433
|
+
persistent: Boolean,
|
|
23204
23434
|
touchless: Boolean,
|
|
23205
23435
|
width: {
|
|
23206
23436
|
type: [Number, String],
|
|
@@ -23282,6 +23512,7 @@
|
|
|
23282
23512
|
const location = vue.computed(() => {
|
|
23283
23513
|
return toPhysical(props.location, isRtl.value);
|
|
23284
23514
|
});
|
|
23515
|
+
const isPersistent = vue.computed(() => props.persistent);
|
|
23285
23516
|
const isTemporary = vue.computed(() => !props.permanent && (mobile.value || props.temporary));
|
|
23286
23517
|
const isSticky = vue.computed(() => props.sticky && !isTemporary.value && location.value !== 'bottom');
|
|
23287
23518
|
useToggleScope(() => props.expandOnHover && props.rail != null, () => {
|
|
@@ -23301,9 +23532,9 @@
|
|
|
23301
23532
|
}
|
|
23302
23533
|
const {
|
|
23303
23534
|
isDragging,
|
|
23304
|
-
dragProgress
|
|
23305
|
-
dragStyles
|
|
23535
|
+
dragProgress
|
|
23306
23536
|
} = useTouch({
|
|
23537
|
+
el: rootEl,
|
|
23307
23538
|
isActive,
|
|
23308
23539
|
isTemporary,
|
|
23309
23540
|
width,
|
|
@@ -23314,6 +23545,7 @@
|
|
|
23314
23545
|
const size = isTemporary.value ? 0 : props.rail && props.expandOnHover ? Number(props.railWidth) : width.value;
|
|
23315
23546
|
return isDragging.value ? size * dragProgress.value : size;
|
|
23316
23547
|
});
|
|
23548
|
+
const elementSize = vue.computed(() => ['top', 'bottom'].includes(props.location) ? 0 : width.value);
|
|
23317
23549
|
const {
|
|
23318
23550
|
layoutItemStyles,
|
|
23319
23551
|
layoutItemScrimStyles,
|
|
@@ -23323,7 +23555,7 @@
|
|
|
23323
23555
|
order: vue.computed(() => parseInt(props.order, 10)),
|
|
23324
23556
|
position: location,
|
|
23325
23557
|
layoutSize,
|
|
23326
|
-
elementSize
|
|
23558
|
+
elementSize,
|
|
23327
23559
|
active: vue.computed(() => isActive.value || isDragging.value),
|
|
23328
23560
|
disableTransitions: vue.computed(() => isDragging.value),
|
|
23329
23561
|
absolute: vue.computed(() =>
|
|
@@ -23365,10 +23597,13 @@
|
|
|
23365
23597
|
'v-navigation-drawer--is-hovering': isHovering.value,
|
|
23366
23598
|
'v-navigation-drawer--rail': props.rail,
|
|
23367
23599
|
'v-navigation-drawer--temporary': isTemporary.value,
|
|
23600
|
+
'v-navigation-drawer--persistent': isPersistent.value,
|
|
23368
23601
|
'v-navigation-drawer--active': isActive.value,
|
|
23369
23602
|
'v-navigation-drawer--sticky': isSticky.value
|
|
23370
23603
|
}, themeClasses.value, backgroundColorClasses.value, borderClasses.value, displayClasses.value, elevationClasses.value, roundedClasses.value, props.class],
|
|
23371
|
-
"style": [backgroundColorStyles.value, layoutItemStyles.value,
|
|
23604
|
+
"style": [backgroundColorStyles.value, layoutItemStyles.value, ssrBootStyles.value, stickyStyles.value, props.style, ['top', 'bottom'].includes(location.value) ? {
|
|
23605
|
+
height: 'auto'
|
|
23606
|
+
} : {}]
|
|
23372
23607
|
}, scopeId, attrs), {
|
|
23373
23608
|
default: () => [hasImage && vue.createVNode("div", {
|
|
23374
23609
|
"key": "image",
|
|
@@ -23403,7 +23638,10 @@
|
|
|
23403
23638
|
default: () => [isTemporary.value && (isDragging.value || isActive.value) && !!props.scrim && vue.createVNode("div", vue.mergeProps({
|
|
23404
23639
|
"class": ['v-navigation-drawer__scrim', scrimColor.backgroundColorClasses.value],
|
|
23405
23640
|
"style": [scrimStyles.value, scrimColor.backgroundColorStyles.value],
|
|
23406
|
-
"onClick": () =>
|
|
23641
|
+
"onClick": () => {
|
|
23642
|
+
if (isPersistent.value) return;
|
|
23643
|
+
isActive.value = false;
|
|
23644
|
+
}
|
|
23407
23645
|
}, scopeId), null)]
|
|
23408
23646
|
})]);
|
|
23409
23647
|
});
|
|
@@ -23884,8 +24122,8 @@
|
|
|
23884
24122
|
} = useRtl();
|
|
23885
24123
|
function getActiveThumb(e) {
|
|
23886
24124
|
if (!startThumbRef.value || !stopThumbRef.value) return;
|
|
23887
|
-
const startOffset = getOffset
|
|
23888
|
-
const stopOffset = getOffset
|
|
24125
|
+
const startOffset = getOffset(e, startThumbRef.value.$el, props.direction);
|
|
24126
|
+
const stopOffset = getOffset(e, stopThumbRef.value.$el, props.direction);
|
|
23889
24127
|
const a = Math.abs(startOffset);
|
|
23890
24128
|
const b = Math.abs(stopOffset);
|
|
23891
24129
|
return a < b || a === b && startOffset < 0 ? startThumbRef.value.$el : stopThumbRef.value.$el;
|
|
@@ -24480,9 +24718,6 @@
|
|
|
24480
24718
|
slots
|
|
24481
24719
|
} = _ref;
|
|
24482
24720
|
const isActive = useProxiedModel(props, 'modelValue');
|
|
24483
|
-
const {
|
|
24484
|
-
locationStyles
|
|
24485
|
-
} = useLocation(props);
|
|
24486
24721
|
const {
|
|
24487
24722
|
positionClasses
|
|
24488
24723
|
} = usePosition(props);
|
|
@@ -24504,6 +24739,15 @@
|
|
|
24504
24739
|
const overlay = vue.ref();
|
|
24505
24740
|
const timerRef = vue.ref();
|
|
24506
24741
|
const isHovering = vue.shallowRef(false);
|
|
24742
|
+
const startY = vue.shallowRef(0);
|
|
24743
|
+
const mainStyles = vue.ref();
|
|
24744
|
+
const hasLayout = vue.inject(VuetifyLayoutKey, undefined);
|
|
24745
|
+
useToggleScope(() => !!hasLayout, () => {
|
|
24746
|
+
const layout = useLayout();
|
|
24747
|
+
vue.watchEffect(() => {
|
|
24748
|
+
mainStyles.value = layout.mainStyles.value;
|
|
24749
|
+
});
|
|
24750
|
+
});
|
|
24507
24751
|
vue.watch(isActive, startTimeout);
|
|
24508
24752
|
vue.watch(() => props.timeout, startTimeout);
|
|
24509
24753
|
vue.onMounted(() => {
|
|
@@ -24533,6 +24777,20 @@
|
|
|
24533
24777
|
isHovering.value = false;
|
|
24534
24778
|
startTimeout();
|
|
24535
24779
|
}
|
|
24780
|
+
function onTouchstart(event) {
|
|
24781
|
+
startY.value = event.touches[0].clientY;
|
|
24782
|
+
}
|
|
24783
|
+
function onTouchend(event) {
|
|
24784
|
+
if (Math.abs(startY.value - event.changedTouches[0].clientY) > 50) {
|
|
24785
|
+
isActive.value = false;
|
|
24786
|
+
}
|
|
24787
|
+
}
|
|
24788
|
+
const locationClasses = vue.computed(() => {
|
|
24789
|
+
return props.location.split(' ').reduce((acc, loc) => {
|
|
24790
|
+
acc[`v-snackbar--${loc}`] = true;
|
|
24791
|
+
return acc;
|
|
24792
|
+
}, {});
|
|
24793
|
+
});
|
|
24536
24794
|
useRender(() => {
|
|
24537
24795
|
const overlayProps = VOverlay.filterProps(props);
|
|
24538
24796
|
const hasContent = !!(slots.default || slots.text || props.text);
|
|
@@ -24543,14 +24801,14 @@
|
|
|
24543
24801
|
'v-snackbar--multi-line': props.multiLine && !props.vertical,
|
|
24544
24802
|
'v-snackbar--timer': !!props.timer,
|
|
24545
24803
|
'v-snackbar--vertical': props.vertical
|
|
24546
|
-
}, positionClasses.value, props.class],
|
|
24547
|
-
"style": props.style
|
|
24804
|
+
}, locationClasses.value, positionClasses.value, props.class],
|
|
24805
|
+
"style": [mainStyles.value, props.style]
|
|
24548
24806
|
}, overlayProps, {
|
|
24549
24807
|
"modelValue": isActive.value,
|
|
24550
24808
|
"onUpdate:modelValue": $event => isActive.value = $event,
|
|
24551
24809
|
"contentProps": vue.mergeProps({
|
|
24552
24810
|
class: ['v-snackbar__wrapper', themeClasses.value, colorClasses.value, roundedClasses.value, variantClasses.value],
|
|
24553
|
-
style: [
|
|
24811
|
+
style: [colorStyles.value],
|
|
24554
24812
|
onPointerenter,
|
|
24555
24813
|
onPointerleave
|
|
24556
24814
|
}, overlayProps.contentProps),
|
|
@@ -24558,7 +24816,9 @@
|
|
|
24558
24816
|
"noClickAnimation": true,
|
|
24559
24817
|
"scrim": false,
|
|
24560
24818
|
"scrollStrategy": "none",
|
|
24561
|
-
"_disableGlobalStack": true
|
|
24819
|
+
"_disableGlobalStack": true,
|
|
24820
|
+
"onTouchstartPassive": onTouchstart,
|
|
24821
|
+
"onTouchend": onTouchend
|
|
24562
24822
|
}, scopeId), {
|
|
24563
24823
|
default: () => [genOverlays(false, 'v-snackbar'), props.timer && !isHovering.value && vue.createVNode("div", {
|
|
24564
24824
|
"key": "timer",
|
|
@@ -26690,6 +26950,125 @@
|
|
|
26690
26950
|
|
|
26691
26951
|
// Types
|
|
26692
26952
|
|
|
26953
|
+
const makeVDateInputProps = propsFactory({
|
|
26954
|
+
hideActions: Boolean,
|
|
26955
|
+
...makeFocusProps(),
|
|
26956
|
+
...makeVConfirmEditProps(),
|
|
26957
|
+
...makeVTextFieldProps({
|
|
26958
|
+
placeholder: 'mm/dd/yyyy',
|
|
26959
|
+
prependIcon: '$calendar'
|
|
26960
|
+
}),
|
|
26961
|
+
...omit(makeVDatePickerProps({
|
|
26962
|
+
weeksInMonth: 'dynamic',
|
|
26963
|
+
hideHeader: true
|
|
26964
|
+
}), ['active'])
|
|
26965
|
+
}, 'VDateInput');
|
|
26966
|
+
const VDateInput = genericComponent()({
|
|
26967
|
+
name: 'VDateInput',
|
|
26968
|
+
props: makeVDateInputProps(),
|
|
26969
|
+
emits: {
|
|
26970
|
+
'update:modelValue': val => true
|
|
26971
|
+
},
|
|
26972
|
+
setup(props, _ref) {
|
|
26973
|
+
let {
|
|
26974
|
+
slots
|
|
26975
|
+
} = _ref;
|
|
26976
|
+
const {
|
|
26977
|
+
t
|
|
26978
|
+
} = useLocale();
|
|
26979
|
+
const adapter = useDate();
|
|
26980
|
+
const {
|
|
26981
|
+
isFocused,
|
|
26982
|
+
focus,
|
|
26983
|
+
blur
|
|
26984
|
+
} = useFocus(props);
|
|
26985
|
+
const model = useProxiedModel(props, 'modelValue', props.multiple ? [] : null);
|
|
26986
|
+
const menu = vue.shallowRef(false);
|
|
26987
|
+
const display = vue.computed(() => {
|
|
26988
|
+
const value = wrapInArray(model.value);
|
|
26989
|
+
if (!value.length) return null;
|
|
26990
|
+
if (props.multiple === true) {
|
|
26991
|
+
return t('$vuetify.datePicker.itemsSelected', value.length);
|
|
26992
|
+
}
|
|
26993
|
+
if (props.multiple === 'range') {
|
|
26994
|
+
const start = value[0];
|
|
26995
|
+
const end = value[value.length - 1];
|
|
26996
|
+
return adapter.isValid(start) && adapter.isValid(end) ? `${adapter.format(start, 'keyboardDate')} - ${adapter.format(end, 'keyboardDate')}` : '';
|
|
26997
|
+
}
|
|
26998
|
+
return adapter.isValid(model.value) ? adapter.format(model.value, 'keyboardDate') : '';
|
|
26999
|
+
});
|
|
27000
|
+
function onKeydown(e) {
|
|
27001
|
+
if (e.key !== 'Enter') return;
|
|
27002
|
+
if (!menu.value || !isFocused.value) {
|
|
27003
|
+
menu.value = true;
|
|
27004
|
+
return;
|
|
27005
|
+
}
|
|
27006
|
+
const target = e.target;
|
|
27007
|
+
model.value = adapter.date(target.value);
|
|
27008
|
+
}
|
|
27009
|
+
function onClick(e) {
|
|
27010
|
+
e.preventDefault();
|
|
27011
|
+
e.stopPropagation();
|
|
27012
|
+
menu.value = true;
|
|
27013
|
+
}
|
|
27014
|
+
function onSave() {
|
|
27015
|
+
menu.value = false;
|
|
27016
|
+
}
|
|
27017
|
+
useRender(() => {
|
|
27018
|
+
const confirmEditProps = VConfirmEdit.filterProps(props);
|
|
27019
|
+
const datePickerProps = VDatePicker.filterProps(omit(props, ['active']));
|
|
27020
|
+
const textFieldProps = VTextField.filterProps(props);
|
|
27021
|
+
return vue.createVNode(VTextField, vue.mergeProps(textFieldProps, {
|
|
27022
|
+
"modelValue": display.value,
|
|
27023
|
+
"onKeydown": onKeydown,
|
|
27024
|
+
"focused": menu.value || isFocused.value,
|
|
27025
|
+
"onFocus": focus,
|
|
27026
|
+
"onBlur": blur,
|
|
27027
|
+
"onClick:control": onClick,
|
|
27028
|
+
"onClick:prepend": onClick
|
|
27029
|
+
}), {
|
|
27030
|
+
default: () => [vue.createVNode(VMenu, {
|
|
27031
|
+
"modelValue": menu.value,
|
|
27032
|
+
"onUpdate:modelValue": $event => menu.value = $event,
|
|
27033
|
+
"activator": "parent",
|
|
27034
|
+
"min-width": "0",
|
|
27035
|
+
"closeOnContentClick": false,
|
|
27036
|
+
"openOnClick": false
|
|
27037
|
+
}, {
|
|
27038
|
+
default: () => [vue.createVNode(VConfirmEdit, vue.mergeProps(confirmEditProps, {
|
|
27039
|
+
"modelValue": model.value,
|
|
27040
|
+
"onUpdate:modelValue": $event => model.value = $event,
|
|
27041
|
+
"onSave": onSave
|
|
27042
|
+
}), {
|
|
27043
|
+
default: _ref2 => {
|
|
27044
|
+
let {
|
|
27045
|
+
actions,
|
|
27046
|
+
model: proxyModel
|
|
27047
|
+
} = _ref2;
|
|
27048
|
+
return vue.createVNode(VDatePicker, vue.mergeProps(datePickerProps, {
|
|
27049
|
+
"modelValue": props.hideActions ? model.value : proxyModel.value,
|
|
27050
|
+
"onUpdate:modelValue": val => {
|
|
27051
|
+
if (!props.hideActions) {
|
|
27052
|
+
proxyModel.value = val;
|
|
27053
|
+
} else {
|
|
27054
|
+
model.value = val;
|
|
27055
|
+
if (!props.multiple) menu.value = false;
|
|
27056
|
+
}
|
|
27057
|
+
},
|
|
27058
|
+
"onMousedown": e => e.preventDefault()
|
|
27059
|
+
}), {
|
|
27060
|
+
actions: !props.hideActions ? () => actions : undefined
|
|
27061
|
+
});
|
|
27062
|
+
}
|
|
27063
|
+
})]
|
|
27064
|
+
}), slots.default?.()]
|
|
27065
|
+
});
|
|
27066
|
+
});
|
|
27067
|
+
}
|
|
27068
|
+
});
|
|
27069
|
+
|
|
27070
|
+
// Types
|
|
27071
|
+
|
|
26693
27072
|
// Types
|
|
26694
27073
|
|
|
26695
27074
|
const makeVEmptyStateProps = propsFactory({
|
|
@@ -26827,6 +27206,7 @@
|
|
|
26827
27206
|
app: Boolean,
|
|
26828
27207
|
appear: Boolean,
|
|
26829
27208
|
extended: Boolean,
|
|
27209
|
+
layout: Boolean,
|
|
26830
27210
|
location: {
|
|
26831
27211
|
type: String,
|
|
26832
27212
|
default: 'bottom end'
|
|
@@ -26877,8 +27257,8 @@
|
|
|
26877
27257
|
id: props.name,
|
|
26878
27258
|
order: vue.computed(() => parseInt(props.order, 10)),
|
|
26879
27259
|
position,
|
|
26880
|
-
layoutSize: height,
|
|
26881
|
-
elementSize: vue.computed(() => height.value +
|
|
27260
|
+
layoutSize: vue.computed(() => props.layout ? height.value + 24 : 0),
|
|
27261
|
+
elementSize: vue.computed(() => height.value + 24),
|
|
26882
27262
|
active: vue.computed(() => props.app && model.value),
|
|
26883
27263
|
absolute: vue.toRef(props, 'absolute')
|
|
26884
27264
|
});
|
|
@@ -26932,9 +27312,18 @@
|
|
|
26932
27312
|
},
|
|
26933
27313
|
inset: Boolean,
|
|
26934
27314
|
hideInput: Boolean,
|
|
26935
|
-
min:
|
|
26936
|
-
|
|
26937
|
-
|
|
27315
|
+
min: {
|
|
27316
|
+
type: Number,
|
|
27317
|
+
default: -Infinity
|
|
27318
|
+
},
|
|
27319
|
+
max: {
|
|
27320
|
+
type: Number,
|
|
27321
|
+
default: Infinity
|
|
27322
|
+
},
|
|
27323
|
+
step: {
|
|
27324
|
+
type: Number,
|
|
27325
|
+
default: 1
|
|
27326
|
+
},
|
|
26938
27327
|
...only(makeVInputProps(), ['density', 'disabled', 'focused', 'hideDetails', 'hint', 'label', 'persistentHint', 'readonly']),
|
|
26939
27328
|
...only(makeVFieldProps(), ['baseColor', 'bgColor', 'class', 'color', 'disabled', 'error', 'loading', 'reverse', 'rounded', 'style', 'theme', 'variant']),
|
|
26940
27329
|
...makeFocusProps()
|
|
@@ -26945,8 +27334,8 @@
|
|
|
26945
27334
|
props: {
|
|
26946
27335
|
...makeVNumberInputProps(),
|
|
26947
27336
|
modelValue: {
|
|
26948
|
-
type:
|
|
26949
|
-
default:
|
|
27337
|
+
type: Number,
|
|
27338
|
+
default: undefined
|
|
26950
27339
|
}
|
|
26951
27340
|
},
|
|
26952
27341
|
emits: {
|
|
@@ -26965,20 +27354,45 @@
|
|
|
26965
27354
|
blur
|
|
26966
27355
|
} = useFocus(props);
|
|
26967
27356
|
const inputRef = vue.ref();
|
|
27357
|
+
const stepDecimals = vue.computed(() => getDecimals(props.step));
|
|
27358
|
+
const modelDecimals = vue.computed(() => model.value != null ? getDecimals(model.value) : 0);
|
|
27359
|
+
const canIncrease = vue.computed(() => {
|
|
27360
|
+
if (model.value == null) return true;
|
|
27361
|
+
return model.value + props.step <= props.max;
|
|
27362
|
+
});
|
|
27363
|
+
const canDecrease = vue.computed(() => {
|
|
27364
|
+
if (model.value == null) return true;
|
|
27365
|
+
return model.value - props.step >= props.min;
|
|
27366
|
+
});
|
|
27367
|
+
vue.watchEffect(() => {
|
|
27368
|
+
if (model.value != null && (model.value < props.min || model.value > props.max)) {
|
|
27369
|
+
model.value = clamp(model.value, props.min, props.max);
|
|
27370
|
+
}
|
|
27371
|
+
});
|
|
26968
27372
|
function onFocus() {
|
|
26969
27373
|
if (!isFocused.value) focus();
|
|
26970
27374
|
}
|
|
26971
27375
|
const controlVariant = vue.computed(() => {
|
|
26972
27376
|
return props.hideInput ? 'stacked' : props.controlVariant;
|
|
26973
27377
|
});
|
|
27378
|
+
const incrementSlotProps = vue.computed(() => ({
|
|
27379
|
+
click: onClickUp
|
|
27380
|
+
}));
|
|
27381
|
+
const decrementSlotProps = vue.computed(() => ({
|
|
27382
|
+
click: onClickDown
|
|
27383
|
+
}));
|
|
26974
27384
|
function toggleUpDown() {
|
|
26975
27385
|
let increment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
27386
|
+
if (model.value == null) {
|
|
27387
|
+
model.value = 0;
|
|
27388
|
+
return;
|
|
27389
|
+
}
|
|
27390
|
+
const decimals = Math.max(modelDecimals.value, stepDecimals.value);
|
|
26976
27391
|
if (increment) {
|
|
26977
|
-
|
|
27392
|
+
if (canIncrease.value) model.value = +(model.value + props.step).toFixed(decimals);
|
|
26978
27393
|
} else {
|
|
26979
|
-
|
|
27394
|
+
if (canDecrease.value) model.value = +(model.value - props.step).toFixed(decimals);
|
|
26980
27395
|
}
|
|
26981
|
-
if (inputRef.value) model.value = parseInt(inputRef.value.value, 10);
|
|
26982
27396
|
}
|
|
26983
27397
|
function onClickUp() {
|
|
26984
27398
|
toggleUpDown();
|
|
@@ -26986,12 +27400,28 @@
|
|
|
26986
27400
|
function onClickDown() {
|
|
26987
27401
|
toggleUpDown(false);
|
|
26988
27402
|
}
|
|
26989
|
-
|
|
26990
|
-
|
|
26991
|
-
|
|
26992
|
-
|
|
26993
|
-
|
|
26994
|
-
|
|
27403
|
+
function onKeydown(e) {
|
|
27404
|
+
if (['Enter', 'ArrowLeft', 'ArrowRight', 'Backspace'].includes(e.key) || e.ctrlKey) return;
|
|
27405
|
+
if (['ArrowDown'].includes(e.key)) {
|
|
27406
|
+
e.preventDefault();
|
|
27407
|
+
toggleUpDown(false);
|
|
27408
|
+
return;
|
|
27409
|
+
}
|
|
27410
|
+
if (['ArrowUp'].includes(e.key)) {
|
|
27411
|
+
e.preventDefault();
|
|
27412
|
+
toggleUpDown();
|
|
27413
|
+
return;
|
|
27414
|
+
}
|
|
27415
|
+
|
|
27416
|
+
// Only numbers, +, - & . are allowed
|
|
27417
|
+
if (!/^[0-9\-+.]+$/.test(e.key)) {
|
|
27418
|
+
e.preventDefault();
|
|
27419
|
+
}
|
|
27420
|
+
}
|
|
27421
|
+
function onInput(e) {
|
|
27422
|
+
const el = e.target;
|
|
27423
|
+
model.value = el.value ? +el.value : undefined;
|
|
27424
|
+
}
|
|
26995
27425
|
useRender(() => {
|
|
26996
27426
|
const fieldProps = filterFieldProps(props);
|
|
26997
27427
|
const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);
|
|
@@ -27004,9 +27434,11 @@
|
|
|
27004
27434
|
return vue.createVNode("div", {
|
|
27005
27435
|
"class": "v-number-input__control"
|
|
27006
27436
|
}, [!slots.decrement ? vue.createVNode(VBtn, {
|
|
27437
|
+
"disabled": !canDecrease.value,
|
|
27007
27438
|
"flat": true,
|
|
27008
27439
|
"key": "decrement-btn",
|
|
27009
27440
|
"height": defaultHeight,
|
|
27441
|
+
"name": "decrement-btn",
|
|
27010
27442
|
"icon": "$expand",
|
|
27011
27443
|
"size": "small",
|
|
27012
27444
|
"onClick": onClickDown
|
|
@@ -27014,6 +27446,7 @@
|
|
|
27014
27446
|
"key": "decrement-defaults",
|
|
27015
27447
|
"defaults": {
|
|
27016
27448
|
VBtn: {
|
|
27449
|
+
disabled: !canDecrease.value,
|
|
27017
27450
|
flat: true,
|
|
27018
27451
|
height: defaultHeight,
|
|
27019
27452
|
size: 'small',
|
|
@@ -27025,9 +27458,11 @@
|
|
|
27025
27458
|
}), vue.createVNode(VDivider, {
|
|
27026
27459
|
"vertical": controlVariant.value !== 'stacked'
|
|
27027
27460
|
}, null), !slots.increment ? vue.createVNode(VBtn, {
|
|
27461
|
+
"disabled": !canIncrease.value,
|
|
27028
27462
|
"flat": true,
|
|
27029
27463
|
"key": "increment-btn",
|
|
27030
27464
|
"height": defaultHeight,
|
|
27465
|
+
"name": "increment-btn",
|
|
27031
27466
|
"icon": "$collapse",
|
|
27032
27467
|
"onClick": onClickUp,
|
|
27033
27468
|
"size": "small"
|
|
@@ -27035,6 +27470,7 @@
|
|
|
27035
27470
|
"key": "increment-defaults",
|
|
27036
27471
|
"defaults": {
|
|
27037
27472
|
VBtn: {
|
|
27473
|
+
disabled: !canIncrease.value,
|
|
27038
27474
|
flat: true,
|
|
27039
27475
|
height: defaultHeight,
|
|
27040
27476
|
size: 'small',
|
|
@@ -27076,17 +27512,16 @@
|
|
|
27076
27512
|
...slotProps
|
|
27077
27513
|
}
|
|
27078
27514
|
} = _ref2;
|
|
27079
|
-
return vue.
|
|
27515
|
+
return vue.createVNode("input", vue.mergeProps({
|
|
27080
27516
|
"ref": inputRef,
|
|
27081
|
-
"type": "
|
|
27082
|
-
"
|
|
27517
|
+
"type": "text",
|
|
27518
|
+
"value": model.value,
|
|
27519
|
+
"onInput": onInput,
|
|
27520
|
+
"onKeydown": onKeydown,
|
|
27083
27521
|
"class": fieldClass,
|
|
27084
|
-
"max": props.max,
|
|
27085
|
-
"min": props.min,
|
|
27086
|
-
"step": props.step,
|
|
27087
27522
|
"onFocus": onFocus,
|
|
27088
27523
|
"onBlur": blur
|
|
27089
|
-
}, inputAttrs), null)
|
|
27524
|
+
}, inputAttrs), null);
|
|
27090
27525
|
},
|
|
27091
27526
|
'append-inner': controlVariant.value === 'split' ? () => vue.createVNode("div", {
|
|
27092
27527
|
"class": "v-number-input__control"
|
|
@@ -27116,6 +27551,220 @@
|
|
|
27116
27551
|
}
|
|
27117
27552
|
});
|
|
27118
27553
|
|
|
27554
|
+
const VPullToRefresh = genericComponent()({
|
|
27555
|
+
name: 'VPullToRefresh',
|
|
27556
|
+
props: {
|
|
27557
|
+
pullDownThreshold: {
|
|
27558
|
+
type: Number,
|
|
27559
|
+
default: 64
|
|
27560
|
+
}
|
|
27561
|
+
},
|
|
27562
|
+
emits: {
|
|
27563
|
+
load: options => true
|
|
27564
|
+
},
|
|
27565
|
+
setup(props, _ref) {
|
|
27566
|
+
let {
|
|
27567
|
+
slots,
|
|
27568
|
+
emit
|
|
27569
|
+
} = _ref;
|
|
27570
|
+
let touchstartY = 0;
|
|
27571
|
+
let scrollParents = [];
|
|
27572
|
+
const touchDiff = vue.shallowRef(0);
|
|
27573
|
+
const containerRef = vue.ref();
|
|
27574
|
+
const refreshing = vue.shallowRef(false);
|
|
27575
|
+
const goingUp = vue.shallowRef(false);
|
|
27576
|
+
const touching = vue.shallowRef(false);
|
|
27577
|
+
const canRefresh = vue.computed(() => touchDiff.value >= props.pullDownThreshold && !refreshing.value);
|
|
27578
|
+
const topOffset = vue.computed(() => clamp(touchDiff.value, 0, props.pullDownThreshold));
|
|
27579
|
+
function onTouchstart(e) {
|
|
27580
|
+
if (refreshing.value) return;
|
|
27581
|
+
touching.value = true;
|
|
27582
|
+
touchstartY = 'clientY' in e ? e.clientY : e.touches[0].clientY;
|
|
27583
|
+
}
|
|
27584
|
+
function onTouchmove(e) {
|
|
27585
|
+
if (refreshing.value || !touching.value) return;
|
|
27586
|
+
const touchY = 'clientY' in e ? e.clientY : e.touches[0].clientY;
|
|
27587
|
+
if (scrollParents.length && !scrollParents[0].scrollTop) {
|
|
27588
|
+
touchDiff.value = touchY - touchstartY;
|
|
27589
|
+
}
|
|
27590
|
+
}
|
|
27591
|
+
function onTouchend(e) {
|
|
27592
|
+
if (refreshing.value) return;
|
|
27593
|
+
touching.value = false;
|
|
27594
|
+
if (canRefresh.value) {
|
|
27595
|
+
function done() {
|
|
27596
|
+
if (!refreshing.value) return;
|
|
27597
|
+
touchDiff.value = 0;
|
|
27598
|
+
refreshing.value = false;
|
|
27599
|
+
}
|
|
27600
|
+
emit('load', {
|
|
27601
|
+
done
|
|
27602
|
+
});
|
|
27603
|
+
refreshing.value = true;
|
|
27604
|
+
} else {
|
|
27605
|
+
touchDiff.value = 0;
|
|
27606
|
+
}
|
|
27607
|
+
}
|
|
27608
|
+
vue.onMounted(() => {
|
|
27609
|
+
scrollParents = getScrollParents(containerRef.value);
|
|
27610
|
+
});
|
|
27611
|
+
vue.watch([topOffset, refreshing], () => {
|
|
27612
|
+
if (scrollParents.length) {
|
|
27613
|
+
const stopScrolling = topOffset.value && !refreshing.value;
|
|
27614
|
+
scrollParents.forEach(p => p.style.overflow = stopScrolling ? 'hidden' : 'auto');
|
|
27615
|
+
}
|
|
27616
|
+
});
|
|
27617
|
+
vue.watch(topOffset, (newVal, oldVal) => {
|
|
27618
|
+
goingUp.value = newVal < oldVal;
|
|
27619
|
+
});
|
|
27620
|
+
useRender(() => {
|
|
27621
|
+
return vue.createVNode("div", {
|
|
27622
|
+
"class": ['v-pull-to-refresh'],
|
|
27623
|
+
"onTouchstart": onTouchstart,
|
|
27624
|
+
"onTouchmove": onTouchmove,
|
|
27625
|
+
"onTouchend": onTouchend,
|
|
27626
|
+
"onMousedown": onTouchstart,
|
|
27627
|
+
"onMouseup": onTouchend,
|
|
27628
|
+
"onMouseleave": onTouchend,
|
|
27629
|
+
"onMousemove": onTouchmove,
|
|
27630
|
+
"ref": containerRef
|
|
27631
|
+
}, [vue.createVNode("div", {
|
|
27632
|
+
"class": ['v-pull-to-refresh__pull-down', {
|
|
27633
|
+
'v-pull-to-refresh__pull-down--touching': touching.value
|
|
27634
|
+
}],
|
|
27635
|
+
"style": {
|
|
27636
|
+
top: convertToUnit(-1 * props.pullDownThreshold + topOffset.value),
|
|
27637
|
+
height: convertToUnit(props.pullDownThreshold)
|
|
27638
|
+
}
|
|
27639
|
+
}, [slots.pullDownPanel ? slots.pullDownPanel({
|
|
27640
|
+
canRefresh: canRefresh.value,
|
|
27641
|
+
goingUp: goingUp.value,
|
|
27642
|
+
refreshing: refreshing.value
|
|
27643
|
+
}) : vue.createVNode("div", {
|
|
27644
|
+
"class": ['v-pull-to-refresh__pull-down-default']
|
|
27645
|
+
}, [refreshing.value ? vue.createVNode(VProgressCircular, {
|
|
27646
|
+
"indeterminate": true,
|
|
27647
|
+
"active": false
|
|
27648
|
+
}, null) : vue.createVNode(VIcon, {
|
|
27649
|
+
"icon": canRefresh.value || goingUp.value ? '$sortAsc' : '$sortDesc'
|
|
27650
|
+
}, null)])]), vue.createVNode("div", {
|
|
27651
|
+
"class": ['v-pull-to-refresh__scroll-container', {
|
|
27652
|
+
'v-pull-to-refresh__scroll-container--touching': touching.value
|
|
27653
|
+
}],
|
|
27654
|
+
"style": {
|
|
27655
|
+
top: convertToUnit(topOffset.value)
|
|
27656
|
+
}
|
|
27657
|
+
}, [slots.default?.()])]);
|
|
27658
|
+
});
|
|
27659
|
+
}
|
|
27660
|
+
});
|
|
27661
|
+
|
|
27662
|
+
// Types
|
|
27663
|
+
|
|
27664
|
+
const makeVSnackbarQueueProps = propsFactory({
|
|
27665
|
+
// TODO: Port this to Snackbar on dev
|
|
27666
|
+
closable: [Boolean, String],
|
|
27667
|
+
closeText: {
|
|
27668
|
+
type: String,
|
|
27669
|
+
default: '$vuetify.dismiss'
|
|
27670
|
+
},
|
|
27671
|
+
modelValue: {
|
|
27672
|
+
type: Array,
|
|
27673
|
+
default: () => []
|
|
27674
|
+
},
|
|
27675
|
+
...omit(makeVSnackbarProps(), ['modelValue'])
|
|
27676
|
+
}, 'VSnackbarQueue');
|
|
27677
|
+
const VSnackbarQueue = genericComponent()({
|
|
27678
|
+
name: 'VSnackbarQueue',
|
|
27679
|
+
props: makeVSnackbarQueueProps(),
|
|
27680
|
+
emits: {
|
|
27681
|
+
'update:modelValue': val => true
|
|
27682
|
+
},
|
|
27683
|
+
setup(props, _ref) {
|
|
27684
|
+
let {
|
|
27685
|
+
emit,
|
|
27686
|
+
slots
|
|
27687
|
+
} = _ref;
|
|
27688
|
+
const {
|
|
27689
|
+
t
|
|
27690
|
+
} = useLocale();
|
|
27691
|
+
const isActive = vue.shallowRef(false);
|
|
27692
|
+
const isVisible = vue.shallowRef(false);
|
|
27693
|
+
const current = vue.shallowRef();
|
|
27694
|
+
vue.watch(() => props.modelValue.length, (val, oldVal) => {
|
|
27695
|
+
if (!isVisible.value && val > oldVal) {
|
|
27696
|
+
showNext();
|
|
27697
|
+
}
|
|
27698
|
+
});
|
|
27699
|
+
vue.watch(isActive, val => {
|
|
27700
|
+
if (val) isVisible.value = true;
|
|
27701
|
+
});
|
|
27702
|
+
function onAfterLeave() {
|
|
27703
|
+
if (props.modelValue.length) {
|
|
27704
|
+
showNext();
|
|
27705
|
+
} else {
|
|
27706
|
+
current.value = undefined;
|
|
27707
|
+
isVisible.value = false;
|
|
27708
|
+
}
|
|
27709
|
+
}
|
|
27710
|
+
function showNext() {
|
|
27711
|
+
const [next, ...rest] = props.modelValue;
|
|
27712
|
+
emit('update:modelValue', rest);
|
|
27713
|
+
current.value = typeof next === 'string' ? {
|
|
27714
|
+
text: next
|
|
27715
|
+
} : next;
|
|
27716
|
+
vue.nextTick(() => {
|
|
27717
|
+
isActive.value = true;
|
|
27718
|
+
});
|
|
27719
|
+
}
|
|
27720
|
+
function onClickClose() {
|
|
27721
|
+
isActive.value = false;
|
|
27722
|
+
}
|
|
27723
|
+
const btnProps = vue.computed(() => ({
|
|
27724
|
+
color: typeof props.closable === 'string' ? props.closable : undefined,
|
|
27725
|
+
text: t(props.closeText)
|
|
27726
|
+
}));
|
|
27727
|
+
useRender(() => {
|
|
27728
|
+
const hasActions = !!(props.closable || slots.actions);
|
|
27729
|
+
const {
|
|
27730
|
+
modelValue: _,
|
|
27731
|
+
...snackbarProps
|
|
27732
|
+
} = VSnackbar.filterProps(props);
|
|
27733
|
+
return vue.createVNode(vue.Fragment, null, [isVisible.value && !!current.value && (slots.default ? vue.createVNode(VDefaultsProvider, {
|
|
27734
|
+
"defaults": {
|
|
27735
|
+
VSnackbar: current.value
|
|
27736
|
+
}
|
|
27737
|
+
}, {
|
|
27738
|
+
default: () => [slots.default({
|
|
27739
|
+
item: current.value
|
|
27740
|
+
})]
|
|
27741
|
+
}) : vue.createVNode(VSnackbar, vue.mergeProps(snackbarProps, current.value, {
|
|
27742
|
+
"modelValue": isActive.value,
|
|
27743
|
+
"onUpdate:modelValue": $event => isActive.value = $event,
|
|
27744
|
+
"onAfterLeave": onAfterLeave
|
|
27745
|
+
}), {
|
|
27746
|
+
text: slots.text ? () => slots.text?.({
|
|
27747
|
+
item: current.value
|
|
27748
|
+
}) : undefined,
|
|
27749
|
+
actions: hasActions ? () => vue.createVNode(vue.Fragment, null, [!slots.actions ? vue.createVNode(VBtn, vue.mergeProps(btnProps.value, {
|
|
27750
|
+
"onClick": onClickClose
|
|
27751
|
+
}), null) : vue.createVNode(VDefaultsProvider, {
|
|
27752
|
+
"defaults": {
|
|
27753
|
+
VBtn: btnProps.value
|
|
27754
|
+
}
|
|
27755
|
+
}, {
|
|
27756
|
+
default: () => [slots.actions({
|
|
27757
|
+
item: current.value,
|
|
27758
|
+
props: {
|
|
27759
|
+
onClick: onClickClose
|
|
27760
|
+
}
|
|
27761
|
+
})]
|
|
27762
|
+
})]) : undefined
|
|
27763
|
+
}))]);
|
|
27764
|
+
});
|
|
27765
|
+
}
|
|
27766
|
+
});
|
|
27767
|
+
|
|
27119
27768
|
// Utilities
|
|
27120
27769
|
|
|
27121
27770
|
// Types
|
|
@@ -27579,10 +28228,14 @@
|
|
|
27579
28228
|
const VSpeedDial = genericComponent()({
|
|
27580
28229
|
name: 'VSpeedDial',
|
|
27581
28230
|
props: makeVSpeedDialProps(),
|
|
28231
|
+
emits: {
|
|
28232
|
+
'update:modelValue': value => true
|
|
28233
|
+
},
|
|
27582
28234
|
setup(props, _ref) {
|
|
27583
28235
|
let {
|
|
27584
28236
|
slots
|
|
27585
28237
|
} = _ref;
|
|
28238
|
+
const model = useProxiedModel(props, 'modelValue');
|
|
27586
28239
|
const menuRef = vue.ref();
|
|
27587
28240
|
const location = vue.computed(() => {
|
|
27588
28241
|
const [y, x = 'center'] = props.location.split(' ');
|
|
@@ -27594,6 +28247,8 @@
|
|
|
27594
28247
|
useRender(() => {
|
|
27595
28248
|
const menuProps = VMenu.filterProps(props);
|
|
27596
28249
|
return vue.createVNode(VMenu, vue.mergeProps(menuProps, {
|
|
28250
|
+
"modelValue": model.value,
|
|
28251
|
+
"onUpdate:modelValue": $event => model.value = $event,
|
|
27597
28252
|
"class": props.class,
|
|
27598
28253
|
"style": props.style,
|
|
27599
28254
|
"contentClass": ['v-speed-dial__content', locationClasses.value],
|
|
@@ -27612,8 +28267,7 @@
|
|
|
27612
28267
|
default: () => [vue.createVNode(MaybeTransition, {
|
|
27613
28268
|
"appear": true,
|
|
27614
28269
|
"group": true,
|
|
27615
|
-
"transition": props.transition
|
|
27616
|
-
"mode": "out-in"
|
|
28270
|
+
"transition": props.transition
|
|
27617
28271
|
}, {
|
|
27618
28272
|
default: () => [slots.default?.(slotProps)]
|
|
27619
28273
|
})]
|
|
@@ -27631,9 +28285,7 @@
|
|
|
27631
28285
|
ampm: Boolean,
|
|
27632
28286
|
color: String,
|
|
27633
28287
|
disabled: Boolean,
|
|
27634
|
-
displayedValue:
|
|
27635
|
-
default: null
|
|
27636
|
-
},
|
|
28288
|
+
displayedValue: null,
|
|
27637
28289
|
double: Boolean,
|
|
27638
28290
|
format: {
|
|
27639
28291
|
type: Function,
|
|
@@ -28674,6 +29326,7 @@
|
|
|
28674
29326
|
VDataTableRows: VDataTableRows,
|
|
28675
29327
|
VDataTableServer: VDataTableServer,
|
|
28676
29328
|
VDataTableVirtual: VDataTableVirtual,
|
|
29329
|
+
VDateInput: VDateInput,
|
|
28677
29330
|
VDatePicker: VDatePicker,
|
|
28678
29331
|
VDatePickerControls: VDatePickerControls,
|
|
28679
29332
|
VDatePickerHeader: VDatePickerHeader,
|
|
@@ -28738,6 +29391,7 @@
|
|
|
28738
29391
|
VPickerTitle: VPickerTitle,
|
|
28739
29392
|
VProgressCircular: VProgressCircular,
|
|
28740
29393
|
VProgressLinear: VProgressLinear,
|
|
29394
|
+
VPullToRefresh: VPullToRefresh,
|
|
28741
29395
|
VRadio: VRadio,
|
|
28742
29396
|
VRadioGroup: VRadioGroup,
|
|
28743
29397
|
VRangeSlider: VRangeSlider,
|
|
@@ -28762,6 +29416,7 @@
|
|
|
28762
29416
|
VSlideYTransition: VSlideYTransition,
|
|
28763
29417
|
VSlider: VSlider,
|
|
28764
29418
|
VSnackbar: VSnackbar,
|
|
29419
|
+
VSnackbarQueue: VSnackbarQueue,
|
|
28765
29420
|
VSpacer: VSpacer,
|
|
28766
29421
|
VSparkline: VSparkline,
|
|
28767
29422
|
VSpeedDial: VSpeedDial,
|
|
@@ -28938,7 +29593,7 @@
|
|
|
28938
29593
|
function mountComponent(component, props) {
|
|
28939
29594
|
return function (el, binding, vnode) {
|
|
28940
29595
|
const _props = typeof props === 'function' ? props(binding) : props;
|
|
28941
|
-
const text = binding.value?.text ?? binding.value;
|
|
29596
|
+
const text = binding.value?.text ?? binding.value ?? _props?.text;
|
|
28942
29597
|
const value = isObject(binding.value) ? binding.value : {};
|
|
28943
29598
|
|
|
28944
29599
|
// Get the children from the props or directive value, or the element's children
|
|
@@ -28947,7 +29602,9 @@
|
|
|
28947
29602
|
// If vnode.ctx is the same as the instance, then we're bound to a plain element
|
|
28948
29603
|
// and need to find the nearest parent component instance to inherit provides from
|
|
28949
29604
|
const provides = (vnode.ctx === binding.instance.$ ? findComponentParent(vnode, binding.instance.$)?.provides : vnode.ctx?.provides) ?? binding.instance.$.provides;
|
|
28950
|
-
const node = vue.h(component, vue.mergeProps(_props, value),
|
|
29605
|
+
const node = vue.h(component, vue.mergeProps(_props, value), {
|
|
29606
|
+
default: () => children
|
|
29607
|
+
});
|
|
28951
29608
|
node.appContext = Object.assign(Object.create(null), binding.instance.$.appContext, {
|
|
28952
29609
|
provides
|
|
28953
29610
|
});
|
|
@@ -29106,7 +29763,7 @@
|
|
|
29106
29763
|
goTo
|
|
29107
29764
|
};
|
|
29108
29765
|
}
|
|
29109
|
-
const version$1 = "3.6.0
|
|
29766
|
+
const version$1 = "3.6.0";
|
|
29110
29767
|
createVuetify$1.version = version$1;
|
|
29111
29768
|
|
|
29112
29769
|
// Vue's inject() can only be used in setup
|
|
@@ -29359,7 +30016,7 @@
|
|
|
29359
30016
|
|
|
29360
30017
|
/* eslint-disable local-rules/sort-imports */
|
|
29361
30018
|
|
|
29362
|
-
const version = "3.6.0
|
|
30019
|
+
const version = "3.6.0";
|
|
29363
30020
|
|
|
29364
30021
|
/* eslint-disable local-rules/sort-imports */
|
|
29365
30022
|
|