@mui/system 5.8.3 → 5.8.4

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 CHANGED
@@ -1,5 +1,85 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.8.4
4
+
5
+ <!-- generated comparing v5.8.3..master -->
6
+
7
+ _Jun 14, 2022_
8
+
9
+ A big thanks to the 24 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - 🚀 Added support for custom breakpoints in the `Grid` component by @boutahlilsoufiane
12
+ - 📚 Added guide on how to use Material UI with Shadow DOM by @cherniavskii
13
+ - many other 🐛 bug fixes and 📚 documentation improvements
14
+
15
+ ### `@mui/material@5.8.4`
16
+
17
+ - &#8203;<!-- 36 -->[Button] Add missing classes in `ButtonClasses` type (#33040) @ZeeshanTamboli
18
+ - &#8203;<!-- 20 -->[Grid] Fix prop-type key regression (#33123) @oliviertassinari
19
+ - &#8203;<!-- 19 -->[Grid] Support custom breakpoints (#31998) @boutahlilsoufiane
20
+ - &#8203;<!-- 18 -->[Grow] Limit CSS transition bug workaround to Safari 15.4 only (#32996) @igordanchenko
21
+ - &#8203;<!-- 17 -->[Hidden] Remove dependency on hoist-non-react-statics (#33015) @oliviertassinari
22
+ - &#8203;<!-- 12 -->[Link] Add support for CSS variables (#33036) @winderica
23
+ - &#8203;<!-- 07 -->[Popover] Export `getOffsetTop` & `getOffsetLeft` from Popover's index and add typings (#32959) @rart
24
+ - &#8203;<!-- 06 -->[Slider] Fix SliderValueLabelProps type (#32895) @oliviertassinari
25
+ - &#8203;<!-- 05 -->[Snackbar] Remove `RTL` direction specific logic (#32808) @aaarichter
26
+ - &#8203;<!-- 04 -->[StepIcon] Fix text centering when changing browser font size (#32706) @alansouzati
27
+ - &#8203;<!-- 02 -->[Tabs] Scroll by width of the first visible tab if only one tab is partially visible (#32778) @frankkluijtmans
28
+
29
+ ### `@mui/system@5.8.4`
30
+
31
+ - &#8203;<!-- 38 -->[Stack, system] Apply correct responsive styles if any custom breakpoints are provided (#32913) @ZeeshanTamboli
32
+ - &#8203;<!-- 03 -->[system] Fix missing typings for ColorFormat (#32417) @l-zoy
33
+
34
+ ### `@mui/codemod@5.8.4`
35
+
36
+ - &#8203;<!-- 35 -->[codemod] Add support for `@mui/styles/makeStyles` imports (#32962) @joshkel
37
+
38
+ ### `@mui/lab@5.0.0-alpha.86`
39
+
40
+ - &#8203;<!-- 08 -->[pickers] Fix broken ref forwarding (#33107) @oliviertassinari
41
+ - &#8203;<!-- 13 -->[lab] Fix React's `forwardRef` warning when importing from the index (#33134) @mnajdova
42
+
43
+ ### `@mui/base@5.0.0-alpha.85`
44
+
45
+ - &#8203;<!-- 11 -->[MenuUnstyled] Accept callbacks in componentsProps (#32997) @michaldudak
46
+ - &#8203;<!-- 10 -->[ModalUnstyled] Fix errors from the W3C validator about incorrect aria-hidden attribute on some elements (#30920) @mkrtchian
47
+ - &#8203;<!-- 09 -->[ModalUnstyled] Fix behavior of not respecting props ariaHidden value (#32055) @tech-meppem
48
+
49
+ ### `@mui/joy@5.0.0-alpha.32`
50
+
51
+ - &#8203;<!-- 16 -->[Joy] Miscellaneous card fixes (#33129) @siriwatknp
52
+ - &#8203;<!-- 15 -->[Joy] Miscellaneous fixes (#33073) @siriwatknp
53
+ - &#8203;<!-- 14 -->[Joy] Add typography and link docs (#33047) @siriwatknp
54
+
55
+ ### Docs
56
+
57
+ - &#8203;<!-- 40 -->[Contributing.md] Local install instructions (#32975) @Moizsohail
58
+ - &#8203;<!-- 32 -->[docs] Add responsive AppBar with drawer (#32769) @dvlprAlamin
59
+ - &#8203;<!-- 31 -->[docs] Move codesandbox to MUI org (#33122) @oliviertassinari
60
+ - &#8203;<!-- 30 -->[docs] Add Shadow DOM guide (#33007) @cherniavskii
61
+ - &#8203;<!-- 29 -->[docs] Fix typo in Material UI overview page (#33087) @oliviertassinari
62
+ - &#8203;<!-- 28 -->[docs] Miscellaneous fixes in `MUI Base` docs (#33091) @ZeeshanTamboli
63
+ - &#8203;<!-- 27 -->[docs] Fix GitHub capitalization (#33071) @oliviertassinari
64
+ - &#8203;<!-- 26 -->[docs] Fix a typo in `InputUnstyled` docs (#33077) @ZeeshanTamboli
65
+ - &#8203;<!-- 25 -->[docs] Add notification for Joy blog post (#33059) @siriwatknp
66
+ - &#8203;<!-- 24 -->[docs] Improve aspect ratio docs and integration (#33065) @siriwatknp
67
+ - &#8203;<!-- 34 -->[docs] Update code block copy label (#33128) @siriwatknp
68
+ - &#8203;<!-- 23 -->[docs] Fix typo in Autocomplete CSS API (#32838) @KeaghanKennedy
69
+ - &#8203;<!-- 22 -->[docs] Improvements for Radio Group Rating Docs (#32843) @Kai-W
70
+ - &#8203;<!-- 21 -->[docs] Enable Joy pages (#33064) @siriwatknp
71
+ - &#8203;<!-- 02 -->[website] Add Joy UI to the pricing page (#33099) @danilo-leal
72
+ - &#8203;<!-- 01 -->[website] Clarify the pricing a bit (#33069) @oliviertassinari
73
+
74
+ ### Core
75
+
76
+ - &#8203;<!-- 39 -->yarn proptypes @oliviertassinari
77
+ - &#8203;<!-- 34 -->[core] Update dependencies to fix security vulnerabilities (#33095) @michaldudak
78
+ - &#8203;<!-- 33 -->[core] Import new line convention (#33068) @oliviertassinari
79
+ - &#8203;<!-- 37 -->[core] Make repository configurable in changelog script (#33130) @Janpot
80
+
81
+ All contributors of this release in alphabetical order: @aaarichter, @alansouzati, @boutahlilsoufiane, @cherniavskii, @danilo-leal, @dvlprAlamin, @frankkluijtmans, @igordanchenko, @Janpot, @joshkel, @Kai-W, @KeaghanKennedy, @l-zoy, @michaldudak, @mkrtchian, @mnajdova, @Moizsohail, @oliviertassinari, @pushys, @rart, @siriwatknp, @tech-meppem, @winderica, @ZeeshanTamboli
82
+
3
83
  ## 5.8.3
4
84
 
5
85
  <!-- generated comparing v5.8.2..master -->
@@ -9,25 +89,25 @@ _Jun 7, 2022_
9
89
  A big thanks to the 15 contributors who made this release possible.
10
90
  This release is mostly about 🐛 bug fixes and 📚 documentation improvements.
11
91
 
12
- ## `@mui/material@5.8.3`
92
+ ### `@mui/material@5.8.3`
13
93
 
14
94
  - [Alert] Constrain message width and allow overflow (#32747) @Janpot
15
95
  - [Checkbox] Add support for CSS variables (#32579) @haneenmahd
16
96
  - [Slider] Fix positioning of tooltips on vertical slider (#32919) @abhinav-22-tech
17
97
 
18
- ## `@mui/system@5.8.3`
98
+ ### `@mui/system@5.8.3`
19
99
 
20
100
  - [system] Configurable attributes for libraries (#32971) @siriwatknp
21
101
 
22
- ## `@mui/codemod@5.8.3
102
+ ### `@mui/codemod@5.8.3`
23
103
 
24
104
  - [codemod] Fix infinite loop in jss-to-tss-react and add TODO (#33048) @ryancogswell
25
105
 
26
- ## `@mui/lab@5.0.0-alpha.85`
106
+ ### `@mui/lab@5.0.0-alpha.85`
27
107
 
28
108
  - [pickers] Add deprecations when importing pickers from the lab (#32950) @flaviendelangle
29
109
 
30
- ## `@mui/joy@5.0.0-alpha.31`
110
+ ### `@mui/joy@5.0.0-alpha.31`
31
111
 
32
112
  - [Joy] Add `Slider` component and demos (#32694) @hbjORbj
33
113
  - [Joy] Add articles about customization approaches (#32887) @siriwatknp
@@ -35,7 +115,7 @@ This release is mostly about 🐛 bug fixes and 📚 documentation improvements.
35
115
  - [Joy] Add docs about dark mode (#33002) @siriwatknp
36
116
  - [Joy] Add template UIs & first look blog post (#32791) @danilo-leal
37
117
 
38
- ## `@mui/base@5.0.0-alpha.84`
118
+ ### `@mui/base@5.0.0-alpha.84`
39
119
 
40
120
  - [base] Remove @mui/system in tests (#32945) @kevinji
41
121
  - [ButtonUnstyled] Accept callbacks in componentsProps (#32991) @michaldudak
@@ -44,7 +124,7 @@ This release is mostly about 🐛 bug fixes and 📚 documentation improvements.
44
124
  - [TabPanelUnstyled] Define ownerState and slot props' types (#32928) @michaldudak
45
125
  - [TabsListUnstyled] Define ownerState and slot props' types (#32925) @michaldudak
46
126
 
47
- ## Docs
127
+ ### Docs
48
128
 
49
129
  - [blog] Fix anchor link scroll (#32994) @oliviertassinari
50
130
  - [docs] Add "Migration" section to sidebar and revise v4-v5 content (#32740) @samuelsycamore
@@ -62,7 +142,7 @@ This release is mostly about 🐛 bug fixes and 📚 documentation improvements.
62
142
  - [website] Polish the pricing page (#32811) @oliviertassinari
63
143
  - [website] Remove unnecessary `address` dependency (#32957) @michaldudak
64
144
 
65
- ## Core
145
+ ### Core
66
146
 
67
147
  - [core] Improve icon synonyms (#32742) @oliviertassinari
68
148
  - [core] Prepare Next.js config for React 18 (#32963) @michaldudak
@@ -2000,7 +2080,7 @@ A big thanks to the 15 contributors who made this release possible. Here are som
2000
2080
  - &#8203;<!-- 33 -->[core] Add `experiments` index page (#29582) @siriwatknp
2001
2081
  - &#8203;<!-- 32 -->[core] Move s3 bucket ownership to mui-org (#29609) @eps1lon
2002
2082
  - &#8203;<!-- 31 -->[core] Improve support request message (#29614) @mnajdova
2003
- - &#8203;<!-- 30 -->[core] Use support request Github Action (#29594) @mnajdova
2083
+ - &#8203;<!-- 30 -->[core] Use support request GitHub Action (#29594) @mnajdova
2004
2084
  - &#8203;<!-- 29 -->[core] Remove unused `getJsxPreview` util (#29586) @ZeeshanTamboli
2005
2085
  - &#8203;<!-- 28 -->[core] Use GitHub issue forms (#28038) @oliviertassinari
2006
2086
  - &#8203;<!-- 26 -->[core] Add playground (#29423) @oliviertassinari
@@ -6055,7 +6135,7 @@ A big thanks to the 24 contributors who made this release possible. Here are som
6055
6135
  - [docs] Fix duplicated styles generated from emotion (#23809) @mnajdova
6056
6136
  - [docs] Fix icon alignment in /components/breadcrumbs (#23818) @eps1lon
6057
6137
  - [docs] Fix production deploy (#23963) @eps1lon
6058
- - [docs] Fix source on Github links (#23821) @praveenkumar-kalidass
6138
+ - [docs] Fix source on GitHub links (#23821) @praveenkumar-kalidass
6059
6139
  - [docs] Fix StickyHeaderTable round borders (#23882) @antoniopacheco
6060
6140
  - [docs] Fix typo in date picker dayjs adapter name (#23935) @andresmrm
6061
6141
  - [docs] Improve system properties page (#23961) @mnajdova
package/breakpoints.js CHANGED
@@ -180,9 +180,11 @@ function resolveBreakpointValues({
180
180
  if (Array.isArray(breakpointValues)) {
181
181
  acc[breakpoint] = breakpointValues[i] != null ? breakpointValues[i] : breakpointValues[previous];
182
182
  previous = i;
183
- } else {
184
- acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous] || breakpointValues;
183
+ } else if (typeof breakpointValues === 'object') {
184
+ acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous];
185
185
  previous = breakpoint;
186
+ } else {
187
+ acc[breakpoint] = breakpointValues;
186
188
  }
187
189
 
188
190
  return acc;
@@ -1,4 +1,4 @@
1
- export type ColorFormat = 'rgb' | 'rgba' | 'hsl' | 'hsla';
1
+ export type ColorFormat = 'rgb' | 'rgba' | 'hsl' | 'hsla' | 'color';
2
2
  export interface ColorObject {
3
3
  type: ColorFormat;
4
4
  values: [number, number, number] | [number, number, number, number];
@@ -63,7 +63,7 @@ function intToHex(int) {
63
63
  * Returns an object with the type and values of a color.
64
64
  *
65
65
  * Note: Does not support rgb % values.
66
- * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
66
+ * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()
67
67
  * @returns {object} - A MUI color object: {type: string, values: number[]}
68
68
  */
69
69
 
@@ -115,7 +115,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
115
115
  /**
116
116
  * Returns a channel created from the input color.
117
117
  *
118
- * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
118
+ * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()
119
119
  * @returns {string} - The channel for the color, that can be used in rgba or hsla colors
120
120
  */
121
121
 
@@ -127,7 +127,7 @@ const colorChannel = color => {
127
127
  /**
128
128
  * Converts a color object with type and values to a string.
129
129
  * @param {object} color - Decomposed color
130
- * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla'
130
+ * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla', 'color'
131
131
  * @param {array} color.values - [n,n,n] or [n,n,n,n]
132
132
  * @returns {string} A CSS color string
133
133
  */
package/createStyled.js CHANGED
@@ -136,7 +136,7 @@ function createStyled(input = {}) {
136
136
 
137
137
  const muiStyledResolver = (styleArg, ...expressions) => {
138
138
  const expressionsWithDefaultTheme = expressions ? expressions.map(stylesArg => {
139
- // On the server emotion doesn't use React.forwardRef for creating components, so the created
139
+ // On the server Emotion doesn't use React.forwardRef for creating components, so the created
140
140
  // component stays as a function. This condition makes sure that we do not interpolate functions
141
141
  // which are basically components used as a selectors.
142
142
  // eslint-disable-next-line no-underscore-dangle
@@ -194,7 +194,7 @@ function createStyled(input = {}) {
194
194
 
195
195
  transformedStyleArg = [...styleArg, ...placeholders];
196
196
  transformedStyleArg.raw = [...styleArg.raw, ...placeholders];
197
- } else if (typeof styleArg === 'function' && // On the server emotion doesn't use React.forwardRef for creating components, so the created
197
+ } else if (typeof styleArg === 'function' && // On the server Emotion doesn't use React.forwardRef for creating components, so the created
198
198
  // component stays as a function. This condition makes sure that we do not interpolate functions
199
199
  // which are basically components used as a selectors.
200
200
  // eslint-disable-next-line no-underscore-dangle
@@ -154,9 +154,11 @@ export function resolveBreakpointValues({
154
154
  if (Array.isArray(breakpointValues)) {
155
155
  acc[breakpoint] = breakpointValues[i] != null ? breakpointValues[i] : breakpointValues[previous];
156
156
  previous = i;
157
- } else {
158
- acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous] || breakpointValues;
157
+ } else if (typeof breakpointValues === 'object') {
158
+ acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous];
159
159
  previous = breakpoint;
160
+ } else {
161
+ acc[breakpoint] = breakpointValues;
160
162
  }
161
163
 
162
164
  return acc;
@@ -45,7 +45,7 @@ function intToHex(int) {
45
45
  * Returns an object with the type and values of a color.
46
46
  *
47
47
  * Note: Does not support rgb % values.
48
- * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
48
+ * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()
49
49
  * @returns {object} - A MUI color object: {type: string, values: number[]}
50
50
  */
51
51
 
@@ -97,7 +97,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
97
97
  /**
98
98
  * Returns a channel created from the input color.
99
99
  *
100
- * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
100
+ * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()
101
101
  * @returns {string} - The channel for the color, that can be used in rgba or hsla colors
102
102
  */
103
103
 
@@ -108,7 +108,7 @@ export const colorChannel = color => {
108
108
  /**
109
109
  * Converts a color object with type and values to a string.
110
110
  * @param {object} color - Decomposed color
111
- * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla'
111
+ * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla', 'color'
112
112
  * @param {array} color.values - [n,n,n] or [n,n,n,n]
113
113
  * @returns {string} A CSS color string
114
114
  */
@@ -117,7 +117,7 @@ export default function createStyled(input = {}) {
117
117
 
118
118
  const muiStyledResolver = (styleArg, ...expressions) => {
119
119
  const expressionsWithDefaultTheme = expressions ? expressions.map(stylesArg => {
120
- // On the server emotion doesn't use React.forwardRef for creating components, so the created
120
+ // On the server Emotion doesn't use React.forwardRef for creating components, so the created
121
121
  // component stays as a function. This condition makes sure that we do not interpolate functions
122
122
  // which are basically components used as a selectors.
123
123
  // eslint-disable-next-line no-underscore-dangle
@@ -176,7 +176,7 @@ export default function createStyled(input = {}) {
176
176
 
177
177
  transformedStyleArg = [...styleArg, ...placeholders];
178
178
  transformedStyleArg.raw = [...styleArg.raw, ...placeholders];
179
- } else if (typeof styleArg === 'function' && // On the server emotion doesn't use React.forwardRef for creating components, so the created
179
+ } else if (typeof styleArg === 'function' && // On the server Emotion doesn't use React.forwardRef for creating components, so the created
180
180
  // component stays as a function. This condition makes sure that we do not interpolate functions
181
181
  // which are basically components used as a selectors.
182
182
  // eslint-disable-next-line no-underscore-dangle
@@ -39,7 +39,7 @@ export function unstable_createStyleFunctionSx(styleFunctionMapping = defaultSty
39
39
  } = props || {};
40
40
 
41
41
  if (!sx) {
42
- return null; // emotion & styled-components will neglect null
42
+ return null; // Emotion & styled-components will neglect null
43
43
  }
44
44
  /*
45
45
  * Receive `sxInput` as object or callback
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.8.3
1
+ /** @license MUI v5.8.4
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.
@@ -167,9 +167,11 @@ export function resolveBreakpointValues(_ref) {
167
167
  if (Array.isArray(breakpointValues)) {
168
168
  acc[breakpoint] = breakpointValues[i] != null ? breakpointValues[i] : breakpointValues[previous];
169
169
  previous = i;
170
- } else {
171
- acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous] || breakpointValues;
170
+ } else if (_typeof(breakpointValues) === 'object') {
171
+ acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous];
172
172
  previous = breakpoint;
173
+ } else {
174
+ acc[breakpoint] = breakpointValues;
173
175
  }
174
176
 
175
177
  return acc;
@@ -50,7 +50,7 @@ function intToHex(int) {
50
50
  * Returns an object with the type and values of a color.
51
51
  *
52
52
  * Note: Does not support rgb % values.
53
- * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
53
+ * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()
54
54
  * @returns {object} - A MUI color object: {type: string, values: number[]}
55
55
  */
56
56
 
@@ -102,7 +102,7 @@ export function decomposeColor(color) {
102
102
  /**
103
103
  * Returns a channel created from the input color.
104
104
  *
105
- * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
105
+ * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()
106
106
  * @returns {string} - The channel for the color, that can be used in rgba or hsla colors
107
107
  */
108
108
 
@@ -115,7 +115,7 @@ export var colorChannel = function colorChannel(color) {
115
115
  /**
116
116
  * Converts a color object with type and values to a string.
117
117
  * @param {object} color - Decomposed color
118
- * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla'
118
+ * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla', 'color'
119
119
  * @param {array} color.values - [n,n,n] or [n,n,n,n]
120
120
  * @returns {string} A CSS color string
121
121
  */
@@ -122,7 +122,7 @@ export default function createStyled() {
122
122
  }
123
123
 
124
124
  var expressionsWithDefaultTheme = expressions ? expressions.map(function (stylesArg) {
125
- // On the server emotion doesn't use React.forwardRef for creating components, so the created
125
+ // On the server Emotion doesn't use React.forwardRef for creating components, so the created
126
126
  // component stays as a function. This condition makes sure that we do not interpolate functions
127
127
  // which are basically components used as a selectors.
128
128
  // eslint-disable-next-line no-underscore-dangle
@@ -183,7 +183,7 @@ export default function createStyled() {
183
183
 
184
184
  transformedStyleArg = [].concat(_toConsumableArray(styleArg), _toConsumableArray(placeholders));
185
185
  transformedStyleArg.raw = [].concat(_toConsumableArray(styleArg.raw), _toConsumableArray(placeholders));
186
- } else if (typeof styleArg === 'function' && // On the server emotion doesn't use React.forwardRef for creating components, so the created
186
+ } else if (typeof styleArg === 'function' && // On the server Emotion doesn't use React.forwardRef for creating components, so the created
187
187
  // component stays as a function. This condition makes sure that we do not interpolate functions
188
188
  // which are basically components used as a selectors.
189
189
  // eslint-disable-next-line no-underscore-dangle
package/legacy/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.8.3
1
+ /** @license MUI v5.8.4
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.
@@ -47,7 +47,7 @@ export function unstable_createStyleFunctionSx() {
47
47
  theme = _ref2$theme === void 0 ? {} : _ref2$theme;
48
48
 
49
49
  if (!sx) {
50
- return null; // emotion & styled-components will neglect null
50
+ return null; // Emotion & styled-components will neglect null
51
51
  }
52
52
  /*
53
53
  * Receive `sxInput` as object or callback
@@ -152,9 +152,11 @@ export function resolveBreakpointValues({
152
152
  if (Array.isArray(breakpointValues)) {
153
153
  acc[breakpoint] = breakpointValues[i] != null ? breakpointValues[i] : breakpointValues[previous];
154
154
  previous = i;
155
- } else {
156
- acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous] || breakpointValues;
155
+ } else if (typeof breakpointValues === 'object') {
156
+ acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous];
157
157
  previous = breakpoint;
158
+ } else {
159
+ acc[breakpoint] = breakpointValues;
158
160
  }
159
161
 
160
162
  return acc;
@@ -45,7 +45,7 @@ function intToHex(int) {
45
45
  * Returns an object with the type and values of a color.
46
46
  *
47
47
  * Note: Does not support rgb % values.
48
- * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
48
+ * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()
49
49
  * @returns {object} - A MUI color object: {type: string, values: number[]}
50
50
  */
51
51
 
@@ -97,7 +97,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
97
97
  /**
98
98
  * Returns a channel created from the input color.
99
99
  *
100
- * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
100
+ * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()
101
101
  * @returns {string} - The channel for the color, that can be used in rgba or hsla colors
102
102
  */
103
103
 
@@ -108,7 +108,7 @@ export const colorChannel = color => {
108
108
  /**
109
109
  * Converts a color object with type and values to a string.
110
110
  * @param {object} color - Decomposed color
111
- * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla'
111
+ * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla', 'color'
112
112
  * @param {array} color.values - [n,n,n] or [n,n,n,n]
113
113
  * @returns {string} A CSS color string
114
114
  */
@@ -115,7 +115,7 @@ export default function createStyled(input = {}) {
115
115
 
116
116
  const muiStyledResolver = (styleArg, ...expressions) => {
117
117
  const expressionsWithDefaultTheme = expressions ? expressions.map(stylesArg => {
118
- // On the server emotion doesn't use React.forwardRef for creating components, so the created
118
+ // On the server Emotion doesn't use React.forwardRef for creating components, so the created
119
119
  // component stays as a function. This condition makes sure that we do not interpolate functions
120
120
  // which are basically components used as a selectors.
121
121
  // eslint-disable-next-line no-underscore-dangle
@@ -174,7 +174,7 @@ export default function createStyled(input = {}) {
174
174
 
175
175
  transformedStyleArg = [...styleArg, ...placeholders];
176
176
  transformedStyleArg.raw = [...styleArg.raw, ...placeholders];
177
- } else if (typeof styleArg === 'function' && // On the server emotion doesn't use React.forwardRef for creating components, so the created
177
+ } else if (typeof styleArg === 'function' && // On the server Emotion doesn't use React.forwardRef for creating components, so the created
178
178
  // component stays as a function. This condition makes sure that we do not interpolate functions
179
179
  // which are basically components used as a selectors.
180
180
  // eslint-disable-next-line no-underscore-dangle
package/modern/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.8.3
1
+ /** @license MUI v5.8.4
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.
@@ -39,7 +39,7 @@ export function unstable_createStyleFunctionSx(styleFunctionMapping = defaultSty
39
39
  } = props || {};
40
40
 
41
41
  if (!sx) {
42
- return null; // emotion & styled-components will neglect null
42
+ return null; // Emotion & styled-components will neglect null
43
43
  }
44
44
  /*
45
45
  * Receive `sxInput` as object or callback
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/system",
3
- "version": "5.8.3",
3
+ "version": "5.8.4",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "CSS utilities for rapidly laying out custom designs.",
@@ -44,10 +44,10 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@babel/runtime": "^7.17.2",
47
- "@mui/private-theming": "^5.8.0",
47
+ "@mui/private-theming": "^5.8.4",
48
48
  "@mui/styled-engine": "^5.8.0",
49
- "@mui/types": "^7.1.3",
50
- "@mui/utils": "^5.8.0",
49
+ "@mui/types": "^7.1.4",
50
+ "@mui/utils": "^5.8.4",
51
51
  "clsx": "^1.1.1",
52
52
  "csstype": "^3.1.0",
53
53
  "prop-types": "^15.8.1"
package/style.d.ts CHANGED
@@ -13,3 +13,4 @@ export interface StyleOptions<PropKey> {
13
13
  export function style<PropKey extends string, Theme extends object>(
14
14
  options: StyleOptions<PropKey>,
15
15
  ): StyleFunction<{ [K in PropKey]?: unknown } & { theme?: Theme }> & { filterProps: string[] };
16
+ export function getPath<T>(obj: T, path: string | undefined, checkVars?: boolean): null | unknown;
@@ -51,7 +51,7 @@ function unstable_createStyleFunctionSx(styleFunctionMapping = _getThemeValue.st
51
51
  } = props || {};
52
52
 
53
53
  if (!sx) {
54
- return null; // emotion & styled-components will neglect null
54
+ return null; // Emotion & styled-components will neglect null
55
55
  }
56
56
  /*
57
57
  * Receive `sxInput` as object or callback