@antcde/component-library 0.0.4 → 0.0.6
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/node_modules/vuetify/dist/json/attributes.json +2538 -2534
- package/node_modules/vuetify/dist/json/importMap-labs.json +28 -28
- package/node_modules/vuetify/dist/json/importMap.json +152 -152
- package/node_modules/vuetify/dist/json/tags.json +3 -2
- package/node_modules/vuetify/dist/json/web-types.json +4773 -4741
- package/node_modules/vuetify/dist/vuetify-labs.css +3461 -3460
- package/node_modules/vuetify/dist/vuetify-labs.d.ts +435 -197
- package/node_modules/vuetify/dist/vuetify-labs.esm.js +155 -123
- package/node_modules/vuetify/dist/vuetify-labs.esm.js.map +1 -1
- package/node_modules/vuetify/dist/vuetify-labs.js +154 -122
- package/node_modules/vuetify/dist/vuetify-labs.min.css +2 -2
- package/node_modules/vuetify/dist/vuetify.css +4307 -4306
- package/node_modules/vuetify/dist/vuetify.d.ts +383 -203
- package/node_modules/vuetify/dist/vuetify.esm.js +100 -65
- package/node_modules/vuetify/dist/vuetify.esm.js.map +1 -1
- package/node_modules/vuetify/dist/vuetify.js +99 -64
- package/node_modules/vuetify/dist/vuetify.js.map +1 -1
- package/node_modules/vuetify/dist/vuetify.min.css +2 -2
- package/node_modules/vuetify/dist/vuetify.min.js +470 -469
- package/node_modules/vuetify/dist/vuetify.min.js.map +1 -1
- package/node_modules/vuetify/lib/components/VAppBar/index.d.mts +15 -6
- package/node_modules/vuetify/lib/components/VAutocomplete/index.d.mts +23 -8
- package/node_modules/vuetify/lib/components/VBadge/VBadge.mjs +2 -2
- package/node_modules/vuetify/lib/components/VBadge/VBadge.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VBtn/VBtn.mjs +6 -3
- package/node_modules/vuetify/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VBtn/index.d.mts +15 -6
- package/node_modules/vuetify/lib/components/VCard/VCard.mjs +12 -3
- package/node_modules/vuetify/lib/components/VCard/VCard.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VCard/VCardItem.mjs +11 -4
- package/node_modules/vuetify/lib/components/VCard/VCardItem.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VCard/index.d.mts +75 -30
- package/node_modules/vuetify/lib/components/VCarousel/VCarousel.mjs +1 -1
- package/node_modules/vuetify/lib/components/VCarousel/VCarousel.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VChip/VChip.mjs +6 -3
- package/node_modules/vuetify/lib/components/VChip/VChip.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VChip/index.d.mts +15 -6
- package/node_modules/vuetify/lib/components/VCombobox/index.d.mts +23 -8
- package/node_modules/vuetify/lib/components/VDataIterator/index.d.mts +2 -2
- package/node_modules/vuetify/lib/components/VDataTable/composables/headers.mjs +3 -1
- package/node_modules/vuetify/lib/components/VDataTable/composables/headers.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VDataTable/composables/paginate.mjs +2 -2
- package/node_modules/vuetify/lib/components/VDataTable/composables/paginate.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VDataTable/index.d.mts +34 -34
- package/node_modules/vuetify/lib/components/VDataTable/types.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VDatePicker/VDatePickerControls.mjs +5 -5
- package/node_modules/vuetify/lib/components/VDatePicker/VDatePickerControls.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VDialog/__test__/VDialog.spec.browser.mjs +50 -0
- package/node_modules/vuetify/lib/components/VDialog/__test__/VDialog.spec.browser.mjs.map +1 -0
- package/node_modules/vuetify/lib/components/VDialog/index.d.mts +21 -6
- package/node_modules/vuetify/lib/components/VFab/index.d.mts +15 -6
- package/node_modules/vuetify/lib/components/VField/VField.mjs +1 -6
- package/node_modules/vuetify/lib/components/VField/VField.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VFileInput/VFileInput.mjs +2 -2
- package/node_modules/vuetify/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VList/VListItem.mjs +11 -5
- package/node_modules/vuetify/lib/components/VList/VListItem.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VList/index.d.mts +32 -14
- package/node_modules/vuetify/lib/components/VMenu/index.d.mts +21 -6
- package/node_modules/vuetify/lib/components/VOverlay/VOverlay.mjs +10 -1
- package/node_modules/vuetify/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VOverlay/index.d.mts +6 -0
- package/node_modules/vuetify/lib/components/VPagination/VPagination.mjs +3 -3
- package/node_modules/vuetify/lib/components/VPagination/VPagination.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VParallax/VParallax.mjs +1 -1
- package/node_modules/vuetify/lib/components/VParallax/VParallax.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VRating/VRating.mjs +1 -1
- package/node_modules/vuetify/lib/components/VRating/VRating.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VSelect/index.d.mts +23 -8
- package/node_modules/vuetify/lib/components/VSlider/slider.mjs +1 -1
- package/node_modules/vuetify/lib/components/VSlider/slider.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VSnackbar/index.d.mts +21 -6
- package/node_modules/vuetify/lib/components/VSparkline/VBarline.mjs +1 -1
- package/node_modules/vuetify/lib/components/VSparkline/VBarline.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VTabs/index.d.mts +39 -24
- package/node_modules/vuetify/lib/components/VTextField/VTextField.mjs +2 -2
- package/node_modules/vuetify/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VTextarea/VTextarea.mjs +4 -4
- package/node_modules/vuetify/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/node_modules/vuetify/lib/components/VToolbar/VToolbar.css +1 -0
- package/node_modules/vuetify/lib/components/VToolbar/VToolbar.sass +1 -0
- package/node_modules/vuetify/lib/components/VTooltip/index.d.mts +21 -6
- package/node_modules/vuetify/lib/components/index.d.mts +330 -150
- package/node_modules/vuetify/lib/composables/stack.mjs +2 -2
- package/node_modules/vuetify/lib/composables/stack.mjs.map +1 -1
- package/node_modules/vuetify/lib/composables/theme.mjs +1 -1
- package/node_modules/vuetify/lib/composables/theme.mjs.map +1 -1
- package/node_modules/vuetify/lib/composables/validation.mjs +2 -2
- package/node_modules/vuetify/lib/composables/validation.mjs.map +1 -1
- package/node_modules/vuetify/lib/entry-bundler.mjs +1 -1
- package/node_modules/vuetify/lib/framework.mjs +1 -1
- package/node_modules/vuetify/lib/index.d.mts +53 -53
- package/node_modules/vuetify/lib/labs/VDateInput/VDateInput.mjs +4 -3
- package/node_modules/vuetify/lib/labs/VDateInput/VDateInput.mjs.map +1 -1
- package/node_modules/vuetify/lib/labs/VDateInput/index.d.mts +10 -10
- package/node_modules/vuetify/lib/labs/VFileUpload/VFileUpload.mjs +3 -2
- package/node_modules/vuetify/lib/labs/VFileUpload/VFileUpload.mjs.map +1 -1
- package/node_modules/vuetify/lib/labs/VFileUpload/index.d.mts +32 -14
- package/node_modules/vuetify/lib/labs/VNumberInput/VNumberInput.mjs +5 -5
- package/node_modules/vuetify/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
- package/node_modules/vuetify/lib/labs/VSnackbarQueue/index.d.mts +21 -6
- package/node_modules/vuetify/lib/labs/VTimePicker/VTimePicker.mjs +30 -31
- package/node_modules/vuetify/lib/labs/VTimePicker/VTimePicker.mjs.map +1 -1
- package/node_modules/vuetify/lib/labs/VTimePicker/VTimePickerControls.mjs +14 -13
- package/node_modules/vuetify/lib/labs/VTimePicker/VTimePickerControls.mjs.map +1 -1
- package/node_modules/vuetify/lib/labs/VTimePicker/index.d.mts +35 -13
- package/node_modules/vuetify/lib/labs/VTimePicker/shared.mjs +2 -0
- package/node_modules/vuetify/lib/labs/VTimePicker/shared.mjs.map +1 -0
- package/node_modules/vuetify/lib/labs/VTreeview/index.d.mts +32 -14
- package/node_modules/vuetify/lib/labs/components.d.mts +128 -55
- package/node_modules/vuetify/lib/locale/adapters/vuetify.mjs +1 -1
- package/node_modules/vuetify/lib/locale/adapters/vuetify.mjs.map +1 -1
- package/node_modules/vuetify/lib/util/animation.mjs +8 -8
- package/node_modules/vuetify/lib/util/animation.mjs.map +1 -1
- package/node_modules/vuetify/lib/util/helpers.mjs +6 -4
- package/node_modules/vuetify/lib/util/helpers.mjs.map +1 -1
- package/node_modules/vuetify/package.json +2 -2
- package/package.json +3 -3
- package/node_modules/vuetify/lib/components/VDialog/__test__/VDialog.spec.cy.mjs +0 -39
- package/node_modules/vuetify/lib/components/VDialog/__test__/VDialog.spec.cy.mjs.map +0 -1
- package/node_modules/vuetify/lib/labs/VTimePicker/SelectingTimes.mjs +0 -10
- package/node_modules/vuetify/lib/labs/VTimePicker/SelectingTimes.mjs.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.7.
|
|
2
|
+
* Vuetify v3.7.18
|
|
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",
|
|
@@ -23075,7 +23110,7 @@ const VFileInput = genericComponent()({
|
|
|
23075
23110
|
modelValue: _,
|
|
23076
23111
|
...inputProps
|
|
23077
23112
|
} = VInput.filterProps(props);
|
|
23078
|
-
const fieldProps =
|
|
23113
|
+
const fieldProps = VField.filterProps(props);
|
|
23079
23114
|
return createVNode(VInput, mergeProps({
|
|
23080
23115
|
"ref": vInputRef,
|
|
23081
23116
|
"modelValue": props.multiple ? model.value : model.value[0],
|
|
@@ -24694,7 +24729,7 @@ const VParallax = genericComponent()({
|
|
|
24694
24729
|
watch(displayHeight, onScroll);
|
|
24695
24730
|
watch(() => contentRect.value?.height, onScroll);
|
|
24696
24731
|
const scale = computed(() => {
|
|
24697
|
-
return 1 - clamp(
|
|
24732
|
+
return 1 - clamp(Number(props.scale));
|
|
24698
24733
|
});
|
|
24699
24734
|
let frame = -1;
|
|
24700
24735
|
function onScroll() {
|
|
@@ -25115,7 +25150,7 @@ const VRating = genericComponent()({
|
|
|
25115
25150
|
themeClasses
|
|
25116
25151
|
} = provideTheme(props);
|
|
25117
25152
|
const rating = useProxiedModel(props, 'modelValue');
|
|
25118
|
-
const normalizedValue = computed(() => clamp(parseFloat(rating.value), 0,
|
|
25153
|
+
const normalizedValue = computed(() => clamp(parseFloat(rating.value), 0, Number(props.length)));
|
|
25119
25154
|
const range = computed(() => createRange(Number(props.length), 1));
|
|
25120
25155
|
const increments = computed(() => range.value.flatMap(v => props.halfIncrements ? [v - 0.5, v] : [v]));
|
|
25121
25156
|
const hoverIndex = shallowRef(-1);
|
|
@@ -25726,7 +25761,7 @@ const VBarline = genericComponent()({
|
|
|
25726
25761
|
const height = Math.abs(gridY * value);
|
|
25727
25762
|
return {
|
|
25728
25763
|
x: minX + index * gridX,
|
|
25729
|
-
y: horizonY - height +
|
|
25764
|
+
y: horizonY - height + Number(value < 0) * height,
|
|
25730
25765
|
height,
|
|
25731
25766
|
value
|
|
25732
25767
|
};
|
|
@@ -27164,10 +27199,10 @@ const VTextarea = genericComponent()({
|
|
|
27164
27199
|
}
|
|
27165
27200
|
}
|
|
27166
27201
|
const sizerRef = ref();
|
|
27167
|
-
const rows = ref(
|
|
27202
|
+
const rows = ref(Number(props.rows));
|
|
27168
27203
|
const isPlainOrUnderlined = computed(() => ['plain', 'underlined'].includes(props.variant));
|
|
27169
27204
|
watchEffect(() => {
|
|
27170
|
-
if (!props.autoGrow) rows.value =
|
|
27205
|
+
if (!props.autoGrow) rows.value = Number(props.rows);
|
|
27171
27206
|
});
|
|
27172
27207
|
function calculateInputHeight() {
|
|
27173
27208
|
if (!props.autoGrow) return;
|
|
@@ -27210,7 +27245,7 @@ const VTextarea = genericComponent()({
|
|
|
27210
27245
|
modelValue: _,
|
|
27211
27246
|
...inputProps
|
|
27212
27247
|
} = VInput.filterProps(props);
|
|
27213
|
-
const fieldProps =
|
|
27248
|
+
const fieldProps = VField.filterProps(props);
|
|
27214
27249
|
return createVNode(VInput, mergeProps({
|
|
27215
27250
|
"ref": vInputRef,
|
|
27216
27251
|
"modelValue": model.value,
|
|
@@ -28214,8 +28249,8 @@ const makeVDateInputProps = propsFactory({
|
|
|
28214
28249
|
prependIcon: '$calendar'
|
|
28215
28250
|
}),
|
|
28216
28251
|
...omit(makeVDatePickerProps({
|
|
28217
|
-
|
|
28218
|
-
|
|
28252
|
+
hideHeader: true,
|
|
28253
|
+
showAdjacentMonths: true
|
|
28219
28254
|
}), ['active', 'location', 'rounded'])
|
|
28220
28255
|
}, 'VDateInput');
|
|
28221
28256
|
const VDateInput = genericComponent()({
|
|
@@ -28261,7 +28296,7 @@ const VDateInput = genericComponent()({
|
|
|
28261
28296
|
return;
|
|
28262
28297
|
}
|
|
28263
28298
|
const target = e.target;
|
|
28264
|
-
model.value = target.value;
|
|
28299
|
+
model.value = target.value === '' ? null : target.value;
|
|
28265
28300
|
}
|
|
28266
28301
|
function onClick(e) {
|
|
28267
28302
|
e.preventDefault();
|
|
@@ -28299,6 +28334,7 @@ const VDateInput = genericComponent()({
|
|
|
28299
28334
|
"onUpdate:modelValue": $event => menu.value = $event,
|
|
28300
28335
|
"activator": "parent",
|
|
28301
28336
|
"min-width": "0",
|
|
28337
|
+
"eager": isFocused.value,
|
|
28302
28338
|
"location": props.location,
|
|
28303
28339
|
"closeOnContentClick": false,
|
|
28304
28340
|
"openOnClick": false
|
|
@@ -28538,8 +28574,9 @@ const VFileUpload = genericComponent()({
|
|
|
28538
28574
|
inputRef.value?.click();
|
|
28539
28575
|
}
|
|
28540
28576
|
function onClickRemove(index) {
|
|
28541
|
-
|
|
28542
|
-
|
|
28577
|
+
const newValue = model.value.filter((_, i) => i !== index);
|
|
28578
|
+
model.value = newValue;
|
|
28579
|
+
if (newValue.length > 0 || !inputRef.value) return;
|
|
28543
28580
|
inputRef.value.value = '';
|
|
28544
28581
|
}
|
|
28545
28582
|
useRender(() => {
|
|
@@ -28750,7 +28787,7 @@ const VNumberInput = genericComponent()({
|
|
|
28750
28787
|
return isFocused.value ? Number(fixed).toString() // trim zeros
|
|
28751
28788
|
: fixed;
|
|
28752
28789
|
}
|
|
28753
|
-
const model = useProxiedModel(props, 'modelValue', null, val => val ?? null, val => val == null ? val ?? null : clamp(
|
|
28790
|
+
const model = useProxiedModel(props, 'modelValue', null, val => val ?? null, val => val == null ? val ?? null : clamp(Number(val), props.min, props.max));
|
|
28754
28791
|
const _inputText = shallowRef(null);
|
|
28755
28792
|
watchEffect(() => {
|
|
28756
28793
|
if (isFocused.value && !controlsDisabled.value) ; else if (model.value == null) {
|
|
@@ -28765,8 +28802,8 @@ const VNumberInput = genericComponent()({
|
|
|
28765
28802
|
if (val === null || val === '') {
|
|
28766
28803
|
model.value = null;
|
|
28767
28804
|
_inputText.value = null;
|
|
28768
|
-
} else if (!isNaN(
|
|
28769
|
-
model.value =
|
|
28805
|
+
} else if (!isNaN(Number(val)) && Number(val) <= props.max && Number(val) >= props.min) {
|
|
28806
|
+
model.value = Number(val);
|
|
28770
28807
|
_inputText.value = val;
|
|
28771
28808
|
}
|
|
28772
28809
|
}
|
|
@@ -28890,8 +28927,8 @@ const VNumberInput = genericComponent()({
|
|
|
28890
28927
|
if (controlsDisabled.value) return;
|
|
28891
28928
|
if (!vTextFieldRef.value) return;
|
|
28892
28929
|
const actualText = vTextFieldRef.value.value;
|
|
28893
|
-
if (actualText && !isNaN(
|
|
28894
|
-
inputText.value = correctPrecision(clamp(
|
|
28930
|
+
if (actualText && !isNaN(Number(actualText))) {
|
|
28931
|
+
inputText.value = correctPrecision(clamp(Number(actualText), props.min, props.max));
|
|
28895
28932
|
} else {
|
|
28896
28933
|
inputText.value = null;
|
|
28897
28934
|
}
|
|
@@ -29765,14 +29802,7 @@ const VTimePickerClock = genericComponent()({
|
|
|
29765
29802
|
}
|
|
29766
29803
|
});
|
|
29767
29804
|
|
|
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 || {});
|
|
29805
|
+
// Types
|
|
29776
29806
|
|
|
29777
29807
|
const makeVTimePickerControlsProps = propsFactory({
|
|
29778
29808
|
ampm: Boolean,
|
|
@@ -29786,15 +29816,15 @@ const makeVTimePickerControlsProps = propsFactory({
|
|
|
29786
29816
|
period: String,
|
|
29787
29817
|
readonly: Boolean,
|
|
29788
29818
|
useSeconds: Boolean,
|
|
29789
|
-
|
|
29790
|
-
|
|
29819
|
+
value: Number,
|
|
29820
|
+
viewMode: String
|
|
29791
29821
|
}, 'VTimePickerControls');
|
|
29792
29822
|
const VTimePickerControls = genericComponent()({
|
|
29793
29823
|
name: 'VTimePickerControls',
|
|
29794
29824
|
props: makeVTimePickerControlsProps(),
|
|
29795
29825
|
emits: {
|
|
29796
29826
|
'update:period': data => true,
|
|
29797
|
-
'update:
|
|
29827
|
+
'update:viewMode': data => true
|
|
29798
29828
|
},
|
|
29799
29829
|
setup(props, _ref) {
|
|
29800
29830
|
let {
|
|
@@ -29817,8 +29847,8 @@ const VTimePickerControls = genericComponent()({
|
|
|
29817
29847
|
'v-time-picker-controls__time--with-seconds': props.useSeconds
|
|
29818
29848
|
}
|
|
29819
29849
|
}, [createVNode(VBtn, {
|
|
29820
|
-
"active": props.
|
|
29821
|
-
"color": props.
|
|
29850
|
+
"active": props.viewMode === 'hour',
|
|
29851
|
+
"color": props.viewMode === 'hour' ? props.color : undefined,
|
|
29822
29852
|
"disabled": props.disabled,
|
|
29823
29853
|
"variant": "tonal",
|
|
29824
29854
|
"class": {
|
|
@@ -29827,24 +29857,24 @@ const VTimePickerControls = genericComponent()({
|
|
|
29827
29857
|
'v-time-picker-controls__time--with-seconds__btn': props.useSeconds
|
|
29828
29858
|
},
|
|
29829
29859
|
"text": props.hour == null ? '--' : pad(`${hour}`),
|
|
29830
|
-
"onClick": () => emit('update:
|
|
29860
|
+
"onClick": () => emit('update:viewMode', 'hour')
|
|
29831
29861
|
}, null), createVNode("span", {
|
|
29832
29862
|
"class": ['v-time-picker-controls__time__separator', {
|
|
29833
29863
|
'v-time-picker-controls--with-seconds__time__separator': props.useSeconds
|
|
29834
29864
|
}]
|
|
29835
29865
|
}, [createTextVNode(":")]), createVNode(VBtn, {
|
|
29836
|
-
"active": props.
|
|
29837
|
-
"color": props.
|
|
29866
|
+
"active": props.viewMode === 'minute',
|
|
29867
|
+
"color": props.viewMode === 'minute' ? props.color : undefined,
|
|
29838
29868
|
"class": {
|
|
29839
29869
|
'v-time-picker-controls__time__btn': true,
|
|
29840
|
-
'v-time-picker-controls__time__btn__active': props.
|
|
29870
|
+
'v-time-picker-controls__time__btn__active': props.viewMode === 'minute',
|
|
29841
29871
|
'v-time-picker-controls__time--with-ampm__btn': props.ampm,
|
|
29842
29872
|
'v-time-picker-controls__time--with-seconds__btn': props.useSeconds
|
|
29843
29873
|
},
|
|
29844
29874
|
"disabled": props.disabled,
|
|
29845
29875
|
"variant": "tonal",
|
|
29846
29876
|
"text": props.minute == null ? '--' : pad(props.minute),
|
|
29847
|
-
"onClick": () => emit('update:
|
|
29877
|
+
"onClick": () => emit('update:viewMode', 'minute')
|
|
29848
29878
|
}, null), props.useSeconds && createVNode("span", {
|
|
29849
29879
|
"class": ['v-time-picker-controls__time__separator', {
|
|
29850
29880
|
'v-time-picker-controls--with-seconds__time__separator': props.useSeconds
|
|
@@ -29852,11 +29882,13 @@ const VTimePickerControls = genericComponent()({
|
|
|
29852
29882
|
"key": "secondsDivider"
|
|
29853
29883
|
}, [createTextVNode(":")]), props.useSeconds && createVNode(VBtn, {
|
|
29854
29884
|
"key": "secondsVal",
|
|
29885
|
+
"active": props.viewMode === 'second',
|
|
29886
|
+
"color": props.viewMode === 'second' ? props.color : undefined,
|
|
29855
29887
|
"variant": "tonal",
|
|
29856
|
-
"onClick": () => emit('update:
|
|
29888
|
+
"onClick": () => emit('update:viewMode', 'second'),
|
|
29857
29889
|
"class": {
|
|
29858
29890
|
'v-time-picker-controls__time__btn': true,
|
|
29859
|
-
'v-time-picker-controls__time__btn__active': props.
|
|
29891
|
+
'v-time-picker-controls__time__btn__active': props.viewMode === 'second',
|
|
29860
29892
|
'v-time-picker-controls__time--with-seconds__btn': props.useSeconds
|
|
29861
29893
|
},
|
|
29862
29894
|
"disabled": props.disabled,
|
|
@@ -29901,11 +29933,6 @@ const rangeHours24 = createRange(24);
|
|
|
29901
29933
|
const rangeHours12am = createRange(12);
|
|
29902
29934
|
const rangeHours12pm = rangeHours12am.map(v => v + 12);
|
|
29903
29935
|
createRange(60);
|
|
29904
|
-
const selectingNames = {
|
|
29905
|
-
1: 'hour',
|
|
29906
|
-
2: 'minute',
|
|
29907
|
-
3: 'second'
|
|
29908
|
-
};
|
|
29909
29936
|
const makeVTimePickerProps = propsFactory({
|
|
29910
29937
|
allowedHours: [Function, Array],
|
|
29911
29938
|
allowedMinutes: [Function, Array],
|
|
@@ -29918,6 +29945,10 @@ const makeVTimePickerProps = propsFactory({
|
|
|
29918
29945
|
},
|
|
29919
29946
|
max: String,
|
|
29920
29947
|
min: String,
|
|
29948
|
+
viewMode: {
|
|
29949
|
+
type: String,
|
|
29950
|
+
default: 'hour'
|
|
29951
|
+
},
|
|
29921
29952
|
modelValue: null,
|
|
29922
29953
|
readonly: Boolean,
|
|
29923
29954
|
scrollable: Boolean,
|
|
@@ -29934,7 +29965,8 @@ const VTimePicker = genericComponent()({
|
|
|
29934
29965
|
'update:minute': val => true,
|
|
29935
29966
|
'update:period': val => true,
|
|
29936
29967
|
'update:second': val => true,
|
|
29937
|
-
'update:modelValue': val => true
|
|
29968
|
+
'update:modelValue': val => true,
|
|
29969
|
+
'update:viewMode': val => true
|
|
29938
29970
|
},
|
|
29939
29971
|
setup(props, _ref) {
|
|
29940
29972
|
let {
|
|
@@ -29951,7 +29983,7 @@ const VTimePicker = genericComponent()({
|
|
|
29951
29983
|
const lazyInputMinute = ref(null);
|
|
29952
29984
|
const lazyInputSecond = ref(null);
|
|
29953
29985
|
const period = ref('am');
|
|
29954
|
-
const
|
|
29986
|
+
const viewMode = useProxiedModel(props, 'viewMode', 'hour');
|
|
29955
29987
|
const controlsRef = ref(null);
|
|
29956
29988
|
const clockRef = ref(null);
|
|
29957
29989
|
const isAllowedHourCb = computed(() => {
|
|
@@ -29965,7 +29997,7 @@ const VTimePicker = genericComponent()({
|
|
|
29965
29997
|
const minHour = props.min ? Number(props.min.split(':')[0]) : 0;
|
|
29966
29998
|
const maxHour = props.max ? Number(props.max.split(':')[0]) : 23;
|
|
29967
29999
|
return val => {
|
|
29968
|
-
return val >= minHour
|
|
30000
|
+
return val >= Number(minHour) && val <= Number(maxHour) && (!cb || cb(val));
|
|
29969
30001
|
};
|
|
29970
30002
|
});
|
|
29971
30003
|
const isAllowedMinuteCb = computed(() => {
|
|
@@ -29981,8 +30013,8 @@ const VTimePicker = genericComponent()({
|
|
|
29981
30013
|
}
|
|
29982
30014
|
const [minHour, minMinute] = props.min ? props.min.split(':').map(Number) : [0, 0];
|
|
29983
30015
|
const [maxHour, maxMinute] = props.max ? props.max.split(':').map(Number) : [23, 59];
|
|
29984
|
-
const minTime = minHour * 60 + minMinute
|
|
29985
|
-
const maxTime = maxHour * 60 + maxMinute
|
|
30016
|
+
const minTime = minHour * 60 + Number(minMinute);
|
|
30017
|
+
const maxTime = maxHour * 60 + Number(maxMinute);
|
|
29986
30018
|
return val => {
|
|
29987
30019
|
const time = 60 * inputHour.value + val;
|
|
29988
30020
|
return time >= minTime && time <= maxTime && isHourAllowed && (!cb || cb(val));
|
|
@@ -30002,8 +30034,8 @@ const VTimePicker = genericComponent()({
|
|
|
30002
30034
|
}
|
|
30003
30035
|
const [minHour, minMinute, minSecond] = props.min ? props.min.split(':').map(Number) : [0, 0, 0];
|
|
30004
30036
|
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)
|
|
30037
|
+
const minTime = minHour * 3600 + minMinute * 60 + Number(minSecond || 0);
|
|
30038
|
+
const maxTime = maxHour * 3600 + maxMinute * 60 + Number(maxSecond || 0);
|
|
30007
30039
|
return val => {
|
|
30008
30040
|
const time = 3600 * inputHour.value + 60 * inputMinute.value + val;
|
|
30009
30041
|
return time >= minTime && time <= maxTime && isMinuteAllowed && (!cb || cb(val));
|
|
@@ -30069,16 +30101,16 @@ const VTimePicker = genericComponent()({
|
|
|
30069
30101
|
return true;
|
|
30070
30102
|
}
|
|
30071
30103
|
function onInput(value) {
|
|
30072
|
-
if (
|
|
30104
|
+
if (viewMode.value === 'hour') {
|
|
30073
30105
|
inputHour.value = isAmPm.value ? convert12to24(value, period.value) : value;
|
|
30074
|
-
} else if (
|
|
30106
|
+
} else if (viewMode.value === 'minute') {
|
|
30075
30107
|
inputMinute.value = value;
|
|
30076
30108
|
} else {
|
|
30077
30109
|
inputSecond.value = value;
|
|
30078
30110
|
}
|
|
30079
30111
|
}
|
|
30080
30112
|
function onChange(value) {
|
|
30081
|
-
switch (
|
|
30113
|
+
switch (viewMode.value || 'hour') {
|
|
30082
30114
|
case 'hour':
|
|
30083
30115
|
emit('update:hour', value);
|
|
30084
30116
|
break;
|
|
@@ -30090,10 +30122,10 @@ const VTimePicker = genericComponent()({
|
|
|
30090
30122
|
break;
|
|
30091
30123
|
}
|
|
30092
30124
|
const emitChange = inputHour.value !== null && inputMinute.value !== null && (props.useSeconds ? inputSecond.value !== null : true);
|
|
30093
|
-
if (
|
|
30094
|
-
|
|
30095
|
-
} else if (props.useSeconds &&
|
|
30096
|
-
|
|
30125
|
+
if (viewMode.value === 'hour') {
|
|
30126
|
+
viewMode.value = 'minute';
|
|
30127
|
+
} else if (props.useSeconds && viewMode.value === 'minute') {
|
|
30128
|
+
viewMode.value = 'second';
|
|
30097
30129
|
}
|
|
30098
30130
|
if (inputHour.value === lazyInputHour.value && inputMinute.value === lazyInputMinute.value && (!props.useSeconds || inputSecond.value === lazyInputSecond.value)) return;
|
|
30099
30131
|
const time = genValue();
|
|
@@ -30122,20 +30154,20 @@ const VTimePicker = genericComponent()({
|
|
|
30122
30154
|
"minute": inputMinute.value,
|
|
30123
30155
|
"period": period.value,
|
|
30124
30156
|
"second": inputSecond.value,
|
|
30125
|
-
"
|
|
30157
|
+
"viewMode": viewMode.value,
|
|
30126
30158
|
"onUpdate:period": val => setPeriod(val),
|
|
30127
|
-
"onUpdate:
|
|
30159
|
+
"onUpdate:viewMode": value => viewMode.value = value,
|
|
30128
30160
|
"ref": controlsRef
|
|
30129
30161
|
}), null),
|
|
30130
30162
|
default: () => createVNode(VTimePickerClock, mergeProps(timePickerClockProps, {
|
|
30131
|
-
"allowedValues":
|
|
30132
|
-
"double":
|
|
30133
|
-
"format":
|
|
30134
|
-
"max":
|
|
30135
|
-
"min":
|
|
30163
|
+
"allowedValues": viewMode.value === 'hour' ? isAllowedHourCb.value : viewMode.value === 'minute' ? isAllowedMinuteCb.value : isAllowedSecondCb.value,
|
|
30164
|
+
"double": viewMode.value === 'hour' && !isAmPm.value,
|
|
30165
|
+
"format": viewMode.value === 'hour' ? isAmPm.value ? convert24to12 : val => val : val => pad(val, 2),
|
|
30166
|
+
"max": viewMode.value === 'hour' ? isAmPm.value && period.value === 'am' ? 11 : 23 : 59,
|
|
30167
|
+
"min": viewMode.value === 'hour' && isAmPm.value && period.value === 'pm' ? 12 : 0,
|
|
30136
30168
|
"size": 20,
|
|
30137
|
-
"step":
|
|
30138
|
-
"modelValue":
|
|
30169
|
+
"step": viewMode.value === 'hour' ? 1 : 5,
|
|
30170
|
+
"modelValue": viewMode.value === 'hour' ? inputHour.value : viewMode.value === 'minute' ? inputMinute.value : inputSecond.value,
|
|
30139
30171
|
"onChange": onChange,
|
|
30140
30172
|
"onInput": onInput,
|
|
30141
30173
|
"ref": clockRef
|
|
@@ -31048,7 +31080,7 @@ function createVuetify$1() {
|
|
|
31048
31080
|
goTo
|
|
31049
31081
|
};
|
|
31050
31082
|
}
|
|
31051
|
-
const version$1 = "3.7.
|
|
31083
|
+
const version$1 = "3.7.18";
|
|
31052
31084
|
createVuetify$1.version = version$1;
|
|
31053
31085
|
|
|
31054
31086
|
// Vue's inject() can only be used in setup
|
|
@@ -31301,7 +31333,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
31301
31333
|
|
|
31302
31334
|
/* eslint-disable local-rules/sort-imports */
|
|
31303
31335
|
|
|
31304
|
-
const version = "3.7.
|
|
31336
|
+
const version = "3.7.18";
|
|
31305
31337
|
|
|
31306
31338
|
/* eslint-disable local-rules/sort-imports */
|
|
31307
31339
|
|