@vuetify/nightly 3.8.5-dev.2025-05-14 → 3.8.5-master.2025-05-15
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 +6 -19
- package/dist/json/attributes.json +3205 -3221
- package/dist/json/importMap-labs.json +12 -12
- package/dist/json/importMap.json +136 -136
- package/dist/json/tags.json +0 -4
- package/dist/json/web-types.json +6164 -6203
- package/dist/vuetify-labs.cjs +61 -183
- package/dist/vuetify-labs.css +3924 -3952
- package/dist/vuetify-labs.d.ts +1479 -1528
- package/dist/vuetify-labs.esm.js +62 -184
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +61 -183
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +50 -177
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +4149 -4177
- package/dist/vuetify.d.ts +947 -998
- package/dist/vuetify.esm.js +51 -178
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +50 -177
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +1178 -1184
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAlert/VAlert.css +1 -6
- package/lib/components/VAlert/VAlert.d.ts +0 -35
- package/lib/components/VAlert/VAlert.js +9 -14
- package/lib/components/VAlert/VAlert.js.map +1 -1
- package/lib/components/VAlert/VAlert.sass +1 -7
- package/lib/components/VAutocomplete/VAutocomplete.d.ts +178 -178
- package/lib/components/VBtnGroup/VBtnGroup.css +7 -30
- package/lib/components/VBtnGroup/VBtnGroup.d.ts +32 -58
- package/lib/components/VBtnGroup/VBtnGroup.js +3 -7
- package/lib/components/VBtnGroup/VBtnGroup.js.map +1 -1
- package/lib/components/VBtnGroup/VBtnGroup.sass +17 -44
- package/lib/components/VBtnToggle/VBtnToggle.d.ts +0 -25
- package/lib/components/VCheckbox/VCheckbox.d.ts +15 -15
- package/lib/components/VCombobox/VCombobox.d.ts +178 -178
- package/lib/components/VField/VField.d.ts +3 -3
- package/lib/components/VFileInput/VFileInput.d.ts +45 -45
- package/lib/components/VInput/VInput.d.ts +16 -16
- package/lib/components/VNumberInput/VNumberInput.d.ts +169 -169
- package/lib/components/VOverlay/VOverlay.css +1 -1
- package/lib/components/VOverlay/_variables.scss +1 -1
- package/lib/components/VRadioGroup/VRadioGroup.d.ts +15 -15
- package/lib/components/VRangeSlider/VRangeSlider.d.ts +15 -15
- package/lib/components/VSelect/VSelect.d.ts +178 -178
- package/lib/components/VSlider/VSlider.d.ts +15 -15
- package/lib/components/VSwitch/VSwitch.d.ts +15 -15
- package/lib/components/VTextField/VTextField.d.ts +57 -57
- package/lib/components/VTextarea/VTextarea.d.ts +45 -45
- package/lib/components/VValidation/VValidation.d.ts +8 -8
- package/lib/composables/calendar.d.ts +0 -1
- package/lib/composables/calendar.js.map +1 -1
- package/lib/composables/theme.d.ts +1 -6
- package/lib/composables/theme.js +26 -94
- package/lib/composables/theme.js.map +1 -1
- package/lib/composables/validation.d.ts +6 -5
- package/lib/composables/validation.js +4 -29
- package/lib/composables/validation.js.map +1 -1
- package/lib/composables/virtual.js +1 -6
- package/lib/composables/virtual.js.map +1 -1
- package/lib/entry-bundler.js +1 -1
- package/lib/entry-bundler.js.map +1 -1
- package/lib/framework.d.ts +45 -50
- package/lib/framework.js +1 -1
- package/lib/framework.js.map +1 -1
- package/lib/labs/VColorInput/VColorInput.d.ts +15 -15
- package/lib/labs/VDateInput/VDateInput.d.ts +171 -171
- package/lib/labs/VIconBtn/VIconBtn.d.ts +29 -29
- package/lib/labs/VIconBtn/VIconBtn.js +11 -7
- package/lib/labs/VIconBtn/VIconBtn.js.map +1 -1
- package/lib/labs/rules/rules.d.ts +9 -5
- package/lib/labs/rules/rules.js +73 -51
- package/lib/labs/rules/rules.js.map +1 -1
- package/lib/util/globals.d.ts +0 -1
- package/lib/util/globals.js +0 -1
- package/lib/util/globals.js.map +1 -1
- package/package.json +1 -2
- package/lib/composables/iconSizes.d.ts +0 -28
- package/lib/composables/iconSizes.js +0 -23
- package/lib/composables/iconSizes.js.map +0 -1
package/dist/vuetify.esm.js
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
/*!
|
2
|
-
* Vuetify v3.8.5-
|
2
|
+
* Vuetify v3.8.5-master.2025-05-15
|
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, toValue, onBeforeUnmount, watch, readonly, onMounted, useId, onDeactivated, onActivated, onScopeDispose, effectScope, toRaw,
|
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, toValue, onBeforeUnmount, watch, readonly, onMounted, useId, onDeactivated, onActivated, onScopeDispose, effectScope, toRaw, TransitionGroup, Transition, toRefs, isRef, 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
|
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';
|
14
13
|
|
15
14
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
16
15
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
@@ -2783,7 +2782,6 @@ const makeThemeProps = propsFactory({
|
|
2783
2782
|
function genDefaults$1() {
|
2784
2783
|
return {
|
2785
2784
|
defaultTheme: 'light',
|
2786
|
-
prefix: 'v-',
|
2787
2785
|
variations: {
|
2788
2786
|
colors: [],
|
2789
2787
|
lighten: 0,
|
@@ -2865,10 +2863,7 @@ function genDefaults$1() {
|
|
2865
2863
|
}
|
2866
2864
|
}
|
2867
2865
|
},
|
2868
|
-
stylesheetId: 'vuetify-theme-stylesheet'
|
2869
|
-
scoped: false,
|
2870
|
-
unimportant: false,
|
2871
|
-
utilities: true
|
2866
|
+
stylesheetId: 'vuetify-theme-stylesheet'
|
2872
2867
|
};
|
2873
2868
|
}
|
2874
2869
|
function parseThemeOptions() {
|
@@ -2891,21 +2886,21 @@ function parseThemeOptions() {
|
|
2891
2886
|
function createCssClass(lines, selector, content, scope) {
|
2892
2887
|
lines.push(`${getScopedSelector(selector, scope)} {\n`, ...content.map(line => ` ${line};\n`), '}\n');
|
2893
2888
|
}
|
2894
|
-
function genCssVariables(theme
|
2889
|
+
function genCssVariables(theme) {
|
2895
2890
|
const lightOverlay = theme.dark ? 2 : 1;
|
2896
2891
|
const darkOverlay = theme.dark ? 1 : 2;
|
2897
2892
|
const variables = [];
|
2898
2893
|
for (const [key, value] of Object.entries(theme.colors)) {
|
2899
2894
|
const rgb = parseColor(value);
|
2900
|
-
variables.push(
|
2895
|
+
variables.push(`--v-theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`);
|
2901
2896
|
if (!key.startsWith('on-')) {
|
2902
|
-
variables.push(
|
2897
|
+
variables.push(`--v-theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`);
|
2903
2898
|
}
|
2904
2899
|
}
|
2905
2900
|
for (const [key, value] of Object.entries(theme.variables)) {
|
2906
2901
|
const color = typeof value === 'string' && value.startsWith('#') ? parseColor(value) : undefined;
|
2907
2902
|
const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : undefined;
|
2908
|
-
variables.push(
|
2903
|
+
variables.push(`--v-${key}: ${rgb ?? value}`);
|
2909
2904
|
}
|
2910
2905
|
return variables;
|
2911
2906
|
}
|
@@ -2949,8 +2944,7 @@ function getScopedSelector(selector, scope) {
|
|
2949
2944
|
const scopeSelector = `:where(${scope})`;
|
2950
2945
|
return selector === ':root' ? scopeSelector : `${scopeSelector} ${selector}`;
|
2951
2946
|
}
|
2952
|
-
function upsertStyles(
|
2953
|
-
const styleEl = getOrCreateStyleElement(id, cspNonce);
|
2947
|
+
function upsertStyles(styleEl, styles) {
|
2954
2948
|
if (!styleEl) return;
|
2955
2949
|
styleEl.innerHTML = styles;
|
2956
2950
|
}
|
@@ -2970,17 +2964,8 @@ function getOrCreateStyleElement(id, cspNonce) {
|
|
2970
2964
|
// Composables
|
2971
2965
|
function createTheme(options) {
|
2972
2966
|
const parsedOptions = parseThemeOptions(options);
|
2973
|
-
const
|
2967
|
+
const name = shallowRef(parsedOptions.defaultTheme);
|
2974
2968
|
const themes = ref(parsedOptions.themes);
|
2975
|
-
const systemName = shallowRef('light');
|
2976
|
-
const name = computed({
|
2977
|
-
get() {
|
2978
|
-
return _name.value === 'system' ? systemName.value : _name.value;
|
2979
|
-
},
|
2980
|
-
set(val) {
|
2981
|
-
_name.value = val;
|
2982
|
-
}
|
2983
|
-
});
|
2984
2969
|
const computedThemes = computed(() => {
|
2985
2970
|
const acc = {};
|
2986
2971
|
for (const [name, original] of Object.entries(themes.value)) {
|
@@ -3001,49 +2986,28 @@ function createTheme(options) {
|
|
3001
2986
|
const current = toRef(() => computedThemes.value[name.value]);
|
3002
2987
|
const styles = computed(() => {
|
3003
2988
|
const lines = [];
|
3004
|
-
const important = parsedOptions.unimportant ? '' : ' !important';
|
3005
|
-
const scoped = parsedOptions.scoped ? parsedOptions.prefix : '';
|
3006
2989
|
if (current.value?.dark) {
|
3007
2990
|
createCssClass(lines, ':root', ['color-scheme: dark'], parsedOptions.scope);
|
3008
2991
|
}
|
3009
|
-
createCssClass(lines, ':root', genCssVariables(current.value
|
2992
|
+
createCssClass(lines, ':root', genCssVariables(current.value), parsedOptions.scope);
|
3010
2993
|
for (const [themeName, theme] of Object.entries(computedThemes.value)) {
|
3011
|
-
createCssClass(lines,
|
3012
|
-
}
|
3013
|
-
|
3014
|
-
|
3015
|
-
|
3016
|
-
|
3017
|
-
|
3018
|
-
|
3019
|
-
|
3020
|
-
}
|
3021
|
-
|
3022
|
-
|
3023
|
-
createCssClass(fgLines, `.${scoped}border-${key}`, [`--${parsedOptions.prefix}border-color: var(--${parsedOptions.prefix}theme-${key})`], parsedOptions.scope);
|
3024
|
-
}
|
2994
|
+
createCssClass(lines, `.v-theme--${themeName}`, [`color-scheme: ${theme.dark ? 'dark' : 'normal'}`, ...genCssVariables(theme)], parsedOptions.scope);
|
2995
|
+
}
|
2996
|
+
const bgLines = [];
|
2997
|
+
const fgLines = [];
|
2998
|
+
const colors = new Set(Object.values(computedThemes.value).flatMap(theme => Object.keys(theme.colors)));
|
2999
|
+
for (const key of colors) {
|
3000
|
+
if (key.startsWith('on-')) {
|
3001
|
+
createCssClass(fgLines, `.${key}`, [`color: rgb(var(--v-theme-${key})) !important`], parsedOptions.scope);
|
3002
|
+
} else {
|
3003
|
+
createCssClass(bgLines, `.bg-${key}`, [`--v-theme-overlay-multiplier: var(--v-theme-${key}-overlay-multiplier)`, `background-color: rgb(var(--v-theme-${key})) !important`, `color: rgb(var(--v-theme-on-${key})) !important`], parsedOptions.scope);
|
3004
|
+
createCssClass(fgLines, `.text-${key}`, [`color: rgb(var(--v-theme-${key})) !important`], parsedOptions.scope);
|
3005
|
+
createCssClass(fgLines, `.border-${key}`, [`--v-border-color: var(--v-theme-${key})`], parsedOptions.scope);
|
3025
3006
|
}
|
3026
|
-
lines.push(...bgLines, ...fgLines);
|
3027
3007
|
}
|
3008
|
+
lines.push(...bgLines, ...fgLines);
|
3028
3009
|
return lines.map((str, i) => i === 0 ? str : ` ${str}`).join('');
|
3029
3010
|
});
|
3030
|
-
const themeClasses = toRef(() => parsedOptions.isDisabled ? undefined : `${parsedOptions.prefix}theme--${name.value}`);
|
3031
|
-
const themeNames = toRef(() => Object.keys(computedThemes.value));
|
3032
|
-
if (SUPPORTS_MATCH_MEDIA) {
|
3033
|
-
const media = window.matchMedia('(prefers-color-scheme: dark)');
|
3034
|
-
function updateSystemName() {
|
3035
|
-
systemName.value = media.matches ? 'dark' : 'light';
|
3036
|
-
}
|
3037
|
-
updateSystemName();
|
3038
|
-
media.addEventListener('change', updateSystemName, {
|
3039
|
-
passive: true
|
3040
|
-
});
|
3041
|
-
if (getCurrentScope()) {
|
3042
|
-
onScopeDispose(() => {
|
3043
|
-
media.removeEventListener('change', updateSystemName);
|
3044
|
-
});
|
3045
|
-
}
|
3046
|
-
}
|
3047
3011
|
function install(app) {
|
3048
3012
|
if (parsedOptions.isDisabled) return;
|
3049
3013
|
const head = app._context.provides.usehead;
|
@@ -3081,55 +3045,22 @@ function createTheme(options) {
|
|
3081
3045
|
updateStyles();
|
3082
3046
|
}
|
3083
3047
|
function updateStyles() {
|
3084
|
-
upsertStyles(parsedOptions.stylesheetId, parsedOptions.cspNonce, styles.value);
|
3048
|
+
upsertStyles(getOrCreateStyleElement(parsedOptions.stylesheetId, parsedOptions.cspNonce), styles.value);
|
3085
3049
|
}
|
3086
3050
|
}
|
3087
3051
|
}
|
3088
|
-
|
3089
|
-
if (!themeNames.value.includes(themeName)) {
|
3090
|
-
consoleWarn(`Theme "${themeName}" not found on the Vuetify theme instance`);
|
3091
|
-
return;
|
3092
|
-
}
|
3093
|
-
name.value = themeName;
|
3094
|
-
}
|
3095
|
-
function cycle() {
|
3096
|
-
let themeArray = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : themeNames.value;
|
3097
|
-
const currentIndex = themeArray.indexOf(name.value);
|
3098
|
-
const nextIndex = currentIndex === -1 ? 0 : (currentIndex + 1) % themeArray.length;
|
3099
|
-
change(themeArray[nextIndex]);
|
3100
|
-
}
|
3101
|
-
function toggle() {
|
3102
|
-
let themeArray = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['light', 'dark'];
|
3103
|
-
cycle(themeArray);
|
3104
|
-
}
|
3105
|
-
const globalName = new Proxy(name, {
|
3106
|
-
get(target, prop) {
|
3107
|
-
return target[prop];
|
3108
|
-
},
|
3109
|
-
set(target, prop, val) {
|
3110
|
-
if (prop === 'value') {
|
3111
|
-
deprecate(`theme.global.name.value = ${val}`, `theme.change('${val}')`);
|
3112
|
-
}
|
3113
|
-
// @ts-expect-error
|
3114
|
-
target[prop] = val;
|
3115
|
-
return true;
|
3116
|
-
}
|
3117
|
-
});
|
3052
|
+
const themeClasses = toRef(() => parsedOptions.isDisabled ? undefined : `v-theme--${name.value}`);
|
3118
3053
|
return {
|
3119
3054
|
install,
|
3120
|
-
change,
|
3121
|
-
cycle,
|
3122
|
-
toggle,
|
3123
3055
|
isDisabled: parsedOptions.isDisabled,
|
3124
3056
|
name,
|
3125
3057
|
themes,
|
3126
3058
|
current,
|
3127
3059
|
computedThemes,
|
3128
|
-
prefix: parsedOptions.prefix,
|
3129
3060
|
themeClasses,
|
3130
3061
|
styles,
|
3131
3062
|
global: {
|
3132
|
-
name
|
3063
|
+
name,
|
3133
3064
|
current
|
3134
3065
|
}
|
3135
3066
|
};
|
@@ -3140,7 +3071,7 @@ function provideTheme(props) {
|
|
3140
3071
|
if (!theme) throw new Error('Could not find Vuetify theme injection');
|
3141
3072
|
const name = toRef(() => props.theme ?? theme.name.value);
|
3142
3073
|
const current = toRef(() => theme.themes.value[name.value]);
|
3143
|
-
const themeClasses = toRef(() => theme.isDisabled ? undefined :
|
3074
|
+
const themeClasses = toRef(() => theme.isDisabled ? undefined : `v-theme--${name.value}`);
|
3144
3075
|
const newTheme = {
|
3145
3076
|
...theme,
|
3146
3077
|
name,
|
@@ -4687,15 +4618,9 @@ function useVariant(props) {
|
|
4687
4618
|
};
|
4688
4619
|
}
|
4689
4620
|
|
4690
|
-
// Types
|
4691
|
-
|
4692
4621
|
const makeVBtnGroupProps = propsFactory({
|
4693
4622
|
baseColor: String,
|
4694
4623
|
divided: Boolean,
|
4695
|
-
direction: {
|
4696
|
-
type: String,
|
4697
|
-
default: 'horizontal'
|
4698
|
-
},
|
4699
4624
|
...makeBorderProps(),
|
4700
4625
|
...makeComponentProps(),
|
4701
4626
|
...makeDensityProps(),
|
@@ -4729,7 +4654,7 @@ const VBtnGroup = genericComponent()({
|
|
4729
4654
|
} = useRounded(props);
|
4730
4655
|
provideDefaults({
|
4731
4656
|
VBtn: {
|
4732
|
-
height:
|
4657
|
+
height: 'auto',
|
4733
4658
|
baseColor: toRef(() => props.baseColor),
|
4734
4659
|
color: toRef(() => props.color),
|
4735
4660
|
density: toRef(() => props.density),
|
@@ -4739,7 +4664,7 @@ const VBtnGroup = genericComponent()({
|
|
4739
4664
|
});
|
4740
4665
|
useRender(() => {
|
4741
4666
|
return createVNode(props.tag, {
|
4742
|
-
"class": ['v-btn-group',
|
4667
|
+
"class": ['v-btn-group', {
|
4743
4668
|
'v-btn-group--divided': props.divided
|
4744
4669
|
}, themeClasses.value, borderClasses.value, densityClasses.value, elevationClasses.value, roundedClasses.value, props.class],
|
4745
4670
|
"style": props.style
|
@@ -6218,31 +6143,6 @@ const VAppBarTitle = genericComponent()({
|
|
6218
6143
|
// Utilities
|
6219
6144
|
const VAlertTitle = createSimpleFunctional('v-alert-title');
|
6220
6145
|
|
6221
|
-
// Utilities
|
6222
|
-
|
6223
|
-
// Types
|
6224
|
-
|
6225
|
-
// Types
|
6226
|
-
|
6227
|
-
// Composables
|
6228
|
-
const makeIconSizeProps = propsFactory({
|
6229
|
-
iconSize: [Number, String],
|
6230
|
-
iconSizes: {
|
6231
|
-
type: Array,
|
6232
|
-
default: () => [['x-small', 10], ['small', 16], ['default', 24], ['large', 28], ['x-large', 32]]
|
6233
|
-
}
|
6234
|
-
}, 'iconSize');
|
6235
|
-
function useIconSizes(props, fallback) {
|
6236
|
-
const iconSize = computed(() => {
|
6237
|
-
const iconSizeMap = new Map(props.iconSizes);
|
6238
|
-
const _iconSize = props.iconSize ?? fallback() ?? 'default';
|
6239
|
-
return iconSizeMap.has(_iconSize) ? iconSizeMap.get(_iconSize) : _iconSize;
|
6240
|
-
});
|
6241
|
-
return {
|
6242
|
-
iconSize
|
6243
|
-
};
|
6244
|
-
}
|
6245
|
-
|
6246
6146
|
// Types
|
6247
6147
|
|
6248
6148
|
const allowedTypes = ['success', 'info', 'warning', 'error'];
|
@@ -6282,7 +6182,6 @@ const makeVAlertProps = propsFactory({
|
|
6282
6182
|
...makeDensityProps(),
|
6283
6183
|
...makeDimensionProps(),
|
6284
6184
|
...makeElevationProps(),
|
6285
|
-
...makeIconSizeProps(),
|
6286
6185
|
...makeLocationProps(),
|
6287
6186
|
...makePositionProps(),
|
6288
6187
|
...makeRoundedProps(),
|
@@ -6310,9 +6209,6 @@ const VAlert = genericComponent()({
|
|
6310
6209
|
if (!props.type) return props.icon;
|
6311
6210
|
return props.icon ?? `$${props.type}`;
|
6312
6211
|
});
|
6313
|
-
const {
|
6314
|
-
iconSize
|
6315
|
-
} = useIconSizes(props, () => props.prominent ? 44 : 28);
|
6316
6212
|
const {
|
6317
6213
|
themeClasses
|
6318
6214
|
} = provideTheme(props);
|
@@ -6360,11 +6256,6 @@ const VAlert = genericComponent()({
|
|
6360
6256
|
const hasPrepend = !!(slots.prepend || icon.value);
|
6361
6257
|
const hasTitle = !!(slots.title || props.title);
|
6362
6258
|
const hasClose = !!(slots.close || props.closable);
|
6363
|
-
const iconProps = {
|
6364
|
-
density: props.density,
|
6365
|
-
icon: icon.value,
|
6366
|
-
size: iconSize.value
|
6367
|
-
};
|
6368
6259
|
return isActive.value && createVNode(props.tag, {
|
6369
6260
|
"class": ['v-alert', props.border && {
|
6370
6261
|
'v-alert--border': !!props.border,
|
@@ -6382,14 +6273,19 @@ const VAlert = genericComponent()({
|
|
6382
6273
|
}, null), hasPrepend && createVNode("div", {
|
6383
6274
|
"key": "prepend",
|
6384
6275
|
"class": "v-alert__prepend"
|
6385
|
-
}, [!slots.prepend ? createVNode(VIcon,
|
6386
|
-
"key": "prepend-icon"
|
6387
|
-
|
6276
|
+
}, [!slots.prepend ? createVNode(VIcon, {
|
6277
|
+
"key": "prepend-icon",
|
6278
|
+
"density": props.density,
|
6279
|
+
"icon": icon.value,
|
6280
|
+
"size": props.prominent ? 44 : 28
|
6281
|
+
}, null) : createVNode(VDefaultsProvider, {
|
6388
6282
|
"key": "prepend-defaults",
|
6389
6283
|
"disabled": !icon.value,
|
6390
6284
|
"defaults": {
|
6391
6285
|
VIcon: {
|
6392
|
-
|
6286
|
+
density: props.density,
|
6287
|
+
icon: icon.value,
|
6288
|
+
size: props.prominent ? 44 : 28
|
6393
6289
|
}
|
6394
6290
|
}
|
6395
6291
|
}, slots.prepend)]), createVNode("div", {
|
@@ -7139,13 +7035,18 @@ function useForm(props) {
|
|
7139
7035
|
};
|
7140
7036
|
}
|
7141
7037
|
|
7038
|
+
// Utilities
|
7039
|
+
const RulesSymbol = Symbol.for('vuetify:rules');
|
7040
|
+
function useRules(fn) {
|
7041
|
+
const resolveRules = inject$1(RulesSymbol, null);
|
7042
|
+
if (!resolveRules) return toRef(fn);
|
7043
|
+
return resolveRules(fn);
|
7044
|
+
}
|
7045
|
+
|
7142
7046
|
// Composables
|
7143
7047
|
|
7144
7048
|
// Types
|
7145
7049
|
|
7146
|
-
// type ValidationRuleParams = [any, string?]
|
7147
|
-
// type ValidationAlias = string | [string, ...ValidationRuleParams]
|
7148
|
-
|
7149
7050
|
const makeValidationProps = propsFactory({
|
7150
7051
|
disabled: {
|
7151
7052
|
type: Boolean,
|
@@ -7168,7 +7069,6 @@ const makeValidationProps = propsFactory({
|
|
7168
7069
|
},
|
7169
7070
|
rules: {
|
7170
7071
|
type: Array,
|
7171
|
-
// type: Array as PropType<readonly (ValidationRule | ValidationAlias)[]>,
|
7172
7072
|
default: () => []
|
7173
7073
|
},
|
7174
7074
|
modelValue: null,
|
@@ -7182,7 +7082,7 @@ function useValidation(props) {
|
|
7182
7082
|
const model = useProxiedModel(props, 'modelValue');
|
7183
7083
|
const validationModel = computed(() => props.validationValue === undefined ? model.value : props.validationValue);
|
7184
7084
|
const form = useForm(props);
|
7185
|
-
|
7085
|
+
const rules = useRules(() => props.rules);
|
7186
7086
|
const internalErrorMessages = ref([]);
|
7187
7087
|
const isPristine = shallowRef(true);
|
7188
7088
|
const isDirty = computed(() => !!(wrapInArray(model.value === '' ? null : model.value).length || wrapInArray(validationModel.value === '' ? null : validationModel.value).length));
|
@@ -7222,28 +7122,6 @@ function useValidation(props) {
|
|
7222
7122
|
});
|
7223
7123
|
const vm = getCurrentInstance('validation');
|
7224
7124
|
const uid = computed(() => props.name ?? unref(id));
|
7225
|
-
|
7226
|
-
// const resolvedRules = computed(() => props.rules.map(rule => {
|
7227
|
-
// let ruleName: string | null = null
|
7228
|
-
// let ruleParams: ValidationRuleParams = [undefined]
|
7229
|
-
// if (Array.isArray(rule)) {
|
7230
|
-
// ruleName = rule[0]
|
7231
|
-
// ruleParams = rule.slice(1) as ValidationRuleParams
|
7232
|
-
// } else if (typeof rule === 'string') {
|
7233
|
-
// ruleName = rule
|
7234
|
-
// }
|
7235
|
-
|
7236
|
-
// if (ruleName !== null) {
|
7237
|
-
// if (ruleName.startsWith('$')) {
|
7238
|
-
// ruleName = ruleName.slice(1)
|
7239
|
-
// }
|
7240
|
-
|
7241
|
-
// return rules?.[ruleName]?.(...ruleParams)
|
7242
|
-
// } else {
|
7243
|
-
// return rule
|
7244
|
-
// }
|
7245
|
-
// }))
|
7246
|
-
|
7247
7125
|
onBeforeMount(() => {
|
7248
7126
|
form.register?.({
|
7249
7127
|
id: uid.value,
|
@@ -7299,7 +7177,7 @@ function useValidation(props) {
|
|
7299
7177
|
let silent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
7300
7178
|
const results = [];
|
7301
7179
|
isValidating.value = true;
|
7302
|
-
for (const rule of
|
7180
|
+
for (const rule of rules.value) {
|
7303
7181
|
if (results.length >= Number(props.maxErrors ?? 1)) {
|
7304
7182
|
break;
|
7305
7183
|
}
|
@@ -12735,12 +12613,7 @@ function useVirtual(props, items) {
|
|
12735
12613
|
}
|
12736
12614
|
function calculateOffset(index) {
|
12737
12615
|
index = clamp(index, 0, items.value.length - 1);
|
12738
|
-
|
12739
|
-
const fraction = index % 1;
|
12740
|
-
const next = whole + 1;
|
12741
|
-
const wholeOffset = offsets[whole] || 0;
|
12742
|
-
const nextOffset = offsets[next] || wholeOffset;
|
12743
|
-
return wholeOffset + (nextOffset - wholeOffset) * fraction;
|
12616
|
+
return offsets[index] || 0;
|
12744
12617
|
}
|
12745
12618
|
function calculateIndex(scrollTop) {
|
12746
12619
|
return binaryClosest(offsets, scrollTop);
|
@@ -29343,7 +29216,7 @@ function createVuetify$1() {
|
|
29343
29216
|
};
|
29344
29217
|
});
|
29345
29218
|
}
|
29346
|
-
const version$1 = "3.8.5-
|
29219
|
+
const version$1 = "3.8.5-master.2025-05-15";
|
29347
29220
|
createVuetify$1.version = version$1;
|
29348
29221
|
|
29349
29222
|
// Vue's inject() can only be used in setup
|
@@ -29368,7 +29241,7 @@ const createVuetify = function () {
|
|
29368
29241
|
...options
|
29369
29242
|
});
|
29370
29243
|
};
|
29371
|
-
const version = "3.8.5-
|
29244
|
+
const version = "3.8.5-master.2025-05-15";
|
29372
29245
|
createVuetify.version = version;
|
29373
29246
|
|
29374
29247
|
export { index as blueprints, components, createVuetify, directives, useDate, useDefaults, useDisplay, useGoTo, useLayout, useLocale, useRtl, useTheme, version };
|