@mui/private-theming 7.0.1 → 7.0.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/CHANGELOG.md +60 -0
- package/esm/index.js +1 -1
- package/index.js +1 -1
- package/package.json +3 -11
- package/modern/ThemeProvider/ThemeProvider.js +0 -69
- package/modern/ThemeProvider/index.js +0 -2
- package/modern/ThemeProvider/nested.js +0 -2
- package/modern/defaultTheme/index.js +0 -1
- package/modern/index.js +0 -10
- package/modern/package.json +0 -1
- package/modern/useTheme/ThemeContext.js +0 -8
- package/modern/useTheme/index.js +0 -1
- package/modern/useTheme/useTheme.js +0 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,65 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 7.0.2
|
|
4
|
+
|
|
5
|
+
_Apr 9, 2025_
|
|
6
|
+
|
|
7
|
+
A big thanks to the 12 contributors who made this release possible.
|
|
8
|
+
|
|
9
|
+
### `@mui/material@7.0.2`
|
|
10
|
+
|
|
11
|
+
- [Autocomplete] Add ability to render custom single value (#45387) @ZeeshanTamboli
|
|
12
|
+
- [Autocomplete] Prevent shrink animation in controlled Autocomplete when initial `value` is provided (#45734) @imadx
|
|
13
|
+
- [AvatarGroup] Fix `spacing` prop ignoring value `0` (#45799) @Kartik-Murthy
|
|
14
|
+
- [Dialog] Deprecate composed classes (#45418) @sai6855
|
|
15
|
+
|
|
16
|
+
### `@mui/material-nextjs@7.0.2`
|
|
17
|
+
|
|
18
|
+
- Fix nonce issues (#45794) @Janpot
|
|
19
|
+
- Add warnings to nextjs router integration (#45778) @Janpot
|
|
20
|
+
|
|
21
|
+
### `@mui/styled-engine@7.0.2`
|
|
22
|
+
|
|
23
|
+
- Added caching to `StyledEngineProvider` to improve performance for running tests with Jest (#45846) @siriwatknp
|
|
24
|
+
|
|
25
|
+
### Core
|
|
26
|
+
|
|
27
|
+
- [blog] Improve upvote video (0646444) @oliviertassinari
|
|
28
|
+
- [code-infra] Remove webpack aliases (#45841) @Janpot
|
|
29
|
+
- [code-infra] Remove .tsbuildinfo from build folder (#45727) @Janpot
|
|
30
|
+
- [code-infra] Stabilize theme viewer screenshot tests (#45768) @Janpot
|
|
31
|
+
- [code-infra] Remove modern bundles (#45808) @Janpot
|
|
32
|
+
- Update buildTypes script to optionally remove css imports (#45835) @brijeshb42
|
|
33
|
+
- Allow repo to be accepted as an argument for releaseTag (#45801) @brijeshb42
|
|
34
|
+
- Update scripts to support base-ui (#45784) @brijeshb42
|
|
35
|
+
- Sync scorecards.yml across codebase (4de5076) @oliviertassinari
|
|
36
|
+
- Remove baseUrl and skipLibCheck (#45806) @Janpot
|
|
37
|
+
- [docs-infra] Fix redirect styles pages (#45848) @siriwatknp
|
|
38
|
+
- [docs-infra] Remove false-positive Vale rules (#45843) @oliviertassinari
|
|
39
|
+
- [docs-infra] Make sure Next.js can find package.json through its aliases (#45840) @Janpot
|
|
40
|
+
- [docs-infra] Fix Next.js brand name coverage (6915f8d) @oliviertassinari
|
|
41
|
+
- [docs-infra] Fix layout shift between MIT and commercial pages (#45760) @oliviertassinari
|
|
42
|
+
- [docs-infra] Non breaking space for ESM (#45758) @oliviertassinari
|
|
43
|
+
- [support-infra] Remove dead 'workflow_call:' (#45736) @oliviertassinari
|
|
44
|
+
- [utils] Support cleanup callbacks in useForkRef (#45621) @DiegoAndai
|
|
45
|
+
|
|
46
|
+
### Docs
|
|
47
|
+
|
|
48
|
+
- Fix pigment vite integration example (#44746) @brijeshb42
|
|
49
|
+
- Update migration instructions and codemod references for deprecated APIs (#45793) @sai6855
|
|
50
|
+
- Add TanStack Router routing example (#44930) @vetledv
|
|
51
|
+
- Fix layout shifting in icons page (#45779) @sai6855
|
|
52
|
+
- Fix migration instructions (#45762) @oliviertassinari
|
|
53
|
+
- Fix wrong TypeScript support version (#45761) @oliviertassinari
|
|
54
|
+
- Fix link to mui-joy/src/styles/components.d.ts (#45763) @oliviertassinari
|
|
55
|
+
- Fix 301 link (ae94c40) @oliviertassinari
|
|
56
|
+
- Fix 301 links (abd8f63) @oliviertassinari
|
|
57
|
+
- Fix 301 redirection (c7658de) @oliviertassinari
|
|
58
|
+
- [nextjs] Migrate from deprecated "legacyBehavior" prop (#44871) @oliviertassinari
|
|
59
|
+
- [nextjs] Document CSP for Next.js Pages Router (#45798) @Grohden
|
|
60
|
+
|
|
61
|
+
All contributors of this release in alphabetical order: @brijeshb42, @DiegoAndai, @Grohden, @imadx, @Janpot, @Kartik-Murthy, @oliviertassinari, @renovate[bot], @sai6855, @siriwatknp, @vetledv, @ZeeshanTamboli
|
|
62
|
+
|
|
3
63
|
## 7.0.1
|
|
4
64
|
|
|
5
65
|
<!-- generated comparing v7.0.0..master -->
|
package/esm/index.js
CHANGED
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/private-theming",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "Private - The React theme context to be shared between `@mui/styles` and `@mui/material`.",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"url": "https://opencollective.com/mui-org"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@babel/runtime": "^7.
|
|
29
|
+
"@babel/runtime": "^7.27.0",
|
|
30
30
|
"prop-types": "^15.8.1",
|
|
31
|
-
"@mui/utils": "^7.0.
|
|
31
|
+
"@mui/utils": "^7.0.2"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
@@ -58,10 +58,6 @@
|
|
|
58
58
|
"import": {
|
|
59
59
|
"types": "./esm/index.d.ts",
|
|
60
60
|
"default": "./esm/index.js"
|
|
61
|
-
},
|
|
62
|
-
"mui-modern": {
|
|
63
|
-
"types": "./modern/index.d.ts",
|
|
64
|
-
"default": "./modern/index.js"
|
|
65
61
|
}
|
|
66
62
|
},
|
|
67
63
|
"./*": {
|
|
@@ -72,10 +68,6 @@
|
|
|
72
68
|
"import": {
|
|
73
69
|
"types": "./esm/*/index.d.ts",
|
|
74
70
|
"default": "./esm/*/index.js"
|
|
75
|
-
},
|
|
76
|
-
"mui-modern": {
|
|
77
|
-
"types": "./modern/*/index.d.ts",
|
|
78
|
-
"default": "./modern/*/index.js"
|
|
79
71
|
}
|
|
80
72
|
},
|
|
81
73
|
"./esm": null,
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { exactProp } from '@mui/utils';
|
|
4
|
-
import ThemeContext from "../useTheme/ThemeContext.js";
|
|
5
|
-
import useTheme from "../useTheme/index.js";
|
|
6
|
-
import nested from "./nested.js";
|
|
7
|
-
|
|
8
|
-
// To support composition of theme.
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
function mergeOuterLocalTheme(outerTheme, localTheme) {
|
|
11
|
-
if (typeof localTheme === 'function') {
|
|
12
|
-
const mergedTheme = localTheme(outerTheme);
|
|
13
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
-
if (!mergedTheme) {
|
|
15
|
-
console.error(['MUI: You should return an object from your theme function, i.e.', '<ThemeProvider theme={() => ({})} />'].join('\n'));
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
return mergedTheme;
|
|
19
|
-
}
|
|
20
|
-
return {
|
|
21
|
-
...outerTheme,
|
|
22
|
-
...localTheme
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* This component takes a `theme` prop.
|
|
28
|
-
* It makes the `theme` available down the React tree thanks to React context.
|
|
29
|
-
* This component should preferably be used at **the root of your component tree**.
|
|
30
|
-
*/
|
|
31
|
-
function ThemeProvider(props) {
|
|
32
|
-
const {
|
|
33
|
-
children,
|
|
34
|
-
theme: localTheme
|
|
35
|
-
} = props;
|
|
36
|
-
const outerTheme = useTheme();
|
|
37
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
38
|
-
if (outerTheme === null && typeof localTheme === 'function') {
|
|
39
|
-
console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', '<ThemeProvider theme={outerTheme => outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\n'));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
const theme = React.useMemo(() => {
|
|
43
|
-
const output = outerTheme === null ? {
|
|
44
|
-
...localTheme
|
|
45
|
-
} : mergeOuterLocalTheme(outerTheme, localTheme);
|
|
46
|
-
if (output != null) {
|
|
47
|
-
output[nested] = outerTheme !== null;
|
|
48
|
-
}
|
|
49
|
-
return output;
|
|
50
|
-
}, [localTheme, outerTheme]);
|
|
51
|
-
return /*#__PURE__*/_jsx(ThemeContext.Provider, {
|
|
52
|
-
value: theme,
|
|
53
|
-
children: children
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
process.env.NODE_ENV !== "production" ? ThemeProvider.propTypes = {
|
|
57
|
-
/**
|
|
58
|
-
* Your component tree.
|
|
59
|
-
*/
|
|
60
|
-
children: PropTypes.node,
|
|
61
|
-
/**
|
|
62
|
-
* A theme object. You can provide a function to extend the outer theme.
|
|
63
|
-
*/
|
|
64
|
-
theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired
|
|
65
|
-
} : void 0;
|
|
66
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
67
|
-
process.env.NODE_ENV !== "production" ? ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) : void 0;
|
|
68
|
-
}
|
|
69
|
-
export default ThemeProvider;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/modern/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @mui/private-theming v7.0.1
|
|
3
|
-
*
|
|
4
|
-
* @license MIT
|
|
5
|
-
* This source code is licensed under the MIT license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/
|
|
8
|
-
export { default as ThemeProvider } from "./ThemeProvider/index.js";
|
|
9
|
-
export * from "./ThemeProvider/index.js";
|
|
10
|
-
export { default as useTheme } from "./useTheme/index.js";
|
package/modern/package.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type":"module","sideEffects":false}
|
package/modern/useTheme/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./useTheme.js";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import ThemeContext from "./ThemeContext.js";
|
|
3
|
-
export default function useTheme() {
|
|
4
|
-
const theme = React.useContext(ThemeContext);
|
|
5
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
6
|
-
// TODO: uncomment once we enable eslint-plugin-react-compiler eslint-disable-next-line react-compiler/react-compiler
|
|
7
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks -- It's not required to run React.useDebugValue in production
|
|
8
|
-
React.useDebugValue(theme);
|
|
9
|
-
}
|
|
10
|
-
return theme;
|
|
11
|
-
}
|