@mui/material 5.8.7 → 5.9.2

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 (88) hide show
  1. package/Autocomplete/Autocomplete.js +2 -2
  2. package/ButtonBase/TouchRipple.js +1 -1
  3. package/CHANGELOG.md +200 -4
  4. package/Dialog/Dialog.js +2 -1
  5. package/FormHelperText/FormHelperText.d.ts +7 -1
  6. package/FormHelperText/FormHelperText.js +3 -1
  7. package/ImageListItem/ImageListItem.js +4 -4
  8. package/Modal/Modal.d.ts +2 -1
  9. package/Modal/Modal.js +8 -7
  10. package/OverridableComponent.d.ts +4 -0
  11. package/Popper/Popper.d.ts +1 -6
  12. package/Popper/Popper.js +24 -0
  13. package/README.md +60 -26
  14. package/ScopedCssBaseline/ScopedCssBaseline.d.ts +6 -0
  15. package/ScopedCssBaseline/ScopedCssBaseline.js +6 -1
  16. package/Slider/Slider.js +3 -2
  17. package/Stack/Stack.js +13 -1
  18. package/Tabs/Tabs.d.ts +7 -1
  19. package/Tabs/Tabs.js +3 -1
  20. package/Unstable_Grid2/Grid2.d.ts +4 -0
  21. package/Unstable_Grid2/Grid2.js +34 -0
  22. package/Unstable_Grid2/Grid2Props.d.ts +15 -0
  23. package/Unstable_Grid2/Grid2Props.js +1 -0
  24. package/Unstable_Grid2/grid2Classes.d.ts +5 -0
  25. package/Unstable_Grid2/grid2Classes.js +14 -0
  26. package/Unstable_Grid2/index.d.ts +4 -0
  27. package/Unstable_Grid2/index.js +4 -0
  28. package/Unstable_Grid2/package.json +6 -0
  29. package/index.d.ts +3 -0
  30. package/index.js +3 -1
  31. package/legacy/Autocomplete/Autocomplete.js +2 -2
  32. package/legacy/ButtonBase/TouchRipple.js +1 -1
  33. package/legacy/Dialog/Dialog.js +2 -1
  34. package/legacy/FormHelperText/FormHelperText.js +3 -1
  35. package/legacy/ImageListItem/ImageListItem.js +4 -4
  36. package/legacy/Modal/Modal.js +15 -10
  37. package/legacy/Popper/Popper.js +24 -0
  38. package/legacy/ScopedCssBaseline/ScopedCssBaseline.js +6 -1
  39. package/legacy/Slider/Slider.js +3 -2
  40. package/legacy/Stack/Stack.js +13 -1
  41. package/legacy/Tabs/Tabs.js +3 -1
  42. package/legacy/Unstable_Grid2/Grid2.js +38 -0
  43. package/legacy/Unstable_Grid2/Grid2Props.js +1 -0
  44. package/legacy/Unstable_Grid2/grid2Classes.js +27 -0
  45. package/legacy/Unstable_Grid2/index.js +4 -0
  46. package/legacy/index.js +3 -1
  47. package/modern/Autocomplete/Autocomplete.js +2 -2
  48. package/modern/ButtonBase/TouchRipple.js +1 -1
  49. package/modern/Dialog/Dialog.js +2 -1
  50. package/modern/FormHelperText/FormHelperText.js +3 -1
  51. package/modern/ImageListItem/ImageListItem.js +4 -4
  52. package/modern/Modal/Modal.js +8 -7
  53. package/modern/Popper/Popper.js +24 -0
  54. package/modern/ScopedCssBaseline/ScopedCssBaseline.js +6 -1
  55. package/modern/Slider/Slider.js +3 -2
  56. package/modern/Stack/Stack.js +13 -1
  57. package/modern/Tabs/Tabs.js +3 -1
  58. package/modern/Unstable_Grid2/Grid2.js +34 -0
  59. package/modern/Unstable_Grid2/Grid2Props.js +1 -0
  60. package/modern/Unstable_Grid2/grid2Classes.js +14 -0
  61. package/modern/Unstable_Grid2/index.js +4 -0
  62. package/modern/index.js +3 -1
  63. package/node/Autocomplete/Autocomplete.js +2 -2
  64. package/node/ButtonBase/TouchRipple.js +1 -1
  65. package/node/Dialog/Dialog.js +2 -1
  66. package/node/FormHelperText/FormHelperText.js +3 -1
  67. package/node/ImageListItem/ImageListItem.js +4 -4
  68. package/node/Modal/Modal.js +11 -10
  69. package/node/Popper/Popper.js +24 -0
  70. package/node/ScopedCssBaseline/ScopedCssBaseline.js +6 -1
  71. package/node/Slider/Slider.js +3 -2
  72. package/node/Stack/Stack.js +13 -1
  73. package/node/Tabs/Tabs.js +3 -1
  74. package/node/Unstable_Grid2/Grid2.js +47 -0
  75. package/node/Unstable_Grid2/Grid2Props.js +5 -0
  76. package/node/Unstable_Grid2/grid2Classes.js +25 -0
  77. package/node/Unstable_Grid2/index.js +56 -0
  78. package/node/index.js +22 -1
  79. package/package.json +7 -7
  80. package/styles/components.d.ts +5 -0
  81. package/styles/createTheme.d.ts +1 -1
  82. package/styles/experimental_extendTheme.d.ts +84 -7
  83. package/styles/index.d.ts +11 -0
  84. package/styles/overrides.d.ts +3 -1
  85. package/styles/props.d.ts +2 -0
  86. package/themeCssVarsAugmentation/index.d.ts +4 -8
  87. package/umd/material-ui.development.js +885 -290
  88. package/umd/material-ui.production.min.js +20 -25
@@ -47,7 +47,8 @@ export var style = function style(_ref) {
47
47
  theme = _ref.theme;
48
48
 
49
49
  var styles = _extends({
50
- display: 'flex'
50
+ display: 'flex',
51
+ flexDirection: 'column'
51
52
  }, handleBreakpoints({
52
53
  theme: theme
53
54
  }, resolveBreakpointValues({
@@ -77,6 +78,17 @@ export var style = function style(_ref) {
77
78
  base: base
78
79
  });
79
80
 
81
+ if (_typeof(directionValues) === 'object') {
82
+ Object.keys(directionValues).forEach(function (breakpoint, index, breakpoints) {
83
+ var directionValue = directionValues[breakpoint];
84
+
85
+ if (!directionValue) {
86
+ var previousDirectionValue = index > 0 ? directionValues[breakpoints[index - 1]] : 'column';
87
+ directionValues[breakpoint] = previousDirectionValue;
88
+ }
89
+ });
90
+ }
91
+
80
92
  var styleFromPropValue = function styleFromPropValue(propValue, breakpoint) {
81
93
  return {
82
94
  '& > :not(style) + :not(style)': _defineProperty({
@@ -789,7 +789,9 @@ process.env.NODE_ENV !== "production" ? Tabs.propTypes
789
789
  * Determines the color of the indicator.
790
790
  * @default 'primary'
791
791
  */
792
- indicatorColor: PropTypes.oneOf(['primary', 'secondary']),
792
+ indicatorColor: PropTypes
793
+ /* @typescript-to-proptypes-ignore */
794
+ .oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),
793
795
 
794
796
  /**
795
797
  * Callback fired when the value changes.
@@ -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.2
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())
@@ -220,7 +220,7 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
220
220
  const {
221
221
  clientX,
222
222
  clientY
223
- } = event.touches ? event.touches[0] : event;
223
+ } = event.touches && event.touches.length > 0 ? event.touches[0] : event;
224
224
  rippleX = Math.round(clientX - rect.left);
225
225
  rippleY = Math.round(clientY - rect.top);
226
226
  }
@@ -291,7 +291,8 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes
291
291
 
292
292
  /**
293
293
  * A backdrop component. This prop enables custom backdrop rendering.
294
- * @deprecated Use `components.Backdrop` instead.
294
+ * @deprecated Use `components.Backdrop` instead. While this prop currently works, it will be removed in the next major version.
295
+ * Use the `components.Backdrop` prop to make your application ready for the next version of Material UI.
295
296
  * @default styled(Backdrop, {
296
297
  * name: 'MuiModal',
297
298
  * slot: 'Backdrop',
@@ -181,6 +181,8 @@ process.env.NODE_ENV !== "production" ? FormHelperText.propTypes
181
181
  /**
182
182
  * The variant to use.
183
183
  */
184
- variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])
184
+ variant: PropTypes
185
+ /* @typescript-to-proptypes-ignore */
186
+ .oneOfType([PropTypes.oneOf(['filled', 'outlined', 'standard']), PropTypes.string])
185
187
  } : void 0;
186
188
  export default FormHelperText;
@@ -40,9 +40,8 @@ const ImageListItemRoot = styled('li', {
40
40
  })(({
41
41
  ownerState
42
42
  }) => _extends({
43
- display: 'inline-block',
44
- position: 'relative',
45
- lineHeight: 0
43
+ display: 'block',
44
+ position: 'relative'
46
45
  }, ownerState.variant === 'standard' && {
47
46
  // For titlebar under list item
48
47
  display: 'flex',
@@ -57,7 +56,8 @@ const ImageListItemRoot = styled('li', {
57
56
  [`& .${imageListItemClasses.img}`]: _extends({
58
57
  objectFit: 'cover',
59
58
  width: '100%',
60
- height: '100%'
59
+ height: '100%',
60
+ display: 'block'
61
61
  }, ownerState.variant === 'standard' && {
62
62
  height: 'auto',
63
63
  flexGrow: 1
@@ -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),
@@ -138,7 +138,8 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
138
138
 
139
139
  /**
140
140
  * A backdrop component. This prop enables custom backdrop rendering.
141
- * @deprecated Use `components.Backdrop` instead.
141
+ * @deprecated Use `components.Backdrop` instead. While this prop currently works, it will be removed in the next major version.
142
+ * Use the `components.Backdrop` prop to make your application ready for the next version of Material UI.
142
143
  * @default styled(Backdrop, {
143
144
  * name: 'MuiModal',
144
145
  * slot: 'Backdrop',
@@ -194,8 +195,8 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
194
195
  * @default {}
195
196
  */
196
197
  componentsProps: PropTypes.shape({
197
- backdrop: PropTypes.object,
198
- root: PropTypes.object
198
+ backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
199
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
199
200
  }),
200
201
 
201
202
  /**
@@ -61,6 +61,30 @@ process.env.NODE_ENV !== "production" ? Popper.propTypes
61
61
  /* @typescript-to-proptypes-ignore */
62
62
  .oneOfType([PropTypes.node, PropTypes.func]),
63
63
 
64
+ /**
65
+ * @ignore
66
+ */
67
+ component: PropTypes
68
+ /* @typescript-to-proptypes-ignore */
69
+ .elementType,
70
+
71
+ /**
72
+ * The components used for each slot inside the Popper.
73
+ * Either a string to use a HTML element or a component.
74
+ * @default {}
75
+ */
76
+ components: PropTypes.shape({
77
+ Root: PropTypes.elementType
78
+ }),
79
+
80
+ /**
81
+ * The props used for each slot inside the Popper.
82
+ * @default {}
83
+ */
84
+ componentsProps: PropTypes.shape({
85
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
86
+ }),
87
+
64
88
  /**
65
89
  * An HTML element or function that returns one.
66
90
  * The `container` will have the portal children appended to it.
@@ -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;
@@ -284,7 +284,6 @@ const SliderValueLabel = styled(SliderValueLabelUnstyled, {
284
284
  transition: theme.transitions.create(['transform'], {
285
285
  duration: theme.transitions.duration.shortest
286
286
  }),
287
- transformOrigin: 'bottom center',
288
287
  transform: 'translateY(-100%) scale(0)',
289
288
  position: 'absolute',
290
289
  backgroundColor: (theme.vars || theme).palette.grey[600],
@@ -296,6 +295,7 @@ const SliderValueLabel = styled(SliderValueLabelUnstyled, {
296
295
  padding: '0.25rem 0.75rem'
297
296
  }, ownerState.orientation === 'horizontal' && {
298
297
  top: '-10px',
298
+ transformOrigin: 'bottom center',
299
299
  '&:before': {
300
300
  position: 'absolute',
301
301
  content: '""',
@@ -308,7 +308,8 @@ const SliderValueLabel = styled(SliderValueLabelUnstyled, {
308
308
  }
309
309
  }, ownerState.orientation === 'vertical' && {
310
310
  right: '30px',
311
- top: '25px',
311
+ top: '24px',
312
+ transformOrigin: 'right center',
312
313
  '&:before': {
313
314
  position: 'absolute',
314
315
  content: '""',
@@ -46,7 +46,8 @@ export const style = ({
46
46
  theme
47
47
  }) => {
48
48
  let styles = _extends({
49
- display: 'flex'
49
+ display: 'flex',
50
+ flexDirection: 'column'
50
51
  }, handleBreakpoints({
51
52
  theme
52
53
  }, resolveBreakpointValues({
@@ -74,6 +75,17 @@ export const style = ({
74
75
  base
75
76
  });
76
77
 
78
+ if (typeof directionValues === 'object') {
79
+ Object.keys(directionValues).forEach((breakpoint, index, breakpoints) => {
80
+ const directionValue = directionValues[breakpoint];
81
+
82
+ if (!directionValue) {
83
+ const previousDirectionValue = index > 0 ? directionValues[breakpoints[index - 1]] : 'column';
84
+ directionValues[breakpoint] = previousDirectionValue;
85
+ }
86
+ });
87
+ }
88
+
77
89
  const styleFromPropValue = (propValue, breakpoint) => {
78
90
  return {
79
91
  '& > :not(style) + :not(style)': {
@@ -775,7 +775,9 @@ process.env.NODE_ENV !== "production" ? Tabs.propTypes
775
775
  * Determines the color of the indicator.
776
776
  * @default 'primary'
777
777
  */
778
- indicatorColor: PropTypes.oneOf(['primary', 'secondary']),
778
+ indicatorColor: PropTypes
779
+ /* @typescript-to-proptypes-ignore */
780
+ .oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),
779
781
 
780
782
  /**
781
783
  * Callback fired when the value changes.
@@ -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.2
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())
@@ -247,7 +247,7 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
247
247
  const {
248
248
  clientX,
249
249
  clientY
250
- } = event.touches ? event.touches[0] : event;
250
+ } = event.touches && event.touches.length > 0 ? event.touches[0] : event;
251
251
  rippleX = Math.round(clientX - rect.left);
252
252
  rippleY = Math.round(clientY - rect.top);
253
253
  }
@@ -320,7 +320,8 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes
320
320
 
321
321
  /**
322
322
  * A backdrop component. This prop enables custom backdrop rendering.
323
- * @deprecated Use `components.Backdrop` instead.
323
+ * @deprecated Use `components.Backdrop` instead. While this prop currently works, it will be removed in the next major version.
324
+ * Use the `components.Backdrop` prop to make your application ready for the next version of Material UI.
324
325
  * @default styled(Backdrop, {
325
326
  * name: 'MuiModal',
326
327
  * slot: 'Backdrop',
@@ -202,7 +202,9 @@ process.env.NODE_ENV !== "production" ? FormHelperText.propTypes
202
202
  /**
203
203
  * The variant to use.
204
204
  */
205
- variant: _propTypes.default.oneOf(['filled', 'outlined', 'standard'])
205
+ variant: _propTypes.default
206
+ /* @typescript-to-proptypes-ignore */
207
+ .oneOfType([_propTypes.default.oneOf(['filled', 'outlined', 'standard']), _propTypes.default.string])
206
208
  } : void 0;
207
209
  var _default = FormHelperText;
208
210
  exports.default = _default;
@@ -67,9 +67,8 @@ const ImageListItemRoot = (0, _styled.default)('li', {
67
67
  })(({
68
68
  ownerState
69
69
  }) => (0, _extends2.default)({
70
- display: 'inline-block',
71
- position: 'relative',
72
- lineHeight: 0
70
+ display: 'block',
71
+ position: 'relative'
73
72
  }, ownerState.variant === 'standard' && {
74
73
  // For titlebar under list item
75
74
  display: 'flex',
@@ -84,7 +83,8 @@ const ImageListItemRoot = (0, _styled.default)('li', {
84
83
  [`& .${_imageListItemClasses.default.img}`]: (0, _extends2.default)({
85
84
  objectFit: 'cover',
86
85
  width: '100%',
87
- height: '100%'
86
+ height: '100%',
87
+ display: 'block'
88
88
  }, ownerState.variant === 'standard' && {
89
89
  height: 'auto',
90
90
  flexGrow: 1
@@ -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),
@@ -162,7 +162,8 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
162
162
 
163
163
  /**
164
164
  * A backdrop component. This prop enables custom backdrop rendering.
165
- * @deprecated Use `components.Backdrop` instead.
165
+ * @deprecated Use `components.Backdrop` instead. While this prop currently works, it will be removed in the next major version.
166
+ * Use the `components.Backdrop` prop to make your application ready for the next version of Material UI.
166
167
  * @default styled(Backdrop, {
167
168
  * name: 'MuiModal',
168
169
  * slot: 'Backdrop',
@@ -184,7 +185,7 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
184
185
  /**
185
186
  * A single child content element.
186
187
  */
187
- children: _utils.elementAcceptingRef.isRequired,
188
+ children: _utils2.elementAcceptingRef.isRequired,
188
189
 
189
190
  /**
190
191
  * Override or extend the styles applied to the component.
@@ -218,8 +219,8 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
218
219
  * @default {}
219
220
  */
220
221
  componentsProps: _propTypes.default.shape({
221
- backdrop: _propTypes.default.object,
222
- root: _propTypes.default.object
222
+ backdrop: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
223
+ root: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
223
224
  }),
224
225
 
225
226
  /**
@@ -231,7 +232,7 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
231
232
  */
232
233
  container: _propTypes.default
233
234
  /* @typescript-to-proptypes-ignore */
234
- .oneOfType([_utils.HTMLElementType, _propTypes.default.func]),
235
+ .oneOfType([_utils2.HTMLElementType, _propTypes.default.func]),
235
236
 
236
237
  /**
237
238
  * If `true`, the modal will not automatically shift focus to itself when it opens, and
@@ -82,6 +82,30 @@ process.env.NODE_ENV !== "production" ? Popper.propTypes
82
82
  /* @typescript-to-proptypes-ignore */
83
83
  .oneOfType([_propTypes.default.node, _propTypes.default.func]),
84
84
 
85
+ /**
86
+ * @ignore
87
+ */
88
+ component: _propTypes.default
89
+ /* @typescript-to-proptypes-ignore */
90
+ .elementType,
91
+
92
+ /**
93
+ * The components used for each slot inside the Popper.
94
+ * Either a string to use a HTML element or a component.
95
+ * @default {}
96
+ */
97
+ components: _propTypes.default.shape({
98
+ Root: _propTypes.default.elementType
99
+ }),
100
+
101
+ /**
102
+ * The props used for each slot inside the Popper.
103
+ * @default {}
104
+ */
105
+ componentsProps: _propTypes.default.shape({
106
+ root: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
107
+ }),
108
+
85
109
  /**
86
110
  * An HTML element or function that returns one.
87
111
  * The `container` will have the portal children appended to it.
@@ -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;