@mui/material 5.3.0 → 5.4.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 (157) hide show
  1. package/Autocomplete/Autocomplete.d.ts +5 -0
  2. package/Autocomplete/Autocomplete.js +12 -4
  3. package/AvatarGroup/AvatarGroup.d.ts +10 -0
  4. package/AvatarGroup/AvatarGroup.js +19 -7
  5. package/Badge/Badge.js +3 -2
  6. package/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
  7. package/Button/buttonClasses.d.ts +1 -1
  8. package/ButtonBase/ButtonBase.d.ts +5 -1
  9. package/ButtonBase/ButtonBase.js +15 -2
  10. package/ButtonBase/TouchRipple.js +1 -2
  11. package/CHANGELOG.md +300 -28
  12. package/Fab/Fab.d.ts +4 -1
  13. package/Fab/Fab.js +8 -20
  14. package/Fab/fabClasses.js +1 -1
  15. package/FormControlLabel/FormControlLabel.js +11 -3
  16. package/FormControlLabel/formControlLabelClasses.d.ts +2 -0
  17. package/FormControlLabel/formControlLabelClasses.js +1 -1
  18. package/FormGroup/FormGroup.js +14 -3
  19. package/FormGroup/formGroupClasses.d.ts +2 -0
  20. package/FormGroup/formGroupClasses.js +1 -1
  21. package/FormHelperText/FormHelperText.js +7 -9
  22. package/Grid/Grid.js +2 -4
  23. package/ImageList/ImageList.js +3 -1
  24. package/InputAdornment/InputAdornment.js +6 -9
  25. package/Modal/Modal.js +1 -1
  26. package/OutlinedInput/NotchedOutline.js +14 -16
  27. package/OutlinedInput/OutlinedInput.js +1 -1
  28. package/README.md +6 -6
  29. package/Radio/RadioButtonIcon.js +2 -6
  30. package/Rating/Rating.js +1 -1
  31. package/Select/Select.js +19 -7
  32. package/Select/SelectInput.js +12 -10
  33. package/Slider/Slider.js +3 -1
  34. package/Snackbar/Snackbar.js +4 -1
  35. package/SvgIcon/SvgIcon.js +9 -9
  36. package/SwipeableDrawer/SwipeArea.js +1 -3
  37. package/TextField/TextField.js +1 -1
  38. package/ToggleButton/ToggleButton.d.ts +15 -0
  39. package/ToggleButton/ToggleButton.js +8 -2
  40. package/index.d.ts +11 -3
  41. package/index.js +8 -3
  42. package/internal/SwitchBase.js +2 -6
  43. package/legacy/Autocomplete/Autocomplete.js +13 -4
  44. package/legacy/AvatarGroup/AvatarGroup.js +20 -7
  45. package/legacy/Badge/Badge.js +4 -2
  46. package/legacy/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
  47. package/legacy/ButtonBase/ButtonBase.js +15 -2
  48. package/legacy/ButtonBase/TouchRipple.js +1 -2
  49. package/legacy/Fab/Fab.js +8 -20
  50. package/legacy/Fab/fabClasses.js +1 -1
  51. package/legacy/FormControlLabel/FormControlLabel.js +11 -3
  52. package/legacy/FormControlLabel/formControlLabelClasses.js +1 -1
  53. package/legacy/FormGroup/FormGroup.js +14 -3
  54. package/legacy/FormGroup/formGroupClasses.js +1 -1
  55. package/legacy/FormHelperText/FormHelperText.js +7 -9
  56. package/legacy/Grid/Grid.js +2 -4
  57. package/legacy/ImageList/ImageList.js +3 -1
  58. package/legacy/InputAdornment/InputAdornment.js +6 -9
  59. package/legacy/Modal/Modal.js +1 -1
  60. package/legacy/OutlinedInput/NotchedOutline.js +14 -16
  61. package/legacy/OutlinedInput/OutlinedInput.js +1 -1
  62. package/legacy/Radio/RadioButtonIcon.js +2 -6
  63. package/legacy/Rating/Rating.js +1 -1
  64. package/legacy/Select/Select.js +23 -7
  65. package/legacy/Select/SelectInput.js +12 -10
  66. package/legacy/Slider/Slider.js +3 -1
  67. package/legacy/Snackbar/Snackbar.js +4 -1
  68. package/legacy/SvgIcon/SvgIcon.js +9 -9
  69. package/legacy/SwipeableDrawer/SwipeArea.js +1 -3
  70. package/legacy/TextField/TextField.js +1 -1
  71. package/legacy/ToggleButton/ToggleButton.js +8 -2
  72. package/legacy/index.js +8 -3
  73. package/legacy/internal/SwitchBase.js +2 -6
  74. package/legacy/styles/makeStyles.js +1 -1
  75. package/legacy/styles/withStyles.js +1 -1
  76. package/legacy/styles/withTheme.js +1 -1
  77. package/legacy/useMediaQuery/useMediaQuery.js +87 -32
  78. package/modern/Autocomplete/Autocomplete.js +12 -4
  79. package/modern/AvatarGroup/AvatarGroup.js +17 -7
  80. package/modern/Badge/Badge.js +3 -2
  81. package/modern/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
  82. package/modern/ButtonBase/ButtonBase.js +15 -2
  83. package/modern/ButtonBase/TouchRipple.js +1 -2
  84. package/modern/Fab/Fab.js +8 -20
  85. package/modern/Fab/fabClasses.js +1 -1
  86. package/modern/FormControlLabel/FormControlLabel.js +11 -3
  87. package/modern/FormControlLabel/formControlLabelClasses.js +1 -1
  88. package/modern/FormGroup/FormGroup.js +14 -3
  89. package/modern/FormGroup/formGroupClasses.js +1 -1
  90. package/modern/FormHelperText/FormHelperText.js +7 -9
  91. package/modern/Grid/Grid.js +2 -4
  92. package/modern/ImageList/ImageList.js +3 -1
  93. package/modern/InputAdornment/InputAdornment.js +6 -9
  94. package/modern/Modal/Modal.js +1 -1
  95. package/modern/OutlinedInput/NotchedOutline.js +14 -16
  96. package/modern/OutlinedInput/OutlinedInput.js +1 -1
  97. package/modern/Radio/RadioButtonIcon.js +2 -6
  98. package/modern/Rating/Rating.js +1 -1
  99. package/modern/Select/Select.js +19 -7
  100. package/modern/Select/SelectInput.js +12 -10
  101. package/modern/Slider/Slider.js +3 -1
  102. package/modern/Snackbar/Snackbar.js +4 -1
  103. package/modern/SvgIcon/SvgIcon.js +8 -8
  104. package/modern/SwipeableDrawer/SwipeArea.js +1 -3
  105. package/modern/TextField/TextField.js +1 -1
  106. package/modern/ToggleButton/ToggleButton.js +8 -2
  107. package/modern/index.js +8 -3
  108. package/modern/internal/SwitchBase.js +2 -6
  109. package/modern/styles/makeStyles.js +1 -1
  110. package/modern/styles/withStyles.js +1 -1
  111. package/modern/styles/withTheme.js +1 -1
  112. package/modern/useMediaQuery/useMediaQuery.js +69 -27
  113. package/node/Autocomplete/Autocomplete.js +12 -4
  114. package/node/AvatarGroup/AvatarGroup.js +19 -7
  115. package/node/Badge/Badge.js +3 -2
  116. package/node/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
  117. package/node/ButtonBase/ButtonBase.js +15 -2
  118. package/node/ButtonBase/TouchRipple.js +1 -2
  119. package/node/Fab/Fab.js +8 -20
  120. package/node/Fab/fabClasses.js +1 -1
  121. package/node/FormControlLabel/FormControlLabel.js +12 -3
  122. package/node/FormControlLabel/formControlLabelClasses.js +1 -1
  123. package/node/FormGroup/FormGroup.js +15 -3
  124. package/node/FormGroup/formGroupClasses.js +1 -1
  125. package/node/FormHelperText/FormHelperText.js +6 -9
  126. package/node/Grid/Grid.js +2 -4
  127. package/node/ImageList/ImageList.js +3 -1
  128. package/node/InputAdornment/InputAdornment.js +5 -9
  129. package/node/Modal/Modal.js +1 -1
  130. package/node/OutlinedInput/NotchedOutline.js +12 -16
  131. package/node/OutlinedInput/OutlinedInput.js +1 -1
  132. package/node/Radio/RadioButtonIcon.js +2 -6
  133. package/node/Rating/Rating.js +1 -1
  134. package/node/Select/Select.js +22 -9
  135. package/node/Select/SelectInput.js +11 -10
  136. package/node/Slider/Slider.js +3 -1
  137. package/node/Snackbar/Snackbar.js +4 -1
  138. package/node/SvgIcon/SvgIcon.js +9 -9
  139. package/node/SwipeableDrawer/SwipeArea.js +1 -3
  140. package/node/TextField/TextField.js +1 -1
  141. package/node/ToggleButton/ToggleButton.js +8 -2
  142. package/node/index.js +62 -16
  143. package/node/internal/SwitchBase.js +2 -6
  144. package/node/styles/makeStyles.js +1 -1
  145. package/node/styles/withStyles.js +1 -1
  146. package/node/styles/withTheme.js +1 -1
  147. package/node/useMediaQuery/useMediaQuery.js +69 -27
  148. package/package.json +8 -8
  149. package/styles/ThemeProvider.d.ts +1 -1
  150. package/styles/index.d.ts +3 -0
  151. package/styles/makeStyles.js +1 -1
  152. package/styles/withStyles.js +1 -1
  153. package/styles/withTheme.js +1 -1
  154. package/umd/material-ui.development.js +5056 -7204
  155. package/umd/material-ui.production.min.js +21 -21
  156. package/useMediaQuery/useMediaQuery.d.ts +4 -0
  157. package/useMediaQuery/useMediaQuery.js +69 -27
@@ -29,9 +29,7 @@ const useUtilityClasses = ownerState => {
29
29
  return composeClasses(slots, getSwitchBaseUtilityClass, classes);
30
30
  };
31
31
 
32
- const SwitchBaseRoot = styled(ButtonBase, {
33
- skipSx: true
34
- })(({
32
+ const SwitchBaseRoot = styled(ButtonBase)(({
35
33
  ownerState
36
34
  }) => _extends({
37
35
  padding: 9,
@@ -41,9 +39,7 @@ const SwitchBaseRoot = styled(ButtonBase, {
41
39
  }, ownerState.edge === 'end' && {
42
40
  marginRight: ownerState.size === 'small' ? -3 : -12
43
41
  }));
44
- const SwitchBaseInput = styled('input', {
45
- skipSx: true
46
- })({
42
+ const SwitchBaseInput = styled('input')({
47
43
  cursor: 'inherit',
48
44
  position: 'absolute',
49
45
  opacity: 0,
@@ -420,6 +420,8 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
420
420
  PopperComponent = _props$PopperComponen === void 0 ? Popper : _props$PopperComponen,
421
421
  _props$popupIcon = props.popupIcon,
422
422
  popupIcon = _props$popupIcon === void 0 ? _ArrowDropDownIcon || (_ArrowDropDownIcon = /*#__PURE__*/_jsx(ArrowDropDownIcon, {})) : _props$popupIcon,
423
+ _props$readOnly = props.readOnly,
424
+ readOnly = _props$readOnly === void 0 ? false : _props$readOnly,
423
425
  renderGroupProp = props.renderGroup,
424
426
  renderInput = props.renderInput,
425
427
  renderOptionProp = props.renderOption,
@@ -429,7 +431,7 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
429
431
  _props$size = props.size,
430
432
  size = _props$size === void 0 ? 'medium' : _props$size,
431
433
  valueProp = props.value,
432
- other = _objectWithoutProperties(props, ["autoComplete", "autoHighlight", "autoSelect", "blurOnSelect", "ChipProps", "className", "clearIcon", "clearOnBlur", "clearOnEscape", "clearText", "closeText", "componentsProps", "defaultValue", "disableClearable", "disableCloseOnSelect", "disabled", "disabledItemsFocusable", "disableListWrap", "disablePortal", "filterOptions", "filterSelectedOptions", "forcePopupIcon", "freeSolo", "fullWidth", "getLimitTagsText", "getOptionDisabled", "getOptionLabel", "isOptionEqualToValue", "groupBy", "handleHomeEndKeys", "id", "includeInputInList", "inputValue", "limitTags", "ListboxComponent", "ListboxProps", "loading", "loadingText", "multiple", "noOptionsText", "onChange", "onClose", "onHighlightChange", "onInputChange", "onOpen", "open", "openOnFocus", "openText", "options", "PaperComponent", "PopperComponent", "popupIcon", "renderGroup", "renderInput", "renderOption", "renderTags", "selectOnFocus", "size", "value"]);
434
+ other = _objectWithoutProperties(props, ["autoComplete", "autoHighlight", "autoSelect", "blurOnSelect", "ChipProps", "className", "clearIcon", "clearOnBlur", "clearOnEscape", "clearText", "closeText", "componentsProps", "defaultValue", "disableClearable", "disableCloseOnSelect", "disabled", "disabledItemsFocusable", "disableListWrap", "disablePortal", "filterOptions", "filterSelectedOptions", "forcePopupIcon", "freeSolo", "fullWidth", "getLimitTagsText", "getOptionDisabled", "getOptionLabel", "isOptionEqualToValue", "groupBy", "handleHomeEndKeys", "id", "includeInputInList", "inputValue", "limitTags", "ListboxComponent", "ListboxProps", "loading", "loadingText", "multiple", "noOptionsText", "onChange", "onClose", "onHighlightChange", "onInputChange", "onOpen", "open", "openOnFocus", "openText", "options", "PaperComponent", "PopperComponent", "popupIcon", "readOnly", "renderGroup", "renderInput", "renderOption", "renderTags", "selectOnFocus", "size", "value"]);
433
435
  /* eslint-enable @typescript-eslint/no-unused-vars */
434
436
 
435
437
 
@@ -455,7 +457,7 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
455
457
  inputValue = _useAutocomplete.inputValue,
456
458
  groupedOptions = _useAutocomplete.groupedOptions;
457
459
 
458
- var hasClearIcon = !disableClearable && !disabled && dirty;
460
+ var hasClearIcon = !disableClearable && !disabled && dirty && !readOnly;
459
461
  var hasPopupIcon = (!freeSolo || forcePopupIcon === true) && forcePopupIcon !== false;
460
462
 
461
463
  var ownerState = _extends({}, props, {
@@ -582,7 +584,8 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
582
584
  },
583
585
  inputProps: _extends({
584
586
  className: clsx(classes.input),
585
- disabled: disabled
587
+ disabled: disabled,
588
+ readOnly: readOnly
586
589
  }, getInputProps())
587
590
  })
588
591
  })), popupOpen && anchorEl ? /*#__PURE__*/_jsx(AutocompletePopper, {
@@ -703,7 +706,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
703
706
  * If `true`, the input's text is cleared on blur if no value is selected.
704
707
  *
705
708
  * Set to `true` if you want to help the user enter a new value.
706
- * Set to `false` if you want to help the user resume his search.
709
+ * Set to `false` if you want to help the user resume their search.
707
710
  * @default !props.freeSolo
708
711
  */
709
712
  clearOnBlur: PropTypes.bool,
@@ -1025,6 +1028,12 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
1025
1028
  */
1026
1029
  popupIcon: PropTypes.node,
1027
1030
 
1031
+ /**
1032
+ * If `true`, the component becomes readonly. It is also supported for multiple tags where the tag cannot be deleted.
1033
+ * @default false
1034
+ */
1035
+ readOnly: PropTypes.bool,
1036
+
1028
1037
  /**
1029
1038
  * Render the group.
1030
1039
  *
@@ -63,6 +63,8 @@ var AvatarGroupAvatar = styled(Avatar, {
63
63
  };
64
64
  });
65
65
  var AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps, ref) {
66
+ var _componentsProps$addi, _componentsProps$addi2;
67
+
66
68
  var props = useThemeProps({
67
69
  props: inProps,
68
70
  name: 'MuiAvatarGroup'
@@ -70,6 +72,8 @@ var AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps, re
70
72
 
71
73
  var childrenProp = props.children,
72
74
  className = props.className,
75
+ _props$componentsProp = props.componentsProps,
76
+ componentsProps = _props$componentsProp === void 0 ? {} : _props$componentsProp,
73
77
  _props$max = props.max,
74
78
  max = _props$max === void 0 ? 5 : _props$max,
75
79
  _props$spacing = props.spacing,
@@ -77,7 +81,7 @@ var AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps, re
77
81
  total = props.total,
78
82
  _props$variant = props.variant,
79
83
  variant = _props$variant === void 0 ? 'circular' : _props$variant,
80
- other = _objectWithoutProperties(props, ["children", "className", "max", "spacing", "total", "variant"]);
84
+ other = _objectWithoutProperties(props, ["children", "className", "componentsProps", "max", "spacing", "total", "variant"]);
81
85
 
82
86
  var clampedMax = max < 2 ? 2 : max;
83
87
 
@@ -112,15 +116,16 @@ var AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps, re
112
116
  className: clsx(classes.root, className),
113
117
  ref: ref
114
118
  }, other, {
115
- children: [extraAvatars ? /*#__PURE__*/_jsxs(AvatarGroupAvatar, {
119
+ children: [extraAvatars ? /*#__PURE__*/_jsxs(AvatarGroupAvatar, _extends({
116
120
  ownerState: ownerState,
117
- className: classes.avatar,
118
- style: {
121
+ variant: variant
122
+ }, componentsProps.additionalAvatar, {
123
+ className: clsx(classes.avatar, (_componentsProps$addi = componentsProps.additionalAvatar) == null ? void 0 : _componentsProps$addi.className),
124
+ style: _extends({
119
125
  marginLeft: marginLeft
120
- },
121
- variant: variant,
126
+ }, (_componentsProps$addi2 = componentsProps.additionalAvatar) == null ? void 0 : _componentsProps$addi2.style),
122
127
  children: ["+", extraAvatars]
123
- }) : null, children.slice(0, maxAvatars).reverse().map(function (child) {
128
+ })) : null, children.slice(0, maxAvatars).reverse().map(function (child) {
124
129
  return /*#__PURE__*/React.cloneElement(child, {
125
130
  className: clsx(child.props.className, classes.avatar),
126
131
  style: _extends({
@@ -154,6 +159,14 @@ process.env.NODE_ENV !== "production" ? AvatarGroup.propTypes
154
159
  */
155
160
  className: PropTypes.string,
156
161
 
162
+ /**
163
+ * The props used for each slot inside the AvatarGroup.
164
+ * @default {}
165
+ */
166
+ componentsProps: PropTypes.shape({
167
+ additionalAvatar: PropTypes.object
168
+ }),
169
+
157
170
  /**
158
171
  * Max avatars to show before +x.
159
172
  * @default 5
@@ -168,7 +168,8 @@ var Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
168
168
  overlapProp = _props$overlap === void 0 ? 'rectangular' : _props$overlap,
169
169
  _props$color = props.color,
170
170
  colorProp = _props$color === void 0 ? 'default' : _props$color,
171
- invisibleProp = props.invisible,
171
+ _props$invisible = props.invisible,
172
+ invisibleProp = _props$invisible === void 0 ? false : _props$invisible,
172
173
  badgeContentProp = props.badgeContent,
173
174
  _props$showZero = props.showZero,
174
175
  showZero = _props$showZero === void 0 ? false : _props$showZero,
@@ -183,7 +184,7 @@ var Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
183
184
  });
184
185
  var invisible = invisibleProp;
185
186
 
186
- if (invisibleProp == null && (badgeContentProp === 0 && !showZero || badgeContentProp == null && variantProp !== 'dot')) {
187
+ if (invisibleProp === false && (badgeContentProp === 0 && !showZero || badgeContentProp == null && variantProp !== 'dot')) {
187
188
  invisible = true;
188
189
  }
189
190
 
@@ -303,6 +304,7 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes
303
304
 
304
305
  /**
305
306
  * If `true`, the badge is invisible.
307
+ * @default false
306
308
  */
307
309
  invisible: PropTypes.bool,
308
310
 
@@ -6,9 +6,7 @@ import styled from '../styles/styled';
6
6
  import MoreHorizIcon from '../internal/svg-icons/MoreHoriz';
7
7
  import ButtonBase from '../ButtonBase';
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
- var BreadcrumbCollapsedButton = styled(ButtonBase, {
10
- skipSx: true
11
- })(function (_ref) {
9
+ var BreadcrumbCollapsedButton = styled(ButtonBase)(function (_ref) {
12
10
  var theme = _ref.theme;
13
11
  return _extends({
14
12
  display: 'flex',
@@ -127,11 +127,13 @@ var ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, ref)
127
127
  _props$tabIndex = props.tabIndex,
128
128
  tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,
129
129
  TouchRippleProps = props.TouchRippleProps,
130
+ touchRippleRef = props.touchRippleRef,
130
131
  type = props.type,
131
- other = _objectWithoutProperties(props, ["action", "centerRipple", "children", "className", "component", "disabled", "disableRipple", "disableTouchRipple", "focusRipple", "focusVisibleClassName", "LinkComponent", "onBlur", "onClick", "onContextMenu", "onDragLeave", "onFocus", "onFocusVisible", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseLeave", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "tabIndex", "TouchRippleProps", "type"]);
132
+ other = _objectWithoutProperties(props, ["action", "centerRipple", "children", "className", "component", "disabled", "disableRipple", "disableTouchRipple", "focusRipple", "focusVisibleClassName", "LinkComponent", "onBlur", "onClick", "onContextMenu", "onDragLeave", "onFocus", "onFocusVisible", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseLeave", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "tabIndex", "TouchRippleProps", "touchRippleRef", "type"]);
132
133
 
133
134
  var buttonRef = React.useRef(null);
134
135
  var rippleRef = React.useRef(null);
136
+ var handleRippleRef = useForkRef(rippleRef, touchRippleRef);
135
137
 
136
138
  var _useIsFocusVisible = useIsFocusVisible(),
137
139
  isFocusVisibleRef = _useIsFocusVisible.isFocusVisibleRef,
@@ -361,7 +363,7 @@ var ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, ref)
361
363
 
362
364
  /* TouchRipple is only needed client-side, x2 boost on the server. */
363
365
  _jsx(TouchRipple, _extends({
364
- ref: rippleRef,
366
+ ref: handleRippleRef,
365
367
  center: centerRipple
366
368
  }, TouchRippleProps)) : null]
367
369
  }));
@@ -544,6 +546,17 @@ process.env.NODE_ENV !== "production" ? ButtonBase.propTypes
544
546
  */
545
547
  TouchRippleProps: PropTypes.object,
546
548
 
549
+ /**
550
+ * A ref that points to the `TouchRippple` element.
551
+ */
552
+ touchRippleRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
553
+ current: PropTypes.shape({
554
+ pulsate: PropTypes.func.isRequired,
555
+ start: PropTypes.func.isRequired,
556
+ stop: PropTypes.func.isRequired
557
+ })
558
+ })]),
559
+
547
560
  /**
548
561
  * @ignore
549
562
  */
@@ -22,8 +22,7 @@ var exitKeyframe = keyframes(_templateObject2 || (_templateObject2 = _taggedTemp
22
22
  var pulsateKeyframe = keyframes(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n 0% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(0.92);\n }\n\n 100% {\n transform: scale(1);\n }\n"])));
23
23
  export var TouchRippleRoot = styled('span', {
24
24
  name: 'MuiTouchRipple',
25
- slot: 'Root',
26
- skipSx: true
25
+ slot: 'Root'
27
26
  })({
28
27
  overflow: 'hidden',
29
28
  pointerEvents: 'none',
package/legacy/Fab/Fab.js CHANGED
@@ -18,7 +18,7 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
18
18
  classes = ownerState.classes,
19
19
  size = ownerState.size;
20
20
  var slots = {
21
- root: ['root', variant, "size".concat(capitalize(size)), color === 'inherit' && 'colorInherit', color === 'primary' && 'primary', color === 'secondary' && 'secondary']
21
+ root: ['root', variant, "size".concat(capitalize(size)), color === 'inherit' ? 'colorInherit' : color]
22
22
  };
23
23
  return composeClasses(slots, getFabUtilityClass, classes);
24
24
  };
@@ -28,7 +28,7 @@ var FabRoot = styled(ButtonBase, {
28
28
  slot: 'Root',
29
29
  overridesResolver: function overridesResolver(props, styles) {
30
30
  var ownerState = props.ownerState;
31
- return [styles.root, styles[ownerState.variant], styles["size".concat(capitalize(ownerState.size))], ownerState.color === 'inherit' && styles.colorInherit, ownerState.color === 'primary' && styles.primary, ownerState.color === 'secondary' && styles.secondary];
31
+ return [styles.root, styles[ownerState.variant], styles["size".concat(capitalize(ownerState.size))], ownerState.color === 'inherit' && styles.colorInherit, styles[capitalize(ownerState.size)], styles[ownerState.color]];
32
32
  }
33
33
  })(function (_ref) {
34
34
  var _extends2;
@@ -96,24 +96,14 @@ var FabRoot = styled(ButtonBase, {
96
96
  }, function (_ref2) {
97
97
  var theme = _ref2.theme,
98
98
  ownerState = _ref2.ownerState;
99
- return _extends({}, ownerState.color === 'primary' && {
100
- color: theme.palette.primary.contrastText,
101
- backgroundColor: theme.palette.primary.main,
99
+ return _extends({}, ownerState.color !== 'inherit' && ownerState.color !== 'default' && theme.palette[ownerState.color] != null && {
100
+ color: theme.palette[ownerState.color].contrastText,
101
+ backgroundColor: theme.palette[ownerState.color].main,
102
102
  '&:hover': {
103
- backgroundColor: theme.palette.primary.dark,
103
+ backgroundColor: theme.palette[ownerState.color].dark,
104
104
  // Reset on touch devices, it doesn't add specificity
105
105
  '@media (hover: none)': {
106
- backgroundColor: theme.palette.primary.main
107
- }
108
- }
109
- }, ownerState.color === 'secondary' && {
110
- color: theme.palette.secondary.contrastText,
111
- backgroundColor: theme.palette.secondary.main,
112
- '&:hover': {
113
- backgroundColor: theme.palette.secondary.dark,
114
- // Reset on touch devices, it doesn't add specificity
115
- '@media (hover: none)': {
116
- backgroundColor: theme.palette.secondary.main
106
+ backgroundColor: theme.palette[ownerState.color].main
117
107
  }
118
108
  }
119
109
  });
@@ -190,9 +180,7 @@ process.env.NODE_ENV !== "production" ? Fab.propTypes
190
180
  * The color of the component. It supports those theme colors that make sense for this component.
191
181
  * @default 'default'
192
182
  */
193
- color: PropTypes
194
- /* @typescript-to-proptypes-ignore */
195
- .oneOfType([PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']), PropTypes.string]),
183
+ color: PropTypes.oneOf(['default', 'error', 'info', 'inherit', 'primary', 'secondary', 'success', 'warning']),
196
184
 
197
185
  /**
198
186
  * The component used for the root node.
@@ -2,5 +2,5 @@ import { generateUtilityClass, generateUtilityClasses } from '@mui/base';
2
2
  export function getFabUtilityClass(slot) {
3
3
  return generateUtilityClass('MuiFab', slot);
4
4
  }
5
- var fabClasses = generateUtilityClasses('MuiFab', ['root', 'primary', 'secondary', 'extended', 'circular', 'focusVisible', 'disabled', 'colorInherit', 'sizeSmall', 'sizeMedium', 'sizeLarge']);
5
+ var fabClasses = generateUtilityClasses('MuiFab', ['root', 'primary', 'secondary', 'extended', 'circular', 'focusVisible', 'disabled', 'colorInherit', 'sizeSmall', 'sizeMedium', 'sizeLarge', 'info', 'error', 'warning', 'success']);
6
6
  export default fabClasses;
@@ -12,15 +12,17 @@ import capitalize from '../utils/capitalize';
12
12
  import styled from '../styles/styled';
13
13
  import useThemeProps from '../styles/useThemeProps';
14
14
  import formControlLabelClasses, { getFormControlLabelUtilityClasses } from './formControlLabelClasses';
15
+ import formControlState from '../FormControl/formControlState';
15
16
  import { jsx as _jsx } from "react/jsx-runtime";
16
17
  import { jsxs as _jsxs } from "react/jsx-runtime";
17
18
 
18
19
  var useUtilityClasses = function useUtilityClasses(ownerState) {
19
20
  var classes = ownerState.classes,
20
21
  disabled = ownerState.disabled,
21
- labelPlacement = ownerState.labelPlacement;
22
+ labelPlacement = ownerState.labelPlacement,
23
+ error = ownerState.error;
22
24
  var slots = {
23
- root: ['root', disabled && 'disabled', "labelPlacement".concat(capitalize(labelPlacement))],
25
+ root: ['root', disabled && 'disabled', "labelPlacement".concat(capitalize(labelPlacement)), error && 'error'],
24
26
  label: ['label', disabled && 'disabled']
25
27
  };
26
28
  return composeClasses(slots, getFormControlLabelUtilityClasses, classes);
@@ -108,11 +110,17 @@ var FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel(i
108
110
  controlProps[key] = props[key];
109
111
  }
110
112
  });
113
+ var fcs = formControlState({
114
+ props: props,
115
+ muiFormControl: muiFormControl,
116
+ states: ['error']
117
+ });
111
118
 
112
119
  var ownerState = _extends({}, props, {
113
120
  disabled: disabled,
114
121
  label: label,
115
- labelPlacement: labelPlacement
122
+ labelPlacement: labelPlacement,
123
+ error: fcs.error
116
124
  });
117
125
 
118
126
  var classes = useUtilityClasses(ownerState);
@@ -2,5 +2,5 @@ import { generateUtilityClasses, generateUtilityClass } from '@mui/base';
2
2
  export function getFormControlLabelUtilityClasses(slot) {
3
3
  return generateUtilityClass('MuiFormControlLabel', slot);
4
4
  }
5
- var formControlLabelClasses = generateUtilityClasses('MuiFormControlLabel', ['root', 'labelPlacementStart', 'labelPlacementTop', 'labelPlacementBottom', 'disabled', 'label']);
5
+ var formControlLabelClasses = generateUtilityClasses('MuiFormControlLabel', ['root', 'labelPlacementStart', 'labelPlacementTop', 'labelPlacementBottom', 'disabled', 'label', 'error']);
6
6
  export default formControlLabelClasses;
@@ -7,13 +7,16 @@ import { unstable_composeClasses as composeClasses } from '@mui/base';
7
7
  import styled from '../styles/styled';
8
8
  import useThemeProps from '../styles/useThemeProps';
9
9
  import { getFormGroupUtilityClass } from './formGroupClasses';
10
+ import useFormControl from '../FormControl/useFormControl';
11
+ import formControlState from '../FormControl/formControlState';
10
12
  import { jsx as _jsx } from "react/jsx-runtime";
11
13
 
12
14
  var useUtilityClasses = function useUtilityClasses(ownerState) {
13
15
  var classes = ownerState.classes,
14
- row = ownerState.row;
16
+ row = ownerState.row,
17
+ error = ownerState.error;
15
18
  var slots = {
16
- root: ['root', row && 'row']
19
+ root: ['root', row && 'row', error && 'error']
17
20
  };
18
21
  return composeClasses(slots, getFormGroupUtilityClass, classes);
19
22
  };
@@ -52,8 +55,16 @@ var FormGroup = /*#__PURE__*/React.forwardRef(function FormGroup(inProps, ref) {
52
55
  row = _props$row === void 0 ? false : _props$row,
53
56
  other = _objectWithoutProperties(props, ["className", "row"]);
54
57
 
58
+ var muiFormControl = useFormControl();
59
+ var fcs = formControlState({
60
+ props: props,
61
+ muiFormControl: muiFormControl,
62
+ states: ['error']
63
+ });
64
+
55
65
  var ownerState = _extends({}, props, {
56
- row: row
66
+ row: row,
67
+ error: fcs.error
57
68
  });
58
69
 
59
70
  var classes = useUtilityClasses(ownerState);
@@ -2,5 +2,5 @@ import { generateUtilityClass, generateUtilityClasses } from '@mui/base';
2
2
  export function getFormGroupUtilityClass(slot) {
3
3
  return generateUtilityClass('MuiFormGroup', slot);
4
4
  }
5
- var formGroupClasses = generateUtilityClasses('MuiFormGroup', ['root', 'row']);
5
+ var formGroupClasses = generateUtilityClasses('MuiFormGroup', ['root', 'row', 'error']);
6
6
  export default formGroupClasses;
@@ -1,6 +1,9 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
2
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
+
5
+ var _span;
6
+
4
7
  import * as React from 'react';
5
8
  import PropTypes from 'prop-types';
6
9
  import clsx from 'clsx';
@@ -104,16 +107,11 @@ var FormHelperText = /*#__PURE__*/React.forwardRef(function FormHelperText(inPro
104
107
  className: clsx(classes.root, className),
105
108
  ref: ref
106
109
  }, other, {
107
- children: children === ' ' ?
108
- /*#__PURE__*/
109
- // notranslate needed while Google Translate will not fix zero-width space issue
110
- // eslint-disable-next-line react/no-danger
111
- _jsx("span", {
110
+ children: children === ' ' ? // notranslate needed while Google Translate will not fix zero-width space issue
111
+ _span || (_span = /*#__PURE__*/_jsx("span", {
112
112
  className: "notranslate",
113
- dangerouslySetInnerHTML: {
114
- __html: '&#8203;'
115
- }
116
- }) : children
113
+ children: "\u200B"
114
+ })) : children
117
115
  }));
118
116
  });
119
117
  process.env.NODE_ENV !== "production" ? FormHelperText.propTypes
@@ -251,10 +251,8 @@ var GridRoot = styled('div', {
251
251
 
252
252
  }, ownerState.zeroMinWidth && {
253
253
  minWidth: 0
254
- }, ownerState.wrap === 'nowrap' && {
255
- flexWrap: 'nowrap'
256
- }, ownerState.wrap === 'reverse' && {
257
- flexWrap: 'wrap-reverse'
254
+ }, ownerState.wrap !== 'wrap' && {
255
+ flexWrap: ownerState.wrap
258
256
  });
259
257
  }, generateDirection, generateRowGap, generateColumnGap, generateGrid);
260
258
 
@@ -168,6 +168,8 @@ process.env.NODE_ENV !== "production" ? ImageList.propTypes
168
168
  * The variant to use.
169
169
  * @default 'standard'
170
170
  */
171
- variant: PropTypes.oneOf(['masonry', 'quilted', 'standard', 'woven'])
171
+ variant: PropTypes
172
+ /* @typescript-to-proptypes-ignore */
173
+ .oneOfType([PropTypes.oneOf(['masonry', 'quilted', 'standard', 'woven']), PropTypes.string])
172
174
  } : void 0;
173
175
  export default ImageList;
@@ -1,6 +1,9 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
2
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
+
5
+ var _span;
6
+
4
7
  import * as React from 'react';
5
8
  import PropTypes from 'prop-types';
6
9
  import clsx from 'clsx';
@@ -116,17 +119,11 @@ var InputAdornment = /*#__PURE__*/React.forwardRef(function InputAdornment(inPro
116
119
  children: children
117
120
  }) : /*#__PURE__*/_jsxs(React.Fragment, {
118
121
  children: [position === 'start' ?
119
- /*#__PURE__*/
120
-
121
122
  /* notranslate needed while Google Translate will not fix zero-width space issue */
122
-
123
- /* eslint-disable-next-line react/no-danger */
124
- _jsx("span", {
123
+ _span || (_span = /*#__PURE__*/_jsx("span", {
125
124
  className: "notranslate",
126
- dangerouslySetInnerHTML: {
127
- __html: '&#8203;'
128
- }
129
- }) : null, children]
125
+ children: "\u200B"
126
+ })) : null, children]
130
127
  })
131
128
  }))
132
129
  });
@@ -243,7 +243,7 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
243
243
 
244
244
  /**
245
245
  * If `true`, the modal will not restore focus to previously focused element once
246
- * modal is hidden.
246
+ * modal is hidden or unmounted.
247
247
  * @default false
248
248
  */
249
249
  disableRestoreFocus: PropTypes.bool,
@@ -1,5 +1,8 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
+
4
+ var _span;
5
+
3
6
  import * as React from 'react';
4
7
  import PropTypes from 'prop-types';
5
8
  import styled from '../styles/styled';
@@ -20,14 +23,12 @@ var NotchedOutlineRoot = styled('fieldset')({
20
23
  overflow: 'hidden',
21
24
  minWidth: '0%'
22
25
  });
23
- var NotchedOutlineLegend = styled('legend', {
24
- skipSx: true
25
- })(function (_ref) {
26
+ var NotchedOutlineLegend = styled('legend')(function (_ref) {
26
27
  var ownerState = _ref.ownerState,
27
28
  theme = _ref.theme;
28
29
  return _extends({
29
30
  float: 'unset'
30
- }, ownerState.label === undefined && {
31
+ }, !ownerState.withLabel && {
31
32
  padding: 0,
32
33
  lineHeight: '11px',
33
34
  // sync with `height` in `legend` styles
@@ -35,7 +36,7 @@ var NotchedOutlineLegend = styled('legend', {
35
36
  duration: 150,
36
37
  easing: theme.transitions.easing.easeOut
37
38
  })
38
- }, ownerState.label !== undefined && _extends({
39
+ }, ownerState.withLabel && _extends({
39
40
  display: 'block',
40
41
  // Fix conflict with normalize.css and sanitize.css
41
42
  width: 'auto',
@@ -77,9 +78,11 @@ export default function NotchedOutline(props) {
77
78
  notched = props.notched,
78
79
  other = _objectWithoutProperties(props, ["children", "classes", "className", "label", "notched"]);
79
80
 
81
+ var withLabel = label != null && label !== '';
82
+
80
83
  var ownerState = _extends({}, props, {
81
84
  notched: notched,
82
- label: label
85
+ withLabel: withLabel
83
86
  });
84
87
 
85
88
  return /*#__PURE__*/_jsx(NotchedOutlineRoot, _extends({
@@ -89,18 +92,13 @@ export default function NotchedOutline(props) {
89
92
  }, other, {
90
93
  children: /*#__PURE__*/_jsx(NotchedOutlineLegend, {
91
94
  ownerState: ownerState,
92
- children: label ? /*#__PURE__*/_jsx("span", {
95
+ children: withLabel ? /*#__PURE__*/_jsx("span", {
93
96
  children: label
94
- }) :
95
- /*#__PURE__*/
96
- // notranslate needed while Google Translate will not fix zero-width space issue
97
- // eslint-disable-next-line react/no-danger
98
- _jsx("span", {
97
+ }) : // notranslate needed while Google Translate will not fix zero-width space issue
98
+ _span || (_span = /*#__PURE__*/_jsx("span", {
99
99
  className: "notranslate",
100
- dangerouslySetInnerHTML: {
101
- __html: '&#8203;'
102
- }
103
- })
100
+ children: "\u200B"
101
+ }))
104
102
  })
105
103
  }));
106
104
  }
@@ -137,7 +137,7 @@ var OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inProps
137
137
  renderSuffix: function renderSuffix(state) {
138
138
  return /*#__PURE__*/_jsx(NotchedOutlineRoot, {
139
139
  className: classes.notchedOutline,
140
- label: label && fcs.required ? _React$Fragment || (_React$Fragment = /*#__PURE__*/_jsxs(React.Fragment, {
140
+ label: label != null && label !== '' && fcs.required ? _React$Fragment || (_React$Fragment = /*#__PURE__*/_jsxs(React.Fragment, {
141
141
  children: [label, "\xA0", '*']
142
142
  })) : label,
143
143
  notched: typeof notched !== 'undefined' ? notched : Boolean(state.startAdornment || state.filled || state.focused)
@@ -10,15 +10,11 @@ var RadioButtonIconRoot = styled('span')({
10
10
  position: 'relative',
11
11
  display: 'flex'
12
12
  });
13
- var RadioButtonIconBackground = styled(RadioButtonUncheckedIcon, {
14
- skipSx: true
15
- })({
13
+ var RadioButtonIconBackground = styled(RadioButtonUncheckedIcon)({
16
14
  // Scale applied to prevent dot misalignment in Safari
17
15
  transform: 'scale(1)'
18
16
  });
19
- var RadioButtonIconDot = styled(RadioButtonCheckedIcon, {
20
- skipSx: true
21
- })(function (_ref) {
17
+ var RadioButtonIconDot = styled(RadioButtonCheckedIcon)(function (_ref) {
22
18
  var theme = _ref.theme,
23
19
  ownerState = _ref.ownerState;
24
20
  return _extends({
@@ -425,7 +425,7 @@ var Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
425
425
 
426
426
  var handleChange = function handleChange(event) {
427
427
  var newValue = event.target.value === '' ? null : parseFloat(event.target.value); // Give mouse priority over keyboard
428
- // Fix https://github.com/mui-org/material-ui/issues/22827
428
+ // Fix https://github.com/mui/material-ui/issues/22827
429
429
 
430
430
  if (hover !== -1) {
431
431
  newValue = hover;