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.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, 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;
|
|
@@ -525,6 +525,13 @@ function extractNumber(text, decimalDigitsLimit) {
|
|
|
525
525
|
}
|
|
526
526
|
return cleanText;
|
|
527
527
|
}
|
|
528
|
+
function camelizeProps(props) {
|
|
529
|
+
const out = {};
|
|
530
|
+
for (const prop in props) {
|
|
531
|
+
out[camelize(prop)] = props[prop];
|
|
532
|
+
}
|
|
533
|
+
return out;
|
|
534
|
+
}
|
|
528
535
|
|
|
529
536
|
// Utilities
|
|
530
537
|
const block = ['top', 'bottom'];
|
|
@@ -4035,9 +4042,9 @@ const VImg = genericComponent()({
|
|
|
4035
4042
|
if (!normalisedSrc.value.src || state.value === 'idle') return null;
|
|
4036
4043
|
const img = createElementVNode("img", {
|
|
4037
4044
|
"class": normalizeClass(['v-img__img', containClasses.value]),
|
|
4038
|
-
"style":
|
|
4045
|
+
"style": {
|
|
4039
4046
|
objectPosition: props.position
|
|
4040
|
-
}
|
|
4047
|
+
},
|
|
4041
4048
|
"crossorigin": props.crossorigin,
|
|
4042
4049
|
"src": normalisedSrc.value.src,
|
|
4043
4050
|
"srcset": normalisedSrc.value.srcset,
|
|
@@ -4064,9 +4071,9 @@ const VImg = genericComponent()({
|
|
|
4064
4071
|
}, {
|
|
4065
4072
|
default: () => [normalisedSrc.value.lazySrc && state.value !== 'loaded' && createElementVNode("img", {
|
|
4066
4073
|
"class": normalizeClass(['v-img__img', 'v-img__img--preload', containClasses.value]),
|
|
4067
|
-
"style":
|
|
4074
|
+
"style": {
|
|
4068
4075
|
objectPosition: props.position
|
|
4069
|
-
}
|
|
4076
|
+
},
|
|
4070
4077
|
"crossorigin": props.crossorigin,
|
|
4071
4078
|
"src": normalisedSrc.value.lazySrc,
|
|
4072
4079
|
"alt": props.alt,
|
|
@@ -4100,9 +4107,9 @@ const VImg = genericComponent()({
|
|
|
4100
4107
|
if (!props.gradient) return null;
|
|
4101
4108
|
return createElementVNode("div", {
|
|
4102
4109
|
"class": "v-img__gradient",
|
|
4103
|
-
"style":
|
|
4110
|
+
"style": {
|
|
4104
4111
|
backgroundImage: `linear-gradient(${props.gradient})`
|
|
4105
|
-
}
|
|
4112
|
+
}
|
|
4106
4113
|
}, null);
|
|
4107
4114
|
};
|
|
4108
4115
|
const isBooted = shallowRef(false);
|
|
@@ -4313,9 +4320,9 @@ const VToolbar = genericComponent()({
|
|
|
4313
4320
|
}, {
|
|
4314
4321
|
default: () => [createElementVNode("div", {
|
|
4315
4322
|
"class": "v-toolbar__content",
|
|
4316
|
-
"style":
|
|
4323
|
+
"style": {
|
|
4317
4324
|
height: convertToUnit(contentHeight.value)
|
|
4318
|
-
}
|
|
4325
|
+
}
|
|
4319
4326
|
}, [slots.prepend && createElementVNode("div", {
|
|
4320
4327
|
"class": "v-toolbar__prepend"
|
|
4321
4328
|
}, [slots.prepend?.()]), hasTitle && createVNode(VToolbarTitle, {
|
|
@@ -4336,9 +4343,9 @@ const VToolbar = genericComponent()({
|
|
|
4336
4343
|
default: () => [createVNode(VExpandTransition, null, {
|
|
4337
4344
|
default: () => [isExtended.value && createElementVNode("div", {
|
|
4338
4345
|
"class": "v-toolbar__extension",
|
|
4339
|
-
"style":
|
|
4346
|
+
"style": {
|
|
4340
4347
|
height: convertToUnit(extensionHeight.value)
|
|
4341
|
-
}
|
|
4348
|
+
}
|
|
4342
4349
|
}, [extension])]
|
|
4343
4350
|
})]
|
|
4344
4351
|
})]
|
|
@@ -5202,9 +5209,9 @@ const VProgressCircular = genericComponent()({
|
|
|
5202
5209
|
"aria-valuenow": props.indeterminate ? undefined : normalizedValue.value
|
|
5203
5210
|
}, {
|
|
5204
5211
|
default: () => [createElementVNode("svg", {
|
|
5205
|
-
"style":
|
|
5212
|
+
"style": {
|
|
5206
5213
|
transform: `rotate(calc(-90deg + ${Number(props.rotate)}deg))`
|
|
5207
|
-
}
|
|
5214
|
+
},
|
|
5208
5215
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
5209
5216
|
"viewBox": `0 0 ${diameter.value} ${diameter.value}`
|
|
5210
5217
|
}, [createElementVNode("circle", {
|
|
@@ -5425,7 +5432,7 @@ const VProgressLinear = genericComponent()({
|
|
|
5425
5432
|
default: () => [props.stream && createElementVNode("div", {
|
|
5426
5433
|
"key": "stream",
|
|
5427
5434
|
"class": normalizeClass(['v-progress-linear__stream', textColorClasses.value]),
|
|
5428
|
-
"style":
|
|
5435
|
+
"style": {
|
|
5429
5436
|
...textColorStyles.value,
|
|
5430
5437
|
[isReversed.value ? 'left' : 'right']: convertToUnit(-height.value),
|
|
5431
5438
|
borderTop: `${convertToUnit(height.value / 2)} dotted`,
|
|
@@ -5433,7 +5440,7 @@ const VProgressLinear = genericComponent()({
|
|
|
5433
5440
|
top: `calc(50% - ${convertToUnit(height.value / 4)})`,
|
|
5434
5441
|
width: convertToUnit(100 - normalizedBuffer.value, '%'),
|
|
5435
5442
|
'--v-progress-linear-stream-to': convertToUnit(height.value * (isReversed.value ? 1 : -1))
|
|
5436
|
-
}
|
|
5443
|
+
}
|
|
5437
5444
|
}, null), createElementVNode("div", {
|
|
5438
5445
|
"class": normalizeClass(['v-progress-linear__background', !isForcedColorsModeActive ? backgroundColorClasses.value : undefined]),
|
|
5439
5446
|
"style": normalizeStyle([backgroundColorStyles.value, {
|
|
@@ -6741,7 +6748,7 @@ const VSelectionControl = genericComponent()({
|
|
|
6741
6748
|
backgroundColorClasses,
|
|
6742
6749
|
backgroundColorStyles
|
|
6743
6750
|
}), withDirectives(createElementVNode("div", {
|
|
6744
|
-
"class": ['v-selection-control__input']
|
|
6751
|
+
"class": normalizeClass(['v-selection-control__input'])
|
|
6745
6752
|
}, [slots.input?.({
|
|
6746
6753
|
model,
|
|
6747
6754
|
textColorClasses,
|
|
@@ -8374,6 +8381,7 @@ const VChip = genericComponent()({
|
|
|
8374
8381
|
const isClickable = computed(() => !props.disabled && props.link !== false && (!!group || props.link || link.isClickable.value));
|
|
8375
8382
|
const closeProps = toRef(() => ({
|
|
8376
8383
|
'aria-label': t(props.closeLabel),
|
|
8384
|
+
disabled: props.disabled,
|
|
8377
8385
|
onClick(e) {
|
|
8378
8386
|
e.preventDefault();
|
|
8379
8387
|
e.stopPropagation();
|
|
@@ -12383,10 +12391,12 @@ const VTextField = genericComponent()({
|
|
|
12383
12391
|
const inputRef = ref();
|
|
12384
12392
|
const isActive = computed(() => activeTypes.includes(props.type) || props.persistentPlaceholder || isFocused.value || props.active);
|
|
12385
12393
|
function onFocus() {
|
|
12386
|
-
if (inputRef.value !== document.activeElement) {
|
|
12387
|
-
inputRef.value?.focus();
|
|
12388
|
-
}
|
|
12389
12394
|
if (!isFocused.value) focus();
|
|
12395
|
+
nextTick(() => {
|
|
12396
|
+
if (inputRef.value !== document.activeElement) {
|
|
12397
|
+
inputRef.value?.focus();
|
|
12398
|
+
}
|
|
12399
|
+
});
|
|
12390
12400
|
}
|
|
12391
12401
|
function onControlMousedown(e) {
|
|
12392
12402
|
emit('mousedown:control', e);
|
|
@@ -12395,7 +12405,6 @@ const VTextField = genericComponent()({
|
|
|
12395
12405
|
e.preventDefault();
|
|
12396
12406
|
}
|
|
12397
12407
|
function onControlClick(e) {
|
|
12398
|
-
onFocus();
|
|
12399
12408
|
emit('click:control', e);
|
|
12400
12409
|
}
|
|
12401
12410
|
function onClear(e, reset) {
|
|
@@ -12888,14 +12897,14 @@ const VVirtualScroll = genericComponent()({
|
|
|
12888
12897
|
return props.renderless ? createElementVNode(Fragment, null, [createElementVNode("div", {
|
|
12889
12898
|
"ref": markerRef,
|
|
12890
12899
|
"class": "v-virtual-scroll__spacer",
|
|
12891
|
-
"style":
|
|
12900
|
+
"style": {
|
|
12892
12901
|
paddingTop: convertToUnit(paddingTop.value)
|
|
12893
|
-
}
|
|
12902
|
+
}
|
|
12894
12903
|
}, null), children, createElementVNode("div", {
|
|
12895
12904
|
"class": "v-virtual-scroll__spacer",
|
|
12896
|
-
"style":
|
|
12905
|
+
"style": {
|
|
12897
12906
|
paddingBottom: convertToUnit(paddingBottom.value)
|
|
12898
|
-
}
|
|
12907
|
+
}
|
|
12899
12908
|
}, null)]) : createElementVNode("div", {
|
|
12900
12909
|
"ref": containerRef,
|
|
12901
12910
|
"class": normalizeClass(['v-virtual-scroll', props.class]),
|
|
@@ -12905,10 +12914,10 @@ const VVirtualScroll = genericComponent()({
|
|
|
12905
12914
|
}, [createElementVNode("div", {
|
|
12906
12915
|
"ref": markerRef,
|
|
12907
12916
|
"class": "v-virtual-scroll__container",
|
|
12908
|
-
"style":
|
|
12917
|
+
"style": {
|
|
12909
12918
|
paddingTop: convertToUnit(paddingTop.value),
|
|
12910
12919
|
paddingBottom: convertToUnit(paddingBottom.value)
|
|
12911
|
-
}
|
|
12920
|
+
}
|
|
12912
12921
|
}, [children])]);
|
|
12913
12922
|
});
|
|
12914
12923
|
return {
|
|
@@ -13321,6 +13330,7 @@ const VSelect = genericComponent()({
|
|
|
13321
13330
|
index,
|
|
13322
13331
|
itemRef
|
|
13323
13332
|
} = _ref2;
|
|
13333
|
+
const camelizedProps = camelizeProps(item.props);
|
|
13324
13334
|
const itemProps = mergeProps(item.props, {
|
|
13325
13335
|
ref: itemRef,
|
|
13326
13336
|
key: item.value,
|
|
@@ -13342,10 +13352,10 @@ const VSelect = genericComponent()({
|
|
|
13342
13352
|
"modelValue": isSelected,
|
|
13343
13353
|
"ripple": false,
|
|
13344
13354
|
"tabindex": "-1"
|
|
13345
|
-
}, null) : undefined,
|
|
13346
|
-
"image":
|
|
13347
|
-
}, null),
|
|
13348
|
-
"icon":
|
|
13355
|
+
}, null) : undefined, camelizedProps.prependAvatar && createVNode(VAvatar, {
|
|
13356
|
+
"image": camelizedProps.prependAvatar
|
|
13357
|
+
}, null), camelizedProps.prependIcon && createVNode(VIcon, {
|
|
13358
|
+
"icon": camelizedProps.prependIcon
|
|
13349
13359
|
}, null)]);
|
|
13350
13360
|
}
|
|
13351
13361
|
});
|
|
@@ -15342,9 +15352,9 @@ const VWindow = genericComponent()({
|
|
|
15342
15352
|
}, {
|
|
15343
15353
|
default: () => [createElementVNode("div", {
|
|
15344
15354
|
"class": "v-window__container",
|
|
15345
|
-
"style":
|
|
15355
|
+
"style": {
|
|
15346
15356
|
height: transitionHeight.value
|
|
15347
|
-
}
|
|
15357
|
+
}
|
|
15348
15358
|
}, [slots.default?.({
|
|
15349
15359
|
group
|
|
15350
15360
|
}), props.showArrows !== false && createElementVNode("div", {
|
|
@@ -15439,10 +15449,10 @@ const VCarousel = genericComponent()({
|
|
|
15439
15449
|
} = _ref2;
|
|
15440
15450
|
return createElementVNode(Fragment, null, [!props.hideDelimiters && createElementVNode("div", {
|
|
15441
15451
|
"class": "v-carousel__controls",
|
|
15442
|
-
"style":
|
|
15452
|
+
"style": {
|
|
15443
15453
|
left: props.verticalDelimiters === 'left' && props.verticalDelimiters ? 0 : 'auto',
|
|
15444
15454
|
right: props.verticalDelimiters === 'right' ? 0 : 'auto'
|
|
15445
|
-
}
|
|
15455
|
+
}
|
|
15446
15456
|
}, [group.items.value.length > 0 && createVNode(VDefaultsProvider, {
|
|
15447
15457
|
"defaults": {
|
|
15448
15458
|
VBtn: {
|
|
@@ -16162,7 +16172,10 @@ const useSteps = props => {
|
|
|
16162
16172
|
if (step.value <= 0) return value;
|
|
16163
16173
|
const clamped = clamp(value, min.value, max.value);
|
|
16164
16174
|
const offset = min.value % step.value;
|
|
16165
|
-
|
|
16175
|
+
let newValue = Math.round((clamped - offset) / step.value) * step.value + offset;
|
|
16176
|
+
if (clamped > newValue && newValue + step.value > max.value) {
|
|
16177
|
+
newValue = max.value;
|
|
16178
|
+
}
|
|
16166
16179
|
return parseFloat(Math.min(newValue, max.value).toFixed(decimals.value));
|
|
16167
16180
|
}
|
|
16168
16181
|
return {
|
|
@@ -16418,6 +16431,8 @@ const VSliderThumb = genericComponent()({
|
|
|
16418
16431
|
} = useRtl();
|
|
16419
16432
|
if (!slider) throw new Error('[Vuetify] v-slider-thumb must be used inside v-slider or v-range-slider');
|
|
16420
16433
|
const {
|
|
16434
|
+
min,
|
|
16435
|
+
max,
|
|
16421
16436
|
thumbColor,
|
|
16422
16437
|
step,
|
|
16423
16438
|
disabled,
|
|
@@ -16458,16 +16473,20 @@ const VSliderThumb = genericComponent()({
|
|
|
16458
16473
|
if (!relevantKeys.includes(e.key)) return;
|
|
16459
16474
|
e.preventDefault();
|
|
16460
16475
|
const _step = step.value || 0.1;
|
|
16461
|
-
const steps = (
|
|
16476
|
+
const steps = (max.value - min.value) / _step;
|
|
16462
16477
|
if ([left, right, down, up].includes(e.key)) {
|
|
16463
16478
|
const increase = vertical.value ? [isRtl.value ? left : right, isReversed.value ? down : up] : indexFromEnd.value !== isRtl.value ? [left, up] : [right, up];
|
|
16464
16479
|
const direction = increase.includes(e.key) ? 1 : -1;
|
|
16465
16480
|
const multiplier = e.shiftKey ? 2 : e.ctrlKey ? 1 : 0;
|
|
16466
|
-
|
|
16481
|
+
if (direction === -1 && value === max.value && !multiplier && !Number.isInteger(steps)) {
|
|
16482
|
+
value = value - steps % 1 * _step;
|
|
16483
|
+
} else {
|
|
16484
|
+
value = value + direction * _step * multipliers.value[multiplier];
|
|
16485
|
+
}
|
|
16467
16486
|
} else if (e.key === home) {
|
|
16468
|
-
value =
|
|
16487
|
+
value = min.value;
|
|
16469
16488
|
} else if (e.key === end) {
|
|
16470
|
-
value =
|
|
16489
|
+
value = max.value;
|
|
16471
16490
|
} else {
|
|
16472
16491
|
const direction = e.key === pagedown ? 1 : -1;
|
|
16473
16492
|
value = value - direction * _step * (steps > 100 ? steps / 10 : 10);
|
|
@@ -16492,17 +16511,17 @@ const VSliderThumb = genericComponent()({
|
|
|
16492
16511
|
"role": "slider",
|
|
16493
16512
|
"tabindex": disabled.value ? -1 : 0,
|
|
16494
16513
|
"aria-label": props.name,
|
|
16495
|
-
"aria-valuemin":
|
|
16496
|
-
"aria-valuemax":
|
|
16514
|
+
"aria-valuemin": min.value,
|
|
16515
|
+
"aria-valuemax": max.value,
|
|
16497
16516
|
"aria-valuenow": props.modelValue,
|
|
16498
16517
|
"aria-readonly": !!readonly.value,
|
|
16499
16518
|
"aria-orientation": direction.value,
|
|
16500
16519
|
"onKeydown": !readonly.value ? onKeydown : undefined
|
|
16501
16520
|
}, [createElementVNode("div", {
|
|
16502
16521
|
"class": normalizeClass(['v-slider-thumb__surface', textColorClasses.value, elevationClasses.value]),
|
|
16503
|
-
"style":
|
|
16522
|
+
"style": {
|
|
16504
16523
|
...textColorStyles.value
|
|
16505
|
-
}
|
|
16524
|
+
}
|
|
16506
16525
|
}, null), withDirectives(createElementVNode("div", {
|
|
16507
16526
|
"class": normalizeClass(['v-slider-thumb__ripple', textColorClasses.value]),
|
|
16508
16527
|
"style": normalizeStyle(textColorStyles.value)
|
|
@@ -16515,7 +16534,7 @@ const VSliderThumb = genericComponent()({
|
|
|
16515
16534
|
default: () => [withDirectives(createElementVNode("div", {
|
|
16516
16535
|
"class": "v-slider-thumb__label-container"
|
|
16517
16536
|
}, [createElementVNode("div", {
|
|
16518
|
-
"class": ['v-slider-thumb__label']
|
|
16537
|
+
"class": normalizeClass(['v-slider-thumb__label', textColorClasses.value])
|
|
16519
16538
|
}, [createElementVNode("div", null, [slots['thumb-label']?.({
|
|
16520
16539
|
modelValue: props.modelValue
|
|
16521
16540
|
}) ?? props.modelValue.toFixed(step.value ? decimals.value : 1)])])]), [[vShow, thumbLabel.value && props.focused || thumbLabel.value === 'always']])]
|
|
@@ -16600,9 +16619,9 @@ const VSliderTrack = genericComponent()({
|
|
|
16600
16619
|
'v-slider-track__tick--first': tick.value === min.value,
|
|
16601
16620
|
'v-slider-track__tick--last': tick.value === max.value
|
|
16602
16621
|
}]),
|
|
16603
|
-
"style":
|
|
16622
|
+
"style": {
|
|
16604
16623
|
[startDir.value]: directionValue
|
|
16605
|
-
}
|
|
16624
|
+
}
|
|
16606
16625
|
}, [(tick.label || slots['tick-label']) && createElementVNode("div", {
|
|
16607
16626
|
"class": "v-slider-track__tick-label"
|
|
16608
16627
|
}, [slots['tick-label']?.({
|
|
@@ -16622,16 +16641,16 @@ const VSliderTrack = genericComponent()({
|
|
|
16622
16641
|
"class": normalizeClass(['v-slider-track__background', trackColorClasses.value, {
|
|
16623
16642
|
'v-slider-track__background--opacity': !!color.value || !trackFillColor.value
|
|
16624
16643
|
}]),
|
|
16625
|
-
"style":
|
|
16644
|
+
"style": {
|
|
16626
16645
|
...backgroundStyles.value,
|
|
16627
16646
|
...trackColorStyles.value
|
|
16628
|
-
}
|
|
16647
|
+
}
|
|
16629
16648
|
}, null), createElementVNode("div", {
|
|
16630
16649
|
"class": normalizeClass(['v-slider-track__fill', trackFillColorClasses.value]),
|
|
16631
|
-
"style":
|
|
16650
|
+
"style": {
|
|
16632
16651
|
...trackFillStyles.value,
|
|
16633
16652
|
...trackFillColorStyles.value
|
|
16634
|
-
}
|
|
16653
|
+
}
|
|
16635
16654
|
}, null), showTicks.value && createElementVNode("div", {
|
|
16636
16655
|
"class": normalizeClass(['v-slider-track__ticks', {
|
|
16637
16656
|
'v-slider-track__ticks--always-show': showTicks.value === 'always'
|
|
@@ -16833,9 +16852,9 @@ const VColorPickerPreview = defineComponent({
|
|
|
16833
16852
|
}, null)]), createElementVNode("div", {
|
|
16834
16853
|
"class": "v-color-picker-preview__dot"
|
|
16835
16854
|
}, [createElementVNode("div", {
|
|
16836
|
-
"style":
|
|
16855
|
+
"style": {
|
|
16837
16856
|
background: HSVtoCSS(props.color ?? nullColor)
|
|
16838
|
-
}
|
|
16857
|
+
}
|
|
16839
16858
|
}, null)]), createElementVNode("div", {
|
|
16840
16859
|
"class": "v-color-picker-preview__sliders"
|
|
16841
16860
|
}, [createVNode(VSlider, {
|
|
@@ -17236,9 +17255,9 @@ const VColorPickerSwatches = defineComponent({
|
|
|
17236
17255
|
"class": "v-color-picker-swatches__color",
|
|
17237
17256
|
"onClick": () => hsva && emit('update:color', hsva)
|
|
17238
17257
|
}, [createElementVNode("div", {
|
|
17239
|
-
"style":
|
|
17258
|
+
"style": {
|
|
17240
17259
|
background
|
|
17241
|
-
}
|
|
17260
|
+
}
|
|
17242
17261
|
}, [props.color && deepEqual(props.color, hsva) ? createVNode(VIcon, {
|
|
17243
17262
|
"size": "x-small",
|
|
17244
17263
|
"icon": "$success",
|
|
@@ -17784,7 +17803,7 @@ function getWeek(date, locale, firstDayOfWeek, firstWeekMinSize) {
|
|
|
17784
17803
|
const yearStart = new Date(year, 0, 1);
|
|
17785
17804
|
const size = firstWeekSize(year);
|
|
17786
17805
|
const d1w1 = size >= minWeekSize ? addDays(yearStart, size - 7) : addDays(yearStart, size);
|
|
17787
|
-
return 1 + getDiff(date, d1w1, 'weeks');
|
|
17806
|
+
return 1 + getDiff(endOfDay(date), startOfDay(d1w1), 'weeks');
|
|
17788
17807
|
}
|
|
17789
17808
|
function getDate(date) {
|
|
17790
17809
|
return date.getDate();
|
|
@@ -18087,6 +18106,18 @@ function createDate(options, locale) {
|
|
|
18087
18106
|
instance: createInstance(_options, locale)
|
|
18088
18107
|
};
|
|
18089
18108
|
}
|
|
18109
|
+
function createDateRange(adapter, start, stop) {
|
|
18110
|
+
const diff = adapter.getDiff(adapter.endOfDay(stop ?? start), adapter.startOfDay(start), 'days');
|
|
18111
|
+
const datesInRange = [start];
|
|
18112
|
+
for (let i = 1; i < diff; i++) {
|
|
18113
|
+
const nextDate = adapter.addDays(start, i);
|
|
18114
|
+
datesInRange.push(nextDate);
|
|
18115
|
+
}
|
|
18116
|
+
if (stop) {
|
|
18117
|
+
datesInRange.push(adapter.endOfDay(stop));
|
|
18118
|
+
}
|
|
18119
|
+
return datesInRange;
|
|
18120
|
+
}
|
|
18090
18121
|
function createInstance(options, locale) {
|
|
18091
18122
|
const instance = reactive(typeof options.adapter === 'function'
|
|
18092
18123
|
// eslint-disable-next-line new-cap
|
|
@@ -20186,7 +20217,9 @@ const VDataTableFooter = genericComponent()({
|
|
|
20186
20217
|
"class": "v-data-table-footer"
|
|
20187
20218
|
}, [slots.prepend?.(), createElementVNode("div", {
|
|
20188
20219
|
"class": "v-data-table-footer__items-per-page"
|
|
20189
|
-
}, [createElementVNode("span",
|
|
20220
|
+
}, [createElementVNode("span", {
|
|
20221
|
+
"aria-label": t(props.itemsPerPageText)
|
|
20222
|
+
}, [t(props.itemsPerPageText)]), createVNode(VSelect, {
|
|
20190
20223
|
"items": itemsPerPageOptions.value,
|
|
20191
20224
|
"modelValue": itemsPerPage.value,
|
|
20192
20225
|
"onUpdate:modelValue": v => setItemsPerPage(Number(v)),
|
|
@@ -20238,18 +20271,19 @@ const VDataTableColumn = defineFunctionalComponent({
|
|
|
20238
20271
|
} = _ref;
|
|
20239
20272
|
const Tag = props.tag ?? 'td';
|
|
20240
20273
|
return createVNode(Tag, {
|
|
20274
|
+
"tabindex": "0",
|
|
20241
20275
|
"class": normalizeClass(['v-data-table__td', {
|
|
20242
20276
|
'v-data-table-column--fixed': props.fixed,
|
|
20243
20277
|
'v-data-table-column--last-fixed': props.lastFixed,
|
|
20244
20278
|
'v-data-table-column--no-padding': props.noPadding,
|
|
20245
20279
|
'v-data-table-column--nowrap': props.nowrap
|
|
20246
20280
|
}, `v-data-table-column--align-${props.align}`]),
|
|
20247
|
-
"style":
|
|
20281
|
+
"style": {
|
|
20248
20282
|
height: convertToUnit(props.height),
|
|
20249
20283
|
width: convertToUnit(props.width),
|
|
20250
20284
|
maxWidth: convertToUnit(props.maxWidth),
|
|
20251
20285
|
left: convertToUnit(props.fixedOffset || null)
|
|
20252
|
-
}
|
|
20286
|
+
}
|
|
20253
20287
|
}, {
|
|
20254
20288
|
default: () => [slots.default?.()]
|
|
20255
20289
|
});
|
|
@@ -20582,6 +20616,11 @@ const VDataTableHeaders = genericComponent()({
|
|
|
20582
20616
|
top: props.sticky || props.fixedHeader ? `calc(var(--v-table-header-height) * ${y})` : undefined
|
|
20583
20617
|
};
|
|
20584
20618
|
}
|
|
20619
|
+
function handleEnterKeyPress(event, column) {
|
|
20620
|
+
if (event.key === 'Enter' && !props.disableSort) {
|
|
20621
|
+
toggleSort(column);
|
|
20622
|
+
}
|
|
20623
|
+
}
|
|
20585
20624
|
function getSortIcon(column) {
|
|
20586
20625
|
const item = sortBy.value.find(item => item.key === column.key);
|
|
20587
20626
|
if (!item) return props.sortAscIcon;
|
|
@@ -20638,7 +20677,9 @@ const VDataTableHeaders = genericComponent()({
|
|
|
20638
20677
|
"nowrap": column.nowrap,
|
|
20639
20678
|
"lastFixed": column.lastFixed,
|
|
20640
20679
|
"noPadding": noPadding
|
|
20641
|
-
}, headerProps
|
|
20680
|
+
}, headerProps, {
|
|
20681
|
+
"onKeydown": event => column.sortable && handleEnterKeyPress(event, column)
|
|
20682
|
+
}), {
|
|
20642
20683
|
default: () => {
|
|
20643
20684
|
const columnSlotName = `header.${column.key}`;
|
|
20644
20685
|
const columnSlotProps = {
|
|
@@ -20774,9 +20815,9 @@ const VDataTableGroupHeaderRow = genericComponent()({
|
|
|
20774
20815
|
});
|
|
20775
20816
|
return () => createElementVNode("tr", {
|
|
20776
20817
|
"class": "v-data-table-group-header-row",
|
|
20777
|
-
"style":
|
|
20818
|
+
"style": {
|
|
20778
20819
|
'--v-data-table-group-header-row-depth': props.item.depth
|
|
20779
|
-
}
|
|
20820
|
+
}
|
|
20780
20821
|
}, [columns.value.map(column => {
|
|
20781
20822
|
if (column.key === 'data-table-group') {
|
|
20782
20823
|
const icon = isGroupOpen(props.item) ? '$expand' : '$next';
|
|
@@ -21124,9 +21165,9 @@ const VTable = genericComponent()({
|
|
|
21124
21165
|
}, {
|
|
21125
21166
|
default: () => [slots.top?.(), slots.default ? createElementVNode("div", {
|
|
21126
21167
|
"class": "v-table__wrapper",
|
|
21127
|
-
"style":
|
|
21168
|
+
"style": {
|
|
21128
21169
|
height: convertToUnit(props.height)
|
|
21129
|
-
}
|
|
21170
|
+
}
|
|
21130
21171
|
}, [createElementVNode("table", null, [slots.default()])]) : slots.wrapper?.(), slots.bottom?.()]
|
|
21131
21172
|
}));
|
|
21132
21173
|
return {};
|
|
@@ -21561,19 +21602,19 @@ const VDataTableVirtual = genericComponent()({
|
|
|
21561
21602
|
"onScrollPassive": handleScroll,
|
|
21562
21603
|
"onScrollend": handleScrollend,
|
|
21563
21604
|
"class": "v-table__wrapper",
|
|
21564
|
-
"style":
|
|
21605
|
+
"style": {
|
|
21565
21606
|
height: convertToUnit(props.height)
|
|
21566
|
-
}
|
|
21607
|
+
}
|
|
21567
21608
|
}, [createElementVNode("table", null, [slots.colgroup?.(slotProps.value), !props.hideDefaultHeader && createElementVNode("thead", {
|
|
21568
21609
|
"key": "thead"
|
|
21569
21610
|
}, [createVNode(VDataTableHeaders, dataTableHeadersProps, slots)]), slots.thead?.(slotProps.value), !props.hideDefaultBody && createElementVNode("tbody", {
|
|
21570
21611
|
"key": "tbody"
|
|
21571
21612
|
}, [createElementVNode("tr", {
|
|
21572
21613
|
"ref": markerRef,
|
|
21573
|
-
"style":
|
|
21614
|
+
"style": {
|
|
21574
21615
|
height: convertToUnit(paddingTop.value),
|
|
21575
21616
|
border: 0
|
|
21576
|
-
}
|
|
21617
|
+
}
|
|
21577
21618
|
}, [createElementVNode("td", {
|
|
21578
21619
|
"colspan": columns.value.length,
|
|
21579
21620
|
"style": {
|
|
@@ -21604,10 +21645,10 @@ const VDataTableVirtual = genericComponent()({
|
|
|
21604
21645
|
}
|
|
21605
21646
|
})
|
|
21606
21647
|
}), slots['body.append']?.(slotProps.value), createElementVNode("tr", {
|
|
21607
|
-
"style":
|
|
21648
|
+
"style": {
|
|
21608
21649
|
height: convertToUnit(paddingBottom.value),
|
|
21609
21650
|
border: 0
|
|
21610
|
-
}
|
|
21651
|
+
}
|
|
21611
21652
|
}, [createElementVNode("td", {
|
|
21612
21653
|
"colspan": columns.value.length,
|
|
21613
21654
|
"style": {
|
|
@@ -22145,10 +22186,10 @@ const VDatePickerControls = genericComponent()({
|
|
|
22145
22186
|
useRender(() => {
|
|
22146
22187
|
// TODO: add slot support and scope defaults
|
|
22147
22188
|
return createElementVNode("div", {
|
|
22148
|
-
"class": ['v-date-picker-controls'],
|
|
22149
|
-
"style":
|
|
22189
|
+
"class": normalizeClass(['v-date-picker-controls']),
|
|
22190
|
+
"style": {
|
|
22150
22191
|
'--v-date-picker-controls-height': convertToUnit(props.controlHeight)
|
|
22151
|
-
}
|
|
22192
|
+
}
|
|
22152
22193
|
}, [createVNode(VBtn, {
|
|
22153
22194
|
"class": "v-date-picker-controls__month-btn",
|
|
22154
22195
|
"data-testid": "month-btn",
|
|
@@ -22491,14 +22532,7 @@ const VDatePickerMonth = genericComponent()({
|
|
|
22491
22532
|
} else {
|
|
22492
22533
|
rangeStop.value = adapter.endOfDay(_value);
|
|
22493
22534
|
}
|
|
22494
|
-
|
|
22495
|
-
const datesInRange = [rangeStart.value];
|
|
22496
|
-
for (let i = 1; i < diff; i++) {
|
|
22497
|
-
const nextDate = adapter.addDays(rangeStart.value, i);
|
|
22498
|
-
datesInRange.push(nextDate);
|
|
22499
|
-
}
|
|
22500
|
-
datesInRange.push(rangeStop.value);
|
|
22501
|
-
model.value = datesInRange;
|
|
22535
|
+
model.value = createDateRange(adapter, rangeStart.value, rangeStop.value);
|
|
22502
22536
|
} else {
|
|
22503
22537
|
rangeStart.value = value;
|
|
22504
22538
|
rangeStop.value = undefined;
|
|
@@ -22533,7 +22567,7 @@ const VDatePickerMonth = genericComponent()({
|
|
|
22533
22567
|
"key": "hide-week-days",
|
|
22534
22568
|
"class": "v-date-picker-month__day"
|
|
22535
22569
|
}, [createTextVNode("\xA0")]), weekNumbers.value.map(week => createElementVNode("div", {
|
|
22536
|
-
"class": ['v-date-picker-month__day', 'v-date-picker-month__day--adjacent']
|
|
22570
|
+
"class": normalizeClass(['v-date-picker-month__day', 'v-date-picker-month__day--adjacent'])
|
|
22537
22571
|
}, [week]))]), createVNode(MaybeTransition, {
|
|
22538
22572
|
"name": transition.value
|
|
22539
22573
|
}, {
|
|
@@ -22542,7 +22576,7 @@ const VDatePickerMonth = genericComponent()({
|
|
|
22542
22576
|
"key": daysInMonth.value[0].date?.toString(),
|
|
22543
22577
|
"class": "v-date-picker-month__days"
|
|
22544
22578
|
}, [!props.hideWeekdays && adapter.getWeekdays(props.firstDayOfWeek).map(weekDay => createElementVNode("div", {
|
|
22545
|
-
"class": ['v-date-picker-month__day', 'v-date-picker-month__weekday']
|
|
22579
|
+
"class": normalizeClass(['v-date-picker-month__day', 'v-date-picker-month__weekday'])
|
|
22546
22580
|
}, [weekDay])), daysInMonth.value.map((item, i) => {
|
|
22547
22581
|
const slotProps = {
|
|
22548
22582
|
props: {
|
|
@@ -22584,7 +22618,8 @@ const makeVDatePickerMonthsProps = propsFactory({
|
|
|
22584
22618
|
min: null,
|
|
22585
22619
|
max: null,
|
|
22586
22620
|
modelValue: Number,
|
|
22587
|
-
year: Number
|
|
22621
|
+
year: Number,
|
|
22622
|
+
allowedMonths: [Array, Function]
|
|
22588
22623
|
}, 'VDatePickerMonths');
|
|
22589
22624
|
const VDatePickerMonths = genericComponent()({
|
|
22590
22625
|
name: 'VDatePickerMonths',
|
|
@@ -22606,7 +22641,7 @@ const VDatePickerMonths = genericComponent()({
|
|
|
22606
22641
|
}
|
|
22607
22642
|
return createRange(12).map(i => {
|
|
22608
22643
|
const text = adapter.format(date, 'monthShort');
|
|
22609
|
-
const isDisabled = !!(props.min && adapter.isAfter(adapter.startOfMonth(adapter.date(props.min)), date) || props.max && adapter.isAfter(date, adapter.startOfMonth(adapter.date(props.max))));
|
|
22644
|
+
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))));
|
|
22610
22645
|
date = adapter.getNextMonth(date);
|
|
22611
22646
|
return {
|
|
22612
22647
|
isDisabled,
|
|
@@ -22618,11 +22653,20 @@ const VDatePickerMonths = genericComponent()({
|
|
|
22618
22653
|
watchEffect(() => {
|
|
22619
22654
|
model.value = model.value ?? adapter.getMonth(adapter.date());
|
|
22620
22655
|
});
|
|
22656
|
+
function isMonthAllowed(month) {
|
|
22657
|
+
if (Array.isArray(props.allowedMonths) && props.allowedMonths.length) {
|
|
22658
|
+
return props.allowedMonths.includes(month);
|
|
22659
|
+
}
|
|
22660
|
+
if (typeof props.allowedMonths === 'function') {
|
|
22661
|
+
return props.allowedMonths(month);
|
|
22662
|
+
}
|
|
22663
|
+
return true;
|
|
22664
|
+
}
|
|
22621
22665
|
useRender(() => createElementVNode("div", {
|
|
22622
22666
|
"class": "v-date-picker-months",
|
|
22623
|
-
"style":
|
|
22667
|
+
"style": {
|
|
22624
22668
|
height: convertToUnit(props.height)
|
|
22625
|
-
}
|
|
22669
|
+
}
|
|
22626
22670
|
}, [createElementVNode("div", {
|
|
22627
22671
|
"class": "v-date-picker-months__content"
|
|
22628
22672
|
}, [months.value.map((month, i) => {
|
|
@@ -22663,7 +22707,8 @@ const makeVDatePickerYearsProps = propsFactory({
|
|
|
22663
22707
|
height: [String, Number],
|
|
22664
22708
|
min: null,
|
|
22665
22709
|
max: null,
|
|
22666
|
-
modelValue: Number
|
|
22710
|
+
modelValue: Number,
|
|
22711
|
+
allowedYears: [Array, Function]
|
|
22667
22712
|
}, 'VDatePickerYears');
|
|
22668
22713
|
const VDatePickerYears = genericComponent()({
|
|
22669
22714
|
name: 'VDatePickerYears',
|
|
@@ -22695,7 +22740,8 @@ const VDatePickerYears = genericComponent()({
|
|
|
22695
22740
|
date = adapter.setYear(date, adapter.getYear(date) + 1);
|
|
22696
22741
|
return {
|
|
22697
22742
|
text,
|
|
22698
|
-
value: i
|
|
22743
|
+
value: i,
|
|
22744
|
+
isDisabled: !isYearAllowed(i)
|
|
22699
22745
|
};
|
|
22700
22746
|
});
|
|
22701
22747
|
});
|
|
@@ -22709,11 +22755,20 @@ const VDatePickerYears = genericComponent()({
|
|
|
22709
22755
|
block: 'center'
|
|
22710
22756
|
});
|
|
22711
22757
|
});
|
|
22758
|
+
function isYearAllowed(year) {
|
|
22759
|
+
if (Array.isArray(props.allowedYears) && props.allowedYears.length) {
|
|
22760
|
+
return props.allowedYears.includes(year);
|
|
22761
|
+
}
|
|
22762
|
+
if (typeof props.allowedYears === 'function') {
|
|
22763
|
+
return props.allowedYears(year);
|
|
22764
|
+
}
|
|
22765
|
+
return true;
|
|
22766
|
+
}
|
|
22712
22767
|
useRender(() => createElementVNode("div", {
|
|
22713
22768
|
"class": "v-date-picker-years",
|
|
22714
|
-
"style":
|
|
22769
|
+
"style": {
|
|
22715
22770
|
height: convertToUnit(props.height)
|
|
22716
|
-
}
|
|
22771
|
+
}
|
|
22717
22772
|
}, [createElementVNode("div", {
|
|
22718
22773
|
"class": "v-date-picker-years__content"
|
|
22719
22774
|
}, [years.value.map((year, i) => {
|
|
@@ -22723,6 +22778,7 @@ const VDatePickerYears = genericComponent()({
|
|
|
22723
22778
|
color: model.value === year.value ? props.color : undefined,
|
|
22724
22779
|
rounded: true,
|
|
22725
22780
|
text: year.text,
|
|
22781
|
+
disabled: year.isDisabled,
|
|
22726
22782
|
variant: model.value === year.value ? 'flat' : 'text',
|
|
22727
22783
|
onClick: () => {
|
|
22728
22784
|
if (model.value === year.value) {
|
|
@@ -22872,6 +22928,41 @@ const VDatePicker = genericComponent()({
|
|
|
22872
22928
|
}
|
|
22873
22929
|
return targets;
|
|
22874
22930
|
});
|
|
22931
|
+
function isAllowedInRange(start, end) {
|
|
22932
|
+
const allowedDates = props.allowedDates;
|
|
22933
|
+
if (typeof allowedDates !== 'function') return true;
|
|
22934
|
+
const days = adapter.getDiff(end, start, 'days');
|
|
22935
|
+
for (let i = 0; i < days; i++) {
|
|
22936
|
+
if (allowedDates(adapter.addDays(start, i))) return true;
|
|
22937
|
+
}
|
|
22938
|
+
return false;
|
|
22939
|
+
}
|
|
22940
|
+
function allowedYears(year) {
|
|
22941
|
+
if (typeof props.allowedDates === 'function') {
|
|
22942
|
+
const startOfYear = adapter.parseISO(`${year}-01-01`);
|
|
22943
|
+
return isAllowedInRange(startOfYear, adapter.endOfYear(startOfYear));
|
|
22944
|
+
}
|
|
22945
|
+
if (Array.isArray(props.allowedDates) && props.allowedDates.length) {
|
|
22946
|
+
for (const date of props.allowedDates) {
|
|
22947
|
+
if (adapter.getYear(adapter.date(date)) === year) return true;
|
|
22948
|
+
}
|
|
22949
|
+
return false;
|
|
22950
|
+
}
|
|
22951
|
+
return true;
|
|
22952
|
+
}
|
|
22953
|
+
function allowedMonths(month) {
|
|
22954
|
+
if (typeof props.allowedDates === 'function') {
|
|
22955
|
+
const startOfMonth = adapter.parseISO(`${year.value}-${month + 1}-01`);
|
|
22956
|
+
return isAllowedInRange(startOfMonth, adapter.endOfMonth(startOfMonth));
|
|
22957
|
+
}
|
|
22958
|
+
if (Array.isArray(props.allowedDates) && props.allowedDates.length) {
|
|
22959
|
+
for (const date of props.allowedDates) {
|
|
22960
|
+
if (adapter.getYear(adapter.date(date)) === year.value && adapter.getMonth(adapter.date(date)) === month) return true;
|
|
22961
|
+
}
|
|
22962
|
+
return false;
|
|
22963
|
+
}
|
|
22964
|
+
return true;
|
|
22965
|
+
}
|
|
22875
22966
|
|
|
22876
22967
|
// function onClickAppend () {
|
|
22877
22968
|
// inputMode.value = inputMode.value === 'calendar' ? 'keyboard' : 'calendar'
|
|
@@ -22987,14 +23078,16 @@ const VDatePicker = genericComponent()({
|
|
|
22987
23078
|
"onUpdate:modelValue": [$event => month.value = $event, onUpdateMonth],
|
|
22988
23079
|
"min": minDate.value,
|
|
22989
23080
|
"max": maxDate.value,
|
|
22990
|
-
"year": year.value
|
|
23081
|
+
"year": year.value,
|
|
23082
|
+
"allowedMonths": allowedMonths
|
|
22991
23083
|
}), null) : viewMode.value === 'year' ? createVNode(VDatePickerYears, mergeProps({
|
|
22992
23084
|
"key": "date-picker-years"
|
|
22993
23085
|
}, datePickerYearsProps, {
|
|
22994
23086
|
"modelValue": year.value,
|
|
22995
23087
|
"onUpdate:modelValue": [$event => year.value = $event, onUpdateYear],
|
|
22996
23088
|
"min": minDate.value,
|
|
22997
|
-
"max": maxDate.value
|
|
23089
|
+
"max": maxDate.value,
|
|
23090
|
+
"allowedYears": allowedYears
|
|
22998
23091
|
}), null) : createVNode(VDatePickerMonth, mergeProps({
|
|
22999
23092
|
"key": "date-picker-month"
|
|
23000
23093
|
}, datePickerMonthProps, {
|
|
@@ -23119,9 +23212,9 @@ const VEmptyState = genericComponent()({
|
|
|
23119
23212
|
}, [slots.title?.() ?? props.title]), hasText && createElementVNode("div", {
|
|
23120
23213
|
"key": "text",
|
|
23121
23214
|
"class": "v-empty-state__text",
|
|
23122
|
-
"style":
|
|
23215
|
+
"style": {
|
|
23123
23216
|
maxWidth: convertToUnit(props.textWidth)
|
|
23124
|
-
}
|
|
23217
|
+
}
|
|
23125
23218
|
}, [slots.text?.() ?? props.text]), slots.default && createElementVNode("div", {
|
|
23126
23219
|
"key": "content",
|
|
23127
23220
|
"class": "v-empty-state__content"
|
|
@@ -23526,6 +23619,56 @@ const VFab = genericComponent()({
|
|
|
23526
23619
|
|
|
23527
23620
|
// Types
|
|
23528
23621
|
|
|
23622
|
+
function useFileDrop() {
|
|
23623
|
+
function hasFilesOrFolders(e) {
|
|
23624
|
+
const entries = [...(e.dataTransfer?.items ?? [])].filter(x => x.kind === 'file').map(x => x.webkitGetAsEntry()).filter(Boolean);
|
|
23625
|
+
return entries.length > 0 || [...(e.dataTransfer?.files ?? [])].length > 0;
|
|
23626
|
+
}
|
|
23627
|
+
async function handleDrop(e) {
|
|
23628
|
+
const result = [];
|
|
23629
|
+
const entries = [...(e.dataTransfer?.items ?? [])].filter(x => x.kind === 'file').map(x => x.webkitGetAsEntry()).filter(Boolean);
|
|
23630
|
+
if (entries.length) {
|
|
23631
|
+
for (const entry of entries) {
|
|
23632
|
+
const files = await traverseFileTree(entry, appendIfDirectory('.', entry));
|
|
23633
|
+
result.push(...files.map(x => x.file));
|
|
23634
|
+
}
|
|
23635
|
+
} else {
|
|
23636
|
+
result.push(...[...(e.dataTransfer?.files ?? [])]);
|
|
23637
|
+
}
|
|
23638
|
+
return result;
|
|
23639
|
+
}
|
|
23640
|
+
return {
|
|
23641
|
+
handleDrop,
|
|
23642
|
+
hasFilesOrFolders
|
|
23643
|
+
};
|
|
23644
|
+
}
|
|
23645
|
+
function traverseFileTree(item) {
|
|
23646
|
+
let path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
23647
|
+
return new Promise((resolve, reject) => {
|
|
23648
|
+
if (item.isFile) {
|
|
23649
|
+
const fileEntry = item;
|
|
23650
|
+
fileEntry.file(file => resolve([{
|
|
23651
|
+
file,
|
|
23652
|
+
path
|
|
23653
|
+
}]), reject);
|
|
23654
|
+
} else if (item.isDirectory) {
|
|
23655
|
+
const directoryReader = item.createReader();
|
|
23656
|
+
directoryReader.readEntries(async entries => {
|
|
23657
|
+
const files = [];
|
|
23658
|
+
for (const entry of entries) {
|
|
23659
|
+
files.push(...(await traverseFileTree(entry, appendIfDirectory(path, entry))));
|
|
23660
|
+
}
|
|
23661
|
+
resolve(files);
|
|
23662
|
+
});
|
|
23663
|
+
}
|
|
23664
|
+
});
|
|
23665
|
+
}
|
|
23666
|
+
function appendIfDirectory(path, item) {
|
|
23667
|
+
return item.isDirectory ? `${path}/${item.name}` : path;
|
|
23668
|
+
}
|
|
23669
|
+
|
|
23670
|
+
// Types
|
|
23671
|
+
|
|
23529
23672
|
const makeVFileInputProps = propsFactory({
|
|
23530
23673
|
chips: Boolean,
|
|
23531
23674
|
counter: Boolean,
|
|
@@ -23610,6 +23753,10 @@ const VFileInput = genericComponent()({
|
|
|
23610
23753
|
const isActive = toRef(() => isFocused.value || props.active);
|
|
23611
23754
|
const isPlainOrUnderlined = computed(() => ['plain', 'underlined'].includes(props.variant));
|
|
23612
23755
|
const isDragging = shallowRef(false);
|
|
23756
|
+
const {
|
|
23757
|
+
handleDrop,
|
|
23758
|
+
hasFilesOrFolders
|
|
23759
|
+
} = useFileDrop();
|
|
23613
23760
|
function onFocus() {
|
|
23614
23761
|
if (inputRef.value !== document.activeElement) {
|
|
23615
23762
|
inputRef.value?.focus();
|
|
@@ -23643,13 +23790,13 @@ const VFileInput = genericComponent()({
|
|
|
23643
23790
|
e.preventDefault();
|
|
23644
23791
|
isDragging.value = false;
|
|
23645
23792
|
}
|
|
23646
|
-
function onDrop(e) {
|
|
23793
|
+
async function onDrop(e) {
|
|
23647
23794
|
e.preventDefault();
|
|
23648
23795
|
e.stopImmediatePropagation();
|
|
23649
23796
|
isDragging.value = false;
|
|
23650
|
-
if (!
|
|
23797
|
+
if (!inputRef.value || !hasFilesOrFolders(e)) return;
|
|
23651
23798
|
const dataTransfer = new DataTransfer();
|
|
23652
|
-
for (const file of e
|
|
23799
|
+
for (const file of await handleDrop(e)) {
|
|
23653
23800
|
dataTransfer.items.add(file);
|
|
23654
23801
|
}
|
|
23655
23802
|
inputRef.value.files = dataTransfer.files;
|
|
@@ -23986,9 +24133,9 @@ const VInfiniteScrollIntersect = defineComponent({
|
|
|
23986
24133
|
});
|
|
23987
24134
|
useRender(() => createElementVNode("div", {
|
|
23988
24135
|
"class": "v-infinite-scroll-intersect",
|
|
23989
|
-
"style":
|
|
24136
|
+
"style": {
|
|
23990
24137
|
'--v-infinite-margin-size': props.rootMargin
|
|
23991
|
-
}
|
|
24138
|
+
},
|
|
23992
24139
|
"ref": intersectionRef
|
|
23993
24140
|
}, [createTextVNode("\xA0")]));
|
|
23994
24141
|
return {};
|
|
@@ -25080,6 +25227,7 @@ const VNumberInput = genericComponent()({
|
|
|
25080
25227
|
...makeVNumberInputProps()
|
|
25081
25228
|
},
|
|
25082
25229
|
emits: {
|
|
25230
|
+
'update:focused': val => true,
|
|
25083
25231
|
'update:modelValue': val => true
|
|
25084
25232
|
},
|
|
25085
25233
|
setup(props, _ref) {
|
|
@@ -25095,11 +25243,7 @@ const VNumberInput = genericComponent()({
|
|
|
25095
25243
|
});
|
|
25096
25244
|
const form = useForm(props);
|
|
25097
25245
|
const controlsDisabled = computed(() => form.isDisabled.value || form.isReadonly.value);
|
|
25098
|
-
const
|
|
25099
|
-
isFocused,
|
|
25100
|
-
focus,
|
|
25101
|
-
blur
|
|
25102
|
-
} = useFocus(props);
|
|
25246
|
+
const isFocused = shallowRef(props.focused);
|
|
25103
25247
|
function correctPrecision(val) {
|
|
25104
25248
|
let precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : props.precision;
|
|
25105
25249
|
const fixed = precision == null ? String(val) : val.toFixed(precision);
|
|
@@ -25144,22 +25288,18 @@ const VNumberInput = genericComponent()({
|
|
|
25144
25288
|
const controlNodeDefaultHeight = toRef(() => controlVariant.value === 'stacked' ? 'auto' : '100%');
|
|
25145
25289
|
const incrementSlotProps = {
|
|
25146
25290
|
props: {
|
|
25147
|
-
style: {
|
|
25148
|
-
touchAction: 'none'
|
|
25149
|
-
},
|
|
25150
25291
|
onClick: onControlClick,
|
|
25151
25292
|
onPointerup: onControlMouseup,
|
|
25152
|
-
onPointerdown: onUpControlMousedown
|
|
25293
|
+
onPointerdown: onUpControlMousedown,
|
|
25294
|
+
onPointercancel: onControlPointerCancel
|
|
25153
25295
|
}
|
|
25154
25296
|
};
|
|
25155
25297
|
const decrementSlotProps = {
|
|
25156
25298
|
props: {
|
|
25157
|
-
style: {
|
|
25158
|
-
touchAction: 'none'
|
|
25159
|
-
},
|
|
25160
25299
|
onClick: onControlClick,
|
|
25161
25300
|
onPointerup: onControlMouseup,
|
|
25162
|
-
onPointerdown: onDownControlMousedown
|
|
25301
|
+
onPointerdown: onDownControlMousedown,
|
|
25302
|
+
onPointercancel: onControlPointerCancel
|
|
25163
25303
|
}
|
|
25164
25304
|
};
|
|
25165
25305
|
watch(() => props.precision, () => formatInputValue());
|
|
@@ -25256,6 +25396,11 @@ const VNumberInput = genericComponent()({
|
|
|
25256
25396
|
e.stopPropagation();
|
|
25257
25397
|
holdStart('down');
|
|
25258
25398
|
}
|
|
25399
|
+
function onControlPointerCancel(e) {
|
|
25400
|
+
const el = e.currentTarget;
|
|
25401
|
+
el?.releasePointerCapture(e.pointerId);
|
|
25402
|
+
holdStop();
|
|
25403
|
+
}
|
|
25259
25404
|
function clampModel() {
|
|
25260
25405
|
if (controlsDisabled.value) return;
|
|
25261
25406
|
if (!vTextFieldRef.value) return;
|
|
@@ -25283,11 +25428,9 @@ const VNumberInput = genericComponent()({
|
|
|
25283
25428
|
inputText.value = model.value.toString();
|
|
25284
25429
|
}
|
|
25285
25430
|
function onFocus() {
|
|
25286
|
-
focus();
|
|
25287
25431
|
trimDecimalZeros();
|
|
25288
25432
|
}
|
|
25289
25433
|
function onBlur() {
|
|
25290
|
-
blur();
|
|
25291
25434
|
clampModel();
|
|
25292
25435
|
}
|
|
25293
25436
|
useRender(() => {
|
|
@@ -25307,8 +25450,8 @@ const VNumberInput = genericComponent()({
|
|
|
25307
25450
|
"onClick": onControlClick,
|
|
25308
25451
|
"onPointerdown": onUpControlMousedown,
|
|
25309
25452
|
"onPointerup": onControlMouseup,
|
|
25453
|
+
"onPointercancel": onControlPointerCancel,
|
|
25310
25454
|
"size": controlNodeSize.value,
|
|
25311
|
-
"style": "touch-action: none",
|
|
25312
25455
|
"tabindex": "-1"
|
|
25313
25456
|
}, null) : createVNode(VDefaultsProvider, {
|
|
25314
25457
|
"key": "increment-defaults",
|
|
@@ -25337,8 +25480,8 @@ const VNumberInput = genericComponent()({
|
|
|
25337
25480
|
"onClick": onControlClick,
|
|
25338
25481
|
"onPointerdown": onDownControlMousedown,
|
|
25339
25482
|
"onPointerup": onControlMouseup,
|
|
25483
|
+
"onPointercancel": onControlPointerCancel,
|
|
25340
25484
|
"size": controlNodeSize.value,
|
|
25341
|
-
"style": "touch-action: none",
|
|
25342
25485
|
"tabindex": "-1"
|
|
25343
25486
|
}, null) : createVNode(VDefaultsProvider, {
|
|
25344
25487
|
"key": "decrement-defaults",
|
|
@@ -25380,9 +25523,12 @@ const VNumberInput = genericComponent()({
|
|
|
25380
25523
|
}, null)]) : props.reverse && controlVariant.value !== 'hidden' ? createElementVNode(Fragment, null, [controlNode(), dividerNode()]) : undefined;
|
|
25381
25524
|
const hasPrependInner = slots['prepend-inner'] || prependInnerControl;
|
|
25382
25525
|
return createVNode(VTextField, mergeProps({
|
|
25383
|
-
"ref": vTextFieldRef
|
|
25526
|
+
"ref": vTextFieldRef
|
|
25527
|
+
}, textFieldProps, {
|
|
25384
25528
|
"modelValue": inputText.value,
|
|
25385
25529
|
"onUpdate:modelValue": $event => inputText.value = $event,
|
|
25530
|
+
"focused": isFocused.value,
|
|
25531
|
+
"onUpdate:focused": $event => isFocused.value = $event,
|
|
25386
25532
|
"validationValue": model.value,
|
|
25387
25533
|
"onBeforeinput": onBeforeinput,
|
|
25388
25534
|
"onFocus": onFocus,
|
|
@@ -25395,8 +25541,7 @@ const VNumberInput = genericComponent()({
|
|
|
25395
25541
|
'v-number-input--reverse': props.reverse,
|
|
25396
25542
|
'v-number-input--split': controlVariant.value === 'split',
|
|
25397
25543
|
'v-number-input--stacked': controlVariant.value === 'stacked'
|
|
25398
|
-
}, props.class]
|
|
25399
|
-
}, textFieldProps, {
|
|
25544
|
+
}, props.class],
|
|
25400
25545
|
"style": props.style,
|
|
25401
25546
|
"inputmode": "decimal"
|
|
25402
25547
|
}), {
|
|
@@ -25531,7 +25676,7 @@ const VOtpInput = genericComponent()({
|
|
|
25531
25676
|
function onPaste(index, e) {
|
|
25532
25677
|
e.preventDefault();
|
|
25533
25678
|
e.stopPropagation();
|
|
25534
|
-
const clipboardText = e?.clipboardData?.getData('Text').slice(0, length.value) ?? '';
|
|
25679
|
+
const clipboardText = e?.clipboardData?.getData('Text').trim().slice(0, length.value) ?? '';
|
|
25535
25680
|
if (isValidNumber(clipboardText)) return;
|
|
25536
25681
|
model.value = clipboardText.split('');
|
|
25537
25682
|
inputRef.value?.[index].blur();
|
|
@@ -25563,7 +25708,10 @@ const VOtpInput = genericComponent()({
|
|
|
25563
25708
|
scoped: true
|
|
25564
25709
|
});
|
|
25565
25710
|
watch(model, val => {
|
|
25566
|
-
if (val.length === length.value)
|
|
25711
|
+
if (val.length === length.value) {
|
|
25712
|
+
focusIndex.value = length.value - 1;
|
|
25713
|
+
emit('finish', val.join(''));
|
|
25714
|
+
}
|
|
25567
25715
|
}, {
|
|
25568
25716
|
deep: true
|
|
25569
25717
|
});
|
|
@@ -25598,7 +25746,7 @@ const VOtpInput = genericComponent()({
|
|
|
25598
25746
|
"aria-label": t(props.label, i + 1),
|
|
25599
25747
|
"autofocus": i === 0 && props.autofocus,
|
|
25600
25748
|
"autocomplete": "one-time-code",
|
|
25601
|
-
"class": ['v-otp-input__field'],
|
|
25749
|
+
"class": normalizeClass(['v-otp-input__field']),
|
|
25602
25750
|
"disabled": props.disabled,
|
|
25603
25751
|
"inputmode": props.type === 'number' ? 'numeric' : 'text',
|
|
25604
25752
|
"min": props.type === 'number' ? 0 : undefined,
|
|
@@ -29316,7 +29464,7 @@ function createVuetify$1() {
|
|
|
29316
29464
|
};
|
|
29317
29465
|
});
|
|
29318
29466
|
}
|
|
29319
|
-
const version$1 = "3.8.
|
|
29467
|
+
const version$1 = "3.8.9";
|
|
29320
29468
|
createVuetify$1.version = version$1;
|
|
29321
29469
|
|
|
29322
29470
|
// Vue's inject() can only be used in setup
|
|
@@ -29341,7 +29489,7 @@ const createVuetify = function () {
|
|
|
29341
29489
|
...options
|
|
29342
29490
|
});
|
|
29343
29491
|
};
|
|
29344
|
-
const version = "3.8.
|
|
29492
|
+
const version = "3.8.9";
|
|
29345
29493
|
createVuetify.version = version;
|
|
29346
29494
|
|
|
29347
29495
|
export { index as blueprints, components, createVuetify, directives, useDate, useDefaults, useDisplay, useGoTo, useLayout, useLocale, useRtl, useTheme, version };
|