@mui/system 5.0.5 → 5.0.6

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/Box/Box.spec.d.ts CHANGED
@@ -1 +1 @@
1
- export {};
1
+ export {};
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  ### [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.0.6
4
+
5
+ <!-- generated comparing v5.0.5..master -->
6
+
7
+ _Oct 27, 2021_
8
+
9
+ A big thanks to the 4 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - 🔧 Fix reported TypeScript issues on the `@mui/system` package because some packages were not released
12
+
13
+ ### `@mui/material@5.0.6`
14
+
15
+ - &#8203;<!-- 4 -->[Autocomplete] Fix `clearOnBlur` prop (#29208) @hbjORbj
16
+ - &#8203;<!-- 2 -->[Rating] Remove z-index from decimal stars (#29295) @williamhaley
17
+
18
+ ### `@mui/system@5.0.6`
19
+
20
+ - &#8203;<!-- 5 -->[system] Fix various issues reported by using @mui/styled-engine-sc (#29035) @mnajdova
21
+ - &#8203;<!-- 1 -->[system] Fix executing server-side Emotion component as function interpolation (#29290) @Andarist
22
+
23
+ ### Docs
24
+
25
+ - &#8203;<!-- 3 -->[blog] Q3 2021 Update (#28970) @oliviertassinari
26
+
27
+ All contributors of this release in alphabetical order: @Andarist, @hbjORbj, @oliviertassinari, @williamhaley
28
+
3
29
  ## 5.0.5
4
30
 
5
31
  <!-- generated comparing v5.0.4..master -->
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2014 Call-Em-All
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 Call-Em-All
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/createStyled.js CHANGED
@@ -134,7 +134,11 @@ function createStyled(input = {}) {
134
134
 
135
135
  const muiStyledResolver = (styleArg, ...expressions) => {
136
136
  const expressionsWithDefaultTheme = expressions ? expressions.map(stylesArg => {
137
- return typeof stylesArg === 'function' ? _ref => {
137
+ // On the server emotion doesn't use React.forwardRef for creating components, so the created
138
+ // component stays as a function. This condition makes sure that we do not interpolate functions
139
+ // which are basically components used as a selectors.
140
+ // eslint-disable-next-line no-underscore-dangle
141
+ return typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg ? _ref => {
138
142
  let {
139
143
  theme: themeInput
140
144
  } = _ref,
@@ -1,10 +1,10 @@
1
- export declare type SpacingOptions = number | Spacing | ((abs: number) => number | string) | ((abs: number | string) => number | string) | ReadonlyArray<string | number>;
2
- export declare type SpacingArgument = number | string;
3
- export interface Spacing {
4
- (): string;
5
- (value: number): string;
6
- (topBottom: SpacingArgument, rightLeft: SpacingArgument): string;
7
- (top: SpacingArgument, rightLeft: SpacingArgument, bottom: SpacingArgument): string;
8
- (top: SpacingArgument, right: SpacingArgument, bottom: SpacingArgument, left: SpacingArgument): string;
9
- }
10
- export default function createSpacing(spacingInput?: SpacingOptions): Spacing;
1
+ export declare type SpacingOptions = number | Spacing | ((abs: number) => number | string) | ((abs: number | string) => number | string) | ReadonlyArray<string | number>;
2
+ export declare type SpacingArgument = number | string;
3
+ export interface Spacing {
4
+ (): string;
5
+ (value: number): string;
6
+ (topBottom: SpacingArgument, rightLeft: SpacingArgument): string;
7
+ (top: SpacingArgument, rightLeft: SpacingArgument, bottom: SpacingArgument): string;
8
+ (top: SpacingArgument, right: SpacingArgument, bottom: SpacingArgument, left: SpacingArgument): string;
9
+ }
10
+ export default function createSpacing(spacingInput?: SpacingOptions): Spacing;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,57 +1,57 @@
1
- declare type NestedRecord<V = any> = {
2
- [k: string | number]: NestedRecord<V> | V;
3
- };
4
- /**
5
- * This function create an object from keys, value and then assign to target
6
- *
7
- * @param {Object} obj : the target object to be assigned
8
- * @param {string[]} keys
9
- * @param {string | number} value
10
- *
11
- * @example
12
- * const source = {}
13
- * assignNestedKeys(source, ['palette', 'primary'], 'var(--palette-primary)')
14
- * console.log(source) // { palette: { primary: 'var(--palette-primary)' } }
15
- *
16
- * @example
17
- * const source = { palette: { primary: 'var(--palette-primary)' } }
18
- * assignNestedKeys(source, ['palette', 'secondary'], 'var(--palette-secondary)')
19
- * console.log(source) // { palette: { primary: 'var(--palette-primary)', secondary: 'var(--palette-secondary)' } }
20
- */
21
- export declare const assignNestedKeys: <Object_1 = NestedRecord<any>, Value = any>(obj: Object_1, keys: Array<string>, value: Value) => void;
22
- /**
23
- *
24
- * @param {Object} obj : source object
25
- * @param {Function} callback : a function that will be called when
26
- * - the deepest key in source object is reached
27
- * - the value of the deepest key is NOT `undefined` | `null`
28
- *
29
- * @example
30
- * walkObjectDeep({ palette: { primary: { main: '#000000' } } }, console.log)
31
- * // ['palette', 'primary', 'main'] '#000000'
32
- */
33
- export declare const walkObjectDeep: <Value, T = Record<string, any>>(obj: T, callback: (keys: Array<string>, value: Value) => void) => void;
34
- /**
35
- * a function that parse theme and return { css, vars }
36
- *
37
- * @param {Object} theme
38
- * @param {{ prefix?: string }} options
39
- * @returns {{ css: Object, vars: Object }} `css` is the stylesheet, `vars` is an object to get css variable (same structure as theme)
40
- *
41
- * @example
42
- * const { css, vars } = parser({
43
- * fontSize: 12,
44
- * lineHeight: 1.2,
45
- * palette: { primary: { 500: '#000000' } }
46
- * })
47
- *
48
- * console.log(css) // { '--fontSize': '12px', '--lineHeight': 1.2, '--palette-primary-500': '#000000' }
49
- * console.log(vars) // { fontSize: '--fontSize', lineHeight: '--lineHeight', palette: { primary: { 500: 'var(--palette-primary-500)' } } }
50
- */
51
- export default function cssVarsParser(obj: Record<string, any>, options?: {
52
- prefix?: string;
53
- }): {
54
- css: NestedRecord<string>;
55
- vars: NestedRecord<string>;
56
- };
57
- export {};
1
+ declare type NestedRecord<V = any> = {
2
+ [k: string | number]: NestedRecord<V> | V;
3
+ };
4
+ /**
5
+ * This function create an object from keys, value and then assign to target
6
+ *
7
+ * @param {Object} obj : the target object to be assigned
8
+ * @param {string[]} keys
9
+ * @param {string | number} value
10
+ *
11
+ * @example
12
+ * const source = {}
13
+ * assignNestedKeys(source, ['palette', 'primary'], 'var(--palette-primary)')
14
+ * console.log(source) // { palette: { primary: 'var(--palette-primary)' } }
15
+ *
16
+ * @example
17
+ * const source = { palette: { primary: 'var(--palette-primary)' } }
18
+ * assignNestedKeys(source, ['palette', 'secondary'], 'var(--palette-secondary)')
19
+ * console.log(source) // { palette: { primary: 'var(--palette-primary)', secondary: 'var(--palette-secondary)' } }
20
+ */
21
+ export declare const assignNestedKeys: <Object_1 = NestedRecord<any>, Value = any>(obj: Object_1, keys: Array<string>, value: Value) => void;
22
+ /**
23
+ *
24
+ * @param {Object} obj : source object
25
+ * @param {Function} callback : a function that will be called when
26
+ * - the deepest key in source object is reached
27
+ * - the value of the deepest key is NOT `undefined` | `null`
28
+ *
29
+ * @example
30
+ * walkObjectDeep({ palette: { primary: { main: '#000000' } } }, console.log)
31
+ * // ['palette', 'primary', 'main'] '#000000'
32
+ */
33
+ export declare const walkObjectDeep: <Value, T = Record<string, any>>(obj: T, callback: (keys: Array<string>, value: Value) => void) => void;
34
+ /**
35
+ * a function that parse theme and return { css, vars }
36
+ *
37
+ * @param {Object} theme
38
+ * @param {{ prefix?: string }} options
39
+ * @returns {{ css: Object, vars: Object }} `css` is the stylesheet, `vars` is an object to get css variable (same structure as theme)
40
+ *
41
+ * @example
42
+ * const { css, vars } = parser({
43
+ * fontSize: 12,
44
+ * lineHeight: 1.2,
45
+ * palette: { primary: { 500: '#000000' } }
46
+ * })
47
+ *
48
+ * console.log(css) // { '--fontSize': '12px', '--lineHeight': 1.2, '--palette-primary-500': '#000000' }
49
+ * console.log(vars) // { fontSize: '--fontSize', lineHeight: '--lineHeight', palette: { primary: { 500: 'var(--palette-primary-500)' } } }
50
+ */
51
+ export default function cssVarsParser(obj: Record<string, any>, options?: {
52
+ prefix?: string;
53
+ }): {
54
+ css: NestedRecord<string>;
55
+ vars: NestedRecord<string>;
56
+ };
57
+ export {};
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
2
- export declare const DEFAULT_STORAGE_KEY = "mui-color-scheme";
3
- export declare const DEFAULT_ATTRIBUTE = "data-mui-color-scheme";
4
- export default function getInitColorSchemeScript(options?: {
5
- storageKey?: string;
6
- attribute?: string;
7
- }): JSX.Element;
1
+ /// <reference types="react" />
2
+ export declare const DEFAULT_STORAGE_KEY = "mui-color-scheme";
3
+ export declare const DEFAULT_ATTRIBUTE = "data-mui-color-scheme";
4
+ export default function getInitColorSchemeScript(options?: {
5
+ storageKey?: string;
6
+ attribute?: string;
7
+ }): JSX.Element;
@@ -1,2 +1,2 @@
1
- export { default } from './createCssVarsProvider';
2
- export type { BuildCssVarsTheme } from './createCssVarsProvider';
1
+ export { default } from './createCssVarsProvider';
2
+ export type { BuildCssVarsTheme } from './createCssVarsProvider';
@@ -115,7 +115,11 @@ export default function createStyled(input = {}) {
115
115
 
116
116
  const muiStyledResolver = (styleArg, ...expressions) => {
117
117
  const expressionsWithDefaultTheme = expressions ? expressions.map(stylesArg => {
118
- return typeof stylesArg === 'function' ? _ref => {
118
+ // On the server emotion doesn't use React.forwardRef for creating components, so the created
119
+ // component stays as a function. This condition makes sure that we do not interpolate functions
120
+ // which are basically components used as a selectors.
121
+ // eslint-disable-next-line no-underscore-dangle
122
+ return typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg ? _ref => {
119
123
  let {
120
124
  theme: themeInput
121
125
  } = _ref,
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.0.5
1
+ /** @license MUI v5.0.6
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.
package/index.spec.d.ts CHANGED
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -118,7 +118,11 @@ export default function createStyled() {
118
118
  }
119
119
 
120
120
  var expressionsWithDefaultTheme = expressions ? expressions.map(function (stylesArg) {
121
- return typeof stylesArg === 'function' ? function (_ref) {
121
+ // On the server emotion doesn't use React.forwardRef for creating components, so the created
122
+ // component stays as a function. This condition makes sure that we do not interpolate functions
123
+ // which are basically components used as a selectors.
124
+ // eslint-disable-next-line no-underscore-dangle
125
+ return typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg ? function (_ref) {
122
126
  var themeInput = _ref.theme,
123
127
  other = _objectWithoutProperties(_ref, ["theme"]);
124
128
 
package/legacy/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.0.5
1
+ /** @license MUI v5.0.6
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.
@@ -113,7 +113,11 @@ export default function createStyled(input = {}) {
113
113
 
114
114
  const muiStyledResolver = (styleArg, ...expressions) => {
115
115
  const expressionsWithDefaultTheme = expressions ? expressions.map(stylesArg => {
116
- return typeof stylesArg === 'function' ? _ref => {
116
+ // On the server emotion doesn't use React.forwardRef for creating components, so the created
117
+ // component stays as a function. This condition makes sure that we do not interpolate functions
118
+ // which are basically components used as a selectors.
119
+ // eslint-disable-next-line no-underscore-dangle
120
+ return typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg ? _ref => {
117
121
  let {
118
122
  theme: themeInput
119
123
  } = _ref,
package/modern/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.0.5
1
+ /** @license MUI v5.0.6
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/system",
3
- "version": "5.0.5",
3
+ "version": "5.0.6",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "CSS utilities for rapidly laying out custom designs.",
@@ -45,7 +45,7 @@
45
45
  "dependencies": {
46
46
  "@babel/runtime": "^7.15.4",
47
47
  "@mui/private-theming": "^5.0.1",
48
- "@mui/styled-engine": "^5.0.1",
48
+ "@mui/styled-engine": "^5.0.2",
49
49
  "@mui/types": "^7.0.0",
50
50
  "@mui/utils": "^5.0.1",
51
51
  "clsx": "^1.1.1",