@vuetify/nightly 3.8.0-master.2025-04-06 → 3.8.1-master.2025-04-07
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 +3 -18
- package/dist/json/attributes.json +375 -375
- package/dist/json/importMap-labs.json +30 -30
- package/dist/json/importMap.json +152 -152
- package/dist/json/web-types.json +820 -820
- package/dist/vuetify-labs.cjs +107 -85
- package/dist/vuetify-labs.css +5452 -5452
- package/dist/vuetify-labs.d.ts +57 -57
- package/dist/vuetify-labs.esm.js +107 -85
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +107 -85
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +107 -85
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +3868 -3868
- package/dist/vuetify.d.ts +57 -57
- package/dist/vuetify.esm.js +107 -85
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +107 -85
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +791 -790
- package/dist/vuetify.min.js.map +1 -1
- package/lib/composables/theme.js +105 -83
- package/lib/composables/theme.js.map +1 -1
- package/lib/entry-bundler.js +1 -1
- package/lib/framework.d.ts +57 -57
- package/lib/framework.js +1 -1
- package/package.json +2 -2
package/dist/vuetify.cjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Vuetify v3.8.
|
2
|
+
* Vuetify v3.8.1-master.2025-04-07
|
3
3
|
* Forged by John Leider
|
4
4
|
* Released under the MIT License.
|
5
5
|
*/
|
@@ -2859,93 +2859,144 @@
|
|
2859
2859
|
themes
|
2860
2860
|
});
|
2861
2861
|
}
|
2862
|
+
function createCssClass(lines, selector, content, scope) {
|
2863
|
+
lines.push(`${getScopedSelector(selector, scope)} {\n`, ...content.map(line => ` ${line};\n`), '}\n');
|
2864
|
+
}
|
2865
|
+
function genCssVariables(theme) {
|
2866
|
+
const lightOverlay = theme.dark ? 2 : 1;
|
2867
|
+
const darkOverlay = theme.dark ? 1 : 2;
|
2868
|
+
const variables = [];
|
2869
|
+
for (const [key, value] of Object.entries(theme.colors)) {
|
2870
|
+
const rgb = parseColor(value);
|
2871
|
+
variables.push(`--v-theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`);
|
2872
|
+
if (!key.startsWith('on-')) {
|
2873
|
+
variables.push(`--v-theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`);
|
2874
|
+
}
|
2875
|
+
}
|
2876
|
+
for (const [key, value] of Object.entries(theme.variables)) {
|
2877
|
+
const color = typeof value === 'string' && value.startsWith('#') ? parseColor(value) : undefined;
|
2878
|
+
const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : undefined;
|
2879
|
+
variables.push(`--v-${key}: ${rgb ?? value}`);
|
2880
|
+
}
|
2881
|
+
return variables;
|
2882
|
+
}
|
2883
|
+
function genVariation(name, color, variations) {
|
2884
|
+
const object = {};
|
2885
|
+
if (variations) {
|
2886
|
+
for (const variation of ['lighten', 'darken']) {
|
2887
|
+
const fn = variation === 'lighten' ? lighten : darken;
|
2888
|
+
for (const amount of createRange(variations[variation], 1)) {
|
2889
|
+
object[`${name}-${variation}-${amount}`] = RGBtoHex(fn(parseColor(color), amount));
|
2890
|
+
}
|
2891
|
+
}
|
2892
|
+
}
|
2893
|
+
return object;
|
2894
|
+
}
|
2895
|
+
function genVariations(colors, variations) {
|
2896
|
+
if (!variations) return {};
|
2897
|
+
let variationColors = {};
|
2898
|
+
for (const name of variations.colors) {
|
2899
|
+
const color = colors[name];
|
2900
|
+
if (!color) continue;
|
2901
|
+
variationColors = {
|
2902
|
+
...variationColors,
|
2903
|
+
...genVariation(name, color, variations)
|
2904
|
+
};
|
2905
|
+
}
|
2906
|
+
return variationColors;
|
2907
|
+
}
|
2908
|
+
function genOnColors(colors) {
|
2909
|
+
const onColors = {};
|
2910
|
+
for (const color of Object.keys(colors)) {
|
2911
|
+
if (color.startsWith('on-') || colors[`on-${color}`]) continue;
|
2912
|
+
const onColor = `on-${color}`;
|
2913
|
+
const colorVal = parseColor(colors[color]);
|
2914
|
+
onColors[onColor] = getForeground(colorVal);
|
2915
|
+
}
|
2916
|
+
return onColors;
|
2917
|
+
}
|
2918
|
+
function getScopedSelector(selector, scope) {
|
2919
|
+
if (!scope) return selector;
|
2920
|
+
const scopeSelector = `:where(${scope})`;
|
2921
|
+
return selector === ':root' ? scopeSelector : `${scopeSelector} ${selector}`;
|
2922
|
+
}
|
2923
|
+
function upsertStyles(styleEl, styles) {
|
2924
|
+
if (!styleEl) return;
|
2925
|
+
styleEl.innerHTML = styles;
|
2926
|
+
}
|
2927
|
+
function getOrCreateStyleElement(id, cspNonce) {
|
2928
|
+
if (!IN_BROWSER) return null;
|
2929
|
+
let style = document.getElementById(id);
|
2930
|
+
if (!style) {
|
2931
|
+
style = document.createElement('style');
|
2932
|
+
style.id = id;
|
2933
|
+
style.type = 'text/css';
|
2934
|
+
if (cspNonce) style.setAttribute('nonce', cspNonce);
|
2935
|
+
document.head.appendChild(style);
|
2936
|
+
}
|
2937
|
+
return style;
|
2938
|
+
}
|
2862
2939
|
|
2863
2940
|
// Composables
|
2864
2941
|
function createTheme(options) {
|
2865
2942
|
const parsedOptions = parseThemeOptions(options);
|
2866
|
-
const name = vue.
|
2943
|
+
const name = vue.shallowRef(parsedOptions.defaultTheme);
|
2867
2944
|
const themes = vue.ref(parsedOptions.themes);
|
2868
2945
|
const computedThemes = vue.computed(() => {
|
2869
2946
|
const acc = {};
|
2870
2947
|
for (const [name, original] of Object.entries(themes.value)) {
|
2871
|
-
const
|
2948
|
+
const colors = {
|
2949
|
+
...original.colors,
|
2950
|
+
...genVariations(original.colors, parsedOptions.variations)
|
2951
|
+
};
|
2952
|
+
acc[name] = {
|
2872
2953
|
...original,
|
2873
2954
|
colors: {
|
2874
|
-
...
|
2955
|
+
...colors,
|
2956
|
+
...genOnColors(colors)
|
2875
2957
|
}
|
2876
2958
|
};
|
2877
|
-
if (parsedOptions.variations) {
|
2878
|
-
for (const name of parsedOptions.variations.colors) {
|
2879
|
-
const color = theme.colors[name];
|
2880
|
-
if (!color) continue;
|
2881
|
-
for (const variation of ['lighten', 'darken']) {
|
2882
|
-
const fn = variation === 'lighten' ? lighten : darken;
|
2883
|
-
for (const amount of createRange(parsedOptions.variations[variation], 1)) {
|
2884
|
-
theme.colors[`${name}-${variation}-${amount}`] = RGBtoHex(fn(parseColor(color), amount));
|
2885
|
-
}
|
2886
|
-
}
|
2887
|
-
}
|
2888
|
-
}
|
2889
|
-
for (const color of Object.keys(theme.colors)) {
|
2890
|
-
if (/^on-[a-z]/.test(color) || theme.colors[`on-${color}`]) continue;
|
2891
|
-
const onColor = `on-${color}`;
|
2892
|
-
const colorVal = parseColor(theme.colors[color]);
|
2893
|
-
theme.colors[onColor] = getForeground(colorVal);
|
2894
|
-
}
|
2895
2959
|
}
|
2896
2960
|
return acc;
|
2897
2961
|
});
|
2898
2962
|
const current = vue.computed(() => computedThemes.value[name.value]);
|
2899
|
-
function createCssClass(lines, selector, content) {
|
2900
|
-
lines.push(`${getScopedSelector(selector)} {\n`, ...content.map(line => ` ${line};\n`), '}\n');
|
2901
|
-
}
|
2902
|
-
function getScopedSelector(selector) {
|
2903
|
-
if (!parsedOptions.scope) {
|
2904
|
-
return selector;
|
2905
|
-
}
|
2906
|
-
const scopeSelector = `:where(${parsedOptions.scope})`;
|
2907
|
-
if (selector === ':root') {
|
2908
|
-
return scopeSelector;
|
2909
|
-
}
|
2910
|
-
return `${scopeSelector} ${selector}`;
|
2911
|
-
}
|
2912
2963
|
const styles = vue.computed(() => {
|
2913
2964
|
const lines = [];
|
2914
2965
|
if (current.value?.dark) {
|
2915
|
-
createCssClass(lines, ':root', ['color-scheme: dark']);
|
2966
|
+
createCssClass(lines, ':root', ['color-scheme: dark'], parsedOptions.scope);
|
2916
2967
|
}
|
2917
|
-
createCssClass(lines, ':root', genCssVariables(current.value));
|
2968
|
+
createCssClass(lines, ':root', genCssVariables(current.value), parsedOptions.scope);
|
2918
2969
|
for (const [themeName, theme] of Object.entries(computedThemes.value)) {
|
2919
|
-
createCssClass(lines, `.v-theme--${themeName}`, [`color-scheme: ${theme.dark ? 'dark' : 'normal'}`, ...genCssVariables(theme)]);
|
2970
|
+
createCssClass(lines, `.v-theme--${themeName}`, [`color-scheme: ${theme.dark ? 'dark' : 'normal'}`, ...genCssVariables(theme)], parsedOptions.scope);
|
2920
2971
|
}
|
2921
2972
|
const bgLines = [];
|
2922
2973
|
const fgLines = [];
|
2923
2974
|
const colors = new Set(Object.values(computedThemes.value).flatMap(theme => Object.keys(theme.colors)));
|
2924
2975
|
for (const key of colors) {
|
2925
|
-
if (
|
2926
|
-
createCssClass(fgLines, `.${key}`, [`color: rgb(var(--v-theme-${key})) !important`]);
|
2976
|
+
if (key.startsWith('on-')) {
|
2977
|
+
createCssClass(fgLines, `.${key}`, [`color: rgb(var(--v-theme-${key})) !important`], parsedOptions.scope);
|
2927
2978
|
} else {
|
2928
|
-
createCssClass(bgLines, `.bg-${key}`, [`--v-theme-overlay-multiplier: var(--v-theme-${key}-overlay-multiplier)`, `background-color: rgb(var(--v-theme-${key})) !important`, `color: rgb(var(--v-theme-on-${key})) !important`]);
|
2929
|
-
createCssClass(fgLines, `.text-${key}`, [`color: rgb(var(--v-theme-${key})) !important`]);
|
2930
|
-
createCssClass(fgLines, `.border-${key}`, [`--v-border-color: var(--v-theme-${key})`]);
|
2979
|
+
createCssClass(bgLines, `.bg-${key}`, [`--v-theme-overlay-multiplier: var(--v-theme-${key}-overlay-multiplier)`, `background-color: rgb(var(--v-theme-${key})) !important`, `color: rgb(var(--v-theme-on-${key})) !important`], parsedOptions.scope);
|
2980
|
+
createCssClass(fgLines, `.text-${key}`, [`color: rgb(var(--v-theme-${key})) !important`], parsedOptions.scope);
|
2981
|
+
createCssClass(fgLines, `.border-${key}`, [`--v-border-color: var(--v-theme-${key})`], parsedOptions.scope);
|
2931
2982
|
}
|
2932
2983
|
}
|
2933
2984
|
lines.push(...bgLines, ...fgLines);
|
2934
2985
|
return lines.map((str, i) => i === 0 ? str : ` ${str}`).join('');
|
2935
2986
|
});
|
2936
|
-
function getHead() {
|
2937
|
-
return {
|
2938
|
-
style: [{
|
2939
|
-
textContent: styles.value,
|
2940
|
-
id: parsedOptions.stylesheetId,
|
2941
|
-
nonce: parsedOptions.cspNonce || false
|
2942
|
-
}]
|
2943
|
-
};
|
2944
|
-
}
|
2945
2987
|
function install(app) {
|
2946
2988
|
if (parsedOptions.isDisabled) return;
|
2947
2989
|
const head = app._context.provides.usehead;
|
2948
2990
|
if (head) {
|
2991
|
+
function getHead() {
|
2992
|
+
return {
|
2993
|
+
style: [{
|
2994
|
+
textContent: styles.value,
|
2995
|
+
id: parsedOptions.stylesheetId,
|
2996
|
+
nonce: parsedOptions.cspNonce || false
|
2997
|
+
}]
|
2998
|
+
};
|
2999
|
+
}
|
2949
3000
|
if (head.push) {
|
2950
3001
|
const entry = head.push(getHead);
|
2951
3002
|
if (IN_BROWSER) {
|
@@ -2962,7 +3013,6 @@
|
|
2962
3013
|
}
|
2963
3014
|
}
|
2964
3015
|
} else {
|
2965
|
-
let styleEl = IN_BROWSER ? document.getElementById(parsedOptions.stylesheetId) : null;
|
2966
3016
|
if (IN_BROWSER) {
|
2967
3017
|
vue.watch(styles, updateStyles, {
|
2968
3018
|
immediate: true
|
@@ -2971,15 +3021,7 @@
|
|
2971
3021
|
updateStyles();
|
2972
3022
|
}
|
2973
3023
|
function updateStyles() {
|
2974
|
-
|
2975
|
-
const el = document.createElement('style');
|
2976
|
-
el.type = 'text/css';
|
2977
|
-
el.id = parsedOptions.stylesheetId;
|
2978
|
-
if (parsedOptions.cspNonce) el.setAttribute('nonce', parsedOptions.cspNonce);
|
2979
|
-
styleEl = el;
|
2980
|
-
document.head.appendChild(styleEl);
|
2981
|
-
}
|
2982
|
-
if (styleEl) styleEl.innerHTML = styles.value;
|
3024
|
+
upsertStyles(getOrCreateStyleElement(parsedOptions.stylesheetId, parsedOptions.cspNonce), styles.value);
|
2983
3025
|
}
|
2984
3026
|
}
|
2985
3027
|
}
|
@@ -3003,9 +3045,7 @@
|
|
3003
3045
|
getCurrentInstance('provideTheme');
|
3004
3046
|
const theme = vue.inject(ThemeSymbol, null);
|
3005
3047
|
if (!theme) throw new Error('Could not find Vuetify theme injection');
|
3006
|
-
const name = vue.computed(() =>
|
3007
|
-
return props.theme ?? theme.name.value;
|
3008
|
-
});
|
3048
|
+
const name = vue.computed(() => props.theme ?? theme.name.value);
|
3009
3049
|
const current = vue.computed(() => theme.themes.value[name.value]);
|
3010
3050
|
const themeClasses = vue.computed(() => theme.isDisabled ? undefined : `v-theme--${name.value}`);
|
3011
3051
|
const newTheme = {
|
@@ -3023,24 +3063,6 @@
|
|
3023
3063
|
if (!theme) throw new Error('Could not find Vuetify theme injection');
|
3024
3064
|
return theme;
|
3025
3065
|
}
|
3026
|
-
function genCssVariables(theme) {
|
3027
|
-
const lightOverlay = theme.dark ? 2 : 1;
|
3028
|
-
const darkOverlay = theme.dark ? 1 : 2;
|
3029
|
-
const variables = [];
|
3030
|
-
for (const [key, value] of Object.entries(theme.colors)) {
|
3031
|
-
const rgb = parseColor(value);
|
3032
|
-
variables.push(`--v-theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`);
|
3033
|
-
if (!key.startsWith('on-')) {
|
3034
|
-
variables.push(`--v-theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`);
|
3035
|
-
}
|
3036
|
-
}
|
3037
|
-
for (const [key, value] of Object.entries(theme.variables)) {
|
3038
|
-
const color = typeof value === 'string' && value.startsWith('#') ? parseColor(value) : undefined;
|
3039
|
-
const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : undefined;
|
3040
|
-
variables.push(`--v-${key}: ${rgb ?? value}`);
|
3041
|
-
}
|
3042
|
-
return variables;
|
3043
|
-
}
|
3044
3066
|
|
3045
3067
|
const makeVAppProps = propsFactory({
|
3046
3068
|
...makeComponentProps(),
|
@@ -29218,7 +29240,7 @@
|
|
29218
29240
|
};
|
29219
29241
|
});
|
29220
29242
|
}
|
29221
|
-
const version$1 = "3.8.
|
29243
|
+
const version$1 = "3.8.1-master.2025-04-07";
|
29222
29244
|
createVuetify$1.version = version$1;
|
29223
29245
|
|
29224
29246
|
// Vue's inject() can only be used in setup
|
@@ -29243,7 +29265,7 @@
|
|
29243
29265
|
...options
|
29244
29266
|
});
|
29245
29267
|
};
|
29246
|
-
const version = "3.8.
|
29268
|
+
const version = "3.8.1-master.2025-04-07";
|
29247
29269
|
createVuetify.version = version;
|
29248
29270
|
|
29249
29271
|
exports.blueprints = index;
|