@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.esm.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
|
*/
|
|
@@ -158,7 +158,15 @@ function isObject(obj) {
|
|
|
158
158
|
return obj !== null && typeof obj === 'object' && !Array.isArray(obj);
|
|
159
159
|
}
|
|
160
160
|
function refElement(obj) {
|
|
161
|
-
|
|
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;
|
|
162
170
|
}
|
|
163
171
|
|
|
164
172
|
// KeyboardEvent.keyCode aliases
|
|
@@ -543,6 +551,18 @@ function getOverflow(a, b) {
|
|
|
543
551
|
}
|
|
544
552
|
};
|
|
545
553
|
}
|
|
554
|
+
function getTargetBox(target) {
|
|
555
|
+
if (Array.isArray(target)) {
|
|
556
|
+
return new Box({
|
|
557
|
+
x: target[0],
|
|
558
|
+
y: target[1],
|
|
559
|
+
width: 0,
|
|
560
|
+
height: 0
|
|
561
|
+
});
|
|
562
|
+
} else {
|
|
563
|
+
return target.getBoundingClientRect();
|
|
564
|
+
}
|
|
565
|
+
}
|
|
546
566
|
|
|
547
567
|
// Utilities
|
|
548
568
|
|
|
@@ -2616,7 +2636,7 @@ function ExpandTransitionGenerator () {
|
|
|
2616
2636
|
// Types
|
|
2617
2637
|
|
|
2618
2638
|
const makeVDialogTransitionProps = propsFactory({
|
|
2619
|
-
target: Object
|
|
2639
|
+
target: [Object, Array]
|
|
2620
2640
|
}, 'v-dialog-transition');
|
|
2621
2641
|
const VDialogTransition = genericComponent()({
|
|
2622
2642
|
name: 'VDialogTransition',
|
|
@@ -2718,7 +2738,7 @@ function getChildren(el) {
|
|
|
2718
2738
|
return els && [...els];
|
|
2719
2739
|
}
|
|
2720
2740
|
function getDimensions(target, el) {
|
|
2721
|
-
const targetBox = target
|
|
2741
|
+
const targetBox = getTargetBox(target);
|
|
2722
2742
|
const elBox = nullifyTransforms(el);
|
|
2723
2743
|
const [originX, originY] = getComputedStyle(el).transformOrigin.split(' ').map(v => parseFloat(v));
|
|
2724
2744
|
const [anchorSide, anchorOffset] = getComputedStyle(el).getPropertyValue('--v-overlay-anchor-origin').split(' ');
|
|
@@ -8404,7 +8424,7 @@ function getIntrinsicSize(el, isRtl) {
|
|
|
8404
8424
|
return contentBox;
|
|
8405
8425
|
}
|
|
8406
8426
|
function connectedLocationStrategy(data, props, contentStyles) {
|
|
8407
|
-
const activatorFixed = isFixedPosition(data.
|
|
8427
|
+
const activatorFixed = Array.isArray(data.target.value) || isFixedPosition(data.target.value);
|
|
8408
8428
|
if (activatorFixed) {
|
|
8409
8429
|
Object.assign(contentStyles.value, {
|
|
8410
8430
|
position: 'fixed',
|
|
@@ -8453,11 +8473,11 @@ function connectedLocationStrategy(data, props, contentStyles) {
|
|
|
8453
8473
|
const observer = new ResizeObserver(() => {
|
|
8454
8474
|
if (observe) updateLocation();
|
|
8455
8475
|
});
|
|
8456
|
-
watch([data.
|
|
8457
|
-
let [
|
|
8458
|
-
let [
|
|
8459
|
-
if (
|
|
8460
|
-
if (
|
|
8476
|
+
watch([data.target, data.contentEl], (_ref, _ref2) => {
|
|
8477
|
+
let [newTarget, newContentEl] = _ref;
|
|
8478
|
+
let [oldTarget, oldContentEl] = _ref2;
|
|
8479
|
+
if (oldTarget && !Array.isArray(oldTarget)) observer.unobserve(oldTarget);
|
|
8480
|
+
if (newTarget && !Array.isArray(newTarget)) observer.observe(newTarget);
|
|
8461
8481
|
if (oldContentEl) observer.unobserve(oldContentEl);
|
|
8462
8482
|
if (newContentEl) observer.observe(newContentEl);
|
|
8463
8483
|
}, {
|
|
@@ -8473,8 +8493,8 @@ function connectedLocationStrategy(data, props, contentStyles) {
|
|
|
8473
8493
|
requestAnimationFrame(() => {
|
|
8474
8494
|
requestAnimationFrame(() => observe = true);
|
|
8475
8495
|
});
|
|
8476
|
-
if (!data.
|
|
8477
|
-
const targetBox = data.
|
|
8496
|
+
if (!data.target.value || !data.contentEl.value) return;
|
|
8497
|
+
const targetBox = getTargetBox(data.target.value);
|
|
8478
8498
|
const contentBox = getIntrinsicSize(data.contentEl.value, data.isRtl.value);
|
|
8479
8499
|
const scrollParents = getScrollParents(data.contentEl.value);
|
|
8480
8500
|
const viewportMargin = 12;
|
|
@@ -8761,11 +8781,11 @@ function closeScrollStrategy(data) {
|
|
|
8761
8781
|
function onScroll(e) {
|
|
8762
8782
|
data.isActive.value = false;
|
|
8763
8783
|
}
|
|
8764
|
-
bindScroll(data.
|
|
8784
|
+
bindScroll(data.targetEl.value ?? data.contentEl.value, onScroll);
|
|
8765
8785
|
}
|
|
8766
8786
|
function blockScrollStrategy(data, props) {
|
|
8767
8787
|
const offsetParent = data.root.value?.offsetParent;
|
|
8768
|
-
const scrollElements = [...new Set([...getScrollParents(data.
|
|
8788
|
+
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'));
|
|
8769
8789
|
const scrollbarWidth = window.innerWidth - document.documentElement.offsetWidth;
|
|
8770
8790
|
const scrollableParent = (el => hasScrollbar(el) && el)(offsetParent || document.documentElement);
|
|
8771
8791
|
if (scrollableParent) {
|
|
@@ -8809,7 +8829,7 @@ function repositionScrollStrategy(data, props, scope) {
|
|
|
8809
8829
|
}
|
|
8810
8830
|
ric = (typeof requestIdleCallback === 'undefined' ? cb => cb() : requestIdleCallback)(() => {
|
|
8811
8831
|
scope.run(() => {
|
|
8812
|
-
bindScroll(data.
|
|
8832
|
+
bindScroll(data.targetEl.value ?? data.contentEl.value, e => {
|
|
8813
8833
|
if (slow) {
|
|
8814
8834
|
// If the position calculation is slow,
|
|
8815
8835
|
// defer updates until scrolling is finished.
|
|
@@ -8890,6 +8910,7 @@ function useDelay(props, cb) {
|
|
|
8890
8910
|
// Types
|
|
8891
8911
|
|
|
8892
8912
|
const makeActivatorProps = propsFactory({
|
|
8913
|
+
target: [String, Object],
|
|
8893
8914
|
activator: [String, Object],
|
|
8894
8915
|
activatorProps: {
|
|
8895
8916
|
type: Object,
|
|
@@ -8912,6 +8933,7 @@ function useActivator(props, _ref) {
|
|
|
8912
8933
|
isActive,
|
|
8913
8934
|
isTop
|
|
8914
8935
|
} = _ref;
|
|
8936
|
+
const vm = getCurrentInstance('useActivator');
|
|
8915
8937
|
const activatorEl = ref();
|
|
8916
8938
|
let isHovered = false;
|
|
8917
8939
|
let isFocused = false;
|
|
@@ -8929,10 +8951,14 @@ function useActivator(props, _ref) {
|
|
|
8929
8951
|
isActive.value = value;
|
|
8930
8952
|
}
|
|
8931
8953
|
});
|
|
8954
|
+
const cursorTarget = ref();
|
|
8932
8955
|
const availableEvents = {
|
|
8933
8956
|
onClick: e => {
|
|
8934
8957
|
e.stopPropagation();
|
|
8935
8958
|
activatorEl.value = e.currentTarget || e.target;
|
|
8959
|
+
if (!isActive.value) {
|
|
8960
|
+
cursorTarget.value = [e.clientX, e.clientY];
|
|
8961
|
+
}
|
|
8936
8962
|
isActive.value = !isActive.value;
|
|
8937
8963
|
},
|
|
8938
8964
|
onMouseenter: e => {
|
|
@@ -9026,6 +9052,15 @@ function useActivator(props, _ref) {
|
|
|
9026
9052
|
isActive.value = false;
|
|
9027
9053
|
}
|
|
9028
9054
|
});
|
|
9055
|
+
watch(isActive, val => {
|
|
9056
|
+
if (!val) {
|
|
9057
|
+
setTimeout(() => {
|
|
9058
|
+
cursorTarget.value = undefined;
|
|
9059
|
+
});
|
|
9060
|
+
}
|
|
9061
|
+
}, {
|
|
9062
|
+
flush: 'post'
|
|
9063
|
+
});
|
|
9029
9064
|
const activatorRef = ref();
|
|
9030
9065
|
watchEffect(() => {
|
|
9031
9066
|
if (!activatorRef.value) return;
|
|
@@ -9033,7 +9068,15 @@ function useActivator(props, _ref) {
|
|
|
9033
9068
|
activatorEl.value = refElement(activatorRef.value);
|
|
9034
9069
|
});
|
|
9035
9070
|
});
|
|
9036
|
-
const
|
|
9071
|
+
const targetRef = ref();
|
|
9072
|
+
const target = computed(() => {
|
|
9073
|
+
if (props.target === 'cursor' && cursorTarget.value) return cursorTarget.value;
|
|
9074
|
+
if (targetRef.value) return refElement(targetRef.value);
|
|
9075
|
+
return getTarget(props.target, vm) || activatorEl.value;
|
|
9076
|
+
});
|
|
9077
|
+
const targetEl = computed(() => {
|
|
9078
|
+
return Array.isArray(target.value) ? undefined : target.value;
|
|
9079
|
+
});
|
|
9037
9080
|
let scope;
|
|
9038
9081
|
watch(() => !!props.activator, val => {
|
|
9039
9082
|
if (val && IN_BROWSER) {
|
|
@@ -9057,6 +9100,9 @@ function useActivator(props, _ref) {
|
|
|
9057
9100
|
return {
|
|
9058
9101
|
activatorEl,
|
|
9059
9102
|
activatorRef,
|
|
9103
|
+
target,
|
|
9104
|
+
targetEl,
|
|
9105
|
+
targetRef,
|
|
9060
9106
|
activatorEvents,
|
|
9061
9107
|
contentEvents,
|
|
9062
9108
|
scrimEvents
|
|
@@ -9098,31 +9144,34 @@ function _useActivator(props, vm, _ref2) {
|
|
|
9098
9144
|
}
|
|
9099
9145
|
function getActivator() {
|
|
9100
9146
|
let selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : props.activator;
|
|
9101
|
-
|
|
9102
|
-
if (selector) {
|
|
9103
|
-
if (selector === 'parent') {
|
|
9104
|
-
let el = vm?.proxy?.$el?.parentNode;
|
|
9105
|
-
while (el.hasAttribute('data-no-activator')) {
|
|
9106
|
-
el = el.parentNode;
|
|
9107
|
-
}
|
|
9108
|
-
activator = el;
|
|
9109
|
-
} else if (typeof selector === 'string') {
|
|
9110
|
-
// Selector
|
|
9111
|
-
activator = document.querySelector(selector);
|
|
9112
|
-
} else if ('$el' in selector) {
|
|
9113
|
-
// Component (ref)
|
|
9114
|
-
activator = selector.$el;
|
|
9115
|
-
} else {
|
|
9116
|
-
// HTMLElement | Element
|
|
9117
|
-
activator = selector;
|
|
9118
|
-
}
|
|
9119
|
-
}
|
|
9147
|
+
const activator = getTarget(selector, vm);
|
|
9120
9148
|
|
|
9121
9149
|
// The activator should only be a valid element (Ignore comments and text nodes)
|
|
9122
|
-
activatorEl.value = activator?.nodeType === Node.ELEMENT_NODE ? activator :
|
|
9150
|
+
activatorEl.value = activator?.nodeType === Node.ELEMENT_NODE ? activator : undefined;
|
|
9123
9151
|
return activatorEl.value;
|
|
9124
9152
|
}
|
|
9125
9153
|
}
|
|
9154
|
+
function getTarget(selector, vm) {
|
|
9155
|
+
if (!selector) return;
|
|
9156
|
+
let target;
|
|
9157
|
+
if (selector === 'parent') {
|
|
9158
|
+
let el = vm?.proxy?.$el?.parentNode;
|
|
9159
|
+
while (el.hasAttribute('data-no-activator')) {
|
|
9160
|
+
el = el.parentNode;
|
|
9161
|
+
}
|
|
9162
|
+
target = el;
|
|
9163
|
+
} else if (typeof selector === 'string') {
|
|
9164
|
+
// Selector
|
|
9165
|
+
target = document.querySelector(selector);
|
|
9166
|
+
} else if ('$el' in selector) {
|
|
9167
|
+
// Component (ref)
|
|
9168
|
+
target = selector.$el;
|
|
9169
|
+
} else {
|
|
9170
|
+
// HTMLElement | Element | [x, y]
|
|
9171
|
+
target = selector;
|
|
9172
|
+
}
|
|
9173
|
+
return target;
|
|
9174
|
+
}
|
|
9126
9175
|
|
|
9127
9176
|
// Utilities
|
|
9128
9177
|
|
|
@@ -9566,6 +9615,9 @@ const VOverlay = genericComponent()({
|
|
|
9566
9615
|
const {
|
|
9567
9616
|
activatorEl,
|
|
9568
9617
|
activatorRef,
|
|
9618
|
+
target,
|
|
9619
|
+
targetEl,
|
|
9620
|
+
targetRef,
|
|
9569
9621
|
activatorEvents,
|
|
9570
9622
|
contentEvents,
|
|
9571
9623
|
scrimEvents
|
|
@@ -9591,13 +9643,13 @@ const VOverlay = genericComponent()({
|
|
|
9591
9643
|
} = useLocationStrategies(props, {
|
|
9592
9644
|
isRtl,
|
|
9593
9645
|
contentEl,
|
|
9594
|
-
|
|
9646
|
+
target,
|
|
9595
9647
|
isActive
|
|
9596
9648
|
});
|
|
9597
9649
|
useScrollStrategies(props, {
|
|
9598
9650
|
root,
|
|
9599
9651
|
contentEl,
|
|
9600
|
-
|
|
9652
|
+
targetEl,
|
|
9601
9653
|
isActive,
|
|
9602
9654
|
updateLocation
|
|
9603
9655
|
});
|
|
@@ -9665,7 +9717,8 @@ const VOverlay = genericComponent()({
|
|
|
9665
9717
|
useRender(() => createVNode(Fragment, null, [slots.activator?.({
|
|
9666
9718
|
isActive: isActive.value,
|
|
9667
9719
|
props: mergeProps({
|
|
9668
|
-
ref: activatorRef
|
|
9720
|
+
ref: activatorRef,
|
|
9721
|
+
targetRef
|
|
9669
9722
|
}, activatorEvents.value, props.activatorProps)
|
|
9670
9723
|
}), isMounted.value && hasContent.value && createVNode(Teleport, {
|
|
9671
9724
|
"disabled": !teleportTarget.value,
|
|
@@ -9688,7 +9741,7 @@ const VOverlay = genericComponent()({
|
|
|
9688
9741
|
"appear": true,
|
|
9689
9742
|
"persisted": true,
|
|
9690
9743
|
"transition": props.transition,
|
|
9691
|
-
"target":
|
|
9744
|
+
"target": target.value,
|
|
9692
9745
|
"onAfterLeave": () => {
|
|
9693
9746
|
onAfterLeave();
|
|
9694
9747
|
emit('afterLeave');
|
|
@@ -9709,6 +9762,7 @@ const VOverlay = genericComponent()({
|
|
|
9709
9762
|
})]));
|
|
9710
9763
|
return {
|
|
9711
9764
|
activatorEl,
|
|
9765
|
+
target,
|
|
9712
9766
|
animateClick,
|
|
9713
9767
|
contentEl,
|
|
9714
9768
|
globalTop,
|
|
@@ -20379,7 +20433,7 @@ function createVuetify$1() {
|
|
|
20379
20433
|
date
|
|
20380
20434
|
};
|
|
20381
20435
|
}
|
|
20382
|
-
const version$1 = "3.3.12-dev.2023-08-
|
|
20436
|
+
const version$1 = "3.3.12-dev.2023-08-17";
|
|
20383
20437
|
createVuetify$1.version = version$1;
|
|
20384
20438
|
|
|
20385
20439
|
// Vue's inject() can only be used in setup
|
|
@@ -20404,7 +20458,7 @@ const createVuetify = function () {
|
|
|
20404
20458
|
...options
|
|
20405
20459
|
});
|
|
20406
20460
|
};
|
|
20407
|
-
const version = "3.3.12-dev.2023-08-
|
|
20461
|
+
const version = "3.3.12-dev.2023-08-17";
|
|
20408
20462
|
createVuetify.version = version;
|
|
20409
20463
|
|
|
20410
20464
|
export { components, createVuetify, directives, useDefaults, useDisplay, useLayout, useLocale, useRtl, useTheme, version };
|