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