@mui/material 5.11.10 → 5.11.11

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 (240) 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/alertClasses.d.ts +44 -44
  6. package/AlertTitle/alertTitleClasses.d.ts +8 -8
  7. package/AppBar/appBarClasses.d.ts +28 -28
  8. package/Autocomplete/Autocomplete.d.ts +3 -1
  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/Badge.js +1 -1
  14. package/Badge/badgeClasses.d.ts +56 -56
  15. package/BottomNavigation/BottomNavigation.js +0 -0
  16. package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
  17. package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
  18. package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
  19. package/Button/buttonClasses.d.ts +100 -100
  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 +89 -0
  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/checkboxClasses.d.ts +18 -18
  32. package/Chip/chipClasses.d.ts +96 -96
  33. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  34. package/ClickAwayListener/index.d.ts +2 -2
  35. package/Collapse/collapseClasses.d.ts +18 -18
  36. package/Container/Container.js +0 -1
  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/fabClasses.d.ts +26 -26
  47. package/FilledInput/filledInputClasses.d.ts +40 -40
  48. package/FormControl/FormControlContext.d.ts +17 -17
  49. package/FormControl/formControlClasses.d.ts +14 -14
  50. package/FormControl/useFormControl.d.ts +2 -2
  51. package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
  52. package/FormGroup/formGroupClasses.d.ts +12 -12
  53. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  54. package/FormLabel/formLabelClasses.d.ts +22 -22
  55. package/Grid/gridClasses.d.ts +48 -48
  56. package/Icon/iconClasses.d.ts +24 -24
  57. package/IconButton/iconButtonClasses.d.ts +34 -34
  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/InputBase.js +2 -2
  64. package/InputBase/inputBaseClasses.d.ts +46 -46
  65. package/InputLabel/InputLabel.js +3 -1
  66. package/InputLabel/inputLabelClasses.d.ts +32 -32
  67. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  68. package/Link/getTextDecoration.d.ts +15 -15
  69. package/Link/linkClasses.d.ts +18 -18
  70. package/List/listClasses.d.ts +14 -14
  71. package/ListItem/listItemClasses.d.ts +30 -30
  72. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  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/ListSubheader.js +1 -0
  78. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  79. package/Menu/menuClasses.d.ts +12 -12
  80. package/MenuItem/menuItemClasses.d.ts +20 -20
  81. package/MenuList/MenuList.js +7 -0
  82. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  83. package/Modal/Modal.d.ts +9 -1
  84. package/Modal/Modal.js +14 -9
  85. package/NativeSelect/nativeSelectClasses.d.ts +32 -32
  86. package/OutlinedInput/OutlinedInput.js +1 -1
  87. package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
  88. package/Pagination/paginationClasses.d.ts +14 -14
  89. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  90. package/Paper/paperClasses.d.ts +39 -39
  91. package/Popover/popoverClasses.d.ts +10 -10
  92. package/Popper/Popper.d.ts +55 -55
  93. package/README.md +0 -2
  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/Rating.js +2 -2
  98. package/Rating/ratingClasses.d.ts +40 -40
  99. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  100. package/Select/SelectInput.js +2 -22
  101. package/Select/selectClasses.d.ts +30 -30
  102. package/Skeleton/skeletonClasses.d.ts +26 -26
  103. package/Slider/Slider.d.ts +5 -1
  104. package/Slider/Slider.js +16 -11
  105. package/Slider/SliderValueLabel.d.ts +15 -15
  106. package/Slider/SliderValueLabel.types.d.ts +24 -24
  107. package/Slider/sliderClasses.d.ts +58 -58
  108. package/Snackbar/Snackbar.js +21 -125
  109. package/Snackbar/snackbarClasses.d.ts +20 -20
  110. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  111. package/SpeedDial/speedDialClasses.d.ts +22 -22
  112. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  113. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  114. package/Stack/Stack.d.ts +0 -1
  115. package/Stack/Stack.js +9 -120
  116. package/Stack/index.d.ts +3 -0
  117. package/Stack/index.js +2 -1
  118. package/Stack/stackClasses.d.ts +6 -0
  119. package/Stack/stackClasses.js +7 -0
  120. package/Step/StepContext.d.ts +20 -20
  121. package/Step/stepClasses.d.ts +16 -16
  122. package/StepButton/stepButtonClasses.d.ts +14 -14
  123. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  124. package/StepContent/stepContentClasses.d.ts +12 -12
  125. package/StepIcon/stepIconClasses.d.ts +16 -16
  126. package/StepLabel/stepLabelClasses.d.ts +28 -28
  127. package/Stepper/StepperContext.d.ts +18 -18
  128. package/Stepper/stepperClasses.d.ts +14 -14
  129. package/SvgIcon/svgIconClasses.d.ts +26 -26
  130. package/Switch/switchClasses.d.ts +32 -32
  131. package/Tab/tabClasses.d.ts +26 -26
  132. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  133. package/Table/tableClasses.d.ts +10 -10
  134. package/TableBody/tableBodyClasses.d.ts +8 -8
  135. package/TableCell/tableCellClasses.d.ts +32 -32
  136. package/TableContainer/tableContainerClasses.d.ts +8 -8
  137. package/TableFooter/tableFooterClasses.d.ts +8 -8
  138. package/TableHead/tableHeadClasses.d.ts +8 -8
  139. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  140. package/TableRow/tableRowClasses.d.ts +16 -16
  141. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  142. package/Tabs/tabsClasses.d.ts +32 -32
  143. package/TextField/textFieldClasses.d.ts +8 -8
  144. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  145. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  146. package/Toolbar/toolbarClasses.d.ts +14 -14
  147. package/Tooltip/tooltipClasses.d.ts +30 -30
  148. package/Typography/typographyClasses.d.ts +50 -50
  149. package/Unstable_Grid2/Grid2.d.ts +4 -4
  150. package/Unstable_Grid2/Grid2.js +2 -3
  151. package/Unstable_Grid2/Grid2Props.d.ts +15 -15
  152. package/Unstable_Grid2/grid2Classes.d.ts +5 -5
  153. package/Unstable_Grid2/index.d.ts +4 -4
  154. package/className/index.d.ts +1 -1
  155. package/darkScrollbar/index.d.ts +28 -28
  156. package/generateUtilityClass/index.d.ts +2 -2
  157. package/generateUtilityClasses/index.d.ts +1 -1
  158. package/index.js +1 -1
  159. package/internal/switchBaseClasses.d.ts +12 -12
  160. package/legacy/Badge/Badge.js +1 -1
  161. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  162. package/legacy/Container/Container.js +0 -1
  163. package/legacy/InputBase/InputBase.js +2 -2
  164. package/legacy/InputLabel/InputLabel.js +3 -1
  165. package/legacy/ListSubheader/ListSubheader.js +1 -0
  166. package/legacy/MenuList/MenuList.js +7 -0
  167. package/legacy/Modal/Modal.js +14 -9
  168. package/legacy/OutlinedInput/OutlinedInput.js +1 -1
  169. package/legacy/Rating/Rating.js +2 -2
  170. package/legacy/Select/SelectInput.js +2 -22
  171. package/legacy/Slider/Slider.js +16 -12
  172. package/legacy/Snackbar/Snackbar.js +20 -119
  173. package/legacy/Stack/Stack.js +13 -122
  174. package/legacy/Stack/index.js +2 -1
  175. package/legacy/Stack/stackClasses.js +7 -0
  176. package/legacy/Unstable_Grid2/Grid2.js +2 -3
  177. package/legacy/index.js +1 -1
  178. package/legacy/styles/createTheme.js +1 -0
  179. package/legacy/useAutocomplete/useAutocomplete.js +2 -2
  180. package/locale/index.d.ts +75 -75
  181. package/modern/Badge/Badge.js +1 -1
  182. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  183. package/modern/Container/Container.js +0 -1
  184. package/modern/InputBase/InputBase.js +2 -2
  185. package/modern/InputLabel/InputLabel.js +3 -1
  186. package/modern/ListSubheader/ListSubheader.js +1 -0
  187. package/modern/MenuList/MenuList.js +7 -0
  188. package/modern/Modal/Modal.js +14 -9
  189. package/modern/OutlinedInput/OutlinedInput.js +1 -1
  190. package/modern/Rating/Rating.js +2 -2
  191. package/modern/Select/SelectInput.js +2 -18
  192. package/modern/Slider/Slider.js +16 -11
  193. package/modern/Snackbar/Snackbar.js +21 -125
  194. package/modern/Stack/Stack.js +9 -120
  195. package/modern/Stack/index.js +2 -1
  196. package/modern/Stack/stackClasses.js +7 -0
  197. package/modern/Unstable_Grid2/Grid2.js +2 -3
  198. package/modern/index.js +1 -1
  199. package/modern/styles/createTheme.js +1 -0
  200. package/modern/useAutocomplete/useAutocomplete.js +2 -2
  201. package/node/Badge/Badge.js +2 -2
  202. package/node/BottomNavigation/BottomNavigation.js +0 -0
  203. package/node/Container/Container.js +0 -2
  204. package/node/InputBase/InputBase.js +2 -2
  205. package/node/InputLabel/InputLabel.js +3 -1
  206. package/node/ListSubheader/ListSubheader.js +1 -0
  207. package/node/MenuList/MenuList.js +7 -0
  208. package/node/Modal/Modal.js +14 -9
  209. package/node/OutlinedInput/OutlinedInput.js +1 -1
  210. package/node/Rating/Rating.js +2 -2
  211. package/node/Select/SelectInput.js +2 -22
  212. package/node/Slider/Slider.js +19 -14
  213. package/node/Snackbar/Snackbar.js +20 -124
  214. package/node/Stack/Stack.js +9 -122
  215. package/node/Stack/index.js +8 -1
  216. package/node/Stack/stackClasses.js +16 -0
  217. package/node/Unstable_Grid2/Grid2.js +0 -1
  218. package/node/index.js +1 -1
  219. package/node/styles/createTheme.js +1 -0
  220. package/node/useAutocomplete/useAutocomplete.js +8 -6
  221. package/package.json +6 -6
  222. package/styles/CssVarsProvider.d.ts +16 -16
  223. package/styles/createTheme.js +1 -0
  224. package/styles/excludeVariablesFromRoot.d.ts +5 -5
  225. package/styles/getOverlayAlpha.d.ts +2 -2
  226. package/transitions/index.d.ts +1 -1
  227. package/transitions/transition.d.ts +13 -13
  228. package/transitions/utils.d.ts +23 -23
  229. package/types/OverridableComponentAugmentation.d.ts +31 -31
  230. package/umd/material-ui.development.js +4132 -4060
  231. package/umd/material-ui.production.min.js +21 -21
  232. package/useAutocomplete/useAutocomplete.d.ts +2 -2
  233. package/useAutocomplete/useAutocomplete.js +2 -2
  234. package/useMediaQuery/useMediaQuery.d.ts +46 -46
  235. package/useTouchRipple/index.d.ts +1 -1
  236. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  237. package/utils/getScrollbarSize.d.ts +2 -2
  238. package/utils/ownerDocument.d.ts +2 -2
  239. package/utils/ownerWindow.d.ts +2 -2
  240. package/utils/setRef.d.ts +2 -2
@@ -1 +1 @@
1
- export { unstable_generateUtilityClasses as default } from '@mui/utils';
1
+ export { unstable_generateUtilityClasses as default } from '@mui/utils';
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.11.10
2
+ * @mui/material v5.11.11
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -1,12 +1,12 @@
1
- export interface SwitchBaseClasses {
2
- root: string;
3
- checked: string;
4
- disabled: string;
5
- input: string;
6
- edgeStart: string;
7
- edgeEnd: string;
8
- }
9
- export type SwitchBaseClassKey = keyof SwitchBaseClasses;
10
- export declare function getSwitchBaseUtilityClass(slot: string): string;
11
- declare const switchBaseClasses: SwitchBaseClasses;
12
- export default switchBaseClasses;
1
+ export interface SwitchBaseClasses {
2
+ root: string;
3
+ checked: string;
4
+ disabled: string;
5
+ input: string;
6
+ edgeStart: string;
7
+ edgeEnd: string;
8
+ }
9
+ export type SwitchBaseClassKey = keyof SwitchBaseClasses;
10
+ export declare function getSwitchBaseUtilityClass(slot: string): string;
11
+ declare const switchBaseClasses: SwitchBaseClasses;
12
+ export default switchBaseClasses;
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
7
7
  import { usePreviousProps } from '@mui/utils';
8
8
  import composeClasses from '@mui/base/composeClasses';
9
- import { useBadge } from '@mui/base/BadgeUnstyled';
9
+ import useBadge from '@mui/base/useBadge';
10
10
  import { useSlotProps } from '@mui/base';
11
11
  import styled from '../styles/styled';
12
12
  import useThemeProps from '../styles/useThemeProps';
File without changes
@@ -1,4 +1,3 @@
1
- /* eslint-disable material-ui/mui-name-matches-component-name */
2
1
  import PropTypes from 'prop-types';
3
2
  import { createContainer } from '@mui/system';
4
3
  import capitalize from '../utils/capitalize';
@@ -439,7 +439,7 @@ var InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref) {
439
439
  ref: ref,
440
440
  onClick: handleClick
441
441
  }, other, {
442
- className: clsx(classes.root, rootProps.className, className),
442
+ className: clsx(classes.root, rootProps.className, className, readOnly && 'MuiInputBase-readOnly'),
443
443
  children: [startAdornment, /*#__PURE__*/_jsx(FormControlContext.Provider, {
444
444
  value: null,
445
445
  children: /*#__PURE__*/_jsx(Input, _extends({
@@ -466,7 +466,7 @@ var InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref) {
466
466
  ownerState: _extends({}, ownerState, inputProps.ownerState)
467
467
  }, {
468
468
  ref: handleInputRef,
469
- className: clsx(classes.input, inputProps.className),
469
+ className: clsx(classes.input, inputProps.className, readOnly && 'MuiInputBase-readOnly'),
470
470
  onBlur: handleBlur,
471
471
  onChange: handleChange,
472
472
  onFocus: handleFocus
@@ -94,7 +94,9 @@ var InputLabelRoot = styled(FormLabel, {
94
94
  }, ownerState.shrink && {
95
95
  userSelect: 'none',
96
96
  pointerEvents: 'auto',
97
- maxWidth: 'calc(133% - 24px)',
97
+ // Theoretically, we should have (8+5)*2/0.75 = 34px
98
+ // but it feels a better when it bleeds a bit on the left, so 32px.
99
+ maxWidth: 'calc(133% - 32px)',
98
100
  transform: 'translate(14px, -9px) scale(0.75)'
99
101
  }));
100
102
  });
@@ -86,6 +86,7 @@ var ListSubheader = /*#__PURE__*/React.forwardRef(function ListSubheader(inProps
86
86
  ownerState: ownerState
87
87
  }, other));
88
88
  });
89
+ ListSubheader.muiSkipListHighlight = true;
89
90
  process.env.NODE_ENV !== "production" ? ListSubheader.propTypes /* remove-proptypes */ = {
90
91
  // ----------------------------- Warning --------------------------------
91
92
  // | These PropTypes are generated from the TypeScript type definitions |
@@ -196,6 +196,13 @@ var MenuList = /*#__PURE__*/React.forwardRef(function MenuList(props, ref) {
196
196
  activeItemIndex = index;
197
197
  }
198
198
  }
199
+ if (activeItemIndex === index && (child.props.disabled || child.props.muiSkipListHighlight || child.type.muiSkipListHighlight)) {
200
+ activeItemIndex += 1;
201
+ if (activeItemIndex >= children.length) {
202
+ // there are no focusable items within the list.
203
+ activeItemIndex = -1;
204
+ }
205
+ }
199
206
  });
200
207
  var items = React.Children.map(children, function (child, index) {
201
208
  if (index === activeItemIndex) {
@@ -2,6 +2,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import * as React from 'react';
4
4
  import PropTypes from 'prop-types';
5
+ import clsx from 'clsx';
5
6
  import ModalUnstyled, { modalUnstyledClasses } from '@mui/base/ModalUnstyled';
6
7
  import { isHostComponent, resolveComponentProps } from '@mui/base/utils';
7
8
  import { elementAcceptingRef, HTMLElementType } from '@mui/utils';
@@ -10,9 +11,6 @@ import useThemeProps from '../styles/useThemeProps';
10
11
  import Backdrop from '../Backdrop';
11
12
  import { jsx as _jsx } from "react/jsx-runtime";
12
13
  export var modalClasses = modalUnstyledClasses;
13
- var extendUtilityClasses = function extendUtilityClasses(ownerState) {
14
- return ownerState.classes;
15
- };
16
14
  var ModalRoot = styled('div', {
17
15
  name: 'MuiModal',
18
16
  slot: 'Root',
@@ -66,6 +64,8 @@ var Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
66
64
  var _props$BackdropCompon = props.BackdropComponent,
67
65
  BackdropComponent = _props$BackdropCompon === void 0 ? ModalBackdrop : _props$BackdropCompon,
68
66
  BackdropProps = props.BackdropProps,
67
+ classes = props.classes,
68
+ className = props.className,
69
69
  _props$closeAfterTran = props.closeAfterTransition,
70
70
  closeAfterTransition = _props$closeAfterTran === void 0 ? false : _props$closeAfterTran,
71
71
  children = props.children,
@@ -93,7 +93,7 @@ var Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
93
93
  slotProps = props.slotProps,
94
94
  slots = props.slots,
95
95
  theme = props.theme,
96
- other = _objectWithoutProperties(props, ["BackdropComponent", "BackdropProps", "closeAfterTransition", "children", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "slotProps", "slots", "theme"]);
96
+ other = _objectWithoutProperties(props, ["BackdropComponent", "BackdropProps", "classes", "className", "closeAfterTransition", "children", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "slotProps", "slots", "theme"]);
97
97
  var _React$useState = React.useState(true),
98
98
  exited = _React$useState[0],
99
99
  setExited = _React$useState[1];
@@ -111,7 +111,6 @@ var Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
111
111
  var ownerState = _extends({}, props, commonProps, {
112
112
  exited: exited
113
113
  });
114
- var classes = extendUtilityClasses(ownerState);
115
114
  var RootSlot = (_ref2 = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : components.Root) != null ? _ref2 : ModalRoot;
116
115
  var BackdropSlot = (_ref3 = (_slots$backdrop = slots == null ? void 0 : slots.backdrop) != null ? _slots$backdrop : components.Backdrop) != null ? _ref3 : BackdropComponent;
117
116
  var rootSlotProps = (_slotProps$root = slotProps == null ? void 0 : slotProps.root) != null ? _slotProps$root : componentsProps.root;
@@ -126,10 +125,14 @@ var Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
126
125
  return _extends({}, resolveComponentProps(rootSlotProps, ownerState), !isHostComponent(RootSlot) && {
127
126
  as: component,
128
127
  theme: theme
128
+ }, {
129
+ className: clsx(className, rootSlotProps == null ? void 0 : rootSlotProps.className, classes == null ? void 0 : classes.root, !ownerState.open && ownerState.exited && (classes == null ? void 0 : classes.hidden))
129
130
  });
130
131
  },
131
132
  backdrop: function backdrop() {
132
- return _extends({}, BackdropProps, resolveComponentProps(backdropSlotProps, ownerState));
133
+ return _extends({}, BackdropProps, resolveComponentProps(backdropSlotProps, ownerState), {
134
+ className: clsx(backdropSlotProps == null ? void 0 : backdropSlotProps.className, classes == null ? void 0 : classes.backdrop)
135
+ });
133
136
  }
134
137
  },
135
138
  onTransitionEnter: function onTransitionEnter() {
@@ -139,9 +142,7 @@ var Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
139
142
  return setExited(true);
140
143
  },
141
144
  ref: ref
142
- }, other, {
143
- classes: classes
144
- }, commonProps, {
145
+ }, other, commonProps, {
145
146
  children: children
146
147
  }));
147
148
  });
@@ -178,6 +179,10 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes /* remove-proptypes */ =
178
179
  * Override or extend the styles applied to the component.
179
180
  */
180
181
  classes: PropTypes.object,
182
+ /**
183
+ * @ignore
184
+ */
185
+ className: PropTypes.string,
181
186
  /**
182
187
  * When set to true the Modal waits until a nested Transition is completed before closing.
183
188
  * @default false
@@ -161,7 +161,7 @@ var OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inProps
161
161
  ownerState: ownerState,
162
162
  className: classes.notchedOutline,
163
163
  label: label != null && label !== '' && fcs.required ? _React$Fragment || (_React$Fragment = /*#__PURE__*/_jsxs(React.Fragment, {
164
- children: [label, "\xA0", '*']
164
+ children: [label, "\u2009", '*']
165
165
  })) : label,
166
166
  notched: typeof notched !== 'undefined' ? notched : Boolean(state.startAdornment || state.filled || state.focused)
167
167
  });
@@ -44,7 +44,7 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
44
44
  emptyValueFocused = ownerState.emptyValueFocused,
45
45
  focusVisible = ownerState.focusVisible;
46
46
  var slots = {
47
- root: ['root', "size".concat(capitalize(size)), disabled && 'disabled', focusVisible && 'focusVisible', readOnly && 'readyOnly'],
47
+ root: ['root', "size".concat(capitalize(size)), disabled && 'disabled', focusVisible && 'focusVisible', readOnly && 'readOnly'],
48
48
  label: ['label', 'pristine'],
49
49
  labelEmptyValue: [emptyValueFocused && 'labelEmptyValueActive'],
50
50
  icon: ['icon'],
@@ -459,7 +459,7 @@ var Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
459
459
  ref: handleRef,
460
460
  onMouseMove: handleMouseMove,
461
461
  onMouseLeave: handleMouseLeave,
462
- className: clsx(classes.root, className),
462
+ className: clsx(classes.root, className, readOnly && 'MuiRating-readOnly'),
463
463
  ownerState: ownerState,
464
464
  role: readOnly ? 'img' : null,
465
465
  "aria-label": readOnly ? getLabelText(value) : null
@@ -336,8 +336,7 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
336
336
  computeDisplay = true;
337
337
  }
338
338
  }
339
- var items = childrenArray.map(function (child, index, arr) {
340
- var _arr$, _arr$$props, _arr$2, _arr$2$props;
339
+ var items = childrenArray.map(function (child) {
341
340
  if (! /*#__PURE__*/React.isValidElement(child)) {
342
341
  return null;
343
342
  }
@@ -366,25 +365,6 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
366
365
  if (selected) {
367
366
  foundMatch = true;
368
367
  }
369
- if (child.props.value === undefined) {
370
- return /*#__PURE__*/React.cloneElement(child, {
371
- 'aria-readonly': true,
372
- role: 'option'
373
- });
374
- }
375
- var isFirstSelectableElement = function isFirstSelectableElement() {
376
- if (value) {
377
- return selected;
378
- }
379
- var firstSelectableElement = arr.find(function (item) {
380
- var _item$props;
381
- return (item == null ? void 0 : (_item$props = item.props) == null ? void 0 : _item$props.value) !== undefined && item.props.disabled !== true;
382
- });
383
- if (child === firstSelectableElement) {
384
- return true;
385
- }
386
- return selected;
387
- };
388
368
  return /*#__PURE__*/React.cloneElement(child, {
389
369
  'aria-selected': selected ? 'true' : 'false',
390
370
  onClick: handleItemClick(child),
@@ -400,7 +380,7 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
400
380
  }
401
381
  },
402
382
  role: 'option',
403
- selected: ((_arr$ = arr[0]) == null ? void 0 : (_arr$$props = _arr$.props) == null ? void 0 : _arr$$props.value) === undefined || ((_arr$2 = arr[0]) == null ? void 0 : (_arr$2$props = _arr$2.props) == null ? void 0 : _arr$2$props.disabled) === true ? isFirstSelectableElement() : selected,
383
+ selected: selected,
404
384
  value: undefined,
405
385
  // The value is most likely not a valid HTML attribute.
406
386
  'data-value': child.props.value // Instead, we provide it as a data attribute.
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
7
7
  import { chainPropTypes } from '@mui/utils';
8
8
  import { isHostComponent, useSlotProps, unstable_composeClasses as composeClasses } from '@mui/base';
9
- import { useSlider } from '@mui/base/SliderUnstyled';
9
+ import useSlider, { valueToPercent } from '@mui/base/useSlider';
10
10
  import { alpha, lighten, darken } from '@mui/system';
11
11
  import useThemeProps from '../styles/useThemeProps';
12
12
  import styled, { slotShouldForwardProp } from '../styles/styled';
@@ -17,9 +17,6 @@ import SliderValueLabel from './SliderValueLabel';
17
17
  import sliderClasses, { getSliderUtilityClass } from './sliderClasses';
18
18
  import { jsx as _jsx } from "react/jsx-runtime";
19
19
  import { jsxs as _jsxs } from "react/jsx-runtime";
20
- var valueToPercent = function valueToPercent(value, min, max) {
21
- return (value - min) * 100 / (max - min);
22
- };
23
20
  function Identity(x) {
24
21
  return x;
25
22
  }
@@ -587,7 +584,8 @@ var Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
587
584
  elementType: ThumbSlot,
588
585
  getSlotProps: getThumbProps,
589
586
  externalSlotProps: thumbSlotProps,
590
- ownerState: _extends({}, ownerState, thumbSlotProps == null ? void 0 : thumbSlotProps.ownerState)
587
+ ownerState: _extends({}, ownerState, thumbSlotProps == null ? void 0 : thumbSlotProps.ownerState),
588
+ className: classes.thumb
591
589
  });
592
590
  var valueLabelProps = useSlotProps({
593
591
  elementType: ValueLabelSlot,
@@ -604,7 +602,8 @@ var Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
604
602
  var markLabelProps = useSlotProps({
605
603
  elementType: MarkLabelSlot,
606
604
  externalSlotProps: markLabelSlotProps,
607
- ownerState: ownerState
605
+ ownerState: ownerState,
606
+ className: classes.markLabel
608
607
  });
609
608
  var inputSliderProps = useSlotProps({
610
609
  elementType: InputSlot,
@@ -647,8 +646,10 @@ var Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
647
646
  var percent = valueToPercent(value, min, max);
648
647
  var style = axisProps[axis].offset(percent);
649
648
  var ValueLabelComponent = valueLabelDisplay === 'off' ? Forward : ValueLabelSlot;
650
- return /*#__PURE__*/_jsx(React.Fragment, {
651
- children: /*#__PURE__*/_jsx(ValueLabelComponent, _extends({}, !isHostComponent(ValueLabelComponent) && {
649
+ return (
650
+ /*#__PURE__*/
651
+ /* TODO v6: Change component structure. It will help in avoiding the complicated React.cloneElement API added in SliderValueLabel component. Should be: Thumb -> Input, ValueLabel. Follow Joy UI's Slider structure. */
652
+ _jsx(ValueLabelComponent, _extends({}, !isHostComponent(ValueLabelComponent) && {
652
653
  valueLabelFormat: valueLabelFormat,
653
654
  valueLabelDisplay: valueLabelDisplay,
654
655
  value: typeof valueLabelFormat === 'function' ? valueLabelFormat(scale(value), index) : valueLabelFormat,
@@ -657,8 +658,7 @@ var Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
657
658
  disabled: disabled
658
659
  }, valueLabelProps, {
659
660
  children: /*#__PURE__*/_jsx(ThumbSlot, _extends({
660
- "data-index": index,
661
- "data-focusvisible": focusedThumbIndex === index
661
+ "data-index": index
662
662
  }, thumbProps, {
663
663
  className: clsx(classes.thumb, thumbProps.className, active === index && classes.active, focusedThumbIndex === index && classes.focusVisible),
664
664
  style: _extends({}, style, {
@@ -673,8 +673,8 @@ var Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
673
673
  value: values[index]
674
674
  }, inputSliderProps))
675
675
  }))
676
- }))
677
- }, index);
676
+ }), index)
677
+ );
678
678
  })]
679
679
  }));
680
680
  });
@@ -715,6 +715,10 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
715
715
  * Override or extend the styles applied to the component.
716
716
  */
717
717
  classes: PropTypes.object,
718
+ /**
719
+ * @ignore
720
+ */
721
+ className: PropTypes.string,
718
722
  /**
719
723
  * The color of the component.
720
724
  * It supports both default and custom theme colors, which can be added as shown in the
@@ -3,13 +3,12 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
- import clsx from 'clsx';
7
- import { unstable_composeClasses as composeClasses } from '@mui/base';
6
+ import { unstable_composeClasses as composeClasses, useSlotProps } from '@mui/base';
8
7
  import ClickAwayListener from '@mui/base/ClickAwayListener';
8
+ import useSnackbar from '@mui/base/useSnackbar';
9
9
  import styled from '../styles/styled';
10
10
  import useTheme from '../styles/useTheme';
11
11
  import useThemeProps from '../styles/useThemeProps';
12
- import useEventCallback from '../utils/useEventCallback';
13
12
  import capitalize from '../utils/capitalize';
14
13
  import Grow from '../Grow';
15
14
  import SnackbarContent from '../SnackbarContent';
@@ -114,78 +113,28 @@ var Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
114
113
  anchorOrigin: {
115
114
  vertical: vertical,
116
115
  horizontal: horizontal
117
- }
116
+ },
117
+ autoHideDuration: autoHideDuration,
118
+ disableWindowBlurListener: disableWindowBlurListener,
119
+ TransitionComponent: TransitionComponent,
120
+ transitionDuration: transitionDuration
118
121
  });
119
122
  var classes = useUtilityClasses(ownerState);
120
- var timerAutoHide = React.useRef();
123
+ var _useSnackbar = useSnackbar(_extends({}, ownerState, {
124
+ ref: ref
125
+ })),
126
+ getRootProps = _useSnackbar.getRootProps,
127
+ onClickAway = _useSnackbar.onClickAway;
121
128
  var _React$useState = React.useState(true),
122
129
  exited = _React$useState[0],
123
130
  setExited = _React$useState[1];
124
- var handleClose = useEventCallback(function () {
125
- if (onClose) {
126
- onClose.apply(void 0, arguments);
127
- }
131
+ var rootProps = useSlotProps({
132
+ elementType: SnackbarRoot,
133
+ getSlotProps: getRootProps,
134
+ externalForwardedProps: other,
135
+ ownerState: ownerState,
136
+ className: [classes.root, className]
128
137
  });
129
- var setAutoHideTimer = useEventCallback(function (autoHideDurationParam) {
130
- if (!onClose || autoHideDurationParam == null) {
131
- return;
132
- }
133
- clearTimeout(timerAutoHide.current);
134
- timerAutoHide.current = setTimeout(function () {
135
- handleClose(null, 'timeout');
136
- }, autoHideDurationParam);
137
- });
138
- React.useEffect(function () {
139
- if (open) {
140
- setAutoHideTimer(autoHideDuration);
141
- }
142
- return function () {
143
- clearTimeout(timerAutoHide.current);
144
- };
145
- }, [open, autoHideDuration, setAutoHideTimer]);
146
-
147
- // Pause the timer when the user is interacting with the Snackbar
148
- // or when the user hide the window.
149
- var handlePause = function handlePause() {
150
- clearTimeout(timerAutoHide.current);
151
- };
152
-
153
- // Restart the timer when the user is no longer interacting with the Snackbar
154
- // or when the window is shown back.
155
- var handleResume = React.useCallback(function () {
156
- if (autoHideDuration != null) {
157
- setAutoHideTimer(resumeHideDuration != null ? resumeHideDuration : autoHideDuration * 0.5);
158
- }
159
- }, [autoHideDuration, resumeHideDuration, setAutoHideTimer]);
160
- var handleFocus = function handleFocus(event) {
161
- if (onFocus) {
162
- onFocus(event);
163
- }
164
- handlePause();
165
- };
166
- var handleMouseEnter = function handleMouseEnter(event) {
167
- if (onMouseEnter) {
168
- onMouseEnter(event);
169
- }
170
- handlePause();
171
- };
172
- var handleBlur = function handleBlur(event) {
173
- if (onBlur) {
174
- onBlur(event);
175
- }
176
- handleResume();
177
- };
178
- var handleMouseLeave = function handleMouseLeave(event) {
179
- if (onMouseLeave) {
180
- onMouseLeave(event);
181
- }
182
- handleResume();
183
- };
184
- var handleClickAway = function handleClickAway(event) {
185
- if (onClose) {
186
- onClose(event, 'clickaway');
187
- }
188
- };
189
138
  var handleExited = function handleExited(node) {
190
139
  setExited(true);
191
140
  if (onExited) {
@@ -198,63 +147,15 @@ var Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
198
147
  onEnter(node, isAppearing);
199
148
  }
200
149
  };
201
- React.useEffect(function () {
202
- // TODO: window global should be refactored here
203
- if (!disableWindowBlurListener && open) {
204
- window.addEventListener('focus', handleResume);
205
- window.addEventListener('blur', handlePause);
206
- return function () {
207
- window.removeEventListener('focus', handleResume);
208
- window.removeEventListener('blur', handlePause);
209
- };
210
- }
211
- return undefined;
212
- }, [disableWindowBlurListener, handleResume, open]);
213
- React.useEffect(function () {
214
- if (!open) {
215
- return undefined;
216
- }
217
-
218
- /**
219
- * @param {KeyboardEvent} nativeEvent
220
- */
221
- function handleKeyDown(nativeEvent) {
222
- if (!nativeEvent.defaultPrevented) {
223
- // IE11, Edge (prior to using Bink?) use 'Esc'
224
- if (nativeEvent.key === 'Escape' || nativeEvent.key === 'Esc') {
225
- // not calling `preventDefault` since we don't know if people may ignore this event e.g. a permanently open snackbar
226
- if (onClose) {
227
- onClose(nativeEvent, 'escapeKeyDown');
228
- }
229
- }
230
- }
231
- }
232
- document.addEventListener('keydown', handleKeyDown);
233
- return function () {
234
- document.removeEventListener('keydown', handleKeyDown);
235
- };
236
- }, [exited, open, onClose]);
237
150
 
238
151
  // So we only render active snackbars.
239
152
  if (!open && exited) {
240
153
  return null;
241
154
  }
242
155
  return /*#__PURE__*/_jsx(ClickAwayListener, _extends({
243
- onClickAway: handleClickAway
156
+ onClickAway: onClickAway
244
157
  }, ClickAwayListenerProps, {
245
- children: /*#__PURE__*/_jsx(SnackbarRoot, _extends({
246
- className: clsx(classes.root, className),
247
- onBlur: handleBlur,
248
- onFocus: handleFocus,
249
- onMouseEnter: handleMouseEnter,
250
- onMouseLeave: handleMouseLeave,
251
- ownerState: ownerState,
252
- ref: ref
253
- // ClickAwayListener adds an `onClick` prop which results in the alert not being announced.
254
- // See https://github.com/mui/material-ui/issues/29080
255
- ,
256
- role: "presentation"
257
- }, other, {
158
+ children: /*#__PURE__*/_jsx(SnackbarRoot, _extends({}, rootProps, {
258
159
  children: /*#__PURE__*/_jsx(TransitionComponent, _extends({
259
160
  appear: true,
260
161
  in: open,