@mui/utils 7.0.0-beta.4 → 7.0.0-rc.0
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 +24 -0
- package/capitalize/capitalize.js +2 -2
- package/esm/capitalize/capitalize.js +2 -2
- package/esm/index.js +1 -1
- package/index.js +1 -1
- package/modern/capitalize/capitalize.js +2 -2
- package/modern/index.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 7.0.0-rc.0
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v7.0.0-beta.4..master -->
|
|
6
|
+
|
|
7
|
+
_Mar 18, 2025_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 4 contributors who made this release possible.
|
|
10
|
+
|
|
11
|
+
### `@mui/material@7.0.0-rc.0`
|
|
12
|
+
|
|
13
|
+
- [StepLabel] Add missing root slot (#45603) @sai6855
|
|
14
|
+
- [Switch] Add slots and slotProps (#45595) @siriwatknp
|
|
15
|
+
- [utils] Add merging function to `mergeSlotProps` utility (#45543) @siriwatknp
|
|
16
|
+
|
|
17
|
+
### Core
|
|
18
|
+
|
|
19
|
+
- [blog] Clarify the difference between the two Pro plans (#45266) @oliviertassinari
|
|
20
|
+
- [code-infra] Allow specifying a custom error formatter module for error minifcation (#45291) @Janpot
|
|
21
|
+
- [code-infra] Make `getVersionEnvVariables` reusable for other repos (#45562) @Janpot
|
|
22
|
+
- [code-infra] Update peer dependency of `@mui/utils` in `@mui/docs` (#45561) @Janpot
|
|
23
|
+
- Add StackBlitz template to issue template (#45504) @Janpot
|
|
24
|
+
|
|
25
|
+
All contributors of this release in alphabetical order: @Janpot, @oliviertassinari, @sai6855, @siriwatknp
|
|
26
|
+
|
|
3
27
|
## 7.0.0-beta.4
|
|
4
28
|
|
|
5
29
|
<!-- generated comparing v7.0.0-beta.3..master -->
|
package/capitalize/capitalize.js
CHANGED
|
@@ -5,14 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = capitalize;
|
|
8
|
-
var
|
|
8
|
+
var _formatMuiErrorMessage = _interopRequireDefault(require("@mui/utils/formatMuiErrorMessage"));
|
|
9
9
|
// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.
|
|
10
10
|
//
|
|
11
11
|
// A strict capitalization should uppercase the first letter of each word in the sentence.
|
|
12
12
|
// We only handle the first word.
|
|
13
13
|
function capitalize(string) {
|
|
14
14
|
if (typeof string !== 'string') {
|
|
15
|
-
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `capitalize(string)` expects a string argument.' : (0,
|
|
15
|
+
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `capitalize(string)` expects a string argument.' : (0, _formatMuiErrorMessage.default)(7));
|
|
16
16
|
}
|
|
17
17
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
18
18
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _formatErrorMessage from "@mui/utils/formatMuiErrorMessage";
|
|
2
2
|
// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.
|
|
3
3
|
//
|
|
4
4
|
// A strict capitalization should uppercase the first letter of each word in the sentence.
|
|
5
5
|
// We only handle the first word.
|
|
6
6
|
export default function capitalize(string) {
|
|
7
7
|
if (typeof string !== 'string') {
|
|
8
|
-
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `capitalize(string)` expects a string argument.' :
|
|
8
|
+
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `capitalize(string)` expects a string argument.' : _formatErrorMessage(7));
|
|
9
9
|
}
|
|
10
10
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
11
11
|
}
|
package/esm/index.js
CHANGED
package/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _formatErrorMessage from "@mui/utils/formatMuiErrorMessage";
|
|
2
2
|
// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.
|
|
3
3
|
//
|
|
4
4
|
// A strict capitalization should uppercase the first letter of each word in the sentence.
|
|
5
5
|
// We only handle the first word.
|
|
6
6
|
export default function capitalize(string) {
|
|
7
7
|
if (typeof string !== 'string') {
|
|
8
|
-
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `capitalize(string)` expects a string argument.' :
|
|
8
|
+
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `capitalize(string)` expects a string argument.' : _formatErrorMessage(7));
|
|
9
9
|
}
|
|
10
10
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
11
11
|
}
|
package/modern/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/utils",
|
|
3
|
-
"version": "7.0.0-
|
|
3
|
+
"version": "7.0.0-rc.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "Utility functions for React components.",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"url": "https://opencollective.com/mui-org"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@babel/runtime": "^7.26.
|
|
29
|
+
"@babel/runtime": "^7.26.10",
|
|
30
30
|
"@types/prop-types": "^15.7.14",
|
|
31
31
|
"clsx": "^2.1.1",
|
|
32
32
|
"prop-types": "^15.8.1",
|
|
33
33
|
"react-is": "^19.0.0",
|
|
34
|
-
"@mui/types": "^7.3.
|
|
34
|
+
"@mui/types": "^7.3.1"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|