vuetify 3.7.15 → 3.7.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/json/attributes.json +3529 -3525
- package/dist/json/importMap-labs.json +12 -12
- package/dist/json/importMap.json +164 -164
- package/dist/json/tags.json +3 -2
- package/dist/json/web-types.json +6568 -6536
- package/dist/vuetify-labs.css +3153 -3152
- package/dist/vuetify-labs.d.ts +438 -200
- package/dist/vuetify-labs.esm.js +165 -141
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +164 -140
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +3426 -3425
- package/dist/vuetify.d.ts +387 -207
- package/dist/vuetify.esm.js +110 -83
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +109 -82
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +471 -470
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAppBar/index.d.mts +15 -6
- package/lib/components/VAutocomplete/index.d.mts +23 -8
- package/lib/components/VBadge/VBadge.mjs +2 -2
- package/lib/components/VBadge/VBadge.mjs.map +1 -1
- package/lib/components/VBtn/VBtn.mjs +6 -3
- package/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/lib/components/VBtn/index.d.mts +15 -6
- package/lib/components/VCard/VCard.mjs +12 -3
- package/lib/components/VCard/VCard.mjs.map +1 -1
- package/lib/components/VCard/VCardItem.mjs +11 -4
- package/lib/components/VCard/VCardItem.mjs.map +1 -1
- package/lib/components/VCard/index.d.mts +75 -30
- package/lib/components/VCarousel/VCarousel.mjs +1 -1
- package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
- package/lib/components/VChip/VChip.mjs +6 -3
- package/lib/components/VChip/VChip.mjs.map +1 -1
- package/lib/components/VChip/index.d.mts +15 -6
- package/lib/components/VCombobox/index.d.mts +23 -8
- package/lib/components/VDataIterator/index.d.mts +2 -2
- package/lib/components/VDataTable/composables/headers.mjs +3 -1
- package/lib/components/VDataTable/composables/headers.mjs.map +1 -1
- package/lib/components/VDataTable/composables/paginate.mjs +2 -2
- package/lib/components/VDataTable/composables/paginate.mjs.map +1 -1
- package/lib/components/VDataTable/index.d.mts +34 -34
- package/lib/components/VDataTable/types.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerControls.mjs +5 -5
- package/lib/components/VDatePicker/VDatePickerControls.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonth.mjs +12 -21
- package/lib/components/VDatePicker/VDatePickerMonth.mjs.map +1 -1
- package/lib/components/VDatePicker/index.d.mts +3 -3
- package/lib/components/VDialog/__test__/VDialog.spec.browser.mjs +50 -0
- package/lib/components/VDialog/__test__/VDialog.spec.browser.mjs.map +1 -0
- package/lib/components/VDialog/index.d.mts +21 -6
- package/lib/components/VFab/index.d.mts +15 -6
- package/lib/components/VField/VField.mjs +1 -6
- package/lib/components/VField/VField.mjs.map +1 -1
- package/lib/components/VFileInput/VFileInput.mjs +2 -2
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VList/VListItem.mjs +11 -5
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/index.d.mts +32 -14
- package/lib/components/VMenu/index.d.mts +21 -6
- package/lib/components/VOverlay/VOverlay.mjs +10 -1
- package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/lib/components/VOverlay/index.d.mts +6 -0
- package/lib/components/VPagination/VPagination.mjs +3 -3
- package/lib/components/VPagination/VPagination.mjs.map +1 -1
- package/lib/components/VParallax/VParallax.mjs +1 -1
- package/lib/components/VParallax/VParallax.mjs.map +1 -1
- package/lib/components/VRating/VRating.mjs +1 -1
- package/lib/components/VRating/VRating.mjs.map +1 -1
- package/lib/components/VSelect/index.d.mts +23 -8
- package/lib/components/VSlider/slider.mjs +1 -1
- package/lib/components/VSlider/slider.mjs.map +1 -1
- package/lib/components/VSnackbar/index.d.mts +21 -6
- package/lib/components/VSparkline/VBarline.mjs +1 -1
- package/lib/components/VSparkline/VBarline.mjs.map +1 -1
- package/lib/components/VTabs/index.d.mts +39 -24
- package/lib/components/VTextField/VTextField.mjs +2 -2
- package/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/lib/components/VTextarea/VTextarea.mjs +4 -4
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VToolbar/VToolbar.css +1 -0
- package/lib/components/VToolbar/VToolbar.sass +1 -0
- package/lib/components/VTooltip/index.d.mts +21 -6
- package/lib/components/index.d.mts +333 -153
- package/lib/composables/stack.mjs +2 -2
- package/lib/composables/stack.mjs.map +1 -1
- package/lib/composables/theme.mjs +1 -1
- package/lib/composables/theme.mjs.map +1 -1
- package/lib/composables/validation.mjs +2 -2
- package/lib/composables/validation.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.mts +54 -54
- package/lib/labs/VDateInput/VDateInput.mjs +4 -3
- package/lib/labs/VDateInput/VDateInput.mjs.map +1 -1
- package/lib/labs/VDateInput/index.d.mts +10 -10
- package/lib/labs/VFileUpload/VFileUpload.mjs +3 -2
- package/lib/labs/VFileUpload/VFileUpload.mjs.map +1 -1
- package/lib/labs/VFileUpload/index.d.mts +32 -14
- package/lib/labs/VNumberInput/VNumberInput.mjs +5 -5
- package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
- package/lib/labs/VSnackbarQueue/index.d.mts +21 -6
- package/lib/labs/VTimePicker/VTimePicker.mjs +30 -31
- package/lib/labs/VTimePicker/VTimePicker.mjs.map +1 -1
- package/lib/labs/VTimePicker/VTimePickerControls.mjs +14 -13
- package/lib/labs/VTimePicker/VTimePickerControls.mjs.map +1 -1
- package/lib/labs/VTimePicker/index.d.mts +35 -13
- package/lib/labs/VTimePicker/shared.mjs +2 -0
- package/lib/labs/VTimePicker/shared.mjs.map +1 -0
- package/lib/labs/VTreeview/index.d.mts +32 -14
- package/lib/labs/components.d.mts +128 -55
- package/lib/locale/adapters/vuetify.mjs +1 -1
- package/lib/locale/adapters/vuetify.mjs.map +1 -1
- package/lib/util/animation.mjs +8 -8
- package/lib/util/animation.mjs.map +1 -1
- package/lib/util/helpers.mjs +6 -4
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +2 -2
- package/lib/components/VDialog/__test__/VDialog.spec.cy.mjs +0 -39
- package/lib/components/VDialog/__test__/VDialog.spec.cy.mjs.map +0 -1
- package/lib/labs/VTimePicker/SelectingTimes.mjs +0 -10
- package/lib/labs/VTimePicker/SelectingTimes.mjs.map +0 -1
package/dist/vuetify-labs.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.7.
|
|
2
|
+
* Vuetify v3.7.17
|
|
3
3
|
* Forged by John Leider
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { shallowRef, reactive, computed, watchEffect, toRefs, capitalize, unref, Fragment, isVNode, Comment, warn, getCurrentInstance as getCurrentInstance$1, ref, provide, inject as inject$1, defineComponent as defineComponent$1, h, camelize, onBeforeUnmount, watch, readonly, onMounted, onDeactivated, onActivated, onScopeDispose, effectScope, toRaw, createVNode, TransitionGroup, Transition, mergeProps, isRef, toRef, onBeforeMount, nextTick, withDirectives, resolveDirective, vShow, onUpdated, Text, resolveDynamicComponent, markRaw, Teleport, cloneVNode, createTextVNode, onUnmounted, onBeforeUpdate, withModifiers,
|
|
7
|
+
import { shallowRef, reactive, computed, watchEffect, toRefs, capitalize, unref, Fragment, isVNode, Comment, warn, getCurrentInstance as getCurrentInstance$1, ref, provide, inject as inject$1, defineComponent as defineComponent$1, h, camelize, onBeforeUnmount, watch, readonly, onMounted, onDeactivated, onActivated, onScopeDispose, effectScope, toRaw, createVNode, TransitionGroup, Transition, mergeProps, isRef, toRef, onBeforeMount, nextTick, withDirectives, resolveDirective, vShow, onUpdated, Text, resolveDynamicComponent, toDisplayString, markRaw, Teleport, cloneVNode, createTextVNode, onUnmounted, onBeforeUpdate, withModifiers, vModelText, resolveComponent, render } from 'vue';
|
|
8
8
|
|
|
9
9
|
// Types
|
|
10
10
|
// eslint-disable-line vue/prefer-import-from-vue
|
|
@@ -151,12 +151,14 @@ function convertToUnit(str) {
|
|
|
151
151
|
let unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'px';
|
|
152
152
|
if (str == null || str === '') {
|
|
153
153
|
return undefined;
|
|
154
|
-
}
|
|
154
|
+
}
|
|
155
|
+
const num = Number(str);
|
|
156
|
+
if (isNaN(num)) {
|
|
155
157
|
return String(str);
|
|
156
|
-
} else if (!isFinite(
|
|
158
|
+
} else if (!isFinite(num)) {
|
|
157
159
|
return undefined;
|
|
158
160
|
} else {
|
|
159
|
-
return `${
|
|
161
|
+
return `${num}${unit}`;
|
|
160
162
|
}
|
|
161
163
|
}
|
|
162
164
|
function isObject(obj) {
|
|
@@ -690,16 +692,16 @@ function nullifyTransforms(el) {
|
|
|
690
692
|
let ta, sx, sy, dx, dy;
|
|
691
693
|
if (tx.startsWith('matrix3d(')) {
|
|
692
694
|
ta = tx.slice(9, -1).split(/, /);
|
|
693
|
-
sx =
|
|
694
|
-
sy =
|
|
695
|
-
dx =
|
|
696
|
-
dy =
|
|
695
|
+
sx = Number(ta[0]);
|
|
696
|
+
sy = Number(ta[5]);
|
|
697
|
+
dx = Number(ta[12]);
|
|
698
|
+
dy = Number(ta[13]);
|
|
697
699
|
} else if (tx.startsWith('matrix(')) {
|
|
698
700
|
ta = tx.slice(7, -1).split(/, /);
|
|
699
|
-
sx =
|
|
700
|
-
sy =
|
|
701
|
-
dx =
|
|
702
|
-
dy =
|
|
701
|
+
sx = Number(ta[0]);
|
|
702
|
+
sy = Number(ta[3]);
|
|
703
|
+
dx = Number(ta[4]);
|
|
704
|
+
dy = Number(ta[5]);
|
|
703
705
|
} else {
|
|
704
706
|
return new Box(rect);
|
|
705
707
|
}
|
|
@@ -2075,7 +2077,7 @@ var en = {
|
|
|
2075
2077
|
const LANG_PREFIX = '$vuetify.';
|
|
2076
2078
|
const replace = (str, params) => {
|
|
2077
2079
|
return str.replace(/\{(\d+)\}/g, (match, index) => {
|
|
2078
|
-
return String(params[
|
|
2080
|
+
return String(params[Number(index)]);
|
|
2079
2081
|
});
|
|
2080
2082
|
};
|
|
2081
2083
|
const createTranslateFunction = (current, fallback, messages) => {
|
|
@@ -2445,7 +2447,7 @@ function createTheme(options) {
|
|
|
2445
2447
|
function getHead() {
|
|
2446
2448
|
return {
|
|
2447
2449
|
style: [{
|
|
2448
|
-
|
|
2450
|
+
textContent: styles.value,
|
|
2449
2451
|
id: 'vuetify-theme-stylesheet',
|
|
2450
2452
|
nonce: parsedOptions.cspNonce || false
|
|
2451
2453
|
}]
|
|
@@ -5572,7 +5574,10 @@ const makeVBtnProps = propsFactory({
|
|
|
5572
5574
|
type: [Boolean, Object],
|
|
5573
5575
|
default: true
|
|
5574
5576
|
},
|
|
5575
|
-
text:
|
|
5577
|
+
text: {
|
|
5578
|
+
type: [String, Number, Boolean],
|
|
5579
|
+
default: undefined
|
|
5580
|
+
},
|
|
5576
5581
|
...makeBorderProps(),
|
|
5577
5582
|
...makeComponentProps(),
|
|
5578
5583
|
...makeDensityProps(),
|
|
@@ -5728,7 +5733,7 @@ const VBtn = genericComponent()({
|
|
|
5728
5733
|
}
|
|
5729
5734
|
}
|
|
5730
5735
|
}, {
|
|
5731
|
-
default: () => [slots.default?.() ?? props.text]
|
|
5736
|
+
default: () => [slots.default?.() ?? toDisplayString(props.text)]
|
|
5732
5737
|
})]), !props.icon && hasAppend && createVNode("span", {
|
|
5733
5738
|
"key": "append",
|
|
5734
5739
|
"class": "v-btn__append"
|
|
@@ -6736,7 +6741,7 @@ function useValidation(props) {
|
|
|
6736
6741
|
const isPristine = shallowRef(true);
|
|
6737
6742
|
const isDirty = computed(() => !!(wrapInArray(model.value === '' ? null : model.value).length || wrapInArray(validationModel.value === '' ? null : validationModel.value).length));
|
|
6738
6743
|
const errorMessages = computed(() => {
|
|
6739
|
-
return props.errorMessages?.length ? wrapInArray(props.errorMessages).concat(internalErrorMessages.value).slice(0, Math.max(0,
|
|
6744
|
+
return props.errorMessages?.length ? wrapInArray(props.errorMessages).concat(internalErrorMessages.value).slice(0, Math.max(0, Number(props.maxErrors))) : internalErrorMessages.value;
|
|
6740
6745
|
});
|
|
6741
6746
|
const validateOn = computed(() => {
|
|
6742
6747
|
let value = (props.validateOn ?? form.validateOn?.value) || 'input';
|
|
@@ -6827,7 +6832,7 @@ function useValidation(props) {
|
|
|
6827
6832
|
const results = [];
|
|
6828
6833
|
isValidating.value = true;
|
|
6829
6834
|
for (const rule of props.rules) {
|
|
6830
|
-
if (results.length >=
|
|
6835
|
+
if (results.length >= Number(props.maxErrors ?? 1)) {
|
|
6831
6836
|
break;
|
|
6832
6837
|
}
|
|
6833
6838
|
const handler = typeof rule === 'function' ? rule : () => rule;
|
|
@@ -7888,7 +7893,10 @@ const makeVChipProps = propsFactory({
|
|
|
7888
7893
|
type: [Boolean, Object],
|
|
7889
7894
|
default: true
|
|
7890
7895
|
},
|
|
7891
|
-
text:
|
|
7896
|
+
text: {
|
|
7897
|
+
type: [String, Number, Boolean],
|
|
7898
|
+
default: undefined
|
|
7899
|
+
},
|
|
7892
7900
|
modelValue: {
|
|
7893
7901
|
type: Boolean,
|
|
7894
7902
|
default: true
|
|
@@ -8057,7 +8065,7 @@ const VChip = genericComponent()({
|
|
|
8057
8065
|
toggle: group?.toggle,
|
|
8058
8066
|
value: group?.value.value,
|
|
8059
8067
|
disabled: props.disabled
|
|
8060
|
-
}) ?? props.text]), hasAppend && createVNode("div", {
|
|
8068
|
+
}) ?? toDisplayString(props.text)]), hasAppend && createVNode("div", {
|
|
8061
8069
|
"key": "append",
|
|
8062
8070
|
"class": "v-chip__append"
|
|
8063
8071
|
}, [!slots.append ? createVNode(Fragment, null, [props.appendIcon && createVNode(VIcon, {
|
|
@@ -8936,8 +8944,14 @@ const makeVListItemProps = propsFactory({
|
|
|
8936
8944
|
default: true
|
|
8937
8945
|
},
|
|
8938
8946
|
slim: Boolean,
|
|
8939
|
-
subtitle:
|
|
8940
|
-
|
|
8947
|
+
subtitle: {
|
|
8948
|
+
type: [String, Number, Boolean],
|
|
8949
|
+
default: undefined
|
|
8950
|
+
},
|
|
8951
|
+
title: {
|
|
8952
|
+
type: [String, Number, Boolean],
|
|
8953
|
+
default: undefined
|
|
8954
|
+
},
|
|
8941
8955
|
value: null,
|
|
8942
8956
|
onClick: EventProp(),
|
|
8943
8957
|
onClickOnce: EventProp(),
|
|
@@ -9130,13 +9144,13 @@ const VListItem = genericComponent()({
|
|
|
9130
9144
|
}, {
|
|
9131
9145
|
default: () => [slots.title?.({
|
|
9132
9146
|
title: props.title
|
|
9133
|
-
}) ?? props.title]
|
|
9147
|
+
}) ?? toDisplayString(props.title)]
|
|
9134
9148
|
}), hasSubtitle && createVNode(VListItemSubtitle, {
|
|
9135
9149
|
"key": "subtitle"
|
|
9136
9150
|
}, {
|
|
9137
9151
|
default: () => [slots.subtitle?.({
|
|
9138
9152
|
subtitle: props.subtitle
|
|
9139
|
-
}) ?? props.subtitle]
|
|
9153
|
+
}) ?? toDisplayString(props.subtitle)]
|
|
9140
9154
|
}), slots.default?.(slotProps.value)]), hasAppend && createVNode("div", {
|
|
9141
9155
|
"key": "append",
|
|
9142
9156
|
"class": "v-list-item__append"
|
|
@@ -10737,10 +10751,10 @@ function useStack(isActive, zIndex, disableGlobalStack) {
|
|
|
10737
10751
|
activeChildren: new Set()
|
|
10738
10752
|
});
|
|
10739
10753
|
provide(StackSymbol, stack);
|
|
10740
|
-
const _zIndex = shallowRef(
|
|
10754
|
+
const _zIndex = shallowRef(Number(zIndex.value));
|
|
10741
10755
|
useToggleScope(isActive, () => {
|
|
10742
10756
|
const lastZIndex = globalStack.at(-1)?.[1];
|
|
10743
|
-
_zIndex.value = lastZIndex ? lastZIndex + 10 :
|
|
10757
|
+
_zIndex.value = lastZIndex ? lastZIndex + 10 : Number(zIndex.value);
|
|
10744
10758
|
if (createStackEntry) {
|
|
10745
10759
|
globalStack.push([vm.uid, _zIndex.value]);
|
|
10746
10760
|
}
|
|
@@ -10949,6 +10963,7 @@ const VOverlay = genericComponent()({
|
|
|
10949
10963
|
emits: {
|
|
10950
10964
|
'click:outside': e => true,
|
|
10951
10965
|
'update:modelValue': value => true,
|
|
10966
|
+
keydown: e => true,
|
|
10952
10967
|
afterEnter: () => true,
|
|
10953
10968
|
afterLeave: () => true
|
|
10954
10969
|
},
|
|
@@ -11061,6 +11076,9 @@ const VOverlay = genericComponent()({
|
|
|
11061
11076
|
});
|
|
11062
11077
|
function onKeydown(e) {
|
|
11063
11078
|
if (e.key === 'Escape' && globalTop.value) {
|
|
11079
|
+
if (!contentEl.value?.contains(document.activeElement)) {
|
|
11080
|
+
emit('keydown', e);
|
|
11081
|
+
}
|
|
11064
11082
|
if (!props.persistent) {
|
|
11065
11083
|
isActive.value = false;
|
|
11066
11084
|
if (contentEl.value?.contains(document.activeElement)) {
|
|
@@ -11069,6 +11087,10 @@ const VOverlay = genericComponent()({
|
|
|
11069
11087
|
} else animateClick();
|
|
11070
11088
|
}
|
|
11071
11089
|
}
|
|
11090
|
+
function onKeydownSelf(e) {
|
|
11091
|
+
if (e.key === 'Escape' && !globalTop.value) return;
|
|
11092
|
+
emit('keydown', e);
|
|
11093
|
+
}
|
|
11072
11094
|
const router = useRouter();
|
|
11073
11095
|
useToggleScope(() => props.closeOnBack, () => {
|
|
11074
11096
|
useBackButton(router, next => {
|
|
@@ -11131,7 +11153,8 @@ const VOverlay = genericComponent()({
|
|
|
11131
11153
|
'--v-overlay-opacity': props.opacity,
|
|
11132
11154
|
top: convertToUnit(top.value)
|
|
11133
11155
|
}, props.style],
|
|
11134
|
-
"ref": root
|
|
11156
|
+
"ref": root,
|
|
11157
|
+
"onKeydown": onKeydownSelf
|
|
11135
11158
|
}, scopeId, attrs), [createVNode(Scrim, mergeProps({
|
|
11136
11159
|
"color": scrimColor,
|
|
11137
11160
|
"modelValue": isActive.value && !!props.scrim,
|
|
@@ -11802,11 +11825,6 @@ const VField = genericComponent()({
|
|
|
11802
11825
|
};
|
|
11803
11826
|
}
|
|
11804
11827
|
});
|
|
11805
|
-
// TODO: this is kinda slow, might be better to implicitly inherit props instead
|
|
11806
|
-
function filterFieldProps(attrs) {
|
|
11807
|
-
const keys = Object.keys(VField.props).filter(k => !isOn(k) && k !== 'class' && k !== 'style');
|
|
11808
|
-
return pick(attrs, keys);
|
|
11809
|
-
}
|
|
11810
11828
|
|
|
11811
11829
|
// Types
|
|
11812
11830
|
|
|
@@ -11914,7 +11932,7 @@ const VTextField = genericComponent()({
|
|
|
11914
11932
|
modelValue: _,
|
|
11915
11933
|
...inputProps
|
|
11916
11934
|
} = VInput.filterProps(props);
|
|
11917
|
-
const fieldProps =
|
|
11935
|
+
const fieldProps = VField.filterProps(props);
|
|
11918
11936
|
return createVNode(VInput, mergeProps({
|
|
11919
11937
|
"ref": vInputRef,
|
|
11920
11938
|
"modelValue": model.value,
|
|
@@ -13522,11 +13540,11 @@ const VBadge = genericComponent()({
|
|
|
13522
13540
|
locationStyles
|
|
13523
13541
|
} = useLocation(props, true, side => {
|
|
13524
13542
|
const base = props.floating ? props.dot ? 2 : 4 : props.dot ? 8 : 12;
|
|
13525
|
-
return base + (['top', 'bottom'].includes(side) ?
|
|
13543
|
+
return base + (['top', 'bottom'].includes(side) ? Number(props.offsetY ?? 0) : ['left', 'right'].includes(side) ? Number(props.offsetX ?? 0) : 0);
|
|
13526
13544
|
});
|
|
13527
13545
|
useRender(() => {
|
|
13528
13546
|
const value = Number(props.content);
|
|
13529
|
-
const content = !props.max || isNaN(value) ? props.content : value <=
|
|
13547
|
+
const content = !props.max || isNaN(value) ? props.content : value <= Number(props.max) ? value : `${props.max}+`;
|
|
13530
13548
|
const [badgeAttrs, attrs] = pickWithRest(ctx.attrs, ['aria-atomic', 'aria-label', 'aria-live', 'role', 'title']);
|
|
13531
13549
|
return createVNode(props.tag, mergeProps({
|
|
13532
13550
|
"class": ['v-badge', {
|
|
@@ -14225,8 +14243,14 @@ const makeCardItemProps = propsFactory({
|
|
|
14225
14243
|
appendIcon: IconValue,
|
|
14226
14244
|
prependAvatar: String,
|
|
14227
14245
|
prependIcon: IconValue,
|
|
14228
|
-
subtitle:
|
|
14229
|
-
|
|
14246
|
+
subtitle: {
|
|
14247
|
+
type: [String, Number, Boolean],
|
|
14248
|
+
default: undefined
|
|
14249
|
+
},
|
|
14250
|
+
title: {
|
|
14251
|
+
type: [String, Number, Boolean],
|
|
14252
|
+
default: undefined
|
|
14253
|
+
},
|
|
14230
14254
|
...makeComponentProps(),
|
|
14231
14255
|
...makeDensityProps()
|
|
14232
14256
|
}, 'VCardItem');
|
|
@@ -14276,11 +14300,11 @@ const VCardItem = genericComponent()({
|
|
|
14276
14300
|
}, [hasTitle && createVNode(VCardTitle, {
|
|
14277
14301
|
"key": "title"
|
|
14278
14302
|
}, {
|
|
14279
|
-
default: () => [slots.title?.() ?? props.title]
|
|
14303
|
+
default: () => [slots.title?.() ?? toDisplayString(props.title)]
|
|
14280
14304
|
}), hasSubtitle && createVNode(VCardSubtitle, {
|
|
14281
14305
|
"key": "subtitle"
|
|
14282
14306
|
}, {
|
|
14283
|
-
default: () => [slots.subtitle?.() ?? props.subtitle]
|
|
14307
|
+
default: () => [slots.subtitle?.() ?? toDisplayString(props.subtitle)]
|
|
14284
14308
|
}), slots.default?.()]), hasAppend && createVNode("div", {
|
|
14285
14309
|
"key": "append",
|
|
14286
14310
|
"class": "v-card-item__append"
|
|
@@ -14352,9 +14376,18 @@ const makeVCardProps = propsFactory({
|
|
|
14352
14376
|
type: [Boolean, Object],
|
|
14353
14377
|
default: true
|
|
14354
14378
|
},
|
|
14355
|
-
subtitle:
|
|
14356
|
-
|
|
14357
|
-
|
|
14379
|
+
subtitle: {
|
|
14380
|
+
type: [String, Number, Boolean],
|
|
14381
|
+
default: undefined
|
|
14382
|
+
},
|
|
14383
|
+
text: {
|
|
14384
|
+
type: [String, Number, Boolean],
|
|
14385
|
+
default: undefined
|
|
14386
|
+
},
|
|
14387
|
+
title: {
|
|
14388
|
+
type: [String, Number, Boolean],
|
|
14389
|
+
default: undefined
|
|
14390
|
+
},
|
|
14358
14391
|
...makeBorderProps(),
|
|
14359
14392
|
...makeComponentProps(),
|
|
14360
14393
|
...makeDensityProps(),
|
|
@@ -14823,7 +14856,7 @@ const VCarousel = genericComponent()({
|
|
|
14823
14856
|
onMounted(startTimeout);
|
|
14824
14857
|
function startTimeout() {
|
|
14825
14858
|
if (!props.cycle || !windowRef.value) return;
|
|
14826
|
-
slideTimeout = window.setTimeout(windowRef.value.group.next,
|
|
14859
|
+
slideTimeout = window.setTimeout(windowRef.value.group.next, Number(props.interval) > 0 ? Number(props.interval) : 6000);
|
|
14827
14860
|
}
|
|
14828
14861
|
function restartTimeout() {
|
|
14829
14862
|
window.clearTimeout(slideTimeout);
|
|
@@ -15549,7 +15582,7 @@ const makeSliderProps = propsFactory({
|
|
|
15549
15582
|
const useSteps = props => {
|
|
15550
15583
|
const min = computed(() => parseFloat(props.min));
|
|
15551
15584
|
const max = computed(() => parseFloat(props.max));
|
|
15552
|
-
const step = computed(() =>
|
|
15585
|
+
const step = computed(() => Number(props.step) > 0 ? parseFloat(props.step) : 0);
|
|
15553
15586
|
const decimals = computed(() => Math.max(getDecimals(step.value), getDecimals(min.value)));
|
|
15554
15587
|
function roundValue(value) {
|
|
15555
15588
|
value = parseFloat(value);
|
|
@@ -18504,8 +18537,8 @@ const makeDataTablePaginateProps = propsFactory({
|
|
|
18504
18537
|
}, 'DataTable-paginate');
|
|
18505
18538
|
const VDataTablePaginationSymbol = Symbol.for('vuetify:data-table-pagination');
|
|
18506
18539
|
function createPagination(props) {
|
|
18507
|
-
const page = useProxiedModel(props, 'page', undefined, value =>
|
|
18508
|
-
const itemsPerPage = useProxiedModel(props, 'itemsPerPage', undefined, value =>
|
|
18540
|
+
const page = useProxiedModel(props, 'page', undefined, value => Number(value ?? 1));
|
|
18541
|
+
const itemsPerPage = useProxiedModel(props, 'itemsPerPage', undefined, value => Number(value ?? 10));
|
|
18509
18542
|
return {
|
|
18510
18543
|
page,
|
|
18511
18544
|
itemsPerPage
|
|
@@ -19294,7 +19327,7 @@ const VPagination = genericComponent()({
|
|
|
19294
19327
|
const minButtons = props.showFirstLastPage ? 5 : 3;
|
|
19295
19328
|
return Math.max(0, Math.floor(
|
|
19296
19329
|
// Round to two decimal places to avoid floating point errors
|
|
19297
|
-
|
|
19330
|
+
Number(((totalWidth - itemWidth * minButtons) / itemWidth).toFixed(2))));
|
|
19298
19331
|
}
|
|
19299
19332
|
const range = computed(() => {
|
|
19300
19333
|
if (length.value <= 0 || isNaN(length.value) || length.value > Number.MAX_SAFE_INTEGER) return [];
|
|
@@ -19365,7 +19398,7 @@ const VPagination = genericComponent()({
|
|
|
19365
19398
|
ref,
|
|
19366
19399
|
ellipsis: false,
|
|
19367
19400
|
icon: true,
|
|
19368
|
-
disabled: !!props.disabled ||
|
|
19401
|
+
disabled: !!props.disabled || Number(props.length) < 2,
|
|
19369
19402
|
color: isActive ? props.activeColor : props.color,
|
|
19370
19403
|
'aria-current': isActive,
|
|
19371
19404
|
'aria-label': t(isActive ? props.currentPageAriaLabel : props.pageAriaLabel, item),
|
|
@@ -19414,7 +19447,7 @@ const VPagination = genericComponent()({
|
|
|
19414
19447
|
refs.value[currentIndex]?.$el.focus();
|
|
19415
19448
|
}
|
|
19416
19449
|
function onKeydown(e) {
|
|
19417
|
-
if (e.key === keyValues.left && !props.disabled && page.value >
|
|
19450
|
+
if (e.key === keyValues.left && !props.disabled && page.value > Number(props.start)) {
|
|
19418
19451
|
page.value = page.value - 1;
|
|
19419
19452
|
nextTick(updateFocus);
|
|
19420
19453
|
} else if (e.key === keyValues.right && !props.disabled && page.value < start.value + length.value - 1) {
|
|
@@ -19747,8 +19780,10 @@ function parseFixedColumns(items) {
|
|
|
19747
19780
|
} else {
|
|
19748
19781
|
if (!seenFixed) {
|
|
19749
19782
|
item.lastFixed = true;
|
|
19750
|
-
} else if (isNaN(
|
|
19783
|
+
} else if (isNaN(Number(item.width))) {
|
|
19751
19784
|
consoleError(`Multiple fixed columns should have a static width (key: ${item.key})`);
|
|
19785
|
+
} else {
|
|
19786
|
+
item.minWidth = Math.max(Number(item.width) || 0, Number(item.minWidth) || 0);
|
|
19752
19787
|
}
|
|
19753
19788
|
seenFixed = true;
|
|
19754
19789
|
}
|
|
@@ -21511,30 +21546,30 @@ const VDatePickerControls = genericComponent()({
|
|
|
21511
21546
|
"class": ['v-date-picker-controls']
|
|
21512
21547
|
}, [createVNode(VBtn, {
|
|
21513
21548
|
"class": "v-date-picker-controls__month-btn",
|
|
21549
|
+
"data-testid": "month-btn",
|
|
21514
21550
|
"disabled": disableMonth.value,
|
|
21515
21551
|
"text": props.text,
|
|
21516
21552
|
"variant": "text",
|
|
21517
21553
|
"rounded": true,
|
|
21518
21554
|
"onClick": onClickMonth
|
|
21519
21555
|
}, null), createVNode(VBtn, {
|
|
21520
|
-
"key": "mode-btn",
|
|
21521
21556
|
"class": "v-date-picker-controls__mode-btn",
|
|
21557
|
+
"data-testid": "year-btn",
|
|
21522
21558
|
"disabled": disableYear.value,
|
|
21523
21559
|
"density": "comfortable",
|
|
21524
21560
|
"icon": props.modeIcon,
|
|
21525
21561
|
"variant": "text",
|
|
21526
21562
|
"onClick": onClickYear
|
|
21527
|
-
}, null), createVNode(VSpacer, {
|
|
21528
|
-
"key": "mode-spacer"
|
|
21529
|
-
}, null), createVNode("div", {
|
|
21530
|
-
"key": "month-buttons",
|
|
21563
|
+
}, null), createVNode(VSpacer, null, null), createVNode("div", {
|
|
21531
21564
|
"class": "v-date-picker-controls__month"
|
|
21532
21565
|
}, [createVNode(VBtn, {
|
|
21566
|
+
"data-testid": "prev-month",
|
|
21533
21567
|
"disabled": disablePrev.value,
|
|
21534
21568
|
"icon": props.prevIcon,
|
|
21535
21569
|
"variant": "text",
|
|
21536
21570
|
"onClick": onClickPrev
|
|
21537
21571
|
}, null), createVNode(VBtn, {
|
|
21572
|
+
"data-testid": "next-month",
|
|
21538
21573
|
"disabled": disableNext.value,
|
|
21539
21574
|
"icon": props.nextIcon,
|
|
21540
21575
|
"variant": "text",
|
|
@@ -21881,7 +21916,7 @@ const VDatePickerMonth = genericComponent()({
|
|
|
21881
21916
|
model.value = [value];
|
|
21882
21917
|
}
|
|
21883
21918
|
}
|
|
21884
|
-
|
|
21919
|
+
useRender(() => createVNode("div", {
|
|
21885
21920
|
"class": "v-date-picker-month"
|
|
21886
21921
|
}, [props.showWeek && createVNode("div", {
|
|
21887
21922
|
"key": "weeks",
|
|
@@ -21903,6 +21938,13 @@ const VDatePickerMonth = genericComponent()({
|
|
|
21903
21938
|
}, [weekDay])), daysInMonth.value.map((item, i) => {
|
|
21904
21939
|
const slotProps = {
|
|
21905
21940
|
props: {
|
|
21941
|
+
class: 'v-date-picker-month__day-btn',
|
|
21942
|
+
color: (item.isSelected || item.isToday) && !item.isDisabled ? props.color : undefined,
|
|
21943
|
+
disabled: item.isDisabled,
|
|
21944
|
+
icon: true,
|
|
21945
|
+
ripple: false,
|
|
21946
|
+
text: item.localized,
|
|
21947
|
+
variant: item.isDisabled ? item.isToday ? 'outlined' : 'text' : item.isToday && !item.isSelected ? 'outlined' : 'flat',
|
|
21906
21948
|
onClick: () => onClick(item.date)
|
|
21907
21949
|
},
|
|
21908
21950
|
item,
|
|
@@ -21920,24 +21962,9 @@ const VDatePickerMonth = genericComponent()({
|
|
|
21920
21962
|
'v-date-picker-month__day--week-start': item.isWeekStart
|
|
21921
21963
|
}],
|
|
21922
21964
|
"data-v-date": !item.isDisabled ? item.isoDate : undefined
|
|
21923
|
-
}, [(props.showAdjacentMonths || !item.isAdjacent) && createVNode(
|
|
21924
|
-
"defaults": {
|
|
21925
|
-
VBtn: {
|
|
21926
|
-
class: 'v-date-picker-month__day-btn',
|
|
21927
|
-
color: (item.isSelected || item.isToday) && !item.isDisabled ? props.color : undefined,
|
|
21928
|
-
disabled: item.isDisabled,
|
|
21929
|
-
icon: true,
|
|
21930
|
-
ripple: false,
|
|
21931
|
-
text: item.localized,
|
|
21932
|
-
variant: item.isDisabled ? item.isToday ? 'outlined' : 'text' : item.isToday && !item.isSelected ? 'outlined' : 'flat',
|
|
21933
|
-
onClick: () => onClick(item.date)
|
|
21934
|
-
}
|
|
21935
|
-
}
|
|
21936
|
-
}, {
|
|
21937
|
-
default: () => [slots.day?.(slotProps) ?? createVNode(VBtn, slotProps.props, null)]
|
|
21938
|
-
})]);
|
|
21965
|
+
}, [(props.showAdjacentMonths || !item.isAdjacent) && (slots.day?.(slotProps) ?? createVNode(VBtn, slotProps.props, null))]);
|
|
21939
21966
|
})])]
|
|
21940
|
-
})]);
|
|
21967
|
+
})]));
|
|
21941
21968
|
}
|
|
21942
21969
|
});
|
|
21943
21970
|
|
|
@@ -23075,7 +23102,7 @@ const VFileInput = genericComponent()({
|
|
|
23075
23102
|
modelValue: _,
|
|
23076
23103
|
...inputProps
|
|
23077
23104
|
} = VInput.filterProps(props);
|
|
23078
|
-
const fieldProps =
|
|
23105
|
+
const fieldProps = VField.filterProps(props);
|
|
23079
23106
|
return createVNode(VInput, mergeProps({
|
|
23080
23107
|
"ref": vInputRef,
|
|
23081
23108
|
"modelValue": props.multiple ? model.value : model.value[0],
|
|
@@ -24694,7 +24721,7 @@ const VParallax = genericComponent()({
|
|
|
24694
24721
|
watch(displayHeight, onScroll);
|
|
24695
24722
|
watch(() => contentRect.value?.height, onScroll);
|
|
24696
24723
|
const scale = computed(() => {
|
|
24697
|
-
return 1 - clamp(
|
|
24724
|
+
return 1 - clamp(Number(props.scale));
|
|
24698
24725
|
});
|
|
24699
24726
|
let frame = -1;
|
|
24700
24727
|
function onScroll() {
|
|
@@ -25115,7 +25142,7 @@ const VRating = genericComponent()({
|
|
|
25115
25142
|
themeClasses
|
|
25116
25143
|
} = provideTheme(props);
|
|
25117
25144
|
const rating = useProxiedModel(props, 'modelValue');
|
|
25118
|
-
const normalizedValue = computed(() => clamp(parseFloat(rating.value), 0,
|
|
25145
|
+
const normalizedValue = computed(() => clamp(parseFloat(rating.value), 0, Number(props.length)));
|
|
25119
25146
|
const range = computed(() => createRange(Number(props.length), 1));
|
|
25120
25147
|
const increments = computed(() => range.value.flatMap(v => props.halfIncrements ? [v - 0.5, v] : [v]));
|
|
25121
25148
|
const hoverIndex = shallowRef(-1);
|
|
@@ -25726,7 +25753,7 @@ const VBarline = genericComponent()({
|
|
|
25726
25753
|
const height = Math.abs(gridY * value);
|
|
25727
25754
|
return {
|
|
25728
25755
|
x: minX + index * gridX,
|
|
25729
|
-
y: horizonY - height +
|
|
25756
|
+
y: horizonY - height + Number(value < 0) * height,
|
|
25730
25757
|
height,
|
|
25731
25758
|
value
|
|
25732
25759
|
};
|
|
@@ -27164,10 +27191,10 @@ const VTextarea = genericComponent()({
|
|
|
27164
27191
|
}
|
|
27165
27192
|
}
|
|
27166
27193
|
const sizerRef = ref();
|
|
27167
|
-
const rows = ref(
|
|
27194
|
+
const rows = ref(Number(props.rows));
|
|
27168
27195
|
const isPlainOrUnderlined = computed(() => ['plain', 'underlined'].includes(props.variant));
|
|
27169
27196
|
watchEffect(() => {
|
|
27170
|
-
if (!props.autoGrow) rows.value =
|
|
27197
|
+
if (!props.autoGrow) rows.value = Number(props.rows);
|
|
27171
27198
|
});
|
|
27172
27199
|
function calculateInputHeight() {
|
|
27173
27200
|
if (!props.autoGrow) return;
|
|
@@ -27210,7 +27237,7 @@ const VTextarea = genericComponent()({
|
|
|
27210
27237
|
modelValue: _,
|
|
27211
27238
|
...inputProps
|
|
27212
27239
|
} = VInput.filterProps(props);
|
|
27213
|
-
const fieldProps =
|
|
27240
|
+
const fieldProps = VField.filterProps(props);
|
|
27214
27241
|
return createVNode(VInput, mergeProps({
|
|
27215
27242
|
"ref": vInputRef,
|
|
27216
27243
|
"modelValue": model.value,
|
|
@@ -28214,8 +28241,8 @@ const makeVDateInputProps = propsFactory({
|
|
|
28214
28241
|
prependIcon: '$calendar'
|
|
28215
28242
|
}),
|
|
28216
28243
|
...omit(makeVDatePickerProps({
|
|
28217
|
-
|
|
28218
|
-
|
|
28244
|
+
hideHeader: true,
|
|
28245
|
+
showAdjacentMonths: true
|
|
28219
28246
|
}), ['active', 'location', 'rounded'])
|
|
28220
28247
|
}, 'VDateInput');
|
|
28221
28248
|
const VDateInput = genericComponent()({
|
|
@@ -28261,7 +28288,7 @@ const VDateInput = genericComponent()({
|
|
|
28261
28288
|
return;
|
|
28262
28289
|
}
|
|
28263
28290
|
const target = e.target;
|
|
28264
|
-
model.value = target.value;
|
|
28291
|
+
model.value = target.value === '' ? null : target.value;
|
|
28265
28292
|
}
|
|
28266
28293
|
function onClick(e) {
|
|
28267
28294
|
e.preventDefault();
|
|
@@ -28299,6 +28326,7 @@ const VDateInput = genericComponent()({
|
|
|
28299
28326
|
"onUpdate:modelValue": $event => menu.value = $event,
|
|
28300
28327
|
"activator": "parent",
|
|
28301
28328
|
"min-width": "0",
|
|
28329
|
+
"eager": isFocused.value,
|
|
28302
28330
|
"location": props.location,
|
|
28303
28331
|
"closeOnContentClick": false,
|
|
28304
28332
|
"openOnClick": false
|
|
@@ -28538,8 +28566,9 @@ const VFileUpload = genericComponent()({
|
|
|
28538
28566
|
inputRef.value?.click();
|
|
28539
28567
|
}
|
|
28540
28568
|
function onClickRemove(index) {
|
|
28541
|
-
|
|
28542
|
-
|
|
28569
|
+
const newValue = model.value.filter((_, i) => i !== index);
|
|
28570
|
+
model.value = newValue;
|
|
28571
|
+
if (newValue.length > 0 || !inputRef.value) return;
|
|
28543
28572
|
inputRef.value.value = '';
|
|
28544
28573
|
}
|
|
28545
28574
|
useRender(() => {
|
|
@@ -28750,7 +28779,7 @@ const VNumberInput = genericComponent()({
|
|
|
28750
28779
|
return isFocused.value ? Number(fixed).toString() // trim zeros
|
|
28751
28780
|
: fixed;
|
|
28752
28781
|
}
|
|
28753
|
-
const model = useProxiedModel(props, 'modelValue', null, val => val ?? null, val => val == null ? val ?? null : clamp(
|
|
28782
|
+
const model = useProxiedModel(props, 'modelValue', null, val => val ?? null, val => val == null ? val ?? null : clamp(Number(val), props.min, props.max));
|
|
28754
28783
|
const _inputText = shallowRef(null);
|
|
28755
28784
|
watchEffect(() => {
|
|
28756
28785
|
if (isFocused.value && !controlsDisabled.value) ; else if (model.value == null) {
|
|
@@ -28765,8 +28794,8 @@ const VNumberInput = genericComponent()({
|
|
|
28765
28794
|
if (val === null || val === '') {
|
|
28766
28795
|
model.value = null;
|
|
28767
28796
|
_inputText.value = null;
|
|
28768
|
-
} else if (!isNaN(
|
|
28769
|
-
model.value =
|
|
28797
|
+
} else if (!isNaN(Number(val)) && Number(val) <= props.max && Number(val) >= props.min) {
|
|
28798
|
+
model.value = Number(val);
|
|
28770
28799
|
_inputText.value = val;
|
|
28771
28800
|
}
|
|
28772
28801
|
}
|
|
@@ -28890,8 +28919,8 @@ const VNumberInput = genericComponent()({
|
|
|
28890
28919
|
if (controlsDisabled.value) return;
|
|
28891
28920
|
if (!vTextFieldRef.value) return;
|
|
28892
28921
|
const actualText = vTextFieldRef.value.value;
|
|
28893
|
-
if (actualText && !isNaN(
|
|
28894
|
-
inputText.value = correctPrecision(clamp(
|
|
28922
|
+
if (actualText && !isNaN(Number(actualText))) {
|
|
28923
|
+
inputText.value = correctPrecision(clamp(Number(actualText), props.min, props.max));
|
|
28895
28924
|
} else {
|
|
28896
28925
|
inputText.value = null;
|
|
28897
28926
|
}
|
|
@@ -29765,14 +29794,7 @@ const VTimePickerClock = genericComponent()({
|
|
|
29765
29794
|
}
|
|
29766
29795
|
});
|
|
29767
29796
|
|
|
29768
|
-
//
|
|
29769
|
-
/* eslint-disable */
|
|
29770
|
-
var SelectingTimes = /*#__PURE__*/function (SelectingTimes) {
|
|
29771
|
-
SelectingTimes[SelectingTimes["Hour"] = 1] = "Hour";
|
|
29772
|
-
SelectingTimes[SelectingTimes["Minute"] = 2] = "Minute";
|
|
29773
|
-
SelectingTimes[SelectingTimes["Second"] = 3] = "Second";
|
|
29774
|
-
return SelectingTimes;
|
|
29775
|
-
}(SelectingTimes || {});
|
|
29797
|
+
// Types
|
|
29776
29798
|
|
|
29777
29799
|
const makeVTimePickerControlsProps = propsFactory({
|
|
29778
29800
|
ampm: Boolean,
|
|
@@ -29786,15 +29808,15 @@ const makeVTimePickerControlsProps = propsFactory({
|
|
|
29786
29808
|
period: String,
|
|
29787
29809
|
readonly: Boolean,
|
|
29788
29810
|
useSeconds: Boolean,
|
|
29789
|
-
|
|
29790
|
-
|
|
29811
|
+
value: Number,
|
|
29812
|
+
viewMode: String
|
|
29791
29813
|
}, 'VTimePickerControls');
|
|
29792
29814
|
const VTimePickerControls = genericComponent()({
|
|
29793
29815
|
name: 'VTimePickerControls',
|
|
29794
29816
|
props: makeVTimePickerControlsProps(),
|
|
29795
29817
|
emits: {
|
|
29796
29818
|
'update:period': data => true,
|
|
29797
|
-
'update:
|
|
29819
|
+
'update:viewMode': data => true
|
|
29798
29820
|
},
|
|
29799
29821
|
setup(props, _ref) {
|
|
29800
29822
|
let {
|
|
@@ -29817,8 +29839,8 @@ const VTimePickerControls = genericComponent()({
|
|
|
29817
29839
|
'v-time-picker-controls__time--with-seconds': props.useSeconds
|
|
29818
29840
|
}
|
|
29819
29841
|
}, [createVNode(VBtn, {
|
|
29820
|
-
"active": props.
|
|
29821
|
-
"color": props.
|
|
29842
|
+
"active": props.viewMode === 'hour',
|
|
29843
|
+
"color": props.viewMode === 'hour' ? props.color : undefined,
|
|
29822
29844
|
"disabled": props.disabled,
|
|
29823
29845
|
"variant": "tonal",
|
|
29824
29846
|
"class": {
|
|
@@ -29827,24 +29849,24 @@ const VTimePickerControls = genericComponent()({
|
|
|
29827
29849
|
'v-time-picker-controls__time--with-seconds__btn': props.useSeconds
|
|
29828
29850
|
},
|
|
29829
29851
|
"text": props.hour == null ? '--' : pad(`${hour}`),
|
|
29830
|
-
"onClick": () => emit('update:
|
|
29852
|
+
"onClick": () => emit('update:viewMode', 'hour')
|
|
29831
29853
|
}, null), createVNode("span", {
|
|
29832
29854
|
"class": ['v-time-picker-controls__time__separator', {
|
|
29833
29855
|
'v-time-picker-controls--with-seconds__time__separator': props.useSeconds
|
|
29834
29856
|
}]
|
|
29835
29857
|
}, [createTextVNode(":")]), createVNode(VBtn, {
|
|
29836
|
-
"active": props.
|
|
29837
|
-
"color": props.
|
|
29858
|
+
"active": props.viewMode === 'minute',
|
|
29859
|
+
"color": props.viewMode === 'minute' ? props.color : undefined,
|
|
29838
29860
|
"class": {
|
|
29839
29861
|
'v-time-picker-controls__time__btn': true,
|
|
29840
|
-
'v-time-picker-controls__time__btn__active': props.
|
|
29862
|
+
'v-time-picker-controls__time__btn__active': props.viewMode === 'minute',
|
|
29841
29863
|
'v-time-picker-controls__time--with-ampm__btn': props.ampm,
|
|
29842
29864
|
'v-time-picker-controls__time--with-seconds__btn': props.useSeconds
|
|
29843
29865
|
},
|
|
29844
29866
|
"disabled": props.disabled,
|
|
29845
29867
|
"variant": "tonal",
|
|
29846
29868
|
"text": props.minute == null ? '--' : pad(props.minute),
|
|
29847
|
-
"onClick": () => emit('update:
|
|
29869
|
+
"onClick": () => emit('update:viewMode', 'minute')
|
|
29848
29870
|
}, null), props.useSeconds && createVNode("span", {
|
|
29849
29871
|
"class": ['v-time-picker-controls__time__separator', {
|
|
29850
29872
|
'v-time-picker-controls--with-seconds__time__separator': props.useSeconds
|
|
@@ -29852,11 +29874,13 @@ const VTimePickerControls = genericComponent()({
|
|
|
29852
29874
|
"key": "secondsDivider"
|
|
29853
29875
|
}, [createTextVNode(":")]), props.useSeconds && createVNode(VBtn, {
|
|
29854
29876
|
"key": "secondsVal",
|
|
29877
|
+
"active": props.viewMode === 'second',
|
|
29878
|
+
"color": props.viewMode === 'second' ? props.color : undefined,
|
|
29855
29879
|
"variant": "tonal",
|
|
29856
|
-
"onClick": () => emit('update:
|
|
29880
|
+
"onClick": () => emit('update:viewMode', 'second'),
|
|
29857
29881
|
"class": {
|
|
29858
29882
|
'v-time-picker-controls__time__btn': true,
|
|
29859
|
-
'v-time-picker-controls__time__btn__active': props.
|
|
29883
|
+
'v-time-picker-controls__time__btn__active': props.viewMode === 'second',
|
|
29860
29884
|
'v-time-picker-controls__time--with-seconds__btn': props.useSeconds
|
|
29861
29885
|
},
|
|
29862
29886
|
"disabled": props.disabled,
|
|
@@ -29901,11 +29925,6 @@ const rangeHours24 = createRange(24);
|
|
|
29901
29925
|
const rangeHours12am = createRange(12);
|
|
29902
29926
|
const rangeHours12pm = rangeHours12am.map(v => v + 12);
|
|
29903
29927
|
createRange(60);
|
|
29904
|
-
const selectingNames = {
|
|
29905
|
-
1: 'hour',
|
|
29906
|
-
2: 'minute',
|
|
29907
|
-
3: 'second'
|
|
29908
|
-
};
|
|
29909
29928
|
const makeVTimePickerProps = propsFactory({
|
|
29910
29929
|
allowedHours: [Function, Array],
|
|
29911
29930
|
allowedMinutes: [Function, Array],
|
|
@@ -29918,6 +29937,10 @@ const makeVTimePickerProps = propsFactory({
|
|
|
29918
29937
|
},
|
|
29919
29938
|
max: String,
|
|
29920
29939
|
min: String,
|
|
29940
|
+
viewMode: {
|
|
29941
|
+
type: String,
|
|
29942
|
+
default: 'hour'
|
|
29943
|
+
},
|
|
29921
29944
|
modelValue: null,
|
|
29922
29945
|
readonly: Boolean,
|
|
29923
29946
|
scrollable: Boolean,
|
|
@@ -29934,7 +29957,8 @@ const VTimePicker = genericComponent()({
|
|
|
29934
29957
|
'update:minute': val => true,
|
|
29935
29958
|
'update:period': val => true,
|
|
29936
29959
|
'update:second': val => true,
|
|
29937
|
-
'update:modelValue': val => true
|
|
29960
|
+
'update:modelValue': val => true,
|
|
29961
|
+
'update:viewMode': val => true
|
|
29938
29962
|
},
|
|
29939
29963
|
setup(props, _ref) {
|
|
29940
29964
|
let {
|
|
@@ -29951,7 +29975,7 @@ const VTimePicker = genericComponent()({
|
|
|
29951
29975
|
const lazyInputMinute = ref(null);
|
|
29952
29976
|
const lazyInputSecond = ref(null);
|
|
29953
29977
|
const period = ref('am');
|
|
29954
|
-
const
|
|
29978
|
+
const viewMode = useProxiedModel(props, 'viewMode', 'hour');
|
|
29955
29979
|
const controlsRef = ref(null);
|
|
29956
29980
|
const clockRef = ref(null);
|
|
29957
29981
|
const isAllowedHourCb = computed(() => {
|
|
@@ -29965,7 +29989,7 @@ const VTimePicker = genericComponent()({
|
|
|
29965
29989
|
const minHour = props.min ? Number(props.min.split(':')[0]) : 0;
|
|
29966
29990
|
const maxHour = props.max ? Number(props.max.split(':')[0]) : 23;
|
|
29967
29991
|
return val => {
|
|
29968
|
-
return val >= minHour
|
|
29992
|
+
return val >= Number(minHour) && val <= Number(maxHour) && (!cb || cb(val));
|
|
29969
29993
|
};
|
|
29970
29994
|
});
|
|
29971
29995
|
const isAllowedMinuteCb = computed(() => {
|
|
@@ -29981,8 +30005,8 @@ const VTimePicker = genericComponent()({
|
|
|
29981
30005
|
}
|
|
29982
30006
|
const [minHour, minMinute] = props.min ? props.min.split(':').map(Number) : [0, 0];
|
|
29983
30007
|
const [maxHour, maxMinute] = props.max ? props.max.split(':').map(Number) : [23, 59];
|
|
29984
|
-
const minTime = minHour * 60 + minMinute
|
|
29985
|
-
const maxTime = maxHour * 60 + maxMinute
|
|
30008
|
+
const minTime = minHour * 60 + Number(minMinute);
|
|
30009
|
+
const maxTime = maxHour * 60 + Number(maxMinute);
|
|
29986
30010
|
return val => {
|
|
29987
30011
|
const time = 60 * inputHour.value + val;
|
|
29988
30012
|
return time >= minTime && time <= maxTime && isHourAllowed && (!cb || cb(val));
|
|
@@ -30002,8 +30026,8 @@ const VTimePicker = genericComponent()({
|
|
|
30002
30026
|
}
|
|
30003
30027
|
const [minHour, minMinute, minSecond] = props.min ? props.min.split(':').map(Number) : [0, 0, 0];
|
|
30004
30028
|
const [maxHour, maxMinute, maxSecond] = props.max ? props.max.split(':').map(Number) : [23, 59, 59];
|
|
30005
|
-
const minTime = minHour * 3600 + minMinute * 60 + (minSecond || 0)
|
|
30006
|
-
const maxTime = maxHour * 3600 + maxMinute * 60 + (maxSecond || 0)
|
|
30029
|
+
const minTime = minHour * 3600 + minMinute * 60 + Number(minSecond || 0);
|
|
30030
|
+
const maxTime = maxHour * 3600 + maxMinute * 60 + Number(maxSecond || 0);
|
|
30007
30031
|
return val => {
|
|
30008
30032
|
const time = 3600 * inputHour.value + 60 * inputMinute.value + val;
|
|
30009
30033
|
return time >= minTime && time <= maxTime && isMinuteAllowed && (!cb || cb(val));
|
|
@@ -30069,16 +30093,16 @@ const VTimePicker = genericComponent()({
|
|
|
30069
30093
|
return true;
|
|
30070
30094
|
}
|
|
30071
30095
|
function onInput(value) {
|
|
30072
|
-
if (
|
|
30096
|
+
if (viewMode.value === 'hour') {
|
|
30073
30097
|
inputHour.value = isAmPm.value ? convert12to24(value, period.value) : value;
|
|
30074
|
-
} else if (
|
|
30098
|
+
} else if (viewMode.value === 'minute') {
|
|
30075
30099
|
inputMinute.value = value;
|
|
30076
30100
|
} else {
|
|
30077
30101
|
inputSecond.value = value;
|
|
30078
30102
|
}
|
|
30079
30103
|
}
|
|
30080
30104
|
function onChange(value) {
|
|
30081
|
-
switch (
|
|
30105
|
+
switch (viewMode.value || 'hour') {
|
|
30082
30106
|
case 'hour':
|
|
30083
30107
|
emit('update:hour', value);
|
|
30084
30108
|
break;
|
|
@@ -30090,10 +30114,10 @@ const VTimePicker = genericComponent()({
|
|
|
30090
30114
|
break;
|
|
30091
30115
|
}
|
|
30092
30116
|
const emitChange = inputHour.value !== null && inputMinute.value !== null && (props.useSeconds ? inputSecond.value !== null : true);
|
|
30093
|
-
if (
|
|
30094
|
-
|
|
30095
|
-
} else if (props.useSeconds &&
|
|
30096
|
-
|
|
30117
|
+
if (viewMode.value === 'hour') {
|
|
30118
|
+
viewMode.value = 'minute';
|
|
30119
|
+
} else if (props.useSeconds && viewMode.value === 'minute') {
|
|
30120
|
+
viewMode.value = 'second';
|
|
30097
30121
|
}
|
|
30098
30122
|
if (inputHour.value === lazyInputHour.value && inputMinute.value === lazyInputMinute.value && (!props.useSeconds || inputSecond.value === lazyInputSecond.value)) return;
|
|
30099
30123
|
const time = genValue();
|
|
@@ -30122,20 +30146,20 @@ const VTimePicker = genericComponent()({
|
|
|
30122
30146
|
"minute": inputMinute.value,
|
|
30123
30147
|
"period": period.value,
|
|
30124
30148
|
"second": inputSecond.value,
|
|
30125
|
-
"
|
|
30149
|
+
"viewMode": viewMode.value,
|
|
30126
30150
|
"onUpdate:period": val => setPeriod(val),
|
|
30127
|
-
"onUpdate:
|
|
30151
|
+
"onUpdate:viewMode": value => viewMode.value = value,
|
|
30128
30152
|
"ref": controlsRef
|
|
30129
30153
|
}), null),
|
|
30130
30154
|
default: () => createVNode(VTimePickerClock, mergeProps(timePickerClockProps, {
|
|
30131
|
-
"allowedValues":
|
|
30132
|
-
"double":
|
|
30133
|
-
"format":
|
|
30134
|
-
"max":
|
|
30135
|
-
"min":
|
|
30155
|
+
"allowedValues": viewMode.value === 'hour' ? isAllowedHourCb.value : viewMode.value === 'minute' ? isAllowedMinuteCb.value : isAllowedSecondCb.value,
|
|
30156
|
+
"double": viewMode.value === 'hour' && !isAmPm.value,
|
|
30157
|
+
"format": viewMode.value === 'hour' ? isAmPm.value ? convert24to12 : val => val : val => pad(val, 2),
|
|
30158
|
+
"max": viewMode.value === 'hour' ? isAmPm.value && period.value === 'am' ? 11 : 23 : 59,
|
|
30159
|
+
"min": viewMode.value === 'hour' && isAmPm.value && period.value === 'pm' ? 12 : 0,
|
|
30136
30160
|
"size": 20,
|
|
30137
|
-
"step":
|
|
30138
|
-
"modelValue":
|
|
30161
|
+
"step": viewMode.value === 'hour' ? 1 : 5,
|
|
30162
|
+
"modelValue": viewMode.value === 'hour' ? inputHour.value : viewMode.value === 'minute' ? inputMinute.value : inputSecond.value,
|
|
30139
30163
|
"onChange": onChange,
|
|
30140
30164
|
"onInput": onInput,
|
|
30141
30165
|
"ref": clockRef
|
|
@@ -31048,7 +31072,7 @@ function createVuetify$1() {
|
|
|
31048
31072
|
goTo
|
|
31049
31073
|
};
|
|
31050
31074
|
}
|
|
31051
|
-
const version$1 = "3.7.
|
|
31075
|
+
const version$1 = "3.7.17";
|
|
31052
31076
|
createVuetify$1.version = version$1;
|
|
31053
31077
|
|
|
31054
31078
|
// Vue's inject() can only be used in setup
|
|
@@ -31301,7 +31325,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
31301
31325
|
|
|
31302
31326
|
/* eslint-disable local-rules/sort-imports */
|
|
31303
31327
|
|
|
31304
|
-
const version = "3.7.
|
|
31328
|
+
const version = "3.7.17";
|
|
31305
31329
|
|
|
31306
31330
|
/* eslint-disable local-rules/sort-imports */
|
|
31307
31331
|
|