@mui/system 5.9.3 → 5.10.0

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.
Files changed (65) hide show
  1. package/Box/Box.spec.d.ts +1 -1
  2. package/CHANGELOG.md +65 -4
  3. package/Container/Container.d.ts +13 -13
  4. package/Container/ContainerProps.d.ts +40 -40
  5. package/Container/containerClasses.d.ts +22 -22
  6. package/Container/createContainer.d.ts +18 -18
  7. package/README.md +1 -1
  8. package/Stack/Stack.d.ts +12 -0
  9. package/Stack/Stack.js +62 -0
  10. package/Stack/StackProps.d.ts +42 -0
  11. package/Stack/StackProps.js +5 -0
  12. package/Stack/createStack.d.ts +21 -0
  13. package/Stack/createStack.js +209 -0
  14. package/Stack/index.d.ts +5 -0
  15. package/Stack/index.js +65 -0
  16. package/Stack/package.json +6 -0
  17. package/Stack/stackClasses.d.ts +8 -0
  18. package/Stack/stackClasses.js +17 -0
  19. package/Unstable_Grid/Grid.d.ts +12 -12
  20. package/Unstable_Grid/GridProps.d.ts +162 -162
  21. package/Unstable_Grid/createGrid.d.ts +11 -11
  22. package/Unstable_Grid/gridClasses.d.ts +20 -20
  23. package/Unstable_Grid/gridGenerator.d.ts +26 -26
  24. package/Unstable_Grid/index.d.ts +5 -5
  25. package/breakpoints.d.ts +21 -0
  26. package/createBox.js +3 -1
  27. package/createBox.spec.d.ts +1 -1
  28. package/createStyled.js +30 -11
  29. package/createTheme/createSpacing.d.ts +10 -10
  30. package/cssVars/createCssVarsProvider.spec.d.ts +1 -1
  31. package/cssVars/createGetCssVar.d.ts +5 -5
  32. package/cssVars/cssVarsParser.d.ts +65 -65
  33. package/cssVars/getInitColorSchemeScript.d.ts +45 -45
  34. package/cssVars/index.d.ts +3 -3
  35. package/cssVars/useCurrentColorScheme.d.ts +53 -53
  36. package/esm/Stack/Stack.js +51 -0
  37. package/esm/Stack/StackProps.js +1 -0
  38. package/esm/Stack/createStack.js +179 -0
  39. package/esm/Stack/index.js +5 -0
  40. package/esm/Stack/stackClasses.js +6 -0
  41. package/esm/createBox.js +3 -1
  42. package/esm/createStyled.js +28 -10
  43. package/esm/index.js +3 -1
  44. package/index.d.ts +4 -6
  45. package/index.js +25 -2
  46. package/index.spec.d.ts +1 -1
  47. package/legacy/Stack/Stack.js +51 -0
  48. package/legacy/Stack/StackProps.js +1 -0
  49. package/legacy/Stack/createStack.js +187 -0
  50. package/legacy/Stack/index.js +5 -0
  51. package/legacy/Stack/stackClasses.js +6 -0
  52. package/legacy/createBox.js +5 -1
  53. package/legacy/createStyled.js +31 -10
  54. package/legacy/index.js +4 -2
  55. package/modern/Stack/Stack.js +51 -0
  56. package/modern/Stack/StackProps.js +1 -0
  57. package/modern/Stack/createStack.js +179 -0
  58. package/modern/Stack/index.js +5 -0
  59. package/modern/Stack/stackClasses.js +6 -0
  60. package/modern/createBox.js +3 -1
  61. package/modern/createStyled.js +28 -10
  62. package/modern/index.js +4 -2
  63. package/package.json +3 -3
  64. package/spacing.d.ts +6 -0
  65. package/styleFunctionSx/styleFunctionSx.spec.d.ts +1 -1
@@ -1,8 +1,10 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
- import _extends from "@babel/runtime/helpers/esm/extends";
4
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
- import styledEngineStyled from '@mui/styled-engine';
4
+ import _extends from "@babel/runtime/helpers/esm/extends";
5
+
6
+ /* eslint-disable no-underscore-dangle */
7
+ import styledEngineStyled, { internal_processStyles as processStyles } from '@mui/styled-engine';
6
8
  import { getDisplayName } from '@mui/utils';
7
9
  import createTheme from './createTheme';
8
10
  import propsToClassKey from './propsToClassKey';
@@ -10,6 +12,14 @@ import defaultStyleFunctionSx from './styleFunctionSx';
10
12
 
11
13
  function isEmpty(obj) {
12
14
  return Object.keys(obj).length === 0;
15
+ } // https://github.com/emotion-js/emotion/blob/26ded6109fcd8ca9875cc2ce4564fee678a3f3c5/packages/styled/src/utils.js#L40
16
+
17
+
18
+ function isStringTag(tag) {
19
+ return typeof tag === 'string' && // 96 is one less than the char code
20
+ // for "a" so this is checking that
21
+ // it's a lowercase character
22
+ tag.charCodeAt(0) > 96;
13
23
  }
14
24
 
15
25
  var getStyleOverrides = function getStyleOverrides(name, theme) {
@@ -81,8 +91,23 @@ export default function createStyled() {
81
91
  slotShouldForwardProp = _input$slotShouldForw === void 0 ? shouldForwardProp : _input$slotShouldForw,
82
92
  _input$styleFunctionS = input.styleFunctionSx,
83
93
  styleFunctionSx = _input$styleFunctionS === void 0 ? defaultStyleFunctionSx : _input$styleFunctionS;
94
+
95
+ var systemSx = function systemSx(props) {
96
+ var theme = isEmpty(props.theme) ? defaultTheme : props.theme;
97
+ return styleFunctionSx(_extends({}, props, {
98
+ theme: theme
99
+ }));
100
+ };
101
+
102
+ systemSx.__mui_systemSx = true;
84
103
  return function (tag) {
85
104
  var inputOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
105
+ // Filter out the `sx` style function from the previous styled component to prevent unnecessary styles generated by the composite components.
106
+ processStyles(tag, function (styles) {
107
+ return styles.filter(function (style) {
108
+ return !(style != null && style.__mui_systemSx);
109
+ });
110
+ });
86
111
 
87
112
  var componentName = inputOptions.name,
88
113
  componentSlot = inputOptions.slot,
@@ -109,6 +134,9 @@ export default function createStyled() {
109
134
  } else if (componentSlot) {
110
135
  // any other slot specified
111
136
  shouldForwardPropOption = slotShouldForwardProp;
137
+ } else if (isStringTag(tag)) {
138
+ // for string (html) tag, preserve the behavior in emotion & styled-components.
139
+ shouldForwardPropOption = undefined;
112
140
  }
113
141
 
114
142
  var defaultStyledResolver = styledEngineStyled(tag, _extends({
@@ -125,7 +153,6 @@ export default function createStyled() {
125
153
  // On the server Emotion doesn't use React.forwardRef for creating components, so the created
126
154
  // component stays as a function. This condition makes sure that we do not interpolate functions
127
155
  // which are basically components used as a selectors.
128
- // eslint-disable-next-line no-underscore-dangle
129
156
  return typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg ? function (_ref) {
130
157
  var themeInput = _ref.theme,
131
158
  other = _objectWithoutProperties(_ref, ["theme"]);
@@ -168,12 +195,7 @@ export default function createStyled() {
168
195
  }
169
196
 
170
197
  if (!skipSx) {
171
- expressionsWithDefaultTheme.push(function (props) {
172
- var theme = isEmpty(props.theme) ? defaultTheme : props.theme;
173
- return styleFunctionSx(_extends({}, props, {
174
- theme: theme
175
- }));
176
- });
198
+ expressionsWithDefaultTheme.push(systemSx);
177
199
  }
178
200
 
179
201
  var numOfCustomFnsApplied = expressionsWithDefaultTheme.length - expressions.length;
@@ -186,7 +208,6 @@ export default function createStyled() {
186
208
  } else if (typeof styleArg === 'function' && // On the server Emotion doesn't use React.forwardRef for creating components, so the created
187
209
  // component stays as a function. This condition makes sure that we do not interpolate functions
188
210
  // which are basically components used as a selectors.
189
- // eslint-disable-next-line no-underscore-dangle
190
211
  styleArg.__emotion_real !== styleArg) {
191
212
  // If the type is function, we need to define the default theme.
192
213
  transformedStyleArg = function transformedStyleArg(_ref4) {
package/legacy/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.9.3
1
+ /** @license MUI v5.10.0
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.
@@ -53,4 +53,6 @@ export { default as createContainer } from './Container/createContainer';
53
53
  export { default as Container } from './Container';
54
54
  export * from './Container';
55
55
  export { default as Unstable_Grid } from './Unstable_Grid/Grid';
56
- export * from './Unstable_Grid';
56
+ export * from './Unstable_Grid';
57
+ export { default as Stack } from './Stack/Stack';
58
+ export * from './Stack';
@@ -0,0 +1,51 @@
1
+ import PropTypes from 'prop-types';
2
+ import createStack from './createStack';
3
+ /**
4
+ *
5
+ * Demos:
6
+ *
7
+ * - [Stack (Material UI)](https://mui.com/material-ui/react-stack/)
8
+ *
9
+ * API:
10
+ *
11
+ * - [Stack API](https://mui.com/system/api/stack/)
12
+ */
13
+
14
+ const Stack = createStack();
15
+ process.env.NODE_ENV !== "production" ? Stack.propTypes
16
+ /* remove-proptypes */
17
+ = {
18
+ // ----------------------------- Warning --------------------------------
19
+ // | These PropTypes are generated from the TypeScript type definitions |
20
+ // | To update them edit TypeScript types and run "yarn proptypes" |
21
+ // ----------------------------------------------------------------------
22
+
23
+ /**
24
+ * The content of the component.
25
+ */
26
+ children: PropTypes.node,
27
+
28
+ /**
29
+ * Defines the `flex-direction` style property.
30
+ * It is applied for all screen sizes.
31
+ * @default 'column'
32
+ */
33
+ direction: PropTypes.oneOfType([PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), PropTypes.arrayOf(PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), PropTypes.object]),
34
+
35
+ /**
36
+ * Add an element between each child.
37
+ */
38
+ divider: PropTypes.node,
39
+
40
+ /**
41
+ * Defines the space between immediate children.
42
+ * @default 0
43
+ */
44
+ spacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
45
+
46
+ /**
47
+ * The system prop, which allows defining system overrides as well as additional CSS styles.
48
+ */
49
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
50
+ } : void 0;
51
+ export default Stack;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,179 @@
1
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
+ import _extends from "@babel/runtime/helpers/esm/extends";
3
+ const _excluded = ["component", "direction", "spacing", "divider", "children", "className"];
4
+ import * as React from 'react';
5
+ import PropTypes from 'prop-types';
6
+ import clsx from 'clsx';
7
+ import { deepmerge, unstable_composeClasses as composeClasses, unstable_generateUtilityClass as generateUtilityClass } from '@mui/utils';
8
+ import systemStyled from '../styled';
9
+ import useThemePropsSystem from '../useThemeProps';
10
+ import { extendSxProp } from '../styleFunctionSx';
11
+ import createTheme from '../createTheme';
12
+ import { handleBreakpoints, mergeBreakpointsInOrder, resolveBreakpointValues } from '../breakpoints';
13
+ import { createUnarySpacing, getValue } from '../spacing';
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
+ const defaultTheme = createTheme();
16
+ // widening Theme to any so that the consumer can own the theme structure.
17
+ const defaultCreateStyledComponent = systemStyled('div', {
18
+ name: 'MuiStack',
19
+ slot: 'Root',
20
+ overridesResolver: (props, styles) => styles.root
21
+ });
22
+
23
+ function useThemePropsDefault(props) {
24
+ return useThemePropsSystem({
25
+ props,
26
+ name: 'MuiStack',
27
+ defaultTheme
28
+ });
29
+ }
30
+ /**
31
+ * Return an array with the separator React element interspersed between
32
+ * each React node of the input children.
33
+ *
34
+ * > joinChildren([1,2,3], 0)
35
+ * [1,0,2,0,3]
36
+ */
37
+
38
+
39
+ function joinChildren(children, separator) {
40
+ const childrenArray = React.Children.toArray(children).filter(Boolean);
41
+ return childrenArray.reduce((output, child, index) => {
42
+ output.push(child);
43
+
44
+ if (index < childrenArray.length - 1) {
45
+ output.push( /*#__PURE__*/React.cloneElement(separator, {
46
+ key: `separator-${index}`
47
+ }));
48
+ }
49
+
50
+ return output;
51
+ }, []);
52
+ }
53
+
54
+ const getSideFromDirection = direction => {
55
+ return {
56
+ row: 'Left',
57
+ 'row-reverse': 'Right',
58
+ column: 'Top',
59
+ 'column-reverse': 'Bottom'
60
+ }[direction];
61
+ };
62
+
63
+ export const style = ({
64
+ ownerState,
65
+ theme
66
+ }) => {
67
+ let styles = _extends({
68
+ display: 'flex',
69
+ flexDirection: 'column'
70
+ }, handleBreakpoints({
71
+ theme
72
+ }, resolveBreakpointValues({
73
+ values: ownerState.direction,
74
+ breakpoints: theme.breakpoints.values
75
+ }), propValue => ({
76
+ flexDirection: propValue
77
+ })));
78
+
79
+ if (ownerState.spacing) {
80
+ const transformer = createUnarySpacing(theme);
81
+ const base = Object.keys(theme.breakpoints.values).reduce((acc, breakpoint) => {
82
+ if (typeof ownerState.spacing === 'object' && ownerState.spacing[breakpoint] != null || typeof ownerState.direction === 'object' && ownerState.direction[breakpoint] != null) {
83
+ acc[breakpoint] = true;
84
+ }
85
+
86
+ return acc;
87
+ }, {});
88
+ const directionValues = resolveBreakpointValues({
89
+ values: ownerState.direction,
90
+ base
91
+ });
92
+ const spacingValues = resolveBreakpointValues({
93
+ values: ownerState.spacing,
94
+ base
95
+ });
96
+
97
+ if (typeof directionValues === 'object') {
98
+ Object.keys(directionValues).forEach((breakpoint, index, breakpoints) => {
99
+ const directionValue = directionValues[breakpoint];
100
+
101
+ if (!directionValue) {
102
+ const previousDirectionValue = index > 0 ? directionValues[breakpoints[index - 1]] : 'column';
103
+ directionValues[breakpoint] = previousDirectionValue;
104
+ }
105
+ });
106
+ }
107
+
108
+ const styleFromPropValue = (propValue, breakpoint) => {
109
+ return {
110
+ '& > :not(style) + :not(style)': {
111
+ margin: 0,
112
+ [`margin${getSideFromDirection(breakpoint ? directionValues[breakpoint] : ownerState.direction)}`]: getValue(transformer, propValue)
113
+ }
114
+ };
115
+ };
116
+
117
+ styles = deepmerge(styles, handleBreakpoints({
118
+ theme
119
+ }, spacingValues, styleFromPropValue));
120
+ }
121
+
122
+ styles = mergeBreakpointsInOrder(theme.breakpoints, styles);
123
+ return styles;
124
+ };
125
+ export default function createStack(options = {}) {
126
+ const {
127
+ // This will allow adding custom styled fn (for example for custom sx style function)
128
+ createStyledComponent = defaultCreateStyledComponent,
129
+ useThemeProps = useThemePropsDefault,
130
+ componentName = 'MuiStack'
131
+ } = options;
132
+
133
+ const useUtilityClasses = () => {
134
+ const slots = {
135
+ root: ['root']
136
+ };
137
+ return composeClasses(slots, slot => generateUtilityClass(componentName, slot), {});
138
+ };
139
+
140
+ const StackRoot = createStyledComponent(style);
141
+ const Stack = /*#__PURE__*/React.forwardRef(function Grid(inProps, ref) {
142
+ const themeProps = useThemeProps(inProps);
143
+ const props = extendSxProp(themeProps); // `color` type conflicts with html color attribute.
144
+
145
+ const {
146
+ component = 'div',
147
+ direction = 'column',
148
+ spacing = 0,
149
+ divider,
150
+ children,
151
+ className
152
+ } = props,
153
+ other = _objectWithoutPropertiesLoose(props, _excluded);
154
+
155
+ const ownerState = {
156
+ direction,
157
+ spacing
158
+ };
159
+ const classes = useUtilityClasses();
160
+ return /*#__PURE__*/_jsx(StackRoot, _extends({
161
+ as: component,
162
+ ownerState: ownerState,
163
+ ref: ref,
164
+ className: clsx(classes.root, className)
165
+ }, other, {
166
+ children: divider ? joinChildren(children, divider) : children
167
+ }));
168
+ });
169
+ process.env.NODE_ENV !== "production" ? Stack.propTypes
170
+ /* remove-proptypes */
171
+ = {
172
+ children: PropTypes.node,
173
+ direction: PropTypes.oneOfType([PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), PropTypes.arrayOf(PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), PropTypes.object]),
174
+ divider: PropTypes.node,
175
+ spacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
176
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
177
+ } : void 0;
178
+ return Stack;
179
+ }
@@ -0,0 +1,5 @@
1
+ export { default } from './Stack';
2
+ export { default as createStack } from './createStack';
3
+ export * from './StackProps';
4
+ export { default as stackClasses } from './stackClasses';
5
+ export * from './stackClasses';
@@ -0,0 +1,6 @@
1
+ import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
2
+ export function getStackUtilityClass(slot) {
3
+ return generateUtilityClass('MuiStack', slot);
4
+ }
5
+ const stackClasses = generateUtilityClasses('MuiStack', ['root']);
6
+ export default stackClasses;
@@ -14,7 +14,9 @@ export default function createBox(options = {}) {
14
14
  generateClassName,
15
15
  styleFunctionSx = defaultStyleFunctionSx
16
16
  } = options;
17
- const BoxRoot = styled('div')(styleFunctionSx);
17
+ const BoxRoot = styled('div', {
18
+ shouldForwardProp: prop => prop !== 'theme' && prop !== 'sx' && prop !== 'as'
19
+ })(styleFunctionSx);
18
20
  const Box = /*#__PURE__*/React.forwardRef(function Box(inProps, ref) {
19
21
  const theme = useTheme(defaultTheme);
20
22
 
@@ -1,9 +1,11 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
+ import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  const _excluded = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"],
4
4
  _excluded2 = ["theme"],
5
5
  _excluded3 = ["theme"];
6
- import styledEngineStyled from '@mui/styled-engine';
6
+
7
+ /* eslint-disable no-underscore-dangle */
8
+ import styledEngineStyled, { internal_processStyles as processStyles } from '@mui/styled-engine';
7
9
  import { getDisplayName } from '@mui/utils';
8
10
  import createTheme from './createTheme';
9
11
  import propsToClassKey from './propsToClassKey';
@@ -11,6 +13,14 @@ import defaultStyleFunctionSx from './styleFunctionSx';
11
13
 
12
14
  function isEmpty(obj) {
13
15
  return Object.keys(obj).length === 0;
16
+ } // https://github.com/emotion-js/emotion/blob/26ded6109fcd8ca9875cc2ce4564fee678a3f3c5/packages/styled/src/utils.js#L40
17
+
18
+
19
+ function isStringTag(tag) {
20
+ return typeof tag === 'string' && // 96 is one less than the char code
21
+ // for "a" so this is checking that
22
+ // it's a lowercase character
23
+ tag.charCodeAt(0) > 96;
14
24
  }
15
25
 
16
26
  const getStyleOverrides = (name, theme) => {
@@ -78,7 +88,19 @@ export default function createStyled(input = {}) {
78
88
  slotShouldForwardProp = shouldForwardProp,
79
89
  styleFunctionSx = defaultStyleFunctionSx
80
90
  } = input;
91
+
92
+ const systemSx = props => {
93
+ const theme = isEmpty(props.theme) ? defaultTheme : props.theme;
94
+ return styleFunctionSx(_extends({}, props, {
95
+ theme
96
+ }));
97
+ };
98
+
99
+ systemSx.__mui_systemSx = true;
81
100
  return (tag, inputOptions = {}) => {
101
+ // Filter out the `sx` style function from the previous styled component to prevent unnecessary styles generated by the composite components.
102
+ processStyles(tag, styles => styles.filter(style => !style?.__mui_systemSx));
103
+
82
104
  const {
83
105
  name: componentName,
84
106
  slot: componentSlot,
@@ -106,6 +128,9 @@ export default function createStyled(input = {}) {
106
128
  } else if (componentSlot) {
107
129
  // any other slot specified
108
130
  shouldForwardPropOption = slotShouldForwardProp;
131
+ } else if (isStringTag(tag)) {
132
+ // for string (html) tag, preserve the behavior in emotion & styled-components.
133
+ shouldForwardPropOption = undefined;
109
134
  }
110
135
 
111
136
  const defaultStyledResolver = styledEngineStyled(tag, _extends({
@@ -118,7 +143,6 @@ export default function createStyled(input = {}) {
118
143
  // On the server Emotion doesn't use React.forwardRef for creating components, so the created
119
144
  // component stays as a function. This condition makes sure that we do not interpolate functions
120
145
  // which are basically components used as a selectors.
121
- // eslint-disable-next-line no-underscore-dangle
122
146
  return typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg ? _ref => {
123
147
  let {
124
148
  theme: themeInput
@@ -159,12 +183,7 @@ export default function createStyled(input = {}) {
159
183
  }
160
184
 
161
185
  if (!skipSx) {
162
- expressionsWithDefaultTheme.push(props => {
163
- const theme = isEmpty(props.theme) ? defaultTheme : props.theme;
164
- return styleFunctionSx(_extends({}, props, {
165
- theme
166
- }));
167
- });
186
+ expressionsWithDefaultTheme.push(systemSx);
168
187
  }
169
188
 
170
189
  const numOfCustomFnsApplied = expressionsWithDefaultTheme.length - expressions.length;
@@ -177,7 +196,6 @@ export default function createStyled(input = {}) {
177
196
  } else if (typeof styleArg === 'function' && // On the server Emotion doesn't use React.forwardRef for creating components, so the created
178
197
  // component stays as a function. This condition makes sure that we do not interpolate functions
179
198
  // which are basically components used as a selectors.
180
- // eslint-disable-next-line no-underscore-dangle
181
199
  styleArg.__emotion_real !== styleArg) {
182
200
  // If the type is function, we need to define the default theme.
183
201
  transformedStyleArg = _ref2 => {
package/modern/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.9.3
1
+ /** @license MUI v5.10.0
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.
@@ -53,4 +53,6 @@ export { default as createContainer } from './Container/createContainer';
53
53
  export { default as Container } from './Container';
54
54
  export * from './Container';
55
55
  export { default as Unstable_Grid } from './Unstable_Grid/Grid';
56
- export * from './Unstable_Grid';
56
+ export * from './Unstable_Grid';
57
+ export { default as Stack } from './Stack/Stack';
58
+ export * from './Stack';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/system",
3
- "version": "5.9.3",
3
+ "version": "5.10.0",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "CSS utilities for rapidly laying out custom designs.",
@@ -20,7 +20,7 @@
20
20
  "bugs": {
21
21
  "url": "https://github.com/mui/material-ui/issues"
22
22
  },
23
- "homepage": "https://mui.com/system/basics/",
23
+ "homepage": "https://mui.com/system/getting-started/overview/",
24
24
  "funding": {
25
25
  "type": "opencollective",
26
26
  "url": "https://opencollective.com/mui"
@@ -45,7 +45,7 @@
45
45
  "dependencies": {
46
46
  "@babel/runtime": "^7.17.2",
47
47
  "@mui/private-theming": "^5.9.3",
48
- "@mui/styled-engine": "^5.8.7",
48
+ "@mui/styled-engine": "^5.10.0",
49
49
  "@mui/types": "^7.1.5",
50
50
  "@mui/utils": "^5.9.3",
51
51
  "clsx": "^1.2.1",
package/spacing.d.ts CHANGED
@@ -58,4 +58,10 @@ export const padding: SimpleStyleFunction<
58
58
  | 'paddingBlockEnd'
59
59
  >;
60
60
 
61
+ export type SpacingValueType = string | number | null | undefined;
62
+ export function getValue(
63
+ transformer: (prop: SpacingValueType) => SpacingValueType,
64
+ propValue: SpacingValueType,
65
+ ): SpacingValueType;
66
+
61
67
  export type PaddingProps = PropsFor<typeof padding>;
@@ -1 +1 @@
1
- export {};
1
+ export {};