@vuetify/nightly 3.8.8-master.2025-06-10 → 3.8.9-dev.2025-06-12
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 +44 -19
- package/dist/json/attributes.json +2771 -2411
- package/dist/json/importMap-labs.json +32 -28
- package/dist/json/importMap.json +128 -128
- package/dist/json/tags.json +96 -1
- package/dist/json/web-types.json +5703 -4391
- package/dist/vuetify-labs.cjs +635 -146
- package/dist/vuetify-labs.css +4248 -4214
- package/dist/vuetify-labs.d.ts +9097 -1977
- package/dist/vuetify-labs.esm.js +636 -147
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +635 -146
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +383 -135
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +5999 -5965
- package/dist/vuetify.d.ts +1586 -1085
- package/dist/vuetify.esm.js +384 -136
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +383 -135
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +1219 -1203
- 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/VAppBar/VAppBar.d.ts +15 -3
- package/lib/components/VAppBar/VAppBarNavIcon.d.ts +20 -10
- package/lib/components/VAutocomplete/VAutocomplete.d.ts +154 -103
- package/lib/components/VAutocomplete/VAutocomplete.js +21 -3
- package/lib/components/VAutocomplete/VAutocomplete.js.map +1 -1
- package/lib/components/VBadge/VBadge.d.ts +60 -0
- package/lib/components/VBadge/VBadge.js +7 -2
- package/lib/components/VBadge/VBadge.js.map +1 -1
- package/lib/components/VBtn/VBtn.d.ts +20 -10
- 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/VCard/VCard.d.ts +20 -10
- package/lib/components/VCheckbox/VCheckbox.d.ts +23 -13
- package/lib/components/VCheckbox/VCheckboxBtn.d.ts +20 -10
- package/lib/components/VChip/VChip.d.ts +20 -10
- package/lib/components/VChipGroup/VChipGroup.d.ts +10 -0
- package/lib/components/VCombobox/VCombobox.d.ts +154 -103
- package/lib/components/VCombobox/VCombobox.js +22 -3
- package/lib/components/VCombobox/VCombobox.js.map +1 -1
- package/lib/components/VDataTable/VDataTable.d.ts +60 -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 +42 -0
- package/lib/components/VDataTable/VDataTableVirtual.d.ts +42 -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/VExpansionPanel/VExpansionPanel.d.ts +20 -10
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.d.ts +20 -10
- package/lib/components/VExpansionPanel/VExpansionPanels.d.ts +20 -10
- package/lib/components/VFab/VFab.d.ts +20 -10
- package/lib/components/VField/VField.d.ts +3 -3
- package/lib/components/VFileInput/VFileInput.d.ts +15 -15
- package/lib/components/VInfiniteScroll/VInfiniteScroll.d.ts +9 -3
- package/lib/components/VInfiniteScroll/VInfiniteScroll.js +29 -0
- package/lib/components/VInfiniteScroll/VInfiniteScroll.js.map +1 -1
- package/lib/components/VInput/VInput.d.ts +4 -4
- package/lib/components/VList/VList.d.ts +13 -0
- package/lib/components/VList/VList.js +4 -1
- package/lib/components/VList/VList.js.map +1 -1
- package/lib/components/VList/VListChildren.js.map +1 -1
- package/lib/components/VList/VListItem.d.ts +23 -10
- package/lib/components/VList/VListItem.js +7 -3
- package/lib/components/VList/VListItem.js.map +1 -1
- package/lib/components/VList/list.d.ts +9 -2
- package/lib/components/VList/list.js +7 -0
- package/lib/components/VList/list.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/VRadio/VRadio.d.ts +20 -10
- package/lib/components/VRadioGroup/VRadioGroup.d.ts +23 -13
- package/lib/components/VRangeSlider/VRangeSlider.d.ts +3 -3
- package/lib/components/VSelect/VSelect.d.ts +171 -107
- package/lib/components/VSelect/VSelect.js +21 -3
- package/lib/components/VSelect/VSelect.js.map +1 -1
- package/lib/components/VSelectionControl/VSelectionControl.d.ts +20 -10
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.d.ts +28 -14
- 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/VSlider/VSliderThumb.d.ts +20 -10
- package/lib/components/VStepper/VStepperItem.d.ts +28 -14
- package/lib/components/VSwitch/VSwitch.d.ts +23 -13
- package/lib/components/VTable/VTable.css +6 -0
- package/lib/components/VTable/VTable.d.ts +55 -24
- package/lib/components/VTable/VTable.js +9 -2
- package/lib/components/VTable/VTable.js.map +1 -1
- package/lib/components/VTable/VTable.sass +14 -0
- package/lib/components/VTable/_variables.scss +1 -0
- package/lib/components/VTabs/VTab.d.ts +56 -28
- 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/components/VToolbar/VToolbar.d.ts +15 -3
- package/lib/components/VToolbar/VToolbar.js +6 -3
- package/lib/components/VToolbar/VToolbar.js.map +1 -1
- 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 +3 -3
- package/lib/composables/date/DateAdapter.js.map +1 -1
- package/lib/composables/date/adapters/string.d.ts +54 -0
- package/lib/composables/date/adapters/string.js +153 -0
- package/lib/composables/date/adapters/string.js.map +1 -0
- 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 +3 -3
- 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/mask.d.ts +38 -0
- package/lib/composables/mask.js +183 -0
- package/lib/composables/mask.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/directives/ripple/index.d.ts +2 -1
- package/lib/directives/ripple/index.js +12 -7
- package/lib/directives/ripple/index.js.map +1 -1
- package/lib/entry-bundler.d.ts +3 -3
- package/lib/entry-bundler.js +1 -1
- package/lib/entry-bundler.js.map +1 -1
- package/lib/framework.d.ts +72 -56
- 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/VFileUpload/VFileUploadItem.d.ts +20 -10
- 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/VMaskInput/VMaskInput.d.ts +6993 -0
- package/lib/labs/VMaskInput/VMaskInput.js +67 -0
- package/lib/labs/VMaskInput/VMaskInput.js.map +1 -0
- package/lib/labs/VMaskInput/index.d.ts +1 -0
- package/lib/labs/VMaskInput/index.js +2 -0
- package/lib/labs/VMaskInput/index.js.map +1 -0
- package/lib/labs/VStepperVertical/VStepperVertical.d.ts +20 -10
- package/lib/labs/VStepperVertical/VStepperVerticalItem.d.ts +20 -10
- package/lib/labs/VTreeview/VTreeview.d.ts +13 -0
- package/lib/labs/VTreeview/VTreeviewItem.d.ts +20 -10
- package/lib/labs/components.d.ts +1 -0
- package/lib/labs/components.js +1 -0
- package/lib/labs/components.js.map +1 -1
- package/lib/labs/entry-bundler.d.ts +3 -3
- 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-labs.esm.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
/*!
|
2
|
-
* Vuetify v3.8.
|
2
|
+
* Vuetify v3.8.9-dev.2025-06-12
|
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, camelize, isVNode, Comment, warn, getCurrentInstance as getCurrentInstance$1, ref, computed, provide, inject as inject$1, defineComponent as defineComponent$1, h, onBeforeUnmount, watch, readonly, onMounted, useId, onDeactivated, onActivated, onScopeDispose, effectScope, toRaw, createElementVNode, normalizeStyle, normalizeClass, createVNode, TransitionGroup, Transition, mergeProps, toRefs, toValue, 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, camelize, isVNode, Comment, warn, getCurrentInstance as getCurrentInstance$1, ref, computed, provide, inject as inject$1, defineComponent as defineComponent$1, h, onBeforeUnmount, watch, readonly, onMounted, useId, onDeactivated, onActivated, onScopeDispose, effectScope, toRaw, getCurrentScope, createElementVNode, normalizeStyle, normalizeClass, createVNode, TransitionGroup, Transition, mergeProps, toRefs, toValue, 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
|
// Types
|
10
10
|
// eslint-disable-line vue/prefer-import-from-vue
|
@@ -81,6 +81,7 @@ 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';
|
84
85
|
|
85
86
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
86
87
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
@@ -2344,6 +2345,7 @@ const makeThemeProps = propsFactory({
|
|
2344
2345
|
function genDefaults$2() {
|
2345
2346
|
return {
|
2346
2347
|
defaultTheme: 'light',
|
2348
|
+
prefix: 'v-',
|
2347
2349
|
variations: {
|
2348
2350
|
colors: [],
|
2349
2351
|
lighten: 0,
|
@@ -2425,7 +2427,10 @@ function genDefaults$2() {
|
|
2425
2427
|
}
|
2426
2428
|
}
|
2427
2429
|
},
|
2428
|
-
stylesheetId: 'vuetify-theme-stylesheet'
|
2430
|
+
stylesheetId: 'vuetify-theme-stylesheet',
|
2431
|
+
scoped: false,
|
2432
|
+
unimportant: false,
|
2433
|
+
utilities: true
|
2429
2434
|
};
|
2430
2435
|
}
|
2431
2436
|
function parseThemeOptions() {
|
@@ -2448,21 +2453,21 @@ function parseThemeOptions() {
|
|
2448
2453
|
function createCssClass(lines, selector, content, scope) {
|
2449
2454
|
lines.push(`${getScopedSelector(selector, scope)} {\n`, ...content.map(line => ` ${line};\n`), '}\n');
|
2450
2455
|
}
|
2451
|
-
function genCssVariables(theme) {
|
2456
|
+
function genCssVariables(theme, prefix) {
|
2452
2457
|
const lightOverlay = theme.dark ? 2 : 1;
|
2453
2458
|
const darkOverlay = theme.dark ? 1 : 2;
|
2454
2459
|
const variables = [];
|
2455
2460
|
for (const [key, value] of Object.entries(theme.colors)) {
|
2456
2461
|
const rgb = parseColor(value);
|
2457
|
-
variables.push(
|
2462
|
+
variables.push(`--${prefix}theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`);
|
2458
2463
|
if (!key.startsWith('on-')) {
|
2459
|
-
variables.push(
|
2464
|
+
variables.push(`--${prefix}theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`);
|
2460
2465
|
}
|
2461
2466
|
}
|
2462
2467
|
for (const [key, value] of Object.entries(theme.variables)) {
|
2463
2468
|
const color = typeof value === 'string' && value.startsWith('#') ? parseColor(value) : undefined;
|
2464
2469
|
const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : undefined;
|
2465
|
-
variables.push(
|
2470
|
+
variables.push(`--${prefix}${key}: ${rgb ?? value}`);
|
2466
2471
|
}
|
2467
2472
|
return variables;
|
2468
2473
|
}
|
@@ -2506,7 +2511,8 @@ function getScopedSelector(selector, scope) {
|
|
2506
2511
|
const scopeSelector = `:where(${scope})`;
|
2507
2512
|
return selector === ':root' ? scopeSelector : `${scopeSelector} ${selector}`;
|
2508
2513
|
}
|
2509
|
-
function upsertStyles(
|
2514
|
+
function upsertStyles(id, cspNonce, styles) {
|
2515
|
+
const styleEl = getOrCreateStyleElement(id, cspNonce);
|
2510
2516
|
if (!styleEl) return;
|
2511
2517
|
styleEl.innerHTML = styles;
|
2512
2518
|
}
|
@@ -2526,8 +2532,17 @@ function getOrCreateStyleElement(id, cspNonce) {
|
|
2526
2532
|
// Composables
|
2527
2533
|
function createTheme(options) {
|
2528
2534
|
const parsedOptions = parseThemeOptions(options);
|
2529
|
-
const
|
2535
|
+
const _name = shallowRef(parsedOptions.defaultTheme);
|
2530
2536
|
const themes = ref(parsedOptions.themes);
|
2537
|
+
const systemName = shallowRef('light');
|
2538
|
+
const name = computed({
|
2539
|
+
get() {
|
2540
|
+
return _name.value === 'system' ? systemName.value : _name.value;
|
2541
|
+
},
|
2542
|
+
set(val) {
|
2543
|
+
_name.value = val;
|
2544
|
+
}
|
2545
|
+
});
|
2531
2546
|
const computedThemes = computed(() => {
|
2532
2547
|
const acc = {};
|
2533
2548
|
for (const [name, original] of Object.entries(themes.value)) {
|
@@ -2548,28 +2563,49 @@ function createTheme(options) {
|
|
2548
2563
|
const current = toRef(() => computedThemes.value[name.value]);
|
2549
2564
|
const styles = computed(() => {
|
2550
2565
|
const lines = [];
|
2566
|
+
const important = parsedOptions.unimportant ? '' : ' !important';
|
2567
|
+
const scoped = parsedOptions.scoped ? parsedOptions.prefix : '';
|
2551
2568
|
if (current.value?.dark) {
|
2552
2569
|
createCssClass(lines, ':root', ['color-scheme: dark'], parsedOptions.scope);
|
2553
2570
|
}
|
2554
|
-
createCssClass(lines, ':root', genCssVariables(current.value), parsedOptions.scope);
|
2571
|
+
createCssClass(lines, ':root', genCssVariables(current.value, parsedOptions.prefix), parsedOptions.scope);
|
2555
2572
|
for (const [themeName, theme] of Object.entries(computedThemes.value)) {
|
2556
|
-
createCssClass(lines,
|
2557
|
-
}
|
2558
|
-
|
2559
|
-
|
2560
|
-
|
2561
|
-
|
2562
|
-
|
2563
|
-
|
2564
|
-
|
2565
|
-
|
2566
|
-
|
2567
|
-
|
2573
|
+
createCssClass(lines, `.${parsedOptions.prefix}theme--${themeName}`, [`color-scheme: ${theme.dark ? 'dark' : 'normal'}`, ...genCssVariables(theme, parsedOptions.prefix)], parsedOptions.scope);
|
2574
|
+
}
|
2575
|
+
if (parsedOptions.utilities) {
|
2576
|
+
const bgLines = [];
|
2577
|
+
const fgLines = [];
|
2578
|
+
const colors = new Set(Object.values(computedThemes.value).flatMap(theme => Object.keys(theme.colors)));
|
2579
|
+
for (const key of colors) {
|
2580
|
+
if (key.startsWith('on-')) {
|
2581
|
+
createCssClass(fgLines, `.${key}`, [`color: rgb(var(--${parsedOptions.prefix}theme-${key}))${important}`], parsedOptions.scope);
|
2582
|
+
} else {
|
2583
|
+
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);
|
2584
|
+
createCssClass(fgLines, `.${scoped}text-${key}`, [`color: rgb(var(--${parsedOptions.prefix}theme-${key}))${important}`], parsedOptions.scope);
|
2585
|
+
createCssClass(fgLines, `.${scoped}border-${key}`, [`--${parsedOptions.prefix}border-color: var(--${parsedOptions.prefix}theme-${key})`], parsedOptions.scope);
|
2586
|
+
}
|
2568
2587
|
}
|
2588
|
+
lines.push(...bgLines, ...fgLines);
|
2569
2589
|
}
|
2570
|
-
lines.push(...bgLines, ...fgLines);
|
2571
2590
|
return lines.map((str, i) => i === 0 ? str : ` ${str}`).join('');
|
2572
2591
|
});
|
2592
|
+
const themeClasses = toRef(() => parsedOptions.isDisabled ? undefined : `${parsedOptions.prefix}theme--${name.value}`);
|
2593
|
+
const themeNames = toRef(() => Object.keys(computedThemes.value));
|
2594
|
+
if (SUPPORTS_MATCH_MEDIA) {
|
2595
|
+
const media = window.matchMedia('(prefers-color-scheme: dark)');
|
2596
|
+
function updateSystemName() {
|
2597
|
+
systemName.value = media.matches ? 'dark' : 'light';
|
2598
|
+
}
|
2599
|
+
updateSystemName();
|
2600
|
+
media.addEventListener('change', updateSystemName, {
|
2601
|
+
passive: true
|
2602
|
+
});
|
2603
|
+
if (getCurrentScope()) {
|
2604
|
+
onScopeDispose(() => {
|
2605
|
+
media.removeEventListener('change', updateSystemName);
|
2606
|
+
});
|
2607
|
+
}
|
2608
|
+
}
|
2573
2609
|
function install(app) {
|
2574
2610
|
if (parsedOptions.isDisabled) return;
|
2575
2611
|
const head = app._context.provides.usehead;
|
@@ -2607,22 +2643,55 @@ function createTheme(options) {
|
|
2607
2643
|
updateStyles();
|
2608
2644
|
}
|
2609
2645
|
function updateStyles() {
|
2610
|
-
upsertStyles(
|
2646
|
+
upsertStyles(parsedOptions.stylesheetId, parsedOptions.cspNonce, styles.value);
|
2611
2647
|
}
|
2612
2648
|
}
|
2613
2649
|
}
|
2614
|
-
|
2650
|
+
function change(themeName) {
|
2651
|
+
if (!themeNames.value.includes(themeName)) {
|
2652
|
+
consoleWarn(`Theme "${themeName}" not found on the Vuetify theme instance`);
|
2653
|
+
return;
|
2654
|
+
}
|
2655
|
+
name.value = themeName;
|
2656
|
+
}
|
2657
|
+
function cycle() {
|
2658
|
+
let themeArray = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : themeNames.value;
|
2659
|
+
const currentIndex = themeArray.indexOf(name.value);
|
2660
|
+
const nextIndex = currentIndex === -1 ? 0 : (currentIndex + 1) % themeArray.length;
|
2661
|
+
change(themeArray[nextIndex]);
|
2662
|
+
}
|
2663
|
+
function toggle() {
|
2664
|
+
let themeArray = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['light', 'dark'];
|
2665
|
+
cycle(themeArray);
|
2666
|
+
}
|
2667
|
+
const globalName = new Proxy(name, {
|
2668
|
+
get(target, prop) {
|
2669
|
+
return target[prop];
|
2670
|
+
},
|
2671
|
+
set(target, prop, val) {
|
2672
|
+
if (prop === 'value') {
|
2673
|
+
deprecate(`theme.global.name.value = ${val}`, `theme.change('${val}')`);
|
2674
|
+
}
|
2675
|
+
// @ts-expect-error
|
2676
|
+
target[prop] = val;
|
2677
|
+
return true;
|
2678
|
+
}
|
2679
|
+
});
|
2615
2680
|
return {
|
2616
2681
|
install,
|
2682
|
+
change,
|
2683
|
+
cycle,
|
2684
|
+
toggle,
|
2617
2685
|
isDisabled: parsedOptions.isDisabled,
|
2618
2686
|
name,
|
2619
2687
|
themes,
|
2620
2688
|
current,
|
2621
2689
|
computedThemes,
|
2690
|
+
prefix: parsedOptions.prefix,
|
2622
2691
|
themeClasses,
|
2623
2692
|
styles,
|
2624
2693
|
global: {
|
2625
|
-
name,
|
2694
|
+
name: globalName,
|
2626
2695
|
current
|
2627
2696
|
}
|
2628
2697
|
};
|
@@ -2633,7 +2702,7 @@ function provideTheme(props) {
|
|
2633
2702
|
if (!theme) throw new Error('Could not find Vuetify theme injection');
|
2634
2703
|
const name = toRef(() => props.theme ?? theme.name.value);
|
2635
2704
|
const current = toRef(() => theme.themes.value[name.value]);
|
2636
|
-
const themeClasses = toRef(() => theme.isDisabled ? undefined :
|
2705
|
+
const themeClasses = toRef(() => theme.isDisabled ? undefined : `${theme.prefix}theme--${name.value}`);
|
2637
2706
|
const newTheme = {
|
2638
2707
|
...theme,
|
2639
2708
|
name,
|
@@ -3737,7 +3806,10 @@ const makeVToolbarProps = propsFactory({
|
|
3737
3806
|
default: 'default',
|
3738
3807
|
validator: v => allowedDensities$1.includes(v)
|
3739
3808
|
},
|
3740
|
-
extended:
|
3809
|
+
extended: {
|
3810
|
+
type: Boolean,
|
3811
|
+
default: null
|
3812
|
+
},
|
3741
3813
|
extensionHeight: {
|
3742
3814
|
type: [Number, String],
|
3743
3815
|
default: 48
|
@@ -3785,7 +3857,7 @@ const VToolbar = genericComponent()({
|
|
3785
3857
|
const {
|
3786
3858
|
rtlClasses
|
3787
3859
|
} = useRtl();
|
3788
|
-
const isExtended = shallowRef(
|
3860
|
+
const isExtended = shallowRef(props.extended === null ? !!slots.extension?.() : props.extended);
|
3789
3861
|
const contentHeight = computed(() => parseInt(Number(props.height) + (props.density === 'prominent' ? Number(props.height) : 0) - (props.density === 'comfortable' ? 8 : 0) - (props.density === 'compact' ? 16 : 0), 10));
|
3790
3862
|
const extensionHeight = computed(() => isExtended.value ? parseInt(Number(props.extensionHeight) + (props.density === 'prominent' ? Number(props.extensionHeight) : 0) - (props.density === 'comfortable' ? 4 : 0) - (props.density === 'compact' ? 8 : 0), 10) : 0);
|
3791
3863
|
provideDefaults({
|
@@ -3797,7 +3869,7 @@ const VToolbar = genericComponent()({
|
|
3797
3869
|
const hasTitle = !!(props.title || slots.title);
|
3798
3870
|
const hasImage = !!(slots.image || props.image);
|
3799
3871
|
const extension = slots.extension?.();
|
3800
|
-
isExtended.value =
|
3872
|
+
isExtended.value = props.extended === null ? !!extension : props.extended;
|
3801
3873
|
return createVNode(props.tag, {
|
3802
3874
|
"class": normalizeClass(['v-toolbar', {
|
3803
3875
|
'v-toolbar--absolute': props.absolute,
|
@@ -4180,9 +4252,15 @@ function useVariant(props) {
|
|
4180
4252
|
};
|
4181
4253
|
}
|
4182
4254
|
|
4255
|
+
// Types
|
4256
|
+
|
4183
4257
|
const makeVBtnGroupProps = propsFactory({
|
4184
4258
|
baseColor: String,
|
4185
4259
|
divided: Boolean,
|
4260
|
+
direction: {
|
4261
|
+
type: String,
|
4262
|
+
default: 'horizontal'
|
4263
|
+
},
|
4186
4264
|
...makeBorderProps(),
|
4187
4265
|
...makeComponentProps(),
|
4188
4266
|
...makeDensityProps(),
|
@@ -4216,7 +4294,7 @@ const VBtnGroup = genericComponent()({
|
|
4216
4294
|
} = useRounded(props);
|
4217
4295
|
provideDefaults({
|
4218
4296
|
VBtn: {
|
4219
|
-
height: 'auto',
|
4297
|
+
height: toRef(() => props.direction === 'horizontal' ? 'auto' : null),
|
4220
4298
|
baseColor: toRef(() => props.baseColor),
|
4221
4299
|
color: toRef(() => props.color),
|
4222
4300
|
density: toRef(() => props.density),
|
@@ -4226,7 +4304,7 @@ const VBtnGroup = genericComponent()({
|
|
4226
4304
|
});
|
4227
4305
|
useRender(() => {
|
4228
4306
|
return createVNode(props.tag, {
|
4229
|
-
"class": normalizeClass(['v-btn-group', {
|
4307
|
+
"class": normalizeClass(['v-btn-group', `v-btn-group--${props.direction}`, {
|
4230
4308
|
'v-btn-group--divided': props.divided
|
4231
4309
|
}, themeClasses.value, borderClasses.value, densityClasses.value, elevationClasses.value, roundedClasses.value, props.class]),
|
4232
4310
|
"style": normalizeStyle(props.style)
|
@@ -5558,8 +5636,8 @@ function rippleCancelShow(e) {
|
|
5558
5636
|
window.clearTimeout(element._ripple.showTimer);
|
5559
5637
|
}
|
5560
5638
|
let keyboardRipple = false;
|
5561
|
-
function keyboardRippleShow(e) {
|
5562
|
-
if (!keyboardRipple && (e.keyCode
|
5639
|
+
function keyboardRippleShow(e, keys) {
|
5640
|
+
if (!keyboardRipple && keys.includes(e.keyCode)) {
|
5563
5641
|
keyboardRipple = true;
|
5564
5642
|
rippleShow(e);
|
5565
5643
|
}
|
@@ -5587,9 +5665,12 @@ function updateRipple(el, binding, wasEnabled) {
|
|
5587
5665
|
el._ripple.enabled = enabled;
|
5588
5666
|
el._ripple.centered = modifiers.center;
|
5589
5667
|
el._ripple.circle = modifiers.circle;
|
5590
|
-
|
5591
|
-
|
5668
|
+
const bindingValue = isObject(value) ? value : {};
|
5669
|
+
if (bindingValue.class) {
|
5670
|
+
el._ripple.class = bindingValue.class;
|
5592
5671
|
}
|
5672
|
+
const allowedKeys = bindingValue.keys ?? [keyCodes.enter, keyCodes.space];
|
5673
|
+
el._ripple.keyDownHandler = e => keyboardRippleShow(e, allowedKeys);
|
5593
5674
|
if (enabled && !wasEnabled) {
|
5594
5675
|
if (modifiers.stop) {
|
5595
5676
|
el.addEventListener('touchstart', rippleStop, {
|
@@ -5611,7 +5692,7 @@ function updateRipple(el, binding, wasEnabled) {
|
|
5611
5692
|
el.addEventListener('mousedown', rippleShow);
|
5612
5693
|
el.addEventListener('mouseup', rippleHide);
|
5613
5694
|
el.addEventListener('mouseleave', rippleHide);
|
5614
|
-
el.addEventListener('keydown', keyboardRippleShow);
|
5695
|
+
el.addEventListener('keydown', e => keyboardRippleShow(e, allowedKeys));
|
5615
5696
|
el.addEventListener('keyup', keyboardRippleHide);
|
5616
5697
|
el.addEventListener('blur', focusRippleHide);
|
5617
5698
|
|
@@ -5631,7 +5712,9 @@ function removeListeners(el) {
|
|
5631
5712
|
el.removeEventListener('touchcancel', rippleHide);
|
5632
5713
|
el.removeEventListener('mouseup', rippleHide);
|
5633
5714
|
el.removeEventListener('mouseleave', rippleHide);
|
5634
|
-
el.
|
5715
|
+
if (el._ripple?.keyDownHandler) {
|
5716
|
+
el.removeEventListener('keydown', el._ripple.keyDownHandler);
|
5717
|
+
}
|
5635
5718
|
el.removeEventListener('keyup', keyboardRippleHide);
|
5636
5719
|
el.removeEventListener('dragstart', rippleHide);
|
5637
5720
|
el.removeEventListener('blur', focusRippleHide);
|
@@ -5640,8 +5723,8 @@ function mounted$4(el, binding) {
|
|
5640
5723
|
updateRipple(el, binding, false);
|
5641
5724
|
}
|
5642
5725
|
function unmounted$4(el) {
|
5643
|
-
delete el._ripple;
|
5644
5726
|
removeListeners(el);
|
5727
|
+
delete el._ripple;
|
5645
5728
|
}
|
5646
5729
|
function updated$1(el, binding) {
|
5647
5730
|
if (binding.value === binding.oldValue) {
|
@@ -5914,6 +5997,31 @@ const VAppBarTitle = genericComponent()({
|
|
5914
5997
|
// Utilities
|
5915
5998
|
const VAlertTitle = createSimpleFunctional('v-alert-title');
|
5916
5999
|
|
6000
|
+
// Utilities
|
6001
|
+
|
6002
|
+
// Types
|
6003
|
+
|
6004
|
+
// Types
|
6005
|
+
|
6006
|
+
// Composables
|
6007
|
+
const makeIconSizeProps = propsFactory({
|
6008
|
+
iconSize: [Number, String],
|
6009
|
+
iconSizes: {
|
6010
|
+
type: Array,
|
6011
|
+
default: () => [['x-small', 10], ['small', 16], ['default', 24], ['large', 28], ['x-large', 32]]
|
6012
|
+
}
|
6013
|
+
}, 'iconSize');
|
6014
|
+
function useIconSizes(props, fallback) {
|
6015
|
+
const iconSize = computed(() => {
|
6016
|
+
const iconSizeMap = new Map(props.iconSizes);
|
6017
|
+
const _iconSize = props.iconSize ?? fallback() ?? 'default';
|
6018
|
+
return iconSizeMap.has(_iconSize) ? iconSizeMap.get(_iconSize) : _iconSize;
|
6019
|
+
});
|
6020
|
+
return {
|
6021
|
+
iconSize
|
6022
|
+
};
|
6023
|
+
}
|
6024
|
+
|
5917
6025
|
// Types
|
5918
6026
|
|
5919
6027
|
const allowedTypes = ['success', 'info', 'warning', 'error'];
|
@@ -5953,6 +6061,7 @@ const makeVAlertProps = propsFactory({
|
|
5953
6061
|
...makeDensityProps(),
|
5954
6062
|
...makeDimensionProps(),
|
5955
6063
|
...makeElevationProps(),
|
6064
|
+
...makeIconSizeProps(),
|
5956
6065
|
...makeLocationProps(),
|
5957
6066
|
...makePositionProps(),
|
5958
6067
|
...makeRoundedProps(),
|
@@ -5980,6 +6089,9 @@ const VAlert = genericComponent()({
|
|
5980
6089
|
if (!props.type) return props.icon;
|
5981
6090
|
return props.icon ?? `$${props.type}`;
|
5982
6091
|
});
|
6092
|
+
const {
|
6093
|
+
iconSize
|
6094
|
+
} = useIconSizes(props, () => props.prominent ? 44 : 28);
|
5983
6095
|
const {
|
5984
6096
|
themeClasses
|
5985
6097
|
} = provideTheme(props);
|
@@ -6027,6 +6139,11 @@ const VAlert = genericComponent()({
|
|
6027
6139
|
const hasPrepend = !!(slots.prepend || icon.value);
|
6028
6140
|
const hasTitle = !!(slots.title || props.title);
|
6029
6141
|
const hasClose = !!(slots.close || props.closable);
|
6142
|
+
const iconProps = {
|
6143
|
+
density: props.density,
|
6144
|
+
icon: icon.value,
|
6145
|
+
size: iconSize.value
|
6146
|
+
};
|
6030
6147
|
return isActive.value && createVNode(props.tag, {
|
6031
6148
|
"class": normalizeClass(['v-alert', props.border && {
|
6032
6149
|
'v-alert--border': !!props.border,
|
@@ -6044,19 +6161,14 @@ const VAlert = genericComponent()({
|
|
6044
6161
|
}, null), hasPrepend && createElementVNode("div", {
|
6045
6162
|
"key": "prepend",
|
6046
6163
|
"class": "v-alert__prepend"
|
6047
|
-
}, [!slots.prepend ? createVNode(VIcon, {
|
6048
|
-
"key": "prepend-icon"
|
6049
|
-
|
6050
|
-
"icon": icon.value,
|
6051
|
-
"size": props.prominent ? 44 : 28
|
6052
|
-
}, null) : createVNode(VDefaultsProvider, {
|
6164
|
+
}, [!slots.prepend ? createVNode(VIcon, mergeProps({
|
6165
|
+
"key": "prepend-icon"
|
6166
|
+
}, iconProps), null) : createVNode(VDefaultsProvider, {
|
6053
6167
|
"key": "prepend-defaults",
|
6054
6168
|
"disabled": !icon.value,
|
6055
6169
|
"defaults": {
|
6056
6170
|
VIcon: {
|
6057
|
-
|
6058
|
-
icon: icon.value,
|
6059
|
-
size: props.prominent ? 44 : 28
|
6171
|
+
...iconProps
|
6060
6172
|
}
|
6061
6173
|
}
|
6062
6174
|
}, slots.prepend)]), createElementVNode("div", {
|
@@ -7581,6 +7693,7 @@ function getOffsetPosition(isHorizontal, element) {
|
|
7581
7693
|
const VSlideGroupSymbol = Symbol.for('vuetify:v-slide-group');
|
7582
7694
|
const makeVSlideGroupProps = propsFactory({
|
7583
7695
|
centerActive: Boolean,
|
7696
|
+
contentClass: null,
|
7584
7697
|
direction: {
|
7585
7698
|
type: String,
|
7586
7699
|
default: 'horizontal'
|
@@ -7893,7 +8006,7 @@ const VSlideGroup = genericComponent()({
|
|
7893
8006
|
})]), createElementVNode("div", {
|
7894
8007
|
"key": "container",
|
7895
8008
|
"ref": containerRef,
|
7896
|
-
"class":
|
8009
|
+
"class": normalizeClass(['v-slide-group__container', props.contentClass]),
|
7897
8010
|
"onScroll": onScroll
|
7898
8011
|
}, [createElementVNode("div", {
|
7899
8012
|
"ref": contentRef,
|
@@ -8256,16 +8369,85 @@ const VChip = genericComponent()({
|
|
8256
8369
|
}
|
8257
8370
|
});
|
8258
8371
|
|
8372
|
+
const makeVDividerProps = propsFactory({
|
8373
|
+
color: String,
|
8374
|
+
inset: Boolean,
|
8375
|
+
length: [Number, String],
|
8376
|
+
opacity: [Number, String],
|
8377
|
+
thickness: [Number, String],
|
8378
|
+
vertical: Boolean,
|
8379
|
+
...makeComponentProps(),
|
8380
|
+
...makeThemeProps()
|
8381
|
+
}, 'VDivider');
|
8382
|
+
const VDivider = genericComponent()({
|
8383
|
+
name: 'VDivider',
|
8384
|
+
props: makeVDividerProps(),
|
8385
|
+
setup(props, _ref) {
|
8386
|
+
let {
|
8387
|
+
attrs,
|
8388
|
+
slots
|
8389
|
+
} = _ref;
|
8390
|
+
const {
|
8391
|
+
themeClasses
|
8392
|
+
} = provideTheme(props);
|
8393
|
+
const {
|
8394
|
+
textColorClasses,
|
8395
|
+
textColorStyles
|
8396
|
+
} = useTextColor(() => props.color);
|
8397
|
+
const dividerStyles = computed(() => {
|
8398
|
+
const styles = {};
|
8399
|
+
if (props.length) {
|
8400
|
+
styles[props.vertical ? 'height' : 'width'] = convertToUnit(props.length);
|
8401
|
+
}
|
8402
|
+
if (props.thickness) {
|
8403
|
+
styles[props.vertical ? 'borderRightWidth' : 'borderTopWidth'] = convertToUnit(props.thickness);
|
8404
|
+
}
|
8405
|
+
return styles;
|
8406
|
+
});
|
8407
|
+
useRender(() => {
|
8408
|
+
const divider = createElementVNode("hr", {
|
8409
|
+
"class": normalizeClass([{
|
8410
|
+
'v-divider': true,
|
8411
|
+
'v-divider--inset': props.inset,
|
8412
|
+
'v-divider--vertical': props.vertical
|
8413
|
+
}, themeClasses.value, textColorClasses.value, props.class]),
|
8414
|
+
"style": normalizeStyle([dividerStyles.value, textColorStyles.value, {
|
8415
|
+
'--v-border-opacity': props.opacity
|
8416
|
+
}, props.style]),
|
8417
|
+
"aria-orientation": !attrs.role || attrs.role === 'separator' ? props.vertical ? 'vertical' : 'horizontal' : undefined,
|
8418
|
+
"role": `${attrs.role || 'separator'}`
|
8419
|
+
}, null);
|
8420
|
+
if (!slots.default) return divider;
|
8421
|
+
return createElementVNode("div", {
|
8422
|
+
"class": normalizeClass(['v-divider__wrapper', {
|
8423
|
+
'v-divider__wrapper--vertical': props.vertical,
|
8424
|
+
'v-divider__wrapper--inset': props.inset
|
8425
|
+
}])
|
8426
|
+
}, [divider, createElementVNode("div", {
|
8427
|
+
"class": "v-divider__content"
|
8428
|
+
}, [slots.default()]), divider]);
|
8429
|
+
});
|
8430
|
+
return {};
|
8431
|
+
}
|
8432
|
+
});
|
8433
|
+
|
8259
8434
|
// Utilities
|
8260
8435
|
|
8261
8436
|
// List
|
8262
8437
|
const ListKey = Symbol.for('vuetify:list');
|
8263
8438
|
function createList() {
|
8439
|
+
let {
|
8440
|
+
filterable
|
8441
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
8442
|
+
filterable: false
|
8443
|
+
};
|
8264
8444
|
const parent = inject$1(ListKey, {
|
8445
|
+
filterable: false,
|
8265
8446
|
hasPrepend: shallowRef(false),
|
8266
8447
|
updateHasPrepend: () => null
|
8267
8448
|
});
|
8268
8449
|
const data = {
|
8450
|
+
filterable: parent.filterable || filterable,
|
8269
8451
|
hasPrepend: shallowRef(false),
|
8270
8452
|
updateHasPrepend: value => {
|
8271
8453
|
if (value) data.hasPrepend.value = value;
|
@@ -9217,6 +9399,9 @@ const VListItem = genericComponent()({
|
|
9217
9399
|
roundedClasses
|
9218
9400
|
} = useRounded(roundedProps);
|
9219
9401
|
const lineClasses = toRef(() => props.lines ? `v-list-item--${props.lines}-line` : undefined);
|
9402
|
+
const rippleOptions = toRef(() => props.ripple !== undefined && !!props.ripple && list?.filterable ? {
|
9403
|
+
keys: [keyCodes.enter]
|
9404
|
+
} : props.ripple);
|
9220
9405
|
const slotProps = computed(() => ({
|
9221
9406
|
isActive: isActive.value,
|
9222
9407
|
select,
|
@@ -9241,8 +9426,9 @@ const VListItem = genericComponent()({
|
|
9241
9426
|
function onKeyDown(e) {
|
9242
9427
|
const target = e.target;
|
9243
9428
|
if (['INPUT', 'TEXTAREA'].includes(target.tagName)) return;
|
9244
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
9429
|
+
if (e.key === 'Enter' || e.key === ' ' && !list?.filterable) {
|
9245
9430
|
e.preventDefault();
|
9431
|
+
e.stopPropagation();
|
9246
9432
|
e.target.dispatchEvent(new MouseEvent('click', e));
|
9247
9433
|
}
|
9248
9434
|
}
|
@@ -9352,7 +9538,7 @@ const VListItem = genericComponent()({
|
|
9352
9538
|
}), createElementVNode("div", {
|
9353
9539
|
"class": "v-list-item__spacer"
|
9354
9540
|
}, null)])]
|
9355
|
-
}), [[Ripple, isClickable.value &&
|
9541
|
+
}), [[Ripple, isClickable.value && rippleOptions.value]]);
|
9356
9542
|
});
|
9357
9543
|
return {
|
9358
9544
|
activate,
|
@@ -9407,68 +9593,6 @@ const VListSubheader = genericComponent()({
|
|
9407
9593
|
}
|
9408
9594
|
});
|
9409
9595
|
|
9410
|
-
const makeVDividerProps = propsFactory({
|
9411
|
-
color: String,
|
9412
|
-
inset: Boolean,
|
9413
|
-
length: [Number, String],
|
9414
|
-
opacity: [Number, String],
|
9415
|
-
thickness: [Number, String],
|
9416
|
-
vertical: Boolean,
|
9417
|
-
...makeComponentProps(),
|
9418
|
-
...makeThemeProps()
|
9419
|
-
}, 'VDivider');
|
9420
|
-
const VDivider = genericComponent()({
|
9421
|
-
name: 'VDivider',
|
9422
|
-
props: makeVDividerProps(),
|
9423
|
-
setup(props, _ref) {
|
9424
|
-
let {
|
9425
|
-
attrs,
|
9426
|
-
slots
|
9427
|
-
} = _ref;
|
9428
|
-
const {
|
9429
|
-
themeClasses
|
9430
|
-
} = provideTheme(props);
|
9431
|
-
const {
|
9432
|
-
textColorClasses,
|
9433
|
-
textColorStyles
|
9434
|
-
} = useTextColor(() => props.color);
|
9435
|
-
const dividerStyles = computed(() => {
|
9436
|
-
const styles = {};
|
9437
|
-
if (props.length) {
|
9438
|
-
styles[props.vertical ? 'height' : 'width'] = convertToUnit(props.length);
|
9439
|
-
}
|
9440
|
-
if (props.thickness) {
|
9441
|
-
styles[props.vertical ? 'borderRightWidth' : 'borderTopWidth'] = convertToUnit(props.thickness);
|
9442
|
-
}
|
9443
|
-
return styles;
|
9444
|
-
});
|
9445
|
-
useRender(() => {
|
9446
|
-
const divider = createElementVNode("hr", {
|
9447
|
-
"class": normalizeClass([{
|
9448
|
-
'v-divider': true,
|
9449
|
-
'v-divider--inset': props.inset,
|
9450
|
-
'v-divider--vertical': props.vertical
|
9451
|
-
}, themeClasses.value, textColorClasses.value, props.class]),
|
9452
|
-
"style": normalizeStyle([dividerStyles.value, textColorStyles.value, {
|
9453
|
-
'--v-border-opacity': props.opacity
|
9454
|
-
}, props.style]),
|
9455
|
-
"aria-orientation": !attrs.role || attrs.role === 'separator' ? props.vertical ? 'vertical' : 'horizontal' : undefined,
|
9456
|
-
"role": `${attrs.role || 'separator'}`
|
9457
|
-
}, null);
|
9458
|
-
if (!slots.default) return divider;
|
9459
|
-
return createElementVNode("div", {
|
9460
|
-
"class": normalizeClass(['v-divider__wrapper', {
|
9461
|
-
'v-divider__wrapper--vertical': props.vertical,
|
9462
|
-
'v-divider__wrapper--inset': props.inset
|
9463
|
-
}])
|
9464
|
-
}, [divider, createElementVNode("div", {
|
9465
|
-
"class": "v-divider__content"
|
9466
|
-
}, [slots.default()]), divider]);
|
9467
|
-
});
|
9468
|
-
return {};
|
9469
|
-
}
|
9470
|
-
});
|
9471
|
-
|
9472
9596
|
// Types
|
9473
9597
|
|
9474
9598
|
const makeVListChildrenProps = propsFactory({
|
@@ -9737,6 +9861,7 @@ const makeVListProps = propsFactory({
|
|
9737
9861
|
activeClass: String,
|
9738
9862
|
bgColor: String,
|
9739
9863
|
disabled: Boolean,
|
9864
|
+
filterable: Boolean,
|
9740
9865
|
expandIcon: IconValue,
|
9741
9866
|
collapseIcon: IconValue,
|
9742
9867
|
lines: {
|
@@ -9820,7 +9945,9 @@ const VList = genericComponent()({
|
|
9820
9945
|
const activeColor = toRef(() => props.activeColor);
|
9821
9946
|
const baseColor = toRef(() => props.baseColor);
|
9822
9947
|
const color = toRef(() => props.color);
|
9823
|
-
createList(
|
9948
|
+
createList({
|
9949
|
+
filterable: props.filterable
|
9950
|
+
});
|
9824
9951
|
provideDefaults({
|
9825
9952
|
VListGroup: {
|
9826
9953
|
activeColor,
|
@@ -12397,7 +12524,12 @@ function useVirtual(props, items) {
|
|
12397
12524
|
}
|
12398
12525
|
function calculateOffset(index) {
|
12399
12526
|
index = clamp(index, 0, items.value.length - 1);
|
12400
|
-
|
12527
|
+
const whole = Math.floor(index);
|
12528
|
+
const fraction = index % 1;
|
12529
|
+
const next = whole + 1;
|
12530
|
+
const wholeOffset = offsets[whole] || 0;
|
12531
|
+
const nextOffset = offsets[next] || wholeOffset;
|
12532
|
+
return wholeOffset + (nextOffset - wholeOffset) * fraction;
|
12401
12533
|
}
|
12402
12534
|
function calculateIndex(scrollTop) {
|
12403
12535
|
return binaryClosest(offsets, scrollTop);
|
@@ -12751,6 +12883,7 @@ const makeSelectProps = propsFactory({
|
|
12751
12883
|
},
|
12752
12884
|
openOnClear: Boolean,
|
12753
12885
|
itemColor: String,
|
12886
|
+
noAutoScroll: Boolean,
|
12754
12887
|
...makeItemsProps({
|
12755
12888
|
itemChildren: false
|
12756
12889
|
})
|
@@ -12965,7 +13098,7 @@ const VSelect = genericComponent()({
|
|
12965
13098
|
watch(menu, () => {
|
12966
13099
|
if (!props.hideSelected && menu.value && model.value.length) {
|
12967
13100
|
const index = displayItems.value.findIndex(item => model.value.some(s => (props.valueComparator || deepEqual)(s.value, item.value)));
|
12968
|
-
IN_BROWSER && window.requestAnimationFrame(() => {
|
13101
|
+
IN_BROWSER && !props.noAutoScroll && window.requestAnimationFrame(() => {
|
12969
13102
|
index >= 0 && vVirtualScrollRef.value?.scrollToIndex(index);
|
12970
13103
|
});
|
12971
13104
|
}
|
@@ -13058,6 +13191,22 @@ const VSelect = genericComponent()({
|
|
13058
13191
|
key: item.value,
|
13059
13192
|
onClick: () => select(item, null)
|
13060
13193
|
});
|
13194
|
+
if (item.raw.type === 'divider') {
|
13195
|
+
return slots.divider?.({
|
13196
|
+
props: item.raw,
|
13197
|
+
index
|
13198
|
+
}) ?? createVNode(VDivider, mergeProps(item.props, {
|
13199
|
+
"key": `divider-${index}`
|
13200
|
+
}), null);
|
13201
|
+
}
|
13202
|
+
if (item.raw.type === 'subheader') {
|
13203
|
+
return slots.subheader?.({
|
13204
|
+
props: item.raw,
|
13205
|
+
index
|
13206
|
+
}) ?? createVNode(VListSubheader, mergeProps(item.props, {
|
13207
|
+
"key": `subheader-${index}`
|
13208
|
+
}), null);
|
13209
|
+
}
|
13061
13210
|
return slots.item?.({
|
13062
13211
|
item,
|
13063
13212
|
index,
|
@@ -13218,6 +13367,9 @@ function filterItems(items, query, options) {
|
|
13218
13367
|
let match = -1;
|
13219
13368
|
if ((query || customFiltersLength > 0) && !options?.noFilter) {
|
13220
13369
|
if (typeof item === 'object') {
|
13370
|
+
if (['divider', 'subheader'].includes(item.raw?.type)) {
|
13371
|
+
continue;
|
13372
|
+
}
|
13221
13373
|
const filterKeys = keys || Object.keys(transformed);
|
13222
13374
|
for (const key of filterKeys) {
|
13223
13375
|
const value = getPropertyFromItem(transformed, key);
|
@@ -13420,7 +13572,7 @@ const VAutocomplete = genericComponent()({
|
|
13420
13572
|
menu.value = !menu.value;
|
13421
13573
|
}
|
13422
13574
|
function onListKeydown(e) {
|
13423
|
-
if (e.key
|
13575
|
+
if (checkPrintable(e) || e.key === 'Backspace') {
|
13424
13576
|
vTextFieldRef.value?.focus();
|
13425
13577
|
}
|
13426
13578
|
}
|
@@ -13625,6 +13777,7 @@ const VAutocomplete = genericComponent()({
|
|
13625
13777
|
}, props.menuProps), {
|
13626
13778
|
default: () => [hasList && createVNode(VList, mergeProps({
|
13627
13779
|
"ref": listRef,
|
13780
|
+
"filterable": true,
|
13628
13781
|
"selected": selectedValues.value,
|
13629
13782
|
"selectStrategy": props.multiple ? 'independent' : 'single-independent',
|
13630
13783
|
"onMousedown": e => e.preventDefault(),
|
@@ -13656,6 +13809,22 @@ const VAutocomplete = genericComponent()({
|
|
13656
13809
|
active: highlightFirst.value && index === 0 ? true : undefined,
|
13657
13810
|
onClick: () => select(item, null)
|
13658
13811
|
});
|
13812
|
+
if (item.raw.type === 'divider') {
|
13813
|
+
return slots.divider?.({
|
13814
|
+
props: item.raw,
|
13815
|
+
index
|
13816
|
+
}) ?? createVNode(VDivider, mergeProps(item.props, {
|
13817
|
+
"key": `divider-${index}`
|
13818
|
+
}), null);
|
13819
|
+
}
|
13820
|
+
if (item.raw.type === 'subheader') {
|
13821
|
+
return slots.subheader?.({
|
13822
|
+
props: item.raw,
|
13823
|
+
index
|
13824
|
+
}) ?? createVNode(VListSubheader, mergeProps(item.props, {
|
13825
|
+
"key": `subheader-${index}`
|
13826
|
+
}), null);
|
13827
|
+
}
|
13659
13828
|
return slots.item?.({
|
13660
13829
|
item,
|
13661
13830
|
index,
|
@@ -13800,7 +13969,8 @@ const makeVBadgeProps = propsFactory({
|
|
13800
13969
|
...makeThemeProps(),
|
13801
13970
|
...makeTransitionProps({
|
13802
13971
|
transition: 'scale-rotate-transition'
|
13803
|
-
})
|
13972
|
+
}),
|
13973
|
+
...makeDimensionProps()
|
13804
13974
|
}, 'VBadge');
|
13805
13975
|
const VBadge = genericComponent()({
|
13806
13976
|
name: 'VBadge',
|
@@ -13830,6 +14000,9 @@ const VBadge = genericComponent()({
|
|
13830
14000
|
const base = props.floating ? props.dot ? 2 : 4 : props.dot ? 8 : 12;
|
13831
14001
|
return base + (['top', 'bottom'].includes(side) ? Number(props.offsetY ?? 0) : ['left', 'right'].includes(side) ? Number(props.offsetX ?? 0) : 0);
|
13832
14002
|
});
|
14003
|
+
const {
|
14004
|
+
dimensionStyles
|
14005
|
+
} = useDimension(props);
|
13833
14006
|
useRender(() => {
|
13834
14007
|
const value = Number(props.content);
|
13835
14008
|
const content = !props.max || isNaN(value) ? props.content : value <= Number(props.max) ? value : `${props.max}+`;
|
@@ -13851,7 +14024,7 @@ const VBadge = genericComponent()({
|
|
13851
14024
|
}, {
|
13852
14025
|
default: () => [withDirectives(createElementVNode("span", mergeProps({
|
13853
14026
|
"class": ['v-badge__badge', themeClasses.value, backgroundColorClasses.value, roundedClasses.value, textColorClasses.value],
|
13854
|
-
"style": [backgroundColorStyles.value, textColorStyles.value, props.inline ? {} : locationStyles.value],
|
14027
|
+
"style": [backgroundColorStyles.value, textColorStyles.value, dimensionStyles.value, props.inline ? {} : locationStyles.value],
|
13855
14028
|
"aria-atomic": "true",
|
13856
14029
|
"aria-label": t(props.label, value),
|
13857
14030
|
"aria-live": "polite",
|
@@ -17260,13 +17433,13 @@ function date(value) {
|
|
17260
17433
|
return null;
|
17261
17434
|
}
|
17262
17435
|
const sundayJanuarySecond2000 = new Date(2000, 0, 2);
|
17263
|
-
function getWeekdays(locale, firstDayOfWeek) {
|
17436
|
+
function getWeekdays(locale, firstDayOfWeek, weekdayFormat) {
|
17264
17437
|
const daysFromSunday = firstDayOfWeek ?? weekInfo(locale)?.firstDay ?? 0;
|
17265
17438
|
return createRange(7).map(i => {
|
17266
17439
|
const weekday = new Date(sundayJanuarySecond2000);
|
17267
17440
|
weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i);
|
17268
17441
|
return new Intl.DateTimeFormat(locale, {
|
17269
|
-
weekday: 'narrow'
|
17442
|
+
weekday: weekdayFormat ?? 'narrow'
|
17270
17443
|
}).format(weekday);
|
17271
17444
|
});
|
17272
17445
|
}
|
@@ -17730,9 +17903,9 @@ class VuetifyDateAdapter {
|
|
17730
17903
|
getDiff(date, comparing, unit) {
|
17731
17904
|
return getDiff(date, comparing, unit);
|
17732
17905
|
}
|
17733
|
-
getWeekdays(firstDayOfWeek) {
|
17906
|
+
getWeekdays(firstDayOfWeek, weekdayFormat) {
|
17734
17907
|
const firstDay = firstDayOfWeek !== undefined ? Number(firstDayOfWeek) : undefined;
|
17735
|
-
return getWeekdays(this.locale, firstDay);
|
17908
|
+
return getWeekdays(this.locale, firstDay, weekdayFormat);
|
17736
17909
|
}
|
17737
17910
|
getYear(date) {
|
17738
17911
|
return getYear(date);
|
@@ -18087,6 +18260,7 @@ const VCombobox = genericComponent()({
|
|
18087
18260
|
_search.value = val ?? '';
|
18088
18261
|
if (!props.multiple && !hasSelectionSlot.value) {
|
18089
18262
|
model.value = [transformItem$3(props, val)];
|
18263
|
+
nextTick(() => vVirtualScrollRef.value?.scrollToIndex(0));
|
18090
18264
|
}
|
18091
18265
|
if (val && props.multiple && props.delimiters?.length) {
|
18092
18266
|
const values = val.split(new RegExp(`(?:${props.delimiters.join('|')})+`));
|
@@ -18167,7 +18341,7 @@ const VCombobox = genericComponent()({
|
|
18167
18341
|
menu.value = !menu.value;
|
18168
18342
|
}
|
18169
18343
|
function onListKeydown(e) {
|
18170
|
-
if (e.key
|
18344
|
+
if (checkPrintable(e) || e.key === 'Backspace') {
|
18171
18345
|
vTextFieldRef.value?.focus();
|
18172
18346
|
}
|
18173
18347
|
}
|
@@ -18372,6 +18546,7 @@ const VCombobox = genericComponent()({
|
|
18372
18546
|
}, props.menuProps), {
|
18373
18547
|
default: () => [hasList && createVNode(VList, mergeProps({
|
18374
18548
|
"ref": listRef,
|
18549
|
+
"filterable": true,
|
18375
18550
|
"selected": selectedValues.value,
|
18376
18551
|
"selectStrategy": props.multiple ? 'independent' : 'single-independent',
|
18377
18552
|
"onMousedown": e => e.preventDefault(),
|
@@ -18403,6 +18578,22 @@ const VCombobox = genericComponent()({
|
|
18403
18578
|
active: highlightFirst.value && index === 0 ? true : undefined,
|
18404
18579
|
onClick: () => select(item, null)
|
18405
18580
|
});
|
18581
|
+
if (item.raw.type === 'divider') {
|
18582
|
+
return slots.divider?.({
|
18583
|
+
props: item.raw,
|
18584
|
+
index
|
18585
|
+
}) ?? createVNode(VDivider, mergeProps(item.props, {
|
18586
|
+
"key": `divider-${index}`
|
18587
|
+
}), null);
|
18588
|
+
}
|
18589
|
+
if (item.raw.type === 'subheader') {
|
18590
|
+
return slots.subheader?.({
|
18591
|
+
props: item.raw,
|
18592
|
+
index
|
18593
|
+
}) ?? createVNode(VListSubheader, mergeProps(item.props, {
|
18594
|
+
"key": `subheader-${index}`
|
18595
|
+
}), null);
|
18596
|
+
}
|
18406
18597
|
return slots.item?.({
|
18407
18598
|
item,
|
18408
18599
|
index,
|
@@ -20285,6 +20476,7 @@ const makeVDataTableHeadersProps = propsFactory({
|
|
20285
20476
|
color: String,
|
20286
20477
|
disableSort: Boolean,
|
20287
20478
|
fixedHeader: Boolean,
|
20479
|
+
lastFixed: Boolean,
|
20288
20480
|
multiSort: Boolean,
|
20289
20481
|
sortAscIcon: {
|
20290
20482
|
type: IconValue,
|
@@ -20331,10 +20523,11 @@ const VDataTableHeaders = genericComponent()({
|
|
20331
20523
|
loaderClasses
|
20332
20524
|
} = useLoader(props);
|
20333
20525
|
function getFixedStyles(column, y) {
|
20334
|
-
if (!(props.sticky || props.fixedHeader) && !column.fixed) return undefined;
|
20526
|
+
if (!(props.sticky || props.fixedHeader) && !(column.fixed || column.lastFixed)) return undefined;
|
20335
20527
|
return {
|
20336
20528
|
position: 'sticky',
|
20337
|
-
left: column.fixed ? convertToUnit(column.fixedOffset) : undefined,
|
20529
|
+
left: column.fixed || column.lastFixed ? convertToUnit(column.fixedOffset) : undefined,
|
20530
|
+
right: column.lastFixed ? convertToUnit(column.fixedOffset ?? 0) : undefined,
|
20338
20531
|
top: props.sticky || props.fixedHeader ? `calc(var(--v-table-header-height) * ${y})` : undefined
|
20339
20532
|
};
|
20340
20533
|
}
|
@@ -20850,11 +21043,18 @@ const VDataTableRows = genericComponent()({
|
|
20850
21043
|
}
|
20851
21044
|
});
|
20852
21045
|
|
21046
|
+
// Types
|
21047
|
+
|
20853
21048
|
const makeVTableProps = propsFactory({
|
20854
21049
|
fixedHeader: Boolean,
|
20855
21050
|
fixedFooter: Boolean,
|
20856
21051
|
height: [Number, String],
|
20857
21052
|
hover: Boolean,
|
21053
|
+
striped: {
|
21054
|
+
type: String,
|
21055
|
+
default: null,
|
21056
|
+
validator: v => ['even', 'odd'].includes(v)
|
21057
|
+
},
|
20858
21058
|
...makeComponentProps(),
|
20859
21059
|
...makeDensityProps(),
|
20860
21060
|
...makeTagProps(),
|
@@ -20881,7 +21081,9 @@ const VTable = genericComponent()({
|
|
20881
21081
|
'v-table--fixed-footer': props.fixedFooter,
|
20882
21082
|
'v-table--has-top': !!slots.top,
|
20883
21083
|
'v-table--has-bottom': !!slots.bottom,
|
20884
|
-
'v-table--hover': props.hover
|
21084
|
+
'v-table--hover': props.hover,
|
21085
|
+
'v-table--striped-even': props.striped === 'even',
|
21086
|
+
'v-table--striped-odd': props.striped === 'odd'
|
20885
21087
|
}, themeClasses.value, densityClasses.value, props.class]),
|
20886
21088
|
"style": normalizeStyle(props.style)
|
20887
21089
|
}, {
|
@@ -22056,7 +22258,8 @@ const makeCalendarProps = propsFactory({
|
|
22056
22258
|
firstDayOfWeek: {
|
22057
22259
|
type: [Number, String],
|
22058
22260
|
default: undefined
|
22059
|
-
}
|
22261
|
+
},
|
22262
|
+
weekdayFormat: String
|
22060
22263
|
}, 'calendar');
|
22061
22264
|
function useCalendar(props) {
|
22062
22265
|
const adapter = useDate();
|
@@ -22297,7 +22500,7 @@ const VDatePickerMonth = genericComponent()({
|
|
22297
22500
|
"ref": daysRef,
|
22298
22501
|
"key": daysInMonth.value[0].date?.toString(),
|
22299
22502
|
"class": "v-date-picker-month__days"
|
22300
|
-
}, [!props.hideWeekdays && adapter.getWeekdays(props.firstDayOfWeek).map(weekDay => createElementVNode("div", {
|
22503
|
+
}, [!props.hideWeekdays && adapter.getWeekdays(props.firstDayOfWeek, props.weekdayFormat).map(weekDay => createElementVNode("div", {
|
22301
22504
|
"class": normalizeClass(['v-date-picker-month__day', 'v-date-picker-month__weekday'])
|
22302
22505
|
}, [weekDay])), daysInMonth.value.map((item, i) => {
|
22303
22506
|
const slotProps = {
|
@@ -23912,6 +24115,9 @@ const VInfiniteScroll = genericComponent()({
|
|
23912
24115
|
startStatus.value = status;
|
23913
24116
|
} else if (side === 'end') {
|
23914
24117
|
endStatus.value = status;
|
24118
|
+
} else if (side === 'both') {
|
24119
|
+
startStatus.value = status;
|
24120
|
+
endStatus.value = status;
|
23915
24121
|
}
|
23916
24122
|
}
|
23917
24123
|
function getStatus(side) {
|
@@ -24023,6 +24229,32 @@ const VInfiniteScroll = genericComponent()({
|
|
24023
24229
|
}, [renderSide('end', endStatus.value)])]
|
24024
24230
|
});
|
24025
24231
|
});
|
24232
|
+
function reset(side) {
|
24233
|
+
const effectiveSide = side ?? props.side;
|
24234
|
+
setStatus(effectiveSide, 'ok');
|
24235
|
+
nextTick(() => {
|
24236
|
+
setScrollAmount(getScrollSize() - previousScrollSize + getScrollAmount());
|
24237
|
+
if (props.mode !== 'manual') {
|
24238
|
+
nextTick(() => {
|
24239
|
+
window.requestAnimationFrame(() => {
|
24240
|
+
window.requestAnimationFrame(() => {
|
24241
|
+
window.requestAnimationFrame(() => {
|
24242
|
+
if (effectiveSide === 'both') {
|
24243
|
+
intersecting('start');
|
24244
|
+
intersecting('end');
|
24245
|
+
} else {
|
24246
|
+
intersecting(effectiveSide);
|
24247
|
+
}
|
24248
|
+
});
|
24249
|
+
});
|
24250
|
+
});
|
24251
|
+
});
|
24252
|
+
}
|
24253
|
+
});
|
24254
|
+
}
|
24255
|
+
return {
|
24256
|
+
reset
|
24257
|
+
};
|
24026
24258
|
}
|
24027
24259
|
});
|
24028
24260
|
|
@@ -24941,6 +25173,10 @@ const makeVNumberInputProps = propsFactory({
|
|
24941
25173
|
type: Number,
|
24942
25174
|
default: 0
|
24943
25175
|
},
|
25176
|
+
minFractionDigits: {
|
25177
|
+
type: Number,
|
25178
|
+
default: null
|
25179
|
+
},
|
24944
25180
|
...omit(makeVTextFieldProps(), ['modelValue', 'validationValue'])
|
24945
25181
|
}, 'VNumberInput');
|
24946
25182
|
const VNumberInput = genericComponent()({
|
@@ -24968,9 +25204,19 @@ const VNumberInput = genericComponent()({
|
|
24968
25204
|
const isFocused = shallowRef(props.focused);
|
24969
25205
|
function correctPrecision(val) {
|
24970
25206
|
let precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : props.precision;
|
24971
|
-
|
24972
|
-
|
24973
|
-
|
25207
|
+
if (precision == null) {
|
25208
|
+
return String(val);
|
25209
|
+
}
|
25210
|
+
let fixed = val.toFixed(precision);
|
25211
|
+
if (isFocused.value) {
|
25212
|
+
return Number(fixed).toString(); // trim zeros
|
25213
|
+
}
|
25214
|
+
if ((props.minFractionDigits ?? precision) < precision) {
|
25215
|
+
const trimLimit = precision - props.minFractionDigits;
|
25216
|
+
const [baseDigits, fractionDigits] = fixed.split('.');
|
25217
|
+
fixed = [baseDigits, fractionDigits.replace(new RegExp(`0{1,${trimLimit}}$`), '')].filter(Boolean).join('.');
|
25218
|
+
}
|
25219
|
+
return fixed;
|
24974
25220
|
}
|
24975
25221
|
const model = useProxiedModel(props, 'modelValue', null, val => val ?? null, val => val == null ? val ?? null : clamp(Number(val), props.min, props.max));
|
24976
25222
|
const _inputText = shallowRef(null);
|
@@ -25025,6 +25271,7 @@ const VNumberInput = genericComponent()({
|
|
25025
25271
|
}
|
25026
25272
|
};
|
25027
25273
|
watch(() => props.precision, () => formatInputValue());
|
25274
|
+
watch(() => props.minFractionDigits, () => formatInputValue());
|
25028
25275
|
onMounted(() => {
|
25029
25276
|
clampModel();
|
25030
25277
|
});
|
@@ -25139,7 +25386,7 @@ const VNumberInput = genericComponent()({
|
|
25139
25386
|
inputText.value = null;
|
25140
25387
|
return;
|
25141
25388
|
}
|
25142
|
-
inputText.value =
|
25389
|
+
inputText.value = correctPrecision(model.value);
|
25143
25390
|
}
|
25144
25391
|
function trimDecimalZeros() {
|
25145
25392
|
if (controlsDisabled.value) return;
|
@@ -25399,9 +25646,10 @@ const VOtpInput = genericComponent()({
|
|
25399
25646
|
e.preventDefault();
|
25400
25647
|
e.stopPropagation();
|
25401
25648
|
const clipboardText = e?.clipboardData?.getData('Text').trim().slice(0, length.value) ?? '';
|
25649
|
+
const finalIndex = clipboardText.length - 1 === -1 ? index : clipboardText.length - 1;
|
25402
25650
|
if (isValidNumber(clipboardText)) return;
|
25403
25651
|
model.value = clipboardText.split('');
|
25404
|
-
inputRef.value?.[
|
25652
|
+
inputRef.value?.[finalIndex].focus();
|
25405
25653
|
}
|
25406
25654
|
function reset() {
|
25407
25655
|
model.value = [];
|
@@ -30101,11 +30349,6 @@ const makeVIconBtnProps = propsFactory({
|
|
30101
30349
|
hideOverlay: Boolean,
|
30102
30350
|
icon: [String, Function, Object],
|
30103
30351
|
iconColor: String,
|
30104
|
-
iconSize: [Number, String],
|
30105
|
-
iconSizes: {
|
30106
|
-
type: Array,
|
30107
|
-
default: () => [['x-small', 10], ['small', 16], ['default', 24], ['large', 28], ['x-large', 32]]
|
30108
|
-
},
|
30109
30352
|
loading: Boolean,
|
30110
30353
|
opacity: [Number, String],
|
30111
30354
|
readonly: Boolean,
|
@@ -30125,6 +30368,7 @@ const makeVIconBtnProps = propsFactory({
|
|
30125
30368
|
...makeBorderProps(),
|
30126
30369
|
...makeComponentProps(),
|
30127
30370
|
...makeElevationProps(),
|
30371
|
+
...makeIconSizeProps(),
|
30128
30372
|
...makeRoundedProps(),
|
30129
30373
|
...makeTagProps({
|
30130
30374
|
tag: 'button'
|
@@ -30179,7 +30423,6 @@ const VIconBtn = genericComponent()({
|
|
30179
30423
|
})()
|
30180
30424
|
}));
|
30181
30425
|
const btnSizeMap = new Map(props.sizes);
|
30182
|
-
const iconSizeMap = new Map(props.iconSizes);
|
30183
30426
|
function onClick() {
|
30184
30427
|
if (props.disabled || props.readonly || isActive.value === undefined || props.tag === 'a' && attrs.href) return;
|
30185
30428
|
isActive.value = !isActive.value;
|
@@ -30191,12 +30434,12 @@ const VIconBtn = genericComponent()({
|
|
30191
30434
|
const btnSize = hasNamedSize ? btnSizeMap.get(_btnSize) : _btnSize;
|
30192
30435
|
const btnHeight = props.height ?? btnSize;
|
30193
30436
|
const btnWidth = props.width ?? btnSize;
|
30194
|
-
const
|
30195
|
-
|
30196
|
-
|
30437
|
+
const {
|
30438
|
+
iconSize
|
30439
|
+
} = useIconSizes(props, () => new Map(props.iconSizes).get(_btnSize));
|
30197
30440
|
const iconProps = {
|
30198
30441
|
icon,
|
30199
|
-
size: iconSize,
|
30442
|
+
size: iconSize.value,
|
30200
30443
|
iconColor: props.iconColor,
|
30201
30444
|
opacity: props.opacity
|
30202
30445
|
};
|
@@ -30239,7 +30482,7 @@ const VIconBtn = genericComponent()({
|
|
30239
30482
|
"color": typeof props.loading === 'boolean' ? undefined : props.loading,
|
30240
30483
|
"indeterminate": "disable-shrink",
|
30241
30484
|
"width": "2",
|
30242
|
-
"size": iconSize
|
30485
|
+
"size": iconSize.value
|
30243
30486
|
}, null)])]
|
30244
30487
|
});
|
30245
30488
|
});
|
@@ -30247,6 +30490,251 @@ const VIconBtn = genericComponent()({
|
|
30247
30490
|
}
|
30248
30491
|
});
|
30249
30492
|
|
30493
|
+
// Utilities
|
30494
|
+
|
30495
|
+
// Types
|
30496
|
+
|
30497
|
+
const makeMaskProps = propsFactory({
|
30498
|
+
mask: [String, Object],
|
30499
|
+
returnMaskedValue: Boolean
|
30500
|
+
}, 'mask');
|
30501
|
+
const defaultDelimiters = /[-!$%^&*()_+|~=`{}[\]:";'<>?,./\\ ]/;
|
30502
|
+
const presets = {
|
30503
|
+
'credit-card': '#### - #### - #### - ####',
|
30504
|
+
date: '##/##/####',
|
30505
|
+
'date-time': '##/##/#### ##:##',
|
30506
|
+
'iso-date': '####-##-##',
|
30507
|
+
'iso-date-time': '####-##-## ##:##',
|
30508
|
+
phone: '(###) ### - ####',
|
30509
|
+
social: '###-##-####',
|
30510
|
+
time: '##:##',
|
30511
|
+
'time-with-seconds': '##:##:##'
|
30512
|
+
};
|
30513
|
+
function isMaskDelimiter(char) {
|
30514
|
+
return char ? defaultDelimiters.test(char) : false;
|
30515
|
+
}
|
30516
|
+
const defaultTokens = {
|
30517
|
+
'#': {
|
30518
|
+
pattern: /[0-9]/
|
30519
|
+
},
|
30520
|
+
A: {
|
30521
|
+
pattern: /[A-Z]/i,
|
30522
|
+
convert: v => v.toUpperCase()
|
30523
|
+
},
|
30524
|
+
a: {
|
30525
|
+
pattern: /[a-z]/i,
|
30526
|
+
convert: v => v.toLowerCase()
|
30527
|
+
},
|
30528
|
+
N: {
|
30529
|
+
pattern: /[0-9A-Z]/i,
|
30530
|
+
convert: v => v.toUpperCase()
|
30531
|
+
},
|
30532
|
+
n: {
|
30533
|
+
pattern: /[0-9a-z]/i,
|
30534
|
+
convert: v => v.toLowerCase()
|
30535
|
+
},
|
30536
|
+
X: {
|
30537
|
+
pattern: defaultDelimiters
|
30538
|
+
}
|
30539
|
+
};
|
30540
|
+
function useMask(props, inputRef) {
|
30541
|
+
const mask = computed(() => {
|
30542
|
+
if (typeof props.mask === 'string') {
|
30543
|
+
if (props.mask in presets) return presets[props.mask];
|
30544
|
+
return props.mask;
|
30545
|
+
}
|
30546
|
+
return props.mask?.mask ?? '';
|
30547
|
+
});
|
30548
|
+
const tokens = computed(() => {
|
30549
|
+
return {
|
30550
|
+
...defaultTokens,
|
30551
|
+
...(isObject(props.mask) ? props.mask.tokens : null)
|
30552
|
+
};
|
30553
|
+
});
|
30554
|
+
const selection = shallowRef(0);
|
30555
|
+
const lazySelection = shallowRef(0);
|
30556
|
+
function isMask(char) {
|
30557
|
+
return char in tokens.value;
|
30558
|
+
}
|
30559
|
+
function maskValidates(mask, char) {
|
30560
|
+
if (char == null || !isMask(mask)) return false;
|
30561
|
+
const item = tokens.value[mask];
|
30562
|
+
if (item.pattern) return item.pattern.test(char);
|
30563
|
+
return item.test(char);
|
30564
|
+
}
|
30565
|
+
function convert(mask, char) {
|
30566
|
+
const item = tokens.value[mask];
|
30567
|
+
return item.convert ? item.convert(char) : char;
|
30568
|
+
}
|
30569
|
+
function maskText(text) {
|
30570
|
+
const trimmedText = text?.trim().replace(/\s+/g, ' ');
|
30571
|
+
if (trimmedText == null) return '';
|
30572
|
+
if (!mask.value.length || !trimmedText.length) return trimmedText;
|
30573
|
+
let textIndex = 0;
|
30574
|
+
let maskIndex = 0;
|
30575
|
+
let newText = '';
|
30576
|
+
while (maskIndex < mask.value.length) {
|
30577
|
+
const mchar = mask.value[maskIndex];
|
30578
|
+
const tchar = trimmedText[textIndex];
|
30579
|
+
|
30580
|
+
// Escaped character in mask, the next mask character is inserted
|
30581
|
+
if (mchar === '\\') {
|
30582
|
+
newText += mask.value[maskIndex + 1];
|
30583
|
+
maskIndex += 2;
|
30584
|
+
continue;
|
30585
|
+
}
|
30586
|
+
if (!isMask(mchar)) {
|
30587
|
+
newText += mchar;
|
30588
|
+
if (tchar === mchar) {
|
30589
|
+
textIndex++;
|
30590
|
+
}
|
30591
|
+
} else if (maskValidates(mchar, tchar)) {
|
30592
|
+
newText += convert(mchar, tchar);
|
30593
|
+
textIndex++;
|
30594
|
+
} else {
|
30595
|
+
break;
|
30596
|
+
}
|
30597
|
+
maskIndex++;
|
30598
|
+
}
|
30599
|
+
return newText;
|
30600
|
+
}
|
30601
|
+
function unmaskText(text) {
|
30602
|
+
if (text == null) return null;
|
30603
|
+
if (!mask.value.length || !text.length) return text;
|
30604
|
+
let textIndex = 0;
|
30605
|
+
let maskIndex = 0;
|
30606
|
+
let newText = '';
|
30607
|
+
while (true) {
|
30608
|
+
const mchar = mask.value[maskIndex];
|
30609
|
+
const tchar = text[textIndex];
|
30610
|
+
if (tchar == null) break;
|
30611
|
+
if (mchar == null) {
|
30612
|
+
newText += tchar;
|
30613
|
+
textIndex++;
|
30614
|
+
continue;
|
30615
|
+
}
|
30616
|
+
|
30617
|
+
// Escaped character in mask, skip the next input character
|
30618
|
+
if (mchar === '\\') {
|
30619
|
+
if (tchar === mask.value[maskIndex + 1]) {
|
30620
|
+
textIndex++;
|
30621
|
+
}
|
30622
|
+
maskIndex += 2;
|
30623
|
+
continue;
|
30624
|
+
}
|
30625
|
+
if (maskValidates(mchar, tchar)) {
|
30626
|
+
// masked char
|
30627
|
+
newText += tchar;
|
30628
|
+
textIndex++;
|
30629
|
+
maskIndex++;
|
30630
|
+
continue;
|
30631
|
+
} else if (mchar !== tchar) {
|
30632
|
+
// input doesn't match mask, skip forward until it does
|
30633
|
+
while (true) {
|
30634
|
+
const mchar = mask.value[maskIndex++];
|
30635
|
+
if (mchar == null || maskValidates(mchar, tchar)) break;
|
30636
|
+
}
|
30637
|
+
continue;
|
30638
|
+
}
|
30639
|
+
textIndex++;
|
30640
|
+
maskIndex++;
|
30641
|
+
}
|
30642
|
+
return newText;
|
30643
|
+
}
|
30644
|
+
function setCaretPosition(newSelection) {
|
30645
|
+
selection.value = newSelection;
|
30646
|
+
inputRef.value && inputRef.value.setSelectionRange(selection.value, selection.value);
|
30647
|
+
}
|
30648
|
+
function resetSelections() {
|
30649
|
+
if (!inputRef.value?.selectionEnd) return;
|
30650
|
+
selection.value = inputRef.value.selectionEnd;
|
30651
|
+
lazySelection.value = 0;
|
30652
|
+
for (let index = 0; index < selection.value; index++) {
|
30653
|
+
isMaskDelimiter(inputRef.value.value[index]) || lazySelection.value++;
|
30654
|
+
}
|
30655
|
+
}
|
30656
|
+
function updateRange() {
|
30657
|
+
if (!inputRef.value) return;
|
30658
|
+
resetSelections();
|
30659
|
+
let selection = 0;
|
30660
|
+
const newValue = inputRef.value.value;
|
30661
|
+
if (newValue) {
|
30662
|
+
for (let index = 0; index < newValue.length; index++) {
|
30663
|
+
if (lazySelection.value <= 0) break;
|
30664
|
+
isMaskDelimiter(newValue[index]) || lazySelection.value--;
|
30665
|
+
selection++;
|
30666
|
+
}
|
30667
|
+
}
|
30668
|
+
setCaretPosition(selection);
|
30669
|
+
}
|
30670
|
+
return {
|
30671
|
+
updateRange,
|
30672
|
+
maskText,
|
30673
|
+
unmaskText
|
30674
|
+
};
|
30675
|
+
}
|
30676
|
+
|
30677
|
+
// Types
|
30678
|
+
|
30679
|
+
const makeVMaskInputProps = propsFactory({
|
30680
|
+
...makeVTextFieldProps(),
|
30681
|
+
...makeMaskProps()
|
30682
|
+
}, 'VMaskInput');
|
30683
|
+
const VMaskInput = genericComponent()({
|
30684
|
+
name: 'VMaskInput',
|
30685
|
+
props: makeVMaskInputProps(),
|
30686
|
+
emits: {
|
30687
|
+
'update:modelValue': val => true
|
30688
|
+
},
|
30689
|
+
setup(props, _ref) {
|
30690
|
+
let {
|
30691
|
+
slots,
|
30692
|
+
emit
|
30693
|
+
} = _ref;
|
30694
|
+
const vTextFieldRef = ref();
|
30695
|
+
const {
|
30696
|
+
maskText,
|
30697
|
+
updateRange,
|
30698
|
+
unmaskText
|
30699
|
+
} = useMask(props, vTextFieldRef);
|
30700
|
+
const returnMaskedValue = computed(() => props.mask && props.returnMaskedValue);
|
30701
|
+
const model = useProxiedModel(props, 'modelValue', undefined,
|
30702
|
+
// Always display masked value in input when mask is applied
|
30703
|
+
val => props.mask ? maskText(unmaskText(val)) : val, val => {
|
30704
|
+
if (props.mask) {
|
30705
|
+
const valueBeforeChange = unmaskText(model.value);
|
30706
|
+
// E.g. mask is #-# and the input value is '2-23'
|
30707
|
+
// model-value should be enforced to '2-2'
|
30708
|
+
const enforcedMaskedValue = maskText(unmaskText(val));
|
30709
|
+
const newUnmaskedValue = unmaskText(enforcedMaskedValue);
|
30710
|
+
if (newUnmaskedValue === valueBeforeChange) {
|
30711
|
+
vTextFieldRef.value.value = enforcedMaskedValue;
|
30712
|
+
}
|
30713
|
+
val = newUnmaskedValue;
|
30714
|
+
updateRange();
|
30715
|
+
return returnMaskedValue.value ? maskText(val) : val;
|
30716
|
+
}
|
30717
|
+
return val;
|
30718
|
+
});
|
30719
|
+
onBeforeMount(() => {
|
30720
|
+
if (props.returnMaskedValue) {
|
30721
|
+
emit('update:modelValue', model.value);
|
30722
|
+
}
|
30723
|
+
});
|
30724
|
+
useRender(() => {
|
30725
|
+
const textFieldProps = VTextField.filterProps(props);
|
30726
|
+
return createVNode(VTextField, mergeProps(textFieldProps, {
|
30727
|
+
"modelValue": model.value,
|
30728
|
+
"onUpdate:modelValue": $event => model.value = $event,
|
30729
|
+
"ref": vTextFieldRef
|
30730
|
+
}), {
|
30731
|
+
...slots
|
30732
|
+
});
|
30733
|
+
});
|
30734
|
+
return forwardRefs({}, vTextFieldRef);
|
30735
|
+
}
|
30736
|
+
});
|
30737
|
+
|
30250
30738
|
// Types
|
30251
30739
|
|
30252
30740
|
const makeVStepperVerticalActionsProps = propsFactory({
|
@@ -31752,6 +32240,7 @@ var components = /*#__PURE__*/Object.freeze({
|
|
31752
32240
|
VListSubheader: VListSubheader,
|
31753
32241
|
VLocaleProvider: VLocaleProvider,
|
31754
32242
|
VMain: VMain,
|
32243
|
+
VMaskInput: VMaskInput,
|
31755
32244
|
VMenu: VMenu,
|
31756
32245
|
VMessages: VMessages,
|
31757
32246
|
VNavigationDrawer: VNavigationDrawer,
|
@@ -32149,7 +32638,7 @@ function createVuetify$1() {
|
|
32149
32638
|
};
|
32150
32639
|
});
|
32151
32640
|
}
|
32152
|
-
const version$1 = "3.8.
|
32641
|
+
const version$1 = "3.8.9-dev.2025-06-12";
|
32153
32642
|
createVuetify$1.version = version$1;
|
32154
32643
|
|
32155
32644
|
// Vue's inject() can only be used in setup
|
@@ -32447,7 +32936,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
32447
32936
|
|
32448
32937
|
/* eslint-disable local-rules/sort-imports */
|
32449
32938
|
|
32450
|
-
const version = "3.8.
|
32939
|
+
const version = "3.8.9-dev.2025-06-12";
|
32451
32940
|
|
32452
32941
|
/* eslint-disable local-rules/sort-imports */
|
32453
32942
|
|