@mui/material 5.8.5 → 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 (100) hide show
  1. package/Alert/Alert.js +19 -11
  2. package/Autocomplete/Autocomplete.d.ts +2 -0
  3. package/Autocomplete/Autocomplete.js +14 -10
  4. package/CHANGELOG.md +190 -0
  5. package/FilledInput/FilledInput.js +1 -1
  6. package/Input/Input.js +1 -1
  7. package/Modal/Modal.js +6 -6
  8. package/OutlinedInput/OutlinedInput.js +15 -0
  9. package/Popper/Popper.d.ts +1 -6
  10. package/README.md +60 -23
  11. package/ScopedCssBaseline/ScopedCssBaseline.d.ts +6 -0
  12. package/ScopedCssBaseline/ScopedCssBaseline.js +6 -1
  13. package/Select/Select.d.ts +1 -1
  14. package/Select/Select.js +1 -1
  15. package/Slider/Slider.js +9 -9
  16. package/SnackbarContent/SnackbarContent.js +1 -1
  17. package/Tabs/Tabs.js +10 -2
  18. package/Tooltip/Tooltip.js +6 -5
  19. package/Unstable_Grid2/Grid2.d.ts +4 -0
  20. package/Unstable_Grid2/Grid2.js +34 -0
  21. package/Unstable_Grid2/Grid2Props.d.ts +15 -0
  22. package/Unstable_Grid2/Grid2Props.js +1 -0
  23. package/Unstable_Grid2/grid2Classes.d.ts +5 -0
  24. package/Unstable_Grid2/grid2Classes.js +14 -0
  25. package/Unstable_Grid2/index.d.ts +4 -0
  26. package/Unstable_Grid2/index.js +4 -0
  27. package/Unstable_Grid2/package.json +6 -0
  28. package/index.d.ts +3 -0
  29. package/index.js +3 -1
  30. package/legacy/Alert/Alert.js +19 -11
  31. package/legacy/Autocomplete/Autocomplete.js +14 -10
  32. package/legacy/FilledInput/FilledInput.js +1 -1
  33. package/legacy/Input/Input.js +1 -1
  34. package/legacy/Modal/Modal.js +13 -9
  35. package/legacy/OutlinedInput/OutlinedInput.js +15 -0
  36. package/legacy/ScopedCssBaseline/ScopedCssBaseline.js +6 -1
  37. package/legacy/Select/Select.js +1 -1
  38. package/legacy/Slider/Slider.js +9 -9
  39. package/legacy/SnackbarContent/SnackbarContent.js +1 -1
  40. package/legacy/Tabs/Tabs.js +10 -2
  41. package/legacy/Tooltip/Tooltip.js +6 -5
  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/legacy/styles/CssVarsProvider.js +10 -8
  48. package/legacy/styles/experimental_extendTheme.js +85 -29
  49. package/modern/Alert/Alert.js +19 -11
  50. package/modern/Autocomplete/Autocomplete.js +13 -9
  51. package/modern/FilledInput/FilledInput.js +1 -1
  52. package/modern/Input/Input.js +1 -1
  53. package/modern/Modal/Modal.js +6 -6
  54. package/modern/OutlinedInput/OutlinedInput.js +15 -0
  55. package/modern/ScopedCssBaseline/ScopedCssBaseline.js +6 -1
  56. package/modern/Select/Select.js +1 -1
  57. package/modern/Slider/Slider.js +9 -9
  58. package/modern/SnackbarContent/SnackbarContent.js +1 -1
  59. package/modern/Tabs/Tabs.js +10 -2
  60. package/modern/Tooltip/Tooltip.js +6 -5
  61. package/modern/Unstable_Grid2/Grid2.js +34 -0
  62. package/modern/Unstable_Grid2/Grid2Props.js +1 -0
  63. package/modern/Unstable_Grid2/grid2Classes.js +14 -0
  64. package/modern/Unstable_Grid2/index.js +4 -0
  65. package/modern/index.js +3 -1
  66. package/modern/styles/CssVarsProvider.js +6 -6
  67. package/modern/styles/experimental_extendTheme.js +80 -30
  68. package/node/Alert/Alert.js +19 -11
  69. package/node/Autocomplete/Autocomplete.js +14 -10
  70. package/node/FilledInput/FilledInput.js +1 -1
  71. package/node/Input/Input.js +1 -1
  72. package/node/Modal/Modal.js +9 -9
  73. package/node/OutlinedInput/OutlinedInput.js +13 -0
  74. package/node/ScopedCssBaseline/ScopedCssBaseline.js +6 -1
  75. package/node/Select/Select.js +1 -1
  76. package/node/Slider/Slider.js +9 -9
  77. package/node/SnackbarContent/SnackbarContent.js +1 -1
  78. package/node/Tabs/Tabs.js +10 -2
  79. package/node/Tooltip/Tooltip.js +6 -5
  80. package/node/Unstable_Grid2/Grid2.js +47 -0
  81. package/node/Unstable_Grid2/Grid2Props.js +5 -0
  82. package/node/Unstable_Grid2/grid2Classes.js +25 -0
  83. package/node/Unstable_Grid2/index.js +56 -0
  84. package/node/index.js +22 -1
  85. package/node/styles/CssVarsProvider.js +11 -6
  86. package/node/styles/experimental_extendTheme.js +84 -31
  87. package/package.json +7 -7
  88. package/styles/CssVarsProvider.d.ts +14 -28
  89. package/styles/CssVarsProvider.js +10 -6
  90. package/styles/components.d.ts +5 -0
  91. package/styles/createPalette.d.ts +0 -89
  92. package/styles/createTheme.d.ts +1 -1
  93. package/styles/experimental_extendTheme.d.ts +315 -35
  94. package/styles/experimental_extendTheme.js +80 -30
  95. package/styles/index.d.ts +35 -1
  96. package/styles/overrides.d.ts +3 -1
  97. package/styles/props.d.ts +2 -0
  98. package/themeCssVarsAugmentation/index.d.ts +26 -0
  99. package/umd/material-ui.development.js +1211 -559
  100. package/umd/material-ui.production.min.js +20 -25
package/Slider/Slider.js CHANGED
@@ -579,14 +579,14 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes
579
579
  * @default {}
580
580
  */
581
581
  componentsProps: PropTypes.shape({
582
- input: PropTypes.object,
583
- mark: PropTypes.object,
584
- markLabel: PropTypes.object,
585
- rail: PropTypes.object,
586
- root: PropTypes.object,
587
- thumb: PropTypes.object,
588
- track: PropTypes.object,
589
- valueLabel: PropTypes.shape({
582
+ input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
583
+ mark: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
584
+ markLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
585
+ rail: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
586
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
587
+ thumb: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
588
+ track: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
589
+ valueLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
590
590
  children: PropTypes.element,
591
591
  className: PropTypes.string,
592
592
  components: PropTypes.shape({
@@ -596,7 +596,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes
596
596
  style: PropTypes.object,
597
597
  value: PropTypes.number,
598
598
  valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on'])
599
- })
599
+ })])
600
600
  }),
601
601
 
602
602
  /**
@@ -35,7 +35,7 @@ const SnackbarContentRoot = styled(Paper, {
35
35
  const emphasis = theme.palette.mode === 'light' ? 0.8 : 0.98;
36
36
  const backgroundColor = emphasize(theme.palette.background.default, emphasis);
37
37
  return _extends({}, theme.typography.body2, {
38
- color: theme.vars ? theme.vars.palette.text.primary : theme.palette.getContrastText(backgroundColor),
38
+ color: theme.vars ? theme.vars.palette.SnackbarContent.color : theme.palette.getContrastText(backgroundColor),
39
39
  backgroundColor: theme.vars ? theme.vars.palette.SnackbarContent.bg : backgroundColor,
40
40
  display: 'flex',
41
41
  alignItems: 'center',
package/Tabs/Tabs.js CHANGED
@@ -541,8 +541,16 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
541
541
  });
542
542
  React.useEffect(() => {
543
543
  const handleResize = debounce(() => {
544
- updateIndicatorState();
545
- updateScrollButtonState();
544
+ // If the Tabs component is replaced by Suspense with a fallback, the last
545
+ // ResizeObserver's handler that runs because of the change in the layout is trying to
546
+ // access a dom node that is no longer there (as the fallback component is being shown instead).
547
+ // See https://github.com/mui/material-ui/issues/33276
548
+ // TODO: Add tests that will ensure the component is not failing when
549
+ // replaced by Suspense with a fallback, once React is updated to version 18
550
+ if (tabsRef.current) {
551
+ updateIndicatorState();
552
+ updateScrollButtonState();
553
+ }
546
554
  });
547
555
  const win = ownerWindow(tabsRef.current);
548
556
  win.addEventListener('resize', handleResize);
@@ -338,12 +338,15 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
338
338
  const handleEnter = event => {
339
339
  if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {
340
340
  return;
341
+ } // Workaround for https://github.com/facebook/react/issues/7769
342
+
343
+
344
+ if (!childNode) {
345
+ setChildNode(event.currentTarget);
341
346
  } // Remove the title ahead of time.
342
347
  // We don't want to wait for the next render commit.
343
348
  // We would risk displaying two tooltips at the same time (native + this one).
344
-
345
-
346
- if (childNode) {
349
+ else {
347
350
  childNode.removeAttribute('title');
348
351
  }
349
352
 
@@ -388,8 +391,6 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
388
391
 
389
392
  const handleFocus = event => {
390
393
  // Workaround for https://github.com/facebook/react/issues/7769
391
- // The autoFocus of React might trigger the event before the componentDidMount.
392
- // We need to account for this eventuality.
393
394
  if (!childNode) {
394
395
  setChildNode(event.currentTarget);
395
396
  }
@@ -0,0 +1,4 @@
1
+ import { OverridableComponent } from '@mui/types';
2
+ import { Grid2TypeMap } from './Grid2Props';
3
+ declare const Grid2: OverridableComponent<Grid2TypeMap<{}, "div">>;
4
+ export default Grid2;
@@ -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,15 @@
1
+ import React from 'react';
2
+ import { OverrideProps } from '@mui/types';
3
+ import { SxProps, SystemProps } from '@mui/system';
4
+ import { GridBaseProps } from '@mui/system/Unstable_Grid';
5
+ import { Theme } from '../styles';
6
+ export declare type Grid2Slot = 'root';
7
+ export interface Grid2TypeMap<P = {}, D extends React.ElementType = 'div'> {
8
+ props: P & GridBaseProps & {
9
+ sx?: SxProps<Theme>;
10
+ } & SystemProps<Theme>;
11
+ defaultComponent: D;
12
+ }
13
+ export declare type Grid2Props<D extends React.ElementType = Grid2TypeMap['defaultComponent'], P = {
14
+ component?: React.ElementType;
15
+ }> = OverrideProps<Grid2TypeMap<P, D>, D>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import { GridClasses } from '@mui/system/Unstable_Grid';
2
+ export declare type Grid2ClassKey = keyof GridClasses;
3
+ export declare function getGrid2UtilityClass(slot: string): string;
4
+ declare const grid2Classes: GridClasses;
5
+ export default grid2Classes;
@@ -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';
@@ -0,0 +1,4 @@
1
+ export { default } from './Grid2';
2
+ export * from './Grid2Props';
3
+ export { default as grid2Classes } from './grid2Classes';
4
+ export * from './grid2Classes';
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "./index.js",
4
+ "main": "../node/Unstable_Grid2/index.js",
5
+ "types": "./index.d.ts"
6
+ }
package/index.d.ts CHANGED
@@ -224,6 +224,9 @@ export * from './FormLabel';
224
224
  export { default as Grid } from './Grid';
225
225
  export * from './Grid';
226
226
 
227
+ export { default as Unstable_Grid2 } from './Unstable_Grid2';
228
+ export * from './Unstable_Grid2';
229
+
227
230
  export { default as Grow } from './Grow';
228
231
  export * from './Grow';
229
232
 
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.8.5
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';
@@ -55,20 +55,28 @@ var AlertRoot = styled(Paper, {
55
55
  display: 'flex',
56
56
  padding: '6px 16px'
57
57
  }, color && ownerState.variant === 'standard' && _defineProperty({
58
- color: getColor(theme.palette[color].light, 0.6),
59
- backgroundColor: getBackgroundColor(theme.palette[color].light, 0.9)
60
- }, "& .".concat(alertClasses.icon), {
58
+ color: theme.vars ? theme.vars.palette.Alert["".concat(color, "Color")] : getColor(theme.palette[color].light, 0.6),
59
+ backgroundColor: theme.vars ? theme.vars.palette.Alert["".concat(color, "StandardBg")] : getBackgroundColor(theme.palette[color].light, 0.9)
60
+ }, "& .".concat(alertClasses.icon), theme.vars ? {
61
+ color: theme.vars.palette.Alert["".concat(color, "IconColor")]
62
+ } : {
61
63
  color: theme.palette.mode === 'dark' ? theme.palette[color].main : theme.palette[color].light
62
64
  }), color && ownerState.variant === 'outlined' && _defineProperty({
63
- color: getColor(theme.palette[color].light, 0.6),
64
- border: "1px solid ".concat(theme.palette[color].light)
65
- }, "& .".concat(alertClasses.icon), {
65
+ color: theme.vars ? theme.vars.palette.Alert["".concat(color, "Color")] : getColor(theme.palette[color].light, 0.6),
66
+ border: "1px solid ".concat((theme.vars || theme).palette[color].light)
67
+ }, "& .".concat(alertClasses.icon), theme.vars ? {
68
+ color: theme.vars.palette.Alert["".concat(color, "IconColor")]
69
+ } : {
66
70
  color: theme.palette.mode === 'dark' ? theme.palette[color].main : theme.palette[color].light
67
- }), color && ownerState.variant === 'filled' && {
68
- color: '#fff',
69
- fontWeight: theme.typography.fontWeightMedium,
70
- backgroundColor: theme.palette.mode === 'dark' ? theme.palette[color].dark : theme.palette[color].main
71
- });
71
+ }), color && ownerState.variant === 'filled' && _extends({
72
+ fontWeight: theme.typography.fontWeightMedium
73
+ }, theme.vars ? {
74
+ color: theme.vars.palette.Alert["".concat(color, "FilledColor")],
75
+ backgroundColor: theme.vars.palette.Alert["".concat(color, "FilledBg")]
76
+ } : {
77
+ backgroundColor: theme.palette.mode === 'dark' ? theme.palette[color].dark : theme.palette[color].main,
78
+ color: theme.palette.getContrastText(theme.palette.mode === 'dark' ? theme.palette[color].dark : theme.palette[color].main)
79
+ }));
72
80
  });
73
81
  var AlertIcon = styled('div', {
74
82
  name: 'MuiAlert',
@@ -316,7 +316,7 @@ var AutocompleteGroupUl = styled('ul', {
316
316
  }));
317
317
  export { createFilterOptions };
318
318
  var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps, ref) {
319
- var _componentsProps$clea, _componentsProps$pape;
319
+ var _componentsProps$clea, _componentsProps$popu, _componentsProps$popp, _componentsProps$pape;
320
320
 
321
321
  var props = useThemeProps({
322
322
  props: inProps,
@@ -477,7 +477,7 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
477
477
  if (multiple && value.length > 0) {
478
478
  var getCustomizedTagProps = function getCustomizedTagProps(params) {
479
479
  return _extends({
480
- className: clsx(classes.tag),
480
+ className: classes.tag,
481
481
  disabled: disabled
482
482
  }, getTagProps(params));
483
483
  };
@@ -577,21 +577,21 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
577
577
  disabled: disabled,
578
578
  "aria-label": popupOpen ? closeText : openText,
579
579
  title: popupOpen ? closeText : openText,
580
- className: clsx(classes.popupIndicator),
581
- ownerState: ownerState,
580
+ ownerState: ownerState
581
+ }, componentsProps.popupIndicator, {
582
+ className: clsx(classes.popupIndicator, (_componentsProps$popu = componentsProps.popupIndicator) == null ? void 0 : _componentsProps$popu.className),
582
583
  children: popupIcon
583
584
  })) : null]
584
585
  })
585
586
  }),
586
587
  inputProps: _extends({
587
- className: clsx(classes.input),
588
+ className: classes.input,
588
589
  disabled: disabled,
589
590
  readOnly: readOnly
590
591
  }, getInputProps())
591
592
  })
592
- })), popupOpen && anchorEl ? /*#__PURE__*/_jsx(AutocompletePopper, {
593
+ })), popupOpen && anchorEl ? /*#__PURE__*/_jsx(AutocompletePopper, _extends({
593
594
  as: PopperComponent,
594
- className: clsx(classes.popper),
595
595
  disablePortal: disablePortal,
596
596
  style: {
597
597
  width: anchorEl ? anchorEl.clientWidth : null
@@ -599,7 +599,9 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
599
599
  ownerState: ownerState,
600
600
  role: "presentation",
601
601
  anchorEl: anchorEl,
602
- open: true,
602
+ open: true
603
+ }, componentsProps.popper, {
604
+ className: clsx(classes.popper, (_componentsProps$popp = componentsProps.popper) == null ? void 0 : _componentsProps$popp.className),
603
605
  children: /*#__PURE__*/_jsxs(AutocompletePaper, _extends({
604
606
  ownerState: ownerState,
605
607
  as: PaperComponent
@@ -638,7 +640,7 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
638
640
  })
639
641
  })) : null]
640
642
  }))
641
- }) : null]
643
+ })) : null]
642
644
  });
643
645
  });
644
646
  process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
@@ -740,7 +742,9 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
740
742
  */
741
743
  componentsProps: PropTypes.shape({
742
744
  clearIndicator: PropTypes.object,
743
- paper: PropTypes.object
745
+ paper: PropTypes.object,
746
+ popper: PropTypes.object,
747
+ popupIndicator: PropTypes.object
744
748
  }),
745
749
 
746
750
  /**
@@ -90,7 +90,7 @@ var FilledInputRoot = styled(InputBaseRoot, {
90
90
  transform: 'scaleX(1)' // error is always underlined in red
91
91
 
92
92
  }), _defineProperty(_ref2, '&:before', {
93
- borderBottom: "1px solid ".concat(theme.vars ? "rgba(".concat(theme.vars.palette.common.onBackgroundChannel, " / ").concat(theme.vars.opacity.inputTouchBottomLine, ")") : bottomLineColor),
93
+ borderBottom: "1px solid ".concat(theme.vars ? "rgba(".concat(theme.vars.palette.common.onBackgroundChannel, " / ").concat(theme.vars.opacity.inputUnderline, ")") : bottomLineColor),
94
94
  left: 0,
95
95
  bottom: 0,
96
96
  // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
@@ -43,7 +43,7 @@ var InputRoot = styled(InputBaseRoot, {
43
43
  var bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';
44
44
 
45
45
  if (theme.vars) {
46
- bottomLineColor = "rgba(".concat(theme.vars.palette.common.onBackgroundChannel, " / ").concat(theme.vars.opacity.inputTouchBottomLine, ")");
46
+ bottomLineColor = "rgba(".concat(theme.vars.palette.common.onBackgroundChannel, " / ").concat(theme.vars.opacity.inputUnderline, ")");
47
47
  }
48
48
 
49
49
  return _extends({
@@ -2,9 +2,9 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import * as React from 'react';
4
4
  import PropTypes from 'prop-types';
5
- import { isHostComponent } from '@mui/base';
6
- import { elementAcceptingRef, HTMLElementType } from '@mui/utils';
7
5
  import ModalUnstyled, { modalUnstyledClasses } from '@mui/base/ModalUnstyled';
6
+ import { isHostComponent, resolveComponentProps } from '@mui/base/utils';
7
+ import { elementAcceptingRef, HTMLElementType } from '@mui/utils';
8
8
  import styled from '../styles/styled';
9
9
  import useThemeProps from '../styles/useThemeProps';
10
10
  import Backdrop from '../Backdrop';
@@ -125,11 +125,15 @@ var Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
125
125
  Backdrop: BackdropComponent
126
126
  }, components),
127
127
  componentsProps: {
128
- root: _extends({}, componentsProps.root, !isHostComponent(Root) && {
129
- as: component,
130
- theme: theme
131
- }),
132
- backdrop: _extends({}, BackdropProps, componentsProps.backdrop)
128
+ root: function root() {
129
+ return _extends({}, resolveComponentProps(componentsProps.root, ownerState), !isHostComponent(Root) && {
130
+ as: component,
131
+ theme: theme
132
+ });
133
+ },
134
+ backdrop: function backdrop() {
135
+ return _extends({}, BackdropProps, resolveComponentProps(componentsProps.backdrop, ownerState));
136
+ }
133
137
  },
134
138
  onTransitionEnter: function onTransitionEnter() {
135
139
  return setExited(false);
@@ -210,8 +214,8 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
210
214
  * @default {}
211
215
  */
212
216
  componentsProps: PropTypes.shape({
213
- backdrop: PropTypes.object,
214
- root: PropTypes.object
217
+ backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
218
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
215
219
  }),
216
220
 
217
221
  /**
@@ -141,6 +141,20 @@ var OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inProps
141
141
  muiFormControl: muiFormControl,
142
142
  states: ['required']
143
143
  });
144
+
145
+ var ownerState = _extends({}, props, {
146
+ color: fcs.color || 'primary',
147
+ disabled: fcs.disabled,
148
+ error: fcs.error,
149
+ focused: fcs.focused,
150
+ formControl: muiFormControl,
151
+ fullWidth: fullWidth,
152
+ hiddenLabel: fcs.hiddenLabel,
153
+ multiline: multiline,
154
+ size: fcs.size,
155
+ type: type
156
+ });
157
+
144
158
  return /*#__PURE__*/_jsx(InputBase, _extends({
145
159
  components: _extends({
146
160
  Root: OutlinedInputRoot,
@@ -148,6 +162,7 @@ var OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inProps
148
162
  }, components),
149
163
  renderSuffix: function renderSuffix(state) {
150
164
  return /*#__PURE__*/_jsx(NotchedOutlineRoot, {
165
+ ownerState: ownerState,
151
166
  className: classes.notchedOutline,
152
167
  label: label != null && label !== '' && fcs.required ? _React$Fragment || (_React$Fragment = /*#__PURE__*/_jsxs(React.Fragment, {
153
168
  children: [label, "\xA0", '*']
@@ -94,6 +94,11 @@ process.env.NODE_ENV !== "production" ? ScopedCssBaseline.propTypes
94
94
  * For more details, check out https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme
95
95
  * For browser support, check out https://caniuse.com/?search=color-scheme
96
96
  */
97
- enableColorScheme: PropTypes.bool
97
+ enableColorScheme: PropTypes.bool,
98
+
99
+ /**
100
+ * The system prop that allows defining system overrides as well as additional CSS styles.
101
+ */
102
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
98
103
  } : void 0;
99
104
  export default ScopedCssBaseline;
@@ -301,7 +301,7 @@ process.env.NODE_ENV !== "production" ? Select.propTypes
301
301
  * If the value is an object it must have reference equality with the option in order to be selected.
302
302
  * If the value is not an object, the string representation must match with the string representation of the option in order to be selected.
303
303
  */
304
- value: PropTypes.any,
304
+ value: PropTypes.oneOfType([PropTypes.oneOf(['']), PropTypes.any]),
305
305
 
306
306
  /**
307
307
  * The variant to use.
@@ -590,14 +590,14 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes
590
590
  * @default {}
591
591
  */
592
592
  componentsProps: PropTypes.shape({
593
- input: PropTypes.object,
594
- mark: PropTypes.object,
595
- markLabel: PropTypes.object,
596
- rail: PropTypes.object,
597
- root: PropTypes.object,
598
- thumb: PropTypes.object,
599
- track: PropTypes.object,
600
- valueLabel: PropTypes.shape({
593
+ input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
594
+ mark: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
595
+ markLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
596
+ rail: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
597
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
598
+ thumb: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
599
+ track: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
600
+ valueLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
601
601
  children: PropTypes.element,
602
602
  className: PropTypes.string,
603
603
  components: PropTypes.shape({
@@ -607,7 +607,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes
607
607
  style: PropTypes.object,
608
608
  value: PropTypes.number,
609
609
  valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on'])
610
- })
610
+ })])
611
611
  }),
612
612
 
613
613
  /**
@@ -34,7 +34,7 @@ var SnackbarContentRoot = styled(Paper, {
34
34
  var emphasis = theme.palette.mode === 'light' ? 0.8 : 0.98;
35
35
  var backgroundColor = emphasize(theme.palette.background.default, emphasis);
36
36
  return _extends({}, theme.typography.body2, _defineProperty({
37
- color: theme.vars ? theme.vars.palette.text.primary : theme.palette.getContrastText(backgroundColor),
37
+ color: theme.vars ? theme.vars.palette.SnackbarContent.color : theme.palette.getContrastText(backgroundColor),
38
38
  backgroundColor: theme.vars ? theme.vars.palette.SnackbarContent.bg : backgroundColor,
39
39
  display: 'flex',
40
40
  alignItems: 'center',
@@ -552,8 +552,16 @@ var Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
552
552
  });
553
553
  React.useEffect(function () {
554
554
  var handleResize = debounce(function () {
555
- updateIndicatorState();
556
- updateScrollButtonState();
555
+ // If the Tabs component is replaced by Suspense with a fallback, the last
556
+ // ResizeObserver's handler that runs because of the change in the layout is trying to
557
+ // access a dom node that is no longer there (as the fallback component is being shown instead).
558
+ // See https://github.com/mui/material-ui/issues/33276
559
+ // TODO: Add tests that will ensure the component is not failing when
560
+ // replaced by Suspense with a fallback, once React is updated to version 18
561
+ if (tabsRef.current) {
562
+ updateIndicatorState();
563
+ updateScrollButtonState();
564
+ }
557
565
  });
558
566
  var win = ownerWindow(tabsRef.current);
559
567
  win.addEventListener('resize', handleResize);
@@ -360,12 +360,15 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
360
360
  var handleEnter = function handleEnter(event) {
361
361
  if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {
362
362
  return;
363
+ } // Workaround for https://github.com/facebook/react/issues/7769
364
+
365
+
366
+ if (!childNode) {
367
+ setChildNode(event.currentTarget);
363
368
  } // Remove the title ahead of time.
364
369
  // We don't want to wait for the next render commit.
365
370
  // We would risk displaying two tooltips at the same time (native + this one).
366
-
367
-
368
- if (childNode) {
371
+ else {
369
372
  childNode.removeAttribute('title');
370
373
  }
371
374
 
@@ -411,8 +414,6 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
411
414
 
412
415
  var handleFocus = function handleFocus(event) {
413
416
  // Workaround for https://github.com/facebook/react/issues/7769
414
- // The autoFocus of React might trigger the event before the componentDidMount.
415
- // We need to account for this eventuality.
416
417
  if (!childNode) {
417
418
  setChildNode(event.currentTarget);
418
419
  }
@@ -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.5
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';