Theming API: Update `Theme` export

pull/5756/head
Mert Sincan 2024-05-13 22:57:53 +01:00
parent a82843f1ff
commit 792f02f9b5
11 changed files with 11 additions and 13 deletions

View File

@ -1,4 +1,4 @@
import Theme, { dt } from 'primevue/themes';
import { Theme, dt } from 'primevue/themes';
import { useStyle } from 'primevue/usestyle';
import { ObjectUtils } from 'primevue/utils';

View File

@ -1,7 +1,7 @@
<script>
import Base from 'primevue/base';
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 { mergeProps } from 'vue';
import BaseComponentStyle from './style/BaseComponentStyle';

View File

@ -1,7 +1,7 @@
import Base from 'primevue/base';
import BaseStyle from 'primevue/base/style';
import PrimeVueService from 'primevue/service';
import Theme, { ThemeService } from 'primevue/themes';
import { Theme, ThemeService } from 'primevue/themes';
import { ObjectUtils, UniqueComponentId } from 'primevue/utils';
import { mergeProps } from 'vue';

View File

@ -1,6 +1,6 @@
import { FilterMatchMode } from 'primevue/api';
import PrimeVueService from 'primevue/service';
import Theme, { ThemeService } from 'primevue/themes';
import { Theme, ThemeService } from 'primevue/themes';
import { inject, reactive, ref, watch } from 'vue';
export const defaultOptions = {

View File

@ -1,4 +1,4 @@
import Theme, { SharedUtils } from 'primevue/themes';
import { SharedUtils, Theme } from 'primevue/themes';
export default (...presets) => {
const newPreset = SharedUtils.object.mergeKeys(Theme.getPreset(), ...presets);

View File

@ -1,4 +1,4 @@
import Theme from 'primevue/themes';
import { Theme } from 'primevue/themes';
export default (...presets) => {
const newPreset = SharedUtils.object.mergeKeys(...presets);

View File

@ -1,5 +1,4 @@
import { SharedUtils } from 'primevue/themes';
import Theme from 'primevue/themes/config';
import { SharedUtils, Theme } from 'primevue/themes';
export const $dt = (tokenPath) => {
const theme = Theme.getTheme();

View File

@ -1,5 +1,4 @@
import { SharedUtils } from 'primevue/themes';
import Theme from 'primevue/themes/config';
import { SharedUtils, Theme } from 'primevue/themes';
export const $t = (theme = {}) => {
let { preset: _preset, options: _options } = theme;

View File

@ -1,4 +1,4 @@
import Theme, { SharedUtils } from 'primevue/themes';
import { SharedUtils, Theme } from 'primevue/themes';
export default function (theme, options = {}) {
const VARIABLE = Theme.defaults.variable;

View File

@ -1,5 +1,5 @@
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 { default as ThemeService } from 'primevue/themes/service';
export * from 'primevue/themes/utils';

View File

@ -55,7 +55,7 @@ export default defineNuxtModule({
${registered.styles.map((style) => `import ${style.as} from '${style.from}';`).join('\n')}
${
hasTheme
? `import Theme from 'primevue/themes';
? `import { Theme } from 'primevue/themes';
import ${importTheme.as} from '${importTheme.from}';\n`
: ''
}