@mui/system 7.3.8 → 7.3.9

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 (74) hide show
  1. package/Box/Box.d.ts +3 -3
  2. package/CHANGELOG.md +39 -0
  3. package/Container/ContainerProps.d.ts +5 -5
  4. package/Container/createContainer.d.ts +5 -5
  5. package/GlobalStyles/GlobalStyles.d.ts +2 -2
  6. package/Grid/GridProps.d.ts +11 -11
  7. package/Grid/createGrid.d.ts +4 -4
  8. package/Grid/deleteLegacyGridProps.d.ts +2 -2
  9. package/Grid/gridGenerator.d.ts +1 -1
  10. package/InitColorSchemeScript/InitColorSchemeScript.d.ts +7 -7
  11. package/RtlProvider/index.d.ts +1 -1
  12. package/Stack/StackProps.d.ts +5 -5
  13. package/Stack/createStack.d.ts +3 -3
  14. package/ThemeProvider/ThemeProvider.d.ts +1 -1
  15. package/ThemeProvider/useLayerOrder.d.ts +1 -1
  16. package/breakpoints/breakpoints.d.ts +2 -2
  17. package/colorManipulator/colorManipulator.d.ts +1 -1
  18. package/createBox/createBox.d.ts +3 -3
  19. package/createStyled/createStyled.d.ts +13 -13
  20. package/createTheme/createTheme.d.ts +18 -18
  21. package/cssVars/createCssVarsProvider.d.ts +18 -18
  22. package/cssVars/createCssVarsTheme.d.ts +3 -3
  23. package/cssVars/cssVarsParser.d.ts +2 -2
  24. package/cssVars/localStorageManager.d.ts +1 -1
  25. package/cssVars/prepareCssVars.d.ts +8 -8
  26. package/cssVars/useCurrentColorScheme.d.ts +6 -6
  27. package/esm/Box/Box.d.ts +3 -3
  28. package/esm/Container/ContainerProps.d.ts +5 -5
  29. package/esm/Container/createContainer.d.ts +5 -5
  30. package/esm/GlobalStyles/GlobalStyles.d.ts +2 -2
  31. package/esm/Grid/GridProps.d.ts +11 -11
  32. package/esm/Grid/createGrid.d.ts +4 -4
  33. package/esm/Grid/deleteLegacyGridProps.d.ts +2 -2
  34. package/esm/Grid/gridGenerator.d.ts +1 -1
  35. package/esm/InitColorSchemeScript/InitColorSchemeScript.d.ts +7 -7
  36. package/esm/RtlProvider/index.d.ts +1 -1
  37. package/esm/Stack/StackProps.d.ts +5 -5
  38. package/esm/Stack/createStack.d.ts +3 -3
  39. package/esm/ThemeProvider/ThemeProvider.d.ts +1 -1
  40. package/esm/ThemeProvider/useLayerOrder.d.ts +1 -1
  41. package/esm/breakpoints/breakpoints.d.ts +2 -2
  42. package/esm/colorManipulator/colorManipulator.d.ts +1 -1
  43. package/esm/createBox/createBox.d.ts +3 -3
  44. package/esm/createStyled/createStyled.d.ts +13 -13
  45. package/esm/createTheme/createTheme.d.ts +18 -18
  46. package/esm/cssVars/createCssVarsProvider.d.ts +18 -18
  47. package/esm/cssVars/createCssVarsTheme.d.ts +3 -3
  48. package/esm/cssVars/cssVarsParser.d.ts +2 -2
  49. package/esm/cssVars/localStorageManager.d.ts +1 -1
  50. package/esm/cssVars/prepareCssVars.d.ts +8 -8
  51. package/esm/cssVars/useCurrentColorScheme.d.ts +6 -6
  52. package/esm/index.js +1 -1
  53. package/esm/style/style.d.ts +4 -4
  54. package/esm/styleFunctionSx/AliasesCSSProperties.d.ts +21 -21
  55. package/esm/styleFunctionSx/OverwriteCSSProperties.d.ts +4 -4
  56. package/esm/styleFunctionSx/defaultSxConfig.d.ts +4 -4
  57. package/esm/styleFunctionSx/extendSxProp.d.ts +1 -1
  58. package/esm/styleFunctionSx/styleFunctionSx.d.ts +1 -1
  59. package/esm/useMediaQuery/useMediaQuery.d.ts +6 -6
  60. package/esm/useThemeProps/getThemeProps.d.ts +1 -1
  61. package/esm/useThemeProps/useThemeProps.d.ts +2 -2
  62. package/esm/version/index.js +2 -2
  63. package/index.js +1 -1
  64. package/package.json +5 -5
  65. package/style/style.d.ts +4 -4
  66. package/styleFunctionSx/AliasesCSSProperties.d.ts +21 -21
  67. package/styleFunctionSx/OverwriteCSSProperties.d.ts +4 -4
  68. package/styleFunctionSx/defaultSxConfig.d.ts +4 -4
  69. package/styleFunctionSx/extendSxProp.d.ts +1 -1
  70. package/styleFunctionSx/styleFunctionSx.d.ts +1 -1
  71. package/useMediaQuery/useMediaQuery.d.ts +6 -6
  72. package/useThemeProps/getThemeProps.d.ts +1 -1
  73. package/useThemeProps/useThemeProps.d.ts +2 -2
  74. package/version/index.js +2 -2
package/Box/Box.d.ts CHANGED
@@ -23,11 +23,11 @@ type StandardSystemKeys = Extract<SimpleSystemKeys, keyof AllSystemCSSProperties
23
23
  export type SystemProps<Theme extends object = {}> = { [K in StandardSystemKeys]?: ResponsiveStyleValue<AllSystemCSSProperties[K]> | ((theme: Theme) => ResponsiveStyleValue<AllSystemCSSProperties[K]>) };
24
24
  export interface BoxOwnProps<Theme extends object = SystemTheme> extends SystemProps<Theme> {
25
25
  children?: React.ReactNode;
26
- ref?: React.Ref<unknown>;
26
+ ref?: React.Ref<unknown> | undefined;
27
27
  /**
28
28
  * The system prop that allows defining system overrides as well as additional CSS styles.
29
29
  */
30
- sx?: SxProps<Theme>;
30
+ sx?: SxProps<Theme> | undefined;
31
31
  }
32
32
  export interface BoxTypeMap<AdditionalProps = {}, RootComponent extends React.ElementType = 'div', Theme extends object = SystemTheme> {
33
33
  props: AdditionalProps & BoxOwnProps<Theme>;
@@ -48,6 +48,6 @@ export interface BoxTypeMap<AdditionalProps = {}, RootComponent extends React.El
48
48
  */
49
49
  declare const Box: OverridableComponent<BoxTypeMap>;
50
50
  export type BoxProps<RootComponent extends React.ElementType = BoxTypeMap['defaultComponent'], AdditionalProps = {}> = OverrideProps<BoxTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
51
- component?: React.ElementType;
51
+ component?: React.ElementType | undefined;
52
52
  };
53
53
  export default Box;
package/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 7.3.9
4
+
5
+ <!-- generated comparing v7.3.8..v7.x -->
6
+
7
+ _Mar 5, 2026_
8
+
9
+ A big thanks to the 15 contributors who made this release possible.
10
+
11
+ ### `@mui/material@7.3.9`
12
+
13
+ - Clean up duplicated CSS rules (#47893) @sai6855
14
+ - [theme] Generate `color-mix` value on top of default generated Material UI CSS variables (#47791) @ZeeshanTamboli
15
+ - [tooltip] Fix error is thrown when wrapping an input which is disabled while focused (#47841) @ZeeshanTamboli
16
+ - [table cell][theme] Apply `alpha` before color mixing to border bottom color when nativeColor + cssVariables is used (#47840) @ZeeshanTamboli
17
+
18
+ ### Docs
19
+
20
+ - Fix small typo in NumberField page (#47888) @arthur-plazanet
21
+ - Fix Theme builder video (#47855) @oliviertassinari
22
+ - Add updated community theme resource (#47853) @PeterTYLiu
23
+ - Fix the keyboard navigation in GroupedMenu example (#47848) @silviuaavram
24
+ - Few copy fixes (#47810) @pavan-sh
25
+ - Fix JSX in Overriding component structure docs (#47805) @ZeeshanTamboli
26
+ - Fix SSR flicker sentence grammar (#47794) @pavan-sh
27
+ - [system] Update sizing docs to clarify `(0, 1]` behavior. (#47851) @matthias-ccri
28
+ - [theme] Fix `nativeColor` docs (#47759) (#47789) @ZeeshanTamboli
29
+
30
+ ### Core
31
+
32
+ - point v7 subdomain to MUI X v7 docs (#113) @vmakhaev
33
+ - [blog] Blogpost for upcoming price changes for MUI X (#47748) (#47910) @DanailH
34
+ - [blog] Company Update: What we've been working on (and why) (alethomas) (#47626) (#47908) @alelthomas
35
+ - [core] Update releaseChangelog.mjs (#47862) @mnajdova
36
+ - [code-infra] Detect browser envs that don't support layout (#47813) (#47873) @Janpot
37
+ - [code-infra] Enable undefined addition to optional properties (#47815) @brijeshb42
38
+ - [docs-infra] Reapply Cookie Banner with Design Fixes (#47744) @dav-is
39
+
40
+ All contributors of this release in alphabetical order: @alelthomas, @arthur-plazanet, @brijeshb42, @DanailH, @dav-is, @Janpot, @matthias-ccri, @mnajdova, @oliviertassinari, @pavan-sh, @PeterTYLiu, @sai6855, @silviuaavram, @vmakhaev, @ZeeshanTamboli
41
+
3
42
  ## 7.3.8
4
43
 
5
44
  <!-- generated comparing v7.3.7..master -->
@@ -9,12 +9,12 @@ export interface ContainerTypeMap<AdditionalProps = {}, DefaultComponent extends
9
9
  /**
10
10
  * Override or extend the styles applied to the component.
11
11
  */
12
- classes?: Partial<ContainerClasses>;
12
+ classes?: Partial<ContainerClasses> | undefined;
13
13
  /**
14
14
  * If `true`, the left and right padding is removed.
15
15
  * @default false
16
16
  */
17
- disableGutters?: boolean;
17
+ disableGutters?: boolean | undefined;
18
18
  /**
19
19
  * Set the max-width to match the min-width of the current breakpoint.
20
20
  * This is useful if you'd prefer to design for a fixed set of sizes
@@ -22,18 +22,18 @@ export interface ContainerTypeMap<AdditionalProps = {}, DefaultComponent extends
22
22
  * It's fluid by default.
23
23
  * @default false
24
24
  */
25
- fixed?: boolean;
25
+ fixed?: boolean | undefined;
26
26
  /**
27
27
  * Determine the max-width of the container.
28
28
  * The container width grows with the size of the screen.
29
29
  * Set to `false` to disable `maxWidth`.
30
30
  * @default 'lg'
31
31
  */
32
- maxWidth?: Breakpoint | false;
32
+ maxWidth?: Breakpoint | false | undefined;
33
33
  /**
34
34
  * The system prop that allows defining system overrides as well as additional CSS styles.
35
35
  */
36
- sx?: SxProps<Theme>;
36
+ sx?: SxProps<Theme> | undefined;
37
37
  };
38
38
  defaultComponent: DefaultComponent;
39
39
  }
@@ -9,10 +9,10 @@ interface StyleFnProps<Theme> extends ContainerProps {
9
9
  }
10
10
  type RequiredThemeStructure = Pick<DefaultTheme, 'breakpoints' | 'spacing'>;
11
11
  export default function createContainer<Theme extends RequiredThemeStructure = DefaultTheme>(options?: {
12
- createStyledComponent?: (...styles: Array<Interpolation<StyleFnProps<Theme>>>) => StyledComponent<ContainerProps>;
13
- useThemeProps?: (inProps: ContainerProps) => ContainerProps & {
14
- component?: React.ElementType;
15
- };
16
- componentName?: string;
12
+ createStyledComponent?: ((...styles: Array<Interpolation<StyleFnProps<Theme>>>) => StyledComponent<ContainerProps>) | undefined;
13
+ useThemeProps?: ((inProps: ContainerProps) => ContainerProps & {
14
+ component?: React.ElementType | undefined;
15
+ }) | undefined;
16
+ componentName?: string | undefined;
17
17
  }): OverridableComponent<ContainerTypeMap<{}, "div">>;
18
18
  export {};
@@ -2,8 +2,8 @@ import { Interpolation } from '@mui/styled-engine';
2
2
  import { Theme as SystemTheme } from "../createTheme/index.js";
3
3
  export interface GlobalStylesProps<Theme = SystemTheme> {
4
4
  styles: Interpolation<Theme>;
5
- defaultTheme?: object;
6
- themeId?: string;
5
+ defaultTheme?: object | undefined;
6
+ themeId?: string | undefined;
7
7
  }
8
8
  declare function GlobalStyles<Theme = SystemTheme>({
9
9
  styles,
@@ -18,28 +18,28 @@ export interface GridBaseProps {
18
18
  * The number of columns.
19
19
  * @default 12
20
20
  */
21
- columns?: ResponsiveStyleValue<number>;
21
+ columns?: ResponsiveStyleValue<number> | undefined;
22
22
  /**
23
23
  * Defines the horizontal space between the type `item` components.
24
24
  * It overrides the value of the `spacing` prop.
25
25
  */
26
- columnSpacing?: ResponsiveStyleValue<GridSpacing>;
26
+ columnSpacing?: ResponsiveStyleValue<GridSpacing> | undefined;
27
27
  /**
28
28
  * If `true`, the component will have the flex *container* behavior.
29
29
  * You should be wrapping *items* with a *container*.
30
30
  * @default false
31
31
  */
32
- container?: boolean;
32
+ container?: boolean | undefined;
33
33
  /**
34
34
  * Defines the `flex-direction` style property.
35
35
  * It is applied for all screen sizes.
36
36
  * @default 'row'
37
37
  */
38
- direction?: ResponsiveStyleValue<GridDirection>;
38
+ direction?: ResponsiveStyleValue<GridDirection> | undefined;
39
39
  /**
40
40
  * Defines the offset value for the type `item` components.
41
41
  */
42
- offset?: ResponsiveStyleValue<GridOffset>;
42
+ offset?: ResponsiveStyleValue<GridOffset> | undefined;
43
43
  /**
44
44
  * @internal
45
45
  * The level of the grid starts from `0` and increases when the grid nests
@@ -67,16 +67,16 @@ export interface GridBaseProps {
67
67
  * <Grid container> // level 0
68
68
  * ```
69
69
  */
70
- unstable_level?: number;
70
+ unstable_level?: number | undefined;
71
71
  /**
72
72
  * Defines the vertical space between the type `item` components.
73
73
  * It overrides the value of the `spacing` prop.
74
74
  */
75
- rowSpacing?: ResponsiveStyleValue<GridSpacing>;
75
+ rowSpacing?: ResponsiveStyleValue<GridSpacing> | undefined;
76
76
  /**
77
77
  * Defines the size of the the type `item` components.
78
78
  */
79
- size?: ResponsiveStyleValue<GridSize>;
79
+ size?: ResponsiveStyleValue<GridSize> | undefined;
80
80
  /**
81
81
  * Defines the space between the type `item` components.
82
82
  * It can only be used on a type `container` component.
@@ -88,16 +88,16 @@ export interface GridBaseProps {
88
88
  * It's applied for all screen sizes.
89
89
  * @default 'wrap'
90
90
  */
91
- wrap?: GridWrap;
91
+ wrap?: GridWrap | undefined;
92
92
  }
93
93
  export type GridOwnerState = PartiallyRequired<GridBaseProps, 'size' | 'offset' | 'unstable_level'>;
94
94
  export interface GridTypeMap<AdditionalProps = {}, DefaultComponent extends React.ElementType = 'div'> {
95
95
  props: AdditionalProps & GridBaseProps & {
96
- sx?: SxProps<Theme>;
96
+ sx?: SxProps<Theme> | undefined;
97
97
  } & SystemProps<Theme>;
98
98
  defaultComponent: DefaultComponent;
99
99
  }
100
100
  export type GridProps<RootComponent extends React.ElementType = GridTypeMap['defaultComponent'], AdditionalProps = {
101
- component?: React.ElementType;
101
+ component?: React.ElementType | undefined;
102
102
  }> = OverrideProps<GridTypeMap<AdditionalProps, RootComponent>, RootComponent>;
103
103
  export {};
@@ -5,9 +5,9 @@ import { GridTypeMap } from "./GridProps.js";
5
5
  declare const defaultCreateStyledComponent: import("@mui/styled-engine").CreateStyledComponent<import("../index.js").MUIStyledCommonProps<any>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, {}, any>;
6
6
  declare function useThemePropsDefault<T extends {}>(props: T): T;
7
7
  export default function createGrid(options?: {
8
- createStyledComponent?: typeof defaultCreateStyledComponent;
9
- useThemeProps?: typeof useThemePropsDefault;
10
- useTheme?: typeof useThemeSystem;
11
- componentName?: string;
8
+ createStyledComponent?: typeof defaultCreateStyledComponent | undefined;
9
+ useThemeProps?: typeof useThemePropsDefault | undefined;
10
+ useTheme?: typeof useThemeSystem | undefined;
11
+ componentName?: string | undefined;
12
12
  }): OverridableComponent<GridTypeMap<{}, "div">>;
13
13
  export {};
@@ -6,6 +6,6 @@ import { Breakpoint, Breakpoints } from "../createTheme/index.js";
6
6
  * @param {Breakpoints} breakpoints The breakpoints object.
7
7
  */
8
8
  export default function deleteLegacyGridProps(props: {
9
- item?: boolean;
10
- zeroMinWidth?: boolean;
9
+ item?: boolean | undefined;
10
+ zeroMinWidth?: boolean | undefined;
11
11
  } & Partial<Record<Breakpoint, 'auto' | number | boolean>> & Record<string, any>, breakpoints: Breakpoints): void;
@@ -5,7 +5,7 @@ import { GridDirection, GridOwnerState } from "./GridProps.js";
5
5
  interface Props {
6
6
  theme: {
7
7
  breakpoints: Breakpoints;
8
- spacing?: Spacing;
8
+ spacing?: Spacing | undefined;
9
9
  };
10
10
  ownerState: GridOwnerState;
11
11
  }
@@ -6,39 +6,39 @@ export interface InitColorSchemeScriptProps {
6
6
  * The default mode when the storage is empty (user's first visit).
7
7
  * @default 'system'
8
8
  */
9
- defaultMode?: 'system' | 'light' | 'dark';
9
+ defaultMode?: 'system' | 'light' | 'dark' | undefined;
10
10
  /**
11
11
  * The default color scheme to be used on the light mode.
12
12
  * @default 'light'
13
13
  */
14
- defaultLightColorScheme?: string;
14
+ defaultLightColorScheme?: string | undefined;
15
15
  /**
16
16
  * The default color scheme to be used on the dark mode.
17
17
  * * @default 'dark'
18
18
  */
19
- defaultDarkColorScheme?: string;
19
+ defaultDarkColorScheme?: string | undefined;
20
20
  /**
21
21
  * The node (provided as string) used to attach the color-scheme attribute.
22
22
  * @default 'document.documentElement'
23
23
  */
24
- colorSchemeNode?: string;
24
+ colorSchemeNode?: string | undefined;
25
25
  /**
26
26
  * localStorage key used to store `mode`.
27
27
  * @default 'mode'
28
28
  */
29
- modeStorageKey?: string;
29
+ modeStorageKey?: string | undefined;
30
30
  /**
31
31
  * localStorage key used to store `colorScheme`.
32
32
  * @default 'color-scheme'
33
33
  */
34
- colorSchemeStorageKey?: string;
34
+ colorSchemeStorageKey?: string | undefined;
35
35
  /**
36
36
  * DOM attribute for applying color scheme.
37
37
  * @default 'data-color-scheme'
38
38
  * @example '.mode-%s' // for class based color scheme
39
39
  * @example '[data-mode-%s]' // for data-attribute without '='
40
40
  */
41
- attribute?: 'class' | 'data' | string;
41
+ attribute?: 'class' | 'data' | string | undefined;
42
42
  /**
43
43
  * Nonce string to pass to the inline script for CSP headers.
44
44
  */
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  interface RtlProviderProps {
3
3
  children?: React.ReactNode;
4
- value?: boolean;
4
+ value?: boolean | undefined;
5
5
  }
6
6
  declare const RtlProvider: React.FC<RtlProviderProps>;
7
7
  export const useRtl: () => boolean;
@@ -13,12 +13,12 @@ export interface StackBaseProps {
13
13
  * It is applied for all screen sizes.
14
14
  * @default 'column'
15
15
  */
16
- direction?: ResponsiveStyleValue<'row' | 'row-reverse' | 'column' | 'column-reverse'>;
16
+ direction?: ResponsiveStyleValue<'row' | 'row-reverse' | 'column' | 'column-reverse'> | undefined;
17
17
  /**
18
18
  * Defines the space between immediate children.
19
19
  * @default 0
20
20
  */
21
- spacing?: ResponsiveStyleValue<number | string>;
21
+ spacing?: ResponsiveStyleValue<number | string> | undefined;
22
22
  /**
23
23
  * Add an element between each child.
24
24
  */
@@ -32,19 +32,19 @@ export interface StackBaseProps {
32
32
  * To enable this flag globally, follow the theme's default props configuration.
33
33
  * @default false
34
34
  */
35
- useFlexGap?: boolean;
35
+ useFlexGap?: boolean | undefined;
36
36
  }
37
37
  export interface StackTypeMap<AdditionalProps = {}, DefaultComponent extends React.ElementType = 'div'> {
38
38
  props: AdditionalProps & StackBaseProps & {
39
39
  /**
40
40
  * The system prop, which allows defining system overrides as well as additional CSS styles.
41
41
  */
42
- sx?: SxProps<Theme>;
42
+ sx?: SxProps<Theme> | undefined;
43
43
  } & SystemProps<Theme>;
44
44
  defaultComponent: DefaultComponent;
45
45
  }
46
46
  export type StackProps<RootComponent extends React.ElementType = StackTypeMap['defaultComponent'], AdditionalProps = {
47
- component?: React.ElementType;
47
+ component?: React.ElementType | undefined;
48
48
  }> = OverrideProps<StackTypeMap<AdditionalProps, RootComponent>, RootComponent>;
49
49
  export interface StackOwnerState {
50
50
  direction: StackProps['direction'];
@@ -17,8 +17,8 @@ export declare const style: ({
17
17
  theme
18
18
  }: StyleFunctionProps) => any;
19
19
  export default function createStack(options?: {
20
- createStyledComponent?: typeof defaultCreateStyledComponent;
21
- useThemeProps?: typeof useThemePropsDefault;
22
- componentName?: string;
20
+ createStyledComponent?: typeof defaultCreateStyledComponent | undefined;
21
+ useThemeProps?: typeof useThemePropsDefault | undefined;
22
+ componentName?: string | undefined;
23
23
  }): OverridableComponent<StackTypeMap<{}, "div">>;
24
24
  export {};
@@ -7,7 +7,7 @@ export interface ThemeProviderProps<Theme = DefaultTheme> {
7
7
  /**
8
8
  * The design system's unique id for getting the corresponded theme when there are multiple design systems.
9
9
  */
10
- themeId?: string;
10
+ themeId?: string | undefined;
11
11
  /**
12
12
  * A theme object. You can provide a function to extend the outer theme.
13
13
  */
@@ -3,5 +3,5 @@
3
3
  * Then on client-side, it injects the CSS layer order into the document head to ensure that the layer order is always present first before other Emotion styles.
4
4
  */
5
5
  export default function useLayerOrder(theme: {
6
- modularCssLayers?: boolean | string;
6
+ modularCssLayers?: boolean | string | undefined;
7
7
  }): import("react/jsx-runtime").JSX.Element | null;
@@ -5,8 +5,8 @@ import { ResponsiveStyleValue } from "../styleFunctionSx/index.js";
5
5
  import { StyleFunction } from "../style/index.js";
6
6
  export interface ResolveBreakpointValuesOptions<T> {
7
7
  values: ResponsiveStyleValue<T>;
8
- breakpoints?: Breakpoints['values'];
9
- base?: Record<string, boolean>;
8
+ breakpoints?: Breakpoints['values'] | undefined;
9
+ base?: Record<string, boolean> | undefined;
10
10
  }
11
11
  export function resolveBreakpointValues<T>(options: ResolveBreakpointValuesOptions<T>): Record<string, T>;
12
12
  export function mergeBreakpointsInOrder(breakpoints: Breakpoints, styles: CSSObject[]): CSSObject;
@@ -3,7 +3,7 @@ export type ColorFormat = 'rgb' | 'rgba' | 'hsl' | 'hsla' | 'color';
3
3
  export interface ColorObject {
4
4
  type: ColorFormat;
5
5
  values: [number, number, number] | [number, number, number, number];
6
- colorSpace?: 'srgb' | 'display-p3' | 'a98-rgb' | 'prophoto-rgb' | 'rec-2020';
6
+ colorSpace?: 'srgb' | 'display-p3' | 'a98-rgb' | 'prophoto-rgb' | 'rec-2020' | undefined;
7
7
  }
8
8
  export function hexToRgb(hex: string): string;
9
9
  export function rgbToHex(color: string): string;
@@ -2,8 +2,8 @@ import { OverridableComponent } from '@mui/types';
2
2
  import { BoxTypeMap } from "../Box/index.js";
3
3
  import { Theme as SystemTheme } from "../createTheme/index.js";
4
4
  export default function createBox<T extends object = SystemTheme, AdditionalProps extends Record<string, unknown> = {}>(options?: {
5
- themeId?: string;
5
+ themeId?: string | undefined;
6
6
  defaultTheme: T;
7
- defaultClassName?: string;
8
- generateClassName?: (componentName: string) => string;
7
+ defaultClassName?: string | undefined;
8
+ generateClassName?: ((componentName: string) => string) | undefined;
9
9
  }): OverridableComponent<BoxTypeMap<AdditionalProps, 'div', T>>;
@@ -4,24 +4,24 @@ import styleFunctionSx, { SxProps } from "../styleFunctionSx/index.js";
4
4
  import { Theme as DefaultTheme } from "../createTheme/index.js";
5
5
  export function shouldForwardProp(propName: PropertyKey): boolean;
6
6
  export interface MUIStyledCommonProps<Theme extends object = DefaultTheme> {
7
- theme?: Theme;
8
- as?: React.ElementType;
9
- sx?: SxProps<Theme>;
7
+ theme?: Theme | undefined;
8
+ as?: React.ElementType | undefined;
9
+ sx?: SxProps<Theme> | undefined;
10
10
  }
11
11
  export interface MuiStyledOptions {
12
- name?: string;
13
- slot?: string;
12
+ name?: string | undefined;
13
+ slot?: string | undefined;
14
14
  // The difference between Interpolation and CSSInterpolation is that the former supports functions based on props
15
15
  // If we want to support props in the overrides, we will need to change the CSSInterpolation to Interpolation<Props>
16
- overridesResolver?: (props: any, styles: Record<string, CSSInterpolation>) => CSSInterpolation;
17
- skipVariantsResolver?: boolean;
18
- skipSx?: boolean;
16
+ overridesResolver?: ((props: any, styles: Record<string, CSSInterpolation>) => CSSInterpolation) | undefined;
17
+ skipVariantsResolver?: boolean | undefined;
18
+ skipSx?: boolean | undefined;
19
19
  }
20
20
  export type CreateMUIStyled<Theme extends object = DefaultTheme> = CreateMUIStyledStyledEngine<MUIStyledCommonProps<Theme>, MuiStyledOptions, Theme>;
21
21
  export default function createStyled<Theme extends object = DefaultTheme>(options?: {
22
- themeId?: string;
23
- defaultTheme?: Theme;
24
- rootShouldForwardProp?: (prop: PropertyKey) => boolean;
25
- slotShouldForwardProp?: (prop: PropertyKey) => boolean;
26
- styleFunctionSx?: typeof styleFunctionSx;
22
+ themeId?: string | undefined;
23
+ defaultTheme?: Theme | undefined;
24
+ rootShouldForwardProp?: ((prop: PropertyKey) => boolean) | undefined;
25
+ slotShouldForwardProp?: ((prop: PropertyKey) => boolean) | undefined;
26
+ styleFunctionSx?: typeof styleFunctionSx | undefined;
27
27
  }): CreateMUIStyled<Theme>;
@@ -13,18 +13,18 @@ export interface Shadows {}
13
13
  export interface Transitions {}
14
14
  export interface ZIndex {}
15
15
  export interface ThemeOptions {
16
- shape?: ShapeOptions;
17
- breakpoints?: BreakpointsOptions;
18
- direction?: Direction;
19
- mixins?: Mixins;
20
- palette?: Record<string, any>;
21
- shadows?: Shadows;
22
- spacing?: SpacingOptions;
23
- transitions?: Transitions;
24
- components?: Record<string, any>;
25
- typography?: Typography;
26
- zIndex?: ZIndex;
27
- unstable_sxConfig?: SxConfig;
16
+ shape?: ShapeOptions | undefined;
17
+ breakpoints?: BreakpointsOptions | undefined;
18
+ direction?: Direction | undefined;
19
+ mixins?: Mixins | undefined;
20
+ palette?: Record<string, any> | undefined;
21
+ shadows?: Shadows | undefined;
22
+ spacing?: SpacingOptions | undefined;
23
+ transitions?: Transitions | undefined;
24
+ components?: Record<string, any> | undefined;
25
+ typography?: Typography | undefined;
26
+ zIndex?: ZIndex | undefined;
27
+ unstable_sxConfig?: SxConfig | undefined;
28
28
  }
29
29
  export interface Theme extends CssContainerQueries {
30
30
  shape: Shape;
@@ -33,13 +33,13 @@ export interface Theme extends CssContainerQueries {
33
33
  palette: Record<string, any> & {
34
34
  mode: 'light' | 'dark';
35
35
  };
36
- shadows?: Shadows;
36
+ shadows?: Shadows | undefined;
37
37
  spacing: Spacing;
38
- transitions?: Transitions;
39
- components?: Record<string, any>;
40
- mixins?: Mixins;
41
- typography?: Typography;
42
- zIndex?: ZIndex;
38
+ transitions?: Transitions | undefined;
39
+ components?: Record<string, any> | undefined;
40
+ mixins?: Mixins | undefined;
41
+ typography?: Typography | undefined;
42
+ zIndex?: ZIndex | undefined;
43
43
  applyStyles: ApplyStyles<'light' | 'dark'>;
44
44
  unstable_sxConfig: SxConfig;
45
45
  unstable_sx: (props: SxProps<Theme>) => CSSObject;
@@ -10,17 +10,17 @@ export interface CssVarsProviderConfig<ColorScheme extends string> {
10
10
  * DOM attribute for applying color scheme
11
11
  * @default 'data-color-scheme'
12
12
  */
13
- attribute?: string;
13
+ attribute?: string | undefined;
14
14
  /**
15
15
  * localStorage key used to store application `mode`
16
16
  * @default 'mode'
17
17
  */
18
- modeStorageKey?: string;
18
+ modeStorageKey?: string | undefined;
19
19
  /**
20
20
  * localStorage key used to store `colorScheme`
21
21
  * @default 'color-scheme'
22
22
  */
23
- colorSchemeStorageKey?: string;
23
+ colorSchemeStorageKey?: string | undefined;
24
24
  /**
25
25
  * Design system default color scheme.
26
26
  * - provides string if the design system has one default color scheme (either light or dark)
@@ -34,60 +34,60 @@ export interface CssVarsProviderConfig<ColorScheme extends string> {
34
34
  * Disable CSS transitions when switching between modes or color schemes
35
35
  * @default false
36
36
  */
37
- disableTransitionOnChange?: boolean;
37
+ disableTransitionOnChange?: boolean | undefined;
38
38
  /**
39
39
  * If `true`, theme values are recalculated when the mode changes.
40
40
  * The `theme.colorSchemes.{mode}.*` nodes will be shallow merged to the top-level of the theme.
41
41
  * @default false
42
42
  */
43
- forceThemeRerender?: boolean;
43
+ forceThemeRerender?: boolean | undefined;
44
44
  }
45
45
  type Identify<I extends string | undefined, T> = I extends string ? T | { [k in I]: T } : T;
46
46
  export interface CreateCssVarsProviderResult<ColorScheme extends string, Identifier extends string | undefined = undefined> {
47
47
  CssVarsProvider: (props: React.PropsWithChildren<Partial<CssVarsProviderConfig<ColorScheme>> & {
48
48
  theme?: Identify<Identifier, {
49
- cssVariables?: false;
50
- cssVarPrefix?: string;
49
+ cssVariables?: false | undefined;
50
+ cssVarPrefix?: string | undefined;
51
51
  colorSchemes: Partial<Record<ColorScheme, any>>;
52
- colorSchemeSelector?: 'media' | 'class' | 'data' | string;
53
- }>;
52
+ colorSchemeSelector?: 'media' | 'class' | 'data' | string | undefined;
53
+ }> | undefined;
54
54
  /**
55
55
  * The default mode when the storage is empty,
56
56
  * require the theme to have `colorSchemes` with light and dark.
57
57
  * @default 'system'
58
58
  */
59
- defaultMode?: 'light' | 'dark' | 'system';
59
+ defaultMode?: 'light' | 'dark' | 'system' | undefined;
60
60
  /**
61
61
  * The document used to perform `disableTransitionOnChange` feature
62
62
  * @default document
63
63
  */
64
- documentNode?: Document | null;
64
+ documentNode?: Document | null | undefined;
65
65
  /**
66
66
  * The node used to attach the color-scheme attribute
67
67
  * @default document
68
68
  */
69
- colorSchemeNode?: Element | null;
69
+ colorSchemeNode?: Element | null | undefined;
70
70
  /**
71
71
  * The storage manager to be used for storing the mode and color scheme.
72
72
  * @default using `window.localStorage`
73
73
  */
74
- storageManager?: StorageManager | null;
74
+ storageManager?: StorageManager | null | undefined;
75
75
  /**
76
76
  * The window that attaches the 'storage' event listener
77
77
  * @default window
78
78
  */
79
- storageWindow?: Window | null;
79
+ storageWindow?: Window | null | undefined;
80
80
  /**
81
81
  * If `true`, the provider creates its own context and generate stylesheet as if it is a root `CssVarsProvider`.
82
82
  */
83
- disableNestedContext?: boolean;
83
+ disableNestedContext?: boolean | undefined;
84
84
  /**
85
85
  * If `true`, the style sheet won't be generated.
86
86
  *
87
87
  * This is useful for controlling nested CssVarsProvider behavior.
88
88
  * @default false
89
89
  */
90
- disableStyleSheetGeneration?: boolean;
90
+ disableStyleSheetGeneration?: boolean | undefined;
91
91
  }>) => React.JSX.Element;
92
92
  useColorScheme: () => ColorSchemeContextValue<ColorScheme>;
93
93
  getInitColorSchemeScript: typeof InitColorSchemeScript;
@@ -96,7 +96,7 @@ export default function createCssVarsProvider<ColorScheme extends string, Identi
96
96
  /**
97
97
  * The design system's unique id for getting the corresponded theme when there are multiple design systems.
98
98
  */
99
- themeId?: Identifier;
99
+ themeId?: Identifier | undefined;
100
100
  /**
101
101
  * Design system default theme
102
102
  *
@@ -134,7 +134,7 @@ export default function createCssVarsProvider<ColorScheme extends string, Identi
134
134
  * The example usage is the variant generation in Joy. We need to combine the token from user-input and the default theme first, then generate
135
135
  * variants from those tokens.
136
136
  */
137
- resolveTheme?: (theme: any) => any; // the type is any because it depends on the design system.
137
+ resolveTheme?: ((theme: any) => any) | undefined; // the type is any because it depends on the design system.
138
138
  }): CreateCssVarsProviderResult<ColorScheme, Identifier>;
139
139
 
140
140
  // disable automatic export
@@ -1,8 +1,8 @@
1
1
  import { DefaultCssVarsTheme } from "./prepareCssVars.js";
2
2
  interface Theme extends DefaultCssVarsTheme {
3
- cssVarPrefix?: string;
4
- colorSchemeSelector?: 'media' | string;
5
- shouldSkipGeneratingVar?: (objectPathKeys: Array<string>, value: string | number) => boolean;
3
+ cssVarPrefix?: string | undefined;
4
+ colorSchemeSelector?: 'media' | string | undefined;
5
+ shouldSkipGeneratingVar?: ((objectPathKeys: Array<string>, value: string | number) => boolean) | undefined;
6
6
  }
7
7
  declare function createCssVarsTheme<T extends Theme, ThemeVars extends Record<string, any>>({
8
8
  colorSchemeSelector,
@@ -54,8 +54,8 @@ export declare const walkObjectDeep: <Value, T = Record<string, any>>(obj: T, ca
54
54
  * console.log(vars) // { fontSize: 'var(--foo-fontSize)', lineHeight: 'var(--foo-lineHeight)', palette: { primary: { 500: 'var(--foo-palette-primary-500)' } } }
55
55
  */
56
56
  export default function cssVarsParser<T extends Record<string, any>>(theme: Record<string, any>, options?: {
57
- prefix?: string;
58
- shouldSkipGeneratingVar?: (objectPathKeys: Array<string>, value: string | number) => boolean;
57
+ prefix?: string | undefined;
58
+ shouldSkipGeneratingVar?: ((objectPathKeys: Array<string>, value: string | number) => boolean) | undefined;
59
59
  }): {
60
60
  css: Record<string, string | number>;
61
61
  vars: T;
@@ -1,7 +1,7 @@
1
1
  export interface StorageManager {
2
2
  (options: {
3
3
  key: string;
4
- storageWindow?: Window | null;
4
+ storageWindow?: Window | null | undefined;
5
5
  }): {
6
6
  /**
7
7
  * Function to get the value from the storage