@webpros/mui-theme 0.3.2 → 0.3.3

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.
Files changed (29) hide show
  1. package/README.md +63 -12
  2. package/dist/package.json +6 -4
  3. package/dist/src/components/feedback/Dialog/Dialog.theme.js +4 -4
  4. package/dist/src/components/surfaces/AppBar/AppBar.theme.d.ts +1 -1
  5. package/dist/src/components/surfaces/AppBar/AppBar.theme.js +1 -12
  6. package/dist/src/index.d.ts +1 -0
  7. package/dist/src/providers/WebProsMuiThemeProvider.d.ts +18 -2
  8. package/dist/src/providers/WebProsMuiThemeProvider.js +1 -1
  9. package/dist/src/providers/WebProsTheme.d.ts +19 -1
  10. package/dist/src/providers/WebProsTheme.js +20 -7
  11. package/dist/src/tokens/ThemeColorTokens.d.ts +1 -2
  12. package/dist/src/tokens/ThemeColorTokens.js +20 -3
  13. package/dist/src/utils/createIcon.js +14 -16
  14. package/dist/src/utils/getMUIComponents.d.ts +1 -2
  15. package/dist/src/utils/getMUIPalette.d.ts +2 -18
  16. package/dist/src/utils/getMUIPalette.js +4 -227
  17. package/package.json +6 -4
  18. package/dist/src/style/custom-color-palette.d.ts +0 -3
  19. package/dist/src/style/custom-color-palette.js +0 -73
  20. package/dist/src/tokens/legacyColors/LegacyDark.d.ts +0 -2
  21. package/dist/src/tokens/legacyColors/LegacyDark.js +0 -78
  22. package/dist/src/tokens/legacyColors/LegacyLight.d.ts +0 -2
  23. package/dist/src/tokens/legacyColors/LegacyLight.js +0 -76
  24. package/dist/src/tokens/legacyColors/ThemeColorTokensLegacy.d.ts +0 -72
  25. package/dist/src/tokens/legacyColors/ThemeColorTokensLegacy.js +0 -2
  26. package/dist/src/tokens/legacyColors/Tone.d.ts +0 -158
  27. package/dist/src/tokens/legacyColors/Tone.js +0 -157
  28. package/dist/src/tokens/legacyColors/index.d.ts +0 -2
  29. package/dist/src/tokens/legacyColors/index.js +0 -3
package/README.md CHANGED
@@ -79,6 +79,57 @@ const App = () => (
79
79
  import { Box } from '@mui/material'; // NOT import { Box } from '@webpros/mui-theme';
80
80
  ```
81
81
 
82
+ # Development
83
+
84
+ ## Using Custom ESLint Rules
85
+
86
+ The package exports custom ESLint rules to enforce Material Design 3 design system best practices. To use them in your project:
87
+
88
+ ```js
89
+ // eslint.config.js
90
+ import webprosMuiThemeRules from '@webpros/mui-theme/eslint';
91
+
92
+ export default [
93
+ // ... your other config
94
+ {
95
+ plugins: {
96
+ '@webpros/mui-theme': webprosMuiThemeRules,
97
+ },
98
+ rules: {
99
+ '@webpros/mui-theme/no-palette-usage': 'error',
100
+ '@webpros/mui-theme/no-standard-typography-variants': 'error',
101
+ '@webpros/mui-theme/no-hardcoded-typography-in-sx': 'error',
102
+ },
103
+ },
104
+ ];
105
+ ```
106
+
107
+ For detailed documentation of available rules, see [configs/eslint/README.md](configs/eslint/README.md).
108
+
109
+ ## Adding New Custom ESLint Rules
110
+
111
+ To add a new custom rule:
112
+
113
+ 1. Create a new file in `configs/eslint/rules/` with your rule implementation (use CommonJS format)
114
+ 2. Export the rule using `module.exports`
115
+ 3. Import and add it to `configs/eslint/index.cjs` using `require()`
116
+ 4. Add the rule to `eslint.config.js` in the plugins and rules sections
117
+ 5. Document the rule in `configs/eslint/README.md`
118
+
119
+ ### Testing Custom Rules
120
+
121
+ Test your custom rules by running ESLint on specific files:
122
+
123
+ ```bash
124
+ # Test on a specific file
125
+ npx eslint src/path/to/file.ts
126
+
127
+ # Test on all TypeScript files
128
+ npx eslint 'src/**/*.{ts,tsx}'
129
+ ```
130
+
131
+ For more information about the existing custom rules and their usage, see [eslint/README.md](eslint/README.md).
132
+
82
133
  # Tools configuration
83
134
 
84
135
  ## Webpack
@@ -86,17 +137,17 @@ import { Box } from '@mui/material'; // NOT import { Box } from '@webpros/mui-th
86
137
  If you use Webpack, you probably need to add the following rules to your configuration:
87
138
 
88
139
  ```js
89
- module: {
90
- rules: [
91
- {
92
- test: /\.m?js/,
93
- type: "javascript/auto",
94
- resolve: {
95
- fullySpecified: false,
96
- },
140
+ module: {
141
+ rules: [
142
+ {
143
+ test: /\.m?js/,
144
+ type: 'javascript/auto',
145
+ resolve: {
146
+ fullySpecified: false,
97
147
  },
98
-
99
- // your other rules
100
- ]
101
- }
148
+ },
149
+
150
+ // your other rules
151
+ ];
152
+ }
102
153
  ```
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@webpros/mui-theme",
3
3
  "description": "MUI v7 theme for WebPros products",
4
- "version": "0.3.2",
4
+ "version": "0.3.3",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -14,7 +14,7 @@
14
14
  "theming",
15
15
  "ui"
16
16
  ],
17
- "main": "dist/index.js",
17
+ "main": "src/index.js",
18
18
  "types": "dist/index.d.ts",
19
19
  "exports": {
20
20
  ".": {
@@ -38,7 +38,9 @@
38
38
  "yarn": "^1.22.0"
39
39
  },
40
40
  "scripts": {
41
- "build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
41
+ "build": "yarn build:main && yarn build:eslint",
42
+ "build:main": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
43
+ "build:eslint": "tsc -p ./eslint/tsconfig.eslint.json",
42
44
  "storybook:dev": "storybook dev -p 6006",
43
45
  "storybook:build": "storybook build",
44
46
  "test": "npm run prettier:test && npm run lint && npm run typecheck",
@@ -48,7 +50,7 @@
48
50
  "prettier:write": "prettier --write \"**/*.{ts,tsx}\"",
49
51
  "typecheck": "tsc --noEmit",
50
52
  "extract-tokens": "node tools/extractM3Tokens.js",
51
- "generate:icons": "node scripts/generate-icons.cjs"
53
+ "generate:icons": "node tools/generate-icons.js"
52
54
  },
53
55
  "peerDependencies": {
54
56
  "@emotion/react": "^11.14.0",
@@ -1,7 +1,7 @@
1
1
  // Copyright 2025 WebPros International GmbH. All rights reserved.
2
2
  import { modalClasses, dialogContentClasses, dialogClasses, iconButtonClasses, } from '@mui/material';
3
3
  export const getDialog = (theme) => {
4
- const { spacing, palette, colors } = theme;
4
+ const { spacing, colors } = theme;
5
5
  const closeButtonPosition = {
6
6
  position: 'absolute',
7
7
  right: spacing(3),
@@ -15,7 +15,7 @@ export const getDialog = (theme) => {
15
15
  styleOverrides: {
16
16
  root: {
17
17
  padding: spacing(3.75, 8.25, 2.375, 4.5),
18
- color: palette.onSurface.main,
18
+ color: colors.schemes.surfaces.onSurface,
19
19
  [`& + .${dialogContentClasses.root}`]: {
20
20
  paddingTop: '0 !important',
21
21
  },
@@ -55,7 +55,7 @@ export const getDialog = (theme) => {
55
55
  MuiDialogContent: {
56
56
  styleOverrides: {
57
57
  root: {
58
- color: palette.onSurfaceVariant.main,
58
+ color: colors.schemes.surfaces.onSurfaceVariant,
59
59
  padding: spacing(0, 4.5, 1, 4.5),
60
60
  },
61
61
  dividers: {
@@ -88,7 +88,7 @@ export const getDialog = (theme) => {
88
88
  MuiDialogContentText: {
89
89
  styleOverrides: {
90
90
  root: {
91
- color: palette.onSurfaceVariant.main,
91
+ color: colors.schemes.surfaces.onSurfaceVariant,
92
92
  },
93
93
  },
94
94
  },
@@ -6,6 +6,6 @@ interface M3AppBar {
6
6
  variants?: ComponentsVariants['MuiAppBar'];
7
7
  };
8
8
  }
9
- export declare const getAppBar: (theme: Theme) => M3AppBar;
9
+ export declare const getAppBar: (_theme: Theme) => M3AppBar;
10
10
  declare const _default: {};
11
11
  export default _default;
@@ -1,21 +1,10 @@
1
- export const getAppBar = (theme) => {
2
- const { palette } = theme;
1
+ export const getAppBar = (_theme) => {
3
2
  return {
4
3
  MuiAppBar: {
5
4
  defaultProps: {
6
5
  elevation: 0,
7
6
  color: 'default',
8
7
  },
9
- styleOverrides: {
10
- colorDefault: {
11
- background: palette.surface.main,
12
- color: palette.onSurface.main,
13
- },
14
- colorPrimary: {
15
- background: palette.surface.main,
16
- color: palette.onSurface.main,
17
- },
18
- },
19
8
  },
20
9
  };
21
10
  };
@@ -1,4 +1,5 @@
1
1
  export { default as WebProsMuiThemeProvider } from './providers/WebProsMuiThemeProvider';
2
+ export type { WebProsMuiThemeProviderProps } from './providers/WebProsMuiThemeProvider';
2
3
  export { useThemeModeContext } from './providers/ThemeModeProvider';
3
4
  export * from './utils';
4
5
  export * from './tokens';
@@ -1,9 +1,25 @@
1
1
  import { Localization } from '@mui/material/locale';
2
2
  import { ThemeMode } from '../tokens/ThemeMode';
3
- type WebProsProps = {
3
+ import { ThemeOptions, Theme } from '@mui/material';
4
+ import { M3Components } from '../utils';
5
+ export type WebProsMuiThemeProviderProps = {
4
6
  children?: React.ReactNode;
5
7
  themeMode?: ThemeMode;
6
8
  localization?: Localization;
9
+ /**
10
+ * Modifier function to customize theme foundation (palette, typography, spacing, etc.).
11
+ * This function receives base theme options (without components) and should return modified options.
12
+ * Changes are applied before component styles are generated.
13
+ */
14
+ themeOptionsModifier?: (options: Omit<ThemeOptions, 'components'>) => Omit<ThemeOptions, 'components'>;
15
+ /**
16
+ * Modifier function to customize MUI component styles and default props.
17
+ * This function receives generated component configurations and theme and should return modified configurations.
18
+ * Changes are applied after the full theme is created.
19
+ *
20
+ * **Important:** WebPros component styles are assembled in `getMUIComponents()`.
21
+ */
22
+ themeComponentsModifier?: (options: M3Components, theme: Theme) => M3Components;
7
23
  };
8
- declare const WebProsMuiThemeProvider: ({ children, localization, themeMode }: WebProsProps) => import("react/jsx-runtime").JSX.Element;
24
+ declare const WebProsMuiThemeProvider: ({ children, localization, themeMode, themeOptionsModifier, themeComponentsModifier, }: WebProsMuiThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
9
25
  export default WebProsMuiThemeProvider;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import ThemeModeProvider from './ThemeModeProvider';
3
3
  import WebProsTheme from './WebProsTheme';
4
- const WebProsMuiThemeProvider = ({ children, localization, themeMode }) => (_jsx(ThemeModeProvider, { children: _jsx(WebProsTheme, { mode: themeMode, localization: localization, children: children }) }));
4
+ const WebProsMuiThemeProvider = ({ children, localization, themeMode, themeOptionsModifier, themeComponentsModifier, }) => (_jsx(ThemeModeProvider, { children: _jsx(WebProsTheme, { mode: themeMode, localization: localization, themeOptionsModifier: themeOptionsModifier, themeComponentsModifier: themeComponentsModifier, children: children }) }));
5
5
  export default WebProsMuiThemeProvider;
@@ -1,10 +1,28 @@
1
+ import { ThemeOptions, Theme } from '@mui/material';
1
2
  import '../utils/getMUIThemeCustoimzationType';
3
+ import { M3Components } from '../utils/getMUIComponents';
2
4
  import { ThemeMode } from '../tokens/ThemeMode';
3
5
  import { Localization } from '@mui/material/locale';
4
6
  type WebProsThemeProps = {
5
7
  children?: React.ReactNode;
6
8
  mode?: ThemeMode;
7
9
  localization?: Localization;
10
+ /**
11
+ * Modifier function for theme foundation (palette, typography, spacing, etc.).
12
+ * Applied before component styles generation.
13
+ *
14
+ * **Performance Note**: To avoid unnecessary theme recreations, wrap modifier functions
15
+ * with `useCallback` if they depend on dynamic values, or define them outside component.
16
+ */
17
+ themeOptionsModifier?: (options: Omit<ThemeOptions, 'components'>) => Omit<ThemeOptions, 'components'>;
18
+ /**
19
+ * Modifier function for MUI component configurations.
20
+ * Applied after theme creation with access to all theme tokens.
21
+ *
22
+ * **Performance Note**: To avoid unnecessary theme recreations, wrap modifier functions
23
+ * with `useCallback` if they depend on dynamic values, or define them outside component.
24
+ */
25
+ themeComponentsModifier?: (options: M3Components, theme: Theme) => M3Components;
8
26
  };
9
- export declare const WebProsTheme: ({ children, mode, localization }: WebProsThemeProps) => import("react/jsx-runtime").JSX.Element;
27
+ export declare const WebProsTheme: ({ children, mode, localization, themeOptionsModifier, themeComponentsModifier, }: WebProsThemeProps) => import("react/jsx-runtime").JSX.Element;
10
28
  export default WebProsTheme;
@@ -11,21 +11,34 @@ import { enUS } from '@mui/material/locale';
11
11
  import { patchMUIShadows } from '../utils/patchMUIShadows';
12
12
  import { ThemeSchemeDefault } from '../tokens/ThemeScheme';
13
13
  import { getMUITypography } from '../utils/getMUITypography';
14
- export const WebProsTheme = ({ children, mode, localization = enUS }) => {
14
+ export const WebProsTheme = ({ children, mode, localization = enUS, themeOptionsModifier, themeComponentsModifier, }) => {
15
15
  const themeModeContext = useContext(ThemeModeContext);
16
16
  const themeMode = mode !== null && mode !== void 0 ? mode : themeModeContext.themeMode;
17
- const typography = getMUITypography();
18
17
  const webprosTheme = useMemo(() => {
18
+ const typography = getMUITypography();
19
19
  const muiPalette = getMUIPalette(themeMode, ThemeSchemeDefault);
20
- let theme = createTheme({
20
+ // Prepare base theme options (without components)
21
+ const baseThemeOptions = {
21
22
  palette: muiPalette.palette,
22
23
  colors: muiPalette.colors,
23
- typography: Object.assign(Object.assign({}, getMUITypography()), { fontFamily: "'Roboto', 'Helvetica', 'Arial', sans-serif", fontSize: 14, fontWeightLight: 300, fontWeightRegular: 400, fontWeightMedium: 500, fontWeightBold: 700, h1: Object.assign({}, typography.DisplayLarge), h2: Object.assign({}, typography.DisplayMedium), h3: Object.assign({}, typography.DisplaySmall), h4: Object.assign({}, typography.HeadlineLarge), h5: Object.assign({}, typography.HeadlineMedium), h6: Object.assign({}, typography.HeadlineSmall), subtitle1: Object.assign({}, typography.TitleLarge), subtitle2: Object.assign({}, typography.TitleMedium), body1: Object.assign({}, typography.BodyMedium), body2: Object.assign({}, typography.BodySmall), button: Object.assign({}, typography.HeadlineLarge), caption: Object.assign({}, typography.BodySmall), overline: Object.assign({}, typography.LabelSmall) }),
24
- }, localization);
24
+ typography: Object.assign(Object.assign({}, typography), { fontFamily: "'Roboto', 'Helvetica', 'Arial', sans-serif", fontSize: 14, fontWeightLight: 300, fontWeightRegular: 400, fontWeightMedium: 500, fontWeightBold: 700, h1: Object.assign({}, typography.DisplayLarge), h2: Object.assign({}, typography.DisplayMedium), h3: Object.assign({}, typography.DisplaySmall), h4: Object.assign({}, typography.HeadlineLarge), h5: Object.assign({}, typography.HeadlineMedium), h6: Object.assign({}, typography.HeadlineSmall), subtitle1: Object.assign({}, typography.TitleLarge), subtitle2: Object.assign({}, typography.TitleMedium), body1: Object.assign({}, typography.BodyMedium), body2: Object.assign({}, typography.BodySmall), button: Object.assign({}, typography.HeadlineLarge), caption: Object.assign({}, typography.BodySmall), overline: Object.assign({}, typography.LabelSmall) }),
25
+ };
26
+ // Apply themeOptionsModifier (palette, typography, spacing, etc.)
27
+ let themeOptions = baseThemeOptions;
28
+ if (themeOptionsModifier) {
29
+ themeOptions = themeOptionsModifier(themeOptions);
30
+ }
31
+ let theme = createTheme(themeOptions, localization);
25
32
  patchMUIShadows(theme);
26
- theme = deepmerge(theme, getMUIComponents(theme, themeMode));
33
+ // Apply themeComponentsModifier (component styles and props)
34
+ if (themeComponentsModifier) {
35
+ theme = deepmerge(theme, themeComponentsModifier(getMUIComponents(theme, themeMode), theme));
36
+ }
37
+ else {
38
+ theme = deepmerge(theme, getMUIComponents(theme, themeMode));
39
+ }
27
40
  return theme;
28
- }, [themeMode, localization]);
41
+ }, [themeMode, localization, themeOptionsModifier, themeComponentsModifier]);
29
42
  return (_jsxs(ThemeProvider, { theme: webprosTheme, children: [_jsx(CssBaseline, { enableColorScheme: true }), children] }));
30
43
  };
31
44
  export default WebProsTheme;
@@ -1,6 +1,5 @@
1
- import { ThemeColorTokensLegacy } from '../tokens/legacyColors/ThemeColorTokensLegacy';
2
1
  import { Schemes, SchemesGenerated, StateLayers, StateLayersGenerated, InverseSchemes, InverseSchemesGenerated, InverseStateLayers, InverseStateLayersGenerated } from '../tokens/colors';
3
- export type ThemeColorTokens = ThemeColorTokensLegacy & {
2
+ export type ThemeColorTokens = {
4
3
  schemes: Schemes;
5
4
  stateLayers: StateLayers;
6
5
  inverseSchemes: InverseSchemes;
@@ -1,8 +1,25 @@
1
1
  // Copyright 2025 WebPros International GmbH. All rights reserved.
2
2
  import { DarkSchemes, DarkSchemesGenerated, DarkStateLayers, DarkStateLayersGenerated, DarkInverseSchemes, DarkInverseSchemesGenerated, DarkInverseStateLayers, DarkInverseStateLayersGenerated, LightSchemes, LightSchemesGenerated, LightStateLayers, LightStateLayersGenerated, LightInverseSchemes, LightInverseSchemesGenerated, LightInverseStateLayers, LightInverseStateLayersGenerated, } from '../tokens/colors';
3
- import { LegacyDarkTokensDefault, LegacyLightTokensDefault, } from '../tokens/legacyColors';
4
3
  // reference
5
- export const LightTokensDefault = Object.assign(Object.assign({}, LegacyLightTokensDefault), { schemes: LightSchemes, stateLayers: LightStateLayers, inverseSchemes: LightInverseSchemes, inverseStateLayers: LightInverseStateLayers, generatedSchemes: LightSchemesGenerated, generatedStateLayers: LightStateLayersGenerated, generatedInverseSchemes: LightInverseSchemesGenerated, generatedInverseStateLayers: LightInverseStateLayersGenerated });
4
+ export const LightTokensDefault = {
5
+ schemes: LightSchemes,
6
+ stateLayers: LightStateLayers,
7
+ inverseSchemes: LightInverseSchemes,
8
+ inverseStateLayers: LightInverseStateLayers,
9
+ generatedSchemes: LightSchemesGenerated,
10
+ generatedStateLayers: LightStateLayersGenerated,
11
+ generatedInverseSchemes: LightInverseSchemesGenerated,
12
+ generatedInverseStateLayers: LightInverseStateLayersGenerated,
13
+ };
6
14
  // reference
7
15
  // https://www.figma.com/design/RPLeGa2LdhKElQQ0xIXtSh/WebPros-dashboard?node-id=53699-35493&t=pvKyGGnGRUL3kYn8-1
8
- export const DarkTokensDefault = Object.assign(Object.assign({}, LegacyDarkTokensDefault), { schemes: DarkSchemes, stateLayers: DarkStateLayers, inverseSchemes: DarkInverseSchemes, inverseStateLayers: DarkInverseStateLayers, generatedSchemes: DarkSchemesGenerated, generatedStateLayers: DarkStateLayersGenerated, generatedInverseSchemes: DarkInverseSchemesGenerated, generatedInverseStateLayers: DarkInverseStateLayersGenerated });
16
+ export const DarkTokensDefault = {
17
+ schemes: DarkSchemes,
18
+ stateLayers: DarkStateLayers,
19
+ inverseSchemes: DarkInverseSchemes,
20
+ inverseStateLayers: DarkInverseStateLayers,
21
+ generatedSchemes: DarkSchemesGenerated,
22
+ generatedStateLayers: DarkStateLayersGenerated,
23
+ generatedInverseSchemes: DarkInverseSchemesGenerated,
24
+ generatedInverseStateLayers: DarkInverseStateLayersGenerated,
25
+ };
@@ -16,29 +16,27 @@ function extractPath(svg) {
16
16
  const StyledIconWrapper = styled('span', {
17
17
  shouldForwardProp: (prop) => prop !== 'iconColor',
18
18
  })(({ theme, iconColor }) => {
19
+ const { colors } = theme;
19
20
  if (!iconColor || iconColor === 'inherit') {
20
21
  return { display: 'inline-flex', color: 'inherit' };
21
22
  }
22
- const paletteColors = [
23
- 'primary',
24
- 'secondary',
25
- 'error',
26
- 'warning',
27
- 'info',
28
- 'success',
29
- ];
30
- if (paletteColors.includes(iconColor)) {
23
+ // Map MUI color tokens to M3 color schemes
24
+ const colorMapping = {
25
+ primary: colors.schemes.base.primary,
26
+ secondary: colors.schemes.base.secondary,
27
+ error: colors.schemes.status.error,
28
+ warning: colors.schemes.status.warning,
29
+ info: colors.schemes.status.info,
30
+ success: colors.schemes.status.success,
31
+ action: colors.schemes.surfaces.onSurfaceVariant,
32
+ disabled: colors.stateLayers.surfaces.onSurface.opacity38,
33
+ };
34
+ if (colorMapping[iconColor]) {
31
35
  return {
32
36
  display: 'inline-flex',
33
- color: theme.palette[iconColor].main,
37
+ color: colorMapping[iconColor],
34
38
  };
35
39
  }
36
- if (iconColor === 'action') {
37
- return { display: 'inline-flex', color: theme.palette.action.active };
38
- }
39
- if (iconColor === 'disabled') {
40
- return { display: 'inline-flex', color: theme.palette.action.disabled };
41
- }
42
40
  return { display: 'inline-flex', color: iconColor };
43
41
  });
44
42
  function extractPathsData(svg) {
@@ -1,7 +1,6 @@
1
1
  import { Theme } from '@mui/material';
2
2
  import { ThemeMode } from '../tokens/ThemeMode';
3
- type M3Components = {
3
+ export type M3Components = {
4
4
  components: Theme['components'];
5
5
  };
6
6
  export declare const getMUIComponents: (theme: Theme, _mode: ThemeMode) => M3Components;
7
- export {};
@@ -1,24 +1,8 @@
1
- import { PaletteColor, PaletteColorOptions, ThemeOptions } from '@mui/material';
1
+ import { ThemeOptions } from '@mui/material';
2
2
  import { ThemeMode } from '../tokens/ThemeMode';
3
3
  import { ThemeScheme } from '../tokens/ThemeScheme';
4
- import { Schemes, StateLayers } from '../tokens/colors';
5
4
  declare module '@mui/material/styles' {
6
- interface M3Palette {
7
- onPrimary: PaletteColor;
8
- onPrimaryContainer: PaletteColor;
9
- secondary: PaletteColor;
10
- onError: PaletteColor;
11
- surface: PaletteColor;
12
- onSurface: PaletteColor;
13
- surfaceDim: PaletteColor;
14
- surfaceContainerLowest: PaletteColor;
15
- surfaceContainer: PaletteColor;
16
- onSurfaceVariant: PaletteColor;
17
- supportive: PaletteColor;
18
- }
19
- interface Palette extends M3Palette {
20
- }
21
- interface M3PaletteOptions extends Record<keyof M3Palette, PaletteColorOptions | StateLayers | Schemes> {
5
+ interface M3PaletteOptions {
22
6
  themeMode: string;
23
7
  }
24
8
  interface PaletteOptions extends M3PaletteOptions {