@mui/material 5.8.7 → 5.9.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 (56) hide show
  1. package/Autocomplete/Autocomplete.js +2 -2
  2. package/CHANGELOG.md +74 -0
  3. package/Modal/Modal.js +6 -6
  4. package/Popper/Popper.d.ts +1 -6
  5. package/README.md +60 -23
  6. package/ScopedCssBaseline/ScopedCssBaseline.d.ts +6 -0
  7. package/ScopedCssBaseline/ScopedCssBaseline.js +6 -1
  8. package/Tooltip/Tooltip.js +6 -5
  9. package/Unstable_Grid2/Grid2.d.ts +4 -0
  10. package/Unstable_Grid2/Grid2.js +34 -0
  11. package/Unstable_Grid2/Grid2Props.d.ts +15 -0
  12. package/Unstable_Grid2/Grid2Props.js +1 -0
  13. package/Unstable_Grid2/grid2Classes.d.ts +5 -0
  14. package/Unstable_Grid2/grid2Classes.js +14 -0
  15. package/Unstable_Grid2/index.d.ts +4 -0
  16. package/Unstable_Grid2/index.js +4 -0
  17. package/Unstable_Grid2/package.json +6 -0
  18. package/index.d.ts +3 -0
  19. package/index.js +3 -1
  20. package/legacy/Autocomplete/Autocomplete.js +2 -2
  21. package/legacy/Modal/Modal.js +13 -9
  22. package/legacy/ScopedCssBaseline/ScopedCssBaseline.js +6 -1
  23. package/legacy/Tooltip/Tooltip.js +6 -5
  24. package/legacy/Unstable_Grid2/Grid2.js +38 -0
  25. package/legacy/Unstable_Grid2/Grid2Props.js +1 -0
  26. package/legacy/Unstable_Grid2/grid2Classes.js +27 -0
  27. package/legacy/Unstable_Grid2/index.js +4 -0
  28. package/legacy/index.js +3 -1
  29. package/modern/Autocomplete/Autocomplete.js +2 -2
  30. package/modern/Modal/Modal.js +6 -6
  31. package/modern/ScopedCssBaseline/ScopedCssBaseline.js +6 -1
  32. package/modern/Tooltip/Tooltip.js +6 -5
  33. package/modern/Unstable_Grid2/Grid2.js +34 -0
  34. package/modern/Unstable_Grid2/Grid2Props.js +1 -0
  35. package/modern/Unstable_Grid2/grid2Classes.js +14 -0
  36. package/modern/Unstable_Grid2/index.js +4 -0
  37. package/modern/index.js +3 -1
  38. package/node/Autocomplete/Autocomplete.js +2 -2
  39. package/node/Modal/Modal.js +9 -9
  40. package/node/ScopedCssBaseline/ScopedCssBaseline.js +6 -1
  41. package/node/Tooltip/Tooltip.js +6 -5
  42. package/node/Unstable_Grid2/Grid2.js +47 -0
  43. package/node/Unstable_Grid2/Grid2Props.js +5 -0
  44. package/node/Unstable_Grid2/grid2Classes.js +25 -0
  45. package/node/Unstable_Grid2/index.js +56 -0
  46. package/node/index.js +22 -1
  47. package/package.json +6 -6
  48. package/styles/components.d.ts +5 -0
  49. package/styles/createTheme.d.ts +1 -1
  50. package/styles/experimental_extendTheme.d.ts +84 -7
  51. package/styles/index.d.ts +11 -0
  52. package/styles/overrides.d.ts +3 -1
  53. package/styles/props.d.ts +2 -0
  54. package/themeCssVarsAugmentation/index.d.ts +4 -8
  55. package/umd/material-ui.development.js +749 -272
  56. package/umd/material-ui.production.min.js +20 -25
@@ -0,0 +1,38 @@
1
+ import PropTypes from 'prop-types';
2
+ import { createGrid } from '@mui/system/Unstable_Grid';
3
+ import { styled, useThemeProps as _useThemeProps } from '../styles';
4
+ var Grid2 = createGrid({
5
+ createStyledComponent: styled('div', {
6
+ name: 'MuiGrid2',
7
+ overridesResolver: function overridesResolver(props, styles) {
8
+ return styles.root;
9
+ }
10
+ }),
11
+ componentName: 'MuiGrid2',
12
+ // eslint-disable-next-line material-ui/mui-name-matches-component-name
13
+ useThemeProps: function useThemeProps(inProps) {
14
+ return _useThemeProps({
15
+ props: inProps,
16
+ name: 'MuiGrid2'
17
+ });
18
+ }
19
+ });
20
+ process.env.NODE_ENV !== "production" ? Grid2.propTypes
21
+ /* remove-proptypes */
22
+ = {
23
+ // ----------------------------- Warning --------------------------------
24
+ // | These PropTypes are generated from the TypeScript type definitions |
25
+ // | To update them edit TypeScript types and run "yarn proptypes" |
26
+ // ----------------------------------------------------------------------
27
+
28
+ /**
29
+ * The content of the component.
30
+ */
31
+ children: PropTypes.node,
32
+
33
+ /**
34
+ * @ignore
35
+ */
36
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
37
+ } : void 0;
38
+ export default Grid2;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,27 @@
1
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
+ import { generateUtilityClass, generateUtilityClasses } from '@mui/base';
3
+ export function getGrid2UtilityClass(slot) {
4
+ return generateUtilityClass('MuiGrid2', slot);
5
+ }
6
+ var SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
7
+ var DIRECTIONS = ['column-reverse', 'column', 'row-reverse', 'row'];
8
+ var WRAPS = ['nowrap', 'wrap-reverse', 'wrap'];
9
+ var GRID_SIZES = ['auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
10
+ var grid2Classes = generateUtilityClasses('MuiGrid2', ['root', 'container', 'item', 'zeroMinWidth'].concat(_toConsumableArray(SPACINGS.map(function (spacing) {
11
+ return "spacing-xs-".concat(spacing);
12
+ })), _toConsumableArray(DIRECTIONS.map(function (direction) {
13
+ return "direction-xs-".concat(direction);
14
+ })), _toConsumableArray(WRAPS.map(function (wrap) {
15
+ return "wrap-xs-".concat(wrap);
16
+ })), _toConsumableArray(GRID_SIZES.map(function (size) {
17
+ return "grid-xs-".concat(size);
18
+ })), _toConsumableArray(GRID_SIZES.map(function (size) {
19
+ return "grid-sm-".concat(size);
20
+ })), _toConsumableArray(GRID_SIZES.map(function (size) {
21
+ return "grid-md-".concat(size);
22
+ })), _toConsumableArray(GRID_SIZES.map(function (size) {
23
+ return "grid-lg-".concat(size);
24
+ })), _toConsumableArray(GRID_SIZES.map(function (size) {
25
+ return "grid-xl-".concat(size);
26
+ }))));
27
+ export default grid2Classes;
@@ -0,0 +1,4 @@
1
+ export { default } from './Grid2';
2
+ export * from './Grid2Props';
3
+ export { default as grid2Classes } from './grid2Classes';
4
+ export * from './grid2Classes';
package/legacy/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.8.7
1
+ /** @license MUI v5.9.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.
@@ -106,6 +106,8 @@ export { default as FormLabel } from './FormLabel';
106
106
  export * from './FormLabel';
107
107
  export { default as Grid } from './Grid';
108
108
  export * from './Grid';
109
+ export { default as Unstable_Grid2 } from './Unstable_Grid2';
110
+ export * from './Unstable_Grid2';
109
111
  export { default as Grow } from './Grow';
110
112
  export * from './Grow';
111
113
  export { default as Hidden } from './Hidden';
@@ -451,7 +451,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
451
451
 
452
452
  if (multiple && value.length > 0) {
453
453
  const getCustomizedTagProps = params => _extends({
454
- className: clsx(classes.tag),
454
+ className: classes.tag,
455
455
  disabled
456
456
  }, getTagProps(params));
457
457
 
@@ -552,7 +552,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
552
552
  })
553
553
  }),
554
554
  inputProps: _extends({
555
- className: clsx(classes.input),
555
+ className: classes.input,
556
556
  disabled,
557
557
  readOnly
558
558
  }, getInputProps())
@@ -3,9 +3,9 @@ import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  const _excluded = ["BackdropComponent", "BackdropProps", "closeAfterTransition", "children", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "theme"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
- import { isHostComponent } from '@mui/base';
7
- import { elementAcceptingRef, HTMLElementType } from '@mui/utils';
8
6
  import ModalUnstyled, { modalUnstyledClasses } from '@mui/base/ModalUnstyled';
7
+ import { isHostComponent, resolveComponentProps } from '@mui/base/utils';
8
+ import { elementAcceptingRef, HTMLElementType } from '@mui/utils';
9
9
  import styled from '../styles/styled';
10
10
  import useThemeProps from '../styles/useThemeProps';
11
11
  import Backdrop from '../Backdrop';
@@ -113,11 +113,11 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
113
113
  Backdrop: BackdropComponent
114
114
  }, components),
115
115
  componentsProps: {
116
- root: _extends({}, componentsProps.root, !isHostComponent(Root) && {
116
+ root: () => _extends({}, resolveComponentProps(componentsProps.root, ownerState), !isHostComponent(Root) && {
117
117
  as: component,
118
118
  theme
119
119
  }),
120
- backdrop: _extends({}, BackdropProps, componentsProps.backdrop)
120
+ backdrop: () => _extends({}, BackdropProps, resolveComponentProps(componentsProps.backdrop, ownerState))
121
121
  },
122
122
  onTransitionEnter: () => setExited(false),
123
123
  onTransitionExited: () => setExited(true),
@@ -194,8 +194,8 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
194
194
  * @default {}
195
195
  */
196
196
  componentsProps: PropTypes.shape({
197
- backdrop: PropTypes.object,
198
- root: PropTypes.object
197
+ backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
198
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
199
199
  }),
200
200
 
201
201
  /**
@@ -96,6 +96,11 @@ process.env.NODE_ENV !== "production" ? ScopedCssBaseline.propTypes
96
96
  * For more details, check out https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme
97
97
  * For browser support, check out https://caniuse.com/?search=color-scheme
98
98
  */
99
- enableColorScheme: PropTypes.bool
99
+ enableColorScheme: PropTypes.bool,
100
+
101
+ /**
102
+ * The system prop that allows defining system overrides as well as additional CSS styles.
103
+ */
104
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
100
105
  } : void 0;
101
106
  export default ScopedCssBaseline;
@@ -336,12 +336,15 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
336
336
  const handleEnter = event => {
337
337
  if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {
338
338
  return;
339
+ } // Workaround for https://github.com/facebook/react/issues/7769
340
+
341
+
342
+ if (!childNode) {
343
+ setChildNode(event.currentTarget);
339
344
  } // Remove the title ahead of time.
340
345
  // We don't want to wait for the next render commit.
341
346
  // We would risk displaying two tooltips at the same time (native + this one).
342
-
343
-
344
- if (childNode) {
347
+ else {
345
348
  childNode.removeAttribute('title');
346
349
  }
347
350
 
@@ -386,8 +389,6 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
386
389
 
387
390
  const handleFocus = event => {
388
391
  // Workaround for https://github.com/facebook/react/issues/7769
389
- // The autoFocus of React might trigger the event before the componentDidMount.
390
- // We need to account for this eventuality.
391
392
  if (!childNode) {
392
393
  setChildNode(event.currentTarget);
393
394
  }
@@ -0,0 +1,34 @@
1
+ import PropTypes from 'prop-types';
2
+ import { createGrid } from '@mui/system/Unstable_Grid';
3
+ import { styled, useThemeProps } from '../styles';
4
+ const Grid2 = createGrid({
5
+ createStyledComponent: styled('div', {
6
+ name: 'MuiGrid2',
7
+ overridesResolver: (props, styles) => styles.root
8
+ }),
9
+ componentName: 'MuiGrid2',
10
+ // eslint-disable-next-line material-ui/mui-name-matches-component-name
11
+ useThemeProps: inProps => useThemeProps({
12
+ props: inProps,
13
+ name: 'MuiGrid2'
14
+ })
15
+ });
16
+ process.env.NODE_ENV !== "production" ? Grid2.propTypes
17
+ /* remove-proptypes */
18
+ = {
19
+ // ----------------------------- Warning --------------------------------
20
+ // | These PropTypes are generated from the TypeScript type definitions |
21
+ // | To update them edit TypeScript types and run "yarn proptypes" |
22
+ // ----------------------------------------------------------------------
23
+
24
+ /**
25
+ * The content of the component.
26
+ */
27
+ children: PropTypes.node,
28
+
29
+ /**
30
+ * @ignore
31
+ */
32
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
33
+ } : void 0;
34
+ export default Grid2;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ import { generateUtilityClass, generateUtilityClasses } from '@mui/base';
2
+ export function getGrid2UtilityClass(slot) {
3
+ return generateUtilityClass('MuiGrid2', slot);
4
+ }
5
+ const SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
6
+ const DIRECTIONS = ['column-reverse', 'column', 'row-reverse', 'row'];
7
+ const WRAPS = ['nowrap', 'wrap-reverse', 'wrap'];
8
+ const GRID_SIZES = ['auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
9
+ const grid2Classes = generateUtilityClasses('MuiGrid2', ['root', 'container', 'item', 'zeroMinWidth', // spacings
10
+ ...SPACINGS.map(spacing => `spacing-xs-${spacing}`), // direction values
11
+ ...DIRECTIONS.map(direction => `direction-xs-${direction}`), // wrap values
12
+ ...WRAPS.map(wrap => `wrap-xs-${wrap}`), // grid sizes for all breakpoints
13
+ ...GRID_SIZES.map(size => `grid-xs-${size}`), ...GRID_SIZES.map(size => `grid-sm-${size}`), ...GRID_SIZES.map(size => `grid-md-${size}`), ...GRID_SIZES.map(size => `grid-lg-${size}`), ...GRID_SIZES.map(size => `grid-xl-${size}`)]);
14
+ export default grid2Classes;
@@ -0,0 +1,4 @@
1
+ export { default } from './Grid2';
2
+ export * from './Grid2Props';
3
+ export { default as grid2Classes } from './grid2Classes';
4
+ export * from './grid2Classes';
package/modern/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.8.7
1
+ /** @license MUI v5.9.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.
@@ -106,6 +106,8 @@ export { default as FormLabel } from './FormLabel';
106
106
  export * from './FormLabel';
107
107
  export { default as Grid } from './Grid';
108
108
  export * from './Grid';
109
+ export { default as Unstable_Grid2 } from './Unstable_Grid2';
110
+ export * from './Unstable_Grid2';
109
111
  export { default as Grow } from './Grow';
110
112
  export * from './Grow';
111
113
  export { default as Hidden } from './Hidden';
@@ -495,7 +495,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
495
495
 
496
496
  if (multiple && value.length > 0) {
497
497
  const getCustomizedTagProps = params => (0, _extends2.default)({
498
- className: (0, _clsx.default)(classes.tag),
498
+ className: classes.tag,
499
499
  disabled
500
500
  }, getTagProps(params));
501
501
 
@@ -596,7 +596,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
596
596
  })
597
597
  }),
598
598
  inputProps: (0, _extends2.default)({
599
- className: (0, _clsx.default)(classes.input),
599
+ className: classes.input,
600
600
  disabled,
601
601
  readOnly
602
602
  }, getInputProps())
@@ -15,11 +15,11 @@ var React = _interopRequireWildcard(require("react"));
15
15
 
16
16
  var _propTypes = _interopRequireDefault(require("prop-types"));
17
17
 
18
- var _base = require("@mui/base");
18
+ var _ModalUnstyled = _interopRequireWildcard(require("@mui/base/ModalUnstyled"));
19
19
 
20
- var _utils = require("@mui/utils");
20
+ var _utils = require("@mui/base/utils");
21
21
 
22
- var _ModalUnstyled = _interopRequireWildcard(require("@mui/base/ModalUnstyled"));
22
+ var _utils2 = require("@mui/utils");
23
23
 
24
24
  var _styled = _interopRequireDefault(require("../styles/styled"));
25
25
 
@@ -137,11 +137,11 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
137
137
  Backdrop: BackdropComponent
138
138
  }, components),
139
139
  componentsProps: {
140
- root: (0, _extends2.default)({}, componentsProps.root, !(0, _base.isHostComponent)(Root) && {
140
+ root: () => (0, _extends2.default)({}, (0, _utils.resolveComponentProps)(componentsProps.root, ownerState), !(0, _utils.isHostComponent)(Root) && {
141
141
  as: component,
142
142
  theme
143
143
  }),
144
- backdrop: (0, _extends2.default)({}, BackdropProps, componentsProps.backdrop)
144
+ backdrop: () => (0, _extends2.default)({}, BackdropProps, (0, _utils.resolveComponentProps)(componentsProps.backdrop, ownerState))
145
145
  },
146
146
  onTransitionEnter: () => setExited(false),
147
147
  onTransitionExited: () => setExited(true),
@@ -184,7 +184,7 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
184
184
  /**
185
185
  * A single child content element.
186
186
  */
187
- children: _utils.elementAcceptingRef.isRequired,
187
+ children: _utils2.elementAcceptingRef.isRequired,
188
188
 
189
189
  /**
190
190
  * Override or extend the styles applied to the component.
@@ -218,8 +218,8 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
218
218
  * @default {}
219
219
  */
220
220
  componentsProps: _propTypes.default.shape({
221
- backdrop: _propTypes.default.object,
222
- root: _propTypes.default.object
221
+ backdrop: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
222
+ root: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
223
223
  }),
224
224
 
225
225
  /**
@@ -231,7 +231,7 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
231
231
  */
232
232
  container: _propTypes.default
233
233
  /* @typescript-to-proptypes-ignore */
234
- .oneOfType([_utils.HTMLElementType, _propTypes.default.func]),
234
+ .oneOfType([_utils2.HTMLElementType, _propTypes.default.func]),
235
235
 
236
236
  /**
237
237
  * If `true`, the modal will not automatically shift focus to itself when it opens, and
@@ -117,7 +117,12 @@ process.env.NODE_ENV !== "production" ? ScopedCssBaseline.propTypes
117
117
  * For more details, check out https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme
118
118
  * For browser support, check out https://caniuse.com/?search=color-scheme
119
119
  */
120
- enableColorScheme: _propTypes.default.bool
120
+ enableColorScheme: _propTypes.default.bool,
121
+
122
+ /**
123
+ * The system prop that allows defining system overrides as well as additional CSS styles.
124
+ */
125
+ sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
121
126
  } : void 0;
122
127
  var _default = ScopedCssBaseline;
123
128
  exports.default = _default;
@@ -371,12 +371,15 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
371
371
  const handleEnter = event => {
372
372
  if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {
373
373
  return;
374
+ } // Workaround for https://github.com/facebook/react/issues/7769
375
+
376
+
377
+ if (!childNode) {
378
+ setChildNode(event.currentTarget);
374
379
  } // Remove the title ahead of time.
375
380
  // We don't want to wait for the next render commit.
376
381
  // We would risk displaying two tooltips at the same time (native + this one).
377
-
378
-
379
- if (childNode) {
382
+ else {
380
383
  childNode.removeAttribute('title');
381
384
  }
382
385
 
@@ -421,8 +424,6 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
421
424
 
422
425
  const handleFocus = event => {
423
426
  // Workaround for https://github.com/facebook/react/issues/7769
424
- // The autoFocus of React might trigger the event before the componentDidMount.
425
- // We need to account for this eventuality.
426
427
  if (!childNode) {
427
428
  setChildNode(event.currentTarget);
428
429
  }
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
+
12
+ var _Unstable_Grid = require("@mui/system/Unstable_Grid");
13
+
14
+ var _styles = require("../styles");
15
+
16
+ const Grid2 = (0, _Unstable_Grid.createGrid)({
17
+ createStyledComponent: (0, _styles.styled)('div', {
18
+ name: 'MuiGrid2',
19
+ overridesResolver: (props, styles) => styles.root
20
+ }),
21
+ componentName: 'MuiGrid2',
22
+ // eslint-disable-next-line material-ui/mui-name-matches-component-name
23
+ useThemeProps: inProps => (0, _styles.useThemeProps)({
24
+ props: inProps,
25
+ name: 'MuiGrid2'
26
+ })
27
+ });
28
+ process.env.NODE_ENV !== "production" ? Grid2.propTypes
29
+ /* remove-proptypes */
30
+ = {
31
+ // ----------------------------- Warning --------------------------------
32
+ // | These PropTypes are generated from the TypeScript type definitions |
33
+ // | To update them edit TypeScript types and run "yarn proptypes" |
34
+ // ----------------------------------------------------------------------
35
+
36
+ /**
37
+ * The content of the component.
38
+ */
39
+ children: _propTypes.default.node,
40
+
41
+ /**
42
+ * @ignore
43
+ */
44
+ sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
45
+ } : void 0;
46
+ var _default = Grid2;
47
+ exports.default = _default;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ exports.getGrid2UtilityClass = getGrid2UtilityClass;
8
+
9
+ var _base = require("@mui/base");
10
+
11
+ function getGrid2UtilityClass(slot) {
12
+ return (0, _base.generateUtilityClass)('MuiGrid2', slot);
13
+ }
14
+
15
+ const SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
16
+ const DIRECTIONS = ['column-reverse', 'column', 'row-reverse', 'row'];
17
+ const WRAPS = ['nowrap', 'wrap-reverse', 'wrap'];
18
+ const GRID_SIZES = ['auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
19
+ const grid2Classes = (0, _base.generateUtilityClasses)('MuiGrid2', ['root', 'container', 'item', 'zeroMinWidth', // spacings
20
+ ...SPACINGS.map(spacing => `spacing-xs-${spacing}`), // direction values
21
+ ...DIRECTIONS.map(direction => `direction-xs-${direction}`), // wrap values
22
+ ...WRAPS.map(wrap => `wrap-xs-${wrap}`), // grid sizes for all breakpoints
23
+ ...GRID_SIZES.map(size => `grid-xs-${size}`), ...GRID_SIZES.map(size => `grid-sm-${size}`), ...GRID_SIZES.map(size => `grid-md-${size}`), ...GRID_SIZES.map(size => `grid-lg-${size}`), ...GRID_SIZES.map(size => `grid-xl-${size}`)]);
24
+ var _default = grid2Classes;
25
+ exports.default = _default;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ var _exportNames = {
9
+ grid2Classes: true
10
+ };
11
+ Object.defineProperty(exports, "default", {
12
+ enumerable: true,
13
+ get: function () {
14
+ return _Grid.default;
15
+ }
16
+ });
17
+ Object.defineProperty(exports, "grid2Classes", {
18
+ enumerable: true,
19
+ get: function () {
20
+ return _grid2Classes.default;
21
+ }
22
+ });
23
+
24
+ var _Grid = _interopRequireDefault(require("./Grid2"));
25
+
26
+ var _Grid2Props = require("./Grid2Props");
27
+
28
+ Object.keys(_Grid2Props).forEach(function (key) {
29
+ if (key === "default" || key === "__esModule") return;
30
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
31
+ if (key in exports && exports[key] === _Grid2Props[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _Grid2Props[key];
36
+ }
37
+ });
38
+ });
39
+
40
+ var _grid2Classes = _interopRequireWildcard(require("./grid2Classes"));
41
+
42
+ Object.keys(_grid2Classes).forEach(function (key) {
43
+ if (key === "default" || key === "__esModule") return;
44
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
45
+ if (key in exports && exports[key] === _grid2Classes[key]) return;
46
+ Object.defineProperty(exports, key, {
47
+ enumerable: true,
48
+ get: function () {
49
+ return _grid2Classes[key];
50
+ }
51
+ });
52
+ });
53
+
54
+ 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); }
55
+
56
+ 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; }
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.8.7
1
+ /** @license MUI v5.9.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.
@@ -62,6 +62,7 @@ var _exportNames = {
62
62
  FormHelperText: true,
63
63
  FormLabel: true,
64
64
  Grid: true,
65
+ Unstable_Grid2: true,
65
66
  Grow: true,
66
67
  Hidden: true,
67
68
  Icon: true,
@@ -918,6 +919,12 @@ Object.defineProperty(exports, "Typography", {
918
919
  return _Typography.default;
919
920
  }
920
921
  });
922
+ Object.defineProperty(exports, "Unstable_Grid2", {
923
+ enumerable: true,
924
+ get: function () {
925
+ return _Unstable_Grid.default;
926
+ }
927
+ });
921
928
  Object.defineProperty(exports, "Zoom", {
922
929
  enumerable: true,
923
930
  get: function () {
@@ -1692,6 +1699,20 @@ Object.keys(_Grid).forEach(function (key) {
1692
1699
  });
1693
1700
  });
1694
1701
 
1702
+ var _Unstable_Grid = _interopRequireWildcard(require("./Unstable_Grid2"));
1703
+
1704
+ Object.keys(_Unstable_Grid).forEach(function (key) {
1705
+ if (key === "default" || key === "__esModule") return;
1706
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
1707
+ if (key in exports && exports[key] === _Unstable_Grid[key]) return;
1708
+ Object.defineProperty(exports, key, {
1709
+ enumerable: true,
1710
+ get: function () {
1711
+ return _Unstable_Grid[key];
1712
+ }
1713
+ });
1714
+ });
1715
+
1695
1716
  var _Grow = _interopRequireWildcard(require("./Grow"));
1696
1717
 
1697
1718
  Object.keys(_Grow).forEach(function (key) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/material",
3
- "version": "5.8.7",
3
+ "version": "5.9.0",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "React components that implement Google's Material Design.",
@@ -46,15 +46,15 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@babel/runtime": "^7.17.2",
49
- "@mui/base": "5.0.0-alpha.88",
50
- "@mui/system": "^5.8.7",
49
+ "@mui/base": "5.0.0-alpha.89",
50
+ "@mui/system": "^5.9.0",
51
51
  "@mui/types": "^7.1.4",
52
- "@mui/utils": "^5.8.6",
52
+ "@mui/utils": "^5.9.0",
53
53
  "@types/react-transition-group": "^4.4.5",
54
- "clsx": "^1.2.0",
54
+ "clsx": "^1.2.1",
55
55
  "csstype": "^3.1.0",
56
56
  "prop-types": "^15.8.1",
57
- "react-is": "^17.0.2",
57
+ "react-is": "^18.2.0",
58
58
  "react-transition-group": "^4.4.2"
59
59
  },
60
60
  "sideEffects": false,
@@ -228,6 +228,11 @@ export interface Components<Theme = unknown> {
228
228
  styleOverrides?: ComponentsOverrides<Theme>['MuiGrid'];
229
229
  variants?: ComponentsVariants['MuiGrid'];
230
230
  };
231
+ MuiGrid2?: {
232
+ defaultProps?: ComponentsProps['MuiGrid2'];
233
+ styleOverrides?: ComponentsOverrides<Theme>['MuiGrid2'];
234
+ variants?: ComponentsVariants['MuiGrid2'];
235
+ };
231
236
  MuiImageList?: {
232
237
  defaultProps?: ComponentsProps['MuiImageList'];
233
238
  styleOverrides?: ComponentsOverrides<Theme>['MuiImageList'];
@@ -9,7 +9,7 @@ import { Components } from './components';
9
9
 
10
10
  export interface ThemeOptions extends Omit<SystemThemeOptions, 'zIndex'> {
11
11
  mixins?: MixinsOptions;
12
- components?: Components<BaseTheme>;
12
+ components?: Components<Omit<Theme, 'components'>>;
13
13
  palette?: PaletteOptions;
14
14
  shadows?: Shadows;
15
15
  transitions?: TransitionsOptions;