vuetify 3.8.7 → 3.8.9
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 +1535 -1511
- package/dist/json/importMap-labs.json +20 -20
- package/dist/json/importMap.json +138 -138
- package/dist/json/tags.json +6 -0
- package/dist/json/web-types.json +2800 -2746
- package/dist/vuetify-labs.cjs +292 -154
- package/dist/vuetify-labs.css +6716 -6710
- package/dist/vuetify-labs.d.ts +96 -50
- package/dist/vuetify-labs.esm.js +293 -155
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +292 -154
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +272 -124
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +3854 -3848
- package/dist/vuetify.d.ts +81 -50
- package/dist/vuetify.esm.js +273 -125
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +272 -124
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +489 -470
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.css +6 -6
- package/lib/components/VAutocomplete/VAutocomplete.sass +3 -9
- package/lib/components/VCarousel/VCarousel.js +3 -3
- package/lib/components/VCarousel/VCarousel.js.map +1 -1
- package/lib/components/VChip/VChip.js +1 -0
- package/lib/components/VChip/VChip.js.map +1 -1
- package/lib/components/VColorPicker/VColorPickerPreview.js +3 -3
- package/lib/components/VColorPicker/VColorPickerPreview.js.map +1 -1
- package/lib/components/VColorPicker/VColorPickerSwatches.js +3 -3
- package/lib/components/VColorPicker/VColorPickerSwatches.js.map +1 -1
- package/lib/components/VCombobox/VCombobox.css +6 -6
- package/lib/components/VCombobox/VCombobox.sass +3 -9
- package/lib/components/VDataTable/VDataTableColumn.js +4 -3
- 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/VDataTableGroupHeaderRow.js +3 -3
- package/lib/components/VDataTable/VDataTableGroupHeaderRow.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaders.js +8 -1
- package/lib/components/VDataTable/VDataTableHeaders.js.map +1 -1
- package/lib/components/VDataTable/VDataTableVirtual.js +7 -7
- package/lib/components/VDataTable/VDataTableVirtual.js.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.d.ts +20 -0
- package/lib/components/VDatePicker/VDatePicker.js +39 -2
- package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerControls.js +4 -4
- package/lib/components/VDatePicker/VDatePickerControls.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonth.js +5 -12
- package/lib/components/VDatePicker/VDatePickerMonth.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonths.d.ts +10 -0
- package/lib/components/VDatePicker/VDatePickerMonths.js +15 -5
- package/lib/components/VDatePicker/VDatePickerMonths.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerYears.d.ts +10 -0
- package/lib/components/VDatePicker/VDatePickerYears.js +17 -5
- package/lib/components/VDatePicker/VDatePickerYears.js.map +1 -1
- package/lib/components/VEmptyState/VEmptyState.js +3 -3
- package/lib/components/VEmptyState/VEmptyState.js.map +1 -1
- package/lib/components/VFileInput/VFileInput.js +8 -3
- package/lib/components/VFileInput/VFileInput.js.map +1 -1
- package/lib/components/VImg/VImg.js +7 -7
- package/lib/components/VImg/VImg.js.map +1 -1
- package/lib/components/VInfiniteScroll/VInfiniteScroll.js +3 -3
- package/lib/components/VInfiniteScroll/VInfiniteScroll.js.map +1 -1
- package/lib/components/VNumberInput/VNumberInput.d.ts +5 -0
- package/lib/components/VNumberInput/VNumberInput.js +18 -21
- package/lib/components/VNumberInput/VNumberInput.js.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.js +7 -4
- package/lib/components/VOtpInput/VOtpInput.js.map +1 -1
- package/lib/components/VProgressCircular/VProgressCircular.js +2 -2
- package/lib/components/VProgressCircular/VProgressCircular.js.map +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.js +3 -3
- package/lib/components/VProgressLinear/VProgressLinear.js.map +1 -1
- package/lib/components/VSelect/VSelect.css +6 -0
- package/lib/components/VSelect/VSelect.js +6 -5
- package/lib/components/VSelect/VSelect.js.map +1 -1
- package/lib/components/VSelect/VSelect.sass +3 -0
- package/lib/components/VSelect/_mixins.scss +14 -0
- package/lib/components/VSelectionControl/VSelectionControl.js +2 -2
- package/lib/components/VSelectionControl/VSelectionControl.js.map +1 -1
- package/lib/components/VSlider/VSliderThumb.js +16 -10
- package/lib/components/VSlider/VSliderThumb.js.map +1 -1
- package/lib/components/VSlider/VSliderTrack.js +6 -6
- package/lib/components/VSlider/VSliderTrack.js.map +1 -1
- package/lib/components/VSlider/slider.js +4 -1
- package/lib/components/VSlider/slider.js.map +1 -1
- package/lib/components/VTable/VTable.js +3 -3
- package/lib/components/VTable/VTable.js.map +1 -1
- package/lib/components/VTextField/VTextField.js +5 -4
- package/lib/components/VTextField/VTextField.js.map +1 -1
- package/lib/components/VToolbar/VToolbar.js +5 -5
- package/lib/components/VToolbar/VToolbar.js.map +1 -1
- package/lib/components/VVirtualScroll/VVirtualScroll.js +7 -7
- package/lib/components/VVirtualScroll/VVirtualScroll.js.map +1 -1
- package/lib/components/VWindow/VWindow.js +3 -3
- package/lib/components/VWindow/VWindow.js.map +1 -1
- 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 -0
- package/lib/composables/date/date.js +12 -0
- 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/icons.d.ts +6 -0
- package/lib/composables/icons.js.map +1 -1
- package/lib/entry-bundler.js +1 -1
- package/lib/framework.d.ts +56 -50
- package/lib/framework.js +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 +25 -0
- package/lib/labs/VDateInput/VDateInput.js +9 -16
- 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/VPullToRefresh/VPullToRefresh.js +7 -7
- package/lib/labs/VPullToRefresh/VPullToRefresh.js.map +1 -1
- package/lib/util/helpers.d.ts +1 -0
- package/lib/util/helpers.js +8 -1
- package/lib/util/helpers.js.map +1 -1
- package/package.json +3 -3
package/dist/vuetify-labs.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.8.
|
|
2
|
+
* Vuetify v3.8.9
|
|
3
3
|
* Forged by John Leider
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { shallowRef, reactive, watchEffect, toRef, capitalize, unref, Fragment, isVNode, Comment, warn, getCurrentInstance as getCurrentInstance$1, ref, computed, provide, inject as inject$1, defineComponent as defineComponent$1, h,
|
|
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
|
|
@@ -602,6 +602,13 @@ function extractNumber(text, decimalDigitsLimit) {
|
|
|
602
602
|
}
|
|
603
603
|
return cleanText;
|
|
604
604
|
}
|
|
605
|
+
function camelizeProps(props) {
|
|
606
|
+
const out = {};
|
|
607
|
+
for (const prop in props) {
|
|
608
|
+
out[camelize(prop)] = props[prop];
|
|
609
|
+
}
|
|
610
|
+
return out;
|
|
611
|
+
}
|
|
605
612
|
|
|
606
613
|
// Utilities
|
|
607
614
|
const block = ['top', 'bottom'];
|
|
@@ -3548,9 +3555,9 @@ const VImg = genericComponent()({
|
|
|
3548
3555
|
if (!normalisedSrc.value.src || state.value === 'idle') return null;
|
|
3549
3556
|
const img = createElementVNode("img", {
|
|
3550
3557
|
"class": normalizeClass(['v-img__img', containClasses.value]),
|
|
3551
|
-
"style":
|
|
3558
|
+
"style": {
|
|
3552
3559
|
objectPosition: props.position
|
|
3553
|
-
}
|
|
3560
|
+
},
|
|
3554
3561
|
"crossorigin": props.crossorigin,
|
|
3555
3562
|
"src": normalisedSrc.value.src,
|
|
3556
3563
|
"srcset": normalisedSrc.value.srcset,
|
|
@@ -3577,9 +3584,9 @@ const VImg = genericComponent()({
|
|
|
3577
3584
|
}, {
|
|
3578
3585
|
default: () => [normalisedSrc.value.lazySrc && state.value !== 'loaded' && createElementVNode("img", {
|
|
3579
3586
|
"class": normalizeClass(['v-img__img', 'v-img__img--preload', containClasses.value]),
|
|
3580
|
-
"style":
|
|
3587
|
+
"style": {
|
|
3581
3588
|
objectPosition: props.position
|
|
3582
|
-
}
|
|
3589
|
+
},
|
|
3583
3590
|
"crossorigin": props.crossorigin,
|
|
3584
3591
|
"src": normalisedSrc.value.lazySrc,
|
|
3585
3592
|
"alt": props.alt,
|
|
@@ -3613,9 +3620,9 @@ const VImg = genericComponent()({
|
|
|
3613
3620
|
if (!props.gradient) return null;
|
|
3614
3621
|
return createElementVNode("div", {
|
|
3615
3622
|
"class": "v-img__gradient",
|
|
3616
|
-
"style":
|
|
3623
|
+
"style": {
|
|
3617
3624
|
backgroundImage: `linear-gradient(${props.gradient})`
|
|
3618
|
-
}
|
|
3625
|
+
}
|
|
3619
3626
|
}, null);
|
|
3620
3627
|
};
|
|
3621
3628
|
const isBooted = shallowRef(false);
|
|
@@ -3826,9 +3833,9 @@ const VToolbar = genericComponent()({
|
|
|
3826
3833
|
}, {
|
|
3827
3834
|
default: () => [createElementVNode("div", {
|
|
3828
3835
|
"class": "v-toolbar__content",
|
|
3829
|
-
"style":
|
|
3836
|
+
"style": {
|
|
3830
3837
|
height: convertToUnit(contentHeight.value)
|
|
3831
|
-
}
|
|
3838
|
+
}
|
|
3832
3839
|
}, [slots.prepend && createElementVNode("div", {
|
|
3833
3840
|
"class": "v-toolbar__prepend"
|
|
3834
3841
|
}, [slots.prepend?.()]), hasTitle && createVNode(VToolbarTitle, {
|
|
@@ -3849,9 +3856,9 @@ const VToolbar = genericComponent()({
|
|
|
3849
3856
|
default: () => [createVNode(VExpandTransition, null, {
|
|
3850
3857
|
default: () => [isExtended.value && createElementVNode("div", {
|
|
3851
3858
|
"class": "v-toolbar__extension",
|
|
3852
|
-
"style":
|
|
3859
|
+
"style": {
|
|
3853
3860
|
height: convertToUnit(extensionHeight.value)
|
|
3854
|
-
}
|
|
3861
|
+
}
|
|
3855
3862
|
}, [extension])]
|
|
3856
3863
|
})]
|
|
3857
3864
|
})]
|
|
@@ -4924,9 +4931,9 @@ const VProgressCircular = genericComponent()({
|
|
|
4924
4931
|
"aria-valuenow": props.indeterminate ? undefined : normalizedValue.value
|
|
4925
4932
|
}, {
|
|
4926
4933
|
default: () => [createElementVNode("svg", {
|
|
4927
|
-
"style":
|
|
4934
|
+
"style": {
|
|
4928
4935
|
transform: `rotate(calc(-90deg + ${Number(props.rotate)}deg))`
|
|
4929
|
-
}
|
|
4936
|
+
},
|
|
4930
4937
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
4931
4938
|
"viewBox": `0 0 ${diameter.value} ${diameter.value}`
|
|
4932
4939
|
}, [createElementVNode("circle", {
|
|
@@ -5147,7 +5154,7 @@ const VProgressLinear = genericComponent()({
|
|
|
5147
5154
|
default: () => [props.stream && createElementVNode("div", {
|
|
5148
5155
|
"key": "stream",
|
|
5149
5156
|
"class": normalizeClass(['v-progress-linear__stream', textColorClasses.value]),
|
|
5150
|
-
"style":
|
|
5157
|
+
"style": {
|
|
5151
5158
|
...textColorStyles.value,
|
|
5152
5159
|
[isReversed.value ? 'left' : 'right']: convertToUnit(-height.value),
|
|
5153
5160
|
borderTop: `${convertToUnit(height.value / 2)} dotted`,
|
|
@@ -5155,7 +5162,7 @@ const VProgressLinear = genericComponent()({
|
|
|
5155
5162
|
top: `calc(50% - ${convertToUnit(height.value / 4)})`,
|
|
5156
5163
|
width: convertToUnit(100 - normalizedBuffer.value, '%'),
|
|
5157
5164
|
'--v-progress-linear-stream-to': convertToUnit(height.value * (isReversed.value ? 1 : -1))
|
|
5158
|
-
}
|
|
5165
|
+
}
|
|
5159
5166
|
}, null), createElementVNode("div", {
|
|
5160
5167
|
"class": normalizeClass(['v-progress-linear__background', !isForcedColorsModeActive ? backgroundColorClasses.value : undefined]),
|
|
5161
5168
|
"style": normalizeStyle([backgroundColorStyles.value, {
|
|
@@ -6463,7 +6470,7 @@ const VSelectionControl = genericComponent()({
|
|
|
6463
6470
|
backgroundColorClasses,
|
|
6464
6471
|
backgroundColorStyles
|
|
6465
6472
|
}), withDirectives(createElementVNode("div", {
|
|
6466
|
-
"class": ['v-selection-control__input']
|
|
6473
|
+
"class": normalizeClass(['v-selection-control__input'])
|
|
6467
6474
|
}, [slots.input?.({
|
|
6468
6475
|
model,
|
|
6469
6476
|
textColorClasses,
|
|
@@ -8096,6 +8103,7 @@ const VChip = genericComponent()({
|
|
|
8096
8103
|
const isClickable = computed(() => !props.disabled && props.link !== false && (!!group || props.link || link.isClickable.value));
|
|
8097
8104
|
const closeProps = toRef(() => ({
|
|
8098
8105
|
'aria-label': t(props.closeLabel),
|
|
8106
|
+
disabled: props.disabled,
|
|
8099
8107
|
onClick(e) {
|
|
8100
8108
|
e.preventDefault();
|
|
8101
8109
|
e.stopPropagation();
|
|
@@ -12105,10 +12113,12 @@ const VTextField = genericComponent()({
|
|
|
12105
12113
|
const inputRef = ref();
|
|
12106
12114
|
const isActive = computed(() => activeTypes.includes(props.type) || props.persistentPlaceholder || isFocused.value || props.active);
|
|
12107
12115
|
function onFocus() {
|
|
12108
|
-
if (inputRef.value !== document.activeElement) {
|
|
12109
|
-
inputRef.value?.focus();
|
|
12110
|
-
}
|
|
12111
12116
|
if (!isFocused.value) focus();
|
|
12117
|
+
nextTick(() => {
|
|
12118
|
+
if (inputRef.value !== document.activeElement) {
|
|
12119
|
+
inputRef.value?.focus();
|
|
12120
|
+
}
|
|
12121
|
+
});
|
|
12112
12122
|
}
|
|
12113
12123
|
function onControlMousedown(e) {
|
|
12114
12124
|
emit('mousedown:control', e);
|
|
@@ -12117,7 +12127,6 @@ const VTextField = genericComponent()({
|
|
|
12117
12127
|
e.preventDefault();
|
|
12118
12128
|
}
|
|
12119
12129
|
function onControlClick(e) {
|
|
12120
|
-
onFocus();
|
|
12121
12130
|
emit('click:control', e);
|
|
12122
12131
|
}
|
|
12123
12132
|
function onClear(e, reset) {
|
|
@@ -12610,14 +12619,14 @@ const VVirtualScroll = genericComponent()({
|
|
|
12610
12619
|
return props.renderless ? createElementVNode(Fragment, null, [createElementVNode("div", {
|
|
12611
12620
|
"ref": markerRef,
|
|
12612
12621
|
"class": "v-virtual-scroll__spacer",
|
|
12613
|
-
"style":
|
|
12622
|
+
"style": {
|
|
12614
12623
|
paddingTop: convertToUnit(paddingTop.value)
|
|
12615
|
-
}
|
|
12624
|
+
}
|
|
12616
12625
|
}, null), children, createElementVNode("div", {
|
|
12617
12626
|
"class": "v-virtual-scroll__spacer",
|
|
12618
|
-
"style":
|
|
12627
|
+
"style": {
|
|
12619
12628
|
paddingBottom: convertToUnit(paddingBottom.value)
|
|
12620
|
-
}
|
|
12629
|
+
}
|
|
12621
12630
|
}, null)]) : createElementVNode("div", {
|
|
12622
12631
|
"ref": containerRef,
|
|
12623
12632
|
"class": normalizeClass(['v-virtual-scroll', props.class]),
|
|
@@ -12627,10 +12636,10 @@ const VVirtualScroll = genericComponent()({
|
|
|
12627
12636
|
}, [createElementVNode("div", {
|
|
12628
12637
|
"ref": markerRef,
|
|
12629
12638
|
"class": "v-virtual-scroll__container",
|
|
12630
|
-
"style":
|
|
12639
|
+
"style": {
|
|
12631
12640
|
paddingTop: convertToUnit(paddingTop.value),
|
|
12632
12641
|
paddingBottom: convertToUnit(paddingBottom.value)
|
|
12633
|
-
}
|
|
12642
|
+
}
|
|
12634
12643
|
}, [children])]);
|
|
12635
12644
|
});
|
|
12636
12645
|
return {
|
|
@@ -13043,6 +13052,7 @@ const VSelect = genericComponent()({
|
|
|
13043
13052
|
index,
|
|
13044
13053
|
itemRef
|
|
13045
13054
|
} = _ref2;
|
|
13055
|
+
const camelizedProps = camelizeProps(item.props);
|
|
13046
13056
|
const itemProps = mergeProps(item.props, {
|
|
13047
13057
|
ref: itemRef,
|
|
13048
13058
|
key: item.value,
|
|
@@ -13064,10 +13074,10 @@ const VSelect = genericComponent()({
|
|
|
13064
13074
|
"modelValue": isSelected,
|
|
13065
13075
|
"ripple": false,
|
|
13066
13076
|
"tabindex": "-1"
|
|
13067
|
-
}, null) : undefined,
|
|
13068
|
-
"image":
|
|
13069
|
-
}, null),
|
|
13070
|
-
"icon":
|
|
13077
|
+
}, null) : undefined, camelizedProps.prependAvatar && createVNode(VAvatar, {
|
|
13078
|
+
"image": camelizedProps.prependAvatar
|
|
13079
|
+
}, null), camelizedProps.prependIcon && createVNode(VIcon, {
|
|
13080
|
+
"icon": camelizedProps.prependIcon
|
|
13071
13081
|
}, null)]);
|
|
13072
13082
|
}
|
|
13073
13083
|
});
|
|
@@ -15064,9 +15074,9 @@ const VWindow = genericComponent()({
|
|
|
15064
15074
|
}, {
|
|
15065
15075
|
default: () => [createElementVNode("div", {
|
|
15066
15076
|
"class": "v-window__container",
|
|
15067
|
-
"style":
|
|
15077
|
+
"style": {
|
|
15068
15078
|
height: transitionHeight.value
|
|
15069
|
-
}
|
|
15079
|
+
}
|
|
15070
15080
|
}, [slots.default?.({
|
|
15071
15081
|
group
|
|
15072
15082
|
}), props.showArrows !== false && createElementVNode("div", {
|
|
@@ -15161,10 +15171,10 @@ const VCarousel = genericComponent()({
|
|
|
15161
15171
|
} = _ref2;
|
|
15162
15172
|
return createElementVNode(Fragment, null, [!props.hideDelimiters && createElementVNode("div", {
|
|
15163
15173
|
"class": "v-carousel__controls",
|
|
15164
|
-
"style":
|
|
15174
|
+
"style": {
|
|
15165
15175
|
left: props.verticalDelimiters === 'left' && props.verticalDelimiters ? 0 : 'auto',
|
|
15166
15176
|
right: props.verticalDelimiters === 'right' ? 0 : 'auto'
|
|
15167
|
-
}
|
|
15177
|
+
}
|
|
15168
15178
|
}, [group.items.value.length > 0 && createVNode(VDefaultsProvider, {
|
|
15169
15179
|
"defaults": {
|
|
15170
15180
|
VBtn: {
|
|
@@ -15884,7 +15894,10 @@ const useSteps = props => {
|
|
|
15884
15894
|
if (step.value <= 0) return value;
|
|
15885
15895
|
const clamped = clamp(value, min.value, max.value);
|
|
15886
15896
|
const offset = min.value % step.value;
|
|
15887
|
-
|
|
15897
|
+
let newValue = Math.round((clamped - offset) / step.value) * step.value + offset;
|
|
15898
|
+
if (clamped > newValue && newValue + step.value > max.value) {
|
|
15899
|
+
newValue = max.value;
|
|
15900
|
+
}
|
|
15888
15901
|
return parseFloat(Math.min(newValue, max.value).toFixed(decimals.value));
|
|
15889
15902
|
}
|
|
15890
15903
|
return {
|
|
@@ -16140,6 +16153,8 @@ const VSliderThumb = genericComponent()({
|
|
|
16140
16153
|
} = useRtl();
|
|
16141
16154
|
if (!slider) throw new Error('[Vuetify] v-slider-thumb must be used inside v-slider or v-range-slider');
|
|
16142
16155
|
const {
|
|
16156
|
+
min,
|
|
16157
|
+
max,
|
|
16143
16158
|
thumbColor,
|
|
16144
16159
|
step,
|
|
16145
16160
|
disabled,
|
|
@@ -16180,16 +16195,20 @@ const VSliderThumb = genericComponent()({
|
|
|
16180
16195
|
if (!relevantKeys.includes(e.key)) return;
|
|
16181
16196
|
e.preventDefault();
|
|
16182
16197
|
const _step = step.value || 0.1;
|
|
16183
|
-
const steps = (
|
|
16198
|
+
const steps = (max.value - min.value) / _step;
|
|
16184
16199
|
if ([left, right, down, up].includes(e.key)) {
|
|
16185
16200
|
const increase = vertical.value ? [isRtl.value ? left : right, isReversed.value ? down : up] : indexFromEnd.value !== isRtl.value ? [left, up] : [right, up];
|
|
16186
16201
|
const direction = increase.includes(e.key) ? 1 : -1;
|
|
16187
16202
|
const multiplier = e.shiftKey ? 2 : e.ctrlKey ? 1 : 0;
|
|
16188
|
-
|
|
16203
|
+
if (direction === -1 && value === max.value && !multiplier && !Number.isInteger(steps)) {
|
|
16204
|
+
value = value - steps % 1 * _step;
|
|
16205
|
+
} else {
|
|
16206
|
+
value = value + direction * _step * multipliers.value[multiplier];
|
|
16207
|
+
}
|
|
16189
16208
|
} else if (e.key === home) {
|
|
16190
|
-
value =
|
|
16209
|
+
value = min.value;
|
|
16191
16210
|
} else if (e.key === end) {
|
|
16192
|
-
value =
|
|
16211
|
+
value = max.value;
|
|
16193
16212
|
} else {
|
|
16194
16213
|
const direction = e.key === pagedown ? 1 : -1;
|
|
16195
16214
|
value = value - direction * _step * (steps > 100 ? steps / 10 : 10);
|
|
@@ -16214,17 +16233,17 @@ const VSliderThumb = genericComponent()({
|
|
|
16214
16233
|
"role": "slider",
|
|
16215
16234
|
"tabindex": disabled.value ? -1 : 0,
|
|
16216
16235
|
"aria-label": props.name,
|
|
16217
|
-
"aria-valuemin":
|
|
16218
|
-
"aria-valuemax":
|
|
16236
|
+
"aria-valuemin": min.value,
|
|
16237
|
+
"aria-valuemax": max.value,
|
|
16219
16238
|
"aria-valuenow": props.modelValue,
|
|
16220
16239
|
"aria-readonly": !!readonly.value,
|
|
16221
16240
|
"aria-orientation": direction.value,
|
|
16222
16241
|
"onKeydown": !readonly.value ? onKeydown : undefined
|
|
16223
16242
|
}, [createElementVNode("div", {
|
|
16224
16243
|
"class": normalizeClass(['v-slider-thumb__surface', textColorClasses.value, elevationClasses.value]),
|
|
16225
|
-
"style":
|
|
16244
|
+
"style": {
|
|
16226
16245
|
...textColorStyles.value
|
|
16227
|
-
}
|
|
16246
|
+
}
|
|
16228
16247
|
}, null), withDirectives(createElementVNode("div", {
|
|
16229
16248
|
"class": normalizeClass(['v-slider-thumb__ripple', textColorClasses.value]),
|
|
16230
16249
|
"style": normalizeStyle(textColorStyles.value)
|
|
@@ -16237,7 +16256,7 @@ const VSliderThumb = genericComponent()({
|
|
|
16237
16256
|
default: () => [withDirectives(createElementVNode("div", {
|
|
16238
16257
|
"class": "v-slider-thumb__label-container"
|
|
16239
16258
|
}, [createElementVNode("div", {
|
|
16240
|
-
"class": ['v-slider-thumb__label']
|
|
16259
|
+
"class": normalizeClass(['v-slider-thumb__label', textColorClasses.value])
|
|
16241
16260
|
}, [createElementVNode("div", null, [slots['thumb-label']?.({
|
|
16242
16261
|
modelValue: props.modelValue
|
|
16243
16262
|
}) ?? props.modelValue.toFixed(step.value ? decimals.value : 1)])])]), [[vShow, thumbLabel.value && props.focused || thumbLabel.value === 'always']])]
|
|
@@ -16322,9 +16341,9 @@ const VSliderTrack = genericComponent()({
|
|
|
16322
16341
|
'v-slider-track__tick--first': tick.value === min.value,
|
|
16323
16342
|
'v-slider-track__tick--last': tick.value === max.value
|
|
16324
16343
|
}]),
|
|
16325
|
-
"style":
|
|
16344
|
+
"style": {
|
|
16326
16345
|
[startDir.value]: directionValue
|
|
16327
|
-
}
|
|
16346
|
+
}
|
|
16328
16347
|
}, [(tick.label || slots['tick-label']) && createElementVNode("div", {
|
|
16329
16348
|
"class": "v-slider-track__tick-label"
|
|
16330
16349
|
}, [slots['tick-label']?.({
|
|
@@ -16344,16 +16363,16 @@ const VSliderTrack = genericComponent()({
|
|
|
16344
16363
|
"class": normalizeClass(['v-slider-track__background', trackColorClasses.value, {
|
|
16345
16364
|
'v-slider-track__background--opacity': !!color.value || !trackFillColor.value
|
|
16346
16365
|
}]),
|
|
16347
|
-
"style":
|
|
16366
|
+
"style": {
|
|
16348
16367
|
...backgroundStyles.value,
|
|
16349
16368
|
...trackColorStyles.value
|
|
16350
|
-
}
|
|
16369
|
+
}
|
|
16351
16370
|
}, null), createElementVNode("div", {
|
|
16352
16371
|
"class": normalizeClass(['v-slider-track__fill', trackFillColorClasses.value]),
|
|
16353
|
-
"style":
|
|
16372
|
+
"style": {
|
|
16354
16373
|
...trackFillStyles.value,
|
|
16355
16374
|
...trackFillColorStyles.value
|
|
16356
|
-
}
|
|
16375
|
+
}
|
|
16357
16376
|
}, null), showTicks.value && createElementVNode("div", {
|
|
16358
16377
|
"class": normalizeClass(['v-slider-track__ticks', {
|
|
16359
16378
|
'v-slider-track__ticks--always-show': showTicks.value === 'always'
|
|
@@ -16555,9 +16574,9 @@ const VColorPickerPreview = defineComponent({
|
|
|
16555
16574
|
}, null)]), createElementVNode("div", {
|
|
16556
16575
|
"class": "v-color-picker-preview__dot"
|
|
16557
16576
|
}, [createElementVNode("div", {
|
|
16558
|
-
"style":
|
|
16577
|
+
"style": {
|
|
16559
16578
|
background: HSVtoCSS(props.color ?? nullColor)
|
|
16560
|
-
}
|
|
16579
|
+
}
|
|
16561
16580
|
}, null)]), createElementVNode("div", {
|
|
16562
16581
|
"class": "v-color-picker-preview__sliders"
|
|
16563
16582
|
}, [createVNode(VSlider, {
|
|
@@ -16958,9 +16977,9 @@ const VColorPickerSwatches = defineComponent({
|
|
|
16958
16977
|
"class": "v-color-picker-swatches__color",
|
|
16959
16978
|
"onClick": () => hsva && emit('update:color', hsva)
|
|
16960
16979
|
}, [createElementVNode("div", {
|
|
16961
|
-
"style":
|
|
16980
|
+
"style": {
|
|
16962
16981
|
background
|
|
16963
|
-
}
|
|
16982
|
+
}
|
|
16964
16983
|
}, [props.color && deepEqual(props.color, hsva) ? createVNode(VIcon, {
|
|
16965
16984
|
"size": "x-small",
|
|
16966
16985
|
"icon": "$success",
|
|
@@ -17506,7 +17525,7 @@ function getWeek(date, locale, firstDayOfWeek, firstWeekMinSize) {
|
|
|
17506
17525
|
const yearStart = new Date(year, 0, 1);
|
|
17507
17526
|
const size = firstWeekSize(year);
|
|
17508
17527
|
const d1w1 = size >= minWeekSize ? addDays(yearStart, size - 7) : addDays(yearStart, size);
|
|
17509
|
-
return 1 + getDiff(date, d1w1, 'weeks');
|
|
17528
|
+
return 1 + getDiff(endOfDay(date), startOfDay(d1w1), 'weeks');
|
|
17510
17529
|
}
|
|
17511
17530
|
function getDate(date) {
|
|
17512
17531
|
return date.getDate();
|
|
@@ -17809,6 +17828,18 @@ function createDate(options, locale) {
|
|
|
17809
17828
|
instance: createInstance(_options, locale)
|
|
17810
17829
|
};
|
|
17811
17830
|
}
|
|
17831
|
+
function createDateRange(adapter, start, stop) {
|
|
17832
|
+
const diff = adapter.getDiff(adapter.endOfDay(stop ?? start), adapter.startOfDay(start), 'days');
|
|
17833
|
+
const datesInRange = [start];
|
|
17834
|
+
for (let i = 1; i < diff; i++) {
|
|
17835
|
+
const nextDate = adapter.addDays(start, i);
|
|
17836
|
+
datesInRange.push(nextDate);
|
|
17837
|
+
}
|
|
17838
|
+
if (stop) {
|
|
17839
|
+
datesInRange.push(adapter.endOfDay(stop));
|
|
17840
|
+
}
|
|
17841
|
+
return datesInRange;
|
|
17842
|
+
}
|
|
17812
17843
|
function createInstance(options, locale) {
|
|
17813
17844
|
const instance = reactive(typeof options.adapter === 'function'
|
|
17814
17845
|
// eslint-disable-next-line new-cap
|
|
@@ -19908,7 +19939,9 @@ const VDataTableFooter = genericComponent()({
|
|
|
19908
19939
|
"class": "v-data-table-footer"
|
|
19909
19940
|
}, [slots.prepend?.(), createElementVNode("div", {
|
|
19910
19941
|
"class": "v-data-table-footer__items-per-page"
|
|
19911
|
-
}, [createElementVNode("span",
|
|
19942
|
+
}, [createElementVNode("span", {
|
|
19943
|
+
"aria-label": t(props.itemsPerPageText)
|
|
19944
|
+
}, [t(props.itemsPerPageText)]), createVNode(VSelect, {
|
|
19912
19945
|
"items": itemsPerPageOptions.value,
|
|
19913
19946
|
"modelValue": itemsPerPage.value,
|
|
19914
19947
|
"onUpdate:modelValue": v => setItemsPerPage(Number(v)),
|
|
@@ -19960,18 +19993,19 @@ const VDataTableColumn = defineFunctionalComponent({
|
|
|
19960
19993
|
} = _ref;
|
|
19961
19994
|
const Tag = props.tag ?? 'td';
|
|
19962
19995
|
return createVNode(Tag, {
|
|
19996
|
+
"tabindex": "0",
|
|
19963
19997
|
"class": normalizeClass(['v-data-table__td', {
|
|
19964
19998
|
'v-data-table-column--fixed': props.fixed,
|
|
19965
19999
|
'v-data-table-column--last-fixed': props.lastFixed,
|
|
19966
20000
|
'v-data-table-column--no-padding': props.noPadding,
|
|
19967
20001
|
'v-data-table-column--nowrap': props.nowrap
|
|
19968
20002
|
}, `v-data-table-column--align-${props.align}`]),
|
|
19969
|
-
"style":
|
|
20003
|
+
"style": {
|
|
19970
20004
|
height: convertToUnit(props.height),
|
|
19971
20005
|
width: convertToUnit(props.width),
|
|
19972
20006
|
maxWidth: convertToUnit(props.maxWidth),
|
|
19973
20007
|
left: convertToUnit(props.fixedOffset || null)
|
|
19974
|
-
}
|
|
20008
|
+
}
|
|
19975
20009
|
}, {
|
|
19976
20010
|
default: () => [slots.default?.()]
|
|
19977
20011
|
});
|
|
@@ -20304,6 +20338,11 @@ const VDataTableHeaders = genericComponent()({
|
|
|
20304
20338
|
top: props.sticky || props.fixedHeader ? `calc(var(--v-table-header-height) * ${y})` : undefined
|
|
20305
20339
|
};
|
|
20306
20340
|
}
|
|
20341
|
+
function handleEnterKeyPress(event, column) {
|
|
20342
|
+
if (event.key === 'Enter' && !props.disableSort) {
|
|
20343
|
+
toggleSort(column);
|
|
20344
|
+
}
|
|
20345
|
+
}
|
|
20307
20346
|
function getSortIcon(column) {
|
|
20308
20347
|
const item = sortBy.value.find(item => item.key === column.key);
|
|
20309
20348
|
if (!item) return props.sortAscIcon;
|
|
@@ -20360,7 +20399,9 @@ const VDataTableHeaders = genericComponent()({
|
|
|
20360
20399
|
"nowrap": column.nowrap,
|
|
20361
20400
|
"lastFixed": column.lastFixed,
|
|
20362
20401
|
"noPadding": noPadding
|
|
20363
|
-
}, headerProps
|
|
20402
|
+
}, headerProps, {
|
|
20403
|
+
"onKeydown": event => column.sortable && handleEnterKeyPress(event, column)
|
|
20404
|
+
}), {
|
|
20364
20405
|
default: () => {
|
|
20365
20406
|
const columnSlotName = `header.${column.key}`;
|
|
20366
20407
|
const columnSlotProps = {
|
|
@@ -20496,9 +20537,9 @@ const VDataTableGroupHeaderRow = genericComponent()({
|
|
|
20496
20537
|
});
|
|
20497
20538
|
return () => createElementVNode("tr", {
|
|
20498
20539
|
"class": "v-data-table-group-header-row",
|
|
20499
|
-
"style":
|
|
20540
|
+
"style": {
|
|
20500
20541
|
'--v-data-table-group-header-row-depth': props.item.depth
|
|
20501
|
-
}
|
|
20542
|
+
}
|
|
20502
20543
|
}, [columns.value.map(column => {
|
|
20503
20544
|
if (column.key === 'data-table-group') {
|
|
20504
20545
|
const icon = isGroupOpen(props.item) ? '$expand' : '$next';
|
|
@@ -20846,9 +20887,9 @@ const VTable = genericComponent()({
|
|
|
20846
20887
|
}, {
|
|
20847
20888
|
default: () => [slots.top?.(), slots.default ? createElementVNode("div", {
|
|
20848
20889
|
"class": "v-table__wrapper",
|
|
20849
|
-
"style":
|
|
20890
|
+
"style": {
|
|
20850
20891
|
height: convertToUnit(props.height)
|
|
20851
|
-
}
|
|
20892
|
+
}
|
|
20852
20893
|
}, [createElementVNode("table", null, [slots.default()])]) : slots.wrapper?.(), slots.bottom?.()]
|
|
20853
20894
|
}));
|
|
20854
20895
|
return {};
|
|
@@ -21283,19 +21324,19 @@ const VDataTableVirtual = genericComponent()({
|
|
|
21283
21324
|
"onScrollPassive": handleScroll,
|
|
21284
21325
|
"onScrollend": handleScrollend,
|
|
21285
21326
|
"class": "v-table__wrapper",
|
|
21286
|
-
"style":
|
|
21327
|
+
"style": {
|
|
21287
21328
|
height: convertToUnit(props.height)
|
|
21288
|
-
}
|
|
21329
|
+
}
|
|
21289
21330
|
}, [createElementVNode("table", null, [slots.colgroup?.(slotProps.value), !props.hideDefaultHeader && createElementVNode("thead", {
|
|
21290
21331
|
"key": "thead"
|
|
21291
21332
|
}, [createVNode(VDataTableHeaders, dataTableHeadersProps, slots)]), slots.thead?.(slotProps.value), !props.hideDefaultBody && createElementVNode("tbody", {
|
|
21292
21333
|
"key": "tbody"
|
|
21293
21334
|
}, [createElementVNode("tr", {
|
|
21294
21335
|
"ref": markerRef,
|
|
21295
|
-
"style":
|
|
21336
|
+
"style": {
|
|
21296
21337
|
height: convertToUnit(paddingTop.value),
|
|
21297
21338
|
border: 0
|
|
21298
|
-
}
|
|
21339
|
+
}
|
|
21299
21340
|
}, [createElementVNode("td", {
|
|
21300
21341
|
"colspan": columns.value.length,
|
|
21301
21342
|
"style": {
|
|
@@ -21326,10 +21367,10 @@ const VDataTableVirtual = genericComponent()({
|
|
|
21326
21367
|
}
|
|
21327
21368
|
})
|
|
21328
21369
|
}), slots['body.append']?.(slotProps.value), createElementVNode("tr", {
|
|
21329
|
-
"style":
|
|
21370
|
+
"style": {
|
|
21330
21371
|
height: convertToUnit(paddingBottom.value),
|
|
21331
21372
|
border: 0
|
|
21332
|
-
}
|
|
21373
|
+
}
|
|
21333
21374
|
}, [createElementVNode("td", {
|
|
21334
21375
|
"colspan": columns.value.length,
|
|
21335
21376
|
"style": {
|
|
@@ -21867,10 +21908,10 @@ const VDatePickerControls = genericComponent()({
|
|
|
21867
21908
|
useRender(() => {
|
|
21868
21909
|
// TODO: add slot support and scope defaults
|
|
21869
21910
|
return createElementVNode("div", {
|
|
21870
|
-
"class": ['v-date-picker-controls'],
|
|
21871
|
-
"style":
|
|
21911
|
+
"class": normalizeClass(['v-date-picker-controls']),
|
|
21912
|
+
"style": {
|
|
21872
21913
|
'--v-date-picker-controls-height': convertToUnit(props.controlHeight)
|
|
21873
|
-
}
|
|
21914
|
+
}
|
|
21874
21915
|
}, [createVNode(VBtn, {
|
|
21875
21916
|
"class": "v-date-picker-controls__month-btn",
|
|
21876
21917
|
"data-testid": "month-btn",
|
|
@@ -22213,14 +22254,7 @@ const VDatePickerMonth = genericComponent()({
|
|
|
22213
22254
|
} else {
|
|
22214
22255
|
rangeStop.value = adapter.endOfDay(_value);
|
|
22215
22256
|
}
|
|
22216
|
-
|
|
22217
|
-
const datesInRange = [rangeStart.value];
|
|
22218
|
-
for (let i = 1; i < diff; i++) {
|
|
22219
|
-
const nextDate = adapter.addDays(rangeStart.value, i);
|
|
22220
|
-
datesInRange.push(nextDate);
|
|
22221
|
-
}
|
|
22222
|
-
datesInRange.push(rangeStop.value);
|
|
22223
|
-
model.value = datesInRange;
|
|
22257
|
+
model.value = createDateRange(adapter, rangeStart.value, rangeStop.value);
|
|
22224
22258
|
} else {
|
|
22225
22259
|
rangeStart.value = value;
|
|
22226
22260
|
rangeStop.value = undefined;
|
|
@@ -22255,7 +22289,7 @@ const VDatePickerMonth = genericComponent()({
|
|
|
22255
22289
|
"key": "hide-week-days",
|
|
22256
22290
|
"class": "v-date-picker-month__day"
|
|
22257
22291
|
}, [createTextVNode("\xA0")]), weekNumbers.value.map(week => createElementVNode("div", {
|
|
22258
|
-
"class": ['v-date-picker-month__day', 'v-date-picker-month__day--adjacent']
|
|
22292
|
+
"class": normalizeClass(['v-date-picker-month__day', 'v-date-picker-month__day--adjacent'])
|
|
22259
22293
|
}, [week]))]), createVNode(MaybeTransition, {
|
|
22260
22294
|
"name": transition.value
|
|
22261
22295
|
}, {
|
|
@@ -22264,7 +22298,7 @@ const VDatePickerMonth = genericComponent()({
|
|
|
22264
22298
|
"key": daysInMonth.value[0].date?.toString(),
|
|
22265
22299
|
"class": "v-date-picker-month__days"
|
|
22266
22300
|
}, [!props.hideWeekdays && adapter.getWeekdays(props.firstDayOfWeek).map(weekDay => createElementVNode("div", {
|
|
22267
|
-
"class": ['v-date-picker-month__day', 'v-date-picker-month__weekday']
|
|
22301
|
+
"class": normalizeClass(['v-date-picker-month__day', 'v-date-picker-month__weekday'])
|
|
22268
22302
|
}, [weekDay])), daysInMonth.value.map((item, i) => {
|
|
22269
22303
|
const slotProps = {
|
|
22270
22304
|
props: {
|
|
@@ -22306,7 +22340,8 @@ const makeVDatePickerMonthsProps = propsFactory({
|
|
|
22306
22340
|
min: null,
|
|
22307
22341
|
max: null,
|
|
22308
22342
|
modelValue: Number,
|
|
22309
|
-
year: Number
|
|
22343
|
+
year: Number,
|
|
22344
|
+
allowedMonths: [Array, Function]
|
|
22310
22345
|
}, 'VDatePickerMonths');
|
|
22311
22346
|
const VDatePickerMonths = genericComponent()({
|
|
22312
22347
|
name: 'VDatePickerMonths',
|
|
@@ -22328,7 +22363,7 @@ const VDatePickerMonths = genericComponent()({
|
|
|
22328
22363
|
}
|
|
22329
22364
|
return createRange(12).map(i => {
|
|
22330
22365
|
const text = adapter.format(date, 'monthShort');
|
|
22331
|
-
const isDisabled = !!(props.min && adapter.isAfter(adapter.startOfMonth(adapter.date(props.min)), date) || props.max && adapter.isAfter(date, adapter.startOfMonth(adapter.date(props.max))));
|
|
22366
|
+
const isDisabled = !!(!isMonthAllowed(i) || props.min && adapter.isAfter(adapter.startOfMonth(adapter.date(props.min)), date) || props.max && adapter.isAfter(date, adapter.startOfMonth(adapter.date(props.max))));
|
|
22332
22367
|
date = adapter.getNextMonth(date);
|
|
22333
22368
|
return {
|
|
22334
22369
|
isDisabled,
|
|
@@ -22340,11 +22375,20 @@ const VDatePickerMonths = genericComponent()({
|
|
|
22340
22375
|
watchEffect(() => {
|
|
22341
22376
|
model.value = model.value ?? adapter.getMonth(adapter.date());
|
|
22342
22377
|
});
|
|
22378
|
+
function isMonthAllowed(month) {
|
|
22379
|
+
if (Array.isArray(props.allowedMonths) && props.allowedMonths.length) {
|
|
22380
|
+
return props.allowedMonths.includes(month);
|
|
22381
|
+
}
|
|
22382
|
+
if (typeof props.allowedMonths === 'function') {
|
|
22383
|
+
return props.allowedMonths(month);
|
|
22384
|
+
}
|
|
22385
|
+
return true;
|
|
22386
|
+
}
|
|
22343
22387
|
useRender(() => createElementVNode("div", {
|
|
22344
22388
|
"class": "v-date-picker-months",
|
|
22345
|
-
"style":
|
|
22389
|
+
"style": {
|
|
22346
22390
|
height: convertToUnit(props.height)
|
|
22347
|
-
}
|
|
22391
|
+
}
|
|
22348
22392
|
}, [createElementVNode("div", {
|
|
22349
22393
|
"class": "v-date-picker-months__content"
|
|
22350
22394
|
}, [months.value.map((month, i) => {
|
|
@@ -22385,7 +22429,8 @@ const makeVDatePickerYearsProps = propsFactory({
|
|
|
22385
22429
|
height: [String, Number],
|
|
22386
22430
|
min: null,
|
|
22387
22431
|
max: null,
|
|
22388
|
-
modelValue: Number
|
|
22432
|
+
modelValue: Number,
|
|
22433
|
+
allowedYears: [Array, Function]
|
|
22389
22434
|
}, 'VDatePickerYears');
|
|
22390
22435
|
const VDatePickerYears = genericComponent()({
|
|
22391
22436
|
name: 'VDatePickerYears',
|
|
@@ -22417,7 +22462,8 @@ const VDatePickerYears = genericComponent()({
|
|
|
22417
22462
|
date = adapter.setYear(date, adapter.getYear(date) + 1);
|
|
22418
22463
|
return {
|
|
22419
22464
|
text,
|
|
22420
|
-
value: i
|
|
22465
|
+
value: i,
|
|
22466
|
+
isDisabled: !isYearAllowed(i)
|
|
22421
22467
|
};
|
|
22422
22468
|
});
|
|
22423
22469
|
});
|
|
@@ -22431,11 +22477,20 @@ const VDatePickerYears = genericComponent()({
|
|
|
22431
22477
|
block: 'center'
|
|
22432
22478
|
});
|
|
22433
22479
|
});
|
|
22480
|
+
function isYearAllowed(year) {
|
|
22481
|
+
if (Array.isArray(props.allowedYears) && props.allowedYears.length) {
|
|
22482
|
+
return props.allowedYears.includes(year);
|
|
22483
|
+
}
|
|
22484
|
+
if (typeof props.allowedYears === 'function') {
|
|
22485
|
+
return props.allowedYears(year);
|
|
22486
|
+
}
|
|
22487
|
+
return true;
|
|
22488
|
+
}
|
|
22434
22489
|
useRender(() => createElementVNode("div", {
|
|
22435
22490
|
"class": "v-date-picker-years",
|
|
22436
|
-
"style":
|
|
22491
|
+
"style": {
|
|
22437
22492
|
height: convertToUnit(props.height)
|
|
22438
|
-
}
|
|
22493
|
+
}
|
|
22439
22494
|
}, [createElementVNode("div", {
|
|
22440
22495
|
"class": "v-date-picker-years__content"
|
|
22441
22496
|
}, [years.value.map((year, i) => {
|
|
@@ -22445,6 +22500,7 @@ const VDatePickerYears = genericComponent()({
|
|
|
22445
22500
|
color: model.value === year.value ? props.color : undefined,
|
|
22446
22501
|
rounded: true,
|
|
22447
22502
|
text: year.text,
|
|
22503
|
+
disabled: year.isDisabled,
|
|
22448
22504
|
variant: model.value === year.value ? 'flat' : 'text',
|
|
22449
22505
|
onClick: () => {
|
|
22450
22506
|
if (model.value === year.value) {
|
|
@@ -22594,6 +22650,41 @@ const VDatePicker = genericComponent()({
|
|
|
22594
22650
|
}
|
|
22595
22651
|
return targets;
|
|
22596
22652
|
});
|
|
22653
|
+
function isAllowedInRange(start, end) {
|
|
22654
|
+
const allowedDates = props.allowedDates;
|
|
22655
|
+
if (typeof allowedDates !== 'function') return true;
|
|
22656
|
+
const days = adapter.getDiff(end, start, 'days');
|
|
22657
|
+
for (let i = 0; i < days; i++) {
|
|
22658
|
+
if (allowedDates(adapter.addDays(start, i))) return true;
|
|
22659
|
+
}
|
|
22660
|
+
return false;
|
|
22661
|
+
}
|
|
22662
|
+
function allowedYears(year) {
|
|
22663
|
+
if (typeof props.allowedDates === 'function') {
|
|
22664
|
+
const startOfYear = adapter.parseISO(`${year}-01-01`);
|
|
22665
|
+
return isAllowedInRange(startOfYear, adapter.endOfYear(startOfYear));
|
|
22666
|
+
}
|
|
22667
|
+
if (Array.isArray(props.allowedDates) && props.allowedDates.length) {
|
|
22668
|
+
for (const date of props.allowedDates) {
|
|
22669
|
+
if (adapter.getYear(adapter.date(date)) === year) return true;
|
|
22670
|
+
}
|
|
22671
|
+
return false;
|
|
22672
|
+
}
|
|
22673
|
+
return true;
|
|
22674
|
+
}
|
|
22675
|
+
function allowedMonths(month) {
|
|
22676
|
+
if (typeof props.allowedDates === 'function') {
|
|
22677
|
+
const startOfMonth = adapter.parseISO(`${year.value}-${month + 1}-01`);
|
|
22678
|
+
return isAllowedInRange(startOfMonth, adapter.endOfMonth(startOfMonth));
|
|
22679
|
+
}
|
|
22680
|
+
if (Array.isArray(props.allowedDates) && props.allowedDates.length) {
|
|
22681
|
+
for (const date of props.allowedDates) {
|
|
22682
|
+
if (adapter.getYear(adapter.date(date)) === year.value && adapter.getMonth(adapter.date(date)) === month) return true;
|
|
22683
|
+
}
|
|
22684
|
+
return false;
|
|
22685
|
+
}
|
|
22686
|
+
return true;
|
|
22687
|
+
}
|
|
22597
22688
|
|
|
22598
22689
|
// function onClickAppend () {
|
|
22599
22690
|
// inputMode.value = inputMode.value === 'calendar' ? 'keyboard' : 'calendar'
|
|
@@ -22709,14 +22800,16 @@ const VDatePicker = genericComponent()({
|
|
|
22709
22800
|
"onUpdate:modelValue": [$event => month.value = $event, onUpdateMonth],
|
|
22710
22801
|
"min": minDate.value,
|
|
22711
22802
|
"max": maxDate.value,
|
|
22712
|
-
"year": year.value
|
|
22803
|
+
"year": year.value,
|
|
22804
|
+
"allowedMonths": allowedMonths
|
|
22713
22805
|
}), null) : viewMode.value === 'year' ? createVNode(VDatePickerYears, mergeProps({
|
|
22714
22806
|
"key": "date-picker-years"
|
|
22715
22807
|
}, datePickerYearsProps, {
|
|
22716
22808
|
"modelValue": year.value,
|
|
22717
22809
|
"onUpdate:modelValue": [$event => year.value = $event, onUpdateYear],
|
|
22718
22810
|
"min": minDate.value,
|
|
22719
|
-
"max": maxDate.value
|
|
22811
|
+
"max": maxDate.value,
|
|
22812
|
+
"allowedYears": allowedYears
|
|
22720
22813
|
}), null) : createVNode(VDatePickerMonth, mergeProps({
|
|
22721
22814
|
"key": "date-picker-month"
|
|
22722
22815
|
}, datePickerMonthProps, {
|
|
@@ -22841,9 +22934,9 @@ const VEmptyState = genericComponent()({
|
|
|
22841
22934
|
}, [slots.title?.() ?? props.title]), hasText && createElementVNode("div", {
|
|
22842
22935
|
"key": "text",
|
|
22843
22936
|
"class": "v-empty-state__text",
|
|
22844
|
-
"style":
|
|
22937
|
+
"style": {
|
|
22845
22938
|
maxWidth: convertToUnit(props.textWidth)
|
|
22846
|
-
}
|
|
22939
|
+
}
|
|
22847
22940
|
}, [slots.text?.() ?? props.text]), slots.default && createElementVNode("div", {
|
|
22848
22941
|
"key": "content",
|
|
22849
22942
|
"class": "v-empty-state__content"
|
|
@@ -23248,6 +23341,56 @@ const VFab = genericComponent()({
|
|
|
23248
23341
|
|
|
23249
23342
|
// Types
|
|
23250
23343
|
|
|
23344
|
+
function useFileDrop() {
|
|
23345
|
+
function hasFilesOrFolders(e) {
|
|
23346
|
+
const entries = [...(e.dataTransfer?.items ?? [])].filter(x => x.kind === 'file').map(x => x.webkitGetAsEntry()).filter(Boolean);
|
|
23347
|
+
return entries.length > 0 || [...(e.dataTransfer?.files ?? [])].length > 0;
|
|
23348
|
+
}
|
|
23349
|
+
async function handleDrop(e) {
|
|
23350
|
+
const result = [];
|
|
23351
|
+
const entries = [...(e.dataTransfer?.items ?? [])].filter(x => x.kind === 'file').map(x => x.webkitGetAsEntry()).filter(Boolean);
|
|
23352
|
+
if (entries.length) {
|
|
23353
|
+
for (const entry of entries) {
|
|
23354
|
+
const files = await traverseFileTree(entry, appendIfDirectory('.', entry));
|
|
23355
|
+
result.push(...files.map(x => x.file));
|
|
23356
|
+
}
|
|
23357
|
+
} else {
|
|
23358
|
+
result.push(...[...(e.dataTransfer?.files ?? [])]);
|
|
23359
|
+
}
|
|
23360
|
+
return result;
|
|
23361
|
+
}
|
|
23362
|
+
return {
|
|
23363
|
+
handleDrop,
|
|
23364
|
+
hasFilesOrFolders
|
|
23365
|
+
};
|
|
23366
|
+
}
|
|
23367
|
+
function traverseFileTree(item) {
|
|
23368
|
+
let path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
23369
|
+
return new Promise((resolve, reject) => {
|
|
23370
|
+
if (item.isFile) {
|
|
23371
|
+
const fileEntry = item;
|
|
23372
|
+
fileEntry.file(file => resolve([{
|
|
23373
|
+
file,
|
|
23374
|
+
path
|
|
23375
|
+
}]), reject);
|
|
23376
|
+
} else if (item.isDirectory) {
|
|
23377
|
+
const directoryReader = item.createReader();
|
|
23378
|
+
directoryReader.readEntries(async entries => {
|
|
23379
|
+
const files = [];
|
|
23380
|
+
for (const entry of entries) {
|
|
23381
|
+
files.push(...(await traverseFileTree(entry, appendIfDirectory(path, entry))));
|
|
23382
|
+
}
|
|
23383
|
+
resolve(files);
|
|
23384
|
+
});
|
|
23385
|
+
}
|
|
23386
|
+
});
|
|
23387
|
+
}
|
|
23388
|
+
function appendIfDirectory(path, item) {
|
|
23389
|
+
return item.isDirectory ? `${path}/${item.name}` : path;
|
|
23390
|
+
}
|
|
23391
|
+
|
|
23392
|
+
// Types
|
|
23393
|
+
|
|
23251
23394
|
const makeVFileInputProps = propsFactory({
|
|
23252
23395
|
chips: Boolean,
|
|
23253
23396
|
counter: Boolean,
|
|
@@ -23332,6 +23475,10 @@ const VFileInput = genericComponent()({
|
|
|
23332
23475
|
const isActive = toRef(() => isFocused.value || props.active);
|
|
23333
23476
|
const isPlainOrUnderlined = computed(() => ['plain', 'underlined'].includes(props.variant));
|
|
23334
23477
|
const isDragging = shallowRef(false);
|
|
23478
|
+
const {
|
|
23479
|
+
handleDrop,
|
|
23480
|
+
hasFilesOrFolders
|
|
23481
|
+
} = useFileDrop();
|
|
23335
23482
|
function onFocus() {
|
|
23336
23483
|
if (inputRef.value !== document.activeElement) {
|
|
23337
23484
|
inputRef.value?.focus();
|
|
@@ -23365,13 +23512,13 @@ const VFileInput = genericComponent()({
|
|
|
23365
23512
|
e.preventDefault();
|
|
23366
23513
|
isDragging.value = false;
|
|
23367
23514
|
}
|
|
23368
|
-
function onDrop(e) {
|
|
23515
|
+
async function onDrop(e) {
|
|
23369
23516
|
e.preventDefault();
|
|
23370
23517
|
e.stopImmediatePropagation();
|
|
23371
23518
|
isDragging.value = false;
|
|
23372
|
-
if (!
|
|
23519
|
+
if (!inputRef.value || !hasFilesOrFolders(e)) return;
|
|
23373
23520
|
const dataTransfer = new DataTransfer();
|
|
23374
|
-
for (const file of e
|
|
23521
|
+
for (const file of await handleDrop(e)) {
|
|
23375
23522
|
dataTransfer.items.add(file);
|
|
23376
23523
|
}
|
|
23377
23524
|
inputRef.value.files = dataTransfer.files;
|
|
@@ -23708,9 +23855,9 @@ const VInfiniteScrollIntersect = defineComponent({
|
|
|
23708
23855
|
});
|
|
23709
23856
|
useRender(() => createElementVNode("div", {
|
|
23710
23857
|
"class": "v-infinite-scroll-intersect",
|
|
23711
|
-
"style":
|
|
23858
|
+
"style": {
|
|
23712
23859
|
'--v-infinite-margin-size': props.rootMargin
|
|
23713
|
-
}
|
|
23860
|
+
},
|
|
23714
23861
|
"ref": intersectionRef
|
|
23715
23862
|
}, [createTextVNode("\xA0")]));
|
|
23716
23863
|
return {};
|
|
@@ -24802,6 +24949,7 @@ const VNumberInput = genericComponent()({
|
|
|
24802
24949
|
...makeVNumberInputProps()
|
|
24803
24950
|
},
|
|
24804
24951
|
emits: {
|
|
24952
|
+
'update:focused': val => true,
|
|
24805
24953
|
'update:modelValue': val => true
|
|
24806
24954
|
},
|
|
24807
24955
|
setup(props, _ref) {
|
|
@@ -24817,11 +24965,7 @@ const VNumberInput = genericComponent()({
|
|
|
24817
24965
|
});
|
|
24818
24966
|
const form = useForm(props);
|
|
24819
24967
|
const controlsDisabled = computed(() => form.isDisabled.value || form.isReadonly.value);
|
|
24820
|
-
const
|
|
24821
|
-
isFocused,
|
|
24822
|
-
focus,
|
|
24823
|
-
blur
|
|
24824
|
-
} = useFocus(props);
|
|
24968
|
+
const isFocused = shallowRef(props.focused);
|
|
24825
24969
|
function correctPrecision(val) {
|
|
24826
24970
|
let precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : props.precision;
|
|
24827
24971
|
const fixed = precision == null ? String(val) : val.toFixed(precision);
|
|
@@ -24866,22 +25010,18 @@ const VNumberInput = genericComponent()({
|
|
|
24866
25010
|
const controlNodeDefaultHeight = toRef(() => controlVariant.value === 'stacked' ? 'auto' : '100%');
|
|
24867
25011
|
const incrementSlotProps = {
|
|
24868
25012
|
props: {
|
|
24869
|
-
style: {
|
|
24870
|
-
touchAction: 'none'
|
|
24871
|
-
},
|
|
24872
25013
|
onClick: onControlClick,
|
|
24873
25014
|
onPointerup: onControlMouseup,
|
|
24874
|
-
onPointerdown: onUpControlMousedown
|
|
25015
|
+
onPointerdown: onUpControlMousedown,
|
|
25016
|
+
onPointercancel: onControlPointerCancel
|
|
24875
25017
|
}
|
|
24876
25018
|
};
|
|
24877
25019
|
const decrementSlotProps = {
|
|
24878
25020
|
props: {
|
|
24879
|
-
style: {
|
|
24880
|
-
touchAction: 'none'
|
|
24881
|
-
},
|
|
24882
25021
|
onClick: onControlClick,
|
|
24883
25022
|
onPointerup: onControlMouseup,
|
|
24884
|
-
onPointerdown: onDownControlMousedown
|
|
25023
|
+
onPointerdown: onDownControlMousedown,
|
|
25024
|
+
onPointercancel: onControlPointerCancel
|
|
24885
25025
|
}
|
|
24886
25026
|
};
|
|
24887
25027
|
watch(() => props.precision, () => formatInputValue());
|
|
@@ -24978,6 +25118,11 @@ const VNumberInput = genericComponent()({
|
|
|
24978
25118
|
e.stopPropagation();
|
|
24979
25119
|
holdStart('down');
|
|
24980
25120
|
}
|
|
25121
|
+
function onControlPointerCancel(e) {
|
|
25122
|
+
const el = e.currentTarget;
|
|
25123
|
+
el?.releasePointerCapture(e.pointerId);
|
|
25124
|
+
holdStop();
|
|
25125
|
+
}
|
|
24981
25126
|
function clampModel() {
|
|
24982
25127
|
if (controlsDisabled.value) return;
|
|
24983
25128
|
if (!vTextFieldRef.value) return;
|
|
@@ -25005,11 +25150,9 @@ const VNumberInput = genericComponent()({
|
|
|
25005
25150
|
inputText.value = model.value.toString();
|
|
25006
25151
|
}
|
|
25007
25152
|
function onFocus() {
|
|
25008
|
-
focus();
|
|
25009
25153
|
trimDecimalZeros();
|
|
25010
25154
|
}
|
|
25011
25155
|
function onBlur() {
|
|
25012
|
-
blur();
|
|
25013
25156
|
clampModel();
|
|
25014
25157
|
}
|
|
25015
25158
|
useRender(() => {
|
|
@@ -25029,8 +25172,8 @@ const VNumberInput = genericComponent()({
|
|
|
25029
25172
|
"onClick": onControlClick,
|
|
25030
25173
|
"onPointerdown": onUpControlMousedown,
|
|
25031
25174
|
"onPointerup": onControlMouseup,
|
|
25175
|
+
"onPointercancel": onControlPointerCancel,
|
|
25032
25176
|
"size": controlNodeSize.value,
|
|
25033
|
-
"style": "touch-action: none",
|
|
25034
25177
|
"tabindex": "-1"
|
|
25035
25178
|
}, null) : createVNode(VDefaultsProvider, {
|
|
25036
25179
|
"key": "increment-defaults",
|
|
@@ -25059,8 +25202,8 @@ const VNumberInput = genericComponent()({
|
|
|
25059
25202
|
"onClick": onControlClick,
|
|
25060
25203
|
"onPointerdown": onDownControlMousedown,
|
|
25061
25204
|
"onPointerup": onControlMouseup,
|
|
25205
|
+
"onPointercancel": onControlPointerCancel,
|
|
25062
25206
|
"size": controlNodeSize.value,
|
|
25063
|
-
"style": "touch-action: none",
|
|
25064
25207
|
"tabindex": "-1"
|
|
25065
25208
|
}, null) : createVNode(VDefaultsProvider, {
|
|
25066
25209
|
"key": "decrement-defaults",
|
|
@@ -25102,9 +25245,12 @@ const VNumberInput = genericComponent()({
|
|
|
25102
25245
|
}, null)]) : props.reverse && controlVariant.value !== 'hidden' ? createElementVNode(Fragment, null, [controlNode(), dividerNode()]) : undefined;
|
|
25103
25246
|
const hasPrependInner = slots['prepend-inner'] || prependInnerControl;
|
|
25104
25247
|
return createVNode(VTextField, mergeProps({
|
|
25105
|
-
"ref": vTextFieldRef
|
|
25248
|
+
"ref": vTextFieldRef
|
|
25249
|
+
}, textFieldProps, {
|
|
25106
25250
|
"modelValue": inputText.value,
|
|
25107
25251
|
"onUpdate:modelValue": $event => inputText.value = $event,
|
|
25252
|
+
"focused": isFocused.value,
|
|
25253
|
+
"onUpdate:focused": $event => isFocused.value = $event,
|
|
25108
25254
|
"validationValue": model.value,
|
|
25109
25255
|
"onBeforeinput": onBeforeinput,
|
|
25110
25256
|
"onFocus": onFocus,
|
|
@@ -25117,8 +25263,7 @@ const VNumberInput = genericComponent()({
|
|
|
25117
25263
|
'v-number-input--reverse': props.reverse,
|
|
25118
25264
|
'v-number-input--split': controlVariant.value === 'split',
|
|
25119
25265
|
'v-number-input--stacked': controlVariant.value === 'stacked'
|
|
25120
|
-
}, props.class]
|
|
25121
|
-
}, textFieldProps, {
|
|
25266
|
+
}, props.class],
|
|
25122
25267
|
"style": props.style,
|
|
25123
25268
|
"inputmode": "decimal"
|
|
25124
25269
|
}), {
|
|
@@ -25253,7 +25398,7 @@ const VOtpInput = genericComponent()({
|
|
|
25253
25398
|
function onPaste(index, e) {
|
|
25254
25399
|
e.preventDefault();
|
|
25255
25400
|
e.stopPropagation();
|
|
25256
|
-
const clipboardText = e?.clipboardData?.getData('Text').slice(0, length.value) ?? '';
|
|
25401
|
+
const clipboardText = e?.clipboardData?.getData('Text').trim().slice(0, length.value) ?? '';
|
|
25257
25402
|
if (isValidNumber(clipboardText)) return;
|
|
25258
25403
|
model.value = clipboardText.split('');
|
|
25259
25404
|
inputRef.value?.[index].blur();
|
|
@@ -25285,7 +25430,10 @@ const VOtpInput = genericComponent()({
|
|
|
25285
25430
|
scoped: true
|
|
25286
25431
|
});
|
|
25287
25432
|
watch(model, val => {
|
|
25288
|
-
if (val.length === length.value)
|
|
25433
|
+
if (val.length === length.value) {
|
|
25434
|
+
focusIndex.value = length.value - 1;
|
|
25435
|
+
emit('finish', val.join(''));
|
|
25436
|
+
}
|
|
25289
25437
|
}, {
|
|
25290
25438
|
deep: true
|
|
25291
25439
|
});
|
|
@@ -25320,7 +25468,7 @@ const VOtpInput = genericComponent()({
|
|
|
25320
25468
|
"aria-label": t(props.label, i + 1),
|
|
25321
25469
|
"autofocus": i === 0 && props.autofocus,
|
|
25322
25470
|
"autocomplete": "one-time-code",
|
|
25323
|
-
"class": ['v-otp-input__field'],
|
|
25471
|
+
"class": normalizeClass(['v-otp-input__field']),
|
|
25324
25472
|
"disabled": props.disabled,
|
|
25325
25473
|
"inputmode": props.type === 'number' ? 'numeric' : 'text',
|
|
25326
25474
|
"min": props.type === 'number' ? 0 : undefined,
|
|
@@ -29176,13 +29324,9 @@ const VColorInput = genericComponent()({
|
|
|
29176
29324
|
let {
|
|
29177
29325
|
slots
|
|
29178
29326
|
} = _ref;
|
|
29179
|
-
const {
|
|
29180
|
-
isFocused,
|
|
29181
|
-
focus,
|
|
29182
|
-
blur
|
|
29183
|
-
} = useFocus(props);
|
|
29184
29327
|
const model = useProxiedModel(props, 'modelValue');
|
|
29185
29328
|
const menu = shallowRef(false);
|
|
29329
|
+
const isFocused = shallowRef(props.focused);
|
|
29186
29330
|
const isInteractive = computed(() => !props.disabled && !props.readonly);
|
|
29187
29331
|
const display = computed(() => model.value || null);
|
|
29188
29332
|
function onKeydown(e) {
|
|
@@ -29213,10 +29357,9 @@ const VColorInput = genericComponent()({
|
|
|
29213
29357
|
"modelValue": display.value,
|
|
29214
29358
|
"onKeydown": isInteractive.value ? onKeydown : undefined,
|
|
29215
29359
|
"focused": menu.value || isFocused.value,
|
|
29216
|
-
"onFocus": focus,
|
|
29217
|
-
"onBlur": blur,
|
|
29218
29360
|
"onClick:control": isInteractive.value ? onClick : undefined,
|
|
29219
29361
|
"onClick:prependInner": isInteractive.value ? onClick : undefined,
|
|
29362
|
+
"onUpdate:focused": event => isFocused.value = event,
|
|
29220
29363
|
"onClick:appendInner": isInteractive.value ? onClick : undefined,
|
|
29221
29364
|
"onUpdate:modelValue": val => {
|
|
29222
29365
|
model.value = val;
|
|
@@ -29420,6 +29563,7 @@ const VDateInput = genericComponent()({
|
|
|
29420
29563
|
emits: {
|
|
29421
29564
|
save: value => true,
|
|
29422
29565
|
cancel: () => true,
|
|
29566
|
+
'update:focused': val => true,
|
|
29423
29567
|
'update:modelValue': val => true,
|
|
29424
29568
|
'update:menu': val => true
|
|
29425
29569
|
},
|
|
@@ -29442,15 +29586,11 @@ const VDateInput = genericComponent()({
|
|
|
29442
29586
|
const {
|
|
29443
29587
|
mobile
|
|
29444
29588
|
} = useDisplay(props);
|
|
29445
|
-
const {
|
|
29446
|
-
isFocused,
|
|
29447
|
-
focus,
|
|
29448
|
-
blur
|
|
29449
|
-
} = useFocus(props);
|
|
29450
29589
|
const emptyModelValue = () => props.multiple ? [] : null;
|
|
29451
29590
|
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);
|
|
29452
29591
|
const menu = useProxiedModel(props, 'menu');
|
|
29453
29592
|
const isEditingInput = shallowRef(false);
|
|
29593
|
+
const isFocused = shallowRef(props.focused);
|
|
29454
29594
|
const vTextFieldRef = ref();
|
|
29455
29595
|
const disabledActions = ref(['save']);
|
|
29456
29596
|
function format(date) {
|
|
@@ -29526,7 +29666,6 @@ const VDateInput = genericComponent()({
|
|
|
29526
29666
|
if (props.updateOn.includes('blur')) {
|
|
29527
29667
|
onUserInput(e.target);
|
|
29528
29668
|
}
|
|
29529
|
-
blur();
|
|
29530
29669
|
|
|
29531
29670
|
// When in mobile mode and editing is done (due to keyboard dismissal), close the menu
|
|
29532
29671
|
if (mobile.value && isEditingInput.value && !isFocused.value) {
|
|
@@ -29548,18 +29687,14 @@ const VDateInput = genericComponent()({
|
|
|
29548
29687
|
const parts = value.trim().split(/\D+-\D+|[^\d\-/.]+/);
|
|
29549
29688
|
if (parts.every(isValid)) {
|
|
29550
29689
|
if (props.multiple === 'range') {
|
|
29551
|
-
|
|
29690
|
+
const [start, stop] = parts.map(parseDate).toSorted((a, b) => adapter.isAfter(a, b) ? 1 : -1);
|
|
29691
|
+
model.value = createDateRange(adapter, start, stop);
|
|
29552
29692
|
} else {
|
|
29553
29693
|
model.value = parts.map(parseDate);
|
|
29554
29694
|
}
|
|
29555
29695
|
}
|
|
29556
29696
|
}
|
|
29557
29697
|
}
|
|
29558
|
-
function getRange(inputDates) {
|
|
29559
|
-
const [start, stop] = inputDates.map(parseDate).toSorted((a, b) => adapter.isAfter(a, b) ? 1 : -1);
|
|
29560
|
-
const diff = adapter.getDiff(stop ?? start, start, 'days');
|
|
29561
|
-
return [start, ...createRange(diff, 1).map(i => adapter.addDays(start, i))];
|
|
29562
|
-
}
|
|
29563
29698
|
useRender(() => {
|
|
29564
29699
|
const confirmEditProps = VConfirmEdit.filterProps(props);
|
|
29565
29700
|
const datePickerProps = VDatePicker.filterProps(omit(props, ['active', 'location', 'rounded']));
|
|
@@ -29575,12 +29710,12 @@ const VDateInput = genericComponent()({
|
|
|
29575
29710
|
"readonly": isReadonly.value,
|
|
29576
29711
|
"onKeydown": isInteractive.value ? onKeydown : undefined,
|
|
29577
29712
|
"focused": menu.value || isFocused.value,
|
|
29578
|
-
"onFocus": focus,
|
|
29579
29713
|
"onBlur": onBlur,
|
|
29580
29714
|
"validationValue": model.value,
|
|
29581
29715
|
"onClick:control": isInteractive.value ? onClick : undefined,
|
|
29582
29716
|
"onClick:prepend": isInteractive.value ? onClick : undefined,
|
|
29583
|
-
"onUpdate:modelValue": onUpdateDisplayModel
|
|
29717
|
+
"onUpdate:modelValue": onUpdateDisplayModel,
|
|
29718
|
+
"onUpdate:focused": event => isFocused.value = event
|
|
29584
29719
|
}), {
|
|
29585
29720
|
...slots,
|
|
29586
29721
|
default: () => createElementVNode(Fragment, null, [createVNode(VMenu, {
|
|
@@ -29795,6 +29930,9 @@ const VFileUpload = genericComponent()({
|
|
|
29795
29930
|
const isDragging = shallowRef(false);
|
|
29796
29931
|
const vSheetRef = ref(null);
|
|
29797
29932
|
const inputRef = ref(null);
|
|
29933
|
+
const {
|
|
29934
|
+
handleDrop
|
|
29935
|
+
} = useFileDrop();
|
|
29798
29936
|
function onDragover(e) {
|
|
29799
29937
|
e.preventDefault();
|
|
29800
29938
|
e.stopImmediatePropagation();
|
|
@@ -29804,13 +29942,13 @@ const VFileUpload = genericComponent()({
|
|
|
29804
29942
|
e.preventDefault();
|
|
29805
29943
|
isDragging.value = false;
|
|
29806
29944
|
}
|
|
29807
|
-
function onDrop(e) {
|
|
29945
|
+
async function onDrop(e) {
|
|
29808
29946
|
e.preventDefault();
|
|
29809
29947
|
e.stopImmediatePropagation();
|
|
29810
29948
|
isDragging.value = false;
|
|
29811
|
-
if (!
|
|
29949
|
+
if (!inputRef.value) return;
|
|
29812
29950
|
const dataTransfer = new DataTransfer();
|
|
29813
|
-
for (const file of e
|
|
29951
|
+
for (const file of await handleDrop(e)) {
|
|
29814
29952
|
dataTransfer.items.add(file);
|
|
29815
29953
|
}
|
|
29816
29954
|
inputRef.value.files = dataTransfer.files;
|
|
@@ -30436,7 +30574,7 @@ const VPullToRefresh = genericComponent()({
|
|
|
30436
30574
|
});
|
|
30437
30575
|
useRender(() => {
|
|
30438
30576
|
return createElementVNode("div", {
|
|
30439
|
-
"class": ['v-pull-to-refresh'],
|
|
30577
|
+
"class": normalizeClass(['v-pull-to-refresh']),
|
|
30440
30578
|
"onTouchstart": onTouchstart,
|
|
30441
30579
|
"onTouchmove": onTouchmove,
|
|
30442
30580
|
"onTouchend": onTouchend,
|
|
@@ -30449,16 +30587,16 @@ const VPullToRefresh = genericComponent()({
|
|
|
30449
30587
|
"class": normalizeClass(['v-pull-to-refresh__pull-down', {
|
|
30450
30588
|
'v-pull-to-refresh__pull-down--touching': touching.value
|
|
30451
30589
|
}]),
|
|
30452
|
-
"style":
|
|
30590
|
+
"style": {
|
|
30453
30591
|
top: convertToUnit(-1 * props.pullDownThreshold + topOffset.value),
|
|
30454
30592
|
height: convertToUnit(props.pullDownThreshold)
|
|
30455
|
-
}
|
|
30593
|
+
}
|
|
30456
30594
|
}, [slots.pullDownPanel ? slots.pullDownPanel({
|
|
30457
30595
|
canRefresh: canRefresh.value,
|
|
30458
30596
|
goingUp: goingUp.value,
|
|
30459
30597
|
refreshing: refreshing.value
|
|
30460
30598
|
}) : createElementVNode("div", {
|
|
30461
|
-
"class": ['v-pull-to-refresh__pull-down-default']
|
|
30599
|
+
"class": normalizeClass(['v-pull-to-refresh__pull-down-default'])
|
|
30462
30600
|
}, [refreshing.value ? createVNode(VProgressCircular, {
|
|
30463
30601
|
"indeterminate": true,
|
|
30464
30602
|
"active": false
|
|
@@ -30468,9 +30606,9 @@ const VPullToRefresh = genericComponent()({
|
|
|
30468
30606
|
"class": normalizeClass(['v-pull-to-refresh__scroll-container', {
|
|
30469
30607
|
'v-pull-to-refresh__scroll-container--touching': touching.value
|
|
30470
30608
|
}]),
|
|
30471
|
-
"style":
|
|
30609
|
+
"style": {
|
|
30472
30610
|
top: convertToUnit(topOffset.value)
|
|
30473
|
-
}
|
|
30611
|
+
}
|
|
30474
30612
|
}, [slots.default?.()])]);
|
|
30475
30613
|
});
|
|
30476
30614
|
}
|
|
@@ -32011,7 +32149,7 @@ function createVuetify$1() {
|
|
|
32011
32149
|
};
|
|
32012
32150
|
});
|
|
32013
32151
|
}
|
|
32014
|
-
const version$1 = "3.8.
|
|
32152
|
+
const version$1 = "3.8.9";
|
|
32015
32153
|
createVuetify$1.version = version$1;
|
|
32016
32154
|
|
|
32017
32155
|
// Vue's inject() can only be used in setup
|
|
@@ -32309,7 +32447,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
32309
32447
|
|
|
32310
32448
|
/* eslint-disable local-rules/sort-imports */
|
|
32311
32449
|
|
|
32312
|
-
const version = "3.8.
|
|
32450
|
+
const version = "3.8.9";
|
|
32313
32451
|
|
|
32314
32452
|
/* eslint-disable local-rules/sort-imports */
|
|
32315
32453
|
|