vuetify 3.3.15 → 3.4.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/json/attributes.json +111 -11
- package/dist/json/importMap.json +4 -4
- package/dist/json/tags.json +25 -0
- package/dist/json/web-types.json +263 -18
- package/dist/vuetify-labs.css +1558 -518
- package/dist/vuetify-labs.d.ts +499 -179
- package/dist/vuetify-labs.esm.js +264 -73
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +263 -72
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +1080 -40
- package/dist/vuetify.d.ts +484 -170
- package/dist/vuetify.esm.js +264 -73
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +263 -72
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +914 -895
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAutocomplete/index.d.mts +20 -14
- package/lib/components/VAvatar/VAvatar.mjs +2 -1
- package/lib/components/VAvatar/VAvatar.mjs.map +1 -1
- package/lib/components/VAvatar/index.d.mts +6 -0
- package/lib/components/VBanner/VBanner.mjs +5 -3
- package/lib/components/VBanner/VBanner.mjs.map +1 -1
- package/lib/components/VBanner/index.d.mts +10 -0
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +9 -4
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/index.d.mts +28 -2
- package/lib/components/VCarousel/index.d.mts +26 -0
- package/lib/components/VCheckbox/index.d.mts +12 -0
- package/lib/components/VColorPicker/VColorPickerPreview.css +5 -0
- package/lib/components/VColorPicker/VColorPickerPreview.mjs +28 -2
- package/lib/components/VColorPicker/VColorPickerPreview.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerPreview.sass +4 -0
- package/lib/components/VColorPicker/_variables.scss +1 -0
- package/lib/components/VCombobox/index.d.mts +20 -14
- package/lib/components/VDialog/index.d.mts +41 -20
- package/lib/components/VField/index.d.mts +4 -4
- package/lib/components/VFileInput/index.d.mts +4 -4
- package/lib/components/VImg/VImg.mjs +13 -1
- package/lib/components/VImg/VImg.mjs.map +1 -1
- package/lib/components/VImg/index.d.mts +26 -0
- package/lib/components/VList/index.d.mts +12 -12
- package/lib/components/VMenu/index.d.mts +41 -20
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +5 -3
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/index.d.mts +10 -0
- package/lib/components/VOverlay/VOverlay.mjs +9 -4
- package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/lib/components/VOverlay/index.d.mts +17 -8
- package/lib/components/VOverlay/locationStrategies.mjs +9 -9
- package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
- package/lib/components/VOverlay/scrollStrategies.mjs +3 -3
- package/lib/components/VOverlay/scrollStrategies.mjs.map +1 -1
- package/lib/components/VOverlay/useActivator.mjs +50 -21
- package/lib/components/VOverlay/useActivator.mjs.map +1 -1
- package/lib/components/VRadio/index.d.mts +6 -0
- package/lib/components/VRangeSlider/VRangeSlider.mjs +4 -2
- package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
- package/lib/components/VRangeSlider/index.d.mts +14 -0
- package/lib/components/VSelect/index.d.mts +20 -14
- package/lib/components/VSelectionControl/VSelectionControl.mjs +3 -1
- package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
- package/lib/components/VSelectionControl/index.d.mts +6 -0
- package/lib/components/VSlideGroup/VSlideGroup.mjs +5 -3
- package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
- package/lib/components/VSlideGroup/index.d.mts +10 -0
- package/lib/components/VSlider/VSlider.mjs +2 -1
- package/lib/components/VSlider/VSlider.mjs.map +1 -1
- package/lib/components/VSlider/index.d.mts +14 -0
- package/lib/components/VSlider/slider.mjs +5 -1
- package/lib/components/VSlider/slider.mjs.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.css +9 -0
- package/lib/components/VSnackbar/VSnackbar.mjs +65 -6
- package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.sass +9 -0
- package/lib/components/VSnackbar/index.d.mts +52 -25
- package/lib/components/VSwitch/index.d.mts +6 -0
- package/lib/components/VTabs/index.d.mts +10 -0
- package/lib/components/VTextField/index.d.mts +16 -16
- package/lib/components/VTextarea/index.d.mts +4 -4
- package/lib/components/VTooltip/index.d.mts +41 -20
- package/lib/components/index.d.mts +455 -168
- package/lib/components/transitions/dialog-transition.mjs +4 -3
- package/lib/components/transitions/dialog-transition.mjs.map +1 -1
- package/lib/components/transitions/index.d.mts +6 -6
- package/lib/composables/directiveComponent.mjs +69 -0
- package/lib/composables/directiveComponent.mjs.map +1 -0
- package/lib/composables/display.mjs +23 -3
- package/lib/composables/display.mjs.map +1 -1
- package/lib/composables/resizeObserver.mjs.map +1 -1
- package/lib/composables/theme.mjs +7 -7
- package/lib/composables/theme.mjs.map +1 -1
- 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/iconsets/fa.mjs +2 -1
- package/lib/iconsets/fa.mjs.map +1 -1
- package/lib/iconsets/fa4.mjs +2 -1
- package/lib/iconsets/fa4.mjs.map +1 -1
- package/lib/iconsets/md.mjs +2 -1
- package/lib/iconsets/md.mjs.map +1 -1
- package/lib/iconsets/mdi-svg.mjs +2 -1
- package/lib/iconsets/mdi-svg.mjs.map +1 -1
- package/lib/iconsets/mdi.mjs +2 -1
- package/lib/iconsets/mdi.mjs.map +1 -1
- package/lib/index.d.mts +33 -2
- package/lib/labs/VBottomSheet/index.d.mts +14 -8
- package/lib/labs/VDateInput/index.d.mts +4 -4
- package/lib/labs/VOtpInput/index.d.mts +4 -4
- package/lib/labs/components.d.mts +18 -12
- package/lib/styles/main.css +1026 -0
- package/lib/styles/settings/_utilities.scss +20 -0
- package/lib/util/box.mjs +12 -0
- package/lib/util/box.mjs.map +1 -1
- package/lib/util/globals.mjs +1 -0
- package/lib/util/globals.mjs.map +1 -1
- package/lib/util/helpers.mjs +9 -1
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +2 -2
package/dist/vuetify-labs.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.
|
|
2
|
+
* Vuetify v3.4.0-alpha.1
|
|
3
3
|
* Forged by John Leider
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { Fragment, reactive, computed, watchEffect, toRefs, capitalize, warn, ref, unref, provide, shallowRef, inject as inject$1, defineComponent as defineComponent$1, camelize, h, getCurrentInstance as getCurrentInstance$1, onBeforeUnmount, watch, readonly, onDeactivated, onActivated, onMounted, onScopeDispose, effectScope, toRaw, createVNode, TransitionGroup, Transition, mergeProps, onBeforeMount, nextTick, withDirectives, resolveDirective, vShow, isRef, toRef, Text, resolveDynamicComponent, Teleport, cloneVNode, createTextVNode, onBeforeUpdate, vModelText, withModifiers } from 'vue';
|
|
7
|
+
import { Fragment, reactive, computed, watchEffect, toRefs, capitalize, warn, ref, unref, provide, shallowRef, inject as inject$1, defineComponent as defineComponent$1, camelize, h, getCurrentInstance as getCurrentInstance$1, onBeforeUnmount, watch, readonly, onDeactivated, onActivated, onMounted, onScopeDispose, effectScope, toRaw, createVNode, TransitionGroup, Transition, mergeProps, onBeforeMount, nextTick, withDirectives, resolveDirective, vShow, isRef, toRef, Text, resolveDynamicComponent, Teleport, cloneVNode, createTextVNode, onUnmounted, onBeforeUpdate, vModelText, withModifiers } from 'vue';
|
|
8
8
|
|
|
9
9
|
// Types
|
|
10
10
|
// eslint-disable-line vue/prefer-import-from-vue
|
|
@@ -74,6 +74,7 @@ const makeComponentProps = propsFactory({
|
|
|
74
74
|
const IN_BROWSER = typeof window !== 'undefined';
|
|
75
75
|
const SUPPORTS_INTERSECTION = IN_BROWSER && 'IntersectionObserver' in window;
|
|
76
76
|
const SUPPORTS_TOUCH = IN_BROWSER && ('ontouchstart' in window || window.navigator.maxTouchPoints > 0);
|
|
77
|
+
const SUPPORTS_EYE_DROPPER = IN_BROWSER && 'EyeDropper' in window;
|
|
77
78
|
|
|
78
79
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
|
79
80
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
|
@@ -157,7 +158,15 @@ function isObject(obj) {
|
|
|
157
158
|
return obj !== null && typeof obj === 'object' && !Array.isArray(obj);
|
|
158
159
|
}
|
|
159
160
|
function refElement(obj) {
|
|
160
|
-
|
|
161
|
+
if (obj && '$el' in obj) {
|
|
162
|
+
const el = obj.$el;
|
|
163
|
+
if (el?.nodeType === Node.TEXT_NODE) {
|
|
164
|
+
// Multi-root component, use the first element
|
|
165
|
+
return el.nextElementSibling;
|
|
166
|
+
}
|
|
167
|
+
return el;
|
|
168
|
+
}
|
|
169
|
+
return obj;
|
|
161
170
|
}
|
|
162
171
|
|
|
163
172
|
// KeyboardEvent.keyCode aliases
|
|
@@ -556,6 +565,18 @@ function getOverflow(a, b) {
|
|
|
556
565
|
}
|
|
557
566
|
};
|
|
558
567
|
}
|
|
568
|
+
function getTargetBox(target) {
|
|
569
|
+
if (Array.isArray(target)) {
|
|
570
|
+
return new Box({
|
|
571
|
+
x: target[0],
|
|
572
|
+
y: target[1],
|
|
573
|
+
width: 0,
|
|
574
|
+
height: 0
|
|
575
|
+
});
|
|
576
|
+
} else {
|
|
577
|
+
return target.getBoundingClientRect();
|
|
578
|
+
}
|
|
579
|
+
}
|
|
559
580
|
|
|
560
581
|
// Utilities
|
|
561
582
|
|
|
@@ -2118,9 +2139,9 @@ const defaultThemeOptions = {
|
|
|
2118
2139
|
'surface-bright': '#FFFFFF',
|
|
2119
2140
|
'surface-variant': '#424242',
|
|
2120
2141
|
'on-surface-variant': '#EEEEEE',
|
|
2121
|
-
primary: '#
|
|
2122
|
-
'primary-darken-1': '#
|
|
2123
|
-
secondary: '#
|
|
2142
|
+
primary: '#1867C0',
|
|
2143
|
+
'primary-darken-1': '#1F5592',
|
|
2144
|
+
secondary: '#48A9A6',
|
|
2124
2145
|
'secondary-darken-1': '#018786',
|
|
2125
2146
|
error: '#B00020',
|
|
2126
2147
|
info: '#2196F3',
|
|
@@ -2154,10 +2175,10 @@ const defaultThemeOptions = {
|
|
|
2154
2175
|
'surface-bright': '#ccbfd6',
|
|
2155
2176
|
'surface-variant': '#a3a3a3',
|
|
2156
2177
|
'on-surface-variant': '#424242',
|
|
2157
|
-
primary: '#
|
|
2158
|
-
'primary-darken-1': '#
|
|
2159
|
-
secondary: '#
|
|
2160
|
-
'secondary-darken-1': '#
|
|
2178
|
+
primary: '#2196F3',
|
|
2179
|
+
'primary-darken-1': '#277CC1',
|
|
2180
|
+
secondary: '#54B6B2',
|
|
2181
|
+
'secondary-darken-1': '#48A9A6',
|
|
2161
2182
|
error: '#CF6679',
|
|
2162
2183
|
info: '#2196F3',
|
|
2163
2184
|
success: '#4CAF50',
|
|
@@ -2642,7 +2663,7 @@ function ExpandTransitionGenerator () {
|
|
|
2642
2663
|
// Types
|
|
2643
2664
|
|
|
2644
2665
|
const makeVDialogTransitionProps = propsFactory({
|
|
2645
|
-
target: Object
|
|
2666
|
+
target: [Object, Array]
|
|
2646
2667
|
}, 'v-dialog-transition');
|
|
2647
2668
|
const VDialogTransition = genericComponent()({
|
|
2648
2669
|
name: 'VDialogTransition',
|
|
@@ -2744,7 +2765,7 @@ function getChildren(el) {
|
|
|
2744
2765
|
return els && [...els];
|
|
2745
2766
|
}
|
|
2746
2767
|
function getDimensions(target, el) {
|
|
2747
|
-
const targetBox = target
|
|
2768
|
+
const targetBox = getTargetBox(target);
|
|
2748
2769
|
const elBox = nullifyTransforms(el);
|
|
2749
2770
|
const [originX, originY] = getComputedStyle(el).transformOrigin.split(' ').map(v => parseFloat(v));
|
|
2750
2771
|
const [anchorSide, anchorOffset] = getComputedStyle(el).getPropertyValue('--v-overlay-anchor-origin').split(' ');
|
|
@@ -2990,6 +3011,10 @@ const Intersect = {
|
|
|
2990
3011
|
const makeVImgProps = propsFactory({
|
|
2991
3012
|
alt: String,
|
|
2992
3013
|
cover: Boolean,
|
|
3014
|
+
draggable: {
|
|
3015
|
+
type: [Boolean, String],
|
|
3016
|
+
default: undefined
|
|
3017
|
+
},
|
|
2993
3018
|
eager: Boolean,
|
|
2994
3019
|
gradient: String,
|
|
2995
3020
|
lazySrc: String,
|
|
@@ -3008,6 +3033,8 @@ const makeVImgProps = propsFactory({
|
|
|
3008
3033
|
type: [String, Object],
|
|
3009
3034
|
default: ''
|
|
3010
3035
|
},
|
|
3036
|
+
crossorigin: String,
|
|
3037
|
+
referrerpolicy: String,
|
|
3011
3038
|
srcset: String,
|
|
3012
3039
|
...makeVResponsiveProps(),
|
|
3013
3040
|
...makeComponentProps(),
|
|
@@ -3132,6 +3159,9 @@ const VImg = genericComponent()({
|
|
|
3132
3159
|
"src": normalisedSrc.value.src,
|
|
3133
3160
|
"srcset": normalisedSrc.value.srcset,
|
|
3134
3161
|
"alt": props.alt,
|
|
3162
|
+
"crossorigin": props.crossorigin,
|
|
3163
|
+
"referrerpolicy": props.referrerpolicy,
|
|
3164
|
+
"draggable": props.draggable,
|
|
3135
3165
|
"sizes": props.sizes,
|
|
3136
3166
|
"ref": image,
|
|
3137
3167
|
"onLoad": onLoad,
|
|
@@ -3153,7 +3183,10 @@ const VImg = genericComponent()({
|
|
|
3153
3183
|
default: () => [normalisedSrc.value.lazySrc && state.value !== 'loaded' && createVNode("img", {
|
|
3154
3184
|
"class": ['v-img__img', 'v-img__img--preload', containClasses.value],
|
|
3155
3185
|
"src": normalisedSrc.value.lazySrc,
|
|
3156
|
-
"alt": props.alt
|
|
3186
|
+
"alt": props.alt,
|
|
3187
|
+
"crossorigin": props.crossorigin,
|
|
3188
|
+
"referrerpolicy": props.referrerpolicy,
|
|
3189
|
+
"draggable": props.draggable
|
|
3157
3190
|
}, null)]
|
|
3158
3191
|
});
|
|
3159
3192
|
const __placeholder = () => {
|
|
@@ -4177,7 +4210,8 @@ const aliases = {
|
|
|
4177
4210
|
file: 'mdi-paperclip',
|
|
4178
4211
|
plus: 'mdi-plus',
|
|
4179
4212
|
minus: 'mdi-minus',
|
|
4180
|
-
calendar: 'mdi-calendar'
|
|
4213
|
+
calendar: 'mdi-calendar',
|
|
4214
|
+
eyeDropper: 'mdi-eyedropper'
|
|
4181
4215
|
};
|
|
4182
4216
|
const mdi = {
|
|
4183
4217
|
// Not using mergeProps here, functional components merge props by default (?)
|
|
@@ -5767,6 +5801,7 @@ const VSelectionControlGroup = genericComponent()({
|
|
|
5767
5801
|
|
|
5768
5802
|
const makeVSelectionControlProps = propsFactory({
|
|
5769
5803
|
label: String,
|
|
5804
|
+
baseColor: String,
|
|
5770
5805
|
trueValue: null,
|
|
5771
5806
|
falseValue: null,
|
|
5772
5807
|
value: null,
|
|
@@ -5805,7 +5840,8 @@ function useSelectionControl(props) {
|
|
|
5805
5840
|
textColorClasses,
|
|
5806
5841
|
textColorStyles
|
|
5807
5842
|
} = useTextColor(computed(() => {
|
|
5808
|
-
|
|
5843
|
+
if (props.error || props.disabled) return undefined;
|
|
5844
|
+
return model.value ? props.color : props.baseColor;
|
|
5809
5845
|
}));
|
|
5810
5846
|
const {
|
|
5811
5847
|
backgroundColorClasses,
|
|
@@ -6607,6 +6643,7 @@ const makeVAvatarProps = propsFactory({
|
|
|
6607
6643
|
end: Boolean,
|
|
6608
6644
|
icon: IconValue,
|
|
6609
6645
|
image: String,
|
|
6646
|
+
text: String,
|
|
6610
6647
|
...makeComponentProps(),
|
|
6611
6648
|
...makeDensityProps(),
|
|
6612
6649
|
...makeRoundedProps(),
|
|
@@ -6657,7 +6694,7 @@ const VAvatar = genericComponent()({
|
|
|
6657
6694
|
}, null) : props.icon ? createVNode(VIcon, {
|
|
6658
6695
|
"key": "icon",
|
|
6659
6696
|
"icon": props.icon
|
|
6660
|
-
}, null) : slots.default?.(), genOverlays(false, 'v-avatar')]
|
|
6697
|
+
}, null) : slots.default?.() ?? props.text, genOverlays(false, 'v-avatar')]
|
|
6661
6698
|
}));
|
|
6662
6699
|
return {};
|
|
6663
6700
|
}
|
|
@@ -8438,7 +8475,7 @@ function getIntrinsicSize(el, isRtl) {
|
|
|
8438
8475
|
return contentBox;
|
|
8439
8476
|
}
|
|
8440
8477
|
function connectedLocationStrategy(data, props, contentStyles) {
|
|
8441
|
-
const activatorFixed = isFixedPosition(data.
|
|
8478
|
+
const activatorFixed = Array.isArray(data.target.value) || isFixedPosition(data.target.value);
|
|
8442
8479
|
if (activatorFixed) {
|
|
8443
8480
|
Object.assign(contentStyles.value, {
|
|
8444
8481
|
position: 'fixed',
|
|
@@ -8487,11 +8524,11 @@ function connectedLocationStrategy(data, props, contentStyles) {
|
|
|
8487
8524
|
const observer = new ResizeObserver(() => {
|
|
8488
8525
|
if (observe) updateLocation();
|
|
8489
8526
|
});
|
|
8490
|
-
watch([data.
|
|
8491
|
-
let [
|
|
8492
|
-
let [
|
|
8493
|
-
if (
|
|
8494
|
-
if (
|
|
8527
|
+
watch([data.target, data.contentEl], (_ref, _ref2) => {
|
|
8528
|
+
let [newTarget, newContentEl] = _ref;
|
|
8529
|
+
let [oldTarget, oldContentEl] = _ref2;
|
|
8530
|
+
if (oldTarget && !Array.isArray(oldTarget)) observer.unobserve(oldTarget);
|
|
8531
|
+
if (newTarget && !Array.isArray(newTarget)) observer.observe(newTarget);
|
|
8495
8532
|
if (oldContentEl) observer.unobserve(oldContentEl);
|
|
8496
8533
|
if (newContentEl) observer.observe(newContentEl);
|
|
8497
8534
|
}, {
|
|
@@ -8507,8 +8544,8 @@ function connectedLocationStrategy(data, props, contentStyles) {
|
|
|
8507
8544
|
requestAnimationFrame(() => {
|
|
8508
8545
|
requestAnimationFrame(() => observe = true);
|
|
8509
8546
|
});
|
|
8510
|
-
if (!data.
|
|
8511
|
-
const targetBox = data.
|
|
8547
|
+
if (!data.target.value || !data.contentEl.value) return;
|
|
8548
|
+
const targetBox = getTargetBox(data.target.value);
|
|
8512
8549
|
const contentBox = getIntrinsicSize(data.contentEl.value, data.isRtl.value);
|
|
8513
8550
|
const scrollParents = getScrollParents(data.contentEl.value);
|
|
8514
8551
|
const viewportMargin = 12;
|
|
@@ -8795,11 +8832,11 @@ function closeScrollStrategy(data) {
|
|
|
8795
8832
|
function onScroll(e) {
|
|
8796
8833
|
data.isActive.value = false;
|
|
8797
8834
|
}
|
|
8798
|
-
bindScroll(data.
|
|
8835
|
+
bindScroll(data.targetEl.value ?? data.contentEl.value, onScroll);
|
|
8799
8836
|
}
|
|
8800
8837
|
function blockScrollStrategy(data, props) {
|
|
8801
8838
|
const offsetParent = data.root.value?.offsetParent;
|
|
8802
|
-
const scrollElements = [...new Set([...getScrollParents(data.
|
|
8839
|
+
const scrollElements = [...new Set([...getScrollParents(data.targetEl.value, props.contained ? offsetParent : undefined), ...getScrollParents(data.contentEl.value, props.contained ? offsetParent : undefined)])].filter(el => !el.classList.contains('v-overlay-scroll-blocked'));
|
|
8803
8840
|
const scrollbarWidth = window.innerWidth - document.documentElement.offsetWidth;
|
|
8804
8841
|
const scrollableParent = (el => hasScrollbar(el) && el)(offsetParent || document.documentElement);
|
|
8805
8842
|
if (scrollableParent) {
|
|
@@ -8843,7 +8880,7 @@ function repositionScrollStrategy(data, props, scope) {
|
|
|
8843
8880
|
}
|
|
8844
8881
|
ric = (typeof requestIdleCallback === 'undefined' ? cb => cb() : requestIdleCallback)(() => {
|
|
8845
8882
|
scope.run(() => {
|
|
8846
|
-
bindScroll(data.
|
|
8883
|
+
bindScroll(data.targetEl.value ?? data.contentEl.value, e => {
|
|
8847
8884
|
if (slow) {
|
|
8848
8885
|
// If the position calculation is slow,
|
|
8849
8886
|
// defer updates until scrolling is finished.
|
|
@@ -8924,6 +8961,7 @@ function useDelay(props, cb) {
|
|
|
8924
8961
|
// Types
|
|
8925
8962
|
|
|
8926
8963
|
const makeActivatorProps = propsFactory({
|
|
8964
|
+
target: [String, Object],
|
|
8927
8965
|
activator: [String, Object],
|
|
8928
8966
|
activatorProps: {
|
|
8929
8967
|
type: Object,
|
|
@@ -8946,6 +8984,7 @@ function useActivator(props, _ref) {
|
|
|
8946
8984
|
isActive,
|
|
8947
8985
|
isTop
|
|
8948
8986
|
} = _ref;
|
|
8987
|
+
const vm = getCurrentInstance('useActivator');
|
|
8949
8988
|
const activatorEl = ref();
|
|
8950
8989
|
let isHovered = false;
|
|
8951
8990
|
let isFocused = false;
|
|
@@ -8963,10 +9002,14 @@ function useActivator(props, _ref) {
|
|
|
8963
9002
|
isActive.value = value;
|
|
8964
9003
|
}
|
|
8965
9004
|
});
|
|
9005
|
+
const cursorTarget = ref();
|
|
8966
9006
|
const availableEvents = {
|
|
8967
9007
|
onClick: e => {
|
|
8968
9008
|
e.stopPropagation();
|
|
8969
9009
|
activatorEl.value = e.currentTarget || e.target;
|
|
9010
|
+
if (!isActive.value) {
|
|
9011
|
+
cursorTarget.value = [e.clientX, e.clientY];
|
|
9012
|
+
}
|
|
8970
9013
|
isActive.value = !isActive.value;
|
|
8971
9014
|
},
|
|
8972
9015
|
onMouseenter: e => {
|
|
@@ -9060,6 +9103,15 @@ function useActivator(props, _ref) {
|
|
|
9060
9103
|
isActive.value = false;
|
|
9061
9104
|
}
|
|
9062
9105
|
});
|
|
9106
|
+
watch(isActive, val => {
|
|
9107
|
+
if (!val) {
|
|
9108
|
+
setTimeout(() => {
|
|
9109
|
+
cursorTarget.value = undefined;
|
|
9110
|
+
});
|
|
9111
|
+
}
|
|
9112
|
+
}, {
|
|
9113
|
+
flush: 'post'
|
|
9114
|
+
});
|
|
9063
9115
|
const activatorRef = ref();
|
|
9064
9116
|
watchEffect(() => {
|
|
9065
9117
|
if (!activatorRef.value) return;
|
|
@@ -9067,7 +9119,15 @@ function useActivator(props, _ref) {
|
|
|
9067
9119
|
activatorEl.value = refElement(activatorRef.value);
|
|
9068
9120
|
});
|
|
9069
9121
|
});
|
|
9070
|
-
const
|
|
9122
|
+
const targetRef = ref();
|
|
9123
|
+
const target = computed(() => {
|
|
9124
|
+
if (props.target === 'cursor' && cursorTarget.value) return cursorTarget.value;
|
|
9125
|
+
if (targetRef.value) return refElement(targetRef.value);
|
|
9126
|
+
return getTarget(props.target, vm) || activatorEl.value;
|
|
9127
|
+
});
|
|
9128
|
+
const targetEl = computed(() => {
|
|
9129
|
+
return Array.isArray(target.value) ? undefined : target.value;
|
|
9130
|
+
});
|
|
9071
9131
|
let scope;
|
|
9072
9132
|
watch(() => !!props.activator, val => {
|
|
9073
9133
|
if (val && IN_BROWSER) {
|
|
@@ -9091,6 +9151,9 @@ function useActivator(props, _ref) {
|
|
|
9091
9151
|
return {
|
|
9092
9152
|
activatorEl,
|
|
9093
9153
|
activatorRef,
|
|
9154
|
+
target,
|
|
9155
|
+
targetEl,
|
|
9156
|
+
targetRef,
|
|
9094
9157
|
activatorEvents,
|
|
9095
9158
|
contentEvents,
|
|
9096
9159
|
scrimEvents
|
|
@@ -9132,31 +9195,34 @@ function _useActivator(props, vm, _ref2) {
|
|
|
9132
9195
|
}
|
|
9133
9196
|
function getActivator() {
|
|
9134
9197
|
let selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : props.activator;
|
|
9135
|
-
|
|
9136
|
-
if (selector) {
|
|
9137
|
-
if (selector === 'parent') {
|
|
9138
|
-
let el = vm?.proxy?.$el?.parentNode;
|
|
9139
|
-
while (el?.hasAttribute('data-no-activator')) {
|
|
9140
|
-
el = el.parentNode;
|
|
9141
|
-
}
|
|
9142
|
-
activator = el;
|
|
9143
|
-
} else if (typeof selector === 'string') {
|
|
9144
|
-
// Selector
|
|
9145
|
-
activator = document.querySelector(selector);
|
|
9146
|
-
} else if ('$el' in selector) {
|
|
9147
|
-
// Component (ref)
|
|
9148
|
-
activator = selector.$el;
|
|
9149
|
-
} else {
|
|
9150
|
-
// HTMLElement | Element
|
|
9151
|
-
activator = selector;
|
|
9152
|
-
}
|
|
9153
|
-
}
|
|
9198
|
+
const activator = getTarget(selector, vm);
|
|
9154
9199
|
|
|
9155
9200
|
// The activator should only be a valid element (Ignore comments and text nodes)
|
|
9156
|
-
activatorEl.value = activator?.nodeType === Node.ELEMENT_NODE ? activator :
|
|
9201
|
+
activatorEl.value = activator?.nodeType === Node.ELEMENT_NODE ? activator : undefined;
|
|
9157
9202
|
return activatorEl.value;
|
|
9158
9203
|
}
|
|
9159
9204
|
}
|
|
9205
|
+
function getTarget(selector, vm) {
|
|
9206
|
+
if (!selector) return;
|
|
9207
|
+
let target;
|
|
9208
|
+
if (selector === 'parent') {
|
|
9209
|
+
let el = vm?.proxy?.$el?.parentNode;
|
|
9210
|
+
while (el?.hasAttribute('data-no-activator')) {
|
|
9211
|
+
el = el.parentNode;
|
|
9212
|
+
}
|
|
9213
|
+
target = el;
|
|
9214
|
+
} else if (typeof selector === 'string') {
|
|
9215
|
+
// Selector
|
|
9216
|
+
target = document.querySelector(selector);
|
|
9217
|
+
} else if ('$el' in selector) {
|
|
9218
|
+
// Component (ref)
|
|
9219
|
+
target = selector.$el;
|
|
9220
|
+
} else {
|
|
9221
|
+
// HTMLElement | Element | [x, y]
|
|
9222
|
+
target = selector;
|
|
9223
|
+
}
|
|
9224
|
+
return target;
|
|
9225
|
+
}
|
|
9160
9226
|
|
|
9161
9227
|
// Utilities
|
|
9162
9228
|
|
|
@@ -9280,10 +9346,30 @@ function createDisplay(options, ssr) {
|
|
|
9280
9346
|
ssr: !!ssr
|
|
9281
9347
|
};
|
|
9282
9348
|
}
|
|
9349
|
+
const makeDisplayProps = propsFactory({
|
|
9350
|
+
mobileBreakpoint: [Number, String]
|
|
9351
|
+
}, 'display');
|
|
9283
9352
|
function useDisplay() {
|
|
9353
|
+
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
9354
|
+
let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName();
|
|
9284
9355
|
const display = inject$1(DisplaySymbol);
|
|
9285
9356
|
if (!display) throw new Error('Could not find Vuetify display injection');
|
|
9286
|
-
|
|
9357
|
+
const mobile = computed(() => {
|
|
9358
|
+
if (!props.mobileBreakpoint) return display.mobile.value;
|
|
9359
|
+
const breakpointValue = typeof props.mobileBreakpoint === 'number' ? props.mobileBreakpoint : display.thresholds.value[props.mobileBreakpoint];
|
|
9360
|
+
return display.width.value < breakpointValue;
|
|
9361
|
+
});
|
|
9362
|
+
const displayClasses = computed(() => {
|
|
9363
|
+
if (!name) return {};
|
|
9364
|
+
return {
|
|
9365
|
+
[`${name}--mobile`]: mobile.value
|
|
9366
|
+
};
|
|
9367
|
+
});
|
|
9368
|
+
return {
|
|
9369
|
+
...display,
|
|
9370
|
+
displayClasses,
|
|
9371
|
+
mobile
|
|
9372
|
+
};
|
|
9287
9373
|
}
|
|
9288
9374
|
|
|
9289
9375
|
// Composables
|
|
@@ -9600,6 +9686,9 @@ const VOverlay = genericComponent()({
|
|
|
9600
9686
|
const {
|
|
9601
9687
|
activatorEl,
|
|
9602
9688
|
activatorRef,
|
|
9689
|
+
target,
|
|
9690
|
+
targetEl,
|
|
9691
|
+
targetRef,
|
|
9603
9692
|
activatorEvents,
|
|
9604
9693
|
contentEvents,
|
|
9605
9694
|
scrimEvents
|
|
@@ -9625,13 +9714,13 @@ const VOverlay = genericComponent()({
|
|
|
9625
9714
|
} = useLocationStrategies(props, {
|
|
9626
9715
|
isRtl,
|
|
9627
9716
|
contentEl,
|
|
9628
|
-
|
|
9717
|
+
target,
|
|
9629
9718
|
isActive
|
|
9630
9719
|
});
|
|
9631
9720
|
useScrollStrategies(props, {
|
|
9632
9721
|
root,
|
|
9633
9722
|
contentEl,
|
|
9634
|
-
|
|
9723
|
+
targetEl,
|
|
9635
9724
|
isActive,
|
|
9636
9725
|
updateLocation
|
|
9637
9726
|
});
|
|
@@ -9699,7 +9788,8 @@ const VOverlay = genericComponent()({
|
|
|
9699
9788
|
useRender(() => createVNode(Fragment, null, [slots.activator?.({
|
|
9700
9789
|
isActive: isActive.value,
|
|
9701
9790
|
props: mergeProps({
|
|
9702
|
-
ref: activatorRef
|
|
9791
|
+
ref: activatorRef,
|
|
9792
|
+
targetRef
|
|
9703
9793
|
}, activatorEvents.value, props.activatorProps)
|
|
9704
9794
|
}), isMounted.value && hasContent.value && createVNode(Teleport, {
|
|
9705
9795
|
"disabled": !teleportTarget.value,
|
|
@@ -9722,7 +9812,7 @@ const VOverlay = genericComponent()({
|
|
|
9722
9812
|
"appear": true,
|
|
9723
9813
|
"persisted": true,
|
|
9724
9814
|
"transition": props.transition,
|
|
9725
|
-
"target":
|
|
9815
|
+
"target": target.value,
|
|
9726
9816
|
"onAfterLeave": () => {
|
|
9727
9817
|
onAfterLeave();
|
|
9728
9818
|
emit('afterLeave');
|
|
@@ -9743,6 +9833,7 @@ const VOverlay = genericComponent()({
|
|
|
9743
9833
|
})]));
|
|
9744
9834
|
return {
|
|
9745
9835
|
activatorEl,
|
|
9836
|
+
target,
|
|
9746
9837
|
animateClick,
|
|
9747
9838
|
contentEl,
|
|
9748
9839
|
globalTop,
|
|
@@ -11882,6 +11973,7 @@ const makeVBannerProps = propsFactory({
|
|
|
11882
11973
|
...makeComponentProps(),
|
|
11883
11974
|
...makeDensityProps(),
|
|
11884
11975
|
...makeDimensionProps(),
|
|
11976
|
+
...makeDisplayProps(),
|
|
11885
11977
|
...makeElevationProps(),
|
|
11886
11978
|
...makeLocationProps(),
|
|
11887
11979
|
...makePositionProps(),
|
|
@@ -11903,8 +11995,9 @@ const VBanner = genericComponent()({
|
|
|
11903
11995
|
densityClasses
|
|
11904
11996
|
} = useDensity(props);
|
|
11905
11997
|
const {
|
|
11998
|
+
displayClasses,
|
|
11906
11999
|
mobile
|
|
11907
|
-
} = useDisplay();
|
|
12000
|
+
} = useDisplay(props);
|
|
11908
12001
|
const {
|
|
11909
12002
|
dimensionStyles
|
|
11910
12003
|
} = useDimension(props);
|
|
@@ -11940,7 +12033,7 @@ const VBanner = genericComponent()({
|
|
|
11940
12033
|
'v-banner--stacked': props.stacked || mobile.value,
|
|
11941
12034
|
'v-banner--sticky': props.sticky,
|
|
11942
12035
|
[`v-banner--${props.lines}-line`]: !!props.lines
|
|
11943
|
-
}, borderClasses.value, densityClasses.value, elevationClasses.value, positionClasses.value, roundedClasses.value, themeClasses.value, props.class],
|
|
12036
|
+
}, borderClasses.value, densityClasses.value, displayClasses.value, elevationClasses.value, positionClasses.value, roundedClasses.value, themeClasses.value, props.class],
|
|
11944
12037
|
"style": [dimensionStyles.value, locationStyles.value, props.style],
|
|
11945
12038
|
"role": "banner"
|
|
11946
12039
|
}, {
|
|
@@ -12247,12 +12340,17 @@ const VBreadcrumbs = genericComponent()({
|
|
|
12247
12340
|
item,
|
|
12248
12341
|
raw
|
|
12249
12342
|
} = _ref2;
|
|
12250
|
-
return createVNode(Fragment, null, [
|
|
12251
|
-
|
|
12343
|
+
return createVNode(Fragment, null, [slots.item?.({
|
|
12344
|
+
item,
|
|
12345
|
+
index
|
|
12346
|
+
}) ?? createVNode(VBreadcrumbsItem, mergeProps({
|
|
12347
|
+
"key": index,
|
|
12252
12348
|
"disabled": index >= array.length - 1
|
|
12253
|
-
}, item
|
|
12349
|
+
}, typeof item === 'string' ? {
|
|
12350
|
+
title: item
|
|
12351
|
+
} : item), {
|
|
12254
12352
|
default: slots.title ? () => slots.title?.({
|
|
12255
|
-
item
|
|
12353
|
+
item,
|
|
12256
12354
|
index
|
|
12257
12355
|
}) : undefined
|
|
12258
12356
|
}), index < array.length - 1 && createVNode(VBreadcrumbsDivider, null, {
|
|
@@ -13590,7 +13688,11 @@ const makeSliderProps = propsFactory({
|
|
|
13590
13688
|
...makeRoundedProps(),
|
|
13591
13689
|
...makeElevationProps({
|
|
13592
13690
|
elevation: 2
|
|
13593
|
-
})
|
|
13691
|
+
}),
|
|
13692
|
+
ripple: {
|
|
13693
|
+
type: Boolean,
|
|
13694
|
+
default: true
|
|
13695
|
+
}
|
|
13594
13696
|
}, 'Slider');
|
|
13595
13697
|
const useSteps = props => {
|
|
13596
13698
|
const min = computed(() => parseFloat(props.min));
|
|
@@ -14197,7 +14299,8 @@ const VSlider = genericComponent()({
|
|
|
14197
14299
|
"position": trackStop.value,
|
|
14198
14300
|
"elevation": props.elevation,
|
|
14199
14301
|
"onFocus": focus,
|
|
14200
|
-
"onBlur": blur
|
|
14302
|
+
"onBlur": blur,
|
|
14303
|
+
"ripple": props.ripple
|
|
14201
14304
|
}, {
|
|
14202
14305
|
'thumb-label': slots['thumb-label']
|
|
14203
14306
|
})]);
|
|
@@ -14228,12 +14331,36 @@ const VColorPickerPreview = defineComponent({
|
|
|
14228
14331
|
let {
|
|
14229
14332
|
emit
|
|
14230
14333
|
} = _ref;
|
|
14334
|
+
const abortController = new AbortController();
|
|
14335
|
+
onUnmounted(() => abortController.abort());
|
|
14336
|
+
async function openEyeDropper() {
|
|
14337
|
+
if (!SUPPORTS_EYE_DROPPER) return;
|
|
14338
|
+
const eyeDropper = new window.EyeDropper();
|
|
14339
|
+
try {
|
|
14340
|
+
const result = await eyeDropper.open({
|
|
14341
|
+
signal: abortController.signal
|
|
14342
|
+
});
|
|
14343
|
+
const colorHexValue = HexToHSV(result.sRGBHex);
|
|
14344
|
+
emit('update:color', {
|
|
14345
|
+
...(props.color ?? nullColor),
|
|
14346
|
+
...colorHexValue
|
|
14347
|
+
});
|
|
14348
|
+
} catch (e) {}
|
|
14349
|
+
}
|
|
14231
14350
|
useRender(() => createVNode("div", {
|
|
14232
14351
|
"class": ['v-color-picker-preview', {
|
|
14233
14352
|
'v-color-picker-preview--hide-alpha': props.hideAlpha
|
|
14234
14353
|
}, props.class],
|
|
14235
14354
|
"style": props.style
|
|
14236
|
-
}, [createVNode("div", {
|
|
14355
|
+
}, [SUPPORTS_EYE_DROPPER && createVNode("div", {
|
|
14356
|
+
"class": "v-color-picker-preview__eye-dropper",
|
|
14357
|
+
"key": "eyeDropper"
|
|
14358
|
+
}, [createVNode(VBtn, {
|
|
14359
|
+
"onClick": openEyeDropper,
|
|
14360
|
+
"icon": "$eyeDropper",
|
|
14361
|
+
"variant": "plain",
|
|
14362
|
+
"density": "comfortable"
|
|
14363
|
+
}, null)]), createVNode("div", {
|
|
14237
14364
|
"class": "v-color-picker-preview__dot"
|
|
14238
14365
|
}, [createVNode("div", {
|
|
14239
14366
|
"style": {
|
|
@@ -16914,6 +17041,7 @@ const makeVNavigationDrawerProps = propsFactory({
|
|
|
16914
17041
|
sticky: Boolean,
|
|
16915
17042
|
...makeBorderProps(),
|
|
16916
17043
|
...makeComponentProps(),
|
|
17044
|
+
...makeDisplayProps(),
|
|
16917
17045
|
...makeElevationProps(),
|
|
16918
17046
|
...makeLayoutItemProps(),
|
|
16919
17047
|
...makeRoundedProps(),
|
|
@@ -16952,8 +17080,9 @@ const VNavigationDrawer = genericComponent()({
|
|
|
16952
17080
|
elevationClasses
|
|
16953
17081
|
} = useElevation(props);
|
|
16954
17082
|
const {
|
|
17083
|
+
displayClasses,
|
|
16955
17084
|
mobile
|
|
16956
|
-
} = useDisplay();
|
|
17085
|
+
} = useDisplay(props);
|
|
16957
17086
|
const {
|
|
16958
17087
|
roundedClasses
|
|
16959
17088
|
} = useRounded(props);
|
|
@@ -17064,7 +17193,7 @@ const VNavigationDrawer = genericComponent()({
|
|
|
17064
17193
|
'v-navigation-drawer--temporary': isTemporary.value,
|
|
17065
17194
|
'v-navigation-drawer--active': isActive.value,
|
|
17066
17195
|
'v-navigation-drawer--sticky': isSticky.value
|
|
17067
|
-
}, themeClasses.value, backgroundColorClasses.value, borderClasses.value, elevationClasses.value, roundedClasses.value, props.class],
|
|
17196
|
+
}, themeClasses.value, backgroundColorClasses.value, borderClasses.value, displayClasses.value, elevationClasses.value, roundedClasses.value, props.class],
|
|
17068
17197
|
"style": [backgroundColorStyles.value, layoutItemStyles.value, dragStyles.value, ssrBootStyles.value, stickyStyles.value, props.style]
|
|
17069
17198
|
}, scopeId, attrs), {
|
|
17070
17199
|
default: () => [hasImage && createVNode("div", {
|
|
@@ -17812,7 +17941,8 @@ const VRangeSlider = genericComponent()({
|
|
|
17812
17941
|
},
|
|
17813
17942
|
"min": min.value,
|
|
17814
17943
|
"max": model.value[1],
|
|
17815
|
-
"position": trackStart.value
|
|
17944
|
+
"position": trackStart.value,
|
|
17945
|
+
"ripple": props.ripple
|
|
17816
17946
|
}, {
|
|
17817
17947
|
'thumb-label': slots['thumb-label']
|
|
17818
17948
|
}), createVNode(VSliderThumb, {
|
|
@@ -17840,7 +17970,8 @@ const VRangeSlider = genericComponent()({
|
|
|
17840
17970
|
},
|
|
17841
17971
|
"min": model.value[0],
|
|
17842
17972
|
"max": max.value,
|
|
17843
|
-
"position": trackStop.value
|
|
17973
|
+
"position": trackStop.value,
|
|
17974
|
+
"ripple": props.ripple
|
|
17844
17975
|
}, {
|
|
17845
17976
|
'thumb-label': slots['thumb-label']
|
|
17846
17977
|
})]);
|
|
@@ -18114,6 +18245,7 @@ const makeVSlideGroupProps = propsFactory({
|
|
|
18114
18245
|
validator: v => typeof v === 'boolean' || ['always', 'desktop', 'mobile'].includes(v)
|
|
18115
18246
|
},
|
|
18116
18247
|
...makeComponentProps(),
|
|
18248
|
+
...makeDisplayProps(),
|
|
18117
18249
|
...makeTagProps(),
|
|
18118
18250
|
...makeGroupProps({
|
|
18119
18251
|
selectedClass: 'v-slide-group-item--active'
|
|
@@ -18133,8 +18265,9 @@ const VSlideGroup = genericComponent()({
|
|
|
18133
18265
|
isRtl
|
|
18134
18266
|
} = useRtl();
|
|
18135
18267
|
const {
|
|
18268
|
+
displayClasses,
|
|
18136
18269
|
mobile
|
|
18137
|
-
} = useDisplay();
|
|
18270
|
+
} = useDisplay(props);
|
|
18138
18271
|
const group = useGroup(props, props.symbol);
|
|
18139
18272
|
const isOverflowing = shallowRef(false);
|
|
18140
18273
|
const scrollOffset = shallowRef(0);
|
|
@@ -18354,7 +18487,7 @@ const VSlideGroup = genericComponent()({
|
|
|
18354
18487
|
'v-slide-group--vertical': !isHorizontal.value,
|
|
18355
18488
|
'v-slide-group--has-affixes': hasAffixes.value,
|
|
18356
18489
|
'v-slide-group--is-overflowing': isOverflowing.value
|
|
18357
|
-
}, props.class],
|
|
18490
|
+
}, displayClasses.value, props.class],
|
|
18358
18491
|
"style": props.style,
|
|
18359
18492
|
"tabindex": isFocused.value || group.selected.value.length ? -1 : 0,
|
|
18360
18493
|
"onFocus": onFocus
|
|
@@ -18429,8 +18562,41 @@ const VSlideGroupItem = genericComponent()({
|
|
|
18429
18562
|
}
|
|
18430
18563
|
});
|
|
18431
18564
|
|
|
18565
|
+
function useCountdown(milliseconds) {
|
|
18566
|
+
const time = shallowRef(milliseconds);
|
|
18567
|
+
let timer = -1;
|
|
18568
|
+
function clear() {
|
|
18569
|
+
clearInterval(timer);
|
|
18570
|
+
}
|
|
18571
|
+
function reset() {
|
|
18572
|
+
clear();
|
|
18573
|
+
nextTick(() => time.value = milliseconds);
|
|
18574
|
+
}
|
|
18575
|
+
function start(el) {
|
|
18576
|
+
const style = el ? getComputedStyle(el) : {
|
|
18577
|
+
transitionDuration: 0.2
|
|
18578
|
+
};
|
|
18579
|
+
const interval = parseFloat(style.transitionDuration) * 1000 || 200;
|
|
18580
|
+
clear();
|
|
18581
|
+
if (time.value <= 0) return;
|
|
18582
|
+
const startTime = performance.now();
|
|
18583
|
+
timer = window.setInterval(() => {
|
|
18584
|
+
const elapsed = performance.now() - startTime + interval;
|
|
18585
|
+
time.value = Math.max(milliseconds - elapsed, 0);
|
|
18586
|
+
if (time.value <= 0) clear();
|
|
18587
|
+
}, interval);
|
|
18588
|
+
}
|
|
18589
|
+
onScopeDispose(clear);
|
|
18590
|
+
return {
|
|
18591
|
+
clear,
|
|
18592
|
+
time,
|
|
18593
|
+
start,
|
|
18594
|
+
reset
|
|
18595
|
+
};
|
|
18596
|
+
}
|
|
18432
18597
|
const makeVSnackbarProps = propsFactory({
|
|
18433
18598
|
multiLine: Boolean,
|
|
18599
|
+
timer: [Boolean, String],
|
|
18434
18600
|
timeout: {
|
|
18435
18601
|
type: [Number, String],
|
|
18436
18602
|
default: 5000
|
|
@@ -18478,7 +18644,10 @@ const VSnackbar = genericComponent()({
|
|
|
18478
18644
|
const {
|
|
18479
18645
|
roundedClasses
|
|
18480
18646
|
} = useRounded(props);
|
|
18647
|
+
const countdown = useCountdown(Number(props.timeout));
|
|
18481
18648
|
const overlay = ref();
|
|
18649
|
+
const timerRef = ref();
|
|
18650
|
+
const isHovering = shallowRef(false);
|
|
18482
18651
|
watch(isActive, startTimeout);
|
|
18483
18652
|
watch(() => props.timeout, startTimeout);
|
|
18484
18653
|
onMounted(() => {
|
|
@@ -18486,16 +18655,28 @@ const VSnackbar = genericComponent()({
|
|
|
18486
18655
|
});
|
|
18487
18656
|
let activeTimeout = -1;
|
|
18488
18657
|
function startTimeout() {
|
|
18658
|
+
countdown.reset();
|
|
18489
18659
|
window.clearTimeout(activeTimeout);
|
|
18490
18660
|
const timeout = Number(props.timeout);
|
|
18491
18661
|
if (!isActive.value || timeout === -1) return;
|
|
18662
|
+
const element = refElement(timerRef.value);
|
|
18663
|
+
countdown.start(element);
|
|
18492
18664
|
activeTimeout = window.setTimeout(() => {
|
|
18493
18665
|
isActive.value = false;
|
|
18494
18666
|
}, timeout);
|
|
18495
18667
|
}
|
|
18496
|
-
function
|
|
18668
|
+
function clearTimeout() {
|
|
18669
|
+
countdown.reset();
|
|
18497
18670
|
window.clearTimeout(activeTimeout);
|
|
18498
18671
|
}
|
|
18672
|
+
function onPointerenter() {
|
|
18673
|
+
isHovering.value = true;
|
|
18674
|
+
clearTimeout();
|
|
18675
|
+
}
|
|
18676
|
+
function onPointerleave() {
|
|
18677
|
+
isHovering.value = false;
|
|
18678
|
+
startTimeout();
|
|
18679
|
+
}
|
|
18499
18680
|
useRender(() => {
|
|
18500
18681
|
const [overlayProps] = VOverlay.filterProps(props);
|
|
18501
18682
|
return createVNode(VOverlay, mergeProps({
|
|
@@ -18503,6 +18684,7 @@ const VSnackbar = genericComponent()({
|
|
|
18503
18684
|
"class": ['v-snackbar', {
|
|
18504
18685
|
'v-snackbar--active': isActive.value,
|
|
18505
18686
|
'v-snackbar--multi-line': props.multiLine && !props.vertical,
|
|
18687
|
+
'v-snackbar--timer': !!props.timer,
|
|
18506
18688
|
'v-snackbar--vertical': props.vertical
|
|
18507
18689
|
}, positionClasses.value, props.class],
|
|
18508
18690
|
"style": props.style
|
|
@@ -18513,7 +18695,7 @@ const VSnackbar = genericComponent()({
|
|
|
18513
18695
|
class: ['v-snackbar__wrapper', themeClasses.value, colorClasses.value, roundedClasses.value, variantClasses.value],
|
|
18514
18696
|
style: [locationStyles.value, colorStyles.value],
|
|
18515
18697
|
onPointerenter,
|
|
18516
|
-
onPointerleave
|
|
18698
|
+
onPointerleave
|
|
18517
18699
|
}, overlayProps.contentProps),
|
|
18518
18700
|
"persistent": true,
|
|
18519
18701
|
"noClickAnimation": true,
|
|
@@ -18521,7 +18703,16 @@ const VSnackbar = genericComponent()({
|
|
|
18521
18703
|
"scrollStrategy": "none",
|
|
18522
18704
|
"_disableGlobalStack": true
|
|
18523
18705
|
}, scopeId), {
|
|
18524
|
-
default: () => [genOverlays(false, 'v-snackbar'),
|
|
18706
|
+
default: () => [genOverlays(false, 'v-snackbar'), props.timer && createVNode("div", {
|
|
18707
|
+
"key": "timer",
|
|
18708
|
+
"class": "v-snackbar__timer"
|
|
18709
|
+
}, [createVNode(VProgressLinear, {
|
|
18710
|
+
"ref": timerRef,
|
|
18711
|
+
"active": !isHovering.value,
|
|
18712
|
+
"color": typeof props.timer === 'string' ? props.timer : 'info',
|
|
18713
|
+
"max": props.timeout,
|
|
18714
|
+
"model-value": countdown.time.value
|
|
18715
|
+
}, null)]), slots.default && createVNode("div", {
|
|
18525
18716
|
"class": "v-snackbar__content",
|
|
18526
18717
|
"role": "status",
|
|
18527
18718
|
"aria-live": "polite"
|
|
@@ -24574,7 +24765,7 @@ function createVuetify$1() {
|
|
|
24574
24765
|
date
|
|
24575
24766
|
};
|
|
24576
24767
|
}
|
|
24577
|
-
const version$1 = "3.
|
|
24768
|
+
const version$1 = "3.4.0-alpha.1";
|
|
24578
24769
|
createVuetify$1.version = version$1;
|
|
24579
24770
|
|
|
24580
24771
|
// Vue's inject() can only be used in setup
|
|
@@ -24588,7 +24779,7 @@ function inject(key) {
|
|
|
24588
24779
|
|
|
24589
24780
|
/* eslint-disable local-rules/sort-imports */
|
|
24590
24781
|
|
|
24591
|
-
const version = "3.
|
|
24782
|
+
const version = "3.4.0-alpha.1";
|
|
24592
24783
|
|
|
24593
24784
|
/* eslint-disable local-rules/sort-imports */
|
|
24594
24785
|
|