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.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, createVNode, mergeProps, createElementVNode, normalizeClass, toValue, onBeforeUnmount, watch, readonly, onMounted, useId, onDeactivated, onActivated, onScopeDispose, effectScope, toRaw, normalizeStyle, TransitionGroup, Transition, toRefs, isRef, onBeforeMount, nextTick, withDirectives, vShow, onUpdated, Text, resolveDynamicComponent, toDisplayString, markRaw, Teleport, cloneVNode, createTextVNode, normalizeProps, guardReactiveProps, onUnmounted, onBeforeUpdate, withModifiers, vModelText, resolveComponent, render } from 'vue';
|
|
8
8
|
|
|
9
9
|
const IN_BROWSER = typeof window !== 'undefined';
|
|
10
10
|
const SUPPORTS_INTERSECTION = IN_BROWSER && 'IntersectionObserver' in window;
|
|
@@ -526,13 +526,19 @@ function extractNumber(text, decimalDigitsLimit) {
|
|
|
526
526
|
return cleanText;
|
|
527
527
|
}
|
|
528
528
|
function camelizeProps(props) {
|
|
529
|
-
if (!props) return;
|
|
530
529
|
const out = {};
|
|
531
530
|
for (const prop in props) {
|
|
532
531
|
out[camelize(prop)] = props[prop];
|
|
533
532
|
}
|
|
534
533
|
return out;
|
|
535
534
|
}
|
|
535
|
+
function onlyDefinedProps(props) {
|
|
536
|
+
const booleanAttributes = ['checked', 'disabled'];
|
|
537
|
+
return Object.fromEntries(Object.entries(props).filter(_ref => {
|
|
538
|
+
let [key, v] = _ref;
|
|
539
|
+
return booleanAttributes.includes(key) ? !!v : v !== undefined;
|
|
540
|
+
}));
|
|
541
|
+
}
|
|
536
542
|
|
|
537
543
|
// Utilities
|
|
538
544
|
const block = ['top', 'bottom'];
|
|
@@ -857,7 +863,7 @@ function APCAcontrast(text, background) {
|
|
|
857
863
|
// WoB should always return negative value.
|
|
858
864
|
|
|
859
865
|
const SAPC = (Ybg ** revBG - Ytxt ** revTXT) * scaleWoB;
|
|
860
|
-
outputContrast = SAPC > -
|
|
866
|
+
outputContrast = SAPC > -loClip ? 0.0 : SAPC > -loConThresh ? SAPC - SAPC * loConFactor * loConOffset : SAPC + loConOffset;
|
|
861
867
|
}
|
|
862
868
|
return outputContrast * 100;
|
|
863
869
|
}
|
|
@@ -3809,10 +3815,10 @@ const MaybeTransition = (props, _ref) => {
|
|
|
3809
3815
|
} = isObject(transition) ? transition : {};
|
|
3810
3816
|
let transitionProps;
|
|
3811
3817
|
if (isObject(transition)) {
|
|
3812
|
-
transitionProps = mergeProps(customProps,
|
|
3818
|
+
transitionProps = mergeProps(customProps, onlyDefinedProps({
|
|
3813
3819
|
disabled,
|
|
3814
3820
|
group
|
|
3815
|
-
})
|
|
3821
|
+
}), rest);
|
|
3816
3822
|
} else {
|
|
3817
3823
|
transitionProps = mergeProps({
|
|
3818
3824
|
name: disabled || !transition ? '' : transition
|
|
@@ -4881,6 +4887,7 @@ function useGroup(props, injectKey) {
|
|
|
4881
4887
|
} else {
|
|
4882
4888
|
const isSelected = selected.value.includes(id);
|
|
4883
4889
|
if (props.mandatory && isSelected) return;
|
|
4890
|
+
if (!isSelected && !value) return;
|
|
4884
4891
|
selected.value = value ?? !isSelected ? [id] : [];
|
|
4885
4892
|
}
|
|
4886
4893
|
}
|
|
@@ -5106,7 +5113,7 @@ function useIntersectionObserver(callback, options) {
|
|
|
5106
5113
|
const observer = new IntersectionObserver(entries => {
|
|
5107
5114
|
isIntersecting.value = !!entries.find(entry => entry.isIntersecting);
|
|
5108
5115
|
}, options);
|
|
5109
|
-
|
|
5116
|
+
onScopeDispose(() => {
|
|
5110
5117
|
observer.disconnect();
|
|
5111
5118
|
});
|
|
5112
5119
|
watch(intersectionRef, (newValue, oldValue) => {
|
|
@@ -5637,9 +5644,9 @@ function useBackButton(router, cb) {
|
|
|
5637
5644
|
|
|
5638
5645
|
function useSelectLink(link, select) {
|
|
5639
5646
|
watch(() => link.isActive?.value, isActive => {
|
|
5640
|
-
if (link.isLink.value && isActive && select) {
|
|
5647
|
+
if (link.isLink.value && isActive != null && select) {
|
|
5641
5648
|
nextTick(() => {
|
|
5642
|
-
select(
|
|
5649
|
+
select(isActive);
|
|
5643
5650
|
});
|
|
5644
5651
|
}
|
|
5645
5652
|
}, {
|
|
@@ -9253,6 +9260,7 @@ const makeVListGroupProps = propsFactory({
|
|
|
9253
9260
|
type: IconValue,
|
|
9254
9261
|
default: '$expand'
|
|
9255
9262
|
},
|
|
9263
|
+
rawId: [String, Number],
|
|
9256
9264
|
prependIcon: IconValue,
|
|
9257
9265
|
appendIcon: IconValue,
|
|
9258
9266
|
fluid: Boolean,
|
|
@@ -9274,13 +9282,12 @@ const VListGroup = genericComponent()({
|
|
|
9274
9282
|
open,
|
|
9275
9283
|
id: _id
|
|
9276
9284
|
} = useNestedItem(() => props.value, true);
|
|
9277
|
-
const id = computed(() => `v-list-group--id-${String(_id.value)}`);
|
|
9285
|
+
const id = computed(() => `v-list-group--id-${String(props.rawId ?? _id.value)}`);
|
|
9278
9286
|
const list = useList();
|
|
9279
9287
|
const {
|
|
9280
9288
|
isBooted
|
|
9281
9289
|
} = useSsrBoot();
|
|
9282
9290
|
function onClick(e) {
|
|
9283
|
-
e.stopPropagation();
|
|
9284
9291
|
if (['INPUT', 'TEXTAREA'].includes(e.target?.tagName)) return;
|
|
9285
9292
|
open(!isOpen.value, e);
|
|
9286
9293
|
}
|
|
@@ -9798,9 +9805,10 @@ const VListChildren = genericComponent()({
|
|
|
9798
9805
|
}) : undefined
|
|
9799
9806
|
};
|
|
9800
9807
|
const listGroupProps = VListGroup.filterProps(itemProps);
|
|
9801
|
-
return children ? createVNode(VListGroup, mergeProps({
|
|
9802
|
-
"value": itemProps?.value
|
|
9803
|
-
|
|
9808
|
+
return children ? createVNode(VListGroup, mergeProps(listGroupProps, {
|
|
9809
|
+
"value": props.returnObject ? item : itemProps?.value,
|
|
9810
|
+
"rawId": itemProps?.value
|
|
9811
|
+
}), {
|
|
9804
9812
|
activator: _ref3 => {
|
|
9805
9813
|
let {
|
|
9806
9814
|
props: activatorProps
|
|
@@ -9864,7 +9872,7 @@ function transformItem$3(props, item) {
|
|
|
9864
9872
|
const _props = {
|
|
9865
9873
|
title,
|
|
9866
9874
|
value,
|
|
9867
|
-
...
|
|
9875
|
+
...itemProps
|
|
9868
9876
|
};
|
|
9869
9877
|
return {
|
|
9870
9878
|
title: String(_props.title ?? ''),
|
|
@@ -12224,7 +12232,11 @@ const VField = genericComponent()({
|
|
|
12224
12232
|
default: slots.loader
|
|
12225
12233
|
}), hasPrepend && createElementVNode("div", {
|
|
12226
12234
|
"key": "prepend",
|
|
12227
|
-
"class": "v-field__prepend-inner"
|
|
12235
|
+
"class": "v-field__prepend-inner",
|
|
12236
|
+
"onMousedown": e => {
|
|
12237
|
+
e.preventDefault();
|
|
12238
|
+
e.stopPropagation();
|
|
12239
|
+
}
|
|
12228
12240
|
}, [props.prependInnerIcon && createVNode(InputIcon, {
|
|
12229
12241
|
"key": "prepend-icon",
|
|
12230
12242
|
"name": "prependInner",
|
|
@@ -12293,7 +12305,11 @@ const VField = genericComponent()({
|
|
|
12293
12305
|
})]), [[vShow, props.dirty]])]
|
|
12294
12306
|
}), hasAppend && createElementVNode("div", {
|
|
12295
12307
|
"key": "append",
|
|
12296
|
-
"class": "v-field__append-inner"
|
|
12308
|
+
"class": "v-field__append-inner",
|
|
12309
|
+
"onMousedown": e => {
|
|
12310
|
+
e.preventDefault();
|
|
12311
|
+
e.stopPropagation();
|
|
12312
|
+
}
|
|
12297
12313
|
}, [slots['append-inner']?.(slotProps.value), props.appendInnerIcon && createVNode(InputIcon, {
|
|
12298
12314
|
"key": "append-icon",
|
|
12299
12315
|
"name": "appendInner",
|
|
@@ -12328,6 +12344,16 @@ const VField = genericComponent()({
|
|
|
12328
12344
|
}
|
|
12329
12345
|
});
|
|
12330
12346
|
|
|
12347
|
+
function useAutofocus(props) {
|
|
12348
|
+
function onIntersect(isIntersecting, entries) {
|
|
12349
|
+
if (!props.autofocus || !isIntersecting) return;
|
|
12350
|
+
entries[0].target?.focus?.();
|
|
12351
|
+
}
|
|
12352
|
+
return {
|
|
12353
|
+
onIntersect
|
|
12354
|
+
};
|
|
12355
|
+
}
|
|
12356
|
+
|
|
12331
12357
|
// Types
|
|
12332
12358
|
|
|
12333
12359
|
const activeTypes = ['color', 'file', 'time', 'date', 'datetime-local', 'week', 'month'];
|
|
@@ -12374,6 +12400,9 @@ const VTextField = genericComponent()({
|
|
|
12374
12400
|
focus,
|
|
12375
12401
|
blur
|
|
12376
12402
|
} = useFocus(props);
|
|
12403
|
+
const {
|
|
12404
|
+
onIntersect
|
|
12405
|
+
} = useAutofocus(props);
|
|
12377
12406
|
const counterValue = computed(() => {
|
|
12378
12407
|
return typeof props.counterValue === 'function' ? props.counterValue(model.value) : typeof props.counterValue === 'number' ? props.counterValue : (model.value ?? '').toString().length;
|
|
12379
12408
|
});
|
|
@@ -12383,19 +12412,17 @@ const VTextField = genericComponent()({
|
|
|
12383
12412
|
return props.counter;
|
|
12384
12413
|
});
|
|
12385
12414
|
const isPlainOrUnderlined = computed(() => ['plain', 'underlined'].includes(props.variant));
|
|
12386
|
-
function onIntersect(isIntersecting, entries) {
|
|
12387
|
-
if (!props.autofocus || !isIntersecting) return;
|
|
12388
|
-
entries[0].target?.focus?.();
|
|
12389
|
-
}
|
|
12390
12415
|
const vInputRef = ref();
|
|
12391
12416
|
const vFieldRef = ref();
|
|
12392
12417
|
const inputRef = ref();
|
|
12393
12418
|
const isActive = computed(() => activeTypes.includes(props.type) || props.persistentPlaceholder || isFocused.value || props.active);
|
|
12394
12419
|
function onFocus() {
|
|
12395
|
-
if (inputRef.value !== document.activeElement) {
|
|
12396
|
-
inputRef.value?.focus();
|
|
12397
|
-
}
|
|
12398
12420
|
if (!isFocused.value) focus();
|
|
12421
|
+
nextTick(() => {
|
|
12422
|
+
if (inputRef.value !== document.activeElement) {
|
|
12423
|
+
inputRef.value?.focus();
|
|
12424
|
+
}
|
|
12425
|
+
});
|
|
12399
12426
|
}
|
|
12400
12427
|
function onControlMousedown(e) {
|
|
12401
12428
|
emit('mousedown:control', e);
|
|
@@ -12404,7 +12431,6 @@ const VTextField = genericComponent()({
|
|
|
12404
12431
|
e.preventDefault();
|
|
12405
12432
|
}
|
|
12406
12433
|
function onControlClick(e) {
|
|
12407
|
-
onFocus();
|
|
12408
12434
|
emit('click:control', e);
|
|
12409
12435
|
}
|
|
12410
12436
|
function onClear(e, reset) {
|
|
@@ -13330,6 +13356,7 @@ const VSelect = genericComponent()({
|
|
|
13330
13356
|
index,
|
|
13331
13357
|
itemRef
|
|
13332
13358
|
} = _ref2;
|
|
13359
|
+
const camelizedProps = camelizeProps(item.props);
|
|
13333
13360
|
const itemProps = mergeProps(item.props, {
|
|
13334
13361
|
ref: itemRef,
|
|
13335
13362
|
key: item.value,
|
|
@@ -13351,10 +13378,10 @@ const VSelect = genericComponent()({
|
|
|
13351
13378
|
"modelValue": isSelected,
|
|
13352
13379
|
"ripple": false,
|
|
13353
13380
|
"tabindex": "-1"
|
|
13354
|
-
}, null) : undefined,
|
|
13355
|
-
"image":
|
|
13356
|
-
}, null),
|
|
13357
|
-
"icon":
|
|
13381
|
+
}, null) : undefined, camelizedProps.prependAvatar && createVNode(VAvatar, {
|
|
13382
|
+
"image": camelizedProps.prependAvatar
|
|
13383
|
+
}, null), camelizedProps.prependIcon && createVNode(VIcon, {
|
|
13384
|
+
"icon": camelizedProps.prependIcon
|
|
13358
13385
|
}, null)]);
|
|
13359
13386
|
}
|
|
13360
13387
|
});
|
|
@@ -16533,7 +16560,7 @@ const VSliderThumb = genericComponent()({
|
|
|
16533
16560
|
default: () => [withDirectives(createElementVNode("div", {
|
|
16534
16561
|
"class": "v-slider-thumb__label-container"
|
|
16535
16562
|
}, [createElementVNode("div", {
|
|
16536
|
-
"class": normalizeClass(['v-slider-thumb__label'])
|
|
16563
|
+
"class": normalizeClass(['v-slider-thumb__label', textColorClasses.value])
|
|
16537
16564
|
}, [createElementVNode("div", null, [slots['thumb-label']?.({
|
|
16538
16565
|
modelValue: props.modelValue
|
|
16539
16566
|
}) ?? props.modelValue.toFixed(step.value ? decimals.value : 1)])])]), [[vShow, thumbLabel.value && props.focused || thumbLabel.value === 'always']])]
|
|
@@ -17802,7 +17829,7 @@ function getWeek(date, locale, firstDayOfWeek, firstWeekMinSize) {
|
|
|
17802
17829
|
const yearStart = new Date(year, 0, 1);
|
|
17803
17830
|
const size = firstWeekSize(year);
|
|
17804
17831
|
const d1w1 = size >= minWeekSize ? addDays(yearStart, size - 7) : addDays(yearStart, size);
|
|
17805
|
-
return 1 + getDiff(date, d1w1, 'weeks');
|
|
17832
|
+
return 1 + getDiff(endOfDay(date), startOfDay(d1w1), 'weeks');
|
|
17806
17833
|
}
|
|
17807
17834
|
function getDate(date) {
|
|
17808
17835
|
return date.getDate();
|
|
@@ -18105,6 +18132,18 @@ function createDate(options, locale) {
|
|
|
18105
18132
|
instance: createInstance(_options, locale)
|
|
18106
18133
|
};
|
|
18107
18134
|
}
|
|
18135
|
+
function createDateRange(adapter, start, stop) {
|
|
18136
|
+
const diff = adapter.getDiff(adapter.endOfDay(stop ?? start), adapter.startOfDay(start), 'days');
|
|
18137
|
+
const datesInRange = [start];
|
|
18138
|
+
for (let i = 1; i < diff; i++) {
|
|
18139
|
+
const nextDate = adapter.addDays(start, i);
|
|
18140
|
+
datesInRange.push(nextDate);
|
|
18141
|
+
}
|
|
18142
|
+
if (stop) {
|
|
18143
|
+
datesInRange.push(adapter.endOfDay(stop));
|
|
18144
|
+
}
|
|
18145
|
+
return datesInRange;
|
|
18146
|
+
}
|
|
18108
18147
|
function createInstance(options, locale) {
|
|
18109
18148
|
const instance = reactive(typeof options.adapter === 'function'
|
|
18110
18149
|
// eslint-disable-next-line new-cap
|
|
@@ -18115,20 +18154,7 @@ function createInstance(options, locale) {
|
|
|
18115
18154
|
watch(locale.current, value => {
|
|
18116
18155
|
instance.locale = options.locale[value] ?? value ?? instance.locale;
|
|
18117
18156
|
});
|
|
18118
|
-
return
|
|
18119
|
-
createDateRange(start, stop) {
|
|
18120
|
-
const diff = instance.getDiff(stop ?? start, start, 'days');
|
|
18121
|
-
const datesInRange = [start];
|
|
18122
|
-
for (let i = 1; i < diff; i++) {
|
|
18123
|
-
const nextDate = instance.addDays(start, i);
|
|
18124
|
-
datesInRange.push(nextDate);
|
|
18125
|
-
}
|
|
18126
|
-
if (stop) {
|
|
18127
|
-
datesInRange.push(instance.endOfDay(stop));
|
|
18128
|
-
}
|
|
18129
|
-
return datesInRange;
|
|
18130
|
-
}
|
|
18131
|
-
});
|
|
18157
|
+
return instance;
|
|
18132
18158
|
}
|
|
18133
18159
|
function useDate() {
|
|
18134
18160
|
const options = inject$1(DateOptionsSymbol);
|
|
@@ -20217,7 +20243,9 @@ const VDataTableFooter = genericComponent()({
|
|
|
20217
20243
|
"class": "v-data-table-footer"
|
|
20218
20244
|
}, [slots.prepend?.(), createElementVNode("div", {
|
|
20219
20245
|
"class": "v-data-table-footer__items-per-page"
|
|
20220
|
-
}, [createElementVNode("span",
|
|
20246
|
+
}, [createElementVNode("span", {
|
|
20247
|
+
"aria-label": t(props.itemsPerPageText)
|
|
20248
|
+
}, [t(props.itemsPerPageText)]), createVNode(VSelect, {
|
|
20221
20249
|
"items": itemsPerPageOptions.value,
|
|
20222
20250
|
"modelValue": itemsPerPage.value,
|
|
20223
20251
|
"onUpdate:modelValue": v => setItemsPerPage(Number(v)),
|
|
@@ -20269,6 +20297,7 @@ const VDataTableColumn = defineFunctionalComponent({
|
|
|
20269
20297
|
} = _ref;
|
|
20270
20298
|
const Tag = props.tag ?? 'td';
|
|
20271
20299
|
return createVNode(Tag, {
|
|
20300
|
+
"tabindex": "0",
|
|
20272
20301
|
"class": normalizeClass(['v-data-table__td', {
|
|
20273
20302
|
'v-data-table-column--fixed': props.fixed,
|
|
20274
20303
|
'v-data-table-column--last-fixed': props.lastFixed,
|
|
@@ -20613,6 +20642,11 @@ const VDataTableHeaders = genericComponent()({
|
|
|
20613
20642
|
top: props.sticky || props.fixedHeader ? `calc(var(--v-table-header-height) * ${y})` : undefined
|
|
20614
20643
|
};
|
|
20615
20644
|
}
|
|
20645
|
+
function handleEnterKeyPress(event, column) {
|
|
20646
|
+
if (event.key === 'Enter' && !props.disableSort) {
|
|
20647
|
+
toggleSort(column);
|
|
20648
|
+
}
|
|
20649
|
+
}
|
|
20616
20650
|
function getSortIcon(column) {
|
|
20617
20651
|
const item = sortBy.value.find(item => item.key === column.key);
|
|
20618
20652
|
if (!item) return props.sortAscIcon;
|
|
@@ -20669,7 +20703,9 @@ const VDataTableHeaders = genericComponent()({
|
|
|
20669
20703
|
"nowrap": column.nowrap,
|
|
20670
20704
|
"lastFixed": column.lastFixed,
|
|
20671
20705
|
"noPadding": noPadding
|
|
20672
|
-
}, headerProps
|
|
20706
|
+
}, headerProps, {
|
|
20707
|
+
"onKeydown": event => column.sortable && handleEnterKeyPress(event, column)
|
|
20708
|
+
}), {
|
|
20673
20709
|
default: () => {
|
|
20674
20710
|
const columnSlotName = `header.${column.key}`;
|
|
20675
20711
|
const columnSlotProps = {
|
|
@@ -22522,7 +22558,7 @@ const VDatePickerMonth = genericComponent()({
|
|
|
22522
22558
|
} else {
|
|
22523
22559
|
rangeStop.value = adapter.endOfDay(_value);
|
|
22524
22560
|
}
|
|
22525
|
-
model.value =
|
|
22561
|
+
model.value = createDateRange(adapter, rangeStart.value, rangeStop.value);
|
|
22526
22562
|
} else {
|
|
22527
22563
|
rangeStart.value = value;
|
|
22528
22564
|
rangeStop.value = undefined;
|
|
@@ -22741,9 +22777,7 @@ const VDatePickerYears = genericComponent()({
|
|
|
22741
22777
|
const yearRef = templateRef();
|
|
22742
22778
|
onMounted(async () => {
|
|
22743
22779
|
await nextTick();
|
|
22744
|
-
yearRef.el?.
|
|
22745
|
-
block: 'center'
|
|
22746
|
-
});
|
|
22780
|
+
yearRef.el?.focus();
|
|
22747
22781
|
});
|
|
22748
22782
|
function isYearAllowed(year) {
|
|
22749
22783
|
if (Array.isArray(props.allowedYears) && props.allowedYears.length) {
|
|
@@ -22879,8 +22913,16 @@ const VDatePicker = genericComponent()({
|
|
|
22879
22913
|
return value && adapter.isValid(value) ? value : today;
|
|
22880
22914
|
});
|
|
22881
22915
|
const headerColor = toRef(() => props.headerColor ?? props.color);
|
|
22882
|
-
const
|
|
22883
|
-
const
|
|
22916
|
+
const _month = useProxiedModel(props, 'month');
|
|
22917
|
+
const month = computed({
|
|
22918
|
+
get: () => Number(_month.value ?? adapter.getMonth(adapter.startOfMonth(internal.value))),
|
|
22919
|
+
set: v => _month.value = v
|
|
22920
|
+
});
|
|
22921
|
+
const _year = useProxiedModel(props, 'year');
|
|
22922
|
+
const year = computed({
|
|
22923
|
+
get: () => Number(_year.value ?? adapter.getYear(adapter.startOfYear(adapter.setMonth(internal.value, month.value)))),
|
|
22924
|
+
set: v => _year.value = v
|
|
22925
|
+
});
|
|
22884
22926
|
const isReversing = shallowRef(false);
|
|
22885
22927
|
const header = computed(() => {
|
|
22886
22928
|
if (props.multiple && model.value.length > 1) {
|
|
@@ -22964,9 +23006,9 @@ const VDatePicker = genericComponent()({
|
|
|
22964
23006
|
} else {
|
|
22965
23007
|
year.value++;
|
|
22966
23008
|
month.value = 0;
|
|
22967
|
-
onUpdateYear(
|
|
23009
|
+
onUpdateYear();
|
|
22968
23010
|
}
|
|
22969
|
-
onUpdateMonth(
|
|
23011
|
+
onUpdateMonth();
|
|
22970
23012
|
}
|
|
22971
23013
|
function onClickPrev() {
|
|
22972
23014
|
if (month.value > 0) {
|
|
@@ -22974,9 +23016,9 @@ const VDatePicker = genericComponent()({
|
|
|
22974
23016
|
} else {
|
|
22975
23017
|
year.value--;
|
|
22976
23018
|
month.value = 11;
|
|
22977
|
-
onUpdateYear(
|
|
23019
|
+
onUpdateYear();
|
|
22978
23020
|
}
|
|
22979
|
-
onUpdateMonth(
|
|
23021
|
+
onUpdateMonth();
|
|
22980
23022
|
}
|
|
22981
23023
|
function onClickDate() {
|
|
22982
23024
|
viewMode.value = 'month';
|
|
@@ -22987,13 +23029,11 @@ const VDatePicker = genericComponent()({
|
|
|
22987
23029
|
function onClickYear() {
|
|
22988
23030
|
viewMode.value = viewMode.value === 'year' ? 'month' : 'year';
|
|
22989
23031
|
}
|
|
22990
|
-
function onUpdateMonth(
|
|
23032
|
+
function onUpdateMonth() {
|
|
22991
23033
|
if (viewMode.value === 'months') onClickMonth();
|
|
22992
|
-
emit('update:month', value);
|
|
22993
23034
|
}
|
|
22994
|
-
function onUpdateYear(
|
|
23035
|
+
function onUpdateYear() {
|
|
22995
23036
|
if (viewMode.value === 'year') onClickYear();
|
|
22996
|
-
emit('update:year', value);
|
|
22997
23037
|
}
|
|
22998
23038
|
watch(model, (val, oldVal) => {
|
|
22999
23039
|
const arrBefore = wrapInArray(oldVal);
|
|
@@ -23005,11 +23045,11 @@ const VDatePicker = genericComponent()({
|
|
|
23005
23045
|
const newYear = adapter.getYear(after);
|
|
23006
23046
|
if (newMonth !== month.value) {
|
|
23007
23047
|
month.value = newMonth;
|
|
23008
|
-
onUpdateMonth(
|
|
23048
|
+
onUpdateMonth();
|
|
23009
23049
|
}
|
|
23010
23050
|
if (newYear !== year.value) {
|
|
23011
23051
|
year.value = newYear;
|
|
23012
|
-
onUpdateYear(
|
|
23052
|
+
onUpdateYear();
|
|
23013
23053
|
}
|
|
23014
23054
|
isReversing.value = adapter.isBefore(before, after);
|
|
23015
23055
|
});
|
|
@@ -23609,6 +23649,56 @@ const VFab = genericComponent()({
|
|
|
23609
23649
|
|
|
23610
23650
|
// Types
|
|
23611
23651
|
|
|
23652
|
+
function useFileDrop() {
|
|
23653
|
+
function hasFilesOrFolders(e) {
|
|
23654
|
+
const entries = [...(e.dataTransfer?.items ?? [])].filter(x => x.kind === 'file').map(x => x.webkitGetAsEntry()).filter(Boolean);
|
|
23655
|
+
return entries.length > 0 || [...(e.dataTransfer?.files ?? [])].length > 0;
|
|
23656
|
+
}
|
|
23657
|
+
async function handleDrop(e) {
|
|
23658
|
+
const result = [];
|
|
23659
|
+
const entries = [...(e.dataTransfer?.items ?? [])].filter(x => x.kind === 'file').map(x => x.webkitGetAsEntry()).filter(Boolean);
|
|
23660
|
+
if (entries.length) {
|
|
23661
|
+
for (const entry of entries) {
|
|
23662
|
+
const files = await traverseFileTree(entry, appendIfDirectory('.', entry));
|
|
23663
|
+
result.push(...files.map(x => x.file));
|
|
23664
|
+
}
|
|
23665
|
+
} else {
|
|
23666
|
+
result.push(...[...(e.dataTransfer?.files ?? [])]);
|
|
23667
|
+
}
|
|
23668
|
+
return result;
|
|
23669
|
+
}
|
|
23670
|
+
return {
|
|
23671
|
+
handleDrop,
|
|
23672
|
+
hasFilesOrFolders
|
|
23673
|
+
};
|
|
23674
|
+
}
|
|
23675
|
+
function traverseFileTree(item) {
|
|
23676
|
+
let path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
23677
|
+
return new Promise((resolve, reject) => {
|
|
23678
|
+
if (item.isFile) {
|
|
23679
|
+
const fileEntry = item;
|
|
23680
|
+
fileEntry.file(file => resolve([{
|
|
23681
|
+
file,
|
|
23682
|
+
path
|
|
23683
|
+
}]), reject);
|
|
23684
|
+
} else if (item.isDirectory) {
|
|
23685
|
+
const directoryReader = item.createReader();
|
|
23686
|
+
directoryReader.readEntries(async entries => {
|
|
23687
|
+
const files = [];
|
|
23688
|
+
for (const entry of entries) {
|
|
23689
|
+
files.push(...(await traverseFileTree(entry, appendIfDirectory(path, entry))));
|
|
23690
|
+
}
|
|
23691
|
+
resolve(files);
|
|
23692
|
+
});
|
|
23693
|
+
}
|
|
23694
|
+
});
|
|
23695
|
+
}
|
|
23696
|
+
function appendIfDirectory(path, item) {
|
|
23697
|
+
return item.isDirectory ? `${path}/${item.name}` : path;
|
|
23698
|
+
}
|
|
23699
|
+
|
|
23700
|
+
// Types
|
|
23701
|
+
|
|
23612
23702
|
const makeVFileInputProps = propsFactory({
|
|
23613
23703
|
chips: Boolean,
|
|
23614
23704
|
counter: Boolean,
|
|
@@ -23693,6 +23783,10 @@ const VFileInput = genericComponent()({
|
|
|
23693
23783
|
const isActive = toRef(() => isFocused.value || props.active);
|
|
23694
23784
|
const isPlainOrUnderlined = computed(() => ['plain', 'underlined'].includes(props.variant));
|
|
23695
23785
|
const isDragging = shallowRef(false);
|
|
23786
|
+
const {
|
|
23787
|
+
handleDrop,
|
|
23788
|
+
hasFilesOrFolders
|
|
23789
|
+
} = useFileDrop();
|
|
23696
23790
|
function onFocus() {
|
|
23697
23791
|
if (inputRef.value !== document.activeElement) {
|
|
23698
23792
|
inputRef.value?.focus();
|
|
@@ -23726,13 +23820,13 @@ const VFileInput = genericComponent()({
|
|
|
23726
23820
|
e.preventDefault();
|
|
23727
23821
|
isDragging.value = false;
|
|
23728
23822
|
}
|
|
23729
|
-
function onDrop(e) {
|
|
23823
|
+
async function onDrop(e) {
|
|
23730
23824
|
e.preventDefault();
|
|
23731
23825
|
e.stopImmediatePropagation();
|
|
23732
23826
|
isDragging.value = false;
|
|
23733
|
-
if (!
|
|
23827
|
+
if (!inputRef.value || !hasFilesOrFolders(e)) return;
|
|
23734
23828
|
const dataTransfer = new DataTransfer();
|
|
23735
|
-
for (const file of e
|
|
23829
|
+
for (const file of await handleDrop(e)) {
|
|
23736
23830
|
dataTransfer.items.add(file);
|
|
23737
23831
|
}
|
|
23738
23832
|
inputRef.value.files = dataTransfer.files;
|
|
@@ -25163,6 +25257,7 @@ const VNumberInput = genericComponent()({
|
|
|
25163
25257
|
...makeVNumberInputProps()
|
|
25164
25258
|
},
|
|
25165
25259
|
emits: {
|
|
25260
|
+
'update:focused': val => true,
|
|
25166
25261
|
'update:modelValue': val => true
|
|
25167
25262
|
},
|
|
25168
25263
|
setup(props, _ref) {
|
|
@@ -25178,11 +25273,7 @@ const VNumberInput = genericComponent()({
|
|
|
25178
25273
|
});
|
|
25179
25274
|
const form = useForm(props);
|
|
25180
25275
|
const controlsDisabled = computed(() => form.isDisabled.value || form.isReadonly.value);
|
|
25181
|
-
const
|
|
25182
|
-
isFocused,
|
|
25183
|
-
focus,
|
|
25184
|
-
blur
|
|
25185
|
-
} = useFocus(props);
|
|
25276
|
+
const isFocused = shallowRef(props.focused);
|
|
25186
25277
|
function correctPrecision(val) {
|
|
25187
25278
|
let precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : props.precision;
|
|
25188
25279
|
const fixed = precision == null ? String(val) : val.toFixed(precision);
|
|
@@ -25367,11 +25458,9 @@ const VNumberInput = genericComponent()({
|
|
|
25367
25458
|
inputText.value = model.value.toString();
|
|
25368
25459
|
}
|
|
25369
25460
|
function onFocus() {
|
|
25370
|
-
focus();
|
|
25371
25461
|
trimDecimalZeros();
|
|
25372
25462
|
}
|
|
25373
25463
|
function onBlur() {
|
|
25374
|
-
blur();
|
|
25375
25464
|
clampModel();
|
|
25376
25465
|
}
|
|
25377
25466
|
useRender(() => {
|
|
@@ -25464,9 +25553,12 @@ const VNumberInput = genericComponent()({
|
|
|
25464
25553
|
}, null)]) : props.reverse && controlVariant.value !== 'hidden' ? createElementVNode(Fragment, null, [controlNode(), dividerNode()]) : undefined;
|
|
25465
25554
|
const hasPrependInner = slots['prepend-inner'] || prependInnerControl;
|
|
25466
25555
|
return createVNode(VTextField, mergeProps({
|
|
25467
|
-
"ref": vTextFieldRef
|
|
25556
|
+
"ref": vTextFieldRef
|
|
25557
|
+
}, textFieldProps, {
|
|
25468
25558
|
"modelValue": inputText.value,
|
|
25469
25559
|
"onUpdate:modelValue": $event => inputText.value = $event,
|
|
25560
|
+
"focused": isFocused.value,
|
|
25561
|
+
"onUpdate:focused": $event => isFocused.value = $event,
|
|
25470
25562
|
"validationValue": model.value,
|
|
25471
25563
|
"onBeforeinput": onBeforeinput,
|
|
25472
25564
|
"onFocus": onFocus,
|
|
@@ -25479,8 +25571,7 @@ const VNumberInput = genericComponent()({
|
|
|
25479
25571
|
'v-number-input--reverse': props.reverse,
|
|
25480
25572
|
'v-number-input--split': controlVariant.value === 'split',
|
|
25481
25573
|
'v-number-input--stacked': controlVariant.value === 'stacked'
|
|
25482
|
-
}, props.class]
|
|
25483
|
-
}, textFieldProps, {
|
|
25574
|
+
}, props.class],
|
|
25484
25575
|
"style": props.style,
|
|
25485
25576
|
"inputmode": "decimal"
|
|
25486
25577
|
}), {
|
|
@@ -25566,6 +25657,21 @@ const VOtpInput = genericComponent()({
|
|
|
25566
25657
|
const contentRef = ref();
|
|
25567
25658
|
const inputRef = ref([]);
|
|
25568
25659
|
const current = computed(() => inputRef.value[focusIndex.value]);
|
|
25660
|
+
const intersectScope = effectScope();
|
|
25661
|
+
intersectScope.run(() => {
|
|
25662
|
+
const {
|
|
25663
|
+
intersectionRef,
|
|
25664
|
+
isIntersecting
|
|
25665
|
+
} = useIntersectionObserver();
|
|
25666
|
+
watch(isIntersecting, v => {
|
|
25667
|
+
if (!v) return;
|
|
25668
|
+
intersectionRef.value?.focus();
|
|
25669
|
+
intersectScope.stop();
|
|
25670
|
+
});
|
|
25671
|
+
watchEffect(() => {
|
|
25672
|
+
intersectionRef.value = inputRef.value[0];
|
|
25673
|
+
});
|
|
25674
|
+
});
|
|
25569
25675
|
function onInput() {
|
|
25570
25676
|
// The maxlength attribute doesn't work for the number type input, so the text type is used.
|
|
25571
25677
|
// The following logic simulates the behavior of a number input.
|
|
@@ -25615,7 +25721,7 @@ const VOtpInput = genericComponent()({
|
|
|
25615
25721
|
function onPaste(index, e) {
|
|
25616
25722
|
e.preventDefault();
|
|
25617
25723
|
e.stopPropagation();
|
|
25618
|
-
const clipboardText = e?.clipboardData?.getData('Text').slice(0, length.value) ?? '';
|
|
25724
|
+
const clipboardText = e?.clipboardData?.getData('Text').trim().slice(0, length.value) ?? '';
|
|
25619
25725
|
if (isValidNumber(clipboardText)) return;
|
|
25620
25726
|
model.value = clipboardText.split('');
|
|
25621
25727
|
inputRef.value?.[index].blur();
|
|
@@ -25647,7 +25753,10 @@ const VOtpInput = genericComponent()({
|
|
|
25647
25753
|
scoped: true
|
|
25648
25754
|
});
|
|
25649
25755
|
watch(model, val => {
|
|
25650
|
-
if (val.length === length.value)
|
|
25756
|
+
if (val.length === length.value) {
|
|
25757
|
+
focusIndex.value = length.value - 1;
|
|
25758
|
+
emit('finish', val.join(''));
|
|
25759
|
+
}
|
|
25651
25760
|
}, {
|
|
25652
25761
|
deep: true
|
|
25653
25762
|
});
|
|
@@ -28309,6 +28418,9 @@ const VTextarea = genericComponent()({
|
|
|
28309
28418
|
focus,
|
|
28310
28419
|
blur
|
|
28311
28420
|
} = useFocus(props);
|
|
28421
|
+
const {
|
|
28422
|
+
onIntersect
|
|
28423
|
+
} = useAutofocus(props);
|
|
28312
28424
|
const counterValue = computed(() => {
|
|
28313
28425
|
return typeof props.counterValue === 'function' ? props.counterValue(model.value) : (model.value || '').toString().length;
|
|
28314
28426
|
});
|
|
@@ -28317,10 +28429,6 @@ const VTextarea = genericComponent()({
|
|
|
28317
28429
|
if (!props.counter || typeof props.counter !== 'number' && typeof props.counter !== 'string') return undefined;
|
|
28318
28430
|
return props.counter;
|
|
28319
28431
|
});
|
|
28320
|
-
function onIntersect(isIntersecting, entries) {
|
|
28321
|
-
if (!props.autofocus || !isIntersecting) return;
|
|
28322
|
-
entries[0].target?.focus?.();
|
|
28323
|
-
}
|
|
28324
28432
|
const vInputRef = ref();
|
|
28325
28433
|
const vFieldRef = ref();
|
|
28326
28434
|
const controlHeight = shallowRef('');
|
|
@@ -29400,7 +29508,7 @@ function createVuetify$1() {
|
|
|
29400
29508
|
};
|
|
29401
29509
|
});
|
|
29402
29510
|
}
|
|
29403
|
-
const version$1 = "3.8.
|
|
29511
|
+
const version$1 = "3.8.10";
|
|
29404
29512
|
createVuetify$1.version = version$1;
|
|
29405
29513
|
|
|
29406
29514
|
// Vue's inject() can only be used in setup
|
|
@@ -29425,7 +29533,7 @@ const createVuetify = function () {
|
|
|
29425
29533
|
...options
|
|
29426
29534
|
});
|
|
29427
29535
|
};
|
|
29428
|
-
const version = "3.8.
|
|
29536
|
+
const version = "3.8.10";
|
|
29429
29537
|
createVuetify.version = version;
|
|
29430
29538
|
|
|
29431
29539
|
export { index as blueprints, components, createVuetify, directives, useDate, useDefaults, useDisplay, useGoTo, useLayout, useLocale, useRtl, useTheme, version };
|