@mui/material 5.7.0 → 5.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) 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 +1 -0
  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/Autocomplete.d.ts +23 -1
  10. package/Autocomplete/Autocomplete.js +3 -2
  11. package/Autocomplete/autocompleteClasses.d.ts +54 -54
  12. package/Avatar/avatarClasses.d.ts +20 -20
  13. package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
  14. package/Backdrop/backdropClasses.d.ts +10 -10
  15. package/Badge/Badge.d.ts +1 -34
  16. package/Badge/badgeClasses.d.ts +56 -24
  17. package/BottomNavigation/BottomNavigation.js +0 -0
  18. package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
  19. package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
  20. package/Box/Box.js +1 -1
  21. package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
  22. package/Button/buttonClasses.d.ts +76 -76
  23. package/ButtonBase/TouchRipple.js +5 -5
  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 +201 -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/chipClasses.d.ts +80 -80
  37. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  38. package/ClickAwayListener/index.d.ts +2 -2
  39. package/Collapse/collapseClasses.d.ts +18 -18
  40. package/Container/Container.js +17 -106
  41. package/Container/containerClasses.d.ts +6 -22
  42. package/Dialog/DialogContext.d.ts +6 -6
  43. package/Dialog/dialogClasses.d.ts +36 -36
  44. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  45. package/DialogContent/dialogContentClasses.d.ts +10 -10
  46. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  47. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  48. package/Divider/dividerClasses.d.ts +34 -34
  49. package/Drawer/drawerClasses.d.ts +30 -30
  50. package/Fab/Fab.js +3 -1
  51. package/Fab/fabClasses.d.ts +26 -26
  52. package/FilledInput/filledInputClasses.d.ts +40 -40
  53. package/FormControl/formControlClasses.d.ts +14 -14
  54. package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
  55. package/FormGroup/formGroupClasses.d.ts +12 -12
  56. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  57. package/FormLabel/formLabelClasses.d.ts +22 -22
  58. package/Grid/gridClasses.d.ts +48 -48
  59. package/Grow/Grow.js +4 -3
  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/inputClasses.d.ts +34 -34
  66. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  67. package/InputBase/inputBaseClasses.d.ts +44 -44
  68. package/InputLabel/InputLabel.d.ts +5 -0
  69. package/InputLabel/InputLabel.js +6 -0
  70. package/InputLabel/inputLabelClasses.d.ts +32 -32
  71. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  72. package/Link/linkClasses.d.ts +18 -18
  73. package/List/listClasses.d.ts +14 -14
  74. package/ListItem/listItemClasses.d.ts +30 -30
  75. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  76. package/ListItemButton/ListItemButton.js +7 -1
  77. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  78. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  79. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  80. package/ListItemText/listItemTextClasses.d.ts +18 -18
  81. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  82. package/Menu/menuClasses.d.ts +12 -12
  83. package/MenuItem/menuItemClasses.d.ts +20 -20
  84. package/MenuList/MenuList.d.ts +1 -1
  85. package/MenuList/MenuList.js +1 -1
  86. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  87. package/NativeSelect/nativeSelectClasses.d.ts +32 -32
  88. package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
  89. package/Pagination/paginationClasses.d.ts +14 -14
  90. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  91. package/Paper/Paper.js +20 -15
  92. package/Paper/index.d.ts +1 -1
  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/README.md +2 -1
  97. package/Radio/Radio.js +4 -4
  98. package/Radio/radioClasses.d.ts +16 -16
  99. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  100. package/RadioGroup/useRadioGroup.d.ts +4 -4
  101. package/Rating/ratingClasses.d.ts +40 -40
  102. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  103. package/Select/SelectInput.js +2 -2
  104. package/Select/selectClasses.d.ts +30 -30
  105. package/Skeleton/skeletonClasses.d.ts +24 -24
  106. package/Slider/Slider.js +1 -5
  107. package/Snackbar/snackbarClasses.d.ts +20 -20
  108. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  109. package/SpeedDial/speedDialClasses.d.ts +22 -22
  110. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  111. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  112. package/Step/StepContext.d.ts +20 -20
  113. package/Step/stepClasses.d.ts +16 -16
  114. package/StepButton/stepButtonClasses.d.ts +14 -14
  115. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  116. package/StepContent/stepContentClasses.d.ts +12 -12
  117. package/StepIcon/stepIconClasses.d.ts +16 -16
  118. package/StepLabel/stepLabelClasses.d.ts +28 -28
  119. package/Stepper/StepperContext.d.ts +18 -18
  120. package/Stepper/stepperClasses.d.ts +14 -14
  121. package/SvgIcon/svgIconClasses.d.ts +24 -24
  122. package/Switch/switchClasses.d.ts +32 -32
  123. package/Tab/tabClasses.d.ts +26 -26
  124. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  125. package/Table/tableClasses.d.ts +10 -10
  126. package/TableBody/tableBodyClasses.d.ts +8 -8
  127. package/TableCell/tableCellClasses.d.ts +32 -32
  128. package/TableContainer/tableContainerClasses.d.ts +8 -8
  129. package/TableFooter/tableFooterClasses.d.ts +8 -8
  130. package/TableHead/tableHeadClasses.d.ts +8 -8
  131. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  132. package/TableRow/tableRowClasses.d.ts +16 -16
  133. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  134. package/Tabs/Tabs.js +2 -2
  135. package/Tabs/tabsClasses.d.ts +32 -32
  136. package/TextField/textFieldClasses.d.ts +8 -8
  137. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  138. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  139. package/Toolbar/toolbarClasses.d.ts +14 -14
  140. package/Tooltip/tooltipClasses.d.ts +30 -30
  141. package/Typography/typographyClasses.d.ts +50 -50
  142. package/className/index.d.ts +1 -1
  143. package/className/index.js +1 -1
  144. package/darkScrollbar/index.d.ts +28 -28
  145. package/index.js +1 -1
  146. package/internal/switchBaseClasses.d.ts +12 -12
  147. package/legacy/Alert/Alert.js +1 -0
  148. package/legacy/Autocomplete/Autocomplete.js +3 -2
  149. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  150. package/legacy/Box/Box.js +1 -1
  151. package/legacy/ButtonBase/TouchRipple.js +5 -5
  152. package/legacy/Container/Container.js +18 -103
  153. package/legacy/Fab/Fab.js +3 -1
  154. package/legacy/Grow/Grow.js +4 -3
  155. package/legacy/InputLabel/InputLabel.js +6 -0
  156. package/legacy/ListItemButton/ListItemButton.js +7 -1
  157. package/legacy/MenuList/MenuList.js +1 -1
  158. package/legacy/Paper/Paper.js +10 -7
  159. package/legacy/Radio/Radio.js +4 -4
  160. package/legacy/Select/SelectInput.js +2 -2
  161. package/legacy/Slider/Slider.js +1 -10
  162. package/legacy/Tabs/Tabs.js +2 -2
  163. package/legacy/className/index.js +1 -1
  164. package/legacy/index.js +1 -1
  165. package/legacy/locale/index.js +22 -22
  166. package/legacy/styles/createMixins.js +5 -3
  167. package/legacy/styles/createTheme.js +1 -1
  168. package/legacy/styles/experimental_extendTheme.js +22 -3
  169. package/locale/index.d.ts +71 -71
  170. package/locale/index.js +22 -22
  171. package/modern/Alert/Alert.js +1 -0
  172. package/modern/Autocomplete/Autocomplete.js +3 -2
  173. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  174. package/modern/Box/Box.js +1 -1
  175. package/modern/ButtonBase/TouchRipple.js +5 -5
  176. package/modern/Container/Container.js +17 -106
  177. package/modern/Fab/Fab.js +3 -1
  178. package/modern/Grow/Grow.js +4 -3
  179. package/modern/InputLabel/InputLabel.js +6 -0
  180. package/modern/ListItemButton/ListItemButton.js +7 -1
  181. package/modern/MenuList/MenuList.js +1 -1
  182. package/modern/Paper/Paper.js +8 -7
  183. package/modern/Radio/Radio.js +4 -4
  184. package/modern/Select/SelectInput.js +2 -2
  185. package/modern/Slider/Slider.js +1 -5
  186. package/modern/Tabs/Tabs.js +2 -2
  187. package/modern/className/index.js +1 -1
  188. package/modern/index.js +1 -1
  189. package/modern/locale/index.js +22 -22
  190. package/modern/styles/createMixins.js +5 -3
  191. package/modern/styles/createTheme.js +1 -1
  192. package/modern/styles/experimental_extendTheme.js +18 -2
  193. package/node/Alert/Alert.js +1 -0
  194. package/node/Autocomplete/Autocomplete.js +4 -2
  195. package/node/BottomNavigation/BottomNavigation.js +0 -0
  196. package/node/Box/Box.js +2 -2
  197. package/node/ButtonBase/TouchRipple.js +5 -5
  198. package/node/Container/Container.js +17 -113
  199. package/node/Fab/Fab.js +3 -1
  200. package/node/Grow/Grow.js +4 -3
  201. package/node/InputLabel/InputLabel.js +6 -0
  202. package/node/ListItemButton/ListItemButton.js +7 -1
  203. package/node/MenuList/MenuList.js +1 -1
  204. package/node/Paper/Paper.js +22 -14
  205. package/node/Radio/Radio.js +4 -4
  206. package/node/Select/SelectInput.js +2 -2
  207. package/node/Slider/Slider.js +1 -5
  208. package/node/Tabs/Tabs.js +2 -2
  209. package/node/className/index.js +2 -2
  210. package/node/index.js +1 -1
  211. package/node/locale/index.js +22 -22
  212. package/node/styles/createMixins.js +5 -3
  213. package/node/styles/createTheme.js +1 -1
  214. package/node/styles/experimental_extendTheme.js +20 -3
  215. package/package.json +5 -6
  216. package/styles/createMixins.d.ts +2 -6
  217. package/styles/createMixins.js +5 -3
  218. package/styles/createPalette.d.ts +1 -1
  219. package/styles/createTheme.js +1 -1
  220. package/styles/experimental_extendTheme.d.ts +30 -0
  221. package/styles/experimental_extendTheme.js +19 -3
  222. package/styles/index.d.ts +1 -0
  223. package/transitions/index.d.ts +1 -1
  224. package/transitions/transition.d.ts +13 -13
  225. package/transitions/utils.d.ts +23 -23
  226. package/umd/material-ui.development.js +697 -585
  227. package/umd/material-ui.production.min.js +20 -20
  228. package/useMediaQuery/useMediaQuery.d.ts +31 -31
  229. package/useTouchRipple/index.d.ts +1 -1
  230. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  231. package/utils/getScrollbarSize.d.ts +2 -2
  232. package/utils/ownerDocument.d.ts +2 -2
  233. package/utils/ownerWindow.d.ts +2 -2
  234. package/utils/setRef.d.ts +2 -2
@@ -7,123 +7,32 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = void 0;
9
9
 
10
- var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
11
-
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
- var React = _interopRequireWildcard(require("react"));
15
-
16
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
17
11
 
18
- var _clsx = _interopRequireDefault(require("clsx"));
19
-
20
- var _base = require("@mui/base");
21
-
22
- var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
23
-
24
- var _styled = _interopRequireDefault(require("../styles/styled"));
25
-
26
- var _containerClasses = require("./containerClasses");
12
+ var _system = require("@mui/system");
27
13
 
28
14
  var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
29
15
 
30
- var _jsxRuntime = require("react/jsx-runtime");
31
-
32
- const _excluded = ["className", "component", "disableGutters", "fixed", "maxWidth"];
33
-
34
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
35
-
36
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
37
-
38
- const useUtilityClasses = ownerState => {
39
- const {
40
- classes,
41
- fixed,
42
- disableGutters,
43
- maxWidth
44
- } = ownerState;
45
- const slots = {
46
- root: ['root', maxWidth && `maxWidth${(0, _capitalize.default)(String(maxWidth))}`, fixed && 'fixed', disableGutters && 'disableGutters']
47
- };
48
- return (0, _base.unstable_composeClasses)(slots, _containerClasses.getContainerUtilityClass, classes);
49
- };
50
-
51
- const ContainerRoot = (0, _styled.default)('div', {
52
- name: 'MuiContainer',
53
- slot: 'Root',
54
- overridesResolver: (props, styles) => {
55
- const {
56
- ownerState
57
- } = props;
58
- return [styles.root, styles[`maxWidth${(0, _capitalize.default)(String(ownerState.maxWidth))}`], ownerState.fixed && styles.fixed, ownerState.disableGutters && styles.disableGutters];
59
- }
60
- })(({
61
- theme,
62
- ownerState
63
- }) => (0, _extends2.default)({
64
- width: '100%',
65
- marginLeft: 'auto',
66
- boxSizing: 'border-box',
67
- marginRight: 'auto',
68
- display: 'block'
69
- }, !ownerState.disableGutters && {
70
- paddingLeft: theme.spacing(2),
71
- paddingRight: theme.spacing(2),
72
- [theme.breakpoints.up('sm')]: {
73
- paddingLeft: theme.spacing(3),
74
- paddingRight: theme.spacing(3)
75
- }
76
- }), ({
77
- theme,
78
- ownerState
79
- }) => ownerState.fixed && Object.keys(theme.breakpoints.values).reduce((acc, breakpoint) => {
80
- const value = theme.breakpoints.values[breakpoint];
16
+ var _styled = _interopRequireDefault(require("../styles/styled"));
81
17
 
82
- if (value !== 0) {
83
- acc[theme.breakpoints.up(breakpoint)] = {
84
- maxWidth: `${value}${theme.breakpoints.unit}`
85
- };
86
- }
18
+ var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
87
19
 
88
- return acc;
89
- }, {}), ({
90
- theme,
91
- ownerState
92
- }) => (0, _extends2.default)({}, ownerState.maxWidth === 'xs' && {
93
- [theme.breakpoints.up('xs')]: {
94
- maxWidth: Math.max(theme.breakpoints.values.xs, 444)
95
- }
96
- }, ownerState.maxWidth && ownerState.maxWidth !== 'xs' && {
97
- [theme.breakpoints.up(ownerState.maxWidth)]: {
98
- maxWidth: `${theme.breakpoints.values[ownerState.maxWidth]}${theme.breakpoints.unit}`
99
- }
100
- }));
101
- const Container = /*#__PURE__*/React.forwardRef(function Container(inProps, ref) {
102
- const props = (0, _useThemeProps.default)({
20
+ /* eslint-disable material-ui/mui-name-matches-component-name */
21
+ const Container = (0, _system.createContainer)({
22
+ createStyledComponent: (0, _styled.default)('div', {
23
+ name: 'MuiContainer',
24
+ slot: 'Root',
25
+ overridesResolver: (props, styles) => {
26
+ const {
27
+ ownerState
28
+ } = props;
29
+ return [styles.root, styles[`maxWidth${(0, _capitalize.default)(String(ownerState.maxWidth))}`], ownerState.fixed && styles.fixed, ownerState.disableGutters && styles.disableGutters];
30
+ }
31
+ }),
32
+ useThemeProps: inProps => (0, _useThemeProps.default)({
103
33
  props: inProps,
104
34
  name: 'MuiContainer'
105
- });
106
- const {
107
- className,
108
- component = 'div',
109
- disableGutters = false,
110
- fixed = false,
111
- maxWidth = 'lg'
112
- } = props,
113
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
114
- const ownerState = (0, _extends2.default)({}, props, {
115
- component,
116
- disableGutters,
117
- fixed,
118
- maxWidth
119
- });
120
- const classes = useUtilityClasses(ownerState);
121
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(ContainerRoot, (0, _extends2.default)({
122
- as: component,
123
- ownerState: ownerState,
124
- className: (0, _clsx.default)(classes.root, className),
125
- ref: ref
126
- }, other));
35
+ })
127
36
  });
128
37
  process.env.NODE_ENV !== "production" ? Container.propTypes
129
38
  /* remove-proptypes */
@@ -143,11 +52,6 @@ process.env.NODE_ENV !== "production" ? Container.propTypes
143
52
  */
144
53
  classes: _propTypes.default.object,
145
54
 
146
- /**
147
- * @ignore
148
- */
149
- className: _propTypes.default.string,
150
-
151
55
  /**
152
56
  * The component used for the root node.
153
57
  * Either a string to use a HTML element or a component.
package/node/Fab/Fab.js CHANGED
@@ -207,7 +207,9 @@ process.env.NODE_ENV !== "production" ? Fab.propTypes
207
207
  * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
208
208
  * @default 'default'
209
209
  */
210
- color: _propTypes.default.oneOf(['default', 'error', 'info', 'inherit', 'primary', 'secondary', 'success', 'warning']),
210
+ color: _propTypes.default
211
+ /* @typescript-to-proptypes-ignore */
212
+ .oneOfType([_propTypes.default.oneOf(['default', 'error', 'info', 'inherit', 'primary', 'secondary', 'success', 'warning']), _propTypes.default.string]),
211
213
 
212
214
  /**
213
215
  * The component used for the root node.
package/node/Grow/Grow.js CHANGED
@@ -47,9 +47,10 @@ const styles = {
47
47
  transform: 'none'
48
48
  }
49
49
  };
50
- /**
51
- * Conditionally apply a workaround for the CSS transition bug in Safari 15.4 / WebKit browsers.
52
- * Remove this workaround once the WebKit bug fix is released.
50
+ /*
51
+ TODO v6: remove
52
+ Conditionally apply a workaround for the CSS transition bug in Safari 15.4 / WebKit browsers.
53
+ Remove this workaround once the WebKit bug fix is released.
53
54
  */
54
55
 
55
56
  const isWebKit154 = typeof navigator !== 'undefined' && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)[4-9]/i.test(navigator.userAgent);
@@ -230,6 +230,12 @@ process.env.NODE_ENV !== "production" ? InputLabel.propTypes
230
230
  */
231
231
  shrink: _propTypes.default.bool,
232
232
 
233
+ /**
234
+ * The size of the component.
235
+ * @default 'normal'
236
+ */
237
+ size: _propTypes.default.oneOf(['normal', 'small']),
238
+
233
239
  /**
234
240
  * The system prop that allows defining system overrides as well as additional CSS styles.
235
241
  */
@@ -177,7 +177,8 @@ const ListItemButton = /*#__PURE__*/React.forwardRef(function ListItemButton(inP
177
177
  value: childContext,
178
178
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ListItemButtonRoot, (0, _extends2.default)({
179
179
  ref: handleRef,
180
- component: component,
180
+ href: other.href || other.to,
181
+ component: (other.href || other.to) && component === 'div' ? 'a' : component,
181
182
  focusVisibleClassName: (0, _clsx.default)(classes.focusVisible, focusVisibleClassName),
182
183
  ownerState: ownerState
183
184
  }, other, {
@@ -259,6 +260,11 @@ process.env.NODE_ENV !== "production" ? ListItemButton.propTypes
259
260
  */
260
261
  focusVisibleClassName: _propTypes.default.string,
261
262
 
263
+ /**
264
+ * @ignore
265
+ */
266
+ href: _propTypes.default.string,
267
+
262
268
  /**
263
269
  * Use to apply selected styling.
264
270
  * @default false
@@ -113,7 +113,7 @@ function moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable,
113
113
  return false;
114
114
  }
115
115
  /**
116
- * A permanently displayed menu following https://www.w3.org/TR/wai-aria-practices/#menubutton.
116
+ * A permanently displayed menu following https://www.w3.org/WAI/ARIA/apg/patterns/menubutton/.
117
117
  * It's exposed to help customization of the [`Menu`](/material-ui/api/menu/) component if you
118
118
  * use it separately you need to move focus into the component manually. Once
119
119
  * the focus is placed inside the component it is fully keyboard accessible.
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.default = void 0;
8
+ exports.getOverlayAlpha = exports.default = void 0;
9
9
 
10
10
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
11
11
 
@@ -52,6 +52,8 @@ const getOverlayAlpha = elevation => {
52
52
  return (alphaValue / 100).toFixed(2);
53
53
  };
54
54
 
55
+ exports.getOverlayAlpha = getOverlayAlpha;
56
+
55
57
  const useUtilityClasses = ownerState => {
56
58
  const {
57
59
  square,
@@ -77,19 +79,25 @@ const PaperRoot = (0, _styled.default)('div', {
77
79
  })(({
78
80
  theme,
79
81
  ownerState
80
- }) => (0, _extends2.default)({
81
- backgroundColor: theme.palette.background.paper,
82
- color: theme.palette.text.primary,
83
- transition: theme.transitions.create('box-shadow')
84
- }, !ownerState.square && {
85
- borderRadius: theme.shape.borderRadius
86
- }, ownerState.variant === 'outlined' && {
87
- border: `1px solid ${theme.palette.divider}`
88
- }, ownerState.variant === 'elevation' && (0, _extends2.default)({
89
- boxShadow: theme.shadows[ownerState.elevation]
90
- }, theme.palette.mode === 'dark' && {
91
- backgroundImage: `linear-gradient(${(0, _system.alpha)('#fff', getOverlayAlpha(ownerState.elevation))}, ${(0, _system.alpha)('#fff', getOverlayAlpha(ownerState.elevation))})`
92
- })));
82
+ }) => {
83
+ var _theme$vars$overlays;
84
+
85
+ return (0, _extends2.default)({
86
+ backgroundColor: (theme.vars || theme).palette.background.paper,
87
+ color: (theme.vars || theme).palette.text.primary,
88
+ transition: theme.transitions.create('box-shadow')
89
+ }, !ownerState.square && {
90
+ borderRadius: theme.shape.borderRadius
91
+ }, ownerState.variant === 'outlined' && {
92
+ border: `1px solid ${(theme.vars || theme).palette.divider}`
93
+ }, ownerState.variant === 'elevation' && (0, _extends2.default)({
94
+ boxShadow: (theme.vars || theme).shadows[ownerState.elevation]
95
+ }, !theme.vars && theme.palette.mode === 'dark' && {
96
+ backgroundImage: `linear-gradient(${(0, _system.alpha)('#fff', getOverlayAlpha(ownerState.elevation))}, ${(0, _system.alpha)('#fff', getOverlayAlpha(ownerState.elevation))})`
97
+ }, theme.vars && {
98
+ backgroundImage: (_theme$vars$overlays = theme.vars.overlays) == null ? void 0 : _theme$vars$overlays[ownerState.elevation]
99
+ }));
100
+ });
93
101
  const Paper = /*#__PURE__*/React.forwardRef(function Paper(inProps, ref) {
94
102
  const props = (0, _useThemeProps.default)({
95
103
  props: inProps,
@@ -70,9 +70,9 @@ const RadioRoot = (0, _styled.default)(_SwitchBase.default, {
70
70
  theme,
71
71
  ownerState
72
72
  }) => (0, _extends2.default)({
73
- color: theme.palette.text.secondary,
73
+ color: (theme.vars || theme).palette.text.secondary,
74
74
  '&:hover': {
75
- backgroundColor: (0, _system.alpha)(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
75
+ backgroundColor: theme.vars ? `rgba(${ownerState.color === 'default' ? theme.vars.palette.action.activeChannel : theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : (0, _system.alpha)(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
76
76
  // Reset on touch devices, it doesn't add specificity
77
77
  '@media (hover: none)': {
78
78
  backgroundColor: 'transparent'
@@ -80,11 +80,11 @@ const RadioRoot = (0, _styled.default)(_SwitchBase.default, {
80
80
  }
81
81
  }, ownerState.color !== 'default' && {
82
82
  [`&.${_radioClasses.default.checked}`]: {
83
- color: theme.palette[ownerState.color].main
83
+ color: (theme.vars || theme).palette[ownerState.color].main
84
84
  }
85
85
  }, {
86
86
  [`&.${_radioClasses.default.disabled}`]: {
87
- color: theme.palette.action.disabled
87
+ color: (theme.vars || theme).palette.action.disabled
88
88
  }
89
89
  }));
90
90
 
@@ -339,8 +339,8 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
339
339
 
340
340
  const handleKeyDown = event => {
341
341
  if (!readOnly) {
342
- const validKeys = [' ', 'ArrowUp', 'ArrowDown', // The native select doesn't respond to enter on MacOS, but it's recommended by
343
- // https://www.w3.org/TR/wai-aria-practices/examples/listbox/listbox-collapsible.html
342
+ const validKeys = [' ', 'ArrowUp', 'ArrowDown', // The native select doesn't respond to enter on macOS, but it's recommended by
343
+ // https://www.w3.org/WAI/ARIA/apg/example-index/combobox/combobox-select-only.html
344
344
  'Enter'];
345
345
 
346
346
  if (validKeys.indexOf(event.key) !== -1) {
@@ -52,11 +52,7 @@ const SliderRoot = (0, _styled.default)('span', {
52
52
  const {
53
53
  ownerState
54
54
  } = props;
55
- const marks = ownerState.marksProp === true && ownerState.step !== null ? [...Array(Math.floor((ownerState.max - ownerState.min) / ownerState.step) + 1)].map((_, index) => ({
56
- value: ownerState.min + ownerState.step * index
57
- })) : ownerState.marksProp || [];
58
- const marked = marks.length > 0 && marks.some(mark => mark.label);
59
- return [styles.root, styles[`color${(0, _capitalize.default)(ownerState.color)}`], ownerState.size !== 'medium' && styles[`size${(0, _capitalize.default)(ownerState.size)}`], marked && styles.marked, ownerState.orientation === 'vertical' && styles.vertical, ownerState.track === 'inverted' && styles.trackInverted, ownerState.track === false && styles.trackFalse];
55
+ return [styles.root, styles[`color${(0, _capitalize.default)(ownerState.color)}`], ownerState.size !== 'medium' && styles[`size${(0, _capitalize.default)(ownerState.size)}`], ownerState.marked && styles.marked, ownerState.orientation === 'vertical' && styles.vertical, ownerState.track === 'inverted' && styles.trackInverted, ownerState.track === false && styles.trackFalse];
60
56
  }
61
57
  })(({
62
58
  theme,
package/node/Tabs/Tabs.js CHANGED
@@ -180,7 +180,7 @@ const TabsScroller = (0, _styled.default)('div', {
180
180
  overflowX: 'hidden',
181
181
  width: '100%'
182
182
  }, ownerState.hideScrollbar && {
183
- // Hide dimensionless scrollbar on MacOS
183
+ // Hide dimensionless scrollbar on macOS
184
184
  scrollbarWidth: 'none',
185
185
  // Firefox
186
186
  '&::-webkit-scrollbar': {
@@ -240,7 +240,7 @@ const TabsScrollbarSize = (0, _styled.default)(_ScrollbarSize.default, {
240
240
  })({
241
241
  overflowX: 'auto',
242
242
  overflowY: 'hidden',
243
- // Hide dimensionless scrollbar on MacOS
243
+ // Hide dimensionless scrollbar on macOS
244
244
  scrollbarWidth: 'none',
245
245
  // Firefox
246
246
  '&::-webkit-scrollbar': {
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "unstable_ClassNameGenerator", {
7
7
  enumerable: true,
8
8
  get: function () {
9
- return _privateClassnames.unstable_ClassNameGenerator;
9
+ return _utils.unstable_ClassNameGenerator;
10
10
  }
11
11
  });
12
12
 
13
- var _privateClassnames = require("@mui/private-classnames");
13
+ var _utils = require("@mui/utils");
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.7.0
1
+ /** @license MUI v5.8.2
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -89,26 +89,26 @@ const arEG = {
89
89
  components: {
90
90
  MuiBreadcrumbs: {
91
91
  defaultProps: {
92
- expandText: 'ظهر العنوان'
92
+ expandText: 'إظهار المسار'
93
93
  }
94
94
  },
95
95
  MuiTablePagination: {
96
96
  defaultProps: {
97
97
  getItemAriaLabel: type => {
98
98
  if (type === 'first') {
99
- return 'امش للصفحة الأولى';
99
+ return 'انتقل إلى الصفحة الأولى';
100
100
  }
101
101
 
102
102
  if (type === 'last') {
103
- return 'امش للصفحة الأخيرة';
103
+ return 'انتقل إلى الصفحة الأخيرة';
104
104
  }
105
105
 
106
106
  if (type === 'next') {
107
- return 'امش للصفحة التالية';
107
+ return 'انتقل إلى الصفحة التالية';
108
108
  } // if (type === 'previous') {
109
109
 
110
110
 
111
- return 'امش للصفحة السابقة';
111
+ return 'انتقل إلى الصفحة السابقة';
112
112
  },
113
113
  labelRowsPerPage: 'عدد الصفوف في الصفحة:',
114
114
  labelDisplayedRows: ({
@@ -128,7 +128,7 @@ const arEG = {
128
128
  defaultProps: {
129
129
  clearText: 'مسح',
130
130
  closeText: 'إغلاق',
131
- loadingText: 'يتم التحميل…',
131
+ loadingText: 'جار التحميل...',
132
132
  noOptionsText: 'لا يوجد خيارات',
133
133
  openText: 'فتح'
134
134
  }
@@ -143,23 +143,23 @@ const arEG = {
143
143
  'aria-label': 'التنقل عبر الصفحات',
144
144
  getItemAriaLabel: (type, page, selected) => {
145
145
  if (type === 'page') {
146
- return `${selected ? '' : 'امش إلى '} صفحة ${page}`;
146
+ return `${selected ? '' : 'انتقل إلى '} صفحة ${page}`;
147
147
  }
148
148
 
149
149
  if (type === 'first') {
150
- return 'امش للصفحة الأولى';
150
+ return 'انتقل إلى الصفحة الأولى';
151
151
  }
152
152
 
153
153
  if (type === 'last') {
154
- return 'امش للصفحة الأخيرة';
154
+ return 'انتقل إلى الصفحة الأخيرة';
155
155
  }
156
156
 
157
157
  if (type === 'next') {
158
- return 'امش للصفحة التالية';
158
+ return 'انتقل إلى الصفحة التالية';
159
159
  } // if (type === 'previous') {
160
160
 
161
161
 
162
- return 'امش للصفحة السابقة';
162
+ return 'انتقل إلى الصفحة السابقة';
163
163
  }
164
164
  }
165
165
  }
@@ -170,26 +170,26 @@ const arSD = {
170
170
  components: {
171
171
  MuiBreadcrumbs: {
172
172
  defaultProps: {
173
- expandText: 'إظهر العنوان'
173
+ expandText: 'إظهار المسار'
174
174
  }
175
175
  },
176
176
  MuiTablePagination: {
177
177
  defaultProps: {
178
178
  getItemAriaLabel: type => {
179
179
  if (type === 'first') {
180
- return 'إذهب الى الصفحة الأولى';
180
+ return 'انتقل إلى الصفحة الأولى';
181
181
  }
182
182
 
183
183
  if (type === 'last') {
184
- return 'إذهب الي الصفحة الأخيرة';
184
+ return 'انتقل إلى الصفحة الأخيرة';
185
185
  }
186
186
 
187
187
  if (type === 'next') {
188
- return 'إذهب الى الصفحة التالية';
188
+ return 'انتقل إلى الصفحة التالية';
189
189
  } // if (type === 'previous') {
190
190
 
191
191
 
192
- return 'إذهب الى الصفحة السابقة';
192
+ return 'انتقل إلى الصفحة السابقة';
193
193
  },
194
194
  labelRowsPerPage: 'عدد الصفوف في الصفحة:',
195
195
  labelDisplayedRows: ({
@@ -209,7 +209,7 @@ const arSD = {
209
209
  defaultProps: {
210
210
  clearText: 'مسح',
211
211
  closeText: 'إغلاق',
212
- loadingText: 'يتم التحميل…',
212
+ loadingText: 'جار التحميل...',
213
213
  noOptionsText: 'لا يوجد خيارات',
214
214
  openText: 'فتح'
215
215
  }
@@ -224,23 +224,23 @@ const arSD = {
224
224
  'aria-label': 'التنقل عبر الصفحات',
225
225
  getItemAriaLabel: (type, page, selected) => {
226
226
  if (type === 'page') {
227
- return `${selected ? '' : 'إذهب إلى '} صفحة ${page}`;
227
+ return `${selected ? '' : 'انتقل إلى '} صفحة ${page}`;
228
228
  }
229
229
 
230
230
  if (type === 'first') {
231
- return 'إذهب الى الصفحة الأولى';
231
+ return 'انتقل إلى الصفحة الأولى';
232
232
  }
233
233
 
234
234
  if (type === 'last') {
235
- return 'إذهب الي الصفحة الأخيرة';
235
+ return 'انتقل الي الصفحة الأخيرة';
236
236
  }
237
237
 
238
238
  if (type === 'next') {
239
- return 'إذهب الى الصفحة التالية';
239
+ return 'انتقل إلى الصفحة التالية';
240
240
  } // if (type === 'previous') {
241
241
 
242
242
 
243
- return 'إذهب الى الصفحة السابقة';
243
+ return 'انتقل إلى الصفحة السابقة';
244
244
  }
245
245
  }
246
246
  }
@@ -9,12 +9,14 @@ exports.default = createMixins;
9
9
 
10
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
11
 
12
- function createMixins(breakpoints, spacing, mixins) {
12
+ function createMixins(breakpoints, mixins) {
13
13
  return (0, _extends2.default)({
14
14
  toolbar: {
15
15
  minHeight: 56,
16
- [`${breakpoints.up('xs')} and (orientation: landscape)`]: {
17
- minHeight: 48
16
+ [breakpoints.up('xs')]: {
17
+ '@media (orientation: landscape)': {
18
+ minHeight: 48
19
+ }
18
20
  },
19
21
  [breakpoints.up('sm')]: {
20
22
  minHeight: 64
@@ -43,7 +43,7 @@ function createTheme(options = {}, ...args) {
43
43
  const palette = (0, _createPalette.default)(paletteInput);
44
44
  const systemTheme = (0, _system.createTheme)(options);
45
45
  let muiTheme = (0, _utils.deepmerge)(systemTheme, {
46
- mixins: (0, _createMixins.default)(systemTheme.breakpoints, systemTheme.spacing, mixinsInput),
46
+ mixins: (0, _createMixins.default)(systemTheme.breakpoints, mixinsInput),
47
47
  palette,
48
48
  // Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.
49
49
  shadows: _shadows.default.slice(),
@@ -17,11 +17,21 @@ var _system = require("@mui/system");
17
17
 
18
18
  var _createTheme = _interopRequireDefault(require("./createTheme"));
19
19
 
20
+ var _Paper = require("../Paper/Paper");
21
+
20
22
  const _excluded = ["colorSchemes"],
21
23
  _excluded2 = ["palette"];
24
+ const defaultDarkOverlays = [...Array(25)].map((_, index) => {
25
+ if (index === 0) {
26
+ return undefined;
27
+ }
28
+
29
+ const overlay = (0, _Paper.getOverlayAlpha)(index);
30
+ return `linear-gradient(rgba(255 255 255 / ${overlay}), rgba(255 255 255 / ${overlay}))`;
31
+ });
22
32
 
23
33
  function extendTheme(options = {}, ...args) {
24
- var _colorSchemesInput$li, _colorSchemesInput$da, _colorSchemesInput$li2, _colorSchemesInput$da2;
34
+ var _colorSchemesInput$li, _colorSchemesInput$da, _colorSchemesInput$li2, _colorSchemesInput$li3, _colorSchemesInput$da2, _colorSchemesInput$da3;
25
35
 
26
36
  const {
27
37
  colorSchemes: colorSchemesInput = {}
@@ -50,14 +60,16 @@ function extendTheme(options = {}, ...args) {
50
60
  opacity: (0, _extends2.default)({
51
61
  placeholder: 0.42,
52
62
  inputTouchBottomLine: 0.42
53
- }, (_colorSchemesInput$li2 = colorSchemesInput.light) == null ? void 0 : _colorSchemesInput$li2.opacity)
63
+ }, (_colorSchemesInput$li2 = colorSchemesInput.light) == null ? void 0 : _colorSchemesInput$li2.opacity),
64
+ overlays: ((_colorSchemesInput$li3 = colorSchemesInput.light) == null ? void 0 : _colorSchemesInput$li3.overlays) || []
54
65
  }),
55
66
  dark: (0, _extends2.default)({}, colorSchemesInput.dark, {
56
67
  palette: darkPalette,
57
68
  opacity: (0, _extends2.default)({
58
69
  placeholder: 0.5,
59
70
  inputTouchBottomLine: 0.7
60
- }, (_colorSchemesInput$da2 = colorSchemesInput.dark) == null ? void 0 : _colorSchemesInput$da2.opacity)
71
+ }, (_colorSchemesInput$da2 = colorSchemesInput.dark) == null ? void 0 : _colorSchemesInput$da2.opacity),
72
+ overlays: ((_colorSchemesInput$da3 = colorSchemesInput.dark) == null ? void 0 : _colorSchemesInput$da3.overlays) || defaultDarkOverlays
61
73
  })
62
74
  })
63
75
  });
@@ -107,6 +119,11 @@ function extendTheme(options = {}, ...args) {
107
119
 
108
120
  if (colors.secondary) {
109
121
  palette[color].secondaryChannel = (0, _system.colorChannel)(colors.secondary);
122
+ } // Action colors: action.activeChannel
123
+
124
+
125
+ if (colors.active) {
126
+ palette[color].activeChannel = (0, _system.colorChannel)(colors.active);
110
127
  }
111
128
  });
112
129
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/material",
3
- "version": "5.7.0",
3
+ "version": "5.8.2",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "React components that implement Google's Material Design.",
@@ -46,14 +46,13 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@babel/runtime": "^7.17.2",
49
- "@mui/base": "5.0.0-alpha.80",
50
- "@mui/private-classnames": "^5.7.0",
51
- "@mui/system": "^5.7.0",
49
+ "@mui/base": "5.0.0-alpha.83",
50
+ "@mui/system": "^5.8.2",
52
51
  "@mui/types": "^7.1.3",
53
- "@mui/utils": "^5.7.0",
52
+ "@mui/utils": "^5.8.0",
54
53
  "@types/react-transition-group": "^4.4.4",
55
54
  "clsx": "^1.1.1",
56
- "csstype": "^3.0.11",
55
+ "csstype": "^3.1.0",
57
56
  "hoist-non-react-statics": "^3.3.2",
58
57
  "prop-types": "^15.8.1",
59
58
  "react-is": "^17.0.2",
@@ -1,5 +1,5 @@
1
1
  import * as CSS from 'csstype';
2
- import { Breakpoints, Spacing } from '@mui/system';
2
+ import { Breakpoints } from '@mui/system';
3
3
 
4
4
  export type NormalCssProperties = CSS.Properties<number | string>;
5
5
  export type Fontface = CSS.AtRule.FontFace & { fallbacks?: CSS.AtRule.FontFace[] };
@@ -32,8 +32,4 @@ export interface MixinsOptions extends Partial<Mixins> {
32
32
  // ... use interface declaration merging to add custom mixin options
33
33
  }
34
34
 
35
- export default function createMixins(
36
- breakpoints: Breakpoints,
37
- spacing: Spacing,
38
- mixins: MixinsOptions,
39
- ): Mixins;
35
+ export default function createMixins(breakpoints: Breakpoints, mixins: MixinsOptions): Mixins;