vuetify 3.5.16 → 3.5.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 +226 -30
- package/dist/json/importMap-labs.json +8 -4
- package/dist/json/importMap.json +126 -126
- package/dist/json/tags.json +54 -0
- package/dist/json/web-types.json +607 -84
- package/dist/vuetify-labs.css +2606 -2579
- package/dist/vuetify-labs.d.ts +742 -64
- package/dist/vuetify-labs.esm.js +356 -127
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +355 -126
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +2393 -2367
- package/dist/vuetify.d.ts +127 -62
- package/dist/vuetify.esm.js +169 -101
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +168 -100
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +181 -178
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAppBar/index.d.mts +1 -0
- package/lib/components/VAutocomplete/VAutocomplete.mjs +8 -10
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VBanner/VBanner.css +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbs.css +1 -1
- package/lib/components/VBtn/index.d.mts +1 -0
- package/lib/components/VBtnToggle/index.d.mts +1 -0
- package/lib/components/VCard/VCard.css +3 -3
- package/lib/components/VCarousel/VCarouselItem.mjs +1 -1
- package/lib/components/VCarousel/VCarouselItem.mjs.map +1 -1
- package/lib/components/VCarousel/index.d.mts +1 -0
- package/lib/components/VChip/VChip.css +1 -1
- package/lib/components/VChip/VChip.sass +1 -0
- package/lib/components/VChipGroup/index.d.mts +1 -0
- package/lib/components/VCombobox/VCombobox.mjs +8 -10
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.mjs +10 -0
- package/lib/components/VDatePicker/VDatePicker.mjs.map +1 -1
- package/lib/components/VDialog/VDialog.mjs +6 -2
- package/lib/components/VDialog/VDialog.mjs.map +1 -1
- package/lib/components/VDialog/__test__/VDialog.spec.cy.mjs +39 -0
- package/lib/components/VDialog/__test__/VDialog.spec.cy.mjs.map +1 -0
- package/lib/components/VDialog/index.d.mts +4 -10
- package/lib/components/VFileInput/VFileInput.mjs +1 -1
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/index.d.mts +17 -5
- package/lib/components/VInput/VInput.mjs +6 -1
- package/lib/components/VInput/VInput.mjs.map +1 -1
- package/lib/components/VInput/index.d.mts +6 -0
- package/lib/components/VList/VList.mjs +2 -1
- package/lib/components/VList/VList.mjs.map +1 -1
- package/lib/components/VList/VListItem.css +1 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +3 -3
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/touch.mjs +16 -2
- package/lib/components/VNavigationDrawer/touch.mjs.map +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.mjs +11 -1
- package/lib/components/VProgressLinear/VProgressLinear.mjs.map +1 -1
- package/lib/components/VProgressLinear/index.d.mts +21 -0
- package/lib/components/VRangeSlider/index.d.mts +6 -0
- package/lib/components/VSelect/VSelect.mjs +5 -1
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSlideGroup/index.d.mts +1 -0
- package/lib/components/VSlider/index.d.mts +6 -0
- package/lib/components/VSnackbar/VSnackbar.css +18 -4
- package/lib/components/VSnackbar/VSnackbar.mjs +26 -8
- package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.sass +19 -3
- package/lib/components/VSwitch/VSwitch.css +14 -2
- package/lib/components/VSwitch/VSwitch.sass +8 -2
- package/lib/components/VSystemBar/VSystemBar.css +1 -1
- package/lib/components/VTabs/index.d.mts +1 -0
- package/lib/components/VTextField/index.d.mts +15 -3
- package/lib/components/VTextarea/index.d.mts +15 -3
- package/lib/components/VWindow/index.d.mts +1 -0
- package/lib/components/index.d.mts +85 -21
- package/lib/composables/group.mjs +10 -1
- package/lib/composables/group.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.mts +42 -41
- package/lib/labs/VEmptyState/VEmptyState.css +3 -3
- package/lib/labs/VFab/VFab.css +1 -0
- package/lib/labs/VFab/VFab.mjs +3 -2
- package/lib/labs/VFab/VFab.mjs.map +1 -1
- package/lib/labs/VFab/VFab.sass +1 -0
- package/lib/labs/VFab/index.d.mts +10 -0
- package/lib/labs/VNumberInput/VNumberInput.mjs +79 -24
- package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
- package/lib/labs/VNumberInput/index.d.mts +56 -29
- package/lib/labs/VSnackbarQueue/VSnackbarQueue.mjs +112 -0
- package/lib/labs/VSnackbarQueue/VSnackbarQueue.mjs.map +1 -0
- package/lib/labs/VSnackbarQueue/index.d.mts +2693 -0
- package/lib/labs/VSnackbarQueue/index.mjs +2 -0
- package/lib/labs/VSnackbarQueue/index.mjs.map +1 -0
- package/lib/labs/VTimePicker/VTimePickerClock.mjs +1 -3
- package/lib/labs/VTimePicker/VTimePickerClock.mjs.map +1 -1
- package/lib/labs/VTimePicker/index.d.mts +6 -13
- package/lib/labs/components.d.mts +2893 -282
- package/lib/labs/components.mjs +1 -0
- package/lib/labs/components.mjs.map +1 -1
- package/lib/locale/af.mjs +1 -0
- package/lib/locale/af.mjs.map +1 -1
- package/lib/locale/ar.mjs +1 -0
- package/lib/locale/ar.mjs.map +1 -1
- package/lib/locale/az.mjs +1 -0
- package/lib/locale/az.mjs.map +1 -1
- package/lib/locale/bg.mjs +1 -0
- package/lib/locale/bg.mjs.map +1 -1
- package/lib/locale/ca.mjs +1 -0
- package/lib/locale/ca.mjs.map +1 -1
- package/lib/locale/ckb.mjs +1 -0
- package/lib/locale/ckb.mjs.map +1 -1
- package/lib/locale/cs.mjs +1 -0
- package/lib/locale/cs.mjs.map +1 -1
- package/lib/locale/da.mjs +1 -0
- package/lib/locale/da.mjs.map +1 -1
- package/lib/locale/de.mjs +1 -0
- package/lib/locale/de.mjs.map +1 -1
- package/lib/locale/el.mjs +1 -0
- package/lib/locale/el.mjs.map +1 -1
- package/lib/locale/en.mjs +1 -0
- package/lib/locale/en.mjs.map +1 -1
- package/lib/locale/es.mjs +1 -0
- package/lib/locale/es.mjs.map +1 -1
- package/lib/locale/et.mjs +1 -0
- package/lib/locale/et.mjs.map +1 -1
- package/lib/locale/fa.mjs +1 -0
- package/lib/locale/fa.mjs.map +1 -1
- package/lib/locale/fi.mjs +1 -0
- package/lib/locale/fi.mjs.map +1 -1
- package/lib/locale/fr.mjs +1 -0
- package/lib/locale/fr.mjs.map +1 -1
- package/lib/locale/he.mjs +1 -0
- package/lib/locale/he.mjs.map +1 -1
- package/lib/locale/hr.mjs +1 -0
- package/lib/locale/hr.mjs.map +1 -1
- package/lib/locale/hu.mjs +1 -0
- package/lib/locale/hu.mjs.map +1 -1
- package/lib/locale/id.mjs +1 -0
- package/lib/locale/id.mjs.map +1 -1
- package/lib/locale/index.d.mts +43 -0
- package/lib/locale/it.mjs +1 -0
- package/lib/locale/it.mjs.map +1 -1
- package/lib/locale/ja.mjs +1 -0
- package/lib/locale/ja.mjs.map +1 -1
- package/lib/locale/km.mjs +1 -0
- package/lib/locale/km.mjs.map +1 -1
- package/lib/locale/ko.mjs +1 -0
- package/lib/locale/ko.mjs.map +1 -1
- package/lib/locale/lt.mjs +1 -0
- package/lib/locale/lt.mjs.map +1 -1
- package/lib/locale/lv.mjs +1 -0
- package/lib/locale/lv.mjs.map +1 -1
- package/lib/locale/nl.mjs +1 -0
- package/lib/locale/nl.mjs.map +1 -1
- package/lib/locale/no.mjs +1 -0
- package/lib/locale/no.mjs.map +1 -1
- package/lib/locale/pl.mjs +1 -0
- package/lib/locale/pl.mjs.map +1 -1
- package/lib/locale/pt.mjs +1 -0
- package/lib/locale/pt.mjs.map +1 -1
- package/lib/locale/ro.mjs +1 -0
- package/lib/locale/ro.mjs.map +1 -1
- package/lib/locale/ru.mjs +1 -0
- package/lib/locale/ru.mjs.map +1 -1
- package/lib/locale/sk.mjs +1 -0
- package/lib/locale/sk.mjs.map +1 -1
- package/lib/locale/sl.mjs +1 -0
- package/lib/locale/sl.mjs.map +1 -1
- package/lib/locale/sr-Cyrl.mjs +1 -0
- package/lib/locale/sr-Cyrl.mjs.map +1 -1
- package/lib/locale/sr-Latn.mjs +1 -0
- package/lib/locale/sr-Latn.mjs.map +1 -1
- package/lib/locale/sv.mjs +1 -0
- package/lib/locale/sv.mjs.map +1 -1
- package/lib/locale/th.mjs +1 -0
- package/lib/locale/th.mjs.map +1 -1
- package/lib/locale/tr.mjs +1 -0
- package/lib/locale/tr.mjs.map +1 -1
- package/lib/locale/uk.mjs +1 -0
- package/lib/locale/uk.mjs.map +1 -1
- package/lib/locale/vi.mjs +1 -0
- package/lib/locale/vi.mjs.map +1 -1
- package/lib/locale/zh-Hans.mjs +1 -0
- package/lib/locale/zh-Hans.mjs.map +1 -1
- package/lib/locale/zh-Hant.mjs +1 -0
- package/lib/locale/zh-Hant.mjs.map +1 -1
- package/lib/styles/main.css +78 -78
- package/lib/styles/settings/_variables.scss +21 -14
- package/package.json +2 -2
package/dist/vuetify-labs.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.5.
|
|
2
|
+
* Vuetify v3.5.17
|
|
3
3
|
* Forged by John Leider
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { Fragment, reactive, computed, watchEffect, toRefs, capitalize, isVNode, Comment, unref, warn, ref, provide, shallowRef, inject as inject$1, defineComponent as defineComponent$1, camelize, h, getCurrentInstance as getCurrentInstance$1, onBeforeUnmount, watch, readonly, onDeactivated, onActivated, onMounted, onScopeDispose, effectScope, toRaw, createVNode, TransitionGroup, Transition, mergeProps, isRef, toRef, onBeforeMount, nextTick, withDirectives, resolveDirective, vShow, Text, resolveDynamicComponent, Teleport, cloneVNode, createTextVNode, onUnmounted, onBeforeUpdate, withModifiers, toDisplayString, vModelText } from 'vue';
|
|
7
|
+
import { Fragment, reactive, computed, watchEffect, toRefs, capitalize, isVNode, Comment, unref, warn, ref, provide, shallowRef, inject as inject$1, defineComponent as defineComponent$1, camelize, h, getCurrentInstance as getCurrentInstance$1, onBeforeUnmount, watch, readonly, onDeactivated, onActivated, onMounted, onScopeDispose, effectScope, toRaw, createVNode, TransitionGroup, Transition, mergeProps, isRef, toRef, onBeforeMount, nextTick, withDirectives, resolveDirective, vShow, onUpdated, Text, resolveDynamicComponent, Teleport, cloneVNode, createTextVNode, onUnmounted, onBeforeUpdate, withModifiers, toDisplayString, vModelText } from 'vue';
|
|
8
8
|
|
|
9
9
|
// Types
|
|
10
10
|
// eslint-disable-line vue/prefer-import-from-vue
|
|
@@ -1931,6 +1931,7 @@ var en = {
|
|
|
1931
1931
|
badge: 'Badge',
|
|
1932
1932
|
open: 'Open',
|
|
1933
1933
|
close: 'Close',
|
|
1934
|
+
dismiss: 'Dismiss',
|
|
1934
1935
|
confirmEdit: {
|
|
1935
1936
|
ok: 'OK',
|
|
1936
1937
|
cancel: 'Cancel'
|
|
@@ -4155,6 +4156,7 @@ function useGroup(props, injectKey) {
|
|
|
4155
4156
|
const index = children.indexOf(vm);
|
|
4156
4157
|
if (unref(unwrapped.value) == null) {
|
|
4157
4158
|
unwrapped.value = index;
|
|
4159
|
+
unwrapped.useIndexAsValue = true;
|
|
4158
4160
|
}
|
|
4159
4161
|
if (index > -1) {
|
|
4160
4162
|
items.splice(index, 0, unwrapped);
|
|
@@ -4187,6 +4189,14 @@ function useGroup(props, injectKey) {
|
|
|
4187
4189
|
onBeforeUnmount(() => {
|
|
4188
4190
|
isUnmounted = true;
|
|
4189
4191
|
});
|
|
4192
|
+
onUpdated(() => {
|
|
4193
|
+
// #19655 update the items that use the index as the value.
|
|
4194
|
+
for (let i = 0; i < items.length; i++) {
|
|
4195
|
+
if (items[i].useIndexAsValue) {
|
|
4196
|
+
items[i].value = i;
|
|
4197
|
+
}
|
|
4198
|
+
}
|
|
4199
|
+
});
|
|
4190
4200
|
function select(id, value) {
|
|
4191
4201
|
const item = items.find(item => item.id === id);
|
|
4192
4202
|
if (value && item?.disabled) return;
|
|
@@ -4775,6 +4785,65 @@ const VProgressCircular = genericComponent()({
|
|
|
4775
4785
|
}
|
|
4776
4786
|
});
|
|
4777
4787
|
|
|
4788
|
+
// Composables
|
|
4789
|
+
|
|
4790
|
+
// Types
|
|
4791
|
+
|
|
4792
|
+
const oppositeMap = {
|
|
4793
|
+
center: 'center',
|
|
4794
|
+
top: 'bottom',
|
|
4795
|
+
bottom: 'top',
|
|
4796
|
+
left: 'right',
|
|
4797
|
+
right: 'left'
|
|
4798
|
+
};
|
|
4799
|
+
const makeLocationProps = propsFactory({
|
|
4800
|
+
location: String
|
|
4801
|
+
}, 'location');
|
|
4802
|
+
function useLocation(props) {
|
|
4803
|
+
let opposite = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
4804
|
+
let offset = arguments.length > 2 ? arguments[2] : undefined;
|
|
4805
|
+
const {
|
|
4806
|
+
isRtl
|
|
4807
|
+
} = useRtl();
|
|
4808
|
+
const locationStyles = computed(() => {
|
|
4809
|
+
if (!props.location) return {};
|
|
4810
|
+
const {
|
|
4811
|
+
side,
|
|
4812
|
+
align
|
|
4813
|
+
} = parseAnchor(props.location.split(' ').length > 1 ? props.location : `${props.location} center`, isRtl.value);
|
|
4814
|
+
function getOffset(side) {
|
|
4815
|
+
return offset ? offset(side) : 0;
|
|
4816
|
+
}
|
|
4817
|
+
const styles = {};
|
|
4818
|
+
if (side !== 'center') {
|
|
4819
|
+
if (opposite) styles[oppositeMap[side]] = `calc(100% - ${getOffset(side)}px)`;else styles[side] = 0;
|
|
4820
|
+
}
|
|
4821
|
+
if (align !== 'center') {
|
|
4822
|
+
if (opposite) styles[oppositeMap[align]] = `calc(100% - ${getOffset(align)}px)`;else styles[align] = 0;
|
|
4823
|
+
} else {
|
|
4824
|
+
if (side === 'center') styles.top = styles.left = '50%';else {
|
|
4825
|
+
styles[{
|
|
4826
|
+
top: 'left',
|
|
4827
|
+
bottom: 'left',
|
|
4828
|
+
left: 'top',
|
|
4829
|
+
right: 'top'
|
|
4830
|
+
}[side]] = '50%';
|
|
4831
|
+
}
|
|
4832
|
+
styles.transform = {
|
|
4833
|
+
top: 'translateX(-50%)',
|
|
4834
|
+
bottom: 'translateX(-50%)',
|
|
4835
|
+
left: 'translateY(-50%)',
|
|
4836
|
+
right: 'translateY(-50%)',
|
|
4837
|
+
center: 'translate(-50%, -50%)'
|
|
4838
|
+
}[side];
|
|
4839
|
+
}
|
|
4840
|
+
return styles;
|
|
4841
|
+
});
|
|
4842
|
+
return {
|
|
4843
|
+
locationStyles
|
|
4844
|
+
};
|
|
4845
|
+
}
|
|
4846
|
+
|
|
4778
4847
|
const makeVProgressLinearProps = propsFactory({
|
|
4779
4848
|
absolute: Boolean,
|
|
4780
4849
|
active: {
|
|
@@ -4807,6 +4876,9 @@ const makeVProgressLinearProps = propsFactory({
|
|
|
4807
4876
|
striped: Boolean,
|
|
4808
4877
|
roundedBar: Boolean,
|
|
4809
4878
|
...makeComponentProps(),
|
|
4879
|
+
...makeLocationProps({
|
|
4880
|
+
location: 'top'
|
|
4881
|
+
}),
|
|
4810
4882
|
...makeRoundedProps(),
|
|
4811
4883
|
...makeTagProps(),
|
|
4812
4884
|
...makeThemeProps()
|
|
@@ -4829,6 +4901,9 @@ const VProgressLinear = genericComponent()({
|
|
|
4829
4901
|
const {
|
|
4830
4902
|
themeClasses
|
|
4831
4903
|
} = provideTheme(props);
|
|
4904
|
+
const {
|
|
4905
|
+
locationStyles
|
|
4906
|
+
} = useLocation(props);
|
|
4832
4907
|
const {
|
|
4833
4908
|
textColorClasses,
|
|
4834
4909
|
textColorStyles
|
|
@@ -4878,8 +4953,11 @@ const VProgressLinear = genericComponent()({
|
|
|
4878
4953
|
'v-progress-linear--striped': props.striped
|
|
4879
4954
|
}, roundedClasses.value, themeClasses.value, rtlClasses.value, props.class],
|
|
4880
4955
|
"style": [{
|
|
4956
|
+
bottom: props.location === 'bottom' ? 0 : undefined,
|
|
4957
|
+
top: props.location === 'top' ? 0 : undefined,
|
|
4881
4958
|
height: props.active ? convertToUnit(height.value) : 0,
|
|
4882
|
-
'--v-progress-linear-height': convertToUnit(height.value)
|
|
4959
|
+
'--v-progress-linear-height': convertToUnit(height.value),
|
|
4960
|
+
...(props.absolute ? locationStyles.value : {})
|
|
4883
4961
|
}, props.style],
|
|
4884
4962
|
"role": "progressbar",
|
|
4885
4963
|
"aria-hidden": props.active ? 'false' : 'true',
|
|
@@ -4965,65 +5043,6 @@ function LoaderSlot(props, _ref) {
|
|
|
4965
5043
|
}, null)]);
|
|
4966
5044
|
}
|
|
4967
5045
|
|
|
4968
|
-
// Composables
|
|
4969
|
-
|
|
4970
|
-
// Types
|
|
4971
|
-
|
|
4972
|
-
const oppositeMap = {
|
|
4973
|
-
center: 'center',
|
|
4974
|
-
top: 'bottom',
|
|
4975
|
-
bottom: 'top',
|
|
4976
|
-
left: 'right',
|
|
4977
|
-
right: 'left'
|
|
4978
|
-
};
|
|
4979
|
-
const makeLocationProps = propsFactory({
|
|
4980
|
-
location: String
|
|
4981
|
-
}, 'location');
|
|
4982
|
-
function useLocation(props) {
|
|
4983
|
-
let opposite = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
4984
|
-
let offset = arguments.length > 2 ? arguments[2] : undefined;
|
|
4985
|
-
const {
|
|
4986
|
-
isRtl
|
|
4987
|
-
} = useRtl();
|
|
4988
|
-
const locationStyles = computed(() => {
|
|
4989
|
-
if (!props.location) return {};
|
|
4990
|
-
const {
|
|
4991
|
-
side,
|
|
4992
|
-
align
|
|
4993
|
-
} = parseAnchor(props.location.split(' ').length > 1 ? props.location : `${props.location} center`, isRtl.value);
|
|
4994
|
-
function getOffset(side) {
|
|
4995
|
-
return offset ? offset(side) : 0;
|
|
4996
|
-
}
|
|
4997
|
-
const styles = {};
|
|
4998
|
-
if (side !== 'center') {
|
|
4999
|
-
if (opposite) styles[oppositeMap[side]] = `calc(100% - ${getOffset(side)}px)`;else styles[side] = 0;
|
|
5000
|
-
}
|
|
5001
|
-
if (align !== 'center') {
|
|
5002
|
-
if (opposite) styles[oppositeMap[align]] = `calc(100% - ${getOffset(align)}px)`;else styles[align] = 0;
|
|
5003
|
-
} else {
|
|
5004
|
-
if (side === 'center') styles.top = styles.left = '50%';else {
|
|
5005
|
-
styles[{
|
|
5006
|
-
top: 'left',
|
|
5007
|
-
bottom: 'left',
|
|
5008
|
-
left: 'top',
|
|
5009
|
-
right: 'top'
|
|
5010
|
-
}[side]] = '50%';
|
|
5011
|
-
}
|
|
5012
|
-
styles.transform = {
|
|
5013
|
-
top: 'translateX(-50%)',
|
|
5014
|
-
bottom: 'translateX(-50%)',
|
|
5015
|
-
left: 'translateY(-50%)',
|
|
5016
|
-
right: 'translateY(-50%)',
|
|
5017
|
-
center: 'translate(-50%, -50%)'
|
|
5018
|
-
}[side];
|
|
5019
|
-
}
|
|
5020
|
-
return styles;
|
|
5021
|
-
});
|
|
5022
|
-
return {
|
|
5023
|
-
locationStyles
|
|
5024
|
-
};
|
|
5025
|
-
}
|
|
5026
|
-
|
|
5027
5046
|
// Utilities
|
|
5028
5047
|
|
|
5029
5048
|
// Types
|
|
@@ -6738,6 +6757,7 @@ const makeVInputProps = propsFactory({
|
|
|
6738
6757
|
'onClick:append': EventProp(),
|
|
6739
6758
|
...makeComponentProps(),
|
|
6740
6759
|
...makeDensityProps(),
|
|
6760
|
+
...makeThemeProps(),
|
|
6741
6761
|
...makeValidationProps()
|
|
6742
6762
|
}, 'VInput');
|
|
6743
6763
|
const VInput = genericComponent()({
|
|
@@ -6757,6 +6777,9 @@ const VInput = genericComponent()({
|
|
|
6757
6777
|
const {
|
|
6758
6778
|
densityClasses
|
|
6759
6779
|
} = useDensity(props);
|
|
6780
|
+
const {
|
|
6781
|
+
themeClasses
|
|
6782
|
+
} = provideTheme(props);
|
|
6760
6783
|
const {
|
|
6761
6784
|
rtlClasses
|
|
6762
6785
|
} = useRtl();
|
|
@@ -6810,7 +6833,7 @@ const VInput = genericComponent()({
|
|
|
6810
6833
|
"class": ['v-input', `v-input--${props.direction}`, {
|
|
6811
6834
|
'v-input--center-affix': props.centerAffix,
|
|
6812
6835
|
'v-input--hide-spin-buttons': props.hideSpinButtons
|
|
6813
|
-
}, densityClasses.value, rtlClasses.value, validationClasses.value, props.class],
|
|
6836
|
+
}, densityClasses.value, themeClasses.value, rtlClasses.value, validationClasses.value, props.class],
|
|
6814
6837
|
"style": props.style
|
|
6815
6838
|
}, [hasPrepend && createVNode("div", {
|
|
6816
6839
|
"key": "prepend",
|
|
@@ -9166,7 +9189,8 @@ const VList = genericComponent()({
|
|
|
9166
9189
|
if (!isFocused.value && !(e.relatedTarget && contentRef.value?.contains(e.relatedTarget))) focus();
|
|
9167
9190
|
}
|
|
9168
9191
|
function onKeydown(e) {
|
|
9169
|
-
|
|
9192
|
+
const target = e.target;
|
|
9193
|
+
if (!contentRef.value || ['INPUT', 'TEXTAREA'].includes(target.tagName)) return;
|
|
9170
9194
|
if (e.key === 'ArrowDown') {
|
|
9171
9195
|
focus('next');
|
|
9172
9196
|
} else if (e.key === 'ArrowUp') {
|
|
@@ -12080,6 +12104,10 @@ const VSelect = genericComponent()({
|
|
|
12080
12104
|
const item = items.value.find(item => item.title.toLowerCase().startsWith(keyboardLookupPrefix));
|
|
12081
12105
|
if (item !== undefined) {
|
|
12082
12106
|
model.value = [item];
|
|
12107
|
+
const index = displayItems.value.indexOf(item);
|
|
12108
|
+
IN_BROWSER && window.requestAnimationFrame(() => {
|
|
12109
|
+
index >= 0 && vVirtualScrollRef.value?.scrollToIndex(index);
|
|
12110
|
+
});
|
|
12083
12111
|
}
|
|
12084
12112
|
}
|
|
12085
12113
|
|
|
@@ -12128,7 +12156,7 @@ const VSelect = genericComponent()({
|
|
|
12128
12156
|
vTextFieldRef.value.value = '';
|
|
12129
12157
|
}
|
|
12130
12158
|
}
|
|
12131
|
-
watch(
|
|
12159
|
+
watch(menu, () => {
|
|
12132
12160
|
if (!props.hideSelected && menu.value && model.value.length) {
|
|
12133
12161
|
const index = displayItems.value.findIndex(item => model.value.some(s => props.valueComparator(s.value, item.value)));
|
|
12134
12162
|
IN_BROWSER && window.requestAnimationFrame(() => {
|
|
@@ -12582,16 +12610,14 @@ const VAutocomplete = genericComponent()({
|
|
|
12582
12610
|
listRef.value?.focus('next');
|
|
12583
12611
|
}
|
|
12584
12612
|
if (['Backspace', 'Delete'].includes(e.key)) {
|
|
12585
|
-
if (!props.multiple && hasSelectionSlot.value && model.value.length > 0) return select(model.value[0], false);
|
|
12586
|
-
if (selectionIndex.value
|
|
12587
|
-
|
|
12588
|
-
|
|
12589
|
-
|
|
12590
|
-
|
|
12613
|
+
if (!props.multiple && hasSelectionSlot.value && model.value.length > 0 && !search.value) return select(model.value[0], false);
|
|
12614
|
+
if (~selectionIndex.value) {
|
|
12615
|
+
const originalSelectionIndex = selectionIndex.value;
|
|
12616
|
+
select(model.value[selectionIndex.value], false);
|
|
12617
|
+
selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
|
|
12618
|
+
} else if (e.key === 'Backspace' && !search.value) {
|
|
12619
|
+
selectionIndex.value = length - 1;
|
|
12591
12620
|
}
|
|
12592
|
-
const originalSelectionIndex = selectionIndex.value;
|
|
12593
|
-
select(model.value[selectionIndex.value], false);
|
|
12594
|
-
selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
|
|
12595
12621
|
}
|
|
12596
12622
|
if (!props.multiple) return;
|
|
12597
12623
|
if (e.key === 'ArrowLeft') {
|
|
@@ -12639,7 +12665,7 @@ const VAutocomplete = genericComponent()({
|
|
|
12639
12665
|
listHasFocus.value = false;
|
|
12640
12666
|
}
|
|
12641
12667
|
function onUpdateModelValue(v) {
|
|
12642
|
-
if (v == null || v === '' && !props.multiple) model.value = [];
|
|
12668
|
+
if (v == null || v === '' && !props.multiple && !hasSelectionSlot.value) model.value = [];
|
|
12643
12669
|
}
|
|
12644
12670
|
const isSelecting = shallowRef(false);
|
|
12645
12671
|
|
|
@@ -13277,12 +13303,12 @@ const VDialog = genericComponent()({
|
|
|
13277
13303
|
name: 'VDialog',
|
|
13278
13304
|
props: makeVDialogProps(),
|
|
13279
13305
|
emits: {
|
|
13280
|
-
'click:outside': e => true,
|
|
13281
13306
|
'update:modelValue': value => true,
|
|
13282
13307
|
afterLeave: () => true
|
|
13283
13308
|
},
|
|
13284
13309
|
setup(props, _ref) {
|
|
13285
13310
|
let {
|
|
13311
|
+
emit,
|
|
13286
13312
|
slots
|
|
13287
13313
|
} = _ref;
|
|
13288
13314
|
const isActive = useProxiedModel(props, 'modelValue');
|
|
@@ -13325,6 +13351,9 @@ const VDialog = genericComponent()({
|
|
|
13325
13351
|
});
|
|
13326
13352
|
}
|
|
13327
13353
|
}
|
|
13354
|
+
function onAfterLeave() {
|
|
13355
|
+
emit('afterLeave');
|
|
13356
|
+
}
|
|
13328
13357
|
watch(isActive, async val => {
|
|
13329
13358
|
if (!val) {
|
|
13330
13359
|
await nextTick();
|
|
@@ -13356,7 +13385,8 @@ const VDialog = genericComponent()({
|
|
|
13356
13385
|
"activatorProps": activatorProps,
|
|
13357
13386
|
"contentProps": contentProps,
|
|
13358
13387
|
"role": "dialog",
|
|
13359
|
-
"onAfterEnter": onAfterEnter
|
|
13388
|
+
"onAfterEnter": onAfterEnter,
|
|
13389
|
+
"onAfterLeave": onAfterLeave
|
|
13360
13390
|
}, scopeId), {
|
|
13361
13391
|
activator: slots.activator,
|
|
13362
13392
|
default: function () {
|
|
@@ -14406,7 +14436,7 @@ const VCarouselItem = genericComponent()({
|
|
|
14406
14436
|
const imgProps = VImg.filterProps(props);
|
|
14407
14437
|
const windowItemProps = VWindowItem.filterProps(props);
|
|
14408
14438
|
return createVNode(VWindowItem, mergeProps({
|
|
14409
|
-
"class":
|
|
14439
|
+
"class": ['v-carousel-item', props.class]
|
|
14410
14440
|
}, windowItemProps), {
|
|
14411
14441
|
default: () => [createVNode(VImg, mergeProps(attrs, imgProps), slots)]
|
|
14412
14442
|
});
|
|
@@ -16411,16 +16441,14 @@ const VCombobox = genericComponent()({
|
|
|
16411
16441
|
if (hasSelectionSlot.value) _search.value = '';
|
|
16412
16442
|
}
|
|
16413
16443
|
if (['Backspace', 'Delete'].includes(e.key)) {
|
|
16414
|
-
if (!props.multiple && hasSelectionSlot.value && model.value.length > 0) return select(model.value[0], false);
|
|
16415
|
-
if (selectionIndex.value
|
|
16416
|
-
|
|
16417
|
-
|
|
16418
|
-
|
|
16419
|
-
|
|
16444
|
+
if (!props.multiple && hasSelectionSlot.value && model.value.length > 0 && !search.value) return select(model.value[0], false);
|
|
16445
|
+
if (~selectionIndex.value) {
|
|
16446
|
+
const originalSelectionIndex = selectionIndex.value;
|
|
16447
|
+
select(model.value[selectionIndex.value], false);
|
|
16448
|
+
selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
|
|
16449
|
+
} else if (e.key === 'Backspace' && !search.value) {
|
|
16450
|
+
selectionIndex.value = length - 1;
|
|
16420
16451
|
}
|
|
16421
|
-
const originalSelectionIndex = selectionIndex.value;
|
|
16422
|
-
select(model.value[selectionIndex.value], false);
|
|
16423
|
-
selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
|
|
16424
16452
|
}
|
|
16425
16453
|
if (!props.multiple) return;
|
|
16426
16454
|
if (e.key === 'ArrowLeft') {
|
|
@@ -16489,7 +16517,7 @@ const VCombobox = genericComponent()({
|
|
|
16489
16517
|
listHasFocus.value = false;
|
|
16490
16518
|
}
|
|
16491
16519
|
function onUpdateModelValue(v) {
|
|
16492
|
-
if (v == null || v === '' && !props.multiple) model.value = [];
|
|
16520
|
+
if (v == null || v === '' && !props.multiple && !hasSelectionSlot.value) model.value = [];
|
|
16493
16521
|
}
|
|
16494
16522
|
watch(isFocused, (val, oldVal) => {
|
|
16495
16523
|
if (val || val === oldVal) return;
|
|
@@ -21352,6 +21380,16 @@ const VDatePicker = genericComponent()({
|
|
|
21352
21380
|
watch(model, (val, oldVal) => {
|
|
21353
21381
|
const before = adapter.date(wrapInArray(val)[0]);
|
|
21354
21382
|
const after = adapter.date(wrapInArray(oldVal)[0]);
|
|
21383
|
+
const newMonth = adapter.getMonth(before);
|
|
21384
|
+
const newYear = adapter.getYear(before);
|
|
21385
|
+
if (newMonth !== month.value) {
|
|
21386
|
+
month.value = newMonth;
|
|
21387
|
+
onUpdateMonth(month.value);
|
|
21388
|
+
}
|
|
21389
|
+
if (newYear !== year.value) {
|
|
21390
|
+
year.value = newYear;
|
|
21391
|
+
onUpdateYear(year.value);
|
|
21392
|
+
}
|
|
21355
21393
|
isReversing.value = adapter.isBefore(before, after);
|
|
21356
21394
|
});
|
|
21357
21395
|
useRender(() => {
|
|
@@ -21705,7 +21743,7 @@ const makeVFileInputProps = propsFactory({
|
|
|
21705
21743
|
}),
|
|
21706
21744
|
modelValue: {
|
|
21707
21745
|
type: [Array, Object],
|
|
21708
|
-
default:
|
|
21746
|
+
default: props => props.multiple ? [] : null,
|
|
21709
21747
|
validator: val => {
|
|
21710
21748
|
return wrapInArray(val).every(v => v != null && typeof v === 'object');
|
|
21711
21749
|
}
|
|
@@ -22734,6 +22772,7 @@ function oops$1() {
|
|
|
22734
22772
|
|
|
22735
22773
|
function useTouch(_ref) {
|
|
22736
22774
|
let {
|
|
22775
|
+
el,
|
|
22737
22776
|
isActive,
|
|
22738
22777
|
isTemporary,
|
|
22739
22778
|
width,
|
|
@@ -22783,10 +22822,10 @@ function useTouch(_ref) {
|
|
|
22783
22822
|
const inTouchZone = position.value === 'left' ? touchX < touchZone : position.value === 'right' ? touchX > document.documentElement.clientWidth - touchZone : position.value === 'top' ? touchY < touchZone : position.value === 'bottom' ? touchY > document.documentElement.clientHeight - touchZone : oops();
|
|
22784
22823
|
const inElement = isActive.value && (position.value === 'left' ? touchX < width.value : position.value === 'right' ? touchX > document.documentElement.clientWidth - width.value : position.value === 'top' ? touchY < width.value : position.value === 'bottom' ? touchY > document.documentElement.clientHeight - width.value : oops());
|
|
22785
22824
|
if (inTouchZone || inElement || isActive.value && isTemporary.value) {
|
|
22786
|
-
maybeDragging = true;
|
|
22787
22825
|
start = [touchX, touchY];
|
|
22788
22826
|
offset.value = getOffset(isHorizontal.value ? touchX : touchY, isActive.value);
|
|
22789
22827
|
dragProgress.value = getProgress(isHorizontal.value ? touchX : touchY);
|
|
22828
|
+
maybeDragging = offset.value > -20 && offset.value < 80;
|
|
22790
22829
|
endTouch(e);
|
|
22791
22830
|
addMovement(e);
|
|
22792
22831
|
}
|
|
@@ -22846,6 +22885,18 @@ function useTouch(_ref) {
|
|
|
22846
22885
|
transition: 'none'
|
|
22847
22886
|
} : undefined;
|
|
22848
22887
|
});
|
|
22888
|
+
useToggleScope(isDragging, () => {
|
|
22889
|
+
const transform = el.value?.style.transform ?? null;
|
|
22890
|
+
const transition = el.value?.style.transition ?? null;
|
|
22891
|
+
watchEffect(() => {
|
|
22892
|
+
el.value?.style.setProperty('transform', dragStyles.value?.transform || 'none');
|
|
22893
|
+
el.value?.style.setProperty('transition', dragStyles.value?.transition || null);
|
|
22894
|
+
});
|
|
22895
|
+
onScopeDispose(() => {
|
|
22896
|
+
el.value?.style.setProperty('transform', transform);
|
|
22897
|
+
el.value?.style.setProperty('transition', transition);
|
|
22898
|
+
});
|
|
22899
|
+
});
|
|
22849
22900
|
return {
|
|
22850
22901
|
isDragging,
|
|
22851
22902
|
dragProgress,
|
|
@@ -22978,9 +23029,9 @@ const VNavigationDrawer = genericComponent()({
|
|
|
22978
23029
|
});
|
|
22979
23030
|
const {
|
|
22980
23031
|
isDragging,
|
|
22981
|
-
dragProgress
|
|
22982
|
-
dragStyles
|
|
23032
|
+
dragProgress
|
|
22983
23033
|
} = useTouch({
|
|
23034
|
+
el: rootEl,
|
|
22984
23035
|
isActive,
|
|
22985
23036
|
isTemporary,
|
|
22986
23037
|
width,
|
|
@@ -23050,7 +23101,7 @@ const VNavigationDrawer = genericComponent()({
|
|
|
23050
23101
|
'v-navigation-drawer--active': isActive.value,
|
|
23051
23102
|
'v-navigation-drawer--sticky': isSticky.value
|
|
23052
23103
|
}, themeClasses.value, backgroundColorClasses.value, borderClasses.value, displayClasses.value, elevationClasses.value, roundedClasses.value, props.class],
|
|
23053
|
-
"style": [backgroundColorStyles.value, layoutItemStyles.value,
|
|
23104
|
+
"style": [backgroundColorStyles.value, layoutItemStyles.value, ssrBootStyles.value, stickyStyles.value, props.style]
|
|
23054
23105
|
}, scopeId, attrs), {
|
|
23055
23106
|
default: () => [hasImage && createVNode("div", {
|
|
23056
23107
|
"key": "image",
|
|
@@ -24161,8 +24212,8 @@ const VSnackbar = genericComponent()({
|
|
|
24161
24212
|
} = _ref;
|
|
24162
24213
|
const isActive = useProxiedModel(props, 'modelValue');
|
|
24163
24214
|
const {
|
|
24164
|
-
|
|
24165
|
-
} =
|
|
24215
|
+
mainStyles
|
|
24216
|
+
} = useLayout();
|
|
24166
24217
|
const {
|
|
24167
24218
|
positionClasses
|
|
24168
24219
|
} = usePosition(props);
|
|
@@ -24184,6 +24235,7 @@ const VSnackbar = genericComponent()({
|
|
|
24184
24235
|
const overlay = ref();
|
|
24185
24236
|
const timerRef = ref();
|
|
24186
24237
|
const isHovering = shallowRef(false);
|
|
24238
|
+
const startY = shallowRef(0);
|
|
24187
24239
|
watch(isActive, startTimeout);
|
|
24188
24240
|
watch(() => props.timeout, startTimeout);
|
|
24189
24241
|
onMounted(() => {
|
|
@@ -24213,6 +24265,20 @@ const VSnackbar = genericComponent()({
|
|
|
24213
24265
|
isHovering.value = false;
|
|
24214
24266
|
startTimeout();
|
|
24215
24267
|
}
|
|
24268
|
+
function onTouchstart(event) {
|
|
24269
|
+
startY.value = event.touches[0].clientY;
|
|
24270
|
+
}
|
|
24271
|
+
function onTouchend(event) {
|
|
24272
|
+
if (Math.abs(startY.value - event.changedTouches[0].clientY) > 50) {
|
|
24273
|
+
isActive.value = false;
|
|
24274
|
+
}
|
|
24275
|
+
}
|
|
24276
|
+
const locationClasses = computed(() => {
|
|
24277
|
+
return props.location.split(' ').reduce((acc, loc) => {
|
|
24278
|
+
acc[`v-snackbar--${loc}`] = true;
|
|
24279
|
+
return acc;
|
|
24280
|
+
}, {});
|
|
24281
|
+
});
|
|
24216
24282
|
useRender(() => {
|
|
24217
24283
|
const overlayProps = VOverlay.filterProps(props);
|
|
24218
24284
|
const hasContent = !!(slots.default || slots.text || props.text);
|
|
@@ -24223,14 +24289,14 @@ const VSnackbar = genericComponent()({
|
|
|
24223
24289
|
'v-snackbar--multi-line': props.multiLine && !props.vertical,
|
|
24224
24290
|
'v-snackbar--timer': !!props.timer,
|
|
24225
24291
|
'v-snackbar--vertical': props.vertical
|
|
24226
|
-
}, positionClasses.value, props.class],
|
|
24227
|
-
"style": props.style
|
|
24292
|
+
}, locationClasses.value, positionClasses.value, props.class],
|
|
24293
|
+
"style": [mainStyles.value, props.style]
|
|
24228
24294
|
}, overlayProps, {
|
|
24229
24295
|
"modelValue": isActive.value,
|
|
24230
24296
|
"onUpdate:modelValue": $event => isActive.value = $event,
|
|
24231
24297
|
"contentProps": mergeProps({
|
|
24232
24298
|
class: ['v-snackbar__wrapper', themeClasses.value, colorClasses.value, roundedClasses.value, variantClasses.value],
|
|
24233
|
-
style: [
|
|
24299
|
+
style: [colorStyles.value],
|
|
24234
24300
|
onPointerenter,
|
|
24235
24301
|
onPointerleave
|
|
24236
24302
|
}, overlayProps.contentProps),
|
|
@@ -24238,7 +24304,9 @@ const VSnackbar = genericComponent()({
|
|
|
24238
24304
|
"noClickAnimation": true,
|
|
24239
24305
|
"scrim": false,
|
|
24240
24306
|
"scrollStrategy": "none",
|
|
24241
|
-
"_disableGlobalStack": true
|
|
24307
|
+
"_disableGlobalStack": true,
|
|
24308
|
+
"onTouchstart": onTouchstart,
|
|
24309
|
+
"onTouchend": onTouchend
|
|
24242
24310
|
}, scopeId), {
|
|
24243
24311
|
default: () => [genOverlays(false, 'v-snackbar'), props.timer && !isHovering.value && createVNode("div", {
|
|
24244
24312
|
"key": "timer",
|
|
@@ -26410,6 +26478,7 @@ const makeVFabProps = propsFactory({
|
|
|
26410
26478
|
app: Boolean,
|
|
26411
26479
|
appear: Boolean,
|
|
26412
26480
|
extended: Boolean,
|
|
26481
|
+
layout: Boolean,
|
|
26413
26482
|
location: {
|
|
26414
26483
|
type: String,
|
|
26415
26484
|
default: 'bottom end'
|
|
@@ -26460,8 +26529,8 @@ const VFab = genericComponent()({
|
|
|
26460
26529
|
id: props.name,
|
|
26461
26530
|
order: computed(() => parseInt(props.order, 10)),
|
|
26462
26531
|
position,
|
|
26463
|
-
layoutSize: height,
|
|
26464
|
-
elementSize: computed(() => height.value +
|
|
26532
|
+
layoutSize: computed(() => props.layout ? height.value + 24 : 0),
|
|
26533
|
+
elementSize: computed(() => height.value + 24),
|
|
26465
26534
|
active: computed(() => props.app && model.value),
|
|
26466
26535
|
absolute: toRef(props, 'absolute')
|
|
26467
26536
|
});
|
|
@@ -26515,9 +26584,18 @@ const makeVNumberInputProps = propsFactory({
|
|
|
26515
26584
|
},
|
|
26516
26585
|
inset: Boolean,
|
|
26517
26586
|
hideInput: Boolean,
|
|
26518
|
-
min:
|
|
26519
|
-
|
|
26520
|
-
|
|
26587
|
+
min: {
|
|
26588
|
+
type: Number,
|
|
26589
|
+
default: -Infinity
|
|
26590
|
+
},
|
|
26591
|
+
max: {
|
|
26592
|
+
type: Number,
|
|
26593
|
+
default: Infinity
|
|
26594
|
+
},
|
|
26595
|
+
step: {
|
|
26596
|
+
type: Number,
|
|
26597
|
+
default: 1
|
|
26598
|
+
},
|
|
26521
26599
|
...only(makeVInputProps(), ['density', 'disabled', 'focused', 'hideDetails', 'hint', 'label', 'persistentHint', 'readonly']),
|
|
26522
26600
|
...only(makeVFieldProps(), ['baseColor', 'bgColor', 'class', 'color', 'disabled', 'error', 'loading', 'reverse', 'rounded', 'style', 'theme', 'variant']),
|
|
26523
26601
|
...makeFocusProps()
|
|
@@ -26528,8 +26606,8 @@ const VNumberInput = genericComponent()({
|
|
|
26528
26606
|
props: {
|
|
26529
26607
|
...makeVNumberInputProps(),
|
|
26530
26608
|
modelValue: {
|
|
26531
|
-
type:
|
|
26532
|
-
default:
|
|
26609
|
+
type: Number,
|
|
26610
|
+
default: undefined
|
|
26533
26611
|
}
|
|
26534
26612
|
},
|
|
26535
26613
|
emits: {
|
|
@@ -26548,20 +26626,45 @@ const VNumberInput = genericComponent()({
|
|
|
26548
26626
|
blur
|
|
26549
26627
|
} = useFocus(props);
|
|
26550
26628
|
const inputRef = ref();
|
|
26629
|
+
const stepDecimals = computed(() => getDecimals(props.step));
|
|
26630
|
+
const modelDecimals = computed(() => model.value != null ? getDecimals(model.value) : 0);
|
|
26631
|
+
const canIncrease = computed(() => {
|
|
26632
|
+
if (model.value == null) return true;
|
|
26633
|
+
return model.value + props.step <= props.max;
|
|
26634
|
+
});
|
|
26635
|
+
const canDecrease = computed(() => {
|
|
26636
|
+
if (model.value == null) return true;
|
|
26637
|
+
return model.value - props.step >= props.min;
|
|
26638
|
+
});
|
|
26639
|
+
watchEffect(() => {
|
|
26640
|
+
if (model.value != null && (model.value < props.min || model.value > props.max)) {
|
|
26641
|
+
model.value = clamp(model.value, props.min, props.max);
|
|
26642
|
+
}
|
|
26643
|
+
});
|
|
26551
26644
|
function onFocus() {
|
|
26552
26645
|
if (!isFocused.value) focus();
|
|
26553
26646
|
}
|
|
26554
26647
|
const controlVariant = computed(() => {
|
|
26555
26648
|
return props.hideInput ? 'stacked' : props.controlVariant;
|
|
26556
26649
|
});
|
|
26650
|
+
const incrementSlotProps = computed(() => ({
|
|
26651
|
+
click: onClickUp
|
|
26652
|
+
}));
|
|
26653
|
+
const decrementSlotProps = computed(() => ({
|
|
26654
|
+
click: onClickDown
|
|
26655
|
+
}));
|
|
26557
26656
|
function toggleUpDown() {
|
|
26558
26657
|
let increment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
26658
|
+
if (model.value == null) {
|
|
26659
|
+
model.value = 0;
|
|
26660
|
+
return;
|
|
26661
|
+
}
|
|
26662
|
+
const decimals = Math.max(modelDecimals.value, stepDecimals.value);
|
|
26559
26663
|
if (increment) {
|
|
26560
|
-
|
|
26664
|
+
if (canIncrease.value) model.value = +(model.value + props.step).toFixed(decimals);
|
|
26561
26665
|
} else {
|
|
26562
|
-
|
|
26666
|
+
if (canDecrease.value) model.value = +(model.value - props.step).toFixed(decimals);
|
|
26563
26667
|
}
|
|
26564
|
-
if (inputRef.value) model.value = parseInt(inputRef.value.value, 10);
|
|
26565
26668
|
}
|
|
26566
26669
|
function onClickUp() {
|
|
26567
26670
|
toggleUpDown();
|
|
@@ -26569,12 +26672,28 @@ const VNumberInput = genericComponent()({
|
|
|
26569
26672
|
function onClickDown() {
|
|
26570
26673
|
toggleUpDown(false);
|
|
26571
26674
|
}
|
|
26572
|
-
|
|
26573
|
-
|
|
26574
|
-
|
|
26575
|
-
|
|
26576
|
-
|
|
26577
|
-
|
|
26675
|
+
function onKeydown(e) {
|
|
26676
|
+
if (['Enter', 'ArrowLeft', 'ArrowRight', 'Backspace'].includes(e.key) || e.ctrlKey) return;
|
|
26677
|
+
if (['ArrowDown'].includes(e.key)) {
|
|
26678
|
+
e.preventDefault();
|
|
26679
|
+
toggleUpDown(false);
|
|
26680
|
+
return;
|
|
26681
|
+
}
|
|
26682
|
+
if (['ArrowUp'].includes(e.key)) {
|
|
26683
|
+
e.preventDefault();
|
|
26684
|
+
toggleUpDown();
|
|
26685
|
+
return;
|
|
26686
|
+
}
|
|
26687
|
+
|
|
26688
|
+
// Only numbers, +, - & . are allowed
|
|
26689
|
+
if (!/^[0-9\-+.]+$/.test(e.key)) {
|
|
26690
|
+
e.preventDefault();
|
|
26691
|
+
}
|
|
26692
|
+
}
|
|
26693
|
+
function onInput(e) {
|
|
26694
|
+
const el = e.target;
|
|
26695
|
+
model.value = el.value ? +el.value : undefined;
|
|
26696
|
+
}
|
|
26578
26697
|
useRender(() => {
|
|
26579
26698
|
const fieldProps = filterFieldProps(props);
|
|
26580
26699
|
const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);
|
|
@@ -26587,9 +26706,11 @@ const VNumberInput = genericComponent()({
|
|
|
26587
26706
|
return createVNode("div", {
|
|
26588
26707
|
"class": "v-number-input__control"
|
|
26589
26708
|
}, [!slots.decrement ? createVNode(VBtn, {
|
|
26709
|
+
"disabled": !canDecrease.value,
|
|
26590
26710
|
"flat": true,
|
|
26591
26711
|
"key": "decrement-btn",
|
|
26592
26712
|
"height": defaultHeight,
|
|
26713
|
+
"name": "decrement-btn",
|
|
26593
26714
|
"icon": "$expand",
|
|
26594
26715
|
"size": "small",
|
|
26595
26716
|
"onClick": onClickDown
|
|
@@ -26597,6 +26718,7 @@ const VNumberInput = genericComponent()({
|
|
|
26597
26718
|
"key": "decrement-defaults",
|
|
26598
26719
|
"defaults": {
|
|
26599
26720
|
VBtn: {
|
|
26721
|
+
disabled: !canDecrease.value,
|
|
26600
26722
|
flat: true,
|
|
26601
26723
|
height: defaultHeight,
|
|
26602
26724
|
size: 'small',
|
|
@@ -26608,9 +26730,11 @@ const VNumberInput = genericComponent()({
|
|
|
26608
26730
|
}), createVNode(VDivider, {
|
|
26609
26731
|
"vertical": controlVariant.value !== 'stacked'
|
|
26610
26732
|
}, null), !slots.increment ? createVNode(VBtn, {
|
|
26733
|
+
"disabled": !canIncrease.value,
|
|
26611
26734
|
"flat": true,
|
|
26612
26735
|
"key": "increment-btn",
|
|
26613
26736
|
"height": defaultHeight,
|
|
26737
|
+
"name": "increment-btn",
|
|
26614
26738
|
"icon": "$collapse",
|
|
26615
26739
|
"onClick": onClickUp,
|
|
26616
26740
|
"size": "small"
|
|
@@ -26618,6 +26742,7 @@ const VNumberInput = genericComponent()({
|
|
|
26618
26742
|
"key": "increment-defaults",
|
|
26619
26743
|
"defaults": {
|
|
26620
26744
|
VBtn: {
|
|
26745
|
+
disabled: !canIncrease.value,
|
|
26621
26746
|
flat: true,
|
|
26622
26747
|
height: defaultHeight,
|
|
26623
26748
|
size: 'small',
|
|
@@ -26659,17 +26784,16 @@ const VNumberInput = genericComponent()({
|
|
|
26659
26784
|
...slotProps
|
|
26660
26785
|
}
|
|
26661
26786
|
} = _ref2;
|
|
26662
|
-
return
|
|
26787
|
+
return createVNode("input", mergeProps({
|
|
26663
26788
|
"ref": inputRef,
|
|
26664
|
-
"type": "
|
|
26665
|
-
"
|
|
26789
|
+
"type": "text",
|
|
26790
|
+
"value": model.value,
|
|
26791
|
+
"onInput": onInput,
|
|
26792
|
+
"onKeydown": onKeydown,
|
|
26666
26793
|
"class": fieldClass,
|
|
26667
|
-
"max": props.max,
|
|
26668
|
-
"min": props.min,
|
|
26669
|
-
"step": props.step,
|
|
26670
26794
|
"onFocus": onFocus,
|
|
26671
26795
|
"onBlur": blur
|
|
26672
|
-
}, inputAttrs), null)
|
|
26796
|
+
}, inputAttrs), null);
|
|
26673
26797
|
},
|
|
26674
26798
|
'append-inner': controlVariant.value === 'split' ? () => createVNode("div", {
|
|
26675
26799
|
"class": "v-number-input__control"
|
|
@@ -26699,6 +26823,112 @@ const VNumberInput = genericComponent()({
|
|
|
26699
26823
|
}
|
|
26700
26824
|
});
|
|
26701
26825
|
|
|
26826
|
+
// Types
|
|
26827
|
+
|
|
26828
|
+
const makeVSnackbarQueueProps = propsFactory({
|
|
26829
|
+
// TODO: Port this to Snackbar on dev
|
|
26830
|
+
closable: [Boolean, String],
|
|
26831
|
+
closeText: {
|
|
26832
|
+
type: String,
|
|
26833
|
+
default: '$vuetify.dismiss'
|
|
26834
|
+
},
|
|
26835
|
+
modelValue: {
|
|
26836
|
+
type: Array,
|
|
26837
|
+
default: () => []
|
|
26838
|
+
},
|
|
26839
|
+
...omit(makeVSnackbarProps(), ['modelValue'])
|
|
26840
|
+
}, 'VSnackbarQueue');
|
|
26841
|
+
const VSnackbarQueue = genericComponent()({
|
|
26842
|
+
name: 'VSnackbarQueue',
|
|
26843
|
+
props: makeVSnackbarQueueProps(),
|
|
26844
|
+
emits: {
|
|
26845
|
+
'update:modelValue': val => true
|
|
26846
|
+
},
|
|
26847
|
+
setup(props, _ref) {
|
|
26848
|
+
let {
|
|
26849
|
+
emit,
|
|
26850
|
+
slots
|
|
26851
|
+
} = _ref;
|
|
26852
|
+
const {
|
|
26853
|
+
t
|
|
26854
|
+
} = useLocale();
|
|
26855
|
+
const isActive = shallowRef(false);
|
|
26856
|
+
const isVisible = shallowRef(false);
|
|
26857
|
+
const current = shallowRef();
|
|
26858
|
+
watch(() => props.modelValue.length, (val, oldVal) => {
|
|
26859
|
+
if (!isVisible.value && val > oldVal) {
|
|
26860
|
+
showNext();
|
|
26861
|
+
}
|
|
26862
|
+
});
|
|
26863
|
+
watch(isActive, val => {
|
|
26864
|
+
if (val) isVisible.value = true;
|
|
26865
|
+
});
|
|
26866
|
+
function onAfterLeave() {
|
|
26867
|
+
if (props.modelValue.length) {
|
|
26868
|
+
showNext();
|
|
26869
|
+
} else {
|
|
26870
|
+
current.value = undefined;
|
|
26871
|
+
isVisible.value = false;
|
|
26872
|
+
}
|
|
26873
|
+
}
|
|
26874
|
+
function showNext() {
|
|
26875
|
+
const [next, ...rest] = props.modelValue;
|
|
26876
|
+
emit('update:modelValue', rest);
|
|
26877
|
+
current.value = typeof next === 'string' ? {
|
|
26878
|
+
text: next
|
|
26879
|
+
} : next;
|
|
26880
|
+
nextTick(() => {
|
|
26881
|
+
isActive.value = true;
|
|
26882
|
+
});
|
|
26883
|
+
}
|
|
26884
|
+
function onClickClose() {
|
|
26885
|
+
isActive.value = false;
|
|
26886
|
+
}
|
|
26887
|
+
const btnProps = computed(() => ({
|
|
26888
|
+
color: typeof props.closable === 'string' ? props.closable : undefined,
|
|
26889
|
+
text: t(props.closeText)
|
|
26890
|
+
}));
|
|
26891
|
+
useRender(() => {
|
|
26892
|
+
const hasActions = !!(props.closable || slots.actions);
|
|
26893
|
+
const {
|
|
26894
|
+
modelValue: _,
|
|
26895
|
+
...snackbarProps
|
|
26896
|
+
} = VSnackbar.filterProps(props);
|
|
26897
|
+
return createVNode(Fragment, null, [isVisible.value && !!current.value && (slots.default ? createVNode(VDefaultsProvider, {
|
|
26898
|
+
"defaults": {
|
|
26899
|
+
VSnackbar: current.value
|
|
26900
|
+
}
|
|
26901
|
+
}, {
|
|
26902
|
+
default: () => [slots.default({
|
|
26903
|
+
item: current.value
|
|
26904
|
+
})]
|
|
26905
|
+
}) : createVNode(VSnackbar, mergeProps(snackbarProps, current.value, {
|
|
26906
|
+
"modelValue": isActive.value,
|
|
26907
|
+
"onUpdate:modelValue": $event => isActive.value = $event,
|
|
26908
|
+
"onAfterLeave": onAfterLeave
|
|
26909
|
+
}), {
|
|
26910
|
+
text: slots.text ? () => slots.text?.({
|
|
26911
|
+
item: current.value
|
|
26912
|
+
}) : undefined,
|
|
26913
|
+
actions: hasActions ? () => createVNode(Fragment, null, [!slots.actions ? createVNode(VBtn, mergeProps(btnProps.value, {
|
|
26914
|
+
"onClick": onClickClose
|
|
26915
|
+
}), null) : createVNode(VDefaultsProvider, {
|
|
26916
|
+
"defaults": {
|
|
26917
|
+
VBtn: btnProps.value
|
|
26918
|
+
}
|
|
26919
|
+
}, {
|
|
26920
|
+
default: () => [slots.actions({
|
|
26921
|
+
item: current.value,
|
|
26922
|
+
props: {
|
|
26923
|
+
onClick: onClickClose
|
|
26924
|
+
}
|
|
26925
|
+
})]
|
|
26926
|
+
})]) : undefined
|
|
26927
|
+
}))]);
|
|
26928
|
+
});
|
|
26929
|
+
}
|
|
26930
|
+
});
|
|
26931
|
+
|
|
26702
26932
|
// Utilities
|
|
26703
26933
|
|
|
26704
26934
|
// Types
|
|
@@ -27214,9 +27444,7 @@ const makeVTimePickerClockProps = propsFactory({
|
|
|
27214
27444
|
ampm: Boolean,
|
|
27215
27445
|
color: String,
|
|
27216
27446
|
disabled: Boolean,
|
|
27217
|
-
displayedValue:
|
|
27218
|
-
default: null
|
|
27219
|
-
},
|
|
27447
|
+
displayedValue: null,
|
|
27220
27448
|
double: Boolean,
|
|
27221
27449
|
format: {
|
|
27222
27450
|
type: Function,
|
|
@@ -28345,6 +28573,7 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
28345
28573
|
VSlideYTransition: VSlideYTransition,
|
|
28346
28574
|
VSlider: VSlider,
|
|
28347
28575
|
VSnackbar: VSnackbar,
|
|
28576
|
+
VSnackbarQueue: VSnackbarQueue,
|
|
28348
28577
|
VSpacer: VSpacer,
|
|
28349
28578
|
VSparkline: VSparkline,
|
|
28350
28579
|
VSpeedDial: VSpeedDial,
|
|
@@ -28601,7 +28830,7 @@ function createVuetify$1() {
|
|
|
28601
28830
|
goTo
|
|
28602
28831
|
};
|
|
28603
28832
|
}
|
|
28604
|
-
const version$1 = "3.5.
|
|
28833
|
+
const version$1 = "3.5.17";
|
|
28605
28834
|
createVuetify$1.version = version$1;
|
|
28606
28835
|
|
|
28607
28836
|
// Vue's inject() can only be used in setup
|
|
@@ -28854,7 +29083,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
28854
29083
|
|
|
28855
29084
|
/* eslint-disable local-rules/sort-imports */
|
|
28856
29085
|
|
|
28857
|
-
const version = "3.5.
|
|
29086
|
+
const version = "3.5.17";
|
|
28858
29087
|
|
|
28859
29088
|
/* eslint-disable local-rules/sort-imports */
|
|
28860
29089
|
|