vuetify 3.8.8 → 3.8.10
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/LICENSE.md +1 -1
- package/dist/json/attributes.json +3413 -3405
- package/dist/json/importMap-labs.json +38 -38
- package/dist/json/importMap.json +146 -146
- package/dist/json/tags.json +2 -0
- package/dist/json/web-types.json +6357 -6339
- package/dist/vuetify-labs.cjs +210 -103
- package/dist/vuetify-labs.css +3832 -3823
- package/dist/vuetify-labs.d.ts +80 -58
- package/dist/vuetify-labs.esm.js +211 -104
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +210 -103
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +191 -83
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +3244 -3235
- package/dist/vuetify.d.ts +70 -58
- package/dist/vuetify.esm.js +192 -84
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +191 -83
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +1002 -993
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VBtn/VBtn.css +3 -0
- package/lib/components/VBtn/VBtn.sass +3 -0
- package/lib/components/VBtnGroup/VBtnGroup.css +2 -1
- package/lib/components/VBtnGroup/VBtnGroup.sass +2 -1
- package/lib/components/VDataTable/VDataTable.css +6 -3
- package/lib/components/VDataTable/VDataTable.sass +4 -2
- package/lib/components/VDataTable/VDataTableColumn.js +1 -0
- package/lib/components/VDataTable/VDataTableColumn.js.map +1 -1
- package/lib/components/VDataTable/VDataTableFooter.js +3 -1
- package/lib/components/VDataTable/VDataTableFooter.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaders.js +8 -1
- package/lib/components/VDataTable/VDataTableHeaders.js.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.js +19 -13
- package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonth.js +2 -2
- package/lib/components/VDatePicker/VDatePickerMonth.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerYears.js +1 -3
- package/lib/components/VDatePicker/VDatePickerYears.js.map +1 -1
- package/lib/components/VField/VField.js +10 -2
- package/lib/components/VField/VField.js.map +1 -1
- package/lib/components/VFileInput/VFileInput.js +8 -3
- package/lib/components/VFileInput/VFileInput.js.map +1 -1
- package/lib/components/VList/VListChildren.js +4 -3
- package/lib/components/VList/VListChildren.js.map +1 -1
- package/lib/components/VList/VListGroup.d.ts +10 -0
- package/lib/components/VList/VListGroup.js +2 -2
- package/lib/components/VList/VListGroup.js.map +1 -1
- package/lib/components/VList/VListItem.css +2 -0
- package/lib/components/VList/VListItem.sass +2 -0
- package/lib/components/VList/_variables.scss +1 -0
- package/lib/components/VNumberInput/VNumberInput.d.ts +5 -0
- package/lib/components/VNumberInput/VNumberInput.js +7 -11
- package/lib/components/VNumberInput/VNumberInput.js.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.js +22 -3
- package/lib/components/VOtpInput/VOtpInput.js.map +1 -1
- package/lib/components/VSelect/VSelect.js +6 -5
- package/lib/components/VSelect/VSelect.js.map +1 -1
- package/lib/components/VSlider/VSliderThumb.js +1 -1
- package/lib/components/VSlider/VSliderThumb.js.map +1 -1
- package/lib/components/VSpeedDial/VSpeedDial.css +1 -1
- package/lib/components/VSpeedDial/VSpeedDial.sass +3 -1
- package/lib/components/VTextField/VTextField.js +9 -8
- package/lib/components/VTextField/VTextField.js.map +1 -1
- package/lib/components/VTextarea/VTextarea.js +4 -4
- package/lib/components/VTextarea/VTextarea.js.map +1 -1
- package/lib/composables/autofocus.d.ts +7 -0
- package/lib/composables/autofocus.js +10 -0
- package/lib/composables/autofocus.js.map +1 -0
- package/lib/composables/date/adapters/vuetify.js +1 -1
- package/lib/composables/date/adapters/vuetify.js.map +1 -1
- package/lib/composables/date/date.d.ts +1 -4
- package/lib/composables/date/date.js +13 -14
- package/lib/composables/date/date.js.map +1 -1
- package/lib/composables/fileDrop.d.ts +4 -0
- package/lib/composables/fileDrop.js +50 -0
- package/lib/composables/fileDrop.js.map +1 -0
- package/lib/composables/group.js +1 -0
- package/lib/composables/group.js.map +1 -1
- package/lib/composables/hotkey.d.ts +9 -0
- package/lib/composables/hotkey.js +131 -0
- package/lib/composables/hotkey.js.map +1 -0
- package/lib/composables/icons.d.ts +6 -0
- package/lib/composables/icons.js.map +1 -1
- package/lib/composables/intersectionObserver.js +2 -2
- package/lib/composables/intersectionObserver.js.map +1 -1
- package/lib/composables/list-items.js +2 -2
- package/lib/composables/list-items.js.map +1 -1
- package/lib/composables/selectLink.js +2 -2
- package/lib/composables/selectLink.js.map +1 -1
- package/lib/composables/transition.js +3 -3
- package/lib/composables/transition.js.map +1 -1
- package/lib/entry-bundler.d.ts +0 -3
- package/lib/entry-bundler.js +1 -1
- package/lib/entry-bundler.js.map +1 -1
- package/lib/framework.d.ts +60 -58
- package/lib/framework.js +1 -1
- package/lib/framework.js.map +1 -1
- package/lib/iconsets/fa.js +3 -1
- package/lib/iconsets/fa.js.map +1 -1
- package/lib/iconsets/fa4.js +3 -1
- package/lib/iconsets/fa4.js.map +1 -1
- package/lib/iconsets/md.js +3 -1
- package/lib/iconsets/md.js.map +1 -1
- package/lib/iconsets/mdi-svg.js +3 -1
- package/lib/iconsets/mdi-svg.js.map +1 -1
- package/lib/labs/VColorInput/VColorInput.js +3 -8
- package/lib/labs/VColorInput/VColorInput.js.map +1 -1
- package/lib/labs/VDateInput/VDateInput.d.ts +5 -0
- package/lib/labs/VDateInput/VDateInput.js +7 -10
- package/lib/labs/VDateInput/VDateInput.js.map +1 -1
- package/lib/labs/VFileUpload/VFileUpload.js +7 -3
- package/lib/labs/VFileUpload/VFileUpload.js.map +1 -1
- package/lib/labs/VFileUpload/VFileUploadItem.js +1 -0
- package/lib/labs/VFileUpload/VFileUploadItem.js.map +1 -1
- package/lib/labs/VTimePicker/VTimePickerClock.js +3 -1
- package/lib/labs/VTimePicker/VTimePickerClock.js.map +1 -1
- package/lib/labs/VTreeview/VTreeviewChildren.js +2 -1
- package/lib/labs/VTreeview/VTreeviewChildren.js.map +1 -1
- package/lib/labs/VTreeview/VTreeviewGroup.d.ts +10 -0
- package/lib/labs/VTreeview/VTreeviewItem.js +1 -0
- package/lib/labs/VTreeview/VTreeviewItem.js.map +1 -1
- package/lib/labs/entry-bundler.d.ts +0 -3
- package/lib/util/helpers.d.ts +4 -1
- package/lib/util/helpers.js +7 -1
- package/lib/util/helpers.js.map +1 -1
- package/package.json +8 -8
package/dist/vuetify-labs.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.8.
|
|
2
|
+
* Vuetify v3.8.10
|
|
3
3
|
* Forged by John Leider
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { shallowRef, reactive, watchEffect, toRef, capitalize,
|
|
7
|
+
import { shallowRef, reactive, watchEffect, toRef, capitalize, unref, Fragment, camelize, isVNode, Comment, warn, getCurrentInstance as getCurrentInstance$1, ref, computed, provide, inject as inject$1, defineComponent as defineComponent$1, h, onBeforeUnmount, watch, readonly, onMounted, useId, onDeactivated, onActivated, onScopeDispose, effectScope, toRaw, createElementVNode, normalizeStyle, normalizeClass, createVNode, TransitionGroup, Transition, mergeProps, toRefs, toValue, isRef, onBeforeMount, nextTick, withDirectives, vShow, onUpdated, Text, resolveDynamicComponent, toDisplayString, markRaw, Teleport, cloneVNode, createTextVNode, normalizeProps, guardReactiveProps, onUnmounted, onBeforeUpdate, withModifiers, vModelText, resolveComponent, render } from 'vue';
|
|
8
8
|
|
|
9
9
|
// Types
|
|
10
10
|
// eslint-disable-line vue/prefer-import-from-vue
|
|
@@ -603,13 +603,19 @@ function extractNumber(text, decimalDigitsLimit) {
|
|
|
603
603
|
return cleanText;
|
|
604
604
|
}
|
|
605
605
|
function camelizeProps(props) {
|
|
606
|
-
if (!props) return;
|
|
607
606
|
const out = {};
|
|
608
607
|
for (const prop in props) {
|
|
609
608
|
out[camelize(prop)] = props[prop];
|
|
610
609
|
}
|
|
611
610
|
return out;
|
|
612
611
|
}
|
|
612
|
+
function onlyDefinedProps(props) {
|
|
613
|
+
const booleanAttributes = ['checked', 'disabled'];
|
|
614
|
+
return Object.fromEntries(Object.entries(props).filter(_ref => {
|
|
615
|
+
let [key, v] = _ref;
|
|
616
|
+
return booleanAttributes.includes(key) ? !!v : v !== undefined;
|
|
617
|
+
}));
|
|
618
|
+
}
|
|
613
619
|
|
|
614
620
|
// Utilities
|
|
615
621
|
const block = ['top', 'bottom'];
|
|
@@ -934,7 +940,7 @@ function APCAcontrast(text, background) {
|
|
|
934
940
|
// WoB should always return negative value.
|
|
935
941
|
|
|
936
942
|
const SAPC = (Ybg ** revBG - Ytxt ** revTXT) * scaleWoB;
|
|
937
|
-
outputContrast = SAPC > -
|
|
943
|
+
outputContrast = SAPC > -loClip ? 0.0 : SAPC > -loConThresh ? SAPC - SAPC * loConFactor * loConOffset : SAPC + loConOffset;
|
|
938
944
|
}
|
|
939
945
|
return outputContrast * 100;
|
|
940
946
|
}
|
|
@@ -3322,10 +3328,10 @@ const MaybeTransition = (props, _ref) => {
|
|
|
3322
3328
|
} = isObject(transition) ? transition : {};
|
|
3323
3329
|
let transitionProps;
|
|
3324
3330
|
if (isObject(transition)) {
|
|
3325
|
-
transitionProps = mergeProps(customProps,
|
|
3331
|
+
transitionProps = mergeProps(customProps, onlyDefinedProps({
|
|
3326
3332
|
disabled,
|
|
3327
3333
|
group
|
|
3328
|
-
})
|
|
3334
|
+
}), rest);
|
|
3329
3335
|
} else {
|
|
3330
3336
|
transitionProps = mergeProps({
|
|
3331
3337
|
name: disabled || !transition ? '' : transition
|
|
@@ -4394,6 +4400,7 @@ function useGroup(props, injectKey) {
|
|
|
4394
4400
|
} else {
|
|
4395
4401
|
const isSelected = selected.value.includes(id);
|
|
4396
4402
|
if (props.mandatory && isSelected) return;
|
|
4403
|
+
if (!isSelected && !value) return;
|
|
4397
4404
|
selected.value = value ?? !isSelected ? [id] : [];
|
|
4398
4405
|
}
|
|
4399
4406
|
}
|
|
@@ -4828,7 +4835,7 @@ function useIntersectionObserver(callback, options) {
|
|
|
4828
4835
|
const observer = new IntersectionObserver(entries => {
|
|
4829
4836
|
isIntersecting.value = !!entries.find(entry => entry.isIntersecting);
|
|
4830
4837
|
}, options);
|
|
4831
|
-
|
|
4838
|
+
onScopeDispose(() => {
|
|
4832
4839
|
observer.disconnect();
|
|
4833
4840
|
});
|
|
4834
4841
|
watch(intersectionRef, (newValue, oldValue) => {
|
|
@@ -5359,9 +5366,9 @@ function useBackButton(router, cb) {
|
|
|
5359
5366
|
|
|
5360
5367
|
function useSelectLink(link, select) {
|
|
5361
5368
|
watch(() => link.isActive?.value, isActive => {
|
|
5362
|
-
if (link.isLink.value && isActive && select) {
|
|
5369
|
+
if (link.isLink.value && isActive != null && select) {
|
|
5363
5370
|
nextTick(() => {
|
|
5364
|
-
select(
|
|
5371
|
+
select(isActive);
|
|
5365
5372
|
});
|
|
5366
5373
|
}
|
|
5367
5374
|
}, {
|
|
@@ -8975,6 +8982,7 @@ const makeVListGroupProps = propsFactory({
|
|
|
8975
8982
|
type: IconValue,
|
|
8976
8983
|
default: '$expand'
|
|
8977
8984
|
},
|
|
8985
|
+
rawId: [String, Number],
|
|
8978
8986
|
prependIcon: IconValue,
|
|
8979
8987
|
appendIcon: IconValue,
|
|
8980
8988
|
fluid: Boolean,
|
|
@@ -8996,13 +9004,12 @@ const VListGroup = genericComponent()({
|
|
|
8996
9004
|
open,
|
|
8997
9005
|
id: _id
|
|
8998
9006
|
} = useNestedItem(() => props.value, true);
|
|
8999
|
-
const id = computed(() => `v-list-group--id-${String(_id.value)}`);
|
|
9007
|
+
const id = computed(() => `v-list-group--id-${String(props.rawId ?? _id.value)}`);
|
|
9000
9008
|
const list = useList();
|
|
9001
9009
|
const {
|
|
9002
9010
|
isBooted
|
|
9003
9011
|
} = useSsrBoot();
|
|
9004
9012
|
function onClick(e) {
|
|
9005
|
-
e.stopPropagation();
|
|
9006
9013
|
if (['INPUT', 'TEXTAREA'].includes(e.target?.tagName)) return;
|
|
9007
9014
|
open(!isOpen.value, e);
|
|
9008
9015
|
}
|
|
@@ -9520,9 +9527,10 @@ const VListChildren = genericComponent()({
|
|
|
9520
9527
|
}) : undefined
|
|
9521
9528
|
};
|
|
9522
9529
|
const listGroupProps = VListGroup.filterProps(itemProps);
|
|
9523
|
-
return children ? createVNode(VListGroup, mergeProps({
|
|
9524
|
-
"value": itemProps?.value
|
|
9525
|
-
|
|
9530
|
+
return children ? createVNode(VListGroup, mergeProps(listGroupProps, {
|
|
9531
|
+
"value": props.returnObject ? item : itemProps?.value,
|
|
9532
|
+
"rawId": itemProps?.value
|
|
9533
|
+
}), {
|
|
9526
9534
|
activator: _ref3 => {
|
|
9527
9535
|
let {
|
|
9528
9536
|
props: activatorProps
|
|
@@ -9586,7 +9594,7 @@ function transformItem$3(props, item) {
|
|
|
9586
9594
|
const _props = {
|
|
9587
9595
|
title,
|
|
9588
9596
|
value,
|
|
9589
|
-
...
|
|
9597
|
+
...itemProps
|
|
9590
9598
|
};
|
|
9591
9599
|
return {
|
|
9592
9600
|
title: String(_props.title ?? ''),
|
|
@@ -11946,7 +11954,11 @@ const VField = genericComponent()({
|
|
|
11946
11954
|
default: slots.loader
|
|
11947
11955
|
}), hasPrepend && createElementVNode("div", {
|
|
11948
11956
|
"key": "prepend",
|
|
11949
|
-
"class": "v-field__prepend-inner"
|
|
11957
|
+
"class": "v-field__prepend-inner",
|
|
11958
|
+
"onMousedown": e => {
|
|
11959
|
+
e.preventDefault();
|
|
11960
|
+
e.stopPropagation();
|
|
11961
|
+
}
|
|
11950
11962
|
}, [props.prependInnerIcon && createVNode(InputIcon, {
|
|
11951
11963
|
"key": "prepend-icon",
|
|
11952
11964
|
"name": "prependInner",
|
|
@@ -12015,7 +12027,11 @@ const VField = genericComponent()({
|
|
|
12015
12027
|
})]), [[vShow, props.dirty]])]
|
|
12016
12028
|
}), hasAppend && createElementVNode("div", {
|
|
12017
12029
|
"key": "append",
|
|
12018
|
-
"class": "v-field__append-inner"
|
|
12030
|
+
"class": "v-field__append-inner",
|
|
12031
|
+
"onMousedown": e => {
|
|
12032
|
+
e.preventDefault();
|
|
12033
|
+
e.stopPropagation();
|
|
12034
|
+
}
|
|
12019
12035
|
}, [slots['append-inner']?.(slotProps.value), props.appendInnerIcon && createVNode(InputIcon, {
|
|
12020
12036
|
"key": "append-icon",
|
|
12021
12037
|
"name": "appendInner",
|
|
@@ -12050,6 +12066,16 @@ const VField = genericComponent()({
|
|
|
12050
12066
|
}
|
|
12051
12067
|
});
|
|
12052
12068
|
|
|
12069
|
+
function useAutofocus(props) {
|
|
12070
|
+
function onIntersect(isIntersecting, entries) {
|
|
12071
|
+
if (!props.autofocus || !isIntersecting) return;
|
|
12072
|
+
entries[0].target?.focus?.();
|
|
12073
|
+
}
|
|
12074
|
+
return {
|
|
12075
|
+
onIntersect
|
|
12076
|
+
};
|
|
12077
|
+
}
|
|
12078
|
+
|
|
12053
12079
|
// Types
|
|
12054
12080
|
|
|
12055
12081
|
const activeTypes = ['color', 'file', 'time', 'date', 'datetime-local', 'week', 'month'];
|
|
@@ -12096,6 +12122,9 @@ const VTextField = genericComponent()({
|
|
|
12096
12122
|
focus,
|
|
12097
12123
|
blur
|
|
12098
12124
|
} = useFocus(props);
|
|
12125
|
+
const {
|
|
12126
|
+
onIntersect
|
|
12127
|
+
} = useAutofocus(props);
|
|
12099
12128
|
const counterValue = computed(() => {
|
|
12100
12129
|
return typeof props.counterValue === 'function' ? props.counterValue(model.value) : typeof props.counterValue === 'number' ? props.counterValue : (model.value ?? '').toString().length;
|
|
12101
12130
|
});
|
|
@@ -12105,19 +12134,17 @@ const VTextField = genericComponent()({
|
|
|
12105
12134
|
return props.counter;
|
|
12106
12135
|
});
|
|
12107
12136
|
const isPlainOrUnderlined = computed(() => ['plain', 'underlined'].includes(props.variant));
|
|
12108
|
-
function onIntersect(isIntersecting, entries) {
|
|
12109
|
-
if (!props.autofocus || !isIntersecting) return;
|
|
12110
|
-
entries[0].target?.focus?.();
|
|
12111
|
-
}
|
|
12112
12137
|
const vInputRef = ref();
|
|
12113
12138
|
const vFieldRef = ref();
|
|
12114
12139
|
const inputRef = ref();
|
|
12115
12140
|
const isActive = computed(() => activeTypes.includes(props.type) || props.persistentPlaceholder || isFocused.value || props.active);
|
|
12116
12141
|
function onFocus() {
|
|
12117
|
-
if (inputRef.value !== document.activeElement) {
|
|
12118
|
-
inputRef.value?.focus();
|
|
12119
|
-
}
|
|
12120
12142
|
if (!isFocused.value) focus();
|
|
12143
|
+
nextTick(() => {
|
|
12144
|
+
if (inputRef.value !== document.activeElement) {
|
|
12145
|
+
inputRef.value?.focus();
|
|
12146
|
+
}
|
|
12147
|
+
});
|
|
12121
12148
|
}
|
|
12122
12149
|
function onControlMousedown(e) {
|
|
12123
12150
|
emit('mousedown:control', e);
|
|
@@ -12126,7 +12153,6 @@ const VTextField = genericComponent()({
|
|
|
12126
12153
|
e.preventDefault();
|
|
12127
12154
|
}
|
|
12128
12155
|
function onControlClick(e) {
|
|
12129
|
-
onFocus();
|
|
12130
12156
|
emit('click:control', e);
|
|
12131
12157
|
}
|
|
12132
12158
|
function onClear(e, reset) {
|
|
@@ -13052,6 +13078,7 @@ const VSelect = genericComponent()({
|
|
|
13052
13078
|
index,
|
|
13053
13079
|
itemRef
|
|
13054
13080
|
} = _ref2;
|
|
13081
|
+
const camelizedProps = camelizeProps(item.props);
|
|
13055
13082
|
const itemProps = mergeProps(item.props, {
|
|
13056
13083
|
ref: itemRef,
|
|
13057
13084
|
key: item.value,
|
|
@@ -13073,10 +13100,10 @@ const VSelect = genericComponent()({
|
|
|
13073
13100
|
"modelValue": isSelected,
|
|
13074
13101
|
"ripple": false,
|
|
13075
13102
|
"tabindex": "-1"
|
|
13076
|
-
}, null) : undefined,
|
|
13077
|
-
"image":
|
|
13078
|
-
}, null),
|
|
13079
|
-
"icon":
|
|
13103
|
+
}, null) : undefined, camelizedProps.prependAvatar && createVNode(VAvatar, {
|
|
13104
|
+
"image": camelizedProps.prependAvatar
|
|
13105
|
+
}, null), camelizedProps.prependIcon && createVNode(VIcon, {
|
|
13106
|
+
"icon": camelizedProps.prependIcon
|
|
13080
13107
|
}, null)]);
|
|
13081
13108
|
}
|
|
13082
13109
|
});
|
|
@@ -16255,7 +16282,7 @@ const VSliderThumb = genericComponent()({
|
|
|
16255
16282
|
default: () => [withDirectives(createElementVNode("div", {
|
|
16256
16283
|
"class": "v-slider-thumb__label-container"
|
|
16257
16284
|
}, [createElementVNode("div", {
|
|
16258
|
-
"class": normalizeClass(['v-slider-thumb__label'])
|
|
16285
|
+
"class": normalizeClass(['v-slider-thumb__label', textColorClasses.value])
|
|
16259
16286
|
}, [createElementVNode("div", null, [slots['thumb-label']?.({
|
|
16260
16287
|
modelValue: props.modelValue
|
|
16261
16288
|
}) ?? props.modelValue.toFixed(step.value ? decimals.value : 1)])])]), [[vShow, thumbLabel.value && props.focused || thumbLabel.value === 'always']])]
|
|
@@ -17524,7 +17551,7 @@ function getWeek(date, locale, firstDayOfWeek, firstWeekMinSize) {
|
|
|
17524
17551
|
const yearStart = new Date(year, 0, 1);
|
|
17525
17552
|
const size = firstWeekSize(year);
|
|
17526
17553
|
const d1w1 = size >= minWeekSize ? addDays(yearStart, size - 7) : addDays(yearStart, size);
|
|
17527
|
-
return 1 + getDiff(date, d1w1, 'weeks');
|
|
17554
|
+
return 1 + getDiff(endOfDay(date), startOfDay(d1w1), 'weeks');
|
|
17528
17555
|
}
|
|
17529
17556
|
function getDate(date) {
|
|
17530
17557
|
return date.getDate();
|
|
@@ -17827,6 +17854,18 @@ function createDate(options, locale) {
|
|
|
17827
17854
|
instance: createInstance(_options, locale)
|
|
17828
17855
|
};
|
|
17829
17856
|
}
|
|
17857
|
+
function createDateRange(adapter, start, stop) {
|
|
17858
|
+
const diff = adapter.getDiff(adapter.endOfDay(stop ?? start), adapter.startOfDay(start), 'days');
|
|
17859
|
+
const datesInRange = [start];
|
|
17860
|
+
for (let i = 1; i < diff; i++) {
|
|
17861
|
+
const nextDate = adapter.addDays(start, i);
|
|
17862
|
+
datesInRange.push(nextDate);
|
|
17863
|
+
}
|
|
17864
|
+
if (stop) {
|
|
17865
|
+
datesInRange.push(adapter.endOfDay(stop));
|
|
17866
|
+
}
|
|
17867
|
+
return datesInRange;
|
|
17868
|
+
}
|
|
17830
17869
|
function createInstance(options, locale) {
|
|
17831
17870
|
const instance = reactive(typeof options.adapter === 'function'
|
|
17832
17871
|
// eslint-disable-next-line new-cap
|
|
@@ -17837,20 +17876,7 @@ function createInstance(options, locale) {
|
|
|
17837
17876
|
watch(locale.current, value => {
|
|
17838
17877
|
instance.locale = options.locale[value] ?? value ?? instance.locale;
|
|
17839
17878
|
});
|
|
17840
|
-
return
|
|
17841
|
-
createDateRange(start, stop) {
|
|
17842
|
-
const diff = instance.getDiff(stop ?? start, start, 'days');
|
|
17843
|
-
const datesInRange = [start];
|
|
17844
|
-
for (let i = 1; i < diff; i++) {
|
|
17845
|
-
const nextDate = instance.addDays(start, i);
|
|
17846
|
-
datesInRange.push(nextDate);
|
|
17847
|
-
}
|
|
17848
|
-
if (stop) {
|
|
17849
|
-
datesInRange.push(instance.endOfDay(stop));
|
|
17850
|
-
}
|
|
17851
|
-
return datesInRange;
|
|
17852
|
-
}
|
|
17853
|
-
});
|
|
17879
|
+
return instance;
|
|
17854
17880
|
}
|
|
17855
17881
|
function useDate() {
|
|
17856
17882
|
const options = inject$1(DateOptionsSymbol);
|
|
@@ -19939,7 +19965,9 @@ const VDataTableFooter = genericComponent()({
|
|
|
19939
19965
|
"class": "v-data-table-footer"
|
|
19940
19966
|
}, [slots.prepend?.(), createElementVNode("div", {
|
|
19941
19967
|
"class": "v-data-table-footer__items-per-page"
|
|
19942
|
-
}, [createElementVNode("span",
|
|
19968
|
+
}, [createElementVNode("span", {
|
|
19969
|
+
"aria-label": t(props.itemsPerPageText)
|
|
19970
|
+
}, [t(props.itemsPerPageText)]), createVNode(VSelect, {
|
|
19943
19971
|
"items": itemsPerPageOptions.value,
|
|
19944
19972
|
"modelValue": itemsPerPage.value,
|
|
19945
19973
|
"onUpdate:modelValue": v => setItemsPerPage(Number(v)),
|
|
@@ -19991,6 +20019,7 @@ const VDataTableColumn = defineFunctionalComponent({
|
|
|
19991
20019
|
} = _ref;
|
|
19992
20020
|
const Tag = props.tag ?? 'td';
|
|
19993
20021
|
return createVNode(Tag, {
|
|
20022
|
+
"tabindex": "0",
|
|
19994
20023
|
"class": normalizeClass(['v-data-table__td', {
|
|
19995
20024
|
'v-data-table-column--fixed': props.fixed,
|
|
19996
20025
|
'v-data-table-column--last-fixed': props.lastFixed,
|
|
@@ -20335,6 +20364,11 @@ const VDataTableHeaders = genericComponent()({
|
|
|
20335
20364
|
top: props.sticky || props.fixedHeader ? `calc(var(--v-table-header-height) * ${y})` : undefined
|
|
20336
20365
|
};
|
|
20337
20366
|
}
|
|
20367
|
+
function handleEnterKeyPress(event, column) {
|
|
20368
|
+
if (event.key === 'Enter' && !props.disableSort) {
|
|
20369
|
+
toggleSort(column);
|
|
20370
|
+
}
|
|
20371
|
+
}
|
|
20338
20372
|
function getSortIcon(column) {
|
|
20339
20373
|
const item = sortBy.value.find(item => item.key === column.key);
|
|
20340
20374
|
if (!item) return props.sortAscIcon;
|
|
@@ -20391,7 +20425,9 @@ const VDataTableHeaders = genericComponent()({
|
|
|
20391
20425
|
"nowrap": column.nowrap,
|
|
20392
20426
|
"lastFixed": column.lastFixed,
|
|
20393
20427
|
"noPadding": noPadding
|
|
20394
|
-
}, headerProps
|
|
20428
|
+
}, headerProps, {
|
|
20429
|
+
"onKeydown": event => column.sortable && handleEnterKeyPress(event, column)
|
|
20430
|
+
}), {
|
|
20395
20431
|
default: () => {
|
|
20396
20432
|
const columnSlotName = `header.${column.key}`;
|
|
20397
20433
|
const columnSlotProps = {
|
|
@@ -22244,7 +22280,7 @@ const VDatePickerMonth = genericComponent()({
|
|
|
22244
22280
|
} else {
|
|
22245
22281
|
rangeStop.value = adapter.endOfDay(_value);
|
|
22246
22282
|
}
|
|
22247
|
-
model.value =
|
|
22283
|
+
model.value = createDateRange(adapter, rangeStart.value, rangeStop.value);
|
|
22248
22284
|
} else {
|
|
22249
22285
|
rangeStart.value = value;
|
|
22250
22286
|
rangeStop.value = undefined;
|
|
@@ -22463,9 +22499,7 @@ const VDatePickerYears = genericComponent()({
|
|
|
22463
22499
|
const yearRef = templateRef();
|
|
22464
22500
|
onMounted(async () => {
|
|
22465
22501
|
await nextTick();
|
|
22466
|
-
yearRef.el?.
|
|
22467
|
-
block: 'center'
|
|
22468
|
-
});
|
|
22502
|
+
yearRef.el?.focus();
|
|
22469
22503
|
});
|
|
22470
22504
|
function isYearAllowed(year) {
|
|
22471
22505
|
if (Array.isArray(props.allowedYears) && props.allowedYears.length) {
|
|
@@ -22601,8 +22635,16 @@ const VDatePicker = genericComponent()({
|
|
|
22601
22635
|
return value && adapter.isValid(value) ? value : today;
|
|
22602
22636
|
});
|
|
22603
22637
|
const headerColor = toRef(() => props.headerColor ?? props.color);
|
|
22604
|
-
const
|
|
22605
|
-
const
|
|
22638
|
+
const _month = useProxiedModel(props, 'month');
|
|
22639
|
+
const month = computed({
|
|
22640
|
+
get: () => Number(_month.value ?? adapter.getMonth(adapter.startOfMonth(internal.value))),
|
|
22641
|
+
set: v => _month.value = v
|
|
22642
|
+
});
|
|
22643
|
+
const _year = useProxiedModel(props, 'year');
|
|
22644
|
+
const year = computed({
|
|
22645
|
+
get: () => Number(_year.value ?? adapter.getYear(adapter.startOfYear(adapter.setMonth(internal.value, month.value)))),
|
|
22646
|
+
set: v => _year.value = v
|
|
22647
|
+
});
|
|
22606
22648
|
const isReversing = shallowRef(false);
|
|
22607
22649
|
const header = computed(() => {
|
|
22608
22650
|
if (props.multiple && model.value.length > 1) {
|
|
@@ -22686,9 +22728,9 @@ const VDatePicker = genericComponent()({
|
|
|
22686
22728
|
} else {
|
|
22687
22729
|
year.value++;
|
|
22688
22730
|
month.value = 0;
|
|
22689
|
-
onUpdateYear(
|
|
22731
|
+
onUpdateYear();
|
|
22690
22732
|
}
|
|
22691
|
-
onUpdateMonth(
|
|
22733
|
+
onUpdateMonth();
|
|
22692
22734
|
}
|
|
22693
22735
|
function onClickPrev() {
|
|
22694
22736
|
if (month.value > 0) {
|
|
@@ -22696,9 +22738,9 @@ const VDatePicker = genericComponent()({
|
|
|
22696
22738
|
} else {
|
|
22697
22739
|
year.value--;
|
|
22698
22740
|
month.value = 11;
|
|
22699
|
-
onUpdateYear(
|
|
22741
|
+
onUpdateYear();
|
|
22700
22742
|
}
|
|
22701
|
-
onUpdateMonth(
|
|
22743
|
+
onUpdateMonth();
|
|
22702
22744
|
}
|
|
22703
22745
|
function onClickDate() {
|
|
22704
22746
|
viewMode.value = 'month';
|
|
@@ -22709,13 +22751,11 @@ const VDatePicker = genericComponent()({
|
|
|
22709
22751
|
function onClickYear() {
|
|
22710
22752
|
viewMode.value = viewMode.value === 'year' ? 'month' : 'year';
|
|
22711
22753
|
}
|
|
22712
|
-
function onUpdateMonth(
|
|
22754
|
+
function onUpdateMonth() {
|
|
22713
22755
|
if (viewMode.value === 'months') onClickMonth();
|
|
22714
|
-
emit('update:month', value);
|
|
22715
22756
|
}
|
|
22716
|
-
function onUpdateYear(
|
|
22757
|
+
function onUpdateYear() {
|
|
22717
22758
|
if (viewMode.value === 'year') onClickYear();
|
|
22718
|
-
emit('update:year', value);
|
|
22719
22759
|
}
|
|
22720
22760
|
watch(model, (val, oldVal) => {
|
|
22721
22761
|
const arrBefore = wrapInArray(oldVal);
|
|
@@ -22727,11 +22767,11 @@ const VDatePicker = genericComponent()({
|
|
|
22727
22767
|
const newYear = adapter.getYear(after);
|
|
22728
22768
|
if (newMonth !== month.value) {
|
|
22729
22769
|
month.value = newMonth;
|
|
22730
|
-
onUpdateMonth(
|
|
22770
|
+
onUpdateMonth();
|
|
22731
22771
|
}
|
|
22732
22772
|
if (newYear !== year.value) {
|
|
22733
22773
|
year.value = newYear;
|
|
22734
|
-
onUpdateYear(
|
|
22774
|
+
onUpdateYear();
|
|
22735
22775
|
}
|
|
22736
22776
|
isReversing.value = adapter.isBefore(before, after);
|
|
22737
22777
|
});
|
|
@@ -23331,6 +23371,56 @@ const VFab = genericComponent()({
|
|
|
23331
23371
|
|
|
23332
23372
|
// Types
|
|
23333
23373
|
|
|
23374
|
+
function useFileDrop() {
|
|
23375
|
+
function hasFilesOrFolders(e) {
|
|
23376
|
+
const entries = [...(e.dataTransfer?.items ?? [])].filter(x => x.kind === 'file').map(x => x.webkitGetAsEntry()).filter(Boolean);
|
|
23377
|
+
return entries.length > 0 || [...(e.dataTransfer?.files ?? [])].length > 0;
|
|
23378
|
+
}
|
|
23379
|
+
async function handleDrop(e) {
|
|
23380
|
+
const result = [];
|
|
23381
|
+
const entries = [...(e.dataTransfer?.items ?? [])].filter(x => x.kind === 'file').map(x => x.webkitGetAsEntry()).filter(Boolean);
|
|
23382
|
+
if (entries.length) {
|
|
23383
|
+
for (const entry of entries) {
|
|
23384
|
+
const files = await traverseFileTree(entry, appendIfDirectory('.', entry));
|
|
23385
|
+
result.push(...files.map(x => x.file));
|
|
23386
|
+
}
|
|
23387
|
+
} else {
|
|
23388
|
+
result.push(...[...(e.dataTransfer?.files ?? [])]);
|
|
23389
|
+
}
|
|
23390
|
+
return result;
|
|
23391
|
+
}
|
|
23392
|
+
return {
|
|
23393
|
+
handleDrop,
|
|
23394
|
+
hasFilesOrFolders
|
|
23395
|
+
};
|
|
23396
|
+
}
|
|
23397
|
+
function traverseFileTree(item) {
|
|
23398
|
+
let path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
23399
|
+
return new Promise((resolve, reject) => {
|
|
23400
|
+
if (item.isFile) {
|
|
23401
|
+
const fileEntry = item;
|
|
23402
|
+
fileEntry.file(file => resolve([{
|
|
23403
|
+
file,
|
|
23404
|
+
path
|
|
23405
|
+
}]), reject);
|
|
23406
|
+
} else if (item.isDirectory) {
|
|
23407
|
+
const directoryReader = item.createReader();
|
|
23408
|
+
directoryReader.readEntries(async entries => {
|
|
23409
|
+
const files = [];
|
|
23410
|
+
for (const entry of entries) {
|
|
23411
|
+
files.push(...(await traverseFileTree(entry, appendIfDirectory(path, entry))));
|
|
23412
|
+
}
|
|
23413
|
+
resolve(files);
|
|
23414
|
+
});
|
|
23415
|
+
}
|
|
23416
|
+
});
|
|
23417
|
+
}
|
|
23418
|
+
function appendIfDirectory(path, item) {
|
|
23419
|
+
return item.isDirectory ? `${path}/${item.name}` : path;
|
|
23420
|
+
}
|
|
23421
|
+
|
|
23422
|
+
// Types
|
|
23423
|
+
|
|
23334
23424
|
const makeVFileInputProps = propsFactory({
|
|
23335
23425
|
chips: Boolean,
|
|
23336
23426
|
counter: Boolean,
|
|
@@ -23415,6 +23505,10 @@ const VFileInput = genericComponent()({
|
|
|
23415
23505
|
const isActive = toRef(() => isFocused.value || props.active);
|
|
23416
23506
|
const isPlainOrUnderlined = computed(() => ['plain', 'underlined'].includes(props.variant));
|
|
23417
23507
|
const isDragging = shallowRef(false);
|
|
23508
|
+
const {
|
|
23509
|
+
handleDrop,
|
|
23510
|
+
hasFilesOrFolders
|
|
23511
|
+
} = useFileDrop();
|
|
23418
23512
|
function onFocus() {
|
|
23419
23513
|
if (inputRef.value !== document.activeElement) {
|
|
23420
23514
|
inputRef.value?.focus();
|
|
@@ -23448,13 +23542,13 @@ const VFileInput = genericComponent()({
|
|
|
23448
23542
|
e.preventDefault();
|
|
23449
23543
|
isDragging.value = false;
|
|
23450
23544
|
}
|
|
23451
|
-
function onDrop(e) {
|
|
23545
|
+
async function onDrop(e) {
|
|
23452
23546
|
e.preventDefault();
|
|
23453
23547
|
e.stopImmediatePropagation();
|
|
23454
23548
|
isDragging.value = false;
|
|
23455
|
-
if (!
|
|
23549
|
+
if (!inputRef.value || !hasFilesOrFolders(e)) return;
|
|
23456
23550
|
const dataTransfer = new DataTransfer();
|
|
23457
|
-
for (const file of e
|
|
23551
|
+
for (const file of await handleDrop(e)) {
|
|
23458
23552
|
dataTransfer.items.add(file);
|
|
23459
23553
|
}
|
|
23460
23554
|
inputRef.value.files = dataTransfer.files;
|
|
@@ -24885,6 +24979,7 @@ const VNumberInput = genericComponent()({
|
|
|
24885
24979
|
...makeVNumberInputProps()
|
|
24886
24980
|
},
|
|
24887
24981
|
emits: {
|
|
24982
|
+
'update:focused': val => true,
|
|
24888
24983
|
'update:modelValue': val => true
|
|
24889
24984
|
},
|
|
24890
24985
|
setup(props, _ref) {
|
|
@@ -24900,11 +24995,7 @@ const VNumberInput = genericComponent()({
|
|
|
24900
24995
|
});
|
|
24901
24996
|
const form = useForm(props);
|
|
24902
24997
|
const controlsDisabled = computed(() => form.isDisabled.value || form.isReadonly.value);
|
|
24903
|
-
const
|
|
24904
|
-
isFocused,
|
|
24905
|
-
focus,
|
|
24906
|
-
blur
|
|
24907
|
-
} = useFocus(props);
|
|
24998
|
+
const isFocused = shallowRef(props.focused);
|
|
24908
24999
|
function correctPrecision(val) {
|
|
24909
25000
|
let precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : props.precision;
|
|
24910
25001
|
const fixed = precision == null ? String(val) : val.toFixed(precision);
|
|
@@ -25089,11 +25180,9 @@ const VNumberInput = genericComponent()({
|
|
|
25089
25180
|
inputText.value = model.value.toString();
|
|
25090
25181
|
}
|
|
25091
25182
|
function onFocus() {
|
|
25092
|
-
focus();
|
|
25093
25183
|
trimDecimalZeros();
|
|
25094
25184
|
}
|
|
25095
25185
|
function onBlur() {
|
|
25096
|
-
blur();
|
|
25097
25186
|
clampModel();
|
|
25098
25187
|
}
|
|
25099
25188
|
useRender(() => {
|
|
@@ -25186,9 +25275,12 @@ const VNumberInput = genericComponent()({
|
|
|
25186
25275
|
}, null)]) : props.reverse && controlVariant.value !== 'hidden' ? createElementVNode(Fragment, null, [controlNode(), dividerNode()]) : undefined;
|
|
25187
25276
|
const hasPrependInner = slots['prepend-inner'] || prependInnerControl;
|
|
25188
25277
|
return createVNode(VTextField, mergeProps({
|
|
25189
|
-
"ref": vTextFieldRef
|
|
25278
|
+
"ref": vTextFieldRef
|
|
25279
|
+
}, textFieldProps, {
|
|
25190
25280
|
"modelValue": inputText.value,
|
|
25191
25281
|
"onUpdate:modelValue": $event => inputText.value = $event,
|
|
25282
|
+
"focused": isFocused.value,
|
|
25283
|
+
"onUpdate:focused": $event => isFocused.value = $event,
|
|
25192
25284
|
"validationValue": model.value,
|
|
25193
25285
|
"onBeforeinput": onBeforeinput,
|
|
25194
25286
|
"onFocus": onFocus,
|
|
@@ -25201,8 +25293,7 @@ const VNumberInput = genericComponent()({
|
|
|
25201
25293
|
'v-number-input--reverse': props.reverse,
|
|
25202
25294
|
'v-number-input--split': controlVariant.value === 'split',
|
|
25203
25295
|
'v-number-input--stacked': controlVariant.value === 'stacked'
|
|
25204
|
-
}, props.class]
|
|
25205
|
-
}, textFieldProps, {
|
|
25296
|
+
}, props.class],
|
|
25206
25297
|
"style": props.style,
|
|
25207
25298
|
"inputmode": "decimal"
|
|
25208
25299
|
}), {
|
|
@@ -25288,6 +25379,21 @@ const VOtpInput = genericComponent()({
|
|
|
25288
25379
|
const contentRef = ref();
|
|
25289
25380
|
const inputRef = ref([]);
|
|
25290
25381
|
const current = computed(() => inputRef.value[focusIndex.value]);
|
|
25382
|
+
const intersectScope = effectScope();
|
|
25383
|
+
intersectScope.run(() => {
|
|
25384
|
+
const {
|
|
25385
|
+
intersectionRef,
|
|
25386
|
+
isIntersecting
|
|
25387
|
+
} = useIntersectionObserver();
|
|
25388
|
+
watch(isIntersecting, v => {
|
|
25389
|
+
if (!v) return;
|
|
25390
|
+
intersectionRef.value?.focus();
|
|
25391
|
+
intersectScope.stop();
|
|
25392
|
+
});
|
|
25393
|
+
watchEffect(() => {
|
|
25394
|
+
intersectionRef.value = inputRef.value[0];
|
|
25395
|
+
});
|
|
25396
|
+
});
|
|
25291
25397
|
function onInput() {
|
|
25292
25398
|
// The maxlength attribute doesn't work for the number type input, so the text type is used.
|
|
25293
25399
|
// The following logic simulates the behavior of a number input.
|
|
@@ -25337,7 +25443,7 @@ const VOtpInput = genericComponent()({
|
|
|
25337
25443
|
function onPaste(index, e) {
|
|
25338
25444
|
e.preventDefault();
|
|
25339
25445
|
e.stopPropagation();
|
|
25340
|
-
const clipboardText = e?.clipboardData?.getData('Text').slice(0, length.value) ?? '';
|
|
25446
|
+
const clipboardText = e?.clipboardData?.getData('Text').trim().slice(0, length.value) ?? '';
|
|
25341
25447
|
if (isValidNumber(clipboardText)) return;
|
|
25342
25448
|
model.value = clipboardText.split('');
|
|
25343
25449
|
inputRef.value?.[index].blur();
|
|
@@ -25369,7 +25475,10 @@ const VOtpInput = genericComponent()({
|
|
|
25369
25475
|
scoped: true
|
|
25370
25476
|
});
|
|
25371
25477
|
watch(model, val => {
|
|
25372
|
-
if (val.length === length.value)
|
|
25478
|
+
if (val.length === length.value) {
|
|
25479
|
+
focusIndex.value = length.value - 1;
|
|
25480
|
+
emit('finish', val.join(''));
|
|
25481
|
+
}
|
|
25373
25482
|
}, {
|
|
25374
25483
|
deep: true
|
|
25375
25484
|
});
|
|
@@ -28031,6 +28140,9 @@ const VTextarea = genericComponent()({
|
|
|
28031
28140
|
focus,
|
|
28032
28141
|
blur
|
|
28033
28142
|
} = useFocus(props);
|
|
28143
|
+
const {
|
|
28144
|
+
onIntersect
|
|
28145
|
+
} = useAutofocus(props);
|
|
28034
28146
|
const counterValue = computed(() => {
|
|
28035
28147
|
return typeof props.counterValue === 'function' ? props.counterValue(model.value) : (model.value || '').toString().length;
|
|
28036
28148
|
});
|
|
@@ -28039,10 +28151,6 @@ const VTextarea = genericComponent()({
|
|
|
28039
28151
|
if (!props.counter || typeof props.counter !== 'number' && typeof props.counter !== 'string') return undefined;
|
|
28040
28152
|
return props.counter;
|
|
28041
28153
|
});
|
|
28042
|
-
function onIntersect(isIntersecting, entries) {
|
|
28043
|
-
if (!props.autofocus || !isIntersecting) return;
|
|
28044
|
-
entries[0].target?.focus?.();
|
|
28045
|
-
}
|
|
28046
28154
|
const vInputRef = ref();
|
|
28047
28155
|
const vFieldRef = ref();
|
|
28048
28156
|
const controlHeight = shallowRef('');
|
|
@@ -29260,13 +29368,9 @@ const VColorInput = genericComponent()({
|
|
|
29260
29368
|
let {
|
|
29261
29369
|
slots
|
|
29262
29370
|
} = _ref;
|
|
29263
|
-
const {
|
|
29264
|
-
isFocused,
|
|
29265
|
-
focus,
|
|
29266
|
-
blur
|
|
29267
|
-
} = useFocus(props);
|
|
29268
29371
|
const model = useProxiedModel(props, 'modelValue');
|
|
29269
29372
|
const menu = shallowRef(false);
|
|
29373
|
+
const isFocused = shallowRef(props.focused);
|
|
29270
29374
|
const isInteractive = computed(() => !props.disabled && !props.readonly);
|
|
29271
29375
|
const display = computed(() => model.value || null);
|
|
29272
29376
|
function onKeydown(e) {
|
|
@@ -29297,10 +29401,9 @@ const VColorInput = genericComponent()({
|
|
|
29297
29401
|
"modelValue": display.value,
|
|
29298
29402
|
"onKeydown": isInteractive.value ? onKeydown : undefined,
|
|
29299
29403
|
"focused": menu.value || isFocused.value,
|
|
29300
|
-
"onFocus": focus,
|
|
29301
|
-
"onBlur": blur,
|
|
29302
29404
|
"onClick:control": isInteractive.value ? onClick : undefined,
|
|
29303
29405
|
"onClick:prependInner": isInteractive.value ? onClick : undefined,
|
|
29406
|
+
"onUpdate:focused": event => isFocused.value = event,
|
|
29304
29407
|
"onClick:appendInner": isInteractive.value ? onClick : undefined,
|
|
29305
29408
|
"onUpdate:modelValue": val => {
|
|
29306
29409
|
model.value = val;
|
|
@@ -29504,6 +29607,7 @@ const VDateInput = genericComponent()({
|
|
|
29504
29607
|
emits: {
|
|
29505
29608
|
save: value => true,
|
|
29506
29609
|
cancel: () => true,
|
|
29610
|
+
'update:focused': val => true,
|
|
29507
29611
|
'update:modelValue': val => true,
|
|
29508
29612
|
'update:menu': val => true
|
|
29509
29613
|
},
|
|
@@ -29526,15 +29630,11 @@ const VDateInput = genericComponent()({
|
|
|
29526
29630
|
const {
|
|
29527
29631
|
mobile
|
|
29528
29632
|
} = useDisplay(props);
|
|
29529
|
-
const {
|
|
29530
|
-
isFocused,
|
|
29531
|
-
focus,
|
|
29532
|
-
blur
|
|
29533
|
-
} = useFocus(props);
|
|
29534
29633
|
const emptyModelValue = () => props.multiple ? [] : null;
|
|
29535
29634
|
const model = useProxiedModel(props, 'modelValue', emptyModelValue(), val => Array.isArray(val) ? val.map(item => adapter.toJsDate(item)) : val ? adapter.toJsDate(val) : val, val => Array.isArray(val) ? val.map(item => adapter.date(item)) : val ? adapter.date(val) : val);
|
|
29536
29635
|
const menu = useProxiedModel(props, 'menu');
|
|
29537
29636
|
const isEditingInput = shallowRef(false);
|
|
29637
|
+
const isFocused = shallowRef(props.focused);
|
|
29538
29638
|
const vTextFieldRef = ref();
|
|
29539
29639
|
const disabledActions = ref(['save']);
|
|
29540
29640
|
function format(date) {
|
|
@@ -29610,7 +29710,6 @@ const VDateInput = genericComponent()({
|
|
|
29610
29710
|
if (props.updateOn.includes('blur')) {
|
|
29611
29711
|
onUserInput(e.target);
|
|
29612
29712
|
}
|
|
29613
|
-
blur();
|
|
29614
29713
|
|
|
29615
29714
|
// When in mobile mode and editing is done (due to keyboard dismissal), close the menu
|
|
29616
29715
|
if (mobile.value && isEditingInput.value && !isFocused.value) {
|
|
@@ -29633,7 +29732,7 @@ const VDateInput = genericComponent()({
|
|
|
29633
29732
|
if (parts.every(isValid)) {
|
|
29634
29733
|
if (props.multiple === 'range') {
|
|
29635
29734
|
const [start, stop] = parts.map(parseDate).toSorted((a, b) => adapter.isAfter(a, b) ? 1 : -1);
|
|
29636
|
-
model.value =
|
|
29735
|
+
model.value = createDateRange(adapter, start, stop);
|
|
29637
29736
|
} else {
|
|
29638
29737
|
model.value = parts.map(parseDate);
|
|
29639
29738
|
}
|
|
@@ -29655,12 +29754,12 @@ const VDateInput = genericComponent()({
|
|
|
29655
29754
|
"readonly": isReadonly.value,
|
|
29656
29755
|
"onKeydown": isInteractive.value ? onKeydown : undefined,
|
|
29657
29756
|
"focused": menu.value || isFocused.value,
|
|
29658
|
-
"onFocus": focus,
|
|
29659
29757
|
"onBlur": onBlur,
|
|
29660
29758
|
"validationValue": model.value,
|
|
29661
29759
|
"onClick:control": isInteractive.value ? onClick : undefined,
|
|
29662
29760
|
"onClick:prepend": isInteractive.value ? onClick : undefined,
|
|
29663
|
-
"onUpdate:modelValue": onUpdateDisplayModel
|
|
29761
|
+
"onUpdate:modelValue": onUpdateDisplayModel,
|
|
29762
|
+
"onUpdate:focused": event => isFocused.value = event
|
|
29664
29763
|
}), {
|
|
29665
29764
|
...slots,
|
|
29666
29765
|
default: () => createElementVNode(Fragment, null, [createVNode(VMenu, {
|
|
@@ -29768,6 +29867,7 @@ const VFileUploadItem = genericComponent()({
|
|
|
29768
29867
|
"class": "v-file-upload-item"
|
|
29769
29868
|
}), {
|
|
29770
29869
|
...slots,
|
|
29870
|
+
title: () => props?.title ?? props.file?.name,
|
|
29771
29871
|
prepend: slotProps => createElementVNode(Fragment, null, [!slots.prepend ? createVNode(VAvatar, {
|
|
29772
29872
|
"icon": props.fileIcon,
|
|
29773
29873
|
"image": preview.value,
|
|
@@ -29875,6 +29975,9 @@ const VFileUpload = genericComponent()({
|
|
|
29875
29975
|
const isDragging = shallowRef(false);
|
|
29876
29976
|
const vSheetRef = ref(null);
|
|
29877
29977
|
const inputRef = ref(null);
|
|
29978
|
+
const {
|
|
29979
|
+
handleDrop
|
|
29980
|
+
} = useFileDrop();
|
|
29878
29981
|
function onDragover(e) {
|
|
29879
29982
|
e.preventDefault();
|
|
29880
29983
|
e.stopImmediatePropagation();
|
|
@@ -29884,13 +29987,13 @@ const VFileUpload = genericComponent()({
|
|
|
29884
29987
|
e.preventDefault();
|
|
29885
29988
|
isDragging.value = false;
|
|
29886
29989
|
}
|
|
29887
|
-
function onDrop(e) {
|
|
29990
|
+
async function onDrop(e) {
|
|
29888
29991
|
e.preventDefault();
|
|
29889
29992
|
e.stopImmediatePropagation();
|
|
29890
29993
|
isDragging.value = false;
|
|
29891
|
-
if (!
|
|
29994
|
+
if (!inputRef.value) return;
|
|
29892
29995
|
const dataTransfer = new DataTransfer();
|
|
29893
|
-
for (const file of e
|
|
29996
|
+
for (const file of await handleDrop(e)) {
|
|
29894
29997
|
dataTransfer.items.add(file);
|
|
29895
29998
|
}
|
|
29896
29999
|
inputRef.value.files = dataTransfer.files;
|
|
@@ -30613,6 +30716,7 @@ const VTimePickerClock = genericComponent()({
|
|
|
30613
30716
|
const isDragging = ref(false);
|
|
30614
30717
|
const valueOnMouseDown = ref(null);
|
|
30615
30718
|
const valueOnMouseUp = ref(null);
|
|
30719
|
+
const emitChangeDebounced = debounce(value => emit('change', value), 750);
|
|
30616
30720
|
const {
|
|
30617
30721
|
textColorClasses,
|
|
30618
30722
|
textColorStyles
|
|
@@ -30658,6 +30762,7 @@ const VTimePickerClock = genericComponent()({
|
|
|
30658
30762
|
if (value !== props.displayedValue) {
|
|
30659
30763
|
update(value);
|
|
30660
30764
|
}
|
|
30765
|
+
emitChangeDebounced(value);
|
|
30661
30766
|
}
|
|
30662
30767
|
function isInner(value) {
|
|
30663
30768
|
return props.double && value - props.min >= roundCount.value;
|
|
@@ -31258,6 +31363,7 @@ const VTreeviewItem = genericComponent()({
|
|
|
31258
31363
|
}
|
|
31259
31364
|
function onClickAction(e) {
|
|
31260
31365
|
e.preventDefault();
|
|
31366
|
+
e.stopPropagation();
|
|
31261
31367
|
emit('toggleExpand', e);
|
|
31262
31368
|
}
|
|
31263
31369
|
useRender(() => {
|
|
@@ -31403,7 +31509,8 @@ const VTreeviewChildren = genericComponent()({
|
|
|
31403
31509
|
const treeviewGroupProps = VTreeviewGroup.filterProps(itemProps);
|
|
31404
31510
|
const treeviewChildrenProps = VTreeviewChildren.filterProps(props);
|
|
31405
31511
|
return children ? createVNode(VTreeviewGroup, mergeProps(treeviewGroupProps, {
|
|
31406
|
-
"value": props.returnObject ? item.raw : treeviewGroupProps?.value
|
|
31512
|
+
"value": props.returnObject ? item.raw : treeviewGroupProps?.value,
|
|
31513
|
+
"rawId": treeviewGroupProps?.value
|
|
31407
31514
|
}), {
|
|
31408
31515
|
activator: _ref2 => {
|
|
31409
31516
|
let {
|
|
@@ -32091,7 +32198,7 @@ function createVuetify$1() {
|
|
|
32091
32198
|
};
|
|
32092
32199
|
});
|
|
32093
32200
|
}
|
|
32094
|
-
const version$1 = "3.8.
|
|
32201
|
+
const version$1 = "3.8.10";
|
|
32095
32202
|
createVuetify$1.version = version$1;
|
|
32096
32203
|
|
|
32097
32204
|
// Vue's inject() can only be used in setup
|
|
@@ -32389,7 +32496,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
32389
32496
|
|
|
32390
32497
|
/* eslint-disable local-rules/sort-imports */
|
|
32391
32498
|
|
|
32392
|
-
const version = "3.8.
|
|
32499
|
+
const version = "3.8.10";
|
|
32393
32500
|
|
|
32394
32501
|
/* eslint-disable local-rules/sort-imports */
|
|
32395
32502
|
|