@mui/system 7.3.8 → 7.3.10

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 (79) hide show
  1. package/Box/Box.d.ts +4 -3
  2. package/CHANGELOG.md +86 -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/deleteLegacyGridProps.js +1 -1
  10. package/Grid/gridGenerator.d.ts +1 -1
  11. package/InitColorSchemeScript/InitColorSchemeScript.d.ts +7 -7
  12. package/README.md +2 -2
  13. package/RtlProvider/index.d.ts +1 -1
  14. package/Stack/StackProps.d.ts +5 -5
  15. package/Stack/createStack.d.ts +3 -3
  16. package/ThemeProvider/ThemeProvider.d.ts +1 -1
  17. package/ThemeProvider/useLayerOrder.d.ts +1 -1
  18. package/breakpoints/breakpoints.d.ts +2 -2
  19. package/colorManipulator/colorManipulator.d.ts +1 -1
  20. package/createBox/createBox.d.ts +3 -3
  21. package/createBreakpoints/createBreakpoints.d.ts +4 -4
  22. package/createStyled/createStyled.d.ts +13 -13
  23. package/createTheme/createTheme.d.ts +18 -18
  24. package/cssVars/createCssVarsProvider.d.ts +18 -18
  25. package/cssVars/createCssVarsTheme.d.ts +3 -3
  26. package/cssVars/cssVarsParser.d.ts +2 -2
  27. package/cssVars/localStorageManager.d.ts +1 -1
  28. package/cssVars/prepareCssVars.d.ts +8 -8
  29. package/cssVars/useCurrentColorScheme.d.ts +6 -6
  30. package/esm/Box/Box.d.ts +4 -3
  31. package/esm/Container/ContainerProps.d.ts +5 -5
  32. package/esm/Container/createContainer.d.ts +5 -5
  33. package/esm/GlobalStyles/GlobalStyles.d.ts +2 -2
  34. package/esm/Grid/GridProps.d.ts +11 -11
  35. package/esm/Grid/createGrid.d.ts +4 -4
  36. package/esm/Grid/deleteLegacyGridProps.d.ts +2 -2
  37. package/esm/Grid/deleteLegacyGridProps.js +1 -1
  38. package/esm/Grid/gridGenerator.d.ts +1 -1
  39. package/esm/InitColorSchemeScript/InitColorSchemeScript.d.ts +7 -7
  40. package/esm/RtlProvider/index.d.ts +1 -1
  41. package/esm/Stack/StackProps.d.ts +5 -5
  42. package/esm/Stack/createStack.d.ts +3 -3
  43. package/esm/ThemeProvider/ThemeProvider.d.ts +1 -1
  44. package/esm/ThemeProvider/useLayerOrder.d.ts +1 -1
  45. package/esm/breakpoints/breakpoints.d.ts +2 -2
  46. package/esm/colorManipulator/colorManipulator.d.ts +1 -1
  47. package/esm/createBox/createBox.d.ts +3 -3
  48. package/esm/createBreakpoints/createBreakpoints.d.ts +4 -4
  49. package/esm/createStyled/createStyled.d.ts +13 -13
  50. package/esm/createTheme/createTheme.d.ts +18 -18
  51. package/esm/cssVars/createCssVarsProvider.d.ts +18 -18
  52. package/esm/cssVars/createCssVarsTheme.d.ts +3 -3
  53. package/esm/cssVars/cssVarsParser.d.ts +2 -2
  54. package/esm/cssVars/localStorageManager.d.ts +1 -1
  55. package/esm/cssVars/prepareCssVars.d.ts +8 -8
  56. package/esm/cssVars/useCurrentColorScheme.d.ts +6 -6
  57. package/esm/index.js +1 -1
  58. package/esm/style/style.d.ts +4 -4
  59. package/esm/styleFunctionSx/AliasesCSSProperties.d.ts +21 -21
  60. package/esm/styleFunctionSx/OverwriteCSSProperties.d.ts +4 -4
  61. package/esm/styleFunctionSx/defaultSxConfig.d.ts +4 -4
  62. package/esm/styleFunctionSx/extendSxProp.d.ts +1 -1
  63. package/esm/styleFunctionSx/styleFunctionSx.d.ts +1 -1
  64. package/esm/useMediaQuery/useMediaQuery.d.ts +6 -6
  65. package/esm/useThemeProps/getThemeProps.d.ts +1 -1
  66. package/esm/useThemeProps/useThemeProps.d.ts +2 -2
  67. package/esm/version/index.js +2 -2
  68. package/index.js +1 -1
  69. package/package.json +5 -5
  70. package/style/style.d.ts +4 -4
  71. package/styleFunctionSx/AliasesCSSProperties.d.ts +21 -21
  72. package/styleFunctionSx/OverwriteCSSProperties.d.ts +4 -4
  73. package/styleFunctionSx/defaultSxConfig.d.ts +4 -4
  74. package/styleFunctionSx/extendSxProp.d.ts +1 -1
  75. package/styleFunctionSx/styleFunctionSx.d.ts +1 -1
  76. package/useMediaQuery/useMediaQuery.d.ts +6 -6
  77. package/useThemeProps/getThemeProps.d.ts +1 -1
  78. package/useThemeProps/useThemeProps.d.ts +2 -2
  79. 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>;
@@ -40,6 +40,7 @@ export interface BoxTypeMap<AdditionalProps = {}, RootComponent extends React.El
40
40
  *
41
41
  * - [Box (Joy UI)](https://mui.com/joy-ui/react-box/)
42
42
  * - [Box (Material UI)](https://mui.com/material-ui/react-box/)
43
+ * - [Menubar (Material UI)](https://mui.com/material-ui/react-menubar/)
43
44
  * - [Box (MUI System)](https://mui.com/system/react-box/)
44
45
  *
45
46
  * API:
@@ -48,6 +49,6 @@ export interface BoxTypeMap<AdditionalProps = {}, RootComponent extends React.El
48
49
  */
49
50
  declare const Box: OverridableComponent<BoxTypeMap>;
50
51
  export type BoxProps<RootComponent extends React.ElementType = BoxTypeMap['defaultComponent'], AdditionalProps = {}> = OverrideProps<BoxTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
51
- component?: React.ElementType;
52
+ component?: React.ElementType | undefined;
52
53
  };
53
54
  export default Box;
package/CHANGELOG.md CHANGED
@@ -1,5 +1,91 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 7.3.10
4
+
5
+ <!-- generated comparing v7.3.9..v7.x -->
6
+
7
+ _Apr 8, 2026_
8
+
9
+ A big thanks to the 15 contributors who made this release possible. A few highlights ✨:
10
+
11
+ - 📖 Added the Menubar component page to the docs.
12
+
13
+ ### `@mui/material@7.3.10`
14
+
15
+ - [alert][dialog] Accessibility improvements (#48161) @silviuaavram
16
+ - [autocomplete] Add `root` slot (#47916) @GerardasB
17
+ - [autocomplete] Fix helper text focusing input when clicked (#48162) @mj12albert
18
+ - [autocomplete] Fix popup reopening on window focus regain with openOnFocus (#47914) @aman44444
19
+ - [autocomplete] Optimize selected option lookup (#48027) @anchmelev
20
+ - [autocomplete] Support full slots for clearIndicator and popupIndicator (#47913) @silviuaavram
21
+ - [button-base] Fix native button detection (#47994) @mj12albert
22
+ - [input] Fix high contrast cutoff on first character (#48160) @silviuaavram
23
+ - [list item text][card header] Revert cleanup of duplicated CSS rules (#47938) @sai6855
24
+ - [popper] Add missing classes export (#48033) @mj12albert
25
+ - [select] Fix focus visible always set on menu item (#48022) @silviuaavram
26
+ - [slider] Accept readonly array for the value prop (#47961) @pcorpet
27
+ - [switch] Add border to make it visible in high contrast mode (#48210) @silviuaavram
28
+ - [theme] Do not create channel tokens for custom colors when `nativeColor` is used (#48144) @ZeeshanTamboli
29
+ - [transitions] Performance improvements & misc fixes (#48217) @mj12albert
30
+
31
+ ### Docs
32
+
33
+ - [codemod] Add v7 migration docs for deprecated Autocomplete APIs and Autocomplete codemod (#47954) @ZeeshanTamboli
34
+ - [menubar] Add Menubar component page (#47942) @siriwatknp
35
+ - [progress] Label all demo components (#48168) @mj12albert
36
+ - [system] Update `styled` API docs for easier understanding (#47969) @olivier-lxo
37
+ - Fix the dark mode footer row shadow for the Data Grid on the advanced components page (#48152) @arminmeh
38
+ - Fix MUI X redirects (#47917) @cherniavskii
39
+ - Use direct palette vars in Tailwind v4 snippet (#47955) @Ahmad-Alaziz
40
+
41
+ ### Core
42
+
43
+ - [blog] Blogpost for upcoming price changes for MUI X (#47820) @DanailH
44
+ - [blog] Update the 2026 price changes blogpost (#47944) @DanailH
45
+ - [code-infra] Add pkg-pr-new as dev dependency (#48023) @silviuaavram
46
+ - [docs-infra] Update Release Instructions and Search Index v7 (#48109) @dav-is
47
+
48
+ All contributors of this release in alphabetical order: @Ahmad-Alaziz, @aman44444, @anchmelev, @arminmeh, @cherniavskii, @DanailH, @dav-is, @GerardasB, @mj12albert, @olivier-lxo, @pcorpet, @sai6855, @silviuaavram, @siriwatknp, @ZeeshanTamboli
49
+
50
+ ## 7.3.9
51
+
52
+ <!-- generated comparing v7.3.8..v7.x -->
53
+
54
+ _Mar 5, 2026_
55
+
56
+ A big thanks to the 15 contributors who made this release possible.
57
+
58
+ ### `@mui/material@7.3.9`
59
+
60
+ - Clean up duplicated CSS rules (#47893) @sai6855
61
+ - [theme] Generate `color-mix` value on top of default generated Material UI CSS variables (#47791) @ZeeshanTamboli
62
+ - [tooltip] Fix error is thrown when wrapping an input which is disabled while focused (#47841) @ZeeshanTamboli
63
+ - [table cell][theme] Apply `alpha` before color mixing to border bottom color when nativeColor + cssVariables is used (#47840) @ZeeshanTamboli
64
+
65
+ ### Docs
66
+
67
+ - Fix small typo in NumberField page (#47888) @arthur-plazanet
68
+ - Fix Theme builder video (#47855) @oliviertassinari
69
+ - Add updated community theme resource (#47853) @PeterTYLiu
70
+ - Fix the keyboard navigation in GroupedMenu example (#47848) @silviuaavram
71
+ - Few copy fixes (#47810) @pavan-sh
72
+ - Fix JSX in Overriding component structure docs (#47805) @ZeeshanTamboli
73
+ - Fix SSR flicker sentence grammar (#47794) @pavan-sh
74
+ - [system] Update sizing docs to clarify `(0, 1]` behavior. (#47851) @matthias-ccri
75
+ - [theme] Fix `nativeColor` docs (#47759) (#47789) @ZeeshanTamboli
76
+
77
+ ### Core
78
+
79
+ - point v7 subdomain to MUI X v7 docs (#113) @vmakhaev
80
+ - [blog] Blogpost for upcoming price changes for MUI X (#47748) (#47910) @DanailH
81
+ - [blog] Company Update: What we've been working on (and why) (alethomas) (#47626) (#47908) @alelthomas
82
+ - [core] Update releaseChangelog.mjs (#47862) @mnajdova
83
+ - [code-infra] Detect browser envs that don't support layout (#47813) (#47873) @Janpot
84
+ - [code-infra] Enable undefined addition to optional properties (#47815) @brijeshb42
85
+ - [docs-infra] Reapply Cookie Banner with Design Fixes (#47744) @dav-is
86
+
87
+ 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
88
+
3
89
  ## 7.3.8
4
90
 
5
91
  <!-- 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;
@@ -10,7 +10,7 @@ const getLegacyGridWarning = propName => {
10
10
  }
11
11
 
12
12
  // #host-reference
13
- return `The \`${propName}\` prop has been removed. See https://mui.com/material-ui/migration/upgrade-to-grid-v2/ for migration instructions.`;
13
+ return `The \`${propName}\` prop has been removed. See https://v7.mui.com/material-ui/migration/upgrade-to-grid-v2/ for migration instructions.`;
14
14
  };
15
15
  const warnedAboutProps = [];
16
16
 
@@ -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
  */
package/README.md CHANGED
@@ -9,11 +9,11 @@ Install the package in your project directory with:
9
9
  <!-- #npm-tag-reference -->
10
10
 
11
11
  ```bash
12
- npm install @mui/system @emotion/react @emotion/styled
12
+ npm install @mui/system@^7.0.0 @emotion/react @emotion/styled
13
13
  ```
14
14
 
15
15
  ## Documentation
16
16
 
17
17
  <!-- #host-reference -->
18
18
 
19
- Visit [https://mui.com/system/getting-started/](https://mui.com/system/getting-started/) to view the full documentation.
19
+ Visit [https://v7.mui.com/system/getting-started/](https://v7.mui.com/system/getting-started/) to view the full documentation.
@@ -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>>;
@@ -26,13 +26,13 @@ export interface Breakpoints {
26
26
  /**
27
27
  * @param key - A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.
28
28
  * @returns A media query string ready to be used with most styling solutions, which matches screen widths greater than the screen size given by the breakpoint key (inclusive).
29
- * @see [API documentation](https://mui.com/material-ui/customization/breakpoints/#theme-breakpoints-up-key-media-query)
29
+ * @see [API documentation](https://v7.mui.com/material-ui/customization/breakpoints/#theme-breakpoints-up-key-media-query)
30
30
  */
31
31
  up: (key: Breakpoint | number) => string;
32
32
  /**
33
33
  * @param key - A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.
34
34
  * @returns A media query string ready to be used with most styling solutions, which matches screen widths less than the screen size given by the breakpoint key (exclusive).
35
- * @see [API documentation](https://mui.com/material-ui/customization/breakpoints/#theme-breakpoints-down-key-media-query)
35
+ * @see [API documentation](https://v7.mui.com/material-ui/customization/breakpoints/#theme-breakpoints-down-key-media-query)
36
36
  */
37
37
  down: (key: Breakpoint | number) => string;
38
38
  /**
@@ -40,14 +40,14 @@ export interface Breakpoints {
40
40
  * @param end - A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.
41
41
  * @returns A media query string ready to be used with most styling solutions, which matches screen widths greater than
42
42
  * the screen size given by the breakpoint key in the first argument (inclusive) and less than the screen size given by the breakpoint key in the second argument (exclusive).
43
- * @see [API documentation](https://mui.com/material-ui/customization/breakpoints/#theme-breakpoints-between-start-end-media-query)
43
+ * @see [API documentation](https://v7.mui.com/material-ui/customization/breakpoints/#theme-breakpoints-between-start-end-media-query)
44
44
  */
45
45
  between: (start: Breakpoint | number, end: Breakpoint | number) => string;
46
46
  /**
47
47
  * @param key - A breakpoint key (`xs`, `sm`, etc.) or a screen width number in px.
48
48
  * @returns A media query string ready to be used with most styling solutions, which matches screen widths starting from
49
49
  * the screen size given by the breakpoint key (inclusive) and stopping at the screen size given by the next breakpoint key (exclusive).
50
- * @see [API documentation](https://mui.com/material-ui/customization/breakpoints/#theme-breakpoints-only-key-media-query)
50
+ * @see [API documentation](https://v7.mui.com/material-ui/customization/breakpoints/#theme-breakpoints-only-key-media-query)
51
51
  */
52
52
  only: (key: Breakpoint) => string;
53
53
  /**
@@ -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;