@vuetify/nightly 3.3.12-dev.2023-08-15 → 3.3.12-dev.2023-08-17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -2
- package/dist/json/attributes.json +31 -7
- package/dist/json/importMap.json +46 -46
- package/dist/json/tags.json +6 -0
- package/dist/json/web-types.json +62 -8
- package/dist/vuetify-labs.css +884 -884
- package/dist/vuetify-labs.d.ts +227 -110
- package/dist/vuetify-labs.esm.js +96 -42
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +96 -42
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +240 -240
- package/dist/vuetify.d.ts +227 -116
- package/dist/vuetify.esm.js +96 -42
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +96 -42
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +740 -739
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAutocomplete/index.d.mts +14 -8
- package/lib/components/VCombobox/index.d.mts +14 -8
- package/lib/components/VDialog/index.d.mts +41 -20
- package/lib/components/VMenu/index.d.mts +41 -20
- 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/VSelect/index.d.mts +14 -8
- package/lib/components/VSnackbar/index.d.mts +41 -20
- package/lib/components/VTooltip/index.d.mts +41 -20
- package/lib/components/index.d.mts +215 -104
- 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/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.mts +12 -12
- package/lib/labs/VBottomSheet/index.d.mts +14 -8
- package/lib/labs/components.d.mts +14 -8
- package/lib/util/box.mjs +12 -0
- package/lib/util/box.mjs.map +1 -1
- package/lib/util/helpers.mjs +9 -1
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +1 -1
package/dist/vuetify.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.3.12-dev.2023-08-
|
|
2
|
+
* Vuetify v3.3.12-dev.2023-08-17
|
|
3
3
|
* Forged by John Leider
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -162,7 +162,15 @@
|
|
|
162
162
|
return obj !== null && typeof obj === 'object' && !Array.isArray(obj);
|
|
163
163
|
}
|
|
164
164
|
function refElement(obj) {
|
|
165
|
-
|
|
165
|
+
if (obj && '$el' in obj) {
|
|
166
|
+
const el = obj.$el;
|
|
167
|
+
if (el?.nodeType === Node.TEXT_NODE) {
|
|
168
|
+
// Multi-root component, use the first element
|
|
169
|
+
return el.nextElementSibling;
|
|
170
|
+
}
|
|
171
|
+
return el;
|
|
172
|
+
}
|
|
173
|
+
return obj;
|
|
166
174
|
}
|
|
167
175
|
|
|
168
176
|
// KeyboardEvent.keyCode aliases
|
|
@@ -547,6 +555,18 @@
|
|
|
547
555
|
}
|
|
548
556
|
};
|
|
549
557
|
}
|
|
558
|
+
function getTargetBox(target) {
|
|
559
|
+
if (Array.isArray(target)) {
|
|
560
|
+
return new Box({
|
|
561
|
+
x: target[0],
|
|
562
|
+
y: target[1],
|
|
563
|
+
width: 0,
|
|
564
|
+
height: 0
|
|
565
|
+
});
|
|
566
|
+
} else {
|
|
567
|
+
return target.getBoundingClientRect();
|
|
568
|
+
}
|
|
569
|
+
}
|
|
550
570
|
|
|
551
571
|
// Utilities
|
|
552
572
|
|
|
@@ -2620,7 +2640,7 @@
|
|
|
2620
2640
|
// Types
|
|
2621
2641
|
|
|
2622
2642
|
const makeVDialogTransitionProps = propsFactory({
|
|
2623
|
-
target: Object
|
|
2643
|
+
target: [Object, Array]
|
|
2624
2644
|
}, 'v-dialog-transition');
|
|
2625
2645
|
const VDialogTransition = genericComponent()({
|
|
2626
2646
|
name: 'VDialogTransition',
|
|
@@ -2722,7 +2742,7 @@
|
|
|
2722
2742
|
return els && [...els];
|
|
2723
2743
|
}
|
|
2724
2744
|
function getDimensions(target, el) {
|
|
2725
|
-
const targetBox = target
|
|
2745
|
+
const targetBox = getTargetBox(target);
|
|
2726
2746
|
const elBox = nullifyTransforms(el);
|
|
2727
2747
|
const [originX, originY] = getComputedStyle(el).transformOrigin.split(' ').map(v => parseFloat(v));
|
|
2728
2748
|
const [anchorSide, anchorOffset] = getComputedStyle(el).getPropertyValue('--v-overlay-anchor-origin').split(' ');
|
|
@@ -8408,7 +8428,7 @@
|
|
|
8408
8428
|
return contentBox;
|
|
8409
8429
|
}
|
|
8410
8430
|
function connectedLocationStrategy(data, props, contentStyles) {
|
|
8411
|
-
const activatorFixed = isFixedPosition(data.
|
|
8431
|
+
const activatorFixed = Array.isArray(data.target.value) || isFixedPosition(data.target.value);
|
|
8412
8432
|
if (activatorFixed) {
|
|
8413
8433
|
Object.assign(contentStyles.value, {
|
|
8414
8434
|
position: 'fixed',
|
|
@@ -8457,11 +8477,11 @@
|
|
|
8457
8477
|
const observer = new ResizeObserver(() => {
|
|
8458
8478
|
if (observe) updateLocation();
|
|
8459
8479
|
});
|
|
8460
|
-
vue.watch([data.
|
|
8461
|
-
let [
|
|
8462
|
-
let [
|
|
8463
|
-
if (
|
|
8464
|
-
if (
|
|
8480
|
+
vue.watch([data.target, data.contentEl], (_ref, _ref2) => {
|
|
8481
|
+
let [newTarget, newContentEl] = _ref;
|
|
8482
|
+
let [oldTarget, oldContentEl] = _ref2;
|
|
8483
|
+
if (oldTarget && !Array.isArray(oldTarget)) observer.unobserve(oldTarget);
|
|
8484
|
+
if (newTarget && !Array.isArray(newTarget)) observer.observe(newTarget);
|
|
8465
8485
|
if (oldContentEl) observer.unobserve(oldContentEl);
|
|
8466
8486
|
if (newContentEl) observer.observe(newContentEl);
|
|
8467
8487
|
}, {
|
|
@@ -8477,8 +8497,8 @@
|
|
|
8477
8497
|
requestAnimationFrame(() => {
|
|
8478
8498
|
requestAnimationFrame(() => observe = true);
|
|
8479
8499
|
});
|
|
8480
|
-
if (!data.
|
|
8481
|
-
const targetBox = data.
|
|
8500
|
+
if (!data.target.value || !data.contentEl.value) return;
|
|
8501
|
+
const targetBox = getTargetBox(data.target.value);
|
|
8482
8502
|
const contentBox = getIntrinsicSize(data.contentEl.value, data.isRtl.value);
|
|
8483
8503
|
const scrollParents = getScrollParents(data.contentEl.value);
|
|
8484
8504
|
const viewportMargin = 12;
|
|
@@ -8765,11 +8785,11 @@
|
|
|
8765
8785
|
function onScroll(e) {
|
|
8766
8786
|
data.isActive.value = false;
|
|
8767
8787
|
}
|
|
8768
|
-
bindScroll(data.
|
|
8788
|
+
bindScroll(data.targetEl.value ?? data.contentEl.value, onScroll);
|
|
8769
8789
|
}
|
|
8770
8790
|
function blockScrollStrategy(data, props) {
|
|
8771
8791
|
const offsetParent = data.root.value?.offsetParent;
|
|
8772
|
-
const scrollElements = [...new Set([...getScrollParents(data.
|
|
8792
|
+
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'));
|
|
8773
8793
|
const scrollbarWidth = window.innerWidth - document.documentElement.offsetWidth;
|
|
8774
8794
|
const scrollableParent = (el => hasScrollbar(el) && el)(offsetParent || document.documentElement);
|
|
8775
8795
|
if (scrollableParent) {
|
|
@@ -8813,7 +8833,7 @@
|
|
|
8813
8833
|
}
|
|
8814
8834
|
ric = (typeof requestIdleCallback === 'undefined' ? cb => cb() : requestIdleCallback)(() => {
|
|
8815
8835
|
scope.run(() => {
|
|
8816
|
-
bindScroll(data.
|
|
8836
|
+
bindScroll(data.targetEl.value ?? data.contentEl.value, e => {
|
|
8817
8837
|
if (slow) {
|
|
8818
8838
|
// If the position calculation is slow,
|
|
8819
8839
|
// defer updates until scrolling is finished.
|
|
@@ -8894,6 +8914,7 @@
|
|
|
8894
8914
|
// Types
|
|
8895
8915
|
|
|
8896
8916
|
const makeActivatorProps = propsFactory({
|
|
8917
|
+
target: [String, Object],
|
|
8897
8918
|
activator: [String, Object],
|
|
8898
8919
|
activatorProps: {
|
|
8899
8920
|
type: Object,
|
|
@@ -8916,6 +8937,7 @@
|
|
|
8916
8937
|
isActive,
|
|
8917
8938
|
isTop
|
|
8918
8939
|
} = _ref;
|
|
8940
|
+
const vm = getCurrentInstance('useActivator');
|
|
8919
8941
|
const activatorEl = vue.ref();
|
|
8920
8942
|
let isHovered = false;
|
|
8921
8943
|
let isFocused = false;
|
|
@@ -8933,10 +8955,14 @@
|
|
|
8933
8955
|
isActive.value = value;
|
|
8934
8956
|
}
|
|
8935
8957
|
});
|
|
8958
|
+
const cursorTarget = vue.ref();
|
|
8936
8959
|
const availableEvents = {
|
|
8937
8960
|
onClick: e => {
|
|
8938
8961
|
e.stopPropagation();
|
|
8939
8962
|
activatorEl.value = e.currentTarget || e.target;
|
|
8963
|
+
if (!isActive.value) {
|
|
8964
|
+
cursorTarget.value = [e.clientX, e.clientY];
|
|
8965
|
+
}
|
|
8940
8966
|
isActive.value = !isActive.value;
|
|
8941
8967
|
},
|
|
8942
8968
|
onMouseenter: e => {
|
|
@@ -9030,6 +9056,15 @@
|
|
|
9030
9056
|
isActive.value = false;
|
|
9031
9057
|
}
|
|
9032
9058
|
});
|
|
9059
|
+
vue.watch(isActive, val => {
|
|
9060
|
+
if (!val) {
|
|
9061
|
+
setTimeout(() => {
|
|
9062
|
+
cursorTarget.value = undefined;
|
|
9063
|
+
});
|
|
9064
|
+
}
|
|
9065
|
+
}, {
|
|
9066
|
+
flush: 'post'
|
|
9067
|
+
});
|
|
9033
9068
|
const activatorRef = vue.ref();
|
|
9034
9069
|
vue.watchEffect(() => {
|
|
9035
9070
|
if (!activatorRef.value) return;
|
|
@@ -9037,7 +9072,15 @@
|
|
|
9037
9072
|
activatorEl.value = refElement(activatorRef.value);
|
|
9038
9073
|
});
|
|
9039
9074
|
});
|
|
9040
|
-
const
|
|
9075
|
+
const targetRef = vue.ref();
|
|
9076
|
+
const target = vue.computed(() => {
|
|
9077
|
+
if (props.target === 'cursor' && cursorTarget.value) return cursorTarget.value;
|
|
9078
|
+
if (targetRef.value) return refElement(targetRef.value);
|
|
9079
|
+
return getTarget(props.target, vm) || activatorEl.value;
|
|
9080
|
+
});
|
|
9081
|
+
const targetEl = vue.computed(() => {
|
|
9082
|
+
return Array.isArray(target.value) ? undefined : target.value;
|
|
9083
|
+
});
|
|
9041
9084
|
let scope;
|
|
9042
9085
|
vue.watch(() => !!props.activator, val => {
|
|
9043
9086
|
if (val && IN_BROWSER) {
|
|
@@ -9061,6 +9104,9 @@
|
|
|
9061
9104
|
return {
|
|
9062
9105
|
activatorEl,
|
|
9063
9106
|
activatorRef,
|
|
9107
|
+
target,
|
|
9108
|
+
targetEl,
|
|
9109
|
+
targetRef,
|
|
9064
9110
|
activatorEvents,
|
|
9065
9111
|
contentEvents,
|
|
9066
9112
|
scrimEvents
|
|
@@ -9102,31 +9148,34 @@
|
|
|
9102
9148
|
}
|
|
9103
9149
|
function getActivator() {
|
|
9104
9150
|
let selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : props.activator;
|
|
9105
|
-
|
|
9106
|
-
if (selector) {
|
|
9107
|
-
if (selector === 'parent') {
|
|
9108
|
-
let el = vm?.proxy?.$el?.parentNode;
|
|
9109
|
-
while (el.hasAttribute('data-no-activator')) {
|
|
9110
|
-
el = el.parentNode;
|
|
9111
|
-
}
|
|
9112
|
-
activator = el;
|
|
9113
|
-
} else if (typeof selector === 'string') {
|
|
9114
|
-
// Selector
|
|
9115
|
-
activator = document.querySelector(selector);
|
|
9116
|
-
} else if ('$el' in selector) {
|
|
9117
|
-
// Component (ref)
|
|
9118
|
-
activator = selector.$el;
|
|
9119
|
-
} else {
|
|
9120
|
-
// HTMLElement | Element
|
|
9121
|
-
activator = selector;
|
|
9122
|
-
}
|
|
9123
|
-
}
|
|
9151
|
+
const activator = getTarget(selector, vm);
|
|
9124
9152
|
|
|
9125
9153
|
// The activator should only be a valid element (Ignore comments and text nodes)
|
|
9126
|
-
activatorEl.value = activator?.nodeType === Node.ELEMENT_NODE ? activator :
|
|
9154
|
+
activatorEl.value = activator?.nodeType === Node.ELEMENT_NODE ? activator : undefined;
|
|
9127
9155
|
return activatorEl.value;
|
|
9128
9156
|
}
|
|
9129
9157
|
}
|
|
9158
|
+
function getTarget(selector, vm) {
|
|
9159
|
+
if (!selector) return;
|
|
9160
|
+
let target;
|
|
9161
|
+
if (selector === 'parent') {
|
|
9162
|
+
let el = vm?.proxy?.$el?.parentNode;
|
|
9163
|
+
while (el.hasAttribute('data-no-activator')) {
|
|
9164
|
+
el = el.parentNode;
|
|
9165
|
+
}
|
|
9166
|
+
target = el;
|
|
9167
|
+
} else if (typeof selector === 'string') {
|
|
9168
|
+
// Selector
|
|
9169
|
+
target = document.querySelector(selector);
|
|
9170
|
+
} else if ('$el' in selector) {
|
|
9171
|
+
// Component (ref)
|
|
9172
|
+
target = selector.$el;
|
|
9173
|
+
} else {
|
|
9174
|
+
// HTMLElement | Element | [x, y]
|
|
9175
|
+
target = selector;
|
|
9176
|
+
}
|
|
9177
|
+
return target;
|
|
9178
|
+
}
|
|
9130
9179
|
|
|
9131
9180
|
// Utilities
|
|
9132
9181
|
|
|
@@ -9570,6 +9619,9 @@
|
|
|
9570
9619
|
const {
|
|
9571
9620
|
activatorEl,
|
|
9572
9621
|
activatorRef,
|
|
9622
|
+
target,
|
|
9623
|
+
targetEl,
|
|
9624
|
+
targetRef,
|
|
9573
9625
|
activatorEvents,
|
|
9574
9626
|
contentEvents,
|
|
9575
9627
|
scrimEvents
|
|
@@ -9595,13 +9647,13 @@
|
|
|
9595
9647
|
} = useLocationStrategies(props, {
|
|
9596
9648
|
isRtl,
|
|
9597
9649
|
contentEl,
|
|
9598
|
-
|
|
9650
|
+
target,
|
|
9599
9651
|
isActive
|
|
9600
9652
|
});
|
|
9601
9653
|
useScrollStrategies(props, {
|
|
9602
9654
|
root,
|
|
9603
9655
|
contentEl,
|
|
9604
|
-
|
|
9656
|
+
targetEl,
|
|
9605
9657
|
isActive,
|
|
9606
9658
|
updateLocation
|
|
9607
9659
|
});
|
|
@@ -9669,7 +9721,8 @@
|
|
|
9669
9721
|
useRender(() => vue.createVNode(vue.Fragment, null, [slots.activator?.({
|
|
9670
9722
|
isActive: isActive.value,
|
|
9671
9723
|
props: vue.mergeProps({
|
|
9672
|
-
ref: activatorRef
|
|
9724
|
+
ref: activatorRef,
|
|
9725
|
+
targetRef
|
|
9673
9726
|
}, activatorEvents.value, props.activatorProps)
|
|
9674
9727
|
}), isMounted.value && hasContent.value && vue.createVNode(vue.Teleport, {
|
|
9675
9728
|
"disabled": !teleportTarget.value,
|
|
@@ -9692,7 +9745,7 @@
|
|
|
9692
9745
|
"appear": true,
|
|
9693
9746
|
"persisted": true,
|
|
9694
9747
|
"transition": props.transition,
|
|
9695
|
-
"target":
|
|
9748
|
+
"target": target.value,
|
|
9696
9749
|
"onAfterLeave": () => {
|
|
9697
9750
|
onAfterLeave();
|
|
9698
9751
|
emit('afterLeave');
|
|
@@ -9713,6 +9766,7 @@
|
|
|
9713
9766
|
})]));
|
|
9714
9767
|
return {
|
|
9715
9768
|
activatorEl,
|
|
9769
|
+
target,
|
|
9716
9770
|
animateClick,
|
|
9717
9771
|
contentEl,
|
|
9718
9772
|
globalTop,
|
|
@@ -20383,7 +20437,7 @@
|
|
|
20383
20437
|
date
|
|
20384
20438
|
};
|
|
20385
20439
|
}
|
|
20386
|
-
const version$1 = "3.3.12-dev.2023-08-
|
|
20440
|
+
const version$1 = "3.3.12-dev.2023-08-17";
|
|
20387
20441
|
createVuetify$1.version = version$1;
|
|
20388
20442
|
|
|
20389
20443
|
// Vue's inject() can only be used in setup
|
|
@@ -20408,7 +20462,7 @@
|
|
|
20408
20462
|
...options
|
|
20409
20463
|
});
|
|
20410
20464
|
};
|
|
20411
|
-
const version = "3.3.12-dev.2023-08-
|
|
20465
|
+
const version = "3.3.12-dev.2023-08-17";
|
|
20412
20466
|
createVuetify.version = version;
|
|
20413
20467
|
|
|
20414
20468
|
exports.components = components;
|