@vuetify/nightly 3.9.2-master.2025-07-24 → 3.9.2-master.2025-07-25
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 +7 -3
- package/dist/_component-variables-labs.sass +1 -0
- package/dist/json/attributes.json +4100 -3952
- package/dist/json/importMap-labs.json +30 -18
- package/dist/json/importMap.json +162 -162
- package/dist/json/tags.json +52 -0
- package/dist/json/web-types.json +7540 -7045
- package/dist/vuetify-labs.cjs +781 -118
- package/dist/vuetify-labs.css +4416 -4309
- package/dist/vuetify-labs.d.ts +1078 -63
- package/dist/vuetify-labs.esm.js +782 -119
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +781 -118
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +40 -28
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +5492 -5492
- package/dist/vuetify.d.ts +67 -62
- package/dist/vuetify.esm.js +40 -28
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +40 -28
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +936 -938
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VOverlay/locationStrategies.js +16 -10
- package/lib/components/VOverlay/locationStrategies.js.map +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/index.js.map +1 -1
- package/lib/composables/goto.d.ts +3 -2
- package/lib/composables/goto.js +2 -16
- package/lib/composables/goto.js.map +1 -1
- package/lib/composables/reveal.d.ts +36 -0
- package/lib/composables/reveal.js +30 -0
- package/lib/composables/reveal.js.map +1 -0
- package/lib/entry-bundler.js +1 -1
- package/lib/framework.d.ts +151 -146
- package/lib/framework.js +1 -1
- package/lib/labs/VPie/VPie.css +105 -0
- package/lib/labs/VPie/VPie.d.ts +891 -0
- package/lib/labs/VPie/VPie.js +291 -0
- package/lib/labs/VPie/VPie.js.map +1 -0
- package/lib/labs/VPie/VPie.sass +109 -0
- package/lib/labs/VPie/VPieSegment.d.ts +310 -0
- package/lib/labs/VPie/VPieSegment.js +103 -0
- package/lib/labs/VPie/VPieSegment.js.map +1 -0
- package/lib/labs/VPie/VPieTooltip.d.ts +279 -0
- package/lib/labs/VPie/VPieTooltip.js +84 -0
- package/lib/labs/VPie/VPieTooltip.js.map +1 -0
- package/lib/labs/VPie/_variables.scss +11 -0
- package/lib/labs/VPie/index.d.ts +3 -0
- package/lib/labs/VPie/index.js +4 -0
- package/lib/labs/VPie/index.js.map +1 -0
- package/lib/labs/VPie/types.d.ts +16 -0
- package/lib/labs/VPie/types.js +2 -0
- package/lib/labs/VPie/types.js.map +1 -0
- package/lib/labs/VPie/utils.d.ts +23 -0
- package/lib/labs/VPie/utils.js +49 -0
- package/lib/labs/VPie/utils.js.map +1 -0
- package/lib/labs/VVideo/VVideo.css +3 -0
- package/lib/labs/VVideo/VVideo.sass +3 -0
- package/lib/labs/VVideo/VVideoControls.js +9 -5
- package/lib/labs/VVideo/VVideoControls.js.map +1 -1
- package/lib/labs/VVideo/VVideoVolume.js +7 -3
- package/lib/labs/VVideo/VVideoVolume.js.map +1 -1
- package/lib/labs/components.d.ts +1 -0
- package/lib/labs/components.js +1 -0
- package/lib/labs/components.js.map +1 -1
- package/lib/util/easing.d.ts +22 -0
- package/lib/util/easing.js +53 -0
- package/lib/util/easing.js.map +1 -1
- package/lib/util/svg-arc-corners.d.ts +4 -0
- package/lib/util/svg-arc-corners.js +73 -0
- package/lib/util/svg-arc-corners.js.map +1 -0
- package/package.json +1 -1
package/dist/vuetify-labs.esm.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
/*!
|
2
|
-
* Vuetify v3.9.2-master.2025-07-
|
2
|
+
* Vuetify v3.9.2-master.2025-07-25
|
3
3
|
* Forged by John Leider
|
4
4
|
* Released under the MIT License.
|
5
5
|
*/
|
6
6
|
|
7
|
-
import { shallowRef, reactive, watchEffect, toRef, capitalize, unref, Fragment, camelize, isVNode, Comment, warn, getCurrentInstance as getCurrentInstance$1, ref, computed, provide, inject as inject$1, defineComponent as defineComponent$1, h,
|
7
|
+
import { shallowRef, reactive, watchEffect, toRef, capitalize, unref, Fragment, camelize, isVNode, Comment, warn, getCurrentInstance as getCurrentInstance$1, ref, computed, provide, inject as inject$1, defineComponent as defineComponent$1, h, toValue, watch, onBeforeUnmount, readonly, onMounted, useId, onDeactivated, onActivated, onScopeDispose, effectScope, toRaw, getCurrentScope, createElementVNode, normalizeStyle, normalizeClass, createVNode, TransitionGroup, Transition, mergeProps, toRefs, isRef, onBeforeMount, nextTick, withDirectives, vShow, onUpdated, Text, resolveDynamicComponent, toDisplayString, markRaw, Teleport, cloneVNode, createTextVNode, normalizeProps, guardReactiveProps, onUnmounted, onBeforeUpdate, withModifiers, vModelText, resolveComponent, render } from 'vue';
|
8
8
|
|
9
9
|
// Types
|
10
10
|
// eslint-disable-line vue/prefer-import-from-vue
|
@@ -1562,10 +1562,64 @@ function attachedRoot(node) {
|
|
1562
1562
|
return root;
|
1563
1563
|
}
|
1564
1564
|
|
1565
|
+
// Utilities
|
1566
|
+
|
1567
|
+
// Types
|
1568
|
+
|
1565
1569
|
const standardEasing = 'cubic-bezier(0.4, 0, 0.2, 1)';
|
1566
1570
|
const deceleratedEasing = 'cubic-bezier(0.0, 0, 0.2, 1)'; // Entering
|
1567
1571
|
const acceleratedEasing = 'cubic-bezier(0.4, 0, 1, 1)'; // Leaving
|
1568
1572
|
|
1573
|
+
const easingPatterns = {
|
1574
|
+
linear: t => t,
|
1575
|
+
easeInQuad: t => t ** 2,
|
1576
|
+
easeOutQuad: t => t * (2 - t),
|
1577
|
+
easeInOutQuad: t => t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t,
|
1578
|
+
easeInCubic: t => t ** 3,
|
1579
|
+
easeOutCubic: t => --t ** 3 + 1,
|
1580
|
+
easeInOutCubic: t => t < 0.5 ? 4 * t ** 3 : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1,
|
1581
|
+
easeInQuart: t => t ** 4,
|
1582
|
+
easeOutQuart: t => 1 - --t ** 4,
|
1583
|
+
easeInOutQuart: t => t < 0.5 ? 8 * t ** 4 : 1 - 8 * --t ** 4,
|
1584
|
+
easeInQuint: t => t ** 5,
|
1585
|
+
easeOutQuint: t => 1 + --t ** 5,
|
1586
|
+
easeInOutQuint: t => t < 0.5 ? 16 * t ** 5 : 1 + 16 * --t ** 5
|
1587
|
+
};
|
1588
|
+
function useTransition(source, options) {
|
1589
|
+
const defaultTransition = {
|
1590
|
+
duration: 300,
|
1591
|
+
transition: easingPatterns.easeInOutCubic
|
1592
|
+
};
|
1593
|
+
let raf = -1;
|
1594
|
+
const outputRef = shallowRef(toValue(source));
|
1595
|
+
watch(() => toValue(source), async to => {
|
1596
|
+
cancelAnimationFrame(raf);
|
1597
|
+
const easing = {
|
1598
|
+
...defaultTransition,
|
1599
|
+
...toValue(options)
|
1600
|
+
};
|
1601
|
+
await executeTransition(outputRef, outputRef.value, to, easing);
|
1602
|
+
});
|
1603
|
+
function executeTransition(out, from, to, options) {
|
1604
|
+
const startTime = performance.now();
|
1605
|
+
const ease = options.transition ?? easingPatterns.easeInOutCubic;
|
1606
|
+
return new Promise(resolve => {
|
1607
|
+
raf = requestAnimationFrame(function step(currentTime) {
|
1608
|
+
const timeElapsed = currentTime - startTime;
|
1609
|
+
const progress = timeElapsed / options.duration;
|
1610
|
+
out.value = from + (to - from) * ease(clamp(progress, 0, 1));
|
1611
|
+
if (progress < 1) {
|
1612
|
+
raf = requestAnimationFrame(step);
|
1613
|
+
} else {
|
1614
|
+
out.value = to;
|
1615
|
+
resolve();
|
1616
|
+
}
|
1617
|
+
});
|
1618
|
+
});
|
1619
|
+
}
|
1620
|
+
return computed(() => outputRef.value);
|
1621
|
+
}
|
1622
|
+
|
1569
1623
|
// Utilities
|
1570
1624
|
function getPrefixedEventHandlers(attrs, suffix, getData) {
|
1571
1625
|
return Object.keys(attrs).filter(key => isOn(key) && key.endsWith(suffix)).reduce((acc, key) => {
|
@@ -7689,21 +7743,7 @@ function genDefaults() {
|
|
7689
7743
|
layout: false,
|
7690
7744
|
offset: 0,
|
7691
7745
|
easing: 'easeInOutCubic',
|
7692
|
-
patterns:
|
7693
|
-
linear: t => t,
|
7694
|
-
easeInQuad: t => t ** 2,
|
7695
|
-
easeOutQuad: t => t * (2 - t),
|
7696
|
-
easeInOutQuad: t => t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t,
|
7697
|
-
easeInCubic: t => t ** 3,
|
7698
|
-
easeOutCubic: t => --t ** 3 + 1,
|
7699
|
-
easeInOutCubic: t => t < 0.5 ? 4 * t ** 3 : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1,
|
7700
|
-
easeInQuart: t => t ** 4,
|
7701
|
-
easeOutQuart: t => 1 - --t ** 4,
|
7702
|
-
easeInOutQuart: t => t < 0.5 ? 8 * t ** 4 : 1 - 8 * --t ** 4,
|
7703
|
-
easeInQuint: t => t ** 5,
|
7704
|
-
easeOutQuint: t => 1 + --t ** 5,
|
7705
|
-
easeInOutQuint: t => t < 0.5 ? 16 * t ** 5 : 1 + 16 * --t ** 5
|
7706
|
-
}
|
7746
|
+
patterns: easingPatterns
|
7707
7747
|
};
|
7708
7748
|
}
|
7709
7749
|
function getContainer(el) {
|
@@ -10540,11 +10580,23 @@ function connectedLocationStrategy(data, props, contentStyles) {
|
|
10540
10580
|
const result = updateLocation();
|
10541
10581
|
if (result) flipped.push(result.flipped);
|
10542
10582
|
});
|
10543
|
-
|
10544
|
-
|
10545
|
-
|
10583
|
+
let targetBox = new Box({
|
10584
|
+
x: 0,
|
10585
|
+
y: 0,
|
10586
|
+
width: 0,
|
10587
|
+
height: 0
|
10588
|
+
});
|
10589
|
+
watch(data.target, (newTarget, oldTarget) => {
|
10546
10590
|
if (oldTarget && !Array.isArray(oldTarget)) observer.unobserve(oldTarget);
|
10547
|
-
if (
|
10591
|
+
if (!Array.isArray(newTarget)) {
|
10592
|
+
if (newTarget) observer.observe(newTarget);
|
10593
|
+
} else if (!deepEqual(newTarget, oldTarget)) {
|
10594
|
+
updateLocation();
|
10595
|
+
}
|
10596
|
+
}, {
|
10597
|
+
immediate: true
|
10598
|
+
});
|
10599
|
+
watch(data.contentEl, (newContentEl, oldContentEl) => {
|
10548
10600
|
if (oldContentEl) observer.unobserve(oldContentEl);
|
10549
10601
|
if (newContentEl) observer.observe(newContentEl);
|
10550
10602
|
}, {
|
@@ -10553,12 +10605,6 @@ function connectedLocationStrategy(data, props, contentStyles) {
|
|
10553
10605
|
onScopeDispose(() => {
|
10554
10606
|
observer.disconnect();
|
10555
10607
|
});
|
10556
|
-
let targetBox = new Box({
|
10557
|
-
x: 0,
|
10558
|
-
y: 0,
|
10559
|
-
width: 0,
|
10560
|
-
height: 0
|
10561
|
-
});
|
10562
10608
|
|
10563
10609
|
// eslint-disable-next-line max-statements
|
10564
10610
|
function updateLocation() {
|
@@ -32455,6 +32501,614 @@ const VMaskInput = genericComponent()({
|
|
32455
32501
|
}
|
32456
32502
|
});
|
32457
32503
|
|
32504
|
+
// Utilities
|
32505
|
+
|
32506
|
+
// Types
|
32507
|
+
|
32508
|
+
// Types
|
32509
|
+
|
32510
|
+
// Composables
|
32511
|
+
const makeRevealProps = propsFactory({
|
32512
|
+
reveal: {
|
32513
|
+
type: [Boolean, Object],
|
32514
|
+
default: false
|
32515
|
+
}
|
32516
|
+
}, 'reveal');
|
32517
|
+
function useReveal(props) {
|
32518
|
+
const defaultDuration = 900;
|
32519
|
+
const duration = toRef(() => typeof props.reveal === 'object' ? Math.max(0, Number(props.reveal.duration ?? defaultDuration)) : defaultDuration);
|
32520
|
+
const state = shallowRef(props.reveal ? 'initial' : 'disabled');
|
32521
|
+
onMounted(async () => {
|
32522
|
+
if (props.reveal) {
|
32523
|
+
state.value = 'initial';
|
32524
|
+
await new Promise(resolve => requestAnimationFrame(resolve));
|
32525
|
+
state.value = 'pending';
|
32526
|
+
await new Promise(resolve => setTimeout(resolve, duration.value));
|
32527
|
+
state.value = 'done';
|
32528
|
+
}
|
32529
|
+
});
|
32530
|
+
return {
|
32531
|
+
duration,
|
32532
|
+
state
|
32533
|
+
};
|
32534
|
+
}
|
32535
|
+
|
32536
|
+
/*
|
32537
|
+
* Credits: Alexander Milevski https://github.com/w8r/svg-arc-corners
|
32538
|
+
*/
|
32539
|
+
|
32540
|
+
function pointOnArc(center, radius, angle) {
|
32541
|
+
const radians = (angle - 90) * Math.PI / 180.0;
|
32542
|
+
return [center[0] + radius * Math.cos(radians), center[1] + radius * Math.sin(radians)];
|
32543
|
+
}
|
32544
|
+
function drawCircle(_ref, r, width) {
|
32545
|
+
let [x, y] = _ref;
|
32546
|
+
const innerRadius = r - width;
|
32547
|
+
return ['M', x - r, y, 'A', r, r, 0, 1, 0, x + r, y, 'A', r, r, 0, 1, 0, x - r, y, 'M', x - innerRadius, y, 'A', innerRadius, innerRadius, 0, 1, 0, x + innerRadius, y, 'A', innerRadius, innerRadius, 0, 1, 0, x - innerRadius, y, 'Z'];
|
32548
|
+
}
|
32549
|
+
function simpleArc(center, r, startAngle, endAngle) {
|
32550
|
+
const start = pointOnArc(center, r, startAngle);
|
32551
|
+
const end = pointOnArc(center, r, endAngle);
|
32552
|
+
const sweep = endAngle - startAngle > 180 ? 1 : 0;
|
32553
|
+
return [`M${start[0]} ${start[1]}`, `A${r} ${r} 0 ${sweep} 1 ${end[0]} ${end[1]}`, `L${center[0]} ${center[1]}Z`].join(' ');
|
32554
|
+
}
|
32555
|
+
function roundedArc(center, radius, startAngle, endAngle, width, rounding) {
|
32556
|
+
width = Math.min(radius, width);
|
32557
|
+
if (Math.abs(endAngle - startAngle) === 360) {
|
32558
|
+
return drawCircle(center, radius, width).join(' ');
|
32559
|
+
}
|
32560
|
+
if (rounding === 0 && radius === width) {
|
32561
|
+
return simpleArc(center, radius, startAngle, endAngle);
|
32562
|
+
}
|
32563
|
+
const innerR = radius - width;
|
32564
|
+
const circumference = Math.abs(endAngle - startAngle);
|
32565
|
+
rounding = Math.min(width / 2, rounding);
|
32566
|
+
if (360 * (rounding / (Math.PI * (radius - width))) > Math.abs(startAngle - endAngle)) {
|
32567
|
+
rounding = circumference / 360 * innerR * Math.PI;
|
32568
|
+
}
|
32569
|
+
|
32570
|
+
// inner and outer radiuses
|
32571
|
+
const innerR2 = innerR + rounding;
|
32572
|
+
const outerRadius = radius - rounding;
|
32573
|
+
|
32574
|
+
// butts corner points
|
32575
|
+
const oStart = pointOnArc(center, outerRadius, startAngle);
|
32576
|
+
const oEnd = pointOnArc(center, outerRadius, endAngle);
|
32577
|
+
const iStart = pointOnArc(center, innerR2, startAngle);
|
32578
|
+
const iEnd = pointOnArc(center, innerR2, endAngle);
|
32579
|
+
const iSection = innerR ? 360 * (rounding / (2 * Math.PI * innerR)) : 0;
|
32580
|
+
const oSection = 360 * (rounding / (2 * Math.PI * radius));
|
32581
|
+
|
32582
|
+
// arcs endpoints
|
32583
|
+
const iArcStart = pointOnArc(center, innerR, startAngle + iSection);
|
32584
|
+
const iArcEnd = pointOnArc(center, innerR, endAngle - iSection);
|
32585
|
+
const oArcStart = pointOnArc(center, radius, startAngle + oSection);
|
32586
|
+
const oArcEnd = pointOnArc(center, radius, endAngle - oSection);
|
32587
|
+
const arcSweep1 = circumference > 180 + 2 * oSection ? 1 : 0;
|
32588
|
+
const arcSweep2 = circumference > 180 + 2 * iSection ? 1 : 0;
|
32589
|
+
return [
|
32590
|
+
// begin path
|
32591
|
+
'M', oStart[0], oStart[1],
|
32592
|
+
// outer start corner
|
32593
|
+
'A', rounding, rounding, 0, 0, 1, oArcStart[0], oArcStart[1],
|
32594
|
+
// outer main arc
|
32595
|
+
'A', radius, radius, 0, arcSweep1, 1, oArcEnd[0], oArcEnd[1],
|
32596
|
+
// outer end corner
|
32597
|
+
'A', rounding, rounding, 0, 0, 1, oEnd[0], oEnd[1],
|
32598
|
+
// end butt
|
32599
|
+
'L', iEnd[0], iEnd[1],
|
32600
|
+
// inner end corner
|
32601
|
+
'A', rounding, rounding, 0, 0, 1, iArcEnd[0], iArcEnd[1],
|
32602
|
+
// inner arc
|
32603
|
+
'A', innerR, innerR, 0, arcSweep2, 0, iArcStart[0], iArcStart[1],
|
32604
|
+
// inner start corner
|
32605
|
+
'A', rounding, rounding, 0, 0, 1, iStart[0], iStart[1], 'Z' // end path
|
32606
|
+
].join(' ');
|
32607
|
+
}
|
32608
|
+
|
32609
|
+
// Utilities
|
32610
|
+
|
32611
|
+
// Types
|
32612
|
+
|
32613
|
+
function formatTextTemplate(template, item) {
|
32614
|
+
return item ? template.replaceAll('[title]', item.title).replaceAll('[value]', String(item.value)) : undefined;
|
32615
|
+
}
|
32616
|
+
function usePieArc(props, isHovering) {
|
32617
|
+
const hoverZoomRatio = toRef(() => clamp(Number(props.hoverScale ?? 0), 0, 0.25));
|
32618
|
+
const normalizedValue = toRef(() => clamp(props.value - 100 * Number(props.gap ?? 0) / 360, 0.01, 99.99));
|
32619
|
+
const normalizedInnerCut = toRef(() => {
|
32620
|
+
const min = Number(props.rounded ?? 0) > 0 ? 0.2 : 0;
|
32621
|
+
return clamp(Number(props.innerCut ?? 0) / 100, min, 1);
|
32622
|
+
});
|
32623
|
+
const radians = computed(() => (360 * (-normalizedValue.value / 100) + 90) * (Math.PI / 180));
|
32624
|
+
const arcWidth = computed(() => 50 * (1 - normalizedInnerCut.value) * (isHovering.value ? 1 : 1 - hoverZoomRatio.value));
|
32625
|
+
const outerX = toRef(() => 50 + 50 * Math.cos(radians.value));
|
32626
|
+
const outerY = toRef(() => 50 - 50 * Math.sin(radians.value));
|
32627
|
+
return {
|
32628
|
+
hoverZoomRatio,
|
32629
|
+
normalizedValue,
|
32630
|
+
normalizedInnerCut,
|
32631
|
+
outerX,
|
32632
|
+
outerY,
|
32633
|
+
arcWidth
|
32634
|
+
};
|
32635
|
+
}
|
32636
|
+
function useOuterSlicePath(_ref) {
|
32637
|
+
let {
|
32638
|
+
angle,
|
32639
|
+
radius,
|
32640
|
+
size,
|
32641
|
+
width,
|
32642
|
+
rounded
|
32643
|
+
} = _ref;
|
32644
|
+
return computed(() => roundedArc([50, 50], toValue(radius), toValue(angle), toValue(angle) + 360 * toValue(size) / 100,
|
32645
|
+
// angle end,
|
32646
|
+
toValue(width), toValue(rounded)));
|
32647
|
+
}
|
32648
|
+
function useInnerSlicePath(_ref2) {
|
32649
|
+
let {
|
32650
|
+
angle,
|
32651
|
+
radius,
|
32652
|
+
size
|
32653
|
+
} = _ref2;
|
32654
|
+
return computed(() => simpleArc([50, 50], toValue(radius), toValue(angle), toValue(angle) + 360 * toValue(size) / 100 // angle end,
|
32655
|
+
));
|
32656
|
+
}
|
32657
|
+
|
32658
|
+
// Types
|
32659
|
+
|
32660
|
+
const makeVPieSegmentProps = propsFactory({
|
32661
|
+
rotate: [Number, String],
|
32662
|
+
value: {
|
32663
|
+
type: Number,
|
32664
|
+
default: 0
|
32665
|
+
},
|
32666
|
+
color: String,
|
32667
|
+
innerCut: [Number, String],
|
32668
|
+
hoverScale: {
|
32669
|
+
type: [Number, String],
|
32670
|
+
default: 0.05
|
32671
|
+
},
|
32672
|
+
gap: [Number, String],
|
32673
|
+
rounded: [Number, String],
|
32674
|
+
animation: {
|
32675
|
+
type: [Boolean, Object],
|
32676
|
+
default: false
|
32677
|
+
},
|
32678
|
+
pattern: String,
|
32679
|
+
hideSlice: Boolean,
|
32680
|
+
...makeRevealProps()
|
32681
|
+
}, 'VPieSegment');
|
32682
|
+
const VPieSegment = genericComponent()({
|
32683
|
+
name: 'VPieSegment',
|
32684
|
+
props: makeVPieSegmentProps(),
|
32685
|
+
setup(props) {
|
32686
|
+
const isHovering = shallowRef(false);
|
32687
|
+
const {
|
32688
|
+
state: revealState,
|
32689
|
+
duration: revealDuration
|
32690
|
+
} = useReveal(props);
|
32691
|
+
const transitionConfig = computed(() => {
|
32692
|
+
const defaultEasing = 'easeInOutCubic';
|
32693
|
+
const defaultDuration = 400;
|
32694
|
+
const easingName = typeof props.animation === 'object' ? props.animation.easing ?? defaultEasing : defaultEasing;
|
32695
|
+
return {
|
32696
|
+
duration: ['initial', 'pending'].includes(revealState.value) ? revealDuration.value : typeof props.animation === 'object' ? props.animation.duration : props.animation ? defaultDuration : 0,
|
32697
|
+
transition: easingPatterns[easingName]
|
32698
|
+
};
|
32699
|
+
});
|
32700
|
+
const {
|
32701
|
+
hoverZoomRatio,
|
32702
|
+
normalizedValue,
|
32703
|
+
normalizedInnerCut,
|
32704
|
+
outerX,
|
32705
|
+
outerY,
|
32706
|
+
arcWidth
|
32707
|
+
} = usePieArc(props, isHovering);
|
32708
|
+
const arcSize = toRef(() => revealState.value === 'initial' ? 0 : normalizedValue.value);
|
32709
|
+
const currentArcSize = useTransition(arcSize, transitionConfig);
|
32710
|
+
const angle = toRef(() => revealState.value === 'initial' ? 0 : Number(props.rotate ?? 0) + Number(props.gap ?? 0) / 2);
|
32711
|
+
const currentAngle = useTransition(angle, transitionConfig);
|
32712
|
+
const arcRadius = toRef(() => 50 * (isHovering.value ? 1 : 1 - hoverZoomRatio.value));
|
32713
|
+
const currentArcRadius = useTransition(arcRadius, transitionConfig);
|
32714
|
+
const currentArcWidth = useTransition(arcWidth, transitionConfig);
|
32715
|
+
const outerSlicePath = useOuterSlicePath({
|
32716
|
+
angle: currentAngle,
|
32717
|
+
radius: currentArcRadius,
|
32718
|
+
size: currentArcSize,
|
32719
|
+
width: currentArcWidth,
|
32720
|
+
rounded: () => Number(props.rounded ?? 0)
|
32721
|
+
});
|
32722
|
+
const innerSlicePath = useInnerSlicePath({
|
32723
|
+
angle: currentAngle,
|
32724
|
+
radius: () => currentArcRadius.value - currentArcWidth.value,
|
32725
|
+
size: currentArcSize
|
32726
|
+
});
|
32727
|
+
const overlayPath = toRef(() => `M 50 0 A 50 50 0 ${normalizedValue.value > 50 ? 1 : 0} 1 ${outerX.value} ${outerY.value} L 50 50`);
|
32728
|
+
return () => createElementVNode("g", {
|
32729
|
+
"class": "v-pie-segment",
|
32730
|
+
"style": {
|
32731
|
+
color: props.color
|
32732
|
+
}
|
32733
|
+
}, [createElementVNode("path", {
|
32734
|
+
"key": "outer-slice",
|
32735
|
+
"fill": "currentColor",
|
32736
|
+
"shape-rendering": "geometricPrecision",
|
32737
|
+
"d": outerSlicePath.value
|
32738
|
+
}, null), props.pattern && createElementVNode("path", {
|
32739
|
+
"key": "pattern-overlay",
|
32740
|
+
"shape-rendering": "geometricPrecision",
|
32741
|
+
"fill": props.pattern,
|
32742
|
+
"d": outerSlicePath.value
|
32743
|
+
}, null), !props.hideSlice && normalizedInnerCut.value > 0 && createElementVNode("path", {
|
32744
|
+
"key": "inner-slice",
|
32745
|
+
"fill": "oklch(from currentColor l c h / calc(alpha / 2))",
|
32746
|
+
"d": innerSlicePath.value
|
32747
|
+
}, null), ['disabled', 'done'].includes(revealState.value) && createElementVNode("path", {
|
32748
|
+
"transform": `rotate(${currentAngle.value} 50 50)`,
|
32749
|
+
"class": "v-pie-segment__overlay",
|
32750
|
+
"d": overlayPath.value,
|
32751
|
+
"onMouseenter": () => isHovering.value = true,
|
32752
|
+
"onMouseleave": () => isHovering.value = false
|
32753
|
+
}, null)]);
|
32754
|
+
}
|
32755
|
+
});
|
32756
|
+
|
32757
|
+
// Types
|
32758
|
+
|
32759
|
+
const makeVPieTooltipProps = propsFactory({
|
32760
|
+
modelValue: Boolean,
|
32761
|
+
item: {
|
32762
|
+
type: Object,
|
32763
|
+
default: null
|
32764
|
+
},
|
32765
|
+
titleFormat: {
|
32766
|
+
type: [String, Function],
|
32767
|
+
default: '[title]'
|
32768
|
+
},
|
32769
|
+
subtitleFormat: {
|
32770
|
+
type: [String, Function],
|
32771
|
+
default: '[value]'
|
32772
|
+
},
|
32773
|
+
...makeTransitionProps(),
|
32774
|
+
...pick(makeVTooltipProps(), ['offset'])
|
32775
|
+
}, 'VPieTooltip');
|
32776
|
+
const VPieTooltip = genericComponent()({
|
32777
|
+
name: 'VPieTooltip',
|
32778
|
+
props: makeVPieTooltipProps(),
|
32779
|
+
setup(props, _ref) {
|
32780
|
+
let {
|
32781
|
+
slots
|
32782
|
+
} = _ref;
|
32783
|
+
const target = shallowRef([0, 0]);
|
32784
|
+
const vm = getCurrentInstance('VPieTooltip');
|
32785
|
+
let frame = -1;
|
32786
|
+
function onMouseMove(_ref2) {
|
32787
|
+
let {
|
32788
|
+
clientX,
|
32789
|
+
clientY
|
32790
|
+
} = _ref2;
|
32791
|
+
cancelAnimationFrame(frame);
|
32792
|
+
frame = requestAnimationFrame(() => {
|
32793
|
+
target.value = [clientX, clientY];
|
32794
|
+
});
|
32795
|
+
}
|
32796
|
+
onMounted(() => {
|
32797
|
+
vm.proxy.$el.parentNode.addEventListener('mousemove', onMouseMove);
|
32798
|
+
});
|
32799
|
+
onBeforeUnmount(() => {
|
32800
|
+
vm.proxy.$el.parentNode.removeEventListener('mousemove', onMouseMove);
|
32801
|
+
});
|
32802
|
+
const tooltipTitleFormatFunction = toRef(() => segment => {
|
32803
|
+
return typeof props.titleFormat === 'function' ? props.titleFormat(segment) : formatTextTemplate(props.titleFormat, segment);
|
32804
|
+
});
|
32805
|
+
const tooltipSubtitleFormatFunction = toRef(() => segment => {
|
32806
|
+
return typeof props.subtitleFormat === 'function' ? props.subtitleFormat(segment) : formatTextTemplate(props.subtitleFormat, segment);
|
32807
|
+
});
|
32808
|
+
return () => createVNode(VTooltip, {
|
32809
|
+
"offset": props.offset,
|
32810
|
+
"modelValue": props.modelValue,
|
32811
|
+
"target": target.value,
|
32812
|
+
"contentClass": "v-pie__tooltip-content"
|
32813
|
+
}, {
|
32814
|
+
default: () => [!!props.item && (slots.default?.({
|
32815
|
+
item: props.item
|
32816
|
+
}) ?? createVNode(MaybeTransition, {
|
32817
|
+
"transition": props.transition,
|
32818
|
+
"mode": "out-in"
|
32819
|
+
}, {
|
32820
|
+
default: () => [createVNode(VListItem, {
|
32821
|
+
"key": props.item.key,
|
32822
|
+
"density": "compact",
|
32823
|
+
"title": tooltipTitleFormatFunction.value(props.item),
|
32824
|
+
"subtitle": tooltipSubtitleFormatFunction.value(props.item)
|
32825
|
+
}, {
|
32826
|
+
prepend: slots.prepend ? () => slots.prepend({
|
32827
|
+
item: props.item
|
32828
|
+
}) : undefined
|
32829
|
+
})]
|
32830
|
+
}))]
|
32831
|
+
});
|
32832
|
+
}
|
32833
|
+
});
|
32834
|
+
|
32835
|
+
// Types
|
32836
|
+
|
32837
|
+
const makeVPieProps = propsFactory({
|
32838
|
+
title: String,
|
32839
|
+
bgColor: String,
|
32840
|
+
items: {
|
32841
|
+
type: Array,
|
32842
|
+
default: () => []
|
32843
|
+
},
|
32844
|
+
palette: {
|
32845
|
+
type: Array,
|
32846
|
+
default: () => []
|
32847
|
+
},
|
32848
|
+
itemKey: {
|
32849
|
+
type: String,
|
32850
|
+
default: 'key'
|
32851
|
+
},
|
32852
|
+
itemValue: {
|
32853
|
+
type: String,
|
32854
|
+
default: 'value'
|
32855
|
+
},
|
32856
|
+
itemTitle: {
|
32857
|
+
type: String,
|
32858
|
+
default: 'title'
|
32859
|
+
},
|
32860
|
+
size: {
|
32861
|
+
type: [Number, String],
|
32862
|
+
default: 250
|
32863
|
+
},
|
32864
|
+
rotate: [Number, String],
|
32865
|
+
gaugeCut: [Number, String],
|
32866
|
+
legend: {
|
32867
|
+
type: [Boolean, Object],
|
32868
|
+
default: false
|
32869
|
+
},
|
32870
|
+
tooltip: {
|
32871
|
+
type: [Boolean, Object],
|
32872
|
+
default: false
|
32873
|
+
},
|
32874
|
+
...makeDensityProps(),
|
32875
|
+
...pick(makeVPieSegmentProps(), ['animation', 'gap', 'rounded', 'innerCut', 'hoverScale', 'hideSlice', 'reveal'])
|
32876
|
+
}, 'VPie');
|
32877
|
+
const VPie = genericComponent()({
|
32878
|
+
name: 'VPie',
|
32879
|
+
props: makeVPieProps(),
|
32880
|
+
setup(props, _ref) {
|
32881
|
+
let {
|
32882
|
+
slots
|
32883
|
+
} = _ref;
|
32884
|
+
const legendConfig = computed(() => ({
|
32885
|
+
visible: !!props.legend,
|
32886
|
+
position: 'bottom',
|
32887
|
+
textFormat: '[title]',
|
32888
|
+
...(typeof props.legend === 'object' ? props.legend : {})
|
32889
|
+
}));
|
32890
|
+
const {
|
32891
|
+
colorClasses,
|
32892
|
+
colorStyles
|
32893
|
+
} = useColor(() => ({
|
32894
|
+
background: props.bgColor
|
32895
|
+
}));
|
32896
|
+
const textColorStyles = toRef(() => pick(colorStyles.value, ['color', 'caretColor']));
|
32897
|
+
const legendAvatarSize = toRef(() => ({
|
32898
|
+
default: 20,
|
32899
|
+
comfortable: 18,
|
32900
|
+
compact: 16
|
32901
|
+
})[props.density ?? 'default']);
|
32902
|
+
const legendDirection = toRef(() => ['left', 'right'].includes(legendConfig.value.position) ? 'vertical' : 'horizontal');
|
32903
|
+
const legendMode = toRef(() => !legendConfig.value.visible ? 'hidden' : legendConfig.value.position);
|
32904
|
+
const legendTextFormatFunction = toRef(() => item => {
|
32905
|
+
return typeof legendConfig.value.textFormat === 'function' ? legendConfig.value.textFormat(item) : formatTextTemplate(legendConfig.value.textFormat, item);
|
32906
|
+
});
|
32907
|
+
const arcs = computed(() => {
|
32908
|
+
// hidden items get (value: 0) to trigger disappearing animation
|
32909
|
+
return props.items.filter(Boolean).map((item, index) => {
|
32910
|
+
return {
|
32911
|
+
key: item[props.itemKey],
|
32912
|
+
color: item.color ?? colorFromPalette(index),
|
32913
|
+
value: item[props.itemValue],
|
32914
|
+
title: String(item[props.itemTitle]),
|
32915
|
+
pattern: item.pattern ?? patternFromPalette(index),
|
32916
|
+
raw: item
|
32917
|
+
};
|
32918
|
+
});
|
32919
|
+
});
|
32920
|
+
const visibleItemsKeys = shallowRef([]);
|
32921
|
+
watch(() => arcs.value.length, () => {
|
32922
|
+
// reset when number of items changes
|
32923
|
+
visibleItemsKeys.value = arcs.value.map(a => a.key);
|
32924
|
+
}, {
|
32925
|
+
immediate: true
|
32926
|
+
});
|
32927
|
+
const visibleItems = computed(() => {
|
32928
|
+
// hidden items get (value: 0) to trigger disappearing animation
|
32929
|
+
return arcs.value.map(item => {
|
32930
|
+
return isActive(item) ? item : {
|
32931
|
+
...item,
|
32932
|
+
value: 0
|
32933
|
+
};
|
32934
|
+
});
|
32935
|
+
});
|
32936
|
+
const total = computed(() => visibleItems.value.reduce((sum, item) => sum + item.value, 0));
|
32937
|
+
const gaugeCut = toRef(() => Number(props.gaugeCut ?? 0));
|
32938
|
+
const gaugeOffset = computed(() => (1 - Math.cos(Math.PI * Math.min(90, gaugeCut.value / 2) / 180)) / 2);
|
32939
|
+
const rotateDeg = computed(() => `${gaugeCut.value ? 180 + gaugeCut.value / 2 : props.rotate ?? 0}deg`);
|
32940
|
+
function arcOffset(index) {
|
32941
|
+
return visibleItems.value.slice(0, index).reduce((acc, s) => acc + (total.value > 0 ? s.value / total.value : 0) * (360 - gaugeCut.value), 0);
|
32942
|
+
}
|
32943
|
+
function arcSize(v) {
|
32944
|
+
return v / total.value * (100 - gaugeCut.value / 3.6);
|
32945
|
+
}
|
32946
|
+
function colorFromPalette(index) {
|
32947
|
+
if (props.palette.length === 0) return undefined;
|
32948
|
+
const paletteItem = props.palette[index % props.palette.length];
|
32949
|
+
return typeof paletteItem === 'object' ? paletteItem.color : paletteItem;
|
32950
|
+
}
|
32951
|
+
function patternFromPalette(index) {
|
32952
|
+
if (props.palette.length === 0) return undefined;
|
32953
|
+
const paletteItem = props.palette[index % props.palette.length];
|
32954
|
+
return typeof paletteItem === 'object' ? paletteItem.pattern : undefined;
|
32955
|
+
}
|
32956
|
+
function isActive(item) {
|
32957
|
+
return visibleItemsKeys.value.includes(item.key);
|
32958
|
+
}
|
32959
|
+
function toggle(item) {
|
32960
|
+
if (isActive(item)) {
|
32961
|
+
visibleItemsKeys.value = visibleItemsKeys.value.filter(x => x !== item.key);
|
32962
|
+
} else {
|
32963
|
+
visibleItemsKeys.value = [...visibleItemsKeys.value, item.key];
|
32964
|
+
}
|
32965
|
+
}
|
32966
|
+
const tooltipItem = shallowRef(null);
|
32967
|
+
const tooltipVisible = shallowRef(false);
|
32968
|
+
let mouseLeaveTimeout = null;
|
32969
|
+
function onMouseenter(item) {
|
32970
|
+
if (!props.tooltip) return;
|
32971
|
+
clearTimeout(mouseLeaveTimeout);
|
32972
|
+
tooltipVisible.value = true;
|
32973
|
+
tooltipItem.value = item;
|
32974
|
+
}
|
32975
|
+
function onMouseleave() {
|
32976
|
+
if (!props.tooltip) return;
|
32977
|
+
clearTimeout(mouseLeaveTimeout);
|
32978
|
+
mouseLeaveTimeout = setTimeout(() => {
|
32979
|
+
tooltipVisible.value = false;
|
32980
|
+
|
32981
|
+
// intentionally reusing timeout here
|
32982
|
+
mouseLeaveTimeout = setTimeout(() => {
|
32983
|
+
tooltipItem.value = null;
|
32984
|
+
}, 500);
|
32985
|
+
}, 100);
|
32986
|
+
}
|
32987
|
+
return () => {
|
32988
|
+
const segmentProps = pick(props, ['animation', 'gap', 'rounded', 'hideSlice', 'reveal', 'innerCut', 'hoverScale']);
|
32989
|
+
const defaultTooltipTransition = {
|
32990
|
+
name: 'fade-transition',
|
32991
|
+
duration: 150
|
32992
|
+
};
|
32993
|
+
const tooltipProps = {
|
32994
|
+
item: tooltipItem.value,
|
32995
|
+
modelValue: tooltipVisible.value,
|
32996
|
+
titleFormat: typeof props.tooltip === 'object' ? props.tooltip.titleFormat : '[title]',
|
32997
|
+
subtitleFormat: typeof props.tooltip === 'object' ? props.tooltip.subtitleFormat : '[value]',
|
32998
|
+
transition: typeof props.tooltip === 'object' ? props.tooltip.transition : defaultTooltipTransition,
|
32999
|
+
offset: typeof props.tooltip === 'object' ? props.tooltip.offset : 16
|
33000
|
+
};
|
33001
|
+
const legendDefaults = {
|
33002
|
+
VChipGroup: {
|
33003
|
+
direction: legendDirection.value
|
33004
|
+
},
|
33005
|
+
VChip: {
|
33006
|
+
density: props.density
|
33007
|
+
},
|
33008
|
+
VAvatar: {
|
33009
|
+
size: legendAvatarSize.value
|
33010
|
+
}
|
33011
|
+
};
|
33012
|
+
const tooltipDefaults = {
|
33013
|
+
VAvatar: {
|
33014
|
+
size: 28
|
33015
|
+
}
|
33016
|
+
};
|
33017
|
+
const avatarSlot = _ref2 => {
|
33018
|
+
let {
|
33019
|
+
item
|
33020
|
+
} = _ref2;
|
33021
|
+
return createVNode(VAvatar, {
|
33022
|
+
"color": item.color,
|
33023
|
+
"start": true
|
33024
|
+
}, {
|
33025
|
+
default: () => [item.pattern && createElementVNode("svg", {
|
33026
|
+
"height": "40",
|
33027
|
+
"width": "40"
|
33028
|
+
}, [createElementVNode("rect", {
|
33029
|
+
"width": "40",
|
33030
|
+
"height": "40",
|
33031
|
+
"fill": item.pattern
|
33032
|
+
}, null)])]
|
33033
|
+
});
|
33034
|
+
};
|
33035
|
+
return createElementVNode("div", {
|
33036
|
+
"class": normalizeClass(['v-pie', `v-pie--legend-${legendMode.value}`]),
|
33037
|
+
"style": {
|
33038
|
+
'--v-pie-size': convertToUnit(props.size)
|
33039
|
+
}
|
33040
|
+
}, [slots.title?.() ?? (props.title && createElementVNode("div", {
|
33041
|
+
"class": "v-pie__title"
|
33042
|
+
}, [props.title])), createElementVNode("div", {
|
33043
|
+
"class": normalizeClass(['v-pie__content', colorClasses.value]),
|
33044
|
+
"style": normalizeStyle([{
|
33045
|
+
transform: `rotate(${rotateDeg.value})`,
|
33046
|
+
marginBottom: `calc(-1 * ${convertToUnit(props.size)} * ${gaugeOffset.value})`
|
33047
|
+
}, textColorStyles.value])
|
33048
|
+
}, [createElementVNode("div", {
|
33049
|
+
"class": normalizeClass(['v-pie__content-underlay', colorClasses.value]),
|
33050
|
+
"style": normalizeStyle(colorStyles.value)
|
33051
|
+
}, null), createElementVNode("svg", {
|
33052
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
33053
|
+
"viewBox": "0 0 100 100"
|
33054
|
+
}, [arcs.value.map((item, index) => createVNode(VPieSegment, mergeProps(segmentProps, {
|
33055
|
+
"key": item.key,
|
33056
|
+
"color": item.color,
|
33057
|
+
"value": isActive(item) ? arcSize(item.value) : 0,
|
33058
|
+
"rotate": arcOffset(index),
|
33059
|
+
"pattern": item.pattern,
|
33060
|
+
"onMouseenter": () => onMouseenter(item),
|
33061
|
+
"onMouseleave": () => onMouseleave()
|
33062
|
+
}), null))]), createElementVNode("div", {
|
33063
|
+
"class": "v-pie__center-content",
|
33064
|
+
"style": {
|
33065
|
+
transform: `translate(-50%, -50%)
|
33066
|
+
rotate(-${rotateDeg.value})
|
33067
|
+
translateY(calc(-100% * ${gaugeOffset.value}))`
|
33068
|
+
}
|
33069
|
+
}, [createElementVNode("div", null, [slots.center?.({
|
33070
|
+
total: total.value
|
33071
|
+
})])])]), legendConfig.value.visible && createVNode(VDefaultsProvider, {
|
33072
|
+
"key": "legend",
|
33073
|
+
"defaults": legendDefaults
|
33074
|
+
}, {
|
33075
|
+
default: () => [createElementVNode("div", {
|
33076
|
+
"class": "v-pie__legend"
|
33077
|
+
}, [slots.legend?.({
|
33078
|
+
isActive,
|
33079
|
+
toggle,
|
33080
|
+
items: arcs.value
|
33081
|
+
}) ?? createVNode(VChipGroup, {
|
33082
|
+
"column": true,
|
33083
|
+
"multiple": true,
|
33084
|
+
"modelValue": visibleItemsKeys.value,
|
33085
|
+
"onUpdate:modelValue": $event => visibleItemsKeys.value = $event
|
33086
|
+
}, {
|
33087
|
+
default: () => [arcs.value.map(item => createVNode(VChip, {
|
33088
|
+
"value": item.key
|
33089
|
+
}, {
|
33090
|
+
prepend: () => avatarSlot({
|
33091
|
+
item
|
33092
|
+
}),
|
33093
|
+
default: () => createElementVNode("div", {
|
33094
|
+
"class": "v-pie__legend__text"
|
33095
|
+
}, [slots['legend-text']?.({
|
33096
|
+
item
|
33097
|
+
}) ?? legendTextFormatFunction.value(item)])
|
33098
|
+
}))]
|
33099
|
+
})])]
|
33100
|
+
}), !!props.tooltip && createVNode(VDefaultsProvider, {
|
33101
|
+
"defaults": tooltipDefaults
|
33102
|
+
}, {
|
33103
|
+
default: () => [createVNode(VPieTooltip, tooltipProps, {
|
33104
|
+
default: slots.tooltip,
|
33105
|
+
prepend: avatarSlot
|
33106
|
+
})]
|
33107
|
+
})]);
|
33108
|
+
};
|
33109
|
+
}
|
33110
|
+
});
|
33111
|
+
|
32458
33112
|
// Types
|
32459
33113
|
|
32460
33114
|
const makeVStepperVerticalActionsProps = propsFactory({
|
@@ -33214,6 +33868,92 @@ const VHotkey = genericComponent()({
|
|
33214
33868
|
}
|
33215
33869
|
});
|
33216
33870
|
|
33871
|
+
// Utilities
|
33872
|
+
|
33873
|
+
// Types
|
33874
|
+
|
33875
|
+
function useDirectiveComponent(component, props) {
|
33876
|
+
const concreteComponent = typeof component === 'string' ? resolveComponent(component) : component;
|
33877
|
+
const hook = mountComponent(concreteComponent, props);
|
33878
|
+
return {
|
33879
|
+
mounted: hook,
|
33880
|
+
updated: hook,
|
33881
|
+
unmounted(el) {
|
33882
|
+
render(null, el);
|
33883
|
+
}
|
33884
|
+
};
|
33885
|
+
}
|
33886
|
+
function mountComponent(component, props) {
|
33887
|
+
return function (el, binding, vnode) {
|
33888
|
+
const _props = typeof props === 'function' ? props(binding) : props;
|
33889
|
+
const text = binding.value?.text ?? binding.value ?? _props?.text;
|
33890
|
+
const value = isObject(binding.value) ? binding.value : {};
|
33891
|
+
|
33892
|
+
// Get the children from the props or directive value, or the element's children
|
33893
|
+
const children = () => text ?? el.textContent;
|
33894
|
+
|
33895
|
+
// If vnode.ctx is the same as the instance, then we're bound to a plain element
|
33896
|
+
// and need to find the nearest parent component instance to inherit provides from
|
33897
|
+
const provides = (vnode.ctx === binding.instance.$ ? findComponentParent(vnode, binding.instance.$)?.provides : vnode.ctx?.provides) ?? binding.instance.$.provides;
|
33898
|
+
const node = h(component, mergeProps(_props, value), children);
|
33899
|
+
node.appContext = Object.assign(Object.create(null), binding.instance.$.appContext, {
|
33900
|
+
provides
|
33901
|
+
});
|
33902
|
+
render(node, el);
|
33903
|
+
};
|
33904
|
+
}
|
33905
|
+
function findComponentParent(vnode, root) {
|
33906
|
+
// Walk the tree from root until we find the child vnode
|
33907
|
+
const stack = new Set();
|
33908
|
+
const walk = children => {
|
33909
|
+
for (const child of children) {
|
33910
|
+
if (!child) continue;
|
33911
|
+
if (child === vnode || child.el && vnode.el && child.el === vnode.el) {
|
33912
|
+
return true;
|
33913
|
+
}
|
33914
|
+
stack.add(child);
|
33915
|
+
let result;
|
33916
|
+
if (child.suspense) {
|
33917
|
+
result = walk([child.ssContent]);
|
33918
|
+
} else if (Array.isArray(child.children)) {
|
33919
|
+
result = walk(child.children);
|
33920
|
+
} else if (child.component?.vnode) {
|
33921
|
+
result = walk([child.component?.subTree]);
|
33922
|
+
}
|
33923
|
+
if (result) {
|
33924
|
+
return result;
|
33925
|
+
}
|
33926
|
+
stack.delete(child);
|
33927
|
+
}
|
33928
|
+
return false;
|
33929
|
+
};
|
33930
|
+
if (!walk([root.subTree])) {
|
33931
|
+
consoleError('Could not find original vnode, component will not inherit provides');
|
33932
|
+
return root;
|
33933
|
+
}
|
33934
|
+
|
33935
|
+
// Return the first component parent
|
33936
|
+
const result = Array.from(stack).reverse();
|
33937
|
+
for (const child of result) {
|
33938
|
+
if (child.component) {
|
33939
|
+
return child.component;
|
33940
|
+
}
|
33941
|
+
}
|
33942
|
+
return root;
|
33943
|
+
}
|
33944
|
+
|
33945
|
+
// Components
|
33946
|
+
|
33947
|
+
// Types
|
33948
|
+
|
33949
|
+
const Tooltip = useDirectiveComponent(VTooltip, binding => {
|
33950
|
+
return {
|
33951
|
+
activator: 'parent',
|
33952
|
+
location: binding.arg?.replace('-', ' '),
|
33953
|
+
text: typeof binding.value === 'boolean' ? undefined : binding.value
|
33954
|
+
};
|
33955
|
+
});
|
33956
|
+
|
33217
33957
|
// Types
|
33218
33958
|
|
33219
33959
|
const makeVVideoVolumeProps = propsFactory({
|
@@ -33234,6 +33974,9 @@ const makeVVideoVolumeProps = propsFactory({
|
|
33234
33974
|
}, 'VVideoVolume');
|
33235
33975
|
const VVideoVolume = genericComponent()({
|
33236
33976
|
name: 'VVideoVolume',
|
33977
|
+
directives: {
|
33978
|
+
vTooltip: Tooltip
|
33979
|
+
},
|
33237
33980
|
props: makeVVideoVolumeProps(),
|
33238
33981
|
emits: {
|
33239
33982
|
'update:modelValue': val => true
|
@@ -33281,7 +34024,7 @@ const VVideoVolume = genericComponent()({
|
|
33281
34024
|
"onUpdate:modelValue": v => volume.value = v
|
33282
34025
|
}, sliderDefaults, props.sliderProps), null)])]
|
33283
34026
|
})]
|
33284
|
-
}), [[
|
34027
|
+
}), [[Tooltip, props.label, 'top']]), props.inline && createVNode(VSlider, mergeProps({
|
33285
34028
|
"class": "v-video-volume-inline__slider",
|
33286
34029
|
"minWidth": "50",
|
33287
34030
|
"aria-label": t('$vuetify.video.volume'),
|
@@ -33332,6 +34075,9 @@ const makeVVideoControlsProps = propsFactory({
|
|
33332
34075
|
}, 'VVideoControls');
|
33333
34076
|
const VVideoControls = genericComponent()({
|
33334
34077
|
name: 'VVideoControls',
|
34078
|
+
directives: {
|
34079
|
+
vTooltip: Tooltip
|
34080
|
+
},
|
33335
34081
|
props: makeVVideoControlsProps(),
|
33336
34082
|
emits: {
|
33337
34083
|
'update:playing': val => true,
|
@@ -33461,7 +34207,7 @@ const VVideoControls = genericComponent()({
|
|
33461
34207
|
"size": playBtnSize,
|
33462
34208
|
"aria-label": labels.value.playAction,
|
33463
34209
|
"onClick": () => playing.value = !playing.value
|
33464
|
-
}, null), [[
|
34210
|
+
}, null), [[Tooltip, labels.value.playAction, 'top']])]), slots.prepend && createElementVNode("div", {
|
33465
34211
|
"class": normalizeClass(pillClasses)
|
33466
34212
|
}, [slots.prepend(slotProps)]), props.splitTime ? createElementVNode("span", {
|
33467
34213
|
"class": normalizeClass([pillClasses, 'v-video__time'])
|
@@ -33489,7 +34235,7 @@ const VVideoControls = genericComponent()({
|
|
33489
34235
|
"size": playBtnSize,
|
33490
34236
|
"aria-label": labels.value.playAction,
|
33491
34237
|
"onClick": () => playing.value = !playing.value
|
33492
|
-
}, null), [[
|
34238
|
+
}, null), [[Tooltip, labels.value.playAction, 'top']])])]), (!props.hideVolume || !props.hideFullscreen || slots.append) && createElementVNode("div", {
|
33493
34239
|
"class": normalizeClass(pillClasses)
|
33494
34240
|
}, [!props.hideVolume && createVNode(VVideoVolume, mergeProps({
|
33495
34241
|
"key": "volume-control",
|
@@ -33504,7 +34250,7 @@ const VVideoControls = genericComponent()({
|
|
33504
34250
|
"icon": props.fullscreen ? '$fullscreenExit' : '$fullscreen',
|
33505
34251
|
"aria-label": labels.value.fullscreenAction,
|
33506
34252
|
"onClick": toggleFullscreen
|
33507
|
-
}, null), [[
|
34253
|
+
}, null), [[Tooltip, labels.value.fullscreenAction, 'top']])]), props.variant === 'mini' && createVNode(VSpacer, null, null)])]
|
33508
34254
|
})]);
|
33509
34255
|
});
|
33510
34256
|
return {
|
@@ -34041,6 +34787,9 @@ var components = /*#__PURE__*/Object.freeze({
|
|
34041
34787
|
VParallax: VParallax,
|
34042
34788
|
VPicker: VPicker,
|
34043
34789
|
VPickerTitle: VPickerTitle,
|
34790
|
+
VPie: VPie,
|
34791
|
+
VPieSegment: VPieSegment,
|
34792
|
+
VPieTooltip: VPieTooltip,
|
34044
34793
|
VProgressCircular: VProgressCircular,
|
34045
34794
|
VProgressLinear: VProgressLinear,
|
34046
34795
|
VPullToRefresh: VPullToRefresh,
|
@@ -34233,92 +34982,6 @@ const Scroll = {
|
|
34233
34982
|
updated
|
34234
34983
|
};
|
34235
34984
|
|
34236
|
-
// Utilities
|
34237
|
-
|
34238
|
-
// Types
|
34239
|
-
|
34240
|
-
function useDirectiveComponent(component, props) {
|
34241
|
-
const concreteComponent = typeof component === 'string' ? resolveComponent(component) : component;
|
34242
|
-
const hook = mountComponent(concreteComponent, props);
|
34243
|
-
return {
|
34244
|
-
mounted: hook,
|
34245
|
-
updated: hook,
|
34246
|
-
unmounted(el) {
|
34247
|
-
render(null, el);
|
34248
|
-
}
|
34249
|
-
};
|
34250
|
-
}
|
34251
|
-
function mountComponent(component, props) {
|
34252
|
-
return function (el, binding, vnode) {
|
34253
|
-
const _props = typeof props === 'function' ? props(binding) : props;
|
34254
|
-
const text = binding.value?.text ?? binding.value ?? _props?.text;
|
34255
|
-
const value = isObject(binding.value) ? binding.value : {};
|
34256
|
-
|
34257
|
-
// Get the children from the props or directive value, or the element's children
|
34258
|
-
const children = () => text ?? el.textContent;
|
34259
|
-
|
34260
|
-
// If vnode.ctx is the same as the instance, then we're bound to a plain element
|
34261
|
-
// and need to find the nearest parent component instance to inherit provides from
|
34262
|
-
const provides = (vnode.ctx === binding.instance.$ ? findComponentParent(vnode, binding.instance.$)?.provides : vnode.ctx?.provides) ?? binding.instance.$.provides;
|
34263
|
-
const node = h(component, mergeProps(_props, value), children);
|
34264
|
-
node.appContext = Object.assign(Object.create(null), binding.instance.$.appContext, {
|
34265
|
-
provides
|
34266
|
-
});
|
34267
|
-
render(node, el);
|
34268
|
-
};
|
34269
|
-
}
|
34270
|
-
function findComponentParent(vnode, root) {
|
34271
|
-
// Walk the tree from root until we find the child vnode
|
34272
|
-
const stack = new Set();
|
34273
|
-
const walk = children => {
|
34274
|
-
for (const child of children) {
|
34275
|
-
if (!child) continue;
|
34276
|
-
if (child === vnode || child.el && vnode.el && child.el === vnode.el) {
|
34277
|
-
return true;
|
34278
|
-
}
|
34279
|
-
stack.add(child);
|
34280
|
-
let result;
|
34281
|
-
if (child.suspense) {
|
34282
|
-
result = walk([child.ssContent]);
|
34283
|
-
} else if (Array.isArray(child.children)) {
|
34284
|
-
result = walk(child.children);
|
34285
|
-
} else if (child.component?.vnode) {
|
34286
|
-
result = walk([child.component?.subTree]);
|
34287
|
-
}
|
34288
|
-
if (result) {
|
34289
|
-
return result;
|
34290
|
-
}
|
34291
|
-
stack.delete(child);
|
34292
|
-
}
|
34293
|
-
return false;
|
34294
|
-
};
|
34295
|
-
if (!walk([root.subTree])) {
|
34296
|
-
consoleError('Could not find original vnode, component will not inherit provides');
|
34297
|
-
return root;
|
34298
|
-
}
|
34299
|
-
|
34300
|
-
// Return the first component parent
|
34301
|
-
const result = Array.from(stack).reverse();
|
34302
|
-
for (const child of result) {
|
34303
|
-
if (child.component) {
|
34304
|
-
return child.component;
|
34305
|
-
}
|
34306
|
-
}
|
34307
|
-
return root;
|
34308
|
-
}
|
34309
|
-
|
34310
|
-
// Components
|
34311
|
-
|
34312
|
-
// Types
|
34313
|
-
|
34314
|
-
const Tooltip = useDirectiveComponent(VTooltip, binding => {
|
34315
|
-
return {
|
34316
|
-
activator: 'parent',
|
34317
|
-
location: binding.arg?.replace('-', ' '),
|
34318
|
-
text: typeof binding.value === 'boolean' ? undefined : binding.value
|
34319
|
-
};
|
34320
|
-
});
|
34321
|
-
|
34322
34985
|
var directives = /*#__PURE__*/Object.freeze({
|
34323
34986
|
__proto__: null,
|
34324
34987
|
ClickOutside: ClickOutside,
|
@@ -34430,7 +35093,7 @@ function createVuetify$1() {
|
|
34430
35093
|
};
|
34431
35094
|
});
|
34432
35095
|
}
|
34433
|
-
const version$1 = "3.9.2-master.2025-07-
|
35096
|
+
const version$1 = "3.9.2-master.2025-07-25";
|
34434
35097
|
createVuetify$1.version = version$1;
|
34435
35098
|
|
34436
35099
|
// Vue's inject() can only be used in setup
|
@@ -34728,7 +35391,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
34728
35391
|
|
34729
35392
|
/* eslint-disable local-rules/sort-imports */
|
34730
35393
|
|
34731
|
-
const version = "3.9.2-master.2025-07-
|
35394
|
+
const version = "3.9.2-master.2025-07-25";
|
34732
35395
|
|
34733
35396
|
/* eslint-disable local-rules/sort-imports */
|
34734
35397
|
|