@vuetify/nightly 3.8.1-master.2025-04-16 → 3.8.1-next.2025-04-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 +36 -32
- package/dist/json/attributes.json +2908 -2908
- package/dist/json/importMap-labs.json +24 -24
- package/dist/json/importMap.json +176 -176
- package/dist/json/web-types.json +5479 -5439
- package/dist/vuetify-labs.cjs +346 -197
- package/dist/vuetify-labs.css +26018 -27768
- package/dist/vuetify-labs.d.ts +243 -646
- package/dist/vuetify-labs.esm.js +347 -198
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +346 -197
- package/dist/vuetify-labs.min.css +3 -4
- package/dist/vuetify.cjs +328 -173
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +22735 -24481
- package/dist/vuetify.d.ts +281 -684
- package/dist/vuetify.esm.js +329 -174
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +328 -173
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +3 -4
- package/dist/vuetify.min.js +1152 -1161
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/md3.js +5 -18
- package/lib/blueprints/md3.js.map +1 -1
- package/lib/components/VAlert/VAlert.css +207 -215
- package/lib/components/VApp/VApp.css +16 -15
- package/lib/components/VAppBar/VAppBar.css +14 -12
- package/lib/components/VAutocomplete/VAutocomplete.css +85 -84
- package/lib/components/VAutocomplete/VAutocomplete.d.ts +18 -9
- package/lib/components/VAutocomplete/VAutocomplete.js +6 -3
- package/lib/components/VAutocomplete/VAutocomplete.js.map +1 -1
- package/lib/components/VAvatar/VAvatar.css +108 -106
- package/lib/components/VBadge/VBadge.css +77 -77
- package/lib/components/VBanner/VBanner.css +161 -166
- package/lib/components/VBottomNavigation/VBottomNavigation.css +65 -64
- package/lib/components/VBottomSheet/VBottomSheet.css +34 -31
- package/lib/components/VBreadcrumbs/VBreadcrumbs.css +54 -57
- package/lib/components/VBtn/VBtn.css +372 -408
- package/lib/components/VBtn/VBtn.sass +10 -23
- package/lib/components/VBtn/_variables.scss +1 -1
- package/lib/components/VBtnGroup/VBtnGroup.css +63 -64
- package/lib/components/VBtnToggle/VBtnToggle.css +16 -14
- package/lib/components/VCard/VCard.css +294 -302
- package/lib/components/VCarousel/VCarousel.css +63 -65
- package/lib/components/VCarousel/VCarousel.sass +1 -1
- package/lib/components/VCheckbox/VCheckbox.css +7 -5
- package/lib/components/VChip/VChip.css +378 -411
- package/lib/components/VChipGroup/VChipGroup.css +19 -18
- package/lib/components/VCode/VCode.css +10 -11
- package/lib/components/VCode/VCode.sass +0 -3
- package/lib/components/VColorPicker/VColorPicker.css +23 -23
- package/lib/components/VColorPicker/VColorPickerCanvas.css +24 -22
- package/lib/components/VColorPicker/VColorPickerEdit.css +29 -28
- package/lib/components/VColorPicker/VColorPickerPreview.css +69 -67
- package/lib/components/VColorPicker/VColorPickerPreview.sass +4 -2
- package/lib/components/VColorPicker/VColorPickerSwatches.css +34 -34
- package/lib/components/VCombobox/VCombobox.css +85 -84
- package/lib/components/VCombobox/VCombobox.d.ts +18 -9
- package/lib/components/VCombobox/VCombobox.js +6 -3
- package/lib/components/VCombobox/VCombobox.js.map +1 -1
- package/lib/components/VCounter/VCounter.css +7 -5
- package/lib/components/VDataTable/VDataTable.css +189 -186
- package/lib/components/VDataTable/VDataTable.sass +21 -11
- package/lib/components/VDataTable/VDataTableFooter.css +33 -31
- package/lib/components/VDatePicker/VDatePicker.css +8 -6
- package/lib/components/VDatePicker/VDatePicker.d.ts +7 -7
- package/lib/components/VDatePicker/VDatePickerControls.css +55 -57
- package/lib/components/VDatePicker/VDatePickerHeader.css +56 -60
- package/lib/components/VDatePicker/VDatePickerMonth.css +51 -55
- package/lib/components/VDatePicker/VDatePickerMonth.d.ts +7 -7
- package/lib/components/VDatePicker/VDatePickerMonths.css +20 -19
- package/lib/components/VDatePicker/VDatePickerYears.css +16 -15
- package/lib/components/VDialog/VDialog.css +98 -98
- package/lib/components/VDivider/VDivider.css +52 -52
- package/lib/components/VEmptyState/VEmptyState.css +62 -67
- package/lib/components/VExpansionPanel/VExpansionPanel.css +203 -209
- package/lib/components/VExpansionPanel/VExpansionPanel.sass +27 -25
- package/lib/components/VFab/VFab.css +78 -73
- package/lib/components/VFab/VFab.sass +5 -4
- package/lib/components/VField/VField.css +541 -589
- package/lib/components/VField/VField.sass +4 -11
- package/lib/components/VField/_variables.scss +1 -1
- package/lib/components/VFileInput/VFileInput.css +30 -28
- package/lib/components/VFooter/VFooter.css +38 -36
- package/lib/components/VForm/VForm.d.ts +111 -531
- package/lib/components/VForm/VForm.js +11 -1
- package/lib/components/VForm/VForm.js.map +1 -1
- package/lib/components/VGrid/VGrid.css +565 -592
- package/lib/components/VIcon/VIcon.css +52 -53
- package/lib/components/VImg/VImg.css +50 -51
- package/lib/components/VInfiniteScroll/VInfiniteScroll.css +36 -37
- package/lib/components/VInput/VInput.css +136 -147
- package/lib/components/VItemGroup/VItemGroup.css +7 -5
- package/lib/components/VKbd/VKbd.css +13 -11
- package/lib/components/VLabel/VLabel.css +16 -15
- package/lib/components/VLayout/VLayout.css +10 -8
- package/lib/components/VLayout/VLayoutItem.css +8 -7
- package/lib/components/VList/VList.css +104 -108
- package/lib/components/VList/VList.sass +1 -1
- package/lib/components/VList/VListItem.css +440 -452
- package/lib/components/VList/VListItem.sass +2 -1
- package/lib/components/VLocaleProvider/VLocaleProvider.css +4 -2
- package/lib/components/VMain/VMain.css +32 -30
- package/lib/components/VMenu/VMenu.css +21 -19
- package/lib/components/VMessages/VMessages.css +17 -15
- package/lib/components/VNavigationDrawer/VNavigationDrawer.css +102 -104
- package/lib/components/VNumberInput/VNumberInput.css +48 -46
- package/lib/components/VOtpInput/VOtpInput.css +56 -58
- package/lib/components/VOverlay/VOverlay.css +61 -64
- package/lib/components/VOverlay/VOverlay.sass +14 -13
- package/lib/components/VPagination/VPagination.css +10 -8
- package/lib/components/VParallax/VParallax.css +8 -6
- package/lib/components/VProgressCircular/VProgressCircular.css +95 -101
- package/lib/components/VProgressLinear/VProgressLinear.css +209 -222
- package/lib/components/VRadioGroup/VRadioGroup.css +14 -12
- package/lib/components/VRating/VRating.css +52 -53
- package/lib/components/VResponsive/VResponsive.css +25 -26
- package/lib/components/VSelect/VSelect.css +53 -51
- package/lib/components/VSelect/VSelect.d.ts +18 -9
- package/lib/components/VSelect/VSelect.js +6 -3
- package/lib/components/VSelect/VSelect.js.map +1 -1
- package/lib/components/VSelectionControl/VSelectionControl.css +98 -100
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.css +10 -8
- package/lib/components/VSheet/VSheet.css +38 -36
- package/lib/components/VSkeletonLoader/VSkeletonLoader.css +225 -224
- package/lib/components/VSlideGroup/VSlideGroup.css +53 -55
- package/lib/components/VSlider/VSlider.css +53 -57
- package/lib/components/VSlider/VSliderThumb.css +142 -153
- package/lib/components/VSlider/VSliderTrack.css +155 -174
- package/lib/components/VSnackbar/VSnackbar.css +140 -140
- package/lib/components/VSpeedDial/VSpeedDial.css +43 -41
- package/lib/components/VStepper/VStepper.css +55 -56
- package/lib/components/VStepper/VStepperItem.css +112 -115
- package/lib/components/VSwitch/VSwitch.css +129 -139
- package/lib/components/VSystemBar/VSystemBar.css +45 -43
- package/lib/components/VTable/VTable.css +140 -141
- package/lib/components/VTable/VTable.sass +4 -2
- package/lib/components/VTabs/VTab.css +30 -29
- package/lib/components/VTabs/VTabs.css +59 -65
- package/lib/components/VTextField/VTextField.css +77 -85
- package/lib/components/VTextarea/VTextarea.css +48 -40
- package/lib/components/VTextarea/VTextarea.sass +4 -2
- package/lib/components/VThemeProvider/VThemeProvider.css +5 -3
- package/lib/components/VTimeline/VTimeline.css +388 -427
- package/lib/components/VToolbar/VToolbar.css +137 -144
- package/lib/components/VTooltip/VTooltip.css +27 -23
- package/lib/components/VTooltip/VTooltip.sass +8 -6
- package/lib/components/VVirtualScroll/VVirtualScroll.css +11 -9
- package/lib/components/VWindow/VWindow.css +73 -70
- package/lib/composables/calendar.d.ts +2 -2
- package/lib/composables/calendar.js +7 -5
- package/lib/composables/calendar.js.map +1 -1
- package/lib/composables/date/DateAdapter.d.ts +0 -1
- package/lib/composables/date/DateAdapter.js.map +1 -1
- package/lib/composables/date/adapters/vuetify.d.ts +0 -1
- package/lib/composables/date/adapters/vuetify.js +160 -101
- package/lib/composables/date/adapters/vuetify.js.map +1 -1
- package/lib/composables/date/date.d.ts +1 -1
- package/lib/composables/date/date.js +20 -0
- package/lib/composables/date/date.js.map +1 -1
- package/lib/composables/filter.js +1 -2
- package/lib/composables/filter.js.map +1 -1
- package/lib/composables/theme.d.ts +6 -1
- package/lib/composables/theme.js +98 -30
- package/lib/composables/theme.js.map +1 -1
- package/lib/composables/validation.js +0 -5
- package/lib/composables/validation.js.map +1 -1
- package/lib/composables/virtual.js +6 -1
- package/lib/composables/virtual.js.map +1 -1
- package/lib/directives/ripple/VRipple.css +38 -36
- package/lib/entry-bundler.d.ts +0 -1
- package/lib/entry-bundler.js +1 -1
- package/lib/entry-bundler.js.map +1 -1
- package/lib/framework.d.ts +70 -68
- package/lib/framework.js +1 -1
- package/lib/framework.js.map +1 -1
- package/lib/labs/VCalendar/VCalendar.css +219 -225
- package/lib/labs/VCalendar/VCalendar.d.ts +7 -7
- package/lib/labs/VCalendar/VCalendarDay.css +33 -32
- package/lib/labs/VCalendar/VCalendarHeader.css +13 -13
- package/lib/labs/VCalendar/VCalendarInterval.css +43 -42
- package/lib/labs/VCalendar/VCalendarInterval.js +19 -25
- package/lib/labs/VCalendar/VCalendarInterval.js.map +1 -1
- package/lib/labs/VCalendar/VCalendarIntervalEvent.css +7 -5
- package/lib/labs/VCalendar/VCalendarMonthDay.css +61 -58
- package/lib/labs/VCalendar/VCalendarMonthDay.sass +3 -2
- package/lib/labs/VDateInput/VDateInput.d.ts +7 -7
- package/lib/labs/VFileUpload/VFileUpload.css +74 -77
- package/lib/labs/VIconBtn/VIconBtn.css +162 -164
- package/lib/labs/VPicker/VPicker.css +58 -63
- package/lib/labs/VTimePicker/VTimePicker.css +9 -7
- package/lib/labs/VTimePicker/VTimePickerClock.css +126 -129
- package/lib/labs/VTimePicker/VTimePickerControls.css +102 -103
- package/lib/labs/VTreeview/VTreeviewItem.css +30 -28
- package/lib/labs/VTreeview/VTreeviewItem.sass +3 -2
- package/lib/labs/entry-bundler.d.ts +0 -1
- package/lib/styles/elements/_global.sass +1 -1
- package/lib/styles/generic/_colors.scss +3 -3
- package/lib/styles/generic/_layers.scss +13 -1
- package/lib/styles/generic/_reset.scss +0 -1
- package/lib/styles/generic/_transitions.scss +32 -32
- package/lib/styles/main.css +14668 -16143
- package/lib/styles/settings/_utilities.scss +0 -5
- package/lib/styles/settings/_variables.scss +2 -3
- package/lib/styles/tools/_border.sass +4 -4
- package/lib/styles/tools/_display.sass +0 -10
- package/lib/styles/tools/_elevation.sass +2 -2
- package/lib/styles/tools/_index.sass +0 -2
- package/lib/styles/tools/_layer.scss +4 -2
- package/lib/styles/tools/_position.sass +2 -2
- package/lib/styles/tools/_rounded.sass +2 -2
- package/lib/styles/tools/_utilities.sass +1 -5
- package/lib/styles/utilities/_elevation.scss +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/package.json +45 -46
- package/lib/styles/tools/_bootable.sass +0 -3
- package/lib/styles/tools/_radius.sass +0 -10
package/dist/vuetify.esm.js
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
/*!
|
2
|
-
* Vuetify v3.8.1-
|
2
|
+
* Vuetify v3.8.1-next.2025-04-18
|
3
3
|
* Forged by John Leider
|
4
4
|
* Released under the MIT License.
|
5
5
|
*/
|
6
6
|
|
7
|
-
import { shallowRef, reactive, computed, watchEffect, toRefs, capitalize, unref, Fragment, isVNode, Comment, warn, getCurrentInstance as getCurrentInstance$1, ref, provide, inject as inject$1, defineComponent as defineComponent$1, h, camelize, createVNode, mergeProps, onBeforeUnmount, watch, readonly, onMounted, useId, onDeactivated, onActivated, onScopeDispose, effectScope, toRaw, TransitionGroup, Transition, isRef, toRef, onBeforeMount, nextTick, withDirectives, resolveDirective, vShow, onUpdated, Text, resolveDynamicComponent, toDisplayString, markRaw, Teleport, cloneVNode, createTextVNode, onUnmounted, onBeforeUpdate, withModifiers, vModelText, resolveComponent, render } from 'vue';
|
7
|
+
import { shallowRef, reactive, computed, watchEffect, toRefs, capitalize, unref, Fragment, isVNode, Comment, warn, getCurrentInstance as getCurrentInstance$1, ref, provide, inject as inject$1, defineComponent as defineComponent$1, h, camelize, createVNode, mergeProps, onBeforeUnmount, watch, readonly, onMounted, useId, onDeactivated, onActivated, onScopeDispose, effectScope, toRaw, getCurrentScope, TransitionGroup, Transition, isRef, toRef, onBeforeMount, nextTick, withDirectives, resolveDirective, vShow, onUpdated, Text, resolveDynamicComponent, toDisplayString, markRaw, Teleport, cloneVNode, createTextVNode, onUnmounted, onBeforeUpdate, withModifiers, vModelText, resolveComponent, render } from 'vue';
|
8
8
|
|
9
9
|
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"); }
|
@@ -1936,7 +1937,7 @@ const md3 = {
|
|
1936
1937
|
flat: true
|
1937
1938
|
},
|
1938
1939
|
VAutocomplete: {
|
1939
|
-
variant: '
|
1940
|
+
variant: 'filled'
|
1940
1941
|
},
|
1941
1942
|
VBanner: {
|
1942
1943
|
color: 'primary'
|
@@ -1965,10 +1966,7 @@ const md3 = {
|
|
1965
1966
|
rounded: 'sm'
|
1966
1967
|
},
|
1967
1968
|
VCombobox: {
|
1968
|
-
variant: '
|
1969
|
-
},
|
1970
|
-
VDateInput: {
|
1971
|
-
variant: 'outlined'
|
1969
|
+
variant: 'filled'
|
1972
1970
|
},
|
1973
1971
|
VDatePicker: {
|
1974
1972
|
controlHeight: 48,
|
@@ -1982,9 +1980,6 @@ const md3 = {
|
|
1982
1980
|
rounded: 'circle'
|
1983
1981
|
}
|
1984
1982
|
},
|
1985
|
-
VFileInput: {
|
1986
|
-
variant: 'outlined'
|
1987
|
-
},
|
1988
1983
|
VNavigationDrawer: {
|
1989
1984
|
// VList: {
|
1990
1985
|
// nav: true,
|
@@ -1993,15 +1988,8 @@ const md3 = {
|
|
1993
1988
|
// },
|
1994
1989
|
// },
|
1995
1990
|
},
|
1996
|
-
VNumberInput: {
|
1997
|
-
variant: 'outlined',
|
1998
|
-
VBtn: {
|
1999
|
-
color: undefined,
|
2000
|
-
rounded: undefined
|
2001
|
-
}
|
2002
|
-
},
|
2003
1991
|
VSelect: {
|
2004
|
-
variant: '
|
1992
|
+
variant: 'filled'
|
2005
1993
|
},
|
2006
1994
|
VSlider: {
|
2007
1995
|
color: 'primary'
|
@@ -2010,10 +1998,10 @@ const md3 = {
|
|
2010
1998
|
color: 'primary'
|
2011
1999
|
},
|
2012
2000
|
VTextarea: {
|
2013
|
-
variant: '
|
2001
|
+
variant: 'filled'
|
2014
2002
|
},
|
2015
2003
|
VTextField: {
|
2016
|
-
variant: '
|
2004
|
+
variant: 'filled'
|
2017
2005
|
},
|
2018
2006
|
VToolbar: {
|
2019
2007
|
VBtn: {
|
@@ -2766,7 +2754,8 @@ const makeThemeProps = propsFactory({
|
|
2766
2754
|
}, 'theme');
|
2767
2755
|
function genDefaults$1() {
|
2768
2756
|
return {
|
2769
|
-
defaultTheme: '
|
2757
|
+
defaultTheme: 'system',
|
2758
|
+
prefix: 'v-',
|
2770
2759
|
variations: {
|
2771
2760
|
colors: [],
|
2772
2761
|
lighten: 0,
|
@@ -2817,8 +2806,8 @@ function genDefaults$1() {
|
|
2817
2806
|
surface: '#212121',
|
2818
2807
|
'surface-bright': '#ccbfd6',
|
2819
2808
|
'surface-light': '#424242',
|
2820
|
-
'surface-variant': '#
|
2821
|
-
'on-surface-variant': '#
|
2809
|
+
'surface-variant': '#a3a3a3',
|
2810
|
+
'on-surface-variant': '#424242',
|
2822
2811
|
primary: '#2196F3',
|
2823
2812
|
'primary-darken-1': '#277CC1',
|
2824
2813
|
secondary: '#54B6B2',
|
@@ -2848,7 +2837,10 @@ function genDefaults$1() {
|
|
2848
2837
|
}
|
2849
2838
|
}
|
2850
2839
|
},
|
2851
|
-
stylesheetId: 'vuetify-theme-stylesheet'
|
2840
|
+
stylesheetId: 'vuetify-theme-stylesheet',
|
2841
|
+
scoped: false,
|
2842
|
+
unimportant: true,
|
2843
|
+
utilities: true
|
2852
2844
|
};
|
2853
2845
|
}
|
2854
2846
|
function parseThemeOptions() {
|
@@ -2871,21 +2863,21 @@ function parseThemeOptions() {
|
|
2871
2863
|
function createCssClass(lines, selector, content, scope) {
|
2872
2864
|
lines.push(`${getScopedSelector(selector, scope)} {\n`, ...content.map(line => ` ${line};\n`), '}\n');
|
2873
2865
|
}
|
2874
|
-
function genCssVariables(theme) {
|
2866
|
+
function genCssVariables(theme, prefix) {
|
2875
2867
|
const lightOverlay = theme.dark ? 2 : 1;
|
2876
2868
|
const darkOverlay = theme.dark ? 1 : 2;
|
2877
2869
|
const variables = [];
|
2878
2870
|
for (const [key, value] of Object.entries(theme.colors)) {
|
2879
2871
|
const rgb = parseColor(value);
|
2880
|
-
variables.push(
|
2872
|
+
variables.push(`--${prefix}theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`);
|
2881
2873
|
if (!key.startsWith('on-')) {
|
2882
|
-
variables.push(
|
2874
|
+
variables.push(`--${prefix}theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`);
|
2883
2875
|
}
|
2884
2876
|
}
|
2885
2877
|
for (const [key, value] of Object.entries(theme.variables)) {
|
2886
2878
|
const color = typeof value === 'string' && value.startsWith('#') ? parseColor(value) : undefined;
|
2887
2879
|
const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : undefined;
|
2888
|
-
variables.push(
|
2880
|
+
variables.push(`--${prefix}${key}: ${rgb ?? value}`);
|
2889
2881
|
}
|
2890
2882
|
return variables;
|
2891
2883
|
}
|
@@ -2929,7 +2921,8 @@ function getScopedSelector(selector, scope) {
|
|
2929
2921
|
const scopeSelector = `:where(${scope})`;
|
2930
2922
|
return selector === ':root' ? scopeSelector : `${scopeSelector} ${selector}`;
|
2931
2923
|
}
|
2932
|
-
function upsertStyles(
|
2924
|
+
function upsertStyles(id, cspNonce, styles) {
|
2925
|
+
const styleEl = getOrCreateStyleElement(id, cspNonce);
|
2933
2926
|
if (!styleEl) return;
|
2934
2927
|
styleEl.innerHTML = styles;
|
2935
2928
|
}
|
@@ -2949,8 +2942,17 @@ function getOrCreateStyleElement(id, cspNonce) {
|
|
2949
2942
|
// Composables
|
2950
2943
|
function createTheme(options) {
|
2951
2944
|
const parsedOptions = parseThemeOptions(options);
|
2952
|
-
const
|
2945
|
+
const _name = shallowRef(parsedOptions.defaultTheme);
|
2953
2946
|
const themes = ref(parsedOptions.themes);
|
2947
|
+
const systemName = shallowRef('light');
|
2948
|
+
const name = computed({
|
2949
|
+
get() {
|
2950
|
+
return _name.value === 'system' ? systemName.value : _name.value;
|
2951
|
+
},
|
2952
|
+
set(val) {
|
2953
|
+
_name.value = val;
|
2954
|
+
}
|
2955
|
+
});
|
2954
2956
|
const computedThemes = computed(() => {
|
2955
2957
|
const acc = {};
|
2956
2958
|
for (const [name, original] of Object.entries(themes.value)) {
|
@@ -2971,28 +2973,49 @@ function createTheme(options) {
|
|
2971
2973
|
const current = computed(() => computedThemes.value[name.value]);
|
2972
2974
|
const styles = computed(() => {
|
2973
2975
|
const lines = [];
|
2976
|
+
const important = parsedOptions.unimportant ? '' : ' !important';
|
2977
|
+
const scoped = parsedOptions.scoped ? parsedOptions.prefix : '';
|
2974
2978
|
if (current.value?.dark) {
|
2975
2979
|
createCssClass(lines, ':root', ['color-scheme: dark'], parsedOptions.scope);
|
2976
2980
|
}
|
2977
|
-
createCssClass(lines, ':root', genCssVariables(current.value), parsedOptions.scope);
|
2981
|
+
createCssClass(lines, ':root', genCssVariables(current.value, parsedOptions.prefix), parsedOptions.scope);
|
2978
2982
|
for (const [themeName, theme] of Object.entries(computedThemes.value)) {
|
2979
|
-
createCssClass(lines,
|
2980
|
-
}
|
2981
|
-
|
2982
|
-
|
2983
|
-
|
2984
|
-
|
2985
|
-
|
2986
|
-
|
2987
|
-
|
2988
|
-
|
2989
|
-
|
2990
|
-
|
2983
|
+
createCssClass(lines, `.${parsedOptions.prefix}theme--${themeName}`, [`color-scheme: ${theme.dark ? 'dark' : 'normal'}`, ...genCssVariables(theme, parsedOptions.prefix)], parsedOptions.scope);
|
2984
|
+
}
|
2985
|
+
if (parsedOptions.utilities) {
|
2986
|
+
const bgLines = [];
|
2987
|
+
const fgLines = [];
|
2988
|
+
const colors = new Set(Object.values(computedThemes.value).flatMap(theme => Object.keys(theme.colors)));
|
2989
|
+
for (const key of colors) {
|
2990
|
+
if (key.startsWith('on-')) {
|
2991
|
+
createCssClass(fgLines, `.${key}`, [`color: rgb(var(--${parsedOptions.prefix}theme-${key}))${important}`], parsedOptions.scope);
|
2992
|
+
} else {
|
2993
|
+
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);
|
2994
|
+
createCssClass(fgLines, `.${scoped}text-${key}`, [`color: rgb(var(--${parsedOptions.prefix}theme-${key}))${important}`], parsedOptions.scope);
|
2995
|
+
createCssClass(fgLines, `.${scoped}border-${key}`, [`--${parsedOptions.prefix}border-color: var(--${parsedOptions.prefix}theme-${key})`], parsedOptions.scope);
|
2996
|
+
}
|
2991
2997
|
}
|
2998
|
+
lines.push(...bgLines, ...fgLines);
|
2992
2999
|
}
|
2993
|
-
lines.
|
2994
|
-
return lines.map((str, i) => i === 0 ? str : ` ${str}`).join('');
|
3000
|
+
return '@layer vuetify.theme {\n' + lines.map(v => ` ${v}`).join('') + '\n}';
|
2995
3001
|
});
|
3002
|
+
const themeClasses = computed(() => parsedOptions.isDisabled ? undefined : `${parsedOptions.prefix}theme--${name.value}`);
|
3003
|
+
const themeNames = computed(() => Object.keys(computedThemes.value));
|
3004
|
+
if (SUPPORTS_MATCH_MEDIA) {
|
3005
|
+
const media = window.matchMedia('(prefers-color-scheme: dark)');
|
3006
|
+
function updateSystemName() {
|
3007
|
+
systemName.value = media.matches ? 'dark' : 'light';
|
3008
|
+
}
|
3009
|
+
updateSystemName();
|
3010
|
+
media.addEventListener('change', updateSystemName, {
|
3011
|
+
passive: true
|
3012
|
+
});
|
3013
|
+
if (getCurrentScope()) {
|
3014
|
+
onScopeDispose(() => {
|
3015
|
+
media.removeEventListener('change', updateSystemName);
|
3016
|
+
});
|
3017
|
+
}
|
3018
|
+
}
|
2996
3019
|
function install(app) {
|
2997
3020
|
if (parsedOptions.isDisabled) return;
|
2998
3021
|
const head = app._context.provides.usehead;
|
@@ -3030,22 +3053,55 @@ function createTheme(options) {
|
|
3030
3053
|
updateStyles();
|
3031
3054
|
}
|
3032
3055
|
function updateStyles() {
|
3033
|
-
upsertStyles(
|
3056
|
+
upsertStyles(parsedOptions.stylesheetId, parsedOptions.cspNonce, styles.value);
|
3034
3057
|
}
|
3035
3058
|
}
|
3036
3059
|
}
|
3037
|
-
|
3060
|
+
function change(themeName) {
|
3061
|
+
if (!themeNames.value.includes(themeName)) {
|
3062
|
+
consoleWarn(`Theme "${themeName}" not found on the Vuetify theme instance`);
|
3063
|
+
return;
|
3064
|
+
}
|
3065
|
+
name.value = themeName;
|
3066
|
+
}
|
3067
|
+
function cycle() {
|
3068
|
+
let themeArray = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : themeNames.value;
|
3069
|
+
const currentIndex = themeArray.indexOf(name.value);
|
3070
|
+
const nextIndex = currentIndex === -1 ? 0 : (currentIndex + 1) % themeArray.length;
|
3071
|
+
change(themeArray[nextIndex]);
|
3072
|
+
}
|
3073
|
+
function toggle() {
|
3074
|
+
let themeArray = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['light', 'dark'];
|
3075
|
+
cycle(themeArray);
|
3076
|
+
}
|
3077
|
+
const globalName = new Proxy(name, {
|
3078
|
+
get(target, prop) {
|
3079
|
+
return target[prop];
|
3080
|
+
},
|
3081
|
+
set(target, prop, val) {
|
3082
|
+
if (prop === 'value') {
|
3083
|
+
deprecate(`theme.global.name.value = ${val}`, `theme.change('${val}')`);
|
3084
|
+
}
|
3085
|
+
// @ts-expect-error
|
3086
|
+
target[prop] = val;
|
3087
|
+
return true;
|
3088
|
+
}
|
3089
|
+
});
|
3038
3090
|
return {
|
3039
3091
|
install,
|
3092
|
+
change,
|
3093
|
+
cycle,
|
3094
|
+
toggle,
|
3040
3095
|
isDisabled: parsedOptions.isDisabled,
|
3041
3096
|
name,
|
3042
3097
|
themes,
|
3043
3098
|
current,
|
3044
3099
|
computedThemes,
|
3100
|
+
prefix: parsedOptions.prefix,
|
3045
3101
|
themeClasses,
|
3046
3102
|
styles,
|
3047
3103
|
global: {
|
3048
|
-
name,
|
3104
|
+
name: globalName,
|
3049
3105
|
current
|
3050
3106
|
}
|
3051
3107
|
};
|
@@ -3056,7 +3112,7 @@ function provideTheme(props) {
|
|
3056
3112
|
if (!theme) throw new Error('Could not find Vuetify theme injection');
|
3057
3113
|
const name = computed(() => props.theme ?? theme.name.value);
|
3058
3114
|
const current = computed(() => theme.themes.value[name.value]);
|
3059
|
-
const themeClasses = computed(() => theme.isDisabled ? undefined :
|
3115
|
+
const themeClasses = computed(() => theme.isDisabled ? undefined : `${theme.prefix}theme--${name.value}`);
|
3060
3116
|
const newTheme = {
|
3061
3117
|
...theme,
|
3062
3118
|
name,
|
@@ -7172,11 +7228,6 @@ function useValidation(props) {
|
|
7172
7228
|
}
|
7173
7229
|
async function validate() {
|
7174
7230
|
let silent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
7175
|
-
if (props.disabled || props.readonly) {
|
7176
|
-
internalErrorMessages.value = [];
|
7177
|
-
isValidating.value = false;
|
7178
|
-
return internalErrorMessages.value;
|
7179
|
-
}
|
7180
7231
|
const results = [];
|
7181
7232
|
isValidating.value = true;
|
7182
7233
|
for (const rule of props.rules) {
|
@@ -12586,7 +12637,12 @@ function useVirtual(props, items) {
|
|
12586
12637
|
}
|
12587
12638
|
function calculateOffset(index) {
|
12588
12639
|
index = clamp(index, 0, items.value.length - 1);
|
12589
|
-
|
12640
|
+
const whole = Math.floor(index);
|
12641
|
+
const fraction = index % 1;
|
12642
|
+
const next = whole + 1;
|
12643
|
+
const wholeOffset = offsets[whole] || 0;
|
12644
|
+
const nextOffset = offsets[next] || wholeOffset;
|
12645
|
+
return wholeOffset + (nextOffset - wholeOffset) * fraction;
|
12590
12646
|
}
|
12591
12647
|
function calculateIndex(scrollTop) {
|
12592
12648
|
return binaryClosest(offsets, scrollTop);
|
@@ -13215,7 +13271,8 @@ const VSelect = genericComponent()({
|
|
13215
13271
|
onClick: () => select(item, null)
|
13216
13272
|
});
|
13217
13273
|
return slots.item?.({
|
13218
|
-
item,
|
13274
|
+
item: item.raw,
|
13275
|
+
internalItem: item,
|
13219
13276
|
index,
|
13220
13277
|
props: itemProps
|
13221
13278
|
}) ?? createVNode(VListItem, mergeProps(itemProps, {
|
@@ -13263,11 +13320,13 @@ const VSelect = genericComponent()({
|
|
13263
13320
|
};
|
13264
13321
|
const hasSlot = hasChips ? !!slots.chip : !!slots.selection;
|
13265
13322
|
const slotContent = hasSlot ? ensureValidVNode(hasChips ? slots.chip({
|
13266
|
-
item,
|
13323
|
+
item: item.raw,
|
13324
|
+
internalItem: item,
|
13267
13325
|
index,
|
13268
13326
|
props: slotProps
|
13269
13327
|
}) : slots.selection({
|
13270
|
-
item,
|
13328
|
+
item: item.raw,
|
13329
|
+
internalItem: item,
|
13271
13330
|
index
|
13272
13331
|
})) : undefined;
|
13273
13332
|
if (hasSlot && !slotContent) return undefined;
|
@@ -13333,7 +13392,6 @@ const VSelect = genericComponent()({
|
|
13333
13392
|
// Composables
|
13334
13393
|
const defaultFilter = (value, query, item) => {
|
13335
13394
|
if (value == null || query == null) return -1;
|
13336
|
-
if (!query.length) return 0;
|
13337
13395
|
value = value.toString().toLocaleLowerCase();
|
13338
13396
|
query = query.toString().toLocaleLowerCase();
|
13339
13397
|
const result = [];
|
@@ -13346,7 +13404,7 @@ const defaultFilter = (value, query, item) => {
|
|
13346
13404
|
};
|
13347
13405
|
function normaliseMatch(match, query) {
|
13348
13406
|
if (match == null || typeof match === 'boolean' || match === -1) return;
|
13349
|
-
if (typeof match === 'number') return [[match,
|
13407
|
+
if (typeof match === 'number') return [[match, query.length]];
|
13350
13408
|
if (Array.isArray(match[0])) return match;
|
13351
13409
|
return [match];
|
13352
13410
|
}
|
@@ -13814,7 +13872,8 @@ const VAutocomplete = genericComponent()({
|
|
13814
13872
|
onClick: () => select(item, null)
|
13815
13873
|
});
|
13816
13874
|
return slots.item?.({
|
13817
|
-
item,
|
13875
|
+
item: item.raw,
|
13876
|
+
internalItem: item,
|
13818
13877
|
index,
|
13819
13878
|
props: itemProps
|
13820
13879
|
}) ?? createVNode(VListItem, mergeProps(itemProps, {
|
@@ -13865,11 +13924,13 @@ const VAutocomplete = genericComponent()({
|
|
13865
13924
|
};
|
13866
13925
|
const hasSlot = hasChips.value ? !!slots.chip : !!slots.selection;
|
13867
13926
|
const slotContent = hasSlot ? ensureValidVNode(hasChips.value ? slots.chip({
|
13868
|
-
item,
|
13927
|
+
item: item.raw,
|
13928
|
+
internalItem: item,
|
13869
13929
|
index,
|
13870
13930
|
props: slotProps
|
13871
13931
|
}) : slots.selection({
|
13872
|
-
item,
|
13932
|
+
item: item.raw,
|
13933
|
+
internalItem: item,
|
13873
13934
|
index
|
13874
13935
|
})) : undefined;
|
13875
13936
|
if (hasSlot && !slotContent) return undefined;
|
@@ -17261,81 +17322,165 @@ const VPicker = genericComponent()({
|
|
17261
17322
|
|
17262
17323
|
// Types
|
17263
17324
|
|
17264
|
-
|
17265
|
-
|
17266
|
-
|
17267
|
-
|
17268
|
-
|
17269
|
-
|
17270
|
-
|
17271
|
-
|
17272
|
-
|
17273
|
-
|
17274
|
-
|
17275
|
-
|
17276
|
-
|
17277
|
-
|
17278
|
-
|
17279
|
-
|
17280
|
-
|
17281
|
-
|
17282
|
-
|
17283
|
-
|
17284
|
-
|
17285
|
-
|
17286
|
-
|
17287
|
-
|
17288
|
-
|
17289
|
-
|
17290
|
-
|
17291
|
-
|
17292
|
-
|
17293
|
-
|
17294
|
-
|
17295
|
-
|
17296
|
-
|
17297
|
-
|
17298
|
-
|
17299
|
-
|
17300
|
-
|
17301
|
-
|
17302
|
-
|
17303
|
-
|
17304
|
-
|
17305
|
-
|
17306
|
-
|
17307
|
-
|
17308
|
-
|
17309
|
-
|
17310
|
-
|
17311
|
-
|
17312
|
-
|
17313
|
-
|
17314
|
-
|
17315
|
-
|
17316
|
-
|
17317
|
-
|
17318
|
-
|
17319
|
-
|
17320
|
-
|
17321
|
-
|
17322
|
-
|
17323
|
-
|
17324
|
-
|
17325
|
-
|
17326
|
-
|
17327
|
-
|
17328
|
-
|
17329
|
-
|
17330
|
-
|
17331
|
-
|
17332
|
-
|
17325
|
+
const firstDay = {
|
17326
|
+
'001': 1,
|
17327
|
+
AD: 1,
|
17328
|
+
AE: 6,
|
17329
|
+
AF: 6,
|
17330
|
+
AG: 0,
|
17331
|
+
AI: 1,
|
17332
|
+
AL: 1,
|
17333
|
+
AM: 1,
|
17334
|
+
AN: 1,
|
17335
|
+
AR: 1,
|
17336
|
+
AS: 0,
|
17337
|
+
AT: 1,
|
17338
|
+
AU: 1,
|
17339
|
+
AX: 1,
|
17340
|
+
AZ: 1,
|
17341
|
+
BA: 1,
|
17342
|
+
BD: 0,
|
17343
|
+
BE: 1,
|
17344
|
+
BG: 1,
|
17345
|
+
BH: 6,
|
17346
|
+
BM: 1,
|
17347
|
+
BN: 1,
|
17348
|
+
BR: 0,
|
17349
|
+
BS: 0,
|
17350
|
+
BT: 0,
|
17351
|
+
BW: 0,
|
17352
|
+
BY: 1,
|
17353
|
+
BZ: 0,
|
17354
|
+
CA: 0,
|
17355
|
+
CH: 1,
|
17356
|
+
CL: 1,
|
17357
|
+
CM: 1,
|
17358
|
+
CN: 1,
|
17359
|
+
CO: 0,
|
17360
|
+
CR: 1,
|
17361
|
+
CY: 1,
|
17362
|
+
CZ: 1,
|
17363
|
+
DE: 1,
|
17364
|
+
DJ: 6,
|
17365
|
+
DK: 1,
|
17366
|
+
DM: 0,
|
17367
|
+
DO: 0,
|
17368
|
+
DZ: 6,
|
17369
|
+
EC: 1,
|
17370
|
+
EE: 1,
|
17371
|
+
EG: 6,
|
17372
|
+
ES: 1,
|
17373
|
+
ET: 0,
|
17374
|
+
FI: 1,
|
17375
|
+
FJ: 1,
|
17376
|
+
FO: 1,
|
17377
|
+
FR: 1,
|
17378
|
+
GB: 1,
|
17379
|
+
'GB-alt-variant': 0,
|
17380
|
+
GE: 1,
|
17381
|
+
GF: 1,
|
17382
|
+
GP: 1,
|
17383
|
+
GR: 1,
|
17384
|
+
GT: 0,
|
17385
|
+
GU: 0,
|
17386
|
+
HK: 0,
|
17387
|
+
HN: 0,
|
17388
|
+
HR: 1,
|
17389
|
+
HU: 1,
|
17390
|
+
ID: 0,
|
17391
|
+
IE: 1,
|
17392
|
+
IL: 0,
|
17393
|
+
IN: 0,
|
17394
|
+
IQ: 6,
|
17395
|
+
IR: 6,
|
17396
|
+
IS: 1,
|
17397
|
+
IT: 1,
|
17398
|
+
JM: 0,
|
17399
|
+
JO: 6,
|
17400
|
+
JP: 0,
|
17401
|
+
KE: 0,
|
17402
|
+
KG: 1,
|
17403
|
+
KH: 0,
|
17404
|
+
KR: 0,
|
17405
|
+
KW: 6,
|
17406
|
+
KZ: 1,
|
17407
|
+
LA: 0,
|
17408
|
+
LB: 1,
|
17409
|
+
LI: 1,
|
17410
|
+
LK: 1,
|
17411
|
+
LT: 1,
|
17412
|
+
LU: 1,
|
17413
|
+
LV: 1,
|
17414
|
+
LY: 6,
|
17415
|
+
MC: 1,
|
17416
|
+
MD: 1,
|
17417
|
+
ME: 1,
|
17418
|
+
MH: 0,
|
17419
|
+
MK: 1,
|
17420
|
+
MM: 0,
|
17421
|
+
MN: 1,
|
17422
|
+
MO: 0,
|
17423
|
+
MQ: 1,
|
17424
|
+
MT: 0,
|
17425
|
+
MV: 5,
|
17426
|
+
MX: 0,
|
17427
|
+
MY: 1,
|
17428
|
+
MZ: 0,
|
17429
|
+
NI: 0,
|
17430
|
+
NL: 1,
|
17431
|
+
NO: 1,
|
17432
|
+
NP: 0,
|
17433
|
+
NZ: 1,
|
17434
|
+
OM: 6,
|
17435
|
+
PA: 0,
|
17436
|
+
PE: 0,
|
17437
|
+
PH: 0,
|
17438
|
+
PK: 0,
|
17439
|
+
PL: 1,
|
17440
|
+
PR: 0,
|
17441
|
+
PT: 0,
|
17442
|
+
PY: 0,
|
17443
|
+
QA: 6,
|
17444
|
+
RE: 1,
|
17445
|
+
RO: 1,
|
17446
|
+
RS: 1,
|
17447
|
+
RU: 1,
|
17448
|
+
SA: 0,
|
17449
|
+
SD: 6,
|
17450
|
+
SE: 1,
|
17451
|
+
SG: 0,
|
17452
|
+
SI: 1,
|
17453
|
+
SK: 1,
|
17454
|
+
SM: 1,
|
17455
|
+
SV: 0,
|
17456
|
+
SY: 6,
|
17457
|
+
TH: 0,
|
17458
|
+
TJ: 1,
|
17459
|
+
TM: 1,
|
17460
|
+
TR: 1,
|
17461
|
+
TT: 0,
|
17462
|
+
TW: 0,
|
17463
|
+
UA: 1,
|
17464
|
+
UM: 0,
|
17465
|
+
US: 0,
|
17466
|
+
UY: 1,
|
17467
|
+
UZ: 1,
|
17468
|
+
VA: 1,
|
17469
|
+
VE: 0,
|
17470
|
+
VI: 0,
|
17471
|
+
VN: 1,
|
17472
|
+
WS: 0,
|
17473
|
+
XK: 1,
|
17474
|
+
YE: 0,
|
17475
|
+
ZA: 0,
|
17476
|
+
ZW: 0
|
17477
|
+
};
|
17333
17478
|
function getWeekArray(date, locale, firstDayOfWeek) {
|
17334
17479
|
const weeks = [];
|
17335
17480
|
let currentWeek = [];
|
17336
17481
|
const firstDayOfMonth = startOfMonth(date);
|
17337
17482
|
const lastDayOfMonth = endOfMonth(date);
|
17338
|
-
const first = firstDayOfWeek ??
|
17483
|
+
const first = firstDayOfWeek ?? firstDay[locale.slice(-2).toUpperCase()] ?? 0;
|
17339
17484
|
const firstDayWeekIndex = (firstDayOfMonth.getDay() - first + 7) % 7;
|
17340
17485
|
const lastDayWeekIndex = (lastDayOfMonth.getDay() - first + 7) % 7;
|
17341
17486
|
for (let i = 0; i < firstDayWeekIndex; i++) {
|
@@ -17366,7 +17511,7 @@ function getWeekArray(date, locale, firstDayOfWeek) {
|
|
17366
17511
|
return weeks;
|
17367
17512
|
}
|
17368
17513
|
function startOfWeek(date, locale, firstDayOfWeek) {
|
17369
|
-
const day = firstDayOfWeek ??
|
17514
|
+
const day = firstDayOfWeek ?? firstDay[locale.slice(-2).toUpperCase()] ?? 0;
|
17370
17515
|
const d = new Date(date);
|
17371
17516
|
while (d.getDay() !== day) {
|
17372
17517
|
d.setDate(d.getDate() - 1);
|
@@ -17375,7 +17520,7 @@ function startOfWeek(date, locale, firstDayOfWeek) {
|
|
17375
17520
|
}
|
17376
17521
|
function endOfWeek(date, locale) {
|
17377
17522
|
const d = new Date(date);
|
17378
|
-
const lastDay = ((
|
17523
|
+
const lastDay = ((firstDay[locale.slice(-2).toUpperCase()] ?? 0) + 6) % 7;
|
17379
17524
|
while (d.getDay() !== lastDay) {
|
17380
17525
|
d.setDate(d.getDate() + 1);
|
17381
17526
|
}
|
@@ -17410,7 +17555,7 @@ function date(value) {
|
|
17410
17555
|
}
|
17411
17556
|
const sundayJanuarySecond2000 = new Date(2000, 0, 2);
|
17412
17557
|
function getWeekdays(locale, firstDayOfWeek) {
|
17413
|
-
const daysFromSunday = firstDayOfWeek ??
|
17558
|
+
const daysFromSunday = firstDayOfWeek ?? firstDay[locale.slice(-2).toUpperCase()] ?? 0;
|
17414
17559
|
return createRange(7).map(i => {
|
17415
17560
|
const weekday = new Date(sundayJanuarySecond2000);
|
17416
17561
|
weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i);
|
@@ -17658,24 +17803,6 @@ function getYear(date) {
|
|
17658
17803
|
function getMonth(date) {
|
17659
17804
|
return date.getMonth();
|
17660
17805
|
}
|
17661
|
-
function getWeek(date, locale, firstDayOfWeek, firstWeekMinSize) {
|
17662
|
-
const weekInfoFromLocale = weekInfo(locale);
|
17663
|
-
const weekStart = firstDayOfWeek ?? weekInfoFromLocale?.firstDay ?? 0;
|
17664
|
-
const minWeekSize = firstWeekMinSize ?? weekInfoFromLocale?.firstWeekSize ?? 1;
|
17665
|
-
function firstWeekSize(year) {
|
17666
|
-
const yearStart = new Date(year, 0, 1);
|
17667
|
-
return 7 - getDiff(yearStart, startOfWeek(yearStart, locale, weekStart), 'days');
|
17668
|
-
}
|
17669
|
-
let year = getYear(date);
|
17670
|
-
const currentWeekEnd = addDays(startOfWeek(date, locale, weekStart), 6);
|
17671
|
-
if (year < getYear(currentWeekEnd) && firstWeekSize(year + 1) >= minWeekSize) {
|
17672
|
-
year++;
|
17673
|
-
}
|
17674
|
-
const yearStart = new Date(year, 0, 1);
|
17675
|
-
const size = firstWeekSize(year);
|
17676
|
-
const d1w1 = size >= minWeekSize ? addDays(yearStart, size - 7) : addDays(yearStart, size);
|
17677
|
-
return 1 + getDiff(date, d1w1, 'weeks');
|
17678
|
-
}
|
17679
17806
|
function getDate(date) {
|
17680
17807
|
return date.getDate();
|
17681
17808
|
}
|
@@ -17815,12 +17942,10 @@ class VuetifyDateAdapter {
|
|
17815
17942
|
return addMonths(date, amount);
|
17816
17943
|
}
|
17817
17944
|
getWeekArray(date, firstDayOfWeek) {
|
17818
|
-
|
17819
|
-
return getWeekArray(date, this.locale, firstDay);
|
17945
|
+
return getWeekArray(date, this.locale, firstDayOfWeek ? Number(firstDayOfWeek) : undefined);
|
17820
17946
|
}
|
17821
17947
|
startOfWeek(date, firstDayOfWeek) {
|
17822
|
-
|
17823
|
-
return startOfWeek(date, this.locale, firstDay);
|
17948
|
+
return startOfWeek(date, this.locale, firstDayOfWeek ? Number(firstDayOfWeek) : undefined);
|
17824
17949
|
}
|
17825
17950
|
endOfWeek(date) {
|
17826
17951
|
return endOfWeek(date, this.locale);
|
@@ -17880,8 +18005,7 @@ class VuetifyDateAdapter {
|
|
17880
18005
|
return getDiff(date, comparing, unit);
|
17881
18006
|
}
|
17882
18007
|
getWeekdays(firstDayOfWeek) {
|
17883
|
-
|
17884
|
-
return getWeekdays(this.locale, firstDay);
|
18008
|
+
return getWeekdays(this.locale, firstDayOfWeek ? Number(firstDayOfWeek) : undefined);
|
17885
18009
|
}
|
17886
18010
|
getYear(date) {
|
17887
18011
|
return getYear(date);
|
@@ -17889,10 +18013,6 @@ class VuetifyDateAdapter {
|
|
17889
18013
|
getMonth(date) {
|
17890
18014
|
return getMonth(date);
|
17891
18015
|
}
|
17892
|
-
getWeek(date, firstDayOfWeek, firstWeekMinSize) {
|
17893
|
-
const firstDay = firstDayOfWeek !== undefined ? Number(firstDayOfWeek) : undefined;
|
17894
|
-
return getWeek(date, this.locale, firstDay, firstWeekMinSize);
|
17895
|
-
}
|
17896
18016
|
getDate(date) {
|
17897
18017
|
return getDate(date);
|
17898
18018
|
}
|
@@ -17996,6 +18116,26 @@ function useDate() {
|
|
17996
18116
|
return createInstance(options, locale);
|
17997
18117
|
}
|
17998
18118
|
|
18119
|
+
// https://stackoverflow.com/questions/274861/how-do-i-calculate-the-week-number-given-a-date/275024#275024
|
18120
|
+
function getWeek(adapter, value) {
|
18121
|
+
const date = adapter.toJsDate(value);
|
18122
|
+
let year = date.getFullYear();
|
18123
|
+
let d1w1 = new Date(year, 0, 1);
|
18124
|
+
if (date < d1w1) {
|
18125
|
+
year = year - 1;
|
18126
|
+
d1w1 = new Date(year, 0, 1);
|
18127
|
+
} else {
|
18128
|
+
const tv = new Date(year + 1, 0, 1);
|
18129
|
+
if (date >= tv) {
|
18130
|
+
year = year + 1;
|
18131
|
+
d1w1 = tv;
|
18132
|
+
}
|
18133
|
+
}
|
18134
|
+
const diffTime = Math.abs(date.getTime() - d1w1.getTime());
|
18135
|
+
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
18136
|
+
return Math.floor(diffDays / 7) + 1;
|
18137
|
+
}
|
18138
|
+
|
17999
18139
|
// Types
|
18000
18140
|
|
18001
18141
|
const makeVColorPickerProps = propsFactory({
|
@@ -18542,7 +18682,8 @@ const VCombobox = genericComponent()({
|
|
18542
18682
|
onClick: () => select(item, null)
|
18543
18683
|
});
|
18544
18684
|
return slots.item?.({
|
18545
|
-
item,
|
18685
|
+
item: item.raw,
|
18686
|
+
internalItem: item,
|
18546
18687
|
index,
|
18547
18688
|
props: itemProps
|
18548
18689
|
}) ?? createVNode(VListItem, mergeProps(itemProps, {
|
@@ -18593,11 +18734,13 @@ const VCombobox = genericComponent()({
|
|
18593
18734
|
};
|
18594
18735
|
const hasSlot = hasChips.value ? !!slots.chip : !!slots.selection;
|
18595
18736
|
const slotContent = hasSlot ? ensureValidVNode(hasChips.value ? slots.chip({
|
18596
|
-
item,
|
18737
|
+
item: item.raw,
|
18738
|
+
internalItem: item,
|
18597
18739
|
index,
|
18598
18740
|
props: slotProps
|
18599
18741
|
}) : slots.selection({
|
18600
|
-
item,
|
18742
|
+
item: item.raw,
|
18743
|
+
internalItem: item,
|
18601
18744
|
index
|
18602
18745
|
})) : undefined;
|
18603
18746
|
if (hasSlot && !slotContent) return undefined;
|
@@ -22184,7 +22327,7 @@ const makeCalendarProps = propsFactory({
|
|
22184
22327
|
},
|
22185
22328
|
firstDayOfWeek: {
|
22186
22329
|
type: [Number, String],
|
22187
|
-
default:
|
22330
|
+
default: 0
|
22188
22331
|
}
|
22189
22332
|
}, 'calendar');
|
22190
22333
|
function useCalendar(props) {
|
@@ -22207,12 +22350,14 @@ function useCalendar(props) {
|
|
22207
22350
|
return adapter.setMonth(date, value);
|
22208
22351
|
}, v => adapter.getMonth(v));
|
22209
22352
|
const weekDays = computed(() => {
|
22210
|
-
const firstDayOfWeek =
|
22353
|
+
const firstDayOfWeek = Number(props.firstDayOfWeek);
|
22354
|
+
|
22211
22355
|
// Always generate all days, regardless of props.weekdays
|
22212
22356
|
return [0, 1, 2, 3, 4, 5, 6].map(day => (day + firstDayOfWeek) % 7);
|
22213
22357
|
});
|
22214
22358
|
const weeksInMonth = computed(() => {
|
22215
|
-
const
|
22359
|
+
const firstDayOfWeek = Number(props.firstDayOfWeek);
|
22360
|
+
const weeks = adapter.getWeekArray(month.value, firstDayOfWeek);
|
22216
22361
|
const days = weeks.flat();
|
22217
22362
|
|
22218
22363
|
// Make sure there's always 6 weeks in month (6 * 7 days)
|
@@ -22276,7 +22421,7 @@ function useCalendar(props) {
|
|
22276
22421
|
});
|
22277
22422
|
const weekNumbers = computed(() => {
|
22278
22423
|
return weeksInMonth.value.map(week => {
|
22279
|
-
return week.length ?
|
22424
|
+
return week.length ? getWeek(adapter, week[0]) : null;
|
22280
22425
|
});
|
22281
22426
|
});
|
22282
22427
|
function isDisabled(value) {
|
@@ -23765,7 +23910,17 @@ const VForm = genericComponent()({
|
|
23765
23910
|
"novalidate": true,
|
23766
23911
|
"onReset": onReset,
|
23767
23912
|
"onSubmit": onSubmit
|
23768
|
-
}, [slots.default?.(
|
23913
|
+
}, [slots.default?.({
|
23914
|
+
errors: form.errors.value,
|
23915
|
+
isDisabled: form.isDisabled.value,
|
23916
|
+
isReadonly: form.isReadonly.value,
|
23917
|
+
isValidating: form.isValidating.value,
|
23918
|
+
isValid: form.isValid.value,
|
23919
|
+
items: form.items.value,
|
23920
|
+
validate: form.validate,
|
23921
|
+
reset: form.reset,
|
23922
|
+
resetValidation: form.resetValidation
|
23923
|
+
})]));
|
23769
23924
|
return forwardRefs(form, formRef);
|
23770
23925
|
}
|
23771
23926
|
});
|
@@ -29174,7 +29329,7 @@ function createVuetify$1() {
|
|
29174
29329
|
};
|
29175
29330
|
});
|
29176
29331
|
}
|
29177
|
-
const version$1 = "3.8.1-
|
29332
|
+
const version$1 = "3.8.1-next.2025-04-18";
|
29178
29333
|
createVuetify$1.version = version$1;
|
29179
29334
|
|
29180
29335
|
// Vue's inject() can only be used in setup
|
@@ -29199,7 +29354,7 @@ const createVuetify = function () {
|
|
29199
29354
|
...options
|
29200
29355
|
});
|
29201
29356
|
};
|
29202
|
-
const version = "3.8.1-
|
29357
|
+
const version = "3.8.1-next.2025-04-18";
|
29203
29358
|
createVuetify.version = version;
|
29204
29359
|
|
29205
29360
|
export { index as blueprints, components, createVuetify, directives, useDate, useDefaults, useDisplay, useGoTo, useLayout, useLocale, useRtl, useTheme, version };
|