@mui/system 9.1.1 → 9.1.2

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 (112) hide show
  1. package/Box/Box.d.mts +15 -19
  2. package/Box/Box.d.ts +15 -19
  3. package/Box/Box.js +16 -1
  4. package/Box/Box.mjs +17 -1
  5. package/Box/index.js +12 -2
  6. package/Box/index.mjs +1 -0
  7. package/CHANGELOG.md +36 -0
  8. package/Container/index.d.mts +1 -1
  9. package/Container/index.d.ts +1 -1
  10. package/Grid/Grid.js +0 -1
  11. package/Grid/Grid.mjs +0 -1
  12. package/Grid/GridProps.d.mts +0 -1
  13. package/Grid/GridProps.d.ts +0 -1
  14. package/InitColorSchemeScript/InitColorSchemeScript.d.mts +2 -1
  15. package/InitColorSchemeScript/InitColorSchemeScript.d.ts +2 -1
  16. package/InitColorSchemeScript/InitColorSchemeScript.js +34 -1
  17. package/InitColorSchemeScript/InitColorSchemeScript.mjs +33 -1
  18. package/ThemeProvider/ThemeProvider.d.mts +9 -6
  19. package/ThemeProvider/ThemeProvider.d.ts +9 -6
  20. package/ThemeProvider/ThemeProvider.js +3 -2
  21. package/ThemeProvider/ThemeProvider.mjs +3 -2
  22. package/ThemeProvider/index.d.mts +1 -1
  23. package/ThemeProvider/index.d.ts +1 -1
  24. package/borders/borders.d.mts +14 -12
  25. package/borders/borders.d.ts +14 -12
  26. package/borders/borders.js +2 -4
  27. package/borders/borders.mjs +3 -4
  28. package/breakpoints/breakpoints.d.mts +13 -16
  29. package/breakpoints/breakpoints.d.ts +13 -16
  30. package/breakpoints/breakpoints.js +17 -16
  31. package/breakpoints/breakpoints.mjs +17 -16
  32. package/compose/compose.d.mts +3 -10
  33. package/compose/compose.d.ts +3 -10
  34. package/compose/compose.js +0 -2
  35. package/compose/compose.mjs +0 -2
  36. package/createBox/createBox.d.mts +4 -4
  37. package/createBox/createBox.d.ts +4 -4
  38. package/createBreakpoints/createBreakpoints.d.mts +3 -54
  39. package/createBreakpoints/createBreakpoints.d.ts +3 -54
  40. package/createBreakpoints/createBreakpoints.js +6 -8
  41. package/createBreakpoints/createBreakpoints.mjs +6 -8
  42. package/createBreakpoints/index.d.mts +0 -1
  43. package/createBreakpoints/index.d.ts +0 -1
  44. package/createTheme/shape.d.mts +2 -2
  45. package/createTheme/shape.d.ts +2 -2
  46. package/cssGrid/cssGrid.d.mts +13 -13
  47. package/cssGrid/cssGrid.d.ts +13 -13
  48. package/cssGrid/cssGrid.js +0 -8
  49. package/cssGrid/cssGrid.mjs +0 -9
  50. package/cssVars/createCssVarsProvider.js +2 -2
  51. package/cssVars/createCssVarsProvider.mjs +2 -2
  52. package/cssVars/useCurrentColorScheme.js +1 -0
  53. package/cssVars/useCurrentColorScheme.mjs +1 -0
  54. package/display/display.d.mts +49 -1
  55. package/display/display.d.ts +49 -1
  56. package/display/display.js +2 -1
  57. package/display/display.mjs +2 -1
  58. package/flexbox/flexbox.d.mts +14 -14
  59. package/flexbox/flexbox.d.ts +14 -14
  60. package/getThemeValue/getThemeValue.d.mts +2 -1
  61. package/getThemeValue/getThemeValue.d.ts +2 -1
  62. package/getThemeValue/getThemeValue.js +6 -2
  63. package/getThemeValue/getThemeValue.mjs +7 -3
  64. package/index.js +1 -1
  65. package/index.mjs +1 -1
  66. package/memoize/memoize.d.mts +1 -1
  67. package/memoize/memoize.d.ts +1 -1
  68. package/package.json +59 -59
  69. package/palette/palette.d.mts +4 -3
  70. package/palette/palette.d.ts +4 -3
  71. package/palette/palette.js +1 -0
  72. package/palette/palette.mjs +2 -0
  73. package/positions/positions.d.mts +49 -1
  74. package/positions/positions.d.ts +49 -1
  75. package/positions/positions.js +2 -1
  76. package/positions/positions.mjs +2 -1
  77. package/propsToClassKey/propsToClassKey.d.mts +5 -0
  78. package/propsToClassKey/propsToClassKey.d.ts +5 -0
  79. package/propsToClassKey/propsToClassKey.js +1 -1
  80. package/propsToClassKey/propsToClassKey.mjs +1 -1
  81. package/shadows/shadows.d.mts +4 -4
  82. package/shadows/shadows.d.ts +4 -4
  83. package/sizing/sizing.d.mts +10 -10
  84. package/sizing/sizing.d.ts +10 -10
  85. package/sizing/sizing.js +7 -2
  86. package/sizing/sizing.mjs +5 -1
  87. package/spacing/spacing.d.mts +10 -14
  88. package/spacing/spacing.d.ts +10 -14
  89. package/spacing/spacing.js +17 -13
  90. package/spacing/spacing.mjs +16 -9
  91. package/styleFunctionSx/defaultSxConfig.d.mts +1 -1
  92. package/styleFunctionSx/defaultSxConfig.d.ts +1 -1
  93. package/styleFunctionSx/extendSxProp.d.mts +4 -2
  94. package/styleFunctionSx/extendSxProp.d.ts +4 -2
  95. package/styled/styled.d.mts +1 -1
  96. package/styled/styled.d.ts +1 -1
  97. package/typography/typography.d.mts +10 -10
  98. package/typography/typography.d.ts +10 -10
  99. package/useTheme/useTheme.d.mts +4 -2
  100. package/useTheme/useTheme.d.ts +4 -2
  101. package/useThemeProps/getThemeProps.d.mts +2 -2
  102. package/useThemeProps/getThemeProps.d.ts +2 -2
  103. package/useThemeProps/index.d.mts +1 -1
  104. package/useThemeProps/index.d.ts +1 -1
  105. package/useThemeProps/useThemeProps.js +7 -6
  106. package/useThemeProps/useThemeProps.mjs +7 -6
  107. package/useThemeWithoutDefault/useThemeWithoutDefault.d.mts +2 -1
  108. package/useThemeWithoutDefault/useThemeWithoutDefault.d.ts +2 -1
  109. package/useThemeWithoutDefault/useThemeWithoutDefault.js +2 -2
  110. package/useThemeWithoutDefault/useThemeWithoutDefault.mjs +2 -2
  111. package/version/index.js +2 -2
  112. package/version/index.mjs +2 -2
package/Box/Box.d.mts CHANGED
@@ -1,24 +1,21 @@
1
1
  import * as React from 'react';
2
- import { OverridableComponent, OverrideProps } from '@mui/types';
3
- import { Theme as SystemTheme } from "../createTheme/index.mjs";
4
- import { SxProps, AllSystemCSSProperties, ResponsiveStyleValue, OverwriteCSSProperties, AliasesCSSProperties } from "../styleFunctionSx/index.mjs";
5
- import { PropsFor } from "../style/index.mjs";
6
- import { ComposedStyleFunction } from "../compose/index.mjs";
7
- import borders from "../borders/index.mjs";
8
- import display from "../display/index.mjs";
9
- import flexbox from "../flexbox/index.mjs";
10
- import grid from "../cssGrid/index.mjs";
11
- import palette from "../palette/index.mjs";
12
- import positions from "../positions/index.mjs";
13
- import shadows from "../shadows/index.mjs";
14
- import sizing from "../sizing/index.mjs";
15
- import spacing from "../spacing/index.mjs";
16
- import typography from "../typography/index.mjs";
2
+ import type { OverridableComponent, OverrideProps } from '@mui/types';
3
+ import type { SxProps, AllSystemCSSProperties, ResponsiveStyleValue, OverwriteCSSProperties, AliasesCSSProperties } from "../styleFunctionSx/index.mjs";
4
+ import type { PropsFor } from "../style/index.mjs";
5
+ import type { ComposedStyleFunction } from "../compose/index.mjs";
6
+ import type { Theme as SystemTheme } from "../createTheme/index.mjs";
7
+ import type borders from "../borders/index.mjs";
8
+ import type display from "../display/index.mjs";
9
+ import type flexbox from "../flexbox/index.mjs";
10
+ import type grid from "../cssGrid/index.mjs";
11
+ import type palette from "../palette/index.mjs";
12
+ import type positions from "../positions/index.mjs";
13
+ import type shadows from "../shadows/index.mjs";
14
+ import type sizing from "../sizing/index.mjs";
15
+ import type spacing from "../spacing/index.mjs";
16
+ import type typography from "../typography/index.mjs";
17
17
  export interface CustomSystemProps extends AliasesCSSProperties, OverwriteCSSProperties {}
18
18
  export type SimpleSystemKeys = keyof PropsFor<ComposedStyleFunction<[typeof borders, typeof display, typeof flexbox, typeof grid, typeof palette, typeof positions, typeof shadows, typeof sizing, typeof spacing, typeof typography]>>;
19
-
20
- // The SimpleSystemKeys are subset of the AllSystemCSSProperties, so this should be ok
21
- // This is needed as these are used as keys inside AllSystemCSSProperties
22
19
  type StandardSystemKeys = Extract<SimpleSystemKeys, keyof AllSystemCSSProperties>;
23
20
  export type SystemProps<Theme extends object = {}> = { [K in StandardSystemKeys]?: ResponsiveStyleValue<AllSystemCSSProperties[K]> | ((theme: Theme) => ResponsiveStyleValue<AllSystemCSSProperties[K]>) };
24
21
  export interface BoxOwnProps<Theme extends object = SystemTheme> {
@@ -33,7 +30,6 @@ export interface BoxTypeMap<AdditionalProps = {}, RootComponent extends React.El
33
30
  props: AdditionalProps & BoxOwnProps<Theme>;
34
31
  defaultComponent: RootComponent;
35
32
  }
36
-
37
33
  /**
38
34
  *
39
35
  * Demos:
package/Box/Box.d.ts CHANGED
@@ -1,24 +1,21 @@
1
1
  import * as React from 'react';
2
- import { OverridableComponent, OverrideProps } from '@mui/types';
3
- import { Theme as SystemTheme } from "../createTheme/index.js";
4
- import { SxProps, AllSystemCSSProperties, ResponsiveStyleValue, OverwriteCSSProperties, AliasesCSSProperties } from "../styleFunctionSx/index.js";
5
- import { PropsFor } from "../style/index.js";
6
- import { ComposedStyleFunction } from "../compose/index.js";
7
- import borders from "../borders/index.js";
8
- import display from "../display/index.js";
9
- import flexbox from "../flexbox/index.js";
10
- import grid from "../cssGrid/index.js";
11
- import palette from "../palette/index.js";
12
- import positions from "../positions/index.js";
13
- import shadows from "../shadows/index.js";
14
- import sizing from "../sizing/index.js";
15
- import spacing from "../spacing/index.js";
16
- import typography from "../typography/index.js";
2
+ import type { OverridableComponent, OverrideProps } from '@mui/types';
3
+ import type { SxProps, AllSystemCSSProperties, ResponsiveStyleValue, OverwriteCSSProperties, AliasesCSSProperties } from "../styleFunctionSx/index.js";
4
+ import type { PropsFor } from "../style/index.js";
5
+ import type { ComposedStyleFunction } from "../compose/index.js";
6
+ import type { Theme as SystemTheme } from "../createTheme/index.js";
7
+ import type borders from "../borders/index.js";
8
+ import type display from "../display/index.js";
9
+ import type flexbox from "../flexbox/index.js";
10
+ import type grid from "../cssGrid/index.js";
11
+ import type palette from "../palette/index.js";
12
+ import type positions from "../positions/index.js";
13
+ import type shadows from "../shadows/index.js";
14
+ import type sizing from "../sizing/index.js";
15
+ import type spacing from "../spacing/index.js";
16
+ import type typography from "../typography/index.js";
17
17
  export interface CustomSystemProps extends AliasesCSSProperties, OverwriteCSSProperties {}
18
18
  export type SimpleSystemKeys = keyof PropsFor<ComposedStyleFunction<[typeof borders, typeof display, typeof flexbox, typeof grid, typeof palette, typeof positions, typeof shadows, typeof sizing, typeof spacing, typeof typography]>>;
19
-
20
- // The SimpleSystemKeys are subset of the AllSystemCSSProperties, so this should be ok
21
- // This is needed as these are used as keys inside AllSystemCSSProperties
22
19
  type StandardSystemKeys = Extract<SimpleSystemKeys, keyof AllSystemCSSProperties>;
23
20
  export type SystemProps<Theme extends object = {}> = { [K in StandardSystemKeys]?: ResponsiveStyleValue<AllSystemCSSProperties[K]> | ((theme: Theme) => ResponsiveStyleValue<AllSystemCSSProperties[K]>) };
24
21
  export interface BoxOwnProps<Theme extends object = SystemTheme> {
@@ -33,7 +30,6 @@ export interface BoxTypeMap<AdditionalProps = {}, RootComponent extends React.El
33
30
  props: AdditionalProps & BoxOwnProps<Theme>;
34
31
  defaultComponent: RootComponent;
35
32
  }
36
-
37
33
  /**
38
34
  *
39
35
  * Demos:
package/Box/Box.js CHANGED
@@ -10,6 +10,21 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
10
10
  var _ClassNameGenerator = _interopRequireDefault(require("@mui/utils/ClassNameGenerator"));
11
11
  var _createBox = _interopRequireDefault(require("../createBox"));
12
12
  var _boxClasses = _interopRequireDefault(require("./boxClasses"));
13
+ // The SimpleSystemKeys are subset of the AllSystemCSSProperties, so this should be ok
14
+ // This is needed as these are used as keys inside AllSystemCSSProperties
15
+
16
+ /**
17
+ *
18
+ * Demos:
19
+ *
20
+ * - [Box (Material UI)](https://mui.com/material-ui/react-box/)
21
+ * - [Menubar (Material UI)](https://mui.com/material-ui/react-menubar/)
22
+ * - [Box (MUI System)](https://mui.com/system/react-box/)
23
+ *
24
+ * API:
25
+ *
26
+ * - [Box API](https://mui.com/system/api/box/)
27
+ */
13
28
  const Box = (0, _createBox.default)({
14
29
  defaultClassName: _boxClasses.default.root,
15
30
  generateClassName: _ClassNameGenerator.default.generate
@@ -17,7 +32,7 @@ const Box = (0, _createBox.default)({
17
32
  process.env.NODE_ENV !== "production" ? Box.propTypes /* remove-proptypes */ = {
18
33
  // ┌────────────────────────────── Warning ──────────────────────────────┐
19
34
  // │ These PropTypes are generated from the TypeScript type definitions. │
20
- // │ To update them, edit the d.ts file and run `pnpm proptypes`.
35
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`.
21
36
  // └─────────────────────────────────────────────────────────────────────┘
22
37
  /**
23
38
  * @ignore
package/Box/Box.mjs CHANGED
@@ -4,6 +4,22 @@ import PropTypes from 'prop-types';
4
4
  import ClassNameGenerator from '@mui/utils/ClassNameGenerator';
5
5
  import createBox from "../createBox/index.mjs";
6
6
  import boxClasses from "./boxClasses.mjs";
7
+
8
+ // The SimpleSystemKeys are subset of the AllSystemCSSProperties, so this should be ok
9
+ // This is needed as these are used as keys inside AllSystemCSSProperties
10
+
11
+ /**
12
+ *
13
+ * Demos:
14
+ *
15
+ * - [Box (Material UI)](https://mui.com/material-ui/react-box/)
16
+ * - [Menubar (Material UI)](https://mui.com/material-ui/react-menubar/)
17
+ * - [Box (MUI System)](https://mui.com/system/react-box/)
18
+ *
19
+ * API:
20
+ *
21
+ * - [Box API](https://mui.com/system/api/box/)
22
+ */
7
23
  const Box = createBox({
8
24
  defaultClassName: boxClasses.root,
9
25
  generateClassName: ClassNameGenerator.generate
@@ -11,7 +27,7 @@ const Box = createBox({
11
27
  process.env.NODE_ENV !== "production" ? Box.propTypes /* remove-proptypes */ = {
12
28
  // ┌────────────────────────────── Warning ──────────────────────────────┐
13
29
  // │ These PropTypes are generated from the TypeScript type definitions. │
14
- // │ To update them, edit the d.ts file and run `pnpm proptypes`.
30
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`.
15
31
  // └─────────────────────────────────────────────────────────────────────┘
16
32
  /**
17
33
  * @ignore
package/Box/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
@@ -20,7 +19,18 @@ Object.defineProperty(exports, "default", {
20
19
  return _Box.default;
21
20
  }
22
21
  });
23
- var _Box = _interopRequireDefault(require("./Box"));
22
+ var _Box = _interopRequireWildcard(require("./Box"));
23
+ Object.keys(_Box).forEach(function (key) {
24
+ if (key === "default" || key === "__esModule") return;
25
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
26
+ if (key in exports && exports[key] === _Box[key]) return;
27
+ Object.defineProperty(exports, key, {
28
+ enumerable: true,
29
+ get: function () {
30
+ return _Box[key];
31
+ }
32
+ });
33
+ });
24
34
  var _boxClasses = _interopRequireWildcard(require("./boxClasses"));
25
35
  Object.keys(_boxClasses).forEach(function (key) {
26
36
  if (key === "default" || key === "__esModule") return;
package/Box/index.mjs CHANGED
@@ -1,3 +1,4 @@
1
1
  export { default } from "./Box.mjs";
2
+ export * from "./Box.mjs";
2
3
  export { default as boxClasses } from "./boxClasses.mjs";
3
4
  export * from "./boxClasses.mjs";
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # [Versions](https://mui.com/material-ui/getting-started/versions/)
2
2
 
3
+ ## 9.1.2
4
+
5
+ <!-- generated comparing v9.1.1..master -->
6
+
7
+ _Jun 23, 2026_
8
+
9
+ A big thanks to the 5 contributors who made this release possible.
10
+
11
+ ### `@mui/material@9.1.2`
12
+
13
+ - [autocomplete] Don't submit forms when committing `freeSolo` value with Enter key (#48679) @mj12albert
14
+ - [transitions] Fix RTG import in ESM (#48645) @mj12albert
15
+
16
+ ### `@mui/system@9.1.2`
17
+
18
+ - [InitColorSchemeScript] Fix script tag warning in Next.js 16 dev mode (#48671) @siriwatknp
19
+
20
+ ### Docs
21
+
22
+ - Fix typos in release instructions (#48687) @brijeshb42
23
+ - Update @mui/x-* packages to latest (#48661) @Janpot
24
+
25
+ ### Core
26
+
27
+ - [code-infra] Convert leaf @mui/system .js+.d.ts pairs to TypeScript (part 1) (#48578) @Janpot
28
+ - [code-infra] Bump to latest code-infra packages (#48672) @brijeshb42
29
+ - [code-infra] Resolve remaining minimatch advisory (#48662) @Janpot
30
+ - [code-infra] Bump nx to resolve minimatch advisory (#48658) @Janpot
31
+ - [core] Drop @babel/* pnpm overrides (#48710) @Janpot
32
+ - [docs-infra] Revert "Pin StackBlitz demo vite to v7 and plugin-react to v5" (#48709) @Janpot
33
+ - [docs-infra] Fix code-block copy button broken on direct page load (#48653) @brijeshb42
34
+ - [test] Stabilize Data Grid demo data in Argos screenshots (#48654) @LukasTy
35
+
36
+
37
+ All contributors of this release in alphabetical order: @brijeshb42, @Janpot, @LukasTy, @mj12albert, @siriwatknp
38
+
3
39
  ## 9.1.1
4
40
 
5
41
  <!-- generated comparing v9.1.0..master -->
@@ -1,4 +1,4 @@
1
1
  export { default } from "./Container.mjs";
2
- export * from "./ContainerProps.mjs";
2
+ export type * from "./ContainerProps.mjs";
3
3
  export { default as containerClasses } from "./containerClasses.mjs";
4
4
  export * from "./containerClasses.mjs";
@@ -1,4 +1,4 @@
1
1
  export { default } from "./Container.js";
2
- export * from "./ContainerProps.js";
2
+ export type * from "./ContainerProps.js";
3
3
  export { default as containerClasses } from "./containerClasses.js";
4
4
  export * from "./containerClasses.js";
package/Grid/Grid.js CHANGED
@@ -79,7 +79,6 @@ process.env.NODE_ENV !== "production" ? Grid.propTypes /* remove-proptypes */ =
79
79
  */
80
80
  sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
81
81
  /**
82
- * @internal
83
82
  * The level of the grid starts from `0` and increases when the grid nests
84
83
  * inside another grid. Nesting is defined as a container Grid being a direct
85
84
  * child of a container Grid.
package/Grid/Grid.mjs CHANGED
@@ -73,7 +73,6 @@ process.env.NODE_ENV !== "production" ? Grid.propTypes /* remove-proptypes */ =
73
73
  */
74
74
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
75
75
  /**
76
- * @internal
77
76
  * The level of the grid starts from `0` and increases when the grid nests
78
77
  * inside another grid. Nesting is defined as a container Grid being a direct
79
78
  * child of a container Grid.
@@ -45,7 +45,6 @@ export interface GridBaseProps {
45
45
  */
46
46
  offset?: ResponsiveStyleValue<GridOffset> | undefined;
47
47
  /**
48
- * @internal
49
48
  * The level of the grid starts from `0` and increases when the grid nests
50
49
  * inside another grid. Nesting is defined as a container Grid being a direct
51
50
  * child of a container Grid.
@@ -45,7 +45,6 @@ export interface GridBaseProps {
45
45
  */
46
46
  offset?: ResponsiveStyleValue<GridOffset> | undefined;
47
47
  /**
48
- * @internal
49
48
  * The level of the grid starts from `0` and increases when the grid nests
50
49
  * inside another grid. Nesting is defined as a container Grid being a direct
51
50
  * child of a container Grid.
@@ -44,4 +44,5 @@ export interface InitColorSchemeScriptProps {
44
44
  */
45
45
  nonce?: string | undefined;
46
46
  }
47
- export default function InitColorSchemeScript(options?: InitColorSchemeScriptProps): import("react/jsx-runtime").JSX.Element;
47
+ export declare function buildInitColorSchemeScript(options?: InitColorSchemeScriptProps): import("react/jsx-runtime").JSX.Element;
48
+ export default function InitColorSchemeScript(options?: InitColorSchemeScriptProps): import("react/jsx-runtime").JSX.Element | null;
@@ -44,4 +44,5 @@ export interface InitColorSchemeScriptProps {
44
44
  */
45
45
  nonce?: string | undefined;
46
46
  }
47
- export default function InitColorSchemeScript(options?: InitColorSchemeScriptProps): import("react/jsx-runtime").JSX.Element;
47
+ export declare function buildInitColorSchemeScript(options?: InitColorSchemeScriptProps): import("react/jsx-runtime").JSX.Element;
48
+ export default function InitColorSchemeScript(options?: InitColorSchemeScriptProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,15 +1,41 @@
1
1
  "use strict";
2
+ 'use client';
2
3
 
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
8
  exports.DEFAULT_MODE_STORAGE_KEY = exports.DEFAULT_COLOR_SCHEME_STORAGE_KEY = exports.DEFAULT_ATTRIBUTE = void 0;
9
+ exports.buildInitColorSchemeScript = buildInitColorSchemeScript;
7
10
  exports.default = InitColorSchemeScript;
11
+ var React = _interopRequireWildcard(require("react"));
8
12
  var _jsxRuntime = require("react/jsx-runtime");
9
13
  const DEFAULT_MODE_STORAGE_KEY = exports.DEFAULT_MODE_STORAGE_KEY = 'mode';
10
14
  const DEFAULT_COLOR_SCHEME_STORAGE_KEY = exports.DEFAULT_COLOR_SCHEME_STORAGE_KEY = 'color-scheme';
11
15
  const DEFAULT_ATTRIBUTE = exports.DEFAULT_ATTRIBUTE = 'data-color-scheme';
12
- function InitColorSchemeScript(options) {
16
+ // React 17 has no `useSyncExternalStore`; spread into a plain object so reading the
17
+ // missing property returns `undefined` instead of throwing under strict ESM. See #41190 (comment).
18
+ const safeReact = {
19
+ ...React
20
+ };
21
+ const maybeReactUseSyncExternalStore = safeReact.useSyncExternalStore;
22
+ const subscribe = () => () => {};
23
+
24
+ /**
25
+ * `true` during the server render and the matching hydration render, `false`
26
+ * on every client render afterwards. React warns when a `<script>` is
27
+ * created during a client render (such scripts never execute), so the inline
28
+ * script is only emitted on the server pass and dropped after hydration — the
29
+ * attribute it already set on the document persists. React <18 has no
30
+ * `useSyncExternalStore` and no such warning, so the script is always emitted.
31
+ */
32
+ function useIsServerRender() {
33
+ if (maybeReactUseSyncExternalStore === undefined) {
34
+ return true;
35
+ }
36
+ return maybeReactUseSyncExternalStore(subscribe, () => false, () => true);
37
+ }
38
+ function buildInitColorSchemeScript(options) {
13
39
  const {
14
40
  defaultMode = 'system',
15
41
  defaultLightColorScheme = 'light',
@@ -78,4 +104,11 @@ try {
78
104
  } catch(e){}})();`
79
105
  }
80
106
  }, "mui-color-scheme-init");
107
+ }
108
+ function InitColorSchemeScript(options) {
109
+ const isServerRender = useIsServerRender();
110
+ if (!isServerRender) {
111
+ return null;
112
+ }
113
+ return buildInitColorSchemeScript(options);
81
114
  }
@@ -1,8 +1,33 @@
1
+ 'use client';
2
+
3
+ import * as React from 'react';
1
4
  import { jsx as _jsx } from "react/jsx-runtime";
2
5
  export const DEFAULT_MODE_STORAGE_KEY = 'mode';
3
6
  export const DEFAULT_COLOR_SCHEME_STORAGE_KEY = 'color-scheme';
4
7
  export const DEFAULT_ATTRIBUTE = 'data-color-scheme';
5
- export default function InitColorSchemeScript(options) {
8
+ // React 17 has no `useSyncExternalStore`; spread into a plain object so reading the
9
+ // missing property returns `undefined` instead of throwing under strict ESM. See #41190 (comment).
10
+ const safeReact = {
11
+ ...React
12
+ };
13
+ const maybeReactUseSyncExternalStore = safeReact.useSyncExternalStore;
14
+ const subscribe = () => () => {};
15
+
16
+ /**
17
+ * `true` during the server render and the matching hydration render, `false`
18
+ * on every client render afterwards. React warns when a `<script>` is
19
+ * created during a client render (such scripts never execute), so the inline
20
+ * script is only emitted on the server pass and dropped after hydration — the
21
+ * attribute it already set on the document persists. React <18 has no
22
+ * `useSyncExternalStore` and no such warning, so the script is always emitted.
23
+ */
24
+ function useIsServerRender() {
25
+ if (maybeReactUseSyncExternalStore === undefined) {
26
+ return true;
27
+ }
28
+ return maybeReactUseSyncExternalStore(subscribe, () => false, () => true);
29
+ }
30
+ export function buildInitColorSchemeScript(options) {
6
31
  const {
7
32
  defaultMode = 'system',
8
33
  defaultLightColorScheme = 'light',
@@ -71,4 +96,11 @@ try {
71
96
  } catch(e){}})();`
72
97
  }
73
98
  }, "mui-color-scheme-init");
99
+ }
100
+ export default function InitColorSchemeScript(options) {
101
+ const isServerRender = useIsServerRender();
102
+ if (!isServerRender) {
103
+ return null;
104
+ }
105
+ return buildInitColorSchemeScript(options);
74
106
  }
@@ -1,4 +1,5 @@
1
- import { DefaultTheme } from '@mui/private-theming';
1
+ import * as React from 'react';
2
+ import { type DefaultTheme } from '@mui/private-theming';
2
3
  export interface ThemeProviderProps<Theme = DefaultTheme> {
3
4
  /**
4
5
  * Your component tree.
@@ -13,13 +14,15 @@ export interface ThemeProviderProps<Theme = DefaultTheme> {
13
14
  */
14
15
  theme: Partial<Theme> | ((outerTheme: Theme) => Theme);
15
16
  }
16
-
17
- // #host-reference
18
17
  /**
19
18
  * This component makes the `theme` available down the React tree.
20
19
  * It should preferably be used at **the root of your component tree**.
21
- * API:
22
20
  *
23
- * - [ThemeProvider API](https://mui.com/material-ui/customization/theming/#themeprovider)
21
+ * <ThemeProvider theme={theme}> // existing use case
22
+ * <ThemeProvider theme={{ id: theme }}> // theme scoping
24
23
  */
25
- export default function ThemeProvider<T = DefaultTheme>(props: ThemeProviderProps<T>): React.ReactElement<ThemeProviderProps<T>>;
24
+ declare function ThemeProvider<T = DefaultTheme>(props: ThemeProviderProps<T>): React.ReactElement<ThemeProviderProps<T>>;
25
+ declare namespace ThemeProvider {
26
+ var propTypes: any;
27
+ }
28
+ export default ThemeProvider;
@@ -1,4 +1,5 @@
1
- import { DefaultTheme } from '@mui/private-theming';
1
+ import * as React from 'react';
2
+ import { type DefaultTheme } from '@mui/private-theming';
2
3
  export interface ThemeProviderProps<Theme = DefaultTheme> {
3
4
  /**
4
5
  * Your component tree.
@@ -13,13 +14,15 @@ export interface ThemeProviderProps<Theme = DefaultTheme> {
13
14
  */
14
15
  theme: Partial<Theme> | ((outerTheme: Theme) => Theme);
15
16
  }
16
-
17
- // #host-reference
18
17
  /**
19
18
  * This component makes the `theme` available down the React tree.
20
19
  * It should preferably be used at **the root of your component tree**.
21
- * API:
22
20
  *
23
- * - [ThemeProvider API](https://mui.com/material-ui/customization/theming/#themeprovider)
21
+ * <ThemeProvider theme={theme}> // existing use case
22
+ * <ThemeProvider theme={{ id: theme }}> // theme scoping
24
23
  */
25
- export default function ThemeProvider<T = DefaultTheme>(props: ThemeProviderProps<T>): React.ReactElement<ThemeProviderProps<T>>;
24
+ declare function ThemeProvider<T = DefaultTheme>(props: ThemeProviderProps<T>): React.ReactElement<ThemeProviderProps<T>>;
25
+ declare namespace ThemeProvider {
26
+ var propTypes: any;
27
+ }
28
+ export default ThemeProvider;
@@ -85,7 +85,7 @@ function ThemeProvider(props) {
85
85
  process.env.NODE_ENV !== "production" ? ThemeProvider.propTypes /* remove-proptypes */ = {
86
86
  // ┌────────────────────────────── Warning ──────────────────────────────┐
87
87
  // │ These PropTypes are generated from the TypeScript type definitions. │
88
- // │ To update them, edit the d.ts file and run `pnpm proptypes`.
88
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`.
89
89
  // └─────────────────────────────────────────────────────────────────────┘
90
90
  /**
91
91
  * Your component tree.
@@ -101,6 +101,7 @@ process.env.NODE_ENV !== "production" ? ThemeProvider.propTypes /* remove-propty
101
101
  themeId: _propTypes.default.string
102
102
  } : void 0;
103
103
  if (process.env.NODE_ENV !== 'production') {
104
- process.env.NODE_ENV !== "production" ? ThemeProvider.propTypes = (0, _exactProp.default)(ThemeProvider.propTypes) : void 0;
104
+ // eslint-disable-next-line
105
+ ThemeProvider['propTypes' + ''] = (0, _exactProp.default)(ThemeProvider.propTypes);
105
106
  }
106
107
  var _default = exports.default = ThemeProvider;
@@ -78,7 +78,7 @@ function ThemeProvider(props) {
78
78
  process.env.NODE_ENV !== "production" ? ThemeProvider.propTypes /* remove-proptypes */ = {
79
79
  // ┌────────────────────────────── Warning ──────────────────────────────┐
80
80
  // │ These PropTypes are generated from the TypeScript type definitions. │
81
- // │ To update them, edit the d.ts file and run `pnpm proptypes`.
81
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`.
82
82
  // └─────────────────────────────────────────────────────────────────────┘
83
83
  /**
84
84
  * Your component tree.
@@ -94,6 +94,7 @@ process.env.NODE_ENV !== "production" ? ThemeProvider.propTypes /* remove-propty
94
94
  themeId: PropTypes.string
95
95
  } : void 0;
96
96
  if (process.env.NODE_ENV !== 'production') {
97
- process.env.NODE_ENV !== "production" ? ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) : void 0;
97
+ // eslint-disable-next-line
98
+ ThemeProvider['propTypes' + ''] = exactProp(ThemeProvider.propTypes);
98
99
  }
99
100
  export default ThemeProvider;
@@ -1,2 +1,2 @@
1
1
  export { default } from "./ThemeProvider.mjs";
2
- export * from "./ThemeProvider.mjs";
2
+ export type * from "./ThemeProvider.mjs";
@@ -1,2 +1,2 @@
1
1
  export { default } from "./ThemeProvider.js";
2
- export * from "./ThemeProvider.js";
2
+ export type * from "./ThemeProvider.js";
@@ -1,15 +1,17 @@
1
- import { PropsFor, SimpleStyleFunction } from "../style/index.mjs";
2
- export const border: SimpleStyleFunction<'border'>;
3
- export const borderTop: SimpleStyleFunction<'borderTop'>;
4
- export const borderRight: SimpleStyleFunction<'borderRight'>;
5
- export const borderBottom: SimpleStyleFunction<'borderBottom'>;
6
- export const borderLeft: SimpleStyleFunction<'borderLeft'>;
7
- export const borderColor: SimpleStyleFunction<'borderColor'>;
8
- export const borderTopColor: SimpleStyleFunction<'borderTopColor'>;
9
- export const borderRightColor: SimpleStyleFunction<'borderRightColor'>;
10
- export const borderBottomColor: SimpleStyleFunction<'borderBottomColor'>;
11
- export const borderLeftColor: SimpleStyleFunction<'borderLeftColor'>;
12
- export const borderRadius: SimpleStyleFunction<'borderRadius'>;
1
+ import type { PropsFor, SimpleStyleFunction } from "../style/index.mjs";
2
+ export declare const border: SimpleStyleFunction<"border">;
3
+ export declare const borderTop: SimpleStyleFunction<"borderTop">;
4
+ export declare const borderRight: SimpleStyleFunction<"borderRight">;
5
+ export declare const borderBottom: SimpleStyleFunction<"borderBottom">;
6
+ export declare const borderLeft: SimpleStyleFunction<"borderLeft">;
7
+ export declare const borderColor: SimpleStyleFunction<"borderColor">;
8
+ export declare const borderTopColor: SimpleStyleFunction<"borderTopColor">;
9
+ export declare const borderRightColor: SimpleStyleFunction<"borderRightColor">;
10
+ export declare const borderBottomColor: SimpleStyleFunction<"borderBottomColor">;
11
+ export declare const borderLeftColor: SimpleStyleFunction<"borderLeftColor">;
12
+ export declare const outline: SimpleStyleFunction<"outline">;
13
+ export declare const outlineColor: SimpleStyleFunction<"outlineColor">;
14
+ export declare const borderRadius: SimpleStyleFunction<'borderRadius'>;
13
15
  declare const borders: SimpleStyleFunction<'border' | 'borderTop' | 'borderRight' | 'borderBottom' | 'borderLeft' | 'borderColor' | 'borderRadius'>;
14
16
  export type BordersProps = PropsFor<typeof borders>;
15
17
  export default borders;
@@ -1,15 +1,17 @@
1
- import { PropsFor, SimpleStyleFunction } from "../style/index.js";
2
- export const border: SimpleStyleFunction<'border'>;
3
- export const borderTop: SimpleStyleFunction<'borderTop'>;
4
- export const borderRight: SimpleStyleFunction<'borderRight'>;
5
- export const borderBottom: SimpleStyleFunction<'borderBottom'>;
6
- export const borderLeft: SimpleStyleFunction<'borderLeft'>;
7
- export const borderColor: SimpleStyleFunction<'borderColor'>;
8
- export const borderTopColor: SimpleStyleFunction<'borderTopColor'>;
9
- export const borderRightColor: SimpleStyleFunction<'borderRightColor'>;
10
- export const borderBottomColor: SimpleStyleFunction<'borderBottomColor'>;
11
- export const borderLeftColor: SimpleStyleFunction<'borderLeftColor'>;
12
- export const borderRadius: SimpleStyleFunction<'borderRadius'>;
1
+ import type { PropsFor, SimpleStyleFunction } from "../style/index.js";
2
+ export declare const border: SimpleStyleFunction<"border">;
3
+ export declare const borderTop: SimpleStyleFunction<"borderTop">;
4
+ export declare const borderRight: SimpleStyleFunction<"borderRight">;
5
+ export declare const borderBottom: SimpleStyleFunction<"borderBottom">;
6
+ export declare const borderLeft: SimpleStyleFunction<"borderLeft">;
7
+ export declare const borderColor: SimpleStyleFunction<"borderColor">;
8
+ export declare const borderTopColor: SimpleStyleFunction<"borderTopColor">;
9
+ export declare const borderRightColor: SimpleStyleFunction<"borderRightColor">;
10
+ export declare const borderBottomColor: SimpleStyleFunction<"borderBottomColor">;
11
+ export declare const borderLeftColor: SimpleStyleFunction<"borderLeftColor">;
12
+ export declare const outline: SimpleStyleFunction<"outline">;
13
+ export declare const outlineColor: SimpleStyleFunction<"outlineColor">;
14
+ export declare const borderRadius: SimpleStyleFunction<'borderRadius'>;
13
15
  declare const borders: SimpleStyleFunction<'border' | 'borderTop' | 'borderRight' | 'borderBottom' | 'borderLeft' | 'borderColor' | 'borderRadius'>;
14
16
  export type BordersProps = PropsFor<typeof borders>;
15
17
  export default borders;
@@ -12,6 +12,7 @@ var _style = _interopRequireDefault(require("../style"));
12
12
  var _compose = _interopRequireDefault(require("../compose"));
13
13
  var _spacing = require("../spacing");
14
14
  var _breakpoints = require("../breakpoints");
15
+ /** @internal */
15
16
  function borderTransform(value) {
16
17
  if (typeof value !== 'number') {
17
18
  return value;
@@ -22,7 +23,7 @@ function createBorderStyle(prop, transform) {
22
23
  return (0, _style.default)({
23
24
  prop,
24
25
  themeKey: 'borders',
25
- transform
26
+ transform: transform
26
27
  });
27
28
  }
28
29
  const border = exports.border = createBorderStyle('border', borderTransform);
@@ -37,9 +38,6 @@ const borderBottomColor = exports.borderBottomColor = createBorderStyle('borderB
37
38
  const borderLeftColor = exports.borderLeftColor = createBorderStyle('borderLeftColor');
38
39
  const outline = exports.outline = createBorderStyle('outline', borderTransform);
39
40
  const outlineColor = exports.outlineColor = createBorderStyle('outlineColor');
40
-
41
- // false positive
42
- // eslint-disable-next-line react/function-component-definition
43
41
  const borderRadius = props => {
44
42
  if (props.borderRadius !== undefined && props.borderRadius !== null) {
45
43
  const transformer = (0, _spacing.createUnaryUnit)(props.theme, 'shape.borderRadius', 4, 'borderRadius');
@@ -3,6 +3,8 @@ import style from "../style/index.mjs";
3
3
  import compose from "../compose/index.mjs";
4
4
  import { createUnaryUnit, getValue } from "../spacing/index.mjs";
5
5
  import { handleBreakpoints } from "../breakpoints/index.mjs";
6
+
7
+ /** @internal */
6
8
  export function borderTransform(value) {
7
9
  if (typeof value !== 'number') {
8
10
  return value;
@@ -13,7 +15,7 @@ function createBorderStyle(prop, transform) {
13
15
  return style({
14
16
  prop,
15
17
  themeKey: 'borders',
16
- transform
18
+ transform: transform
17
19
  });
18
20
  }
19
21
  export const border = createBorderStyle('border', borderTransform);
@@ -28,9 +30,6 @@ export const borderBottomColor = createBorderStyle('borderBottomColor');
28
30
  export const borderLeftColor = createBorderStyle('borderLeftColor');
29
31
  export const outline = createBorderStyle('outline', borderTransform);
30
32
  export const outlineColor = createBorderStyle('outlineColor');
31
-
32
- // false positive
33
- // eslint-disable-next-line react/function-component-definition
34
33
  export const borderRadius = props => {
35
34
  if (props.borderRadius !== undefined && props.borderRadius !== null) {
36
35
  const transformer = createUnaryUnit(props.theme, 'shape.borderRadius', 4, 'borderRadius');