@mui/system 9.1.0 → 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.
- package/Box/Box.d.mts +15 -19
- package/Box/Box.d.ts +15 -19
- package/Box/Box.js +16 -1
- package/Box/Box.mjs +17 -1
- package/Box/index.js +12 -2
- package/Box/index.mjs +1 -0
- package/CHANGELOG.md +74 -0
- package/Container/index.d.mts +1 -1
- package/Container/index.d.ts +1 -1
- package/Grid/Grid.js +0 -1
- package/Grid/Grid.mjs +0 -1
- package/Grid/GridProps.d.mts +0 -1
- package/Grid/GridProps.d.ts +0 -1
- package/Grid/gridGenerator.d.mts +2 -2
- package/Grid/gridGenerator.d.ts +2 -2
- package/InitColorSchemeScript/InitColorSchemeScript.d.mts +2 -1
- package/InitColorSchemeScript/InitColorSchemeScript.d.ts +2 -1
- package/InitColorSchemeScript/InitColorSchemeScript.js +34 -1
- package/InitColorSchemeScript/InitColorSchemeScript.mjs +33 -1
- package/ThemeProvider/ThemeProvider.d.mts +9 -6
- package/ThemeProvider/ThemeProvider.d.ts +9 -6
- package/ThemeProvider/ThemeProvider.js +3 -2
- package/ThemeProvider/ThemeProvider.mjs +3 -2
- package/ThemeProvider/index.d.mts +1 -1
- package/ThemeProvider/index.d.ts +1 -1
- package/borders/borders.d.mts +14 -12
- package/borders/borders.d.ts +14 -12
- package/borders/borders.js +2 -4
- package/borders/borders.mjs +3 -4
- package/breakpoints/breakpoints.d.mts +13 -16
- package/breakpoints/breakpoints.d.ts +13 -16
- package/breakpoints/breakpoints.js +17 -16
- package/breakpoints/breakpoints.mjs +17 -16
- package/compose/compose.d.mts +3 -10
- package/compose/compose.d.ts +3 -10
- package/compose/compose.js +0 -2
- package/compose/compose.mjs +0 -2
- package/createBox/createBox.d.mts +4 -4
- package/createBox/createBox.d.ts +4 -4
- package/createBreakpoints/createBreakpoints.d.mts +3 -54
- package/createBreakpoints/createBreakpoints.d.ts +3 -54
- package/createBreakpoints/createBreakpoints.js +6 -8
- package/createBreakpoints/createBreakpoints.mjs +6 -8
- package/createBreakpoints/index.d.mts +0 -1
- package/createBreakpoints/index.d.ts +0 -1
- package/createTheme/createSpacing.d.mts +1 -1
- package/createTheme/createSpacing.d.ts +1 -1
- package/createTheme/shape.d.mts +2 -2
- package/createTheme/shape.d.ts +2 -2
- package/cssGrid/cssGrid.d.mts +13 -13
- package/cssGrid/cssGrid.d.ts +13 -13
- package/cssGrid/cssGrid.js +0 -8
- package/cssGrid/cssGrid.mjs +0 -9
- package/cssVars/createCssVarsProvider.js +2 -2
- package/cssVars/createCssVarsProvider.mjs +2 -2
- package/cssVars/cssVarsParser.d.mts +1 -1
- package/cssVars/cssVarsParser.d.ts +1 -1
- package/cssVars/useCurrentColorScheme.js +1 -0
- package/cssVars/useCurrentColorScheme.mjs +1 -0
- package/display/display.d.mts +49 -1
- package/display/display.d.ts +49 -1
- package/display/display.js +2 -1
- package/display/display.mjs +2 -1
- package/flexbox/flexbox.d.mts +14 -14
- package/flexbox/flexbox.d.ts +14 -14
- package/getThemeValue/getThemeValue.d.mts +2 -1
- package/getThemeValue/getThemeValue.d.ts +2 -1
- package/getThemeValue/getThemeValue.js +6 -2
- package/getThemeValue/getThemeValue.mjs +7 -3
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/memoTheme.d.mts +1 -1
- package/memoTheme.d.ts +1 -1
- package/memoize/memoize.d.mts +1 -1
- package/memoize/memoize.d.ts +1 -1
- package/package.json +61 -61
- package/palette/palette.d.mts +4 -3
- package/palette/palette.d.ts +4 -3
- package/palette/palette.js +1 -0
- package/palette/palette.mjs +2 -0
- package/positions/positions.d.mts +49 -1
- package/positions/positions.d.ts +49 -1
- package/positions/positions.js +2 -1
- package/positions/positions.mjs +2 -1
- package/propsToClassKey/propsToClassKey.d.mts +5 -0
- package/propsToClassKey/propsToClassKey.d.ts +5 -0
- package/propsToClassKey/propsToClassKey.js +1 -1
- package/propsToClassKey/propsToClassKey.mjs +1 -1
- package/shadows/shadows.d.mts +4 -4
- package/shadows/shadows.d.ts +4 -4
- package/sizing/sizing.d.mts +10 -10
- package/sizing/sizing.d.ts +10 -10
- package/sizing/sizing.js +7 -2
- package/sizing/sizing.mjs +5 -1
- package/spacing/spacing.d.mts +10 -14
- package/spacing/spacing.d.ts +10 -14
- package/spacing/spacing.js +17 -13
- package/spacing/spacing.mjs +16 -9
- package/styleFunctionSx/defaultSxConfig.d.mts +1 -1
- package/styleFunctionSx/defaultSxConfig.d.ts +1 -1
- package/styleFunctionSx/extendSxProp.d.mts +4 -2
- package/styleFunctionSx/extendSxProp.d.ts +4 -2
- package/styled/styled.d.mts +1 -1
- package/styled/styled.d.ts +1 -1
- package/typography/typography.d.mts +10 -10
- package/typography/typography.d.ts +10 -10
- package/useTheme/useTheme.d.mts +4 -2
- package/useTheme/useTheme.d.ts +4 -2
- package/useThemeProps/getThemeProps.d.mts +2 -2
- package/useThemeProps/getThemeProps.d.ts +2 -2
- package/useThemeProps/index.d.mts +1 -1
- package/useThemeProps/index.d.ts +1 -1
- package/useThemeProps/useThemeProps.js +7 -6
- package/useThemeProps/useThemeProps.mjs +7 -6
- package/useThemeWithoutDefault/useThemeWithoutDefault.d.mts +2 -1
- package/useThemeWithoutDefault/useThemeWithoutDefault.d.ts +2 -1
- package/useThemeWithoutDefault/useThemeWithoutDefault.js +2 -2
- package/useThemeWithoutDefault/useThemeWithoutDefault.mjs +2 -2
- package/version/index.js +2 -2
- 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 {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
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 {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
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
|
-
// │
|
|
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
|
-
// │
|
|
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 =
|
|
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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,79 @@
|
|
|
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
|
+
|
|
39
|
+
## 9.1.1
|
|
40
|
+
|
|
41
|
+
<!-- generated comparing v9.1.0..master -->
|
|
42
|
+
|
|
43
|
+
_Jun 11, 2026_
|
|
44
|
+
|
|
45
|
+
A big thanks to the 9 contributors who made this release possible.
|
|
46
|
+
|
|
47
|
+
### `@mui/material@9.1.1`
|
|
48
|
+
|
|
49
|
+
- [Autocomplete] Update fullWidth prop documentation (#48626) @vipin8797
|
|
50
|
+
- [ButtonBase] Fix focus ripple lingering after blur (#48650) @siriwatknp
|
|
51
|
+
- [InitColorSchemeScript] Server-render in tests for React 19.3 (#48604) @Janpot
|
|
52
|
+
- [Transition] Mount child in same commit when opening from unmounted (#48649) @siriwatknp
|
|
53
|
+
|
|
54
|
+
### `@mui/styled-engine@9.1.1`
|
|
55
|
+
|
|
56
|
+
- [styled-engine] Prevent enableCssLayer styles from being overridden by unlayered styles (#48603) @Janpot
|
|
57
|
+
|
|
58
|
+
### Docs
|
|
59
|
+
|
|
60
|
+
- Send SOURCE to Brevo on newsletter subscribe (#48633) @aemartos
|
|
61
|
+
- fix TypeScript heading capitalization (#48619) @ifer47
|
|
62
|
+
- Remove outdated security section (#48628) @oliviertassinari
|
|
63
|
+
- [legal] Update EULA links on website (#48642) @rluzists1
|
|
64
|
+
|
|
65
|
+
### Core
|
|
66
|
+
|
|
67
|
+
- Update dependencies to resolve Dependabot security alerts (#48641) @Janpot
|
|
68
|
+
- [core-docs] Pin StackBlitz demo vite to v7 and plugin-react to v5 (#48643) @Janpot
|
|
69
|
+
- [code-infra] Port codebase to use tsgo (#48616) @brijeshb42
|
|
70
|
+
- [docs-infra] Fix immutable cache headers for /\_next/static assets (#48655) @brijeshb42
|
|
71
|
+
- [docs-infra] Run link checker during docs build instead of as separate CI step (#48634) @Janpot
|
|
72
|
+
- [docs-infra] Support turbopack for docs (#48569) @brijeshb42
|
|
73
|
+
- [test] Cover docs landing-page composites with Argos (#48589) @LukasTy
|
|
74
|
+
|
|
75
|
+
All contributors of this release in alphabetical order: @aemartos, @brijeshb42, @ifer47, @Janpot, @LukasTy, @oliviertassinari, @rluzists1, @siriwatknp, @vipin8797
|
|
76
|
+
|
|
3
77
|
## 9.1.0
|
|
4
78
|
|
|
5
79
|
<!-- generated comparing v9.0.1..master -->
|
package/Container/index.d.mts
CHANGED
package/Container/index.d.ts
CHANGED
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.
|
package/Grid/GridProps.d.mts
CHANGED
|
@@ -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.
|
package/Grid/GridProps.d.ts
CHANGED
|
@@ -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.
|
package/Grid/gridGenerator.d.mts
CHANGED
|
@@ -36,7 +36,7 @@ export declare const generateGridDirectionStyles: ({
|
|
|
36
36
|
export declare const generateGridStyles: ({
|
|
37
37
|
ownerState
|
|
38
38
|
}: Props) => {};
|
|
39
|
-
export declare const generateSizeClassNames: (size: GridOwnerState[
|
|
40
|
-
export declare const generateSpacingClassNames: (spacing: GridOwnerState[
|
|
39
|
+
export declare const generateSizeClassNames: (size: GridOwnerState['size']) => string[];
|
|
40
|
+
export declare const generateSpacingClassNames: (spacing: GridOwnerState['spacing'], smallestBreakpoint?: string) => string[];
|
|
41
41
|
export declare const generateDirectionClasses: (direction: ResponsiveStyleValue<GridDirection> | undefined) => string[];
|
|
42
42
|
export {};
|
package/Grid/gridGenerator.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export declare const generateGridDirectionStyles: ({
|
|
|
36
36
|
export declare const generateGridStyles: ({
|
|
37
37
|
ownerState
|
|
38
38
|
}: Props) => {};
|
|
39
|
-
export declare const generateSizeClassNames: (size: GridOwnerState[
|
|
40
|
-
export declare const generateSpacingClassNames: (spacing: GridOwnerState[
|
|
39
|
+
export declare const generateSizeClassNames: (size: GridOwnerState['size']) => string[];
|
|
40
|
+
export declare const generateSpacingClassNames: (spacing: GridOwnerState['spacing'], smallestBreakpoint?: string) => string[];
|
|
41
41
|
export declare const generateDirectionClasses: (direction: ResponsiveStyleValue<GridDirection> | undefined) => string[];
|
|
42
42
|
export {};
|
|
@@ -44,4 +44,5 @@ export interface InitColorSchemeScriptProps {
|
|
|
44
44
|
*/
|
|
45
45
|
nonce?: string | undefined;
|
|
46
46
|
}
|
|
47
|
-
export
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
*
|
|
21
|
+
* <ThemeProvider theme={theme}> // existing use case
|
|
22
|
+
* <ThemeProvider theme={{ id: theme }}> // theme scoping
|
|
24
23
|
*/
|
|
25
|
-
|
|
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
|
|
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
|
-
*
|
|
21
|
+
* <ThemeProvider theme={theme}> // existing use case
|
|
22
|
+
* <ThemeProvider theme={{ id: theme }}> // theme scoping
|
|
24
23
|
*/
|
|
25
|
-
|
|
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
|
-
// │
|
|
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
|
-
|
|
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
|
-
// │
|
|
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
|
-
|
|
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";
|
package/ThemeProvider/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default } from "./ThemeProvider.js";
|
|
2
|
-
export * from "./ThemeProvider.js";
|
|
2
|
+
export type * from "./ThemeProvider.js";
|
package/borders/borders.d.mts
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { PropsFor, SimpleStyleFunction } from "../style/index.mjs";
|
|
2
|
-
export const border: SimpleStyleFunction<
|
|
3
|
-
export const borderTop: SimpleStyleFunction<
|
|
4
|
-
export const borderRight: SimpleStyleFunction<
|
|
5
|
-
export const borderBottom: SimpleStyleFunction<
|
|
6
|
-
export const borderLeft: SimpleStyleFunction<
|
|
7
|
-
export const borderColor: SimpleStyleFunction<
|
|
8
|
-
export const borderTopColor: SimpleStyleFunction<
|
|
9
|
-
export const borderRightColor: SimpleStyleFunction<
|
|
10
|
-
export const borderBottomColor: SimpleStyleFunction<
|
|
11
|
-
export const borderLeftColor: SimpleStyleFunction<
|
|
12
|
-
export const
|
|
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;
|