@vuetify/nightly 3.8.0-master.2025-04-06 → 3.8.1-dev.2025-04-12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -15
- package/dist/json/attributes.json +615 -615
- package/dist/json/importMap-labs.json +20 -20
- package/dist/json/importMap.json +126 -126
- package/dist/json/web-types.json +1125 -1125
- package/dist/vuetify-labs.cjs +192 -96
- package/dist/vuetify-labs.css +3977 -3977
- package/dist/vuetify-labs.d.ts +53 -48
- package/dist/vuetify-labs.esm.js +193 -97
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +192 -96
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +192 -96
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +4047 -4047
- package/dist/vuetify.d.ts +53 -48
- package/dist/vuetify.esm.js +193 -97
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +192 -96
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +1178 -1171
- package/dist/vuetify.min.js.map +1 -1
- package/lib/composables/theme.d.ts +6 -1
- package/lib/composables/theme.js +183 -93
- 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/entry-bundler.js +1 -1
- package/lib/entry-bundler.js.map +1 -1
- package/lib/framework.d.ts +53 -48
- package/lib/framework.js +1 -1
- package/lib/framework.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/package.json +2 -2
package/dist/vuetify-labs.d.ts
CHANGED
@@ -132,11 +132,12 @@ type DeepPartial<T> = T extends object ? {
|
|
132
132
|
} : T;
|
133
133
|
type ThemeOptions = false | {
|
134
134
|
cspNonce?: string;
|
135
|
-
defaultTheme?: string;
|
135
|
+
defaultTheme?: 'light' | 'dark' | 'system' | string;
|
136
136
|
variations?: false | VariationsOptions;
|
137
137
|
themes?: Record<string, ThemeDefinition>;
|
138
138
|
stylesheetId?: string;
|
139
139
|
scope?: string;
|
140
|
+
unimportant?: boolean;
|
140
141
|
};
|
141
142
|
type ThemeDefinition = DeepPartial<InternalThemeDefinition>;
|
142
143
|
interface VariationsOptions {
|
@@ -173,11 +174,15 @@ interface OnColors {
|
|
173
174
|
'on-info': string;
|
174
175
|
}
|
175
176
|
interface ThemeInstance {
|
177
|
+
change: (themeName: string) => void;
|
178
|
+
cycle: (themeArray?: string[]) => void;
|
179
|
+
toggle: (themeArray?: [string, string]) => void;
|
176
180
|
readonly isDisabled: boolean;
|
177
181
|
readonly themes: Ref<Record<string, InternalThemeDefinition>>;
|
178
182
|
readonly name: Readonly<Ref<string>>;
|
179
183
|
readonly current: DeepReadonly<Ref<InternalThemeDefinition>>;
|
180
184
|
readonly computedThemes: DeepReadonly<Ref<Record<string, InternalThemeDefinition>>>;
|
185
|
+
readonly prefix: string;
|
181
186
|
readonly themeClasses: Readonly<Ref<string | undefined>>;
|
182
187
|
readonly styles: Readonly<Ref<string>>;
|
183
188
|
readonly global: {
|
@@ -96780,42 +96785,43 @@ declare module 'vue' {
|
|
96780
96785
|
$children?: VNodeChild
|
96781
96786
|
}
|
96782
96787
|
export interface GlobalComponents {
|
96783
|
-
VApp: VApp
|
96784
96788
|
VAlert: VAlert
|
96785
96789
|
VAlertTitle: VAlertTitle
|
96790
|
+
VApp: VApp
|
96786
96791
|
VAutocomplete: VAutocomplete
|
96787
96792
|
VAppBar: VAppBar
|
96788
96793
|
VAppBarNavIcon: VAppBarNavIcon
|
96789
96794
|
VAppBarTitle: VAppBarTitle
|
96790
96795
|
VBadge: VBadge
|
96791
|
-
|
96792
|
-
VBottomNavigation: VBottomNavigation
|
96796
|
+
VAvatar: VAvatar
|
96793
96797
|
VBanner: VBanner
|
96794
96798
|
VBannerActions: VBannerActions
|
96795
96799
|
VBannerText: VBannerText
|
96796
|
-
|
96800
|
+
VBtn: VBtn
|
96797
96801
|
VBtnGroup: VBtnGroup
|
96798
96802
|
VBtnToggle: VBtnToggle
|
96799
|
-
|
96803
|
+
VBottomNavigation: VBottomNavigation
|
96800
96804
|
VBreadcrumbs: VBreadcrumbs
|
96801
96805
|
VBreadcrumbsItem: VBreadcrumbsItem
|
96802
96806
|
VBreadcrumbsDivider: VBreadcrumbsDivider
|
96807
|
+
VChip: VChip
|
96808
|
+
VCarousel: VCarousel
|
96809
|
+
VCarouselItem: VCarouselItem
|
96810
|
+
VBottomSheet: VBottomSheet
|
96811
|
+
VCode: VCode
|
96812
|
+
VChipGroup: VChipGroup
|
96803
96813
|
VCard: VCard
|
96804
96814
|
VCardActions: VCardActions
|
96805
96815
|
VCardItem: VCardItem
|
96806
96816
|
VCardSubtitle: VCardSubtitle
|
96807
96817
|
VCardText: VCardText
|
96808
96818
|
VCardTitle: VCardTitle
|
96819
|
+
VCombobox: VCombobox
|
96809
96820
|
VCheckbox: VCheckbox
|
96810
96821
|
VCheckboxBtn: VCheckboxBtn
|
96811
|
-
|
96812
|
-
VCarouselItem: VCarouselItem
|
96813
|
-
VChip: VChip
|
96814
|
-
VColorPicker: VColorPicker
|
96815
|
-
VChipGroup: VChipGroup
|
96816
|
-
VCode: VCode
|
96817
|
-
VCombobox: VCombobox
|
96822
|
+
VDialog: VDialog
|
96818
96823
|
VCounter: VCounter
|
96824
|
+
VColorPicker: VColorPicker
|
96819
96825
|
VDataTable: VDataTable
|
96820
96826
|
VDataTableHeaders: VDataTableHeaders
|
96821
96827
|
VDataTableFooter: VDataTableFooter
|
@@ -96829,18 +96835,17 @@ declare module 'vue' {
|
|
96829
96835
|
VDatePickerMonth: VDatePickerMonth
|
96830
96836
|
VDatePickerMonths: VDatePickerMonths
|
96831
96837
|
VDatePickerYears: VDatePickerYears
|
96832
|
-
VDivider: VDivider
|
96833
|
-
VDialog: VDialog
|
96834
|
-
VFab: VFab
|
96835
|
-
VField: VField
|
96836
|
-
VFieldLabel: VFieldLabel
|
96837
|
-
VFileInput: VFileInput
|
96838
|
-
VEmptyState: VEmptyState
|
96839
96838
|
VExpansionPanels: VExpansionPanels
|
96840
96839
|
VExpansionPanel: VExpansionPanel
|
96841
96840
|
VExpansionPanelText: VExpansionPanelText
|
96842
96841
|
VExpansionPanelTitle: VExpansionPanelTitle
|
96842
|
+
VDivider: VDivider
|
96843
|
+
VEmptyState: VEmptyState
|
96844
|
+
VField: VField
|
96845
|
+
VFieldLabel: VFieldLabel
|
96846
|
+
VFileInput: VFileInput
|
96843
96847
|
VFooter: VFooter
|
96848
|
+
VFab: VFab
|
96844
96849
|
VIcon: VIcon
|
96845
96850
|
VComponentIcon: VComponentIcon
|
96846
96851
|
VSvgIcon: VSvgIcon
|
@@ -96849,7 +96854,6 @@ declare module 'vue' {
|
|
96849
96854
|
VImg: VImg
|
96850
96855
|
VItemGroup: VItemGroup
|
96851
96856
|
VItem: VItem
|
96852
|
-
VInfiniteScroll: VInfiniteScroll
|
96853
96857
|
VInput: VInput
|
96854
96858
|
VKbd: VKbd
|
96855
96859
|
VLabel: VLabel
|
@@ -96862,29 +96866,29 @@ declare module 'vue' {
|
|
96862
96866
|
VListItemSubtitle: VListItemSubtitle
|
96863
96867
|
VListItemTitle: VListItemTitle
|
96864
96868
|
VListSubheader: VListSubheader
|
96869
|
+
VInfiniteScroll: VInfiniteScroll
|
96865
96870
|
VMain: VMain
|
96871
|
+
VMessages: VMessages
|
96866
96872
|
VMenu: VMenu
|
96867
96873
|
VNavigationDrawer: VNavigationDrawer
|
96868
|
-
VOtpInput: VOtpInput
|
96869
|
-
VMessages: VMessages
|
96870
96874
|
VNumberInput: VNumberInput
|
96871
|
-
|
96875
|
+
VOtpInput: VOtpInput
|
96876
|
+
VProgressLinear: VProgressLinear
|
96872
96877
|
VPagination: VPagination
|
96873
96878
|
VOverlay: VOverlay
|
96879
|
+
VProgressCircular: VProgressCircular
|
96874
96880
|
VRadioGroup: VRadioGroup
|
96875
|
-
VProgressLinear: VProgressLinear
|
96876
|
-
VSelectionControl: VSelectionControl
|
96877
|
-
VSelectionControlGroup: VSelectionControlGroup
|
96878
96881
|
VRating: VRating
|
96879
|
-
VSlider: VSlider
|
96880
|
-
VSheet: VSheet
|
96881
96882
|
VSelect: VSelect
|
96883
|
+
VSheet: VSheet
|
96884
|
+
VSelectionControl: VSelectionControl
|
96885
|
+
VSkeletonLoader: VSkeletonLoader
|
96886
|
+
VSelectionControlGroup: VSelectionControlGroup
|
96882
96887
|
VSlideGroup: VSlideGroup
|
96883
96888
|
VSlideGroupItem: VSlideGroupItem
|
96884
|
-
|
96885
|
-
VTextField: VTextField
|
96886
|
-
VSwitch: VSwitch
|
96889
|
+
VSlider: VSlider
|
96887
96890
|
VSnackbar: VSnackbar
|
96891
|
+
VSwitch: VSwitch
|
96888
96892
|
VStepper: VStepper
|
96889
96893
|
VStepperActions: VStepperActions
|
96890
96894
|
VStepperHeader: VStepperHeader
|
@@ -96896,38 +96900,40 @@ declare module 'vue' {
|
|
96896
96900
|
VTabs: VTabs
|
96897
96901
|
VTabsWindow: VTabsWindow
|
96898
96902
|
VTabsWindowItem: VTabsWindowItem
|
96899
|
-
|
96903
|
+
VTimeline: VTimeline
|
96904
|
+
VTimelineItem: VTimelineItem
|
96905
|
+
VTextField: VTextField
|
96900
96906
|
VToolbar: VToolbar
|
96901
96907
|
VToolbarTitle: VToolbarTitle
|
96902
96908
|
VToolbarItems: VToolbarItems
|
96903
|
-
VTooltip: VTooltip
|
96904
96909
|
VTextarea: VTextarea
|
96905
|
-
|
96906
|
-
VTimelineItem: VTimelineItem
|
96910
|
+
VTooltip: VTooltip
|
96907
96911
|
VWindow: VWindow
|
96908
96912
|
VWindowItem: VWindowItem
|
96913
|
+
VSystemBar: VSystemBar
|
96909
96914
|
VConfirmEdit: VConfirmEdit
|
96910
96915
|
VDataIterator: VDataIterator
|
96911
96916
|
VDefaultsProvider: VDefaultsProvider
|
96912
96917
|
VForm: VForm
|
96913
|
-
VHover: VHover
|
96914
96918
|
VContainer: VContainer
|
96915
96919
|
VCol: VCol
|
96916
96920
|
VRow: VRow
|
96917
96921
|
VSpacer: VSpacer
|
96918
|
-
|
96922
|
+
VHover: VHover
|
96919
96923
|
VLayout: VLayout
|
96920
96924
|
VLayoutItem: VLayoutItem
|
96921
|
-
|
96925
|
+
VLazy: VLazy
|
96922
96926
|
VLocaleProvider: VLocaleProvider
|
96923
|
-
|
96927
|
+
VNoSsr: VNoSsr
|
96924
96928
|
VRadio: VRadio
|
96929
|
+
VParallax: VParallax
|
96925
96930
|
VRangeSlider: VRangeSlider
|
96926
96931
|
VResponsive: VResponsive
|
96927
96932
|
VSnackbarQueue: VSnackbarQueue
|
96928
96933
|
VSparkline: VSparkline
|
96929
96934
|
VSpeedDial: VSpeedDial
|
96930
96935
|
VThemeProvider: VThemeProvider
|
96936
|
+
VValidation: VValidation
|
96931
96937
|
VVirtualScroll: VVirtualScroll
|
96932
96938
|
VFabTransition: VFabTransition
|
96933
96939
|
VDialogBottomTransition: VDialogBottomTransition
|
@@ -96945,10 +96951,7 @@ declare module 'vue' {
|
|
96945
96951
|
VExpandTransition: VExpandTransition
|
96946
96952
|
VExpandXTransition: VExpandXTransition
|
96947
96953
|
VDialogTransition: VDialogTransition
|
96948
|
-
|
96949
|
-
VStepperVertical: VStepperVertical
|
96950
|
-
VStepperVerticalItem: VStepperVerticalItem
|
96951
|
-
VStepperVerticalActions: VStepperVerticalActions
|
96954
|
+
VIconBtn: VIconBtn
|
96952
96955
|
VCalendar: VCalendar
|
96953
96956
|
VCalendarDay: VCalendarDay
|
96954
96957
|
VCalendarHeader: VCalendarHeader
|
@@ -96957,15 +96960,17 @@ declare module 'vue' {
|
|
96957
96960
|
VCalendarMonthDay: VCalendarMonthDay
|
96958
96961
|
VFileUpload: VFileUpload
|
96959
96962
|
VFileUploadItem: VFileUploadItem
|
96960
|
-
|
96961
|
-
|
96962
|
-
|
96963
|
-
VIconBtn: VIconBtn
|
96963
|
+
VStepperVertical: VStepperVertical
|
96964
|
+
VStepperVerticalItem: VStepperVerticalItem
|
96965
|
+
VStepperVerticalActions: VStepperVerticalActions
|
96964
96966
|
VPicker: VPicker
|
96965
96967
|
VPickerTitle: VPickerTitle
|
96966
96968
|
VTreeview: VTreeview
|
96967
96969
|
VTreeviewItem: VTreeviewItem
|
96968
96970
|
VTreeviewGroup: VTreeviewGroup
|
96971
|
+
VTimePicker: VTimePicker
|
96972
|
+
VTimePickerClock: VTimePickerClock
|
96973
|
+
VTimePickerControls: VTimePickerControls
|
96969
96974
|
VDateInput: VDateInput
|
96970
96975
|
VPullToRefresh: VPullToRefresh
|
96971
96976
|
}
|
package/dist/vuetify-labs.esm.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
/*!
|
2
|
-
* Vuetify v3.8.
|
2
|
+
* Vuetify v3.8.1-dev.2025-04-12
|
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"); }
|
@@ -2281,6 +2282,7 @@ const makeThemeProps = propsFactory({
|
|
2281
2282
|
function genDefaults$2() {
|
2282
2283
|
return {
|
2283
2284
|
defaultTheme: 'light',
|
2285
|
+
prefix: 'v-',
|
2284
2286
|
variations: {
|
2285
2287
|
colors: [],
|
2286
2288
|
lighten: 0,
|
@@ -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: false,
|
2370
|
+
utilities: true
|
2366
2371
|
};
|
2367
2372
|
}
|
2368
2373
|
function parseThemeOptions() {
|
@@ -2382,93 +2387,175 @@ function parseThemeOptions() {
|
|
2382
2387
|
themes
|
2383
2388
|
});
|
2384
2389
|
}
|
2390
|
+
function createCssClass(lines, selector, content, scope) {
|
2391
|
+
lines.push(`${getScopedSelector(selector, scope)} {\n`, ...content.map(line => ` ${line};\n`), '}\n');
|
2392
|
+
}
|
2393
|
+
function genCssVariables(theme, prefix) {
|
2394
|
+
const lightOverlay = theme.dark ? 2 : 1;
|
2395
|
+
const darkOverlay = theme.dark ? 1 : 2;
|
2396
|
+
const variables = [];
|
2397
|
+
for (const [key, value] of Object.entries(theme.colors)) {
|
2398
|
+
const rgb = parseColor(value);
|
2399
|
+
variables.push(`--${prefix}theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`);
|
2400
|
+
if (!key.startsWith('on-')) {
|
2401
|
+
variables.push(`--${prefix}theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`);
|
2402
|
+
}
|
2403
|
+
}
|
2404
|
+
for (const [key, value] of Object.entries(theme.variables)) {
|
2405
|
+
const color = typeof value === 'string' && value.startsWith('#') ? parseColor(value) : undefined;
|
2406
|
+
const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : undefined;
|
2407
|
+
variables.push(`--${prefix}${key}: ${rgb ?? value}`);
|
2408
|
+
}
|
2409
|
+
return variables;
|
2410
|
+
}
|
2411
|
+
function genVariation(name, color, variations) {
|
2412
|
+
const object = {};
|
2413
|
+
if (variations) {
|
2414
|
+
for (const variation of ['lighten', 'darken']) {
|
2415
|
+
const fn = variation === 'lighten' ? lighten : darken;
|
2416
|
+
for (const amount of createRange(variations[variation], 1)) {
|
2417
|
+
object[`${name}-${variation}-${amount}`] = RGBtoHex(fn(parseColor(color), amount));
|
2418
|
+
}
|
2419
|
+
}
|
2420
|
+
}
|
2421
|
+
return object;
|
2422
|
+
}
|
2423
|
+
function genVariations(colors, variations) {
|
2424
|
+
if (!variations) return {};
|
2425
|
+
let variationColors = {};
|
2426
|
+
for (const name of variations.colors) {
|
2427
|
+
const color = colors[name];
|
2428
|
+
if (!color) continue;
|
2429
|
+
variationColors = {
|
2430
|
+
...variationColors,
|
2431
|
+
...genVariation(name, color, variations)
|
2432
|
+
};
|
2433
|
+
}
|
2434
|
+
return variationColors;
|
2435
|
+
}
|
2436
|
+
function genOnColors(colors) {
|
2437
|
+
const onColors = {};
|
2438
|
+
for (const color of Object.keys(colors)) {
|
2439
|
+
if (color.startsWith('on-') || colors[`on-${color}`]) continue;
|
2440
|
+
const onColor = `on-${color}`;
|
2441
|
+
const colorVal = parseColor(colors[color]);
|
2442
|
+
onColors[onColor] = getForeground(colorVal);
|
2443
|
+
}
|
2444
|
+
return onColors;
|
2445
|
+
}
|
2446
|
+
function getScopedSelector(selector, scope) {
|
2447
|
+
if (!scope) return selector;
|
2448
|
+
const scopeSelector = `:where(${scope})`;
|
2449
|
+
return selector === ':root' ? scopeSelector : `${scopeSelector} ${selector}`;
|
2450
|
+
}
|
2451
|
+
function upsertStyles(id, cspNonce, styles) {
|
2452
|
+
const styleEl = getOrCreateStyleElement(id, cspNonce);
|
2453
|
+
if (!styleEl) return;
|
2454
|
+
styleEl.innerHTML = styles;
|
2455
|
+
}
|
2456
|
+
function getOrCreateStyleElement(id, cspNonce) {
|
2457
|
+
if (!IN_BROWSER) return null;
|
2458
|
+
let style = document.getElementById(id);
|
2459
|
+
if (!style) {
|
2460
|
+
style = document.createElement('style');
|
2461
|
+
style.id = id;
|
2462
|
+
style.type = 'text/css';
|
2463
|
+
if (cspNonce) style.setAttribute('nonce', cspNonce);
|
2464
|
+
document.head.appendChild(style);
|
2465
|
+
}
|
2466
|
+
return style;
|
2467
|
+
}
|
2385
2468
|
|
2386
2469
|
// Composables
|
2387
2470
|
function createTheme(options) {
|
2388
2471
|
const parsedOptions = parseThemeOptions(options);
|
2389
|
-
const
|
2472
|
+
const _name = shallowRef(parsedOptions.defaultTheme);
|
2390
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
|
+
});
|
2391
2483
|
const computedThemes = computed(() => {
|
2392
2484
|
const acc = {};
|
2393
2485
|
for (const [name, original] of Object.entries(themes.value)) {
|
2394
|
-
const
|
2486
|
+
const colors = {
|
2487
|
+
...original.colors,
|
2488
|
+
...genVariations(original.colors, parsedOptions.variations)
|
2489
|
+
};
|
2490
|
+
acc[name] = {
|
2395
2491
|
...original,
|
2396
2492
|
colors: {
|
2397
|
-
...
|
2493
|
+
...colors,
|
2494
|
+
...genOnColors(colors)
|
2398
2495
|
}
|
2399
2496
|
};
|
2400
|
-
if (parsedOptions.variations) {
|
2401
|
-
for (const name of parsedOptions.variations.colors) {
|
2402
|
-
const color = theme.colors[name];
|
2403
|
-
if (!color) continue;
|
2404
|
-
for (const variation of ['lighten', 'darken']) {
|
2405
|
-
const fn = variation === 'lighten' ? lighten : darken;
|
2406
|
-
for (const amount of createRange(parsedOptions.variations[variation], 1)) {
|
2407
|
-
theme.colors[`${name}-${variation}-${amount}`] = RGBtoHex(fn(parseColor(color), amount));
|
2408
|
-
}
|
2409
|
-
}
|
2410
|
-
}
|
2411
|
-
}
|
2412
|
-
for (const color of Object.keys(theme.colors)) {
|
2413
|
-
if (/^on-[a-z]/.test(color) || theme.colors[`on-${color}`]) continue;
|
2414
|
-
const onColor = `on-${color}`;
|
2415
|
-
const colorVal = parseColor(theme.colors[color]);
|
2416
|
-
theme.colors[onColor] = getForeground(colorVal);
|
2417
|
-
}
|
2418
2497
|
}
|
2419
2498
|
return acc;
|
2420
2499
|
});
|
2421
2500
|
const current = computed(() => computedThemes.value[name.value]);
|
2422
|
-
function createCssClass(lines, selector, content) {
|
2423
|
-
lines.push(`${getScopedSelector(selector)} {\n`, ...content.map(line => ` ${line};\n`), '}\n');
|
2424
|
-
}
|
2425
|
-
function getScopedSelector(selector) {
|
2426
|
-
if (!parsedOptions.scope) {
|
2427
|
-
return selector;
|
2428
|
-
}
|
2429
|
-
const scopeSelector = `:where(${parsedOptions.scope})`;
|
2430
|
-
if (selector === ':root') {
|
2431
|
-
return scopeSelector;
|
2432
|
-
}
|
2433
|
-
return `${scopeSelector} ${selector}`;
|
2434
|
-
}
|
2435
2501
|
const styles = computed(() => {
|
2436
2502
|
const lines = [];
|
2503
|
+
const important = parsedOptions.unimportant ? '' : ' !important';
|
2504
|
+
const scoped = parsedOptions.scoped ? parsedOptions.prefix : '';
|
2437
2505
|
if (current.value?.dark) {
|
2438
|
-
createCssClass(lines, ':root', ['color-scheme: dark']);
|
2506
|
+
createCssClass(lines, ':root', ['color-scheme: dark'], parsedOptions.scope);
|
2439
2507
|
}
|
2440
|
-
createCssClass(lines, ':root', genCssVariables(current.value));
|
2508
|
+
createCssClass(lines, ':root', genCssVariables(current.value, parsedOptions.prefix), parsedOptions.scope);
|
2441
2509
|
for (const [themeName, theme] of Object.entries(computedThemes.value)) {
|
2442
|
-
createCssClass(lines,
|
2443
|
-
}
|
2444
|
-
|
2445
|
-
|
2446
|
-
|
2447
|
-
|
2448
|
-
|
2449
|
-
|
2450
|
-
|
2451
|
-
|
2452
|
-
|
2453
|
-
|
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
|
+
}
|
2454
2524
|
}
|
2525
|
+
lines.push(...bgLines, ...fgLines);
|
2455
2526
|
}
|
2456
|
-
lines.push(...bgLines, ...fgLines);
|
2457
2527
|
return lines.map((str, i) => i === 0 ? str : ` ${str}`).join('');
|
2458
2528
|
});
|
2459
|
-
|
2460
|
-
|
2461
|
-
|
2462
|
-
|
2463
|
-
|
2464
|
-
|
2465
|
-
|
2466
|
-
|
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
|
+
}
|
2467
2545
|
}
|
2468
2546
|
function install(app) {
|
2469
2547
|
if (parsedOptions.isDisabled) return;
|
2470
2548
|
const head = app._context.provides.usehead;
|
2471
2549
|
if (head) {
|
2550
|
+
function getHead() {
|
2551
|
+
return {
|
2552
|
+
style: [{
|
2553
|
+
textContent: styles.value,
|
2554
|
+
id: parsedOptions.stylesheetId,
|
2555
|
+
nonce: parsedOptions.cspNonce || false
|
2556
|
+
}]
|
2557
|
+
};
|
2558
|
+
}
|
2472
2559
|
if (head.push) {
|
2473
2560
|
const entry = head.push(getHead);
|
2474
2561
|
if (IN_BROWSER) {
|
@@ -2485,7 +2572,6 @@ function createTheme(options) {
|
|
2485
2572
|
}
|
2486
2573
|
}
|
2487
2574
|
} else {
|
2488
|
-
let styleEl = IN_BROWSER ? document.getElementById(parsedOptions.stylesheetId) : null;
|
2489
2575
|
if (IN_BROWSER) {
|
2490
2576
|
watch(styles, updateStyles, {
|
2491
2577
|
immediate: true
|
@@ -2494,30 +2580,55 @@ function createTheme(options) {
|
|
2494
2580
|
updateStyles();
|
2495
2581
|
}
|
2496
2582
|
function updateStyles() {
|
2497
|
-
|
2498
|
-
const el = document.createElement('style');
|
2499
|
-
el.type = 'text/css';
|
2500
|
-
el.id = parsedOptions.stylesheetId;
|
2501
|
-
if (parsedOptions.cspNonce) el.setAttribute('nonce', parsedOptions.cspNonce);
|
2502
|
-
styleEl = el;
|
2503
|
-
document.head.appendChild(styleEl);
|
2504
|
-
}
|
2505
|
-
if (styleEl) styleEl.innerHTML = styles.value;
|
2583
|
+
upsertStyles(parsedOptions.stylesheetId, parsedOptions.cspNonce, styles.value);
|
2506
2584
|
}
|
2507
2585
|
}
|
2508
2586
|
}
|
2509
|
-
|
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
|
+
});
|
2510
2617
|
return {
|
2511
2618
|
install,
|
2619
|
+
change,
|
2620
|
+
cycle,
|
2621
|
+
toggle,
|
2512
2622
|
isDisabled: parsedOptions.isDisabled,
|
2513
2623
|
name,
|
2514
2624
|
themes,
|
2515
2625
|
current,
|
2516
2626
|
computedThemes,
|
2627
|
+
prefix: parsedOptions.prefix,
|
2517
2628
|
themeClasses,
|
2518
2629
|
styles,
|
2519
2630
|
global: {
|
2520
|
-
name,
|
2631
|
+
name: globalName,
|
2521
2632
|
current
|
2522
2633
|
}
|
2523
2634
|
};
|
@@ -2526,11 +2637,9 @@ function provideTheme(props) {
|
|
2526
2637
|
getCurrentInstance('provideTheme');
|
2527
2638
|
const theme = inject$1(ThemeSymbol, null);
|
2528
2639
|
if (!theme) throw new Error('Could not find Vuetify theme injection');
|
2529
|
-
const name = computed(() =>
|
2530
|
-
return props.theme ?? theme.name.value;
|
2531
|
-
});
|
2640
|
+
const name = computed(() => props.theme ?? theme.name.value);
|
2532
2641
|
const current = computed(() => theme.themes.value[name.value]);
|
2533
|
-
const themeClasses = computed(() => theme.isDisabled ? undefined :
|
2642
|
+
const themeClasses = computed(() => theme.isDisabled ? undefined : `${theme.prefix}theme--${name.value}`);
|
2534
2643
|
const newTheme = {
|
2535
2644
|
...theme,
|
2536
2645
|
name,
|
@@ -2546,24 +2655,6 @@ function useTheme() {
|
|
2546
2655
|
if (!theme) throw new Error('Could not find Vuetify theme injection');
|
2547
2656
|
return theme;
|
2548
2657
|
}
|
2549
|
-
function genCssVariables(theme) {
|
2550
|
-
const lightOverlay = theme.dark ? 2 : 1;
|
2551
|
-
const darkOverlay = theme.dark ? 1 : 2;
|
2552
|
-
const variables = [];
|
2553
|
-
for (const [key, value] of Object.entries(theme.colors)) {
|
2554
|
-
const rgb = parseColor(value);
|
2555
|
-
variables.push(`--v-theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`);
|
2556
|
-
if (!key.startsWith('on-')) {
|
2557
|
-
variables.push(`--v-theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`);
|
2558
|
-
}
|
2559
|
-
}
|
2560
|
-
for (const [key, value] of Object.entries(theme.variables)) {
|
2561
|
-
const color = typeof value === 'string' && value.startsWith('#') ? parseColor(value) : undefined;
|
2562
|
-
const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : undefined;
|
2563
|
-
variables.push(`--v-${key}: ${rgb ?? value}`);
|
2564
|
-
}
|
2565
|
-
return variables;
|
2566
|
-
}
|
2567
2658
|
|
2568
2659
|
const makeVAppProps = propsFactory({
|
2569
2660
|
...makeComponentProps(),
|
@@ -12281,7 +12372,12 @@ function useVirtual(props, items) {
|
|
12281
12372
|
}
|
12282
12373
|
function calculateOffset(index) {
|
12283
12374
|
index = clamp(index, 0, items.value.length - 1);
|
12284
|
-
|
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;
|
12285
12381
|
}
|
12286
12382
|
function calculateIndex(scrollTop) {
|
12287
12383
|
return binaryClosest(offsets, scrollTop);
|
@@ -31538,7 +31634,7 @@ function createVuetify$1() {
|
|
31538
31634
|
};
|
31539
31635
|
});
|
31540
31636
|
}
|
31541
|
-
const version$1 = "3.8.
|
31637
|
+
const version$1 = "3.8.1-dev.2025-04-12";
|
31542
31638
|
createVuetify$1.version = version$1;
|
31543
31639
|
|
31544
31640
|
// Vue's inject() can only be used in setup
|
@@ -31823,7 +31919,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
31823
31919
|
|
31824
31920
|
/* eslint-disable local-rules/sort-imports */
|
31825
31921
|
|
31826
|
-
const version = "3.8.
|
31922
|
+
const version = "3.8.1-dev.2025-04-12";
|
31827
31923
|
|
31828
31924
|
/* eslint-disable local-rules/sort-imports */
|
31829
31925
|
|