vuetify 3.7.5 → 3.7.7
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/_component-variables-labs.sass +1 -0
- package/dist/json/attributes.json +3584 -3288
- package/dist/json/importMap-labs.json +32 -24
- package/dist/json/importMap.json +148 -148
- package/dist/json/tags.json +84 -0
- package/dist/json/web-types.json +7006 -6045
- package/dist/vuetify-labs.css +3255 -3180
- package/dist/vuetify-labs.d.ts +1443 -105
- package/dist/vuetify-labs.esm.js +424 -50
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +424 -50
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +5652 -5650
- package/dist/vuetify.d.ts +64 -65
- package/dist/vuetify.esm.js +80 -39
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +80 -39
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +955 -948
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.mjs +9 -5
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerPreview.mjs +2 -2
- package/lib/components/VColorPicker/VColorPickerPreview.mjs.map +1 -1
- package/lib/components/VCombobox/VCombobox.mjs +9 -5
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VDialog/VDialog.css +5 -2
- package/lib/components/VDialog/VDialog.sass +6 -2
- package/lib/components/VField/VField.mjs +1 -1
- package/lib/components/VField/VField.mjs.map +1 -1
- package/lib/components/VInput/VInput.css +1 -1
- package/lib/components/VInput/VInput.sass +1 -1
- package/lib/components/VList/VListItem.mjs +14 -8
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.mjs +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.mjs.map +1 -1
- package/lib/components/VRangeSlider/VRangeSlider.mjs +2 -2
- package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
- package/lib/components/VSelect/VSelect.mjs +2 -1
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelectionControl/VSelectionControl.css +1 -3
- package/lib/components/VSelectionControl/VSelectionControl.sass +1 -5
- package/lib/components/VSlideGroup/VSlideGroup.mjs +12 -2
- package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
- package/lib/components/VSparkline/VBarline.mjs +3 -2
- package/lib/components/VSparkline/VBarline.mjs.map +1 -1
- package/lib/components/VSparkline/VTrendline.mjs +2 -1
- package/lib/components/VSparkline/VTrendline.mjs.map +1 -1
- package/lib/components/VSparkline/index.d.mts +7 -10
- package/lib/components/VSparkline/util/line.mjs +1 -1
- package/lib/components/VSparkline/util/line.mjs.map +1 -1
- package/lib/components/VStepper/VStepperItem.mjs +1 -0
- package/lib/components/VStepper/VStepperItem.mjs.map +1 -1
- package/lib/components/VTextarea/VTextarea.css +1 -0
- package/lib/components/VTextarea/VTextarea.sass +1 -0
- package/lib/components/VVirtualScroll/VVirtualScroll.mjs +1 -1
- package/lib/components/VVirtualScroll/VVirtualScroll.mjs.map +1 -1
- package/lib/components/index.d.mts +7 -10
- package/lib/composables/filter.mjs +3 -3
- package/lib/composables/filter.mjs.map +1 -1
- package/lib/composables/nested/nested.mjs +5 -3
- package/lib/composables/nested/nested.mjs.map +1 -1
- package/lib/composables/virtual.mjs +7 -2
- package/lib/composables/virtual.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/iconsets/mdi.mjs +2 -1
- package/lib/iconsets/mdi.mjs.map +1 -1
- package/lib/index.d.mts +57 -55
- package/lib/labs/VDateInput/VDateInput.mjs +19 -5
- package/lib/labs/VDateInput/VDateInput.mjs.map +1 -1
- package/lib/labs/VDateInput/index.d.mts +176 -97
- package/lib/labs/VFileUpload/VFileUpload.css +74 -0
- package/lib/labs/VFileUpload/VFileUpload.mjs +241 -0
- package/lib/labs/VFileUpload/VFileUpload.mjs.map +1 -0
- package/lib/labs/VFileUpload/VFileUpload.sass +75 -0
- package/lib/labs/VFileUpload/VFileUploadItem.mjs +95 -0
- package/lib/labs/VFileUpload/VFileUploadItem.mjs.map +1 -0
- package/lib/labs/VFileUpload/_variables.scss +12 -0
- package/lib/labs/VFileUpload/index.d.mts +1365 -0
- package/lib/labs/VFileUpload/index.mjs +3 -0
- package/lib/labs/VFileUpload/index.mjs.map +1 -0
- package/lib/labs/VNumberInput/VNumberInput.mjs +7 -4
- package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
- package/lib/labs/VTreeview/VTreeviewChildren.mjs +1 -1
- package/lib/labs/VTreeview/VTreeviewChildren.mjs.map +1 -1
- package/lib/labs/VTreeview/VTreeviewItem.mjs +2 -2
- package/lib/labs/VTreeview/VTreeviewItem.mjs.map +1 -1
- package/lib/labs/components.d.mts +1635 -296
- package/lib/labs/components.mjs +1 -0
- package/lib/labs/components.mjs.map +1 -1
- package/lib/locale/af.mjs +5 -0
- package/lib/locale/af.mjs.map +1 -1
- package/lib/locale/ar.mjs +5 -0
- package/lib/locale/ar.mjs.map +1 -1
- package/lib/locale/az.mjs +30 -25
- package/lib/locale/az.mjs.map +1 -1
- package/lib/locale/bg.mjs +5 -0
- package/lib/locale/bg.mjs.map +1 -1
- package/lib/locale/ca.mjs +5 -0
- package/lib/locale/ca.mjs.map +1 -1
- package/lib/locale/ckb.mjs +5 -0
- package/lib/locale/ckb.mjs.map +1 -1
- package/lib/locale/cs.mjs +5 -0
- package/lib/locale/cs.mjs.map +1 -1
- package/lib/locale/da.mjs +5 -0
- package/lib/locale/da.mjs.map +1 -1
- package/lib/locale/de.mjs +5 -0
- package/lib/locale/de.mjs.map +1 -1
- package/lib/locale/el.mjs +5 -0
- package/lib/locale/el.mjs.map +1 -1
- package/lib/locale/en.mjs +5 -0
- package/lib/locale/en.mjs.map +1 -1
- package/lib/locale/es.mjs +5 -0
- package/lib/locale/es.mjs.map +1 -1
- package/lib/locale/et.mjs +5 -0
- package/lib/locale/et.mjs.map +1 -1
- package/lib/locale/fa.mjs +5 -0
- package/lib/locale/fa.mjs.map +1 -1
- package/lib/locale/fi.mjs +5 -0
- package/lib/locale/fi.mjs.map +1 -1
- package/lib/locale/fr.mjs +5 -0
- package/lib/locale/fr.mjs.map +1 -1
- package/lib/locale/he.mjs +5 -0
- package/lib/locale/he.mjs.map +1 -1
- package/lib/locale/hr.mjs +5 -0
- package/lib/locale/hr.mjs.map +1 -1
- package/lib/locale/hu.mjs +5 -0
- package/lib/locale/hu.mjs.map +1 -1
- package/lib/locale/id.mjs +5 -0
- package/lib/locale/id.mjs.map +1 -1
- package/lib/locale/index.d.mts +215 -0
- package/lib/locale/it.mjs +5 -0
- package/lib/locale/it.mjs.map +1 -1
- package/lib/locale/ja.mjs +5 -0
- package/lib/locale/ja.mjs.map +1 -1
- package/lib/locale/km.mjs +5 -0
- package/lib/locale/km.mjs.map +1 -1
- package/lib/locale/ko.mjs +5 -0
- package/lib/locale/ko.mjs.map +1 -1
- package/lib/locale/lt.mjs +5 -0
- package/lib/locale/lt.mjs.map +1 -1
- package/lib/locale/lv.mjs +5 -0
- package/lib/locale/lv.mjs.map +1 -1
- package/lib/locale/nl.mjs +7 -2
- package/lib/locale/nl.mjs.map +1 -1
- package/lib/locale/no.mjs +5 -0
- package/lib/locale/no.mjs.map +1 -1
- package/lib/locale/pl.mjs +5 -0
- package/lib/locale/pl.mjs.map +1 -1
- package/lib/locale/pt.mjs +5 -0
- package/lib/locale/pt.mjs.map +1 -1
- package/lib/locale/ro.mjs +5 -0
- package/lib/locale/ro.mjs.map +1 -1
- package/lib/locale/ru.mjs +5 -0
- package/lib/locale/ru.mjs.map +1 -1
- package/lib/locale/sk.mjs +5 -0
- package/lib/locale/sk.mjs.map +1 -1
- package/lib/locale/sl.mjs +5 -0
- package/lib/locale/sl.mjs.map +1 -1
- package/lib/locale/sr-Cyrl.mjs +5 -0
- package/lib/locale/sr-Cyrl.mjs.map +1 -1
- package/lib/locale/sr-Latn.mjs +5 -0
- package/lib/locale/sr-Latn.mjs.map +1 -1
- package/lib/locale/sv.mjs +5 -0
- package/lib/locale/sv.mjs.map +1 -1
- package/lib/locale/th.mjs +5 -0
- package/lib/locale/th.mjs.map +1 -1
- package/lib/locale/tr.mjs +5 -0
- package/lib/locale/tr.mjs.map +1 -1
- package/lib/locale/uk.mjs +5 -0
- package/lib/locale/uk.mjs.map +1 -1
- package/lib/locale/vi.mjs +5 -0
- package/lib/locale/vi.mjs.map +1 -1
- package/lib/locale/zh-Hans.mjs +5 -0
- package/lib/locale/zh-Hans.mjs.map +1 -1
- package/lib/locale/zh-Hant.mjs +5 -0
- package/lib/locale/zh-Hant.mjs.map +1 -1
- package/package.json +2 -2
package/dist/vuetify-labs.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.7.
|
|
2
|
+
* Vuetify v3.7.7
|
|
3
3
|
* Forged by John Leider
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -2031,6 +2031,11 @@ var en = {
|
|
|
2031
2031
|
counter: '{0} files',
|
|
2032
2032
|
counterSize: '{0} files ({1} in total)'
|
|
2033
2033
|
},
|
|
2034
|
+
fileUpload: {
|
|
2035
|
+
title: 'Drag and drop files here',
|
|
2036
|
+
divider: 'or',
|
|
2037
|
+
browse: 'Browse Files'
|
|
2038
|
+
},
|
|
2034
2039
|
timePicker: {
|
|
2035
2040
|
am: 'AM',
|
|
2036
2041
|
pm: 'PM',
|
|
@@ -4441,7 +4446,8 @@ const aliases = {
|
|
|
4441
4446
|
calendar: 'mdi-calendar',
|
|
4442
4447
|
treeviewCollapse: 'mdi-menu-down',
|
|
4443
4448
|
treeviewExpand: 'mdi-menu-right',
|
|
4444
|
-
eyeDropper: 'mdi-eyedropper'
|
|
4449
|
+
eyeDropper: 'mdi-eyedropper',
|
|
4450
|
+
upload: 'mdi-cloud-upload'
|
|
4445
4451
|
};
|
|
4446
4452
|
const mdi = {
|
|
4447
4453
|
// Not using mergeProps here, functional components merge props by default (?)
|
|
@@ -5030,7 +5036,7 @@ const VProgressLinear = genericComponent()({
|
|
|
5030
5036
|
"aria-hidden": props.active ? 'false' : 'true',
|
|
5031
5037
|
"aria-valuemin": "0",
|
|
5032
5038
|
"aria-valuemax": props.max,
|
|
5033
|
-
"aria-valuenow": props.indeterminate ? undefined :
|
|
5039
|
+
"aria-valuenow": props.indeterminate ? undefined : Math.min(parseFloat(progress.value), max.value),
|
|
5034
5040
|
"onClick": props.clickable && handleClick
|
|
5035
5041
|
}, {
|
|
5036
5042
|
default: () => [props.stream && createVNode("div", {
|
|
@@ -7609,6 +7615,14 @@ const VSlideGroup = genericComponent()({
|
|
|
7609
7615
|
toFocus('last');
|
|
7610
7616
|
}
|
|
7611
7617
|
}
|
|
7618
|
+
function getSiblingElement(el, location) {
|
|
7619
|
+
if (!el) return undefined;
|
|
7620
|
+
let sibling = el;
|
|
7621
|
+
do {
|
|
7622
|
+
sibling = sibling?.[location === 'next' ? 'nextElementSibling' : 'previousElementSibling'];
|
|
7623
|
+
} while (sibling?.hasAttribute('disabled'));
|
|
7624
|
+
return sibling;
|
|
7625
|
+
}
|
|
7612
7626
|
function focus(location) {
|
|
7613
7627
|
if (!contentRef.el) return;
|
|
7614
7628
|
let el;
|
|
@@ -7616,15 +7630,17 @@ const VSlideGroup = genericComponent()({
|
|
|
7616
7630
|
const focusable = focusableChildren(contentRef.el);
|
|
7617
7631
|
el = focusable[0];
|
|
7618
7632
|
} else if (location === 'next') {
|
|
7619
|
-
el = contentRef.el.querySelector(':focus')
|
|
7633
|
+
el = getSiblingElement(contentRef.el.querySelector(':focus'), location);
|
|
7620
7634
|
if (!el) return focus('first');
|
|
7621
7635
|
} else if (location === 'prev') {
|
|
7622
|
-
el = contentRef.el.querySelector(':focus')
|
|
7636
|
+
el = getSiblingElement(contentRef.el.querySelector(':focus'), location);
|
|
7623
7637
|
if (!el) return focus('last');
|
|
7624
7638
|
} else if (location === 'first') {
|
|
7625
7639
|
el = contentRef.el.firstElementChild;
|
|
7640
|
+
if (el?.hasAttribute('disabled')) el = getSiblingElement(el, 'next');
|
|
7626
7641
|
} else if (location === 'last') {
|
|
7627
7642
|
el = contentRef.el.lastElementChild;
|
|
7643
|
+
if (el?.hasAttribute('disabled')) el = getSiblingElement(el, 'prev');
|
|
7628
7644
|
}
|
|
7629
7645
|
if (el) {
|
|
7630
7646
|
el.focus({
|
|
@@ -8704,11 +8720,13 @@ const useNestedItem = (id, isGroup) => {
|
|
|
8704
8720
|
isActivated: computed(() => parent.root.activated.value.has(toRaw(computedId.value))),
|
|
8705
8721
|
select: (selected, e) => parent.root.select(computedId.value, selected, e),
|
|
8706
8722
|
isSelected: computed(() => parent.root.selected.value.get(toRaw(computedId.value)) === 'on'),
|
|
8707
|
-
isIndeterminate: computed(() => parent.root.selected.value.get(computedId.value) === 'indeterminate'),
|
|
8723
|
+
isIndeterminate: computed(() => parent.root.selected.value.get(toRaw(computedId.value)) === 'indeterminate'),
|
|
8708
8724
|
isLeaf: computed(() => !parent.root.children.value.get(computedId.value)),
|
|
8709
8725
|
isGroupActivator: parent.isGroupActivator
|
|
8710
8726
|
};
|
|
8711
|
-
|
|
8727
|
+
onBeforeMount(() => {
|
|
8728
|
+
!parent.isGroupActivator && parent.root.register(computedId.value, parent.id.value, isGroup);
|
|
8729
|
+
});
|
|
8712
8730
|
onBeforeUnmount(() => {
|
|
8713
8731
|
!parent.isGroupActivator && parent.root.unregister(computedId.value);
|
|
8714
8732
|
});
|
|
@@ -8942,16 +8960,22 @@ const VListItem = genericComponent()({
|
|
|
8942
8960
|
color: isActive.value ? color.value ?? props.baseColor : props.baseColor,
|
|
8943
8961
|
variant: props.variant
|
|
8944
8962
|
}));
|
|
8963
|
+
|
|
8964
|
+
// useNestedItem doesn't call register until beforeMount,
|
|
8965
|
+
// so this can't be an immediate watcher as we don't know parent yet
|
|
8945
8966
|
watch(() => link.isActive?.value, val => {
|
|
8946
|
-
if (val
|
|
8967
|
+
if (!val) return;
|
|
8968
|
+
handleActiveLink();
|
|
8969
|
+
});
|
|
8970
|
+
onBeforeMount(() => {
|
|
8971
|
+
if (link.isActive?.value) handleActiveLink();
|
|
8972
|
+
});
|
|
8973
|
+
function handleActiveLink() {
|
|
8974
|
+
if (parent.value != null) {
|
|
8947
8975
|
root.open(parent.value, true);
|
|
8948
8976
|
}
|
|
8949
|
-
|
|
8950
|
-
|
|
8951
|
-
}
|
|
8952
|
-
}, {
|
|
8953
|
-
immediate: true
|
|
8954
|
-
});
|
|
8977
|
+
openOnSelect(true);
|
|
8978
|
+
}
|
|
8955
8979
|
const {
|
|
8956
8980
|
themeClasses
|
|
8957
8981
|
} = provideTheme(props);
|
|
@@ -11564,7 +11588,7 @@ const VField = genericComponent()({
|
|
|
11564
11588
|
useRender(() => {
|
|
11565
11589
|
const isOutlined = props.variant === 'outlined';
|
|
11566
11590
|
const hasPrepend = !!(slots['prepend-inner'] || props.prependInnerIcon);
|
|
11567
|
-
const hasClear = !!(props.clearable || slots.clear);
|
|
11591
|
+
const hasClear = !!(props.clearable || slots.clear) && !props.disabled;
|
|
11568
11592
|
const hasAppend = !!(slots['append-inner'] || props.appendInnerIcon || hasClear);
|
|
11569
11593
|
const label = () => slots.label ? slots.label({
|
|
11570
11594
|
...slotProps.value,
|
|
@@ -12064,6 +12088,7 @@ function useVirtual(props, items) {
|
|
|
12064
12088
|
}
|
|
12065
12089
|
}
|
|
12066
12090
|
});
|
|
12091
|
+
let scrollTimeout = -1;
|
|
12067
12092
|
function handleScroll() {
|
|
12068
12093
|
if (!containerRef.value || !markerRef.value) return;
|
|
12069
12094
|
const scrollTop = containerRef.value.scrollTop;
|
|
@@ -12080,12 +12105,15 @@ function useVirtual(props, items) {
|
|
|
12080
12105
|
}
|
|
12081
12106
|
lastScrollTop = scrollTop;
|
|
12082
12107
|
lastScrollTime = scrollTime;
|
|
12108
|
+
window.clearTimeout(scrollTimeout);
|
|
12109
|
+
scrollTimeout = window.setTimeout(handleScrollend, 500);
|
|
12083
12110
|
calculateVisibleItems();
|
|
12084
12111
|
}
|
|
12085
12112
|
function handleScrollend() {
|
|
12086
12113
|
if (!containerRef.value || !markerRef.value) return;
|
|
12087
12114
|
scrollVelocity = 0;
|
|
12088
12115
|
lastScrollTime = 0;
|
|
12116
|
+
window.clearTimeout(scrollTimeout);
|
|
12089
12117
|
calculateVisibleItems();
|
|
12090
12118
|
}
|
|
12091
12119
|
let raf = -1;
|
|
@@ -12131,7 +12159,8 @@ function useVirtual(props, items) {
|
|
|
12131
12159
|
const computedItems = computed(() => {
|
|
12132
12160
|
return items.value.slice(first.value, last.value).map((item, index) => ({
|
|
12133
12161
|
raw: item,
|
|
12134
|
-
index: index + first.value
|
|
12162
|
+
index: index + first.value,
|
|
12163
|
+
key: isObject(item) && 'value' in item ? item.value : index + first.value
|
|
12135
12164
|
}));
|
|
12136
12165
|
});
|
|
12137
12166
|
watch(items, () => {
|
|
@@ -12246,7 +12275,7 @@ const VVirtualScroll = genericComponent()({
|
|
|
12246
12275
|
});
|
|
12247
12276
|
useRender(() => {
|
|
12248
12277
|
const children = computedItems.value.map(item => createVNode(VVirtualScrollItem, {
|
|
12249
|
-
"key": item.
|
|
12278
|
+
"key": item.key,
|
|
12250
12279
|
"renderless": props.renderless,
|
|
12251
12280
|
"onUpdate:height": height => handleItemResize(item.index, height)
|
|
12252
12281
|
}, {
|
|
@@ -12645,6 +12674,7 @@ const VSelect = genericComponent()({
|
|
|
12645
12674
|
"color": props.itemColor ?? props.color
|
|
12646
12675
|
}, listEvents, props.listProps), {
|
|
12647
12676
|
default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? createVNode(VListItem, {
|
|
12677
|
+
"key": "no-data",
|
|
12648
12678
|
"title": t(props.noDataText)
|
|
12649
12679
|
}, null)), createVNode(VVirtualScroll, {
|
|
12650
12680
|
"ref": vVirtualScrollRef,
|
|
@@ -12659,7 +12689,7 @@ const VSelect = genericComponent()({
|
|
|
12659
12689
|
} = _ref2;
|
|
12660
12690
|
const itemProps = mergeProps(item.props, {
|
|
12661
12691
|
ref: itemRef,
|
|
12662
|
-
key:
|
|
12692
|
+
key: item.value,
|
|
12663
12693
|
onClick: () => select(item, null)
|
|
12664
12694
|
});
|
|
12665
12695
|
return slots.item?.({
|
|
@@ -12840,8 +12870,8 @@ function filterItems(items, query, options) {
|
|
|
12840
12870
|
return array;
|
|
12841
12871
|
}
|
|
12842
12872
|
function useFilter(props, items, query, options) {
|
|
12843
|
-
const filteredItems =
|
|
12844
|
-
const filteredMatches =
|
|
12873
|
+
const filteredItems = shallowRef([]);
|
|
12874
|
+
const filteredMatches = shallowRef(new Map());
|
|
12845
12875
|
const transformedItems = computed(() => options?.transform ? unref(items).map(item => [item, options.transform(item)]) : unref(items));
|
|
12846
12876
|
watchEffect(() => {
|
|
12847
12877
|
const _query = typeof query === 'function' ? query() : unref(query);
|
|
@@ -13002,7 +13032,7 @@ const VAutocomplete = genericComponent()({
|
|
|
13002
13032
|
menu.value = !menu.value;
|
|
13003
13033
|
}
|
|
13004
13034
|
function onListKeydown(e) {
|
|
13005
|
-
if (checkPrintable(e)) {
|
|
13035
|
+
if (e.key !== ' ' && checkPrintable(e)) {
|
|
13006
13036
|
vTextFieldRef.value?.focus();
|
|
13007
13037
|
}
|
|
13008
13038
|
}
|
|
@@ -13010,7 +13040,7 @@ const VAutocomplete = genericComponent()({
|
|
|
13010
13040
|
if (form.isReadonly.value) return;
|
|
13011
13041
|
const selectionStart = vTextFieldRef.value.selectionStart;
|
|
13012
13042
|
const length = model.value.length;
|
|
13013
|
-
if (
|
|
13043
|
+
if (['Enter', 'ArrowDown', 'ArrowUp'].includes(e.key)) {
|
|
13014
13044
|
e.preventDefault();
|
|
13015
13045
|
}
|
|
13016
13046
|
if (['Enter', 'ArrowDown'].includes(e.key)) {
|
|
@@ -13033,12 +13063,14 @@ const VAutocomplete = genericComponent()({
|
|
|
13033
13063
|
if (['Backspace', 'Delete'].includes(e.key)) {
|
|
13034
13064
|
if (!props.multiple && hasSelectionSlot.value && model.value.length > 0 && !search.value) return select(model.value[0], false);
|
|
13035
13065
|
if (~selectionIndex.value) {
|
|
13066
|
+
e.preventDefault();
|
|
13036
13067
|
const originalSelectionIndex = selectionIndex.value;
|
|
13037
13068
|
select(model.value[selectionIndex.value], false);
|
|
13038
13069
|
selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
|
|
13039
13070
|
} else if (e.key === 'Backspace' && !search.value) {
|
|
13040
13071
|
selectionIndex.value = length - 1;
|
|
13041
13072
|
}
|
|
13073
|
+
return;
|
|
13042
13074
|
}
|
|
13043
13075
|
if (!props.multiple) return;
|
|
13044
13076
|
if (e.key === 'ArrowLeft') {
|
|
@@ -13050,8 +13082,7 @@ const VAutocomplete = genericComponent()({
|
|
|
13050
13082
|
selectionIndex.value = -1;
|
|
13051
13083
|
vTextFieldRef.value.setSelectionRange(search.value?.length, search.value?.length);
|
|
13052
13084
|
}
|
|
13053
|
-
}
|
|
13054
|
-
if (e.key === 'ArrowRight') {
|
|
13085
|
+
} else if (e.key === 'ArrowRight') {
|
|
13055
13086
|
if (selectionIndex.value < 0) return;
|
|
13056
13087
|
const next = selectionIndex.value + 1;
|
|
13057
13088
|
if (model.value[next]) {
|
|
@@ -13060,6 +13091,8 @@ const VAutocomplete = genericComponent()({
|
|
|
13060
13091
|
selectionIndex.value = -1;
|
|
13061
13092
|
vTextFieldRef.value.setSelectionRange(0, 0);
|
|
13062
13093
|
}
|
|
13094
|
+
} else if (~selectionIndex.value && checkPrintable(e)) {
|
|
13095
|
+
selectionIndex.value = -1;
|
|
13063
13096
|
}
|
|
13064
13097
|
}
|
|
13065
13098
|
function onChange(e) {
|
|
@@ -13219,6 +13252,7 @@ const VAutocomplete = genericComponent()({
|
|
|
13219
13252
|
"color": props.itemColor ?? props.color
|
|
13220
13253
|
}, listEvents, props.listProps), {
|
|
13221
13254
|
default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? createVNode(VListItem, {
|
|
13255
|
+
"key": "no-data",
|
|
13222
13256
|
"title": t(props.noDataText)
|
|
13223
13257
|
}, null)), createVNode(VVirtualScroll, {
|
|
13224
13258
|
"ref": vVirtualScrollRef,
|
|
@@ -13233,7 +13267,7 @@ const VAutocomplete = genericComponent()({
|
|
|
13233
13267
|
} = _ref4;
|
|
13234
13268
|
const itemProps = mergeProps(item.props, {
|
|
13235
13269
|
ref: itemRef,
|
|
13236
|
-
key:
|
|
13270
|
+
key: item.value,
|
|
13237
13271
|
active: highlightFirst.value && index === 0 ? true : undefined,
|
|
13238
13272
|
onClick: () => select(item, null)
|
|
13239
13273
|
});
|
|
@@ -16074,7 +16108,7 @@ const VColorPickerPreview = defineComponent({
|
|
|
16074
16108
|
const result = await eyeDropper.open({
|
|
16075
16109
|
signal: abortController.signal
|
|
16076
16110
|
});
|
|
16077
|
-
const colorHexValue =
|
|
16111
|
+
const colorHexValue = RGBtoHSV(parseColor(result.sRGBHex));
|
|
16078
16112
|
emit('update:color', {
|
|
16079
16113
|
...(props.color ?? nullColor),
|
|
16080
16114
|
...colorHexValue
|
|
@@ -16885,7 +16919,7 @@ const VCombobox = genericComponent()({
|
|
|
16885
16919
|
menu.value = !menu.value;
|
|
16886
16920
|
}
|
|
16887
16921
|
function onListKeydown(e) {
|
|
16888
|
-
if (checkPrintable(e)) {
|
|
16922
|
+
if (e.key !== ' ' && checkPrintable(e)) {
|
|
16889
16923
|
vTextFieldRef.value?.focus();
|
|
16890
16924
|
}
|
|
16891
16925
|
}
|
|
@@ -16894,7 +16928,7 @@ const VCombobox = genericComponent()({
|
|
|
16894
16928
|
if (isComposingIgnoreKey(e) || form.isReadonly.value) return;
|
|
16895
16929
|
const selectionStart = vTextFieldRef.value.selectionStart;
|
|
16896
16930
|
const length = model.value.length;
|
|
16897
|
-
if (
|
|
16931
|
+
if (['Enter', 'ArrowDown', 'ArrowUp'].includes(e.key)) {
|
|
16898
16932
|
e.preventDefault();
|
|
16899
16933
|
}
|
|
16900
16934
|
if (['Enter', 'ArrowDown'].includes(e.key)) {
|
|
@@ -16924,12 +16958,14 @@ const VCombobox = genericComponent()({
|
|
|
16924
16958
|
if (['Backspace', 'Delete'].includes(e.key)) {
|
|
16925
16959
|
if (!props.multiple && hasSelectionSlot.value && model.value.length > 0 && !search.value) return select(model.value[0], false);
|
|
16926
16960
|
if (~selectionIndex.value) {
|
|
16961
|
+
e.preventDefault();
|
|
16927
16962
|
const originalSelectionIndex = selectionIndex.value;
|
|
16928
16963
|
select(model.value[selectionIndex.value], false);
|
|
16929
16964
|
selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
|
|
16930
16965
|
} else if (e.key === 'Backspace' && !search.value) {
|
|
16931
16966
|
selectionIndex.value = length - 1;
|
|
16932
16967
|
}
|
|
16968
|
+
return;
|
|
16933
16969
|
}
|
|
16934
16970
|
if (!props.multiple) return;
|
|
16935
16971
|
if (e.key === 'ArrowLeft') {
|
|
@@ -16941,8 +16977,7 @@ const VCombobox = genericComponent()({
|
|
|
16941
16977
|
selectionIndex.value = -1;
|
|
16942
16978
|
vTextFieldRef.value.setSelectionRange(search.value.length, search.value.length);
|
|
16943
16979
|
}
|
|
16944
|
-
}
|
|
16945
|
-
if (e.key === 'ArrowRight') {
|
|
16980
|
+
} else if (e.key === 'ArrowRight') {
|
|
16946
16981
|
if (selectionIndex.value < 0) return;
|
|
16947
16982
|
const next = selectionIndex.value + 1;
|
|
16948
16983
|
if (model.value[next]) {
|
|
@@ -16951,6 +16986,8 @@ const VCombobox = genericComponent()({
|
|
|
16951
16986
|
selectionIndex.value = -1;
|
|
16952
16987
|
vTextFieldRef.value.setSelectionRange(0, 0);
|
|
16953
16988
|
}
|
|
16989
|
+
} else if (~selectionIndex.value && checkPrintable(e)) {
|
|
16990
|
+
selectionIndex.value = -1;
|
|
16954
16991
|
}
|
|
16955
16992
|
}
|
|
16956
16993
|
function onAfterEnter() {
|
|
@@ -17098,6 +17135,7 @@ const VCombobox = genericComponent()({
|
|
|
17098
17135
|
"color": props.itemColor ?? props.color
|
|
17099
17136
|
}, listEvents, props.listProps), {
|
|
17100
17137
|
default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? createVNode(VListItem, {
|
|
17138
|
+
"key": "no-data",
|
|
17101
17139
|
"title": t(props.noDataText)
|
|
17102
17140
|
}, null)), createVNode(VVirtualScroll, {
|
|
17103
17141
|
"ref": vVirtualScrollRef,
|
|
@@ -17112,7 +17150,7 @@ const VCombobox = genericComponent()({
|
|
|
17112
17150
|
} = _ref4;
|
|
17113
17151
|
const itemProps = mergeProps(item.props, {
|
|
17114
17152
|
ref: itemRef,
|
|
17115
|
-
key:
|
|
17153
|
+
key: item.value,
|
|
17116
17154
|
active: highlightFirst.value && index === 0 ? true : undefined,
|
|
17117
17155
|
onClick: () => select(item, null)
|
|
17118
17156
|
});
|
|
@@ -24856,7 +24894,7 @@ const VRangeSlider = genericComponent()({
|
|
|
24856
24894
|
// the thumbs are on top of each other
|
|
24857
24895
|
// and they are both at minimum value
|
|
24858
24896
|
// but only if focused from outside.
|
|
24859
|
-
if (model.value[0] === model.value[1] && model.value[1] === min.value && e.relatedTarget !== stopThumbRef.value?.$el) {
|
|
24897
|
+
if (max.value !== min.value && model.value[0] === model.value[1] && model.value[1] === min.value && e.relatedTarget !== stopThumbRef.value?.$el) {
|
|
24860
24898
|
startThumbRef.value?.$el.blur();
|
|
24861
24899
|
stopThumbRef.value?.$el.focus();
|
|
24862
24900
|
}
|
|
@@ -24885,7 +24923,7 @@ const VRangeSlider = genericComponent()({
|
|
|
24885
24923
|
// the thumbs are on top of each other
|
|
24886
24924
|
// and they are both at maximum value
|
|
24887
24925
|
// but only if focused from outside.
|
|
24888
|
-
if (model.value[0] === model.value[1] && model.value[0] === max.value && e.relatedTarget !== startThumbRef.value?.$el) {
|
|
24926
|
+
if (max.value !== min.value && model.value[0] === model.value[1] && model.value[0] === max.value && e.relatedTarget !== startThumbRef.value?.$el) {
|
|
24889
24927
|
stopThumbRef.value?.$el.blur();
|
|
24890
24928
|
startThumbRef.value?.$el.focus();
|
|
24891
24929
|
}
|
|
@@ -25522,7 +25560,7 @@ const makeLineProps = propsFactory({
|
|
|
25522
25560
|
default: 8
|
|
25523
25561
|
},
|
|
25524
25562
|
showLabels: Boolean,
|
|
25525
|
-
smooth: Boolean,
|
|
25563
|
+
smooth: [Boolean, String, Number],
|
|
25526
25564
|
width: {
|
|
25527
25565
|
type: [Number, String],
|
|
25528
25566
|
default: 300
|
|
@@ -25603,6 +25641,7 @@ const VBarline = genericComponent()({
|
|
|
25603
25641
|
});
|
|
25604
25642
|
const bars = computed(() => genBars(items.value, boundary.value));
|
|
25605
25643
|
const offsetX = computed(() => (Math.abs(bars.value[0].x - bars.value[1].x) - lineWidth.value) / 2);
|
|
25644
|
+
const smooth = computed(() => typeof props.smooth === 'boolean' ? props.smooth ? 2 : 0 : Number(props.smooth));
|
|
25606
25645
|
useRender(() => {
|
|
25607
25646
|
const gradientData = !props.gradient.slice().length ? [''] : props.gradient.slice().reverse();
|
|
25608
25647
|
return createVNode("svg", {
|
|
@@ -25624,8 +25663,8 @@ const VBarline = genericComponent()({
|
|
|
25624
25663
|
"y": item.y,
|
|
25625
25664
|
"width": lineWidth.value,
|
|
25626
25665
|
"height": item.height,
|
|
25627
|
-
"rx":
|
|
25628
|
-
"ry":
|
|
25666
|
+
"rx": smooth.value,
|
|
25667
|
+
"ry": smooth.value
|
|
25629
25668
|
}, [props.autoDraw && createVNode(Fragment, null, [createVNode("animate", {
|
|
25630
25669
|
"attributeName": "y",
|
|
25631
25670
|
"from": item.y + item.height,
|
|
@@ -25827,7 +25866,8 @@ const VTrendline = genericComponent()({
|
|
|
25827
25866
|
immediate: true
|
|
25828
25867
|
});
|
|
25829
25868
|
function genPath$1(fill) {
|
|
25830
|
-
|
|
25869
|
+
const smoothValue = typeof props.smooth === 'boolean' ? props.smooth ? 8 : 0 : Number(props.smooth);
|
|
25870
|
+
return genPath(genPoints(items.value, boundary.value), smoothValue, fill, parseInt(props.height, 10));
|
|
25831
25871
|
}
|
|
25832
25872
|
useRender(() => {
|
|
25833
25873
|
const gradientData = !props.gradient.slice().length ? [''] : props.gradient.slice().reverse();
|
|
@@ -26151,6 +26191,7 @@ const VStepperItem = genericComponent()({
|
|
|
26151
26191
|
'v-stepper-item--error': hasError.value
|
|
26152
26192
|
}, group?.selectedClass.value],
|
|
26153
26193
|
"disabled": !props.editable,
|
|
26194
|
+
"type": "button",
|
|
26154
26195
|
"onClick": onClick
|
|
26155
26196
|
}, [isClickable.value && genOverlays(true, 'v-stepper-item'), createVNode(VAvatar, {
|
|
26156
26197
|
"key": "stepper-avatar",
|
|
@@ -28040,8 +28081,14 @@ const VCalendar = genericComponent()({
|
|
|
28040
28081
|
|
|
28041
28082
|
// Types
|
|
28042
28083
|
|
|
28084
|
+
// Types
|
|
28085
|
+
|
|
28043
28086
|
const makeVDateInputProps = propsFactory({
|
|
28044
28087
|
hideActions: Boolean,
|
|
28088
|
+
location: {
|
|
28089
|
+
type: String,
|
|
28090
|
+
default: 'bottom start'
|
|
28091
|
+
},
|
|
28045
28092
|
...makeFocusProps(),
|
|
28046
28093
|
...makeVConfirmEditProps(),
|
|
28047
28094
|
...makeVTextFieldProps({
|
|
@@ -28051,7 +28098,7 @@ const makeVDateInputProps = propsFactory({
|
|
|
28051
28098
|
...omit(makeVDatePickerProps({
|
|
28052
28099
|
weeksInMonth: 'dynamic',
|
|
28053
28100
|
hideHeader: true
|
|
28054
|
-
}), ['active'])
|
|
28101
|
+
}), ['active', 'location'])
|
|
28055
28102
|
}, 'VDateInput');
|
|
28056
28103
|
const VDateInput = genericComponent()({
|
|
28057
28104
|
name: 'VDateInput',
|
|
@@ -28107,7 +28154,7 @@ const VDateInput = genericComponent()({
|
|
|
28107
28154
|
}
|
|
28108
28155
|
useRender(() => {
|
|
28109
28156
|
const confirmEditProps = VConfirmEdit.filterProps(props);
|
|
28110
|
-
const datePickerProps = VDatePicker.filterProps(omit(props, ['active']));
|
|
28157
|
+
const datePickerProps = VDatePicker.filterProps(omit(props, ['active', 'location']));
|
|
28111
28158
|
const textFieldProps = VTextField.filterProps(props);
|
|
28112
28159
|
return createVNode(VTextField, mergeProps(textFieldProps, {
|
|
28113
28160
|
"class": props.class,
|
|
@@ -28125,18 +28172,23 @@ const VDateInput = genericComponent()({
|
|
|
28125
28172
|
"onUpdate:modelValue": $event => menu.value = $event,
|
|
28126
28173
|
"activator": "parent",
|
|
28127
28174
|
"min-width": "0",
|
|
28175
|
+
"location": props.location,
|
|
28128
28176
|
"closeOnContentClick": false,
|
|
28129
28177
|
"openOnClick": false
|
|
28130
28178
|
}, {
|
|
28131
28179
|
default: () => [createVNode(VConfirmEdit, mergeProps(confirmEditProps, {
|
|
28132
28180
|
"modelValue": model.value,
|
|
28133
28181
|
"onUpdate:modelValue": $event => model.value = $event,
|
|
28134
|
-
"onSave": onSave
|
|
28182
|
+
"onSave": onSave,
|
|
28183
|
+
"onCancel": () => menu.value = false
|
|
28135
28184
|
}), {
|
|
28136
28185
|
default: _ref2 => {
|
|
28137
28186
|
let {
|
|
28138
28187
|
actions,
|
|
28139
|
-
model: proxyModel
|
|
28188
|
+
model: proxyModel,
|
|
28189
|
+
save,
|
|
28190
|
+
cancel,
|
|
28191
|
+
isPristine
|
|
28140
28192
|
} = _ref2;
|
|
28141
28193
|
return createVNode(VDatePicker, mergeProps(datePickerProps, {
|
|
28142
28194
|
"modelValue": props.hideActions ? model.value : proxyModel.value,
|
|
@@ -28150,7 +28202,11 @@ const VDateInput = genericComponent()({
|
|
|
28150
28202
|
},
|
|
28151
28203
|
"onMousedown": e => e.preventDefault()
|
|
28152
28204
|
}), {
|
|
28153
|
-
actions: !props.hideActions ?
|
|
28205
|
+
actions: !props.hideActions ? () => slots.actions?.({
|
|
28206
|
+
save,
|
|
28207
|
+
cancel,
|
|
28208
|
+
isPristine
|
|
28209
|
+
}) ?? actions() : undefined
|
|
28154
28210
|
});
|
|
28155
28211
|
}
|
|
28156
28212
|
})]
|
|
@@ -28162,6 +28218,319 @@ const VDateInput = genericComponent()({
|
|
|
28162
28218
|
|
|
28163
28219
|
// Types
|
|
28164
28220
|
|
|
28221
|
+
const makeVFileUploadItemProps = propsFactory({
|
|
28222
|
+
clearable: Boolean,
|
|
28223
|
+
file: {
|
|
28224
|
+
type: Object,
|
|
28225
|
+
default: null
|
|
28226
|
+
},
|
|
28227
|
+
fileIcon: {
|
|
28228
|
+
type: String,
|
|
28229
|
+
// TODO: setup up a proper aliased icon
|
|
28230
|
+
default: 'mdi-file-document'
|
|
28231
|
+
},
|
|
28232
|
+
showSize: Boolean,
|
|
28233
|
+
...makeVListItemProps({
|
|
28234
|
+
border: true,
|
|
28235
|
+
rounded: true,
|
|
28236
|
+
lines: 'two'
|
|
28237
|
+
})
|
|
28238
|
+
}, 'VFileUploadItem');
|
|
28239
|
+
const VFileUploadItem = genericComponent()({
|
|
28240
|
+
name: 'VFileUploadItem',
|
|
28241
|
+
props: makeVFileUploadItemProps(),
|
|
28242
|
+
emits: {
|
|
28243
|
+
'click:remove': () => true,
|
|
28244
|
+
click: e => true
|
|
28245
|
+
},
|
|
28246
|
+
setup(props, _ref) {
|
|
28247
|
+
let {
|
|
28248
|
+
emit,
|
|
28249
|
+
slots
|
|
28250
|
+
} = _ref;
|
|
28251
|
+
const preview = ref();
|
|
28252
|
+
const base = computed(() => typeof props.showSize !== 'boolean' ? props.showSize : undefined);
|
|
28253
|
+
function onClickRemove() {
|
|
28254
|
+
emit('click:remove');
|
|
28255
|
+
}
|
|
28256
|
+
watchEffect(() => {
|
|
28257
|
+
preview.value = props.file?.type.startsWith('image') ? URL.createObjectURL(props.file) : undefined;
|
|
28258
|
+
});
|
|
28259
|
+
useRender(() => {
|
|
28260
|
+
const listItemProps = VListItem.filterProps(props);
|
|
28261
|
+
return createVNode(VListItem, mergeProps(listItemProps, {
|
|
28262
|
+
"title": props.title ?? props.file?.name,
|
|
28263
|
+
"subtitle": props.showSize ? humanReadableFileSize(props.file?.size, base.value) : props.file?.type,
|
|
28264
|
+
"class": "v-file-upload-item"
|
|
28265
|
+
}), {
|
|
28266
|
+
...slots,
|
|
28267
|
+
prepend: slotProps => createVNode(Fragment, null, [!slots.prepend ? createVNode(VAvatar, {
|
|
28268
|
+
"icon": props.fileIcon,
|
|
28269
|
+
"image": preview.value,
|
|
28270
|
+
"rounded": true
|
|
28271
|
+
}, null) : createVNode(VDefaultsProvider, {
|
|
28272
|
+
"defaults": {
|
|
28273
|
+
VAvatar: {
|
|
28274
|
+
image: preview.value,
|
|
28275
|
+
icon: !preview.value ? props.fileIcon : undefined,
|
|
28276
|
+
rounded: true
|
|
28277
|
+
}
|
|
28278
|
+
}
|
|
28279
|
+
}, {
|
|
28280
|
+
default: () => [slots.prepend?.(slotProps) ?? createVNode(VAvatar, null, null)]
|
|
28281
|
+
})]),
|
|
28282
|
+
append: slotProps => createVNode(Fragment, null, [props.clearable && createVNode(Fragment, null, [!slots.clear ? createVNode(VBtn, {
|
|
28283
|
+
"icon": "$clear",
|
|
28284
|
+
"density": "comfortable",
|
|
28285
|
+
"variant": "text",
|
|
28286
|
+
"onClick": onClickRemove
|
|
28287
|
+
}, null) : createVNode(VDefaultsProvider, {
|
|
28288
|
+
"defaults": {
|
|
28289
|
+
VBtn: {
|
|
28290
|
+
icon: '$clear',
|
|
28291
|
+
density: 'comfortable',
|
|
28292
|
+
variant: 'text'
|
|
28293
|
+
}
|
|
28294
|
+
}
|
|
28295
|
+
}, {
|
|
28296
|
+
default: () => [slots.clear?.({
|
|
28297
|
+
...slotProps,
|
|
28298
|
+
props: {
|
|
28299
|
+
onClick: onClickRemove
|
|
28300
|
+
}
|
|
28301
|
+
}) ?? createVNode(VBtn, null, null)]
|
|
28302
|
+
})]), slots.append?.(slotProps)])
|
|
28303
|
+
});
|
|
28304
|
+
});
|
|
28305
|
+
}
|
|
28306
|
+
});
|
|
28307
|
+
|
|
28308
|
+
// Types
|
|
28309
|
+
|
|
28310
|
+
const makeVFileUploadProps = propsFactory({
|
|
28311
|
+
browseText: {
|
|
28312
|
+
type: String,
|
|
28313
|
+
default: '$vuetify.fileUpload.browse'
|
|
28314
|
+
},
|
|
28315
|
+
dividerText: {
|
|
28316
|
+
type: String,
|
|
28317
|
+
default: '$vuetify.fileUpload.divider'
|
|
28318
|
+
},
|
|
28319
|
+
title: {
|
|
28320
|
+
type: String,
|
|
28321
|
+
default: '$vuetify.fileUpload.title'
|
|
28322
|
+
},
|
|
28323
|
+
subtitle: String,
|
|
28324
|
+
icon: {
|
|
28325
|
+
type: IconValue,
|
|
28326
|
+
default: '$upload'
|
|
28327
|
+
},
|
|
28328
|
+
modelValue: {
|
|
28329
|
+
type: [Array, Object],
|
|
28330
|
+
default: null,
|
|
28331
|
+
validator: val => {
|
|
28332
|
+
return wrapInArray(val).every(v => v != null && typeof v === 'object');
|
|
28333
|
+
}
|
|
28334
|
+
},
|
|
28335
|
+
clearable: Boolean,
|
|
28336
|
+
disabled: Boolean,
|
|
28337
|
+
hideBrowse: Boolean,
|
|
28338
|
+
multiple: Boolean,
|
|
28339
|
+
scrim: {
|
|
28340
|
+
type: [Boolean, String],
|
|
28341
|
+
default: true
|
|
28342
|
+
},
|
|
28343
|
+
showSize: Boolean,
|
|
28344
|
+
name: String,
|
|
28345
|
+
...makeDelayProps(),
|
|
28346
|
+
...makeDensityProps(),
|
|
28347
|
+
...only(makeVDividerProps({
|
|
28348
|
+
length: 150
|
|
28349
|
+
}), ['length', 'thickness', 'opacity']),
|
|
28350
|
+
...makeVSheetProps()
|
|
28351
|
+
}, 'VFileUpload');
|
|
28352
|
+
const VFileUpload = genericComponent()({
|
|
28353
|
+
name: 'VFileUpload',
|
|
28354
|
+
inheritAttrs: false,
|
|
28355
|
+
props: makeVFileUploadProps(),
|
|
28356
|
+
emits: {
|
|
28357
|
+
'update:modelValue': files => true
|
|
28358
|
+
},
|
|
28359
|
+
setup(props, _ref) {
|
|
28360
|
+
let {
|
|
28361
|
+
attrs,
|
|
28362
|
+
slots
|
|
28363
|
+
} = _ref;
|
|
28364
|
+
const {
|
|
28365
|
+
t
|
|
28366
|
+
} = useLocale();
|
|
28367
|
+
const {
|
|
28368
|
+
densityClasses
|
|
28369
|
+
} = useDensity(props);
|
|
28370
|
+
const model = useProxiedModel(props, 'modelValue', props.modelValue, val => wrapInArray(val), val => props.multiple || Array.isArray(props.modelValue) ? val : val[0]);
|
|
28371
|
+
const dragOver = shallowRef(false);
|
|
28372
|
+
const vSheetRef = ref(null);
|
|
28373
|
+
const inputRef = ref(null);
|
|
28374
|
+
onMounted(() => {
|
|
28375
|
+
vSheetRef.value?.$el.addEventListener('dragover', onDragOver);
|
|
28376
|
+
vSheetRef.value?.$el.addEventListener('drop', onDrop);
|
|
28377
|
+
});
|
|
28378
|
+
onUnmounted(() => {
|
|
28379
|
+
vSheetRef.value?.$el.removeEventListener('dragover', onDragOver);
|
|
28380
|
+
vSheetRef.value?.$el.removeEventListener('drop', onDrop);
|
|
28381
|
+
});
|
|
28382
|
+
function onDragOver(e) {
|
|
28383
|
+
e.preventDefault();
|
|
28384
|
+
e.stopImmediatePropagation();
|
|
28385
|
+
dragOver.value = true;
|
|
28386
|
+
}
|
|
28387
|
+
function onDragLeave(e) {
|
|
28388
|
+
e.preventDefault();
|
|
28389
|
+
dragOver.value = false;
|
|
28390
|
+
}
|
|
28391
|
+
function onDrop(e) {
|
|
28392
|
+
e.preventDefault();
|
|
28393
|
+
e.stopImmediatePropagation();
|
|
28394
|
+
dragOver.value = false;
|
|
28395
|
+
const files = Array.from(e.dataTransfer?.files ?? []);
|
|
28396
|
+
if (!files.length) return;
|
|
28397
|
+
if (!props.multiple) {
|
|
28398
|
+
model.value = [files[0]];
|
|
28399
|
+
return;
|
|
28400
|
+
}
|
|
28401
|
+
const array = model.value.slice();
|
|
28402
|
+
for (const file of files) {
|
|
28403
|
+
if (!array.some(f => f.name === file.name)) {
|
|
28404
|
+
array.push(file);
|
|
28405
|
+
}
|
|
28406
|
+
}
|
|
28407
|
+
model.value = array;
|
|
28408
|
+
}
|
|
28409
|
+
function onClick() {
|
|
28410
|
+
inputRef.value?.click();
|
|
28411
|
+
}
|
|
28412
|
+
function onClickRemove(index) {
|
|
28413
|
+
model.value = model.value.filter((_, i) => i !== index);
|
|
28414
|
+
if (model.value.length > 0 || !inputRef.value) return;
|
|
28415
|
+
inputRef.value.value = '';
|
|
28416
|
+
}
|
|
28417
|
+
useRender(() => {
|
|
28418
|
+
const hasTitle = !!(slots.title || props.title);
|
|
28419
|
+
const hasIcon = !!(slots.icon || props.icon);
|
|
28420
|
+
const hasBrowse = !!(!props.hideBrowse && (slots.browse || props.density === 'default'));
|
|
28421
|
+
const cardProps = VSheet.filterProps(props);
|
|
28422
|
+
const dividerProps = VDivider.filterProps(props);
|
|
28423
|
+
const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);
|
|
28424
|
+
const inputNode = createVNode("input", mergeProps({
|
|
28425
|
+
"ref": inputRef,
|
|
28426
|
+
"type": "file",
|
|
28427
|
+
"disabled": props.disabled,
|
|
28428
|
+
"multiple": props.multiple,
|
|
28429
|
+
"name": props.name,
|
|
28430
|
+
"onChange": e => {
|
|
28431
|
+
if (!e.target) return;
|
|
28432
|
+
const target = e.target;
|
|
28433
|
+
model.value = [...(target.files ?? [])];
|
|
28434
|
+
}
|
|
28435
|
+
}, inputAttrs), null);
|
|
28436
|
+
return createVNode(Fragment, null, [createVNode(VSheet, mergeProps({
|
|
28437
|
+
"ref": vSheetRef
|
|
28438
|
+
}, cardProps, {
|
|
28439
|
+
"class": ['v-file-upload', {
|
|
28440
|
+
'v-file-upload--clickable': !hasBrowse,
|
|
28441
|
+
'v-file-upload--disabled': props.disabled,
|
|
28442
|
+
'v-file-upload--dragging': dragOver.value
|
|
28443
|
+
}, densityClasses.value],
|
|
28444
|
+
"onDragleave": onDragLeave,
|
|
28445
|
+
"onDragover": onDragOver,
|
|
28446
|
+
"onDrop": onDrop,
|
|
28447
|
+
"onClick": !hasBrowse ? onClick : undefined
|
|
28448
|
+
}, rootAttrs), {
|
|
28449
|
+
default: () => [hasIcon && createVNode("div", {
|
|
28450
|
+
"key": "icon",
|
|
28451
|
+
"class": "v-file-upload-icon"
|
|
28452
|
+
}, [!slots.icon ? createVNode(VIcon, {
|
|
28453
|
+
"key": "icon-icon",
|
|
28454
|
+
"icon": props.icon
|
|
28455
|
+
}, null) : createVNode(VDefaultsProvider, {
|
|
28456
|
+
"key": "icon-defaults",
|
|
28457
|
+
"defaults": {
|
|
28458
|
+
VIcon: {
|
|
28459
|
+
icon: props.icon
|
|
28460
|
+
}
|
|
28461
|
+
}
|
|
28462
|
+
}, {
|
|
28463
|
+
default: () => [slots.icon()]
|
|
28464
|
+
})]), hasTitle && createVNode("div", {
|
|
28465
|
+
"key": "title",
|
|
28466
|
+
"class": "v-file-upload-title"
|
|
28467
|
+
}, [slots.title?.() ?? t(props.title)]), props.density === 'default' && createVNode(Fragment, null, [createVNode("div", {
|
|
28468
|
+
"key": "upload-divider",
|
|
28469
|
+
"class": "v-file-upload-divider"
|
|
28470
|
+
}, [slots.divider?.() ?? createVNode(VDivider, dividerProps, {
|
|
28471
|
+
default: () => [t(props.dividerText)]
|
|
28472
|
+
})]), hasBrowse && createVNode(Fragment, null, [!slots.browse ? createVNode(VBtn, {
|
|
28473
|
+
"readonly": props.disabled,
|
|
28474
|
+
"size": "large",
|
|
28475
|
+
"text": t(props.browseText),
|
|
28476
|
+
"variant": "tonal",
|
|
28477
|
+
"onClick": onClick
|
|
28478
|
+
}, null) : createVNode(VDefaultsProvider, {
|
|
28479
|
+
"defaults": {
|
|
28480
|
+
VBtn: {
|
|
28481
|
+
readonly: props.disabled,
|
|
28482
|
+
size: 'large',
|
|
28483
|
+
text: t(props.browseText),
|
|
28484
|
+
variant: 'tonal'
|
|
28485
|
+
}
|
|
28486
|
+
}
|
|
28487
|
+
}, {
|
|
28488
|
+
default: () => [slots.browse({
|
|
28489
|
+
props: {
|
|
28490
|
+
onClick
|
|
28491
|
+
}
|
|
28492
|
+
})]
|
|
28493
|
+
})]), props.subtitle && createVNode("div", {
|
|
28494
|
+
"class": "v-file-upload-subtitle"
|
|
28495
|
+
}, [props.subtitle])]), createVNode(VOverlay, {
|
|
28496
|
+
"model-value": dragOver.value,
|
|
28497
|
+
"contained": true,
|
|
28498
|
+
"scrim": props.scrim
|
|
28499
|
+
}, null), slots.input?.({
|
|
28500
|
+
inputNode
|
|
28501
|
+
}) ?? inputNode]
|
|
28502
|
+
}), model.value.length > 0 && createVNode("div", {
|
|
28503
|
+
"class": "v-file-upload-items"
|
|
28504
|
+
}, [model.value.map((file, i) => {
|
|
28505
|
+
const slotProps = {
|
|
28506
|
+
file,
|
|
28507
|
+
props: {
|
|
28508
|
+
'onClick:remove': () => onClickRemove(i)
|
|
28509
|
+
}
|
|
28510
|
+
};
|
|
28511
|
+
return createVNode(VDefaultsProvider, {
|
|
28512
|
+
"key": i,
|
|
28513
|
+
"defaults": {
|
|
28514
|
+
VFileUploadItem: {
|
|
28515
|
+
file,
|
|
28516
|
+
clearable: props.clearable,
|
|
28517
|
+
disabled: props.disabled,
|
|
28518
|
+
showSize: props.showSize
|
|
28519
|
+
}
|
|
28520
|
+
}
|
|
28521
|
+
}, {
|
|
28522
|
+
default: () => [slots.item?.(slotProps) ?? createVNode(VFileUploadItem, {
|
|
28523
|
+
"key": i,
|
|
28524
|
+
"onClick:remove": () => onClickRemove(i)
|
|
28525
|
+
}, slots)]
|
|
28526
|
+
});
|
|
28527
|
+
})])]);
|
|
28528
|
+
});
|
|
28529
|
+
}
|
|
28530
|
+
});
|
|
28531
|
+
|
|
28532
|
+
// Types
|
|
28533
|
+
|
|
28165
28534
|
const makeVNumberInputProps = propsFactory({
|
|
28166
28535
|
controlVariant: {
|
|
28167
28536
|
type: String,
|
|
@@ -28202,13 +28571,16 @@ const VNumberInput = genericComponent()({
|
|
|
28202
28571
|
const _model = useProxiedModel(props, 'modelValue');
|
|
28203
28572
|
const model = computed({
|
|
28204
28573
|
get: () => _model.value,
|
|
28574
|
+
// model.value could be empty string from VTextField
|
|
28575
|
+
// but _model.value should be eventually kept in type Number | null
|
|
28205
28576
|
set(val) {
|
|
28206
|
-
if (val === null) {
|
|
28577
|
+
if (val === null || val === '') {
|
|
28207
28578
|
_model.value = null;
|
|
28208
28579
|
return;
|
|
28209
28580
|
}
|
|
28210
|
-
|
|
28211
|
-
|
|
28581
|
+
const value = Number(val);
|
|
28582
|
+
if (!isNaN(value) && value <= props.max && value >= props.min) {
|
|
28583
|
+
_model.value = value;
|
|
28212
28584
|
}
|
|
28213
28585
|
}
|
|
28214
28586
|
});
|
|
@@ -28381,7 +28753,7 @@ const VNumberInput = genericComponent()({
|
|
|
28381
28753
|
"class": "v-number-input__control"
|
|
28382
28754
|
}, [createVNode(VDivider, {
|
|
28383
28755
|
"vertical": true
|
|
28384
|
-
}, null), incrementControlNode()]) :
|
|
28756
|
+
}, null), incrementControlNode()]) : props.reverse ? undefined : createVNode(Fragment, null, [dividerNode(), controlNode()]);
|
|
28385
28757
|
const hasAppendInner = slots['append-inner'] || appendInnerControl;
|
|
28386
28758
|
const prependInnerControl = controlVariant.value === 'split' ? createVNode("div", {
|
|
28387
28759
|
"class": "v-number-input__control"
|
|
@@ -29613,7 +29985,7 @@ const VTreeviewItem = genericComponent()({
|
|
|
29613
29985
|
"active": vListItemRef.value?.isActivated,
|
|
29614
29986
|
"class": ['v-treeview-item', {
|
|
29615
29987
|
'v-treeview-item--activatable-group-activator': isActivatableGroupActivator.value,
|
|
29616
|
-
'v-treeview-item--filtered': visibleIds.value && !visibleIds.value.has(vListItemRef.value?.id)
|
|
29988
|
+
'v-treeview-item--filtered': visibleIds.value && !visibleIds.value.has(toRaw(vListItemRef.value?.id))
|
|
29617
29989
|
}, props.class],
|
|
29618
29990
|
"ripple": false,
|
|
29619
29991
|
"onClick": props.onClick ?? activateGroupActivator
|
|
@@ -29750,7 +30122,7 @@ const VTreeviewChildren = genericComponent()({
|
|
|
29750
30122
|
onClick: isClickOnOpen.value ? [() => checkChildren(item), activatorProps.onClick] : undefined
|
|
29751
30123
|
};
|
|
29752
30124
|
return createVNode(VTreeviewItem, mergeProps(listItemProps, {
|
|
29753
|
-
"value": props.returnObject ?
|
|
30125
|
+
"value": props.returnObject ? item.raw : itemProps.value,
|
|
29754
30126
|
"loading": loading
|
|
29755
30127
|
}), slotsWithItem);
|
|
29756
30128
|
},
|
|
@@ -29993,6 +30365,8 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
29993
30365
|
VField: VField,
|
|
29994
30366
|
VFieldLabel: VFieldLabel,
|
|
29995
30367
|
VFileInput: VFileInput,
|
|
30368
|
+
VFileUpload: VFileUpload,
|
|
30369
|
+
VFileUploadItem: VFileUploadItem,
|
|
29996
30370
|
VFooter: VFooter,
|
|
29997
30371
|
VForm: VForm,
|
|
29998
30372
|
VHover: VHover,
|
|
@@ -30406,7 +30780,7 @@ function createVuetify$1() {
|
|
|
30406
30780
|
goTo
|
|
30407
30781
|
};
|
|
30408
30782
|
}
|
|
30409
|
-
const version$1 = "3.7.
|
|
30783
|
+
const version$1 = "3.7.7";
|
|
30410
30784
|
createVuetify$1.version = version$1;
|
|
30411
30785
|
|
|
30412
30786
|
// Vue's inject() can only be used in setup
|
|
@@ -30659,7 +31033,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
30659
31033
|
|
|
30660
31034
|
/* eslint-disable local-rules/sort-imports */
|
|
30661
31035
|
|
|
30662
|
-
const version = "3.7.
|
|
31036
|
+
const version = "3.7.7";
|
|
30663
31037
|
|
|
30664
31038
|
/* eslint-disable local-rules/sort-imports */
|
|
30665
31039
|
|