@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.js
CHANGED
@@ -1,5 +1,5 @@
|
|
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
|
*/
|
@@ -85,7 +85,6 @@
|
|
85
85
|
const SUPPORTS_INTERSECTION = IN_BROWSER && 'IntersectionObserver' in window;
|
86
86
|
const SUPPORTS_TOUCH = IN_BROWSER && ('ontouchstart' in window || window.navigator.maxTouchPoints > 0);
|
87
87
|
const SUPPORTS_EYE_DROPPER = IN_BROWSER && 'EyeDropper' in window;
|
88
|
-
const SUPPORTS_MATCH_MEDIA = IN_BROWSER && 'matchMedia' in window && typeof window.matchMedia === 'function';
|
89
88
|
|
90
89
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
91
90
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
@@ -2300,7 +2299,6 @@
|
|
2300
2299
|
function genDefaults$2() {
|
2301
2300
|
return {
|
2302
2301
|
defaultTheme: 'light',
|
2303
|
-
prefix: 'v-',
|
2304
2302
|
variations: {
|
2305
2303
|
colors: [],
|
2306
2304
|
lighten: 0,
|
@@ -2382,10 +2380,7 @@
|
|
2382
2380
|
}
|
2383
2381
|
}
|
2384
2382
|
},
|
2385
|
-
stylesheetId: 'vuetify-theme-stylesheet'
|
2386
|
-
scoped: false,
|
2387
|
-
unimportant: false,
|
2388
|
-
utilities: true
|
2383
|
+
stylesheetId: 'vuetify-theme-stylesheet'
|
2389
2384
|
};
|
2390
2385
|
}
|
2391
2386
|
function parseThemeOptions() {
|
@@ -2408,21 +2403,21 @@
|
|
2408
2403
|
function createCssClass(lines, selector, content, scope) {
|
2409
2404
|
lines.push(`${getScopedSelector(selector, scope)} {\n`, ...content.map(line => ` ${line};\n`), '}\n');
|
2410
2405
|
}
|
2411
|
-
function genCssVariables(theme
|
2406
|
+
function genCssVariables(theme) {
|
2412
2407
|
const lightOverlay = theme.dark ? 2 : 1;
|
2413
2408
|
const darkOverlay = theme.dark ? 1 : 2;
|
2414
2409
|
const variables = [];
|
2415
2410
|
for (const [key, value] of Object.entries(theme.colors)) {
|
2416
2411
|
const rgb = parseColor(value);
|
2417
|
-
variables.push(
|
2412
|
+
variables.push(`--v-theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`);
|
2418
2413
|
if (!key.startsWith('on-')) {
|
2419
|
-
variables.push(
|
2414
|
+
variables.push(`--v-theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`);
|
2420
2415
|
}
|
2421
2416
|
}
|
2422
2417
|
for (const [key, value] of Object.entries(theme.variables)) {
|
2423
2418
|
const color = typeof value === 'string' && value.startsWith('#') ? parseColor(value) : undefined;
|
2424
2419
|
const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : undefined;
|
2425
|
-
variables.push(
|
2420
|
+
variables.push(`--v-${key}: ${rgb ?? value}`);
|
2426
2421
|
}
|
2427
2422
|
return variables;
|
2428
2423
|
}
|
@@ -2466,8 +2461,7 @@
|
|
2466
2461
|
const scopeSelector = `:where(${scope})`;
|
2467
2462
|
return selector === ':root' ? scopeSelector : `${scopeSelector} ${selector}`;
|
2468
2463
|
}
|
2469
|
-
function upsertStyles(
|
2470
|
-
const styleEl = getOrCreateStyleElement(id, cspNonce);
|
2464
|
+
function upsertStyles(styleEl, styles) {
|
2471
2465
|
if (!styleEl) return;
|
2472
2466
|
styleEl.innerHTML = styles;
|
2473
2467
|
}
|
@@ -2487,17 +2481,8 @@
|
|
2487
2481
|
// Composables
|
2488
2482
|
function createTheme(options) {
|
2489
2483
|
const parsedOptions = parseThemeOptions(options);
|
2490
|
-
const
|
2484
|
+
const name = vue.shallowRef(parsedOptions.defaultTheme);
|
2491
2485
|
const themes = vue.ref(parsedOptions.themes);
|
2492
|
-
const systemName = vue.shallowRef('light');
|
2493
|
-
const name = vue.computed({
|
2494
|
-
get() {
|
2495
|
-
return _name.value === 'system' ? systemName.value : _name.value;
|
2496
|
-
},
|
2497
|
-
set(val) {
|
2498
|
-
_name.value = val;
|
2499
|
-
}
|
2500
|
-
});
|
2501
2486
|
const computedThemes = vue.computed(() => {
|
2502
2487
|
const acc = {};
|
2503
2488
|
for (const [name, original] of Object.entries(themes.value)) {
|
@@ -2518,49 +2503,28 @@
|
|
2518
2503
|
const current = vue.toRef(() => computedThemes.value[name.value]);
|
2519
2504
|
const styles = vue.computed(() => {
|
2520
2505
|
const lines = [];
|
2521
|
-
const important = parsedOptions.unimportant ? '' : ' !important';
|
2522
|
-
const scoped = parsedOptions.scoped ? parsedOptions.prefix : '';
|
2523
2506
|
if (current.value?.dark) {
|
2524
2507
|
createCssClass(lines, ':root', ['color-scheme: dark'], parsedOptions.scope);
|
2525
2508
|
}
|
2526
|
-
createCssClass(lines, ':root', genCssVariables(current.value
|
2509
|
+
createCssClass(lines, ':root', genCssVariables(current.value), parsedOptions.scope);
|
2527
2510
|
for (const [themeName, theme] of Object.entries(computedThemes.value)) {
|
2528
|
-
createCssClass(lines,
|
2529
|
-
}
|
2530
|
-
|
2531
|
-
|
2532
|
-
|
2533
|
-
|
2534
|
-
|
2535
|
-
|
2536
|
-
|
2537
|
-
}
|
2538
|
-
|
2539
|
-
|
2540
|
-
createCssClass(fgLines, `.${scoped}border-${key}`, [`--${parsedOptions.prefix}border-color: var(--${parsedOptions.prefix}theme-${key})`], parsedOptions.scope);
|
2541
|
-
}
|
2511
|
+
createCssClass(lines, `.v-theme--${themeName}`, [`color-scheme: ${theme.dark ? 'dark' : 'normal'}`, ...genCssVariables(theme)], parsedOptions.scope);
|
2512
|
+
}
|
2513
|
+
const bgLines = [];
|
2514
|
+
const fgLines = [];
|
2515
|
+
const colors = new Set(Object.values(computedThemes.value).flatMap(theme => Object.keys(theme.colors)));
|
2516
|
+
for (const key of colors) {
|
2517
|
+
if (key.startsWith('on-')) {
|
2518
|
+
createCssClass(fgLines, `.${key}`, [`color: rgb(var(--v-theme-${key})) !important`], parsedOptions.scope);
|
2519
|
+
} else {
|
2520
|
+
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);
|
2521
|
+
createCssClass(fgLines, `.text-${key}`, [`color: rgb(var(--v-theme-${key})) !important`], parsedOptions.scope);
|
2522
|
+
createCssClass(fgLines, `.border-${key}`, [`--v-border-color: var(--v-theme-${key})`], parsedOptions.scope);
|
2542
2523
|
}
|
2543
|
-
lines.push(...bgLines, ...fgLines);
|
2544
2524
|
}
|
2525
|
+
lines.push(...bgLines, ...fgLines);
|
2545
2526
|
return lines.map((str, i) => i === 0 ? str : ` ${str}`).join('');
|
2546
2527
|
});
|
2547
|
-
const themeClasses = vue.toRef(() => parsedOptions.isDisabled ? undefined : `${parsedOptions.prefix}theme--${name.value}`);
|
2548
|
-
const themeNames = vue.toRef(() => Object.keys(computedThemes.value));
|
2549
|
-
if (SUPPORTS_MATCH_MEDIA) {
|
2550
|
-
const media = window.matchMedia('(prefers-color-scheme: dark)');
|
2551
|
-
function updateSystemName() {
|
2552
|
-
systemName.value = media.matches ? 'dark' : 'light';
|
2553
|
-
}
|
2554
|
-
updateSystemName();
|
2555
|
-
media.addEventListener('change', updateSystemName, {
|
2556
|
-
passive: true
|
2557
|
-
});
|
2558
|
-
if (vue.getCurrentScope()) {
|
2559
|
-
vue.onScopeDispose(() => {
|
2560
|
-
media.removeEventListener('change', updateSystemName);
|
2561
|
-
});
|
2562
|
-
}
|
2563
|
-
}
|
2564
2528
|
function install(app) {
|
2565
2529
|
if (parsedOptions.isDisabled) return;
|
2566
2530
|
const head = app._context.provides.usehead;
|
@@ -2598,55 +2562,22 @@
|
|
2598
2562
|
updateStyles();
|
2599
2563
|
}
|
2600
2564
|
function updateStyles() {
|
2601
|
-
upsertStyles(parsedOptions.stylesheetId, parsedOptions.cspNonce, styles.value);
|
2565
|
+
upsertStyles(getOrCreateStyleElement(parsedOptions.stylesheetId, parsedOptions.cspNonce), styles.value);
|
2602
2566
|
}
|
2603
2567
|
}
|
2604
2568
|
}
|
2605
|
-
|
2606
|
-
if (!themeNames.value.includes(themeName)) {
|
2607
|
-
consoleWarn(`Theme "${themeName}" not found on the Vuetify theme instance`);
|
2608
|
-
return;
|
2609
|
-
}
|
2610
|
-
name.value = themeName;
|
2611
|
-
}
|
2612
|
-
function cycle() {
|
2613
|
-
let themeArray = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : themeNames.value;
|
2614
|
-
const currentIndex = themeArray.indexOf(name.value);
|
2615
|
-
const nextIndex = currentIndex === -1 ? 0 : (currentIndex + 1) % themeArray.length;
|
2616
|
-
change(themeArray[nextIndex]);
|
2617
|
-
}
|
2618
|
-
function toggle() {
|
2619
|
-
let themeArray = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['light', 'dark'];
|
2620
|
-
cycle(themeArray);
|
2621
|
-
}
|
2622
|
-
const globalName = new Proxy(name, {
|
2623
|
-
get(target, prop) {
|
2624
|
-
return target[prop];
|
2625
|
-
},
|
2626
|
-
set(target, prop, val) {
|
2627
|
-
if (prop === 'value') {
|
2628
|
-
deprecate(`theme.global.name.value = ${val}`, `theme.change('${val}')`);
|
2629
|
-
}
|
2630
|
-
// @ts-expect-error
|
2631
|
-
target[prop] = val;
|
2632
|
-
return true;
|
2633
|
-
}
|
2634
|
-
});
|
2569
|
+
const themeClasses = vue.toRef(() => parsedOptions.isDisabled ? undefined : `v-theme--${name.value}`);
|
2635
2570
|
return {
|
2636
2571
|
install,
|
2637
|
-
change,
|
2638
|
-
cycle,
|
2639
|
-
toggle,
|
2640
2572
|
isDisabled: parsedOptions.isDisabled,
|
2641
2573
|
name,
|
2642
2574
|
themes,
|
2643
2575
|
current,
|
2644
2576
|
computedThemes,
|
2645
|
-
prefix: parsedOptions.prefix,
|
2646
2577
|
themeClasses,
|
2647
2578
|
styles,
|
2648
2579
|
global: {
|
2649
|
-
name
|
2580
|
+
name,
|
2650
2581
|
current
|
2651
2582
|
}
|
2652
2583
|
};
|
@@ -2657,7 +2588,7 @@
|
|
2657
2588
|
if (!theme) throw new Error('Could not find Vuetify theme injection');
|
2658
2589
|
const name = vue.toRef(() => props.theme ?? theme.name.value);
|
2659
2590
|
const current = vue.toRef(() => theme.themes.value[name.value]);
|
2660
|
-
const themeClasses = vue.toRef(() => theme.isDisabled ? undefined :
|
2591
|
+
const themeClasses = vue.toRef(() => theme.isDisabled ? undefined : `v-theme--${name.value}`);
|
2661
2592
|
const newTheme = {
|
2662
2593
|
...theme,
|
2663
2594
|
name,
|
@@ -4204,15 +4135,9 @@
|
|
4204
4135
|
};
|
4205
4136
|
}
|
4206
4137
|
|
4207
|
-
// Types
|
4208
|
-
|
4209
4138
|
const makeVBtnGroupProps = propsFactory({
|
4210
4139
|
baseColor: String,
|
4211
4140
|
divided: Boolean,
|
4212
|
-
direction: {
|
4213
|
-
type: String,
|
4214
|
-
default: 'horizontal'
|
4215
|
-
},
|
4216
4141
|
...makeBorderProps(),
|
4217
4142
|
...makeComponentProps(),
|
4218
4143
|
...makeDensityProps(),
|
@@ -4246,7 +4171,7 @@
|
|
4246
4171
|
} = useRounded(props);
|
4247
4172
|
provideDefaults({
|
4248
4173
|
VBtn: {
|
4249
|
-
height:
|
4174
|
+
height: 'auto',
|
4250
4175
|
baseColor: vue.toRef(() => props.baseColor),
|
4251
4176
|
color: vue.toRef(() => props.color),
|
4252
4177
|
density: vue.toRef(() => props.density),
|
@@ -4256,7 +4181,7 @@
|
|
4256
4181
|
});
|
4257
4182
|
useRender(() => {
|
4258
4183
|
return vue.createVNode(props.tag, {
|
4259
|
-
"class": ['v-btn-group',
|
4184
|
+
"class": ['v-btn-group', {
|
4260
4185
|
'v-btn-group--divided': props.divided
|
4261
4186
|
}, themeClasses.value, borderClasses.value, densityClasses.value, elevationClasses.value, roundedClasses.value, props.class],
|
4262
4187
|
"style": props.style
|
@@ -5944,31 +5869,6 @@
|
|
5944
5869
|
// Utilities
|
5945
5870
|
const VAlertTitle = createSimpleFunctional('v-alert-title');
|
5946
5871
|
|
5947
|
-
// Utilities
|
5948
|
-
|
5949
|
-
// Types
|
5950
|
-
|
5951
|
-
// Types
|
5952
|
-
|
5953
|
-
// Composables
|
5954
|
-
const makeIconSizeProps = propsFactory({
|
5955
|
-
iconSize: [Number, String],
|
5956
|
-
iconSizes: {
|
5957
|
-
type: Array,
|
5958
|
-
default: () => [['x-small', 10], ['small', 16], ['default', 24], ['large', 28], ['x-large', 32]]
|
5959
|
-
}
|
5960
|
-
}, 'iconSize');
|
5961
|
-
function useIconSizes(props, fallback) {
|
5962
|
-
const iconSize = vue.computed(() => {
|
5963
|
-
const iconSizeMap = new Map(props.iconSizes);
|
5964
|
-
const _iconSize = props.iconSize ?? fallback() ?? 'default';
|
5965
|
-
return iconSizeMap.has(_iconSize) ? iconSizeMap.get(_iconSize) : _iconSize;
|
5966
|
-
});
|
5967
|
-
return {
|
5968
|
-
iconSize
|
5969
|
-
};
|
5970
|
-
}
|
5971
|
-
|
5972
5872
|
// Types
|
5973
5873
|
|
5974
5874
|
const allowedTypes = ['success', 'info', 'warning', 'error'];
|
@@ -6008,7 +5908,6 @@
|
|
6008
5908
|
...makeDensityProps(),
|
6009
5909
|
...makeDimensionProps(),
|
6010
5910
|
...makeElevationProps(),
|
6011
|
-
...makeIconSizeProps(),
|
6012
5911
|
...makeLocationProps(),
|
6013
5912
|
...makePositionProps(),
|
6014
5913
|
...makeRoundedProps(),
|
@@ -6036,9 +5935,6 @@
|
|
6036
5935
|
if (!props.type) return props.icon;
|
6037
5936
|
return props.icon ?? `$${props.type}`;
|
6038
5937
|
});
|
6039
|
-
const {
|
6040
|
-
iconSize
|
6041
|
-
} = useIconSizes(props, () => props.prominent ? 44 : 28);
|
6042
5938
|
const {
|
6043
5939
|
themeClasses
|
6044
5940
|
} = provideTheme(props);
|
@@ -6086,11 +5982,6 @@
|
|
6086
5982
|
const hasPrepend = !!(slots.prepend || icon.value);
|
6087
5983
|
const hasTitle = !!(slots.title || props.title);
|
6088
5984
|
const hasClose = !!(slots.close || props.closable);
|
6089
|
-
const iconProps = {
|
6090
|
-
density: props.density,
|
6091
|
-
icon: icon.value,
|
6092
|
-
size: iconSize.value
|
6093
|
-
};
|
6094
5985
|
return isActive.value && vue.createVNode(props.tag, {
|
6095
5986
|
"class": ['v-alert', props.border && {
|
6096
5987
|
'v-alert--border': !!props.border,
|
@@ -6108,14 +5999,19 @@
|
|
6108
5999
|
}, null), hasPrepend && vue.createVNode("div", {
|
6109
6000
|
"key": "prepend",
|
6110
6001
|
"class": "v-alert__prepend"
|
6111
|
-
}, [!slots.prepend ? vue.createVNode(VIcon,
|
6112
|
-
"key": "prepend-icon"
|
6113
|
-
|
6002
|
+
}, [!slots.prepend ? vue.createVNode(VIcon, {
|
6003
|
+
"key": "prepend-icon",
|
6004
|
+
"density": props.density,
|
6005
|
+
"icon": icon.value,
|
6006
|
+
"size": props.prominent ? 44 : 28
|
6007
|
+
}, null) : vue.createVNode(VDefaultsProvider, {
|
6114
6008
|
"key": "prepend-defaults",
|
6115
6009
|
"disabled": !icon.value,
|
6116
6010
|
"defaults": {
|
6117
6011
|
VIcon: {
|
6118
|
-
|
6012
|
+
density: props.density,
|
6013
|
+
icon: icon.value,
|
6014
|
+
size: props.prominent ? 44 : 28
|
6119
6015
|
}
|
6120
6016
|
}
|
6121
6017
|
}, slots.prepend)]), vue.createVNode("div", {
|
@@ -6865,13 +6761,18 @@
|
|
6865
6761
|
};
|
6866
6762
|
}
|
6867
6763
|
|
6764
|
+
// Utilities
|
6765
|
+
const RulesSymbol = Symbol.for('vuetify:rules');
|
6766
|
+
function useRules(fn) {
|
6767
|
+
const resolveRules = vue.inject(RulesSymbol, null);
|
6768
|
+
if (!resolveRules) return vue.toRef(fn);
|
6769
|
+
return resolveRules(fn);
|
6770
|
+
}
|
6771
|
+
|
6868
6772
|
// Composables
|
6869
6773
|
|
6870
6774
|
// Types
|
6871
6775
|
|
6872
|
-
// type ValidationRuleParams = [any, string?]
|
6873
|
-
// type ValidationAlias = string | [string, ...ValidationRuleParams]
|
6874
|
-
|
6875
6776
|
const makeValidationProps = propsFactory({
|
6876
6777
|
disabled: {
|
6877
6778
|
type: Boolean,
|
@@ -6894,7 +6795,6 @@
|
|
6894
6795
|
},
|
6895
6796
|
rules: {
|
6896
6797
|
type: Array,
|
6897
|
-
// type: Array as PropType<readonly (ValidationRule | ValidationAlias)[]>,
|
6898
6798
|
default: () => []
|
6899
6799
|
},
|
6900
6800
|
modelValue: null,
|
@@ -6908,7 +6808,7 @@
|
|
6908
6808
|
const model = useProxiedModel(props, 'modelValue');
|
6909
6809
|
const validationModel = vue.computed(() => props.validationValue === undefined ? model.value : props.validationValue);
|
6910
6810
|
const form = useForm(props);
|
6911
|
-
|
6811
|
+
const rules = useRules(() => props.rules);
|
6912
6812
|
const internalErrorMessages = vue.ref([]);
|
6913
6813
|
const isPristine = vue.shallowRef(true);
|
6914
6814
|
const isDirty = vue.computed(() => !!(wrapInArray(model.value === '' ? null : model.value).length || wrapInArray(validationModel.value === '' ? null : validationModel.value).length));
|
@@ -6948,28 +6848,6 @@
|
|
6948
6848
|
});
|
6949
6849
|
const vm = getCurrentInstance('validation');
|
6950
6850
|
const uid = vue.computed(() => props.name ?? vue.unref(id));
|
6951
|
-
|
6952
|
-
// const resolvedRules = computed(() => props.rules.map(rule => {
|
6953
|
-
// let ruleName: string | null = null
|
6954
|
-
// let ruleParams: ValidationRuleParams = [undefined]
|
6955
|
-
// if (Array.isArray(rule)) {
|
6956
|
-
// ruleName = rule[0]
|
6957
|
-
// ruleParams = rule.slice(1) as ValidationRuleParams
|
6958
|
-
// } else if (typeof rule === 'string') {
|
6959
|
-
// ruleName = rule
|
6960
|
-
// }
|
6961
|
-
|
6962
|
-
// if (ruleName !== null) {
|
6963
|
-
// if (ruleName.startsWith('$')) {
|
6964
|
-
// ruleName = ruleName.slice(1)
|
6965
|
-
// }
|
6966
|
-
|
6967
|
-
// return rules?.[ruleName]?.(...ruleParams)
|
6968
|
-
// } else {
|
6969
|
-
// return rule
|
6970
|
-
// }
|
6971
|
-
// }))
|
6972
|
-
|
6973
6851
|
vue.onBeforeMount(() => {
|
6974
6852
|
form.register?.({
|
6975
6853
|
id: uid.value,
|
@@ -7025,7 +6903,7 @@
|
|
7025
6903
|
let silent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
7026
6904
|
const results = [];
|
7027
6905
|
isValidating.value = true;
|
7028
|
-
for (const rule of
|
6906
|
+
for (const rule of rules.value) {
|
7029
6907
|
if (results.length >= Number(props.maxErrors ?? 1)) {
|
7030
6908
|
break;
|
7031
6909
|
}
|
@@ -12461,12 +12339,7 @@
|
|
12461
12339
|
}
|
12462
12340
|
function calculateOffset(index) {
|
12463
12341
|
index = clamp(index, 0, items.value.length - 1);
|
12464
|
-
|
12465
|
-
const fraction = index % 1;
|
12466
|
-
const next = whole + 1;
|
12467
|
-
const wholeOffset = offsets[whole] || 0;
|
12468
|
-
const nextOffset = offsets[next] || wholeOffset;
|
12469
|
-
return wholeOffset + (nextOffset - wholeOffset) * fraction;
|
12342
|
+
return offsets[index] || 0;
|
12470
12343
|
}
|
12471
12344
|
function calculateIndex(scrollTop) {
|
12472
12345
|
return binaryClosest(offsets, scrollTop);
|
@@ -29994,6 +29867,11 @@
|
|
29994
29867
|
hideOverlay: Boolean,
|
29995
29868
|
icon: [String, Function, Object],
|
29996
29869
|
iconColor: String,
|
29870
|
+
iconSize: [Number, String],
|
29871
|
+
iconSizes: {
|
29872
|
+
type: Array,
|
29873
|
+
default: () => [['x-small', 10], ['small', 16], ['default', 24], ['large', 28], ['x-large', 32]]
|
29874
|
+
},
|
29997
29875
|
loading: Boolean,
|
29998
29876
|
opacity: [Number, String],
|
29999
29877
|
readonly: Boolean,
|
@@ -30013,7 +29891,6 @@
|
|
30013
29891
|
...makeBorderProps(),
|
30014
29892
|
...makeComponentProps(),
|
30015
29893
|
...makeElevationProps(),
|
30016
|
-
...makeIconSizeProps(),
|
30017
29894
|
...makeRoundedProps(),
|
30018
29895
|
...makeTagProps({
|
30019
29896
|
tag: 'button'
|
@@ -30068,6 +29945,7 @@
|
|
30068
29945
|
})()
|
30069
29946
|
}));
|
30070
29947
|
const btnSizeMap = new Map(props.sizes);
|
29948
|
+
const iconSizeMap = new Map(props.iconSizes);
|
30071
29949
|
function onClick() {
|
30072
29950
|
if (props.disabled || props.readonly || isActive.value === undefined || props.tag === 'a' && attrs.href) return;
|
30073
29951
|
isActive.value = !isActive.value;
|
@@ -30079,12 +29957,12 @@
|
|
30079
29957
|
const btnSize = hasNamedSize ? btnSizeMap.get(_btnSize) : _btnSize;
|
30080
29958
|
const btnHeight = props.height ?? btnSize;
|
30081
29959
|
const btnWidth = props.width ?? btnSize;
|
30082
|
-
const
|
30083
|
-
|
30084
|
-
|
29960
|
+
const _iconSize = props.iconSize;
|
29961
|
+
const hasNamedIconSize = iconSizeMap.has(_iconSize);
|
29962
|
+
const iconSize = !_iconSize ? hasNamedSize ? iconSizeMap.get(_btnSize) : iconSizeMap.get('default') : hasNamedIconSize ? iconSizeMap.get(_iconSize) : _iconSize;
|
30085
29963
|
const iconProps = {
|
30086
29964
|
icon,
|
30087
|
-
size: iconSize
|
29965
|
+
size: iconSize,
|
30088
29966
|
iconColor: props.iconColor,
|
30089
29967
|
opacity: props.opacity
|
30090
29968
|
};
|
@@ -30127,7 +30005,7 @@
|
|
30127
30005
|
"color": typeof props.loading === 'boolean' ? undefined : props.loading,
|
30128
30006
|
"indeterminate": "disable-shrink",
|
30129
30007
|
"width": "2",
|
30130
|
-
"size": iconSize
|
30008
|
+
"size": iconSize
|
30131
30009
|
}, null)])]
|
30132
30010
|
});
|
30133
30011
|
});
|
@@ -32037,7 +31915,7 @@
|
|
32037
31915
|
};
|
32038
31916
|
});
|
32039
31917
|
}
|
32040
|
-
const version$1 = "3.8.5-
|
31918
|
+
const version$1 = "3.8.5-master.2025-05-15";
|
32041
31919
|
createVuetify$1.version = version$1;
|
32042
31920
|
|
32043
31921
|
// Vue's inject() can only be used in setup
|
@@ -32335,7 +32213,7 @@
|
|
32335
32213
|
|
32336
32214
|
/* eslint-disable local-rules/sort-imports */
|
32337
32215
|
|
32338
|
-
const version = "3.8.5-
|
32216
|
+
const version = "3.8.5-master.2025-05-15";
|
32339
32217
|
|
32340
32218
|
/* eslint-disable local-rules/sort-imports */
|
32341
32219
|
|