mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-08 16:37:15 +00:00
Refactor on theme structure
This commit is contained in:
parent
c828680c69
commit
43d561a2b6
16 changed files with 345 additions and 330 deletions
|
@ -1,4 +1,4 @@
|
|||
import BaseThemeStyle from 'primevue/basetheme/style';
|
||||
import Theme from 'primevue/themes';
|
||||
import { useStyle } from 'primevue/usestyle';
|
||||
import { ObjectUtils } from 'primevue/utils';
|
||||
|
||||
|
@ -40,17 +40,14 @@ export default {
|
|||
loadTheme(theme, options = {}) {
|
||||
return theme ? useStyle(ObjectUtils.minifyCSS(theme), { name: `${this.name}-style`, ...options }) : {};
|
||||
},
|
||||
getCommonThemeCSS(preset, base, params, theme) {
|
||||
return BaseThemeStyle.getCommon(this.name, preset, base, params, theme);
|
||||
getCommonThemeCSS(theme, params) {
|
||||
return Theme.getCommonCSS(this.name, theme, params);
|
||||
},
|
||||
getPresetThemeCSS(presetCTheme, theme) {
|
||||
return BaseThemeStyle.getPresetC(this.name, presetCTheme, theme);
|
||||
getComponentThemeCSS(theme, params) {
|
||||
return Theme.getComponentCSS(this.name, theme, params);
|
||||
},
|
||||
getBaseThemeCSS(baseCTheme, params, theme) {
|
||||
return BaseThemeStyle.getBaseC(this.name, baseCTheme, params, theme);
|
||||
},
|
||||
getColorSchemeOption(colorScheme) {
|
||||
return BaseThemeStyle.getColorSchemeOption(colorScheme);
|
||||
getDirectiveThemeCSS(theme, params) {
|
||||
return Theme.getDirectiveCSS(this.name, theme, params);
|
||||
},
|
||||
getStyleSheet(extendedCSS = '', props = {}) {
|
||||
if (this.css) {
|
||||
|
@ -65,10 +62,10 @@ export default {
|
|||
return '';
|
||||
},
|
||||
getCommonThemeStyleSheet(theme = {}, params, props = {}) {
|
||||
return BaseThemeStyle.getCommonStyleSheet(this.name, theme, params, props);
|
||||
return Theme.getCommonStyleSheet(this.name, theme, params, props);
|
||||
},
|
||||
getThemeStyleSheet(theme = {}, params, props = {}) {
|
||||
return BaseThemeStyle.getStyleSheet(this.name, theme, params, props);
|
||||
return Theme.getStyleSheet(this.name, theme, params, props);
|
||||
},
|
||||
extend(style) {
|
||||
return { ...this, css: undefined, ...style };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue