@mui/material 5.8.0 → 5.8.3

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 (215) 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 +4 -1
  6. package/Alert/alertClasses.d.ts +44 -44
  7. package/AlertTitle/alertTitleClasses.d.ts +8 -8
  8. package/AppBar/appBarClasses.d.ts +28 -28
  9. package/Autocomplete/autocompleteClasses.d.ts +54 -54
  10. package/Avatar/avatarClasses.d.ts +20 -20
  11. package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
  12. package/Backdrop/backdropClasses.d.ts +10 -10
  13. package/Badge/badgeClasses.d.ts +56 -56
  14. package/BottomNavigation/BottomNavigation.js +0 -0
  15. package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
  16. package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
  17. package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
  18. package/Button/buttonClasses.d.ts +76 -76
  19. package/ButtonBase/TouchRipple.js +5 -5
  20. package/ButtonBase/buttonBaseClasses.d.ts +12 -12
  21. package/ButtonBase/touchRippleClasses.d.ts +20 -20
  22. package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
  23. package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
  24. package/CHANGELOG.md +203 -6
  25. package/Card/cardClasses.d.ts +8 -8
  26. package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
  27. package/CardActions/cardActionsClasses.d.ts +10 -10
  28. package/CardContent/cardContentClasses.d.ts +8 -8
  29. package/CardHeader/cardHeaderClasses.d.ts +18 -18
  30. package/CardMedia/cardMediaClasses.d.ts +12 -12
  31. package/Checkbox/Checkbox.js +4 -4
  32. package/Checkbox/checkboxClasses.d.ts +18 -18
  33. package/Chip/chipClasses.d.ts +80 -80
  34. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  35. package/ClickAwayListener/index.d.ts +2 -2
  36. package/Collapse/collapseClasses.d.ts +18 -18
  37. package/Container/containerClasses.d.ts +6 -6
  38. package/Dialog/DialogContext.d.ts +6 -6
  39. package/Dialog/dialogClasses.d.ts +36 -36
  40. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  41. package/DialogContent/dialogContentClasses.d.ts +10 -10
  42. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  43. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  44. package/Divider/dividerClasses.d.ts +34 -34
  45. package/Drawer/drawerClasses.d.ts +30 -30
  46. package/Fab/Fab.js +3 -1
  47. package/Fab/fabClasses.d.ts +26 -26
  48. package/FilledInput/filledInputClasses.d.ts +40 -40
  49. package/FormControl/formControlClasses.d.ts +14 -14
  50. package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
  51. package/FormGroup/formGroupClasses.d.ts +12 -12
  52. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  53. package/FormLabel/formLabelClasses.d.ts +22 -22
  54. package/Grid/gridClasses.d.ts +48 -48
  55. package/Grow/Grow.js +4 -3
  56. package/Icon/iconClasses.d.ts +24 -24
  57. package/IconButton/iconButtonClasses.d.ts +26 -26
  58. package/ImageList/imageListClasses.d.ts +16 -16
  59. package/ImageListItem/imageListItemClasses.d.ts +18 -18
  60. package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
  61. package/Input/inputClasses.d.ts +34 -34
  62. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  63. package/InputBase/inputBaseClasses.d.ts +44 -44
  64. package/InputLabel/InputLabel.d.ts +5 -0
  65. package/InputLabel/InputLabel.js +6 -0
  66. package/InputLabel/inputLabelClasses.d.ts +32 -32
  67. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  68. package/Link/linkClasses.d.ts +18 -18
  69. package/List/listClasses.d.ts +14 -14
  70. package/ListItem/listItemClasses.d.ts +30 -30
  71. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  72. package/ListItemButton/ListItemButton.js +7 -1
  73. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  74. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  75. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  76. package/ListItemText/listItemTextClasses.d.ts +18 -18
  77. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  78. package/Menu/menuClasses.d.ts +12 -12
  79. package/MenuItem/menuItemClasses.d.ts +20 -20
  80. package/MenuList/MenuList.d.ts +1 -1
  81. package/MenuList/MenuList.js +1 -1
  82. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  83. package/NativeSelect/nativeSelectClasses.d.ts +32 -32
  84. package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
  85. package/Pagination/paginationClasses.d.ts +14 -14
  86. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  87. package/Paper/Paper.js +20 -15
  88. package/Paper/index.d.ts +1 -1
  89. package/Paper/paperClasses.d.ts +39 -39
  90. package/Popover/popoverClasses.d.ts +10 -10
  91. package/Popper/Popper.d.ts +29 -29
  92. package/README.md +7 -3
  93. package/Radio/Radio.js +4 -4
  94. package/Radio/radioClasses.d.ts +16 -16
  95. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  96. package/RadioGroup/useRadioGroup.d.ts +4 -4
  97. package/Rating/ratingClasses.d.ts +40 -40
  98. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  99. package/Select/SelectInput.js +2 -2
  100. package/Select/selectClasses.d.ts +30 -30
  101. package/Skeleton/skeletonClasses.d.ts +24 -24
  102. package/Slider/Slider.js +21 -12
  103. package/Snackbar/snackbarClasses.d.ts +20 -20
  104. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  105. package/SpeedDial/speedDialClasses.d.ts +22 -22
  106. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  107. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  108. package/Step/StepContext.d.ts +20 -20
  109. package/Step/stepClasses.d.ts +16 -16
  110. package/StepButton/stepButtonClasses.d.ts +14 -14
  111. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  112. package/StepContent/stepContentClasses.d.ts +12 -12
  113. package/StepIcon/stepIconClasses.d.ts +16 -16
  114. package/StepLabel/stepLabelClasses.d.ts +28 -28
  115. package/Stepper/StepperContext.d.ts +18 -18
  116. package/Stepper/stepperClasses.d.ts +14 -14
  117. package/SvgIcon/svgIconClasses.d.ts +24 -24
  118. package/Switch/switchClasses.d.ts +32 -32
  119. package/Tab/tabClasses.d.ts +26 -26
  120. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  121. package/Table/tableClasses.d.ts +10 -10
  122. package/TableBody/tableBodyClasses.d.ts +8 -8
  123. package/TableCell/tableCellClasses.d.ts +32 -32
  124. package/TableContainer/tableContainerClasses.d.ts +8 -8
  125. package/TableFooter/tableFooterClasses.d.ts +8 -8
  126. package/TableHead/tableHeadClasses.d.ts +8 -8
  127. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  128. package/TableRow/tableRowClasses.d.ts +16 -16
  129. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  130. package/Tabs/Tabs.js +2 -2
  131. package/Tabs/tabsClasses.d.ts +32 -32
  132. package/TextField/textFieldClasses.d.ts +8 -8
  133. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  134. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  135. package/Toolbar/toolbarClasses.d.ts +14 -14
  136. package/Tooltip/tooltipClasses.d.ts +30 -30
  137. package/Typography/typographyClasses.d.ts +50 -50
  138. package/className/index.d.ts +1 -1
  139. package/darkScrollbar/index.d.ts +28 -28
  140. package/index.js +1 -1
  141. package/internal/switchBaseClasses.d.ts +12 -12
  142. package/legacy/Alert/Alert.js +4 -1
  143. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  144. package/legacy/ButtonBase/TouchRipple.js +5 -5
  145. package/legacy/Checkbox/Checkbox.js +4 -4
  146. package/legacy/Fab/Fab.js +3 -1
  147. package/legacy/Grow/Grow.js +4 -3
  148. package/legacy/InputLabel/InputLabel.js +6 -0
  149. package/legacy/ListItemButton/ListItemButton.js +7 -1
  150. package/legacy/MenuList/MenuList.js +1 -1
  151. package/legacy/Paper/Paper.js +10 -7
  152. package/legacy/Radio/Radio.js +4 -4
  153. package/legacy/Select/SelectInput.js +2 -2
  154. package/legacy/Slider/Slider.js +21 -17
  155. package/legacy/Tabs/Tabs.js +2 -2
  156. package/legacy/index.js +1 -1
  157. package/legacy/styles/CssVarsProvider.js +3 -0
  158. package/legacy/styles/createMixins.js +4 -2
  159. package/legacy/styles/experimental_extendTheme.js +22 -3
  160. package/locale/index.d.ts +71 -71
  161. package/modern/Alert/Alert.js +4 -1
  162. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  163. package/modern/ButtonBase/TouchRipple.js +5 -5
  164. package/modern/Checkbox/Checkbox.js +4 -4
  165. package/modern/Fab/Fab.js +3 -1
  166. package/modern/Grow/Grow.js +4 -3
  167. package/modern/InputLabel/InputLabel.js +6 -0
  168. package/modern/ListItemButton/ListItemButton.js +7 -1
  169. package/modern/MenuList/MenuList.js +1 -1
  170. package/modern/Paper/Paper.js +8 -7
  171. package/modern/Radio/Radio.js +4 -4
  172. package/modern/Select/SelectInput.js +2 -2
  173. package/modern/Slider/Slider.js +21 -12
  174. package/modern/Tabs/Tabs.js +2 -2
  175. package/modern/index.js +1 -1
  176. package/modern/styles/CssVarsProvider.js +3 -0
  177. package/modern/styles/createMixins.js +4 -2
  178. package/modern/styles/experimental_extendTheme.js +18 -2
  179. package/node/Alert/Alert.js +4 -1
  180. package/node/BottomNavigation/BottomNavigation.js +0 -0
  181. package/node/ButtonBase/TouchRipple.js +5 -5
  182. package/node/Checkbox/Checkbox.js +4 -4
  183. package/node/Fab/Fab.js +3 -1
  184. package/node/Grow/Grow.js +4 -3
  185. package/node/InputLabel/InputLabel.js +6 -0
  186. package/node/ListItemButton/ListItemButton.js +7 -1
  187. package/node/MenuList/MenuList.js +1 -1
  188. package/node/Paper/Paper.js +22 -14
  189. package/node/Radio/Radio.js +4 -4
  190. package/node/Select/SelectInput.js +2 -2
  191. package/node/Slider/Slider.js +21 -12
  192. package/node/Tabs/Tabs.js +2 -2
  193. package/node/index.js +1 -1
  194. package/node/styles/CssVarsProvider.js +3 -0
  195. package/node/styles/createMixins.js +4 -2
  196. package/node/styles/experimental_extendTheme.js +20 -3
  197. package/package.json +4 -4
  198. package/styles/CssVarsProvider.js +3 -0
  199. package/styles/createMixins.js +4 -2
  200. package/styles/createPalette.d.ts +1 -1
  201. package/styles/experimental_extendTheme.d.ts +30 -0
  202. package/styles/experimental_extendTheme.js +19 -3
  203. package/styles/index.d.ts +1 -0
  204. package/transitions/index.d.ts +1 -1
  205. package/transitions/transition.d.ts +13 -13
  206. package/transitions/utils.d.ts +23 -23
  207. package/umd/material-ui.development.js +346 -268
  208. package/umd/material-ui.production.min.js +13 -13
  209. package/useMediaQuery/useMediaQuery.d.ts +31 -31
  210. package/useTouchRipple/index.d.ts +1 -1
  211. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  212. package/utils/getScrollbarSize.d.ts +2 -2
  213. package/utils/ownerDocument.d.ts +2 -2
  214. package/utils/ownerWindow.d.ts +2 -2
  215. package/utils/setRef.d.ts +2 -2
@@ -133,12 +133,12 @@ var TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, re
133
133
  _options$fakeElement = options.fakeElement,
134
134
  fakeElement = _options$fakeElement === void 0 ? false : _options$fakeElement;
135
135
 
136
- if (event.type === 'mousedown' && ignoringMouseDown.current) {
136
+ if ((event == null ? void 0 : event.type) === 'mousedown' && ignoringMouseDown.current) {
137
137
  ignoringMouseDown.current = false;
138
138
  return;
139
139
  }
140
140
 
141
- if (event.type === 'touchstart') {
141
+ if ((event == null ? void 0 : event.type) === 'touchstart') {
142
142
  ignoringMouseDown.current = true;
143
143
  }
144
144
 
@@ -154,7 +154,7 @@ var TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, re
154
154
  var rippleY;
155
155
  var rippleSize;
156
156
 
157
- if (center || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {
157
+ if (center || event === undefined || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {
158
158
  rippleX = Math.round(rect.width / 2);
159
159
  rippleY = Math.round(rect.height / 2);
160
160
  } else {
@@ -179,7 +179,7 @@ var TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, re
179
179
  } // Touche devices
180
180
 
181
181
 
182
- if (event.touches) {
182
+ if (event != null && event.touches) {
183
183
  // check that this isn't another touchstart due to multitouch
184
184
  // otherwise we will only clear a single timer when unmounting while two
185
185
  // are running
@@ -222,7 +222,7 @@ var TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, re
222
222
  clearTimeout(startTimer.current); // The touch interaction occurs too quickly.
223
223
  // We still want to show ripple effect.
224
224
 
225
- if (event.type === 'touchend' && startTimerCommit.current) {
225
+ if ((event == null ? void 0 : event.type) === 'touchend' && startTimerCommit.current) {
226
226
  startTimerCommit.current();
227
227
  startTimerCommit.current = null;
228
228
  startTimer.current = setTimeout(function () {
@@ -43,19 +43,19 @@ var CheckboxRoot = styled(SwitchBase, {
43
43
  var theme = _ref.theme,
44
44
  ownerState = _ref.ownerState;
45
45
  return _extends({
46
- color: theme.palette.text.secondary
46
+ color: (theme.vars || theme).palette.text.secondary
47
47
  }, !ownerState.disableRipple && {
48
48
  '&:hover': {
49
- backgroundColor: alpha(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
49
+ backgroundColor: theme.vars ? "rgba(".concat(ownerState.color === 'default' ? theme.vars.palette.action.activeChannel : theme.vars.palette.primary.mainChannel, " / ").concat(theme.vars.palette.action.hoverOpacity, ")") : alpha(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
50
50
  // Reset on touch devices, it doesn't add specificity
51
51
  '@media (hover: none)': {
52
52
  backgroundColor: 'transparent'
53
53
  }
54
54
  }
55
55
  }, ownerState.color !== 'default' && (_ref2 = {}, _defineProperty(_ref2, "&.".concat(checkboxClasses.checked, ", &.").concat(checkboxClasses.indeterminate), {
56
- color: theme.palette[ownerState.color].main
56
+ color: (theme.vars || theme).palette[ownerState.color].main
57
57
  }), _defineProperty(_ref2, "&.".concat(checkboxClasses.disabled), {
58
- color: theme.palette.action.disabled
58
+ color: (theme.vars || theme).palette.action.disabled
59
59
  }), _ref2));
60
60
  });
61
61
 
package/legacy/Fab/Fab.js CHANGED
@@ -183,7 +183,9 @@ process.env.NODE_ENV !== "production" ? Fab.propTypes
183
183
  * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
184
184
  * @default 'default'
185
185
  */
186
- color: PropTypes.oneOf(['default', 'error', 'info', 'inherit', 'primary', 'secondary', 'success', 'warning']),
186
+ color: PropTypes
187
+ /* @typescript-to-proptypes-ignore */
188
+ .oneOfType([PropTypes.oneOf(['default', 'error', 'info', 'inherit', 'primary', 'secondary', 'success', 'warning']), PropTypes.string]),
187
189
 
188
190
  /**
189
191
  * The component used for the root node.
@@ -23,9 +23,10 @@ var styles = {
23
23
  transform: 'none'
24
24
  }
25
25
  };
26
- /**
27
- * Conditionally apply a workaround for the CSS transition bug in Safari 15.4 / WebKit browsers.
28
- * Remove this workaround once the WebKit bug fix is released.
26
+ /*
27
+ TODO v6: remove
28
+ Conditionally apply a workaround for the CSS transition bug in Safari 15.4 / WebKit browsers.
29
+ Remove this workaround once the WebKit bug fix is released.
29
30
  */
30
31
 
31
32
  var isWebKit154 = typeof navigator !== 'undefined' && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)[4-9]/i.test(navigator.userAgent);
@@ -207,6 +207,12 @@ process.env.NODE_ENV !== "production" ? InputLabel.propTypes
207
207
  */
208
208
  shrink: PropTypes.bool,
209
209
 
210
+ /**
211
+ * The size of the component.
212
+ * @default 'normal'
213
+ */
214
+ size: PropTypes.oneOf(['normal', 'small']),
215
+
210
216
  /**
211
217
  * The system prop that allows defining system overrides as well as additional CSS styles.
212
218
  */
@@ -151,7 +151,8 @@ var ListItemButton = /*#__PURE__*/React.forwardRef(function ListItemButton(inPro
151
151
  value: childContext,
152
152
  children: /*#__PURE__*/_jsx(ListItemButtonRoot, _extends({
153
153
  ref: handleRef,
154
- component: component,
154
+ href: other.href || other.to,
155
+ component: (other.href || other.to) && component === 'div' ? 'a' : component,
155
156
  focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),
156
157
  ownerState: ownerState
157
158
  }, other, {
@@ -233,6 +234,11 @@ process.env.NODE_ENV !== "production" ? ListItemButton.propTypes
233
234
  */
234
235
  focusVisibleClassName: PropTypes.string,
235
236
 
237
+ /**
238
+ * @ignore
239
+ */
240
+ href: PropTypes.string,
241
+
236
242
  /**
237
243
  * Use to apply selected styling.
238
244
  * @default false
@@ -88,7 +88,7 @@ function moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable,
88
88
  return false;
89
89
  }
90
90
  /**
91
- * A permanently displayed menu following https://www.w3.org/TR/wai-aria-practices/#menubutton.
91
+ * A permanently displayed menu following https://www.w3.org/WAI/ARIA/apg/patterns/menubutton/.
92
92
  * It's exposed to help customization of the [`Menu`](/material-ui/api/menu/) component if you
93
93
  * use it separately you need to move focus into the component manually. Once
94
94
  * the focus is placed inside the component it is fully keyboard accessible.
@@ -12,8 +12,7 @@ import useTheme from '../styles/useTheme';
12
12
  import { getPaperUtilityClass } from './paperClasses'; // Inspired by https://github.com/material-components/material-components-ios/blob/bca36107405594d5b7b16265a5b0ed698f85a5ee/components/Elevation/src/UIColor%2BMaterialElevation.m#L61
13
13
 
14
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
-
16
- var getOverlayAlpha = function getOverlayAlpha(elevation) {
15
+ export var getOverlayAlpha = function getOverlayAlpha(elevation) {
17
16
  var alphaValue;
18
17
 
19
18
  if (elevation < 1) {
@@ -44,20 +43,24 @@ var PaperRoot = styled('div', {
44
43
  return [styles.root, styles[ownerState.variant], !ownerState.square && styles.rounded, ownerState.variant === 'elevation' && styles["elevation".concat(ownerState.elevation)]];
45
44
  }
46
45
  })(function (_ref) {
46
+ var _theme$vars$overlays;
47
+
47
48
  var theme = _ref.theme,
48
49
  ownerState = _ref.ownerState;
49
50
  return _extends({
50
- backgroundColor: theme.palette.background.paper,
51
- color: theme.palette.text.primary,
51
+ backgroundColor: (theme.vars || theme).palette.background.paper,
52
+ color: (theme.vars || theme).palette.text.primary,
52
53
  transition: theme.transitions.create('box-shadow')
53
54
  }, !ownerState.square && {
54
55
  borderRadius: theme.shape.borderRadius
55
56
  }, ownerState.variant === 'outlined' && {
56
- border: "1px solid ".concat(theme.palette.divider)
57
+ border: "1px solid ".concat((theme.vars || theme).palette.divider)
57
58
  }, ownerState.variant === 'elevation' && _extends({
58
- boxShadow: theme.shadows[ownerState.elevation]
59
- }, theme.palette.mode === 'dark' && {
59
+ boxShadow: (theme.vars || theme).shadows[ownerState.elevation]
60
+ }, !theme.vars && theme.palette.mode === 'dark' && {
60
61
  backgroundImage: "linear-gradient(".concat(alpha('#fff', getOverlayAlpha(ownerState.elevation)), ", ").concat(alpha('#fff', getOverlayAlpha(ownerState.elevation)), ")")
62
+ }, theme.vars && {
63
+ backgroundImage: (_theme$vars$overlays = theme.vars.overlays) == null ? void 0 : _theme$vars$overlays[ownerState.elevation]
61
64
  }));
62
65
  });
63
66
  var Paper = /*#__PURE__*/React.forwardRef(function Paper(inProps, ref) {
@@ -40,18 +40,18 @@ var RadioRoot = styled(SwitchBase, {
40
40
  var theme = _ref.theme,
41
41
  ownerState = _ref.ownerState;
42
42
  return _extends({
43
- color: theme.palette.text.secondary,
43
+ color: (theme.vars || theme).palette.text.secondary,
44
44
  '&:hover': {
45
- backgroundColor: alpha(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
45
+ backgroundColor: theme.vars ? "rgba(".concat(ownerState.color === 'default' ? theme.vars.palette.action.activeChannel : theme.vars.palette[ownerState.color].mainChannel, " / ").concat(theme.vars.palette.action.hoverOpacity, ")") : alpha(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
46
46
  // Reset on touch devices, it doesn't add specificity
47
47
  '@media (hover: none)': {
48
48
  backgroundColor: 'transparent'
49
49
  }
50
50
  }
51
51
  }, ownerState.color !== 'default' && _defineProperty({}, "&.".concat(radioClasses.checked), {
52
- color: theme.palette[ownerState.color].main
52
+ color: (theme.vars || theme).palette[ownerState.color].main
53
53
  }), _defineProperty({}, "&.".concat(radioClasses.disabled), {
54
- color: theme.palette.action.disabled
54
+ color: (theme.vars || theme).palette.action.disabled
55
55
  }));
56
56
  });
57
57
 
@@ -325,8 +325,8 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
325
325
 
326
326
  var handleKeyDown = function handleKeyDown(event) {
327
327
  if (!readOnly) {
328
- var validKeys = [' ', 'ArrowUp', 'ArrowDown', // The native select doesn't respond to enter on MacOS, but it's recommended by
329
- // https://www.w3.org/TR/wai-aria-practices/examples/listbox/listbox-collapsible.html
328
+ var validKeys = [' ', 'ArrowUp', 'ArrowDown', // The native select doesn't respond to enter on macOS, but it's recommended by
329
+ // https://www.w3.org/WAI/ARIA/apg/example-index/combobox/combobox-select-only.html
330
330
  'Enter'];
331
331
 
332
332
  if (validKeys.indexOf(event.key) !== -1) {
@@ -1,6 +1,5 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
2
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
- import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
4
3
  import _extends from "@babel/runtime/helpers/esm/extends";
5
4
  import * as React from 'react';
6
5
  import PropTypes from 'prop-types';
@@ -21,15 +20,7 @@ var SliderRoot = styled('span', {
21
20
  slot: 'Root',
22
21
  overridesResolver: function overridesResolver(props, styles) {
23
22
  var ownerState = props.ownerState;
24
- var marks = ownerState.marksProp === true && ownerState.step !== null ? _toConsumableArray(Array(Math.floor((ownerState.max - ownerState.min) / ownerState.step) + 1)).map(function (_, index) {
25
- return {
26
- value: ownerState.min + ownerState.step * index
27
- };
28
- }) : ownerState.marksProp || [];
29
- var marked = marks.length > 0 && marks.some(function (mark) {
30
- return mark.label;
31
- });
32
- return [styles.root, styles["color".concat(capitalize(ownerState.color))], ownerState.size !== 'medium' && styles["size".concat(capitalize(ownerState.size))], marked && styles.marked, ownerState.orientation === 'vertical' && styles.vertical, ownerState.track === 'inverted' && styles.trackInverted, ownerState.track === false && styles.trackFalse];
23
+ return [styles.root, styles["color".concat(capitalize(ownerState.color))], ownerState.size !== 'medium' && styles["size".concat(capitalize(ownerState.size))], ownerState.marked && styles.marked, ownerState.orientation === 'vertical' && styles.vertical, ownerState.track === 'inverted' && styles.trackInverted, ownerState.track === false && styles.trackFalse];
33
24
  }
34
25
  })(function (_ref) {
35
26
  var _extends2;
@@ -292,7 +283,6 @@ var SliderValueLabel = styled(SliderValueLabelUnstyled, {
292
283
  transition: theme.transitions.create(['transform'], {
293
284
  duration: theme.transitions.duration.shortest
294
285
  }),
295
- top: -10,
296
286
  transformOrigin: 'bottom center',
297
287
  transform: 'translateY(-100%) scale(0)',
298
288
  position: 'absolute',
@@ -303,20 +293,34 @@ var SliderValueLabel = styled(SliderValueLabelUnstyled, {
303
293
  alignItems: 'center',
304
294
  justifyContent: 'center',
305
295
  padding: '0.25rem 0.75rem'
306
- }, ownerState.size === 'small' && {
307
- fontSize: theme.typography.pxToRem(12),
308
- padding: '0.25rem 0.5rem'
309
- }, {
296
+ }, ownerState.orientation === 'horizontal' && {
297
+ top: '-10px',
310
298
  '&:before': {
311
299
  position: 'absolute',
312
300
  content: '""',
313
301
  width: 8,
314
302
  height: 8,
303
+ transform: 'translate(-50%, 50%) rotate(45deg)',
304
+ backgroundColor: 'inherit',
315
305
  bottom: 0,
316
- left: '50%',
306
+ left: '50%'
307
+ }
308
+ }, ownerState.orientation === 'vertical' && {
309
+ right: '30px',
310
+ top: '25px',
311
+ '&:before': {
312
+ position: 'absolute',
313
+ content: '""',
314
+ width: 8,
315
+ height: 8,
317
316
  transform: 'translate(-50%, 50%) rotate(45deg)',
318
- backgroundColor: 'inherit'
317
+ backgroundColor: 'inherit',
318
+ right: '-20%',
319
+ top: '25%'
319
320
  }
321
+ }, ownerState.size === 'small' && {
322
+ fontSize: theme.typography.pxToRem(12),
323
+ padding: '0.25rem 0.5rem'
320
324
  });
321
325
  });
322
326
  process.env.NODE_ENV !== "production" ? SliderValueLabel.propTypes
@@ -134,7 +134,7 @@ var TabsScroller = styled('div', {
134
134
  overflowX: 'hidden',
135
135
  width: '100%'
136
136
  }, ownerState.hideScrollbar && {
137
- // Hide dimensionless scrollbar on MacOS
137
+ // Hide dimensionless scrollbar on macOS
138
138
  scrollbarWidth: 'none',
139
139
  // Firefox
140
140
  '&::-webkit-scrollbar': {
@@ -197,7 +197,7 @@ var TabsScrollbarSize = styled(ScrollbarSize, {
197
197
  })({
198
198
  overflowX: 'auto',
199
199
  overflowY: 'hidden',
200
- // Hide dimensionless scrollbar on MacOS
200
+ // Hide dimensionless scrollbar on macOS
201
201
  scrollbarWidth: 'none',
202
202
  // Firefox
203
203
  '&::-webkit-scrollbar': {
package/legacy/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.8.0
1
+ /** @license MUI v5.8.3
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.
@@ -8,6 +8,9 @@ var defaultTheme = experimental_extendTheme();
8
8
 
9
9
  var _createCssVarsProvide = createCssVarsProvider({
10
10
  theme: defaultTheme,
11
+ attribute: 'data-mui-color-scheme',
12
+ modeStorageKey: 'mui-mode',
13
+ colorSchemeStorageKey: 'mui-color-scheme',
11
14
  defaultColorScheme: {
12
15
  light: 'light',
13
16
  dark: 'dark'
@@ -6,8 +6,10 @@ export default function createMixins(breakpoints, mixins) {
6
6
  return _extends({
7
7
  toolbar: (_toolbar = {
8
8
  minHeight: 56
9
- }, _defineProperty(_toolbar, "".concat(breakpoints.up('xs'), " and (orientation: landscape)"), {
10
- minHeight: 48
9
+ }, _defineProperty(_toolbar, breakpoints.up('xs'), {
10
+ '@media (orientation: landscape)': {
11
+ minHeight: 48
12
+ }
11
13
  }), _defineProperty(_toolbar, breakpoints.up('sm'), {
12
14
  minHeight: 64
13
15
  }), _toolbar)
@@ -1,10 +1,22 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
4
  import { deepmerge } from '@mui/utils';
4
5
  import { colorChannel } from '@mui/system';
5
6
  import createThemeWithoutVars from './createTheme';
7
+ import { getOverlayAlpha } from '../Paper/Paper';
8
+
9
+ var defaultDarkOverlays = _toConsumableArray(Array(25)).map(function (_, index) {
10
+ if (index === 0) {
11
+ return undefined;
12
+ }
13
+
14
+ var overlay = getOverlayAlpha(index);
15
+ return "linear-gradient(rgba(255 255 255 / ".concat(overlay, "), rgba(255 255 255 / ").concat(overlay, "))");
16
+ });
17
+
6
18
  export default function extendTheme() {
7
- var _colorSchemesInput$li, _colorSchemesInput$da, _colorSchemesInput$li2, _colorSchemesInput$da2;
19
+ var _colorSchemesInput$li, _colorSchemesInput$da, _colorSchemesInput$li2, _colorSchemesInput$li3, _colorSchemesInput$da2, _colorSchemesInput$da3;
8
20
 
9
21
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10
22
 
@@ -32,14 +44,16 @@ export default function extendTheme() {
32
44
  opacity: _extends({
33
45
  placeholder: 0.42,
34
46
  inputTouchBottomLine: 0.42
35
- }, (_colorSchemesInput$li2 = colorSchemesInput.light) == null ? void 0 : _colorSchemesInput$li2.opacity)
47
+ }, (_colorSchemesInput$li2 = colorSchemesInput.light) == null ? void 0 : _colorSchemesInput$li2.opacity),
48
+ overlays: ((_colorSchemesInput$li3 = colorSchemesInput.light) == null ? void 0 : _colorSchemesInput$li3.overlays) || []
36
49
  }),
37
50
  dark: _extends({}, colorSchemesInput.dark, {
38
51
  palette: darkPalette,
39
52
  opacity: _extends({
40
53
  placeholder: 0.5,
41
54
  inputTouchBottomLine: 0.7
42
- }, (_colorSchemesInput$da2 = colorSchemesInput.dark) == null ? void 0 : _colorSchemesInput$da2.opacity)
55
+ }, (_colorSchemesInput$da2 = colorSchemesInput.dark) == null ? void 0 : _colorSchemesInput$da2.opacity),
56
+ overlays: ((_colorSchemesInput$da3 = colorSchemesInput.dark) == null ? void 0 : _colorSchemesInput$da3.overlays) || defaultDarkOverlays
43
57
  })
44
58
  })
45
59
  });
@@ -90,6 +104,11 @@ export default function extendTheme() {
90
104
 
91
105
  if (colors.secondary) {
92
106
  palette[color].secondaryChannel = colorChannel(colors.secondary);
107
+ } // Action colors: action.activeChannel
108
+
109
+
110
+ if (colors.active) {
111
+ palette[color].activeChannel = colorChannel(colors.active);
93
112
  }
94
113
  });
95
114
  });
package/locale/index.d.ts CHANGED
@@ -1,71 +1,71 @@
1
- import { ComponentsPropsList } from '../styles/props';
2
- export interface Localization {
3
- components?: {
4
- MuiAlert?: {
5
- defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
6
- };
7
- MuiBreadcrumbs?: {
8
- defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
9
- };
10
- MuiTablePagination?: {
11
- defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
12
- };
13
- MuiRating?: {
14
- defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
15
- };
16
- MuiAutocomplete?: {
17
- defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
18
- };
19
- MuiPagination?: {
20
- defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
21
- };
22
- };
23
- }
24
- export declare const amET: Localization;
25
- export declare const arEG: Localization;
26
- export declare const arSD: Localization;
27
- export declare const azAZ: Localization;
28
- export declare const bnBD: Localization;
29
- export declare const bgBG: Localization;
30
- export declare const caES: Localization;
31
- export declare const csCZ: Localization;
32
- export declare const daDK: Localization;
33
- export declare const deDE: Localization;
34
- export declare const elGR: Localization;
35
- export declare const enUS: Localization;
36
- export declare const esES: Localization;
37
- export declare const etEE: Localization;
38
- export declare const faIR: Localization;
39
- export declare const fiFI: Localization;
40
- export declare const frFR: Localization;
41
- export declare const heIL: Localization;
42
- export declare const hiIN: Localization;
43
- export declare const hrHR: Localization;
44
- export declare const huHU: Localization;
45
- export declare const hyAM: Localization;
46
- export declare const idID: Localization;
47
- export declare const isIS: Localization;
48
- export declare const itIT: Localization;
49
- export declare const jaJP: Localization;
50
- export declare const khKH: Localization;
51
- export declare const koKR: Localization;
52
- export declare const kzKZ: Localization;
53
- export declare const mkMK: Localization;
54
- export declare const nbNO: Localization;
55
- export declare const nlNL: Localization;
56
- export declare const plPL: Localization;
57
- export declare const ptBR: Localization;
58
- export declare const ptPT: Localization;
59
- export declare const roRO: Localization;
60
- export declare const srRS: Localization;
61
- export declare const ruRU: Localization;
62
- export declare const siLK: Localization;
63
- export declare const skSK: Localization;
64
- export declare const svSE: Localization;
65
- export declare const thTH: Localization;
66
- export declare const trTR: Localization;
67
- export declare const ukUA: Localization;
68
- export declare const viVN: Localization;
69
- export declare const zhCN: Localization;
70
- export declare const zhHK: Localization;
71
- export declare const zhTW: Localization;
1
+ import { ComponentsPropsList } from '../styles/props';
2
+ export interface Localization {
3
+ components?: {
4
+ MuiAlert?: {
5
+ defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
6
+ };
7
+ MuiBreadcrumbs?: {
8
+ defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
9
+ };
10
+ MuiTablePagination?: {
11
+ defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
12
+ };
13
+ MuiRating?: {
14
+ defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
15
+ };
16
+ MuiAutocomplete?: {
17
+ defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
18
+ };
19
+ MuiPagination?: {
20
+ defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
21
+ };
22
+ };
23
+ }
24
+ export declare const amET: Localization;
25
+ export declare const arEG: Localization;
26
+ export declare const arSD: Localization;
27
+ export declare const azAZ: Localization;
28
+ export declare const bnBD: Localization;
29
+ export declare const bgBG: Localization;
30
+ export declare const caES: Localization;
31
+ export declare const csCZ: Localization;
32
+ export declare const daDK: Localization;
33
+ export declare const deDE: Localization;
34
+ export declare const elGR: Localization;
35
+ export declare const enUS: Localization;
36
+ export declare const esES: Localization;
37
+ export declare const etEE: Localization;
38
+ export declare const faIR: Localization;
39
+ export declare const fiFI: Localization;
40
+ export declare const frFR: Localization;
41
+ export declare const heIL: Localization;
42
+ export declare const hiIN: Localization;
43
+ export declare const hrHR: Localization;
44
+ export declare const huHU: Localization;
45
+ export declare const hyAM: Localization;
46
+ export declare const idID: Localization;
47
+ export declare const isIS: Localization;
48
+ export declare const itIT: Localization;
49
+ export declare const jaJP: Localization;
50
+ export declare const khKH: Localization;
51
+ export declare const koKR: Localization;
52
+ export declare const kzKZ: Localization;
53
+ export declare const mkMK: Localization;
54
+ export declare const nbNO: Localization;
55
+ export declare const nlNL: Localization;
56
+ export declare const plPL: Localization;
57
+ export declare const ptBR: Localization;
58
+ export declare const ptPT: Localization;
59
+ export declare const roRO: Localization;
60
+ export declare const srRS: Localization;
61
+ export declare const ruRU: Localization;
62
+ export declare const siLK: Localization;
63
+ export declare const skSK: Localization;
64
+ export declare const svSE: Localization;
65
+ export declare const thTH: Localization;
66
+ export declare const trTR: Localization;
67
+ export declare const ukUA: Localization;
68
+ export declare const viVN: Localization;
69
+ export declare const zhCN: Localization;
70
+ export declare const zhHK: Localization;
71
+ export declare const zhTW: Localization;
@@ -93,7 +93,9 @@ const AlertMessage = styled('div', {
93
93
  slot: 'Message',
94
94
  overridesResolver: (props, styles) => styles.message
95
95
  })({
96
- padding: '8px 0'
96
+ padding: '8px 0',
97
+ minWidth: 0,
98
+ overflow: 'auto'
97
99
  });
98
100
  const AlertAction = styled('div', {
99
101
  name: 'MuiAlert',
@@ -164,6 +166,7 @@ const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
164
166
  className: classes.message,
165
167
  children: children
166
168
  }), action != null ? /*#__PURE__*/_jsx(AlertAction, {
169
+ ownerState: ownerState,
167
170
  className: classes.action,
168
171
  children: action
169
172
  }) : null, action == null && onClose ? /*#__PURE__*/_jsx(AlertAction, {
File without changes
@@ -192,12 +192,12 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
192
192
 
193
193
  } = options;
194
194
 
195
- if (event.type === 'mousedown' && ignoringMouseDown.current) {
195
+ if (event?.type === 'mousedown' && ignoringMouseDown.current) {
196
196
  ignoringMouseDown.current = false;
197
197
  return;
198
198
  }
199
199
 
200
- if (event.type === 'touchstart') {
200
+ if (event?.type === 'touchstart') {
201
201
  ignoringMouseDown.current = true;
202
202
  }
203
203
 
@@ -213,7 +213,7 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
213
213
  let rippleY;
214
214
  let rippleSize;
215
215
 
216
- if (center || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {
216
+ if (center || event === undefined || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {
217
217
  rippleX = Math.round(rect.width / 2);
218
218
  rippleY = Math.round(rect.height / 2);
219
219
  } else {
@@ -238,7 +238,7 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
238
238
  } // Touche devices
239
239
 
240
240
 
241
- if (event.touches) {
241
+ if (event?.touches) {
242
242
  // check that this isn't another touchstart due to multitouch
243
243
  // otherwise we will only clear a single timer when unmounting while two
244
244
  // are running
@@ -281,7 +281,7 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
281
281
  clearTimeout(startTimer.current); // The touch interaction occurs too quickly.
282
282
  // We still want to show ripple effect.
283
283
 
284
- if (event.type === 'touchend' && startTimerCommit.current) {
284
+ if (event?.type === 'touchend' && startTimerCommit.current) {
285
285
  startTimerCommit.current();
286
286
  startTimerCommit.current = null;
287
287
  startTimer.current = setTimeout(() => {
@@ -43,10 +43,10 @@ const CheckboxRoot = styled(SwitchBase, {
43
43
  theme,
44
44
  ownerState
45
45
  }) => _extends({
46
- color: theme.palette.text.secondary
46
+ color: (theme.vars || theme).palette.text.secondary
47
47
  }, !ownerState.disableRipple && {
48
48
  '&:hover': {
49
- backgroundColor: alpha(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
49
+ backgroundColor: theme.vars ? `rgba(${ownerState.color === 'default' ? theme.vars.palette.action.activeChannel : theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
50
50
  // Reset on touch devices, it doesn't add specificity
51
51
  '@media (hover: none)': {
52
52
  backgroundColor: 'transparent'
@@ -54,10 +54,10 @@ const CheckboxRoot = styled(SwitchBase, {
54
54
  }
55
55
  }, ownerState.color !== 'default' && {
56
56
  [`&.${checkboxClasses.checked}, &.${checkboxClasses.indeterminate}`]: {
57
- color: theme.palette[ownerState.color].main
57
+ color: (theme.vars || theme).palette[ownerState.color].main
58
58
  },
59
59
  [`&.${checkboxClasses.disabled}`]: {
60
- color: theme.palette.action.disabled
60
+ color: (theme.vars || theme).palette.action.disabled
61
61
  }
62
62
  }));
63
63
 
package/modern/Fab/Fab.js CHANGED
@@ -181,7 +181,9 @@ process.env.NODE_ENV !== "production" ? Fab.propTypes
181
181
  * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
182
182
  * @default 'default'
183
183
  */
184
- color: PropTypes.oneOf(['default', 'error', 'info', 'inherit', 'primary', 'secondary', 'success', 'warning']),
184
+ color: PropTypes
185
+ /* @typescript-to-proptypes-ignore */
186
+ .oneOfType([PropTypes.oneOf(['default', 'error', 'info', 'inherit', 'primary', 'secondary', 'success', 'warning']), PropTypes.string]),
185
187
 
186
188
  /**
187
189
  * The component used for the root node.