@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
@@ -1,108 +1,24 @@
1
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
- import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["className", "component", "disableGutters", "fixed", "maxWidth"];
4
- import * as React from 'react';
1
+ /* eslint-disable material-ui/mui-name-matches-component-name */
5
2
  import PropTypes from 'prop-types';
6
- import clsx from 'clsx';
7
- import { unstable_composeClasses as composeClasses } from '@mui/base';
8
- import useThemeProps from '../styles/useThemeProps';
9
- import styled from '../styles/styled';
10
- import { getContainerUtilityClass } from './containerClasses';
3
+ import { createContainer } from '@mui/system';
11
4
  import capitalize from '../utils/capitalize';
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
-
14
- const useUtilityClasses = ownerState => {
15
- const {
16
- classes,
17
- fixed,
18
- disableGutters,
19
- maxWidth
20
- } = ownerState;
21
- const slots = {
22
- root: ['root', maxWidth && `maxWidth${capitalize(String(maxWidth))}`, fixed && 'fixed', disableGutters && 'disableGutters']
23
- };
24
- return composeClasses(slots, getContainerUtilityClass, classes);
25
- };
26
-
27
- const ContainerRoot = styled('div', {
28
- name: 'MuiContainer',
29
- slot: 'Root',
30
- overridesResolver: (props, styles) => {
31
- const {
32
- ownerState
33
- } = props;
34
- return [styles.root, styles[`maxWidth${capitalize(String(ownerState.maxWidth))}`], ownerState.fixed && styles.fixed, ownerState.disableGutters && styles.disableGutters];
35
- }
36
- })(({
37
- theme,
38
- ownerState
39
- }) => _extends({
40
- width: '100%',
41
- marginLeft: 'auto',
42
- boxSizing: 'border-box',
43
- marginRight: 'auto',
44
- display: 'block'
45
- }, !ownerState.disableGutters && {
46
- paddingLeft: theme.spacing(2),
47
- paddingRight: theme.spacing(2),
48
- [theme.breakpoints.up('sm')]: {
49
- paddingLeft: theme.spacing(3),
50
- paddingRight: theme.spacing(3)
51
- }
52
- }), ({
53
- theme,
54
- ownerState
55
- }) => ownerState.fixed && Object.keys(theme.breakpoints.values).reduce((acc, breakpoint) => {
56
- const value = theme.breakpoints.values[breakpoint];
57
-
58
- if (value !== 0) {
59
- acc[theme.breakpoints.up(breakpoint)] = {
60
- maxWidth: `${value}${theme.breakpoints.unit}`
61
- };
62
- }
63
-
64
- return acc;
65
- }, {}), ({
66
- theme,
67
- ownerState
68
- }) => _extends({}, ownerState.maxWidth === 'xs' && {
69
- [theme.breakpoints.up('xs')]: {
70
- maxWidth: Math.max(theme.breakpoints.values.xs, 444)
71
- }
72
- }, ownerState.maxWidth && ownerState.maxWidth !== 'xs' && {
73
- [theme.breakpoints.up(ownerState.maxWidth)]: {
74
- maxWidth: `${theme.breakpoints.values[ownerState.maxWidth]}${theme.breakpoints.unit}`
75
- }
76
- }));
77
- const Container = /*#__PURE__*/React.forwardRef(function Container(inProps, ref) {
78
- const props = useThemeProps({
5
+ import styled from '../styles/styled';
6
+ import useThemeProps from '../styles/useThemeProps';
7
+ const Container = createContainer({
8
+ createStyledComponent: styled('div', {
9
+ name: 'MuiContainer',
10
+ slot: 'Root',
11
+ overridesResolver: (props, styles) => {
12
+ const {
13
+ ownerState
14
+ } = props;
15
+ return [styles.root, styles[`maxWidth${capitalize(String(ownerState.maxWidth))}`], ownerState.fixed && styles.fixed, ownerState.disableGutters && styles.disableGutters];
16
+ }
17
+ }),
18
+ useThemeProps: inProps => useThemeProps({
79
19
  props: inProps,
80
20
  name: 'MuiContainer'
81
- });
82
-
83
- const {
84
- className,
85
- component = 'div',
86
- disableGutters = false,
87
- fixed = false,
88
- maxWidth = 'lg'
89
- } = props,
90
- other = _objectWithoutPropertiesLoose(props, _excluded);
91
-
92
- const ownerState = _extends({}, props, {
93
- component,
94
- disableGutters,
95
- fixed,
96
- maxWidth
97
- });
98
-
99
- const classes = useUtilityClasses(ownerState);
100
- return /*#__PURE__*/_jsx(ContainerRoot, _extends({
101
- as: component,
102
- ownerState: ownerState,
103
- className: clsx(classes.root, className),
104
- ref: ref
105
- }, other));
21
+ })
106
22
  });
107
23
  process.env.NODE_ENV !== "production" ? Container.propTypes
108
24
  /* remove-proptypes */
@@ -122,11 +38,6 @@ process.env.NODE_ENV !== "production" ? Container.propTypes
122
38
  */
123
39
  classes: PropTypes.object,
124
40
 
125
- /**
126
- * @ignore
127
- */
128
- className: PropTypes.string,
129
-
130
41
  /**
131
42
  * The component used for the root node.
132
43
  * Either a string to use a HTML element or a component.
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.
@@ -24,9 +24,10 @@ const styles = {
24
24
  transform: 'none'
25
25
  }
26
26
  };
27
- /**
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.
27
+ /*
28
+ TODO v6: remove
29
+ Conditionally apply a workaround for the CSS transition bug in Safari 15.4 / WebKit browsers.
30
+ Remove this workaround once the WebKit bug fix is released.
30
31
  */
31
32
 
32
33
  const isWebKit154 = typeof navigator !== 'undefined' && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)[4-9]/i.test(navigator.userAgent);
@@ -209,6 +209,12 @@ process.env.NODE_ENV !== "production" ? InputLabel.propTypes
209
209
  */
210
210
  shrink: PropTypes.bool,
211
211
 
212
+ /**
213
+ * The size of the component.
214
+ * @default 'normal'
215
+ */
216
+ size: PropTypes.oneOf(['normal', 'small']),
217
+
212
218
  /**
213
219
  * The system prop that allows defining system overrides as well as additional CSS styles.
214
220
  */
@@ -150,7 +150,8 @@ const ListItemButton = /*#__PURE__*/React.forwardRef(function ListItemButton(inP
150
150
  value: childContext,
151
151
  children: /*#__PURE__*/_jsx(ListItemButtonRoot, _extends({
152
152
  ref: handleRef,
153
- component: component,
153
+ href: other.href || other.to,
154
+ component: (other.href || other.to) && component === 'div' ? 'a' : component,
154
155
  focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),
155
156
  ownerState: ownerState
156
157
  }, other, {
@@ -232,6 +233,11 @@ process.env.NODE_ENV !== "production" ? ListItemButton.propTypes
232
233
  */
233
234
  focusVisibleClassName: PropTypes.string,
234
235
 
236
+ /**
237
+ * @ignore
238
+ */
239
+ href: PropTypes.string,
240
+
235
241
  /**
236
242
  * Use to apply selected styling.
237
243
  * @default false
@@ -89,7 +89,7 @@ function moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable,
89
89
  return false;
90
90
  }
91
91
  /**
92
- * A permanently displayed menu following https://www.w3.org/TR/wai-aria-practices/#menubutton.
92
+ * A permanently displayed menu following https://www.w3.org/WAI/ARIA/apg/patterns/menubutton/.
93
93
  * It's exposed to help customization of the [`Menu`](/material-ui/api/menu/) component if you
94
94
  * use it separately you need to move focus into the component manually. Once
95
95
  * the focus is placed inside the component it is fully keyboard accessible.
@@ -13,8 +13,7 @@ import useTheme from '../styles/useTheme';
13
13
  import { getPaperUtilityClass } from './paperClasses'; // Inspired by https://github.com/material-components/material-components-ios/blob/bca36107405594d5b7b16265a5b0ed698f85a5ee/components/Elevation/src/UIColor%2BMaterialElevation.m#L61
14
14
 
15
15
  import { jsx as _jsx } from "react/jsx-runtime";
16
-
17
- const getOverlayAlpha = elevation => {
16
+ export const getOverlayAlpha = elevation => {
18
17
  let alphaValue;
19
18
 
20
19
  if (elevation < 1) {
@@ -52,17 +51,19 @@ const PaperRoot = styled('div', {
52
51
  theme,
53
52
  ownerState
54
53
  }) => _extends({
55
- backgroundColor: theme.palette.background.paper,
56
- color: theme.palette.text.primary,
54
+ backgroundColor: (theme.vars || theme).palette.background.paper,
55
+ color: (theme.vars || theme).palette.text.primary,
57
56
  transition: theme.transitions.create('box-shadow')
58
57
  }, !ownerState.square && {
59
58
  borderRadius: theme.shape.borderRadius
60
59
  }, ownerState.variant === 'outlined' && {
61
- border: `1px solid ${theme.palette.divider}`
60
+ border: `1px solid ${(theme.vars || theme).palette.divider}`
62
61
  }, ownerState.variant === 'elevation' && _extends({
63
- boxShadow: theme.shadows[ownerState.elevation]
64
- }, theme.palette.mode === 'dark' && {
62
+ boxShadow: (theme.vars || theme).shadows[ownerState.elevation]
63
+ }, !theme.vars && theme.palette.mode === 'dark' && {
65
64
  backgroundImage: `linear-gradient(${alpha('#fff', getOverlayAlpha(ownerState.elevation))}, ${alpha('#fff', getOverlayAlpha(ownerState.elevation))})`
65
+ }, theme.vars && {
66
+ backgroundImage: theme.vars.overlays?.[ownerState.elevation]
66
67
  })));
67
68
  const Paper = /*#__PURE__*/React.forwardRef(function Paper(inProps, ref) {
68
69
  const props = useThemeProps({
@@ -41,9 +41,9 @@ const RadioRoot = styled(SwitchBase, {
41
41
  theme,
42
42
  ownerState
43
43
  }) => _extends({
44
- color: theme.palette.text.secondary,
44
+ color: (theme.vars || theme).palette.text.secondary,
45
45
  '&:hover': {
46
- backgroundColor: alpha(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
46
+ backgroundColor: theme.vars ? `rgba(${ownerState.color === 'default' ? theme.vars.palette.action.activeChannel : theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
47
47
  // Reset on touch devices, it doesn't add specificity
48
48
  '@media (hover: none)': {
49
49
  backgroundColor: 'transparent'
@@ -51,11 +51,11 @@ const RadioRoot = styled(SwitchBase, {
51
51
  }
52
52
  }, ownerState.color !== 'default' && {
53
53
  [`&.${radioClasses.checked}`]: {
54
- color: theme.palette[ownerState.color].main
54
+ color: (theme.vars || theme).palette[ownerState.color].main
55
55
  }
56
56
  }, {
57
57
  [`&.${radioClasses.disabled}`]: {
58
- color: theme.palette.action.disabled
58
+ color: (theme.vars || theme).palette.action.disabled
59
59
  }
60
60
  }));
61
61
 
@@ -311,8 +311,8 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
311
311
 
312
312
  const handleKeyDown = event => {
313
313
  if (!readOnly) {
314
- const validKeys = [' ', 'ArrowUp', 'ArrowDown', // The native select doesn't respond to enter on MacOS, but it's recommended by
315
- // https://www.w3.org/TR/wai-aria-practices/examples/listbox/listbox-collapsible.html
314
+ const validKeys = [' ', 'ArrowUp', 'ArrowDown', // The native select doesn't respond to enter on macOS, but it's recommended by
315
+ // https://www.w3.org/WAI/ARIA/apg/example-index/combobox/combobox-select-only.html
316
316
  'Enter'];
317
317
 
318
318
  if (validKeys.indexOf(event.key) !== -1) {
@@ -22,11 +22,7 @@ const SliderRoot = styled('span', {
22
22
  const {
23
23
  ownerState
24
24
  } = props;
25
- const marks = ownerState.marksProp === true && ownerState.step !== null ? [...Array(Math.floor((ownerState.max - ownerState.min) / ownerState.step) + 1)].map((_, index) => ({
26
- value: ownerState.min + ownerState.step * index
27
- })) : ownerState.marksProp || [];
28
- const marked = marks.length > 0 && marks.some(mark => mark.label);
29
- return [styles.root, styles[`color${capitalize(ownerState.color)}`], ownerState.size !== 'medium' && styles[`size${capitalize(ownerState.size)}`], marked && styles.marked, ownerState.orientation === 'vertical' && styles.vertical, ownerState.track === 'inverted' && styles.trackInverted, ownerState.track === false && styles.trackFalse];
25
+ return [styles.root, styles[`color${capitalize(ownerState.color)}`], ownerState.size !== 'medium' && styles[`size${capitalize(ownerState.size)}`], ownerState.marked && styles.marked, ownerState.orientation === 'vertical' && styles.vertical, ownerState.track === 'inverted' && styles.trackInverted, ownerState.track === false && styles.trackFalse];
30
26
  }
31
27
  })(({
32
28
  theme,
@@ -147,7 +147,7 @@ const TabsScroller = styled('div', {
147
147
  overflowX: 'hidden',
148
148
  width: '100%'
149
149
  }, ownerState.hideScrollbar && {
150
- // Hide dimensionless scrollbar on MacOS
150
+ // Hide dimensionless scrollbar on macOS
151
151
  scrollbarWidth: 'none',
152
152
  // Firefox
153
153
  '&::-webkit-scrollbar': {
@@ -207,7 +207,7 @@ const TabsScrollbarSize = styled(ScrollbarSize, {
207
207
  })({
208
208
  overflowX: 'auto',
209
209
  overflowY: 'hidden',
210
- // Hide dimensionless scrollbar on MacOS
210
+ // Hide dimensionless scrollbar on macOS
211
211
  scrollbarWidth: 'none',
212
212
  // Firefox
213
213
  '&::-webkit-scrollbar': {
@@ -1,2 +1,2 @@
1
1
  // eslint-disable-next-line import/prefer-default-export
2
- export { unstable_ClassNameGenerator } from '@mui/private-classnames';
2
+ export { unstable_ClassNameGenerator } from '@mui/utils';
package/modern/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.
@@ -82,26 +82,26 @@ export const arEG = {
82
82
  components: {
83
83
  MuiBreadcrumbs: {
84
84
  defaultProps: {
85
- expandText: 'ظهر العنوان'
85
+ expandText: 'إظهار المسار'
86
86
  }
87
87
  },
88
88
  MuiTablePagination: {
89
89
  defaultProps: {
90
90
  getItemAriaLabel: type => {
91
91
  if (type === 'first') {
92
- return 'امش للصفحة الأولى';
92
+ return 'انتقل إلى الصفحة الأولى';
93
93
  }
94
94
 
95
95
  if (type === 'last') {
96
- return 'امش للصفحة الأخيرة';
96
+ return 'انتقل إلى الصفحة الأخيرة';
97
97
  }
98
98
 
99
99
  if (type === 'next') {
100
- return 'امش للصفحة التالية';
100
+ return 'انتقل إلى الصفحة التالية';
101
101
  } // if (type === 'previous') {
102
102
 
103
103
 
104
- return 'امش للصفحة السابقة';
104
+ return 'انتقل إلى الصفحة السابقة';
105
105
  },
106
106
  labelRowsPerPage: 'عدد الصفوف في الصفحة:',
107
107
  labelDisplayedRows: ({
@@ -121,7 +121,7 @@ export const arEG = {
121
121
  defaultProps: {
122
122
  clearText: 'مسح',
123
123
  closeText: 'إغلاق',
124
- loadingText: 'يتم التحميل…',
124
+ loadingText: 'جار التحميل...',
125
125
  noOptionsText: 'لا يوجد خيارات',
126
126
  openText: 'فتح'
127
127
  }
@@ -136,23 +136,23 @@ export const arEG = {
136
136
  'aria-label': 'التنقل عبر الصفحات',
137
137
  getItemAriaLabel: (type, page, selected) => {
138
138
  if (type === 'page') {
139
- return `${selected ? '' : 'امش إلى '} صفحة ${page}`;
139
+ return `${selected ? '' : 'انتقل إلى '} صفحة ${page}`;
140
140
  }
141
141
 
142
142
  if (type === 'first') {
143
- return 'امش للصفحة الأولى';
143
+ return 'انتقل إلى الصفحة الأولى';
144
144
  }
145
145
 
146
146
  if (type === 'last') {
147
- return 'امش للصفحة الأخيرة';
147
+ return 'انتقل إلى الصفحة الأخيرة';
148
148
  }
149
149
 
150
150
  if (type === 'next') {
151
- return 'امش للصفحة التالية';
151
+ return 'انتقل إلى الصفحة التالية';
152
152
  } // if (type === 'previous') {
153
153
 
154
154
 
155
- return 'امش للصفحة السابقة';
155
+ return 'انتقل إلى الصفحة السابقة';
156
156
  }
157
157
  }
158
158
  }
@@ -162,26 +162,26 @@ export const arSD = {
162
162
  components: {
163
163
  MuiBreadcrumbs: {
164
164
  defaultProps: {
165
- expandText: 'إظهر العنوان'
165
+ expandText: 'إظهار المسار'
166
166
  }
167
167
  },
168
168
  MuiTablePagination: {
169
169
  defaultProps: {
170
170
  getItemAriaLabel: type => {
171
171
  if (type === 'first') {
172
- return 'إذهب الى الصفحة الأولى';
172
+ return 'انتقل إلى الصفحة الأولى';
173
173
  }
174
174
 
175
175
  if (type === 'last') {
176
- return 'إذهب الي الصفحة الأخيرة';
176
+ return 'انتقل إلى الصفحة الأخيرة';
177
177
  }
178
178
 
179
179
  if (type === 'next') {
180
- return 'إذهب الى الصفحة التالية';
180
+ return 'انتقل إلى الصفحة التالية';
181
181
  } // if (type === 'previous') {
182
182
 
183
183
 
184
- return 'إذهب الى الصفحة السابقة';
184
+ return 'انتقل إلى الصفحة السابقة';
185
185
  },
186
186
  labelRowsPerPage: 'عدد الصفوف في الصفحة:',
187
187
  labelDisplayedRows: ({
@@ -201,7 +201,7 @@ export const arSD = {
201
201
  defaultProps: {
202
202
  clearText: 'مسح',
203
203
  closeText: 'إغلاق',
204
- loadingText: 'يتم التحميل…',
204
+ loadingText: 'جار التحميل...',
205
205
  noOptionsText: 'لا يوجد خيارات',
206
206
  openText: 'فتح'
207
207
  }
@@ -216,23 +216,23 @@ export const arSD = {
216
216
  'aria-label': 'التنقل عبر الصفحات',
217
217
  getItemAriaLabel: (type, page, selected) => {
218
218
  if (type === 'page') {
219
- return `${selected ? '' : 'إذهب إلى '} صفحة ${page}`;
219
+ return `${selected ? '' : 'انتقل إلى '} صفحة ${page}`;
220
220
  }
221
221
 
222
222
  if (type === 'first') {
223
- return 'إذهب الى الصفحة الأولى';
223
+ return 'انتقل إلى الصفحة الأولى';
224
224
  }
225
225
 
226
226
  if (type === 'last') {
227
- return 'إذهب الي الصفحة الأخيرة';
227
+ return 'انتقل الي الصفحة الأخيرة';
228
228
  }
229
229
 
230
230
  if (type === 'next') {
231
- return 'إذهب الى الصفحة التالية';
231
+ return 'انتقل إلى الصفحة التالية';
232
232
  } // if (type === 'previous') {
233
233
 
234
234
 
235
- return 'إذهب الى الصفحة السابقة';
235
+ return 'انتقل إلى الصفحة السابقة';
236
236
  }
237
237
  }
238
238
  }
@@ -1,10 +1,12 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- export default function createMixins(breakpoints, spacing, mixins) {
2
+ export default function createMixins(breakpoints, mixins) {
3
3
  return _extends({
4
4
  toolbar: {
5
5
  minHeight: 56,
6
- [`${breakpoints.up('xs')} and (orientation: landscape)`]: {
7
- minHeight: 48
6
+ [breakpoints.up('xs')]: {
7
+ '@media (orientation: landscape)': {
8
+ minHeight: 48
9
+ }
8
10
  },
9
11
  [breakpoints.up('sm')]: {
10
12
  minHeight: 64
@@ -23,7 +23,7 @@ function createTheme(options = {}, ...args) {
23
23
  const palette = createPalette(paletteInput);
24
24
  const systemTheme = systemCreateTheme(options);
25
25
  let muiTheme = deepmerge(systemTheme, {
26
- mixins: createMixins(systemTheme.breakpoints, systemTheme.spacing, mixinsInput),
26
+ mixins: createMixins(systemTheme.breakpoints, mixinsInput),
27
27
  palette,
28
28
  // Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.
29
29
  shadows: shadows.slice(),
@@ -5,6 +5,15 @@ const _excluded = ["colorSchemes"],
5
5
  import { deepmerge } from '@mui/utils';
6
6
  import { colorChannel } from '@mui/system';
7
7
  import createThemeWithoutVars from './createTheme';
8
+ import { getOverlayAlpha } from '../Paper/Paper';
9
+ const defaultDarkOverlays = [...Array(25)].map((_, index) => {
10
+ if (index === 0) {
11
+ return undefined;
12
+ }
13
+
14
+ const overlay = getOverlayAlpha(index);
15
+ return `linear-gradient(rgba(255 255 255 / ${overlay}), rgba(255 255 255 / ${overlay}))`;
16
+ });
8
17
  export default function extendTheme(options = {}, ...args) {
9
18
  const {
10
19
  colorSchemes: colorSchemesInput = {}
@@ -34,14 +43,16 @@ export default function extendTheme(options = {}, ...args) {
34
43
  opacity: _extends({
35
44
  placeholder: 0.42,
36
45
  inputTouchBottomLine: 0.42
37
- }, colorSchemesInput.light?.opacity)
46
+ }, colorSchemesInput.light?.opacity),
47
+ overlays: colorSchemesInput.light?.overlays || []
38
48
  }),
39
49
  dark: _extends({}, colorSchemesInput.dark, {
40
50
  palette: darkPalette,
41
51
  opacity: _extends({
42
52
  placeholder: 0.5,
43
53
  inputTouchBottomLine: 0.7
44
- }, colorSchemesInput.dark?.opacity)
54
+ }, colorSchemesInput.dark?.opacity),
55
+ overlays: colorSchemesInput.dark?.overlays || defaultDarkOverlays
45
56
  })
46
57
  })
47
58
  });
@@ -92,6 +103,11 @@ export default function extendTheme(options = {}, ...args) {
92
103
 
93
104
  if (colors.secondary) {
94
105
  palette[color].secondaryChannel = colorChannel(colors.secondary);
106
+ } // Action colors: action.activeChannel
107
+
108
+
109
+ if (colors.active) {
110
+ palette[color].activeChannel = colorChannel(colors.active);
95
111
  }
96
112
  });
97
113
  });
@@ -191,6 +191,7 @@ const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
191
191
  className: classes.message,
192
192
  children: children
193
193
  }), action != null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(AlertAction, {
194
+ ownerState: ownerState,
194
195
  className: classes.action,
195
196
  children: action
196
197
  }) : null, action == null && onClose ? /*#__PURE__*/(0, _jsxRuntime.jsx)(AlertAction, {
@@ -478,7 +478,8 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
478
478
  componentName: 'Autocomplete'
479
479
  }));
480
480
  const hasClearIcon = !disableClearable && !disabled && dirty && !readOnly;
481
- const hasPopupIcon = (!freeSolo || forcePopupIcon === true) && forcePopupIcon !== false;
481
+ const hasPopupIcon = (!freeSolo || forcePopupIcon === true) && forcePopupIcon !== false; // If you modify this, make sure to keep the `AutocompleteOwnerState` type in sync.
482
+
482
483
  const ownerState = (0, _extends2.default)({}, props, {
483
484
  disablePortal,
484
485
  focused,
@@ -499,7 +500,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
499
500
  }, getTagProps(params));
500
501
 
501
502
  if (renderTags) {
502
- startAdornment = renderTags(value, getCustomizedTagProps);
503
+ startAdornment = renderTags(value, getCustomizedTagProps, ownerState);
503
504
  } else {
504
505
  startAdornment = value.map((option, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, (0, _extends2.default)({
505
506
  label: getOptionLabel(option),
@@ -1076,6 +1077,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
1076
1077
  *
1077
1078
  * @param {T[]} value The `value` provided to the component.
1078
1079
  * @param {function} getTagProps A tag props getter.
1080
+ * @param {object} ownerState The state of the Autocomplete component.
1079
1081
  * @returns {ReactNode}
1080
1082
  */
1081
1083
  renderTags: _propTypes.default.func,
File without changes
package/node/Box/Box.js CHANGED
@@ -7,10 +7,10 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = void 0;
9
9
 
10
- var _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
10
  var _system = require("@mui/system");
13
11
 
12
+ var _propTypes = _interopRequireDefault(require("prop-types"));
13
+
14
14
  var _className = require("../className");
15
15
 
16
16
  var _styles = require("../styles");
@@ -219,12 +219,12 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
219
219
 
220
220
  } = options;
221
221
 
222
- if (event.type === 'mousedown' && ignoringMouseDown.current) {
222
+ if ((event == null ? void 0 : event.type) === 'mousedown' && ignoringMouseDown.current) {
223
223
  ignoringMouseDown.current = false;
224
224
  return;
225
225
  }
226
226
 
227
- if (event.type === 'touchstart') {
227
+ if ((event == null ? void 0 : event.type) === 'touchstart') {
228
228
  ignoringMouseDown.current = true;
229
229
  }
230
230
 
@@ -240,7 +240,7 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
240
240
  let rippleY;
241
241
  let rippleSize;
242
242
 
243
- if (center || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {
243
+ if (center || event === undefined || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {
244
244
  rippleX = Math.round(rect.width / 2);
245
245
  rippleY = Math.round(rect.height / 2);
246
246
  } else {
@@ -265,7 +265,7 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
265
265
  } // Touche devices
266
266
 
267
267
 
268
- if (event.touches) {
268
+ if (event != null && event.touches) {
269
269
  // check that this isn't another touchstart due to multitouch
270
270
  // otherwise we will only clear a single timer when unmounting while two
271
271
  // are running
@@ -308,7 +308,7 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
308
308
  clearTimeout(startTimer.current); // The touch interaction occurs too quickly.
309
309
  // We still want to show ripple effect.
310
310
 
311
- if (event.type === 'touchend' && startTimerCommit.current) {
311
+ if ((event == null ? void 0 : event.type) === 'touchend' && startTimerCommit.current) {
312
312
  startTimerCommit.current();
313
313
  startTimerCommit.current = null;
314
314
  startTimer.current = setTimeout(() => {