@mui/styled-engine-sc 5.10.6 → 5.10.16
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 +875 -212
- package/GlobalStyles/GlobalStyles.js +0 -4
- package/StyledEngineProvider/StyledEngineProvider.js +0 -4
- package/index.js +3 -8
- package/legacy/GlobalStyles/GlobalStyles.js +2 -6
- package/legacy/StyledEngineProvider/StyledEngineProvider.js +1 -5
- package/legacy/index.js +3 -9
- package/modern/GlobalStyles/GlobalStyles.js +0 -4
- package/modern/StyledEngineProvider/StyledEngineProvider.js +0 -4
- package/modern/index.js +3 -8
- package/node/GlobalStyles/GlobalStyles.js +0 -7
- package/node/GlobalStyles/index.js +0 -2
- package/node/StyledEngineProvider/StyledEngineProvider.js +0 -8
- package/node/StyledEngineProvider/index.js +0 -2
- package/node/index.js +3 -17
- package/package.json +2 -2
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import { createGlobalStyle } from 'styled-components';
|
|
3
|
-
|
|
4
3
|
function isEmpty(obj) {
|
|
5
4
|
return obj === undefined || obj === null || Object.keys(obj).length === 0;
|
|
6
5
|
}
|
|
7
|
-
|
|
8
6
|
const GlobalStyles = createGlobalStyle(props => {
|
|
9
7
|
const {
|
|
10
8
|
styles,
|
|
11
9
|
defaultTheme = {}
|
|
12
10
|
} = props;
|
|
13
|
-
|
|
14
11
|
if (typeof styles === 'function') {
|
|
15
12
|
return styles(isEmpty(props.theme) ? defaultTheme : props.theme);
|
|
16
13
|
}
|
|
17
|
-
|
|
18
14
|
return styles;
|
|
19
15
|
});
|
|
20
16
|
export default GlobalStyles;
|
|
@@ -4,17 +4,14 @@ export default function StyledEngineProvider(props) {
|
|
|
4
4
|
injectFirst,
|
|
5
5
|
children
|
|
6
6
|
} = props;
|
|
7
|
-
|
|
8
7
|
if (injectFirst && typeof window !== 'undefined') {
|
|
9
8
|
const head = document.head;
|
|
10
|
-
|
|
11
9
|
if (!head.querySelector('[data-styled="active"]')) {
|
|
12
10
|
const injectFirstNode = document.createElement('style');
|
|
13
11
|
injectFirstNode.setAttribute('data-styled', 'active');
|
|
14
12
|
head.insertBefore(injectFirstNode, head.firstChild);
|
|
15
13
|
}
|
|
16
14
|
}
|
|
17
|
-
|
|
18
15
|
return children;
|
|
19
16
|
}
|
|
20
17
|
StyledEngineProvider.propTypes = {
|
|
@@ -22,7 +19,6 @@ StyledEngineProvider.propTypes = {
|
|
|
22
19
|
* Your component tree.
|
|
23
20
|
*/
|
|
24
21
|
children: PropTypes.node,
|
|
25
|
-
|
|
26
22
|
/**
|
|
27
23
|
* By default, the styles are injected last in the <head> element of the page.
|
|
28
24
|
* As a result, they gain more specificity than any other style sheet.
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MUI v5.10.
|
|
1
|
+
/** @license MUI v5.10.16
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
import scStyled from 'styled-components';
|
|
7
7
|
export default function styled(tag, options) {
|
|
8
8
|
let stylesFactory;
|
|
9
|
-
|
|
10
9
|
if (options) {
|
|
11
10
|
stylesFactory = scStyled(tag).withConfig({
|
|
12
11
|
displayName: options.label,
|
|
@@ -15,27 +14,23 @@ export default function styled(tag, options) {
|
|
|
15
14
|
} else {
|
|
16
15
|
stylesFactory = scStyled(tag);
|
|
17
16
|
}
|
|
18
|
-
|
|
19
17
|
if (process.env.NODE_ENV !== 'production') {
|
|
20
18
|
const fn = (...styles) => {
|
|
21
19
|
const component = typeof tag === 'string' ? `"${tag}"` : 'component';
|
|
22
|
-
|
|
23
20
|
if (styles.length === 0) {
|
|
24
21
|
console.error([`MUI: Seems like you called \`styled(${component})()\` without a \`style\` argument.`, 'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join('\n'));
|
|
25
22
|
} else if (styles.some(style => style === undefined)) {
|
|
26
23
|
console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);
|
|
27
24
|
}
|
|
28
|
-
|
|
29
25
|
return stylesFactory(...styles);
|
|
30
26
|
};
|
|
31
|
-
|
|
32
27
|
fn.withConfig = stylesFactory.withConfig;
|
|
33
28
|
return fn;
|
|
34
29
|
}
|
|
35
|
-
|
|
36
30
|
return stylesFactory;
|
|
37
|
-
}
|
|
31
|
+
}
|
|
38
32
|
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
39
34
|
export const internal_processStyles = (tag, processor) => {
|
|
40
35
|
// Styled-components attaches an instance to `componentStyle`.
|
|
41
36
|
// https://github.com/styled-components/styled-components/blob/da8151762dcf72735ffba358173d4c097f6d5888/packages/styled-components/src/models/StyledComponent.ts#L257
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import { createGlobalStyle } from 'styled-components';
|
|
3
|
-
|
|
4
3
|
function isEmpty(obj) {
|
|
5
4
|
return obj === undefined || obj === null || Object.keys(obj).length === 0;
|
|
6
5
|
}
|
|
7
|
-
|
|
8
6
|
var GlobalStyles = createGlobalStyle(function (props) {
|
|
9
7
|
var styles = props.styles,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
_props$defaultTheme = props.defaultTheme,
|
|
9
|
+
defaultTheme = _props$defaultTheme === void 0 ? {} : _props$defaultTheme;
|
|
13
10
|
if (typeof styles === 'function') {
|
|
14
11
|
return styles(isEmpty(props.theme) ? defaultTheme : props.theme);
|
|
15
12
|
}
|
|
16
|
-
|
|
17
13
|
return styles;
|
|
18
14
|
});
|
|
19
15
|
export default GlobalStyles;
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
export default function StyledEngineProvider(props) {
|
|
3
3
|
var injectFirst = props.injectFirst,
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
children = props.children;
|
|
6
5
|
if (injectFirst && typeof window !== 'undefined') {
|
|
7
6
|
var head = document.head;
|
|
8
|
-
|
|
9
7
|
if (!head.querySelector('[data-styled="active"]')) {
|
|
10
8
|
var injectFirstNode = document.createElement('style');
|
|
11
9
|
injectFirstNode.setAttribute('data-styled', 'active');
|
|
12
10
|
head.insertBefore(injectFirstNode, head.firstChild);
|
|
13
11
|
}
|
|
14
12
|
}
|
|
15
|
-
|
|
16
13
|
return children;
|
|
17
14
|
}
|
|
18
15
|
StyledEngineProvider.propTypes = {
|
|
@@ -20,7 +17,6 @@ StyledEngineProvider.propTypes = {
|
|
|
20
17
|
* Your component tree.
|
|
21
18
|
*/
|
|
22
19
|
children: PropTypes.node,
|
|
23
|
-
|
|
24
20
|
/**
|
|
25
21
|
* By default, the styles are injected last in the <head> element of the page.
|
|
26
22
|
* As a result, they gain more specificity than any other style sheet.
|
package/legacy/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MUI v5.10.
|
|
1
|
+
/** @license MUI v5.10.16
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
import scStyled from 'styled-components';
|
|
7
7
|
export default function styled(tag, options) {
|
|
8
8
|
var stylesFactory;
|
|
9
|
-
|
|
10
9
|
if (options) {
|
|
11
10
|
stylesFactory = scStyled(tag).withConfig({
|
|
12
11
|
displayName: options.label,
|
|
@@ -15,15 +14,12 @@ export default function styled(tag, options) {
|
|
|
15
14
|
} else {
|
|
16
15
|
stylesFactory = scStyled(tag);
|
|
17
16
|
}
|
|
18
|
-
|
|
19
17
|
if (process.env.NODE_ENV !== 'production') {
|
|
20
18
|
var fn = function fn() {
|
|
21
19
|
var component = typeof tag === 'string' ? "\"".concat(tag, "\"") : 'component';
|
|
22
|
-
|
|
23
20
|
for (var _len = arguments.length, styles = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
24
21
|
styles[_key] = arguments[_key];
|
|
25
22
|
}
|
|
26
|
-
|
|
27
23
|
if (styles.length === 0) {
|
|
28
24
|
console.error(["MUI: Seems like you called `styled(".concat(component, ")()` without a `style` argument."), 'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join('\n'));
|
|
29
25
|
} else if (styles.some(function (style) {
|
|
@@ -31,17 +27,15 @@ export default function styled(tag, options) {
|
|
|
31
27
|
})) {
|
|
32
28
|
console.error("MUI: the styled(".concat(component, ")(...args) API requires all its args to be defined."));
|
|
33
29
|
}
|
|
34
|
-
|
|
35
30
|
return stylesFactory.apply(void 0, styles);
|
|
36
31
|
};
|
|
37
|
-
|
|
38
32
|
fn.withConfig = stylesFactory.withConfig;
|
|
39
33
|
return fn;
|
|
40
34
|
}
|
|
41
|
-
|
|
42
35
|
return stylesFactory;
|
|
43
|
-
}
|
|
36
|
+
}
|
|
44
37
|
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
45
39
|
export var internal_processStyles = function internal_processStyles(tag, processor) {
|
|
46
40
|
// Styled-components attaches an instance to `componentStyle`.
|
|
47
41
|
// https://github.com/styled-components/styled-components/blob/da8151762dcf72735ffba358173d4c097f6d5888/packages/styled-components/src/models/StyledComponent.ts#L257
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import { createGlobalStyle } from 'styled-components';
|
|
3
|
-
|
|
4
3
|
function isEmpty(obj) {
|
|
5
4
|
return obj === undefined || obj === null || Object.keys(obj).length === 0;
|
|
6
5
|
}
|
|
7
|
-
|
|
8
6
|
const GlobalStyles = createGlobalStyle(props => {
|
|
9
7
|
const {
|
|
10
8
|
styles,
|
|
11
9
|
defaultTheme = {}
|
|
12
10
|
} = props;
|
|
13
|
-
|
|
14
11
|
if (typeof styles === 'function') {
|
|
15
12
|
return styles(isEmpty(props.theme) ? defaultTheme : props.theme);
|
|
16
13
|
}
|
|
17
|
-
|
|
18
14
|
return styles;
|
|
19
15
|
});
|
|
20
16
|
export default GlobalStyles;
|
|
@@ -4,17 +4,14 @@ export default function StyledEngineProvider(props) {
|
|
|
4
4
|
injectFirst,
|
|
5
5
|
children
|
|
6
6
|
} = props;
|
|
7
|
-
|
|
8
7
|
if (injectFirst && typeof window !== 'undefined') {
|
|
9
8
|
const head = document.head;
|
|
10
|
-
|
|
11
9
|
if (!head.querySelector('[data-styled="active"]')) {
|
|
12
10
|
const injectFirstNode = document.createElement('style');
|
|
13
11
|
injectFirstNode.setAttribute('data-styled', 'active');
|
|
14
12
|
head.insertBefore(injectFirstNode, head.firstChild);
|
|
15
13
|
}
|
|
16
14
|
}
|
|
17
|
-
|
|
18
15
|
return children;
|
|
19
16
|
}
|
|
20
17
|
StyledEngineProvider.propTypes = {
|
|
@@ -22,7 +19,6 @@ StyledEngineProvider.propTypes = {
|
|
|
22
19
|
* Your component tree.
|
|
23
20
|
*/
|
|
24
21
|
children: PropTypes.node,
|
|
25
|
-
|
|
26
22
|
/**
|
|
27
23
|
* By default, the styles are injected last in the <head> element of the page.
|
|
28
24
|
* As a result, they gain more specificity than any other style sheet.
|
package/modern/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MUI v5.10.
|
|
1
|
+
/** @license MUI v5.10.16
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
import scStyled from 'styled-components';
|
|
7
7
|
export default function styled(tag, options) {
|
|
8
8
|
let stylesFactory;
|
|
9
|
-
|
|
10
9
|
if (options) {
|
|
11
10
|
stylesFactory = scStyled(tag).withConfig({
|
|
12
11
|
displayName: options.label,
|
|
@@ -15,27 +14,23 @@ export default function styled(tag, options) {
|
|
|
15
14
|
} else {
|
|
16
15
|
stylesFactory = scStyled(tag);
|
|
17
16
|
}
|
|
18
|
-
|
|
19
17
|
if (process.env.NODE_ENV !== 'production') {
|
|
20
18
|
const fn = (...styles) => {
|
|
21
19
|
const component = typeof tag === 'string' ? `"${tag}"` : 'component';
|
|
22
|
-
|
|
23
20
|
if (styles.length === 0) {
|
|
24
21
|
console.error([`MUI: Seems like you called \`styled(${component})()\` without a \`style\` argument.`, 'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join('\n'));
|
|
25
22
|
} else if (styles.some(style => style === undefined)) {
|
|
26
23
|
console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);
|
|
27
24
|
}
|
|
28
|
-
|
|
29
25
|
return stylesFactory(...styles);
|
|
30
26
|
};
|
|
31
|
-
|
|
32
27
|
fn.withConfig = stylesFactory.withConfig;
|
|
33
28
|
return fn;
|
|
34
29
|
}
|
|
35
|
-
|
|
36
30
|
return stylesFactory;
|
|
37
|
-
}
|
|
31
|
+
}
|
|
38
32
|
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
39
34
|
export const internal_processStyles = (tag, processor) => {
|
|
40
35
|
// Styled-components attaches an instance to `componentStyle`.
|
|
41
36
|
// https://github.com/styled-components/styled-components/blob/da8151762dcf72735ffba358173d4c097f6d5888/packages/styled-components/src/models/StyledComponent.ts#L257
|
|
@@ -1,30 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _styledComponents = require("styled-components");
|
|
13
|
-
|
|
14
10
|
function isEmpty(obj) {
|
|
15
11
|
return obj === undefined || obj === null || Object.keys(obj).length === 0;
|
|
16
12
|
}
|
|
17
|
-
|
|
18
13
|
const GlobalStyles = (0, _styledComponents.createGlobalStyle)(props => {
|
|
19
14
|
const {
|
|
20
15
|
styles,
|
|
21
16
|
defaultTheme = {}
|
|
22
17
|
} = props;
|
|
23
|
-
|
|
24
18
|
if (typeof styles === 'function') {
|
|
25
19
|
return styles(isEmpty(props.theme) ? defaultTheme : props.theme);
|
|
26
20
|
}
|
|
27
|
-
|
|
28
21
|
return styles;
|
|
29
22
|
});
|
|
30
23
|
var _default = GlobalStyles;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -11,5 +10,4 @@ Object.defineProperty(exports, "default", {
|
|
|
11
10
|
return _GlobalStyles.default;
|
|
12
11
|
}
|
|
13
12
|
});
|
|
14
|
-
|
|
15
13
|
var _GlobalStyles = _interopRequireDefault(require("./GlobalStyles"));
|
|
@@ -1,39 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = StyledEngineProvider;
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
function StyledEngineProvider(props) {
|
|
13
10
|
const {
|
|
14
11
|
injectFirst,
|
|
15
12
|
children
|
|
16
13
|
} = props;
|
|
17
|
-
|
|
18
14
|
if (injectFirst && typeof window !== 'undefined') {
|
|
19
15
|
const head = document.head;
|
|
20
|
-
|
|
21
16
|
if (!head.querySelector('[data-styled="active"]')) {
|
|
22
17
|
const injectFirstNode = document.createElement('style');
|
|
23
18
|
injectFirstNode.setAttribute('data-styled', 'active');
|
|
24
19
|
head.insertBefore(injectFirstNode, head.firstChild);
|
|
25
20
|
}
|
|
26
21
|
}
|
|
27
|
-
|
|
28
22
|
return children;
|
|
29
23
|
}
|
|
30
|
-
|
|
31
24
|
StyledEngineProvider.propTypes = {
|
|
32
25
|
/**
|
|
33
26
|
* Your component tree.
|
|
34
27
|
*/
|
|
35
28
|
children: _propTypes.default.node,
|
|
36
|
-
|
|
37
29
|
/**
|
|
38
30
|
* By default, the styles are injected last in the <head> element of the page.
|
|
39
31
|
* As a result, they gain more specificity than any other style sheet.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -11,5 +10,4 @@ Object.defineProperty(exports, "default", {
|
|
|
11
10
|
return _StyledEngineProvider.default;
|
|
12
11
|
}
|
|
13
12
|
});
|
|
14
|
-
|
|
15
13
|
var _StyledEngineProvider = _interopRequireDefault(require("./StyledEngineProvider"));
|
package/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MUI v5.10.
|
|
1
|
+
/** @license MUI v5.10.16
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
"use strict";
|
|
7
7
|
|
|
8
8
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
9
|
-
|
|
10
9
|
Object.defineProperty(exports, "__esModule", {
|
|
11
10
|
value: true
|
|
12
11
|
});
|
|
@@ -42,20 +41,13 @@ Object.defineProperty(exports, "keyframes", {
|
|
|
42
41
|
return _styledComponents.keyframes;
|
|
43
42
|
}
|
|
44
43
|
});
|
|
45
|
-
|
|
46
44
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
47
|
-
|
|
48
45
|
var _StyledEngineProvider = _interopRequireDefault(require("./StyledEngineProvider"));
|
|
49
|
-
|
|
50
46
|
var _GlobalStyles = _interopRequireDefault(require("./GlobalStyles"));
|
|
51
|
-
|
|
52
47
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
53
|
-
|
|
54
48
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
55
|
-
|
|
56
49
|
function styled(tag, options) {
|
|
57
50
|
let stylesFactory;
|
|
58
|
-
|
|
59
51
|
if (options) {
|
|
60
52
|
stylesFactory = (0, _styledComponents.default)(tag).withConfig({
|
|
61
53
|
displayName: options.label,
|
|
@@ -64,28 +56,23 @@ function styled(tag, options) {
|
|
|
64
56
|
} else {
|
|
65
57
|
stylesFactory = (0, _styledComponents.default)(tag);
|
|
66
58
|
}
|
|
67
|
-
|
|
68
59
|
if (process.env.NODE_ENV !== 'production') {
|
|
69
60
|
const fn = (...styles) => {
|
|
70
61
|
const component = typeof tag === 'string' ? `"${tag}"` : 'component';
|
|
71
|
-
|
|
72
62
|
if (styles.length === 0) {
|
|
73
63
|
console.error([`MUI: Seems like you called \`styled(${component})()\` without a \`style\` argument.`, 'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join('\n'));
|
|
74
64
|
} else if (styles.some(style => style === undefined)) {
|
|
75
65
|
console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);
|
|
76
66
|
}
|
|
77
|
-
|
|
78
67
|
return stylesFactory(...styles);
|
|
79
68
|
};
|
|
80
|
-
|
|
81
69
|
fn.withConfig = stylesFactory.withConfig;
|
|
82
70
|
return fn;
|
|
83
71
|
}
|
|
84
|
-
|
|
85
72
|
return stylesFactory;
|
|
86
|
-
}
|
|
87
|
-
|
|
73
|
+
}
|
|
88
74
|
|
|
75
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
89
76
|
const internal_processStyles = (tag, processor) => {
|
|
90
77
|
// Styled-components attaches an instance to `componentStyle`.
|
|
91
78
|
// https://github.com/styled-components/styled-components/blob/da8151762dcf72735ffba358173d4c097f6d5888/packages/styled-components/src/models/StyledComponent.ts#L257
|
|
@@ -96,5 +83,4 @@ const internal_processStyles = (tag, processor) => {
|
|
|
96
83
|
tag.componentStyle.rules = processor(tag.componentStyle.rules);
|
|
97
84
|
}
|
|
98
85
|
};
|
|
99
|
-
|
|
100
86
|
exports.internal_processStyles = internal_processStyles;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/styled-engine-sc",
|
|
3
|
-
"version": "5.10.
|
|
3
|
+
"version": "5.10.16",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "styled() API wrapper package for styled-components.",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"url": "https://opencollective.com/mui"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@babel/runtime": "^7.
|
|
29
|
+
"@babel/runtime": "^7.20.1",
|
|
30
30
|
"prop-types": "^15.8.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|