@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-labs.esm.js
CHANGED
@@ -1,10 +1,10 @@
|
|
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, 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, onBeforeUnmount, watch, readonly, onMounted, useId, onDeactivated, onActivated, onScopeDispose, effectScope, toRaw, createVNode, TransitionGroup, Transition, mergeProps, toRefs, toValue, 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
|
// Types
|
10
10
|
// eslint-disable-line vue/prefer-import-from-vue
|
@@ -81,7 +81,6 @@ const IN_BROWSER = typeof window !== 'undefined';
|
|
81
81
|
const SUPPORTS_INTERSECTION = IN_BROWSER && 'IntersectionObserver' in window;
|
82
82
|
const SUPPORTS_TOUCH = IN_BROWSER && ('ontouchstart' in window || window.navigator.maxTouchPoints > 0);
|
83
83
|
const SUPPORTS_EYE_DROPPER = IN_BROWSER && 'EyeDropper' in window;
|
84
|
-
const SUPPORTS_MATCH_MEDIA = IN_BROWSER && 'matchMedia' in window && typeof window.matchMedia === 'function';
|
85
84
|
|
86
85
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
87
86
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
@@ -2296,7 +2295,6 @@ const makeThemeProps = propsFactory({
|
|
2296
2295
|
function genDefaults$2() {
|
2297
2296
|
return {
|
2298
2297
|
defaultTheme: 'light',
|
2299
|
-
prefix: 'v-',
|
2300
2298
|
variations: {
|
2301
2299
|
colors: [],
|
2302
2300
|
lighten: 0,
|
@@ -2378,10 +2376,7 @@ function genDefaults$2() {
|
|
2378
2376
|
}
|
2379
2377
|
}
|
2380
2378
|
},
|
2381
|
-
stylesheetId: 'vuetify-theme-stylesheet'
|
2382
|
-
scoped: false,
|
2383
|
-
unimportant: false,
|
2384
|
-
utilities: true
|
2379
|
+
stylesheetId: 'vuetify-theme-stylesheet'
|
2385
2380
|
};
|
2386
2381
|
}
|
2387
2382
|
function parseThemeOptions() {
|
@@ -2404,21 +2399,21 @@ function parseThemeOptions() {
|
|
2404
2399
|
function createCssClass(lines, selector, content, scope) {
|
2405
2400
|
lines.push(`${getScopedSelector(selector, scope)} {\n`, ...content.map(line => ` ${line};\n`), '}\n');
|
2406
2401
|
}
|
2407
|
-
function genCssVariables(theme
|
2402
|
+
function genCssVariables(theme) {
|
2408
2403
|
const lightOverlay = theme.dark ? 2 : 1;
|
2409
2404
|
const darkOverlay = theme.dark ? 1 : 2;
|
2410
2405
|
const variables = [];
|
2411
2406
|
for (const [key, value] of Object.entries(theme.colors)) {
|
2412
2407
|
const rgb = parseColor(value);
|
2413
|
-
variables.push(
|
2408
|
+
variables.push(`--v-theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`);
|
2414
2409
|
if (!key.startsWith('on-')) {
|
2415
|
-
variables.push(
|
2410
|
+
variables.push(`--v-theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`);
|
2416
2411
|
}
|
2417
2412
|
}
|
2418
2413
|
for (const [key, value] of Object.entries(theme.variables)) {
|
2419
2414
|
const color = typeof value === 'string' && value.startsWith('#') ? parseColor(value) : undefined;
|
2420
2415
|
const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : undefined;
|
2421
|
-
variables.push(
|
2416
|
+
variables.push(`--v-${key}: ${rgb ?? value}`);
|
2422
2417
|
}
|
2423
2418
|
return variables;
|
2424
2419
|
}
|
@@ -2462,8 +2457,7 @@ function getScopedSelector(selector, scope) {
|
|
2462
2457
|
const scopeSelector = `:where(${scope})`;
|
2463
2458
|
return selector === ':root' ? scopeSelector : `${scopeSelector} ${selector}`;
|
2464
2459
|
}
|
2465
|
-
function upsertStyles(
|
2466
|
-
const styleEl = getOrCreateStyleElement(id, cspNonce);
|
2460
|
+
function upsertStyles(styleEl, styles) {
|
2467
2461
|
if (!styleEl) return;
|
2468
2462
|
styleEl.innerHTML = styles;
|
2469
2463
|
}
|
@@ -2483,17 +2477,8 @@ function getOrCreateStyleElement(id, cspNonce) {
|
|
2483
2477
|
// Composables
|
2484
2478
|
function createTheme(options) {
|
2485
2479
|
const parsedOptions = parseThemeOptions(options);
|
2486
|
-
const
|
2480
|
+
const name = shallowRef(parsedOptions.defaultTheme);
|
2487
2481
|
const themes = ref(parsedOptions.themes);
|
2488
|
-
const systemName = shallowRef('light');
|
2489
|
-
const name = computed({
|
2490
|
-
get() {
|
2491
|
-
return _name.value === 'system' ? systemName.value : _name.value;
|
2492
|
-
},
|
2493
|
-
set(val) {
|
2494
|
-
_name.value = val;
|
2495
|
-
}
|
2496
|
-
});
|
2497
2482
|
const computedThemes = computed(() => {
|
2498
2483
|
const acc = {};
|
2499
2484
|
for (const [name, original] of Object.entries(themes.value)) {
|
@@ -2514,49 +2499,28 @@ function createTheme(options) {
|
|
2514
2499
|
const current = toRef(() => computedThemes.value[name.value]);
|
2515
2500
|
const styles = computed(() => {
|
2516
2501
|
const lines = [];
|
2517
|
-
const important = parsedOptions.unimportant ? '' : ' !important';
|
2518
|
-
const scoped = parsedOptions.scoped ? parsedOptions.prefix : '';
|
2519
2502
|
if (current.value?.dark) {
|
2520
2503
|
createCssClass(lines, ':root', ['color-scheme: dark'], parsedOptions.scope);
|
2521
2504
|
}
|
2522
|
-
createCssClass(lines, ':root', genCssVariables(current.value
|
2505
|
+
createCssClass(lines, ':root', genCssVariables(current.value), parsedOptions.scope);
|
2523
2506
|
for (const [themeName, theme] of Object.entries(computedThemes.value)) {
|
2524
|
-
createCssClass(lines,
|
2525
|
-
}
|
2526
|
-
|
2527
|
-
|
2528
|
-
|
2529
|
-
|
2530
|
-
|
2531
|
-
|
2532
|
-
|
2533
|
-
}
|
2534
|
-
|
2535
|
-
|
2536
|
-
createCssClass(fgLines, `.${scoped}border-${key}`, [`--${parsedOptions.prefix}border-color: var(--${parsedOptions.prefix}theme-${key})`], parsedOptions.scope);
|
2537
|
-
}
|
2507
|
+
createCssClass(lines, `.v-theme--${themeName}`, [`color-scheme: ${theme.dark ? 'dark' : 'normal'}`, ...genCssVariables(theme)], parsedOptions.scope);
|
2508
|
+
}
|
2509
|
+
const bgLines = [];
|
2510
|
+
const fgLines = [];
|
2511
|
+
const colors = new Set(Object.values(computedThemes.value).flatMap(theme => Object.keys(theme.colors)));
|
2512
|
+
for (const key of colors) {
|
2513
|
+
if (key.startsWith('on-')) {
|
2514
|
+
createCssClass(fgLines, `.${key}`, [`color: rgb(var(--v-theme-${key})) !important`], parsedOptions.scope);
|
2515
|
+
} else {
|
2516
|
+
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);
|
2517
|
+
createCssClass(fgLines, `.text-${key}`, [`color: rgb(var(--v-theme-${key})) !important`], parsedOptions.scope);
|
2518
|
+
createCssClass(fgLines, `.border-${key}`, [`--v-border-color: var(--v-theme-${key})`], parsedOptions.scope);
|
2538
2519
|
}
|
2539
|
-
lines.push(...bgLines, ...fgLines);
|
2540
2520
|
}
|
2521
|
+
lines.push(...bgLines, ...fgLines);
|
2541
2522
|
return lines.map((str, i) => i === 0 ? str : ` ${str}`).join('');
|
2542
2523
|
});
|
2543
|
-
const themeClasses = toRef(() => parsedOptions.isDisabled ? undefined : `${parsedOptions.prefix}theme--${name.value}`);
|
2544
|
-
const themeNames = toRef(() => Object.keys(computedThemes.value));
|
2545
|
-
if (SUPPORTS_MATCH_MEDIA) {
|
2546
|
-
const media = window.matchMedia('(prefers-color-scheme: dark)');
|
2547
|
-
function updateSystemName() {
|
2548
|
-
systemName.value = media.matches ? 'dark' : 'light';
|
2549
|
-
}
|
2550
|
-
updateSystemName();
|
2551
|
-
media.addEventListener('change', updateSystemName, {
|
2552
|
-
passive: true
|
2553
|
-
});
|
2554
|
-
if (getCurrentScope()) {
|
2555
|
-
onScopeDispose(() => {
|
2556
|
-
media.removeEventListener('change', updateSystemName);
|
2557
|
-
});
|
2558
|
-
}
|
2559
|
-
}
|
2560
2524
|
function install(app) {
|
2561
2525
|
if (parsedOptions.isDisabled) return;
|
2562
2526
|
const head = app._context.provides.usehead;
|
@@ -2594,55 +2558,22 @@ function createTheme(options) {
|
|
2594
2558
|
updateStyles();
|
2595
2559
|
}
|
2596
2560
|
function updateStyles() {
|
2597
|
-
upsertStyles(parsedOptions.stylesheetId, parsedOptions.cspNonce, styles.value);
|
2561
|
+
upsertStyles(getOrCreateStyleElement(parsedOptions.stylesheetId, parsedOptions.cspNonce), styles.value);
|
2598
2562
|
}
|
2599
2563
|
}
|
2600
2564
|
}
|
2601
|
-
|
2602
|
-
if (!themeNames.value.includes(themeName)) {
|
2603
|
-
consoleWarn(`Theme "${themeName}" not found on the Vuetify theme instance`);
|
2604
|
-
return;
|
2605
|
-
}
|
2606
|
-
name.value = themeName;
|
2607
|
-
}
|
2608
|
-
function cycle() {
|
2609
|
-
let themeArray = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : themeNames.value;
|
2610
|
-
const currentIndex = themeArray.indexOf(name.value);
|
2611
|
-
const nextIndex = currentIndex === -1 ? 0 : (currentIndex + 1) % themeArray.length;
|
2612
|
-
change(themeArray[nextIndex]);
|
2613
|
-
}
|
2614
|
-
function toggle() {
|
2615
|
-
let themeArray = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['light', 'dark'];
|
2616
|
-
cycle(themeArray);
|
2617
|
-
}
|
2618
|
-
const globalName = new Proxy(name, {
|
2619
|
-
get(target, prop) {
|
2620
|
-
return target[prop];
|
2621
|
-
},
|
2622
|
-
set(target, prop, val) {
|
2623
|
-
if (prop === 'value') {
|
2624
|
-
deprecate(`theme.global.name.value = ${val}`, `theme.change('${val}')`);
|
2625
|
-
}
|
2626
|
-
// @ts-expect-error
|
2627
|
-
target[prop] = val;
|
2628
|
-
return true;
|
2629
|
-
}
|
2630
|
-
});
|
2565
|
+
const themeClasses = toRef(() => parsedOptions.isDisabled ? undefined : `v-theme--${name.value}`);
|
2631
2566
|
return {
|
2632
2567
|
install,
|
2633
|
-
change,
|
2634
|
-
cycle,
|
2635
|
-
toggle,
|
2636
2568
|
isDisabled: parsedOptions.isDisabled,
|
2637
2569
|
name,
|
2638
2570
|
themes,
|
2639
2571
|
current,
|
2640
2572
|
computedThemes,
|
2641
|
-
prefix: parsedOptions.prefix,
|
2642
2573
|
themeClasses,
|
2643
2574
|
styles,
|
2644
2575
|
global: {
|
2645
|
-
name
|
2576
|
+
name,
|
2646
2577
|
current
|
2647
2578
|
}
|
2648
2579
|
};
|
@@ -2653,7 +2584,7 @@ function provideTheme(props) {
|
|
2653
2584
|
if (!theme) throw new Error('Could not find Vuetify theme injection');
|
2654
2585
|
const name = toRef(() => props.theme ?? theme.name.value);
|
2655
2586
|
const current = toRef(() => theme.themes.value[name.value]);
|
2656
|
-
const themeClasses = toRef(() => theme.isDisabled ? undefined :
|
2587
|
+
const themeClasses = toRef(() => theme.isDisabled ? undefined : `v-theme--${name.value}`);
|
2657
2588
|
const newTheme = {
|
2658
2589
|
...theme,
|
2659
2590
|
name,
|
@@ -4200,15 +4131,9 @@ function useVariant(props) {
|
|
4200
4131
|
};
|
4201
4132
|
}
|
4202
4133
|
|
4203
|
-
// Types
|
4204
|
-
|
4205
4134
|
const makeVBtnGroupProps = propsFactory({
|
4206
4135
|
baseColor: String,
|
4207
4136
|
divided: Boolean,
|
4208
|
-
direction: {
|
4209
|
-
type: String,
|
4210
|
-
default: 'horizontal'
|
4211
|
-
},
|
4212
4137
|
...makeBorderProps(),
|
4213
4138
|
...makeComponentProps(),
|
4214
4139
|
...makeDensityProps(),
|
@@ -4242,7 +4167,7 @@ const VBtnGroup = genericComponent()({
|
|
4242
4167
|
} = useRounded(props);
|
4243
4168
|
provideDefaults({
|
4244
4169
|
VBtn: {
|
4245
|
-
height:
|
4170
|
+
height: 'auto',
|
4246
4171
|
baseColor: toRef(() => props.baseColor),
|
4247
4172
|
color: toRef(() => props.color),
|
4248
4173
|
density: toRef(() => props.density),
|
@@ -4252,7 +4177,7 @@ const VBtnGroup = genericComponent()({
|
|
4252
4177
|
});
|
4253
4178
|
useRender(() => {
|
4254
4179
|
return createVNode(props.tag, {
|
4255
|
-
"class": ['v-btn-group',
|
4180
|
+
"class": ['v-btn-group', {
|
4256
4181
|
'v-btn-group--divided': props.divided
|
4257
4182
|
}, themeClasses.value, borderClasses.value, densityClasses.value, elevationClasses.value, roundedClasses.value, props.class],
|
4258
4183
|
"style": props.style
|
@@ -5940,31 +5865,6 @@ const VAppBarTitle = genericComponent()({
|
|
5940
5865
|
// Utilities
|
5941
5866
|
const VAlertTitle = createSimpleFunctional('v-alert-title');
|
5942
5867
|
|
5943
|
-
// Utilities
|
5944
|
-
|
5945
|
-
// Types
|
5946
|
-
|
5947
|
-
// Types
|
5948
|
-
|
5949
|
-
// Composables
|
5950
|
-
const makeIconSizeProps = propsFactory({
|
5951
|
-
iconSize: [Number, String],
|
5952
|
-
iconSizes: {
|
5953
|
-
type: Array,
|
5954
|
-
default: () => [['x-small', 10], ['small', 16], ['default', 24], ['large', 28], ['x-large', 32]]
|
5955
|
-
}
|
5956
|
-
}, 'iconSize');
|
5957
|
-
function useIconSizes(props, fallback) {
|
5958
|
-
const iconSize = computed(() => {
|
5959
|
-
const iconSizeMap = new Map(props.iconSizes);
|
5960
|
-
const _iconSize = props.iconSize ?? fallback() ?? 'default';
|
5961
|
-
return iconSizeMap.has(_iconSize) ? iconSizeMap.get(_iconSize) : _iconSize;
|
5962
|
-
});
|
5963
|
-
return {
|
5964
|
-
iconSize
|
5965
|
-
};
|
5966
|
-
}
|
5967
|
-
|
5968
5868
|
// Types
|
5969
5869
|
|
5970
5870
|
const allowedTypes = ['success', 'info', 'warning', 'error'];
|
@@ -6004,7 +5904,6 @@ const makeVAlertProps = propsFactory({
|
|
6004
5904
|
...makeDensityProps(),
|
6005
5905
|
...makeDimensionProps(),
|
6006
5906
|
...makeElevationProps(),
|
6007
|
-
...makeIconSizeProps(),
|
6008
5907
|
...makeLocationProps(),
|
6009
5908
|
...makePositionProps(),
|
6010
5909
|
...makeRoundedProps(),
|
@@ -6032,9 +5931,6 @@ const VAlert = genericComponent()({
|
|
6032
5931
|
if (!props.type) return props.icon;
|
6033
5932
|
return props.icon ?? `$${props.type}`;
|
6034
5933
|
});
|
6035
|
-
const {
|
6036
|
-
iconSize
|
6037
|
-
} = useIconSizes(props, () => props.prominent ? 44 : 28);
|
6038
5934
|
const {
|
6039
5935
|
themeClasses
|
6040
5936
|
} = provideTheme(props);
|
@@ -6082,11 +5978,6 @@ const VAlert = genericComponent()({
|
|
6082
5978
|
const hasPrepend = !!(slots.prepend || icon.value);
|
6083
5979
|
const hasTitle = !!(slots.title || props.title);
|
6084
5980
|
const hasClose = !!(slots.close || props.closable);
|
6085
|
-
const iconProps = {
|
6086
|
-
density: props.density,
|
6087
|
-
icon: icon.value,
|
6088
|
-
size: iconSize.value
|
6089
|
-
};
|
6090
5981
|
return isActive.value && createVNode(props.tag, {
|
6091
5982
|
"class": ['v-alert', props.border && {
|
6092
5983
|
'v-alert--border': !!props.border,
|
@@ -6104,14 +5995,19 @@ const VAlert = genericComponent()({
|
|
6104
5995
|
}, null), hasPrepend && createVNode("div", {
|
6105
5996
|
"key": "prepend",
|
6106
5997
|
"class": "v-alert__prepend"
|
6107
|
-
}, [!slots.prepend ? createVNode(VIcon,
|
6108
|
-
"key": "prepend-icon"
|
6109
|
-
|
5998
|
+
}, [!slots.prepend ? createVNode(VIcon, {
|
5999
|
+
"key": "prepend-icon",
|
6000
|
+
"density": props.density,
|
6001
|
+
"icon": icon.value,
|
6002
|
+
"size": props.prominent ? 44 : 28
|
6003
|
+
}, null) : createVNode(VDefaultsProvider, {
|
6110
6004
|
"key": "prepend-defaults",
|
6111
6005
|
"disabled": !icon.value,
|
6112
6006
|
"defaults": {
|
6113
6007
|
VIcon: {
|
6114
|
-
|
6008
|
+
density: props.density,
|
6009
|
+
icon: icon.value,
|
6010
|
+
size: props.prominent ? 44 : 28
|
6115
6011
|
}
|
6116
6012
|
}
|
6117
6013
|
}, slots.prepend)]), createVNode("div", {
|
@@ -6861,13 +6757,18 @@ function useForm(props) {
|
|
6861
6757
|
};
|
6862
6758
|
}
|
6863
6759
|
|
6760
|
+
// Utilities
|
6761
|
+
const RulesSymbol = Symbol.for('vuetify:rules');
|
6762
|
+
function useRules(fn) {
|
6763
|
+
const resolveRules = inject$1(RulesSymbol, null);
|
6764
|
+
if (!resolveRules) return toRef(fn);
|
6765
|
+
return resolveRules(fn);
|
6766
|
+
}
|
6767
|
+
|
6864
6768
|
// Composables
|
6865
6769
|
|
6866
6770
|
// Types
|
6867
6771
|
|
6868
|
-
// type ValidationRuleParams = [any, string?]
|
6869
|
-
// type ValidationAlias = string | [string, ...ValidationRuleParams]
|
6870
|
-
|
6871
6772
|
const makeValidationProps = propsFactory({
|
6872
6773
|
disabled: {
|
6873
6774
|
type: Boolean,
|
@@ -6890,7 +6791,6 @@ const makeValidationProps = propsFactory({
|
|
6890
6791
|
},
|
6891
6792
|
rules: {
|
6892
6793
|
type: Array,
|
6893
|
-
// type: Array as PropType<readonly (ValidationRule | ValidationAlias)[]>,
|
6894
6794
|
default: () => []
|
6895
6795
|
},
|
6896
6796
|
modelValue: null,
|
@@ -6904,7 +6804,7 @@ function useValidation(props) {
|
|
6904
6804
|
const model = useProxiedModel(props, 'modelValue');
|
6905
6805
|
const validationModel = computed(() => props.validationValue === undefined ? model.value : props.validationValue);
|
6906
6806
|
const form = useForm(props);
|
6907
|
-
|
6807
|
+
const rules = useRules(() => props.rules);
|
6908
6808
|
const internalErrorMessages = ref([]);
|
6909
6809
|
const isPristine = shallowRef(true);
|
6910
6810
|
const isDirty = computed(() => !!(wrapInArray(model.value === '' ? null : model.value).length || wrapInArray(validationModel.value === '' ? null : validationModel.value).length));
|
@@ -6944,28 +6844,6 @@ function useValidation(props) {
|
|
6944
6844
|
});
|
6945
6845
|
const vm = getCurrentInstance('validation');
|
6946
6846
|
const uid = computed(() => props.name ?? unref(id));
|
6947
|
-
|
6948
|
-
// const resolvedRules = computed(() => props.rules.map(rule => {
|
6949
|
-
// let ruleName: string | null = null
|
6950
|
-
// let ruleParams: ValidationRuleParams = [undefined]
|
6951
|
-
// if (Array.isArray(rule)) {
|
6952
|
-
// ruleName = rule[0]
|
6953
|
-
// ruleParams = rule.slice(1) as ValidationRuleParams
|
6954
|
-
// } else if (typeof rule === 'string') {
|
6955
|
-
// ruleName = rule
|
6956
|
-
// }
|
6957
|
-
|
6958
|
-
// if (ruleName !== null) {
|
6959
|
-
// if (ruleName.startsWith('$')) {
|
6960
|
-
// ruleName = ruleName.slice(1)
|
6961
|
-
// }
|
6962
|
-
|
6963
|
-
// return rules?.[ruleName]?.(...ruleParams)
|
6964
|
-
// } else {
|
6965
|
-
// return rule
|
6966
|
-
// }
|
6967
|
-
// }))
|
6968
|
-
|
6969
6847
|
onBeforeMount(() => {
|
6970
6848
|
form.register?.({
|
6971
6849
|
id: uid.value,
|
@@ -7021,7 +6899,7 @@ function useValidation(props) {
|
|
7021
6899
|
let silent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
7022
6900
|
const results = [];
|
7023
6901
|
isValidating.value = true;
|
7024
|
-
for (const rule of
|
6902
|
+
for (const rule of rules.value) {
|
7025
6903
|
if (results.length >= Number(props.maxErrors ?? 1)) {
|
7026
6904
|
break;
|
7027
6905
|
}
|
@@ -12457,12 +12335,7 @@ function useVirtual(props, items) {
|
|
12457
12335
|
}
|
12458
12336
|
function calculateOffset(index) {
|
12459
12337
|
index = clamp(index, 0, items.value.length - 1);
|
12460
|
-
|
12461
|
-
const fraction = index % 1;
|
12462
|
-
const next = whole + 1;
|
12463
|
-
const wholeOffset = offsets[whole] || 0;
|
12464
|
-
const nextOffset = offsets[next] || wholeOffset;
|
12465
|
-
return wholeOffset + (nextOffset - wholeOffset) * fraction;
|
12338
|
+
return offsets[index] || 0;
|
12466
12339
|
}
|
12467
12340
|
function calculateIndex(scrollTop) {
|
12468
12341
|
return binaryClosest(offsets, scrollTop);
|
@@ -29990,6 +29863,11 @@ const makeVIconBtnProps = propsFactory({
|
|
29990
29863
|
hideOverlay: Boolean,
|
29991
29864
|
icon: [String, Function, Object],
|
29992
29865
|
iconColor: String,
|
29866
|
+
iconSize: [Number, String],
|
29867
|
+
iconSizes: {
|
29868
|
+
type: Array,
|
29869
|
+
default: () => [['x-small', 10], ['small', 16], ['default', 24], ['large', 28], ['x-large', 32]]
|
29870
|
+
},
|
29993
29871
|
loading: Boolean,
|
29994
29872
|
opacity: [Number, String],
|
29995
29873
|
readonly: Boolean,
|
@@ -30009,7 +29887,6 @@ const makeVIconBtnProps = propsFactory({
|
|
30009
29887
|
...makeBorderProps(),
|
30010
29888
|
...makeComponentProps(),
|
30011
29889
|
...makeElevationProps(),
|
30012
|
-
...makeIconSizeProps(),
|
30013
29890
|
...makeRoundedProps(),
|
30014
29891
|
...makeTagProps({
|
30015
29892
|
tag: 'button'
|
@@ -30064,6 +29941,7 @@ const VIconBtn = genericComponent()({
|
|
30064
29941
|
})()
|
30065
29942
|
}));
|
30066
29943
|
const btnSizeMap = new Map(props.sizes);
|
29944
|
+
const iconSizeMap = new Map(props.iconSizes);
|
30067
29945
|
function onClick() {
|
30068
29946
|
if (props.disabled || props.readonly || isActive.value === undefined || props.tag === 'a' && attrs.href) return;
|
30069
29947
|
isActive.value = !isActive.value;
|
@@ -30075,12 +29953,12 @@ const VIconBtn = genericComponent()({
|
|
30075
29953
|
const btnSize = hasNamedSize ? btnSizeMap.get(_btnSize) : _btnSize;
|
30076
29954
|
const btnHeight = props.height ?? btnSize;
|
30077
29955
|
const btnWidth = props.width ?? btnSize;
|
30078
|
-
const
|
30079
|
-
|
30080
|
-
|
29956
|
+
const _iconSize = props.iconSize;
|
29957
|
+
const hasNamedIconSize = iconSizeMap.has(_iconSize);
|
29958
|
+
const iconSize = !_iconSize ? hasNamedSize ? iconSizeMap.get(_btnSize) : iconSizeMap.get('default') : hasNamedIconSize ? iconSizeMap.get(_iconSize) : _iconSize;
|
30081
29959
|
const iconProps = {
|
30082
29960
|
icon,
|
30083
|
-
size: iconSize
|
29961
|
+
size: iconSize,
|
30084
29962
|
iconColor: props.iconColor,
|
30085
29963
|
opacity: props.opacity
|
30086
29964
|
};
|
@@ -30123,7 +30001,7 @@ const VIconBtn = genericComponent()({
|
|
30123
30001
|
"color": typeof props.loading === 'boolean' ? undefined : props.loading,
|
30124
30002
|
"indeterminate": "disable-shrink",
|
30125
30003
|
"width": "2",
|
30126
|
-
"size": iconSize
|
30004
|
+
"size": iconSize
|
30127
30005
|
}, null)])]
|
30128
30006
|
});
|
30129
30007
|
});
|
@@ -32033,7 +31911,7 @@ function createVuetify$1() {
|
|
32033
31911
|
};
|
32034
31912
|
});
|
32035
31913
|
}
|
32036
|
-
const version$1 = "3.8.5-
|
31914
|
+
const version$1 = "3.8.5-master.2025-05-15";
|
32037
31915
|
createVuetify$1.version = version$1;
|
32038
31916
|
|
32039
31917
|
// Vue's inject() can only be used in setup
|
@@ -32331,7 +32209,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
32331
32209
|
|
32332
32210
|
/* eslint-disable local-rules/sort-imports */
|
32333
32211
|
|
32334
|
-
const version = "3.8.5-
|
32212
|
+
const version = "3.8.5-master.2025-05-15";
|
32335
32213
|
|
32336
32214
|
/* eslint-disable local-rules/sort-imports */
|
32337
32215
|
|