@mui/material 5.8.4 → 5.8.7

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 (257) hide show
  1. package/Accordion/accordionClasses.d.ts +18 -18
  2. package/AccordionActions/accordionActionsClasses.d.ts +10 -10
  3. package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
  4. package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
  5. package/Alert/Alert.js +19 -11
  6. package/Alert/alertClasses.d.ts +44 -44
  7. package/AlertTitle/alertTitleClasses.d.ts +8 -8
  8. package/AppBar/AppBar.js +22 -5
  9. package/AppBar/appBarClasses.d.ts +28 -28
  10. package/Autocomplete/Autocomplete.d.ts +2 -0
  11. package/Autocomplete/Autocomplete.js +12 -8
  12. package/Autocomplete/autocompleteClasses.d.ts +54 -54
  13. package/Avatar/Avatar.js +7 -4
  14. package/Avatar/avatarClasses.d.ts +20 -20
  15. package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
  16. package/Backdrop/backdropClasses.d.ts +10 -10
  17. package/Badge/Badge.js +2 -2
  18. package/Badge/badgeClasses.d.ts +56 -56
  19. package/BottomNavigation/BottomNavigation.js +0 -0
  20. package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
  21. package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
  22. package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
  23. package/Button/buttonClasses.d.ts +100 -100
  24. package/ButtonBase/buttonBaseClasses.d.ts +12 -12
  25. package/ButtonBase/touchRippleClasses.d.ts +20 -20
  26. package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
  27. package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
  28. package/CHANGELOG.md +185 -4
  29. package/Card/cardClasses.d.ts +8 -8
  30. package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
  31. package/CardActions/cardActionsClasses.d.ts +10 -10
  32. package/CardContent/cardContentClasses.d.ts +8 -8
  33. package/CardHeader/cardHeaderClasses.d.ts +18 -18
  34. package/CardMedia/cardMediaClasses.d.ts +12 -12
  35. package/Checkbox/checkboxClasses.d.ts +18 -18
  36. package/Chip/Chip.js +31 -30
  37. package/Chip/chipClasses.d.ts +80 -80
  38. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  39. package/ClickAwayListener/index.d.ts +2 -2
  40. package/Collapse/collapseClasses.d.ts +18 -18
  41. package/Container/containerClasses.d.ts +6 -6
  42. package/Dialog/Dialog.js +11 -6
  43. package/Dialog/DialogContext.d.ts +6 -6
  44. package/Dialog/dialogClasses.d.ts +36 -36
  45. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  46. package/DialogContent/dialogContentClasses.d.ts +10 -10
  47. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  48. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  49. package/Divider/dividerClasses.d.ts +34 -34
  50. package/Drawer/drawerClasses.d.ts +30 -30
  51. package/Fab/fabClasses.d.ts +26 -26
  52. package/FilledInput/FilledInput.js +28 -13
  53. package/FilledInput/filledInputClasses.d.ts +40 -40
  54. package/FormControl/formControlClasses.d.ts +14 -14
  55. package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
  56. package/FormGroup/formGroupClasses.d.ts +12 -12
  57. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  58. package/FormLabel/formLabelClasses.d.ts +22 -22
  59. package/Grid/gridClasses.d.ts +48 -48
  60. package/Icon/iconClasses.d.ts +24 -24
  61. package/IconButton/iconButtonClasses.d.ts +26 -26
  62. package/ImageList/imageListClasses.d.ts +16 -16
  63. package/ImageListItem/imageListItemClasses.d.ts +18 -18
  64. package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
  65. package/Input/Input.js +1 -1
  66. package/Input/inputClasses.d.ts +34 -34
  67. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  68. package/InputBase/InputBase.js +2 -2
  69. package/InputBase/inputBaseClasses.d.ts +44 -44
  70. package/InputLabel/inputLabelClasses.d.ts +32 -32
  71. package/LinearProgress/LinearProgress.js +6 -2
  72. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  73. package/Link/getTextDecoration.d.ts +15 -15
  74. package/Link/linkClasses.d.ts +18 -18
  75. package/List/listClasses.d.ts +14 -14
  76. package/ListItem/listItemClasses.d.ts +30 -30
  77. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  78. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  79. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  80. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  81. package/ListItemText/listItemTextClasses.d.ts +18 -18
  82. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  83. package/Menu/menuClasses.d.ts +12 -12
  84. package/MenuItem/menuItemClasses.d.ts +20 -20
  85. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  86. package/Modal/Modal.d.ts +2 -0
  87. package/Modal/Modal.js +25 -8
  88. package/NativeSelect/nativeSelectClasses.d.ts +32 -32
  89. package/OutlinedInput/OutlinedInput.js +40 -10
  90. package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
  91. package/Pagination/paginationClasses.d.ts +14 -14
  92. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  93. package/Paper/paperClasses.d.ts +39 -39
  94. package/Popover/popoverClasses.d.ts +10 -10
  95. package/Popper/Popper.d.ts +29 -29
  96. package/Radio/radioClasses.d.ts +16 -16
  97. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  98. package/RadioGroup/useRadioGroup.d.ts +4 -4
  99. package/Rating/ratingClasses.d.ts +40 -40
  100. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  101. package/Select/Select.d.ts +1 -1
  102. package/Select/Select.js +1 -1
  103. package/Select/selectClasses.d.ts +30 -30
  104. package/Skeleton/Skeleton.js +8 -3
  105. package/Skeleton/skeletonClasses.d.ts +24 -24
  106. package/Slider/Slider.js +21 -21
  107. package/Snackbar/snackbarClasses.d.ts +20 -20
  108. package/SnackbarContent/SnackbarContent.js +3 -3
  109. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  110. package/SpeedDial/speedDialClasses.d.ts +22 -22
  111. package/SpeedDialAction/SpeedDialAction.js +7 -7
  112. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  113. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  114. package/Step/StepContext.d.ts +20 -20
  115. package/Step/stepClasses.d.ts +16 -16
  116. package/StepButton/stepButtonClasses.d.ts +14 -14
  117. package/StepConnector/StepConnector.js +14 -11
  118. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  119. package/StepContent/StepContent.js +1 -1
  120. package/StepContent/stepContentClasses.d.ts +12 -12
  121. package/StepIcon/stepIconClasses.d.ts +16 -16
  122. package/StepLabel/stepLabelClasses.d.ts +28 -28
  123. package/Stepper/StepperContext.d.ts +18 -18
  124. package/Stepper/stepperClasses.d.ts +14 -14
  125. package/SvgIcon/svgIconClasses.d.ts +24 -24
  126. package/Switch/Switch.js +11 -11
  127. package/Switch/switchClasses.d.ts +32 -32
  128. package/Tab/tabClasses.d.ts +26 -26
  129. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  130. package/Table/tableClasses.d.ts +10 -10
  131. package/TableBody/tableBodyClasses.d.ts +8 -8
  132. package/TableCell/TableCell.js +5 -5
  133. package/TableCell/tableCellClasses.d.ts +32 -32
  134. package/TableContainer/tableContainerClasses.d.ts +8 -8
  135. package/TableFooter/tableFooterClasses.d.ts +8 -8
  136. package/TableHead/tableHeadClasses.d.ts +8 -8
  137. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  138. package/TableRow/tableRowClasses.d.ts +16 -16
  139. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  140. package/Tabs/Tabs.js +16 -18
  141. package/Tabs/tabsClasses.d.ts +32 -32
  142. package/TextField/textFieldClasses.d.ts +8 -8
  143. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  144. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  145. package/Toolbar/toolbarClasses.d.ts +14 -14
  146. package/Tooltip/Tooltip.js +1 -1
  147. package/Tooltip/tooltipClasses.d.ts +30 -30
  148. package/Typography/typographyClasses.d.ts +50 -50
  149. package/className/index.d.ts +1 -1
  150. package/darkScrollbar/index.d.ts +28 -28
  151. package/index.js +1 -1
  152. package/internal/switchBaseClasses.d.ts +12 -12
  153. package/legacy/Alert/Alert.js +19 -11
  154. package/legacy/AppBar/AppBar.js +23 -4
  155. package/legacy/Autocomplete/Autocomplete.js +12 -8
  156. package/legacy/Avatar/Avatar.js +7 -4
  157. package/legacy/Badge/Badge.js +2 -2
  158. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  159. package/legacy/Chip/Chip.js +31 -30
  160. package/legacy/Dialog/Dialog.js +11 -6
  161. package/legacy/FilledInput/FilledInput.js +28 -14
  162. package/legacy/Input/Input.js +1 -1
  163. package/legacy/InputBase/InputBase.js +2 -2
  164. package/legacy/LinearProgress/LinearProgress.js +6 -2
  165. package/legacy/Modal/Modal.js +23 -7
  166. package/legacy/OutlinedInput/OutlinedInput.js +36 -9
  167. package/legacy/Select/Select.js +1 -1
  168. package/legacy/Skeleton/Skeleton.js +2 -2
  169. package/legacy/Slider/Slider.js +21 -21
  170. package/legacy/SnackbarContent/SnackbarContent.js +3 -3
  171. package/legacy/SpeedDialAction/SpeedDialAction.js +7 -7
  172. package/legacy/StepConnector/StepConnector.js +2 -1
  173. package/legacy/StepContent/StepContent.js +1 -1
  174. package/legacy/Switch/Switch.js +11 -11
  175. package/legacy/TableCell/TableCell.js +5 -5
  176. package/legacy/Tabs/Tabs.js +16 -18
  177. package/legacy/Tooltip/Tooltip.js +1 -1
  178. package/legacy/index.js +1 -1
  179. package/legacy/styles/CssVarsProvider.js +10 -8
  180. package/legacy/styles/experimental_extendTheme.js +170 -19
  181. package/locale/index.d.ts +71 -71
  182. package/modern/Alert/Alert.js +19 -11
  183. package/modern/AppBar/AppBar.js +22 -5
  184. package/modern/Autocomplete/Autocomplete.js +11 -7
  185. package/modern/Avatar/Avatar.js +7 -4
  186. package/modern/Badge/Badge.js +2 -2
  187. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  188. package/modern/Chip/Chip.js +31 -30
  189. package/modern/Dialog/Dialog.js +11 -6
  190. package/modern/FilledInput/FilledInput.js +27 -12
  191. package/modern/Input/Input.js +1 -1
  192. package/modern/InputBase/InputBase.js +2 -2
  193. package/modern/LinearProgress/LinearProgress.js +6 -2
  194. package/modern/Modal/Modal.js +24 -7
  195. package/modern/OutlinedInput/OutlinedInput.js +40 -10
  196. package/modern/Select/Select.js +1 -1
  197. package/modern/Skeleton/Skeleton.js +7 -2
  198. package/modern/Slider/Slider.js +21 -21
  199. package/modern/SnackbarContent/SnackbarContent.js +3 -3
  200. package/modern/SpeedDialAction/SpeedDialAction.js +7 -7
  201. package/modern/StepConnector/StepConnector.js +14 -11
  202. package/modern/StepContent/StepContent.js +1 -1
  203. package/modern/Switch/Switch.js +11 -11
  204. package/modern/TableCell/TableCell.js +5 -5
  205. package/modern/Tabs/Tabs.js +16 -18
  206. package/modern/Tooltip/Tooltip.js +1 -1
  207. package/modern/index.js +1 -1
  208. package/modern/styles/CssVarsProvider.js +6 -6
  209. package/modern/styles/experimental_extendTheme.js +166 -20
  210. package/node/Alert/Alert.js +19 -11
  211. package/node/AppBar/AppBar.js +22 -5
  212. package/node/Autocomplete/Autocomplete.js +12 -8
  213. package/node/Avatar/Avatar.js +7 -4
  214. package/node/Badge/Badge.js +2 -2
  215. package/node/BottomNavigation/BottomNavigation.js +0 -0
  216. package/node/Chip/Chip.js +31 -30
  217. package/node/Dialog/Dialog.js +11 -6
  218. package/node/FilledInput/FilledInput.js +28 -13
  219. package/node/Input/Input.js +1 -1
  220. package/node/InputBase/InputBase.js +2 -2
  221. package/node/LinearProgress/LinearProgress.js +6 -2
  222. package/node/Modal/Modal.js +25 -8
  223. package/node/OutlinedInput/OutlinedInput.js +38 -10
  224. package/node/Select/Select.js +1 -1
  225. package/node/Skeleton/Skeleton.js +7 -2
  226. package/node/Slider/Slider.js +21 -21
  227. package/node/SnackbarContent/SnackbarContent.js +3 -3
  228. package/node/SpeedDialAction/SpeedDialAction.js +7 -7
  229. package/node/StepConnector/StepConnector.js +14 -11
  230. package/node/StepContent/StepContent.js +1 -1
  231. package/node/Switch/Switch.js +11 -11
  232. package/node/TableCell/TableCell.js +5 -5
  233. package/node/Tabs/Tabs.js +16 -18
  234. package/node/Tooltip/Tooltip.js +1 -1
  235. package/node/index.js +1 -1
  236. package/node/styles/CssVarsProvider.js +11 -6
  237. package/node/styles/experimental_extendTheme.js +167 -19
  238. package/package.json +7 -7
  239. package/styles/CssVarsProvider.d.ts +14 -28
  240. package/styles/CssVarsProvider.js +10 -6
  241. package/styles/createPalette.d.ts +0 -26
  242. package/styles/experimental_extendTheme.d.ts +238 -35
  243. package/styles/experimental_extendTheme.js +166 -20
  244. package/styles/index.d.ts +24 -1
  245. package/themeCssVarsAugmentation/index.d.ts +30 -0
  246. package/transitions/index.d.ts +1 -1
  247. package/transitions/transition.d.ts +13 -13
  248. package/transitions/utils.d.ts +23 -23
  249. package/umd/material-ui.development.js +954 -471
  250. package/umd/material-ui.production.min.js +27 -22
  251. package/useMediaQuery/useMediaQuery.d.ts +31 -31
  252. package/useTouchRipple/index.d.ts +1 -1
  253. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  254. package/utils/getScrollbarSize.d.ts +2 -2
  255. package/utils/ownerDocument.d.ts +2 -2
  256. package/utils/ownerWindow.d.ts +2 -2
  257. package/utils/setRef.d.ts +2 -2
@@ -34,7 +34,7 @@ var 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 @@ var SliderRoot = styled('span', {
69
69
  }, _defineProperty(_extends2, "&.".concat(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
  }), _defineProperty(_extends2, "&.".concat(sliderClasses.dragging), _defineProperty({}, "& .".concat(sliderClasses.thumb, ", & .").concat(sliderClasses.track), {
74
74
  transition: 'none'
75
75
  })), _extends2));
@@ -163,8 +163,8 @@ var SliderTrack = styled('span', {
163
163
  }, ownerState.track === false && {
164
164
  display: 'none'
165
165
  }, ownerState.track === 'inverted' && {
166
- backgroundColor: color,
167
- borderColor: color
166
+ backgroundColor: theme.vars ? theme.vars.palette.Slider["".concat(ownerState.color, "Track")] : color,
167
+ borderColor: theme.vars ? theme.vars.palette.Slider["".concat(ownerState.color, "Track")] : color
168
168
  });
169
169
  });
170
170
  process.env.NODE_ENV !== "production" ? SliderTrack.propTypes
@@ -223,7 +223,7 @@ var SliderThumb = styled('span', {
223
223
  borderRadius: 'inherit',
224
224
  width: '100%',
225
225
  height: '100%',
226
- boxShadow: theme.shadows[2]
226
+ boxShadow: (theme.vars || theme).shadows[2]
227
227
  }, ownerState.size === 'small' && {
228
228
  boxShadow: 'none'
229
229
  }),
@@ -239,12 +239,12 @@ var SliderThumb = styled('span', {
239
239
  transform: 'translate(-50%, -50%)'
240
240
  }
241
241
  }, _defineProperty(_extends3, "&:hover, &.".concat(sliderClasses.focusVisible), {
242
- boxShadow: "0px 0px 0px 8px ".concat(alpha(theme.palette[ownerState.color].main, 0.16)),
242
+ boxShadow: "0px 0px 0px 8px ".concat(theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].mainChannel, " / 0.16)") : alpha(theme.palette[ownerState.color].main, 0.16)),
243
243
  '@media (hover: none)': {
244
244
  boxShadow: 'none'
245
245
  }
246
246
  }), _defineProperty(_extends3, "&.".concat(sliderClasses.active), {
247
- boxShadow: "0px 0px 0px 14px ".concat(alpha(theme.palette[ownerState.color].main, 0.16))
247
+ boxShadow: "0px 0px 0px 14px ".concat(theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].mainChannel, " / 0.16)") : alpha(theme.palette[ownerState.color].main, 0.16))
248
248
  }), _defineProperty(_extends3, "&.".concat(sliderClasses.disabled), {
249
249
  '&:hover': {
250
250
  boxShadow: 'none'
@@ -286,9 +286,9 @@ var SliderValueLabel = styled(SliderValueLabelUnstyled, {
286
286
  transformOrigin: 'bottom center',
287
287
  transform: 'translateY(-100%) scale(0)',
288
288
  position: 'absolute',
289
- backgroundColor: theme.palette.grey[600],
289
+ backgroundColor: (theme.vars || theme).palette.grey[600],
290
290
  borderRadius: 2,
291
- color: theme.palette.common.white,
291
+ color: (theme.vars || theme).palette.common.white,
292
292
  display: 'flex',
293
293
  alignItems: 'center',
294
294
  justifyContent: 'center',
@@ -363,7 +363,7 @@ var SliderMark = styled('span', {
363
363
  left: '50%',
364
364
  transform: 'translate(-50%, 1px)'
365
365
  }, markActive && {
366
- backgroundColor: theme.palette.background.paper,
366
+ backgroundColor: (theme.vars || theme).palette.background.paper,
367
367
  opacity: 0.8
368
368
  });
369
369
  });
@@ -395,7 +395,7 @@ var SliderMarkLabel = styled('span', {
395
395
  ownerState = _ref7.ownerState,
396
396
  markLabelActive = _ref7.markLabelActive;
397
397
  return _extends({}, theme.typography.body2, {
398
- color: theme.palette.text.secondary,
398
+ color: (theme.vars || theme).palette.text.secondary,
399
399
  position: 'absolute',
400
400
  whiteSpace: 'nowrap'
401
401
  }, ownerState.orientation === 'horizontal' && {
@@ -411,7 +411,7 @@ var SliderMarkLabel = styled('span', {
411
411
  left: 44
412
412
  }
413
413
  }, markLabelActive && {
414
- color: theme.palette.text.primary
414
+ color: (theme.vars || theme).palette.text.primary
415
415
  });
416
416
  });
417
417
  process.env.NODE_ENV !== "production" ? SliderMarkLabel.propTypes
@@ -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,13 +34,13 @@ 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.palette.getContrastText(backgroundColor),
38
- backgroundColor: backgroundColor,
37
+ color: theme.vars ? theme.vars.palette.SnackbarContent.color : theme.palette.getContrastText(backgroundColor),
38
+ backgroundColor: theme.vars ? theme.vars.palette.SnackbarContent.bg : backgroundColor,
39
39
  display: 'flex',
40
40
  alignItems: 'center',
41
41
  flexWrap: 'wrap',
42
42
  padding: '6px 16px',
43
- borderRadius: theme.shape.borderRadius,
43
+ borderRadius: (theme.vars || theme).shape.borderRadius,
44
44
  flexGrow: 1
45
45
  }, theme.breakpoints.up('sm'), {
46
46
  flexGrow: 'initial',
@@ -41,10 +41,10 @@ var SpeedDialActionFab = styled(Fab, {
41
41
  ownerState = _ref.ownerState;
42
42
  return _extends({
43
43
  margin: 8,
44
- color: theme.palette.text.secondary,
45
- backgroundColor: theme.palette.background.paper,
44
+ color: (theme.vars || theme).palette.text.secondary,
45
+ backgroundColor: (theme.vars || theme).palette.background.paper,
46
46
  '&:hover': {
47
- backgroundColor: emphasize(theme.palette.background.paper, 0.15)
47
+ backgroundColor: theme.vars ? theme.vars.palette.SpeedDialAction.fabHoverBg : emphasize(theme.palette.background.paper, 0.15)
48
48
  },
49
49
  transition: "".concat(theme.transitions.create('transform', {
50
50
  duration: theme.transitions.duration.shorter
@@ -98,10 +98,10 @@ var SpeedDialActionStaticTooltipLabel = styled('span', {
98
98
  return _extends({
99
99
  position: 'absolute'
100
100
  }, theme.typography.body1, {
101
- backgroundColor: theme.palette.background.paper,
102
- borderRadius: theme.shape.borderRadius,
103
- boxShadow: theme.shadows[1],
104
- color: theme.palette.text.secondary,
101
+ backgroundColor: (theme.vars || theme).palette.background.paper,
102
+ borderRadius: (theme.vars || theme).shape.borderRadius,
103
+ boxShadow: (theme.vars || theme).shadows[1],
104
+ color: (theme.vars || theme).palette.text.secondary,
105
105
  padding: '4px 16px',
106
106
  wordBreak: 'keep-all'
107
107
  });
@@ -57,9 +57,10 @@ var StepConnectorLine = styled('span', {
57
57
  })(function (_ref2) {
58
58
  var ownerState = _ref2.ownerState,
59
59
  theme = _ref2.theme;
60
+ var borderColor = theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600];
60
61
  return _extends({
61
62
  display: 'block',
62
- borderColor: theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]
63
+ borderColor: theme.vars ? theme.vars.palette.StepConnector.border : borderColor
63
64
  }, ownerState.orientation === 'horizontal' && {
64
65
  borderTopStyle: 'solid',
65
66
  borderTopWidth: 1
@@ -38,7 +38,7 @@ var StepContentRoot = styled('div', {
38
38
  paddingLeft: 8 + 12,
39
39
  // margin + half icon
40
40
  paddingRight: 8,
41
- borderLeft: "1px solid ".concat(theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600])
41
+ borderLeft: theme.vars ? "1px solid ".concat(theme.vars.palette.StepContent.border) : "1px solid ".concat(theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600])
42
42
  }, ownerState.last && {
43
43
  borderLeft: 'none'
44
44
  });
@@ -95,18 +95,18 @@ var SwitchSwitchBase = styled(SwitchBase, {
95
95
  left: 0,
96
96
  zIndex: 1,
97
97
  // Render above the focus ripple.
98
- color: theme.palette.mode === 'light' ? theme.palette.common.white : theme.palette.grey[300],
98
+ color: theme.vars ? theme.vars.palette.Switch.defaultColor : "".concat(theme.palette.mode === 'light' ? theme.palette.common.white : theme.palette.grey[300]),
99
99
  transition: theme.transitions.create(['left', 'transform'], {
100
100
  duration: theme.transitions.duration.shortest
101
101
  })
102
102
  }, _defineProperty(_ref5, "&.".concat(switchClasses.checked), {
103
103
  transform: 'translateX(20px)'
104
104
  }), _defineProperty(_ref5, "&.".concat(switchClasses.disabled), {
105
- color: theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[600]
105
+ color: theme.vars ? theme.vars.palette.Switch.defaultDisabledColor : "".concat(theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[600])
106
106
  }), _defineProperty(_ref5, "&.".concat(switchClasses.checked, " + .").concat(switchClasses.track), {
107
107
  opacity: 0.5
108
108
  }), _defineProperty(_ref5, "&.".concat(switchClasses.disabled, " + .").concat(switchClasses.track), {
109
- opacity: theme.palette.mode === 'light' ? 0.12 : 0.2
109
+ opacity: theme.vars ? theme.vars.opacity.switchTrackDisabled : "".concat(theme.palette.mode === 'light' ? 0.12 : 0.2)
110
110
  }), _defineProperty(_ref5, "& .".concat(switchClasses.input), {
111
111
  left: '-100%',
112
112
  width: '300%'
@@ -118,24 +118,24 @@ var SwitchSwitchBase = styled(SwitchBase, {
118
118
  ownerState = _ref6.ownerState;
119
119
  return _extends({
120
120
  '&:hover': {
121
- backgroundColor: alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
121
+ backgroundColor: theme.vars ? "rgba(".concat(theme.vars.palette.action.activeChannel, " / ").concat(theme.vars.palette.action.hoverOpacity, ")") : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
122
122
  // Reset on touch devices, it doesn't add specificity
123
123
  '@media (hover: none)': {
124
124
  backgroundColor: 'transparent'
125
125
  }
126
126
  }
127
127
  }, ownerState.color !== 'default' && (_ref7 = {}, _defineProperty(_ref7, "&.".concat(switchClasses.checked), _defineProperty({
128
- color: theme.palette[ownerState.color].main,
128
+ color: (theme.vars || theme).palette[ownerState.color].main,
129
129
  '&:hover': {
130
- backgroundColor: alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
130
+ backgroundColor: theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].mainChannel, " / ").concat(theme.vars.palette.action.hoverOpacity, ")") : alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
131
131
  '@media (hover: none)': {
132
132
  backgroundColor: 'transparent'
133
133
  }
134
134
  }
135
135
  }, "&.".concat(switchClasses.disabled), {
136
- color: theme.palette.mode === 'light' ? lighten(theme.palette[ownerState.color].main, 0.62) : darken(theme.palette[ownerState.color].main, 0.55)
136
+ color: theme.vars ? theme.vars.palette.Switch["".concat(ownerState.color, "DisabledColor")] : "".concat(theme.palette.mode === 'light' ? lighten(theme.palette[ownerState.color].main, 0.62) : darken(theme.palette[ownerState.color].main, 0.55))
137
137
  })), _defineProperty(_ref7, "&.".concat(switchClasses.checked, " + .").concat(switchClasses.track), {
138
- backgroundColor: theme.palette[ownerState.color].main
138
+ backgroundColor: (theme.vars || theme).palette[ownerState.color].main
139
139
  }), _ref7));
140
140
  });
141
141
  var SwitchTrack = styled('span', {
@@ -154,8 +154,8 @@ var SwitchTrack = styled('span', {
154
154
  transition: theme.transitions.create(['opacity', 'background-color'], {
155
155
  duration: theme.transitions.duration.shortest
156
156
  }),
157
- backgroundColor: theme.palette.mode === 'light' ? theme.palette.common.black : theme.palette.common.white,
158
- opacity: theme.palette.mode === 'light' ? 0.38 : 0.3
157
+ backgroundColor: theme.vars ? theme.vars.palette.common.onBackground : "".concat(theme.palette.mode === 'light' ? theme.palette.common.black : theme.palette.common.white),
158
+ opacity: theme.vars ? theme.vars.opacity.switchTrack : "".concat(theme.palette.mode === 'light' ? 0.38 : 0.3)
159
159
  };
160
160
  });
161
161
  var SwitchThumb = styled('span', {
@@ -167,7 +167,7 @@ var SwitchThumb = styled('span', {
167
167
  })(function (_ref9) {
168
168
  var theme = _ref9.theme;
169
169
  return {
170
- boxShadow: theme.shadows[1],
170
+ boxShadow: (theme.vars || theme).shadows[1],
171
171
  backgroundColor: 'currentColor',
172
172
  width: 20,
173
173
  height: 20,
@@ -42,17 +42,17 @@ var TableCellRoot = styled('td', {
42
42
  verticalAlign: 'inherit',
43
43
  // Workaround for a rendering bug with spanned columns in Chrome 62.0.
44
44
  // Removes the alpha (sets it to 1), and lightens or darkens the theme color.
45
- borderBottom: "1px solid\n ".concat(theme.palette.mode === 'light' ? lighten(alpha(theme.palette.divider, 1), 0.88) : darken(alpha(theme.palette.divider, 1), 0.68)),
45
+ borderBottom: theme.vars ? "1px solid ".concat(theme.vars.palette.TableCell.border) : "1px solid\n ".concat(theme.palette.mode === 'light' ? lighten(alpha(theme.palette.divider, 1), 0.88) : darken(alpha(theme.palette.divider, 1), 0.68)),
46
46
  textAlign: 'left',
47
47
  padding: 16
48
48
  }, ownerState.variant === 'head' && {
49
- color: theme.palette.text.primary,
49
+ color: (theme.vars || theme).palette.text.primary,
50
50
  lineHeight: theme.typography.pxToRem(24),
51
51
  fontWeight: theme.typography.fontWeightMedium
52
52
  }, ownerState.variant === 'body' && {
53
- color: theme.palette.text.primary
53
+ color: (theme.vars || theme).palette.text.primary
54
54
  }, ownerState.variant === 'footer' && {
55
- color: theme.palette.text.secondary,
55
+ color: (theme.vars || theme).palette.text.secondary,
56
56
  lineHeight: theme.typography.pxToRem(21),
57
57
  fontSize: theme.typography.pxToRem(12)
58
58
  }, ownerState.size === 'small' && _defineProperty({
@@ -83,7 +83,7 @@ var TableCellRoot = styled('td', {
83
83
  position: 'sticky',
84
84
  top: 0,
85
85
  zIndex: 2,
86
- backgroundColor: theme.palette.background.default
86
+ backgroundColor: (theme.vars || theme).palette.background.default
87
87
  });
88
88
  });
89
89
  /**
@@ -429,31 +429,21 @@ var Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
429
429
  scroll(scrollValue);
430
430
  };
431
431
 
432
- var getFirstVisibleTab = function getFirstVisibleTab(tabs) {
433
- var containerSize = tabsRef.current[clientSize];
434
- var containerStartBound = Math.round(tabsRef.current[scrollStart]);
435
- var containerEndBound = Math.round(containerStartBound + containerSize);
436
- var offset = vertical ? 'offsetTop' : 'offsetLeft';
437
- return tabs.find(function (tab) {
438
- var centerPoint = tab[offset] + tab[clientSize] / 2;
439
- return centerPoint >= containerStartBound && centerPoint <= containerEndBound;
440
- });
441
- };
442
-
443
432
  var getScrollSize = function getScrollSize() {
444
433
  var containerSize = tabsRef.current[clientSize];
445
434
  var totalSize = 0;
446
435
  var children = Array.from(tabListRef.current.children);
447
- var firstVisibleTab = getFirstVisibleTab(children);
448
-
449
- if (firstVisibleTab && firstVisibleTab[clientSize] > containerSize) {
450
- return firstVisibleTab[clientSize];
451
- }
452
436
 
453
437
  for (var i = 0; i < children.length; i += 1) {
454
438
  var tab = children[i];
455
439
 
456
440
  if (totalSize + tab[clientSize] > containerSize) {
441
+ // If the first item is longer than the container size, then only scroll
442
+ // by the container size.
443
+ if (i === 0) {
444
+ totalSize = containerSize;
445
+ }
446
+
457
447
  break;
458
448
  }
459
449
 
@@ -562,8 +552,16 @@ var Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
562
552
  });
563
553
  React.useEffect(function () {
564
554
  var handleResize = debounce(function () {
565
- updateIndicatorState();
566
- 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
+ }
567
565
  });
568
566
  var win = ownerWindow(tabsRef.current);
569
567
  win.addEventListener('resize', handleResize);
@@ -112,7 +112,7 @@ var TooltipTooltip = styled('div', {
112
112
  var theme = _ref3.theme,
113
113
  ownerState = _ref3.ownerState;
114
114
  return _extends({
115
- backgroundColor: theme.vars ? "rgba(".concat(theme.vars.palette.grey.darkChannel, " / 0.92)") : alpha(theme.palette.grey[700], 0.92),
115
+ backgroundColor: theme.vars ? theme.vars.palette.Tooltip.bg : alpha(theme.palette.grey[700], 0.92),
116
116
  borderRadius: (theme.vars || theme).shape.borderRadius,
117
117
  color: (theme.vars || theme).palette.common.white,
118
118
  fontFamily: theme.typography.fontFamily,
package/legacy/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.8.4
1
+ /** @license MUI v5.8.7
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.
@@ -1,9 +1,14 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
-
3
- /* eslint-disable @typescript-eslint/naming-convention */
4
2
  import { unstable_createCssVarsProvider as createCssVarsProvider } from '@mui/system';
5
3
  import experimental_extendTheme from './experimental_extendTheme';
6
4
  import createTypography from './createTypography';
5
+
6
+ var shouldSkipGeneratingVar = function shouldSkipGeneratingVar(keys) {
7
+ var _keys$;
8
+
9
+ return !!keys[0].match(/(typography|mixins|breakpoints|direction|transitions)/) || keys[0] === 'palette' && !!((_keys$ = keys[1]) != null && _keys$.match(/(mode|contrastThreshold|tonalOffset)/));
10
+ };
11
+
7
12
  var defaultTheme = experimental_extendTheme();
8
13
 
9
14
  var _createCssVarsProvide = createCssVarsProvider({
@@ -15,7 +20,6 @@ var _createCssVarsProvide = createCssVarsProvider({
15
20
  light: 'light',
16
21
  dark: 'dark'
17
22
  },
18
- prefix: 'md',
19
23
  resolveTheme: function resolveTheme(theme) {
20
24
  var newTheme = _extends({}, theme, {
21
25
  typography: createTypography(theme.palette, theme.typography)
@@ -23,12 +27,10 @@ var _createCssVarsProvide = createCssVarsProvider({
23
27
 
24
28
  return newTheme;
25
29
  },
26
- shouldSkipGeneratingVar: function shouldSkipGeneratingVar(keys) {
27
- return !!keys[0].match(/(typography|mixins|breakpoints|direction|transitions)/);
28
- }
30
+ shouldSkipGeneratingVar: shouldSkipGeneratingVar
29
31
  }),
30
- Experimental_CssVarsProvider = _createCssVarsProvide.CssVarsProvider,
32
+ CssVarsProvider = _createCssVarsProvide.CssVarsProvider,
31
33
  useColorScheme = _createCssVarsProvide.useColorScheme,
32
34
  getInitColorSchemeScript = _createCssVarsProvide.getInitColorSchemeScript;
33
35
 
34
- export { useColorScheme, getInitColorSchemeScript, Experimental_CssVarsProvider };
36
+ export { useColorScheme, getInitColorSchemeScript, shouldSkipGeneratingVar, CssVarsProvider as Experimental_CssVarsProvider };