@mui/material 5.8.2 → 5.8.5

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 (154) hide show
  1. package/Alert/Alert.js +3 -1
  2. package/AppBar/AppBar.js +22 -5
  3. package/Autocomplete/autocompleteClasses.d.ts +1 -1
  4. package/Avatar/Avatar.js +7 -4
  5. package/Badge/Badge.js +2 -2
  6. package/Button/buttonClasses.d.ts +24 -0
  7. package/Button/buttonClasses.js +1 -1
  8. package/CHANGELOG.md +225 -8
  9. package/Checkbox/Checkbox.js +4 -4
  10. package/Chip/Chip.js +31 -30
  11. package/Dialog/Dialog.js +11 -6
  12. package/FilledInput/FilledInput.js +28 -13
  13. package/Grid/Grid.d.ts +73 -52
  14. package/Grid/Grid.js +94 -40
  15. package/Grow/Grow.js +1 -2
  16. package/Hidden/withWidth.js +0 -2
  17. package/InputBase/InputBase.js +2 -2
  18. package/LinearProgress/LinearProgress.js +6 -2
  19. package/Link/Link.js +10 -17
  20. package/Link/getTextDecoration.d.ts +15 -0
  21. package/Link/getTextDecoration.js +29 -0
  22. package/Modal/Modal.d.ts +2 -0
  23. package/Modal/Modal.js +25 -8
  24. package/OutlinedInput/OutlinedInput.js +25 -10
  25. package/Popover/Popover.d.ts +7 -0
  26. package/Popover/index.js +1 -0
  27. package/README.md +13 -12
  28. package/Skeleton/Skeleton.js +8 -3
  29. package/Slider/Slider.d.ts +3 -1
  30. package/Slider/Slider.js +35 -20
  31. package/Snackbar/Snackbar.js +6 -20
  32. package/SnackbarContent/SnackbarContent.js +3 -3
  33. package/SpeedDialAction/SpeedDialAction.js +7 -7
  34. package/Stack/Stack.js +1 -1
  35. package/StepConnector/StepConnector.js +14 -11
  36. package/StepContent/StepContent.js +1 -1
  37. package/StepIcon/StepIcon.js +2 -1
  38. package/Switch/Switch.js +11 -11
  39. package/Tab/Tab.d.ts +0 -1
  40. package/TableCell/TableCell.js +5 -5
  41. package/Tabs/Tabs.js +6 -0
  42. package/Tooltip/Tooltip.js +1 -1
  43. package/index.js +1 -1
  44. package/legacy/Alert/Alert.js +3 -1
  45. package/legacy/AppBar/AppBar.js +23 -4
  46. package/legacy/Avatar/Avatar.js +7 -4
  47. package/legacy/Badge/Badge.js +2 -2
  48. package/legacy/Button/buttonClasses.js +1 -1
  49. package/legacy/Checkbox/Checkbox.js +4 -4
  50. package/legacy/Chip/Chip.js +31 -30
  51. package/legacy/Dialog/Dialog.js +11 -6
  52. package/legacy/FilledInput/FilledInput.js +28 -14
  53. package/legacy/Grid/Grid.js +97 -48
  54. package/legacy/Grow/Grow.js +1 -2
  55. package/legacy/Hidden/withWidth.js +0 -2
  56. package/legacy/InputBase/InputBase.js +2 -2
  57. package/legacy/LinearProgress/LinearProgress.js +6 -2
  58. package/legacy/Link/Link.js +10 -17
  59. package/legacy/Link/getTextDecoration.js +28 -0
  60. package/legacy/Modal/Modal.js +23 -7
  61. package/legacy/OutlinedInput/OutlinedInput.js +21 -9
  62. package/legacy/Popover/index.js +1 -0
  63. package/legacy/Skeleton/Skeleton.js +2 -2
  64. package/legacy/Slider/Slider.js +35 -20
  65. package/legacy/Snackbar/Snackbar.js +6 -21
  66. package/legacy/SnackbarContent/SnackbarContent.js +3 -3
  67. package/legacy/SpeedDialAction/SpeedDialAction.js +7 -7
  68. package/legacy/Stack/Stack.js +2 -1
  69. package/legacy/StepConnector/StepConnector.js +2 -1
  70. package/legacy/StepContent/StepContent.js +1 -1
  71. package/legacy/StepIcon/StepIcon.js +2 -1
  72. package/legacy/Switch/Switch.js +11 -11
  73. package/legacy/TableCell/TableCell.js +5 -5
  74. package/legacy/Tabs/Tabs.js +6 -0
  75. package/legacy/Tooltip/Tooltip.js +1 -1
  76. package/legacy/index.js +1 -1
  77. package/legacy/styles/CssVarsProvider.js +4 -1
  78. package/legacy/styles/experimental_extendTheme.js +113 -18
  79. package/modern/Alert/Alert.js +3 -1
  80. package/modern/AppBar/AppBar.js +22 -5
  81. package/modern/Avatar/Avatar.js +7 -4
  82. package/modern/Badge/Badge.js +2 -2
  83. package/modern/Button/buttonClasses.js +1 -1
  84. package/modern/Checkbox/Checkbox.js +4 -4
  85. package/modern/Chip/Chip.js +31 -30
  86. package/modern/Dialog/Dialog.js +11 -6
  87. package/modern/FilledInput/FilledInput.js +27 -12
  88. package/modern/Grid/Grid.js +94 -40
  89. package/modern/Grow/Grow.js +1 -2
  90. package/modern/Hidden/withWidth.js +0 -2
  91. package/modern/InputBase/InputBase.js +2 -2
  92. package/modern/LinearProgress/LinearProgress.js +6 -2
  93. package/modern/Link/Link.js +10 -17
  94. package/modern/Link/getTextDecoration.js +29 -0
  95. package/modern/Modal/Modal.js +24 -7
  96. package/modern/OutlinedInput/OutlinedInput.js +25 -10
  97. package/modern/Popover/index.js +1 -0
  98. package/modern/Skeleton/Skeleton.js +7 -2
  99. package/modern/Slider/Slider.js +35 -20
  100. package/modern/Snackbar/Snackbar.js +6 -20
  101. package/modern/SnackbarContent/SnackbarContent.js +3 -3
  102. package/modern/SpeedDialAction/SpeedDialAction.js +7 -7
  103. package/modern/Stack/Stack.js +1 -1
  104. package/modern/StepConnector/StepConnector.js +14 -11
  105. package/modern/StepContent/StepContent.js +1 -1
  106. package/modern/StepIcon/StepIcon.js +2 -1
  107. package/modern/Switch/Switch.js +11 -11
  108. package/modern/TableCell/TableCell.js +5 -5
  109. package/modern/Tabs/Tabs.js +6 -0
  110. package/modern/Tooltip/Tooltip.js +1 -1
  111. package/modern/index.js +1 -1
  112. package/modern/styles/CssVarsProvider.js +4 -1
  113. package/modern/styles/experimental_extendTheme.js +114 -18
  114. package/node/Alert/Alert.js +3 -1
  115. package/node/AppBar/AppBar.js +22 -5
  116. package/node/Avatar/Avatar.js +7 -4
  117. package/node/Badge/Badge.js +2 -2
  118. package/node/Button/buttonClasses.js +1 -1
  119. package/node/Checkbox/Checkbox.js +4 -4
  120. package/node/Chip/Chip.js +31 -30
  121. package/node/Dialog/Dialog.js +11 -6
  122. package/node/FilledInput/FilledInput.js +28 -13
  123. package/node/Grid/Grid.js +95 -40
  124. package/node/Grow/Grow.js +1 -2
  125. package/node/Hidden/withWidth.js +0 -3
  126. package/node/InputBase/InputBase.js +2 -2
  127. package/node/LinearProgress/LinearProgress.js +6 -2
  128. package/node/Link/Link.js +12 -20
  129. package/node/Link/getTextDecoration.js +39 -0
  130. package/node/Modal/Modal.js +25 -8
  131. package/node/OutlinedInput/OutlinedInput.js +25 -10
  132. package/node/Popover/index.js +13 -3
  133. package/node/Skeleton/Skeleton.js +7 -2
  134. package/node/Slider/Slider.js +35 -20
  135. package/node/Snackbar/Snackbar.js +6 -18
  136. package/node/SnackbarContent/SnackbarContent.js +3 -3
  137. package/node/SpeedDialAction/SpeedDialAction.js +7 -7
  138. package/node/Stack/Stack.js +1 -1
  139. package/node/StepConnector/StepConnector.js +14 -11
  140. package/node/StepContent/StepContent.js +1 -1
  141. package/node/StepIcon/StepIcon.js +2 -1
  142. package/node/Switch/Switch.js +11 -11
  143. package/node/TableCell/TableCell.js +5 -5
  144. package/node/Tabs/Tabs.js +6 -0
  145. package/node/Tooltip/Tooltip.js +1 -1
  146. package/node/index.js +1 -1
  147. package/node/styles/CssVarsProvider.js +4 -1
  148. package/node/styles/experimental_extendTheme.js +112 -17
  149. package/package.json +6 -7
  150. package/styles/CssVarsProvider.js +4 -1
  151. package/styles/createPalette.d.ts +65 -2
  152. package/styles/experimental_extendTheme.js +114 -18
  153. package/umd/material-ui.development.js +767 -414
  154. package/umd/material-ui.production.min.js +27 -22
package/README.md CHANGED
@@ -7,11 +7,13 @@
7
7
 
8
8
  **MUI Core** contains foundational React UI component libraries for shipping new features faster.
9
9
 
10
- - _Material UI_ is a comprehensive library of components that features our implementation of Google's [Material Design](https://material.io/design/introduction/) system.
10
+ - [_Material UI_](https://mui.com/material-ui/getting-started/overview/) is a comprehensive library of components that features our implementation of Google's [Material Design](https://material.io/design/introduction/) system.
11
11
 
12
- - _MUI Base_ is our library of "unstyled" components and low-level hooks. With Base, you gain complete control over your app's CSS and accessibility features.
12
+ - [_Joy UI_](https://mui.com/joy-ui/getting-started/overview/) is a beautifully designed library of React UI components.
13
13
 
14
- - _MUI System_ is a collection of CSS utilities to help you rapidly lay out custom designs.
14
+ - [_MUI Base_](https://mui.com/base/getting-started/overview/) is our library of "unstyled" components and low-level hooks. With Base, you gain complete control over your app's CSS and accessibility features.
15
+
16
+ - [_MUI System_](https://mui.com/system/basics/) is a collection of CSS utilities to help you rapidly lay out custom designs.
15
17
 
16
18
  <div align="center">
17
19
 
@@ -48,9 +50,9 @@ yarn add @mui/material @emotion/react @emotion/styled
48
50
  <details>
49
51
  <summary>Older versions</summary>
50
52
 
51
- - **[v4.x](https://v4.mui.com/)** ([Migration from v4 to v5](https://mui.com/material-ui/guides/migration-v4/))
52
- - **[v3.x](https://v3.mui.com/)** ([Migration from v3 to v4](https://mui.com/material-ui/guides/migration-v3/))
53
- - **[v0.x](https://v0.mui.com/)** ([Migration to v1](https://mui.com/material-ui/guides/migration-v0x/))
53
+ - **[v4.x](https://v4.mui.com/)** ([Migration from v4 to v5](https://mui.com/material-ui/migration/migration-v4/))
54
+ - **[v3.x](https://v3.mui.com/)** ([Migration from v3 to v4](https://mui.com/material-ui/migration/migration-v3/))
55
+ - **[v0.x](https://v0.mui.com/)** ([Migration to v1](https://mui.com/material-ui/migration/migration-v0x/))
54
56
 
55
57
  </details>
56
58
 
@@ -134,15 +136,10 @@ Here is an example of a basic app using Material UI's `Button` component:
134
136
 
135
137
  ```jsx
136
138
  import * as React from 'react';
137
- import ReactDOM from 'react-dom';
138
139
  import Button from '@mui/material/Button';
139
140
 
140
141
  function App() {
141
- return (
142
- <Button variant="contained" color="primary">
143
- Hello World
144
- </Button>
145
- );
142
+ return <Button variant="contained">Hello World</Button>;
146
143
  }
147
144
  ```
148
145
 
@@ -191,6 +188,10 @@ Future plans and high-priority features and enhancements can be found in our [ro
191
188
  This project is licensed under the terms of the
192
189
  [MIT license](/LICENSE).
193
190
 
191
+ ## Security
192
+
193
+ For details of supported versions and contact details for reporting security issues, please refer to the [security policy](https://github.com/mui/material-ui/blob/master/SECURITY.md).
194
+
194
195
  ## Sponsoring services
195
196
 
196
197
  These great services sponsor MUI's core infrastructure:
@@ -79,7 +79,7 @@ const SkeletonRoot = styled('span', {
79
79
  return _extends({
80
80
  display: 'block',
81
81
  // Create a "on paper" color with sufficient contrast retaining the color
82
- backgroundColor: alpha(theme.palette.text.primary, theme.palette.mode === 'light' ? 0.11 : 0.13),
82
+ backgroundColor: theme.vars ? theme.vars.palette.Skeleton.bg : alpha(theme.palette.text.primary, theme.palette.mode === 'light' ? 0.11 : 0.13),
83
83
  height: '1.2em'
84
84
  }, ownerState.variant === 'text' && {
85
85
  marginTop: 0,
@@ -118,7 +118,12 @@ const SkeletonRoot = styled('span', {
118
118
 
119
119
  &::after {
120
120
  animation: ${0} 1.6s linear 0.5s infinite;
121
- background: linear-gradient(90deg, transparent, ${0}, transparent);
121
+ background: linear-gradient(
122
+ 90deg,
123
+ transparent,
124
+ ${0},
125
+ transparent
126
+ );
122
127
  content: '';
123
128
  position: absolute;
124
129
  transform: translateX(-100%); /* Avoid flash during server-side hydration */
@@ -127,7 +132,7 @@ const SkeletonRoot = styled('span', {
127
132
  right: 0;
128
133
  top: 0;
129
134
  }
130
- `), waveKeyframe, theme.palette.action.hover));
135
+ `), waveKeyframe, (theme.vars || theme).palette.action.hover));
131
136
  const Skeleton = /*#__PURE__*/React.forwardRef(function Skeleton(inProps, ref) {
132
137
  const props = useThemeProps({
133
138
  props: inProps,
@@ -3,6 +3,7 @@ import {
3
3
  ExtendSliderUnstyledTypeMap,
4
4
  ExtendSliderUnstyled,
5
5
  SliderUnstyledTypeMap,
6
+ SliderValueLabelProps,
6
7
  } from '@mui/base/SliderUnstyled';
7
8
  import { SxProps } from '@mui/system';
8
9
  import { OverridableStringUnion } from '@mui/types';
@@ -55,13 +56,14 @@ export type SliderTypeMap<
55
56
  defaultComponent: D;
56
57
  }>;
57
58
 
59
+ export { SliderValueLabelProps } from '@mui/base/SliderUnstyled';
60
+
58
61
  type SliderRootProps = NonNullable<SliderTypeMap['props']['componentsProps']>['root'];
59
62
  type SliderMarkProps = NonNullable<SliderTypeMap['props']['componentsProps']>['mark'];
60
63
  type SliderMarkLabelProps = NonNullable<SliderTypeMap['props']['componentsProps']>['markLabel'];
61
64
  type SliderRailProps = NonNullable<SliderTypeMap['props']['componentsProps']>['rail'];
62
65
  type SliderTrackProps = NonNullable<SliderTypeMap['props']['componentsProps']>['track'];
63
66
  type SliderThumbProps = NonNullable<SliderTypeMap['props']['componentsProps']>['thumb'];
64
- type SliderValueLabelProps = NonNullable<SliderTypeMap['props']['componentsProps']>['valueLabel'];
65
67
  type SliderInputProps = NonNullable<SliderTypeMap['props']['componentsProps']>['input'];
66
68
 
67
69
  export const SliderRoot: React.FC<SliderRootProps>;
package/Slider/Slider.js CHANGED
@@ -34,7 +34,7 @@ const SliderRoot = styled('span', {
34
34
  position: 'relative',
35
35
  cursor: 'pointer',
36
36
  touchAction: 'none',
37
- color: theme.palette[ownerState.color].main,
37
+ color: (theme.vars || theme).palette[ownerState.color].main,
38
38
  WebkitTapHighlightColor: 'transparent'
39
39
  }, ownerState.orientation === 'horizontal' && _extends({
40
40
  height: 4,
@@ -69,7 +69,7 @@ const SliderRoot = styled('span', {
69
69
  [`&.${sliderClasses.disabled}`]: {
70
70
  pointerEvents: 'none',
71
71
  cursor: 'default',
72
- color: theme.palette.grey[400]
72
+ color: (theme.vars || theme).palette.grey[400]
73
73
  },
74
74
  [`&.${sliderClasses.dragging}`]: {
75
75
  [`& .${sliderClasses.thumb}, & .${sliderClasses.track}`]: {
@@ -162,8 +162,8 @@ const SliderTrack = styled('span', {
162
162
  }, ownerState.track === false && {
163
163
  display: 'none'
164
164
  }, ownerState.track === 'inverted' && {
165
- backgroundColor: color,
166
- borderColor: color
165
+ backgroundColor: theme.vars ? theme.vars.palette.Slider[`${ownerState.color}Track`] : color,
166
+ borderColor: theme.vars ? theme.vars.palette.Slider[`${ownerState.color}Track`] : color
167
167
  });
168
168
  });
169
169
  process.env.NODE_ENV !== "production" ? SliderTrack.propTypes
@@ -222,7 +222,7 @@ const SliderThumb = styled('span', {
222
222
  borderRadius: 'inherit',
223
223
  width: '100%',
224
224
  height: '100%',
225
- boxShadow: theme.shadows[2]
225
+ boxShadow: (theme.vars || theme).shadows[2]
226
226
  }, ownerState.size === 'small' && {
227
227
  boxShadow: 'none'
228
228
  }),
@@ -238,13 +238,13 @@ const SliderThumb = styled('span', {
238
238
  transform: 'translate(-50%, -50%)'
239
239
  },
240
240
  [`&:hover, &.${sliderClasses.focusVisible}`]: {
241
- boxShadow: `0px 0px 0px 8px ${alpha(theme.palette[ownerState.color].main, 0.16)}`,
241
+ boxShadow: `0px 0px 0px 8px ${theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.16)` : alpha(theme.palette[ownerState.color].main, 0.16)}`,
242
242
  '@media (hover: none)': {
243
243
  boxShadow: 'none'
244
244
  }
245
245
  },
246
246
  [`&.${sliderClasses.active}`]: {
247
- boxShadow: `0px 0px 0px 14px ${alpha(theme.palette[ownerState.color].main, 0.16)}`
247
+ boxShadow: `0px 0px 0px 14px ${theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.16)` : alpha(theme.palette[ownerState.color].main, 0.16)}`
248
248
  },
249
249
  [`&.${sliderClasses.disabled}`]: {
250
250
  '&:hover': {
@@ -284,31 +284,44 @@ const SliderValueLabel = styled(SliderValueLabelUnstyled, {
284
284
  transition: theme.transitions.create(['transform'], {
285
285
  duration: theme.transitions.duration.shortest
286
286
  }),
287
- top: -10,
288
287
  transformOrigin: 'bottom center',
289
288
  transform: 'translateY(-100%) scale(0)',
290
289
  position: 'absolute',
291
- backgroundColor: theme.palette.grey[600],
290
+ backgroundColor: (theme.vars || theme).palette.grey[600],
292
291
  borderRadius: 2,
293
- color: theme.palette.common.white,
292
+ color: (theme.vars || theme).palette.common.white,
294
293
  display: 'flex',
295
294
  alignItems: 'center',
296
295
  justifyContent: 'center',
297
296
  padding: '0.25rem 0.75rem'
298
- }, ownerState.size === 'small' && {
299
- fontSize: theme.typography.pxToRem(12),
300
- padding: '0.25rem 0.5rem'
301
- }, {
297
+ }, ownerState.orientation === 'horizontal' && {
298
+ top: '-10px',
302
299
  '&:before': {
303
300
  position: 'absolute',
304
301
  content: '""',
305
302
  width: 8,
306
303
  height: 8,
304
+ transform: 'translate(-50%, 50%) rotate(45deg)',
305
+ backgroundColor: 'inherit',
307
306
  bottom: 0,
308
- left: '50%',
307
+ left: '50%'
308
+ }
309
+ }, ownerState.orientation === 'vertical' && {
310
+ right: '30px',
311
+ top: '25px',
312
+ '&:before': {
313
+ position: 'absolute',
314
+ content: '""',
315
+ width: 8,
316
+ height: 8,
309
317
  transform: 'translate(-50%, 50%) rotate(45deg)',
310
- backgroundColor: 'inherit'
318
+ backgroundColor: 'inherit',
319
+ right: '-20%',
320
+ top: '25%'
311
321
  }
322
+ }, ownerState.size === 'small' && {
323
+ fontSize: theme.typography.pxToRem(12),
324
+ padding: '0.25rem 0.5rem'
312
325
  }));
313
326
  process.env.NODE_ENV !== "production" ? SliderValueLabel.propTypes
314
327
  /* remove-proptypes */
@@ -346,7 +359,7 @@ const SliderMark = styled('span', {
346
359
  left: '50%',
347
360
  transform: 'translate(-50%, 1px)'
348
361
  }, markActive && {
349
- backgroundColor: theme.palette.background.paper,
362
+ backgroundColor: (theme.vars || theme).palette.background.paper,
350
363
  opacity: 0.8
351
364
  }));
352
365
  process.env.NODE_ENV !== "production" ? SliderMark.propTypes
@@ -373,7 +386,7 @@ const SliderMarkLabel = styled('span', {
373
386
  ownerState,
374
387
  markLabelActive
375
388
  }) => _extends({}, theme.typography.body2, {
376
- color: theme.palette.text.secondary,
389
+ color: (theme.vars || theme).palette.text.secondary,
377
390
  position: 'absolute',
378
391
  whiteSpace: 'nowrap'
379
392
  }, ownerState.orientation === 'horizontal' && {
@@ -389,7 +402,7 @@ const SliderMarkLabel = styled('span', {
389
402
  left: 44
390
403
  }
391
404
  }, markLabelActive && {
392
- color: theme.palette.text.primary
405
+ color: (theme.vars || theme).palette.text.primary
393
406
  }));
394
407
  process.env.NODE_ENV !== "production" ? SliderMarkLabel.propTypes
395
408
  /* remove-proptypes */
@@ -574,12 +587,14 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes
574
587
  thumb: PropTypes.object,
575
588
  track: PropTypes.object,
576
589
  valueLabel: PropTypes.shape({
590
+ children: PropTypes.element,
577
591
  className: PropTypes.string,
578
592
  components: PropTypes.shape({
579
593
  Root: PropTypes.elementType
580
594
  }),
595
+ open: PropTypes.bool,
581
596
  style: PropTypes.object,
582
- value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number]),
597
+ value: PropTypes.number,
583
598
  valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on'])
584
599
  })
585
600
  }),
@@ -41,16 +41,11 @@ const SnackbarRoot = styled('div', {
41
41
  theme,
42
42
  ownerState
43
43
  }) => {
44
- const center = _extends({}, !ownerState.isRtl && {
44
+ const center = {
45
45
  left: '50%',
46
46
  right: 'auto',
47
47
  transform: 'translateX(-50%)'
48
- }, ownerState.isRtl && {
49
- right: '50%',
50
- left: 'auto',
51
- transform: 'translateX(50%)'
52
- });
53
-
48
+ };
54
49
  return _extends({
55
50
  zIndex: (theme.vars || theme).zIndex.snackbar,
56
51
  position: 'fixed',
@@ -72,19 +67,13 @@ const SnackbarRoot = styled('div', {
72
67
  top: 24
73
68
  } : {
74
69
  bottom: 24
75
- }, ownerState.anchorOrigin.horizontal === 'center' && center, ownerState.anchorOrigin.horizontal === 'left' && _extends({}, !ownerState.isRtl && {
70
+ }, ownerState.anchorOrigin.horizontal === 'center' && center, ownerState.anchorOrigin.horizontal === 'left' && {
76
71
  left: 24,
77
72
  right: 'auto'
78
- }, ownerState.isRtl && {
73
+ }, ownerState.anchorOrigin.horizontal === 'right' && {
79
74
  right: 24,
80
75
  left: 'auto'
81
- }), ownerState.anchorOrigin.horizontal === 'right' && _extends({}, !ownerState.isRtl && {
82
- right: 24,
83
- left: 'auto'
84
- }, ownerState.isRtl && {
85
- left: 24,
86
- right: 'auto'
87
- }))
76
+ })
88
77
  });
89
78
  });
90
79
  const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
@@ -131,14 +120,11 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
131
120
  TransitionProps = _objectWithoutPropertiesLoose(props.TransitionProps, _excluded),
132
121
  other = _objectWithoutPropertiesLoose(props, _excluded2);
133
122
 
134
- const isRtl = theme.direction === 'rtl';
135
-
136
123
  const ownerState = _extends({}, props, {
137
124
  anchorOrigin: {
138
125
  vertical,
139
126
  horizontal
140
- },
141
- isRtl
127
+ }
142
128
  });
143
129
 
144
130
  const classes = useUtilityClasses(ownerState);
@@ -35,13 +35,13 @@ 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.palette.getContrastText(backgroundColor),
39
- backgroundColor,
38
+ color: theme.vars ? theme.vars.palette.text.primary : theme.palette.getContrastText(backgroundColor),
39
+ backgroundColor: theme.vars ? theme.vars.palette.SnackbarContent.bg : backgroundColor,
40
40
  display: 'flex',
41
41
  alignItems: 'center',
42
42
  flexWrap: 'wrap',
43
43
  padding: '6px 16px',
44
- borderRadius: theme.shape.borderRadius,
44
+ borderRadius: (theme.vars || theme).shape.borderRadius,
45
45
  flexGrow: 1,
46
46
  [theme.breakpoints.up('sm')]: {
47
47
  flexGrow: 'initial',
@@ -45,10 +45,10 @@ const SpeedDialActionFab = styled(Fab, {
45
45
  ownerState
46
46
  }) => _extends({
47
47
  margin: 8,
48
- color: theme.palette.text.secondary,
49
- backgroundColor: theme.palette.background.paper,
48
+ color: (theme.vars || theme).palette.text.secondary,
49
+ backgroundColor: (theme.vars || theme).palette.background.paper,
50
50
  '&:hover': {
51
- backgroundColor: emphasize(theme.palette.background.paper, 0.15)
51
+ backgroundColor: theme.vars ? theme.vars.palette.SpeedDialAction.fabHoverBg : emphasize(theme.palette.background.paper, 0.15)
52
52
  },
53
53
  transition: `${theme.transitions.create('transform', {
54
54
  duration: theme.transitions.duration.shorter
@@ -101,10 +101,10 @@ const SpeedDialActionStaticTooltipLabel = styled('span', {
101
101
  }) => _extends({
102
102
  position: 'absolute'
103
103
  }, theme.typography.body1, {
104
- backgroundColor: theme.palette.background.paper,
105
- borderRadius: theme.shape.borderRadius,
106
- boxShadow: theme.shadows[1],
107
- color: theme.palette.text.secondary,
104
+ backgroundColor: (theme.vars || theme).palette.background.paper,
105
+ borderRadius: (theme.vars || theme).shape.borderRadius,
106
+ boxShadow: (theme.vars || theme).shadows[1],
107
+ color: (theme.vars || theme).palette.text.secondary,
108
108
  padding: '4px 16px',
109
109
  wordBreak: 'keep-all'
110
110
  }));
package/Stack/Stack.js CHANGED
@@ -59,7 +59,7 @@ export const style = ({
59
59
  if (ownerState.spacing) {
60
60
  const transformer = createUnarySpacing(theme);
61
61
  const base = Object.keys(theme.breakpoints.values).reduce((acc, breakpoint) => {
62
- if (ownerState.spacing[breakpoint] != null || ownerState.direction[breakpoint] != null) {
62
+ if (typeof ownerState.spacing === 'object' && ownerState.spacing[breakpoint] != null || typeof ownerState.direction === 'object' && ownerState.direction[breakpoint] != null) {
63
63
  acc[breakpoint] = true;
64
64
  }
65
65
 
@@ -63,17 +63,20 @@ const StepConnectorLine = styled('span', {
63
63
  })(({
64
64
  ownerState,
65
65
  theme
66
- }) => _extends({
67
- display: 'block',
68
- borderColor: theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]
69
- }, ownerState.orientation === 'horizontal' && {
70
- borderTopStyle: 'solid',
71
- borderTopWidth: 1
72
- }, ownerState.orientation === 'vertical' && {
73
- borderLeftStyle: 'solid',
74
- borderLeftWidth: 1,
75
- minHeight: 24
76
- }));
66
+ }) => {
67
+ const borderColor = theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600];
68
+ return _extends({
69
+ display: 'block',
70
+ borderColor: theme.vars ? theme.vars.palette.StepConnector.border : borderColor
71
+ }, ownerState.orientation === 'horizontal' && {
72
+ borderTopStyle: 'solid',
73
+ borderTopWidth: 1
74
+ }, ownerState.orientation === 'vertical' && {
75
+ borderLeftStyle: 'solid',
76
+ borderLeftWidth: 1,
77
+ minHeight: 24
78
+ });
79
+ });
77
80
  const StepConnector = /*#__PURE__*/React.forwardRef(function StepConnector(inProps, ref) {
78
81
  const props = useThemeProps({
79
82
  props: inProps,
@@ -43,7 +43,7 @@ const StepContentRoot = styled('div', {
43
43
  paddingLeft: 8 + 12,
44
44
  // margin + half icon
45
45
  paddingRight: 8,
46
- borderLeft: `1px solid ${theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]}`
46
+ borderLeft: theme.vars ? `1px solid ${theme.vars.palette.StepContent.border}` : `1px solid ${theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]}`
47
47
  }, ownerState.last && {
48
48
  borderLeft: 'none'
49
49
  }));
@@ -120,8 +120,9 @@ const StepIcon = /*#__PURE__*/React.forwardRef(function StepIcon(inProps, ref) {
120
120
  })), /*#__PURE__*/_jsx(StepIconText, {
121
121
  className: classes.text,
122
122
  x: "12",
123
- y: "16",
123
+ y: "12",
124
124
  textAnchor: "middle",
125
+ dominantBaseline: "central",
125
126
  ownerState: ownerState,
126
127
  children: icon
127
128
  })]
package/Switch/Switch.js CHANGED
@@ -101,7 +101,7 @@ const SwitchSwitchBase = styled(SwitchBase, {
101
101
  left: 0,
102
102
  zIndex: 1,
103
103
  // Render above the focus ripple.
104
- color: theme.palette.mode === 'light' ? theme.palette.common.white : theme.palette.grey[300],
104
+ color: theme.vars ? theme.vars.palette.Switch.defaultColor : `${theme.palette.mode === 'light' ? theme.palette.common.white : theme.palette.grey[300]}`,
105
105
  transition: theme.transitions.create(['left', 'transform'], {
106
106
  duration: theme.transitions.duration.shortest
107
107
  }),
@@ -109,13 +109,13 @@ const SwitchSwitchBase = styled(SwitchBase, {
109
109
  transform: 'translateX(20px)'
110
110
  },
111
111
  [`&.${switchClasses.disabled}`]: {
112
- color: theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[600]
112
+ color: theme.vars ? theme.vars.palette.Switch.defaultDisabledColor : `${theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[600]}`
113
113
  },
114
114
  [`&.${switchClasses.checked} + .${switchClasses.track}`]: {
115
115
  opacity: 0.5
116
116
  },
117
117
  [`&.${switchClasses.disabled} + .${switchClasses.track}`]: {
118
- opacity: theme.palette.mode === 'light' ? 0.12 : 0.2
118
+ opacity: theme.vars ? theme.vars.opacity.switchTrackDisabled : `${theme.palette.mode === 'light' ? 0.12 : 0.2}`
119
119
  },
120
120
  [`& .${switchClasses.input}`]: {
121
121
  left: '-100%',
@@ -126,7 +126,7 @@ const SwitchSwitchBase = styled(SwitchBase, {
126
126
  ownerState
127
127
  }) => _extends({
128
128
  '&:hover': {
129
- backgroundColor: alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
129
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
130
130
  // Reset on touch devices, it doesn't add specificity
131
131
  '@media (hover: none)': {
132
132
  backgroundColor: 'transparent'
@@ -134,19 +134,19 @@ const SwitchSwitchBase = styled(SwitchBase, {
134
134
  }
135
135
  }, ownerState.color !== 'default' && {
136
136
  [`&.${switchClasses.checked}`]: {
137
- color: theme.palette[ownerState.color].main,
137
+ color: (theme.vars || theme).palette[ownerState.color].main,
138
138
  '&:hover': {
139
- backgroundColor: alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
139
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
140
140
  '@media (hover: none)': {
141
141
  backgroundColor: 'transparent'
142
142
  }
143
143
  },
144
144
  [`&.${switchClasses.disabled}`]: {
145
- color: theme.palette.mode === 'light' ? lighten(theme.palette[ownerState.color].main, 0.62) : darken(theme.palette[ownerState.color].main, 0.55)
145
+ color: theme.vars ? theme.vars.palette.Switch[`${ownerState.color}DisabledColor`] : `${theme.palette.mode === 'light' ? lighten(theme.palette[ownerState.color].main, 0.62) : darken(theme.palette[ownerState.color].main, 0.55)}`
146
146
  }
147
147
  },
148
148
  [`&.${switchClasses.checked} + .${switchClasses.track}`]: {
149
- backgroundColor: theme.palette[ownerState.color].main
149
+ backgroundColor: (theme.vars || theme).palette[ownerState.color].main
150
150
  }
151
151
  }));
152
152
  const SwitchTrack = styled('span', {
@@ -163,8 +163,8 @@ const SwitchTrack = styled('span', {
163
163
  transition: theme.transitions.create(['opacity', 'background-color'], {
164
164
  duration: theme.transitions.duration.shortest
165
165
  }),
166
- backgroundColor: theme.palette.mode === 'light' ? theme.palette.common.black : theme.palette.common.white,
167
- opacity: theme.palette.mode === 'light' ? 0.38 : 0.3
166
+ backgroundColor: theme.vars ? theme.vars.palette.common.onBackground : `${theme.palette.mode === 'light' ? theme.palette.common.black : theme.palette.common.white}`,
167
+ opacity: theme.vars ? theme.vars.opacity.switchTrack : `${theme.palette.mode === 'light' ? 0.38 : 0.3}`
168
168
  }));
169
169
  const SwitchThumb = styled('span', {
170
170
  name: 'MuiSwitch',
@@ -173,7 +173,7 @@ const SwitchThumb = styled('span', {
173
173
  })(({
174
174
  theme
175
175
  }) => ({
176
- boxShadow: theme.shadows[1],
176
+ boxShadow: (theme.vars || theme).shadows[1],
177
177
  backgroundColor: 'currentColor',
178
178
  width: 20,
179
179
  height: 20,
package/Tab/Tab.d.ts CHANGED
@@ -30,7 +30,6 @@ export type TabTypeMap<P = {}, D extends React.ElementType = 'div'> = ExtendButt
30
30
  * The icon to display.
31
31
  */
32
32
  icon?: string | React.ReactElement;
33
-
34
33
  /**
35
34
  * The position of the icon relative to the label.
36
35
  * @default 'top'
@@ -46,18 +46,18 @@ const TableCellRoot = styled('td', {
46
46
  verticalAlign: 'inherit',
47
47
  // Workaround for a rendering bug with spanned columns in Chrome 62.0.
48
48
  // Removes the alpha (sets it to 1), and lightens or darkens the theme color.
49
- borderBottom: `1px solid
49
+ borderBottom: theme.vars ? `1px solid ${theme.vars.palette.TableCell.border}` : `1px solid
50
50
  ${theme.palette.mode === 'light' ? lighten(alpha(theme.palette.divider, 1), 0.88) : darken(alpha(theme.palette.divider, 1), 0.68)}`,
51
51
  textAlign: 'left',
52
52
  padding: 16
53
53
  }, ownerState.variant === 'head' && {
54
- color: theme.palette.text.primary,
54
+ color: (theme.vars || theme).palette.text.primary,
55
55
  lineHeight: theme.typography.pxToRem(24),
56
56
  fontWeight: theme.typography.fontWeightMedium
57
57
  }, ownerState.variant === 'body' && {
58
- color: theme.palette.text.primary
58
+ color: (theme.vars || theme).palette.text.primary
59
59
  }, ownerState.variant === 'footer' && {
60
- color: theme.palette.text.secondary,
60
+ color: (theme.vars || theme).palette.text.secondary,
61
61
  lineHeight: theme.typography.pxToRem(21),
62
62
  fontSize: theme.typography.pxToRem(12)
63
63
  }, ownerState.size === 'small' && {
@@ -89,7 +89,7 @@ const TableCellRoot = styled('td', {
89
89
  position: 'sticky',
90
90
  top: 0,
91
91
  zIndex: 2,
92
- backgroundColor: theme.palette.background.default
92
+ backgroundColor: (theme.vars || theme).palette.background.default
93
93
  }));
94
94
  /**
95
95
  * The component renders a `<th>` element when the parent context is a header
package/Tabs/Tabs.js CHANGED
@@ -426,6 +426,12 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
426
426
  const tab = children[i];
427
427
 
428
428
  if (totalSize + tab[clientSize] > containerSize) {
429
+ // If the first item is longer than the container size, then only scroll
430
+ // by the container size.
431
+ if (i === 0) {
432
+ totalSize = containerSize;
433
+ }
434
+
429
435
  break;
430
436
  }
431
437
 
@@ -117,7 +117,7 @@ const TooltipTooltip = styled('div', {
117
117
  theme,
118
118
  ownerState
119
119
  }) => _extends({
120
- backgroundColor: theme.vars ? `rgba(${theme.vars.palette.grey.darkChannel} / 0.92)` : alpha(theme.palette.grey[700], 0.92),
120
+ backgroundColor: theme.vars ? theme.vars.palette.Tooltip.bg : alpha(theme.palette.grey[700], 0.92),
121
121
  borderRadius: (theme.vars || theme).shape.borderRadius,
122
122
  color: (theme.vars || theme).palette.common.white,
123
123
  fontFamily: theme.typography.fontFamily,
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.8.2
1
+ /** @license MUI v5.8.5
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.
@@ -90,7 +90,9 @@ var AlertMessage = styled('div', {
90
90
  return styles.message;
91
91
  }
92
92
  })({
93
- padding: '8px 0'
93
+ padding: '8px 0',
94
+ minWidth: 0,
95
+ overflow: 'auto'
94
96
  });
95
97
  var AlertAction = styled('div', {
96
98
  name: 'MuiAlert',