@mui/system 5.15.4 → 5.15.5
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 +98 -0
- package/colorManipulator.js +6 -5
- package/esm/colorManipulator.js +6 -5
- package/index.js +1 -1
- package/legacy/colorManipulator.js +6 -5
- package/legacy/index.js +1 -1
- package/modern/colorManipulator.js +6 -5
- package/modern/index.js +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,103 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## v5.15.5
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.15.4..master -->
|
|
6
|
+
|
|
7
|
+
_Jan 17, 2024_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 18 contributors who made this release possible. Here are some highlights ✨:
|
|
10
|
+
|
|
11
|
+
- Base UI's CSS class prefix is now `base-` (#40205) @michaldudak
|
|
12
|
+
- Bug fixes, and a lot of improvements to code and docs infra
|
|
13
|
+
|
|
14
|
+
### `@mui/material@5.15.5`
|
|
15
|
+
|
|
16
|
+
- ​<!-- 42 -->[Accordion] Deprecate \*Props props and classes for v6 (#40418) @DiegoAndai
|
|
17
|
+
- ​<!-- 41 -->[Alert] Update TypeScript types to allow color override types to be added to `iconMapping` and `severity` props (#40551) @2metres
|
|
18
|
+
- ​<!-- 27 -->[Dialog] Remove deprecated onBackdropClick from Dialog tests (#40505) @sai6855
|
|
19
|
+
- ​<!-- 26 -->[Divider] Deprecate props and classes for v6 (#40563) @sai6855
|
|
20
|
+
|
|
21
|
+
### `@mui/material-next@6.0.0-alpha.118`
|
|
22
|
+
|
|
23
|
+
- ​<!-- 36 -->[ButtonGroup] Apply MD3 style to `ButtonGroup` (#40124) @lhilgert9
|
|
24
|
+
|
|
25
|
+
### `@mui/base@5.0.0-beta.32`
|
|
26
|
+
|
|
27
|
+
#### Breaking changes
|
|
28
|
+
|
|
29
|
+
- ​<!-- 40 -->Change the CSS class prefix to `base-` (#40205) @michaldudak
|
|
30
|
+
|
|
31
|
+
The class prefix of Base UI components have been changed from `Mui-` to `base-`. This only affects codebases that uses class names verbatim, i.e. not exposed by JS objects such as `buttonClasses`, but as plain strings or in CSS stylesheets (`.MuiButton.root`)
|
|
32
|
+
|
|
33
|
+
To adapt your code to the new pattern:
|
|
34
|
+
|
|
35
|
+
- replace all occurrences of the regex `.Mui([A-Z][A-Za-z]*)-` with `.base-$1-` (so `MuiButton-root` becomes `base-Button-root`, etc.),
|
|
36
|
+
- replace all occurrences of the regex `.Mui-([a-z]*)` with `.base--$1` (so `Mui-disabled` becomes `base--disabled`, etc.).
|
|
37
|
+
|
|
38
|
+
#### Changes
|
|
39
|
+
|
|
40
|
+
- ​<!-- 39 -->[Select] Fix screen-reader CSS to avoid body scrollbar (#40599) @brijeshb42
|
|
41
|
+
- ​<!-- 38 -->[Switch] Add border-box to demos (#40638) @zanivan
|
|
42
|
+
|
|
43
|
+
### `@mui/joy@5.0.0-beta.23`
|
|
44
|
+
|
|
45
|
+
- ​<!-- 11 -->[ModalDialog] Fix ModalDialog layout prop override (#40512) @maakcode
|
|
46
|
+
- ​<!-- 10 -->[RadioGroup] Allow zero number as a value (#40344) @aacevski
|
|
47
|
+
|
|
48
|
+
### `@mui/codemod@5.15.5`
|
|
49
|
+
|
|
50
|
+
- ​<!-- 31 -->Allow `json` files to be transformed (#40536) @ZeeshanTamboli
|
|
51
|
+
|
|
52
|
+
### `@mui/lab@5.0.0-alpha.161`
|
|
53
|
+
|
|
54
|
+
- ​<!-- 09 -->Update `@mui/material` peer dependency version (#40528) @ZeeshanTamboli
|
|
55
|
+
|
|
56
|
+
### `@mui/material-nextjs@5.15.5`
|
|
57
|
+
|
|
58
|
+
- ​<!-- 08 -->Fix release script (#40519) @petrovmiroslav
|
|
59
|
+
- ​<!-- 07 -->Support Nonces in the App Router Provider (#40269) @josh-feldman
|
|
60
|
+
- ​<!-- 06 -->Polish @mui/material-nextjs (#40473) @oliviertassinari
|
|
61
|
+
|
|
62
|
+
### `@mui/system@5.15.5`
|
|
63
|
+
|
|
64
|
+
- ​<!-- 05 -->Fix import path for @mui/system in vite apps (#40490) @brijeshb42
|
|
65
|
+
- ​<!-- 02 -->Fix css vars generation and simplify the code (#40530) @siriwatknp
|
|
66
|
+
- ​<!-- 01 -->Identify zero runtime styled path (#40555) @brijeshb42
|
|
67
|
+
|
|
68
|
+
### Docs
|
|
69
|
+
|
|
70
|
+
- ​<!-- 35 -->[joy-ui][Card] Fix text alignment in horizontal aligned card demo (#40562) @ZeeshanTamboli
|
|
71
|
+
- ​<!-- 25 -->Improve instructions about peer dependencies (#40621) @danilo-leal
|
|
72
|
+
- ​<!-- 24 -->Solve page description length @oliviertassinari
|
|
73
|
+
- ​<!-- 23 -->Fix MUI Treasury links (#40561) @siriwatknp
|
|
74
|
+
- ​<!-- 17 -->[material-ui] Update <ListItem button/> to ListItemButton in demos (#40564) @sai6855
|
|
75
|
+
- ​<!-- 16 -->[material-ui] Revise the Snackbar page (#39298) @danilo-leal
|
|
76
|
+
- ​<!-- 15 -->[material-ui] Sharpen Material 3 copy on demo pages (#40546) @samuelsycamore
|
|
77
|
+
- ​<!-- 14 -->[material-ui] Fix typo on Next.js integration guide (#40538) @zanivan
|
|
78
|
+
- ​<!-- 13 -->[material-ui][Snackbar] Remove unused `State` interface from Consecutive Snackbars demo (#40410)
|
|
79
|
+
@zinoroman
|
|
80
|
+
- ​<!-- 12 -->[website] Resolve broken links reported by `docs:link-check` (#40547) @samuelsycamore
|
|
81
|
+
|
|
82
|
+
### Core
|
|
83
|
+
|
|
84
|
+
- ​<!-- 37 -->[blog] Fix 404 link to MUI Treasury @oliviertassinari
|
|
85
|
+
- ​<!-- 34 -->[code-infra] Add `run` command to deploy docs (#40513) @siriwatknp
|
|
86
|
+
- ​<!-- 32 -->[core] Update the lockfile (#40628) @michaldudak
|
|
87
|
+
- ​<!-- 31 -->[core] Remove dead code and follow standard @oliviertassinari
|
|
88
|
+
- ​<!-- 30 -->[core] Simplify server detection (#40471) @oliviertassinari
|
|
89
|
+
- ​<!-- 29 -->[core] Sync playwright cache between MUI X and Material UI (#40475) @oliviertassinari
|
|
90
|
+
- ​<!-- 28 -->[dependencies] Bump tough-cookie (#40437) @michaldudak
|
|
91
|
+
- ​<!-- 22 -->[docs-infra] Enforce brand name rules (#40525) @oliviertassinari
|
|
92
|
+
- ​<!-- 21 -->[docs-infra] Minimize ad layout shift on mobile (#40582) @oliviertassinari
|
|
93
|
+
- ​<!-- 20 -->[docs-infra] Improve API page deprecation info (#40440) @DiegoAndai
|
|
94
|
+
- ​<!-- 19 -->[docs-infra] Remove old tocs banners (#40537) @oliviertassinari
|
|
95
|
+
- ​<!-- 18 -->[docs-infra] Remove dead code aria-label sponsors (#40526) @oliviertassinari
|
|
96
|
+
- ​<!-- 04 -->[utils] Centralize clamp implementation in utils (#40267) @Kamino0
|
|
97
|
+
- ​<!-- 03 -->[website] Polish the Base UI page demos (#40504) @danilo-leal
|
|
98
|
+
|
|
99
|
+
All contributors of this release in alphabetical order: @2metres, @aacevski, @brijeshb42, @danilo-leal, @DiegoAndai, @josh-feldman, @Kamino0, @lhilgert9, @maakcode, @michaldudak, @oliviertassinari, @petrovmiroslav, @sai6855, @samuelsycamore, @siriwatknp, @zanivan, @ZeeshanTamboli, @zinoroman
|
|
100
|
+
|
|
3
101
|
## 5.15.4
|
|
4
102
|
|
|
5
103
|
<!-- generated comparing v5.15.3..master -->
|
package/colorManipulator.js
CHANGED
|
@@ -22,6 +22,7 @@ exports.private_safeLighten = private_safeLighten;
|
|
|
22
22
|
exports.recomposeColor = recomposeColor;
|
|
23
23
|
exports.rgbToHex = rgbToHex;
|
|
24
24
|
var _formatMuiErrorMessage2 = _interopRequireDefault(require("@mui/utils/formatMuiErrorMessage"));
|
|
25
|
+
var _utils = require("@mui/utils");
|
|
25
26
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
26
27
|
|
|
27
28
|
/**
|
|
@@ -31,13 +32,13 @@ var _formatMuiErrorMessage2 = _interopRequireDefault(require("@mui/utils/formatM
|
|
|
31
32
|
* @param {number} max The upper boundary of the output range
|
|
32
33
|
* @returns {number} A number in the range [min, max]
|
|
33
34
|
*/
|
|
34
|
-
function
|
|
35
|
+
function clampWrapper(value, min = 0, max = 1) {
|
|
35
36
|
if (process.env.NODE_ENV !== 'production') {
|
|
36
37
|
if (value < min || value > max) {
|
|
37
38
|
console.error(`MUI: The value provided ${value} is out of range [${min}, ${max}].`);
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
|
-
return
|
|
41
|
+
return (0, _utils.clamp)(value, min, max);
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
/**
|
|
@@ -245,7 +246,7 @@ function getContrastRatio(foreground, background) {
|
|
|
245
246
|
*/
|
|
246
247
|
function alpha(color, value) {
|
|
247
248
|
color = decomposeColor(color);
|
|
248
|
-
value =
|
|
249
|
+
value = clampWrapper(value);
|
|
249
250
|
if (color.type === 'rgb' || color.type === 'hsl') {
|
|
250
251
|
color.type += 'a';
|
|
251
252
|
}
|
|
@@ -275,7 +276,7 @@ function private_safeAlpha(color, value, warning) {
|
|
|
275
276
|
*/
|
|
276
277
|
function darken(color, coefficient) {
|
|
277
278
|
color = decomposeColor(color);
|
|
278
|
-
coefficient =
|
|
279
|
+
coefficient = clampWrapper(coefficient);
|
|
279
280
|
if (color.type.indexOf('hsl') !== -1) {
|
|
280
281
|
color.values[2] *= 1 - coefficient;
|
|
281
282
|
} else if (color.type.indexOf('rgb') !== -1 || color.type.indexOf('color') !== -1) {
|
|
@@ -304,7 +305,7 @@ function private_safeDarken(color, coefficient, warning) {
|
|
|
304
305
|
*/
|
|
305
306
|
function lighten(color, coefficient) {
|
|
306
307
|
color = decomposeColor(color);
|
|
307
|
-
coefficient =
|
|
308
|
+
coefficient = clampWrapper(coefficient);
|
|
308
309
|
if (color.type.indexOf('hsl') !== -1) {
|
|
309
310
|
color.values[2] += (100 - color.values[2]) * coefficient;
|
|
310
311
|
} else if (color.type.indexOf('rgb') !== -1) {
|
package/esm/colorManipulator.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _formatMuiErrorMessage from "@mui/utils/formatMuiErrorMessage";
|
|
2
2
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
3
|
+
import { clamp } from '@mui/utils';
|
|
3
4
|
/**
|
|
4
5
|
* Returns a number whose value is limited to the given range.
|
|
5
6
|
* @param {number} value The value to be clamped
|
|
@@ -7,13 +8,13 @@ import _formatMuiErrorMessage from "@mui/utils/formatMuiErrorMessage";
|
|
|
7
8
|
* @param {number} max The upper boundary of the output range
|
|
8
9
|
* @returns {number} A number in the range [min, max]
|
|
9
10
|
*/
|
|
10
|
-
function
|
|
11
|
+
function clampWrapper(value, min = 0, max = 1) {
|
|
11
12
|
if (process.env.NODE_ENV !== 'production') {
|
|
12
13
|
if (value < min || value > max) {
|
|
13
14
|
console.error(`MUI: The value provided ${value} is out of range [${min}, ${max}].`);
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
|
-
return
|
|
17
|
+
return clamp(value, min, max);
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
/**
|
|
@@ -219,7 +220,7 @@ export function getContrastRatio(foreground, background) {
|
|
|
219
220
|
*/
|
|
220
221
|
export function alpha(color, value) {
|
|
221
222
|
color = decomposeColor(color);
|
|
222
|
-
value =
|
|
223
|
+
value = clampWrapper(value);
|
|
223
224
|
if (color.type === 'rgb' || color.type === 'hsl') {
|
|
224
225
|
color.type += 'a';
|
|
225
226
|
}
|
|
@@ -249,7 +250,7 @@ export function private_safeAlpha(color, value, warning) {
|
|
|
249
250
|
*/
|
|
250
251
|
export function darken(color, coefficient) {
|
|
251
252
|
color = decomposeColor(color);
|
|
252
|
-
coefficient =
|
|
253
|
+
coefficient = clampWrapper(coefficient);
|
|
253
254
|
if (color.type.indexOf('hsl') !== -1) {
|
|
254
255
|
color.values[2] *= 1 - coefficient;
|
|
255
256
|
} else if (color.type.indexOf('rgb') !== -1 || color.type.indexOf('color') !== -1) {
|
|
@@ -278,7 +279,7 @@ export function private_safeDarken(color, coefficient, warning) {
|
|
|
278
279
|
*/
|
|
279
280
|
export function lighten(color, coefficient) {
|
|
280
281
|
color = decomposeColor(color);
|
|
281
|
-
coefficient =
|
|
282
|
+
coefficient = clampWrapper(coefficient);
|
|
282
283
|
if (color.type.indexOf('hsl') !== -1) {
|
|
283
284
|
color.values[2] += (100 - color.values[2]) * coefficient;
|
|
284
285
|
} else if (color.type.indexOf('rgb') !== -1) {
|
package/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _formatMuiErrorMessage from "@mui/utils/formatMuiErrorMessage";
|
|
2
2
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
3
|
+
import { clamp } from '@mui/utils';
|
|
3
4
|
/**
|
|
4
5
|
* Returns a number whose value is limited to the given range.
|
|
5
6
|
* @param {number} value The value to be clamped
|
|
@@ -7,7 +8,7 @@ import _formatMuiErrorMessage from "@mui/utils/formatMuiErrorMessage";
|
|
|
7
8
|
* @param {number} max The upper boundary of the output range
|
|
8
9
|
* @returns {number} A number in the range [min, max]
|
|
9
10
|
*/
|
|
10
|
-
function
|
|
11
|
+
function clampWrapper(value) {
|
|
11
12
|
var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
12
13
|
var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
13
14
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -15,7 +16,7 @@ function clamp(value) {
|
|
|
15
16
|
console.error("MUI: The value provided ".concat(value, " is out of range [").concat(min, ", ").concat(max, "]."));
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
|
-
return
|
|
19
|
+
return clamp(value, min, max);
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
/**
|
|
@@ -226,7 +227,7 @@ export function getContrastRatio(foreground, background) {
|
|
|
226
227
|
*/
|
|
227
228
|
export function alpha(color, value) {
|
|
228
229
|
color = decomposeColor(color);
|
|
229
|
-
value =
|
|
230
|
+
value = clampWrapper(value);
|
|
230
231
|
if (color.type === 'rgb' || color.type === 'hsl') {
|
|
231
232
|
color.type += 'a';
|
|
232
233
|
}
|
|
@@ -256,7 +257,7 @@ export function private_safeAlpha(color, value, warning) {
|
|
|
256
257
|
*/
|
|
257
258
|
export function darken(color, coefficient) {
|
|
258
259
|
color = decomposeColor(color);
|
|
259
|
-
coefficient =
|
|
260
|
+
coefficient = clampWrapper(coefficient);
|
|
260
261
|
if (color.type.indexOf('hsl') !== -1) {
|
|
261
262
|
color.values[2] *= 1 - coefficient;
|
|
262
263
|
} else if (color.type.indexOf('rgb') !== -1 || color.type.indexOf('color') !== -1) {
|
|
@@ -285,7 +286,7 @@ export function private_safeDarken(color, coefficient, warning) {
|
|
|
285
286
|
*/
|
|
286
287
|
export function lighten(color, coefficient) {
|
|
287
288
|
color = decomposeColor(color);
|
|
288
|
-
coefficient =
|
|
289
|
+
coefficient = clampWrapper(coefficient);
|
|
289
290
|
if (color.type.indexOf('hsl') !== -1) {
|
|
290
291
|
color.values[2] += (100 - color.values[2]) * coefficient;
|
|
291
292
|
} else if (color.type.indexOf('rgb') !== -1) {
|
package/legacy/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _formatMuiErrorMessage from "@mui/utils/formatMuiErrorMessage";
|
|
2
2
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
3
|
+
import { clamp } from '@mui/utils';
|
|
3
4
|
/**
|
|
4
5
|
* Returns a number whose value is limited to the given range.
|
|
5
6
|
* @param {number} value The value to be clamped
|
|
@@ -7,13 +8,13 @@ import _formatMuiErrorMessage from "@mui/utils/formatMuiErrorMessage";
|
|
|
7
8
|
* @param {number} max The upper boundary of the output range
|
|
8
9
|
* @returns {number} A number in the range [min, max]
|
|
9
10
|
*/
|
|
10
|
-
function
|
|
11
|
+
function clampWrapper(value, min = 0, max = 1) {
|
|
11
12
|
if (process.env.NODE_ENV !== 'production') {
|
|
12
13
|
if (value < min || value > max) {
|
|
13
14
|
console.error(`MUI: The value provided ${value} is out of range [${min}, ${max}].`);
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
|
-
return
|
|
17
|
+
return clamp(value, min, max);
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
/**
|
|
@@ -219,7 +220,7 @@ export function getContrastRatio(foreground, background) {
|
|
|
219
220
|
*/
|
|
220
221
|
export function alpha(color, value) {
|
|
221
222
|
color = decomposeColor(color);
|
|
222
|
-
value =
|
|
223
|
+
value = clampWrapper(value);
|
|
223
224
|
if (color.type === 'rgb' || color.type === 'hsl') {
|
|
224
225
|
color.type += 'a';
|
|
225
226
|
}
|
|
@@ -249,7 +250,7 @@ export function private_safeAlpha(color, value, warning) {
|
|
|
249
250
|
*/
|
|
250
251
|
export function darken(color, coefficient) {
|
|
251
252
|
color = decomposeColor(color);
|
|
252
|
-
coefficient =
|
|
253
|
+
coefficient = clampWrapper(coefficient);
|
|
253
254
|
if (color.type.indexOf('hsl') !== -1) {
|
|
254
255
|
color.values[2] *= 1 - coefficient;
|
|
255
256
|
} else if (color.type.indexOf('rgb') !== -1 || color.type.indexOf('color') !== -1) {
|
|
@@ -278,7 +279,7 @@ export function private_safeDarken(color, coefficient, warning) {
|
|
|
278
279
|
*/
|
|
279
280
|
export function lighten(color, coefficient) {
|
|
280
281
|
color = decomposeColor(color);
|
|
281
|
-
coefficient =
|
|
282
|
+
coefficient = clampWrapper(coefficient);
|
|
282
283
|
if (color.type.indexOf('hsl') !== -1) {
|
|
283
284
|
color.values[2] += (100 - color.values[2]) * coefficient;
|
|
284
285
|
} else if (color.type.indexOf('rgb') !== -1) {
|
package/modern/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/system",
|
|
3
|
-
"version": "5.15.
|
|
3
|
+
"version": "5.15.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "MUI System is a set of CSS utilities to help you build custom designs more efficiently. It makes it possible to rapidly lay out custom designs.",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"url": "https://opencollective.com/mui-org"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@babel/runtime": "^7.23.
|
|
29
|
+
"@babel/runtime": "^7.23.8",
|
|
30
30
|
"clsx": "^2.1.0",
|
|
31
31
|
"csstype": "^3.1.2",
|
|
32
32
|
"prop-types": "^15.8.1",
|
|
33
|
-
"@mui/private-theming": "^5.15.
|
|
33
|
+
"@mui/private-theming": "^5.15.5",
|
|
34
34
|
"@mui/types": "^7.2.13",
|
|
35
|
-
"@mui/utils": "^5.15.
|
|
36
|
-
"@mui/styled-engine": "^5.15.
|
|
35
|
+
"@mui/utils": "^5.15.5",
|
|
36
|
+
"@mui/styled-engine": "^5.15.5"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@emotion/react": "^11.5.0",
|