@vuetify/nightly 3.8.6-master.2025-05-26 → 3.8.7-dev.2025-05-27
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/CHANGELOG.md +24 -24
- package/dist/json/attributes.json +3294 -3218
- package/dist/json/importMap-labs.json +26 -26
- package/dist/json/importMap.json +192 -192
- package/dist/json/tags.json +19 -0
- package/dist/json/web-types.json +5776 -5504
- package/dist/vuetify-labs.cjs +305 -128
- package/dist/vuetify-labs.css +5202 -5174
- package/dist/vuetify-labs.d.ts +1580 -1351
- package/dist/vuetify-labs.esm.js +306 -129
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +305 -128
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +299 -117
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +4512 -4484
- package/dist/vuetify.d.ts +739 -518
- package/dist/vuetify.esm.js +300 -118
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +299 -117
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +1194 -1184
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAlert/VAlert.css +6 -1
- package/lib/components/VAlert/VAlert.d.ts +35 -0
- package/lib/components/VAlert/VAlert.js +15 -10
- package/lib/components/VAlert/VAlert.js.map +1 -1
- package/lib/components/VAlert/VAlert.sass +7 -1
- package/lib/components/VAutocomplete/VAutocomplete.d.ts +133 -96
- package/lib/components/VAutocomplete/VAutocomplete.js +19 -2
- package/lib/components/VAutocomplete/VAutocomplete.js.map +1 -1
- package/lib/components/VBtnGroup/VBtnGroup.css +30 -7
- package/lib/components/VBtnGroup/VBtnGroup.d.ts +58 -32
- package/lib/components/VBtnGroup/VBtnGroup.js +7 -3
- package/lib/components/VBtnGroup/VBtnGroup.js.map +1 -1
- package/lib/components/VBtnGroup/VBtnGroup.sass +44 -17
- package/lib/components/VBtnToggle/VBtnToggle.d.ts +25 -0
- package/lib/components/VCheckbox/VCheckbox.d.ts +3 -3
- package/lib/components/VChipGroup/VChipGroup.d.ts +10 -0
- package/lib/components/VCombobox/VCombobox.d.ts +133 -96
- package/lib/components/VCombobox/VCombobox.js +20 -2
- package/lib/components/VCombobox/VCombobox.js.map +1 -1
- package/lib/components/VDataTable/VDataTable.d.ts +18 -0
- package/lib/components/VDataTable/VDataTableHeaders.d.ts +13 -0
- package/lib/components/VDataTable/VDataTableHeaders.js +4 -2
- package/lib/components/VDataTable/VDataTableHeaders.js.map +1 -1
- package/lib/components/VDataTable/VDataTableServer.d.ts +13 -0
- package/lib/components/VDataTable/VDataTableVirtual.d.ts +13 -0
- package/lib/components/VDatePicker/VDatePicker.d.ts +10 -0
- package/lib/components/VDatePicker/VDatePickerMonth.d.ts +10 -0
- package/lib/components/VDatePicker/VDatePickerMonth.js +1 -1
- package/lib/components/VDatePicker/VDatePickerMonth.js.map +1 -1
- package/lib/components/VField/VField.d.ts +3 -3
- package/lib/components/VFileInput/VFileInput.d.ts +15 -15
- package/lib/components/VInput/VInput.d.ts +4 -4
- package/lib/components/VList/VListChildren.js.map +1 -1
- package/lib/components/VNumberInput/VNumberInput.d.ts +103 -89
- package/lib/components/VNumberInput/VNumberInput.js +19 -4
- package/lib/components/VNumberInput/VNumberInput.js.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.js +2 -1
- package/lib/components/VOtpInput/VOtpInput.js.map +1 -1
- package/lib/components/VOverlay/VOverlay.css +1 -1
- package/lib/components/VOverlay/_variables.scss +1 -1
- package/lib/components/VRadioGroup/VRadioGroup.d.ts +3 -3
- package/lib/components/VRangeSlider/VRangeSlider.d.ts +3 -3
- package/lib/components/VSelect/VSelect.d.ts +138 -96
- package/lib/components/VSelect/VSelect.js +21 -3
- package/lib/components/VSelect/VSelect.js.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroup.d.ts +10 -0
- package/lib/components/VSlideGroup/VSlideGroup.js +2 -1
- package/lib/components/VSlideGroup/VSlideGroup.js.map +1 -1
- package/lib/components/VSlider/VSlider.d.ts +3 -3
- package/lib/components/VSwitch/VSwitch.d.ts +3 -3
- package/lib/components/VTabs/VTabs.d.ts +10 -0
- package/lib/components/VTextField/VTextField.d.ts +27 -27
- package/lib/components/VTextarea/VTextarea.d.ts +15 -15
- package/lib/composables/calendar.d.ts +6 -0
- package/lib/composables/calendar.js +2 -1
- package/lib/composables/calendar.js.map +1 -1
- package/lib/composables/date/DateAdapter.d.ts +1 -1
- package/lib/composables/date/DateAdapter.js.map +1 -1
- package/lib/composables/date/adapters/vuetify.d.ts +1 -1
- package/lib/composables/date/adapters/vuetify.js +4 -4
- package/lib/composables/date/adapters/vuetify.js.map +1 -1
- package/lib/composables/date/date.d.ts +1 -1
- package/lib/composables/date/index.d.ts +1 -0
- package/lib/composables/date/index.js +1 -0
- package/lib/composables/date/index.js.map +1 -1
- package/lib/composables/filter.js +3 -0
- package/lib/composables/filter.js.map +1 -1
- package/lib/composables/iconSizes.d.ts +28 -0
- package/lib/composables/iconSizes.js +23 -0
- package/lib/composables/iconSizes.js.map +1 -0
- package/lib/composables/theme.d.ts +6 -1
- package/lib/composables/theme.js +94 -26
- package/lib/composables/theme.js.map +1 -1
- package/lib/composables/virtual.js +6 -1
- package/lib/composables/virtual.js.map +1 -1
- package/lib/entry-bundler.d.ts +1 -1
- package/lib/entry-bundler.js +1 -1
- package/lib/entry-bundler.js.map +1 -1
- package/lib/framework.d.ts +73 -68
- package/lib/framework.js +1 -1
- package/lib/framework.js.map +1 -1
- package/lib/labs/VCalendar/VCalendar.d.ts +10 -0
- package/lib/labs/VColorInput/VColorInput.d.ts +3 -3
- package/lib/labs/VDateInput/VDateInput.d.ts +97 -87
- package/lib/labs/VFileUpload/VFileUpload.d.ts +3 -3
- package/lib/labs/VIconBtn/VIconBtn.d.ts +29 -29
- package/lib/labs/VIconBtn/VIconBtn.js +7 -11
- package/lib/labs/VIconBtn/VIconBtn.js.map +1 -1
- package/lib/labs/entry-bundler.d.ts +1 -1
- package/lib/util/globals.d.ts +1 -0
- package/lib/util/globals.js +1 -0
- package/lib/util/globals.js.map +1 -1
- package/package.json +3 -1
package/dist/vuetify.esm.js
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
/*!
|
2
|
-
* Vuetify v3.8.
|
2
|
+
* Vuetify v3.8.7-dev.2025-05-27
|
3
3
|
* Forged by John Leider
|
4
4
|
* Released under the MIT License.
|
5
5
|
*/
|
6
6
|
|
7
|
-
import { shallowRef, reactive, watchEffect, toRef, capitalize, unref, Fragment, isVNode, Comment, warn, getCurrentInstance as getCurrentInstance$1, ref, computed, provide, inject as inject$1, defineComponent as defineComponent$1, h, camelize, createVNode, mergeProps, createElementVNode, normalizeClass, toValue, onBeforeUnmount, watch, readonly, onMounted, useId, onDeactivated, onActivated, onScopeDispose, effectScope, toRaw, normalizeStyle, TransitionGroup, Transition, toRefs, isRef, onBeforeMount, nextTick, withDirectives, vShow, onUpdated, Text, resolveDynamicComponent, toDisplayString, markRaw, Teleport, cloneVNode, createTextVNode, normalizeProps, guardReactiveProps, onUnmounted, onBeforeUpdate, withModifiers, vModelText, resolveComponent, render } from 'vue';
|
7
|
+
import { shallowRef, reactive, watchEffect, toRef, capitalize, unref, Fragment, isVNode, Comment, warn, getCurrentInstance as getCurrentInstance$1, ref, computed, provide, inject as inject$1, defineComponent as defineComponent$1, h, camelize, createVNode, mergeProps, createElementVNode, normalizeClass, toValue, onBeforeUnmount, watch, readonly, onMounted, useId, onDeactivated, onActivated, onScopeDispose, effectScope, toRaw, getCurrentScope, normalizeStyle, TransitionGroup, Transition, toRefs, isRef, onBeforeMount, nextTick, withDirectives, vShow, onUpdated, Text, resolveDynamicComponent, toDisplayString, markRaw, Teleport, cloneVNode, createTextVNode, normalizeProps, guardReactiveProps, onUnmounted, onBeforeUpdate, withModifiers, vModelText, resolveComponent, render } from 'vue';
|
8
8
|
|
9
9
|
const IN_BROWSER = typeof window !== 'undefined';
|
10
10
|
const SUPPORTS_INTERSECTION = IN_BROWSER && 'IntersectionObserver' in window;
|
11
11
|
const SUPPORTS_TOUCH = IN_BROWSER && ('ontouchstart' in window || window.navigator.maxTouchPoints > 0);
|
12
12
|
const SUPPORTS_EYE_DROPPER = IN_BROWSER && 'EyeDropper' in window;
|
13
|
+
const SUPPORTS_MATCH_MEDIA = IN_BROWSER && 'matchMedia' in window && typeof window.matchMedia === 'function';
|
13
14
|
|
14
15
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
15
16
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
@@ -2824,6 +2825,7 @@ const makeThemeProps = propsFactory({
|
|
2824
2825
|
function genDefaults$1() {
|
2825
2826
|
return {
|
2826
2827
|
defaultTheme: 'light',
|
2828
|
+
prefix: 'v-',
|
2827
2829
|
variations: {
|
2828
2830
|
colors: [],
|
2829
2831
|
lighten: 0,
|
@@ -2905,7 +2907,10 @@ function genDefaults$1() {
|
|
2905
2907
|
}
|
2906
2908
|
}
|
2907
2909
|
},
|
2908
|
-
stylesheetId: 'vuetify-theme-stylesheet'
|
2910
|
+
stylesheetId: 'vuetify-theme-stylesheet',
|
2911
|
+
scoped: false,
|
2912
|
+
unimportant: false,
|
2913
|
+
utilities: true
|
2909
2914
|
};
|
2910
2915
|
}
|
2911
2916
|
function parseThemeOptions() {
|
@@ -2928,21 +2933,21 @@ function parseThemeOptions() {
|
|
2928
2933
|
function createCssClass(lines, selector, content, scope) {
|
2929
2934
|
lines.push(`${getScopedSelector(selector, scope)} {\n`, ...content.map(line => ` ${line};\n`), '}\n');
|
2930
2935
|
}
|
2931
|
-
function genCssVariables(theme) {
|
2936
|
+
function genCssVariables(theme, prefix) {
|
2932
2937
|
const lightOverlay = theme.dark ? 2 : 1;
|
2933
2938
|
const darkOverlay = theme.dark ? 1 : 2;
|
2934
2939
|
const variables = [];
|
2935
2940
|
for (const [key, value] of Object.entries(theme.colors)) {
|
2936
2941
|
const rgb = parseColor(value);
|
2937
|
-
variables.push(
|
2942
|
+
variables.push(`--${prefix}theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`);
|
2938
2943
|
if (!key.startsWith('on-')) {
|
2939
|
-
variables.push(
|
2944
|
+
variables.push(`--${prefix}theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`);
|
2940
2945
|
}
|
2941
2946
|
}
|
2942
2947
|
for (const [key, value] of Object.entries(theme.variables)) {
|
2943
2948
|
const color = typeof value === 'string' && value.startsWith('#') ? parseColor(value) : undefined;
|
2944
2949
|
const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : undefined;
|
2945
|
-
variables.push(
|
2950
|
+
variables.push(`--${prefix}${key}: ${rgb ?? value}`);
|
2946
2951
|
}
|
2947
2952
|
return variables;
|
2948
2953
|
}
|
@@ -2986,7 +2991,8 @@ function getScopedSelector(selector, scope) {
|
|
2986
2991
|
const scopeSelector = `:where(${scope})`;
|
2987
2992
|
return selector === ':root' ? scopeSelector : `${scopeSelector} ${selector}`;
|
2988
2993
|
}
|
2989
|
-
function upsertStyles(
|
2994
|
+
function upsertStyles(id, cspNonce, styles) {
|
2995
|
+
const styleEl = getOrCreateStyleElement(id, cspNonce);
|
2990
2996
|
if (!styleEl) return;
|
2991
2997
|
styleEl.innerHTML = styles;
|
2992
2998
|
}
|
@@ -3006,8 +3012,17 @@ function getOrCreateStyleElement(id, cspNonce) {
|
|
3006
3012
|
// Composables
|
3007
3013
|
function createTheme(options) {
|
3008
3014
|
const parsedOptions = parseThemeOptions(options);
|
3009
|
-
const
|
3015
|
+
const _name = shallowRef(parsedOptions.defaultTheme);
|
3010
3016
|
const themes = ref(parsedOptions.themes);
|
3017
|
+
const systemName = shallowRef('light');
|
3018
|
+
const name = computed({
|
3019
|
+
get() {
|
3020
|
+
return _name.value === 'system' ? systemName.value : _name.value;
|
3021
|
+
},
|
3022
|
+
set(val) {
|
3023
|
+
_name.value = val;
|
3024
|
+
}
|
3025
|
+
});
|
3011
3026
|
const computedThemes = computed(() => {
|
3012
3027
|
const acc = {};
|
3013
3028
|
for (const [name, original] of Object.entries(themes.value)) {
|
@@ -3028,28 +3043,49 @@ function createTheme(options) {
|
|
3028
3043
|
const current = toRef(() => computedThemes.value[name.value]);
|
3029
3044
|
const styles = computed(() => {
|
3030
3045
|
const lines = [];
|
3046
|
+
const important = parsedOptions.unimportant ? '' : ' !important';
|
3047
|
+
const scoped = parsedOptions.scoped ? parsedOptions.prefix : '';
|
3031
3048
|
if (current.value?.dark) {
|
3032
3049
|
createCssClass(lines, ':root', ['color-scheme: dark'], parsedOptions.scope);
|
3033
3050
|
}
|
3034
|
-
createCssClass(lines, ':root', genCssVariables(current.value), parsedOptions.scope);
|
3051
|
+
createCssClass(lines, ':root', genCssVariables(current.value, parsedOptions.prefix), parsedOptions.scope);
|
3035
3052
|
for (const [themeName, theme] of Object.entries(computedThemes.value)) {
|
3036
|
-
createCssClass(lines,
|
3037
|
-
}
|
3038
|
-
|
3039
|
-
|
3040
|
-
|
3041
|
-
|
3042
|
-
|
3043
|
-
|
3044
|
-
|
3045
|
-
|
3046
|
-
|
3047
|
-
|
3053
|
+
createCssClass(lines, `.${parsedOptions.prefix}theme--${themeName}`, [`color-scheme: ${theme.dark ? 'dark' : 'normal'}`, ...genCssVariables(theme, parsedOptions.prefix)], parsedOptions.scope);
|
3054
|
+
}
|
3055
|
+
if (parsedOptions.utilities) {
|
3056
|
+
const bgLines = [];
|
3057
|
+
const fgLines = [];
|
3058
|
+
const colors = new Set(Object.values(computedThemes.value).flatMap(theme => Object.keys(theme.colors)));
|
3059
|
+
for (const key of colors) {
|
3060
|
+
if (key.startsWith('on-')) {
|
3061
|
+
createCssClass(fgLines, `.${key}`, [`color: rgb(var(--${parsedOptions.prefix}theme-${key}))${important}`], parsedOptions.scope);
|
3062
|
+
} else {
|
3063
|
+
createCssClass(bgLines, `.${scoped}bg-${key}`, [`--${parsedOptions.prefix}theme-overlay-multiplier: var(--${parsedOptions.prefix}theme-${key}-overlay-multiplier)`, `background-color: rgb(var(--${parsedOptions.prefix}theme-${key}))${important}`, `color: rgb(var(--${parsedOptions.prefix}theme-on-${key}))${important}`], parsedOptions.scope);
|
3064
|
+
createCssClass(fgLines, `.${scoped}text-${key}`, [`color: rgb(var(--${parsedOptions.prefix}theme-${key}))${important}`], parsedOptions.scope);
|
3065
|
+
createCssClass(fgLines, `.${scoped}border-${key}`, [`--${parsedOptions.prefix}border-color: var(--${parsedOptions.prefix}theme-${key})`], parsedOptions.scope);
|
3066
|
+
}
|
3048
3067
|
}
|
3068
|
+
lines.push(...bgLines, ...fgLines);
|
3049
3069
|
}
|
3050
|
-
lines.push(...bgLines, ...fgLines);
|
3051
3070
|
return lines.map((str, i) => i === 0 ? str : ` ${str}`).join('');
|
3052
3071
|
});
|
3072
|
+
const themeClasses = toRef(() => parsedOptions.isDisabled ? undefined : `${parsedOptions.prefix}theme--${name.value}`);
|
3073
|
+
const themeNames = toRef(() => Object.keys(computedThemes.value));
|
3074
|
+
if (SUPPORTS_MATCH_MEDIA) {
|
3075
|
+
const media = window.matchMedia('(prefers-color-scheme: dark)');
|
3076
|
+
function updateSystemName() {
|
3077
|
+
systemName.value = media.matches ? 'dark' : 'light';
|
3078
|
+
}
|
3079
|
+
updateSystemName();
|
3080
|
+
media.addEventListener('change', updateSystemName, {
|
3081
|
+
passive: true
|
3082
|
+
});
|
3083
|
+
if (getCurrentScope()) {
|
3084
|
+
onScopeDispose(() => {
|
3085
|
+
media.removeEventListener('change', updateSystemName);
|
3086
|
+
});
|
3087
|
+
}
|
3088
|
+
}
|
3053
3089
|
function install(app) {
|
3054
3090
|
if (parsedOptions.isDisabled) return;
|
3055
3091
|
const head = app._context.provides.usehead;
|
@@ -3087,22 +3123,55 @@ function createTheme(options) {
|
|
3087
3123
|
updateStyles();
|
3088
3124
|
}
|
3089
3125
|
function updateStyles() {
|
3090
|
-
upsertStyles(
|
3126
|
+
upsertStyles(parsedOptions.stylesheetId, parsedOptions.cspNonce, styles.value);
|
3091
3127
|
}
|
3092
3128
|
}
|
3093
3129
|
}
|
3094
|
-
|
3130
|
+
function change(themeName) {
|
3131
|
+
if (!themeNames.value.includes(themeName)) {
|
3132
|
+
consoleWarn(`Theme "${themeName}" not found on the Vuetify theme instance`);
|
3133
|
+
return;
|
3134
|
+
}
|
3135
|
+
name.value = themeName;
|
3136
|
+
}
|
3137
|
+
function cycle() {
|
3138
|
+
let themeArray = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : themeNames.value;
|
3139
|
+
const currentIndex = themeArray.indexOf(name.value);
|
3140
|
+
const nextIndex = currentIndex === -1 ? 0 : (currentIndex + 1) % themeArray.length;
|
3141
|
+
change(themeArray[nextIndex]);
|
3142
|
+
}
|
3143
|
+
function toggle() {
|
3144
|
+
let themeArray = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['light', 'dark'];
|
3145
|
+
cycle(themeArray);
|
3146
|
+
}
|
3147
|
+
const globalName = new Proxy(name, {
|
3148
|
+
get(target, prop) {
|
3149
|
+
return target[prop];
|
3150
|
+
},
|
3151
|
+
set(target, prop, val) {
|
3152
|
+
if (prop === 'value') {
|
3153
|
+
deprecate(`theme.global.name.value = ${val}`, `theme.change('${val}')`);
|
3154
|
+
}
|
3155
|
+
// @ts-expect-error
|
3156
|
+
target[prop] = val;
|
3157
|
+
return true;
|
3158
|
+
}
|
3159
|
+
});
|
3095
3160
|
return {
|
3096
3161
|
install,
|
3162
|
+
change,
|
3163
|
+
cycle,
|
3164
|
+
toggle,
|
3097
3165
|
isDisabled: parsedOptions.isDisabled,
|
3098
3166
|
name,
|
3099
3167
|
themes,
|
3100
3168
|
current,
|
3101
3169
|
computedThemes,
|
3170
|
+
prefix: parsedOptions.prefix,
|
3102
3171
|
themeClasses,
|
3103
3172
|
styles,
|
3104
3173
|
global: {
|
3105
|
-
name,
|
3174
|
+
name: globalName,
|
3106
3175
|
current
|
3107
3176
|
}
|
3108
3177
|
};
|
@@ -3113,7 +3182,7 @@ function provideTheme(props) {
|
|
3113
3182
|
if (!theme) throw new Error('Could not find Vuetify theme injection');
|
3114
3183
|
const name = toRef(() => props.theme ?? theme.name.value);
|
3115
3184
|
const current = toRef(() => theme.themes.value[name.value]);
|
3116
|
-
const themeClasses = toRef(() => theme.isDisabled ? undefined :
|
3185
|
+
const themeClasses = toRef(() => theme.isDisabled ? undefined : `${theme.prefix}theme--${name.value}`);
|
3117
3186
|
const newTheme = {
|
3118
3187
|
...theme,
|
3119
3188
|
name,
|
@@ -4660,9 +4729,15 @@ function useVariant(props) {
|
|
4660
4729
|
};
|
4661
4730
|
}
|
4662
4731
|
|
4732
|
+
// Types
|
4733
|
+
|
4663
4734
|
const makeVBtnGroupProps = propsFactory({
|
4664
4735
|
baseColor: String,
|
4665
4736
|
divided: Boolean,
|
4737
|
+
direction: {
|
4738
|
+
type: String,
|
4739
|
+
default: 'horizontal'
|
4740
|
+
},
|
4666
4741
|
...makeBorderProps(),
|
4667
4742
|
...makeComponentProps(),
|
4668
4743
|
...makeDensityProps(),
|
@@ -4696,7 +4771,7 @@ const VBtnGroup = genericComponent()({
|
|
4696
4771
|
} = useRounded(props);
|
4697
4772
|
provideDefaults({
|
4698
4773
|
VBtn: {
|
4699
|
-
height: 'auto',
|
4774
|
+
height: toRef(() => props.direction === 'horizontal' ? 'auto' : null),
|
4700
4775
|
baseColor: toRef(() => props.baseColor),
|
4701
4776
|
color: toRef(() => props.color),
|
4702
4777
|
density: toRef(() => props.density),
|
@@ -4706,7 +4781,7 @@ const VBtnGroup = genericComponent()({
|
|
4706
4781
|
});
|
4707
4782
|
useRender(() => {
|
4708
4783
|
return createVNode(props.tag, {
|
4709
|
-
"class": normalizeClass(['v-btn-group', {
|
4784
|
+
"class": normalizeClass(['v-btn-group', `v-btn-group--${props.direction}`, {
|
4710
4785
|
'v-btn-group--divided': props.divided
|
4711
4786
|
}, themeClasses.value, borderClasses.value, densityClasses.value, elevationClasses.value, roundedClasses.value, props.class]),
|
4712
4787
|
"style": normalizeStyle(props.style)
|
@@ -6185,6 +6260,31 @@ const VAppBarTitle = genericComponent()({
|
|
6185
6260
|
// Utilities
|
6186
6261
|
const VAlertTitle = createSimpleFunctional('v-alert-title');
|
6187
6262
|
|
6263
|
+
// Utilities
|
6264
|
+
|
6265
|
+
// Types
|
6266
|
+
|
6267
|
+
// Types
|
6268
|
+
|
6269
|
+
// Composables
|
6270
|
+
const makeIconSizeProps = propsFactory({
|
6271
|
+
iconSize: [Number, String],
|
6272
|
+
iconSizes: {
|
6273
|
+
type: Array,
|
6274
|
+
default: () => [['x-small', 10], ['small', 16], ['default', 24], ['large', 28], ['x-large', 32]]
|
6275
|
+
}
|
6276
|
+
}, 'iconSize');
|
6277
|
+
function useIconSizes(props, fallback) {
|
6278
|
+
const iconSize = computed(() => {
|
6279
|
+
const iconSizeMap = new Map(props.iconSizes);
|
6280
|
+
const _iconSize = props.iconSize ?? fallback() ?? 'default';
|
6281
|
+
return iconSizeMap.has(_iconSize) ? iconSizeMap.get(_iconSize) : _iconSize;
|
6282
|
+
});
|
6283
|
+
return {
|
6284
|
+
iconSize
|
6285
|
+
};
|
6286
|
+
}
|
6287
|
+
|
6188
6288
|
// Types
|
6189
6289
|
|
6190
6290
|
const allowedTypes = ['success', 'info', 'warning', 'error'];
|
@@ -6224,6 +6324,7 @@ const makeVAlertProps = propsFactory({
|
|
6224
6324
|
...makeDensityProps(),
|
6225
6325
|
...makeDimensionProps(),
|
6226
6326
|
...makeElevationProps(),
|
6327
|
+
...makeIconSizeProps(),
|
6227
6328
|
...makeLocationProps(),
|
6228
6329
|
...makePositionProps(),
|
6229
6330
|
...makeRoundedProps(),
|
@@ -6251,6 +6352,9 @@ const VAlert = genericComponent()({
|
|
6251
6352
|
if (!props.type) return props.icon;
|
6252
6353
|
return props.icon ?? `$${props.type}`;
|
6253
6354
|
});
|
6355
|
+
const {
|
6356
|
+
iconSize
|
6357
|
+
} = useIconSizes(props, () => props.prominent ? 44 : 28);
|
6254
6358
|
const {
|
6255
6359
|
themeClasses
|
6256
6360
|
} = provideTheme(props);
|
@@ -6298,6 +6402,11 @@ const VAlert = genericComponent()({
|
|
6298
6402
|
const hasPrepend = !!(slots.prepend || icon.value);
|
6299
6403
|
const hasTitle = !!(slots.title || props.title);
|
6300
6404
|
const hasClose = !!(slots.close || props.closable);
|
6405
|
+
const iconProps = {
|
6406
|
+
density: props.density,
|
6407
|
+
icon: icon.value,
|
6408
|
+
size: iconSize.value
|
6409
|
+
};
|
6301
6410
|
return isActive.value && createVNode(props.tag, {
|
6302
6411
|
"class": normalizeClass(['v-alert', props.border && {
|
6303
6412
|
'v-alert--border': !!props.border,
|
@@ -6315,19 +6424,14 @@ const VAlert = genericComponent()({
|
|
6315
6424
|
}, null), hasPrepend && createElementVNode("div", {
|
6316
6425
|
"key": "prepend",
|
6317
6426
|
"class": "v-alert__prepend"
|
6318
|
-
}, [!slots.prepend ? createVNode(VIcon, {
|
6319
|
-
"key": "prepend-icon"
|
6320
|
-
|
6321
|
-
"icon": icon.value,
|
6322
|
-
"size": props.prominent ? 44 : 28
|
6323
|
-
}, null) : createVNode(VDefaultsProvider, {
|
6427
|
+
}, [!slots.prepend ? createVNode(VIcon, mergeProps({
|
6428
|
+
"key": "prepend-icon"
|
6429
|
+
}, iconProps), null) : createVNode(VDefaultsProvider, {
|
6324
6430
|
"key": "prepend-defaults",
|
6325
6431
|
"disabled": !icon.value,
|
6326
6432
|
"defaults": {
|
6327
6433
|
VIcon: {
|
6328
|
-
|
6329
|
-
icon: icon.value,
|
6330
|
-
size: props.prominent ? 44 : 28
|
6434
|
+
...iconProps
|
6331
6435
|
}
|
6332
6436
|
}
|
6333
6437
|
}, slots.prepend)]), createElementVNode("div", {
|
@@ -7852,6 +7956,7 @@ function getOffsetPosition(isHorizontal, element) {
|
|
7852
7956
|
const VSlideGroupSymbol = Symbol.for('vuetify:v-slide-group');
|
7853
7957
|
const makeVSlideGroupProps = propsFactory({
|
7854
7958
|
centerActive: Boolean,
|
7959
|
+
contentClass: null,
|
7855
7960
|
direction: {
|
7856
7961
|
type: String,
|
7857
7962
|
default: 'horizontal'
|
@@ -8164,7 +8269,7 @@ const VSlideGroup = genericComponent()({
|
|
8164
8269
|
})]), createElementVNode("div", {
|
8165
8270
|
"key": "container",
|
8166
8271
|
"ref": containerRef,
|
8167
|
-
"class":
|
8272
|
+
"class": normalizeClass(['v-slide-group__container', props.contentClass]),
|
8168
8273
|
"onScroll": onScroll
|
8169
8274
|
}, [createElementVNode("div", {
|
8170
8275
|
"ref": contentRef,
|
@@ -8526,6 +8631,68 @@ const VChip = genericComponent()({
|
|
8526
8631
|
}
|
8527
8632
|
});
|
8528
8633
|
|
8634
|
+
const makeVDividerProps = propsFactory({
|
8635
|
+
color: String,
|
8636
|
+
inset: Boolean,
|
8637
|
+
length: [Number, String],
|
8638
|
+
opacity: [Number, String],
|
8639
|
+
thickness: [Number, String],
|
8640
|
+
vertical: Boolean,
|
8641
|
+
...makeComponentProps(),
|
8642
|
+
...makeThemeProps()
|
8643
|
+
}, 'VDivider');
|
8644
|
+
const VDivider = genericComponent()({
|
8645
|
+
name: 'VDivider',
|
8646
|
+
props: makeVDividerProps(),
|
8647
|
+
setup(props, _ref) {
|
8648
|
+
let {
|
8649
|
+
attrs,
|
8650
|
+
slots
|
8651
|
+
} = _ref;
|
8652
|
+
const {
|
8653
|
+
themeClasses
|
8654
|
+
} = provideTheme(props);
|
8655
|
+
const {
|
8656
|
+
textColorClasses,
|
8657
|
+
textColorStyles
|
8658
|
+
} = useTextColor(() => props.color);
|
8659
|
+
const dividerStyles = computed(() => {
|
8660
|
+
const styles = {};
|
8661
|
+
if (props.length) {
|
8662
|
+
styles[props.vertical ? 'height' : 'width'] = convertToUnit(props.length);
|
8663
|
+
}
|
8664
|
+
if (props.thickness) {
|
8665
|
+
styles[props.vertical ? 'borderRightWidth' : 'borderTopWidth'] = convertToUnit(props.thickness);
|
8666
|
+
}
|
8667
|
+
return styles;
|
8668
|
+
});
|
8669
|
+
useRender(() => {
|
8670
|
+
const divider = createElementVNode("hr", {
|
8671
|
+
"class": normalizeClass([{
|
8672
|
+
'v-divider': true,
|
8673
|
+
'v-divider--inset': props.inset,
|
8674
|
+
'v-divider--vertical': props.vertical
|
8675
|
+
}, themeClasses.value, textColorClasses.value, props.class]),
|
8676
|
+
"style": normalizeStyle([dividerStyles.value, textColorStyles.value, {
|
8677
|
+
'--v-border-opacity': props.opacity
|
8678
|
+
}, props.style]),
|
8679
|
+
"aria-orientation": !attrs.role || attrs.role === 'separator' ? props.vertical ? 'vertical' : 'horizontal' : undefined,
|
8680
|
+
"role": `${attrs.role || 'separator'}`
|
8681
|
+
}, null);
|
8682
|
+
if (!slots.default) return divider;
|
8683
|
+
return createElementVNode("div", {
|
8684
|
+
"class": normalizeClass(['v-divider__wrapper', {
|
8685
|
+
'v-divider__wrapper--vertical': props.vertical,
|
8686
|
+
'v-divider__wrapper--inset': props.inset
|
8687
|
+
}])
|
8688
|
+
}, [divider, createElementVNode("div", {
|
8689
|
+
"class": "v-divider__content"
|
8690
|
+
}, [slots.default()]), divider]);
|
8691
|
+
});
|
8692
|
+
return {};
|
8693
|
+
}
|
8694
|
+
});
|
8695
|
+
|
8529
8696
|
// Utilities
|
8530
8697
|
|
8531
8698
|
// List
|
@@ -9677,68 +9844,6 @@ const VListSubheader = genericComponent()({
|
|
9677
9844
|
}
|
9678
9845
|
});
|
9679
9846
|
|
9680
|
-
const makeVDividerProps = propsFactory({
|
9681
|
-
color: String,
|
9682
|
-
inset: Boolean,
|
9683
|
-
length: [Number, String],
|
9684
|
-
opacity: [Number, String],
|
9685
|
-
thickness: [Number, String],
|
9686
|
-
vertical: Boolean,
|
9687
|
-
...makeComponentProps(),
|
9688
|
-
...makeThemeProps()
|
9689
|
-
}, 'VDivider');
|
9690
|
-
const VDivider = genericComponent()({
|
9691
|
-
name: 'VDivider',
|
9692
|
-
props: makeVDividerProps(),
|
9693
|
-
setup(props, _ref) {
|
9694
|
-
let {
|
9695
|
-
attrs,
|
9696
|
-
slots
|
9697
|
-
} = _ref;
|
9698
|
-
const {
|
9699
|
-
themeClasses
|
9700
|
-
} = provideTheme(props);
|
9701
|
-
const {
|
9702
|
-
textColorClasses,
|
9703
|
-
textColorStyles
|
9704
|
-
} = useTextColor(() => props.color);
|
9705
|
-
const dividerStyles = computed(() => {
|
9706
|
-
const styles = {};
|
9707
|
-
if (props.length) {
|
9708
|
-
styles[props.vertical ? 'height' : 'width'] = convertToUnit(props.length);
|
9709
|
-
}
|
9710
|
-
if (props.thickness) {
|
9711
|
-
styles[props.vertical ? 'borderRightWidth' : 'borderTopWidth'] = convertToUnit(props.thickness);
|
9712
|
-
}
|
9713
|
-
return styles;
|
9714
|
-
});
|
9715
|
-
useRender(() => {
|
9716
|
-
const divider = createElementVNode("hr", {
|
9717
|
-
"class": normalizeClass([{
|
9718
|
-
'v-divider': true,
|
9719
|
-
'v-divider--inset': props.inset,
|
9720
|
-
'v-divider--vertical': props.vertical
|
9721
|
-
}, themeClasses.value, textColorClasses.value, props.class]),
|
9722
|
-
"style": normalizeStyle([dividerStyles.value, textColorStyles.value, {
|
9723
|
-
'--v-border-opacity': props.opacity
|
9724
|
-
}, props.style]),
|
9725
|
-
"aria-orientation": !attrs.role || attrs.role === 'separator' ? props.vertical ? 'vertical' : 'horizontal' : undefined,
|
9726
|
-
"role": `${attrs.role || 'separator'}`
|
9727
|
-
}, null);
|
9728
|
-
if (!slots.default) return divider;
|
9729
|
-
return createElementVNode("div", {
|
9730
|
-
"class": normalizeClass(['v-divider__wrapper', {
|
9731
|
-
'v-divider__wrapper--vertical': props.vertical,
|
9732
|
-
'v-divider__wrapper--inset': props.inset
|
9733
|
-
}])
|
9734
|
-
}, [divider, createElementVNode("div", {
|
9735
|
-
"class": "v-divider__content"
|
9736
|
-
}, [slots.default()]), divider]);
|
9737
|
-
});
|
9738
|
-
return {};
|
9739
|
-
}
|
9740
|
-
});
|
9741
|
-
|
9742
9847
|
// Types
|
9743
9848
|
|
9744
9849
|
const makeVListChildrenProps = propsFactory({
|
@@ -12666,7 +12771,12 @@ function useVirtual(props, items) {
|
|
12666
12771
|
}
|
12667
12772
|
function calculateOffset(index) {
|
12668
12773
|
index = clamp(index, 0, items.value.length - 1);
|
12669
|
-
|
12774
|
+
const whole = Math.floor(index);
|
12775
|
+
const fraction = index % 1;
|
12776
|
+
const next = whole + 1;
|
12777
|
+
const wholeOffset = offsets[whole] || 0;
|
12778
|
+
const nextOffset = offsets[next] || wholeOffset;
|
12779
|
+
return wholeOffset + (nextOffset - wholeOffset) * fraction;
|
12670
12780
|
}
|
12671
12781
|
function calculateIndex(scrollTop) {
|
12672
12782
|
return binaryClosest(offsets, scrollTop);
|
@@ -13020,6 +13130,7 @@ const makeSelectProps = propsFactory({
|
|
13020
13130
|
},
|
13021
13131
|
openOnClear: Boolean,
|
13022
13132
|
itemColor: String,
|
13133
|
+
noAutoScroll: Boolean,
|
13023
13134
|
...makeItemsProps({
|
13024
13135
|
itemChildren: false
|
13025
13136
|
})
|
@@ -13234,7 +13345,7 @@ const VSelect = genericComponent()({
|
|
13234
13345
|
watch(menu, () => {
|
13235
13346
|
if (!props.hideSelected && menu.value && model.value.length) {
|
13236
13347
|
const index = displayItems.value.findIndex(item => model.value.some(s => (props.valueComparator || deepEqual)(s.value, item.value)));
|
13237
|
-
IN_BROWSER && window.requestAnimationFrame(() => {
|
13348
|
+
IN_BROWSER && !props.noAutoScroll && window.requestAnimationFrame(() => {
|
13238
13349
|
index >= 0 && vVirtualScrollRef.value?.scrollToIndex(index);
|
13239
13350
|
});
|
13240
13351
|
}
|
@@ -13326,6 +13437,22 @@ const VSelect = genericComponent()({
|
|
13326
13437
|
key: item.value,
|
13327
13438
|
onClick: () => select(item, null)
|
13328
13439
|
});
|
13440
|
+
if (item.raw.type === 'divider') {
|
13441
|
+
return slots.divider?.({
|
13442
|
+
props: item.raw,
|
13443
|
+
index
|
13444
|
+
}) ?? createVNode(VDivider, mergeProps(item.props, {
|
13445
|
+
"key": `divider-${index}`
|
13446
|
+
}), null);
|
13447
|
+
}
|
13448
|
+
if (item.raw.type === 'subheader') {
|
13449
|
+
return slots.subheader?.({
|
13450
|
+
props: item.raw,
|
13451
|
+
index
|
13452
|
+
}) ?? createVNode(VListSubheader, mergeProps(item.props, {
|
13453
|
+
"key": `subheader-${index}`
|
13454
|
+
}), null);
|
13455
|
+
}
|
13329
13456
|
return slots.item?.({
|
13330
13457
|
item,
|
13331
13458
|
index,
|
@@ -13486,6 +13613,9 @@ function filterItems(items, query, options) {
|
|
13486
13613
|
let match = -1;
|
13487
13614
|
if ((query || customFiltersLength > 0) && !options?.noFilter) {
|
13488
13615
|
if (typeof item === 'object') {
|
13616
|
+
if (['divider', 'subheader'].includes(item.raw?.type)) {
|
13617
|
+
continue;
|
13618
|
+
}
|
13489
13619
|
const filterKeys = keys || Object.keys(transformed);
|
13490
13620
|
for (const key of filterKeys) {
|
13491
13621
|
const value = getPropertyFromItem(transformed, key);
|
@@ -13924,6 +14054,22 @@ const VAutocomplete = genericComponent()({
|
|
13924
14054
|
active: highlightFirst.value && index === 0 ? true : undefined,
|
13925
14055
|
onClick: () => select(item, null)
|
13926
14056
|
});
|
14057
|
+
if (item.raw.type === 'divider') {
|
14058
|
+
return slots.divider?.({
|
14059
|
+
props: item.raw,
|
14060
|
+
index
|
14061
|
+
}) ?? createVNode(VDivider, mergeProps(item.props, {
|
14062
|
+
"key": `divider-${index}`
|
14063
|
+
}), null);
|
14064
|
+
}
|
14065
|
+
if (item.raw.type === 'subheader') {
|
14066
|
+
return slots.subheader?.({
|
14067
|
+
props: item.raw,
|
14068
|
+
index
|
14069
|
+
}) ?? createVNode(VListSubheader, mergeProps(item.props, {
|
14070
|
+
"key": `subheader-${index}`
|
14071
|
+
}), null);
|
14072
|
+
}
|
13927
14073
|
return slots.item?.({
|
13928
14074
|
item,
|
13929
14075
|
index,
|
@@ -17519,13 +17665,13 @@ function date(value) {
|
|
17519
17665
|
return null;
|
17520
17666
|
}
|
17521
17667
|
const sundayJanuarySecond2000 = new Date(2000, 0, 2);
|
17522
|
-
function getWeekdays(locale, firstDayOfWeek) {
|
17668
|
+
function getWeekdays(locale, firstDayOfWeek, weekdayFormat) {
|
17523
17669
|
const daysFromSunday = firstDayOfWeek ?? weekInfo(locale)?.firstDay ?? 0;
|
17524
17670
|
return createRange(7).map(i => {
|
17525
17671
|
const weekday = new Date(sundayJanuarySecond2000);
|
17526
17672
|
weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i);
|
17527
17673
|
return new Intl.DateTimeFormat(locale, {
|
17528
|
-
weekday: 'narrow'
|
17674
|
+
weekday: weekdayFormat ?? 'narrow'
|
17529
17675
|
}).format(weekday);
|
17530
17676
|
});
|
17531
17677
|
}
|
@@ -17989,9 +18135,9 @@ class VuetifyDateAdapter {
|
|
17989
18135
|
getDiff(date, comparing, unit) {
|
17990
18136
|
return getDiff(date, comparing, unit);
|
17991
18137
|
}
|
17992
|
-
getWeekdays(firstDayOfWeek) {
|
18138
|
+
getWeekdays(firstDayOfWeek, weekdayFormat) {
|
17993
18139
|
const firstDay = firstDayOfWeek !== undefined ? Number(firstDayOfWeek) : undefined;
|
17994
|
-
return getWeekdays(this.locale, firstDay);
|
18140
|
+
return getWeekdays(this.locale, firstDay, weekdayFormat);
|
17995
18141
|
}
|
17996
18142
|
getYear(date) {
|
17997
18143
|
return getYear(date);
|
@@ -18334,6 +18480,7 @@ const VCombobox = genericComponent()({
|
|
18334
18480
|
_search.value = val ?? '';
|
18335
18481
|
if (!props.multiple && !hasSelectionSlot.value) {
|
18336
18482
|
model.value = [transformItem$3(props, val)];
|
18483
|
+
nextTick(() => vVirtualScrollRef.value?.scrollToIndex(0));
|
18337
18484
|
}
|
18338
18485
|
if (val && props.multiple && props.delimiters?.length) {
|
18339
18486
|
const values = val.split(new RegExp(`(?:${props.delimiters.join('|')})+`));
|
@@ -18650,6 +18797,22 @@ const VCombobox = genericComponent()({
|
|
18650
18797
|
active: highlightFirst.value && index === 0 ? true : undefined,
|
18651
18798
|
onClick: () => select(item, null)
|
18652
18799
|
});
|
18800
|
+
if (item.raw.type === 'divider') {
|
18801
|
+
return slots.divider?.({
|
18802
|
+
props: item.raw,
|
18803
|
+
index
|
18804
|
+
}) ?? createVNode(VDivider, mergeProps(item.props, {
|
18805
|
+
"key": `divider-${index}`
|
18806
|
+
}), null);
|
18807
|
+
}
|
18808
|
+
if (item.raw.type === 'subheader') {
|
18809
|
+
return slots.subheader?.({
|
18810
|
+
props: item.raw,
|
18811
|
+
index
|
18812
|
+
}) ?? createVNode(VListSubheader, mergeProps(item.props, {
|
18813
|
+
"key": `subheader-${index}`
|
18814
|
+
}), null);
|
18815
|
+
}
|
18653
18816
|
return slots.item?.({
|
18654
18817
|
item,
|
18655
18818
|
index,
|
@@ -20529,6 +20692,7 @@ const makeVDataTableHeadersProps = propsFactory({
|
|
20529
20692
|
color: String,
|
20530
20693
|
disableSort: Boolean,
|
20531
20694
|
fixedHeader: Boolean,
|
20695
|
+
lastFixed: Boolean,
|
20532
20696
|
multiSort: Boolean,
|
20533
20697
|
sortAscIcon: {
|
20534
20698
|
type: IconValue,
|
@@ -20575,10 +20739,11 @@ const VDataTableHeaders = genericComponent()({
|
|
20575
20739
|
loaderClasses
|
20576
20740
|
} = useLoader(props);
|
20577
20741
|
function getFixedStyles(column, y) {
|
20578
|
-
if (!(props.sticky || props.fixedHeader) && !column.fixed) return undefined;
|
20742
|
+
if (!(props.sticky || props.fixedHeader) && !(column.fixed || column.lastFixed)) return undefined;
|
20579
20743
|
return {
|
20580
20744
|
position: 'sticky',
|
20581
|
-
left: column.fixed ? convertToUnit(column.fixedOffset) : undefined,
|
20745
|
+
left: column.fixed || column.lastFixed ? convertToUnit(column.fixedOffset) : undefined,
|
20746
|
+
right: column.lastFixed ? convertToUnit(column.fixedOffset ?? 0) : undefined,
|
20582
20747
|
top: props.sticky || props.fixedHeader ? `calc(var(--v-table-header-height) * ${y})` : undefined
|
20583
20748
|
};
|
20584
20749
|
}
|
@@ -22293,7 +22458,8 @@ const makeCalendarProps = propsFactory({
|
|
22293
22458
|
firstDayOfWeek: {
|
22294
22459
|
type: [Number, String],
|
22295
22460
|
default: undefined
|
22296
|
-
}
|
22461
|
+
},
|
22462
|
+
weekdayFormat: String
|
22297
22463
|
}, 'calendar');
|
22298
22464
|
function useCalendar(props) {
|
22299
22465
|
const adapter = useDate();
|
@@ -22541,7 +22707,7 @@ const VDatePickerMonth = genericComponent()({
|
|
22541
22707
|
"ref": daysRef,
|
22542
22708
|
"key": daysInMonth.value[0].date?.toString(),
|
22543
22709
|
"class": "v-date-picker-month__days"
|
22544
|
-
}, [!props.hideWeekdays && adapter.getWeekdays(props.firstDayOfWeek).map(weekDay => createElementVNode("div", {
|
22710
|
+
}, [!props.hideWeekdays && adapter.getWeekdays(props.firstDayOfWeek, props.weekdayFormat).map(weekDay => createElementVNode("div", {
|
22545
22711
|
"class": ['v-date-picker-month__day', 'v-date-picker-month__weekday']
|
22546
22712
|
}, [weekDay])), daysInMonth.value.map((item, i) => {
|
22547
22713
|
const slotProps = {
|
@@ -25072,6 +25238,10 @@ const makeVNumberInputProps = propsFactory({
|
|
25072
25238
|
type: Number,
|
25073
25239
|
default: 0
|
25074
25240
|
},
|
25241
|
+
minFractionDigits: {
|
25242
|
+
type: Number,
|
25243
|
+
default: null
|
25244
|
+
},
|
25075
25245
|
...omit(makeVTextFieldProps(), ['modelValue', 'validationValue'])
|
25076
25246
|
}, 'VNumberInput');
|
25077
25247
|
const VNumberInput = genericComponent()({
|
@@ -25102,9 +25272,19 @@ const VNumberInput = genericComponent()({
|
|
25102
25272
|
} = useFocus(props);
|
25103
25273
|
function correctPrecision(val) {
|
25104
25274
|
let precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : props.precision;
|
25105
|
-
|
25106
|
-
|
25107
|
-
|
25275
|
+
if (precision == null) {
|
25276
|
+
return String(val);
|
25277
|
+
}
|
25278
|
+
let fixed = val.toFixed(precision);
|
25279
|
+
if (isFocused.value) {
|
25280
|
+
return Number(fixed).toString(); // trim zeros
|
25281
|
+
}
|
25282
|
+
if ((props.minFractionDigits ?? precision) < precision) {
|
25283
|
+
const trimLimit = precision - props.minFractionDigits;
|
25284
|
+
const [baseDigits, fractionDigits] = fixed.split('.');
|
25285
|
+
fixed = [baseDigits, fractionDigits.replace(new RegExp(`0{1,${trimLimit}}$`), '')].filter(Boolean).join('.');
|
25286
|
+
}
|
25287
|
+
return fixed;
|
25108
25288
|
}
|
25109
25289
|
const model = useProxiedModel(props, 'modelValue', null, val => val ?? null, val => val == null ? val ?? null : clamp(Number(val), props.min, props.max));
|
25110
25290
|
const _inputText = shallowRef(null);
|
@@ -25163,6 +25343,7 @@ const VNumberInput = genericComponent()({
|
|
25163
25343
|
}
|
25164
25344
|
};
|
25165
25345
|
watch(() => props.precision, () => formatInputValue());
|
25346
|
+
watch(() => props.minFractionDigits, () => formatInputValue());
|
25166
25347
|
onMounted(() => {
|
25167
25348
|
clampModel();
|
25168
25349
|
});
|
@@ -25272,7 +25453,7 @@ const VNumberInput = genericComponent()({
|
|
25272
25453
|
inputText.value = null;
|
25273
25454
|
return;
|
25274
25455
|
}
|
25275
|
-
inputText.value =
|
25456
|
+
inputText.value = correctPrecision(model.value);
|
25276
25457
|
}
|
25277
25458
|
function trimDecimalZeros() {
|
25278
25459
|
if (controlsDisabled.value) return;
|
@@ -25532,9 +25713,10 @@ const VOtpInput = genericComponent()({
|
|
25532
25713
|
e.preventDefault();
|
25533
25714
|
e.stopPropagation();
|
25534
25715
|
const clipboardText = e?.clipboardData?.getData('Text').slice(0, length.value) ?? '';
|
25716
|
+
const finalIndex = clipboardText.length - 1 === -1 ? index : clipboardText.length - 1;
|
25535
25717
|
if (isValidNumber(clipboardText)) return;
|
25536
25718
|
model.value = clipboardText.split('');
|
25537
|
-
inputRef.value?.[
|
25719
|
+
inputRef.value?.[finalIndex].focus();
|
25538
25720
|
}
|
25539
25721
|
function reset() {
|
25540
25722
|
model.value = [];
|
@@ -29316,7 +29498,7 @@ function createVuetify$1() {
|
|
29316
29498
|
};
|
29317
29499
|
});
|
29318
29500
|
}
|
29319
|
-
const version$1 = "3.8.
|
29501
|
+
const version$1 = "3.8.7-dev.2025-05-27";
|
29320
29502
|
createVuetify$1.version = version$1;
|
29321
29503
|
|
29322
29504
|
// Vue's inject() can only be used in setup
|
@@ -29341,7 +29523,7 @@ const createVuetify = function () {
|
|
29341
29523
|
...options
|
29342
29524
|
});
|
29343
29525
|
};
|
29344
|
-
const version = "3.8.
|
29526
|
+
const version = "3.8.7-dev.2025-05-27";
|
29345
29527
|
createVuetify.version = version;
|
29346
29528
|
|
29347
29529
|
export { index as blueprints, components, createVuetify, directives, useDate, useDefaults, useDisplay, useGoTo, useLayout, useLocale, useRtl, useTheme, version };
|