Theming API: Update `Theme` export
parent
a82843f1ff
commit
792f02f9b5
|
@ -1,4 +1,4 @@
|
||||||
import Theme, { dt } from 'primevue/themes';
|
import { Theme, dt } from 'primevue/themes';
|
||||||
import { useStyle } from 'primevue/usestyle';
|
import { useStyle } from 'primevue/usestyle';
|
||||||
import { ObjectUtils } from 'primevue/utils';
|
import { ObjectUtils } from 'primevue/utils';
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
import Base from 'primevue/base';
|
import Base from 'primevue/base';
|
||||||
import BaseStyle from 'primevue/base/style';
|
import BaseStyle from 'primevue/base/style';
|
||||||
import Theme, { ThemeService } from 'primevue/themes';
|
import { Theme, ThemeService } from 'primevue/themes';
|
||||||
import { DomHandler, ObjectUtils, UniqueComponentId } from 'primevue/utils';
|
import { DomHandler, ObjectUtils, UniqueComponentId } from 'primevue/utils';
|
||||||
import { mergeProps } from 'vue';
|
import { mergeProps } from 'vue';
|
||||||
import BaseComponentStyle from './style/BaseComponentStyle';
|
import BaseComponentStyle from './style/BaseComponentStyle';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import Base from 'primevue/base';
|
import Base from 'primevue/base';
|
||||||
import BaseStyle from 'primevue/base/style';
|
import BaseStyle from 'primevue/base/style';
|
||||||
import PrimeVueService from 'primevue/service';
|
import PrimeVueService from 'primevue/service';
|
||||||
import Theme, { ThemeService } from 'primevue/themes';
|
import { Theme, ThemeService } from 'primevue/themes';
|
||||||
import { ObjectUtils, UniqueComponentId } from 'primevue/utils';
|
import { ObjectUtils, UniqueComponentId } from 'primevue/utils';
|
||||||
import { mergeProps } from 'vue';
|
import { mergeProps } from 'vue';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { FilterMatchMode } from 'primevue/api';
|
import { FilterMatchMode } from 'primevue/api';
|
||||||
import PrimeVueService from 'primevue/service';
|
import PrimeVueService from 'primevue/service';
|
||||||
import Theme, { ThemeService } from 'primevue/themes';
|
import { Theme, ThemeService } from 'primevue/themes';
|
||||||
import { inject, reactive, ref, watch } from 'vue';
|
import { inject, reactive, ref, watch } from 'vue';
|
||||||
|
|
||||||
export const defaultOptions = {
|
export const defaultOptions = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import Theme, { SharedUtils } from 'primevue/themes';
|
import { SharedUtils, Theme } from 'primevue/themes';
|
||||||
|
|
||||||
export default (...presets) => {
|
export default (...presets) => {
|
||||||
const newPreset = SharedUtils.object.mergeKeys(Theme.getPreset(), ...presets);
|
const newPreset = SharedUtils.object.mergeKeys(Theme.getPreset(), ...presets);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import Theme from 'primevue/themes';
|
import { Theme } from 'primevue/themes';
|
||||||
|
|
||||||
export default (...presets) => {
|
export default (...presets) => {
|
||||||
const newPreset = SharedUtils.object.mergeKeys(...presets);
|
const newPreset = SharedUtils.object.mergeKeys(...presets);
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import { SharedUtils } from 'primevue/themes';
|
import { SharedUtils, Theme } from 'primevue/themes';
|
||||||
import Theme from 'primevue/themes/config';
|
|
||||||
|
|
||||||
export const $dt = (tokenPath) => {
|
export const $dt = (tokenPath) => {
|
||||||
const theme = Theme.getTheme();
|
const theme = Theme.getTheme();
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import { SharedUtils } from 'primevue/themes';
|
import { SharedUtils, Theme } from 'primevue/themes';
|
||||||
import Theme from 'primevue/themes/config';
|
|
||||||
|
|
||||||
export const $t = (theme = {}) => {
|
export const $t = (theme = {}) => {
|
||||||
let { preset: _preset, options: _options } = theme;
|
let { preset: _preset, options: _options } = theme;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import Theme, { SharedUtils } from 'primevue/themes';
|
import { SharedUtils, Theme } from 'primevue/themes';
|
||||||
|
|
||||||
export default function (theme, options = {}) {
|
export default function (theme, options = {}) {
|
||||||
const VARIABLE = Theme.defaults.variable;
|
const VARIABLE = Theme.defaults.variable;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
export * from 'primevue/themes/actions';
|
export * from 'primevue/themes/actions';
|
||||||
export { default } from 'primevue/themes/config';
|
export { default as Theme } from 'primevue/themes/config';
|
||||||
export * from 'primevue/themes/helpers';
|
export * from 'primevue/themes/helpers';
|
||||||
export { default as ThemeService } from 'primevue/themes/service';
|
export { default as ThemeService } from 'primevue/themes/service';
|
||||||
export * from 'primevue/themes/utils';
|
export * from 'primevue/themes/utils';
|
||||||
|
|
|
@ -55,7 +55,7 @@ export default defineNuxtModule({
|
||||||
${registered.styles.map((style) => `import ${style.as} from '${style.from}';`).join('\n')}
|
${registered.styles.map((style) => `import ${style.as} from '${style.from}';`).join('\n')}
|
||||||
${
|
${
|
||||||
hasTheme
|
hasTheme
|
||||||
? `import Theme from 'primevue/themes';
|
? `import { Theme } from 'primevue/themes';
|
||||||
import ${importTheme.as} from '${importTheme.from}';\n`
|
import ${importTheme.as} from '${importTheme.from}';\n`
|
||||||
: ''
|
: ''
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue