vuetify 3.6.15 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/json/attributes.json +182 -26
- package/dist/json/importMap-labs.json +30 -30
- package/dist/json/importMap.json +150 -150
- package/dist/json/tags.json +44 -5
- package/dist/json/web-types.json +445 -42
- package/dist/vuetify-labs.css +2359 -2344
- package/dist/vuetify-labs.d.ts +690 -341
- package/dist/vuetify-labs.esm.js +253 -211
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +252 -210
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +2553 -2538
- package/dist/vuetify.d.ts +559 -315
- package/dist/vuetify.esm.js +189 -127
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +188 -126
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +160 -156
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VApp/VApp.mjs +2 -5
- package/lib/components/VApp/VApp.mjs.map +1 -1
- package/lib/components/VApp/index.d.mts +6 -6
- package/lib/components/VAppBar/VAppBar.mjs +5 -5
- package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
- package/lib/components/VAppBar/index.d.mts +8 -2
- package/lib/components/VAutocomplete/VAutocomplete.mjs +15 -8
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/index.d.mts +78 -49
- package/lib/components/VAvatar/VAvatar.css +9 -0
- package/lib/components/VAvatar/VAvatar.mjs +6 -1
- package/lib/components/VAvatar/VAvatar.mjs.map +1 -1
- package/lib/components/VAvatar/VAvatar.sass +1 -0
- package/lib/components/VAvatar/_variables.scss +13 -0
- package/lib/components/VAvatar/index.d.mts +6 -0
- package/lib/components/VBottomNavigation/VBottomNavigation.mjs +2 -3
- package/lib/components/VBottomNavigation/VBottomNavigation.mjs.map +1 -1
- package/lib/components/VBottomNavigation/index.d.mts +2 -2
- package/lib/components/VBreadcrumbs/index.d.mts +8 -8
- package/lib/components/VBtn/VBtn.css +0 -4
- package/lib/components/VBtn/VBtn.mjs +3 -1
- package/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/lib/components/VBtn/VBtn.sass +0 -6
- package/lib/components/VBtn/_variables.scss +0 -1
- package/lib/components/VBtn/index.d.mts +6 -0
- package/lib/components/VCard/VCard.css +1 -0
- package/lib/components/VCard/VCard.sass +1 -0
- package/lib/components/VCard/_variables.scss +7 -3
- package/lib/components/VCarousel/index.d.mts +9 -0
- package/lib/components/VCheckbox/index.d.mts +7 -6
- package/lib/components/VCombobox/VCombobox.mjs +15 -8
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/index.d.mts +78 -49
- package/lib/components/VDialog/index.d.mts +3 -3
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs +7 -2
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs.map +1 -1
- package/lib/components/VExpansionPanel/index.d.mts +72 -0
- package/lib/components/VFab/index.d.mts +6 -0
- package/lib/components/VFileInput/index.d.mts +19 -18
- package/lib/components/VFooter/VFooter.mjs +1 -3
- package/lib/components/VFooter/VFooter.mjs.map +1 -1
- package/lib/components/VFooter/index.d.mts +3 -3
- package/lib/components/VForm/index.d.mts +10 -9
- package/lib/components/VGrid/VContainer.mjs +6 -1
- package/lib/components/VGrid/VContainer.mjs.map +1 -1
- package/lib/components/VGrid/index.d.mts +36 -0
- package/lib/components/VImg/VImg.css +9 -0
- package/lib/components/VImg/VImg.mjs +2 -0
- package/lib/components/VImg/VImg.mjs.map +1 -1
- package/lib/components/VImg/VImg.sass +9 -0
- package/lib/components/VImg/index.d.mts +9 -0
- package/lib/components/VInput/index.d.mts +7 -6
- package/lib/components/VLayout/VLayout.mjs +2 -5
- package/lib/components/VLayout/VLayout.mjs.map +1 -1
- package/lib/components/VLayout/VLayoutItem.mjs +4 -6
- package/lib/components/VLayout/VLayoutItem.mjs.map +1 -1
- package/lib/components/VLayout/index.d.mts +9 -9
- package/lib/components/VList/VListItem.css +2 -2
- package/lib/components/VList/VListItem.mjs +3 -1
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/VListItem.sass +1 -1
- package/lib/components/VList/index.d.mts +19 -18
- package/lib/components/VMain/VMain.mjs +2 -3
- package/lib/components/VMain/VMain.mjs.map +1 -1
- package/lib/components/VMain/index.d.mts +2 -2
- package/lib/components/VMenu/VMenu.mjs +26 -8
- package/lib/components/VMenu/VMenu.mjs.map +1 -1
- package/lib/components/VMenu/index.d.mts +30 -15
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +3 -4
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
- package/lib/components/VOverlay/VOverlay.mjs +5 -4
- package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/lib/components/VOverlay/locationStrategies.mjs +0 -6
- package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
- package/lib/components/VOverlay/useActivator.mjs +3 -2
- package/lib/components/VOverlay/useActivator.mjs.map +1 -1
- package/lib/components/VRadioGroup/index.d.mts +7 -6
- package/lib/components/VRangeSlider/index.d.mts +7 -6
- package/lib/components/VSelect/VSelect.mjs +15 -13
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/index.d.mts +78 -49
- package/lib/components/VSelect/useScrolling.mjs +3 -3
- package/lib/components/VSelect/useScrolling.mjs.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroup.mjs +3 -1
- package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
- package/lib/components/VSlideGroup/index.d.mts +6 -0
- package/lib/components/VSlider/index.d.mts +7 -6
- package/lib/components/VSnackbar/index.d.mts +3 -3
- package/lib/components/VSpeedDial/VSpeedDial.mjs +1 -1
- package/lib/components/VSpeedDial/VSpeedDial.mjs.map +1 -1
- package/lib/components/VSpeedDial/index.d.mts +28 -13
- package/lib/components/VSwitch/index.d.mts +7 -6
- package/lib/components/VTabs/index.d.mts +21 -3
- package/lib/components/VTextField/index.d.mts +19 -18
- package/lib/components/VTextarea/index.d.mts +19 -18
- package/lib/components/VTooltip/index.d.mts +3 -3
- package/lib/components/VValidation/index.d.mts +7 -6
- package/lib/components/VVirtualScroll/VVirtualScroll.mjs +2 -0
- package/lib/components/VVirtualScroll/VVirtualScroll.mjs.map +1 -1
- package/lib/components/VVirtualScroll/index.d.mts +3 -0
- package/lib/components/index.d.mts +504 -259
- package/lib/composables/layout.mjs +37 -14
- package/lib/composables/layout.mjs.map +1 -1
- package/lib/composables/nested/nested.mjs +3 -3
- package/lib/composables/nested/nested.mjs.map +1 -1
- package/lib/composables/nested/openStrategies.mjs +4 -2
- package/lib/composables/nested/openStrategies.mjs.map +1 -1
- package/lib/composables/nested/selectStrategies.mjs +5 -5
- package/lib/composables/nested/selectStrategies.mjs.map +1 -1
- package/lib/composables/validation.mjs +8 -6
- package/lib/composables/validation.mjs.map +1 -1
- package/lib/composables/virtual.mjs +1 -0
- package/lib/composables/virtual.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/entry-bundler.mjs.map +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/framework.mjs.map +1 -1
- package/lib/index.d.mts +55 -56
- package/lib/labs/VDateInput/index.d.mts +7 -6
- package/lib/labs/VNumberInput/index.d.mts +43 -42
- package/lib/labs/VPullToRefresh/VPullToRefresh.mjs +4 -3
- package/lib/labs/VPullToRefresh/VPullToRefresh.mjs.map +1 -1
- package/lib/labs/VPullToRefresh/index.d.mts +9 -0
- package/lib/labs/VSnackbarQueue/index.d.mts +3 -3
- package/lib/labs/VStepperVertical/index.d.mts +36 -0
- package/lib/labs/VTreeview/VTreeview.mjs +21 -6
- package/lib/labs/VTreeview/VTreeview.mjs.map +1 -1
- package/lib/labs/VTreeview/VTreeviewChildren.mjs +33 -10
- package/lib/labs/VTreeview/VTreeviewChildren.mjs.map +1 -1
- package/lib/labs/VTreeview/VTreeviewItem.css +1 -1
- package/lib/labs/VTreeview/VTreeviewItem.mjs +14 -74
- package/lib/labs/VTreeview/VTreeviewItem.mjs.map +1 -1
- package/lib/labs/VTreeview/VTreeviewItem.sass +2 -5
- package/lib/labs/VTreeview/index.d.mts +133 -95
- package/lib/labs/components.d.mts +193 -109
- package/lib/util/helpers.mjs +5 -0
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +2 -2
package/dist/vuetify-labs.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.
|
|
2
|
+
* Vuetify v3.7.0
|
|
3
3
|
* Forged by John Leider
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { shallowRef, Fragment, reactive, computed, watchEffect, toRefs, capitalize, isVNode, Comment,
|
|
7
|
+
import { shallowRef, Fragment, reactive, computed, watchEffect, toRefs, capitalize, isVNode, Comment, unref, warn, getCurrentInstance as getCurrentInstance$1, ref, provide, inject as inject$1, defineComponent as defineComponent$1, camelize, h, onBeforeUnmount, watch, readonly, onDeactivated, onActivated, onMounted, onScopeDispose, effectScope, toRaw, createVNode, TransitionGroup, Transition, mergeProps, isRef, toRef, onBeforeMount, nextTick, withDirectives, resolveDirective, vShow, onUpdated, Text, resolveDynamicComponent, markRaw, Teleport, cloneVNode, createTextVNode, onUnmounted, onBeforeUpdate, withModifiers, toDisplayString, vModelText, resolveComponent, render } from 'vue';
|
|
8
8
|
|
|
9
9
|
// Types
|
|
10
10
|
// eslint-disable-line vue/prefer-import-from-vue
|
|
@@ -539,16 +539,6 @@ function defer(timeout, cb) {
|
|
|
539
539
|
const timeoutId = window.setTimeout(cb, timeout);
|
|
540
540
|
return () => window.clearTimeout(timeoutId);
|
|
541
541
|
}
|
|
542
|
-
function eagerComputed(fn, options) {
|
|
543
|
-
const result = shallowRef();
|
|
544
|
-
watchEffect(() => {
|
|
545
|
-
result.value = fn();
|
|
546
|
-
}, {
|
|
547
|
-
flush: 'sync',
|
|
548
|
-
...options
|
|
549
|
-
});
|
|
550
|
-
return readonly(result);
|
|
551
|
-
}
|
|
552
542
|
function isClickInsideElement(event, targetDiv) {
|
|
553
543
|
const mouseX = event.clientX;
|
|
554
544
|
const mouseY = event.clientY;
|
|
@@ -575,6 +565,11 @@ function templateRef() {
|
|
|
575
565
|
});
|
|
576
566
|
return fn;
|
|
577
567
|
}
|
|
568
|
+
function checkPrintable(e) {
|
|
569
|
+
const isPrintableChar = e.key.length === 1;
|
|
570
|
+
const noModifier = !e.ctrlKey && !e.metaKey && !e.altKey;
|
|
571
|
+
return isPrintableChar && noModifier;
|
|
572
|
+
}
|
|
578
573
|
|
|
579
574
|
// Utilities
|
|
580
575
|
const block = ['top', 'bottom'];
|
|
@@ -1643,9 +1638,7 @@ const makeLayoutItemProps = propsFactory({
|
|
|
1643
1638
|
function useLayout() {
|
|
1644
1639
|
const layout = inject$1(VuetifyLayoutKey);
|
|
1645
1640
|
if (!layout) throw new Error('[Vuetify] Could not find injected layout');
|
|
1646
|
-
const layoutIsReady = nextTick();
|
|
1647
1641
|
return {
|
|
1648
|
-
layoutIsReady,
|
|
1649
1642
|
getLayoutItem: layout.getLayoutItem,
|
|
1650
1643
|
mainRect: layout.mainRect,
|
|
1651
1644
|
mainStyles: layout.mainStyles
|
|
@@ -1662,7 +1655,6 @@ function useLayoutItem(options) {
|
|
|
1662
1655
|
const isKeptAlive = shallowRef(false);
|
|
1663
1656
|
onDeactivated(() => isKeptAlive.value = true);
|
|
1664
1657
|
onActivated(() => isKeptAlive.value = false);
|
|
1665
|
-
const layoutIsReady = nextTick();
|
|
1666
1658
|
const {
|
|
1667
1659
|
layoutItemStyles,
|
|
1668
1660
|
layoutItemScrimStyles
|
|
@@ -1675,8 +1667,7 @@ function useLayoutItem(options) {
|
|
|
1675
1667
|
return {
|
|
1676
1668
|
layoutItemStyles,
|
|
1677
1669
|
layoutRect: layout.layoutRect,
|
|
1678
|
-
layoutItemScrimStyles
|
|
1679
|
-
layoutIsReady
|
|
1670
|
+
layoutItemScrimStyles
|
|
1680
1671
|
};
|
|
1681
1672
|
}
|
|
1682
1673
|
const generateLayers = (layout, positions, layoutSizes, activeItems) => {
|
|
@@ -1722,7 +1713,29 @@ function createLayout(props) {
|
|
|
1722
1713
|
resizeRef,
|
|
1723
1714
|
contentRect: layoutRect
|
|
1724
1715
|
} = useResizeObserver();
|
|
1725
|
-
const
|
|
1716
|
+
const computedOverlaps = computed(() => {
|
|
1717
|
+
const map = new Map();
|
|
1718
|
+
const overlaps = props.overlaps ?? [];
|
|
1719
|
+
for (const overlap of overlaps.filter(item => item.includes(':'))) {
|
|
1720
|
+
const [top, bottom] = overlap.split(':');
|
|
1721
|
+
if (!registered.value.includes(top) || !registered.value.includes(bottom)) continue;
|
|
1722
|
+
const topPosition = positions.get(top);
|
|
1723
|
+
const bottomPosition = positions.get(bottom);
|
|
1724
|
+
const topAmount = layoutSizes.get(top);
|
|
1725
|
+
const bottomAmount = layoutSizes.get(bottom);
|
|
1726
|
+
if (!topPosition || !bottomPosition || !topAmount || !bottomAmount) continue;
|
|
1727
|
+
map.set(bottom, {
|
|
1728
|
+
position: topPosition.value,
|
|
1729
|
+
amount: parseInt(topAmount.value, 10)
|
|
1730
|
+
});
|
|
1731
|
+
map.set(top, {
|
|
1732
|
+
position: bottomPosition.value,
|
|
1733
|
+
amount: -parseInt(bottomAmount.value, 10)
|
|
1734
|
+
});
|
|
1735
|
+
}
|
|
1736
|
+
return map;
|
|
1737
|
+
});
|
|
1738
|
+
const layers = computed(() => {
|
|
1726
1739
|
const uniquePriorities = [...new Set([...priorities.values()].map(p => p.value))].sort((a, b) => a - b);
|
|
1727
1740
|
const layout = [];
|
|
1728
1741
|
for (const p of uniquePriorities) {
|
|
@@ -1748,7 +1761,7 @@ function createLayout(props) {
|
|
|
1748
1761
|
})
|
|
1749
1762
|
};
|
|
1750
1763
|
});
|
|
1751
|
-
const items =
|
|
1764
|
+
const items = computed(() => {
|
|
1752
1765
|
return layers.value.slice(1).map((_ref, index) => {
|
|
1753
1766
|
let {
|
|
1754
1767
|
id
|
|
@@ -1770,7 +1783,10 @@ function createLayout(props) {
|
|
|
1770
1783
|
return items.value.find(item => item.id === id);
|
|
1771
1784
|
};
|
|
1772
1785
|
const rootVm = getCurrentInstance('createLayout');
|
|
1773
|
-
const
|
|
1786
|
+
const isMounted = shallowRef(false);
|
|
1787
|
+
onMounted(() => {
|
|
1788
|
+
isMounted.value = true;
|
|
1789
|
+
});
|
|
1774
1790
|
provide(VuetifyLayoutKey, {
|
|
1775
1791
|
register: (vm, _ref2) => {
|
|
1776
1792
|
let {
|
|
@@ -1808,9 +1824,13 @@ function createLayout(props) {
|
|
|
1808
1824
|
transition: 'none'
|
|
1809
1825
|
})
|
|
1810
1826
|
};
|
|
1811
|
-
if (
|
|
1827
|
+
if (!isMounted.value) return styles;
|
|
1812
1828
|
const item = items.value[index.value];
|
|
1813
1829
|
if (!item) throw new Error(`[Vuetify] Could not find layout item "${id}"`);
|
|
1830
|
+
const overlap = computedOverlaps.value.get(id);
|
|
1831
|
+
if (overlap) {
|
|
1832
|
+
item[overlap.position] += overlap.amount;
|
|
1833
|
+
}
|
|
1814
1834
|
return {
|
|
1815
1835
|
...styles,
|
|
1816
1836
|
height: isHorizontal ? `calc(100% - ${item.top}px - ${item.bottom}px)` : elementSize.value ? `${elementSize.value}px` : undefined,
|
|
@@ -1843,8 +1863,7 @@ function createLayout(props) {
|
|
|
1843
1863
|
getLayoutItem,
|
|
1844
1864
|
items,
|
|
1845
1865
|
layoutRect,
|
|
1846
|
-
rootZIndex
|
|
1847
|
-
layoutIsReady
|
|
1866
|
+
rootZIndex
|
|
1848
1867
|
});
|
|
1849
1868
|
const layoutClasses = computed(() => ['v-layout', {
|
|
1850
1869
|
'v-layout--full-height': props.fullHeight
|
|
@@ -1860,7 +1879,6 @@ function createLayout(props) {
|
|
|
1860
1879
|
getLayoutItem,
|
|
1861
1880
|
items,
|
|
1862
1881
|
layoutRect,
|
|
1863
|
-
layoutIsReady,
|
|
1864
1882
|
layoutRef: resizeRef
|
|
1865
1883
|
};
|
|
1866
1884
|
}
|
|
@@ -2557,9 +2575,7 @@ const VApp = genericComponent()({
|
|
|
2557
2575
|
"style": [props.style]
|
|
2558
2576
|
}, [createVNode("div", {
|
|
2559
2577
|
"class": "v-application__wrap"
|
|
2560
|
-
}, [
|
|
2561
|
-
default: () => [createVNode(Fragment, null, [slots.default?.()])]
|
|
2562
|
-
})])]));
|
|
2578
|
+
}, [slots.default?.()])]));
|
|
2563
2579
|
return {
|
|
2564
2580
|
getLayoutItem,
|
|
2565
2581
|
items,
|
|
@@ -3248,6 +3264,7 @@ const Intersect = {
|
|
|
3248
3264
|
// not intended for public use, this is passed in by vuetify-loader
|
|
3249
3265
|
|
|
3250
3266
|
const makeVImgProps = propsFactory({
|
|
3267
|
+
absolute: Boolean,
|
|
3251
3268
|
alt: String,
|
|
3252
3269
|
cover: Boolean,
|
|
3253
3270
|
color: String,
|
|
@@ -3504,6 +3521,7 @@ const VImg = genericComponent()({
|
|
|
3504
3521
|
const responsiveProps = VResponsive.filterProps(props);
|
|
3505
3522
|
return withDirectives(createVNode(VResponsive, mergeProps({
|
|
3506
3523
|
"class": ['v-img', {
|
|
3524
|
+
'v-img--absolute': props.absolute,
|
|
3507
3525
|
'v-img--booting': !isBooted.value
|
|
3508
3526
|
}, backgroundColorClasses.value, roundedClasses.value, props.class],
|
|
3509
3527
|
"style": [{
|
|
@@ -3916,8 +3934,9 @@ const VAppBar = genericComponent()({
|
|
|
3916
3934
|
const isFlat = computed(() => props.flat || scrollBehavior.value.fullyHide && !isActive.value || scrollBehavior.value.elevate && (scrollBehavior.value.inverted ? currentScroll.value > 0 : currentScroll.value === 0));
|
|
3917
3935
|
const opacity = computed(() => scrollBehavior.value.fadeImage ? scrollBehavior.value.inverted ? 1 - scrollRatio.value : scrollRatio.value : undefined);
|
|
3918
3936
|
const height = computed(() => {
|
|
3919
|
-
|
|
3920
|
-
const
|
|
3937
|
+
if (scrollBehavior.value.hide && scrollBehavior.value.inverted) return 0;
|
|
3938
|
+
const height = vToolbarRef.value?.contentHeight ?? 0;
|
|
3939
|
+
const extensionHeight = vToolbarRef.value?.extensionHeight ?? 0;
|
|
3921
3940
|
if (!canHide.value) return height + extensionHeight;
|
|
3922
3941
|
return currentScroll.value < scrollThreshold.value || scrollBehavior.value.fullyHide ? height + extensionHeight : height;
|
|
3923
3942
|
});
|
|
@@ -3938,8 +3957,7 @@ const VAppBar = genericComponent()({
|
|
|
3938
3957
|
ssrBootStyles
|
|
3939
3958
|
} = useSsrBoot();
|
|
3940
3959
|
const {
|
|
3941
|
-
layoutItemStyles
|
|
3942
|
-
layoutIsReady
|
|
3960
|
+
layoutItemStyles
|
|
3943
3961
|
} = useLayoutItem({
|
|
3944
3962
|
id: props.name,
|
|
3945
3963
|
order: computed(() => parseInt(props.order, 10)),
|
|
@@ -3967,7 +3985,7 @@ const VAppBar = genericComponent()({
|
|
|
3967
3985
|
"flat": isFlat.value
|
|
3968
3986
|
}), slots);
|
|
3969
3987
|
});
|
|
3970
|
-
return
|
|
3988
|
+
return {};
|
|
3971
3989
|
}
|
|
3972
3990
|
});
|
|
3973
3991
|
|
|
@@ -5511,6 +5529,7 @@ const makeVBtnProps = propsFactory({
|
|
|
5511
5529
|
type: Boolean,
|
|
5512
5530
|
default: undefined
|
|
5513
5531
|
},
|
|
5532
|
+
activeColor: String,
|
|
5514
5533
|
baseColor: String,
|
|
5515
5534
|
symbol: {
|
|
5516
5535
|
type: null,
|
|
@@ -5602,10 +5621,11 @@ const VBtn = genericComponent()({
|
|
|
5602
5621
|
}
|
|
5603
5622
|
return group?.isSelected.value;
|
|
5604
5623
|
});
|
|
5624
|
+
const color = computed(() => isActive.value ? props.activeColor ?? props.color : props.color);
|
|
5605
5625
|
const variantProps = computed(() => {
|
|
5606
5626
|
const showColor = group?.isSelected.value && (!link.isLink.value || link.isActive?.value) || !group || link.isActive?.value;
|
|
5607
5627
|
return {
|
|
5608
|
-
color: showColor ?
|
|
5628
|
+
color: showColor ? color.value ?? props.baseColor : props.baseColor,
|
|
5609
5629
|
variant: props.variant
|
|
5610
5630
|
};
|
|
5611
5631
|
});
|
|
@@ -5946,6 +5966,7 @@ const makeVAvatarProps = propsFactory({
|
|
|
5946
5966
|
icon: IconValue,
|
|
5947
5967
|
image: String,
|
|
5948
5968
|
text: String,
|
|
5969
|
+
...makeBorderProps(),
|
|
5949
5970
|
...makeComponentProps(),
|
|
5950
5971
|
...makeDensityProps(),
|
|
5951
5972
|
...makeRoundedProps(),
|
|
@@ -5966,6 +5987,9 @@ const VAvatar = genericComponent()({
|
|
|
5966
5987
|
const {
|
|
5967
5988
|
themeClasses
|
|
5968
5989
|
} = provideTheme(props);
|
|
5990
|
+
const {
|
|
5991
|
+
borderClasses
|
|
5992
|
+
} = useBorder(props);
|
|
5969
5993
|
const {
|
|
5970
5994
|
colorClasses,
|
|
5971
5995
|
colorStyles,
|
|
@@ -5985,7 +6009,7 @@ const VAvatar = genericComponent()({
|
|
|
5985
6009
|
"class": ['v-avatar', {
|
|
5986
6010
|
'v-avatar--start': props.start,
|
|
5987
6011
|
'v-avatar--end': props.end
|
|
5988
|
-
}, themeClasses.value, colorClasses.value, densityClasses.value, roundedClasses.value, sizeClasses.value, variantClasses.value, props.class],
|
|
6012
|
+
}, themeClasses.value, borderClasses.value, colorClasses.value, densityClasses.value, roundedClasses.value, sizeClasses.value, variantClasses.value, props.class],
|
|
5989
6013
|
"style": [colorStyles.value, sizeStyles.value, props.style]
|
|
5990
6014
|
}, {
|
|
5991
6015
|
default: () => [!slots.default ? props.image ? createVNode(VImg, {
|
|
@@ -6685,12 +6709,14 @@ function useValidation(props) {
|
|
|
6685
6709
|
const validateOn = computed(() => {
|
|
6686
6710
|
let value = (props.validateOn ?? form?.validateOn.value) || 'input';
|
|
6687
6711
|
if (value === 'lazy') value = 'input lazy';
|
|
6712
|
+
if (value === 'eager') value = 'input eager';
|
|
6688
6713
|
const set = new Set(value?.split(' ') ?? []);
|
|
6689
6714
|
return {
|
|
6690
|
-
blur: set.has('blur') || set.has('input'),
|
|
6691
6715
|
input: set.has('input'),
|
|
6692
|
-
|
|
6693
|
-
|
|
6716
|
+
blur: set.has('blur') || set.has('input') || set.has('invalid-input'),
|
|
6717
|
+
invalidInput: set.has('invalid-input'),
|
|
6718
|
+
lazy: set.has('lazy'),
|
|
6719
|
+
eager: set.has('eager')
|
|
6694
6720
|
};
|
|
6695
6721
|
});
|
|
6696
6722
|
const isValid = computed(() => {
|
|
@@ -6727,11 +6753,11 @@ function useValidation(props) {
|
|
|
6727
6753
|
});
|
|
6728
6754
|
onMounted(async () => {
|
|
6729
6755
|
if (!validateOn.value.lazy) {
|
|
6730
|
-
await validate(
|
|
6756
|
+
await validate(!validateOn.value.eager);
|
|
6731
6757
|
}
|
|
6732
6758
|
form?.update(uid.value, isValid.value, errorMessages.value);
|
|
6733
6759
|
});
|
|
6734
|
-
useToggleScope(() => validateOn.value.input, () => {
|
|
6760
|
+
useToggleScope(() => validateOn.value.input || validateOn.value.invalidInput && isValid.value === false, () => {
|
|
6735
6761
|
watch(validationModel, () => {
|
|
6736
6762
|
if (validationModel.value != null) {
|
|
6737
6763
|
validate();
|
|
@@ -6759,7 +6785,7 @@ function useValidation(props) {
|
|
|
6759
6785
|
async function resetValidation() {
|
|
6760
6786
|
isPristine.value = true;
|
|
6761
6787
|
if (!validateOn.value.lazy) {
|
|
6762
|
-
await validate(
|
|
6788
|
+
await validate(!validateOn.value.eager);
|
|
6763
6789
|
} else {
|
|
6764
6790
|
internalErrorMessages.value = [];
|
|
6765
6791
|
}
|
|
@@ -7699,7 +7725,9 @@ const VSlideGroup = genericComponent()({
|
|
|
7699
7725
|
selected: group.selected,
|
|
7700
7726
|
scrollTo,
|
|
7701
7727
|
scrollOffset,
|
|
7702
|
-
focus
|
|
7728
|
+
focus,
|
|
7729
|
+
hasPrev,
|
|
7730
|
+
hasNext
|
|
7703
7731
|
};
|
|
7704
7732
|
}
|
|
7705
7733
|
});
|
|
@@ -8169,6 +8197,7 @@ const leafSingleActiveStrategy = mandatory => {
|
|
|
8169
8197
|
return strategy;
|
|
8170
8198
|
};
|
|
8171
8199
|
|
|
8200
|
+
// Utilities
|
|
8172
8201
|
const singleOpenStrategy = {
|
|
8173
8202
|
open: _ref => {
|
|
8174
8203
|
let {
|
|
@@ -8202,11 +8231,11 @@ const multipleOpenStrategy = {
|
|
|
8202
8231
|
parents
|
|
8203
8232
|
} = _ref2;
|
|
8204
8233
|
if (value) {
|
|
8205
|
-
let parent = parents.get(id);
|
|
8234
|
+
let parent = toRaw(parents.get(id));
|
|
8206
8235
|
opened.add(id);
|
|
8207
8236
|
while (parent != null && parent !== id) {
|
|
8208
8237
|
opened.add(parent);
|
|
8209
|
-
parent = parents.get(parent);
|
|
8238
|
+
parent = toRaw(parents.get(parent));
|
|
8210
8239
|
}
|
|
8211
8240
|
return opened;
|
|
8212
8241
|
} else {
|
|
@@ -8377,18 +8406,18 @@ const classicSelectStrategy = mandatory => {
|
|
|
8377
8406
|
const items = [id];
|
|
8378
8407
|
while (items.length) {
|
|
8379
8408
|
const item = items.shift();
|
|
8380
|
-
selected.set(item, value ? 'on' : 'off');
|
|
8409
|
+
selected.set(toRaw(item), value ? 'on' : 'off');
|
|
8381
8410
|
if (children.has(item)) {
|
|
8382
8411
|
items.push(...children.get(item));
|
|
8383
8412
|
}
|
|
8384
8413
|
}
|
|
8385
|
-
let parent = parents.get(id);
|
|
8414
|
+
let parent = toRaw(parents.get(id));
|
|
8386
8415
|
while (parent) {
|
|
8387
8416
|
const childrenIds = children.get(parent);
|
|
8388
|
-
const everySelected = childrenIds.every(cid => selected.get(cid) === 'on');
|
|
8389
|
-
const noneSelected = childrenIds.every(cid => !selected.has(cid) || selected.get(cid) === 'off');
|
|
8417
|
+
const everySelected = childrenIds.every(cid => selected.get(toRaw(cid)) === 'on');
|
|
8418
|
+
const noneSelected = childrenIds.every(cid => !selected.has(toRaw(cid)) || selected.get(toRaw(cid)) === 'off');
|
|
8390
8419
|
selected.set(parent, everySelected ? 'on' : noneSelected ? 'off' : 'indeterminate');
|
|
8391
|
-
parent = parents.get(parent);
|
|
8420
|
+
parent = toRaw(parents.get(parent));
|
|
8392
8421
|
}
|
|
8393
8422
|
|
|
8394
8423
|
// If mandatory and planned deselect results in no selected
|
|
@@ -8466,7 +8495,7 @@ const useNested = props => {
|
|
|
8466
8495
|
let isUnmounted = false;
|
|
8467
8496
|
const children = ref(new Map());
|
|
8468
8497
|
const parents = ref(new Map());
|
|
8469
|
-
const opened = useProxiedModel(props, 'opened', props.opened, v => new Set(v), v => [...v.values()]);
|
|
8498
|
+
const opened = useProxiedModel(props, 'opened', props.opened, v => new Set(toRaw(v)), v => [...v.values()]);
|
|
8470
8499
|
const activeStrategy = computed(() => {
|
|
8471
8500
|
if (typeof props.activeStrategy === 'object') return props.activeStrategy;
|
|
8472
8501
|
if (typeof props.activeStrategy === 'function') return props.activeStrategy(props.mandatory);
|
|
@@ -8639,9 +8668,9 @@ const useNestedItem = (id, isGroup) => {
|
|
|
8639
8668
|
const item = {
|
|
8640
8669
|
...parent,
|
|
8641
8670
|
id: computedId,
|
|
8642
|
-
open: (open, e) => parent.root.open(computedId.value, open, e),
|
|
8671
|
+
open: (open, e) => parent.root.open(toRaw(computedId.value), open, e),
|
|
8643
8672
|
openOnSelect: (open, e) => parent.root.openOnSelect(computedId.value, open, e),
|
|
8644
|
-
isOpen: computed(() => parent.root.opened.value.has(computedId.value)),
|
|
8673
|
+
isOpen: computed(() => parent.root.opened.value.has(toRaw(computedId.value))),
|
|
8645
8674
|
parent: computed(() => parent.root.parents.value.get(computedId.value)),
|
|
8646
8675
|
activate: (activated, e) => parent.root.activate(computedId.value, activated, e),
|
|
8647
8676
|
isActivated: computed(() => parent.root.activated.value.has(toRaw(computedId.value))),
|
|
@@ -8865,6 +8894,7 @@ const VListItem = genericComponent()({
|
|
|
8865
8894
|
activate,
|
|
8866
8895
|
isActivated,
|
|
8867
8896
|
select,
|
|
8897
|
+
isOpen,
|
|
8868
8898
|
isSelected,
|
|
8869
8899
|
isIndeterminate,
|
|
8870
8900
|
isGroupActivator,
|
|
@@ -8919,6 +8949,7 @@ const VListItem = genericComponent()({
|
|
|
8919
8949
|
const slotProps = computed(() => ({
|
|
8920
8950
|
isActive: isActive.value,
|
|
8921
8951
|
select,
|
|
8952
|
+
isOpen: isOpen.value,
|
|
8922
8953
|
isSelected: isSelected.value,
|
|
8923
8954
|
isIndeterminate: isIndeterminate.value
|
|
8924
8955
|
}));
|
|
@@ -8938,7 +8969,7 @@ const VListItem = genericComponent()({
|
|
|
8938
8969
|
function onKeyDown(e) {
|
|
8939
8970
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
8940
8971
|
e.preventDefault();
|
|
8941
|
-
|
|
8972
|
+
e.target.dispatchEvent(new MouseEvent('click', e));
|
|
8942
8973
|
}
|
|
8943
8974
|
}
|
|
8944
8975
|
useRender(() => {
|
|
@@ -9728,12 +9759,6 @@ function getIntrinsicSize(el, isRtl) {
|
|
|
9728
9759
|
// el.style.removeProperty('max-width')
|
|
9729
9760
|
// el.style.removeProperty('max-height')
|
|
9730
9761
|
|
|
9731
|
-
if (isRtl) {
|
|
9732
|
-
el.style.removeProperty('left');
|
|
9733
|
-
} else {
|
|
9734
|
-
el.style.removeProperty('right');
|
|
9735
|
-
}
|
|
9736
|
-
|
|
9737
9762
|
/* eslint-disable-next-line sonarjs/prefer-immediate-return */
|
|
9738
9763
|
const contentBox = nullifyTransforms(el);
|
|
9739
9764
|
if (isRtl) {
|
|
@@ -10261,7 +10286,8 @@ const makeActivatorProps = propsFactory({
|
|
|
10261
10286
|
function useActivator(props, _ref) {
|
|
10262
10287
|
let {
|
|
10263
10288
|
isActive,
|
|
10264
|
-
isTop
|
|
10289
|
+
isTop,
|
|
10290
|
+
contentEl
|
|
10265
10291
|
} = _ref;
|
|
10266
10292
|
const vm = getCurrentInstance('useActivator');
|
|
10267
10293
|
const activatorEl = ref();
|
|
@@ -10378,7 +10404,7 @@ function useActivator(props, _ref) {
|
|
|
10378
10404
|
return events;
|
|
10379
10405
|
});
|
|
10380
10406
|
watch(isTop, val => {
|
|
10381
|
-
if (val && (props.openOnHover && !isHovered && (!openOnFocus.value || !isFocused) || openOnFocus.value && !isFocused && (!props.openOnHover || !isHovered))) {
|
|
10407
|
+
if (val && (props.openOnHover && !isHovered && (!openOnFocus.value || !isFocused) || openOnFocus.value && !isFocused && (!props.openOnHover || !isHovered)) && !contentEl.value?.contains(document.activeElement)) {
|
|
10382
10408
|
isActive.value = false;
|
|
10383
10409
|
}
|
|
10384
10410
|
});
|
|
@@ -10788,6 +10814,9 @@ const VOverlay = genericComponent()({
|
|
|
10788
10814
|
emit
|
|
10789
10815
|
} = _ref;
|
|
10790
10816
|
const vm = getCurrentInstance('VOverlay');
|
|
10817
|
+
const root = ref();
|
|
10818
|
+
const scrimEl = ref();
|
|
10819
|
+
const contentEl = ref();
|
|
10791
10820
|
const model = useProxiedModel(props, 'modelValue');
|
|
10792
10821
|
const isActive = computed({
|
|
10793
10822
|
get: () => model.value,
|
|
@@ -10825,7 +10854,8 @@ const VOverlay = genericComponent()({
|
|
|
10825
10854
|
scrimEvents
|
|
10826
10855
|
} = useActivator(props, {
|
|
10827
10856
|
isActive,
|
|
10828
|
-
isTop: localTop
|
|
10857
|
+
isTop: localTop,
|
|
10858
|
+
contentEl
|
|
10829
10859
|
});
|
|
10830
10860
|
const {
|
|
10831
10861
|
teleportTarget
|
|
@@ -10846,9 +10876,6 @@ const VOverlay = genericComponent()({
|
|
|
10846
10876
|
watch(() => props.disabled, v => {
|
|
10847
10877
|
if (v) isActive.value = false;
|
|
10848
10878
|
});
|
|
10849
|
-
const root = ref();
|
|
10850
|
-
const scrimEl = ref();
|
|
10851
|
-
const contentEl = ref();
|
|
10852
10879
|
const {
|
|
10853
10880
|
contentStyles,
|
|
10854
10881
|
updateLocation
|
|
@@ -11099,10 +11126,12 @@ const makeVMenuProps = propsFactory({
|
|
|
11099
11126
|
// TODO
|
|
11100
11127
|
// disableKeys: Boolean,
|
|
11101
11128
|
id: String,
|
|
11129
|
+
submenu: Boolean,
|
|
11102
11130
|
...omit(makeVOverlayProps({
|
|
11103
11131
|
closeDelay: 250,
|
|
11104
11132
|
closeOnContentClick: true,
|
|
11105
11133
|
locationStrategy: 'connected',
|
|
11134
|
+
location: undefined,
|
|
11106
11135
|
openDelay: 300,
|
|
11107
11136
|
scrim: false,
|
|
11108
11137
|
scrollStrategy: 'reposition',
|
|
@@ -11125,27 +11154,32 @@ const VMenu = genericComponent()({
|
|
|
11125
11154
|
const {
|
|
11126
11155
|
scopeId
|
|
11127
11156
|
} = useScopeId();
|
|
11157
|
+
const {
|
|
11158
|
+
isRtl
|
|
11159
|
+
} = useRtl();
|
|
11128
11160
|
const uid = getUid();
|
|
11129
11161
|
const id = computed(() => props.id || `v-menu-${uid}`);
|
|
11130
11162
|
const overlay = ref();
|
|
11131
11163
|
const parent = inject$1(VMenuSymbol, null);
|
|
11132
|
-
const openChildren = shallowRef(
|
|
11164
|
+
const openChildren = shallowRef(new Set());
|
|
11133
11165
|
provide(VMenuSymbol, {
|
|
11134
11166
|
register() {
|
|
11135
|
-
|
|
11167
|
+
openChildren.value.add(uid);
|
|
11136
11168
|
},
|
|
11137
11169
|
unregister() {
|
|
11138
|
-
|
|
11170
|
+
openChildren.value.delete(uid);
|
|
11139
11171
|
},
|
|
11140
11172
|
closeParents(e) {
|
|
11141
11173
|
setTimeout(() => {
|
|
11142
|
-
if (!openChildren.value && !props.persistent && (e == null || overlay.value?.contentEl && !isClickInsideElement(e, overlay.value.contentEl))) {
|
|
11174
|
+
if (!openChildren.value.size && !props.persistent && (e == null || overlay.value?.contentEl && !isClickInsideElement(e, overlay.value.contentEl))) {
|
|
11143
11175
|
isActive.value = false;
|
|
11144
11176
|
parent?.closeParents();
|
|
11145
11177
|
}
|
|
11146
11178
|
}, 40);
|
|
11147
11179
|
}
|
|
11148
11180
|
});
|
|
11181
|
+
onBeforeUnmount(() => parent?.unregister());
|
|
11182
|
+
onDeactivated(() => isActive.value = false);
|
|
11149
11183
|
async function onFocusIn(e) {
|
|
11150
11184
|
const before = e.relatedTarget;
|
|
11151
11185
|
const after = e.target;
|
|
@@ -11185,9 +11219,9 @@ const VMenu = genericComponent()({
|
|
|
11185
11219
|
isActive.value = false;
|
|
11186
11220
|
overlay.value?.activatorEl?.focus();
|
|
11187
11221
|
}
|
|
11188
|
-
} else if (
|
|
11222
|
+
} else if (props.submenu && e.key === (isRtl.value ? 'ArrowRight' : 'ArrowLeft')) {
|
|
11189
11223
|
isActive.value = false;
|
|
11190
|
-
|
|
11224
|
+
overlay.value?.activatorEl?.focus();
|
|
11191
11225
|
}
|
|
11192
11226
|
}
|
|
11193
11227
|
function onActivatorKeydown(e) {
|
|
@@ -11196,12 +11230,21 @@ const VMenu = genericComponent()({
|
|
|
11196
11230
|
if (el && isActive.value) {
|
|
11197
11231
|
if (e.key === 'ArrowDown') {
|
|
11198
11232
|
e.preventDefault();
|
|
11233
|
+
e.stopImmediatePropagation();
|
|
11199
11234
|
focusChild(el, 'next');
|
|
11200
11235
|
} else if (e.key === 'ArrowUp') {
|
|
11201
11236
|
e.preventDefault();
|
|
11237
|
+
e.stopImmediatePropagation();
|
|
11202
11238
|
focusChild(el, 'prev');
|
|
11239
|
+
} else if (props.submenu) {
|
|
11240
|
+
if (e.key === (isRtl.value ? 'ArrowRight' : 'ArrowLeft')) {
|
|
11241
|
+
isActive.value = false;
|
|
11242
|
+
} else if (e.key === (isRtl.value ? 'ArrowLeft' : 'ArrowRight')) {
|
|
11243
|
+
e.preventDefault();
|
|
11244
|
+
focusChild(el, 'first');
|
|
11245
|
+
}
|
|
11203
11246
|
}
|
|
11204
|
-
} else if (['ArrowDown', 'ArrowUp'].includes(e.key)) {
|
|
11247
|
+
} else if (props.submenu ? e.key === (isRtl.value ? 'ArrowLeft' : 'ArrowRight') : ['ArrowDown', 'ArrowUp'].includes(e.key)) {
|
|
11205
11248
|
isActive.value = true;
|
|
11206
11249
|
e.preventDefault();
|
|
11207
11250
|
setTimeout(() => setTimeout(() => onActivatorKeydown(e)));
|
|
@@ -11225,6 +11268,7 @@ const VMenu = genericComponent()({
|
|
|
11225
11268
|
"onUpdate:modelValue": $event => isActive.value = $event,
|
|
11226
11269
|
"absolute": true,
|
|
11227
11270
|
"activatorProps": activatorProps.value,
|
|
11271
|
+
"location": props.location ?? (props.submenu ? 'end' : 'bottom'),
|
|
11228
11272
|
"onClick:outside": onClickOutside,
|
|
11229
11273
|
"onKeydown": onKeydown
|
|
11230
11274
|
}, scopeId), {
|
|
@@ -12057,6 +12101,7 @@ function useVirtual(props, items) {
|
|
|
12057
12101
|
deep: true
|
|
12058
12102
|
});
|
|
12059
12103
|
return {
|
|
12104
|
+
calculateVisibleItems,
|
|
12060
12105
|
containerRef,
|
|
12061
12106
|
markerRef,
|
|
12062
12107
|
computedItems,
|
|
@@ -12120,6 +12165,7 @@ const VVirtualScroll = genericComponent()({
|
|
|
12120
12165
|
dimensionStyles
|
|
12121
12166
|
} = useDimension(props);
|
|
12122
12167
|
const {
|
|
12168
|
+
calculateVisibleItems,
|
|
12123
12169
|
containerRef,
|
|
12124
12170
|
markerRef,
|
|
12125
12171
|
handleScroll,
|
|
@@ -12191,6 +12237,7 @@ const VVirtualScroll = genericComponent()({
|
|
|
12191
12237
|
}, [children])]);
|
|
12192
12238
|
});
|
|
12193
12239
|
return {
|
|
12240
|
+
calculateVisibleItems,
|
|
12194
12241
|
scrollToIndex
|
|
12195
12242
|
};
|
|
12196
12243
|
}
|
|
@@ -12259,9 +12306,9 @@ function useScrolling(listRef, textFieldRef) {
|
|
|
12259
12306
|
}
|
|
12260
12307
|
}
|
|
12261
12308
|
return {
|
|
12262
|
-
onListScroll,
|
|
12263
|
-
onListKeydown
|
|
12264
|
-
};
|
|
12309
|
+
onScrollPassive: onListScroll,
|
|
12310
|
+
onKeydown: onListKeydown
|
|
12311
|
+
}; // typescript doesn't know about vue's event merging
|
|
12265
12312
|
}
|
|
12266
12313
|
|
|
12267
12314
|
// Types
|
|
@@ -12336,7 +12383,7 @@ const VSelect = genericComponent()({
|
|
|
12336
12383
|
const menu = computed({
|
|
12337
12384
|
get: () => _menu.value,
|
|
12338
12385
|
set: v => {
|
|
12339
|
-
if (_menu.value && !v && vMenuRef.value?.ΨopenChildren) return;
|
|
12386
|
+
if (_menu.value && !v && vMenuRef.value?.ΨopenChildren.size) return;
|
|
12340
12387
|
_menu.value = v;
|
|
12341
12388
|
}
|
|
12342
12389
|
});
|
|
@@ -12375,10 +12422,7 @@ const VSelect = genericComponent()({
|
|
|
12375
12422
|
};
|
|
12376
12423
|
});
|
|
12377
12424
|
const listRef = ref();
|
|
12378
|
-
const
|
|
12379
|
-
onListScroll,
|
|
12380
|
-
onListKeydown
|
|
12381
|
-
} = useScrolling(listRef, vTextFieldRef);
|
|
12425
|
+
const listEvents = useScrolling(listRef, vTextFieldRef);
|
|
12382
12426
|
function onClear(e) {
|
|
12383
12427
|
if (props.openOnClear) {
|
|
12384
12428
|
menu.value = true;
|
|
@@ -12388,6 +12432,11 @@ const VSelect = genericComponent()({
|
|
|
12388
12432
|
if (menuDisabled.value) return;
|
|
12389
12433
|
menu.value = !menu.value;
|
|
12390
12434
|
}
|
|
12435
|
+
function onListKeydown(e) {
|
|
12436
|
+
if (checkPrintable(e)) {
|
|
12437
|
+
onKeydown(e);
|
|
12438
|
+
}
|
|
12439
|
+
}
|
|
12391
12440
|
function onKeydown(e) {
|
|
12392
12441
|
if (!e.key || props.readonly || form?.isReadonly.value) return;
|
|
12393
12442
|
if (['Enter', ' ', 'ArrowDown', 'ArrowUp', 'Home', 'End'].includes(e.key)) {
|
|
@@ -12408,11 +12457,6 @@ const VSelect = genericComponent()({
|
|
|
12408
12457
|
// html select hotkeys
|
|
12409
12458
|
const KEYBOARD_LOOKUP_THRESHOLD = 1000; // milliseconds
|
|
12410
12459
|
|
|
12411
|
-
function checkPrintable(e) {
|
|
12412
|
-
const isPrintableChar = e.key.length === 1;
|
|
12413
|
-
const noModifier = !e.ctrlKey && !e.metaKey && !e.altKey;
|
|
12414
|
-
return isPrintableChar && noModifier;
|
|
12415
|
-
}
|
|
12416
12460
|
if (props.multiple || !checkPrintable(e)) return;
|
|
12417
12461
|
const now = performance.now();
|
|
12418
12462
|
if (now - keyboardLookupLastTime > KEYBOARD_LOOKUP_THRESHOLD) {
|
|
@@ -12457,6 +12501,11 @@ const VSelect = genericComponent()({
|
|
|
12457
12501
|
menu.value = false;
|
|
12458
12502
|
}
|
|
12459
12503
|
}
|
|
12504
|
+
function onAfterEnter() {
|
|
12505
|
+
if (props.eager) {
|
|
12506
|
+
vVirtualScrollRef.value?.calculateVisibleItems();
|
|
12507
|
+
}
|
|
12508
|
+
}
|
|
12460
12509
|
function onAfterLeave() {
|
|
12461
12510
|
if (isFocused.value) {
|
|
12462
12511
|
vTextFieldRef.value?.focus();
|
|
@@ -12535,6 +12584,7 @@ const VSelect = genericComponent()({
|
|
|
12535
12584
|
"openOnClick": false,
|
|
12536
12585
|
"closeOnContentClick": false,
|
|
12537
12586
|
"transition": props.transition,
|
|
12587
|
+
"onAfterEnter": onAfterEnter,
|
|
12538
12588
|
"onAfterLeave": onAfterLeave
|
|
12539
12589
|
}, computedMenuProps.value), {
|
|
12540
12590
|
default: () => [hasList && createVNode(VList, mergeProps({
|
|
@@ -12544,11 +12594,10 @@ const VSelect = genericComponent()({
|
|
|
12544
12594
|
"onMousedown": e => e.preventDefault(),
|
|
12545
12595
|
"onKeydown": onListKeydown,
|
|
12546
12596
|
"onFocusin": onFocusin,
|
|
12547
|
-
"onScrollPassive": onListScroll,
|
|
12548
12597
|
"tabindex": "-1",
|
|
12549
12598
|
"aria-live": "polite",
|
|
12550
12599
|
"color": props.itemColor ?? props.color
|
|
12551
|
-
}, props.listProps), {
|
|
12600
|
+
}, listEvents, props.listProps), {
|
|
12552
12601
|
default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? createVNode(VListItem, {
|
|
12553
12602
|
"title": t(props.noDataText)
|
|
12554
12603
|
}, null)), createVNode(VVirtualScroll, {
|
|
@@ -12843,7 +12892,7 @@ const VAutocomplete = genericComponent()({
|
|
|
12843
12892
|
const menu = computed({
|
|
12844
12893
|
get: () => _menu.value,
|
|
12845
12894
|
set: v => {
|
|
12846
|
-
if (_menu.value && !v && vMenuRef.value?.ΨopenChildren) return;
|
|
12895
|
+
if (_menu.value && !v && vMenuRef.value?.ΨopenChildren.size) return;
|
|
12847
12896
|
_menu.value = v;
|
|
12848
12897
|
}
|
|
12849
12898
|
});
|
|
@@ -12887,10 +12936,7 @@ const VAutocomplete = genericComponent()({
|
|
|
12887
12936
|
});
|
|
12888
12937
|
const menuDisabled = computed(() => props.hideNoData && !displayItems.value.length || props.readonly || form?.isReadonly.value);
|
|
12889
12938
|
const listRef = ref();
|
|
12890
|
-
const
|
|
12891
|
-
onListScroll,
|
|
12892
|
-
onListKeydown
|
|
12893
|
-
} = useScrolling(listRef, vTextFieldRef);
|
|
12939
|
+
const listEvents = useScrolling(listRef, vTextFieldRef);
|
|
12894
12940
|
function onClear(e) {
|
|
12895
12941
|
if (props.openOnClear) {
|
|
12896
12942
|
menu.value = true;
|
|
@@ -12909,6 +12955,11 @@ const VAutocomplete = genericComponent()({
|
|
|
12909
12955
|
}
|
|
12910
12956
|
menu.value = !menu.value;
|
|
12911
12957
|
}
|
|
12958
|
+
function onListKeydown(e) {
|
|
12959
|
+
if (checkPrintable(e)) {
|
|
12960
|
+
vTextFieldRef.value?.focus();
|
|
12961
|
+
}
|
|
12962
|
+
}
|
|
12912
12963
|
function onKeydown(e) {
|
|
12913
12964
|
if (props.readonly || form?.isReadonly.value) return;
|
|
12914
12965
|
const selectionStart = vTextFieldRef.value.selectionStart;
|
|
@@ -12973,6 +13024,11 @@ const VAutocomplete = genericComponent()({
|
|
|
12973
13024
|
}
|
|
12974
13025
|
}
|
|
12975
13026
|
}
|
|
13027
|
+
function onAfterEnter() {
|
|
13028
|
+
if (props.eager) {
|
|
13029
|
+
vVirtualScrollRef.value?.calculateVisibleItems();
|
|
13030
|
+
}
|
|
13031
|
+
}
|
|
12976
13032
|
function onAfterLeave() {
|
|
12977
13033
|
if (isFocused.value) {
|
|
12978
13034
|
isPristine.value = true;
|
|
@@ -13101,6 +13157,7 @@ const VAutocomplete = genericComponent()({
|
|
|
13101
13157
|
"openOnClick": false,
|
|
13102
13158
|
"closeOnContentClick": false,
|
|
13103
13159
|
"transition": props.transition,
|
|
13160
|
+
"onAfterEnter": onAfterEnter,
|
|
13104
13161
|
"onAfterLeave": onAfterLeave
|
|
13105
13162
|
}, props.menuProps), {
|
|
13106
13163
|
default: () => [hasList && createVNode(VList, mergeProps({
|
|
@@ -13111,11 +13168,10 @@ const VAutocomplete = genericComponent()({
|
|
|
13111
13168
|
"onKeydown": onListKeydown,
|
|
13112
13169
|
"onFocusin": onFocusin,
|
|
13113
13170
|
"onFocusout": onFocusout,
|
|
13114
|
-
"onScrollPassive": onListScroll,
|
|
13115
13171
|
"tabindex": "-1",
|
|
13116
13172
|
"aria-live": "polite",
|
|
13117
13173
|
"color": props.itemColor ?? props.color
|
|
13118
|
-
}, props.listProps), {
|
|
13174
|
+
}, listEvents, props.listProps), {
|
|
13119
13175
|
default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? createVNode(VListItem, {
|
|
13120
13176
|
"title": t(props.noDataText)
|
|
13121
13177
|
}, null)), createVNode(VVirtualScroll, {
|
|
@@ -13565,8 +13621,7 @@ const VBottomNavigation = genericComponent()({
|
|
|
13565
13621
|
const height = computed(() => Number(props.height) - (props.density === 'comfortable' ? 8 : 0) - (props.density === 'compact' ? 16 : 0));
|
|
13566
13622
|
const isActive = useProxiedModel(props, 'active', props.active);
|
|
13567
13623
|
const {
|
|
13568
|
-
layoutItemStyles
|
|
13569
|
-
layoutIsReady
|
|
13624
|
+
layoutItemStyles
|
|
13570
13625
|
} = useLayoutItem({
|
|
13571
13626
|
id: props.name,
|
|
13572
13627
|
order: computed(() => parseInt(props.order, 10)),
|
|
@@ -13604,7 +13659,7 @@ const VBottomNavigation = genericComponent()({
|
|
|
13604
13659
|
}, [slots.default()])]
|
|
13605
13660
|
});
|
|
13606
13661
|
});
|
|
13607
|
-
return
|
|
13662
|
+
return {};
|
|
13608
13663
|
}
|
|
13609
13664
|
});
|
|
13610
13665
|
|
|
@@ -16676,7 +16731,7 @@ const VCombobox = genericComponent()({
|
|
|
16676
16731
|
const menu = computed({
|
|
16677
16732
|
get: () => _menu.value,
|
|
16678
16733
|
set: v => {
|
|
16679
|
-
if (_menu.value && !v && vMenuRef.value?.ΨopenChildren) return;
|
|
16734
|
+
if (_menu.value && !v && vMenuRef.value?.ΨopenChildren.size) return;
|
|
16680
16735
|
_menu.value = v;
|
|
16681
16736
|
}
|
|
16682
16737
|
});
|
|
@@ -16759,10 +16814,7 @@ const VCombobox = genericComponent()({
|
|
|
16759
16814
|
});
|
|
16760
16815
|
const menuDisabled = computed(() => props.hideNoData && !displayItems.value.length || props.readonly || form?.isReadonly.value);
|
|
16761
16816
|
const listRef = ref();
|
|
16762
|
-
const
|
|
16763
|
-
onListScroll,
|
|
16764
|
-
onListKeydown
|
|
16765
|
-
} = useScrolling(listRef, vTextFieldRef);
|
|
16817
|
+
const listEvents = useScrolling(listRef, vTextFieldRef);
|
|
16766
16818
|
function onClear(e) {
|
|
16767
16819
|
cleared = true;
|
|
16768
16820
|
if (props.openOnClear) {
|
|
@@ -16781,6 +16833,11 @@ const VCombobox = genericComponent()({
|
|
|
16781
16833
|
}
|
|
16782
16834
|
menu.value = !menu.value;
|
|
16783
16835
|
}
|
|
16836
|
+
function onListKeydown(e) {
|
|
16837
|
+
if (checkPrintable(e)) {
|
|
16838
|
+
vTextFieldRef.value?.focus();
|
|
16839
|
+
}
|
|
16840
|
+
}
|
|
16784
16841
|
// eslint-disable-next-line complexity
|
|
16785
16842
|
function onKeydown(e) {
|
|
16786
16843
|
if (isComposingIgnoreKey(e) || props.readonly || form?.isReadonly.value) return;
|
|
@@ -16845,6 +16902,11 @@ const VCombobox = genericComponent()({
|
|
|
16845
16902
|
}
|
|
16846
16903
|
}
|
|
16847
16904
|
}
|
|
16905
|
+
function onAfterEnter() {
|
|
16906
|
+
if (props.eager) {
|
|
16907
|
+
vVirtualScrollRef.value?.calculateVisibleItems();
|
|
16908
|
+
}
|
|
16909
|
+
}
|
|
16848
16910
|
function onAfterLeave() {
|
|
16849
16911
|
if (isFocused.value) {
|
|
16850
16912
|
isPristine.value = true;
|
|
@@ -16969,6 +17031,7 @@ const VCombobox = genericComponent()({
|
|
|
16969
17031
|
"openOnClick": false,
|
|
16970
17032
|
"closeOnContentClick": false,
|
|
16971
17033
|
"transition": props.transition,
|
|
17034
|
+
"onAfterEnter": onAfterEnter,
|
|
16972
17035
|
"onAfterLeave": onAfterLeave
|
|
16973
17036
|
}, props.menuProps), {
|
|
16974
17037
|
default: () => [hasList && createVNode(VList, mergeProps({
|
|
@@ -16979,11 +17042,10 @@ const VCombobox = genericComponent()({
|
|
|
16979
17042
|
"onKeydown": onListKeydown,
|
|
16980
17043
|
"onFocusin": onFocusin,
|
|
16981
17044
|
"onFocusout": onFocusout,
|
|
16982
|
-
"onScrollPassive": onListScroll,
|
|
16983
17045
|
"tabindex": "-1",
|
|
16984
17046
|
"aria-live": "polite",
|
|
16985
17047
|
"color": props.itemColor ?? props.color
|
|
16986
|
-
}, props.listProps), {
|
|
17048
|
+
}, listEvents, props.listProps), {
|
|
16987
17049
|
default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? createVNode(VListItem, {
|
|
16988
17050
|
"title": t(props.noDataText)
|
|
16989
17051
|
}, null)), createVNode(VVirtualScroll, {
|
|
@@ -20927,6 +20989,7 @@ const makeVContainerProps = propsFactory({
|
|
|
20927
20989
|
default: false
|
|
20928
20990
|
},
|
|
20929
20991
|
...makeComponentProps(),
|
|
20992
|
+
...makeDimensionProps(),
|
|
20930
20993
|
...makeTagProps()
|
|
20931
20994
|
}, 'VContainer');
|
|
20932
20995
|
const VContainer = genericComponent()({
|
|
@@ -20939,11 +21002,14 @@ const VContainer = genericComponent()({
|
|
|
20939
21002
|
const {
|
|
20940
21003
|
rtlClasses
|
|
20941
21004
|
} = useRtl();
|
|
21005
|
+
const {
|
|
21006
|
+
dimensionStyles
|
|
21007
|
+
} = useDimension(props);
|
|
20942
21008
|
useRender(() => createVNode(props.tag, {
|
|
20943
21009
|
"class": ['v-container', {
|
|
20944
21010
|
'v-container--fluid': props.fluid
|
|
20945
21011
|
}, rtlClasses.value, props.class],
|
|
20946
|
-
"style": props.style
|
|
21012
|
+
"style": [dimensionStyles.value, props.style]
|
|
20947
21013
|
}, slots));
|
|
20948
21014
|
return {};
|
|
20949
21015
|
}
|
|
@@ -22365,7 +22431,8 @@ const makeVExpansionPanelTitleProps = propsFactory({
|
|
|
22365
22431
|
default: false
|
|
22366
22432
|
},
|
|
22367
22433
|
readonly: Boolean,
|
|
22368
|
-
...makeComponentProps()
|
|
22434
|
+
...makeComponentProps(),
|
|
22435
|
+
...makeDimensionProps()
|
|
22369
22436
|
}, 'VExpansionPanelTitle');
|
|
22370
22437
|
const VExpansionPanelTitle = genericComponent()({
|
|
22371
22438
|
name: 'VExpansionPanelTitle',
|
|
@@ -22383,6 +22450,9 @@ const VExpansionPanelTitle = genericComponent()({
|
|
|
22383
22450
|
backgroundColorClasses,
|
|
22384
22451
|
backgroundColorStyles
|
|
22385
22452
|
} = useBackgroundColor(props, 'color');
|
|
22453
|
+
const {
|
|
22454
|
+
dimensionStyles
|
|
22455
|
+
} = useDimension(props);
|
|
22386
22456
|
const slotProps = computed(() => ({
|
|
22387
22457
|
collapseIcon: props.collapseIcon,
|
|
22388
22458
|
disabled: expansionPanel.disabled.value,
|
|
@@ -22397,7 +22467,7 @@ const VExpansionPanelTitle = genericComponent()({
|
|
|
22397
22467
|
'v-expansion-panel-title--focusable': props.focusable,
|
|
22398
22468
|
'v-expansion-panel-title--static': props.static
|
|
22399
22469
|
}, backgroundColorClasses.value, props.class],
|
|
22400
|
-
"style": [backgroundColorStyles.value, props.style],
|
|
22470
|
+
"style": [backgroundColorStyles.value, dimensionStyles.value, props.style],
|
|
22401
22471
|
"type": "button",
|
|
22402
22472
|
"tabindex": expansionPanel.disabled.value ? -1 : undefined,
|
|
22403
22473
|
"disabled": expansionPanel.disabled.value,
|
|
@@ -22920,7 +22990,6 @@ const VFooter = genericComponent()({
|
|
|
22920
22990
|
slots
|
|
22921
22991
|
} = _ref;
|
|
22922
22992
|
const layoutItemStyles = ref();
|
|
22923
|
-
const layoutIsReady = shallowRef();
|
|
22924
22993
|
const {
|
|
22925
22994
|
themeClasses
|
|
22926
22995
|
} = provideTheme(props);
|
|
@@ -22957,7 +23026,6 @@ const VFooter = genericComponent()({
|
|
|
22957
23026
|
});
|
|
22958
23027
|
watchEffect(() => {
|
|
22959
23028
|
layoutItemStyles.value = layout.layoutItemStyles.value;
|
|
22960
|
-
layoutIsReady.value = layout.layoutIsReady;
|
|
22961
23029
|
});
|
|
22962
23030
|
});
|
|
22963
23031
|
useRender(() => createVNode(props.tag, {
|
|
@@ -22967,7 +23035,7 @@ const VFooter = genericComponent()({
|
|
|
22967
23035
|
height: convertToUnit(props.height)
|
|
22968
23036
|
}, props.style]
|
|
22969
23037
|
}, slots));
|
|
22970
|
-
return
|
|
23038
|
+
return {};
|
|
22971
23039
|
}
|
|
22972
23040
|
});
|
|
22973
23041
|
|
|
@@ -23394,9 +23462,7 @@ const VLayout = genericComponent()({
|
|
|
23394
23462
|
"ref": layoutRef,
|
|
23395
23463
|
"class": [layoutClasses.value, props.class],
|
|
23396
23464
|
"style": [dimensionStyles.value, layoutStyles.value, props.style]
|
|
23397
|
-
}, [
|
|
23398
|
-
default: () => [createVNode(Fragment, null, [slots.default?.()])]
|
|
23399
|
-
})]));
|
|
23465
|
+
}, [slots.default?.()]));
|
|
23400
23466
|
return {
|
|
23401
23467
|
getLayoutItem,
|
|
23402
23468
|
items
|
|
@@ -23427,8 +23493,7 @@ const VLayoutItem = genericComponent()({
|
|
|
23427
23493
|
slots
|
|
23428
23494
|
} = _ref;
|
|
23429
23495
|
const {
|
|
23430
|
-
layoutItemStyles
|
|
23431
|
-
layoutIsReady
|
|
23496
|
+
layoutItemStyles
|
|
23432
23497
|
} = useLayoutItem({
|
|
23433
23498
|
id: props.name,
|
|
23434
23499
|
order: computed(() => parseInt(props.order, 10)),
|
|
@@ -23438,11 +23503,10 @@ const VLayoutItem = genericComponent()({
|
|
|
23438
23503
|
active: toRef(props, 'modelValue'),
|
|
23439
23504
|
absolute: toRef(props, 'absolute')
|
|
23440
23505
|
});
|
|
23441
|
-
|
|
23506
|
+
return () => createVNode("div", {
|
|
23442
23507
|
"class": ['v-layout-item', props.class],
|
|
23443
23508
|
"style": [layoutItemStyles.value, props.style]
|
|
23444
|
-
}, [slots.default?.()])
|
|
23445
|
-
return layoutIsReady;
|
|
23509
|
+
}, [slots.default?.()]);
|
|
23446
23510
|
}
|
|
23447
23511
|
});
|
|
23448
23512
|
|
|
@@ -23553,8 +23617,7 @@ const VMain = genericComponent()({
|
|
|
23553
23617
|
dimensionStyles
|
|
23554
23618
|
} = useDimension(props);
|
|
23555
23619
|
const {
|
|
23556
|
-
mainStyles
|
|
23557
|
-
layoutIsReady
|
|
23620
|
+
mainStyles
|
|
23558
23621
|
} = useLayout();
|
|
23559
23622
|
const {
|
|
23560
23623
|
ssrBootStyles
|
|
@@ -23569,7 +23632,7 @@ const VMain = genericComponent()({
|
|
|
23569
23632
|
"class": "v-main__scroller"
|
|
23570
23633
|
}, [slots.default?.()]) : slots.default?.()]
|
|
23571
23634
|
}));
|
|
23572
|
-
return
|
|
23635
|
+
return {};
|
|
23573
23636
|
}
|
|
23574
23637
|
});
|
|
23575
23638
|
|
|
@@ -24039,8 +24102,7 @@ const VNavigationDrawer = genericComponent()({
|
|
|
24039
24102
|
const elementSize = computed(() => ['top', 'bottom'].includes(props.location) ? 0 : width.value);
|
|
24040
24103
|
const {
|
|
24041
24104
|
layoutItemStyles,
|
|
24042
|
-
layoutItemScrimStyles
|
|
24043
|
-
layoutIsReady
|
|
24105
|
+
layoutItemScrimStyles
|
|
24044
24106
|
} = useLayoutItem({
|
|
24045
24107
|
id: props.name,
|
|
24046
24108
|
order: computed(() => parseInt(props.order, 10)),
|
|
@@ -24136,9 +24198,9 @@ const VNavigationDrawer = genericComponent()({
|
|
|
24136
24198
|
}, scopeId), null)]
|
|
24137
24199
|
})]);
|
|
24138
24200
|
});
|
|
24139
|
-
return
|
|
24201
|
+
return {
|
|
24140
24202
|
isStuck
|
|
24141
|
-
}
|
|
24203
|
+
};
|
|
24142
24204
|
}
|
|
24143
24205
|
});
|
|
24144
24206
|
|
|
@@ -25827,7 +25889,7 @@ const VSpeedDial = genericComponent()({
|
|
|
25827
25889
|
const model = useProxiedModel(props, 'modelValue');
|
|
25828
25890
|
const menuRef = ref();
|
|
25829
25891
|
const location = computed(() => {
|
|
25830
|
-
const [y, x = 'center'] = props.location
|
|
25892
|
+
const [y, x = 'center'] = props.location?.split(' ') ?? [];
|
|
25831
25893
|
return `${y} ${x}`;
|
|
25832
25894
|
});
|
|
25833
25895
|
const locationClasses = computed(() => ({
|
|
@@ -28566,6 +28628,7 @@ const VStepperVertical = genericComponent()({
|
|
|
28566
28628
|
const VPullToRefresh = genericComponent()({
|
|
28567
28629
|
name: 'VPullToRefresh',
|
|
28568
28630
|
props: {
|
|
28631
|
+
disabled: Boolean,
|
|
28569
28632
|
pullDownThreshold: {
|
|
28570
28633
|
type: Number,
|
|
28571
28634
|
default: 64
|
|
@@ -28589,19 +28652,19 @@ const VPullToRefresh = genericComponent()({
|
|
|
28589
28652
|
const canRefresh = computed(() => touchDiff.value >= props.pullDownThreshold && !refreshing.value);
|
|
28590
28653
|
const topOffset = computed(() => clamp(touchDiff.value, 0, props.pullDownThreshold));
|
|
28591
28654
|
function onTouchstart(e) {
|
|
28592
|
-
if (refreshing.value) return;
|
|
28655
|
+
if (refreshing.value || props.disabled) return;
|
|
28593
28656
|
touching.value = true;
|
|
28594
28657
|
touchstartY = 'clientY' in e ? e.clientY : e.touches[0].clientY;
|
|
28595
28658
|
}
|
|
28596
28659
|
function onTouchmove(e) {
|
|
28597
|
-
if (refreshing.value || !touching.value) return;
|
|
28660
|
+
if (refreshing.value || !touching.value || props.disabled) return;
|
|
28598
28661
|
const touchY = 'clientY' in e ? e.clientY : e.touches[0].clientY;
|
|
28599
28662
|
if (scrollParents.length && !scrollParents[0].scrollTop) {
|
|
28600
28663
|
touchDiff.value = touchY - touchstartY;
|
|
28601
28664
|
}
|
|
28602
28665
|
}
|
|
28603
28666
|
function onTouchend(e) {
|
|
28604
|
-
if (refreshing.value) return;
|
|
28667
|
+
if (refreshing.value || props.disabled) return;
|
|
28605
28668
|
touching.value = false;
|
|
28606
28669
|
if (canRefresh.value) {
|
|
28607
28670
|
function done() {
|
|
@@ -29469,6 +29532,7 @@ const VTreeviewSymbol = Symbol.for('vuetify:v-treeview');
|
|
|
29469
29532
|
|
|
29470
29533
|
const makeVTreeviewItemProps = propsFactory({
|
|
29471
29534
|
loading: Boolean,
|
|
29535
|
+
onToggleExpand: EventProp(),
|
|
29472
29536
|
toggleIcon: IconValue,
|
|
29473
29537
|
...makeVListItemProps({
|
|
29474
29538
|
slim: true
|
|
@@ -29489,24 +29553,12 @@ const VTreeviewItem = genericComponent()({
|
|
|
29489
29553
|
const {
|
|
29490
29554
|
activate,
|
|
29491
29555
|
isActivated,
|
|
29492
|
-
select,
|
|
29493
|
-
isSelected,
|
|
29494
|
-
isIndeterminate,
|
|
29495
29556
|
isGroupActivator,
|
|
29496
29557
|
root,
|
|
29497
29558
|
id
|
|
29498
29559
|
} = useNestedItem(rawId, false);
|
|
29499
29560
|
const isActivatableGroupActivator = computed(() => root.activatable.value && isGroupActivator);
|
|
29500
|
-
const
|
|
29501
|
-
densityClasses
|
|
29502
|
-
} = useDensity(props, 'v-list-item');
|
|
29503
|
-
const slotProps = computed(() => ({
|
|
29504
|
-
isActive: isActivated.value,
|
|
29505
|
-
select,
|
|
29506
|
-
isSelected: isSelected.value,
|
|
29507
|
-
isIndeterminate: isIndeterminate.value
|
|
29508
|
-
}));
|
|
29509
|
-
const isClickable = computed(() => !props.disabled && props.link !== false && (props.link || link.isClickable.value || props.value != null && !!vListItemRef.value?.list));
|
|
29561
|
+
const isClickable = computed(() => !props.disabled && props.link !== false && (props.link || link.isClickable.value || props.value != null && !!vListItemRef.value?.list || isActivatableGroupActivator.value));
|
|
29510
29562
|
function activateItem(e) {
|
|
29511
29563
|
if (!isClickable.value || !isActivatableGroupActivator.value && isGroupActivator) return;
|
|
29512
29564
|
if (root.activatable.value) {
|
|
@@ -29517,68 +29569,20 @@ const VTreeviewItem = genericComponent()({
|
|
|
29517
29569
|
}
|
|
29518
29570
|
}
|
|
29519
29571
|
}
|
|
29520
|
-
function onKeyDown(e) {
|
|
29521
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
|
29522
|
-
e.preventDefault();
|
|
29523
|
-
activateItem(e);
|
|
29524
|
-
}
|
|
29525
|
-
}
|
|
29526
29572
|
const visibleIds = inject$1(VTreeviewSymbol, {
|
|
29527
29573
|
visibleIds: ref()
|
|
29528
29574
|
}).visibleIds;
|
|
29529
29575
|
useRender(() => {
|
|
29530
|
-
const
|
|
29531
|
-
const hasSubtitle = slots.subtitle || props.subtitle != null;
|
|
29532
|
-
const listItemProps = VListItem.filterProps(props);
|
|
29576
|
+
const listItemProps = omit(VListItem.filterProps(props), ['onClick']);
|
|
29533
29577
|
const hasPrepend = slots.prepend || props.toggleIcon;
|
|
29534
|
-
return
|
|
29535
|
-
"
|
|
29536
|
-
'v-list-item--active': isActivated.value || isSelected.value,
|
|
29537
|
-
'v-treeview-item--filtered': visibleIds.value && !visibleIds.value.has(id.value)
|
|
29538
|
-
}, densityClasses.value, props.class],
|
|
29539
|
-
"onClick": activateItem
|
|
29540
|
-
}, [createVNode(Fragment, null, [genOverlays(isActivated.value || isSelected.value, 'v-list-item'), props.toggleIcon && createVNode(VListItemAction, {
|
|
29541
|
-
"start": false
|
|
29542
|
-
}, {
|
|
29543
|
-
default: () => [createVNode(VBtn, {
|
|
29544
|
-
"density": "compact",
|
|
29545
|
-
"icon": props.toggleIcon,
|
|
29546
|
-
"loading": props.loading,
|
|
29547
|
-
"variant": "text",
|
|
29548
|
-
"onClick": props.onClick
|
|
29549
|
-
}, {
|
|
29550
|
-
loader() {
|
|
29551
|
-
return createVNode(VProgressCircular, {
|
|
29552
|
-
"indeterminate": "disable-shrink",
|
|
29553
|
-
"size": "20",
|
|
29554
|
-
"width": "2"
|
|
29555
|
-
}, null);
|
|
29556
|
-
}
|
|
29557
|
-
})]
|
|
29558
|
-
})]), createVNode("div", {
|
|
29559
|
-
"class": "v-list-item__content",
|
|
29560
|
-
"data-no-activator": ""
|
|
29561
|
-
}, [hasTitle && createVNode(VListItemTitle, {
|
|
29562
|
-
"key": "title"
|
|
29563
|
-
}, {
|
|
29564
|
-
default: () => [slots.title?.({
|
|
29565
|
-
title: props.title
|
|
29566
|
-
}) ?? props.title]
|
|
29567
|
-
}), hasSubtitle && createVNode(VListItemSubtitle, {
|
|
29568
|
-
"key": "subtitle"
|
|
29569
|
-
}, {
|
|
29570
|
-
default: () => [slots.subtitle?.({
|
|
29571
|
-
subtitle: props.subtitle
|
|
29572
|
-
}) ?? props.subtitle]
|
|
29573
|
-
}), slots.default?.(slotProps.value)])]), [[resolveDirective("ripple"), isClickable.value && props.ripple]]) : createVNode(VListItem, mergeProps({
|
|
29574
|
-
"ref": vListItemRef
|
|
29575
|
-
}, listItemProps, {
|
|
29578
|
+
return createVNode(VListItem, mergeProps(listItemProps, {
|
|
29579
|
+
"active": isActivated.value,
|
|
29576
29580
|
"class": ['v-treeview-item', {
|
|
29581
|
+
'v-treeview-item--activatable-group-activator': isActivatableGroupActivator.value,
|
|
29577
29582
|
'v-treeview-item--filtered': visibleIds.value && !visibleIds.value.has(id.value)
|
|
29578
29583
|
}, props.class],
|
|
29579
|
-
"
|
|
29580
|
-
"onClick": activateItem
|
|
29581
|
-
"onKeydown": isClickable.value && onKeyDown
|
|
29584
|
+
"ripple": false,
|
|
29585
|
+
"onClick": props.onClick ?? activateItem
|
|
29582
29586
|
}), {
|
|
29583
29587
|
...slots,
|
|
29584
29588
|
prepend: hasPrepend ? slotProps => {
|
|
@@ -29589,7 +29593,8 @@ const VTreeviewItem = genericComponent()({
|
|
|
29589
29593
|
"density": "compact",
|
|
29590
29594
|
"icon": props.toggleIcon,
|
|
29591
29595
|
"loading": props.loading,
|
|
29592
|
-
"variant": "text"
|
|
29596
|
+
"variant": "text",
|
|
29597
|
+
"onClick": props.onToggleExpand
|
|
29593
29598
|
}, {
|
|
29594
29599
|
loader() {
|
|
29595
29600
|
return createVNode(VProgressCircular, {
|
|
@@ -29616,7 +29621,19 @@ const makeVTreeviewChildrenProps = propsFactory({
|
|
|
29616
29621
|
default: '$loading'
|
|
29617
29622
|
},
|
|
29618
29623
|
items: Array,
|
|
29624
|
+
openOnClick: {
|
|
29625
|
+
type: Boolean,
|
|
29626
|
+
default: undefined
|
|
29627
|
+
},
|
|
29628
|
+
indeterminateIcon: {
|
|
29629
|
+
type: IconValue,
|
|
29630
|
+
default: '$checkboxIndeterminate'
|
|
29631
|
+
},
|
|
29632
|
+
falseIcon: IconValue,
|
|
29633
|
+
trueIcon: IconValue,
|
|
29634
|
+
returnObject: Boolean,
|
|
29619
29635
|
selectable: Boolean,
|
|
29636
|
+
selectedColor: String,
|
|
29620
29637
|
selectStrategy: [String, Function, Object]
|
|
29621
29638
|
}, 'VTreeviewChildren');
|
|
29622
29639
|
const VTreeviewChildren = genericComponent()({
|
|
@@ -29628,6 +29645,7 @@ const VTreeviewChildren = genericComponent()({
|
|
|
29628
29645
|
slots
|
|
29629
29646
|
} = _ref;
|
|
29630
29647
|
const isLoading = shallowRef(null);
|
|
29648
|
+
const isClickOnOpen = computed(() => props.openOnClick != null ? props.openOnClick : props.selectable);
|
|
29631
29649
|
function checkChildren(item) {
|
|
29632
29650
|
return new Promise(resolve => {
|
|
29633
29651
|
if (!props.items?.length || !props.loadChildren) return resolve();
|
|
@@ -29658,7 +29676,11 @@ const VTreeviewChildren = genericComponent()({
|
|
|
29658
29676
|
"key": item.value,
|
|
29659
29677
|
"modelValue": slotProps.isSelected,
|
|
29660
29678
|
"loading": loading,
|
|
29679
|
+
"color": props.selectedColor,
|
|
29661
29680
|
"indeterminate": slotProps.isIndeterminate,
|
|
29681
|
+
"indeterminateIcon": props.indeterminateIcon,
|
|
29682
|
+
"falseIcon": props.falseIcon,
|
|
29683
|
+
"trueIcon": props.trueIcon,
|
|
29662
29684
|
"onClick": withModifiers(() => selectItem(slotProps.select, slotProps.isSelected), ['stop']),
|
|
29663
29685
|
"onKeydown": e => {
|
|
29664
29686
|
if (!['Enter', 'Space'].includes(e.key)) return;
|
|
@@ -29680,9 +29702,9 @@ const VTreeviewChildren = genericComponent()({
|
|
|
29680
29702
|
};
|
|
29681
29703
|
const treeviewGroupProps = VTreeviewGroup.filterProps(itemProps);
|
|
29682
29704
|
const treeviewChildrenProps = VTreeviewChildren.filterProps(props);
|
|
29683
|
-
return children ? createVNode(VTreeviewGroup, mergeProps({
|
|
29684
|
-
"value":
|
|
29685
|
-
}
|
|
29705
|
+
return children ? createVNode(VTreeviewGroup, mergeProps(treeviewGroupProps, {
|
|
29706
|
+
"value": props.returnObject ? item : treeviewGroupProps?.value
|
|
29707
|
+
}), {
|
|
29686
29708
|
activator: _ref3 => {
|
|
29687
29709
|
let {
|
|
29688
29710
|
props: activatorProps
|
|
@@ -29690,19 +29712,24 @@ const VTreeviewChildren = genericComponent()({
|
|
|
29690
29712
|
const listItemProps = {
|
|
29691
29713
|
...itemProps,
|
|
29692
29714
|
...activatorProps,
|
|
29693
|
-
value: itemProps?.value
|
|
29715
|
+
value: itemProps?.value,
|
|
29716
|
+
onToggleExpand: activatorProps.onClick,
|
|
29717
|
+
onClick: isClickOnOpen.value ? [() => checkChildren(item), activatorProps.onClick] : undefined
|
|
29694
29718
|
};
|
|
29695
29719
|
return createVNode(VTreeviewItem, mergeProps(listItemProps, {
|
|
29696
|
-
"
|
|
29697
|
-
"
|
|
29720
|
+
"value": props.returnObject ? toRaw(item) : itemProps.value,
|
|
29721
|
+
"loading": loading
|
|
29698
29722
|
}), slotsWithItem);
|
|
29699
29723
|
},
|
|
29700
29724
|
default: () => createVNode(VTreeviewChildren, mergeProps(treeviewChildrenProps, {
|
|
29701
|
-
"items": children
|
|
29725
|
+
"items": children,
|
|
29726
|
+
"returnObject": props.returnObject
|
|
29702
29727
|
}), slots)
|
|
29703
29728
|
}) : slots.item?.({
|
|
29704
29729
|
props: itemProps
|
|
29705
|
-
}) ?? createVNode(VTreeviewItem, itemProps,
|
|
29730
|
+
}) ?? createVNode(VTreeviewItem, mergeProps(itemProps, {
|
|
29731
|
+
"value": props.returnObject ? toRaw(item) : itemProps.value
|
|
29732
|
+
}), slotsWithItem);
|
|
29706
29733
|
});
|
|
29707
29734
|
}
|
|
29708
29735
|
});
|
|
@@ -29726,7 +29753,11 @@ const makeVTreeviewProps = propsFactory({
|
|
|
29726
29753
|
collapseIcon: '$treeviewCollapse',
|
|
29727
29754
|
expandIcon: '$treeviewExpand',
|
|
29728
29755
|
slim: true
|
|
29729
|
-
}), ['itemType', 'nav'])
|
|
29756
|
+
}), ['itemType', 'nav', 'openStrategy']),
|
|
29757
|
+
modelValue: {
|
|
29758
|
+
type: Array,
|
|
29759
|
+
default: () => []
|
|
29760
|
+
}
|
|
29730
29761
|
}, 'VTreeview');
|
|
29731
29762
|
const VTreeview = genericComponent()({
|
|
29732
29763
|
name: 'VTreeview',
|
|
@@ -29735,6 +29766,7 @@ const VTreeview = genericComponent()({
|
|
|
29735
29766
|
'update:opened': val => true,
|
|
29736
29767
|
'update:activated': val => true,
|
|
29737
29768
|
'update:selected': val => true,
|
|
29769
|
+
'update:modelValue': val => true,
|
|
29738
29770
|
'click:open': value => true,
|
|
29739
29771
|
'click:select': value => true
|
|
29740
29772
|
},
|
|
@@ -29749,7 +29781,15 @@ const VTreeview = genericComponent()({
|
|
|
29749
29781
|
const baseColor = toRef(props, 'baseColor');
|
|
29750
29782
|
const color = toRef(props, 'color');
|
|
29751
29783
|
const activated = useProxiedModel(props, 'activated');
|
|
29752
|
-
const
|
|
29784
|
+
const model = useProxiedModel(props, 'modelValue');
|
|
29785
|
+
const _selected = useProxiedModel(props, 'selected', props.modelValue);
|
|
29786
|
+
const selected = computed({
|
|
29787
|
+
get: () => _selected.value,
|
|
29788
|
+
set(val) {
|
|
29789
|
+
_selected.value = val;
|
|
29790
|
+
model.value = val;
|
|
29791
|
+
}
|
|
29792
|
+
});
|
|
29753
29793
|
const vListRef = ref();
|
|
29754
29794
|
const opened = computed(() => props.openAll ? openAll(items.value) : props.opened);
|
|
29755
29795
|
const flatItems = computed(() => flatten(items.value));
|
|
@@ -29785,11 +29825,11 @@ const VTreeview = genericComponent()({
|
|
|
29785
29825
|
}
|
|
29786
29826
|
return arr;
|
|
29787
29827
|
}
|
|
29788
|
-
function openAll(
|
|
29828
|
+
function openAll(items) {
|
|
29789
29829
|
let ids = [];
|
|
29790
|
-
for (const i of
|
|
29830
|
+
for (const i of items) {
|
|
29791
29831
|
if (!i.children) continue;
|
|
29792
|
-
ids.push(i.value);
|
|
29832
|
+
ids.push(props.returnObject ? toRaw(i.raw) : i.value);
|
|
29793
29833
|
if (i.children) {
|
|
29794
29834
|
ids = ids.concat(openAll(i.children));
|
|
29795
29835
|
}
|
|
@@ -29825,6 +29865,7 @@ const VTreeview = genericComponent()({
|
|
|
29825
29865
|
"ref": vListRef
|
|
29826
29866
|
}, listProps, {
|
|
29827
29867
|
"class": ['v-treeview', props.class],
|
|
29868
|
+
"open-strategy": "multiple",
|
|
29828
29869
|
"style": props.style,
|
|
29829
29870
|
"opened": opened.value,
|
|
29830
29871
|
"activated": activated.value,
|
|
@@ -29833,6 +29874,7 @@ const VTreeview = genericComponent()({
|
|
|
29833
29874
|
"onUpdate:selected": $event => selected.value = $event
|
|
29834
29875
|
}), {
|
|
29835
29876
|
default: () => [createVNode(VTreeviewChildren, mergeProps(treeviewChildrenProps, {
|
|
29877
|
+
"returnObject": props.returnObject,
|
|
29836
29878
|
"items": items.value
|
|
29837
29879
|
}), slots)]
|
|
29838
29880
|
});
|
|
@@ -30336,7 +30378,7 @@ function createVuetify$1() {
|
|
|
30336
30378
|
goTo
|
|
30337
30379
|
};
|
|
30338
30380
|
}
|
|
30339
|
-
const version$1 = "3.
|
|
30381
|
+
const version$1 = "3.7.0";
|
|
30340
30382
|
createVuetify$1.version = version$1;
|
|
30341
30383
|
|
|
30342
30384
|
// Vue's inject() can only be used in setup
|
|
@@ -30589,7 +30631,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
30589
30631
|
|
|
30590
30632
|
/* eslint-disable local-rules/sort-imports */
|
|
30591
30633
|
|
|
30592
|
-
const version = "3.
|
|
30634
|
+
const version = "3.7.0";
|
|
30593
30635
|
|
|
30594
30636
|
/* eslint-disable local-rules/sort-imports */
|
|
30595
30637
|
|