@mui/system 5.15.0 → 5.15.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 +104 -0
- package/README.md +1 -1
- package/colorManipulator.js +4 -3
- package/createStyled.js +27 -7
- package/cssVars/createCssVarsProvider.js +3 -2
- package/esm/colorManipulator.js +1 -1
- package/esm/createStyled.js +27 -7
- package/esm/cssVars/createCssVarsProvider.js +1 -1
- package/esm/index.js +1 -1
- package/index.js +3 -3
- package/legacy/colorManipulator.js +1 -1
- package/legacy/createStyled.js +27 -7
- package/legacy/cssVars/createCssVarsProvider.js +1 -1
- package/legacy/index.js +2 -2
- package/modern/colorManipulator.js +1 -1
- package/modern/createStyled.js +27 -7
- package/modern/cssVars/createCssVarsProvider.js +1 -1
- package/modern/index.js +2 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,109 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 5.15.2
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.15.1..master -->
|
|
6
|
+
|
|
7
|
+
_Dec 25, 2023_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
|
|
10
|
+
|
|
11
|
+
- 🚀 Added support for callbacks in the [variant's props definition](https://mui.com/material-ui/customization/theme-components/#creating-new-component-variants) (#40094) @mnajdova
|
|
12
|
+
- 💫 Published a [blogpost](https://mui.com/blog/2023-material-ui-v6-and-beyond/) for the 2024's plan about Material UI
|
|
13
|
+
|
|
14
|
+
### `@mui/material@5.15.1`
|
|
15
|
+
|
|
16
|
+
- ​<!-- 31 -->[Badge] Use the variants API in the styled call (#40213) @mnajdova
|
|
17
|
+
- ​<!-- 04 -->[Paper] Add missing Paper classes descriptions (#40300) @sai6855
|
|
18
|
+
|
|
19
|
+
### `@mui/system@5.15.1`
|
|
20
|
+
|
|
21
|
+
- ​<!-- 03 -->Support props callback in the variant's definition (#40094) @mnajdova
|
|
22
|
+
|
|
23
|
+
### `@mui/base@5.0.0-beta.29`
|
|
24
|
+
|
|
25
|
+
- ​<!-- 29 -->[Popup] Use context-based transition API (#39326) @michaldudak
|
|
26
|
+
- ​<!-- 28 -->[Popup] Popup no longer opens outside viewport (#39827) @adamhylander
|
|
27
|
+
- ​<!-- 27 -->[useSelect] Refactor to use DOM focus management instead of active descendant (#39675) @DiegoAndai
|
|
28
|
+
|
|
29
|
+
### `@mui/material-next@6.0.0-alpha.115`
|
|
30
|
+
|
|
31
|
+
- ​<!-- 15 -->[material-next][Divider]Divider ts support (#40307) @sai6855
|
|
32
|
+
|
|
33
|
+
### Docs
|
|
34
|
+
|
|
35
|
+
- ​<!-- 30 -->[base-ui] Fix form submission Select demo (#40014) @ZeeshanTamboli
|
|
36
|
+
- ​<!-- 24 -->[blog] Add Material UI v6 and beyond blog post (#40242) @mnajdova
|
|
37
|
+
- ​<!-- 10 -->[material-ui] Fix broken links in the All components page (#40303) @muazaqdas
|
|
38
|
+
- ​<!-- 09 -->[material-ui] Fix broken links on the All components page (#40279) @danilo-leal
|
|
39
|
+
- ​<!-- 08 -->[material-ui] Add aria-current for nav tabs demo (#39594) @Kimzify
|
|
40
|
+
- ​<!-- 07 -->[material-ui] Add an "All components" page (#40256) @danilo-leal
|
|
41
|
+
- ​<!-- 06 -->[material-ui][Tooltip] Add demo to show how to change distance between tooltip and its anchor (#40087) @anle9650
|
|
42
|
+
|
|
43
|
+
### Core
|
|
44
|
+
|
|
45
|
+
- ​<!-- 26 -->[blog] Fix 301 redirection @oliviertassinari
|
|
46
|
+
- ​<!-- 25 -->[blog] Reduce max image size @oliviertassinari
|
|
47
|
+
- ​<!-- 23 -->[code-infra] Extract Babel macro from mui-utils (#40262) @michaldudak
|
|
48
|
+
- ​<!-- 22 -->[core] Simplify a bit the release instructions @oliviertassinari
|
|
49
|
+
- ​<!-- 21 -->[core] Push force to deploy is not unexpected @oliviertassinari
|
|
50
|
+
- ​<!-- 20 -->[core] Fix CSS2 vs. CSS3 ::after syntax @oliviertassinari
|
|
51
|
+
- ​<!-- 19 -->[core] Fix CSS2 vs. CSS3 ::before syntax @oliviertassinari
|
|
52
|
+
- ​<!-- 05 -->[core] Use direct import from utils package (#40254) @siriwatknp
|
|
53
|
+
- ​<!-- 18 -->[core] Yaml format match most common convention @oliviertassinari
|
|
54
|
+
- ​<!-- 17 -->[core] Polish docs-feedback issue template @oliviertassinari
|
|
55
|
+
- ​<!-- 16 -->[core] Pin Node version on GitHub Actions to 18.18 (#40187) @michaldudak
|
|
56
|
+
- ​<!-- 14 -->[docs] Fix SEO regression (#40306) @oliviertassinari
|
|
57
|
+
- ​<!-- 13 -->[docs] Fix docs redirections @oliviertassinari
|
|
58
|
+
- ​<!-- 12 -->[docs] Update the Contributing guide to give more guidance on documentation (#40274) @samuelsycamore
|
|
59
|
+
- ​<!-- 11 -->[docs-infra] Add polish to the inline code block (#40260) @danilo-leal
|
|
60
|
+
- ​<!-- 02 -->[website] Update Gold sponsors: add RxDB, standardize formatting (#40273) @samuelsycamore
|
|
61
|
+
- ​<!-- 01 -->[website] Revert change to homepage SEO attributes @oliviertassinari
|
|
62
|
+
|
|
63
|
+
All contributors of this release in alphabetical order: @adamhylander, @anle9650, @danilo-leal, @DiegoAndai, @Kimzify, @michaldudak, @mnajdova, @muazaqdas, @oliviertassinari, @sai6855, @samuelsycamore, @siriwatknp, @ZeeshanTamboli
|
|
64
|
+
|
|
65
|
+
## 5.15.1
|
|
66
|
+
|
|
67
|
+
<!-- generated comparing v5.15.0..master -->
|
|
68
|
+
|
|
69
|
+
_Dec 19, 2023_
|
|
70
|
+
|
|
71
|
+
A big thanks to the 15 contributors who made this release possible.
|
|
72
|
+
This release was mostly about 🐛 bug fixes and 📚 documentation improvements.
|
|
73
|
+
|
|
74
|
+
### `@mui/material@5.15.1`
|
|
75
|
+
|
|
76
|
+
- ​<!-- 13 -->[CardActions][DialogActions] Apply margin for all children except for 1st child (#40168) @sai6855
|
|
77
|
+
- ​<!-- 03 -->[TablePagination] Add ability to change icons in TablePaginationActions using `slots` and `slotProps` (#33797) @pratikkarad
|
|
78
|
+
- ​<!-- 13 -->[CssVarsProvider] Fix HSL breaking button styles (#39869) @gitstart
|
|
79
|
+
|
|
80
|
+
### `@mui/joy@5.0.0-beta.19`
|
|
81
|
+
|
|
82
|
+
- ​<!-- 05 -->[FormControl] Fix issue with the conditional setting of `htmlFor` and `id` attributes not functioning properly for form labels (#40180) @ReaZzy
|
|
83
|
+
- ​<!-- 04 -->[typescript] Address TypeScript issue with custom zIndex not functioning (#40133) @qiweiii
|
|
84
|
+
|
|
85
|
+
### `@mui/styled-engine-sc@6.0.0-alpha.9`
|
|
86
|
+
|
|
87
|
+
- ​<!-- 02 -->[typescript] Fix `theme` being of type any (#40200) @mnajdova
|
|
88
|
+
|
|
89
|
+
### Docs
|
|
90
|
+
|
|
91
|
+
- ​<!-- 09 -->[joy-ui] Fix typo in the CSS baseline page (#40222) @possibilities
|
|
92
|
+
- ​<!-- 08 -->[joy-ui] Document missing Autocomplete props (#39979) @ZeeshanTamboli
|
|
93
|
+
- ​<!-- 10 -->[joy-ui] Fix typo about Typography levels (#40230) @zanivan
|
|
94
|
+
- ​<!-- 07 -->[material-ui] Update the related projects page to list `mui-tiptap` for rich text (#40216) @sjdemartini
|
|
95
|
+
- ​<!-- 06 -->[material-ui] Fix typo in the Next.js integration page (#40209) @s8990
|
|
96
|
+
|
|
97
|
+
### Core
|
|
98
|
+
|
|
99
|
+
- ​<!-- 14 -->[blog] Fix access to Notion without an account @oliviertassinari
|
|
100
|
+
- ​<!-- 12 -->[core] Update workflows and issue templates to reflect the updated label (#40197) @MBilalShafi
|
|
101
|
+
- ​<!-- 11 -->[docs] Replace Twitter with X (#40193) @mbrookes
|
|
102
|
+
- ​<!-- 10 -->[docs-infra] Uplift the Algolia search modal design (#40186) @danilo-leal
|
|
103
|
+
- ​<!-- 01 -->[website] Update product descriptions and social preview images (#32181) @danilo-leal
|
|
104
|
+
|
|
105
|
+
All contributors of this release in alphabetical order: @danilo-leal, @gitstart, @MBilalShafi, @mbrookes, @mnajdova, @oliviertassinari, @possibilities, @pratikkarad, @qiweiii, @ReaZzy, @s8990, @sai6855, @sjdemartini, @zanivan, @ZeeshanTamboli
|
|
106
|
+
|
|
3
107
|
## 5.15.0
|
|
4
108
|
|
|
5
109
|
<!-- generated comparing v5.14.20..master -->
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# MUI System
|
|
2
2
|
|
|
3
|
-
MUI System is a
|
|
3
|
+
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.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
package/colorManipulator.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -20,7 +21,7 @@ exports.private_safeEmphasize = private_safeEmphasize;
|
|
|
20
21
|
exports.private_safeLighten = private_safeLighten;
|
|
21
22
|
exports.recomposeColor = recomposeColor;
|
|
22
23
|
exports.rgbToHex = rgbToHex;
|
|
23
|
-
var
|
|
24
|
+
var _formatMuiErrorMessage2 = _interopRequireDefault(require("@mui/utils/formatMuiErrorMessage"));
|
|
24
25
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
25
26
|
|
|
26
27
|
/**
|
|
@@ -79,7 +80,7 @@ function decomposeColor(color) {
|
|
|
79
80
|
const type = color.substring(0, marker);
|
|
80
81
|
if (['rgb', 'rgba', 'hsl', 'hsla', 'color'].indexOf(type) === -1) {
|
|
81
82
|
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: Unsupported \`${color}\` color.
|
|
82
|
-
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : (0,
|
|
83
|
+
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : (0, _formatMuiErrorMessage2.default)(9, color));
|
|
83
84
|
}
|
|
84
85
|
let values = color.substring(marker + 1, color.length - 1);
|
|
85
86
|
let colorSpace;
|
|
@@ -91,7 +92,7 @@ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
|
|
|
91
92
|
}
|
|
92
93
|
if (['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].indexOf(colorSpace) === -1) {
|
|
93
94
|
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: unsupported \`${colorSpace}\` color space.
|
|
94
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : (0,
|
|
95
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : (0, _formatMuiErrorMessage2.default)(10, colorSpace));
|
|
95
96
|
}
|
|
96
97
|
} else {
|
|
97
98
|
values = values.split(',');
|
package/createStyled.js
CHANGED
|
@@ -37,10 +37,17 @@ const getStyleOverrides = (name, theme) => {
|
|
|
37
37
|
return null;
|
|
38
38
|
};
|
|
39
39
|
const transformVariants = variants => {
|
|
40
|
+
let numOfCallbacks = 0;
|
|
40
41
|
const variantsStyles = {};
|
|
41
42
|
if (variants) {
|
|
42
43
|
variants.forEach(definition => {
|
|
43
|
-
|
|
44
|
+
let key = '';
|
|
45
|
+
if (typeof definition.props === 'function') {
|
|
46
|
+
key = `callback${numOfCallbacks}`;
|
|
47
|
+
numOfCallbacks += 1;
|
|
48
|
+
} else {
|
|
49
|
+
key = (0, _propsToClassKey.default)(definition.props);
|
|
50
|
+
}
|
|
44
51
|
variantsStyles[key] = definition.style;
|
|
45
52
|
});
|
|
46
53
|
}
|
|
@@ -58,16 +65,29 @@ const variantsResolver = (props, styles, variants) => {
|
|
|
58
65
|
ownerState = {}
|
|
59
66
|
} = props;
|
|
60
67
|
const variantsStyles = [];
|
|
68
|
+
let numOfCallbacks = 0;
|
|
61
69
|
if (variants) {
|
|
62
70
|
variants.forEach(variant => {
|
|
63
71
|
let isMatch = true;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
72
|
+
if (typeof variant.props === 'function') {
|
|
73
|
+
const propsToCheck = (0, _extends2.default)({}, props, ownerState);
|
|
74
|
+
isMatch = variant.props(propsToCheck);
|
|
75
|
+
} else {
|
|
76
|
+
Object.keys(variant.props).forEach(key => {
|
|
77
|
+
if (ownerState[key] !== variant.props[key] && props[key] !== variant.props[key]) {
|
|
78
|
+
isMatch = false;
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
69
82
|
if (isMatch) {
|
|
70
|
-
|
|
83
|
+
if (typeof variant.props === 'function') {
|
|
84
|
+
variantsStyles.push(styles[`callback${numOfCallbacks}`]);
|
|
85
|
+
} else {
|
|
86
|
+
variantsStyles.push(styles[(0, _propsToClassKey.default)(variant.props)]);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (typeof variant.props === 'function') {
|
|
90
|
+
numOfCallbacks += 1;
|
|
71
91
|
}
|
|
72
92
|
});
|
|
73
93
|
}
|
|
@@ -8,9 +8,10 @@ exports.DISABLE_CSS_TRANSITION = void 0;
|
|
|
8
8
|
exports.default = createCssVarsProvider;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
|
-
var
|
|
11
|
+
var _formatMuiErrorMessage2 = _interopRequireDefault(require("@mui/utils/formatMuiErrorMessage"));
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
|
+
var _utils = require("@mui/utils");
|
|
14
15
|
var _styledEngine = require("@mui/styled-engine");
|
|
15
16
|
var _privateTheming = require("@mui/private-theming");
|
|
16
17
|
var _ThemeProvider = _interopRequireDefault(require("../ThemeProvider"));
|
|
@@ -47,7 +48,7 @@ function createCssVarsProvider(options) {
|
|
|
47
48
|
const useColorScheme = () => {
|
|
48
49
|
const value = React.useContext(ColorSchemeContext);
|
|
49
50
|
if (!value) {
|
|
50
|
-
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: \`useColorScheme\` must be called under <CssVarsProvider />` : (0,
|
|
51
|
+
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: \`useColorScheme\` must be called under <CssVarsProvider />` : (0, _formatMuiErrorMessage2.default)(19));
|
|
51
52
|
}
|
|
52
53
|
return value;
|
|
53
54
|
};
|
package/esm/colorManipulator.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _formatMuiErrorMessage from "@mui/utils/formatMuiErrorMessage";
|
|
2
2
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
3
3
|
/**
|
|
4
4
|
* Returns a number whose value is limited to the given range.
|
package/esm/createStyled.js
CHANGED
|
@@ -26,10 +26,17 @@ const getStyleOverrides = (name, theme) => {
|
|
|
26
26
|
return null;
|
|
27
27
|
};
|
|
28
28
|
const transformVariants = variants => {
|
|
29
|
+
let numOfCallbacks = 0;
|
|
29
30
|
const variantsStyles = {};
|
|
30
31
|
if (variants) {
|
|
31
32
|
variants.forEach(definition => {
|
|
32
|
-
|
|
33
|
+
let key = '';
|
|
34
|
+
if (typeof definition.props === 'function') {
|
|
35
|
+
key = `callback${numOfCallbacks}`;
|
|
36
|
+
numOfCallbacks += 1;
|
|
37
|
+
} else {
|
|
38
|
+
key = propsToClassKey(definition.props);
|
|
39
|
+
}
|
|
33
40
|
variantsStyles[key] = definition.style;
|
|
34
41
|
});
|
|
35
42
|
}
|
|
@@ -47,16 +54,29 @@ const variantsResolver = (props, styles, variants) => {
|
|
|
47
54
|
ownerState = {}
|
|
48
55
|
} = props;
|
|
49
56
|
const variantsStyles = [];
|
|
57
|
+
let numOfCallbacks = 0;
|
|
50
58
|
if (variants) {
|
|
51
59
|
variants.forEach(variant => {
|
|
52
60
|
let isMatch = true;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
if (typeof variant.props === 'function') {
|
|
62
|
+
const propsToCheck = _extends({}, props, ownerState);
|
|
63
|
+
isMatch = variant.props(propsToCheck);
|
|
64
|
+
} else {
|
|
65
|
+
Object.keys(variant.props).forEach(key => {
|
|
66
|
+
if (ownerState[key] !== variant.props[key] && props[key] !== variant.props[key]) {
|
|
67
|
+
isMatch = false;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
58
71
|
if (isMatch) {
|
|
59
|
-
|
|
72
|
+
if (typeof variant.props === 'function') {
|
|
73
|
+
variantsStyles.push(styles[`callback${numOfCallbacks}`]);
|
|
74
|
+
} else {
|
|
75
|
+
variantsStyles.push(styles[propsToClassKey(variant.props)]);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (typeof variant.props === 'function') {
|
|
79
|
+
numOfCallbacks += 1;
|
|
60
80
|
}
|
|
61
81
|
});
|
|
62
82
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
import
|
|
3
|
+
import _formatMuiErrorMessage from "@mui/utils/formatMuiErrorMessage";
|
|
4
4
|
const _excluded = ["colorSchemes", "components", "generateCssVars", "cssVarPrefix"];
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
package/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import _formatMuiErrorMessage from "@mui/utils/formatMuiErrorMessage";
|
|
4
4
|
export { css, keyframes, StyledEngineProvider } from '@mui/styled-engine';
|
|
5
5
|
export { default as GlobalStyles } from './GlobalStyles';
|
|
6
6
|
export { default as borders } from './borders';
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/system v5.15.
|
|
2
|
+
* @mui/system v5.15.2
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -366,7 +366,7 @@ Object.defineProperty(exports, "useThemeWithoutDefault", {
|
|
|
366
366
|
return _useThemeWithoutDefault.default;
|
|
367
367
|
}
|
|
368
368
|
});
|
|
369
|
-
var
|
|
369
|
+
var _formatMuiErrorMessage2 = _interopRequireDefault(require("@mui/utils/formatMuiErrorMessage"));
|
|
370
370
|
var _styledEngine = require("@mui/styled-engine");
|
|
371
371
|
var _GlobalStyles = _interopRequireDefault(require("./GlobalStyles"));
|
|
372
372
|
var _borders = _interopRequireWildcard(require("./borders"));
|
|
@@ -557,7 +557,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
557
557
|
// TODO: Remove this function in v6
|
|
558
558
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
559
559
|
function experimental_sx() {
|
|
560
|
-
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The \`experimental_sx\` has been moved to \`theme.unstable_sx\`.For more details, see https://github.com/mui/material-ui/pull/35150.` : (0,
|
|
560
|
+
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The \`experimental_sx\` has been moved to \`theme.unstable_sx\`.For more details, see https://github.com/mui/material-ui/pull/35150.` : (0, _formatMuiErrorMessage2.default)(20));
|
|
561
561
|
}
|
|
562
562
|
|
|
563
563
|
/** ----------------- */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _formatMuiErrorMessage from "@mui/utils/formatMuiErrorMessage";
|
|
2
2
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
3
3
|
/**
|
|
4
4
|
* Returns a number whose value is limited to the given range.
|
package/legacy/createStyled.js
CHANGED
|
@@ -27,10 +27,17 @@ var getStyleOverrides = function getStyleOverrides(name, theme) {
|
|
|
27
27
|
return null;
|
|
28
28
|
};
|
|
29
29
|
var transformVariants = function transformVariants(variants) {
|
|
30
|
+
var numOfCallbacks = 0;
|
|
30
31
|
var variantsStyles = {};
|
|
31
32
|
if (variants) {
|
|
32
33
|
variants.forEach(function (definition) {
|
|
33
|
-
var key =
|
|
34
|
+
var key = '';
|
|
35
|
+
if (typeof definition.props === 'function') {
|
|
36
|
+
key = "callback".concat(numOfCallbacks);
|
|
37
|
+
numOfCallbacks += 1;
|
|
38
|
+
} else {
|
|
39
|
+
key = propsToClassKey(definition.props);
|
|
40
|
+
}
|
|
34
41
|
variantsStyles[key] = definition.style;
|
|
35
42
|
});
|
|
36
43
|
}
|
|
@@ -47,16 +54,29 @@ var variantsResolver = function variantsResolver(props, styles, variants) {
|
|
|
47
54
|
var _props$ownerState = props.ownerState,
|
|
48
55
|
ownerState = _props$ownerState === void 0 ? {} : _props$ownerState;
|
|
49
56
|
var variantsStyles = [];
|
|
57
|
+
var numOfCallbacks = 0;
|
|
50
58
|
if (variants) {
|
|
51
59
|
variants.forEach(function (variant) {
|
|
52
60
|
var isMatch = true;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
if (typeof variant.props === 'function') {
|
|
62
|
+
var propsToCheck = _extends({}, props, ownerState);
|
|
63
|
+
isMatch = variant.props(propsToCheck);
|
|
64
|
+
} else {
|
|
65
|
+
Object.keys(variant.props).forEach(function (key) {
|
|
66
|
+
if (ownerState[key] !== variant.props[key] && props[key] !== variant.props[key]) {
|
|
67
|
+
isMatch = false;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
58
71
|
if (isMatch) {
|
|
59
|
-
|
|
72
|
+
if (typeof variant.props === 'function') {
|
|
73
|
+
variantsStyles.push(styles["callback".concat(numOfCallbacks)]);
|
|
74
|
+
} else {
|
|
75
|
+
variantsStyles.push(styles[propsToClassKey(variant.props)]);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (typeof variant.props === 'function') {
|
|
79
|
+
numOfCallbacks += 1;
|
|
60
80
|
}
|
|
61
81
|
});
|
|
62
82
|
}
|
|
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
5
|
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
6
|
-
import
|
|
6
|
+
import _formatMuiErrorMessage from "@mui/utils/formatMuiErrorMessage";
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import { deepmerge } from '@mui/utils';
|
package/legacy/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/system v5.15.
|
|
2
|
+
* @mui/system v5.15.2
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
'use client';
|
|
9
9
|
|
|
10
|
-
import
|
|
10
|
+
import _formatMuiErrorMessage from "@mui/utils/formatMuiErrorMessage";
|
|
11
11
|
export { css, keyframes, StyledEngineProvider } from '@mui/styled-engine';
|
|
12
12
|
export { default as GlobalStyles } from './GlobalStyles';
|
|
13
13
|
export { default as borders } from './borders';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _formatMuiErrorMessage from "@mui/utils/formatMuiErrorMessage";
|
|
2
2
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
3
3
|
/**
|
|
4
4
|
* Returns a number whose value is limited to the given range.
|
package/modern/createStyled.js
CHANGED
|
@@ -26,10 +26,17 @@ const getStyleOverrides = (name, theme) => {
|
|
|
26
26
|
return null;
|
|
27
27
|
};
|
|
28
28
|
const transformVariants = variants => {
|
|
29
|
+
let numOfCallbacks = 0;
|
|
29
30
|
const variantsStyles = {};
|
|
30
31
|
if (variants) {
|
|
31
32
|
variants.forEach(definition => {
|
|
32
|
-
|
|
33
|
+
let key = '';
|
|
34
|
+
if (typeof definition.props === 'function') {
|
|
35
|
+
key = `callback${numOfCallbacks}`;
|
|
36
|
+
numOfCallbacks += 1;
|
|
37
|
+
} else {
|
|
38
|
+
key = propsToClassKey(definition.props);
|
|
39
|
+
}
|
|
33
40
|
variantsStyles[key] = definition.style;
|
|
34
41
|
});
|
|
35
42
|
}
|
|
@@ -47,16 +54,29 @@ const variantsResolver = (props, styles, variants) => {
|
|
|
47
54
|
ownerState = {}
|
|
48
55
|
} = props;
|
|
49
56
|
const variantsStyles = [];
|
|
57
|
+
let numOfCallbacks = 0;
|
|
50
58
|
if (variants) {
|
|
51
59
|
variants.forEach(variant => {
|
|
52
60
|
let isMatch = true;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
if (typeof variant.props === 'function') {
|
|
62
|
+
const propsToCheck = _extends({}, props, ownerState);
|
|
63
|
+
isMatch = variant.props(propsToCheck);
|
|
64
|
+
} else {
|
|
65
|
+
Object.keys(variant.props).forEach(key => {
|
|
66
|
+
if (ownerState[key] !== variant.props[key] && props[key] !== variant.props[key]) {
|
|
67
|
+
isMatch = false;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
58
71
|
if (isMatch) {
|
|
59
|
-
|
|
72
|
+
if (typeof variant.props === 'function') {
|
|
73
|
+
variantsStyles.push(styles[`callback${numOfCallbacks}`]);
|
|
74
|
+
} else {
|
|
75
|
+
variantsStyles.push(styles[propsToClassKey(variant.props)]);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (typeof variant.props === 'function') {
|
|
79
|
+
numOfCallbacks += 1;
|
|
60
80
|
}
|
|
61
81
|
});
|
|
62
82
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
import
|
|
3
|
+
import _formatMuiErrorMessage from "@mui/utils/formatMuiErrorMessage";
|
|
4
4
|
const _excluded = ["colorSchemes", "components", "generateCssVars", "cssVarPrefix"];
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
package/modern/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/system v5.15.
|
|
2
|
+
* @mui/system v5.15.2
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
'use client';
|
|
9
9
|
|
|
10
|
-
import
|
|
10
|
+
import _formatMuiErrorMessage from "@mui/utils/formatMuiErrorMessage";
|
|
11
11
|
export { css, keyframes, StyledEngineProvider } from '@mui/styled-engine';
|
|
12
12
|
export { default as GlobalStyles } from './GlobalStyles';
|
|
13
13
|
export { default as borders } from './borders';
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/system",
|
|
3
|
-
"version": "5.15.
|
|
3
|
+
"version": "5.15.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
|
-
"description": "CSS utilities
|
|
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.",
|
|
7
7
|
"main": "./index.js",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"react",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"url": "https://opencollective.com/mui-org"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@babel/runtime": "^7.23.
|
|
30
|
-
"@mui/private-theming": "^5.15.
|
|
31
|
-
"@mui/styled-engine": "^5.15.
|
|
29
|
+
"@babel/runtime": "^7.23.6",
|
|
30
|
+
"@mui/private-theming": "^5.15.2",
|
|
31
|
+
"@mui/styled-engine": "^5.15.2",
|
|
32
32
|
"@mui/types": "^7.2.11",
|
|
33
|
-
"@mui/utils": "^5.15.
|
|
33
|
+
"@mui/utils": "^5.15.2",
|
|
34
34
|
"clsx": "^2.0.0",
|
|
35
35
|
"csstype": "^3.1.2",
|
|
36
36
|
"prop-types": "^15.8.1"
|