@mui/styled-engine 5.10.7 → 5.10.14

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.
@@ -2,11 +2,9 @@ import * as React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { Global } from '@emotion/react';
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
-
6
5
  function isEmpty(obj) {
7
6
  return obj === undefined || obj === null || Object.keys(obj).length === 0;
8
7
  }
9
-
10
8
  export default function GlobalStyles(props) {
11
9
  const {
12
10
  styles,
@@ -1,9 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { CacheProvider } from '@emotion/react';
4
- import createCache from '@emotion/cache'; // prepend: true moves MUI styles to the top of the <head> so they're loaded first.
5
- // It allows developers to easily override MUI styles with other styling solutions, like CSS modules.
4
+ import createCache from '@emotion/cache';
6
5
 
6
+ // prepend: true moves MUI styles to the top of the <head> so they're loaded first.
7
+ // It allows developers to easily override MUI styles with other styling solutions, like CSS modules.
7
8
  import { jsx as _jsx } from "react/jsx-runtime";
8
9
  const cache = createCache({
9
10
  key: 'css',
@@ -24,7 +25,6 @@ process.env.NODE_ENV !== "production" ? StyledEngineProvider.propTypes = {
24
25
  * Your component tree.
25
26
  */
26
27
  children: PropTypes.node,
27
-
28
28
  /**
29
29
  * By default, the styles are injected last in the <head> element of the page.
30
30
  * 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.7
1
+ /** @license MUI v5.10.14
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.
@@ -7,24 +7,21 @@
7
7
  import emStyled from '@emotion/styled';
8
8
  export default function styled(tag, options) {
9
9
  const stylesFactory = emStyled(tag, options);
10
-
11
10
  if (process.env.NODE_ENV !== 'production') {
12
11
  return (...styles) => {
13
12
  const component = typeof tag === 'string' ? `"${tag}"` : 'component';
14
-
15
13
  if (styles.length === 0) {
16
14
  console.error([`MUI: Seems like you called \`styled(${component})()\` without a \`style\` argument.`, 'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join('\n'));
17
15
  } else if (styles.some(style => style === undefined)) {
18
16
  console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);
19
17
  }
20
-
21
18
  return stylesFactory(...styles);
22
19
  };
23
20
  }
24
-
25
21
  return stylesFactory;
26
- } // eslint-disable-next-line @typescript-eslint/naming-convention
22
+ }
27
23
 
24
+ // eslint-disable-next-line @typescript-eslint/naming-convention
28
25
  export const internal_processStyles = (tag, processor) => {
29
26
  // Emotion attaches all the styles as `__emotion_styles`.
30
27
  // Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186
@@ -2,15 +2,13 @@ import * as React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { Global } from '@emotion/react';
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
-
6
5
  function isEmpty(obj) {
7
6
  return obj === undefined || obj === null || Object.keys(obj).length === 0;
8
7
  }
9
-
10
8
  export default function GlobalStyles(props) {
11
9
  var styles = props.styles,
12
- _props$defaultTheme = props.defaultTheme,
13
- defaultTheme = _props$defaultTheme === void 0 ? {} : _props$defaultTheme;
10
+ _props$defaultTheme = props.defaultTheme,
11
+ defaultTheme = _props$defaultTheme === void 0 ? {} : _props$defaultTheme;
14
12
  var globalStyles = typeof styles === 'function' ? function (themeInput) {
15
13
  return styles(isEmpty(themeInput) ? defaultTheme : themeInput);
16
14
  } : styles;
@@ -1,9 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { CacheProvider } from '@emotion/react';
4
- import createCache from '@emotion/cache'; // prepend: true moves MUI styles to the top of the <head> so they're loaded first.
5
- // It allows developers to easily override MUI styles with other styling solutions, like CSS modules.
4
+ import createCache from '@emotion/cache';
6
5
 
6
+ // prepend: true moves MUI styles to the top of the <head> so they're loaded first.
7
+ // It allows developers to easily override MUI styles with other styling solutions, like CSS modules.
7
8
  import { jsx as _jsx } from "react/jsx-runtime";
8
9
  var cache = createCache({
9
10
  key: 'css',
@@ -11,7 +12,7 @@ var cache = createCache({
11
12
  });
12
13
  export default function StyledEngineProvider(props) {
13
14
  var injectFirst = props.injectFirst,
14
- children = props.children;
15
+ children = props.children;
15
16
  return injectFirst ? /*#__PURE__*/_jsx(CacheProvider, {
16
17
  value: cache,
17
18
  children: children
@@ -22,7 +23,6 @@ process.env.NODE_ENV !== "production" ? StyledEngineProvider.propTypes = {
22
23
  * Your component tree.
23
24
  */
24
25
  children: PropTypes.node,
25
-
26
26
  /**
27
27
  * By default, the styles are injected last in the <head> element of the page.
28
28
  * 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.7
1
+ /** @license MUI v5.10.14
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.
@@ -7,15 +7,12 @@
7
7
  import emStyled from '@emotion/styled';
8
8
  export default function styled(tag, options) {
9
9
  var stylesFactory = emStyled(tag, options);
10
-
11
10
  if (process.env.NODE_ENV !== 'production') {
12
11
  return function () {
13
12
  var component = typeof tag === 'string' ? "\"".concat(tag, "\"") : 'component';
14
-
15
13
  for (var _len = arguments.length, styles = new Array(_len), _key = 0; _key < _len; _key++) {
16
14
  styles[_key] = arguments[_key];
17
15
  }
18
-
19
16
  if (styles.length === 0) {
20
17
  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'));
21
18
  } else if (styles.some(function (style) {
@@ -23,14 +20,13 @@ export default function styled(tag, options) {
23
20
  })) {
24
21
  console.error("MUI: the styled(".concat(component, ")(...args) API requires all its args to be defined."));
25
22
  }
26
-
27
23
  return stylesFactory.apply(void 0, styles);
28
24
  };
29
25
  }
30
-
31
26
  return stylesFactory;
32
- } // eslint-disable-next-line @typescript-eslint/naming-convention
27
+ }
33
28
 
29
+ // eslint-disable-next-line @typescript-eslint/naming-convention
34
30
  export var internal_processStyles = function internal_processStyles(tag, processor) {
35
31
  // Emotion attaches all the styles as `__emotion_styles`.
36
32
  // Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186
@@ -2,11 +2,9 @@ import * as React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { Global } from '@emotion/react';
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
-
6
5
  function isEmpty(obj) {
7
6
  return obj === undefined || obj === null || Object.keys(obj).length === 0;
8
7
  }
9
-
10
8
  export default function GlobalStyles(props) {
11
9
  const {
12
10
  styles,
@@ -1,9 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { CacheProvider } from '@emotion/react';
4
- import createCache from '@emotion/cache'; // prepend: true moves MUI styles to the top of the <head> so they're loaded first.
5
- // It allows developers to easily override MUI styles with other styling solutions, like CSS modules.
4
+ import createCache from '@emotion/cache';
6
5
 
6
+ // prepend: true moves MUI styles to the top of the <head> so they're loaded first.
7
+ // It allows developers to easily override MUI styles with other styling solutions, like CSS modules.
7
8
  import { jsx as _jsx } from "react/jsx-runtime";
8
9
  const cache = createCache({
9
10
  key: 'css',
@@ -24,7 +25,6 @@ process.env.NODE_ENV !== "production" ? StyledEngineProvider.propTypes = {
24
25
  * Your component tree.
25
26
  */
26
27
  children: PropTypes.node,
27
-
28
28
  /**
29
29
  * By default, the styles are injected last in the <head> element of the page.
30
30
  * 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.7
1
+ /** @license MUI v5.10.14
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.
@@ -7,24 +7,21 @@
7
7
  import emStyled from '@emotion/styled';
8
8
  export default function styled(tag, options) {
9
9
  const stylesFactory = emStyled(tag, options);
10
-
11
10
  if (process.env.NODE_ENV !== 'production') {
12
11
  return (...styles) => {
13
12
  const component = typeof tag === 'string' ? `"${tag}"` : 'component';
14
-
15
13
  if (styles.length === 0) {
16
14
  console.error([`MUI: Seems like you called \`styled(${component})()\` without a \`style\` argument.`, 'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join('\n'));
17
15
  } else if (styles.some(style => style === undefined)) {
18
16
  console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);
19
17
  }
20
-
21
18
  return stylesFactory(...styles);
22
19
  };
23
20
  }
24
-
25
21
  return stylesFactory;
26
- } // eslint-disable-next-line @typescript-eslint/naming-convention
22
+ }
27
23
 
24
+ // eslint-disable-next-line @typescript-eslint/naming-convention
28
25
  export const internal_processStyles = (tag, processor) => {
29
26
  // Emotion attaches all the styles as `__emotion_styles`.
30
27
  // Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186
@@ -1,28 +1,19 @@
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 = GlobalStyles;
9
-
10
8
  var React = _interopRequireWildcard(require("react"));
11
-
12
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
-
14
10
  var _react2 = require("@emotion/react");
15
-
16
11
  var _jsxRuntime = require("react/jsx-runtime");
17
-
18
12
  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); }
19
-
20
13
  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; }
21
-
22
14
  function isEmpty(obj) {
23
15
  return obj === undefined || obj === null || Object.keys(obj).length === 0;
24
16
  }
25
-
26
17
  function GlobalStyles(props) {
27
18
  const {
28
19
  styles,
@@ -33,7 +24,6 @@ function GlobalStyles(props) {
33
24
  styles: globalStyles
34
25
  });
35
26
  }
36
-
37
27
  process.env.NODE_ENV !== "production" ? GlobalStyles.propTypes = {
38
28
  defaultTheme: _propTypes.default.object,
39
29
  styles: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object, _propTypes.default.func])
@@ -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,33 +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 = StyledEngineProvider;
9
-
10
8
  var React = _interopRequireWildcard(require("react"));
11
-
12
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
-
14
10
  var _react2 = require("@emotion/react");
15
-
16
11
  var _cache = _interopRequireDefault(require("@emotion/cache"));
17
-
18
12
  var _jsxRuntime = require("react/jsx-runtime");
19
-
20
13
  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); }
21
-
22
14
  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; }
23
-
24
15
  // prepend: true moves MUI styles to the top of the <head> so they're loaded first.
25
16
  // It allows developers to easily override MUI styles with other styling solutions, like CSS modules.
26
17
  const cache = (0, _cache.default)({
27
18
  key: 'css',
28
19
  prepend: true
29
20
  });
30
-
31
21
  function StyledEngineProvider(props) {
32
22
  const {
33
23
  injectFirst,
@@ -38,13 +28,11 @@ function StyledEngineProvider(props) {
38
28
  children: children
39
29
  }) : children;
40
30
  }
41
-
42
31
  process.env.NODE_ENV !== "production" ? StyledEngineProvider.propTypes = {
43
32
  /**
44
33
  * Your component tree.
45
34
  */
46
35
  children: _propTypes.default.node,
47
-
48
36
  /**
49
37
  * By default, the styles are injected last in the <head> element of the page.
50
38
  * 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.7
1
+ /** @license MUI v5.10.14
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,37 +41,29 @@ Object.defineProperty(exports, "keyframes", {
42
41
  return _react.keyframes;
43
42
  }
44
43
  });
45
-
46
44
  var _styled = _interopRequireDefault(require("@emotion/styled"));
47
-
48
45
  var _react = require("@emotion/react");
49
-
50
46
  var _StyledEngineProvider = _interopRequireDefault(require("./StyledEngineProvider"));
51
-
52
47
  var _GlobalStyles = _interopRequireDefault(require("./GlobalStyles"));
53
-
54
48
  /* eslint-disable no-underscore-dangle */
49
+
55
50
  function styled(tag, options) {
56
51
  const stylesFactory = (0, _styled.default)(tag, options);
57
-
58
52
  if (process.env.NODE_ENV !== 'production') {
59
53
  return (...styles) => {
60
54
  const component = typeof tag === 'string' ? `"${tag}"` : 'component';
61
-
62
55
  if (styles.length === 0) {
63
56
  console.error([`MUI: Seems like you called \`styled(${component})()\` without a \`style\` argument.`, 'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join('\n'));
64
57
  } else if (styles.some(style => style === undefined)) {
65
58
  console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);
66
59
  }
67
-
68
60
  return stylesFactory(...styles);
69
61
  };
70
62
  }
71
-
72
63
  return stylesFactory;
73
- } // eslint-disable-next-line @typescript-eslint/naming-convention
74
-
64
+ }
75
65
 
66
+ // eslint-disable-next-line @typescript-eslint/naming-convention
76
67
  const internal_processStyles = (tag, processor) => {
77
68
  // Emotion attaches all the styles as `__emotion_styles`.
78
69
  // Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186
@@ -80,5 +71,4 @@ const internal_processStyles = (tag, processor) => {
80
71
  tag.__emotion_styles = processor(tag.__emotion_styles);
81
72
  }
82
73
  };
83
-
84
74
  exports.internal_processStyles = internal_processStyles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/styled-engine",
3
- "version": "5.10.7",
3
+ "version": "5.10.14",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "styled() API wrapper package for emotion.",
@@ -26,8 +26,8 @@
26
26
  "url": "https://opencollective.com/mui"
27
27
  },
28
28
  "dependencies": {
29
- "@babel/runtime": "^7.19.0",
30
- "@emotion/cache": "^11.10.3",
29
+ "@babel/runtime": "^7.20.1",
30
+ "@emotion/cache": "^11.10.5",
31
31
  "csstype": "^3.1.1",
32
32
  "prop-types": "^15.8.1"
33
33
  },