@vuetify/nightly 3.8.9-dev.2025-06-13 → 3.8.9-master.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 +6 -45
- package/dist/json/attributes.json +3714 -4110
- package/dist/json/importMap-labs.json +24 -28
- package/dist/json/importMap.json +154 -154
- package/dist/json/tags.json +2 -106
- package/dist/json/web-types.json +6783 -8232
- package/dist/vuetify-labs.cjs +177 -730
- package/dist/vuetify-labs.css +4085 -4128
- package/dist/vuetify-labs.d.ts +2938 -10254
- package/dist/vuetify-labs.esm.js +178 -731
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +177 -730
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +166 -478
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +3607 -3650
- package/dist/vuetify.d.ts +2085 -2782
- package/dist/vuetify.esm.js +167 -479
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +166 -478
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +1229 -1251
- 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 +10 -15
- package/lib/components/VAlert/VAlert.js.map +1 -1
- package/lib/components/VAlert/VAlert.sass +1 -7
- package/lib/components/VAppBar/VAppBar.d.ts +3 -15
- package/lib/components/VAppBar/VAppBarNavIcon.d.ts +10 -20
- package/lib/components/VAutocomplete/VAutocomplete.d.ts +110 -175
- package/lib/components/VAutocomplete/VAutocomplete.js +3 -21
- package/lib/components/VAutocomplete/VAutocomplete.js.map +1 -1
- package/lib/components/VBadge/VBadge.d.ts +0 -60
- package/lib/components/VBadge/VBadge.js +2 -7
- package/lib/components/VBadge/VBadge.js.map +1 -1
- package/lib/components/VBtn/VBtn.d.ts +10 -20
- 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/VCard/VCard.d.ts +10 -20
- package/lib/components/VCheckbox/VCheckbox.d.ts +13 -23
- package/lib/components/VCheckbox/VCheckboxBtn.d.ts +10 -20
- package/lib/components/VChip/VChip.d.ts +10 -20
- package/lib/components/VChipGroup/VChipGroup.d.ts +0 -10
- package/lib/components/VCombobox/VCombobox.d.ts +110 -175
- package/lib/components/VCombobox/VCombobox.js +3 -22
- package/lib/components/VCombobox/VCombobox.js.map +1 -1
- package/lib/components/VDataTable/VDataTable.d.ts +0 -60
- package/lib/components/VDataTable/VDataTableHeaders.d.ts +0 -13
- package/lib/components/VDataTable/VDataTableHeaders.js +2 -4
- package/lib/components/VDataTable/VDataTableHeaders.js.map +1 -1
- package/lib/components/VDataTable/VDataTableServer.d.ts +0 -42
- package/lib/components/VDataTable/VDataTableVirtual.d.ts +0 -42
- package/lib/components/VDatePicker/VDatePicker.d.ts +5 -80
- package/lib/components/VDatePicker/VDatePicker.js +4 -10
- package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonth.d.ts +0 -10
- package/lib/components/VDatePicker/VDatePickerMonth.js +1 -1
- package/lib/components/VDatePicker/VDatePickerMonth.js.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanel.d.ts +10 -20
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.d.ts +10 -20
- package/lib/components/VExpansionPanel/VExpansionPanels.d.ts +10 -20
- package/lib/components/VFab/VFab.d.ts +10 -20
- 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 +3 -9
- package/lib/components/VInfiniteScroll/VInfiniteScroll.js +0 -29
- package/lib/components/VInfiniteScroll/VInfiniteScroll.js.map +1 -1
- package/lib/components/VInput/VInput.d.ts +4 -4
- package/lib/components/VKbd/VKbd.css +2 -13
- package/lib/components/VKbd/VKbd.sass +1 -2
- package/lib/components/VKbd/_variables.scss +1 -12
- package/lib/components/VKbd/index.d.ts +95 -1
- package/lib/components/VKbd/index.js +4 -1
- package/lib/components/VKbd/index.js.map +1 -1
- package/lib/components/VList/VList.d.ts +0 -13
- package/lib/components/VList/VList.js +1 -4
- package/lib/components/VList/VList.js.map +1 -1
- package/lib/components/VList/VListChildren.js.map +1 -1
- package/lib/components/VList/VListItem.css +2 -0
- package/lib/components/VList/VListItem.d.ts +10 -23
- package/lib/components/VList/VListItem.js +3 -7
- package/lib/components/VList/VListItem.js.map +1 -1
- package/lib/components/VList/VListItem.sass +2 -0
- package/lib/components/VList/_variables.scss +1 -0
- package/lib/components/VList/list.d.ts +2 -9
- package/lib/components/VList/list.js +0 -7
- package/lib/components/VList/list.js.map +1 -1
- package/lib/components/VMenu/VMenu.d.ts +0 -13
- package/lib/components/VMenu/VMenu.js +1 -2
- package/lib/components/VMenu/VMenu.js.map +1 -1
- package/lib/components/VNumberInput/VNumberInput.d.ts +89 -114
- package/lib/components/VNumberInput/VNumberInput.js +20 -43
- package/lib/components/VNumberInput/VNumberInput.js.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.js +1 -2
- 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 +10 -20
- package/lib/components/VRadioGroup/VRadioGroup.d.ts +13 -23
- package/lib/components/VRangeSlider/VRangeSlider.d.ts +3 -3
- package/lib/components/VSelect/VSelect.d.ts +118 -204
- package/lib/components/VSelect/VSelect.js +3 -21
- package/lib/components/VSelect/VSelect.js.map +1 -1
- package/lib/components/VSelectionControl/VSelectionControl.d.ts +10 -20
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.d.ts +14 -28
- package/lib/components/VSlideGroup/VSlideGroup.d.ts +0 -10
- package/lib/components/VSlideGroup/VSlideGroup.js +1 -2
- 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 +10 -20
- package/lib/components/VSpeedDial/VSpeedDial.css +1 -1
- package/lib/components/VSpeedDial/VSpeedDial.d.ts +0 -13
- package/lib/components/VSpeedDial/VSpeedDial.sass +3 -1
- package/lib/components/VStepper/VStepperItem.d.ts +14 -28
- package/lib/components/VSwitch/VSwitch.d.ts +13 -23
- package/lib/components/VTable/VTable.css +0 -6
- package/lib/components/VTable/VTable.d.ts +24 -55
- package/lib/components/VTable/VTable.js +2 -9
- package/lib/components/VTable/VTable.js.map +1 -1
- package/lib/components/VTable/VTable.sass +0 -14
- package/lib/components/VTable/_variables.scss +0 -1
- package/lib/components/VTabs/VTab.d.ts +28 -56
- package/lib/components/VTabs/VTabs.d.ts +0 -10
- 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 +3 -15
- package/lib/components/VToolbar/VToolbar.js +3 -6
- package/lib/components/VToolbar/VToolbar.js.map +1 -1
- package/lib/composables/calendar.d.ts +0 -6
- package/lib/composables/calendar.js +1 -2
- 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/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 +0 -1
- package/lib/composables/date/index.js +0 -1
- package/lib/composables/date/index.js.map +1 -1
- package/lib/composables/filter.js +0 -3
- package/lib/composables/filter.js.map +1 -1
- package/lib/composables/locale.d.ts +1 -5
- package/lib/composables/locale.js.map +1 -1
- package/lib/composables/theme.d.ts +1 -6
- package/lib/composables/theme.js +29 -97
- package/lib/composables/theme.js.map +1 -1
- package/lib/composables/virtual.js +1 -6
- package/lib/composables/virtual.js.map +1 -1
- package/lib/directives/ripple/index.d.ts +1 -2
- package/lib/directives/ripple/index.js +7 -12
- package/lib/directives/ripple/index.js.map +1 -1
- package/lib/entry-bundler.d.ts +3 -4
- package/lib/entry-bundler.js +1 -1
- package/lib/entry-bundler.js.map +1 -1
- package/lib/framework.d.ts +64 -83
- package/lib/framework.js +1 -1
- package/lib/framework.js.map +1 -1
- package/lib/labs/VCalendar/VCalendar.d.ts +0 -10
- package/lib/labs/VColorInput/VColorInput.d.ts +3 -3
- package/lib/labs/VDateInput/VDateInput.d.ts +87 -97
- package/lib/labs/VFileUpload/VFileUpload.d.ts +3 -3
- package/lib/labs/VFileUpload/VFileUploadItem.d.ts +10 -20
- 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/VStepperVertical/VStepperVertical.d.ts +10 -20
- package/lib/labs/VStepperVertical/VStepperVerticalItem.d.ts +10 -20
- package/lib/labs/VTreeview/VTreeview.d.ts +0 -13
- package/lib/labs/VTreeview/VTreeviewItem.d.ts +10 -20
- package/lib/labs/components.d.ts +0 -1
- package/lib/labs/components.js +0 -1
- package/lib/labs/components.js.map +1 -1
- package/lib/labs/entry-bundler.d.ts +3 -4
- package/lib/locale/adapters/vue-i18n.js +1 -6
- package/lib/locale/adapters/vue-i18n.js.map +1 -1
- package/lib/locale/adapters/vuetify.js +1 -7
- package/lib/locale/adapters/vuetify.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/lib/util/helpers.d.ts +1 -2
- package/lib/util/helpers.js +7 -12
- package/lib/util/helpers.js.map +1 -1
- package/package.json +1 -3
- package/lib/components/VKbd/VKbd.d.ts +0 -221
- package/lib/components/VKbd/VKbd.js +0 -55
- package/lib/components/VKbd/VKbd.js.map +0 -1
- package/lib/composables/date/adapters/string.d.ts +0 -54
- package/lib/composables/date/adapters/string.js +0 -153
- package/lib/composables/date/adapters/string.js.map +0 -1
- package/lib/composables/iconSizes.d.ts +0 -28
- package/lib/composables/iconSizes.js +0 -23
- package/lib/composables/iconSizes.js.map +0 -1
- package/lib/composables/mask.d.ts +0 -38
- package/lib/composables/mask.js +0 -183
- package/lib/composables/mask.js.map +0 -1
- package/lib/labs/VMaskInput/VMaskInput.d.ts +0 -6993
- package/lib/labs/VMaskInput/VMaskInput.js +0 -67
- package/lib/labs/VMaskInput/VMaskInput.js.map +0 -1
- package/lib/labs/VMaskInput/index.d.ts +0 -1
- package/lib/labs/VMaskInput/index.js +0 -2
- package/lib/labs/VMaskInput/index.js.map +0 -1
package/dist/vuetify.cjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Vuetify v3.8.9-
|
2
|
+
* Vuetify v3.8.9-master.2025-06-12
|
3
3
|
* Forged by John Leider
|
4
4
|
* Released under the MIT License.
|
5
5
|
*/
|
@@ -14,7 +14,6 @@
|
|
14
14
|
const SUPPORTS_INTERSECTION = IN_BROWSER && 'IntersectionObserver' in window;
|
15
15
|
const SUPPORTS_TOUCH = IN_BROWSER && ('ontouchstart' in window || window.navigator.maxTouchPoints > 0);
|
16
16
|
const SUPPORTS_EYE_DROPPER = IN_BROWSER && 'EyeDropper' in window;
|
17
|
-
const SUPPORTS_MATCH_MEDIA = IN_BROWSER && 'matchMedia' in window && typeof window.matchMedia === 'function';
|
18
17
|
|
19
18
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
20
19
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
@@ -515,23 +514,18 @@
|
|
515
514
|
function isPrimitive(value) {
|
516
515
|
return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean' || typeof value === 'bigint';
|
517
516
|
}
|
518
|
-
function
|
519
|
-
|
520
|
-
}
|
521
|
-
function extractNumber(text, decimalDigitsLimit, decimalSeparator) {
|
522
|
-
const onlyValidCharacters = new RegExp(`[\\d\\-${escapeForRegex(decimalSeparator)}]`);
|
523
|
-
const cleanText = text.split('').filter(x => onlyValidCharacters.test(x)).filter((x, i, all) => i === 0 && /[-]/.test(x) ||
|
517
|
+
function extractNumber(text, decimalDigitsLimit) {
|
518
|
+
const cleanText = text.split('').filter(x => /[\d\-.]/.test(x)).filter((x, i, all) => i === 0 && /[-]/.test(x) ||
|
524
519
|
// sign allowed at the start
|
525
|
-
x ===
|
520
|
+
x === '.' && i === all.indexOf('.') ||
|
526
521
|
// decimal separator allowed only once
|
527
522
|
/\d/.test(x)).join('');
|
528
523
|
if (decimalDigitsLimit === 0) {
|
529
|
-
return cleanText.split(
|
524
|
+
return cleanText.split('.')[0];
|
530
525
|
}
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
return [parts[0], parts[1].substring(0, decimalDigitsLimit)].join(decimalSeparator);
|
526
|
+
if (decimalDigitsLimit !== null && /\.\d/.test(cleanText)) {
|
527
|
+
const parts = cleanText.split('.');
|
528
|
+
return [parts[0], parts[1].substring(0, decimalDigitsLimit)].join('.');
|
535
529
|
}
|
536
530
|
return cleanText;
|
537
531
|
}
|
@@ -2671,10 +2665,6 @@
|
|
2671
2665
|
return numberFormat.format(value);
|
2672
2666
|
};
|
2673
2667
|
}
|
2674
|
-
function inferDecimalSeparator(current, fallback) {
|
2675
|
-
const format = createNumberFunction(current, fallback);
|
2676
|
-
return format(0.1).includes(',') ? ',' : '.';
|
2677
|
-
}
|
2678
2668
|
function useProvided(props, prop, provided) {
|
2679
2669
|
const internal = useProxiedModel(props, prop, props[prop] ?? provided.value);
|
2680
2670
|
|
@@ -2697,7 +2687,6 @@
|
|
2697
2687
|
current,
|
2698
2688
|
fallback,
|
2699
2689
|
messages,
|
2700
|
-
decimalSeparator: vue.toRef(() => inferDecimalSeparator(current, fallback)),
|
2701
2690
|
t: createTranslateFunction(current, fallback, messages),
|
2702
2691
|
n: createNumberFunction(current, fallback),
|
2703
2692
|
provide: createProvideFunction({
|
@@ -2720,7 +2709,6 @@
|
|
2720
2709
|
current,
|
2721
2710
|
fallback,
|
2722
2711
|
messages,
|
2723
|
-
decimalSeparator: vue.toRef(() => options?.decimalSeparator ?? inferDecimalSeparator(current, fallback)),
|
2724
2712
|
t: createTranslateFunction(current, fallback, messages),
|
2725
2713
|
n: createNumberFunction(current, fallback),
|
2726
2714
|
provide: createProvideFunction({
|
@@ -2847,7 +2835,6 @@
|
|
2847
2835
|
function genDefaults$1() {
|
2848
2836
|
return {
|
2849
2837
|
defaultTheme: 'light',
|
2850
|
-
prefix: 'v-',
|
2851
2838
|
variations: {
|
2852
2839
|
colors: [],
|
2853
2840
|
lighten: 0,
|
@@ -2885,8 +2872,8 @@
|
|
2885
2872
|
'activated-opacity': 0.12,
|
2886
2873
|
'pressed-opacity': 0.12,
|
2887
2874
|
'dragged-opacity': 0.08,
|
2888
|
-
'theme-kbd': '#
|
2889
|
-
'theme-on-kbd': '#
|
2875
|
+
'theme-kbd': '#212529',
|
2876
|
+
'theme-on-kbd': '#FFFFFF',
|
2890
2877
|
'theme-code': '#F5F5F5',
|
2891
2878
|
'theme-on-code': '#000000'
|
2892
2879
|
}
|
@@ -2922,17 +2909,14 @@
|
|
2922
2909
|
'activated-opacity': 0.12,
|
2923
2910
|
'pressed-opacity': 0.16,
|
2924
2911
|
'dragged-opacity': 0.08,
|
2925
|
-
'theme-kbd': '#
|
2912
|
+
'theme-kbd': '#212529',
|
2926
2913
|
'theme-on-kbd': '#FFFFFF',
|
2927
2914
|
'theme-code': '#343434',
|
2928
2915
|
'theme-on-code': '#CCCCCC'
|
2929
2916
|
}
|
2930
2917
|
}
|
2931
2918
|
},
|
2932
|
-
stylesheetId: 'vuetify-theme-stylesheet'
|
2933
|
-
scoped: false,
|
2934
|
-
unimportant: false,
|
2935
|
-
utilities: true
|
2919
|
+
stylesheetId: 'vuetify-theme-stylesheet'
|
2936
2920
|
};
|
2937
2921
|
}
|
2938
2922
|
function parseThemeOptions() {
|
@@ -2955,21 +2939,21 @@
|
|
2955
2939
|
function createCssClass(lines, selector, content, scope) {
|
2956
2940
|
lines.push(`${getScopedSelector(selector, scope)} {\n`, ...content.map(line => ` ${line};\n`), '}\n');
|
2957
2941
|
}
|
2958
|
-
function genCssVariables(theme
|
2942
|
+
function genCssVariables(theme) {
|
2959
2943
|
const lightOverlay = theme.dark ? 2 : 1;
|
2960
2944
|
const darkOverlay = theme.dark ? 1 : 2;
|
2961
2945
|
const variables = [];
|
2962
2946
|
for (const [key, value] of Object.entries(theme.colors)) {
|
2963
2947
|
const rgb = parseColor(value);
|
2964
|
-
variables.push(
|
2948
|
+
variables.push(`--v-theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`);
|
2965
2949
|
if (!key.startsWith('on-')) {
|
2966
|
-
variables.push(
|
2950
|
+
variables.push(`--v-theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`);
|
2967
2951
|
}
|
2968
2952
|
}
|
2969
2953
|
for (const [key, value] of Object.entries(theme.variables)) {
|
2970
2954
|
const color = typeof value === 'string' && value.startsWith('#') ? parseColor(value) : undefined;
|
2971
2955
|
const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : undefined;
|
2972
|
-
variables.push(
|
2956
|
+
variables.push(`--v-${key}: ${rgb ?? value}`);
|
2973
2957
|
}
|
2974
2958
|
return variables;
|
2975
2959
|
}
|
@@ -3013,8 +2997,7 @@
|
|
3013
2997
|
const scopeSelector = `:where(${scope})`;
|
3014
2998
|
return selector === ':root' ? scopeSelector : `${scopeSelector} ${selector}`;
|
3015
2999
|
}
|
3016
|
-
function upsertStyles(
|
3017
|
-
const styleEl = getOrCreateStyleElement(id, cspNonce);
|
3000
|
+
function upsertStyles(styleEl, styles) {
|
3018
3001
|
if (!styleEl) return;
|
3019
3002
|
styleEl.innerHTML = styles;
|
3020
3003
|
}
|
@@ -3034,17 +3017,8 @@
|
|
3034
3017
|
// Composables
|
3035
3018
|
function createTheme(options) {
|
3036
3019
|
const parsedOptions = parseThemeOptions(options);
|
3037
|
-
const
|
3020
|
+
const name = vue.shallowRef(parsedOptions.defaultTheme);
|
3038
3021
|
const themes = vue.ref(parsedOptions.themes);
|
3039
|
-
const systemName = vue.shallowRef('light');
|
3040
|
-
const name = vue.computed({
|
3041
|
-
get() {
|
3042
|
-
return _name.value === 'system' ? systemName.value : _name.value;
|
3043
|
-
},
|
3044
|
-
set(val) {
|
3045
|
-
_name.value = val;
|
3046
|
-
}
|
3047
|
-
});
|
3048
3022
|
const computedThemes = vue.computed(() => {
|
3049
3023
|
const acc = {};
|
3050
3024
|
for (const [name, original] of Object.entries(themes.value)) {
|
@@ -3065,49 +3039,28 @@
|
|
3065
3039
|
const current = vue.toRef(() => computedThemes.value[name.value]);
|
3066
3040
|
const styles = vue.computed(() => {
|
3067
3041
|
const lines = [];
|
3068
|
-
const important = parsedOptions.unimportant ? '' : ' !important';
|
3069
|
-
const scoped = parsedOptions.scoped ? parsedOptions.prefix : '';
|
3070
3042
|
if (current.value?.dark) {
|
3071
3043
|
createCssClass(lines, ':root', ['color-scheme: dark'], parsedOptions.scope);
|
3072
3044
|
}
|
3073
|
-
createCssClass(lines, ':root', genCssVariables(current.value
|
3045
|
+
createCssClass(lines, ':root', genCssVariables(current.value), parsedOptions.scope);
|
3074
3046
|
for (const [themeName, theme] of Object.entries(computedThemes.value)) {
|
3075
|
-
createCssClass(lines,
|
3076
|
-
}
|
3077
|
-
|
3078
|
-
|
3079
|
-
|
3080
|
-
|
3081
|
-
|
3082
|
-
|
3083
|
-
|
3084
|
-
}
|
3085
|
-
|
3086
|
-
|
3087
|
-
createCssClass(fgLines, `.${scoped}border-${key}`, [`--${parsedOptions.prefix}border-color: var(--${parsedOptions.prefix}theme-${key})`], parsedOptions.scope);
|
3088
|
-
}
|
3047
|
+
createCssClass(lines, `.v-theme--${themeName}`, [`color-scheme: ${theme.dark ? 'dark' : 'normal'}`, ...genCssVariables(theme)], parsedOptions.scope);
|
3048
|
+
}
|
3049
|
+
const bgLines = [];
|
3050
|
+
const fgLines = [];
|
3051
|
+
const colors = new Set(Object.values(computedThemes.value).flatMap(theme => Object.keys(theme.colors)));
|
3052
|
+
for (const key of colors) {
|
3053
|
+
if (key.startsWith('on-')) {
|
3054
|
+
createCssClass(fgLines, `.${key}`, [`color: rgb(var(--v-theme-${key})) !important`], parsedOptions.scope);
|
3055
|
+
} else {
|
3056
|
+
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);
|
3057
|
+
createCssClass(fgLines, `.text-${key}`, [`color: rgb(var(--v-theme-${key})) !important`], parsedOptions.scope);
|
3058
|
+
createCssClass(fgLines, `.border-${key}`, [`--v-border-color: var(--v-theme-${key})`], parsedOptions.scope);
|
3089
3059
|
}
|
3090
|
-
lines.push(...bgLines, ...fgLines);
|
3091
3060
|
}
|
3061
|
+
lines.push(...bgLines, ...fgLines);
|
3092
3062
|
return lines.map((str, i) => i === 0 ? str : ` ${str}`).join('');
|
3093
3063
|
});
|
3094
|
-
const themeClasses = vue.toRef(() => parsedOptions.isDisabled ? undefined : `${parsedOptions.prefix}theme--${name.value}`);
|
3095
|
-
const themeNames = vue.toRef(() => Object.keys(computedThemes.value));
|
3096
|
-
if (SUPPORTS_MATCH_MEDIA) {
|
3097
|
-
const media = window.matchMedia('(prefers-color-scheme: dark)');
|
3098
|
-
function updateSystemName() {
|
3099
|
-
systemName.value = media.matches ? 'dark' : 'light';
|
3100
|
-
}
|
3101
|
-
updateSystemName();
|
3102
|
-
media.addEventListener('change', updateSystemName, {
|
3103
|
-
passive: true
|
3104
|
-
});
|
3105
|
-
if (vue.getCurrentScope()) {
|
3106
|
-
vue.onScopeDispose(() => {
|
3107
|
-
media.removeEventListener('change', updateSystemName);
|
3108
|
-
});
|
3109
|
-
}
|
3110
|
-
}
|
3111
3064
|
function install(app) {
|
3112
3065
|
if (parsedOptions.isDisabled) return;
|
3113
3066
|
const head = app._context.provides.usehead;
|
@@ -3145,55 +3098,22 @@
|
|
3145
3098
|
updateStyles();
|
3146
3099
|
}
|
3147
3100
|
function updateStyles() {
|
3148
|
-
upsertStyles(parsedOptions.stylesheetId, parsedOptions.cspNonce, styles.value);
|
3101
|
+
upsertStyles(getOrCreateStyleElement(parsedOptions.stylesheetId, parsedOptions.cspNonce), styles.value);
|
3149
3102
|
}
|
3150
3103
|
}
|
3151
3104
|
}
|
3152
|
-
|
3153
|
-
if (!themeNames.value.includes(themeName)) {
|
3154
|
-
consoleWarn(`Theme "${themeName}" not found on the Vuetify theme instance`);
|
3155
|
-
return;
|
3156
|
-
}
|
3157
|
-
name.value = themeName;
|
3158
|
-
}
|
3159
|
-
function cycle() {
|
3160
|
-
let themeArray = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : themeNames.value;
|
3161
|
-
const currentIndex = themeArray.indexOf(name.value);
|
3162
|
-
const nextIndex = currentIndex === -1 ? 0 : (currentIndex + 1) % themeArray.length;
|
3163
|
-
change(themeArray[nextIndex]);
|
3164
|
-
}
|
3165
|
-
function toggle() {
|
3166
|
-
let themeArray = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['light', 'dark'];
|
3167
|
-
cycle(themeArray);
|
3168
|
-
}
|
3169
|
-
const globalName = new Proxy(name, {
|
3170
|
-
get(target, prop) {
|
3171
|
-
return target[prop];
|
3172
|
-
},
|
3173
|
-
set(target, prop, val) {
|
3174
|
-
if (prop === 'value') {
|
3175
|
-
deprecate(`theme.global.name.value = ${val}`, `theme.change('${val}')`);
|
3176
|
-
}
|
3177
|
-
// @ts-expect-error
|
3178
|
-
target[prop] = val;
|
3179
|
-
return true;
|
3180
|
-
}
|
3181
|
-
});
|
3105
|
+
const themeClasses = vue.toRef(() => parsedOptions.isDisabled ? undefined : `v-theme--${name.value}`);
|
3182
3106
|
return {
|
3183
3107
|
install,
|
3184
|
-
change,
|
3185
|
-
cycle,
|
3186
|
-
toggle,
|
3187
3108
|
isDisabled: parsedOptions.isDisabled,
|
3188
3109
|
name,
|
3189
3110
|
themes,
|
3190
3111
|
current,
|
3191
3112
|
computedThemes,
|
3192
|
-
prefix: parsedOptions.prefix,
|
3193
3113
|
themeClasses,
|
3194
3114
|
styles,
|
3195
3115
|
global: {
|
3196
|
-
name
|
3116
|
+
name,
|
3197
3117
|
current
|
3198
3118
|
}
|
3199
3119
|
};
|
@@ -3204,7 +3124,7 @@
|
|
3204
3124
|
if (!theme) throw new Error('Could not find Vuetify theme injection');
|
3205
3125
|
const name = vue.toRef(() => props.theme ?? theme.name.value);
|
3206
3126
|
const current = vue.toRef(() => theme.themes.value[name.value]);
|
3207
|
-
const themeClasses = vue.toRef(() => theme.isDisabled ? undefined :
|
3127
|
+
const themeClasses = vue.toRef(() => theme.isDisabled ? undefined : `v-theme--${name.value}`);
|
3208
3128
|
const newTheme = {
|
3209
3129
|
...theme,
|
3210
3130
|
name,
|
@@ -4308,10 +4228,7 @@
|
|
4308
4228
|
default: 'default',
|
4309
4229
|
validator: v => allowedDensities$1.includes(v)
|
4310
4230
|
},
|
4311
|
-
extended:
|
4312
|
-
type: Boolean,
|
4313
|
-
default: null
|
4314
|
-
},
|
4231
|
+
extended: Boolean,
|
4315
4232
|
extensionHeight: {
|
4316
4233
|
type: [Number, String],
|
4317
4234
|
default: 48
|
@@ -4359,7 +4276,7 @@
|
|
4359
4276
|
const {
|
4360
4277
|
rtlClasses
|
4361
4278
|
} = useRtl();
|
4362
|
-
const isExtended = vue.shallowRef(props.extended
|
4279
|
+
const isExtended = vue.shallowRef(!!(props.extended || slots.extension?.()));
|
4363
4280
|
const contentHeight = vue.computed(() => parseInt(Number(props.height) + (props.density === 'prominent' ? Number(props.height) : 0) - (props.density === 'comfortable' ? 8 : 0) - (props.density === 'compact' ? 16 : 0), 10));
|
4364
4281
|
const extensionHeight = vue.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);
|
4365
4282
|
provideDefaults({
|
@@ -4371,7 +4288,7 @@
|
|
4371
4288
|
const hasTitle = !!(props.title || slots.title);
|
4372
4289
|
const hasImage = !!(slots.image || props.image);
|
4373
4290
|
const extension = slots.extension?.();
|
4374
|
-
isExtended.value = props.extended
|
4291
|
+
isExtended.value = !!(props.extended || extension);
|
4375
4292
|
return vue.createVNode(props.tag, {
|
4376
4293
|
"class": vue.normalizeClass(['v-toolbar', {
|
4377
4294
|
'v-toolbar--absolute': props.absolute,
|
@@ -4754,15 +4671,9 @@
|
|
4754
4671
|
};
|
4755
4672
|
}
|
4756
4673
|
|
4757
|
-
// Types
|
4758
|
-
|
4759
4674
|
const makeVBtnGroupProps = propsFactory({
|
4760
4675
|
baseColor: String,
|
4761
4676
|
divided: Boolean,
|
4762
|
-
direction: {
|
4763
|
-
type: String,
|
4764
|
-
default: 'horizontal'
|
4765
|
-
},
|
4766
4677
|
...makeBorderProps(),
|
4767
4678
|
...makeComponentProps(),
|
4768
4679
|
...makeDensityProps(),
|
@@ -4796,7 +4707,7 @@
|
|
4796
4707
|
} = useRounded(props);
|
4797
4708
|
provideDefaults({
|
4798
4709
|
VBtn: {
|
4799
|
-
height:
|
4710
|
+
height: 'auto',
|
4800
4711
|
baseColor: vue.toRef(() => props.baseColor),
|
4801
4712
|
color: vue.toRef(() => props.color),
|
4802
4713
|
density: vue.toRef(() => props.density),
|
@@ -4806,7 +4717,7 @@
|
|
4806
4717
|
});
|
4807
4718
|
useRender(() => {
|
4808
4719
|
return vue.createVNode(props.tag, {
|
4809
|
-
"class": vue.normalizeClass(['v-btn-group',
|
4720
|
+
"class": vue.normalizeClass(['v-btn-group', {
|
4810
4721
|
'v-btn-group--divided': props.divided
|
4811
4722
|
}, themeClasses.value, borderClasses.value, densityClasses.value, elevationClasses.value, roundedClasses.value, props.class]),
|
4812
4723
|
"style": vue.normalizeStyle(props.style)
|
@@ -5929,8 +5840,8 @@
|
|
5929
5840
|
window.clearTimeout(element._ripple.showTimer);
|
5930
5841
|
}
|
5931
5842
|
let keyboardRipple = false;
|
5932
|
-
function keyboardRippleShow(e
|
5933
|
-
if (!keyboardRipple &&
|
5843
|
+
function keyboardRippleShow(e) {
|
5844
|
+
if (!keyboardRipple && (e.keyCode === keyCodes.enter || e.keyCode === keyCodes.space)) {
|
5934
5845
|
keyboardRipple = true;
|
5935
5846
|
rippleShow(e);
|
5936
5847
|
}
|
@@ -5958,12 +5869,9 @@
|
|
5958
5869
|
el._ripple.enabled = enabled;
|
5959
5870
|
el._ripple.centered = modifiers.center;
|
5960
5871
|
el._ripple.circle = modifiers.circle;
|
5961
|
-
|
5962
|
-
|
5963
|
-
el._ripple.class = bindingValue.class;
|
5872
|
+
if (isObject(value) && value.class) {
|
5873
|
+
el._ripple.class = value.class;
|
5964
5874
|
}
|
5965
|
-
const allowedKeys = bindingValue.keys ?? [keyCodes.enter, keyCodes.space];
|
5966
|
-
el._ripple.keyDownHandler = e => keyboardRippleShow(e, allowedKeys);
|
5967
5875
|
if (enabled && !wasEnabled) {
|
5968
5876
|
if (modifiers.stop) {
|
5969
5877
|
el.addEventListener('touchstart', rippleStop, {
|
@@ -5985,7 +5893,7 @@
|
|
5985
5893
|
el.addEventListener('mousedown', rippleShow);
|
5986
5894
|
el.addEventListener('mouseup', rippleHide);
|
5987
5895
|
el.addEventListener('mouseleave', rippleHide);
|
5988
|
-
el.addEventListener('keydown',
|
5896
|
+
el.addEventListener('keydown', keyboardRippleShow);
|
5989
5897
|
el.addEventListener('keyup', keyboardRippleHide);
|
5990
5898
|
el.addEventListener('blur', focusRippleHide);
|
5991
5899
|
|
@@ -6005,9 +5913,7 @@
|
|
6005
5913
|
el.removeEventListener('touchcancel', rippleHide);
|
6006
5914
|
el.removeEventListener('mouseup', rippleHide);
|
6007
5915
|
el.removeEventListener('mouseleave', rippleHide);
|
6008
|
-
|
6009
|
-
el.removeEventListener('keydown', el._ripple.keyDownHandler);
|
6010
|
-
}
|
5916
|
+
el.removeEventListener('keydown', keyboardRippleShow);
|
6011
5917
|
el.removeEventListener('keyup', keyboardRippleHide);
|
6012
5918
|
el.removeEventListener('dragstart', rippleHide);
|
6013
5919
|
el.removeEventListener('blur', focusRippleHide);
|
@@ -6016,8 +5922,8 @@
|
|
6016
5922
|
updateRipple(el, binding, false);
|
6017
5923
|
}
|
6018
5924
|
function unmounted$4(el) {
|
6019
|
-
removeListeners(el);
|
6020
5925
|
delete el._ripple;
|
5926
|
+
removeListeners(el);
|
6021
5927
|
}
|
6022
5928
|
function updated$1(el, binding) {
|
6023
5929
|
if (binding.value === binding.oldValue) {
|
@@ -6290,31 +6196,6 @@
|
|
6290
6196
|
// Utilities
|
6291
6197
|
const VAlertTitle = createSimpleFunctional('v-alert-title');
|
6292
6198
|
|
6293
|
-
// Utilities
|
6294
|
-
|
6295
|
-
// Types
|
6296
|
-
|
6297
|
-
// Types
|
6298
|
-
|
6299
|
-
// Composables
|
6300
|
-
const makeIconSizeProps = propsFactory({
|
6301
|
-
iconSize: [Number, String],
|
6302
|
-
iconSizes: {
|
6303
|
-
type: Array,
|
6304
|
-
default: () => [['x-small', 10], ['small', 16], ['default', 24], ['large', 28], ['x-large', 32]]
|
6305
|
-
}
|
6306
|
-
}, 'iconSize');
|
6307
|
-
function useIconSizes(props, fallback) {
|
6308
|
-
const iconSize = vue.computed(() => {
|
6309
|
-
const iconSizeMap = new Map(props.iconSizes);
|
6310
|
-
const _iconSize = props.iconSize ?? fallback() ?? 'default';
|
6311
|
-
return iconSizeMap.has(_iconSize) ? iconSizeMap.get(_iconSize) : _iconSize;
|
6312
|
-
});
|
6313
|
-
return {
|
6314
|
-
iconSize
|
6315
|
-
};
|
6316
|
-
}
|
6317
|
-
|
6318
6199
|
// Types
|
6319
6200
|
|
6320
6201
|
const allowedTypes = ['success', 'info', 'warning', 'error'];
|
@@ -6354,7 +6235,6 @@
|
|
6354
6235
|
...makeDensityProps(),
|
6355
6236
|
...makeDimensionProps(),
|
6356
6237
|
...makeElevationProps(),
|
6357
|
-
...makeIconSizeProps(),
|
6358
6238
|
...makeLocationProps(),
|
6359
6239
|
...makePositionProps(),
|
6360
6240
|
...makeRoundedProps(),
|
@@ -6382,9 +6262,6 @@
|
|
6382
6262
|
if (!props.type) return props.icon;
|
6383
6263
|
return props.icon ?? `$${props.type}`;
|
6384
6264
|
});
|
6385
|
-
const {
|
6386
|
-
iconSize
|
6387
|
-
} = useIconSizes(props, () => props.prominent ? 44 : 28);
|
6388
6265
|
const {
|
6389
6266
|
themeClasses
|
6390
6267
|
} = provideTheme(props);
|
@@ -6432,11 +6309,6 @@
|
|
6432
6309
|
const hasPrepend = !!(slots.prepend || icon.value);
|
6433
6310
|
const hasTitle = !!(slots.title || props.title);
|
6434
6311
|
const hasClose = !!(slots.close || props.closable);
|
6435
|
-
const iconProps = {
|
6436
|
-
density: props.density,
|
6437
|
-
icon: icon.value,
|
6438
|
-
size: iconSize.value
|
6439
|
-
};
|
6440
6312
|
return isActive.value && vue.createVNode(props.tag, {
|
6441
6313
|
"class": vue.normalizeClass(['v-alert', props.border && {
|
6442
6314
|
'v-alert--border': !!props.border,
|
@@ -6454,14 +6326,19 @@
|
|
6454
6326
|
}, null), hasPrepend && vue.createElementVNode("div", {
|
6455
6327
|
"key": "prepend",
|
6456
6328
|
"class": "v-alert__prepend"
|
6457
|
-
}, [!slots.prepend ? vue.createVNode(VIcon,
|
6458
|
-
"key": "prepend-icon"
|
6459
|
-
|
6329
|
+
}, [!slots.prepend ? vue.createVNode(VIcon, {
|
6330
|
+
"key": "prepend-icon",
|
6331
|
+
"density": props.density,
|
6332
|
+
"icon": icon.value,
|
6333
|
+
"size": props.prominent ? 44 : 28
|
6334
|
+
}, null) : vue.createVNode(VDefaultsProvider, {
|
6460
6335
|
"key": "prepend-defaults",
|
6461
6336
|
"disabled": !icon.value,
|
6462
6337
|
"defaults": {
|
6463
6338
|
VIcon: {
|
6464
|
-
|
6339
|
+
density: props.density,
|
6340
|
+
icon: icon.value,
|
6341
|
+
size: props.prominent ? 44 : 28
|
6465
6342
|
}
|
6466
6343
|
}
|
6467
6344
|
}, slots.prepend)]), vue.createElementVNode("div", {
|
@@ -7986,7 +7863,6 @@
|
|
7986
7863
|
const VSlideGroupSymbol = Symbol.for('vuetify:v-slide-group');
|
7987
7864
|
const makeVSlideGroupProps = propsFactory({
|
7988
7865
|
centerActive: Boolean,
|
7989
|
-
contentClass: null,
|
7990
7866
|
direction: {
|
7991
7867
|
type: String,
|
7992
7868
|
default: 'horizontal'
|
@@ -8299,7 +8175,7 @@
|
|
8299
8175
|
})]), vue.createElementVNode("div", {
|
8300
8176
|
"key": "container",
|
8301
8177
|
"ref": containerRef,
|
8302
|
-
"class":
|
8178
|
+
"class": "v-slide-group__container",
|
8303
8179
|
"onScroll": onScroll
|
8304
8180
|
}, [vue.createElementVNode("div", {
|
8305
8181
|
"ref": contentRef,
|
@@ -8662,85 +8538,16 @@
|
|
8662
8538
|
}
|
8663
8539
|
});
|
8664
8540
|
|
8665
|
-
const makeVDividerProps = propsFactory({
|
8666
|
-
color: String,
|
8667
|
-
inset: Boolean,
|
8668
|
-
length: [Number, String],
|
8669
|
-
opacity: [Number, String],
|
8670
|
-
thickness: [Number, String],
|
8671
|
-
vertical: Boolean,
|
8672
|
-
...makeComponentProps(),
|
8673
|
-
...makeThemeProps()
|
8674
|
-
}, 'VDivider');
|
8675
|
-
const VDivider = genericComponent()({
|
8676
|
-
name: 'VDivider',
|
8677
|
-
props: makeVDividerProps(),
|
8678
|
-
setup(props, _ref) {
|
8679
|
-
let {
|
8680
|
-
attrs,
|
8681
|
-
slots
|
8682
|
-
} = _ref;
|
8683
|
-
const {
|
8684
|
-
themeClasses
|
8685
|
-
} = provideTheme(props);
|
8686
|
-
const {
|
8687
|
-
textColorClasses,
|
8688
|
-
textColorStyles
|
8689
|
-
} = useTextColor(() => props.color);
|
8690
|
-
const dividerStyles = vue.computed(() => {
|
8691
|
-
const styles = {};
|
8692
|
-
if (props.length) {
|
8693
|
-
styles[props.vertical ? 'height' : 'width'] = convertToUnit(props.length);
|
8694
|
-
}
|
8695
|
-
if (props.thickness) {
|
8696
|
-
styles[props.vertical ? 'borderRightWidth' : 'borderTopWidth'] = convertToUnit(props.thickness);
|
8697
|
-
}
|
8698
|
-
return styles;
|
8699
|
-
});
|
8700
|
-
useRender(() => {
|
8701
|
-
const divider = vue.createElementVNode("hr", {
|
8702
|
-
"class": vue.normalizeClass([{
|
8703
|
-
'v-divider': true,
|
8704
|
-
'v-divider--inset': props.inset,
|
8705
|
-
'v-divider--vertical': props.vertical
|
8706
|
-
}, themeClasses.value, textColorClasses.value, props.class]),
|
8707
|
-
"style": vue.normalizeStyle([dividerStyles.value, textColorStyles.value, {
|
8708
|
-
'--v-border-opacity': props.opacity
|
8709
|
-
}, props.style]),
|
8710
|
-
"aria-orientation": !attrs.role || attrs.role === 'separator' ? props.vertical ? 'vertical' : 'horizontal' : undefined,
|
8711
|
-
"role": `${attrs.role || 'separator'}`
|
8712
|
-
}, null);
|
8713
|
-
if (!slots.default) return divider;
|
8714
|
-
return vue.createElementVNode("div", {
|
8715
|
-
"class": vue.normalizeClass(['v-divider__wrapper', {
|
8716
|
-
'v-divider__wrapper--vertical': props.vertical,
|
8717
|
-
'v-divider__wrapper--inset': props.inset
|
8718
|
-
}])
|
8719
|
-
}, [divider, vue.createElementVNode("div", {
|
8720
|
-
"class": "v-divider__content"
|
8721
|
-
}, [slots.default()]), divider]);
|
8722
|
-
});
|
8723
|
-
return {};
|
8724
|
-
}
|
8725
|
-
});
|
8726
|
-
|
8727
8541
|
// Utilities
|
8728
8542
|
|
8729
8543
|
// List
|
8730
8544
|
const ListKey = Symbol.for('vuetify:list');
|
8731
8545
|
function createList() {
|
8732
|
-
let {
|
8733
|
-
filterable
|
8734
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
8735
|
-
filterable: false
|
8736
|
-
};
|
8737
8546
|
const parent = vue.inject(ListKey, {
|
8738
|
-
filterable: false,
|
8739
8547
|
hasPrepend: vue.shallowRef(false),
|
8740
8548
|
updateHasPrepend: () => null
|
8741
8549
|
});
|
8742
8550
|
const data = {
|
8743
|
-
filterable: parent.filterable || filterable,
|
8744
8551
|
hasPrepend: vue.shallowRef(false),
|
8745
8552
|
updateHasPrepend: value => {
|
8746
8553
|
if (value) data.hasPrepend.value = value;
|
@@ -9692,9 +9499,6 @@
|
|
9692
9499
|
roundedClasses
|
9693
9500
|
} = useRounded(roundedProps);
|
9694
9501
|
const lineClasses = vue.toRef(() => props.lines ? `v-list-item--${props.lines}-line` : undefined);
|
9695
|
-
const rippleOptions = vue.toRef(() => props.ripple !== undefined && !!props.ripple && list?.filterable ? {
|
9696
|
-
keys: [keyCodes.enter]
|
9697
|
-
} : props.ripple);
|
9698
9502
|
const slotProps = vue.computed(() => ({
|
9699
9503
|
isActive: isActive.value,
|
9700
9504
|
select,
|
@@ -9719,9 +9523,8 @@
|
|
9719
9523
|
function onKeyDown(e) {
|
9720
9524
|
const target = e.target;
|
9721
9525
|
if (['INPUT', 'TEXTAREA'].includes(target.tagName)) return;
|
9722
|
-
if (e.key === 'Enter' || e.key === ' '
|
9526
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
9723
9527
|
e.preventDefault();
|
9724
|
-
e.stopPropagation();
|
9725
9528
|
e.target.dispatchEvent(new MouseEvent('click', e));
|
9726
9529
|
}
|
9727
9530
|
}
|
@@ -9831,7 +9634,7 @@
|
|
9831
9634
|
}), vue.createElementVNode("div", {
|
9832
9635
|
"class": "v-list-item__spacer"
|
9833
9636
|
}, null)])]
|
9834
|
-
}), [[Ripple, isClickable.value &&
|
9637
|
+
}), [[Ripple, isClickable.value && props.ripple]]);
|
9835
9638
|
});
|
9836
9639
|
return {
|
9837
9640
|
activate,
|
@@ -9886,6 +9689,68 @@
|
|
9886
9689
|
}
|
9887
9690
|
});
|
9888
9691
|
|
9692
|
+
const makeVDividerProps = propsFactory({
|
9693
|
+
color: String,
|
9694
|
+
inset: Boolean,
|
9695
|
+
length: [Number, String],
|
9696
|
+
opacity: [Number, String],
|
9697
|
+
thickness: [Number, String],
|
9698
|
+
vertical: Boolean,
|
9699
|
+
...makeComponentProps(),
|
9700
|
+
...makeThemeProps()
|
9701
|
+
}, 'VDivider');
|
9702
|
+
const VDivider = genericComponent()({
|
9703
|
+
name: 'VDivider',
|
9704
|
+
props: makeVDividerProps(),
|
9705
|
+
setup(props, _ref) {
|
9706
|
+
let {
|
9707
|
+
attrs,
|
9708
|
+
slots
|
9709
|
+
} = _ref;
|
9710
|
+
const {
|
9711
|
+
themeClasses
|
9712
|
+
} = provideTheme(props);
|
9713
|
+
const {
|
9714
|
+
textColorClasses,
|
9715
|
+
textColorStyles
|
9716
|
+
} = useTextColor(() => props.color);
|
9717
|
+
const dividerStyles = vue.computed(() => {
|
9718
|
+
const styles = {};
|
9719
|
+
if (props.length) {
|
9720
|
+
styles[props.vertical ? 'height' : 'width'] = convertToUnit(props.length);
|
9721
|
+
}
|
9722
|
+
if (props.thickness) {
|
9723
|
+
styles[props.vertical ? 'borderRightWidth' : 'borderTopWidth'] = convertToUnit(props.thickness);
|
9724
|
+
}
|
9725
|
+
return styles;
|
9726
|
+
});
|
9727
|
+
useRender(() => {
|
9728
|
+
const divider = vue.createElementVNode("hr", {
|
9729
|
+
"class": vue.normalizeClass([{
|
9730
|
+
'v-divider': true,
|
9731
|
+
'v-divider--inset': props.inset,
|
9732
|
+
'v-divider--vertical': props.vertical
|
9733
|
+
}, themeClasses.value, textColorClasses.value, props.class]),
|
9734
|
+
"style": vue.normalizeStyle([dividerStyles.value, textColorStyles.value, {
|
9735
|
+
'--v-border-opacity': props.opacity
|
9736
|
+
}, props.style]),
|
9737
|
+
"aria-orientation": !attrs.role || attrs.role === 'separator' ? props.vertical ? 'vertical' : 'horizontal' : undefined,
|
9738
|
+
"role": `${attrs.role || 'separator'}`
|
9739
|
+
}, null);
|
9740
|
+
if (!slots.default) return divider;
|
9741
|
+
return vue.createElementVNode("div", {
|
9742
|
+
"class": vue.normalizeClass(['v-divider__wrapper', {
|
9743
|
+
'v-divider__wrapper--vertical': props.vertical,
|
9744
|
+
'v-divider__wrapper--inset': props.inset
|
9745
|
+
}])
|
9746
|
+
}, [divider, vue.createElementVNode("div", {
|
9747
|
+
"class": "v-divider__content"
|
9748
|
+
}, [slots.default()]), divider]);
|
9749
|
+
});
|
9750
|
+
return {};
|
9751
|
+
}
|
9752
|
+
});
|
9753
|
+
|
9889
9754
|
// Types
|
9890
9755
|
|
9891
9756
|
const makeVListChildrenProps = propsFactory({
|
@@ -10154,7 +10019,6 @@
|
|
10154
10019
|
activeClass: String,
|
10155
10020
|
bgColor: String,
|
10156
10021
|
disabled: Boolean,
|
10157
|
-
filterable: Boolean,
|
10158
10022
|
expandIcon: IconValue,
|
10159
10023
|
collapseIcon: IconValue,
|
10160
10024
|
lines: {
|
@@ -10238,9 +10102,7 @@
|
|
10238
10102
|
const activeColor = vue.toRef(() => props.activeColor);
|
10239
10103
|
const baseColor = vue.toRef(() => props.baseColor);
|
10240
10104
|
const color = vue.toRef(() => props.color);
|
10241
|
-
createList(
|
10242
|
-
filterable: props.filterable
|
10243
|
-
});
|
10105
|
+
createList();
|
10244
10106
|
provideDefaults({
|
10245
10107
|
VListGroup: {
|
10246
10108
|
activeColor,
|
@@ -11923,7 +11785,6 @@
|
|
11923
11785
|
// disableKeys: Boolean,
|
11924
11786
|
id: String,
|
11925
11787
|
submenu: Boolean,
|
11926
|
-
disableInitialFocus: Boolean,
|
11927
11788
|
...omit(makeVOverlayProps({
|
11928
11789
|
closeDelay: 250,
|
11929
11790
|
closeOnContentClick: true,
|
@@ -11998,7 +11859,7 @@
|
|
11998
11859
|
vue.watch(isActive, val => {
|
11999
11860
|
if (val) {
|
12000
11861
|
parent?.register();
|
12001
|
-
if (IN_BROWSER
|
11862
|
+
if (IN_BROWSER) {
|
12002
11863
|
document.addEventListener('focusin', onFocusIn, {
|
12003
11864
|
once: true
|
12004
11865
|
});
|
@@ -12818,12 +12679,7 @@
|
|
12818
12679
|
}
|
12819
12680
|
function calculateOffset(index) {
|
12820
12681
|
index = clamp(index, 0, items.value.length - 1);
|
12821
|
-
|
12822
|
-
const fraction = index % 1;
|
12823
|
-
const next = whole + 1;
|
12824
|
-
const wholeOffset = offsets[whole] || 0;
|
12825
|
-
const nextOffset = offsets[next] || wholeOffset;
|
12826
|
-
return wholeOffset + (nextOffset - wholeOffset) * fraction;
|
12682
|
+
return offsets[index] || 0;
|
12827
12683
|
}
|
12828
12684
|
function calculateIndex(scrollTop) {
|
12829
12685
|
return binaryClosest(offsets, scrollTop);
|
@@ -13177,7 +13033,6 @@
|
|
13177
13033
|
},
|
13178
13034
|
openOnClear: Boolean,
|
13179
13035
|
itemColor: String,
|
13180
|
-
noAutoScroll: Boolean,
|
13181
13036
|
...makeItemsProps({
|
13182
13037
|
itemChildren: false
|
13183
13038
|
})
|
@@ -13392,7 +13247,7 @@
|
|
13392
13247
|
vue.watch(menu, () => {
|
13393
13248
|
if (!props.hideSelected && menu.value && model.value.length) {
|
13394
13249
|
const index = displayItems.value.findIndex(item => model.value.some(s => (props.valueComparator || deepEqual)(s.value, item.value)));
|
13395
|
-
IN_BROWSER &&
|
13250
|
+
IN_BROWSER && window.requestAnimationFrame(() => {
|
13396
13251
|
index >= 0 && vVirtualScrollRef.value?.scrollToIndex(index);
|
13397
13252
|
});
|
13398
13253
|
}
|
@@ -13485,22 +13340,6 @@
|
|
13485
13340
|
key: item.value,
|
13486
13341
|
onClick: () => select(item, null)
|
13487
13342
|
});
|
13488
|
-
if (item.raw.type === 'divider') {
|
13489
|
-
return slots.divider?.({
|
13490
|
-
props: item.raw,
|
13491
|
-
index
|
13492
|
-
}) ?? vue.createVNode(VDivider, vue.mergeProps(item.props, {
|
13493
|
-
"key": `divider-${index}`
|
13494
|
-
}), null);
|
13495
|
-
}
|
13496
|
-
if (item.raw.type === 'subheader') {
|
13497
|
-
return slots.subheader?.({
|
13498
|
-
props: item.raw,
|
13499
|
-
index
|
13500
|
-
}) ?? vue.createVNode(VListSubheader, vue.mergeProps(item.props, {
|
13501
|
-
"key": `subheader-${index}`
|
13502
|
-
}), null);
|
13503
|
-
}
|
13504
13343
|
return slots.item?.({
|
13505
13344
|
item,
|
13506
13345
|
index,
|
@@ -13661,9 +13500,6 @@
|
|
13661
13500
|
let match = -1;
|
13662
13501
|
if ((query || customFiltersLength > 0) && !options?.noFilter) {
|
13663
13502
|
if (typeof item === 'object') {
|
13664
|
-
if (['divider', 'subheader'].includes(item.raw?.type)) {
|
13665
|
-
continue;
|
13666
|
-
}
|
13667
13503
|
const filterKeys = keys || Object.keys(transformed);
|
13668
13504
|
for (const key of filterKeys) {
|
13669
13505
|
const value = getPropertyFromItem(transformed, key);
|
@@ -13866,7 +13702,7 @@
|
|
13866
13702
|
menu.value = !menu.value;
|
13867
13703
|
}
|
13868
13704
|
function onListKeydown(e) {
|
13869
|
-
if (
|
13705
|
+
if (e.key !== ' ' && checkPrintable(e)) {
|
13870
13706
|
vTextFieldRef.value?.focus();
|
13871
13707
|
}
|
13872
13708
|
}
|
@@ -14071,7 +13907,6 @@
|
|
14071
13907
|
}, props.menuProps), {
|
14072
13908
|
default: () => [hasList && vue.createVNode(VList, vue.mergeProps({
|
14073
13909
|
"ref": listRef,
|
14074
|
-
"filterable": true,
|
14075
13910
|
"selected": selectedValues.value,
|
14076
13911
|
"selectStrategy": props.multiple ? 'independent' : 'single-independent',
|
14077
13912
|
"onMousedown": e => e.preventDefault(),
|
@@ -14103,22 +13938,6 @@
|
|
14103
13938
|
active: highlightFirst.value && index === 0 ? true : undefined,
|
14104
13939
|
onClick: () => select(item, null)
|
14105
13940
|
});
|
14106
|
-
if (item.raw.type === 'divider') {
|
14107
|
-
return slots.divider?.({
|
14108
|
-
props: item.raw,
|
14109
|
-
index
|
14110
|
-
}) ?? vue.createVNode(VDivider, vue.mergeProps(item.props, {
|
14111
|
-
"key": `divider-${index}`
|
14112
|
-
}), null);
|
14113
|
-
}
|
14114
|
-
if (item.raw.type === 'subheader') {
|
14115
|
-
return slots.subheader?.({
|
14116
|
-
props: item.raw,
|
14117
|
-
index
|
14118
|
-
}) ?? vue.createVNode(VListSubheader, vue.mergeProps(item.props, {
|
14119
|
-
"key": `subheader-${index}`
|
14120
|
-
}), null);
|
14121
|
-
}
|
14122
13941
|
return slots.item?.({
|
14123
13942
|
item,
|
14124
13943
|
index,
|
@@ -14263,8 +14082,7 @@
|
|
14263
14082
|
...makeThemeProps(),
|
14264
14083
|
...makeTransitionProps({
|
14265
14084
|
transition: 'scale-rotate-transition'
|
14266
|
-
})
|
14267
|
-
...makeDimensionProps()
|
14085
|
+
})
|
14268
14086
|
}, 'VBadge');
|
14269
14087
|
const VBadge = genericComponent()({
|
14270
14088
|
name: 'VBadge',
|
@@ -14294,9 +14112,6 @@
|
|
14294
14112
|
const base = props.floating ? props.dot ? 2 : 4 : props.dot ? 8 : 12;
|
14295
14113
|
return base + (['top', 'bottom'].includes(side) ? Number(props.offsetY ?? 0) : ['left', 'right'].includes(side) ? Number(props.offsetX ?? 0) : 0);
|
14296
14114
|
});
|
14297
|
-
const {
|
14298
|
-
dimensionStyles
|
14299
|
-
} = useDimension(props);
|
14300
14115
|
useRender(() => {
|
14301
14116
|
const value = Number(props.content);
|
14302
14117
|
const content = !props.max || isNaN(value) ? props.content : value <= Number(props.max) ? value : `${props.max}+`;
|
@@ -14318,7 +14133,7 @@
|
|
14318
14133
|
}, {
|
14319
14134
|
default: () => [vue.withDirectives(vue.createElementVNode("span", vue.mergeProps({
|
14320
14135
|
"class": ['v-badge__badge', themeClasses.value, backgroundColorClasses.value, roundedClasses.value, textColorClasses.value],
|
14321
|
-
"style": [backgroundColorStyles.value, textColorStyles.value,
|
14136
|
+
"style": [backgroundColorStyles.value, textColorStyles.value, props.inline ? {} : locationStyles.value],
|
14322
14137
|
"aria-atomic": "true",
|
14323
14138
|
"aria-label": t(props.label, value),
|
14324
14139
|
"aria-live": "polite",
|
@@ -17727,13 +17542,13 @@
|
|
17727
17542
|
return null;
|
17728
17543
|
}
|
17729
17544
|
const sundayJanuarySecond2000 = new Date(2000, 0, 2);
|
17730
|
-
function getWeekdays(locale, firstDayOfWeek
|
17545
|
+
function getWeekdays(locale, firstDayOfWeek) {
|
17731
17546
|
const daysFromSunday = firstDayOfWeek ?? weekInfo(locale)?.firstDay ?? 0;
|
17732
17547
|
return createRange(7).map(i => {
|
17733
17548
|
const weekday = new Date(sundayJanuarySecond2000);
|
17734
17549
|
weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i);
|
17735
17550
|
return new Intl.DateTimeFormat(locale, {
|
17736
|
-
weekday:
|
17551
|
+
weekday: 'narrow'
|
17737
17552
|
}).format(weekday);
|
17738
17553
|
});
|
17739
17554
|
}
|
@@ -18197,9 +18012,9 @@
|
|
18197
18012
|
getDiff(date, comparing, unit) {
|
18198
18013
|
return getDiff(date, comparing, unit);
|
18199
18014
|
}
|
18200
|
-
getWeekdays(firstDayOfWeek
|
18015
|
+
getWeekdays(firstDayOfWeek) {
|
18201
18016
|
const firstDay = firstDayOfWeek !== undefined ? Number(firstDayOfWeek) : undefined;
|
18202
|
-
return getWeekdays(this.locale, firstDay
|
18017
|
+
return getWeekdays(this.locale, firstDay);
|
18203
18018
|
}
|
18204
18019
|
getYear(date) {
|
18205
18020
|
return getYear(date);
|
@@ -18554,7 +18369,6 @@
|
|
18554
18369
|
_search.value = val ?? '';
|
18555
18370
|
if (!props.multiple && !hasSelectionSlot.value) {
|
18556
18371
|
model.value = [transformItem$3(props, val)];
|
18557
|
-
vue.nextTick(() => vVirtualScrollRef.value?.scrollToIndex(0));
|
18558
18372
|
}
|
18559
18373
|
if (val && props.multiple && props.delimiters?.length) {
|
18560
18374
|
const values = val.split(new RegExp(`(?:${props.delimiters.join('|')})+`));
|
@@ -18635,7 +18449,7 @@
|
|
18635
18449
|
menu.value = !menu.value;
|
18636
18450
|
}
|
18637
18451
|
function onListKeydown(e) {
|
18638
|
-
if (
|
18452
|
+
if (e.key !== ' ' && checkPrintable(e)) {
|
18639
18453
|
vTextFieldRef.value?.focus();
|
18640
18454
|
}
|
18641
18455
|
}
|
@@ -18840,7 +18654,6 @@
|
|
18840
18654
|
}, props.menuProps), {
|
18841
18655
|
default: () => [hasList && vue.createVNode(VList, vue.mergeProps({
|
18842
18656
|
"ref": listRef,
|
18843
|
-
"filterable": true,
|
18844
18657
|
"selected": selectedValues.value,
|
18845
18658
|
"selectStrategy": props.multiple ? 'independent' : 'single-independent',
|
18846
18659
|
"onMousedown": e => e.preventDefault(),
|
@@ -18872,22 +18685,6 @@
|
|
18872
18685
|
active: highlightFirst.value && index === 0 ? true : undefined,
|
18873
18686
|
onClick: () => select(item, null)
|
18874
18687
|
});
|
18875
|
-
if (item.raw.type === 'divider') {
|
18876
|
-
return slots.divider?.({
|
18877
|
-
props: item.raw,
|
18878
|
-
index
|
18879
|
-
}) ?? vue.createVNode(VDivider, vue.mergeProps(item.props, {
|
18880
|
-
"key": `divider-${index}`
|
18881
|
-
}), null);
|
18882
|
-
}
|
18883
|
-
if (item.raw.type === 'subheader') {
|
18884
|
-
return slots.subheader?.({
|
18885
|
-
props: item.raw,
|
18886
|
-
index
|
18887
|
-
}) ?? vue.createVNode(VListSubheader, vue.mergeProps(item.props, {
|
18888
|
-
"key": `subheader-${index}`
|
18889
|
-
}), null);
|
18890
|
-
}
|
18891
18688
|
return slots.item?.({
|
18892
18689
|
item,
|
18893
18690
|
index,
|
@@ -20770,7 +20567,6 @@
|
|
20770
20567
|
color: String,
|
20771
20568
|
disableSort: Boolean,
|
20772
20569
|
fixedHeader: Boolean,
|
20773
|
-
lastFixed: Boolean,
|
20774
20570
|
multiSort: Boolean,
|
20775
20571
|
sortAscIcon: {
|
20776
20572
|
type: IconValue,
|
@@ -20817,11 +20613,10 @@
|
|
20817
20613
|
loaderClasses
|
20818
20614
|
} = useLoader(props);
|
20819
20615
|
function getFixedStyles(column, y) {
|
20820
|
-
if (!(props.sticky || props.fixedHeader) && !
|
20616
|
+
if (!(props.sticky || props.fixedHeader) && !column.fixed) return undefined;
|
20821
20617
|
return {
|
20822
20618
|
position: 'sticky',
|
20823
|
-
left: column.fixed
|
20824
|
-
right: column.lastFixed ? convertToUnit(column.fixedOffset ?? 0) : undefined,
|
20619
|
+
left: column.fixed ? convertToUnit(column.fixedOffset) : undefined,
|
20825
20620
|
top: props.sticky || props.fixedHeader ? `calc(var(--v-table-header-height) * ${y})` : undefined
|
20826
20621
|
};
|
20827
20622
|
}
|
@@ -21337,18 +21132,11 @@
|
|
21337
21132
|
}
|
21338
21133
|
});
|
21339
21134
|
|
21340
|
-
// Types
|
21341
|
-
|
21342
21135
|
const makeVTableProps = propsFactory({
|
21343
21136
|
fixedHeader: Boolean,
|
21344
21137
|
fixedFooter: Boolean,
|
21345
21138
|
height: [Number, String],
|
21346
21139
|
hover: Boolean,
|
21347
|
-
striped: {
|
21348
|
-
type: String,
|
21349
|
-
default: null,
|
21350
|
-
validator: v => ['even', 'odd'].includes(v)
|
21351
|
-
},
|
21352
21140
|
...makeComponentProps(),
|
21353
21141
|
...makeDensityProps(),
|
21354
21142
|
...makeTagProps(),
|
@@ -21375,9 +21163,7 @@
|
|
21375
21163
|
'v-table--fixed-footer': props.fixedFooter,
|
21376
21164
|
'v-table--has-top': !!slots.top,
|
21377
21165
|
'v-table--has-bottom': !!slots.bottom,
|
21378
|
-
'v-table--hover': props.hover
|
21379
|
-
'v-table--striped-even': props.striped === 'even',
|
21380
|
-
'v-table--striped-odd': props.striped === 'odd'
|
21166
|
+
'v-table--hover': props.hover
|
21381
21167
|
}, themeClasses.value, densityClasses.value, props.class]),
|
21382
21168
|
"style": vue.normalizeStyle(props.style)
|
21383
21169
|
}, {
|
@@ -22552,8 +22338,7 @@
|
|
22552
22338
|
firstDayOfWeek: {
|
22553
22339
|
type: [Number, String],
|
22554
22340
|
default: undefined
|
22555
|
-
}
|
22556
|
-
weekdayFormat: String
|
22341
|
+
}
|
22557
22342
|
}, 'calendar');
|
22558
22343
|
function useCalendar(props) {
|
22559
22344
|
const adapter = useDate();
|
@@ -22794,7 +22579,7 @@
|
|
22794
22579
|
"ref": daysRef,
|
22795
22580
|
"key": daysInMonth.value[0].date?.toString(),
|
22796
22581
|
"class": "v-date-picker-month__days"
|
22797
|
-
}, [!props.hideWeekdays && adapter.getWeekdays(props.firstDayOfWeek
|
22582
|
+
}, [!props.hideWeekdays && adapter.getWeekdays(props.firstDayOfWeek).map(weekDay => vue.createElementVNode("div", {
|
22798
22583
|
"class": vue.normalizeClass(['v-date-picker-month__day', 'v-date-picker-month__weekday'])
|
22799
22584
|
}, [weekDay])), daysInMonth.value.map((item, i) => {
|
22800
22585
|
const slotProps = {
|
@@ -23299,9 +23084,7 @@
|
|
23299
23084
|
"max": maxDate.value,
|
23300
23085
|
"year": year.value,
|
23301
23086
|
"allowedMonths": allowedMonths
|
23302
|
-
}), {
|
23303
|
-
...pick(slots, ['month'])
|
23304
|
-
}) : viewMode.value === 'year' ? vue.createVNode(VDatePickerYears, vue.mergeProps({
|
23087
|
+
}), null) : viewMode.value === 'year' ? vue.createVNode(VDatePickerYears, vue.mergeProps({
|
23305
23088
|
"key": "date-picker-years"
|
23306
23089
|
}, datePickerYearsProps, {
|
23307
23090
|
"modelValue": year.value,
|
@@ -23309,9 +23092,7 @@
|
|
23309
23092
|
"min": minDate.value,
|
23310
23093
|
"max": maxDate.value,
|
23311
23094
|
"allowedYears": allowedYears
|
23312
|
-
}), {
|
23313
|
-
...pick(slots, ['year'])
|
23314
|
-
}) : vue.createVNode(VDatePickerMonth, vue.mergeProps({
|
23095
|
+
}), null) : vue.createVNode(VDatePickerMonth, vue.mergeProps({
|
23315
23096
|
"key": "date-picker-month"
|
23316
23097
|
}, datePickerMonthProps, {
|
23317
23098
|
"modelValue": model.value,
|
@@ -23322,9 +23103,7 @@
|
|
23322
23103
|
"onUpdate:year": [$event => year.value = $event, onUpdateYear],
|
23323
23104
|
"min": minDate.value,
|
23324
23105
|
"max": maxDate.value
|
23325
|
-
}),
|
23326
|
-
...pick(slots, ['day'])
|
23327
|
-
})]
|
23106
|
+
}), null)]
|
23328
23107
|
})]),
|
23329
23108
|
actions: slots.actions
|
23330
23109
|
});
|
@@ -24415,9 +24194,6 @@
|
|
24415
24194
|
startStatus.value = status;
|
24416
24195
|
} else if (side === 'end') {
|
24417
24196
|
endStatus.value = status;
|
24418
|
-
} else if (side === 'both') {
|
24419
|
-
startStatus.value = status;
|
24420
|
-
endStatus.value = status;
|
24421
24197
|
}
|
24422
24198
|
}
|
24423
24199
|
function getStatus(side) {
|
@@ -24529,32 +24305,6 @@
|
|
24529
24305
|
}, [renderSide('end', endStatus.value)])]
|
24530
24306
|
});
|
24531
24307
|
});
|
24532
|
-
function reset(side) {
|
24533
|
-
const effectiveSide = side ?? props.side;
|
24534
|
-
setStatus(effectiveSide, 'ok');
|
24535
|
-
vue.nextTick(() => {
|
24536
|
-
setScrollAmount(getScrollSize() - previousScrollSize + getScrollAmount());
|
24537
|
-
if (props.mode !== 'manual') {
|
24538
|
-
vue.nextTick(() => {
|
24539
|
-
window.requestAnimationFrame(() => {
|
24540
|
-
window.requestAnimationFrame(() => {
|
24541
|
-
window.requestAnimationFrame(() => {
|
24542
|
-
if (effectiveSide === 'both') {
|
24543
|
-
intersecting('start');
|
24544
|
-
intersecting('end');
|
24545
|
-
} else {
|
24546
|
-
intersecting(effectiveSide);
|
24547
|
-
}
|
24548
|
-
});
|
24549
|
-
});
|
24550
|
-
});
|
24551
|
-
});
|
24552
|
-
}
|
24553
|
-
});
|
24554
|
-
}
|
24555
|
-
return {
|
24556
|
-
reset
|
24557
|
-
};
|
24558
24308
|
}
|
24559
24309
|
});
|
24560
24310
|
|
@@ -24634,47 +24384,8 @@
|
|
24634
24384
|
}
|
24635
24385
|
});
|
24636
24386
|
|
24637
|
-
|
24638
|
-
|
24639
|
-
...makeComponentProps(),
|
24640
|
-
...makeRoundedProps(),
|
24641
|
-
...makeTagProps({
|
24642
|
-
tag: 'kbd'
|
24643
|
-
}),
|
24644
|
-
...makeThemeProps(),
|
24645
|
-
...makeElevationProps(),
|
24646
|
-
color: String
|
24647
|
-
}, 'VKbd');
|
24648
|
-
const VKbd = genericComponent()({
|
24649
|
-
name: 'VKbd',
|
24650
|
-
props: makeVKbdProps(),
|
24651
|
-
setup(props, _ref) {
|
24652
|
-
let {
|
24653
|
-
slots
|
24654
|
-
} = _ref;
|
24655
|
-
const {
|
24656
|
-
themeClasses
|
24657
|
-
} = provideTheme(props);
|
24658
|
-
const {
|
24659
|
-
borderClasses
|
24660
|
-
} = useBorder(props);
|
24661
|
-
const {
|
24662
|
-
roundedClasses
|
24663
|
-
} = useRounded(props);
|
24664
|
-
const {
|
24665
|
-
backgroundColorClasses,
|
24666
|
-
backgroundColorStyles
|
24667
|
-
} = useBackgroundColor(() => props.color);
|
24668
|
-
const {
|
24669
|
-
elevationClasses
|
24670
|
-
} = useElevation(props);
|
24671
|
-
useRender(() => vue.createVNode(props.tag, {
|
24672
|
-
"class": vue.normalizeClass(['v-kbd', themeClasses.value, backgroundColorClasses.value, borderClasses.value, elevationClasses.value, roundedClasses.value, props.class]),
|
24673
|
-
"style": vue.normalizeStyle([backgroundColorStyles.value, props.style])
|
24674
|
-
}, slots));
|
24675
|
-
return {};
|
24676
|
-
}
|
24677
|
-
});
|
24387
|
+
// Styles
|
24388
|
+
const VKbd = createSimpleFunctional('v-kbd', 'kbd');
|
24678
24389
|
|
24679
24390
|
const makeVLayoutProps = propsFactory({
|
24680
24391
|
...makeComponentProps(),
|
@@ -25512,14 +25223,6 @@
|
|
25512
25223
|
type: Number,
|
25513
25224
|
default: 0
|
25514
25225
|
},
|
25515
|
-
minFractionDigits: {
|
25516
|
-
type: Number,
|
25517
|
-
default: null
|
25518
|
-
},
|
25519
|
-
decimalSeparator: {
|
25520
|
-
type: String,
|
25521
|
-
validator: v => !v || v.length === 1
|
25522
|
-
},
|
25523
25226
|
...omit(makeVTextFieldProps(), ['modelValue', 'validationValue'])
|
25524
25227
|
}, 'VNumberInput');
|
25525
25228
|
const VNumberInput = genericComponent()({
|
@@ -25545,24 +25248,11 @@
|
|
25545
25248
|
const form = useForm(props);
|
25546
25249
|
const controlsDisabled = vue.computed(() => form.isDisabled.value || form.isReadonly.value);
|
25547
25250
|
const isFocused = vue.shallowRef(props.focused);
|
25548
|
-
const {
|
25549
|
-
decimalSeparator: decimalSeparatorFromLocale
|
25550
|
-
} = useLocale();
|
25551
|
-
const decimalSeparator = vue.computed(() => props.decimalSeparator?.[0] || decimalSeparatorFromLocale.value);
|
25552
25251
|
function correctPrecision(val) {
|
25553
25252
|
let precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : props.precision;
|
25554
|
-
let trim = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
25555
25253
|
const fixed = precision == null ? String(val) : val.toFixed(precision);
|
25556
|
-
|
25557
|
-
|
25558
|
-
.replace('.', decimalSeparator.value);
|
25559
|
-
}
|
25560
|
-
if (props.minFractionDigits === null || precision !== null && precision < props.minFractionDigits) {
|
25561
|
-
return fixed.replace('.', decimalSeparator.value);
|
25562
|
-
}
|
25563
|
-
let [baseDigits, fractionDigits] = fixed.split('.');
|
25564
|
-
fractionDigits = (fractionDigits ?? '').padEnd(props.minFractionDigits, '0').replace(new RegExp(`(?<=\\d{${props.minFractionDigits}})0`, 'g'), '');
|
25565
|
-
return [baseDigits, fractionDigits].filter(Boolean).join(decimalSeparator.value);
|
25254
|
+
return isFocused.value ? Number(fixed).toString() // trim zeros
|
25255
|
+
: fixed;
|
25566
25256
|
}
|
25567
25257
|
const model = useProxiedModel(props, 'modelValue', null, val => val ?? null, val => val == null ? val ?? null : clamp(Number(val), props.min, props.max));
|
25568
25258
|
const _inputText = vue.shallowRef(null);
|
@@ -25579,11 +25269,8 @@
|
|
25579
25269
|
if (val === null || val === '') {
|
25580
25270
|
model.value = null;
|
25581
25271
|
_inputText.value = null;
|
25582
|
-
|
25583
|
-
|
25584
|
-
const parsedValue = Number(val.replace(decimalSeparator.value, '.'));
|
25585
|
-
if (!isNaN(parsedValue) && parsedValue <= props.max && parsedValue >= props.min) {
|
25586
|
-
model.value = parsedValue;
|
25272
|
+
} else if (!isNaN(Number(val)) && Number(val) <= props.max && Number(val) >= props.min) {
|
25273
|
+
model.value = Number(val);
|
25587
25274
|
_inputText.value = val;
|
25588
25275
|
}
|
25589
25276
|
}
|
@@ -25620,7 +25307,6 @@
|
|
25620
25307
|
}
|
25621
25308
|
};
|
25622
25309
|
vue.watch(() => props.precision, () => formatInputValue());
|
25623
|
-
vue.watch(() => props.minFractionDigits, () => formatInputValue());
|
25624
25310
|
vue.onMounted(() => {
|
25625
25311
|
clampModel();
|
25626
25312
|
});
|
@@ -25654,24 +25340,24 @@
|
|
25654
25340
|
selectionEnd
|
25655
25341
|
} = inputElement ?? {};
|
25656
25342
|
const potentialNewInputVal = existingTxt ? existingTxt.slice(0, selectionStart) + e.data + existingTxt.slice(selectionEnd) : e.data;
|
25657
|
-
const potentialNewNumber = extractNumber(potentialNewInputVal, props.precision
|
25343
|
+
const potentialNewNumber = extractNumber(potentialNewInputVal, props.precision);
|
25658
25344
|
|
25659
|
-
//
|
25660
|
-
//
|
25661
|
-
//
|
25662
|
-
if (
|
25345
|
+
// Only numbers, "-", "." are allowed
|
25346
|
+
// AND "-", "." are allowed only once
|
25347
|
+
// AND "-" is only allowed at the start
|
25348
|
+
if (!/^-?(\d+(\.\d*)?|(\.\d+)|\d*|\.)$/.test(potentialNewInputVal)) {
|
25663
25349
|
e.preventDefault();
|
25664
25350
|
inputElement.value = potentialNewNumber;
|
25665
25351
|
}
|
25666
25352
|
if (props.precision == null) return;
|
25667
25353
|
|
25668
25354
|
// Ignore decimal digits above precision limit
|
25669
|
-
if (potentialNewInputVal.split(
|
25355
|
+
if (potentialNewInputVal.split('.')[1]?.length > props.precision) {
|
25670
25356
|
e.preventDefault();
|
25671
25357
|
inputElement.value = potentialNewNumber;
|
25672
25358
|
}
|
25673
25359
|
// Ignore decimal separator when precision = 0
|
25674
|
-
if (props.precision === 0 && potentialNewInputVal.includes(
|
25360
|
+
if (props.precision === 0 && potentialNewInputVal.includes('.')) {
|
25675
25361
|
e.preventDefault();
|
25676
25362
|
inputElement.value = potentialNewNumber;
|
25677
25363
|
}
|
@@ -25723,16 +25409,19 @@
|
|
25723
25409
|
if (controlsDisabled.value) return;
|
25724
25410
|
if (!vTextFieldRef.value) return;
|
25725
25411
|
const actualText = vTextFieldRef.value.value;
|
25726
|
-
|
25727
|
-
|
25728
|
-
inputText.value = correctPrecision(clamp(parsedValue, props.min, props.max));
|
25412
|
+
if (actualText && !isNaN(Number(actualText))) {
|
25413
|
+
inputText.value = correctPrecision(clamp(Number(actualText), props.min, props.max));
|
25729
25414
|
} else {
|
25730
25415
|
inputText.value = null;
|
25731
25416
|
}
|
25732
25417
|
}
|
25733
25418
|
function formatInputValue() {
|
25734
25419
|
if (controlsDisabled.value) return;
|
25735
|
-
|
25420
|
+
if (model.value === null || isNaN(model.value)) {
|
25421
|
+
inputText.value = null;
|
25422
|
+
return;
|
25423
|
+
}
|
25424
|
+
inputText.value = props.precision == null ? String(model.value) : model.value.toFixed(props.precision);
|
25736
25425
|
}
|
25737
25426
|
function trimDecimalZeros() {
|
25738
25427
|
if (controlsDisabled.value) return;
|
@@ -25740,7 +25429,7 @@
|
|
25740
25429
|
inputText.value = null;
|
25741
25430
|
return;
|
25742
25431
|
}
|
25743
|
-
inputText.value = model.value.toString()
|
25432
|
+
inputText.value = model.value.toString();
|
25744
25433
|
}
|
25745
25434
|
function onFocus() {
|
25746
25435
|
trimDecimalZeros();
|
@@ -25992,10 +25681,9 @@
|
|
25992
25681
|
e.preventDefault();
|
25993
25682
|
e.stopPropagation();
|
25994
25683
|
const clipboardText = e?.clipboardData?.getData('Text').trim().slice(0, length.value) ?? '';
|
25995
|
-
const finalIndex = clipboardText.length - 1 === -1 ? index : clipboardText.length - 1;
|
25996
25684
|
if (isValidNumber(clipboardText)) return;
|
25997
25685
|
model.value = clipboardText.split('');
|
25998
|
-
inputRef.value?.[
|
25686
|
+
inputRef.value?.[index].blur();
|
25999
25687
|
}
|
26000
25688
|
function reset() {
|
26001
25689
|
model.value = [];
|
@@ -29780,7 +29468,7 @@
|
|
29780
29468
|
};
|
29781
29469
|
});
|
29782
29470
|
}
|
29783
|
-
const version$1 = "3.8.9-
|
29471
|
+
const version$1 = "3.8.9-master.2025-06-12";
|
29784
29472
|
createVuetify$1.version = version$1;
|
29785
29473
|
|
29786
29474
|
// Vue's inject() can only be used in setup
|
@@ -29805,7 +29493,7 @@
|
|
29805
29493
|
...options
|
29806
29494
|
});
|
29807
29495
|
};
|
29808
|
-
const version = "3.8.9-
|
29496
|
+
const version = "3.8.9-master.2025-06-12";
|
29809
29497
|
createVuetify.version = version;
|
29810
29498
|
|
29811
29499
|
exports.blueprints = index;
|