@vuetify/nightly 3.8.9-master.2025-06-17 → 3.8.10-dev.2025-06-18
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 +46 -17
- package/dist/json/attributes.json +3715 -3311
- package/dist/json/importMap-labs.json +20 -16
- package/dist/json/importMap.json +172 -172
- package/dist/json/tags.json +108 -2
- package/dist/json/web-types.json +7670 -6023
- package/dist/vuetify-labs.cjs +760 -187
- package/dist/vuetify-labs.css +5981 -5933
- package/dist/vuetify-labs.d.ts +10425 -3094
- package/dist/vuetify-labs.esm.js +761 -188
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +760 -187
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +485 -172
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +4378 -4330
- package/dist/vuetify.d.ts +2793 -2086
- package/dist/vuetify.esm.js +486 -173
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +485 -172
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +1255 -1233
- 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 +175 -110
- 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.css +3 -0
- package/lib/components/VBtn/VBtn.d.ts +20 -10
- package/lib/components/VBtn/VBtn.sass +3 -0
- 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 +175 -110
- 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 +80 -5
- package/lib/components/VDatePicker/VDatePicker.js +10 -4
- package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
- 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/VKbd/VKbd.css +13 -2
- package/lib/components/VKbd/VKbd.d.ts +221 -0
- package/lib/components/VKbd/VKbd.js +55 -0
- package/lib/components/VKbd/VKbd.js.map +1 -0
- package/lib/components/VKbd/VKbd.sass +2 -1
- package/lib/components/VKbd/_variables.scss +12 -1
- package/lib/components/VKbd/index.d.ts +1 -95
- package/lib/components/VKbd/index.js +1 -4
- package/lib/components/VKbd/index.js.map +1 -1
- 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 +4 -3
- package/lib/components/VList/VListChildren.js.map +1 -1
- package/lib/components/VList/VListGroup.d.ts +10 -0
- package/lib/components/VList/VListGroup.js +2 -2
- package/lib/components/VList/VListGroup.js.map +1 -1
- package/lib/components/VList/VListItem.d.ts +28 -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/VMenu/VMenu.d.ts +13 -0
- package/lib/components/VMenu/VMenu.js +2 -1
- package/lib/components/VMenu/VMenu.js.map +1 -1
- package/lib/components/VNumberInput/VNumberInput.d.ts +114 -89
- package/lib/components/VNumberInput/VNumberInput.js +43 -20
- 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 +204 -118
- 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/VSpeedDial/VSpeedDial.d.ts +13 -0
- 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 +5 -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/locale.d.ts +5 -1
- package/lib/composables/locale.js.map +1 -1
- 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 +97 -29
- 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 +4 -3
- package/lib/entry-bundler.js +1 -1
- package/lib/entry-bundler.js.map +1 -1
- package/lib/framework.d.ts +87 -68
- 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 +51 -38
- package/lib/labs/VTreeview/VTreeview.js +1 -1
- package/lib/labs/VTreeview/VTreeview.js.map +1 -1
- package/lib/labs/VTreeview/VTreeviewChildren.d.ts +35 -0
- package/lib/labs/VTreeview/VTreeviewChildren.js +21 -3
- package/lib/labs/VTreeview/VTreeviewChildren.js.map +1 -1
- package/lib/labs/VTreeview/VTreeviewGroup.d.ts +10 -0
- package/lib/labs/VTreeview/VTreeviewItem.d.ts +20 -10
- package/lib/labs/VTreeview/VTreeviewItem.js +1 -0
- package/lib/labs/VTreeview/VTreeviewItem.js.map +1 -1
- 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 +4 -3
- package/lib/locale/adapters/vue-i18n.js +6 -1
- package/lib/locale/adapters/vue-i18n.js.map +1 -1
- package/lib/locale/adapters/vuetify.js +7 -1
- package/lib/locale/adapters/vuetify.js.map +1 -1
- package/lib/util/globals.d.ts +1 -0
- package/lib/util/globals.js +1 -0
- package/lib/util/globals.js.map +1 -1
- package/lib/util/helpers.d.ts +2 -1
- package/lib/util/helpers.js +12 -7
- package/lib/util/helpers.js.map +1 -1
- package/package.json +9 -7
package/dist/vuetify.esm.js
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
/*!
|
2
|
-
* Vuetify v3.8.
|
2
|
+
* Vuetify v3.8.10-dev.2025-06-18
|
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, createVNode, mergeProps, createElementVNode, normalizeClass, toValue, onBeforeUnmount, watch, readonly, onMounted, useId, onDeactivated, onActivated, onScopeDispose, effectScope, toRaw, normalizeStyle, TransitionGroup, Transition, toRefs, 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, createVNode, mergeProps, createElementVNode, normalizeClass, toValue, onBeforeUnmount, watch, readonly, onMounted, useId, onDeactivated, onActivated, onScopeDispose, effectScope, toRaw, getCurrentScope, normalizeStyle, TransitionGroup, Transition, toRefs, 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
|
const IN_BROWSER = typeof window !== 'undefined';
|
10
10
|
const SUPPORTS_INTERSECTION = IN_BROWSER && 'IntersectionObserver' in window;
|
11
11
|
const SUPPORTS_TOUCH = IN_BROWSER && ('ontouchstart' in window || window.navigator.maxTouchPoints > 0);
|
12
12
|
const SUPPORTS_EYE_DROPPER = IN_BROWSER && 'EyeDropper' in window;
|
13
|
+
const SUPPORTS_MATCH_MEDIA = IN_BROWSER && 'matchMedia' in window && typeof window.matchMedia === 'function';
|
13
14
|
|
14
15
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
15
16
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
@@ -510,18 +511,23 @@ function checkPrintable(e) {
|
|
510
511
|
function isPrimitive(value) {
|
511
512
|
return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean' || typeof value === 'bigint';
|
512
513
|
}
|
513
|
-
function
|
514
|
-
|
514
|
+
function escapeForRegex(sign) {
|
515
|
+
return '\\^$*+?.()|{}[]'.includes(sign) ? `\\${sign}` : sign;
|
516
|
+
}
|
517
|
+
function extractNumber(text, decimalDigitsLimit, decimalSeparator) {
|
518
|
+
const onlyValidCharacters = new RegExp(`[\\d\\-${escapeForRegex(decimalSeparator)}]`);
|
519
|
+
const cleanText = text.split('').filter(x => onlyValidCharacters.test(x)).filter((x, i, all) => i === 0 && /[-]/.test(x) ||
|
515
520
|
// sign allowed at the start
|
516
|
-
x ===
|
521
|
+
x === decimalSeparator && i === all.indexOf(x) ||
|
517
522
|
// decimal separator allowed only once
|
518
523
|
/\d/.test(x)).join('');
|
519
524
|
if (decimalDigitsLimit === 0) {
|
520
|
-
return cleanText.split(
|
525
|
+
return cleanText.split(decimalSeparator)[0];
|
521
526
|
}
|
522
|
-
|
523
|
-
|
524
|
-
|
527
|
+
const decimalPart = new RegExp(`${escapeForRegex(decimalSeparator)}\\d`);
|
528
|
+
if (decimalDigitsLimit !== null && decimalPart.test(cleanText)) {
|
529
|
+
const parts = cleanText.split(decimalSeparator);
|
530
|
+
return [parts[0], parts[1].substring(0, decimalDigitsLimit)].join(decimalSeparator);
|
525
531
|
}
|
526
532
|
return cleanText;
|
527
533
|
}
|
@@ -863,7 +869,7 @@ function APCAcontrast(text, background) {
|
|
863
869
|
// WoB should always return negative value.
|
864
870
|
|
865
871
|
const SAPC = (Ybg ** revBG - Ytxt ** revTXT) * scaleWoB;
|
866
|
-
outputContrast = SAPC > -
|
872
|
+
outputContrast = SAPC > -loClip ? 0.0 : SAPC > -loConThresh ? SAPC - SAPC * loConFactor * loConOffset : SAPC + loConOffset;
|
867
873
|
}
|
868
874
|
return outputContrast * 100;
|
869
875
|
}
|
@@ -2668,6 +2674,10 @@ function createNumberFunction(current, fallback) {
|
|
2668
2674
|
return numberFormat.format(value);
|
2669
2675
|
};
|
2670
2676
|
}
|
2677
|
+
function inferDecimalSeparator(current, fallback) {
|
2678
|
+
const format = createNumberFunction(current, fallback);
|
2679
|
+
return format(0.1).includes(',') ? ',' : '.';
|
2680
|
+
}
|
2671
2681
|
function useProvided(props, prop, provided) {
|
2672
2682
|
const internal = useProxiedModel(props, prop, props[prop] ?? provided.value);
|
2673
2683
|
|
@@ -2690,6 +2700,7 @@ function createProvideFunction(state) {
|
|
2690
2700
|
current,
|
2691
2701
|
fallback,
|
2692
2702
|
messages,
|
2703
|
+
decimalSeparator: toRef(() => inferDecimalSeparator(current, fallback)),
|
2693
2704
|
t: createTranslateFunction(current, fallback, messages),
|
2694
2705
|
n: createNumberFunction(current, fallback),
|
2695
2706
|
provide: createProvideFunction({
|
@@ -2712,6 +2723,7 @@ function createVuetifyAdapter(options) {
|
|
2712
2723
|
current,
|
2713
2724
|
fallback,
|
2714
2725
|
messages,
|
2726
|
+
decimalSeparator: toRef(() => options?.decimalSeparator ?? inferDecimalSeparator(current, fallback)),
|
2715
2727
|
t: createTranslateFunction(current, fallback, messages),
|
2716
2728
|
n: createNumberFunction(current, fallback),
|
2717
2729
|
provide: createProvideFunction({
|
@@ -2838,6 +2850,7 @@ const makeThemeProps = propsFactory({
|
|
2838
2850
|
function genDefaults$1() {
|
2839
2851
|
return {
|
2840
2852
|
defaultTheme: 'light',
|
2853
|
+
prefix: 'v-',
|
2841
2854
|
variations: {
|
2842
2855
|
colors: [],
|
2843
2856
|
lighten: 0,
|
@@ -2875,8 +2888,8 @@ function genDefaults$1() {
|
|
2875
2888
|
'activated-opacity': 0.12,
|
2876
2889
|
'pressed-opacity': 0.12,
|
2877
2890
|
'dragged-opacity': 0.08,
|
2878
|
-
'theme-kbd': '#
|
2879
|
-
'theme-on-kbd': '#
|
2891
|
+
'theme-kbd': '#EEEEEE',
|
2892
|
+
'theme-on-kbd': '#000000',
|
2880
2893
|
'theme-code': '#F5F5F5',
|
2881
2894
|
'theme-on-code': '#000000'
|
2882
2895
|
}
|
@@ -2912,14 +2925,17 @@ function genDefaults$1() {
|
|
2912
2925
|
'activated-opacity': 0.12,
|
2913
2926
|
'pressed-opacity': 0.16,
|
2914
2927
|
'dragged-opacity': 0.08,
|
2915
|
-
'theme-kbd': '#
|
2928
|
+
'theme-kbd': '#424242',
|
2916
2929
|
'theme-on-kbd': '#FFFFFF',
|
2917
2930
|
'theme-code': '#343434',
|
2918
2931
|
'theme-on-code': '#CCCCCC'
|
2919
2932
|
}
|
2920
2933
|
}
|
2921
2934
|
},
|
2922
|
-
stylesheetId: 'vuetify-theme-stylesheet'
|
2935
|
+
stylesheetId: 'vuetify-theme-stylesheet',
|
2936
|
+
scoped: false,
|
2937
|
+
unimportant: false,
|
2938
|
+
utilities: true
|
2923
2939
|
};
|
2924
2940
|
}
|
2925
2941
|
function parseThemeOptions() {
|
@@ -2942,21 +2958,21 @@ function parseThemeOptions() {
|
|
2942
2958
|
function createCssClass(lines, selector, content, scope) {
|
2943
2959
|
lines.push(`${getScopedSelector(selector, scope)} {\n`, ...content.map(line => ` ${line};\n`), '}\n');
|
2944
2960
|
}
|
2945
|
-
function genCssVariables(theme) {
|
2961
|
+
function genCssVariables(theme, prefix) {
|
2946
2962
|
const lightOverlay = theme.dark ? 2 : 1;
|
2947
2963
|
const darkOverlay = theme.dark ? 1 : 2;
|
2948
2964
|
const variables = [];
|
2949
2965
|
for (const [key, value] of Object.entries(theme.colors)) {
|
2950
2966
|
const rgb = parseColor(value);
|
2951
|
-
variables.push(
|
2967
|
+
variables.push(`--${prefix}theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`);
|
2952
2968
|
if (!key.startsWith('on-')) {
|
2953
|
-
variables.push(
|
2969
|
+
variables.push(`--${prefix}theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`);
|
2954
2970
|
}
|
2955
2971
|
}
|
2956
2972
|
for (const [key, value] of Object.entries(theme.variables)) {
|
2957
2973
|
const color = typeof value === 'string' && value.startsWith('#') ? parseColor(value) : undefined;
|
2958
2974
|
const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : undefined;
|
2959
|
-
variables.push(
|
2975
|
+
variables.push(`--${prefix}${key}: ${rgb ?? value}`);
|
2960
2976
|
}
|
2961
2977
|
return variables;
|
2962
2978
|
}
|
@@ -3000,7 +3016,8 @@ function getScopedSelector(selector, scope) {
|
|
3000
3016
|
const scopeSelector = `:where(${scope})`;
|
3001
3017
|
return selector === ':root' ? scopeSelector : `${scopeSelector} ${selector}`;
|
3002
3018
|
}
|
3003
|
-
function upsertStyles(
|
3019
|
+
function upsertStyles(id, cspNonce, styles) {
|
3020
|
+
const styleEl = getOrCreateStyleElement(id, cspNonce);
|
3004
3021
|
if (!styleEl) return;
|
3005
3022
|
styleEl.innerHTML = styles;
|
3006
3023
|
}
|
@@ -3020,8 +3037,17 @@ function getOrCreateStyleElement(id, cspNonce) {
|
|
3020
3037
|
// Composables
|
3021
3038
|
function createTheme(options) {
|
3022
3039
|
const parsedOptions = parseThemeOptions(options);
|
3023
|
-
const
|
3040
|
+
const _name = shallowRef(parsedOptions.defaultTheme);
|
3024
3041
|
const themes = ref(parsedOptions.themes);
|
3042
|
+
const systemName = shallowRef('light');
|
3043
|
+
const name = computed({
|
3044
|
+
get() {
|
3045
|
+
return _name.value === 'system' ? systemName.value : _name.value;
|
3046
|
+
},
|
3047
|
+
set(val) {
|
3048
|
+
_name.value = val;
|
3049
|
+
}
|
3050
|
+
});
|
3025
3051
|
const computedThemes = computed(() => {
|
3026
3052
|
const acc = {};
|
3027
3053
|
for (const [name, original] of Object.entries(themes.value)) {
|
@@ -3042,28 +3068,49 @@ function createTheme(options) {
|
|
3042
3068
|
const current = toRef(() => computedThemes.value[name.value]);
|
3043
3069
|
const styles = computed(() => {
|
3044
3070
|
const lines = [];
|
3071
|
+
const important = parsedOptions.unimportant ? '' : ' !important';
|
3072
|
+
const scoped = parsedOptions.scoped ? parsedOptions.prefix : '';
|
3045
3073
|
if (current.value?.dark) {
|
3046
3074
|
createCssClass(lines, ':root', ['color-scheme: dark'], parsedOptions.scope);
|
3047
3075
|
}
|
3048
|
-
createCssClass(lines, ':root', genCssVariables(current.value), parsedOptions.scope);
|
3076
|
+
createCssClass(lines, ':root', genCssVariables(current.value, parsedOptions.prefix), parsedOptions.scope);
|
3049
3077
|
for (const [themeName, theme] of Object.entries(computedThemes.value)) {
|
3050
|
-
createCssClass(lines,
|
3051
|
-
}
|
3052
|
-
|
3053
|
-
|
3054
|
-
|
3055
|
-
|
3056
|
-
|
3057
|
-
|
3058
|
-
|
3059
|
-
|
3060
|
-
|
3061
|
-
|
3078
|
+
createCssClass(lines, `.${parsedOptions.prefix}theme--${themeName}`, [`color-scheme: ${theme.dark ? 'dark' : 'normal'}`, ...genCssVariables(theme, parsedOptions.prefix)], parsedOptions.scope);
|
3079
|
+
}
|
3080
|
+
if (parsedOptions.utilities) {
|
3081
|
+
const bgLines = [];
|
3082
|
+
const fgLines = [];
|
3083
|
+
const colors = new Set(Object.values(computedThemes.value).flatMap(theme => Object.keys(theme.colors)));
|
3084
|
+
for (const key of colors) {
|
3085
|
+
if (key.startsWith('on-')) {
|
3086
|
+
createCssClass(fgLines, `.${key}`, [`color: rgb(var(--${parsedOptions.prefix}theme-${key}))${important}`], parsedOptions.scope);
|
3087
|
+
} else {
|
3088
|
+
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);
|
3089
|
+
createCssClass(fgLines, `.${scoped}text-${key}`, [`color: rgb(var(--${parsedOptions.prefix}theme-${key}))${important}`], parsedOptions.scope);
|
3090
|
+
createCssClass(fgLines, `.${scoped}border-${key}`, [`--${parsedOptions.prefix}border-color: var(--${parsedOptions.prefix}theme-${key})`], parsedOptions.scope);
|
3091
|
+
}
|
3062
3092
|
}
|
3093
|
+
lines.push(...bgLines, ...fgLines);
|
3063
3094
|
}
|
3064
|
-
lines.push(...bgLines, ...fgLines);
|
3065
3095
|
return lines.map((str, i) => i === 0 ? str : ` ${str}`).join('');
|
3066
3096
|
});
|
3097
|
+
const themeClasses = toRef(() => parsedOptions.isDisabled ? undefined : `${parsedOptions.prefix}theme--${name.value}`);
|
3098
|
+
const themeNames = toRef(() => Object.keys(computedThemes.value));
|
3099
|
+
if (SUPPORTS_MATCH_MEDIA) {
|
3100
|
+
const media = window.matchMedia('(prefers-color-scheme: dark)');
|
3101
|
+
function updateSystemName() {
|
3102
|
+
systemName.value = media.matches ? 'dark' : 'light';
|
3103
|
+
}
|
3104
|
+
updateSystemName();
|
3105
|
+
media.addEventListener('change', updateSystemName, {
|
3106
|
+
passive: true
|
3107
|
+
});
|
3108
|
+
if (getCurrentScope()) {
|
3109
|
+
onScopeDispose(() => {
|
3110
|
+
media.removeEventListener('change', updateSystemName);
|
3111
|
+
});
|
3112
|
+
}
|
3113
|
+
}
|
3067
3114
|
function install(app) {
|
3068
3115
|
if (parsedOptions.isDisabled) return;
|
3069
3116
|
const head = app._context.provides.usehead;
|
@@ -3101,22 +3148,55 @@ function createTheme(options) {
|
|
3101
3148
|
updateStyles();
|
3102
3149
|
}
|
3103
3150
|
function updateStyles() {
|
3104
|
-
upsertStyles(
|
3151
|
+
upsertStyles(parsedOptions.stylesheetId, parsedOptions.cspNonce, styles.value);
|
3105
3152
|
}
|
3106
3153
|
}
|
3107
3154
|
}
|
3108
|
-
|
3155
|
+
function change(themeName) {
|
3156
|
+
if (!themeNames.value.includes(themeName)) {
|
3157
|
+
consoleWarn(`Theme "${themeName}" not found on the Vuetify theme instance`);
|
3158
|
+
return;
|
3159
|
+
}
|
3160
|
+
name.value = themeName;
|
3161
|
+
}
|
3162
|
+
function cycle() {
|
3163
|
+
let themeArray = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : themeNames.value;
|
3164
|
+
const currentIndex = themeArray.indexOf(name.value);
|
3165
|
+
const nextIndex = currentIndex === -1 ? 0 : (currentIndex + 1) % themeArray.length;
|
3166
|
+
change(themeArray[nextIndex]);
|
3167
|
+
}
|
3168
|
+
function toggle() {
|
3169
|
+
let themeArray = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['light', 'dark'];
|
3170
|
+
cycle(themeArray);
|
3171
|
+
}
|
3172
|
+
const globalName = new Proxy(name, {
|
3173
|
+
get(target, prop) {
|
3174
|
+
return target[prop];
|
3175
|
+
},
|
3176
|
+
set(target, prop, val) {
|
3177
|
+
if (prop === 'value') {
|
3178
|
+
deprecate(`theme.global.name.value = ${val}`, `theme.change('${val}')`);
|
3179
|
+
}
|
3180
|
+
// @ts-expect-error
|
3181
|
+
target[prop] = val;
|
3182
|
+
return true;
|
3183
|
+
}
|
3184
|
+
});
|
3109
3185
|
return {
|
3110
3186
|
install,
|
3187
|
+
change,
|
3188
|
+
cycle,
|
3189
|
+
toggle,
|
3111
3190
|
isDisabled: parsedOptions.isDisabled,
|
3112
3191
|
name,
|
3113
3192
|
themes,
|
3114
3193
|
current,
|
3115
3194
|
computedThemes,
|
3195
|
+
prefix: parsedOptions.prefix,
|
3116
3196
|
themeClasses,
|
3117
3197
|
styles,
|
3118
3198
|
global: {
|
3119
|
-
name,
|
3199
|
+
name: globalName,
|
3120
3200
|
current
|
3121
3201
|
}
|
3122
3202
|
};
|
@@ -3127,7 +3207,7 @@ function provideTheme(props) {
|
|
3127
3207
|
if (!theme) throw new Error('Could not find Vuetify theme injection');
|
3128
3208
|
const name = toRef(() => props.theme ?? theme.name.value);
|
3129
3209
|
const current = toRef(() => theme.themes.value[name.value]);
|
3130
|
-
const themeClasses = toRef(() => theme.isDisabled ? undefined :
|
3210
|
+
const themeClasses = toRef(() => theme.isDisabled ? undefined : `${theme.prefix}theme--${name.value}`);
|
3131
3211
|
const newTheme = {
|
3132
3212
|
...theme,
|
3133
3213
|
name,
|
@@ -4231,7 +4311,10 @@ const makeVToolbarProps = propsFactory({
|
|
4231
4311
|
default: 'default',
|
4232
4312
|
validator: v => allowedDensities$1.includes(v)
|
4233
4313
|
},
|
4234
|
-
extended:
|
4314
|
+
extended: {
|
4315
|
+
type: Boolean,
|
4316
|
+
default: null
|
4317
|
+
},
|
4235
4318
|
extensionHeight: {
|
4236
4319
|
type: [Number, String],
|
4237
4320
|
default: 48
|
@@ -4279,7 +4362,7 @@ const VToolbar = genericComponent()({
|
|
4279
4362
|
const {
|
4280
4363
|
rtlClasses
|
4281
4364
|
} = useRtl();
|
4282
|
-
const isExtended = shallowRef(
|
4365
|
+
const isExtended = shallowRef(props.extended === null ? !!slots.extension?.() : props.extended);
|
4283
4366
|
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));
|
4284
4367
|
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);
|
4285
4368
|
provideDefaults({
|
@@ -4291,7 +4374,7 @@ const VToolbar = genericComponent()({
|
|
4291
4374
|
const hasTitle = !!(props.title || slots.title);
|
4292
4375
|
const hasImage = !!(slots.image || props.image);
|
4293
4376
|
const extension = slots.extension?.();
|
4294
|
-
isExtended.value =
|
4377
|
+
isExtended.value = props.extended === null ? !!extension : props.extended;
|
4295
4378
|
return createVNode(props.tag, {
|
4296
4379
|
"class": normalizeClass(['v-toolbar', {
|
4297
4380
|
'v-toolbar--absolute': props.absolute,
|
@@ -4674,9 +4757,15 @@ function useVariant(props) {
|
|
4674
4757
|
};
|
4675
4758
|
}
|
4676
4759
|
|
4760
|
+
// Types
|
4761
|
+
|
4677
4762
|
const makeVBtnGroupProps = propsFactory({
|
4678
4763
|
baseColor: String,
|
4679
4764
|
divided: Boolean,
|
4765
|
+
direction: {
|
4766
|
+
type: String,
|
4767
|
+
default: 'horizontal'
|
4768
|
+
},
|
4680
4769
|
...makeBorderProps(),
|
4681
4770
|
...makeComponentProps(),
|
4682
4771
|
...makeDensityProps(),
|
@@ -4710,7 +4799,7 @@ const VBtnGroup = genericComponent()({
|
|
4710
4799
|
} = useRounded(props);
|
4711
4800
|
provideDefaults({
|
4712
4801
|
VBtn: {
|
4713
|
-
height: 'auto',
|
4802
|
+
height: toRef(() => props.direction === 'horizontal' ? 'auto' : null),
|
4714
4803
|
baseColor: toRef(() => props.baseColor),
|
4715
4804
|
color: toRef(() => props.color),
|
4716
4805
|
density: toRef(() => props.density),
|
@@ -4720,7 +4809,7 @@ const VBtnGroup = genericComponent()({
|
|
4720
4809
|
});
|
4721
4810
|
useRender(() => {
|
4722
4811
|
return createVNode(props.tag, {
|
4723
|
-
"class": normalizeClass(['v-btn-group', {
|
4812
|
+
"class": normalizeClass(['v-btn-group', `v-btn-group--${props.direction}`, {
|
4724
4813
|
'v-btn-group--divided': props.divided
|
4725
4814
|
}, themeClasses.value, borderClasses.value, densityClasses.value, elevationClasses.value, roundedClasses.value, props.class]),
|
4726
4815
|
"style": normalizeStyle(props.style)
|
@@ -5844,8 +5933,8 @@ function rippleCancelShow(e) {
|
|
5844
5933
|
window.clearTimeout(element._ripple.showTimer);
|
5845
5934
|
}
|
5846
5935
|
let keyboardRipple = false;
|
5847
|
-
function keyboardRippleShow(e) {
|
5848
|
-
if (!keyboardRipple && (e.keyCode
|
5936
|
+
function keyboardRippleShow(e, keys) {
|
5937
|
+
if (!keyboardRipple && keys.includes(e.keyCode)) {
|
5849
5938
|
keyboardRipple = true;
|
5850
5939
|
rippleShow(e);
|
5851
5940
|
}
|
@@ -5873,9 +5962,12 @@ function updateRipple(el, binding, wasEnabled) {
|
|
5873
5962
|
el._ripple.enabled = enabled;
|
5874
5963
|
el._ripple.centered = modifiers.center;
|
5875
5964
|
el._ripple.circle = modifiers.circle;
|
5876
|
-
|
5877
|
-
|
5965
|
+
const bindingValue = isObject(value) ? value : {};
|
5966
|
+
if (bindingValue.class) {
|
5967
|
+
el._ripple.class = bindingValue.class;
|
5878
5968
|
}
|
5969
|
+
const allowedKeys = bindingValue.keys ?? [keyCodes.enter, keyCodes.space];
|
5970
|
+
el._ripple.keyDownHandler = e => keyboardRippleShow(e, allowedKeys);
|
5879
5971
|
if (enabled && !wasEnabled) {
|
5880
5972
|
if (modifiers.stop) {
|
5881
5973
|
el.addEventListener('touchstart', rippleStop, {
|
@@ -5897,7 +5989,7 @@ function updateRipple(el, binding, wasEnabled) {
|
|
5897
5989
|
el.addEventListener('mousedown', rippleShow);
|
5898
5990
|
el.addEventListener('mouseup', rippleHide);
|
5899
5991
|
el.addEventListener('mouseleave', rippleHide);
|
5900
|
-
el.addEventListener('keydown', keyboardRippleShow);
|
5992
|
+
el.addEventListener('keydown', e => keyboardRippleShow(e, allowedKeys));
|
5901
5993
|
el.addEventListener('keyup', keyboardRippleHide);
|
5902
5994
|
el.addEventListener('blur', focusRippleHide);
|
5903
5995
|
|
@@ -5917,7 +6009,9 @@ function removeListeners(el) {
|
|
5917
6009
|
el.removeEventListener('touchcancel', rippleHide);
|
5918
6010
|
el.removeEventListener('mouseup', rippleHide);
|
5919
6011
|
el.removeEventListener('mouseleave', rippleHide);
|
5920
|
-
el.
|
6012
|
+
if (el._ripple?.keyDownHandler) {
|
6013
|
+
el.removeEventListener('keydown', el._ripple.keyDownHandler);
|
6014
|
+
}
|
5921
6015
|
el.removeEventListener('keyup', keyboardRippleHide);
|
5922
6016
|
el.removeEventListener('dragstart', rippleHide);
|
5923
6017
|
el.removeEventListener('blur', focusRippleHide);
|
@@ -5926,8 +6020,8 @@ function mounted$4(el, binding) {
|
|
5926
6020
|
updateRipple(el, binding, false);
|
5927
6021
|
}
|
5928
6022
|
function unmounted$4(el) {
|
5929
|
-
delete el._ripple;
|
5930
6023
|
removeListeners(el);
|
6024
|
+
delete el._ripple;
|
5931
6025
|
}
|
5932
6026
|
function updated$1(el, binding) {
|
5933
6027
|
if (binding.value === binding.oldValue) {
|
@@ -6200,6 +6294,31 @@ const VAppBarTitle = genericComponent()({
|
|
6200
6294
|
// Utilities
|
6201
6295
|
const VAlertTitle = createSimpleFunctional('v-alert-title');
|
6202
6296
|
|
6297
|
+
// Utilities
|
6298
|
+
|
6299
|
+
// Types
|
6300
|
+
|
6301
|
+
// Types
|
6302
|
+
|
6303
|
+
// Composables
|
6304
|
+
const makeIconSizeProps = propsFactory({
|
6305
|
+
iconSize: [Number, String],
|
6306
|
+
iconSizes: {
|
6307
|
+
type: Array,
|
6308
|
+
default: () => [['x-small', 10], ['small', 16], ['default', 24], ['large', 28], ['x-large', 32]]
|
6309
|
+
}
|
6310
|
+
}, 'iconSize');
|
6311
|
+
function useIconSizes(props, fallback) {
|
6312
|
+
const iconSize = computed(() => {
|
6313
|
+
const iconSizeMap = new Map(props.iconSizes);
|
6314
|
+
const _iconSize = props.iconSize ?? fallback() ?? 'default';
|
6315
|
+
return iconSizeMap.has(_iconSize) ? iconSizeMap.get(_iconSize) : _iconSize;
|
6316
|
+
});
|
6317
|
+
return {
|
6318
|
+
iconSize
|
6319
|
+
};
|
6320
|
+
}
|
6321
|
+
|
6203
6322
|
// Types
|
6204
6323
|
|
6205
6324
|
const allowedTypes = ['success', 'info', 'warning', 'error'];
|
@@ -6239,6 +6358,7 @@ const makeVAlertProps = propsFactory({
|
|
6239
6358
|
...makeDensityProps(),
|
6240
6359
|
...makeDimensionProps(),
|
6241
6360
|
...makeElevationProps(),
|
6361
|
+
...makeIconSizeProps(),
|
6242
6362
|
...makeLocationProps(),
|
6243
6363
|
...makePositionProps(),
|
6244
6364
|
...makeRoundedProps(),
|
@@ -6266,6 +6386,9 @@ const VAlert = genericComponent()({
|
|
6266
6386
|
if (!props.type) return props.icon;
|
6267
6387
|
return props.icon ?? `$${props.type}`;
|
6268
6388
|
});
|
6389
|
+
const {
|
6390
|
+
iconSize
|
6391
|
+
} = useIconSizes(props, () => props.prominent ? 44 : 28);
|
6269
6392
|
const {
|
6270
6393
|
themeClasses
|
6271
6394
|
} = provideTheme(props);
|
@@ -6313,6 +6436,11 @@ const VAlert = genericComponent()({
|
|
6313
6436
|
const hasPrepend = !!(slots.prepend || icon.value);
|
6314
6437
|
const hasTitle = !!(slots.title || props.title);
|
6315
6438
|
const hasClose = !!(slots.close || props.closable);
|
6439
|
+
const iconProps = {
|
6440
|
+
density: props.density,
|
6441
|
+
icon: icon.value,
|
6442
|
+
size: iconSize.value
|
6443
|
+
};
|
6316
6444
|
return isActive.value && createVNode(props.tag, {
|
6317
6445
|
"class": normalizeClass(['v-alert', props.border && {
|
6318
6446
|
'v-alert--border': !!props.border,
|
@@ -6330,19 +6458,14 @@ const VAlert = genericComponent()({
|
|
6330
6458
|
}, null), hasPrepend && createElementVNode("div", {
|
6331
6459
|
"key": "prepend",
|
6332
6460
|
"class": "v-alert__prepend"
|
6333
|
-
}, [!slots.prepend ? createVNode(VIcon, {
|
6334
|
-
"key": "prepend-icon"
|
6335
|
-
|
6336
|
-
"icon": icon.value,
|
6337
|
-
"size": props.prominent ? 44 : 28
|
6338
|
-
}, null) : createVNode(VDefaultsProvider, {
|
6461
|
+
}, [!slots.prepend ? createVNode(VIcon, mergeProps({
|
6462
|
+
"key": "prepend-icon"
|
6463
|
+
}, iconProps), null) : createVNode(VDefaultsProvider, {
|
6339
6464
|
"key": "prepend-defaults",
|
6340
6465
|
"disabled": !icon.value,
|
6341
6466
|
"defaults": {
|
6342
6467
|
VIcon: {
|
6343
|
-
|
6344
|
-
icon: icon.value,
|
6345
|
-
size: props.prominent ? 44 : 28
|
6468
|
+
...iconProps
|
6346
6469
|
}
|
6347
6470
|
}
|
6348
6471
|
}, slots.prepend)]), createElementVNode("div", {
|
@@ -7867,6 +7990,7 @@ function getOffsetPosition(isHorizontal, element) {
|
|
7867
7990
|
const VSlideGroupSymbol = Symbol.for('vuetify:v-slide-group');
|
7868
7991
|
const makeVSlideGroupProps = propsFactory({
|
7869
7992
|
centerActive: Boolean,
|
7993
|
+
contentClass: null,
|
7870
7994
|
direction: {
|
7871
7995
|
type: String,
|
7872
7996
|
default: 'horizontal'
|
@@ -8179,7 +8303,7 @@ const VSlideGroup = genericComponent()({
|
|
8179
8303
|
})]), createElementVNode("div", {
|
8180
8304
|
"key": "container",
|
8181
8305
|
"ref": containerRef,
|
8182
|
-
"class":
|
8306
|
+
"class": normalizeClass(['v-slide-group__container', props.contentClass]),
|
8183
8307
|
"onScroll": onScroll
|
8184
8308
|
}, [createElementVNode("div", {
|
8185
8309
|
"ref": contentRef,
|
@@ -8542,16 +8666,85 @@ const VChip = genericComponent()({
|
|
8542
8666
|
}
|
8543
8667
|
});
|
8544
8668
|
|
8669
|
+
const makeVDividerProps = propsFactory({
|
8670
|
+
color: String,
|
8671
|
+
inset: Boolean,
|
8672
|
+
length: [Number, String],
|
8673
|
+
opacity: [Number, String],
|
8674
|
+
thickness: [Number, String],
|
8675
|
+
vertical: Boolean,
|
8676
|
+
...makeComponentProps(),
|
8677
|
+
...makeThemeProps()
|
8678
|
+
}, 'VDivider');
|
8679
|
+
const VDivider = genericComponent()({
|
8680
|
+
name: 'VDivider',
|
8681
|
+
props: makeVDividerProps(),
|
8682
|
+
setup(props, _ref) {
|
8683
|
+
let {
|
8684
|
+
attrs,
|
8685
|
+
slots
|
8686
|
+
} = _ref;
|
8687
|
+
const {
|
8688
|
+
themeClasses
|
8689
|
+
} = provideTheme(props);
|
8690
|
+
const {
|
8691
|
+
textColorClasses,
|
8692
|
+
textColorStyles
|
8693
|
+
} = useTextColor(() => props.color);
|
8694
|
+
const dividerStyles = computed(() => {
|
8695
|
+
const styles = {};
|
8696
|
+
if (props.length) {
|
8697
|
+
styles[props.vertical ? 'height' : 'width'] = convertToUnit(props.length);
|
8698
|
+
}
|
8699
|
+
if (props.thickness) {
|
8700
|
+
styles[props.vertical ? 'borderRightWidth' : 'borderTopWidth'] = convertToUnit(props.thickness);
|
8701
|
+
}
|
8702
|
+
return styles;
|
8703
|
+
});
|
8704
|
+
useRender(() => {
|
8705
|
+
const divider = createElementVNode("hr", {
|
8706
|
+
"class": normalizeClass([{
|
8707
|
+
'v-divider': true,
|
8708
|
+
'v-divider--inset': props.inset,
|
8709
|
+
'v-divider--vertical': props.vertical
|
8710
|
+
}, themeClasses.value, textColorClasses.value, props.class]),
|
8711
|
+
"style": normalizeStyle([dividerStyles.value, textColorStyles.value, {
|
8712
|
+
'--v-border-opacity': props.opacity
|
8713
|
+
}, props.style]),
|
8714
|
+
"aria-orientation": !attrs.role || attrs.role === 'separator' ? props.vertical ? 'vertical' : 'horizontal' : undefined,
|
8715
|
+
"role": `${attrs.role || 'separator'}`
|
8716
|
+
}, null);
|
8717
|
+
if (!slots.default) return divider;
|
8718
|
+
return createElementVNode("div", {
|
8719
|
+
"class": normalizeClass(['v-divider__wrapper', {
|
8720
|
+
'v-divider__wrapper--vertical': props.vertical,
|
8721
|
+
'v-divider__wrapper--inset': props.inset
|
8722
|
+
}])
|
8723
|
+
}, [divider, createElementVNode("div", {
|
8724
|
+
"class": "v-divider__content"
|
8725
|
+
}, [slots.default()]), divider]);
|
8726
|
+
});
|
8727
|
+
return {};
|
8728
|
+
}
|
8729
|
+
});
|
8730
|
+
|
8545
8731
|
// Utilities
|
8546
8732
|
|
8547
8733
|
// List
|
8548
8734
|
const ListKey = Symbol.for('vuetify:list');
|
8549
8735
|
function createList() {
|
8736
|
+
let {
|
8737
|
+
filterable
|
8738
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
8739
|
+
filterable: false
|
8740
|
+
};
|
8550
8741
|
const parent = inject$1(ListKey, {
|
8742
|
+
filterable: false,
|
8551
8743
|
hasPrepend: shallowRef(false),
|
8552
8744
|
updateHasPrepend: () => null
|
8553
8745
|
});
|
8554
8746
|
const data = {
|
8747
|
+
filterable: parent.filterable || filterable,
|
8555
8748
|
hasPrepend: shallowRef(false),
|
8556
8749
|
updateHasPrepend: value => {
|
8557
8750
|
if (value) data.hasPrepend.value = value;
|
@@ -9260,6 +9453,7 @@ const makeVListGroupProps = propsFactory({
|
|
9260
9453
|
type: IconValue,
|
9261
9454
|
default: '$expand'
|
9262
9455
|
},
|
9456
|
+
rawId: [String, Number],
|
9263
9457
|
prependIcon: IconValue,
|
9264
9458
|
appendIcon: IconValue,
|
9265
9459
|
fluid: Boolean,
|
@@ -9281,13 +9475,12 @@ const VListGroup = genericComponent()({
|
|
9281
9475
|
open,
|
9282
9476
|
id: _id
|
9283
9477
|
} = useNestedItem(() => props.value, true);
|
9284
|
-
const id = computed(() => `v-list-group--id-${String(_id.value)}`);
|
9478
|
+
const id = computed(() => `v-list-group--id-${String(props.rawId ?? _id.value)}`);
|
9285
9479
|
const list = useList();
|
9286
9480
|
const {
|
9287
9481
|
isBooted
|
9288
9482
|
} = useSsrBoot();
|
9289
9483
|
function onClick(e) {
|
9290
|
-
e.stopPropagation();
|
9291
9484
|
if (['INPUT', 'TEXTAREA'].includes(e.target?.tagName)) return;
|
9292
9485
|
open(!isOpen.value, e);
|
9293
9486
|
}
|
@@ -9503,6 +9696,9 @@ const VListItem = genericComponent()({
|
|
9503
9696
|
roundedClasses
|
9504
9697
|
} = useRounded(roundedProps);
|
9505
9698
|
const lineClasses = toRef(() => props.lines ? `v-list-item--${props.lines}-line` : undefined);
|
9699
|
+
const rippleOptions = toRef(() => props.ripple !== undefined && !!props.ripple && list?.filterable ? {
|
9700
|
+
keys: [keyCodes.enter]
|
9701
|
+
} : props.ripple);
|
9506
9702
|
const slotProps = computed(() => ({
|
9507
9703
|
isActive: isActive.value,
|
9508
9704
|
select,
|
@@ -9527,8 +9723,9 @@ const VListItem = genericComponent()({
|
|
9527
9723
|
function onKeyDown(e) {
|
9528
9724
|
const target = e.target;
|
9529
9725
|
if (['INPUT', 'TEXTAREA'].includes(target.tagName)) return;
|
9530
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
9726
|
+
if (e.key === 'Enter' || e.key === ' ' && !list?.filterable) {
|
9531
9727
|
e.preventDefault();
|
9728
|
+
e.stopPropagation();
|
9532
9729
|
e.target.dispatchEvent(new MouseEvent('click', e));
|
9533
9730
|
}
|
9534
9731
|
}
|
@@ -9638,7 +9835,7 @@ const VListItem = genericComponent()({
|
|
9638
9835
|
}), createElementVNode("div", {
|
9639
9836
|
"class": "v-list-item__spacer"
|
9640
9837
|
}, null)])]
|
9641
|
-
}), [[Ripple, isClickable.value &&
|
9838
|
+
}), [[Ripple, isClickable.value && rippleOptions.value]]);
|
9642
9839
|
});
|
9643
9840
|
return {
|
9644
9841
|
activate,
|
@@ -9693,68 +9890,6 @@ const VListSubheader = genericComponent()({
|
|
9693
9890
|
}
|
9694
9891
|
});
|
9695
9892
|
|
9696
|
-
const makeVDividerProps = propsFactory({
|
9697
|
-
color: String,
|
9698
|
-
inset: Boolean,
|
9699
|
-
length: [Number, String],
|
9700
|
-
opacity: [Number, String],
|
9701
|
-
thickness: [Number, String],
|
9702
|
-
vertical: Boolean,
|
9703
|
-
...makeComponentProps(),
|
9704
|
-
...makeThemeProps()
|
9705
|
-
}, 'VDivider');
|
9706
|
-
const VDivider = genericComponent()({
|
9707
|
-
name: 'VDivider',
|
9708
|
-
props: makeVDividerProps(),
|
9709
|
-
setup(props, _ref) {
|
9710
|
-
let {
|
9711
|
-
attrs,
|
9712
|
-
slots
|
9713
|
-
} = _ref;
|
9714
|
-
const {
|
9715
|
-
themeClasses
|
9716
|
-
} = provideTheme(props);
|
9717
|
-
const {
|
9718
|
-
textColorClasses,
|
9719
|
-
textColorStyles
|
9720
|
-
} = useTextColor(() => props.color);
|
9721
|
-
const dividerStyles = computed(() => {
|
9722
|
-
const styles = {};
|
9723
|
-
if (props.length) {
|
9724
|
-
styles[props.vertical ? 'height' : 'width'] = convertToUnit(props.length);
|
9725
|
-
}
|
9726
|
-
if (props.thickness) {
|
9727
|
-
styles[props.vertical ? 'borderRightWidth' : 'borderTopWidth'] = convertToUnit(props.thickness);
|
9728
|
-
}
|
9729
|
-
return styles;
|
9730
|
-
});
|
9731
|
-
useRender(() => {
|
9732
|
-
const divider = createElementVNode("hr", {
|
9733
|
-
"class": normalizeClass([{
|
9734
|
-
'v-divider': true,
|
9735
|
-
'v-divider--inset': props.inset,
|
9736
|
-
'v-divider--vertical': props.vertical
|
9737
|
-
}, themeClasses.value, textColorClasses.value, props.class]),
|
9738
|
-
"style": normalizeStyle([dividerStyles.value, textColorStyles.value, {
|
9739
|
-
'--v-border-opacity': props.opacity
|
9740
|
-
}, props.style]),
|
9741
|
-
"aria-orientation": !attrs.role || attrs.role === 'separator' ? props.vertical ? 'vertical' : 'horizontal' : undefined,
|
9742
|
-
"role": `${attrs.role || 'separator'}`
|
9743
|
-
}, null);
|
9744
|
-
if (!slots.default) return divider;
|
9745
|
-
return createElementVNode("div", {
|
9746
|
-
"class": normalizeClass(['v-divider__wrapper', {
|
9747
|
-
'v-divider__wrapper--vertical': props.vertical,
|
9748
|
-
'v-divider__wrapper--inset': props.inset
|
9749
|
-
}])
|
9750
|
-
}, [divider, createElementVNode("div", {
|
9751
|
-
"class": "v-divider__content"
|
9752
|
-
}, [slots.default()]), divider]);
|
9753
|
-
});
|
9754
|
-
return {};
|
9755
|
-
}
|
9756
|
-
});
|
9757
|
-
|
9758
9893
|
// Types
|
9759
9894
|
|
9760
9895
|
const makeVListChildrenProps = propsFactory({
|
@@ -9805,9 +9940,10 @@ const VListChildren = genericComponent()({
|
|
9805
9940
|
}) : undefined
|
9806
9941
|
};
|
9807
9942
|
const listGroupProps = VListGroup.filterProps(itemProps);
|
9808
|
-
return children ? createVNode(VListGroup, mergeProps({
|
9809
|
-
"value": itemProps?.value
|
9810
|
-
|
9943
|
+
return children ? createVNode(VListGroup, mergeProps(listGroupProps, {
|
9944
|
+
"value": props.returnObject ? item : itemProps?.value,
|
9945
|
+
"rawId": itemProps?.value
|
9946
|
+
}), {
|
9811
9947
|
activator: _ref3 => {
|
9812
9948
|
let {
|
9813
9949
|
props: activatorProps
|
@@ -10023,6 +10159,7 @@ const makeVListProps = propsFactory({
|
|
10023
10159
|
activeClass: String,
|
10024
10160
|
bgColor: String,
|
10025
10161
|
disabled: Boolean,
|
10162
|
+
filterable: Boolean,
|
10026
10163
|
expandIcon: IconValue,
|
10027
10164
|
collapseIcon: IconValue,
|
10028
10165
|
lines: {
|
@@ -10106,7 +10243,9 @@ const VList = genericComponent()({
|
|
10106
10243
|
const activeColor = toRef(() => props.activeColor);
|
10107
10244
|
const baseColor = toRef(() => props.baseColor);
|
10108
10245
|
const color = toRef(() => props.color);
|
10109
|
-
createList(
|
10246
|
+
createList({
|
10247
|
+
filterable: props.filterable
|
10248
|
+
});
|
10110
10249
|
provideDefaults({
|
10111
10250
|
VListGroup: {
|
10112
10251
|
activeColor,
|
@@ -11789,6 +11928,7 @@ const makeVMenuProps = propsFactory({
|
|
11789
11928
|
// disableKeys: Boolean,
|
11790
11929
|
id: String,
|
11791
11930
|
submenu: Boolean,
|
11931
|
+
disableInitialFocus: Boolean,
|
11792
11932
|
...omit(makeVOverlayProps({
|
11793
11933
|
closeDelay: 250,
|
11794
11934
|
closeOnContentClick: true,
|
@@ -11863,7 +12003,7 @@ const VMenu = genericComponent()({
|
|
11863
12003
|
watch(isActive, val => {
|
11864
12004
|
if (val) {
|
11865
12005
|
parent?.register();
|
11866
|
-
if (IN_BROWSER) {
|
12006
|
+
if (IN_BROWSER && !props.disableInitialFocus) {
|
11867
12007
|
document.addEventListener('focusin', onFocusIn, {
|
11868
12008
|
once: true
|
11869
12009
|
});
|
@@ -12700,7 +12840,12 @@ function useVirtual(props, items) {
|
|
12700
12840
|
}
|
12701
12841
|
function calculateOffset(index) {
|
12702
12842
|
index = clamp(index, 0, items.value.length - 1);
|
12703
|
-
|
12843
|
+
const whole = Math.floor(index);
|
12844
|
+
const fraction = index % 1;
|
12845
|
+
const next = whole + 1;
|
12846
|
+
const wholeOffset = offsets[whole] || 0;
|
12847
|
+
const nextOffset = offsets[next] || wholeOffset;
|
12848
|
+
return wholeOffset + (nextOffset - wholeOffset) * fraction;
|
12704
12849
|
}
|
12705
12850
|
function calculateIndex(scrollTop) {
|
12706
12851
|
return binaryClosest(offsets, scrollTop);
|
@@ -13054,6 +13199,7 @@ const makeSelectProps = propsFactory({
|
|
13054
13199
|
},
|
13055
13200
|
openOnClear: Boolean,
|
13056
13201
|
itemColor: String,
|
13202
|
+
noAutoScroll: Boolean,
|
13057
13203
|
...makeItemsProps({
|
13058
13204
|
itemChildren: false
|
13059
13205
|
})
|
@@ -13268,7 +13414,7 @@ const VSelect = genericComponent()({
|
|
13268
13414
|
watch(menu, () => {
|
13269
13415
|
if (!props.hideSelected && menu.value && model.value.length) {
|
13270
13416
|
const index = displayItems.value.findIndex(item => model.value.some(s => (props.valueComparator || deepEqual)(s.value, item.value)));
|
13271
|
-
IN_BROWSER && window.requestAnimationFrame(() => {
|
13417
|
+
IN_BROWSER && !props.noAutoScroll && window.requestAnimationFrame(() => {
|
13272
13418
|
index >= 0 && vVirtualScrollRef.value?.scrollToIndex(index);
|
13273
13419
|
});
|
13274
13420
|
}
|
@@ -13361,6 +13507,22 @@ const VSelect = genericComponent()({
|
|
13361
13507
|
key: item.value,
|
13362
13508
|
onClick: () => select(item, null)
|
13363
13509
|
});
|
13510
|
+
if (item.raw.type === 'divider') {
|
13511
|
+
return slots.divider?.({
|
13512
|
+
props: item.raw,
|
13513
|
+
index
|
13514
|
+
}) ?? createVNode(VDivider, mergeProps(item.props, {
|
13515
|
+
"key": `divider-${index}`
|
13516
|
+
}), null);
|
13517
|
+
}
|
13518
|
+
if (item.raw.type === 'subheader') {
|
13519
|
+
return slots.subheader?.({
|
13520
|
+
props: item.raw,
|
13521
|
+
index
|
13522
|
+
}) ?? createVNode(VListSubheader, mergeProps(item.props, {
|
13523
|
+
"key": `subheader-${index}`
|
13524
|
+
}), null);
|
13525
|
+
}
|
13364
13526
|
return slots.item?.({
|
13365
13527
|
item,
|
13366
13528
|
index,
|
@@ -13521,6 +13683,9 @@ function filterItems(items, query, options) {
|
|
13521
13683
|
let match = -1;
|
13522
13684
|
if ((query || customFiltersLength > 0) && !options?.noFilter) {
|
13523
13685
|
if (typeof item === 'object') {
|
13686
|
+
if (['divider', 'subheader'].includes(item.raw?.type)) {
|
13687
|
+
continue;
|
13688
|
+
}
|
13524
13689
|
const filterKeys = keys || Object.keys(transformed);
|
13525
13690
|
for (const key of filterKeys) {
|
13526
13691
|
const value = getPropertyFromItem(transformed, key);
|
@@ -13723,7 +13888,7 @@ const VAutocomplete = genericComponent()({
|
|
13723
13888
|
menu.value = !menu.value;
|
13724
13889
|
}
|
13725
13890
|
function onListKeydown(e) {
|
13726
|
-
if (e.key
|
13891
|
+
if (checkPrintable(e) || e.key === 'Backspace') {
|
13727
13892
|
vTextFieldRef.value?.focus();
|
13728
13893
|
}
|
13729
13894
|
}
|
@@ -13928,6 +14093,7 @@ const VAutocomplete = genericComponent()({
|
|
13928
14093
|
}, props.menuProps), {
|
13929
14094
|
default: () => [hasList && createVNode(VList, mergeProps({
|
13930
14095
|
"ref": listRef,
|
14096
|
+
"filterable": true,
|
13931
14097
|
"selected": selectedValues.value,
|
13932
14098
|
"selectStrategy": props.multiple ? 'independent' : 'single-independent',
|
13933
14099
|
"onMousedown": e => e.preventDefault(),
|
@@ -13959,6 +14125,22 @@ const VAutocomplete = genericComponent()({
|
|
13959
14125
|
active: highlightFirst.value && index === 0 ? true : undefined,
|
13960
14126
|
onClick: () => select(item, null)
|
13961
14127
|
});
|
14128
|
+
if (item.raw.type === 'divider') {
|
14129
|
+
return slots.divider?.({
|
14130
|
+
props: item.raw,
|
14131
|
+
index
|
14132
|
+
}) ?? createVNode(VDivider, mergeProps(item.props, {
|
14133
|
+
"key": `divider-${index}`
|
14134
|
+
}), null);
|
14135
|
+
}
|
14136
|
+
if (item.raw.type === 'subheader') {
|
14137
|
+
return slots.subheader?.({
|
14138
|
+
props: item.raw,
|
14139
|
+
index
|
14140
|
+
}) ?? createVNode(VListSubheader, mergeProps(item.props, {
|
14141
|
+
"key": `subheader-${index}`
|
14142
|
+
}), null);
|
14143
|
+
}
|
13962
14144
|
return slots.item?.({
|
13963
14145
|
item,
|
13964
14146
|
index,
|
@@ -14103,7 +14285,8 @@ const makeVBadgeProps = propsFactory({
|
|
14103
14285
|
...makeThemeProps(),
|
14104
14286
|
...makeTransitionProps({
|
14105
14287
|
transition: 'scale-rotate-transition'
|
14106
|
-
})
|
14288
|
+
}),
|
14289
|
+
...makeDimensionProps()
|
14107
14290
|
}, 'VBadge');
|
14108
14291
|
const VBadge = genericComponent()({
|
14109
14292
|
name: 'VBadge',
|
@@ -14133,6 +14316,9 @@ const VBadge = genericComponent()({
|
|
14133
14316
|
const base = props.floating ? props.dot ? 2 : 4 : props.dot ? 8 : 12;
|
14134
14317
|
return base + (['top', 'bottom'].includes(side) ? Number(props.offsetY ?? 0) : ['left', 'right'].includes(side) ? Number(props.offsetX ?? 0) : 0);
|
14135
14318
|
});
|
14319
|
+
const {
|
14320
|
+
dimensionStyles
|
14321
|
+
} = useDimension(props);
|
14136
14322
|
useRender(() => {
|
14137
14323
|
const value = Number(props.content);
|
14138
14324
|
const content = !props.max || isNaN(value) ? props.content : value <= Number(props.max) ? value : `${props.max}+`;
|
@@ -14154,7 +14340,7 @@ const VBadge = genericComponent()({
|
|
14154
14340
|
}, {
|
14155
14341
|
default: () => [withDirectives(createElementVNode("span", mergeProps({
|
14156
14342
|
"class": ['v-badge__badge', themeClasses.value, backgroundColorClasses.value, roundedClasses.value, textColorClasses.value],
|
14157
|
-
"style": [backgroundColorStyles.value, textColorStyles.value, props.inline ? {} : locationStyles.value],
|
14343
|
+
"style": [backgroundColorStyles.value, textColorStyles.value, dimensionStyles.value, props.inline ? {} : locationStyles.value],
|
14158
14344
|
"aria-atomic": "true",
|
14159
14345
|
"aria-label": t(props.label, value),
|
14160
14346
|
"aria-live": "polite",
|
@@ -17563,13 +17749,13 @@ function date(value) {
|
|
17563
17749
|
return null;
|
17564
17750
|
}
|
17565
17751
|
const sundayJanuarySecond2000 = new Date(2000, 0, 2);
|
17566
|
-
function getWeekdays(locale, firstDayOfWeek) {
|
17752
|
+
function getWeekdays(locale, firstDayOfWeek, weekdayFormat) {
|
17567
17753
|
const daysFromSunday = firstDayOfWeek ?? weekInfo(locale)?.firstDay ?? 0;
|
17568
17754
|
return createRange(7).map(i => {
|
17569
17755
|
const weekday = new Date(sundayJanuarySecond2000);
|
17570
17756
|
weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i);
|
17571
17757
|
return new Intl.DateTimeFormat(locale, {
|
17572
|
-
weekday: 'narrow'
|
17758
|
+
weekday: weekdayFormat ?? 'narrow'
|
17573
17759
|
}).format(weekday);
|
17574
17760
|
});
|
17575
17761
|
}
|
@@ -18033,9 +18219,9 @@ class VuetifyDateAdapter {
|
|
18033
18219
|
getDiff(date, comparing, unit) {
|
18034
18220
|
return getDiff(date, comparing, unit);
|
18035
18221
|
}
|
18036
|
-
getWeekdays(firstDayOfWeek) {
|
18222
|
+
getWeekdays(firstDayOfWeek, weekdayFormat) {
|
18037
18223
|
const firstDay = firstDayOfWeek !== undefined ? Number(firstDayOfWeek) : undefined;
|
18038
|
-
return getWeekdays(this.locale, firstDay);
|
18224
|
+
return getWeekdays(this.locale, firstDay, weekdayFormat);
|
18039
18225
|
}
|
18040
18226
|
getYear(date) {
|
18041
18227
|
return getYear(date);
|
@@ -18390,6 +18576,7 @@ const VCombobox = genericComponent()({
|
|
18390
18576
|
_search.value = val ?? '';
|
18391
18577
|
if (!props.multiple && !hasSelectionSlot.value) {
|
18392
18578
|
model.value = [transformItem$3(props, val)];
|
18579
|
+
nextTick(() => vVirtualScrollRef.value?.scrollToIndex(0));
|
18393
18580
|
}
|
18394
18581
|
if (val && props.multiple && props.delimiters?.length) {
|
18395
18582
|
const values = val.split(new RegExp(`(?:${props.delimiters.join('|')})+`));
|
@@ -18470,7 +18657,7 @@ const VCombobox = genericComponent()({
|
|
18470
18657
|
menu.value = !menu.value;
|
18471
18658
|
}
|
18472
18659
|
function onListKeydown(e) {
|
18473
|
-
if (e.key
|
18660
|
+
if (checkPrintable(e) || e.key === 'Backspace') {
|
18474
18661
|
vTextFieldRef.value?.focus();
|
18475
18662
|
}
|
18476
18663
|
}
|
@@ -18675,6 +18862,7 @@ const VCombobox = genericComponent()({
|
|
18675
18862
|
}, props.menuProps), {
|
18676
18863
|
default: () => [hasList && createVNode(VList, mergeProps({
|
18677
18864
|
"ref": listRef,
|
18865
|
+
"filterable": true,
|
18678
18866
|
"selected": selectedValues.value,
|
18679
18867
|
"selectStrategy": props.multiple ? 'independent' : 'single-independent',
|
18680
18868
|
"onMousedown": e => e.preventDefault(),
|
@@ -18706,6 +18894,22 @@ const VCombobox = genericComponent()({
|
|
18706
18894
|
active: highlightFirst.value && index === 0 ? true : undefined,
|
18707
18895
|
onClick: () => select(item, null)
|
18708
18896
|
});
|
18897
|
+
if (item.raw.type === 'divider') {
|
18898
|
+
return slots.divider?.({
|
18899
|
+
props: item.raw,
|
18900
|
+
index
|
18901
|
+
}) ?? createVNode(VDivider, mergeProps(item.props, {
|
18902
|
+
"key": `divider-${index}`
|
18903
|
+
}), null);
|
18904
|
+
}
|
18905
|
+
if (item.raw.type === 'subheader') {
|
18906
|
+
return slots.subheader?.({
|
18907
|
+
props: item.raw,
|
18908
|
+
index
|
18909
|
+
}) ?? createVNode(VListSubheader, mergeProps(item.props, {
|
18910
|
+
"key": `subheader-${index}`
|
18911
|
+
}), null);
|
18912
|
+
}
|
18709
18913
|
return slots.item?.({
|
18710
18914
|
item,
|
18711
18915
|
index,
|
@@ -20588,6 +20792,7 @@ const makeVDataTableHeadersProps = propsFactory({
|
|
20588
20792
|
color: String,
|
20589
20793
|
disableSort: Boolean,
|
20590
20794
|
fixedHeader: Boolean,
|
20795
|
+
lastFixed: Boolean,
|
20591
20796
|
multiSort: Boolean,
|
20592
20797
|
sortAscIcon: {
|
20593
20798
|
type: IconValue,
|
@@ -20634,10 +20839,11 @@ const VDataTableHeaders = genericComponent()({
|
|
20634
20839
|
loaderClasses
|
20635
20840
|
} = useLoader(props);
|
20636
20841
|
function getFixedStyles(column, y) {
|
20637
|
-
if (!(props.sticky || props.fixedHeader) && !column.fixed) return undefined;
|
20842
|
+
if (!(props.sticky || props.fixedHeader) && !(column.fixed || column.lastFixed)) return undefined;
|
20638
20843
|
return {
|
20639
20844
|
position: 'sticky',
|
20640
|
-
left: column.fixed ? convertToUnit(column.fixedOffset) : undefined,
|
20845
|
+
left: column.fixed || column.lastFixed ? convertToUnit(column.fixedOffset) : undefined,
|
20846
|
+
right: column.lastFixed ? convertToUnit(column.fixedOffset ?? 0) : undefined,
|
20641
20847
|
top: props.sticky || props.fixedHeader ? `calc(var(--v-table-header-height) * ${y})` : undefined
|
20642
20848
|
};
|
20643
20849
|
}
|
@@ -21153,11 +21359,18 @@ const VDataTableRows = genericComponent()({
|
|
21153
21359
|
}
|
21154
21360
|
});
|
21155
21361
|
|
21362
|
+
// Types
|
21363
|
+
|
21156
21364
|
const makeVTableProps = propsFactory({
|
21157
21365
|
fixedHeader: Boolean,
|
21158
21366
|
fixedFooter: Boolean,
|
21159
21367
|
height: [Number, String],
|
21160
21368
|
hover: Boolean,
|
21369
|
+
striped: {
|
21370
|
+
type: String,
|
21371
|
+
default: null,
|
21372
|
+
validator: v => ['even', 'odd'].includes(v)
|
21373
|
+
},
|
21161
21374
|
...makeComponentProps(),
|
21162
21375
|
...makeDensityProps(),
|
21163
21376
|
...makeTagProps(),
|
@@ -21184,7 +21397,9 @@ const VTable = genericComponent()({
|
|
21184
21397
|
'v-table--fixed-footer': props.fixedFooter,
|
21185
21398
|
'v-table--has-top': !!slots.top,
|
21186
21399
|
'v-table--has-bottom': !!slots.bottom,
|
21187
|
-
'v-table--hover': props.hover
|
21400
|
+
'v-table--hover': props.hover,
|
21401
|
+
'v-table--striped-even': props.striped === 'even',
|
21402
|
+
'v-table--striped-odd': props.striped === 'odd'
|
21188
21403
|
}, themeClasses.value, densityClasses.value, props.class]),
|
21189
21404
|
"style": normalizeStyle(props.style)
|
21190
21405
|
}, {
|
@@ -22359,7 +22574,8 @@ const makeCalendarProps = propsFactory({
|
|
22359
22574
|
firstDayOfWeek: {
|
22360
22575
|
type: [Number, String],
|
22361
22576
|
default: undefined
|
22362
|
-
}
|
22577
|
+
},
|
22578
|
+
weekdayFormat: String
|
22363
22579
|
}, 'calendar');
|
22364
22580
|
function useCalendar(props) {
|
22365
22581
|
const adapter = useDate();
|
@@ -22600,7 +22816,7 @@ const VDatePickerMonth = genericComponent()({
|
|
22600
22816
|
"ref": daysRef,
|
22601
22817
|
"key": daysInMonth.value[0].date?.toString(),
|
22602
22818
|
"class": "v-date-picker-month__days"
|
22603
|
-
}, [!props.hideWeekdays && adapter.getWeekdays(props.firstDayOfWeek).map(weekDay => createElementVNode("div", {
|
22819
|
+
}, [!props.hideWeekdays && adapter.getWeekdays(props.firstDayOfWeek, props.weekdayFormat).map(weekDay => createElementVNode("div", {
|
22604
22820
|
"class": normalizeClass(['v-date-picker-month__day', 'v-date-picker-month__weekday'])
|
22605
22821
|
}, [weekDay])), daysInMonth.value.map((item, i) => {
|
22606
22822
|
const slotProps = {
|
@@ -23109,7 +23325,9 @@ const VDatePicker = genericComponent()({
|
|
23109
23325
|
"max": maxDate.value,
|
23110
23326
|
"year": year.value,
|
23111
23327
|
"allowedMonths": allowedMonths
|
23112
|
-
}),
|
23328
|
+
}), {
|
23329
|
+
...pick(slots, ['month'])
|
23330
|
+
}) : viewMode.value === 'year' ? createVNode(VDatePickerYears, mergeProps({
|
23113
23331
|
"key": "date-picker-years"
|
23114
23332
|
}, datePickerYearsProps, {
|
23115
23333
|
"modelValue": year.value,
|
@@ -23117,7 +23335,9 @@ const VDatePicker = genericComponent()({
|
|
23117
23335
|
"min": minDate.value,
|
23118
23336
|
"max": maxDate.value,
|
23119
23337
|
"allowedYears": allowedYears
|
23120
|
-
}),
|
23338
|
+
}), {
|
23339
|
+
...pick(slots, ['year'])
|
23340
|
+
}) : createVNode(VDatePickerMonth, mergeProps({
|
23121
23341
|
"key": "date-picker-month"
|
23122
23342
|
}, datePickerMonthProps, {
|
23123
23343
|
"modelValue": model.value,
|
@@ -23128,7 +23348,9 @@ const VDatePicker = genericComponent()({
|
|
23128
23348
|
"onUpdate:year": [$event => year.value = $event, onUpdateYear],
|
23129
23349
|
"min": minDate.value,
|
23130
23350
|
"max": maxDate.value
|
23131
|
-
}),
|
23351
|
+
}), {
|
23352
|
+
...pick(slots, ['day'])
|
23353
|
+
})]
|
23132
23354
|
})]),
|
23133
23355
|
actions: slots.actions
|
23134
23356
|
});
|
@@ -24219,6 +24441,9 @@ const VInfiniteScroll = genericComponent()({
|
|
24219
24441
|
startStatus.value = status;
|
24220
24442
|
} else if (side === 'end') {
|
24221
24443
|
endStatus.value = status;
|
24444
|
+
} else if (side === 'both') {
|
24445
|
+
startStatus.value = status;
|
24446
|
+
endStatus.value = status;
|
24222
24447
|
}
|
24223
24448
|
}
|
24224
24449
|
function getStatus(side) {
|
@@ -24330,6 +24555,32 @@ const VInfiniteScroll = genericComponent()({
|
|
24330
24555
|
}, [renderSide('end', endStatus.value)])]
|
24331
24556
|
});
|
24332
24557
|
});
|
24558
|
+
function reset(side) {
|
24559
|
+
const effectiveSide = side ?? props.side;
|
24560
|
+
setStatus(effectiveSide, 'ok');
|
24561
|
+
nextTick(() => {
|
24562
|
+
setScrollAmount(getScrollSize() - previousScrollSize + getScrollAmount());
|
24563
|
+
if (props.mode !== 'manual') {
|
24564
|
+
nextTick(() => {
|
24565
|
+
window.requestAnimationFrame(() => {
|
24566
|
+
window.requestAnimationFrame(() => {
|
24567
|
+
window.requestAnimationFrame(() => {
|
24568
|
+
if (effectiveSide === 'both') {
|
24569
|
+
intersecting('start');
|
24570
|
+
intersecting('end');
|
24571
|
+
} else {
|
24572
|
+
intersecting(effectiveSide);
|
24573
|
+
}
|
24574
|
+
});
|
24575
|
+
});
|
24576
|
+
});
|
24577
|
+
});
|
24578
|
+
}
|
24579
|
+
});
|
24580
|
+
}
|
24581
|
+
return {
|
24582
|
+
reset
|
24583
|
+
};
|
24333
24584
|
}
|
24334
24585
|
});
|
24335
24586
|
|
@@ -24409,8 +24660,47 @@ const VItem = genericComponent()({
|
|
24409
24660
|
}
|
24410
24661
|
});
|
24411
24662
|
|
24412
|
-
|
24413
|
-
|
24663
|
+
const makeVKbdProps = propsFactory({
|
24664
|
+
...makeBorderProps(),
|
24665
|
+
...makeComponentProps(),
|
24666
|
+
...makeRoundedProps(),
|
24667
|
+
...makeTagProps({
|
24668
|
+
tag: 'kbd'
|
24669
|
+
}),
|
24670
|
+
...makeThemeProps(),
|
24671
|
+
...makeElevationProps(),
|
24672
|
+
color: String
|
24673
|
+
}, 'VKbd');
|
24674
|
+
const VKbd = genericComponent()({
|
24675
|
+
name: 'VKbd',
|
24676
|
+
props: makeVKbdProps(),
|
24677
|
+
setup(props, _ref) {
|
24678
|
+
let {
|
24679
|
+
slots
|
24680
|
+
} = _ref;
|
24681
|
+
const {
|
24682
|
+
themeClasses
|
24683
|
+
} = provideTheme(props);
|
24684
|
+
const {
|
24685
|
+
borderClasses
|
24686
|
+
} = useBorder(props);
|
24687
|
+
const {
|
24688
|
+
roundedClasses
|
24689
|
+
} = useRounded(props);
|
24690
|
+
const {
|
24691
|
+
backgroundColorClasses,
|
24692
|
+
backgroundColorStyles
|
24693
|
+
} = useBackgroundColor(() => props.color);
|
24694
|
+
const {
|
24695
|
+
elevationClasses
|
24696
|
+
} = useElevation(props);
|
24697
|
+
useRender(() => createVNode(props.tag, {
|
24698
|
+
"class": normalizeClass(['v-kbd', themeClasses.value, backgroundColorClasses.value, borderClasses.value, elevationClasses.value, roundedClasses.value, props.class]),
|
24699
|
+
"style": normalizeStyle([backgroundColorStyles.value, props.style])
|
24700
|
+
}, slots));
|
24701
|
+
return {};
|
24702
|
+
}
|
24703
|
+
});
|
24414
24704
|
|
24415
24705
|
const makeVLayoutProps = propsFactory({
|
24416
24706
|
...makeComponentProps(),
|
@@ -25248,6 +25538,14 @@ const makeVNumberInputProps = propsFactory({
|
|
25248
25538
|
type: Number,
|
25249
25539
|
default: 0
|
25250
25540
|
},
|
25541
|
+
minFractionDigits: {
|
25542
|
+
type: Number,
|
25543
|
+
default: null
|
25544
|
+
},
|
25545
|
+
decimalSeparator: {
|
25546
|
+
type: String,
|
25547
|
+
validator: v => !v || v.length === 1
|
25548
|
+
},
|
25251
25549
|
...omit(makeVTextFieldProps(), ['modelValue', 'validationValue'])
|
25252
25550
|
}, 'VNumberInput');
|
25253
25551
|
const VNumberInput = genericComponent()({
|
@@ -25273,11 +25571,24 @@ const VNumberInput = genericComponent()({
|
|
25273
25571
|
const form = useForm(props);
|
25274
25572
|
const controlsDisabled = computed(() => form.isDisabled.value || form.isReadonly.value);
|
25275
25573
|
const isFocused = shallowRef(props.focused);
|
25574
|
+
const {
|
25575
|
+
decimalSeparator: decimalSeparatorFromLocale
|
25576
|
+
} = useLocale();
|
25577
|
+
const decimalSeparator = computed(() => props.decimalSeparator?.[0] || decimalSeparatorFromLocale.value);
|
25276
25578
|
function correctPrecision(val) {
|
25277
25579
|
let precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : props.precision;
|
25580
|
+
let trim = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
25278
25581
|
const fixed = precision == null ? String(val) : val.toFixed(precision);
|
25279
|
-
|
25280
|
-
|
25582
|
+
if (isFocused.value && trim) {
|
25583
|
+
return Number(fixed).toString() // trim zeros
|
25584
|
+
.replace('.', decimalSeparator.value);
|
25585
|
+
}
|
25586
|
+
if (props.minFractionDigits === null || precision !== null && precision < props.minFractionDigits) {
|
25587
|
+
return fixed.replace('.', decimalSeparator.value);
|
25588
|
+
}
|
25589
|
+
let [baseDigits, fractionDigits] = fixed.split('.');
|
25590
|
+
fractionDigits = (fractionDigits ?? '').padEnd(props.minFractionDigits, '0').replace(new RegExp(`(?<=\\d{${props.minFractionDigits}})0`, 'g'), '');
|
25591
|
+
return [baseDigits, fractionDigits].filter(Boolean).join(decimalSeparator.value);
|
25281
25592
|
}
|
25282
25593
|
const model = useProxiedModel(props, 'modelValue', null, val => val ?? null, val => val == null ? val ?? null : clamp(Number(val), props.min, props.max));
|
25283
25594
|
const _inputText = shallowRef(null);
|
@@ -25294,8 +25605,11 @@ const VNumberInput = genericComponent()({
|
|
25294
25605
|
if (val === null || val === '') {
|
25295
25606
|
model.value = null;
|
25296
25607
|
_inputText.value = null;
|
25297
|
-
|
25298
|
-
|
25608
|
+
return;
|
25609
|
+
}
|
25610
|
+
const parsedValue = Number(val.replace(decimalSeparator.value, '.'));
|
25611
|
+
if (!isNaN(parsedValue) && parsedValue <= props.max && parsedValue >= props.min) {
|
25612
|
+
model.value = parsedValue;
|
25299
25613
|
_inputText.value = val;
|
25300
25614
|
}
|
25301
25615
|
}
|
@@ -25332,6 +25646,7 @@ const VNumberInput = genericComponent()({
|
|
25332
25646
|
}
|
25333
25647
|
};
|
25334
25648
|
watch(() => props.precision, () => formatInputValue());
|
25649
|
+
watch(() => props.minFractionDigits, () => formatInputValue());
|
25335
25650
|
onMounted(() => {
|
25336
25651
|
clampModel();
|
25337
25652
|
});
|
@@ -25365,24 +25680,24 @@ const VNumberInput = genericComponent()({
|
|
25365
25680
|
selectionEnd
|
25366
25681
|
} = inputElement ?? {};
|
25367
25682
|
const potentialNewInputVal = existingTxt ? existingTxt.slice(0, selectionStart) + e.data + existingTxt.slice(selectionEnd) : e.data;
|
25368
|
-
const potentialNewNumber = extractNumber(potentialNewInputVal, props.precision);
|
25683
|
+
const potentialNewNumber = extractNumber(potentialNewInputVal, props.precision, decimalSeparator.value);
|
25369
25684
|
|
25370
|
-
//
|
25371
|
-
//
|
25372
|
-
//
|
25373
|
-
if (
|
25685
|
+
// Allow only numbers, "-" and {decimal separator}
|
25686
|
+
// Allow "-" and {decimal separator} only once
|
25687
|
+
// Allow "-" only at the start
|
25688
|
+
if (!new RegExp(`^-?\\d*${escapeForRegex(decimalSeparator.value)}?\\d*$`).test(potentialNewInputVal)) {
|
25374
25689
|
e.preventDefault();
|
25375
25690
|
inputElement.value = potentialNewNumber;
|
25376
25691
|
}
|
25377
25692
|
if (props.precision == null) return;
|
25378
25693
|
|
25379
25694
|
// Ignore decimal digits above precision limit
|
25380
|
-
if (potentialNewInputVal.split(
|
25695
|
+
if (potentialNewInputVal.split(decimalSeparator.value)[1]?.length > props.precision) {
|
25381
25696
|
e.preventDefault();
|
25382
25697
|
inputElement.value = potentialNewNumber;
|
25383
25698
|
}
|
25384
25699
|
// Ignore decimal separator when precision = 0
|
25385
|
-
if (props.precision === 0 && potentialNewInputVal.includes(
|
25700
|
+
if (props.precision === 0 && potentialNewInputVal.includes(decimalSeparator.value)) {
|
25386
25701
|
e.preventDefault();
|
25387
25702
|
inputElement.value = potentialNewNumber;
|
25388
25703
|
}
|
@@ -25434,19 +25749,16 @@ const VNumberInput = genericComponent()({
|
|
25434
25749
|
if (controlsDisabled.value) return;
|
25435
25750
|
if (!vTextFieldRef.value) return;
|
25436
25751
|
const actualText = vTextFieldRef.value.value;
|
25437
|
-
|
25438
|
-
|
25752
|
+
const parsedValue = Number(actualText.replace(decimalSeparator.value, '.'));
|
25753
|
+
if (actualText && !isNaN(parsedValue)) {
|
25754
|
+
inputText.value = correctPrecision(clamp(parsedValue, props.min, props.max));
|
25439
25755
|
} else {
|
25440
25756
|
inputText.value = null;
|
25441
25757
|
}
|
25442
25758
|
}
|
25443
25759
|
function formatInputValue() {
|
25444
25760
|
if (controlsDisabled.value) return;
|
25445
|
-
|
25446
|
-
inputText.value = null;
|
25447
|
-
return;
|
25448
|
-
}
|
25449
|
-
inputText.value = props.precision == null ? String(model.value) : model.value.toFixed(props.precision);
|
25761
|
+
inputText.value = model.value !== null && !isNaN(model.value) ? correctPrecision(model.value, props.precision, false) : null;
|
25450
25762
|
}
|
25451
25763
|
function trimDecimalZeros() {
|
25452
25764
|
if (controlsDisabled.value) return;
|
@@ -25454,7 +25766,7 @@ const VNumberInput = genericComponent()({
|
|
25454
25766
|
inputText.value = null;
|
25455
25767
|
return;
|
25456
25768
|
}
|
25457
|
-
inputText.value = model.value.toString();
|
25769
|
+
inputText.value = model.value.toString().replace('.', decimalSeparator.value);
|
25458
25770
|
}
|
25459
25771
|
function onFocus() {
|
25460
25772
|
trimDecimalZeros();
|
@@ -25721,9 +26033,10 @@ const VOtpInput = genericComponent()({
|
|
25721
26033
|
e.preventDefault();
|
25722
26034
|
e.stopPropagation();
|
25723
26035
|
const clipboardText = e?.clipboardData?.getData('Text').trim().slice(0, length.value) ?? '';
|
26036
|
+
const finalIndex = clipboardText.length - 1 === -1 ? index : clipboardText.length - 1;
|
25724
26037
|
if (isValidNumber(clipboardText)) return;
|
25725
26038
|
model.value = clipboardText.split('');
|
25726
|
-
inputRef.value?.[
|
26039
|
+
inputRef.value?.[finalIndex].focus();
|
25727
26040
|
}
|
25728
26041
|
function reset() {
|
25729
26042
|
model.value = [];
|
@@ -29507,7 +29820,7 @@ function createVuetify$1() {
|
|
29507
29820
|
};
|
29508
29821
|
});
|
29509
29822
|
}
|
29510
|
-
const version$1 = "3.8.
|
29823
|
+
const version$1 = "3.8.10-dev.2025-06-18";
|
29511
29824
|
createVuetify$1.version = version$1;
|
29512
29825
|
|
29513
29826
|
// Vue's inject() can only be used in setup
|
@@ -29532,7 +29845,7 @@ const createVuetify = function () {
|
|
29532
29845
|
...options
|
29533
29846
|
});
|
29534
29847
|
};
|
29535
|
-
const version = "3.8.
|
29848
|
+
const version = "3.8.10-dev.2025-06-18";
|
29536
29849
|
createVuetify.version = version;
|
29537
29850
|
|
29538
29851
|
export { index as blueprints, components, createVuetify, directives, useDate, useDefaults, useDisplay, useGoTo, useLayout, useLocale, useRtl, useTheme, version };
|