@vuetify/nightly 3.8.1-master.2025-04-15 → 3.8.1-next.2025-04-15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -32
- package/dist/json/attributes.json +3374 -3374
- package/dist/json/importMap-labs.json +20 -20
- package/dist/json/importMap.json +218 -218
- package/dist/json/web-types.json +5962 -5922
- package/dist/vuetify-labs.cjs +341 -179
- package/dist/vuetify-labs.css +26033 -27763
- package/dist/vuetify-labs.d.ts +253 -656
- package/dist/vuetify-labs.esm.js +342 -180
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +341 -179
- package/dist/vuetify-labs.min.css +3 -4
- package/dist/vuetify.cjs +323 -155
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +22790 -24516
- package/dist/vuetify.d.ts +278 -681
- package/dist/vuetify.esm.js +324 -156
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +323 -155
- 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/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 +385 -408
- package/lib/components/VBtn/VBtn.sass +4 -4
- 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 +548 -589
- 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 -3
- 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 +80 -78
- 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 +1 -2
- 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-labs.esm.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
/*!
|
2
|
-
* Vuetify v3.8.1-
|
2
|
+
* Vuetify v3.8.1-next.2025-04-15
|
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, onBeforeUnmount, watch, readonly, onMounted, useId, onDeactivated, onActivated, onScopeDispose, effectScope, toRaw, createVNode, TransitionGroup, Transition, mergeProps, 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, onBeforeUnmount, watch, readonly, onMounted, useId, onDeactivated, onActivated, onScopeDispose, effectScope, toRaw, getCurrentScope, createVNode, TransitionGroup, Transition, mergeProps, 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
|
// Types
|
10
10
|
// eslint-disable-line vue/prefer-import-from-vue
|
@@ -81,6 +81,7 @@ const IN_BROWSER = typeof window !== 'undefined';
|
|
81
81
|
const SUPPORTS_INTERSECTION = IN_BROWSER && 'IntersectionObserver' in window;
|
82
82
|
const SUPPORTS_TOUCH = IN_BROWSER && ('ontouchstart' in window || window.navigator.maxTouchPoints > 0);
|
83
83
|
const SUPPORTS_EYE_DROPPER = IN_BROWSER && 'EyeDropper' in window;
|
84
|
+
const SUPPORTS_MATCH_MEDIA = IN_BROWSER && 'matchMedia' in window && typeof window.matchMedia === 'function';
|
84
85
|
|
85
86
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
86
87
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
@@ -2280,7 +2281,8 @@ const makeThemeProps = propsFactory({
|
|
2280
2281
|
}, 'theme');
|
2281
2282
|
function genDefaults$2() {
|
2282
2283
|
return {
|
2283
|
-
defaultTheme: '
|
2284
|
+
defaultTheme: 'system',
|
2285
|
+
prefix: 'v-',
|
2284
2286
|
variations: {
|
2285
2287
|
colors: [],
|
2286
2288
|
lighten: 0,
|
@@ -2331,8 +2333,8 @@ function genDefaults$2() {
|
|
2331
2333
|
surface: '#212121',
|
2332
2334
|
'surface-bright': '#ccbfd6',
|
2333
2335
|
'surface-light': '#424242',
|
2334
|
-
'surface-variant': '#
|
2335
|
-
'on-surface-variant': '#
|
2336
|
+
'surface-variant': '#a3a3a3',
|
2337
|
+
'on-surface-variant': '#424242',
|
2336
2338
|
primary: '#2196F3',
|
2337
2339
|
'primary-darken-1': '#277CC1',
|
2338
2340
|
secondary: '#54B6B2',
|
@@ -2362,7 +2364,10 @@ function genDefaults$2() {
|
|
2362
2364
|
}
|
2363
2365
|
}
|
2364
2366
|
},
|
2365
|
-
stylesheetId: 'vuetify-theme-stylesheet'
|
2367
|
+
stylesheetId: 'vuetify-theme-stylesheet',
|
2368
|
+
scoped: false,
|
2369
|
+
unimportant: true,
|
2370
|
+
utilities: true
|
2366
2371
|
};
|
2367
2372
|
}
|
2368
2373
|
function parseThemeOptions() {
|
@@ -2385,21 +2390,21 @@ function parseThemeOptions() {
|
|
2385
2390
|
function createCssClass(lines, selector, content, scope) {
|
2386
2391
|
lines.push(`${getScopedSelector(selector, scope)} {\n`, ...content.map(line => ` ${line};\n`), '}\n');
|
2387
2392
|
}
|
2388
|
-
function genCssVariables(theme) {
|
2393
|
+
function genCssVariables(theme, prefix) {
|
2389
2394
|
const lightOverlay = theme.dark ? 2 : 1;
|
2390
2395
|
const darkOverlay = theme.dark ? 1 : 2;
|
2391
2396
|
const variables = [];
|
2392
2397
|
for (const [key, value] of Object.entries(theme.colors)) {
|
2393
2398
|
const rgb = parseColor(value);
|
2394
|
-
variables.push(
|
2399
|
+
variables.push(`--${prefix}theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`);
|
2395
2400
|
if (!key.startsWith('on-')) {
|
2396
|
-
variables.push(
|
2401
|
+
variables.push(`--${prefix}theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`);
|
2397
2402
|
}
|
2398
2403
|
}
|
2399
2404
|
for (const [key, value] of Object.entries(theme.variables)) {
|
2400
2405
|
const color = typeof value === 'string' && value.startsWith('#') ? parseColor(value) : undefined;
|
2401
2406
|
const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : undefined;
|
2402
|
-
variables.push(
|
2407
|
+
variables.push(`--${prefix}${key}: ${rgb ?? value}`);
|
2403
2408
|
}
|
2404
2409
|
return variables;
|
2405
2410
|
}
|
@@ -2443,7 +2448,8 @@ function getScopedSelector(selector, scope) {
|
|
2443
2448
|
const scopeSelector = `:where(${scope})`;
|
2444
2449
|
return selector === ':root' ? scopeSelector : `${scopeSelector} ${selector}`;
|
2445
2450
|
}
|
2446
|
-
function upsertStyles(
|
2451
|
+
function upsertStyles(id, cspNonce, styles) {
|
2452
|
+
const styleEl = getOrCreateStyleElement(id, cspNonce);
|
2447
2453
|
if (!styleEl) return;
|
2448
2454
|
styleEl.innerHTML = styles;
|
2449
2455
|
}
|
@@ -2463,8 +2469,17 @@ function getOrCreateStyleElement(id, cspNonce) {
|
|
2463
2469
|
// Composables
|
2464
2470
|
function createTheme(options) {
|
2465
2471
|
const parsedOptions = parseThemeOptions(options);
|
2466
|
-
const
|
2472
|
+
const _name = shallowRef(parsedOptions.defaultTheme);
|
2467
2473
|
const themes = ref(parsedOptions.themes);
|
2474
|
+
const systemName = shallowRef('light');
|
2475
|
+
const name = computed({
|
2476
|
+
get() {
|
2477
|
+
return _name.value === 'system' ? systemName.value : _name.value;
|
2478
|
+
},
|
2479
|
+
set(val) {
|
2480
|
+
_name.value = val;
|
2481
|
+
}
|
2482
|
+
});
|
2468
2483
|
const computedThemes = computed(() => {
|
2469
2484
|
const acc = {};
|
2470
2485
|
for (const [name, original] of Object.entries(themes.value)) {
|
@@ -2485,28 +2500,49 @@ function createTheme(options) {
|
|
2485
2500
|
const current = computed(() => computedThemes.value[name.value]);
|
2486
2501
|
const styles = computed(() => {
|
2487
2502
|
const lines = [];
|
2503
|
+
const important = parsedOptions.unimportant ? '' : ' !important';
|
2504
|
+
const scoped = parsedOptions.scoped ? parsedOptions.prefix : '';
|
2488
2505
|
if (current.value?.dark) {
|
2489
2506
|
createCssClass(lines, ':root', ['color-scheme: dark'], parsedOptions.scope);
|
2490
2507
|
}
|
2491
|
-
createCssClass(lines, ':root', genCssVariables(current.value), parsedOptions.scope);
|
2508
|
+
createCssClass(lines, ':root', genCssVariables(current.value, parsedOptions.prefix), parsedOptions.scope);
|
2492
2509
|
for (const [themeName, theme] of Object.entries(computedThemes.value)) {
|
2493
|
-
createCssClass(lines,
|
2494
|
-
}
|
2495
|
-
|
2496
|
-
|
2497
|
-
|
2498
|
-
|
2499
|
-
|
2500
|
-
|
2501
|
-
|
2502
|
-
|
2503
|
-
|
2504
|
-
|
2510
|
+
createCssClass(lines, `.${parsedOptions.prefix}theme--${themeName}`, [`color-scheme: ${theme.dark ? 'dark' : 'normal'}`, ...genCssVariables(theme, parsedOptions.prefix)], parsedOptions.scope);
|
2511
|
+
}
|
2512
|
+
if (parsedOptions.utilities) {
|
2513
|
+
const bgLines = [];
|
2514
|
+
const fgLines = [];
|
2515
|
+
const colors = new Set(Object.values(computedThemes.value).flatMap(theme => Object.keys(theme.colors)));
|
2516
|
+
for (const key of colors) {
|
2517
|
+
if (key.startsWith('on-')) {
|
2518
|
+
createCssClass(fgLines, `.${key}`, [`color: rgb(var(--${parsedOptions.prefix}theme-${key}))${important}`], parsedOptions.scope);
|
2519
|
+
} else {
|
2520
|
+
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);
|
2521
|
+
createCssClass(fgLines, `.${scoped}text-${key}`, [`color: rgb(var(--${parsedOptions.prefix}theme-${key}))${important}`], parsedOptions.scope);
|
2522
|
+
createCssClass(fgLines, `.${scoped}border-${key}`, [`--${parsedOptions.prefix}border-color: var(--${parsedOptions.prefix}theme-${key})`], parsedOptions.scope);
|
2523
|
+
}
|
2505
2524
|
}
|
2525
|
+
lines.push(...bgLines, ...fgLines);
|
2506
2526
|
}
|
2507
|
-
lines.
|
2508
|
-
return lines.map((str, i) => i === 0 ? str : ` ${str}`).join('');
|
2527
|
+
return '@layer vuetify.theme {\n' + lines.map(v => ` ${v}`).join('') + '\n}';
|
2509
2528
|
});
|
2529
|
+
const themeClasses = computed(() => parsedOptions.isDisabled ? undefined : `${parsedOptions.prefix}theme--${name.value}`);
|
2530
|
+
const themeNames = computed(() => Object.keys(computedThemes.value));
|
2531
|
+
if (SUPPORTS_MATCH_MEDIA) {
|
2532
|
+
const media = window.matchMedia('(prefers-color-scheme: dark)');
|
2533
|
+
function updateSystemName() {
|
2534
|
+
systemName.value = media.matches ? 'dark' : 'light';
|
2535
|
+
}
|
2536
|
+
updateSystemName();
|
2537
|
+
media.addEventListener('change', updateSystemName, {
|
2538
|
+
passive: true
|
2539
|
+
});
|
2540
|
+
if (getCurrentScope()) {
|
2541
|
+
onScopeDispose(() => {
|
2542
|
+
media.removeEventListener('change', updateSystemName);
|
2543
|
+
});
|
2544
|
+
}
|
2545
|
+
}
|
2510
2546
|
function install(app) {
|
2511
2547
|
if (parsedOptions.isDisabled) return;
|
2512
2548
|
const head = app._context.provides.usehead;
|
@@ -2544,22 +2580,55 @@ function createTheme(options) {
|
|
2544
2580
|
updateStyles();
|
2545
2581
|
}
|
2546
2582
|
function updateStyles() {
|
2547
|
-
upsertStyles(
|
2583
|
+
upsertStyles(parsedOptions.stylesheetId, parsedOptions.cspNonce, styles.value);
|
2548
2584
|
}
|
2549
2585
|
}
|
2550
2586
|
}
|
2551
|
-
|
2587
|
+
function change(themeName) {
|
2588
|
+
if (!themeNames.value.includes(themeName)) {
|
2589
|
+
consoleWarn(`Theme "${themeName}" not found on the Vuetify theme instance`);
|
2590
|
+
return;
|
2591
|
+
}
|
2592
|
+
name.value = themeName;
|
2593
|
+
}
|
2594
|
+
function cycle() {
|
2595
|
+
let themeArray = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : themeNames.value;
|
2596
|
+
const currentIndex = themeArray.indexOf(name.value);
|
2597
|
+
const nextIndex = currentIndex === -1 ? 0 : (currentIndex + 1) % themeArray.length;
|
2598
|
+
change(themeArray[nextIndex]);
|
2599
|
+
}
|
2600
|
+
function toggle() {
|
2601
|
+
let themeArray = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['light', 'dark'];
|
2602
|
+
cycle(themeArray);
|
2603
|
+
}
|
2604
|
+
const globalName = new Proxy(name, {
|
2605
|
+
get(target, prop) {
|
2606
|
+
return target[prop];
|
2607
|
+
},
|
2608
|
+
set(target, prop, val) {
|
2609
|
+
if (prop === 'value') {
|
2610
|
+
deprecate(`theme.global.name.value = ${val}`, `theme.change('${val}')`);
|
2611
|
+
}
|
2612
|
+
// @ts-expect-error
|
2613
|
+
target[prop] = val;
|
2614
|
+
return true;
|
2615
|
+
}
|
2616
|
+
});
|
2552
2617
|
return {
|
2553
2618
|
install,
|
2619
|
+
change,
|
2620
|
+
cycle,
|
2621
|
+
toggle,
|
2554
2622
|
isDisabled: parsedOptions.isDisabled,
|
2555
2623
|
name,
|
2556
2624
|
themes,
|
2557
2625
|
current,
|
2558
2626
|
computedThemes,
|
2627
|
+
prefix: parsedOptions.prefix,
|
2559
2628
|
themeClasses,
|
2560
2629
|
styles,
|
2561
2630
|
global: {
|
2562
|
-
name,
|
2631
|
+
name: globalName,
|
2563
2632
|
current
|
2564
2633
|
}
|
2565
2634
|
};
|
@@ -2570,7 +2639,7 @@ function provideTheme(props) {
|
|
2570
2639
|
if (!theme) throw new Error('Could not find Vuetify theme injection');
|
2571
2640
|
const name = computed(() => props.theme ?? theme.name.value);
|
2572
2641
|
const current = computed(() => theme.themes.value[name.value]);
|
2573
|
-
const themeClasses = computed(() => theme.isDisabled ? undefined :
|
2642
|
+
const themeClasses = computed(() => theme.isDisabled ? undefined : `${theme.prefix}theme--${name.value}`);
|
2574
2643
|
const newTheme = {
|
2575
2644
|
...theme,
|
2576
2645
|
name,
|
@@ -6894,11 +6963,6 @@ function useValidation(props) {
|
|
6894
6963
|
}
|
6895
6964
|
async function validate() {
|
6896
6965
|
let silent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
6897
|
-
if (props.disabled || props.readonly) {
|
6898
|
-
internalErrorMessages.value = [];
|
6899
|
-
isValidating.value = false;
|
6900
|
-
return internalErrorMessages.value;
|
6901
|
-
}
|
6902
6966
|
const results = [];
|
6903
6967
|
isValidating.value = true;
|
6904
6968
|
for (const rule of props.rules) {
|
@@ -12308,7 +12372,12 @@ function useVirtual(props, items) {
|
|
12308
12372
|
}
|
12309
12373
|
function calculateOffset(index) {
|
12310
12374
|
index = clamp(index, 0, items.value.length - 1);
|
12311
|
-
|
12375
|
+
const whole = Math.floor(index);
|
12376
|
+
const fraction = index % 1;
|
12377
|
+
const next = whole + 1;
|
12378
|
+
const wholeOffset = offsets[whole] || 0;
|
12379
|
+
const nextOffset = offsets[next] || wholeOffset;
|
12380
|
+
return wholeOffset + (nextOffset - wholeOffset) * fraction;
|
12312
12381
|
}
|
12313
12382
|
function calculateIndex(scrollTop) {
|
12314
12383
|
return binaryClosest(offsets, scrollTop);
|
@@ -12937,7 +13006,8 @@ const VSelect = genericComponent()({
|
|
12937
13006
|
onClick: () => select(item, null)
|
12938
13007
|
});
|
12939
13008
|
return slots.item?.({
|
12940
|
-
item,
|
13009
|
+
item: item.raw,
|
13010
|
+
internalItem: item,
|
12941
13011
|
index,
|
12942
13012
|
props: itemProps
|
12943
13013
|
}) ?? createVNode(VListItem, mergeProps(itemProps, {
|
@@ -12985,11 +13055,13 @@ const VSelect = genericComponent()({
|
|
12985
13055
|
};
|
12986
13056
|
const hasSlot = hasChips ? !!slots.chip : !!slots.selection;
|
12987
13057
|
const slotContent = hasSlot ? ensureValidVNode(hasChips ? slots.chip({
|
12988
|
-
item,
|
13058
|
+
item: item.raw,
|
13059
|
+
internalItem: item,
|
12989
13060
|
index,
|
12990
13061
|
props: slotProps
|
12991
13062
|
}) : slots.selection({
|
12992
|
-
item,
|
13063
|
+
item: item.raw,
|
13064
|
+
internalItem: item,
|
12993
13065
|
index
|
12994
13066
|
})) : undefined;
|
12995
13067
|
if (hasSlot && !slotContent) return undefined;
|
@@ -13055,7 +13127,6 @@ const VSelect = genericComponent()({
|
|
13055
13127
|
// Composables
|
13056
13128
|
const defaultFilter = (value, query, item) => {
|
13057
13129
|
if (value == null || query == null) return -1;
|
13058
|
-
if (!query.length) return 0;
|
13059
13130
|
value = value.toString().toLocaleLowerCase();
|
13060
13131
|
query = query.toString().toLocaleLowerCase();
|
13061
13132
|
const result = [];
|
@@ -13068,7 +13139,7 @@ const defaultFilter = (value, query, item) => {
|
|
13068
13139
|
};
|
13069
13140
|
function normaliseMatch(match, query) {
|
13070
13141
|
if (match == null || typeof match === 'boolean' || match === -1) return;
|
13071
|
-
if (typeof match === 'number') return [[match,
|
13142
|
+
if (typeof match === 'number') return [[match, query.length]];
|
13072
13143
|
if (Array.isArray(match[0])) return match;
|
13073
13144
|
return [match];
|
13074
13145
|
}
|
@@ -13536,7 +13607,8 @@ const VAutocomplete = genericComponent()({
|
|
13536
13607
|
onClick: () => select(item, null)
|
13537
13608
|
});
|
13538
13609
|
return slots.item?.({
|
13539
|
-
item,
|
13610
|
+
item: item.raw,
|
13611
|
+
internalItem: item,
|
13540
13612
|
index,
|
13541
13613
|
props: itemProps
|
13542
13614
|
}) ?? createVNode(VListItem, mergeProps(itemProps, {
|
@@ -13587,11 +13659,13 @@ const VAutocomplete = genericComponent()({
|
|
13587
13659
|
};
|
13588
13660
|
const hasSlot = hasChips.value ? !!slots.chip : !!slots.selection;
|
13589
13661
|
const slotContent = hasSlot ? ensureValidVNode(hasChips.value ? slots.chip({
|
13590
|
-
item,
|
13662
|
+
item: item.raw,
|
13663
|
+
internalItem: item,
|
13591
13664
|
index,
|
13592
13665
|
props: slotProps
|
13593
13666
|
}) : slots.selection({
|
13594
|
-
item,
|
13667
|
+
item: item.raw,
|
13668
|
+
internalItem: item,
|
13595
13669
|
index
|
13596
13670
|
})) : undefined;
|
13597
13671
|
if (hasSlot && !slotContent) return undefined;
|
@@ -16983,81 +17057,165 @@ const VPicker = genericComponent()({
|
|
16983
17057
|
|
16984
17058
|
// Types
|
16985
17059
|
|
16986
|
-
|
16987
|
-
|
16988
|
-
|
16989
|
-
|
16990
|
-
|
16991
|
-
|
16992
|
-
|
16993
|
-
|
16994
|
-
|
16995
|
-
|
16996
|
-
|
16997
|
-
|
16998
|
-
|
16999
|
-
|
17000
|
-
|
17001
|
-
|
17002
|
-
|
17003
|
-
|
17004
|
-
|
17005
|
-
|
17006
|
-
|
17007
|
-
|
17008
|
-
|
17009
|
-
|
17010
|
-
|
17011
|
-
|
17012
|
-
|
17013
|
-
|
17014
|
-
|
17015
|
-
|
17016
|
-
|
17017
|
-
|
17018
|
-
|
17019
|
-
|
17020
|
-
|
17021
|
-
|
17022
|
-
|
17023
|
-
|
17024
|
-
|
17025
|
-
|
17026
|
-
|
17027
|
-
|
17028
|
-
|
17029
|
-
|
17030
|
-
|
17031
|
-
|
17032
|
-
|
17033
|
-
|
17034
|
-
|
17035
|
-
|
17036
|
-
|
17037
|
-
|
17038
|
-
|
17039
|
-
|
17040
|
-
|
17041
|
-
|
17042
|
-
|
17043
|
-
|
17044
|
-
|
17045
|
-
|
17046
|
-
|
17047
|
-
|
17048
|
-
|
17049
|
-
|
17050
|
-
|
17051
|
-
|
17052
|
-
|
17053
|
-
|
17054
|
-
|
17060
|
+
const firstDay = {
|
17061
|
+
'001': 1,
|
17062
|
+
AD: 1,
|
17063
|
+
AE: 6,
|
17064
|
+
AF: 6,
|
17065
|
+
AG: 0,
|
17066
|
+
AI: 1,
|
17067
|
+
AL: 1,
|
17068
|
+
AM: 1,
|
17069
|
+
AN: 1,
|
17070
|
+
AR: 1,
|
17071
|
+
AS: 0,
|
17072
|
+
AT: 1,
|
17073
|
+
AU: 1,
|
17074
|
+
AX: 1,
|
17075
|
+
AZ: 1,
|
17076
|
+
BA: 1,
|
17077
|
+
BD: 0,
|
17078
|
+
BE: 1,
|
17079
|
+
BG: 1,
|
17080
|
+
BH: 6,
|
17081
|
+
BM: 1,
|
17082
|
+
BN: 1,
|
17083
|
+
BR: 0,
|
17084
|
+
BS: 0,
|
17085
|
+
BT: 0,
|
17086
|
+
BW: 0,
|
17087
|
+
BY: 1,
|
17088
|
+
BZ: 0,
|
17089
|
+
CA: 0,
|
17090
|
+
CH: 1,
|
17091
|
+
CL: 1,
|
17092
|
+
CM: 1,
|
17093
|
+
CN: 1,
|
17094
|
+
CO: 0,
|
17095
|
+
CR: 1,
|
17096
|
+
CY: 1,
|
17097
|
+
CZ: 1,
|
17098
|
+
DE: 1,
|
17099
|
+
DJ: 6,
|
17100
|
+
DK: 1,
|
17101
|
+
DM: 0,
|
17102
|
+
DO: 0,
|
17103
|
+
DZ: 6,
|
17104
|
+
EC: 1,
|
17105
|
+
EE: 1,
|
17106
|
+
EG: 6,
|
17107
|
+
ES: 1,
|
17108
|
+
ET: 0,
|
17109
|
+
FI: 1,
|
17110
|
+
FJ: 1,
|
17111
|
+
FO: 1,
|
17112
|
+
FR: 1,
|
17113
|
+
GB: 1,
|
17114
|
+
'GB-alt-variant': 0,
|
17115
|
+
GE: 1,
|
17116
|
+
GF: 1,
|
17117
|
+
GP: 1,
|
17118
|
+
GR: 1,
|
17119
|
+
GT: 0,
|
17120
|
+
GU: 0,
|
17121
|
+
HK: 0,
|
17122
|
+
HN: 0,
|
17123
|
+
HR: 1,
|
17124
|
+
HU: 1,
|
17125
|
+
ID: 0,
|
17126
|
+
IE: 1,
|
17127
|
+
IL: 0,
|
17128
|
+
IN: 0,
|
17129
|
+
IQ: 6,
|
17130
|
+
IR: 6,
|
17131
|
+
IS: 1,
|
17132
|
+
IT: 1,
|
17133
|
+
JM: 0,
|
17134
|
+
JO: 6,
|
17135
|
+
JP: 0,
|
17136
|
+
KE: 0,
|
17137
|
+
KG: 1,
|
17138
|
+
KH: 0,
|
17139
|
+
KR: 0,
|
17140
|
+
KW: 6,
|
17141
|
+
KZ: 1,
|
17142
|
+
LA: 0,
|
17143
|
+
LB: 1,
|
17144
|
+
LI: 1,
|
17145
|
+
LK: 1,
|
17146
|
+
LT: 1,
|
17147
|
+
LU: 1,
|
17148
|
+
LV: 1,
|
17149
|
+
LY: 6,
|
17150
|
+
MC: 1,
|
17151
|
+
MD: 1,
|
17152
|
+
ME: 1,
|
17153
|
+
MH: 0,
|
17154
|
+
MK: 1,
|
17155
|
+
MM: 0,
|
17156
|
+
MN: 1,
|
17157
|
+
MO: 0,
|
17158
|
+
MQ: 1,
|
17159
|
+
MT: 0,
|
17160
|
+
MV: 5,
|
17161
|
+
MX: 0,
|
17162
|
+
MY: 1,
|
17163
|
+
MZ: 0,
|
17164
|
+
NI: 0,
|
17165
|
+
NL: 1,
|
17166
|
+
NO: 1,
|
17167
|
+
NP: 0,
|
17168
|
+
NZ: 1,
|
17169
|
+
OM: 6,
|
17170
|
+
PA: 0,
|
17171
|
+
PE: 0,
|
17172
|
+
PH: 0,
|
17173
|
+
PK: 0,
|
17174
|
+
PL: 1,
|
17175
|
+
PR: 0,
|
17176
|
+
PT: 0,
|
17177
|
+
PY: 0,
|
17178
|
+
QA: 6,
|
17179
|
+
RE: 1,
|
17180
|
+
RO: 1,
|
17181
|
+
RS: 1,
|
17182
|
+
RU: 1,
|
17183
|
+
SA: 0,
|
17184
|
+
SD: 6,
|
17185
|
+
SE: 1,
|
17186
|
+
SG: 0,
|
17187
|
+
SI: 1,
|
17188
|
+
SK: 1,
|
17189
|
+
SM: 1,
|
17190
|
+
SV: 0,
|
17191
|
+
SY: 6,
|
17192
|
+
TH: 0,
|
17193
|
+
TJ: 1,
|
17194
|
+
TM: 1,
|
17195
|
+
TR: 1,
|
17196
|
+
TT: 0,
|
17197
|
+
TW: 0,
|
17198
|
+
UA: 1,
|
17199
|
+
UM: 0,
|
17200
|
+
US: 0,
|
17201
|
+
UY: 1,
|
17202
|
+
UZ: 1,
|
17203
|
+
VA: 1,
|
17204
|
+
VE: 0,
|
17205
|
+
VI: 0,
|
17206
|
+
VN: 1,
|
17207
|
+
WS: 0,
|
17208
|
+
XK: 1,
|
17209
|
+
YE: 0,
|
17210
|
+
ZA: 0,
|
17211
|
+
ZW: 0
|
17212
|
+
};
|
17055
17213
|
function getWeekArray(date, locale, firstDayOfWeek) {
|
17056
17214
|
const weeks = [];
|
17057
17215
|
let currentWeek = [];
|
17058
17216
|
const firstDayOfMonth = startOfMonth(date);
|
17059
17217
|
const lastDayOfMonth = endOfMonth(date);
|
17060
|
-
const first = firstDayOfWeek ??
|
17218
|
+
const first = firstDayOfWeek ?? firstDay[locale.slice(-2).toUpperCase()] ?? 0;
|
17061
17219
|
const firstDayWeekIndex = (firstDayOfMonth.getDay() - first + 7) % 7;
|
17062
17220
|
const lastDayWeekIndex = (lastDayOfMonth.getDay() - first + 7) % 7;
|
17063
17221
|
for (let i = 0; i < firstDayWeekIndex; i++) {
|
@@ -17088,7 +17246,7 @@ function getWeekArray(date, locale, firstDayOfWeek) {
|
|
17088
17246
|
return weeks;
|
17089
17247
|
}
|
17090
17248
|
function startOfWeek(date, locale, firstDayOfWeek) {
|
17091
|
-
const day = firstDayOfWeek ??
|
17249
|
+
const day = firstDayOfWeek ?? firstDay[locale.slice(-2).toUpperCase()] ?? 0;
|
17092
17250
|
const d = new Date(date);
|
17093
17251
|
while (d.getDay() !== day) {
|
17094
17252
|
d.setDate(d.getDate() - 1);
|
@@ -17097,7 +17255,7 @@ function startOfWeek(date, locale, firstDayOfWeek) {
|
|
17097
17255
|
}
|
17098
17256
|
function endOfWeek(date, locale) {
|
17099
17257
|
const d = new Date(date);
|
17100
|
-
const lastDay = ((
|
17258
|
+
const lastDay = ((firstDay[locale.slice(-2).toUpperCase()] ?? 0) + 6) % 7;
|
17101
17259
|
while (d.getDay() !== lastDay) {
|
17102
17260
|
d.setDate(d.getDate() + 1);
|
17103
17261
|
}
|
@@ -17132,7 +17290,7 @@ function date(value) {
|
|
17132
17290
|
}
|
17133
17291
|
const sundayJanuarySecond2000 = new Date(2000, 0, 2);
|
17134
17292
|
function getWeekdays(locale, firstDayOfWeek) {
|
17135
|
-
const daysFromSunday = firstDayOfWeek ??
|
17293
|
+
const daysFromSunday = firstDayOfWeek ?? firstDay[locale.slice(-2).toUpperCase()] ?? 0;
|
17136
17294
|
return createRange(7).map(i => {
|
17137
17295
|
const weekday = new Date(sundayJanuarySecond2000);
|
17138
17296
|
weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i);
|
@@ -17380,24 +17538,6 @@ function getYear(date) {
|
|
17380
17538
|
function getMonth(date) {
|
17381
17539
|
return date.getMonth();
|
17382
17540
|
}
|
17383
|
-
function getWeek(date, locale, firstDayOfWeek, firstWeekMinSize) {
|
17384
|
-
const weekInfoFromLocale = weekInfo(locale);
|
17385
|
-
const weekStart = firstDayOfWeek ?? weekInfoFromLocale?.firstDay ?? 0;
|
17386
|
-
const minWeekSize = firstWeekMinSize ?? weekInfoFromLocale?.firstWeekSize ?? 1;
|
17387
|
-
function firstWeekSize(year) {
|
17388
|
-
const yearStart = new Date(year, 0, 1);
|
17389
|
-
return 7 - getDiff(yearStart, startOfWeek(yearStart, locale, weekStart), 'days');
|
17390
|
-
}
|
17391
|
-
let year = getYear(date);
|
17392
|
-
const currentWeekEnd = addDays(startOfWeek(date, locale, weekStart), 6);
|
17393
|
-
if (year < getYear(currentWeekEnd) && firstWeekSize(year + 1) >= minWeekSize) {
|
17394
|
-
year++;
|
17395
|
-
}
|
17396
|
-
const yearStart = new Date(year, 0, 1);
|
17397
|
-
const size = firstWeekSize(year);
|
17398
|
-
const d1w1 = size >= minWeekSize ? addDays(yearStart, size - 7) : addDays(yearStart, size);
|
17399
|
-
return 1 + getDiff(date, d1w1, 'weeks');
|
17400
|
-
}
|
17401
17541
|
function getDate(date) {
|
17402
17542
|
return date.getDate();
|
17403
17543
|
}
|
@@ -17537,12 +17677,10 @@ class VuetifyDateAdapter {
|
|
17537
17677
|
return addMonths(date, amount);
|
17538
17678
|
}
|
17539
17679
|
getWeekArray(date, firstDayOfWeek) {
|
17540
|
-
|
17541
|
-
return getWeekArray(date, this.locale, firstDay);
|
17680
|
+
return getWeekArray(date, this.locale, firstDayOfWeek ? Number(firstDayOfWeek) : undefined);
|
17542
17681
|
}
|
17543
17682
|
startOfWeek(date, firstDayOfWeek) {
|
17544
|
-
|
17545
|
-
return startOfWeek(date, this.locale, firstDay);
|
17683
|
+
return startOfWeek(date, this.locale, firstDayOfWeek ? Number(firstDayOfWeek) : undefined);
|
17546
17684
|
}
|
17547
17685
|
endOfWeek(date) {
|
17548
17686
|
return endOfWeek(date, this.locale);
|
@@ -17602,8 +17740,7 @@ class VuetifyDateAdapter {
|
|
17602
17740
|
return getDiff(date, comparing, unit);
|
17603
17741
|
}
|
17604
17742
|
getWeekdays(firstDayOfWeek) {
|
17605
|
-
|
17606
|
-
return getWeekdays(this.locale, firstDay);
|
17743
|
+
return getWeekdays(this.locale, firstDayOfWeek ? Number(firstDayOfWeek) : undefined);
|
17607
17744
|
}
|
17608
17745
|
getYear(date) {
|
17609
17746
|
return getYear(date);
|
@@ -17611,10 +17748,6 @@ class VuetifyDateAdapter {
|
|
17611
17748
|
getMonth(date) {
|
17612
17749
|
return getMonth(date);
|
17613
17750
|
}
|
17614
|
-
getWeek(date, firstDayOfWeek, firstWeekMinSize) {
|
17615
|
-
const firstDay = firstDayOfWeek !== undefined ? Number(firstDayOfWeek) : undefined;
|
17616
|
-
return getWeek(date, this.locale, firstDay, firstWeekMinSize);
|
17617
|
-
}
|
17618
17751
|
getDate(date) {
|
17619
17752
|
return getDate(date);
|
17620
17753
|
}
|
@@ -17718,6 +17851,26 @@ function useDate() {
|
|
17718
17851
|
return createInstance(options, locale);
|
17719
17852
|
}
|
17720
17853
|
|
17854
|
+
// https://stackoverflow.com/questions/274861/how-do-i-calculate-the-week-number-given-a-date/275024#275024
|
17855
|
+
function getWeek(adapter, value) {
|
17856
|
+
const date = adapter.toJsDate(value);
|
17857
|
+
let year = date.getFullYear();
|
17858
|
+
let d1w1 = new Date(year, 0, 1);
|
17859
|
+
if (date < d1w1) {
|
17860
|
+
year = year - 1;
|
17861
|
+
d1w1 = new Date(year, 0, 1);
|
17862
|
+
} else {
|
17863
|
+
const tv = new Date(year + 1, 0, 1);
|
17864
|
+
if (date >= tv) {
|
17865
|
+
year = year + 1;
|
17866
|
+
d1w1 = tv;
|
17867
|
+
}
|
17868
|
+
}
|
17869
|
+
const diffTime = Math.abs(date.getTime() - d1w1.getTime());
|
17870
|
+
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
17871
|
+
return Math.floor(diffDays / 7) + 1;
|
17872
|
+
}
|
17873
|
+
|
17721
17874
|
// Types
|
17722
17875
|
|
17723
17876
|
const makeVColorPickerProps = propsFactory({
|
@@ -18264,7 +18417,8 @@ const VCombobox = genericComponent()({
|
|
18264
18417
|
onClick: () => select(item, null)
|
18265
18418
|
});
|
18266
18419
|
return slots.item?.({
|
18267
|
-
item,
|
18420
|
+
item: item.raw,
|
18421
|
+
internalItem: item,
|
18268
18422
|
index,
|
18269
18423
|
props: itemProps
|
18270
18424
|
}) ?? createVNode(VListItem, mergeProps(itemProps, {
|
@@ -18315,11 +18469,13 @@ const VCombobox = genericComponent()({
|
|
18315
18469
|
};
|
18316
18470
|
const hasSlot = hasChips.value ? !!slots.chip : !!slots.selection;
|
18317
18471
|
const slotContent = hasSlot ? ensureValidVNode(hasChips.value ? slots.chip({
|
18318
|
-
item,
|
18472
|
+
item: item.raw,
|
18473
|
+
internalItem: item,
|
18319
18474
|
index,
|
18320
18475
|
props: slotProps
|
18321
18476
|
}) : slots.selection({
|
18322
|
-
item,
|
18477
|
+
item: item.raw,
|
18478
|
+
internalItem: item,
|
18323
18479
|
index
|
18324
18480
|
})) : undefined;
|
18325
18481
|
if (hasSlot && !slotContent) return undefined;
|
@@ -21906,7 +22062,7 @@ const makeCalendarProps = propsFactory({
|
|
21906
22062
|
},
|
21907
22063
|
firstDayOfWeek: {
|
21908
22064
|
type: [Number, String],
|
21909
|
-
default:
|
22065
|
+
default: 0
|
21910
22066
|
}
|
21911
22067
|
}, 'calendar');
|
21912
22068
|
function useCalendar(props) {
|
@@ -21929,12 +22085,14 @@ function useCalendar(props) {
|
|
21929
22085
|
return adapter.setMonth(date, value);
|
21930
22086
|
}, v => adapter.getMonth(v));
|
21931
22087
|
const weekDays = computed(() => {
|
21932
|
-
const firstDayOfWeek =
|
22088
|
+
const firstDayOfWeek = Number(props.firstDayOfWeek);
|
22089
|
+
|
21933
22090
|
// Always generate all days, regardless of props.weekdays
|
21934
22091
|
return [0, 1, 2, 3, 4, 5, 6].map(day => (day + firstDayOfWeek) % 7);
|
21935
22092
|
});
|
21936
22093
|
const weeksInMonth = computed(() => {
|
21937
|
-
const
|
22094
|
+
const firstDayOfWeek = Number(props.firstDayOfWeek);
|
22095
|
+
const weeks = adapter.getWeekArray(month.value, firstDayOfWeek);
|
21938
22096
|
const days = weeks.flat();
|
21939
22097
|
|
21940
22098
|
// Make sure there's always 6 weeks in month (6 * 7 days)
|
@@ -21998,7 +22156,7 @@ function useCalendar(props) {
|
|
21998
22156
|
});
|
21999
22157
|
const weekNumbers = computed(() => {
|
22000
22158
|
return weeksInMonth.value.map(week => {
|
22001
|
-
return week.length ?
|
22159
|
+
return week.length ? getWeek(adapter, week[0]) : null;
|
22002
22160
|
});
|
22003
22161
|
});
|
22004
22162
|
function isDisabled(value) {
|
@@ -23487,7 +23645,17 @@ const VForm = genericComponent()({
|
|
23487
23645
|
"novalidate": true,
|
23488
23646
|
"onReset": onReset,
|
23489
23647
|
"onSubmit": onSubmit
|
23490
|
-
}, [slots.default?.(
|
23648
|
+
}, [slots.default?.({
|
23649
|
+
errors: form.errors.value,
|
23650
|
+
isDisabled: form.isDisabled.value,
|
23651
|
+
isReadonly: form.isReadonly.value,
|
23652
|
+
isValidating: form.isValidating.value,
|
23653
|
+
isValid: form.isValid.value,
|
23654
|
+
items: form.items.value,
|
23655
|
+
validate: form.validate,
|
23656
|
+
reset: form.reset,
|
23657
|
+
resetValidation: form.resetValidation
|
23658
|
+
})]));
|
23491
23659
|
return forwardRefs(form, formRef);
|
23492
23660
|
}
|
23493
23661
|
});
|
@@ -28546,43 +28714,37 @@ const VCalendarInterval = genericComponent()({
|
|
28546
28714
|
"style": `height: ${convertToUnit(props.intervalHeight)}`
|
28547
28715
|
}, [createVNode("div", {
|
28548
28716
|
"class": "v-calendar-day__row-label"
|
28549
|
-
}, [createVNode(
|
28717
|
+
}, [createVNode("slot", {
|
28550
28718
|
"name": "intervalFormat",
|
28551
28719
|
"interval": interval.value
|
28552
|
-
}, {
|
28553
|
-
default: () => [props.index ? props.intervalFormat ? typeof props.intervalFormat === 'string' ? adapter.format(interval.value.start, 'hours12h') : props.intervalFormat(interval.value) : interval.value.label : '']
|
28554
|
-
})]), createVNode("div", {
|
28720
|
+
}, [props.index ? props.intervalFormat ? typeof props.intervalFormat === 'string' ? adapter.format(interval.value.start, 'hours12h') : props.intervalFormat(interval.value) : interval.value.label : ''])]), createVNode("div", {
|
28555
28721
|
"class": "v-calendar-day__row-hairline"
|
28556
28722
|
}, null), createVNode("div", {
|
28557
28723
|
"class": ['v-calendar-day__row-content', interval.value.events.some(e => !e.last) ? 'v-calendar-day__row-content-through' : '']
|
28558
|
-
}, [createVNode(
|
28724
|
+
}, [createVNode("slot", {
|
28559
28725
|
"name": "intervalBody",
|
28560
28726
|
"interval": interval.value
|
28561
|
-
}, {
|
28562
|
-
|
28563
|
-
|
28564
|
-
|
28565
|
-
|
28566
|
-
|
28567
|
-
|
28568
|
-
}, null))]
|
28569
|
-
})])]) : createVNode("div", {
|
28727
|
+
}, [interval.value.events?.map(event => createVNode(VCalendarIntervalEvent, {
|
28728
|
+
"event": event,
|
28729
|
+
"interval": interval.value,
|
28730
|
+
"intervalDivisions": props.intervalDivisions,
|
28731
|
+
"intervalDuration": props.intervalDuration,
|
28732
|
+
"intervalHeight": props.intervalHeight
|
28733
|
+
}, null))])])]) : createVNode("div", {
|
28570
28734
|
"class": "v-calendar-day__row-without-label",
|
28571
28735
|
"style": `height: ${convertToUnit(props.intervalHeight)}`
|
28572
28736
|
}, [createVNode("div", {
|
28573
28737
|
"class": ['v-calendar-day__row-content', interval.value.events.some(e => !e.last) ? 'v-calendar-day__row-content-through' : '']
|
28574
|
-
}, [createVNode(
|
28738
|
+
}, [createVNode("slot", {
|
28575
28739
|
"name": "intervalBody",
|
28576
28740
|
"interval": interval.value
|
28577
|
-
}, {
|
28578
|
-
|
28579
|
-
|
28580
|
-
|
28581
|
-
|
28582
|
-
|
28583
|
-
|
28584
|
-
}, null))]
|
28585
|
-
})])]);
|
28741
|
+
}, [interval.value.events?.filter(event => !event.allDay).map(event => createVNode(VCalendarIntervalEvent, {
|
28742
|
+
"event": event,
|
28743
|
+
"interval": interval.value,
|
28744
|
+
"intervalDivisions": props.intervalDivisions,
|
28745
|
+
"intervalDuration": props.intervalDuration,
|
28746
|
+
"intervalHeight": props.intervalHeight
|
28747
|
+
}, null))])])]);
|
28586
28748
|
});
|
28587
28749
|
return {
|
28588
28750
|
interval
|
@@ -31491,7 +31653,7 @@ function createVuetify$1() {
|
|
31491
31653
|
};
|
31492
31654
|
});
|
31493
31655
|
}
|
31494
|
-
const version$1 = "3.8.1-
|
31656
|
+
const version$1 = "3.8.1-next.2025-04-15";
|
31495
31657
|
createVuetify$1.version = version$1;
|
31496
31658
|
|
31497
31659
|
// Vue's inject() can only be used in setup
|
@@ -31776,7 +31938,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
31776
31938
|
|
31777
31939
|
/* eslint-disable local-rules/sort-imports */
|
31778
31940
|
|
31779
|
-
const version = "3.8.1-
|
31941
|
+
const version = "3.8.1-next.2025-04-15";
|
31780
31942
|
|
31781
31943
|
/* eslint-disable local-rules/sort-imports */
|
31782
31944
|
|