diff --git a/.changeset/eleven-ghosts-wait.md b/.changeset/eleven-ghosts-wait.md new file mode 100644 index 00000000000..814ff302e98 --- /dev/null +++ b/.changeset/eleven-ghosts-wait.md @@ -0,0 +1,5 @@ +--- +"@talend/design-system": patch +--- + +fix: make ThemeProviderWithoutGlobals working since esm build diff --git a/packages/design-system/src/components/ThemeProvider/index.ts b/packages/design-system/src/components/ThemeProvider/index.ts index 41e2b46734a..ba8ffbc9425 100644 --- a/packages/design-system/src/components/ThemeProvider/index.ts +++ b/packages/design-system/src/components/ThemeProvider/index.ts @@ -1,8 +1,6 @@ import { ThemeProvider as BaseThemeProvider, ThemeProviderProps } from './ThemeProvider'; import ThemeSwitcher from './ThemeSwitcher'; -export { ThemeProviderWithoutGlobals } from './ThemeProviderWithoutGlobals'; - export const ThemeProvider = BaseThemeProvider as typeof BaseThemeProvider & { ThemeSwitcher: typeof ThemeSwitcher; }; diff --git a/packages/design-system/src/components/ThemeProvider/ThemeProviderWithoutGlobals.tsx b/packages/design-system/src/components/ThemeProviderWithoutGlobals/ThemeProviderWithoutGlobals.tsx similarity index 95% rename from packages/design-system/src/components/ThemeProvider/ThemeProviderWithoutGlobals.tsx rename to packages/design-system/src/components/ThemeProviderWithoutGlobals/ThemeProviderWithoutGlobals.tsx index e8729c9d0cb..3686f99fc0a 100644 --- a/packages/design-system/src/components/ThemeProvider/ThemeProviderWithoutGlobals.tsx +++ b/packages/design-system/src/components/ThemeProviderWithoutGlobals/ThemeProviderWithoutGlobals.tsx @@ -6,7 +6,7 @@ import 'typeface-source-sans-pro/index.css'; // eslint-disable-next-line @talend/import-depth import '@talend/design-tokens/dist/TalendDesignTokens.css'; -import ThemeContext from './ThemeContext'; +import ThemeContext from '../ThemeProvider/ThemeContext'; export type ThemeProviderProps = PropsWithChildren<{ theme?: string; diff --git a/packages/design-system/src/components/ThemeProviderWithoutGlobals/index.ts b/packages/design-system/src/components/ThemeProviderWithoutGlobals/index.ts new file mode 100644 index 00000000000..896f0fcf5f4 --- /dev/null +++ b/packages/design-system/src/components/ThemeProviderWithoutGlobals/index.ts @@ -0,0 +1 @@ +export { ThemeProviderWithoutGlobals } from './ThemeProviderWithoutGlobals';